@curviate/cli 0.32.0 → 0.34.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 (41) hide show
  1. package/CHANGELOG.md +264 -1
  2. package/README.md +13 -1
  3. package/dist/{account-JDSZC633.js → account-463D5EVY.js} +90 -47
  4. package/dist/{chunk-JRKM4OV2.js → chunk-6W7364S3.js} +1 -1
  5. package/dist/{chunk-KQXYEQAD.js → chunk-7JU4IXXG.js} +172 -8
  6. package/dist/{chunk-5EJDQ47B.js → chunk-BN7L7WSY.js} +16 -16
  7. package/dist/chunk-DCZR4M7G.js +327 -0
  8. package/dist/{chunk-V3PB4HSF.js → chunk-MNDXMGPX.js} +68 -24
  9. package/dist/chunk-TCUYH5GO.js +34 -0
  10. package/dist/{chunk-SKJNLN37.js → chunk-XDQHNUEU.js} +86 -2
  11. package/dist/{chunk-LJR4LJG6.js → chunk-XP2LN6F6.js} +53 -0
  12. package/dist/{chunk-EIEF2KFH.js → chunk-XZJQQJBE.js} +6 -4
  13. package/dist/{chunk-6P52Q2GK.js → chunk-ZJ7D3NFS.js} +5 -4
  14. package/dist/cli.js +104 -37
  15. package/dist/{comment-YOFNFQUE.js → comment-G6RB2PBZ.js} +32 -26
  16. package/dist/{company-6PKHDK6L.js → company-OWND3W3L.js} +53 -35
  17. package/dist/{config-FUHT23SX.js → config-RUBXWFQ3.js} +74 -29
  18. package/dist/{connect-DG2AVGVL.js → connect-3E7EC5ZM.js} +35 -32
  19. package/dist/{doctor-FK7B6754.js → doctor-Z6OSCGKT.js} +22 -16
  20. package/dist/{exit-codes-AAFTOAXF.js → exit-codes-YSFFFWMS.js} +1 -1
  21. package/dist/{feed-HXBKXKAQ.js → feed-VDTFIMKN.js} +18 -17
  22. package/dist/{group-UYX3KTX3.js → group-KDJHY2IM.js} +21 -18
  23. package/dist/{inbox-EVE2ZTHC.js → inbox-DQLX2LR7.js} +39 -23
  24. package/dist/{inboxes-JBB34WMQ.js → inboxes-WMNHOPY7.js} +18 -17
  25. package/dist/{job-GXUZANYN.js → job-ESKS2LDJ.js} +44 -30
  26. package/dist/{login-3OAUY7TG.js → login-YTVPIN27.js} +15 -3
  27. package/dist/{message-34AGROW2.js → message-5W2R3YHS.js} +7 -9
  28. package/dist/{notification-SKKZS2C5.js → notification-IGNUH2GR.js} +20 -19
  29. package/dist/{post-FIW522Q6.js → post-NLI76K74.js} +34 -26
  30. package/dist/{profile-SX6JOYMD.js → profile-TBKKIICM.js} +71 -90
  31. package/dist/{recruiter-H7ROBEVC.js → recruiter-AEJRHIX5.js} +42 -29
  32. package/dist/{sales-nav-7KCK562X.js → sales-nav-SW6WJVMD.js} +43 -29
  33. package/dist/{search-PASMDQEH.js → search-CS6VN5AG.js} +58 -44
  34. package/dist/{setup-YV5PVIU5.js → setup-ANHJZJ2S.js} +12 -8
  35. package/dist/{webhook-GPLFPC6N.js → webhook-NGMRJMQ5.js} +25 -22
  36. package/package.json +2 -2
  37. package/dist/chunk-LKF5MZIP.js +0 -90
  38. package/dist/chunk-PKSKQ3LN.js +0 -68
  39. package/dist/chunk-R3VLWLVV.js +0 -23
  40. package/dist/chunk-TD2ZIXFR.js +0 -67
  41. package/dist/chunk-TQJ77SL4.js +0 -147
@@ -1,8 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
+ parseSectionsFlag,
3
4
  slimProfile,
