@curviate/cli 0.22.0 → 0.23.1

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 +85 -1
  2. package/README.md +65 -23
  3. package/dist/{account-QRGWUQXF.js → account-NZZLUI4E.js} +11 -12
  4. package/dist/{chunk-H6XD3F66.js → chunk-766W25QS.js} +1 -1
  5. package/dist/{chunk-ZYURL5VK.js → chunk-AHYUM2XQ.js} +93 -1
  6. package/dist/{chunk-56ORAZJO.js → chunk-LCIUD7S2.js} +1 -1
  7. package/dist/chunk-LCLYFE54.js +182 -0
  8. package/dist/{chunk-QJZ3LWOX.js → chunk-RJTG5YWE.js} +1 -1
  9. package/dist/{chunk-T5LPGAGJ.js → chunk-S6VAMUCC.js} +16 -22
  10. package/dist/{chunk-CUTMZWL6.js → chunk-SYRFLZ4D.js} +2 -94
  11. package/dist/{chunk-JA3NNST6.js → chunk-TKWW6BV6.js} +2 -2
  12. package/dist/{chunk-DMQZEPQE.js → chunk-UEAX6KUB.js} +10 -0
  13. package/dist/cli.js +107 -68
  14. package/dist/{comment-MCGXFMN4.js → comment-SXYTJPXI.js} +21 -25
  15. package/dist/{company-WDDLWP7E.js → company-GZ2QR2CZ.js} +26 -30
  16. package/dist/{config-FPWWYG7G.js → config-YKQ4QEBI.js} +4 -3
  17. package/dist/{connect-5OROSY5C.js → connect-3LTKVRGM.js} +15 -18
  18. package/dist/{feed-SFVYEAYP.js → feed-ZY27EY52.js} +9 -12
  19. package/dist/{group-HSZY2IJU.js → group-DBE25EID.js} +16 -16
  20. package/dist/{inbox-L6JBGZIB.js → inbox-E6ME3ROZ.js} +14 -17
  21. package/dist/{inboxes-UIO74C5Q.js → inboxes-JRX3J32A.js} +10 -13
  22. package/dist/{job-75ML7R7I.js → job-U5YIJ7KB.js} +19 -22
  23. package/dist/{login-ZLDDIAFW.js → login-ERQVI27Q.js} +3 -3
  24. package/dist/{message-DAQHRBSJ.js → message-NPX7UX46.js} +7 -5
  25. package/dist/{notification-DYJN4ZHN.js → notification-XSSA5QOJ.js} +11 -14
  26. package/dist/{post-RGDOCGC4.js → post-OSM7JH65.js} +22 -26
  27. package/dist/{profile-TJS2YAZD.js → profile-LQXOC7HY.js} +25 -28
  28. package/dist/{recruiter-NSM33IEK.js → recruiter-ZUTWJHO5.js} +34 -38
  29. package/dist/{sales-nav-5O7FR57S.js → sales-nav-LSUBIJWZ.js} +22 -25
  30. package/dist/{search-TDSLK2MB.js → search-FEHXVTQ3.js} +30 -33
  31. package/dist/{webhook-7ESDSIRU.js → webhook-C43C5BK7.js} +5 -10
  32. package/package.json +2 -2
@@ -3,7 +3,7 @@ import {
3
3
  DEFAULT_FILTER_READERS,
4
4
  assembleFilters,
5
5
  splitCsv
6
- } from "./chunk-56ORAZJO.js";
6
+ } from "./chunk-LCIUD7S2.js";
7
7
  import {
8
8
  AttachError,
9
9
  readAttachment,
@@ -15,7 +15,7 @@ import {
15
15
  import {
16
16
  pageDelayFromFlags,
17
17
  streamAll
18
- } from "./chunk-H6XD3F66.js";
18
+ } from "./chunk-766W25QS.js";
19
19
  import {
20
20
  BinaryOutputError,
21
21
  writeBinaryOutput
@@ -23,7 +23,10 @@ import {
23
23
  import {
24
24
  resolveIdentifier,
25
25
  resolveJobIdentifier
26
- } from "./chunk-DMQZEPQE.js";
26
+ } from "./chunk-UEAX6KUB.js";
27
+ import {
28
+ requireAccount
29
+ } from "./chunk-LCLYFE54.js";
27
30
  import {
28
31
  buildPreviewOutput
29
32
  } from "./chunk-R3VLWLVV.js";
@@ -33,16 +36,16 @@ import {
33
36
  renderSuccess,
34
37
  renderUnexpectedError,
35
38
  resolveEffectiveConfig
36
- } from "./chunk-JA3NNST6.js";
39
+ } from "./chunk-TKWW6BV6.js";
40
+ import "./chunk-SYRFLZ4D.js";
37
41
  import {
38
42
  GLOBAL_FLAGS,
39
43
  READ_SINGLE_FLAGS,
40
44
  WRITE_FLAGS,
41
- WRITE_SINGLE_FLAGS
42
- } from "./chunk-CUTMZWL6.js";
43
- import {
45
+ WRITE_SINGLE_FLAGS,
44
46
  isStdinToken
45
- } from "./chunk-ZYURL5VK.js";
47
+ } from "./chunk-AHYUM2XQ.js";
48
+ import "./chunk-PMRQXBCP.js";
46
49
 
47
50
  // src/commands/recruiter.ts
48
51
  import { defineCommand } from "citty";
@@ -53,13 +56,6 @@ function buildOutputStreams() {
53
56
  stderr: { write: (s) => process.stderr.write(s) }
54
57
  };
