@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
@@ -10,7 +10,7 @@ import {
10
10
  } from "./chunk-XP2LN6F6.js";
11
11
  import {
12
12
  sentAsNotice
13
- } from "./chunk-T6G5AASF.js";
13
+ } from "./chunk-OUMMWC7G.js";
14
14
  import "./chunk-UWO2D4HW.js";
15
15
  import "./chunk-HOQ7EUHJ.js";
16
16
  import {
@@ -23,7 +23,7 @@ import {
23
23
  } from "./chunk-UEAX6KUB.js";
24
24
  import {
25
25
  requireAccount
26
- } from "./chunk-LD5KJSCT.js";
26
+ } from "./chunk-BLJGV6ST.js";
27
27
  import {
28
28
  buildPreviewOutput
29
29
  } from "./chunk-TCUYH5GO.js";
@@ -32,6 +32,7 @@ import {
32
32
  readCursorFlag,
33
33
  readMaxPagesFlag,
34
34
  readableId,
35
+ readableObject,
35
36
  readablePage,
36
37
  rejectPaginationModifiersWithoutAll,
37
38
  renderError,
@@ -40,17 +41,18 @@ import {
40
41
  resolveEffectiveConfig,
41
42
  streamAll,
42
43
  writeNdjsonItem
43
- } from "./chunk-OTBJATDE.js";
44
+ } from "./chunk-B5NIX4G6.js";
44
45
  import "./chunk-XZJQQJBE.js";
45
46
  import {
46
47
  createClient
47
- } from "./chunk-DCZR4M7G.js";
48
+ } from "./chunk-UJOTQPL6.js";
48
49
  import {
49
50
  GLOBAL_FLAGS,
50
51
  NON_STREAM_FLAGS,
51
52
  WRITE_FLAGS,
53
+ readOnly,
52
54
  resolveTextOrStdin
53
- } from "./chunk-XDQHNUEU.js";
55
+ } from "./chunk-TC4ZPUWI.js";
54
56
 
55
57
  // src/commands/company.ts
56
58
  import { defineCommand } from "citty";
@@ -60,12 +62,6 @@ function buildOutputStreams() {
60
62
  stderr: { write: (s) => process.stderr.write(s) }
61
63
  };
62
64
  }