4
- slimProfileMe
5
- } from "./chunk-LJR4LJG6.js";
5
+ slimProfileMe,
6
+ withRequestedSections
7
+ } from "./chunk-XP2LN6F6.js";
6
8
  import {
7
9
  RETRIEVAL_FLAGS,
8
10
  hasRetrievalFlags,
@@ -11,11 +13,7 @@ import {
11
13
  import {
12
14
  resolveMemberOrMeProviderId,
13
15
  resolveMemberProviderId
14
- } from "./chunk-6P52Q2GK.js";
15
- import {
16
- pageDelayFromFlags,
17
- streamAll
18
- } from "./chunk-LKF5MZIP.js";
16
+ } from "./chunk-ZJ7D3NFS.js";
19
17
  import {
20
18
  AttachError,
21
19
  readAttachment,
@@ -24,71 +22,37 @@ import {
24
22
  import {
25
23
  resolveIdentifier
26
24
  } from "./chunk-UEAX6KUB.js";
27
- import {
28
- buildPreviewOutput
29
- } from "./chunk-R3VLWLVV.js";
30
25
  import {
31
26
  requireAccount
32
- } from "./chunk-V3PB4HSF.js";
27
+ } from "./chunk-MNDXMGPX.js";
33
28
  import {
29
+ buildPreviewOutput
30
+ } from "./chunk-TCUYH5GO.js";
31
+ import {
32
+ pageDelayFromFlags,
33
+ readableId,
34
+ readablePage,
35
+ rejectPaginationModifiersWithoutAll,
34
36
  renderError,
35
37
  renderSuccess,
36
- renderUnexpectedError
37
- } from "./chunk-KQXYEQAD.js";
38
+ renderUnexpectedError,
39
+ resolveEffectiveConfig,
40
+ streamAll,
41
+ writeNdjsonItem
42
+ } from "./chunk-7JU4IXXG.js";
43
+ import "./chunk-XZJQQJBE.js";
38
44
  import {
39
- createClient,
40
- resolveEffectiveConfig
41
- } from "./chunk-TD2ZIXFR.js";
42
- import "./chunk-PKSKQ3LN.js";
43
- import "./chunk-EIEF2KFH.js";
44
- import "./chunk-TQJ77SL4.js";
45
+ createClient
46
+ } from "./chunk-DCZR4M7G.js";
45
47
  import {
46
48
  GLOBAL_FLAGS,
49
+ NON_STREAM_FLAGS,
47
50
  READ_SINGLE_FLAGS,
48
51
  WRITE_SINGLE_FLAGS
49
- } from "./chunk-SKJNLN37.js";
52
+ } from "./chunk-XDQHNUEU.js";
50
53
 
51
54
  // src/commands/profile.ts
52
55
  import { defineCommand } from "citty";
53
-
54
- // src/lib/sections.ts
55
- var SECTION_BASE_NAMES = [
56
- "experience",
57
- "education",
58
- "languages",
59
- "skills",
60
- "certifications",
61
- "volunteer_experience",
62
- "projects",
63
- "recommendations",
64
- "interests"
65
- ];
66
- var VALID_LINKEDIN_SECTIONS = /* @__PURE__ */ new Set([
67
- "linkedin_*",
68
- ...SECTION_BASE_NAMES.flatMap((n) => [`linkedin_${n}`, `linkedin_${n}_preview`])
69
- ]);
70
- var CANONICAL_SECTION_VALUES = [
71
- "linkedin_*",
72
- ...SECTION_BASE_NAMES.map((n) => `linkedin_${n}`)
73
- ];
74
- function parseSectionsFlag(raw) {
75
- const values = raw.split(",").map((s) => s.trim()).filter(Boolean);
76
- const sections = [];
77
- for (const value of values) {
78
- const canonical = value.startsWith("linkedin_") ? value : `linkedin_${value}`;
79
- if (!VALID_LINKEDIN_SECTIONS.has(canonical)) {
80
- return {
81
- ok: false,
82
- error: `error: --sections: unknown section "${value}". Valid values: ${CANONICAL_SECTION_VALUES.join(", ")} (each also has a _preview variant).
83
- `
84
- };
85
- }
86
- sections.push(canonical);
87
- }
88
- return { ok: true, sections };
89
- }
90
-
91
- // src/commands/profile.ts
92
56
  function rejectPreviewOnRead(preview, out) {
93
57
  if (preview) {
94
58
  out.stderr.write("error: --preview is only valid on write commands (mutations). Reads just run.\n");
@@ -133,6 +97,7 @@ function resolveOutputOpts(flags) {
133
97
  }
134
98
  async function runProfileMe(client, flags, out) {
135
99
  rejectPreviewOnRead(flags.preview, out);
100
+ rejectPaginationModifiersWithoutAll(flags, out);
136
101
  const hasActivityFlag = !!(flags.posts || flags.comments || flags.reactions || flags.followers);
137
102
  if (!hasActivityFlag) {
138
103
  rejectAllOnNonPaginated(flags.all, out);
@@ -162,10 +127,11 @@ async function runProfileMe(client, flags, out) {
162
127
  out,
163
128
  pageDelayMs: pageDelayFromFlags(flags)
164
129
  })) {
165
- out.stdout.write(JSON.stringify(item) + "\n");
130
+ writeNdjsonItem(out, item, outOpts.fields);
166
131
  }
167
132
  } else {
168
133
  const result = await ns.posts.listUserPosts("me", params2);
134
+ readablePage(result);
169
135
  renderSuccess(result, outOpts, out);
170
136
  }
171
137
  } else if (flags.comments) {
@@ -176,10 +142,11 @@ async function runProfileMe(client, flags, out) {
176
142
  out,
177
143
  pageDelayMs: pageDelayFromFlags(flags)
178
144
  })) {
179
- out.stdout.write(JSON.stringify(item) + "\n");
145
+ writeNdjsonItem(out, item, outOpts.fields);
180
146
  }