55
58
  }
56
- function requireAccount(account, out) {
57
- if (!account) {
58
- out.stderr.write("error: --account is required for this command. Set it via --account, CURVIATE_ACCOUNT, or `curviate config set-account`.\n");
59
- process.exit(2);
60
- }
61
- return account;
62
- }
63
59
  function rejectPreviewOnRead(preview, out) {
64
60
  if (preview) {
65
61
  out.stderr.write("error: --preview is only valid on write commands (mutations). Reads just run.\n");
@@ -183,7 +179,7 @@ function requireRecruiterJobFields(body, extra, out) {
183
179
  }
184
180
  }
185
181
  async function runRecruiterMessageNew(client, flags, out) {
186
- const accountId = requireAccount(flags.account, out);
182
+ const accountId = await requireAccount(client, flags, out);
187
183
  const to = flags.to ?? "";
188
184
  const text = flags.text ?? "";
189
185
  const subject = flags.subject ?? "";
@@ -255,7 +251,7 @@ async function runRecruiterMessageNew(client, flags, out) {
255
251
  }
256
252
  async function runRecruiterProfile(client, flags, out) {
257
253
  rejectPreviewOnRead(flags.preview, out);
258
- const accountId = requireAccount(flags.account, out);
254
+ const accountId = await requireAccount(client, flags, out);
259
255
  const rawId = flags.identifier ?? "";
260
256
  const resolvedId = resolveIdentifier(rawId);
261
257
  const ns = client.account(accountId);
@@ -269,7 +265,7 @@ async function runRecruiterProfile(client, flags, out) {
269
265
  }
270
266
  async function runRecruiterSearchPeople(client, flags, out, readers = DEFAULT_FILTER_READERS) {
271
267
  rejectPreviewOnRead(flags.preview, out);
272
- const accountId = requireAccount(flags.account, out);
268
+ const accountId = await requireAccount(client, flags, out);
273
269
  const ns = client.account(accountId);
274
270
  const outOpts = resolveOutputOpts(flags);
275
271
  const all = flags.all ?? false;
@@ -327,7 +323,7 @@ async function runRecruiterSearchParameters(client, flags, out) {
327
323
  out.stderr.write("error: --type is required.\n");
328
324
  process.exit(2);
329
325
  }
330
- const accountId = requireAccount(flags.account, out);
326
+ const accountId = await requireAccount(client, flags, out);
331
327
  const ns = client.account(accountId);
332
328
  const outOpts = resolveOutputOpts(flags);
333
329
  const body = {
@@ -348,7 +344,7 @@ async function runRecruiterSearchParameters(client, flags, out) {
348
344
  }
349
345
  async function runRecruiterSearchFromUrl(client, flags, out) {
350
346
  rejectPreviewOnRead(flags.preview, out);
351
- const accountId = requireAccount(flags.account, out);
347
+ const accountId = await requireAccount(client, flags, out);
352
348
  const url = flags.url ?? "";
353
349
  const ns = client.account(accountId);
354
350
  const outOpts = resolveOutputOpts(flags);
@@ -387,7 +383,7 @@ async function runRecruiterSearchFromUrl(client, flags, out) {
387
383
  }
388
384
  async function runRecruiterListProjects(client, flags, out) {
389
385
  rejectPreviewOnRead(flags.preview, out);
390
- const accountId = requireAccount(flags.account, out);
386
+ const accountId = await requireAccount(client, flags, out);
391
387
  const ns = client.account(accountId);
392
388
  const outOpts = resolveOutputOpts(flags);
393
389
  const all = flags.all ?? false;
@@ -417,7 +413,7 @@ async function runRecruiterListProjects(client, flags, out) {
417
413
  }
418
414
  async function runRecruiterGetProject(client, flags, out) {
419
415
  rejectPreviewOnRead(flags.preview, out);
420
- const accountId = requireAccount(flags.account, out);
416
+ const accountId = await requireAccount(client, flags, out);
421
417
  const projectId = flags.projectId ?? "";
422
418
  const ns = client.account(accountId);
423
419
  const outOpts = resolveOutputOpts(flags);
@@ -429,7 +425,7 @@ async function runRecruiterGetProject(client, flags, out) {
429
425
  }
430
426
  }
431
427
  async function runRecruiterUpdateProject(client, flags, out) {
432
- const accountId = requireAccount(flags.account, out);
428
+ const accountId = await requireAccount(client, flags, out);
433
429
  const projectId = flags.projectId ?? "";
434
430
  const outOpts = resolveOutputOpts(flags);
435
431
  const body = {};
@@ -466,7 +462,7 @@ async function runRecruiterUpdateProject(client, flags, out) {
466
462
  }
467
463
  async function runRecruiterListPipeline(client, flags, out) {
468
464
  rejectPreviewOnRead(flags.preview, out);
469
- const accountId = requireAccount(flags.account, out);
465
+ const accountId = await requireAccount(client, flags, out);
470
466
  const projectId = flags.projectId ?? "";
471
467
  const ns = client.account(accountId);
472
468
  const outOpts = resolveOutputOpts(flags);
@@ -513,7 +509,7 @@ async function runRecruiterListPipeline(client, flags, out) {
513
509
  }
514
510
  async function runRecruiterGetProjectJob(client, flags, out) {
515
511
  rejectPreviewOnRead(flags.preview, out);
516
- const accountId = requireAccount(flags.account, out);
512
+ const accountId = await requireAccount(client, flags, out);
517
513
  const projectId = flags.projectId ?? "";
518
514
  const ns = client.account(accountId);
519
515
  const outOpts = resolveOutputOpts(flags);
@@ -526,7 +522,7 @@ async function runRecruiterGetProjectJob(client, flags, out) {
526
522
  }
527
523
  async function runRecruiterGetProjectJobBudget(client, flags, out) {
528
524
  rejectPreviewOnRead(flags.preview, out);
529
- const accountId = requireAccount(flags.account, out);
525
+ const accountId = await requireAccount(client, flags, out);
530
526
  const projectId = flags.projectId ?? "";
531
527
  const jobId = flags.jobId ?? "";
532
528
  const ns = client.account(accountId);
@@ -539,7 +535,7 @@ async function runRecruiterGetProjectJobBudget(client, flags, out) {
539
535
  }
540
536
  }
541
537
  async function runRecruiterSaveCandidate(client, flags, out) {
542
- const accountId = requireAccount(flags.account, out);
538
+ const accountId = await requireAccount(client, flags, out);
543
539
  const projectId = flags.projectId ?? "";
544
540
  const outOpts = resolveOutputOpts(flags);
545
541
  const body = {
@@ -566,7 +562,7 @@ async function runRecruiterSaveCandidate(client, flags, out) {
566
562
  }
567
563
  async function runRecruiterListJobs(client, flags, out) {
568
564
  rejectPreviewOnRead(flags.preview, out);
569
- const accountId = requireAccount(flags.account, out);
565
+ const accountId = await requireAccount(client, flags, out);
570
566
  const ns = client.account(accountId);
571
567
  const outOpts = resolveOutputOpts(flags);
572
568
  const all = flags.all ?? false;
@@ -595,7 +591,7 @@ async function runRecruiterListJobs(client, flags, out) {
595
591
  }
596
592
  }
597
593
  async function runRecruiterCreateJob(client, flags, out, readers = DEFAULT_JOB_CREATE_READERS) {
598
- const accountId = requireAccount(flags.account, out);
594
+ const accountId = await requireAccount(client, flags, out);
599
595
  const outOpts = resolveOutputOpts(flags);
600
596
  const assembled = await assembleRecruiterJobBody(flags, readers);
601
597
  if ("error" in assembled) {
@@ -624,7 +620,7 @@ async function runRecruiterCreateJob(client, flags, out, readers = DEFAULT_JOB_C
624
620
  }
625
621
  }
626
622
  async function runRecruiterCreateProjectJob(client, flags, out, readers = DEFAULT_JOB_CREATE_READERS) {
627
- const accountId = requireAccount(flags.account, out);
623
+ const accountId = await requireAccount(client, flags, out);
628
624
  const projectId = flags.projectId ?? "";
629
625
  const outOpts = resolveOutputOpts(flags);
630
626
  const assembled = await assembleRecruiterJobBody(flags, readers);
@@ -654,7 +650,7 @@ async function runRecruiterCreateProjectJob(client, flags, out, readers = DEFAUL
654
650
  }
655
651
  }
656
652
  async function runRecruiterUpdateProjectJob(client, flags, out, readers = DEFAULT_JOB_CREATE_READERS) {
657
- const accountId = requireAccount(flags.account, out);
653
+ const accountId = await requireAccount(client, flags, out);
658
654
  const projectId = flags.projectId ?? "";
659
655
  const jobId = flags.jobId ?? "";
660
656
  const outOpts = resolveOutputOpts(flags);
@@ -686,7 +682,7 @@ async function runRecruiterUpdateProjectJob(client, flags, out, readers = DEFAUL
686
682
  var RECRUITER_PUBLISH_MODES = ["FREE", "PROMOTED", "PROMOTED_PLUS"];
687
683
  var RECRUITER_BUDGET_SCOPES = ["DAILY", "TOTAL"];
688
684
  async function runRecruiterPublishJob(client, flags, out) {
689
- const accountId = requireAccount(flags.account, out);
685
+ const accountId = await requireAccount(client, flags, out);
690
686
  const projectId = flags.projectId ?? "";
691
687
  const jobId = flags.jobId ?? "";
692
688
  const outOpts = resolveOutputOpts(flags);
@@ -745,7 +741,7 @@ async function runRecruiterPublishJob(client, flags, out) {
745
741
  }
746
742
  }
747
743
  async function runRecruiterCloseJob(client, flags, out) {
748
- const accountId = requireAccount(flags.account, out);
744
+ const accountId = await requireAccount(client, flags, out);
749
745
  const projectId = flags.projectId ?? "";
750
746
  const jobId = flags.jobId ?? "";
751
747
  if (flags.preview) {
@@ -773,7 +769,7 @@ async function runRecruiterSearchTalentPool(client, flags, out, readers = DEFAUL
773
769
  out.stderr.write("error: --channel-id is required.\n");
774
770
  process.exit(2);
775
771
  }
776
- const accountId = requireAccount(flags.account, out);
772
+ const accountId = await requireAccount(client, flags, out);
777
773
  const projectId = flags.projectId ?? "";
778
774
  const ns = client.account(accountId);
779
775
  const outOpts = resolveOutputOpts(flags);
@@ -824,7 +820,7 @@ async function runRecruiterListApplicants(client, flags, out) {
824
820
  out.stderr.write("error: --channel-id is required.\n");
825
821
  process.exit(2);
826
822
  }
827
- const accountId = requireAccount(flags.account, out);
823
+ const accountId = await requireAccount(client, flags, out);
828
824
  const projectId = flags.projectId ?? "";
829
825
  const ns = client.account(accountId);
830
826
  const outOpts = resolveOutputOpts(flags);
@@ -841,7 +837,7 @@ async function runRecruiterListApplicants(client, flags, out) {
841
837
  }
842
838
  async function runRecruiterGetJob(client, flags, out) {
843
839
  rejectPreviewOnRead(flags.preview, out);
844
- const accountId = requireAccount(flags.account, out);
840
+ const accountId = await requireAccount(client, flags, out);
845
841
  const rawJobId = flags.jobId ?? "";
846
842
  const jobId = resolveJobIdentifier(rawJobId);
847
843
  const ns = client.account(accountId);
@@ -855,7 +851,7 @@ async function runRecruiterGetJob(client, flags, out) {
855
851
  }
856
852
  async function runRecruiterGetApplicant(client, flags, out) {
857
853
  rejectPreviewOnRead(flags.preview, out);
858
- const accountId = requireAccount(flags.account, out);
854
+ const accountId = await requireAccount(client, flags, out);
859
855
  const projectId = flags.projectId ?? "";
860
856
  const applicantId = flags.applicantId ?? "";
861
857
  const ns = client.account(accountId);
@@ -869,7 +865,7 @@ async function runRecruiterGetApplicant(client, flags, out) {
869
865
  }
870
866
  async function runRecruiterDownloadResume(client, flags, out, isTTY) {
871
867
  rejectPreviewOnRead(flags.preview, out);
872
- const accountId = requireAccount(flags.account, out);
868
+ const accountId = await requireAccount(client, flags, out);
873
869
  const projectId = flags.projectId ?? "";
874
870
  const applicantId = flags.applicantId ?? "";
875
871
  const ns = client.account(accountId);
@@ -4,7 +4,7 @@ import {
4
4
  assembleFilters,
5
5
  splitCsv,
6
6
  splitCsvNumbers
7
- } from "./chunk-56ORAZJO.js";
7
+ } from "./chunk-LCIUD7S2.js";
8
8
  import {
9
9
  AttachError,
10
10
  readAttachment,
@@ -13,10 +13,13 @@ import {
13
13
  import {
14
14
  pageDelayFromFlags,
15
15
  streamAll
16
- } from "./chunk-H6XD3F66.js";
16
+ } from "./chunk-766W25QS.js";
17
17
  import {
18
18
  resolveIdentifier
19
- } from "./chunk-DMQZEPQE.js";
19
+ } from "./chunk-UEAX6KUB.js";
20
+ import {
21
+ requireAccount
22
+ } from "./chunk-LCLYFE54.js";
20
23
  import {
21
24
  buildPreviewOutput
22
25
  } from "./chunk-R3VLWLVV.js";
@@ -26,13 +29,14 @@ import {
26
29
  renderSuccess,
27
30
  renderUnexpectedError,
28
31
  resolveEffectiveConfig
29
- } from "./chunk-JA3NNST6.js";
32
+ } from "./chunk-TKWW6BV6.js";
33
+ import "./chunk-SYRFLZ4D.js";
30
34
  import {
31
35
  GLOBAL_FLAGS,
32
36
  READ_SINGLE_FLAGS,
33
37
  WRITE_FLAGS
34
- } from "./chunk-CUTMZWL6.js";
35
- import "./chunk-ZYURL5VK.js";
38
+ } from "./chunk-AHYUM2XQ.js";
39
+ import "./chunk-PMRQXBCP.js";
36
40
 
37
41
  // src/commands/sales-nav.ts
38
42
  import { defineCommand } from "citty";
@@ -42,13 +46,6 @@ function buildOutputStreams() {
42
46
  stderr: { write: (s) => process.stderr.write(s) }
43
47
  };
44
48
  }
45
- function requireAccount(account, out) {
46
- if (!account) {
47
- out.stderr.write("error: --account is required for this command. Set it via --account, CURVIATE_ACCOUNT, or `curviate config set-account`.\n");
48
- process.exit(2);
49
- }
50
- return account;
51
- }
52
49
  function rejectPreviewOnRead(preview, out) {
53
50
  if (preview) {
54
51
  out.stderr.write("error: --preview is only valid on write commands (mutations). Reads just run.\n");
@@ -78,7 +75,7 @@ async function handleSdkError(err, outOpts, out) {
78
75
  }
79
76
  async function runSalesNavSearchPeople(client, flags, out, readers = DEFAULT_FILTER_READERS) {
80
77
  rejectPreviewOnRead(flags.preview, out);
81
- const accountId = requireAccount(flags.account, out);
78
+ const accountId = await requireAccount(client, flags, out);
82
79
  const ns = client.account(accountId);
83
80
  const outOpts = resolveOutputOpts(flags);
84
81
  const all = flags.all ?? false;
@@ -128,7 +125,7 @@ async function runSalesNavSearchPeople(client, flags, out, readers = DEFAULT_FIL
128
125
  }
129
126
  async function runSalesNavSearchCompanies(client, flags, out, readers = DEFAULT_FILTER_READERS) {
130
127
  rejectPreviewOnRead(flags.preview, out);
131
- const accountId = requireAccount(flags.account, out);
128
+ const accountId = await requireAccount(client, flags, out);
132
129
  const ns = client.account(accountId);
133
130
  const outOpts = resolveOutputOpts(flags);
134
131
  const all = flags.all ?? false;
@@ -181,7 +178,7 @@ async function runSalesNavGetParameters(client, flags, out) {
181
178
  out.stderr.write("error: --type is required.\n");
182
179
  process.exit(2);
183
180
  }
184
- const accountId = requireAccount(flags.account, out);
181
+ const accountId = await requireAccount(client, flags, out);
185
182
  const ns = client.account(accountId);
186
183
  const outOpts = resolveOutputOpts(flags);
187
184
  const params = { type: flags.type };
@@ -196,7 +193,7 @@ async function runSalesNavGetParameters(client, flags, out) {
196
193
  }
197
194
  async function runSalesNavSearchFromUrl(client, flags, out) {
198
195
  rejectPreviewOnRead(flags.preview, out);
199
- const accountId = requireAccount(flags.account, out);
196
+ const accountId = await requireAccount(client, flags, out);
200
197
  const url = flags.url ?? "";
201
198
  const ns = client.account(accountId);
202
199
  const outOpts = resolveOutputOpts(flags);
@@ -234,7 +231,7 @@ async function runSalesNavSearchFromUrl(client, flags, out) {
234
231
  }
235
232
  }
236
233
  async function runSalesNavMessageNew(client, flags, out) {
237
- const accountId = requireAccount(flags.account, out);
234
+ const accountId = await requireAccount(client, flags, out);
238
235
  const to = flags.to ?? "";
239
236
  const text = flags.text ?? "";
240
237
  const subject = flags.subject ?? "";
@@ -300,7 +297,7 @@ async function runSalesNavMessageNew(client, flags, out) {
300
297
  }
301
298
  async function runSalesNavProfile(client, flags, out) {
302
299
  rejectPreviewOnRead(flags.preview, out);
303
- const accountId = requireAccount(flags.account, out);
300
+ const accountId = await requireAccount(client, flags, out);
304
301
  const rawId = flags.identifier ?? "";
305
302
  const resolvedId = resolveIdentifier(rawId);
306
303
  const ns = client.account(accountId);
@@ -313,7 +310,7 @@ async function runSalesNavProfile(client, flags, out) {
313
310
  }
314
311
  }
315
312
  async function runSalesNavSaveLead(client, flags, out) {
316
- const accountId = requireAccount(flags.account, out);
313
+ const accountId = await requireAccount(client, flags, out);
317
314
  const userId = flags.userId ?? "";
318
315
  const listId = flags.list ?? "";
319
316
  const outOpts = resolveOutputOpts(flags);
@@ -338,7 +335,7 @@ async function runSalesNavSaveLead(client, flags, out) {
338
335
  }
339
336
  async function runSalesNavAccountLists(client, flags, out) {
340
337
  rejectPreviewOnRead(flags.preview, out);
341
- const accountId = requireAccount(flags.account, out);
338
+ const accountId = await requireAccount(client, flags, out);
342
339
  const ns = client.account(accountId);
343
340
  const outOpts = resolveOutputOpts(flags);
344
341
  const all = flags.all ?? false;
@@ -366,7 +363,7 @@ async function runSalesNavAccountLists(client, flags, out) {
366
363
  }
367
364
  async function runSalesNavLeadLists(client, flags, out) {
368
365
  rejectPreviewOnRead(flags.preview, out);
369
- const accountId = requireAccount(flags.account, out);
366
+ const accountId = await requireAccount(client, flags, out);
370
367
  const ns = client.account(accountId);
371
368
  const outOpts = resolveOutputOpts(flags);
372
369
  const all = flags.all ?? false;
@@ -394,7 +391,7 @@ async function runSalesNavLeadLists(client, flags, out) {
394
391
  }
395
392
  async function runSalesNavBrowseAccountList(client, flags, out) {
396
393
  rejectPreviewOnRead(flags.preview, out);
397
- const accountId = requireAccount(flags.account, out);
394
+ const accountId = await requireAccount(client, flags, out);
398
395
  const listId = flags.listId ?? "";
399
396
  const ns = client.account(accountId);
400
397
  const outOpts = resolveOutputOpts(flags);
@@ -427,7 +424,7 @@ async function runSalesNavBrowseAccountList(client, flags, out) {
427
424
  }
428
425
  async function runSalesNavBrowseLeadList(client, flags, out) {
429
426
  rejectPreviewOnRead(flags.preview, out);
430
- const accountId = requireAccount(flags.account, out);
427
+ const accountId = await requireAccount(client, flags, out);
431
428
  const listId = flags.listId ?? "";
432
429
  const ns = client.account(accountId);
433
430
  const outOpts = resolveOutputOpts(flags);
@@ -459,7 +456,7 @@ async function runSalesNavBrowseLeadList(client, flags, out) {
459
456
  }
460
457
  }
461
458
  async function runSalesNavSaveAccount(client, flags, out) {
462
- const accountId = requireAccount(flags.account, out);
459
+ const accountId = await requireAccount(client, flags, out);
463
460
  const listId = flags.list ?? "";
464
461
  const companyId = flags.companyId ?? "";
465
462
  const outOpts = resolveOutputOpts(flags);
@@ -4,7 +4,7 @@ import {
4
4
  assembleFilters,
5
5
  splitCsv,
6
6
  splitCsvNumbers
7
- } from "./chunk-56ORAZJO.js";
7
+ } from "./chunk-LCIUD7S2.js";
8
8
  import {
9
9
  slimSearchCompanies,
10
10
  slimSearchCompaniesItem,
@@ -18,18 +18,22 @@ import {
18
18
  import {
19
19
  pageDelayFromFlags,
20
20
  streamAll
21
- } from "./chunk-H6XD3F66.js";
21
+ } from "./chunk-766W25QS.js";
22
+ import {
23
+ requireAccount
24
+ } from "./chunk-LCLYFE54.js";
22
25
  import {
23
26
  createClient,
24
27
  renderError,
25
28
  renderSuccess,
26
29
  renderUnexpectedError,
27
30
  resolveEffectiveConfig
28
- } from "./chunk-JA3NNST6.js";
31
+ } from "./chunk-TKWW6BV6.js";
32
+ import "./chunk-SYRFLZ4D.js";
29
33
  import {
30
34
  GLOBAL_FLAGS
31
- } from "./chunk-CUTMZWL6.js";
32
- import "./chunk-ZYURL5VK.js";
35
+ } from "./chunk-AHYUM2XQ.js";
36
+ import "./chunk-PMRQXBCP.js";
33
37
 
34
38
  // src/commands/search.ts
35
39
  import { defineCommand } from "citty";
@@ -60,13 +64,6 @@ function buildOutputStreams() {
60
64
  stderr: { write: (s) => process.stderr.write(s) }
61
65
  };
62
66
  }
63
- function requireAccount(account, out) {
64
- if (!account) {
65
- out.stderr.write("error: --account is required for this command. Set it via --account, CURVIATE_ACCOUNT, or `curviate config set-account`.\n");
66
- process.exit(2);
67
- }
68
- return account;
69
- }
70
67
  function rejectPreviewOnRead(preview, out) {
71
68
  if (preview) {
72
69
  out.stderr.write("error: --preview is only valid on write commands (mutations). Reads just run.\n");
@@ -191,7 +188,7 @@ async function runSearchPeople(client, flags, out, readers = DEFAULT_FILTER_READ
191
188
  process.exit(2);
192
189
  }
193
190
  }
194
- const accountId = requireAccount(flags.account, out);
191
+ const accountId = await requireAccount(client, flags, out);
195
192
  const ns = client.account(accountId);
196
193
  const outOpts = resolveOutputOpts(flags);
197
194
  const verbose = flags.verbose ?? false;
@@ -232,7 +229,7 @@ async function runSearchPeople(client, flags, out, readers = DEFAULT_FILTER_READ
232
229
  }
233
230
  async function runSearchCompanies(client, flags, out, readers = DEFAULT_FILTER_READERS) {
234
231
  rejectPreviewOnRead(flags.preview, out);
235
- const accountId = requireAccount(flags.account, out);
232
+ const accountId = await requireAccount(client, flags, out);
236
233
  const ns = client.account(accountId);
237
234
  const outOpts = resolveOutputOpts(flags);
238
235
  const verbose = flags.verbose ?? false;
@@ -273,7 +270,7 @@ async function runSearchCompanies(client, flags, out, readers = DEFAULT_FILTER_R
273
270
  }
274
271
  async function runSearchPosts(client, flags, out, readers = DEFAULT_FILTER_READERS) {
275
272
  rejectPreviewOnRead(flags.preview, out);
276
- const accountId = requireAccount(flags.account, out);
273
+ const accountId = await requireAccount(client, flags, out);
277
274
  const ns = client.account(accountId);
278
275
  const outOpts = resolveOutputOpts(flags);
279
276
  const verbose = flags.verbose ?? false;
@@ -314,7 +311,7 @@ async function runSearchPosts(client, flags, out, readers = DEFAULT_FILTER_READE
314
311
  }
315
312
  async function runSearchJobs(client, flags, out, readers = DEFAULT_FILTER_READERS) {
316
313
  rejectPreviewOnRead(flags.preview, out);
317
- const accountId = requireAccount(flags.account, out);
314
+ const accountId = await requireAccount(client, flags, out);
318
315
  const ns = client.account(accountId);
319
316
  const outOpts = resolveOutputOpts(flags);
320
317
  const verbose = flags.verbose ?? false;
@@ -364,7 +361,7 @@ async function runSearchParameters(client, flags, out) {
364
361
  out.stderr.write("error: --keywords is required (v2: required for every --type).\n");
365
362
  process.exit(2);
366
363
  }
367
- const accountId = requireAccount(flags.account, out);
364
+ const accountId = await requireAccount(client, flags, out);
368
365
  const ns = client.account(accountId);
369
366
  const outOpts = resolveOutputOpts(flags);
370
367
  const query = {
@@ -393,7 +390,7 @@ async function runSearchGroups(client, flags, out) {
393
390
  out.stderr.write("error: <query> is required.\n");
394
391
  process.exit(2);
395
392
  }
396
- const accountId = requireAccount(flags.account, out);
393
+ const accountId = await requireAccount(client, flags, out);
397
394
  const ns = client.account(accountId);
398
395
  const outOpts = resolveOutputOpts(flags);
399
396
  const all = flags.all ?? false;
@@ -428,7 +425,7 @@ async function runSearchGroups(client, flags, out) {
428
425
  }
429
426
  async function runSearchServices(client, flags, out) {
430
427
  rejectPreviewOnRead(flags.preview, out);
431
- const accountId = requireAccount(flags.account, out);
428
+ const accountId = await requireAccount(client, flags, out);
432
429
  const ns = client.account(accountId);
433
430
  const outOpts = resolveOutputOpts(flags);
434
431
  const all = flags.all ?? false;
@@ -475,7 +472,7 @@ async function runSearchServiceParameters(client, flags, out) {
475
472
  out.stderr.write("error: --keywords is required.\n");
476
473
  process.exit(2);
477
474
  }
478
- const accountId = requireAccount(flags.account, out);
475
+ const accountId = await requireAccount(client, flags, out);
479
476
  const ns = client.account(accountId);
480
477
  const outOpts = resolveOutputOpts(flags);
481
478
  const query = { keywords: flags.keywords };
@@ -497,7 +494,7 @@ async function runSearchServiceParameters(client, flags, out) {
497
494
  }
498
495
  async function runSearchFromUrl(client, flags, out) {
499
496
  rejectPreviewOnRead(flags.preview, out);
500
- const accountId = requireAccount(flags.account, out);
497
+ const accountId = await requireAccount(client, flags, out);
501
498
  const url = flags.url ?? "";
502
499
  const ns = client.account(accountId);
503
500
  const outOpts = resolveOutputOpts(flags);
@@ -544,8 +541,8 @@ var searchPeopleCommand = defineCommand({
544
541
  "past-company": { type: "string", description: "Past company ids (comma-separated)." },
545
542
  school: { type: "string", description: "School ids (comma-separated)." },
546
543
  "network-distance": { type: "string", description: "Network distance, 1-3 (comma-separated)." },
547
- "connections-of": { type: "string", description: 'member id(s), comma-separated (resolve: search parameters --type CONNECTIONS --keywords "<name>")' },
548
- "followers-of": { type: "string", description: 'member id(s), comma-separated (resolve: search parameters --type PEOPLE --keywords "<name>")' },
544
+ "connections-of": { type: "string", description: 'member id(s), comma-separated (resolve: `curviate search parameters --type CONNECTIONS --keywords "<name>"`)' },
545
+ "followers-of": { type: "string", description: 'member id(s), comma-separated (resolve: `curviate search parameters --type PEOPLE --keywords "<name>"`)' },
549
546
  // People-specific filter flags
550
547
  title: { type: "string", description: "Job title keyword filter (maps to advanced_keywords.title)." },
551
548
  "profile-language": { type: "string", description: "Profile language codes (comma-separated, e.g. en,de)." }
@@ -610,13 +607,13 @@ var searchPostsCommand = defineCommand({
610
607
  "sort-by": { type: "string", description: "Sort order (e.g. relevance, date)." },
611
608
  "date-posted": { type: "string", description: "time window: past_day, past_week, or past_month (hyphens also accepted: past-day, past-week, past-month)" },
612
609
  "content-type": { type: "string", description: "content type: videos, images, live_videos, collaborative_articles, documents" },
613
- "posted-by-member": { type: "string", description: "member id(s), comma-separated (resolve: search parameters --type PEOPLE); merges into posted_by" },
614
- "posted-by-company": { type: "string", description: "company id(s), comma-separated (resolve: search parameters --type COMPANY); merges into posted_by" },
610
+ "posted-by-member": { type: "string", description: "member id(s), comma-separated (resolve: `curviate search parameters --type PEOPLE`); merges into posted_by" },
611
+ "posted-by-company": { type: "string", description: "company id(s), comma-separated (resolve: `curviate search parameters --type COMPANY`); merges into posted_by" },
615
612
  "posted-by-me": { type: "boolean", description: "only posts authored by you; merges into posted_by" },
616
- "mentioning-member": { type: "string", description: "member id(s) mentioned in the post, comma-separated (resolve: search parameters --type PEOPLE); merges into mentioning" },
617
- "mentioning-company": { type: "string", description: "company id(s) mentioned in the post, comma-separated (resolve: search parameters --type COMPANY); merges into mentioning" },
618
- "author-industry": { type: "string", description: "author's industry id(s), comma-separated (resolve: search parameters --type INDUSTRY); merges into author" },
619
- "author-company": { type: "string", description: "author's company id(s), comma-separated (resolve: search parameters --type COMPANY); merges into author" },
613
+ "mentioning-member": { type: "string", description: "member id(s) mentioned in the post, comma-separated (resolve: `curviate search parameters --type PEOPLE`); merges into mentioning" },
614
+ "mentioning-company": { type: "string", description: "company id(s) mentioned in the post, comma-separated (resolve: `curviate search parameters --type COMPANY`); merges into mentioning" },
615
+ "author-industry": { type: "string", description: "author's industry id(s), comma-separated (resolve: `curviate search parameters --type INDUSTRY`); merges into author" },
616
+ "author-company": { type: "string", description: "author's company id(s), comma-separated (resolve: `curviate search parameters --type COMPANY`); merges into author" },
620
617
  "author-keywords": { type: "string", description: "author keyword filter (free text); merges into author" }
621
618
  },
622
619
  async run({ args }) {
@@ -644,7 +641,7 @@ var searchJobsCommand = defineCommand({
644
641
  keywords: { type: "string", description: "Full-text keyword search." },
645
642
  ...FILTER_FLAGS,
646
643
  // On jobs, --location maps to the geo region filter (not a location array, different API shape for jobs vs people)
647
- location: { type: "string", description: "geo region id (single id; resolve via search parameters --type LOCATION); maps to region filter" },
644
+ location: { type: "string", description: "geo region id (single id; resolve via `curviate search parameters --type LOCATION`); maps to region filter" },
648
645
  industry: { type: "string", description: "Industry ids (comma-separated)." },
649
646
  seniority: { type: "string", description: "seniority level, closed enum: executive|director|mid_senior|associate|entry|intern (comma-separated)" },
650
647
  function: { type: "string", description: "Job function ids (comma-separated)." },
@@ -655,7 +652,7 @@ var searchJobsCommand = defineCommand({
655
652
  region: { type: "string", description: "alias for --location (same body field: region)" },
656
653
  title: {
657
654
  type: "string",
658
- description: "job title id(s), comma-separated (resolve: search parameters --type JOB_TITLE); ID-based targeting, unlike search people --title, which is free-text"
655
+ description: "job title id(s), comma-separated (resolve: `curviate search parameters --type JOB_TITLE`); ID-based targeting, unlike `curviate search people --title`, which is free-text"
659
656
  },
660
657
  presence: { type: "string", description: "work presence, comma-separated: on_site, hybrid, remote" },
661
658
  benefits: { type: "string", description: "benefit ids, comma-separated" },
@@ -748,8 +745,8 @@ var searchServicesCommand = defineCommand({
748
745
  args: {
749
746
  ...GLOBAL_FLAGS,
750
747
  keywords: { type: "string", description: "Free-text keyword match." },
751
- "service-category": { type: "string", description: "Opaque service-category ids (comma-separated; resolve via search service-parameters --type service_category)." },
752
- location: { type: "string", description: "Opaque location ids (comma-separated; resolve via search service-parameters --type location)." },
748
+ "service-category": { type: "string", description: "Opaque service-category ids (comma-separated; resolve via `curviate search service-parameters --type service_category`)." },
749
+ location: { type: "string", description: "Opaque location ids (comma-separated; resolve via `curviate search service-parameters --type location`)." },
753
750
  connections: { type: "string", description: "Connection degree filter, comma-separated: 1 (1st), 2 (2nd), 3 (3rd+)." },
754
751
  language: { type: "string", description: "Profile-language ISO 639-1 codes, comma-separated (e.g. en,de,es,fr)." }
755
752
  },
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  pageDelayFromFlags,
4
4
  streamAll
5
- } from "./chunk-H6XD3F66.js";
5
+ } from "./chunk-766W25QS.js";
6
6
  import {
7
7
  buildPreviewOutput
8
8
  } from "./chunk-R3VLWLVV.js";
@@ -12,14 +12,13 @@ import {
12
12
  renderSuccess,
13
13
  renderUnexpectedError,
14
14
  resolveEffectiveConfig
15
- } from "./chunk-JA3NNST6.js";
16
- import {
17
- GLOBAL_FLAGS
18
- } from "./chunk-CUTMZWL6.js";
15
+ } from "./chunk-TKWW6BV6.js";
16
+ import "./chunk-SYRFLZ4D.js";
19
17
  import {
18
+ GLOBAL_FLAGS,
20
19
  defaultReadStdin,
21
20
  isStdinToken
22
- } from "./chunk-ZYURL5VK.js";
21
+ } from "./chunk-AHYUM2XQ.js";
23
22
 
24
23
  // src/commands/webhook.ts
25
24
  import { defineCommand } from "citty";
@@ -79,7 +78,6 @@ async function runWebhookCreate(client, flags, out) {
79
78
  account_ids: accountIds
80
79
  };
81
80
  if (flags.name) body["name"] = flags.name;
82
- if (flags.format) body["format"] = flags.format;
83
81
  if (flags.enabled !== void 0) body["enabled"] = flags.enabled;
84
82
  if (flags.events) {
85
83
  body["events"] = flags.events.split(",").map((s) => s.trim()).filter(Boolean);
@@ -160,7 +158,6 @@ async function runWebhookUpdate(client, flags, out) {
160
158
  if (flags.name !== void 0) body["name"] = flags.name;
161
159
  if (flags["request-url"]) body["request_url"] = flags["request-url"];
162
160
  if (flags.enabled !== void 0) body["enabled"] = flags.enabled;
163
- if (flags.format) body["format"] = flags.format;
164
161
  if (flags.events) {
165
162
  body["events"] = flags.events.split(",").map((s) => s.trim()).filter(Boolean);
166
163
  }
@@ -274,7 +271,6 @@ var webhookCreateCommand = defineCommand({
274
271
  "request-url": { type: "string", description: "HTTPS URL to receive webhook deliveries.", required: true },
275
272
  "account-ids": { type: "string", description: "Comma-separated account ids to target (required).", required: true },
276
273
  name: { type: "string", description: "Human-readable name (1-100 chars)." },
277
- format: { type: "string", description: "Delivery encoding: json | form (default: json)." },
278
274
  enabled: { type: "boolean", description: "Create as enabled (default: true).", default: true },
279
275
  events: { type: "string", description: "Comma-separated event names to subscribe to." },
280
276
  data: { type: "string", description: "Comma-separated field-remapping keys." }
@@ -367,7 +363,6 @@ var webhookUpdateCommand = defineCommand({
367
363
  "request-url": { type: "string", description: "Replace the delivery URL." },
368
364
  name: { type: "string", description: "Replace the name (or clear with empty string)." },
369
365
  enabled: { type: "boolean", description: "Enable or disable the webhook." },
370
- format: { type: "string", description: "Replace the delivery encoding: json | form." },
371
366
  events: { type: "string", description: "Replace subscribed events (comma-separated)." },
372
367
  data: { type: "string", description: "Replace field-remapping keys (comma-separated)." },
373
368
  "account-ids": { type: "string", description: "Replace targeted accounts (comma-separated)." }