63
- function rejectPreviewOnRead(preview, out) {
64
- if (preview) {
65
- out.stderr.write("error: --preview is only valid on write commands (mutations). Reads just run.\n");
66
- process.exit(2);
67
- }
68
- }
69
65
  function resolveOutputOpts(flags) {
70
66
  return {
71
67
  json: (flags.json ?? false) || !process.stdout.isTTY,
@@ -98,7 +94,6 @@ async function handleSdkError(err, outOpts, out) {
98
94
  process.exit(1);
99
95
  }
100
96
  async function runCompanyGet(client, flags, out) {
101
- rejectPreviewOnRead(flags.preview, out);
102
97
  if (flags.all) {
103
98
  out.stderr.write("error: --all is not supported on non-paginated commands.\n");
104
99
  process.exit(2);
@@ -113,13 +108,13 @@ async function runCompanyGet(client, flags, out) {
113
108
  const outOpts = { ...resolveOutputOpts(flags), slim: slimCompany };
114
109
  try {
115
110
  const result = await client.account(accountId).companies.get(resolvedId);
111
+ readableObject(result);
116
112
  renderSuccess(result, outOpts, out);
117
113
  } catch (err) {
118
114
  await handleSdkError(err, outOpts, out);
119
115
  }
120
116
  }
121
117
  async function runCompanyEmployees(client, flags, out) {
122
- rejectPreviewOnRead(flags.preview, out);
123
118
  rejectPaginationModifiersWithoutAll(flags, out);
124
119
  const accountId = await requireAccount(client, flags, out);
125
120
  const ns = client.account(accountId);
@@ -152,7 +147,6 @@ async function runCompanyEmployees(client, flags, out) {
152
147
  }
153
148
  }
154
149
  async function runCompanyPosts(client, flags, out) {
155
- rejectPreviewOnRead(flags.preview, out);
156
150
  rejectPaginationModifiersWithoutAll(flags, out);
157
151
  const accountId = await requireAccount(client, flags, out);
158
152
  const ns = client.account(accountId);
@@ -183,7 +177,6 @@ async function runCompanyPosts(client, flags, out) {
183
177
  }
184
178
  }
185
179
  async function runCompanyJobs(client, flags, out) {
186
- rejectPreviewOnRead(flags.preview, out);
187
180
  rejectPaginationModifiersWithoutAll(flags, out);
188
181
  const accountId = await requireAccount(client, flags, out);
189
182
  const ns = client.account(accountId);
@@ -215,7 +208,6 @@ async function runCompanyJobs(client, flags, out) {
215
208
  }
216
209
  }
217
210
  async function runCompanyInvitableFollowers(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);
@@ -276,7 +268,6 @@ async function runCompanyFollowInvite(client, flags, out) {
276
268
  }
277
269
  }
278
270
  async function runCompanyManaged(client, flags, out) {
279
- rejectPreviewOnRead(flags.preview, out);
280
271
  rejectPaginationModifiersWithoutAll(flags, out);
281
272
  const accountId = await requireAccount(client, flags, out);
282
273
  const ns = client.account(accountId);
@@ -306,7 +297,6 @@ async function runCompanyManaged(client, flags, out) {
306
297
  }
307
298
  }
308
299
  async function runCompanyFollowers(client, flags, out) {
309
- rejectPreviewOnRead(flags.preview, out);
310
300
  rejectPaginationModifiersWithoutAll(flags, out);
311
301
  const accountId = await requireAccount(client, flags, out);
312
302
  const ns = client.account(accountId);
@@ -337,7 +327,6 @@ async function runCompanyFollowers(client, flags, out) {
337
327
  }
338
328
  }
339
329
  async function runCompanyChats(client, flags, out) {
340
- rejectPreviewOnRead(flags.preview, out);
341
330
  rejectPaginationModifiersWithoutAll(flags, out);
342
331
  const accountId = await requireAccount(client, flags, out);
343
332
  const ns = client.account(accountId);
@@ -368,7 +357,6 @@ async function runCompanyChats(client, flags, out) {
368
357
  }
369
358
  }
370
359
  async function runCompanyChat(client, flags, out) {
371
- rejectPreviewOnRead(flags.preview, out);
372
360
  if (flags.all) {
373
361
  out.stderr.write("error: --all is not supported on non-paginated commands.\n");
374
362
  process.exit(2);
@@ -380,13 +368,13 @@ async function runCompanyChat(client, flags, out) {
380
368
  try {
381
369
  const identifier = await resolveCompanyId(ns, flags.id ?? "");
382
370
  const result = await ns.companies.chat(identifier, chatId);
371
+ readableObject(result);
383
372
  renderSuccess(result, outOpts, out);
384
373
  } catch (err) {
385
374
  await handleSdkError(err, outOpts, out);
386
375
  }
387
376
  }
388
377
  async function runCompanyMessages(client, flags, out) {
389
- rejectPreviewOnRead(flags.preview, out);
390
378
  rejectPaginationModifiersWithoutAll(flags, out);
391
379
  const accountId = await requireAccount(client, flags, out);
392
380
  const ns = client.account(accountId);
@@ -418,7 +406,6 @@ async function runCompanyMessages(client, flags, out) {
418
406
  }
419
407
  }
420
408
  async function runCompanyMessage(client, flags, out) {
421
- rejectPreviewOnRead(flags.preview, out);
422
409
  if (flags.all) {
423
410
  out.stderr.write("error: --all is not supported on non-paginated commands.\n");
424
411
  process.exit(2);
@@ -431,13 +418,13 @@ async function runCompanyMessage(client, flags, out) {
431
418
  try {
432
419
  const identifier = await resolveCompanyId(ns, flags.id ?? "");
433
420
  const result = await ns.companies.message(identifier, chatId, messageId);
421
+ readableObject(result);
434
422
  renderSuccess(result, outOpts, out);
435
423
  } catch (err) {
436
424
  await handleSdkError(err, outOpts, out);
437
425
  }
438
426
  }
439
427
  async function runCompanySearchChats(client, flags, out) {
440
- rejectPreviewOnRead(flags.preview, out);
441
428
  rejectPaginationModifiersWithoutAll(flags, out);
442
429
  const accountId = await requireAccount(client, flags, out);
443
430
  const ns = client.account(accountId);
@@ -521,9 +508,16 @@ async function runCompanyReply(client, flags, out, _readStdin) {
521
508
  }
522
509
  }
523
510
  var companyEmployeesCommand = defineCommand({
524
- meta: { name: "employees", description: "List people who currently work at the company." },
511
+ meta: {
512
+ name: "employees",
513
+ description: "List people who currently work at the company.",
514
+ examples: [
515
+ "curviate company employees acmecorp",
516
+ 'curviate company employees 1234567 --keywords "machine learning"'
517
+ ]
518
+ },
525
519
  args: {
526
- ...GLOBAL_FLAGS,
520
+ ...readOnly(GLOBAL_FLAGS),
527
521
  id: { type: "positional", description: "Company identifier (URL, slug, or numeric id), a slug/URL is resolved to the numeric id first." },
528
522
  keywords: { type: "string", description: "Free-text keyword filter across employee profile fields." },
529
523
  location: { type: "string", description: "Opaque location id from `curviate search parameters --type LOCATION`." }
@@ -547,9 +541,16 @@ var companyEmployeesCommand = defineCommand({
547
541
  }
548
542
  });
549
543
  var companyPostsCommand = defineCommand({
550
- meta: { name: "posts", description: "List the company's posts." },
544
+ meta: {
545
+ name: "posts",
546
+ description: "List the company's posts.",
547
+ examples: [
548
+ "curviate company posts acmecorp",
549
+ "curviate company posts 1234567 --limit 5"
550
+ ]
551
+ },
551
552
  args: {
552
- ...GLOBAL_FLAGS,
553
+ ...readOnly(GLOBAL_FLAGS),
553
554
  id: { type: "positional", description: "Company identifier (URL, slug, or numeric id), a slug/URL is resolved to the numeric id first." }
554
555
  },
555
556
  async run({ args }) {
@@ -571,9 +572,16 @@ var companyPostsCommand = defineCommand({
571
572
  }
572
573
  });
573
574
  var companyJobsCommand = defineCommand({
574
- meta: { name: "jobs", description: "List the company's open job postings." },
575
+ meta: {
576
+ name: "jobs",
577
+ description: "List the company's open job postings.",
578
+ examples: [
579
+ "curviate company jobs acmecorp",
580
+ "curviate company jobs 1234567 --keywords engineer"
581
+ ]
582
+ },
575
583
  args: {
576
- ...GLOBAL_FLAGS,
584
+ ...readOnly(GLOBAL_FLAGS),
577
585
  id: { type: "positional", description: "Company identifier (URL, slug, or numeric id), a slug/URL is resolved to the numeric id first." },
578
586
  keywords: { type: "string", description: "Free-text keyword filter across job postings." }
579
587
  },
@@ -598,10 +606,13 @@ var companyJobsCommand = defineCommand({
598
606
  var companyInvitableFollowersCommand = defineCommand({
599
607
  meta: {
600
608
  name: "invitable-followers",
601
- description: "List the account's 1st-degree connections who are eligible to be invited to follow the company page. This is the read that seeds `company follow-invite`. Items carry no name or headline (a wire limitation), so hydrate a candidate via `profile <id>` before deciding who to invite. `invite_token` is always returned as base64 (the raw value can carry binary bytes unsafe to print)."
609
+ description: "List the account's 1st-degree connections who are eligible to be invited to follow the company page. This is the read that seeds `company follow-invite`. Items carry no name or headline (a wire limitation), so hydrate a candidate via `profile <id>` before deciding who to invite. `invite_token` is always returned as base64 (the raw value can carry binary bytes unsafe to print).",
610
+ examples: [
611
+ "curviate company invitable-followers 1234567"
612
+ ]
602
613
  },
603
614
  args: {
604
- ...GLOBAL_FLAGS,
615
+ ...readOnly(GLOBAL_FLAGS),
605
616
  id: { type: "positional", description: "Company identifier (URL, slug, or numeric id), resolved to the numeric id first." }
606
617
  },
607
618
  async run({ args }) {
@@ -625,14 +636,18 @@ var companyInvitableFollowersCommand = defineCommand({
625
636
  var companyFollowInviteCommand = defineCommand({
626
637
  meta: {
627
638
  name: "follow-invite",
628
- description: "Invite the account's 1st-degree connections to follow the administered company page. Write, admin-gated (the account must administer the page with invite rights). Pass the AC... member ids from `company invitable-followers`, one --invitee per invitee. All-or-nothing: for an all-valid request you get one outcome per invitee, in request order (invited/already_invited/ineligible/not_found); if any invitee id is invalid the whole request rejects with a 404, not a partial result. Re-inviting an already-invited member is a safe no-op (the same invitation id, never a duplicate)."
639
+ description: "Invite the account's 1st-degree connections to follow the administered company page. Write, admin-gated (the account must administer the page with invite rights). Pass the AC... member ids from `company invitable-followers`, one --invitee per invitee. All-or-nothing: for an all-valid request you get one outcome per invitee, in request order (invited/already_invited/ineligible/not_found); if any invitee id is invalid the whole request rejects with a 404, not a partial result. Re-inviting an already-invited member is a safe no-op (the same invitation id, never a duplicate).",
640
+ examples: [
641
+ "curviate company follow-invite 1234567 --invitee ACoAAB1cDeFgHiJkLmNoP"
642
+ ]
629
643
  },
630
644
  args: {
631
645
  ...WRITE_FLAGS,
632
646
  id: { type: "positional", description: "Company identifier (URL, slug, or numeric id), resolved to the numeric id first, including under --preview." },
633
647
  invitee: {
634
648
  type: "string",
635
- description: "AC... member id to invite (from `company invitable-followers`). Repeatable, at least one required, max 50 per request."
649
+ description: "AC... member id to invite (from `company invitable-followers`). Repeatable, at least one required, max 50 per request.",
650
+ required: true
636
651
  }
637
652
  },
638
653
  async run({ args }) {
@@ -654,8 +669,14 @@ var companyFollowInviteCommand = defineCommand({
654
669
  }
655
670
  });
656
671
  var companyManagedCommand = defineCommand({
657
- meta: { name: "managed", description: "List the company pages the connected account administers. An empty result is valid, the account administers no pages." },
658
- args: { ...GLOBAL_FLAGS },
672
+ meta: {
673
+ name: "managed",
674
+ description: "List the company pages the connected account administers. An empty result is valid, the account administers no pages.",
675
+ examples: [
676
+ "curviate company managed"
677
+ ]
678
+ },
679
+ args: { ...readOnly(GLOBAL_FLAGS) },
659
680
  async run({ args }) {
660
681
  const flags = args;
661
682
  const cfg = await resolveEffectiveConfig({
@@ -675,9 +696,16 @@ var companyManagedCommand = defineCommand({
675
696
  }
676
697
  });
677
698
  var companyFollowersCommand = defineCommand({
678
- meta: { name: "followers", description: "List a company page's followers, newest first. Admin-gated: the account must administer the page (see `company managed`)." },
699
+ meta: {
700
+ name: "followers",
701
+ description: "List a company page's followers, newest first. Admin-gated: the account must administer the page (see `company managed`).",
702
+ examples: [
703
+ "curviate company followers 1234567",
704
+ "curviate company followers 1234567 --all"
705
+ ]
706
+ },
679
707
  args: {
680
- ...GLOBAL_FLAGS,
708
+ ...readOnly(GLOBAL_FLAGS),
681
709
  id: { type: "positional", description: "Company identifier (URL, slug, or numeric id), a slug/URL is resolved to the numeric id first." }
682
710
  },
683
711
  async run({ args }) {
@@ -701,10 +729,13 @@ var companyFollowersCommand = defineCommand({
701
729
  var companyChatsCommand = defineCommand({
702
730
  meta: {
703
731
  name: "chats",
704
- description: "List the conversations in a company page's admin message inbox, newest-activity-first. Admin-gated. Beta."
732
+ description: "List the conversations in a company page's admin message inbox, newest-activity-first. Admin-gated. Beta.",
733
+ examples: [
734
+ "curviate company chats 1234567"
735
+ ]
705
736
  },
706
737
  args: {
707
- ...GLOBAL_FLAGS,
738
+ ...readOnly(GLOBAL_FLAGS),
708
739
  id: { type: "positional", description: "Company identifier (URL, slug, or numeric id), a slug/URL is resolved to the numeric id first." }
709
740
  },
710
741
  async run({ args }) {
@@ -728,10 +759,13 @@ var companyChatsCommand = defineCommand({
728
759
  var companyChatCommand = defineCommand({
729
760
  meta: {
730
761
  name: "chat",
731
- description: "Retrieve one conversation from a company page's admin inbox. Admin-gated."
762
+ description: "Retrieve one conversation from a company page's admin inbox. Admin-gated.",
763
+ examples: [
764
+ "curviate company chat 1234567 2-YTQ3ODU3Njgt"
765
+ ]
732
766
  },
733
767
  args: {
734
- ...NON_STREAM_FLAGS,
768
+ ...readOnly(NON_STREAM_FLAGS),
735
769
  id: { type: "positional", description: "Company identifier (URL, slug, or numeric id), a slug/URL is resolved to the numeric id first." },
736
770
  chatId: { type: "positional", description: "The 2-... chat id from `company chats`, passed through verbatim." }
737
771
  },
@@ -756,10 +790,13 @@ var companyChatCommand = defineCommand({
756
790
  var companyMessagesCommand = defineCommand({
757
791
  meta: {
758
792
  name: "messages",
759
- description: "List a company-inbox conversation's messages, newest first. Admin-gated."
793
+ description: "List a company-inbox conversation's messages, newest first. Admin-gated.",
794
+ examples: [
795
+ "curviate company messages 1234567 2-YTQ3ODU3Njgt"
796
+ ]
760
797
  },
761
798
  args: {
762
- ...GLOBAL_FLAGS,
799
+ ...readOnly(GLOBAL_FLAGS),
763
800
  id: { type: "positional", description: "Company identifier (URL, slug, or numeric id), a slug/URL is resolved to the numeric id first." },
764
801
  chatId: { type: "positional", description: "The 2-... chat id from `company chats`, passed through verbatim." }
765
802
  },
@@ -784,10 +821,13 @@ var companyMessagesCommand = defineCommand({
784
821
  var companyMessageCommand = defineCommand({
785
822
  meta: {
786
823
  name: "message",
787
- description: "Retrieve one message from a company-inbox conversation. Admin-gated. See also: `company reply` (send)."
824
+ description: "Retrieve one message from a company-inbox conversation. Admin-gated. See also: `company reply` (send).",
825
+ examples: [
826
+ "curviate company message 1234567 2-YTQ3ODU3Njgt MSG_ID"
827
+ ]
788
828
  },
789
829
  args: {
790
- ...NON_STREAM_FLAGS,
830
+ ...readOnly(NON_STREAM_FLAGS),
791
831
  id: { type: "positional", description: "Company identifier (URL, slug, or numeric id), a slug/URL is resolved to the numeric id first." },
792
832
  chatId: { type: "positional", description: "The 2-... chat id from `company chats`, passed through verbatim." },
793
833
  messageId: { type: "positional", description: "The message id from `company messages`, passed through verbatim." }
@@ -813,10 +853,14 @@ var companyMessageCommand = defineCommand({
813
853
  var companySearchChatsCommand = defineCommand({
814
854
  meta: {
815
855
  name: "search-chats",
816
- description: "Search or filter a company page's admin inbox. Exactly one mode per call: free-text <query>, --topic, or --unread; mutually exclusive, enforced server-side. Admin-gated. Beta."
856
+ description: "Search or filter a company page's admin inbox. Exactly one mode per call: free-text <query>, --topic, or --unread; mutually exclusive, enforced server-side. Admin-gated. Beta.",
857
+ examples: [
858
+ "curviate company search-chats 1234567 sophie",
859
+ "curviate company search-chats 1234567 sophie --unread"
860
+ ]
817
861
  },
818
862
  args: {
819
- ...GLOBAL_FLAGS,
863
+ ...readOnly(GLOBAL_FLAGS),
820
864
  id: { type: "positional", description: "Company identifier (URL, slug, or numeric id), a slug/URL is resolved to the numeric id first." },
821
865
  query: { type: "positional", required: false, description: "Free-text term, matches participant names and message content." },
822
866
  topic: { type: "string", description: "Filter mode, one inbox topic card: 1-5 or its name (Service request, Request a demo, Support, Careers, Other)." },
@@ -843,7 +887,10 @@ var companySearchChatsCommand = defineCommand({
843
887
  var companyReplyCommand = defineCommand({
844
888
  meta: {
845
889
  name: "reply",
846
- description: "Reply to a company-inbox conversation, as the page (write, admin-gated: the account must administer the page). Takes the normal 2-... chat id from `company chats`; the endpoint resolves the page mailbox internally from the company id. Reply-only, this cannot start a new conversation on the page's behalf. See also: `company chats` (the read that returns the chat id) and `message send` (the personal equivalent)."
890
+ description: "Reply to a company-inbox conversation, as the page (write, admin-gated: the account must administer the page). Takes the normal 2-... chat id from `company chats`; the endpoint resolves the page mailbox internally from the company id. Reply-only, this cannot start a new conversation on the page's behalf. See also: `company chats` (the read that returns the chat id) and `message send` (the personal equivalent).",
891
+ examples: [
892
+ 'curviate company reply 1234567 2-YTQ3ODU3Njgt "Thanks for reaching out, happy to help."'
893
+ ]
847
894
  },
848
895
  args: {
849
896
  ...WRITE_FLAGS,
@@ -874,9 +921,16 @@ var companyReplyCommand = defineCommand({
874
921
  }
875
922
  });
876
923
  var companyCommand = defineCommand({
877
- meta: { name: "company", description: "Fetch a company profile by URL, slug, or numeric id, and its sub-resources." },
924
+ meta: {
925
+ name: "company",
926
+ description: "Fetch a company profile by URL, slug, or numeric id, and its sub-resources.",
927
+ examples: [
928
+ "curviate company acmecorp",
929
+ "curviate company https://www.linkedin.com/company/acmecorp"
930
+ ]
931
+ },
878
932
  args: {
879
- ...NON_STREAM_FLAGS,
933
+ ...readOnly(NON_STREAM_FLAGS),
880
934
  id: { type: "positional", description: "Company identifier (URL, slug, or native id)." },
881
935
  sections: { type: "string", description: "Not supported on company commands; a usage error (exit 2) if supplied." }
882
936
  },
@@ -12,10 +12,10 @@ import {
12
12
  setActiveProfile,
13
13
  updateProfileField,
14
14
  withoutUserinfo
15
- } from "./chunk-DCZR4M7G.js";
15
+ } from "./chunk-UJOTQPL6.js";
16
16
  import {
17
17
  GLOBAL_FLAGS
18
- } from "./chunk-XDQHNUEU.js";
18
+ } from "./chunk-TC4ZPUWI.js";
19
19
 
20
20
  // src/commands/config.ts
21
21
  import { defineCommand } from "citty";
@@ -35,7 +35,13 @@ var configCommand = defineCommand({
35
35
  },
36
36
  subCommands: {
37
37
  list: defineCommand({
38
- meta: { name: "list", description: "List all profiles (keys redacted)." },
38
+ meta: {
39
+ name: "list",
40
+ description: "List all profiles (keys redacted).",
41
+ examples: [
42
+ "curviate config list"
43
+ ]
44
+ },
39
45
  args: { json: GLOBAL_FLAGS.json },
40
46
  async run({ args }) {
41
47
  const file = await readConfigFile();
@@ -101,13 +107,25 @@ var configCommand = defineCommand({
101
107
  }
102
108
  }),
103
109
  path: defineCommand({
104
- meta: { name: "path", description: "Print the config file path." },
110
+ meta: {
111
+ name: "path",
112
+ description: "Print the config file path.",
113
+ examples: [
114
+ "curviate config path"
115
+ ]
116
+ },
105
117
  async run() {
106
118
  process.stdout.write(getConfigPath() + "\n");
107
119
  }
108
120
  }),
109
121
  use: defineCommand({
110
- meta: { name: "use", description: "Set the active profile." },
122
+ meta: {
123
+ name: "use",
124
+ description: "Set the active profile.",
125
+ examples: [
126
+ "curviate config use work"
127
+ ]
128
+ },
111
129
  args: {
112
130
  name: { type: "positional", description: "Profile name to activate." }
113
131
  },
@@ -127,7 +145,13 @@ var configCommand = defineCommand({
127
145
  }
128
146
  }),
129
147
  rename: defineCommand({
130
- meta: { name: "rename", description: "Rename a profile." },
148
+ meta: {
149
+ name: "rename",
150
+ description: "Rename a profile.",
151
+ examples: [
152
+ "curviate config rename default personal"
153
+ ]
154
+ },
131
155
  args: {
132
156
  old: { type: "positional", description: "Current profile name." },
133
157
  new: { type: "positional", description: "New profile name." }
@@ -151,7 +175,10 @@ var configCommand = defineCommand({
151
175
  "set-account": defineCommand({
152
176
  meta: {
153
177
  name: "set-account",
154
- description: "Set the default account on a profile."
178
+ description: "Set the default account on a profile.",
179
+ examples: [
180
+ "curviate config set-account acc_YOUR_ACCOUNT_ID"
181
+ ]
155
182
  },
156
183
  args: {
157
184
  profile: GLOBAL_FLAGS.profile,
@@ -185,7 +212,11 @@ var configCommand = defineCommand({
185
212
  "set-base-url": defineCommand({
186
213
  meta: {
187
214
  name: "set-base-url",
188
- description: "Set or clear the base URL on a profile."
215
+ description: "Set or clear the base URL on a profile.",
216
+ examples: [
217
+ "curviate config set-base-url https://api.curviate.com",
218
+ "curviate config set-base-url --reset"
219
+ ]
189
220
  },
190
221
  args: {
191
222
  profile: GLOBAL_FLAGS.profile,
@@ -245,7 +276,11 @@ var configCommand = defineCommand({
245
276
  reset: defineCommand({
246
277
  meta: {
247
278
  name: "reset",
248
- description: "Remove the config file (or a single profile)."
279
+ description: "Remove the config file (or a single profile).",
280
+ examples: [
281
+ "curviate config reset --profile work --yes",
282
+ "curviate config reset --yes"
283
+ ]
249
284
  },
250
285
  args: {
251
286
  json: GLOBAL_FLAGS.json,
@@ -13,7 +13,7 @@ import {
13
13
  } from "./chunk-UEAX6KUB.js";
14
14
  import {
15
15
  requireAccount
16
- } from "./chunk-LD5KJSCT.js";
16
+ } from "./chunk-BLJGV6ST.js";
17
17
  import {
18
18
  buildPreviewOutput
19
19
  } from "./chunk-TCUYH5GO.js";
@@ -29,15 +29,16 @@ import {
29
29
  resolveEffectiveConfig,
30
30
  streamAll,
31
31
  writeNdjsonItem
32
- } from "./chunk-OTBJATDE.js";
32
+ } from "./chunk-B5NIX4G6.js";
33
33
  import "./chunk-XZJQQJBE.js";
34
34
  import {
35
35
  createClient
36
- } from "./chunk-DCZR4M7G.js";
36
+ } from "./chunk-UJOTQPL6.js";
37
37
  import {
38
38
  GLOBAL_FLAGS,
39
- WRITE_FLAGS
40
- } from "./chunk-XDQHNUEU.js";
39
+ WRITE_FLAGS,
40
+ readOnly
41
+ } from "./chunk-TC4ZPUWI.js";
41
42
 
42
43
  // src/commands/connect.ts
43
44
  import { defineCommand } from "citty";
@@ -47,12 +48,6 @@ function buildOutputStreams() {
47
48
  stderr: { write: (s) => process.stderr.write(s) }
48
49
  };
49
50
  }
50
- function rejectPreviewOnRead(preview, out) {
51
- if (preview) {
52
- out.stderr.write("error: --preview is only valid on write commands (mutations). Reads just run.\n");
53
- process.exit(2);
54
- }
55
- }
56
51
  function resolveOutputOpts(flags) {
57
52
  return {
58
53
  json: (flags.json ?? false) || !process.stdout.isTTY,
@@ -96,7 +91,6 @@ async function runConnectSend(client, flags, out) {
96
91
  }
97
92
  }
98
93
  async function runConnectSent(client, flags, out) {
99
- rejectPreviewOnRead(flags.preview, out);
100
94
  rejectPaginationModifiersWithoutAll(flags, out);
101
95
  const accountId = await requireAccount(client, flags, out);
102
96
  const ns = client.account(accountId);
@@ -136,7 +130,6 @@ async function runConnectSent(client, flags, out) {
136
130
  }
137
131
  }
138
132
  async function runConnectReceived(client, flags, out) {
139
- rejectPreviewOnRead(flags.preview, out);
140
133
  rejectPaginationModifiersWithoutAll(flags, out);
141
134
  const accountId = await requireAccount(client, flags, out);
142
135
  const ns = client.account(accountId);
@@ -265,9 +258,13 @@ async function runConnectCancel(client, flags, out) {
265
258
  var connectSentCommand = defineCommand({
266
259
  meta: {
267
260
  name: "sent",
268
- description: "Returns pending sent invitations only. Accepted and declined invitations are not returned (LinkedIn API limitation). Use `id` with `connect cancel`; use `user.id` (native member URN; the sent-variant carries no public slug) to identify the recipient. `created_at` is the platform's own ISO-8601 timestamp (not an approximation). No total count is available; use `connect sent --all` and count client-side. A very recently sent invitation may take a few minutes to appear here (LinkedIn-side indexing)."
261
+ description: "Returns pending sent invitations only. Accepted and declined invitations are not returned (LinkedIn API limitation). Use `id` with `connect cancel`; use `user.id` (native member URN; the sent-variant carries no public slug) to identify the recipient. `created_at` is the platform's own ISO-8601 timestamp (not an approximation). No total count is available; use `connect sent --all` and count client-side. A very recently sent invitation may take a few minutes to appear here (LinkedIn-side indexing).",
262
+ examples: [
263
+ "curviate connect sent",
264
+ "curviate connect sent --all"
265
+ ]
269
266
  },
270
- args: { ...GLOBAL_FLAGS },
267
+ args: { ...readOnly(GLOBAL_FLAGS) },
271
268
  async run({ args }) {
272
269
  const flags = args;
273
270
  const cfg = await resolveEffectiveConfig({
@@ -289,9 +286,13 @@ var connectSentCommand = defineCommand({
289
286
  var connectReceivedCommand = defineCommand({
290
287
  meta: {
291
288
  name: "received",
292
- description: "Returns pending received invitations only. Already-handled invitations are not returned. The `user.*` fields (`public_identifier`, `display_name`, `first_name`, `last_name`) identify who sent the request. Use the `id` field with `connect accept` or `connect decline`. A very recently received invitation may take a few minutes to appear here (LinkedIn-side indexing)."
289
+ description: "Returns pending received invitations only. Already-handled invitations are not returned. The `user.*` fields (`public_identifier`, `display_name`, `first_name`, `last_name`) identify who sent the request. Use the `id` field with `connect accept` or `connect decline`. A very recently received invitation may take a few minutes to appear here (LinkedIn-side indexing).",
290
+ examples: [
291
+ "curviate connect received",
292
+ "curviate connect received --json"
293
+ ]
293
294
  },
294
- args: { ...GLOBAL_FLAGS },
295
+ args: { ...readOnly(GLOBAL_FLAGS) },
295
296
  async run({ args }) {
296
297
  const flags = args;
297
298
  const cfg = await resolveEffectiveConfig({
@@ -311,7 +312,13 @@ var connectReceivedCommand = defineCommand({
311
312
  }
312
313
  });
313
314
  var connectAcceptCommand = defineCommand({
314
- meta: { name: "accept", description: "Accept a received invitation." },
315
+ meta: {
316
+ name: "accept",
317
+ description: "Accept a received invitation.",
318
+ examples: [
319
+ "curviate connect accept INVITATION_ID"
320
+ ]
321
+ },
315
322
  args: {
316
323
  ...WRITE_FLAGS,
317
324
  id: {
@@ -338,7 +345,13 @@ var connectAcceptCommand = defineCommand({
338
345
  }
339
346
  });
340
347
  var connectDeclineCommand = defineCommand({
341
- meta: { name: "decline", description: "Decline a received invitation." },
348
+ meta: {
349
+ name: "decline",
350
+ description: "Decline a received invitation.",
351
+ examples: [
352
+ "curviate connect decline INVITATION_ID"
353
+ ]
354
+ },
342
355
  args: {
343
356
  ...WRITE_FLAGS,
344
357
  id: {
@@ -365,7 +378,13 @@ var connectDeclineCommand = defineCommand({
365
378
  }
366
379
  });
367
380
  var connectCancelCommand = defineCommand({
368
- meta: { name: "cancel", description: "Cancel a sent invitation." },
381
+ meta: {
382
+ name: "cancel",
383
+ description: "Cancel a sent invitation.",
384
+ examples: [
385
+ "curviate connect cancel INVITATION_ID"
386
+ ]
387
+ },
369
388
  args: {
370
389
  ...WRITE_FLAGS,
371
390
  id: { type: "positional", description: "Invitation id to cancel." }
@@ -409,7 +428,11 @@ function guardBareConnectForm(id, out) {
409
428
  var connectCommand = defineCommand({
410
429
  meta: {
411
430
  name: "connect",
412
- description: "Send or manage connection invitations. Connection requests may take 10-30 seconds to appear in the recipient's received list (LinkedIn propagation delay)."
431
+ description: "Send or manage connection invitations. Connection requests may take 10-30 seconds to appear in the recipient's received list (LinkedIn propagation delay).",
432
+ examples: [
433
+ "curviate connect janesmith",
434
+ 'curviate connect https://www.linkedin.com/in/janesmith --note "Enjoyed your talk on agents, would love to connect."'
435
+ ]
413
436
  },
414
437
  args: {
415
438
  ...WRITE_FLAGS,