181
147
  } else {
182
148
  const result = await ns.comments.listUserComments("me", params2);
149
+ readablePage(result);
183
150
  renderSuccess(result, outOpts, out);
184
151
  }
185
152
  } else if (flags.reactions) {
@@ -190,10 +157,11 @@ async function runProfileMe(client, flags, out) {
190
157
  out,
191
158
  pageDelayMs: pageDelayFromFlags(flags)
192
159
  })) {
193
- out.stdout.write(JSON.stringify(item) + "\n");
160
+ writeNdjsonItem(out, item, outOpts.fields);
194
161
  }
195
162
  } else {
196
163
  const result = await ns.posts.listUserReactions("me", params2);
164
+ readablePage(result);
197
165
  renderSuccess(result, outOpts, out);
198
166
  }
199
167
  } else if (flags.followers) {
@@ -204,19 +172,20 @@ async function runProfileMe(client, flags, out) {
204
172
  out,
205
173
  pageDelayMs: pageDelayFromFlags(flags)
206
174
  })) {
207
- out.stdout.write(JSON.stringify(item) + "\n");
175
+ writeNdjsonItem(out, item, outOpts.fields);
208
176
  }
209
177
  } else {
210
178
  const result = await ns.users.listFollowers("me", params2);
179
+ readablePage(result);
211
180
  renderSuccess(result, outOpts, out);
212
181
  }
213
182
  }
214
183
  } catch (err) {
215
184
  const { CurviateError } = await import("@curviate/sdk");
216
185
  if (err instanceof CurviateError) {
217
- const { getExitCode } = await import("./exit-codes-AAFTOAXF.js");
186
+ const { getExitCode } = await import("./exit-codes-YSFFFWMS.js");
218
187
  renderError(err, outOpts, out);
219
- process.exit(getExitCode(err.code));
188
+ process.exit(getExitCode(err));
220
189
  }
221
190
  renderUnexpectedError(err, out);
222
191
  process.exit(1);
@@ -235,14 +204,14 @@ async function runProfileMe(client, flags, out) {
235
204
  }
236
205
  try {
237
206
  const result = await ns.users.get("me", params);
238
- const slimOutOpts = { ...outOpts, slim: slimProfileMe };
207
+ const slimOutOpts = { ...outOpts, slim: withRequestedSections(slimProfileMe, params.linkedin_sections) };
239
208
  renderSuccess(result, slimOutOpts, out);
240
209
  } catch (err) {
241
210
  const { CurviateError } = await import("@curviate/sdk");
242
211
  if (err instanceof CurviateError) {
243
- const { getExitCode } = await import("./exit-codes-AAFTOAXF.js");
212
+ const { getExitCode } = await import("./exit-codes-YSFFFWMS.js");
244
213
  renderError(err, outOpts, out);
245
- process.exit(getExitCode(err.code));
214
+ process.exit(getExitCode(err));
246
215
  }
247
216
  renderUnexpectedError(err, out);
248
217
  process.exit(1);
@@ -250,6 +219,7 @@ async function runProfileMe(client, flags, out) {
250
219
  }
251
220
  async function runProfileGet(client, flags, out) {
252
221
  rejectPreviewOnRead(flags.preview, out);
222
+ rejectPaginationModifiersWithoutAll(flags, out);
253
223
  const isListCommand = flags.posts || flags.comments || flags.reactions || flags.followers;
254
224
  if (!isListCommand && flags.sections === "") {
255
225
  out.stderr.write("error: --sections must not be empty. Omit the flag or provide section names.\n");
@@ -286,8 +256,7 @@ async function runProfileGet(client, flags, out) {
286
256
  if (flags["is-company"]) {
287
257
  const isNumericId = /^\d+$/.test(resolvedId);
288
258
  if (!isNumericId) {
289
- const companyData = await ns.companies.get(resolvedId);
290
- postId = companyData.id;
259
+ postId = readableId(await ns.companies.get(resolvedId));
291
260
  }
292
261
  }
293
262
  if (all) {
@@ -297,10 +266,11 @@ async function runProfileGet(client, flags, out) {
297
266
  out,
298
267
  pageDelayMs: pageDelayFromFlags(flags)
299
268
  })) {
300
- out.stdout.write(JSON.stringify(item) + "\n");
269
+ writeNdjsonItem(out, item, outOpts.fields);
301
270
  }
302
271
  } else {
303
272
  const result = await ns.posts.listUserPosts(postId, params);
273
+ readablePage(result);
304
274
  renderSuccess(result, outOpts, out);
305
275
  }
306
276
  } else if (flags.comments) {
@@ -314,10 +284,11 @@ async function runProfileGet(client, flags, out) {
314
284
  out,
315
285
  pageDelayMs: pageDelayFromFlags(flags)
316
286
  })) {
317
- out.stdout.write(JSON.stringify(item) + "\n");
287
+ writeNdjsonItem(out, item, outOpts.fields);
318
288
  }
319
289
  } else {
320
290
  const result = await ns.comments.listUserComments(resolvedId, params);
291
+ readablePage(result);
321
292
  renderSuccess(result, outOpts, out);
322
293
  }
323
294
  } else if (flags.reactions) {
@@ -331,10 +302,11 @@ async function runProfileGet(client, flags, out) {
331
302
  out,
332
303
  pageDelayMs: pageDelayFromFlags(flags)
333
304
  })) {
334
- out.stdout.write(JSON.stringify(item) + "\n");
305
+ writeNdjsonItem(out, item, outOpts.fields);
335
306
  }
336
307
  } else {
337
308
  const result = await ns.posts.listUserReactions(resolvedId, params);
309
+ readablePage(result);
338
310
  renderSuccess(result, outOpts, out);
339
311
  }
340
312
  } else if (flags.followers) {
@@ -348,10 +320,11 @@ async function runProfileGet(client, flags, out) {
348
320
  out,
349
321
  pageDelayMs: pageDelayFromFlags(flags)
350
322
  })) {
351
- out.stdout.write(JSON.stringify(item) + "\n");
323
+ writeNdjsonItem(out, item, outOpts.fields);
352
324
  }
353
325
  } else {
354
326
  const result = await ns.users.listFollowers(resolvedId, params);
327
+ readablePage(result);
355
328
  renderSuccess(result, outOpts, out);
356
329
  }
357
330
  } else {
@@ -362,15 +335,15 @@ async function runProfileGet(client, flags, out) {
362
335
  }
363
336
  const getId = flags.sections ? await resolveMemberOrMeProviderId(ns, rawId, retrievalQuery) : resolvedId;
364
337
  const result = await ns.users.get(getId, params);
365
- const getOutOpts = { ...outOpts, slim: slimProfile };
338
+ const getOutOpts = { ...outOpts, slim: withRequestedSections(slimProfile, parsedSections) };
366
339
  renderSuccess(result, getOutOpts, out);
367
340
  }
368
341
  } catch (err) {
369
342
  const { CurviateError } = await import("@curviate/sdk");
370
343
  if (err instanceof CurviateError) {
371
- const { getExitCode } = await import("./exit-codes-AAFTOAXF.js");
344
+ const { getExitCode } = await import("./exit-codes-YSFFFWMS.js");
372
345
  renderError(err, outOpts, out);
373
- process.exit(getExitCode(err.code));
346
+ process.exit(getExitCode(err));
374
347
  }
375
348
  renderUnexpectedError(err, out);
376
349
  process.exit(1);
@@ -378,6 +351,7 @@ async function runProfileGet(client, flags, out) {
378
351
  }
379
352
  async function runProfileRelations(client, flags, out) {
380
353
  rejectPreviewOnRead(flags.preview, out);
354
+ rejectPaginationModifiersWithoutAll(flags, out);
381
355
  const accountId = await requireAccount(client, flags, out);
382
356
  const ns = client.account(accountId);
383
357
  const outOpts = resolveOutputOpts(flags);
@@ -396,18 +370,19 @@ async function runProfileRelations(client, flags, out) {
396
370
  out,
397
371
  pageDelayMs: pageDelayFromFlags(flags)
398
372
  })) {
399
- out.stdout.write(JSON.stringify(item) + "\n");
373
+ writeNdjsonItem(out, item, outOpts.fields);
400
374
  }
401
375
  } else {
402
376
  const result = await ns.users.listRelations(params);
377
+ readablePage(result);
403
378
  renderSuccess(result, outOpts, out);
404
379
  }
405
380
  } catch (err) {
406
381
  const { CurviateError } = await import("@curviate/sdk");
407
382
  if (err instanceof CurviateError) {
408
- const { getExitCode } = await import("./exit-codes-AAFTOAXF.js");
383
+ const { getExitCode } = await import("./exit-codes-YSFFFWMS.js");
409
384
  renderError(err, outOpts, out);
410
- process.exit(getExitCode(err.code));
385
+ process.exit(getExitCode(err));
411
386
  }
412
387
  renderUnexpectedError(err, out);
413
388
  process.exit(1);
@@ -445,9 +420,9 @@ async function runProfileEndorse(client, flags, out) {
445
420
  async function handleSdkError(err, outOpts, out) {
446
421
  const { CurviateError } = await import("@curviate/sdk");
447
422
  if (err instanceof CurviateError) {
448
- const { getExitCode } = await import("./exit-codes-AAFTOAXF.js");
423
+ const { getExitCode } = await import("./exit-codes-YSFFFWMS.js");
449
424
  renderError(err, outOpts, out);
450
- process.exit(getExitCode(err.code));
425
+ process.exit(getExitCode(err));
451
426
  }
452
427
  renderUnexpectedError(err, out);
453
428
  process.exit(1);
@@ -480,6 +455,7 @@ async function runProfileAnalytics(client, flags, out) {
480
455
  }
481
456
  async function runProfileVisitors(client, flags, out) {
482
457
  rejectPreviewOnRead(flags.preview, out);
458
+ rejectPaginationModifiersWithoutAll(flags, out);
483
459
  const accountId = await requireAccount(client, flags, out);
484
460
  const ns = client.account(accountId);
485
461
  const outOpts = resolveOutputOpts(flags);
@@ -498,10 +474,11 @@ async function runProfileVisitors(client, flags, out) {
498
474
  out,
499
475
  pageDelayMs: pageDelayFromFlags(flags)
500
476
  })) {
501
- out.stdout.write(JSON.stringify(item) + "\n");
477
+ writeNdjsonItem(out, item, outOpts.fields);
502
478
  }
503
479
  } else {
504
480
  const result = await ns.profile.visitors(params);
481
+ readablePage(result);
505
482
  renderSuccess(result, outOpts, out);
506
483
  }
507
484
  } catch (err) {
@@ -617,6 +594,7 @@ async function runProfileUnfollow(client, flags, out) {
617
594
  }
618
595
  async function runProfileFollowers(client, flags, out) {
619
596
  rejectPreviewOnRead(flags.preview, out);
597
+ rejectPaginationModifiersWithoutAll(flags, out);
620
598
  const accountId = await requireAccount(client, flags, out);
621
599
  const resolvedId = resolveIdentifier(flags.id ?? "");
622
600
  const ns = client.account(accountId);
@@ -634,10 +612,11 @@ async function runProfileFollowers(client, flags, out) {
634
612
  out,
635
613
  pageDelayMs: pageDelayFromFlags(flags)
636
614
  })) {
637
- out.stdout.write(JSON.stringify(item) + "\n");
615
+ writeNdjsonItem(out, item, outOpts.fields);
638
616
  }
639
617
  } else {
640
618
  const result = await ns.users.listFollowers(resolvedId, params);
619
+ readablePage(result);
641
620
  renderSuccess(result, outOpts, out);
642
621
  }
643
622
  } catch (err) {
@@ -646,6 +625,7 @@ async function runProfileFollowers(client, flags, out) {
646
625
  }
647
626
  async function runProfileFollowing(client, flags, out) {
648
627
  rejectPreviewOnRead(flags.preview, out);
628
+ rejectPaginationModifiersWithoutAll(flags, out);
649
629
  const accountId = await requireAccount(client, flags, out);
650
630
  const resolvedId = resolveIdentifier(flags.id ?? "");
651
631
  const ns = client.account(accountId);
@@ -663,10 +643,11 @@ async function runProfileFollowing(client, flags, out) {
663
643
  out,
664
644
  pageDelayMs: pageDelayFromFlags(flags)
665
645
  })) {
666
- out.stdout.write(JSON.stringify(item) + "\n");
646
+ writeNdjsonItem(out, item, outOpts.fields);
667
647
  }
668
648
  } else {
669
649
  const result = await ns.users.listFollowing(resolvedId, params);
650
+ readablePage(result);
670
651
  renderSuccess(result, outOpts, out);
671
652
  }
672
653
  } catch (err) {
@@ -680,7 +661,7 @@ var profileMeCommand = defineCommand({
680
661
  ...RETRIEVAL_FLAGS,
681
662
  sections: {
682
663
  type: "string",
683
- description: "Comma-separated LinkedIn sections to fetch: linkedin_experience, linkedin_education, linkedin_languages, linkedin_skills, linkedin_certifications, linkedin_volunteer_experience, linkedin_projects, linkedin_recommendations, linkedin_interests, or linkedin_* for all (each also has a _preview variant). A bare value (e.g. skills) is auto-prefixed to linkedin_skills. Only applies to the base getMe call (no activity flag)."
664
+ description: "Comma-separated LinkedIn sections to fetch: linkedin_experience, linkedin_education, linkedin_languages, linkedin_skills, linkedin_certifications, linkedin_volunteer_experience, linkedin_projects, linkedin_recommendations, linkedin_interests, or linkedin_* for all (each also has a _preview variant). A bare value (e.g. skills) is auto-prefixed to linkedin_skills. Each requested section is added to the output under its own name (skills). Only applies to the base getMe call (no activity flag)."
684
665
  },
685
666
  posts: {
686
667
  type: "boolean",
@@ -694,7 +675,7 @@ var profileMeCommand = defineCommand({
694
675
  },
695
676
  reactions: {
696
677
  type: "boolean",
697
- description: "List own reactions.",
678
+ description: "List own reactions. Items carry no time of the reaction: `parent_post.created_at` is when the post was created, not when it was reacted to, so the listing cannot be filtered by date; without `--all`, `--limit` caps the read at one page.",
698
679
  default: false
699
680
  },
700
681
  followers: {
@@ -745,7 +726,7 @@ var profileRelationsCommand = defineCommand({
745
726
  var profileEndorseCommand = defineCommand({
746
727
  meta: { name: "endorse", description: "Endorse a skill on a member's profile." },
747
728
  args: {
748
- ...GLOBAL_FLAGS,
729
+ ...NON_STREAM_FLAGS,
749
730
  id: { type: "positional", description: "Member identifier (URL, slug, or provider id). A URL/slug is resolved to the provider id automatically (a slug is not accepted directly by the endorse endpoint)." },
750
731
  "endorsement-id": {
751
732
  type: "string",
@@ -878,13 +859,13 @@ var profileCommand = defineCommand({
878
859
  id: { type: "positional", description: "Member identifier (URL, slug, or URN). Optional for subcommands.", required: false },
879
860
  posts: { type: "boolean", description: "List the profile's posts.", default: false },
880
861
  comments: { type: "boolean", description: "List the profile's comments.", default: false },
881
- reactions: { type: "boolean", description: "List the profile's reactions.", default: false },
862
+ reactions: { type: "boolean", description: "List the profile's reactions. Items carry no time of the reaction: `parent_post.created_at` is when the post was created, not when it was reacted to, so the listing cannot be filtered by date; without `--all`, `--limit` caps the read at one page.", default: false },
882
863
  followers: { type: "boolean", description: "List the profile's followers.", default: false },
883
864
  "is-company": { type: "boolean", description: "When listing posts, treat the profile as a company page.", default: false },
884
865
  ...RETRIEVAL_FLAGS,
885
866
  sections: {
886
867
  type: "string",
887
- description: "Comma-separated LinkedIn sections to fetch: linkedin_experience, linkedin_education, linkedin_languages, linkedin_skills, linkedin_certifications, linkedin_volunteer_experience, linkedin_projects, linkedin_recommendations, linkedin_interests, or linkedin_* for all (each also has a _preview variant). A bare value (e.g. skills) is auto-prefixed to linkedin_skills."
868
+ description: "Comma-separated LinkedIn sections to fetch: linkedin_experience, linkedin_education, linkedin_languages, linkedin_skills, linkedin_certifications, linkedin_volunteer_experience, linkedin_projects, linkedin_recommendations, linkedin_interests, or linkedin_* for all (each also has a _preview variant). A bare value (e.g. skills) is auto-prefixed to linkedin_skills. Each requested section is added to the output under its own name (skills)."
888
869
  }
889
870
  },
890
871
  subCommands: {
@@ -3,14 +3,10 @@ import {
3
3
  DEFAULT_FILTER_READERS,
4
4
  assembleFilters,
5
5
  splitCsv
6
- } from "./chunk-JRKM4OV2.js";
6
+ } from "./chunk-6W7364S3.js";
7
7
  import {
8
8
  slimJob
9
- } from "./chunk-LJR4LJG6.js";
10
- import {
11
- pageDelayFromFlags,
12
- streamAll
13
- } from "./chunk-LKF5MZIP.js";
9
+ } from "./chunk-XP2LN6F6.js";
14
10
  import {
15
11
  BinaryOutputError,
16
12
  writeBinaryOutput
@@ -24,31 +20,36 @@ import {
24
20
  resolveIdentifier,
25
21
  resolveJobIdentifier
26
22
  } from "./chunk-UEAX6KUB.js";
27
- import {
28
- buildPreviewOutput
29
- } from "./chunk-R3VLWLVV.js";
30
23
  import {
31
24
  requireAccount
32
- } from "./chunk-V3PB4HSF.js";
25
+ } from "./chunk-MNDXMGPX.js";
33
26
  import {
27
+ buildPreviewOutput
28
+ } from "./chunk-TCUYH5GO.js";
29
+ import {
30
+ pageDelayFromFlags,
31
+ readablePage,
32
+ rejectPaginationModifiersWithoutAll,
34
33
  renderError,
35
34
  renderSuccess,
36
- renderUnexpectedError
37
- } from "./chunk-KQXYEQAD.js";
35
+ renderUnexpectedError,
36
+ resolveEffectiveConfig,
37
+ streamAll,
38
+ writeNdjsonItem
39
+ } from "./chunk-7JU4IXXG.js";
40
+ import "./chunk-XZJQQJBE.js";
38
41
  import {
39
42
  createClient,
40
- resolveEffectiveConfig
41
- } from "./chunk-TD2ZIXFR.js";
42
- import "./chunk-PKSKQ3LN.js";
43
- import "./chunk-EIEF2KFH.js";
44
- import "./chunk-TQJ77SL4.js";
43
+ downloadBinary
44
+ } from "./chunk-DCZR4M7G.js";
45
45
  import {
46
46
  GLOBAL_FLAGS,
47
+ NON_STREAM_FLAGS,
47
48
  READ_SINGLE_FLAGS,
48
49
  WRITE_FLAGS,
49
50
  WRITE_SINGLE_FLAGS,
50
51
  isStdinToken
51
- } from "./chunk-SKJNLN37.js";
52
+ } from "./chunk-XDQHNUEU.js";
52
53
 
53
54
  // src/commands/recruiter.ts
54
55
  import { defineCommand } from "citty";
@@ -80,9 +81,9 @@ function normalizeAttachPaths(attach) {
80
81
  async function handleSdkError(err, outOpts, out) {
81
82
  const { CurviateError } = await import("@curviate/sdk");
82
83
  if (err instanceof CurviateError) {
83
- const { getExitCode } = await import("./exit-codes-AAFTOAXF.js");
84
+ const { getExitCode } = await import("./exit-codes-YSFFFWMS.js");
84
85
  renderError(err, outOpts, out);
85
- process.exit(getExitCode(err.code));
86
+ process.exit(getExitCode(err));
86
87
  }
87
88
  renderUnexpectedError(err, out);
88
89
  process.exit(1);
@@ -268,6 +269,7 @@ async function runRecruiterProfile(client, flags, out) {
268
269
  }
269
270
  async function runRecruiterSearchPeople(client, flags, out, readers = DEFAULT_FILTER_READERS) {
270
271
  rejectPreviewOnRead(flags.preview, out);
272
+ rejectPaginationModifiersWithoutAll(flags, out);
271
273
  const accountId = await requireAccount(client, flags, out);
272
274
  const ns = client.account(accountId);
273
275
  const outOpts = resolveOutputOpts(flags);
@@ -305,10 +307,11 @@ async function runRecruiterSearchPeople(client, flags, out, readers = DEFAULT_FI
305
307
  out,
306
308
  pageDelayMs: pageDelayFromFlags(flags)
307
309
  })) {
308
- out.stdout.write(JSON.stringify(item) + "\n");
310
+ writeNdjsonItem(out, item, outOpts.fields);
309
311
  }
310
312
  } else {
311
313
  const result = await ns.recruiter.searchPeople(body, Object.keys(params).length > 0 ? params : void 0);
314
+ readablePage(result);
312
315
  renderSuccess(result, outOpts, out);
313
316
  }
314
317
  } catch (err) {
@@ -346,6 +349,7 @@ async function runRecruiterSearchParameters(client, flags, out) {
346
349
  }
347
350
  async function runRecruiterSearchFromUrl(client, flags, out) {
348
351
  rejectPreviewOnRead(flags.preview, out);
352
+ rejectPaginationModifiersWithoutAll(flags, out);
349
353
  const accountId = await requireAccount(client, flags, out);
350
354
  const url = flags.url ?? "";
351
355
  const ns = client.account(accountId);
@@ -373,10 +377,11 @@ async function runRecruiterSearchFromUrl(client, flags, out) {
373
377
  out,
374
378
  pageDelayMs: pageDelayFromFlags(flags)
375
379
  })) {
376
- out.stdout.write(JSON.stringify(item) + "\n");
380
+ writeNdjsonItem(out, item, outOpts.fields);
377
381
  }
378
382
  } else {
379
383
  const result = await ns.recruiter.searchFromUrl(body, Object.keys(params).length > 0 ? params : void 0);
384
+ readablePage(result);
380
385
  renderSuccess(result, outOpts, out);
381
386
  }
382
387
  } catch (err) {
@@ -385,6 +390,7 @@ async function runRecruiterSearchFromUrl(client, flags, out) {
385
390
  }
386
391
  async function runRecruiterListProjects(client, flags, out) {
387
392
  rejectPreviewOnRead(flags.preview, out);
393
+ rejectPaginationModifiersWithoutAll(flags, out);
388
394
  const accountId = await requireAccount(client, flags, out);
389
395
  const ns = client.account(accountId);
390
396
  const outOpts = resolveOutputOpts(flags);
@@ -403,10 +409,11 @@ async function runRecruiterListProjects(client, flags, out) {
403
409
  out,
404
410
  pageDelayMs: pageDelayFromFlags(flags)
405
411
  })) {
406
- out.stdout.write(JSON.stringify(item) + "\n");
412
+ writeNdjsonItem(out, item, outOpts.fields);
407
413
  }
408
414
  } else {
409
415
  const result = await ns.recruiter.listProjects(Object.keys(params).length > 0 ? params : void 0);
416
+ readablePage(result);
410
417
  renderSuccess(result, outOpts, out);
411
418
  }
412
419
  } catch (err) {
@@ -464,6 +471,7 @@ async function runRecruiterUpdateProject(client, flags, out) {
464
471
  }
465
472
  async function runRecruiterListPipeline(client, flags, out) {
466
473
  rejectPreviewOnRead(flags.preview, out);
474
+ rejectPaginationModifiersWithoutAll(flags, out);
467
475
  const accountId = await requireAccount(client, flags, out);
468
476
  const projectId = flags.projectId ?? "";
469
477
  const ns = client.account(accountId);
@@ -495,7 +503,7 @@ async function runRecruiterListPipeline(client, flags, out) {
495
503
  out,
496
504
  pageDelayMs: pageDelayFromFlags(flags)
497
505
  })) {
498
- out.stdout.write(JSON.stringify(item) + "\n");
506
+ writeNdjsonItem(out, item, outOpts.fields);
499
507
  }
500
508
  } else {
501
509
  const result = await ns.recruiter.listPipeline(
@@ -503,6 +511,7 @@ async function runRecruiterListPipeline(client, flags, out) {
503
511
  Object.keys(body).length > 0 ? body : void 0,
504
512
  Object.keys(params).length > 0 ? params : void 0
505
513
  );
514
+ readablePage(result);
506
515
  renderSuccess(result, outOpts, out);
507
516
  }
508
517
  } catch (err) {
@@ -564,6 +573,7 @@ async function runRecruiterSaveCandidate(client, flags, out) {
564
573
  }
565
574
  async function runRecruiterListJobs(client, flags, out) {
566
575
  rejectPreviewOnRead(flags.preview, out);
576
+ rejectPaginationModifiersWithoutAll(flags, out);
567
577
  const accountId = await requireAccount(client, flags, out);
568
578
  const ns = client.account(accountId);
569
579
  const outOpts = resolveOutputOpts(flags);
@@ -582,10 +592,11 @@ async function runRecruiterListJobs(client, flags, out) {
582
592
  out,
583
593
  pageDelayMs: pageDelayFromFlags(flags)
584
594
  })) {
585
- out.stdout.write(JSON.stringify(item) + "\n");
595
+ writeNdjsonItem(out, item, outOpts.fields);
586
596
  }
587
597
  } else {
588
598
  const result = await ns.recruiter.listJobs(Object.keys(params).length > 0 ? params : void 0);
599
+ readablePage(result);
589
600
  renderSuccess(result, outOpts, out);
590
601
  }
591
602
  } catch (err) {
@@ -767,6 +778,7 @@ async function runRecruiterCloseJob(client, flags, out) {
767
778
  }
768
779
  async function runRecruiterSearchTalentPool(client, flags, out, readers = DEFAULT_FILTER_READERS) {
769
780
  rejectPreviewOnRead(flags.preview, out);
781
+ rejectPaginationModifiersWithoutAll(flags, out);
770
782
  if (!flags["channel-id"]) {
771
783
  out.stderr.write("error: --channel-id is required.\n");
772
784
  process.exit(2);
@@ -806,10 +818,11 @@ async function runRecruiterSearchTalentPool(client, flags, out, readers = DEFAUL
806
818
  out,
807
819
  pageDelayMs: pageDelayFromFlags(flags)
808
820
  })) {
809
- out.stdout.write(JSON.stringify(item) + "\n");
821
+ writeNdjsonItem(out, item, outOpts.fields);
810
822
  }
811
823
  } else {
812
824
  const result = await ns.recruiter.searchTalentPool(projectId, body, Object.keys(params).length > 0 ? params : void 0);
825
+ readablePage(result);
813
826
  renderSuccess(result, outOpts, out);
814
827
  }
815
828
  } catch (err) {
@@ -872,7 +885,7 @@ async function runRecruiterDownloadResume(client, flags, out, isTTY) {
872
885
  const applicantId = flags.applicantId ?? "";
873
886
  const ns = client.account(accountId);
874
887
  try {
875
- const data = await ns.recruiter.downloadResume(projectId, applicantId);
888
+ const data = await downloadBinary(() => ns.recruiter.downloadResume(projectId, applicantId));
876
889
  await writeBinaryOutput(data, {
877
890
  outputPath: flags.output,
878
891
  isTTY,
@@ -990,7 +1003,7 @@ var recruiterSearchPeopleCommand = defineCommand({
990
1003
  var recruiterSearchParametersCommand = defineCommand({
991
1004
  meta: { name: "parameters", description: "Resolve Recruiter filter parameter IDs (POST, source-scoped)." },
992
1005
  args: {
993
- ...GLOBAL_FLAGS,
1006
+ ...NON_STREAM_FLAGS,
994
1007
  source: {
995
1008
  type: "string",
996
1009
  description: "Filter family to resolve within: APPLICANTS or PIPELINE (both require --project-id), SEARCH, JOB_POSTING, or JOBS.",
@@ -1303,7 +1316,7 @@ var recruiterJobPublishCommand = defineCommand({
1303
1316
  var recruiterApplicantsCommand = defineCommand({
1304
1317
  meta: { name: "applicants", description: "List applicants in a Recruiter project's talent pool." },
1305
1318
  args: {
1306
- ...GLOBAL_FLAGS,
1319
+ ...NON_STREAM_FLAGS,
1307
1320
  projectId: { type: "positional", description: "Recruiter project ID." },
1308
1321
  "channel-id": { type: "string", description: "The project's JOB_POSTING talent-pool channel ID (required).", required: true }
1309
1322
  },