@curviate/cli 0.26.0 → 0.28.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 (29) hide show
  1. package/CHANGELOG.md +117 -0
  2. package/README.md +58 -0
  3. package/dist/{account-ZNBG7C3J.js → account-5KGM6EPR.js} +4 -4
  4. package/dist/{chunk-RPRIMRIU.js → chunk-2OG6M6ME.js} +11 -0
  5. package/dist/{chunk-PMWEDWJ3.js → chunk-5KANHEBN.js} +38 -5
  6. package/dist/{chunk-RZ36UBML.js → chunk-63X3VI3T.js} +5 -2
  7. package/dist/{chunk-RJTG5YWE.js → chunk-6P52Q2GK.js} +2 -2
  8. package/dist/{chunk-V75UFUF2.js → chunk-GHT2DLZR.js} +1 -1
  9. package/dist/chunk-PQWDDSV7.js +65 -0
  10. package/dist/{chunk-KTKKZGJV.js → chunk-TAOXJNQN.js} +3 -3
  11. package/dist/cli.js +17 -17
  12. package/dist/{comment-TTOQPMSO.js → comment-BLG4WHST.js} +6 -6
  13. package/dist/{company-HD3WIYP6.js → company-ZT65QZ6F.js} +6 -6
  14. package/dist/{connect-Y2FWUXDA.js → connect-57AUN33D.js} +10 -10
  15. package/dist/{exit-codes-4RCNQJUB.js → exit-codes-U5CHA6FT.js} +1 -1
  16. package/dist/{feed-I7QG7Y2Y.js → feed-3AWI2URQ.js} +5 -5
  17. package/dist/{group-RXZVIOTU.js → group-DYC2NX5M.js} +5 -5
  18. package/dist/{inbox-25JJBITH.js → inbox-CQO2I47N.js} +25 -7
  19. package/dist/{inboxes-CD3OVL76.js → inboxes-XQ2B6X3Q.js} +5 -5
  20. package/dist/{job-ITLUWM3G.js → job-NUT4QMH2.js} +5 -5
  21. package/dist/{message-WNYEHK2B.js → message-KMNRUD4H.js} +4 -4
  22. package/dist/{notification-5PETFBMH.js → notification-LEM57IBY.js} +5 -5
  23. package/dist/{post-7IROSWFO.js → post-FXAANNUB.js} +6 -6
  24. package/dist/{profile-MF5L5BTE.js → profile-72V55PZM.js} +40 -13
  25. package/dist/{recruiter-24BX6WU3.js → recruiter-JUNB5AUR.js} +5 -5
  26. package/dist/{sales-nav-3EY4H6MR.js → sales-nav-BALVVD35.js} +5 -5
  27. package/dist/{search-UPYL2NB6.js → search-QCXTK33P.js} +13 -13
  28. package/dist/{webhook-SUCCPKXZ.js → webhook-D4QRWF7W.js} +3 -3
  29. package/package.json +2 -2
@@ -11,13 +11,13 @@ import {
11
11
  import {
12
12
  pageDelayFromFlags,
13
13
  streamAll
14
- } from "./chunk-RZ36UBML.js";
14
+ } from "./chunk-63X3VI3T.js";
15
15
  import {
16
16
  resolveIdentifier
17
17
  } from "./chunk-UEAX6KUB.js";
18
18
  import {
19
19
  requireAccount
20
- } from "./chunk-V75UFUF2.js";
20
+ } from "./chunk-GHT2DLZR.js";
21
21
  import {
22
22
  buildPreviewOutput
23
23
  } from "./chunk-R3VLWLVV.js";
@@ -27,13 +27,13 @@ import {
27
27
  renderSuccess,
28
28
  renderUnexpectedError,
29
29
  resolveEffectiveConfig
30
- } from "./chunk-PMWEDWJ3.js";
30
+ } from "./chunk-5KANHEBN.js";
31
31
  import "./chunk-KTY7R27U.js";
32
32
  import {
33
33
  GLOBAL_FLAGS,
34
34
  WRITE_FLAGS
35
35
  } from "./chunk-AHYUM2XQ.js";
36
- import "./chunk-RPRIMRIU.js";
36
+ import "./chunk-2OG6M6ME.js";
37
37
 
38
38
  // src/commands/connect.ts
39
39
  import { defineCommand } from "citty";
@@ -83,7 +83,7 @@ async function runConnectSend(client, flags, out) {
83
83
  } catch (err) {
84
84
  const { CurviateError } = await import("@curviate/sdk");
85
85
  if (err instanceof CurviateError) {
86
- const { getExitCode } = await import("./exit-codes-4RCNQJUB.js");
86
+ const { getExitCode } = await import("./exit-codes-U5CHA6FT.js");
87
87
  renderError(err, outOpts, out);
88
88
  process.exit(getExitCode(err.code));
89
89
  }
@@ -121,7 +121,7 @@ async function runConnectSent(client, flags, out) {
121
121
  } catch (err) {
122
122
  const { CurviateError } = await import("@curviate/sdk");
123
123
  if (err instanceof CurviateError) {
124
- const { getExitCode } = await import("./exit-codes-4RCNQJUB.js");
124
+ const { getExitCode } = await import("./exit-codes-U5CHA6FT.js");
125
125
  renderError(err, outOpts, out);
126
126
  process.exit(getExitCode(err.code));
127
127
  }
@@ -159,7 +159,7 @@ async function runConnectReceived(client, flags, out) {
159
159
  } catch (err) {
160
160
  const { CurviateError } = await import("@curviate/sdk");
161
161
  if (err instanceof CurviateError) {
162
- const { getExitCode } = await import("./exit-codes-4RCNQJUB.js");
162
+ const { getExitCode } = await import("./exit-codes-U5CHA6FT.js");
163
163
  renderError(err, outOpts, out);
164
164
  process.exit(getExitCode(err.code));
165
165
  }
@@ -188,7 +188,7 @@ async function runConnectAccept(client, flags, out) {
188
188
  } catch (err) {
189
189
  const { CurviateError } = await import("@curviate/sdk");
190
190
  if (err instanceof CurviateError) {
191
- const { getExitCode } = await import("./exit-codes-4RCNQJUB.js");
191
+ const { getExitCode } = await import("./exit-codes-U5CHA6FT.js");
192
192
  renderError(err, outOpts, out);
193
193
  process.exit(getExitCode(err.code));
194
194
  }
@@ -217,7 +217,7 @@ async function runConnectDecline(client, flags, out) {
217
217
  } catch (err) {
218
218
  const { CurviateError } = await import("@curviate/sdk");
219
219
  if (err instanceof CurviateError) {
220
- const { getExitCode } = await import("./exit-codes-4RCNQJUB.js");
220
+ const { getExitCode } = await import("./exit-codes-U5CHA6FT.js");
221
221
  renderError(err, outOpts, out);
222
222
  process.exit(getExitCode(err.code));
223
223
  }
@@ -246,7 +246,7 @@ async function runConnectCancel(client, flags, out) {
246
246
  } catch (err) {
247
247
  const { CurviateError } = await import("@curviate/sdk");
248
248
  if (err instanceof CurviateError) {
249
- const { getExitCode } = await import("./exit-codes-4RCNQJUB.js");
249
+ const { getExitCode } = await import("./exit-codes-U5CHA6FT.js");
250
250
  renderError(err, outOpts, out);
251
251
  process.exit(getExitCode(err.code));
252
252
  }
@@ -3,7 +3,7 @@ import {
3
3
  AUTH_NEEDED,
4
4
  EXIT_CODE_MAP,
5
5
  getExitCode
6
- } from "./chunk-RPRIMRIU.js";
6
+ } from "./chunk-2OG6M6ME.js";
7
7
  export {
8
8
  AUTH_NEEDED,
9
9
  EXIT_CODE_MAP,
@@ -2,22 +2,22 @@
2
2
  import {
3
3
  pageDelayFromFlags,
4
4
  streamAll
5
- } from "./chunk-RZ36UBML.js";
5
+ } from "./chunk-63X3VI3T.js";
6
6
  import {
7
7
  requireAccount
8
- } from "./chunk-V75UFUF2.js";
8
+ } from "./chunk-GHT2DLZR.js";
9
9
  import {
10
10
  createClient,
11
11
  renderError,
12
12
  renderSuccess,
13
13
  renderUnexpectedError,
14
14
  resolveEffectiveConfig
15
- } from "./chunk-PMWEDWJ3.js";
15
+ } from "./chunk-5KANHEBN.js";
16
16
  import "./chunk-KTY7R27U.js";
17
17
  import {
18
18
  GLOBAL_FLAGS
19
19
  } from "./chunk-AHYUM2XQ.js";
20
- import "./chunk-RPRIMRIU.js";
20
+ import "./chunk-2OG6M6ME.js";
21
21
 
22
22
  // src/commands/feed.ts
23
23
  import { defineCommand } from "citty";
@@ -44,7 +44,7 @@ function resolveOutputOpts(flags) {
44
44
  async function handleSdkError(err, outOpts, out) {
45
45
  const { CurviateError } = await import("@curviate/sdk");
46
46
  if (err instanceof CurviateError) {
47
- const { getExitCode } = await import("./exit-codes-4RCNQJUB.js");
47
+ const { getExitCode } = await import("./exit-codes-U5CHA6FT.js");
48
48
  renderError(err, outOpts, out);
49
49
  process.exit(getExitCode(err.code));
50
50
  }
@@ -2,26 +2,26 @@
2
2
  import {
3
3
  pageDelayFromFlags,
4
4
  streamAll
5
- } from "./chunk-RZ36UBML.js";
5
+ } from "./chunk-63X3VI3T.js";
6
6
  import {
7
7
  normalizeGroupId
8
8
  } from "./chunk-UEAX6KUB.js";
9
9
  import {
10
10
  requireAccount
11
- } from "./chunk-V75UFUF2.js";
11
+ } from "./chunk-GHT2DLZR.js";
12
12
  import {
13
13
  createClient,
14
14
  renderError,
15
15
  renderSuccess,
16
16
  renderUnexpectedError,
17
17
  resolveEffectiveConfig
18
- } from "./chunk-PMWEDWJ3.js";
18
+ } from "./chunk-5KANHEBN.js";
19
19
  import "./chunk-KTY7R27U.js";
20
20
  import {
21
21
  GLOBAL_FLAGS,
22
22
  READ_SINGLE_FLAGS
23
23
  } from "./chunk-AHYUM2XQ.js";
24
- import "./chunk-RPRIMRIU.js";
24
+ import "./chunk-2OG6M6ME.js";
25
25
 
26
26
  // src/commands/group.ts
27
27
  import { defineCommand } from "citty";
@@ -54,7 +54,7 @@ function resolveOutputOpts(flags) {
54
54
  async function handleSdkError(err, outOpts, out) {
55
55
  const { CurviateError } = await import("@curviate/sdk");
56
56
  if (err instanceof CurviateError) {
57
- const { getExitCode } = await import("./exit-codes-4RCNQJUB.js");
57
+ const { getExitCode } = await import("./exit-codes-U5CHA6FT.js");
58
58
  renderError(err, outOpts, out);
59
59
  process.exit(getExitCode(err.code));
60
60
  }
@@ -1,14 +1,18 @@
1
1
  #!/usr/bin/env node
2
+ import {
3
+ RETRIEVAL_FLAGS,
4
+ parseRetrievalFlags
5
+ } from "./chunk-PQWDDSV7.js";
2
6
  import {
3
7
  pageDelayFromFlags,
4
8
  streamAll
5
- } from "./chunk-RZ36UBML.js";
9
+ } from "./chunk-63X3VI3T.js";
6
10
  import {
7
11
  normalizeChatId
8
12
  } from "./chunk-UEAX6KUB.js";
9
13
  import {
10
14
  requireAccount
11
- } from "./chunk-V75UFUF2.js";
15
+ } from "./chunk-GHT2DLZR.js";
12
16
  import {
13
17
  buildPreviewOutput
14
18
  } from "./chunk-R3VLWLVV.js";
@@ -18,14 +22,14 @@ import {
18
22
  renderSuccess,
19
23
  renderUnexpectedError,
20
24
  resolveEffectiveConfig
21
- } from "./chunk-PMWEDWJ3.js";
25
+ } from "./chunk-5KANHEBN.js";
22
26
  import "./chunk-KTY7R27U.js";
23
27
  import {
24
28
  GLOBAL_FLAGS,
25
29
  READ_SINGLE_FLAGS,
26
30
  WRITE_SINGLE_FLAGS
27
31
  } from "./chunk-AHYUM2XQ.js";
28
- import "./chunk-RPRIMRIU.js";
32
+ import "./chunk-2OG6M6ME.js";
29
33
 
30
34
  // src/commands/inbox.ts
31
35
  import { defineCommand } from "citty";
@@ -91,7 +95,7 @@ function validateInboxFolder(raw, out) {
91
95
  async function handleSdkError(err, outOpts, out) {
92
96
  const { CurviateError } = await import("@curviate/sdk");
93
97
  if (err instanceof CurviateError) {
94
- const { getExitCode } = await import("./exit-codes-4RCNQJUB.js");
98
+ const { getExitCode } = await import("./exit-codes-U5CHA6FT.js");
95
99
  renderError(err, outOpts, out);
96
100
  process.exit(getExitCode(err.code));
97
101
  }
@@ -135,12 +139,18 @@ async function runInboxList(client, flags, out) {
135
139
  async function runInboxGet(client, flags, out) {
136
140
  rejectPreviewOnRead(flags.preview, out);
137
141
  rejectAllOnNonPaginated(flags.all, out);
142
+ const retrieval = parseRetrievalFlags(flags);
143
+ if (!retrieval.ok) {
144
+ out.stderr.write(retrieval.error);
145
+ process.exit(2);
146
+ return;
147
+ }
138
148
  const accountId = await requireAccount(client, flags, out);
139
149
  const chatId = normalizeChatId(flags.chatId ?? "");
140
150
  const ns = client.account(accountId);
141
151
  const outOpts = resolveOutputOpts(flags);
142
152
  try {
143
- const result = await ns.messaging.getChat(chatId);
153
+ const result = await ns.messaging.getChat(chatId, retrieval.query);
144
154
  renderSuccess(result, outOpts, out);
145
155
  } catch (err) {
146
156
  await handleSdkError(err, outOpts, out);
@@ -166,13 +176,19 @@ async function runInboxMarkRead(client, flags, out) {
166
176
  }
167
177
  async function runInboxMessages(client, flags, out) {
168
178
  rejectPreviewOnRead(flags.preview, out);
179
+ const retrieval = parseRetrievalFlags(flags);
180
+ if (!retrieval.ok) {
181
+ out.stderr.write(retrieval.error);
182
+ process.exit(2);
183
+ return;
184
+ }
169
185
  const accountId = await requireAccount(client, flags, out);
170
186
  const chatId = normalizeChatId(flags.chatId ?? "");
171
187
  const ns = client.account(accountId);
172
188
  const outOpts = resolveOutputOpts(flags);
173
189
  const all = flags.all ?? false;
174
190
  const maxPages = flags["max-pages"] ? parseInt(flags["max-pages"], 10) : 100;
175
- const params = buildPaginationParams(flags);
191
+ const params = { ...buildPaginationParams(flags), ...retrieval.query };
176
192
  validateLimitRange(flags.limit, out);
177
193
  if (flags.before !== void 0) {
178
194
  validateIsoZTimestamp(flags.before, "before", out);
@@ -269,6 +285,7 @@ var inboxGetCommand = defineCommand({
269
285
  args: {
270
286
  // Single-object read: READ_SINGLE_FLAGS omits pagination flags, keeps --fields
271
287
  ...READ_SINGLE_FLAGS,
288
+ ...RETRIEVAL_FLAGS,
272
289
  chatId: { type: "positional", description: "Chat ID." }
273
290
  },
274
291
  async run({ args }) {
@@ -318,6 +335,7 @@ var inboxMessagesCommand = defineCommand({
318
335
  meta: { name: "messages", description: "List messages in a chat. A very recent send/delete may take a few minutes to appear or clear here (LinkedIn-side indexing); `message get <chat_id> <message_id>` reflects it immediately." },
319
336
  args: {
320
337
  ...GLOBAL_FLAGS,
338
+ ...RETRIEVAL_FLAGS,
321
339
  limit: { type: "string", description: "Number of items to return per page (1-25, default 20)." },
322
340
  chatId: { type: "positional", description: "Chat ID." },
323
341
  before: {
@@ -2,23 +2,23 @@
2
2
  import {
3
3
  pageDelayFromFlags,
4
4
  streamAll
5
- } from "./chunk-RZ36UBML.js";
5
+ } from "./chunk-63X3VI3T.js";
6
6
  import {
7
7
  requireAccount
8
- } from "./chunk-V75UFUF2.js";
8
+ } from "./chunk-GHT2DLZR.js";
9
9
  import {
10
10
  createClient,
11
11
  renderError,
12
12
  renderSuccess,
13
13
  renderUnexpectedError,
14
14
  resolveEffectiveConfig
15
- } from "./chunk-PMWEDWJ3.js";
15
+ } from "./chunk-5KANHEBN.js";
16
16
  import "./chunk-KTY7R27U.js";
17
17
  import {
18
18
  GLOBAL_FLAGS,
19
19
  READ_SINGLE_FLAGS
20
20
  } from "./chunk-AHYUM2XQ.js";
21
- import "./chunk-RPRIMRIU.js";
21
+ import "./chunk-2OG6M6ME.js";
22
22
 
23
23
  // src/commands/inboxes.ts
24
24
  import { defineCommand } from "citty";
@@ -51,7 +51,7 @@ function resolveOutputOpts(flags) {
51
51
  async function handleSdkError(err, outOpts, out) {
52
52
  const { CurviateError } = await import("@curviate/sdk");
53
53
  if (err instanceof CurviateError) {
54
- const { getExitCode } = await import("./exit-codes-4RCNQJUB.js");
54
+ const { getExitCode } = await import("./exit-codes-U5CHA6FT.js");
55
55
  renderError(err, outOpts, out);
56
56
  process.exit(getExitCode(err.code));
57
57
  }
@@ -7,7 +7,7 @@ import {
7
7
  ndjsonModeNotice,
8
8
  pageDelayFromFlags,
9
9
  streamAll
10
- } from "./chunk-RZ36UBML.js";
10
+ } from "./chunk-63X3VI3T.js";
11
11
  import {
12
12
  BinaryOutputError,
13
13
  writeBinaryOutput
@@ -17,7 +17,7 @@ import {
17
17
  } from "./chunk-UEAX6KUB.js";
18
18
  import {
19
19
  requireAccount
20
- } from "./chunk-V75UFUF2.js";
20
+ } from "./chunk-GHT2DLZR.js";
21
21
  import {
22
22
  buildPreviewOutput
23
23
  } from "./chunk-R3VLWLVV.js";
@@ -27,14 +27,14 @@ import {
27
27
  renderSuccess,
28
28
  renderUnexpectedError,
29
29
  resolveEffectiveConfig
30
- } from "./chunk-PMWEDWJ3.js";
30
+ } from "./chunk-5KANHEBN.js";
31
31
  import "./chunk-KTY7R27U.js";
32
32
  import {
33
33
  GLOBAL_FLAGS,
34
34
  READ_SINGLE_FLAGS,
35
35
  WRITE_SINGLE_FLAGS
36
36
  } from "./chunk-AHYUM2XQ.js";
37
- import "./chunk-RPRIMRIU.js";
37
+ import "./chunk-2OG6M6ME.js";
38
38
 
39
39
  // src/commands/job.ts
40
40
  import { defineCommand } from "citty";
@@ -96,7 +96,7 @@ function requireEnum(value, allowed, flag, out) {
96
96
  async function handleSdkError(err, outOpts, out) {
97
97
  const { CurviateError } = await import("@curviate/sdk");
98
98
  if (err instanceof CurviateError) {
99
- const { getExitCode } = await import("./exit-codes-4RCNQJUB.js");
99
+ const { getExitCode } = await import("./exit-codes-U5CHA6FT.js");
100
100
  renderError(err, outOpts, out);
101
101
  process.exit(getExitCode(err.code));
102
102
  }
@@ -13,17 +13,17 @@ import {
13
13
  runMessageSend,
14
14
  sentAsNotice,
15
15
  willSendAsNotice
16
- } from "./chunk-KTKKZGJV.js";
16
+ } from "./chunk-TAOXJNQN.js";
17
17
  import "./chunk-HOQ7EUHJ.js";
18
18
  import "./chunk-BGZW6B7G.js";
19
19
  import "./chunk-UWO2D4HW.js";
20
20
  import "./chunk-UEAX6KUB.js";
21
- import "./chunk-V75UFUF2.js";
21
+ import "./chunk-GHT2DLZR.js";
22
22
  import "./chunk-R3VLWLVV.js";
23
- import "./chunk-PMWEDWJ3.js";
23
+ import "./chunk-5KANHEBN.js";
24
24
  import "./chunk-KTY7R27U.js";
25
25
  import "./chunk-AHYUM2XQ.js";
26
- import "./chunk-RPRIMRIU.js";
26
+ import "./chunk-2OG6M6ME.js";
27
27
  export {
28
28
  guardBareMessageForm,
29
29
  messageCommand,
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  pageDelayFromFlags,
4
4
  streamAll
5
- } from "./chunk-RZ36UBML.js";
5
+ } from "./chunk-63X3VI3T.js";
6
6
  import {
7
7
  requireAccount
8
- } from "./chunk-V75UFUF2.js";
8
+ } from "./chunk-GHT2DLZR.js";
9
9
  import {
10
10
  buildPreviewOutput
11
11
  } from "./chunk-R3VLWLVV.js";
@@ -15,13 +15,13 @@ import {
15
15
  renderSuccess,
16
16
  renderUnexpectedError,
17
17
  resolveEffectiveConfig
18
- } from "./chunk-PMWEDWJ3.js";
18
+ } from "./chunk-5KANHEBN.js";
19
19
  import "./chunk-KTY7R27U.js";
20
20
  import {
21
21
  GLOBAL_FLAGS,
22
22
  WRITE_SINGLE_FLAGS
23
23
  } from "./chunk-AHYUM2XQ.js";
24
- import "./chunk-RPRIMRIU.js";
24
+ import "./chunk-2OG6M6ME.js";
25
25
 
26
26
  // src/commands/notification.ts
27
27
  import { defineCommand } from "citty";
@@ -48,7 +48,7 @@ function resolveOutputOpts(flags) {
48
48
  async function handleSdkError(err, outOpts, out) {
49
49
  const { CurviateError } = await import("@curviate/sdk");
50
50
  if (err instanceof CurviateError) {
51
- const { getExitCode } = await import("./exit-codes-4RCNQJUB.js");
51
+ const { getExitCode } = await import("./exit-codes-U5CHA6FT.js");
52
52
  renderError(err, outOpts, out);
53
53
  process.exit(getExitCode(err.code));
54
54
  }
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  resolveMemberOrMeProviderId
4
- } from "./chunk-RJTG5YWE.js";
4
+ } from "./chunk-6P52Q2GK.js";
5
5
  import {
6
6
  AttachError,
7
7
  readAttachment,
@@ -10,11 +10,11 @@ import {
10
10
  import {
11
11
  pageDelayFromFlags,
12
12
  streamAll
13
- } from "./chunk-RZ36UBML.js";
13
+ } from "./chunk-63X3VI3T.js";
14
14
  import "./chunk-UEAX6KUB.js";
15
15
  import {
16
16
  requireAccount
17
- } from "./chunk-V75UFUF2.js";
17
+ } from "./chunk-GHT2DLZR.js";
18
18
  import {
19
19
  buildPreviewOutput
20
20
  } from "./chunk-R3VLWLVV.js";
@@ -24,7 +24,7 @@ import {
24
24
  renderSuccess,
25
25
  renderUnexpectedError,
26
26
  resolveEffectiveConfig
27
- } from "./chunk-PMWEDWJ3.js";
27
+ } from "./chunk-5KANHEBN.js";
28
28
  import "./chunk-KTY7R27U.js";
29
29
  import {
30
30
  GLOBAL_FLAGS,
@@ -32,7 +32,7 @@ import {
32
32
  WRITE_SINGLE_FLAGS,
33
33
  resolveTextOrStdin
34
34
  } from "./chunk-AHYUM2XQ.js";
35
- import "./chunk-RPRIMRIU.js";
35
+ import "./chunk-2OG6M6ME.js";
36
36
 
37
37
  // src/commands/post.ts
38
38
  import { defineCommand } from "citty";
@@ -75,7 +75,7 @@ function normalizeAttachPaths(attach) {
75
75
  async function handleSdkError(err, outOpts, out) {
76
76
  const { CurviateError } = await import("@curviate/sdk");
77
77
  if (err instanceof CurviateError) {
78
- const { getExitCode } = await import("./exit-codes-4RCNQJUB.js");
78
+ const { getExitCode } = await import("./exit-codes-U5CHA6FT.js");
79
79
  renderError(err, outOpts, out);
80
80
  process.exit(getExitCode(err.code));
81
81
  }
@@ -1,8 +1,13 @@
1
1
  #!/usr/bin/env node
2
+ import {
3
+ RETRIEVAL_FLAGS,
4
+ hasRetrievalFlags,
5
+ parseRetrievalFlags
6
+ } from "./chunk-PQWDDSV7.js";
2
7
  import {
3
8
  resolveMemberOrMeProviderId,
4
9
  resolveMemberProviderId
5
- } from "./chunk-RJTG5YWE.js";
10
+ } from "./chunk-6P52Q2GK.js";
6
11
  import {
7
12
  AttachError,
8
13
  readAttachment,
@@ -15,13 +20,13 @@ import {
15
20
  import {
16
21
  pageDelayFromFlags,
17
22
  streamAll
18
- } from "./chunk-RZ36UBML.js";
23
+ } from "./chunk-63X3VI3T.js";
19
24
  import {
20
25
  resolveIdentifier
21
26
  } from "./chunk-UEAX6KUB.js";
22
27
  import {
23
28
  requireAccount
24
- } from "./chunk-V75UFUF2.js";
29
+ } from "./chunk-GHT2DLZR.js";
25
30
  import {
26
31
  buildPreviewOutput
27
32
  } from "./chunk-R3VLWLVV.js";
@@ -31,14 +36,14 @@ import {
31
36
  renderSuccess,
32
37
  renderUnexpectedError,
33
38
  resolveEffectiveConfig
34
- } from "./chunk-PMWEDWJ3.js";
39
+ } from "./chunk-5KANHEBN.js";
35
40
  import "./chunk-KTY7R27U.js";
36
41
  import {
37
42
  GLOBAL_FLAGS,
38
43
  READ_SINGLE_FLAGS,
39
44
  WRITE_SINGLE_FLAGS
40
45
  } from "./chunk-AHYUM2XQ.js";
41
- import "./chunk-RPRIMRIU.js";
46
+ import "./chunk-2OG6M6ME.js";
42
47
 
43
48
  // src/commands/profile.ts
44
49
  import { defineCommand } from "citty";
@@ -93,6 +98,22 @@ function rejectAllOnNonPaginated(all, out) {
93
98
  process.exit(2);
94
99
  }
95
100
  }
101
+ function retrievalQueryOrExit(flags, branchTakesRetrieval, out) {
102
+ if (!branchTakesRetrieval && hasRetrievalFlags(flags)) {
103
+ out.stderr.write(
104
+ "error: --mode/--max-age apply to the profile read itself, not to --posts/--comments/--reactions/--followers. Those list endpoints do not accept them.\n"
105
+ );
106
+ process.exit(2);
107
+ return null;
108
+ }
109
+ const parsed = parseRetrievalFlags(flags);
110
+ if (!parsed.ok) {
111
+ out.stderr.write(parsed.error);
112
+ process.exit(2);
113
+ return null;
114
+ }
115
+ return parsed.query;
116
+ }
96
117
  function buildOutputStreams() {
97
118
  return {
98
119
  stdout: { write: (s) => process.stdout.write(s) },
@@ -118,6 +139,8 @@ async function runProfileMe(client, flags, out) {
118
139
  process.exit(2);
119
140
  return;
120
141
  }
142
+ const retrievalQuery = retrievalQueryOrExit(flags, !hasActivityFlag, out);
143
+ if (retrievalQuery === null) return;
121
144
  const accountId = await requireAccount(client, flags, out);
122
145
  const ns = client.account(accountId);
123
146
  const outOpts = resolveOutputOpts(flags);
@@ -188,7 +211,7 @@ async function runProfileMe(client, flags, out) {
188
211
  } catch (err) {
189
212
  const { CurviateError } = await import("@curviate/sdk");
190
213
  if (err instanceof CurviateError) {
191
- const { getExitCode } = await import("./exit-codes-4RCNQJUB.js");
214
+ const { getExitCode } = await import("./exit-codes-U5CHA6FT.js");
192
215
  renderError(err, outOpts, out);
193
216
  process.exit(getExitCode(err.code));
194
217
  }
@@ -197,7 +220,7 @@ async function runProfileMe(client, flags, out) {
197
220
  }
198
221
  return;
199
222
  }
200
- const params = {};
223
+ const params = { ...retrievalQuery };
201
224
  if (flags.sections) {
202
225
  const parsedSections = parseSectionsFlag(flags.sections);
203
226
  if (!parsedSections.ok) {
@@ -214,7 +237,7 @@ async function runProfileMe(client, flags, out) {
214
237
  } catch (err) {
215
238
  const { CurviateError } = await import("@curviate/sdk");
216
239
  if (err instanceof CurviateError) {
217
- const { getExitCode } = await import("./exit-codes-4RCNQJUB.js");
240
+ const { getExitCode } = await import("./exit-codes-U5CHA6FT.js");
218
241
  renderError(err, outOpts, out);
219
242
  process.exit(getExitCode(err.code));
220
243
  }
@@ -240,6 +263,8 @@ async function runProfileGet(client, flags, out) {
240
263
  }
241
264
  parsedSections = result.sections;
242
265
  }
266
+ const retrievalQuery = retrievalQueryOrExit(flags, !isListCommand, out);
267
+ if (retrievalQuery === null) return;
243
268
  const accountId = await requireAccount(client, flags, out);
244
269
  const rawId = flags.id ?? "";
245
270
  const resolvedId = resolveIdentifier(rawId);
@@ -328,11 +353,11 @@ async function runProfileGet(client, flags, out) {
328
353
  }
329
354
  } else {
330
355
  rejectAllOnNonPaginated(flags.all, out);
331
- const params = {};
356
+ const params = { ...retrievalQuery };
332
357
  if (parsedSections) {
333
358
  params.linkedin_sections = parsedSections;
334
359
  }
335
- const getId = flags.sections ? await resolveMemberOrMeProviderId(ns, rawId) : resolvedId;
360
+ const getId = flags.sections ? await resolveMemberOrMeProviderId(ns, rawId, retrievalQuery) : resolvedId;
336
361
  const result = await ns.users.get(getId, params);
337
362
  const getOutOpts = { ...outOpts, slim: slimProfile };
338
363
  renderSuccess(result, getOutOpts, out);
@@ -340,7 +365,7 @@ async function runProfileGet(client, flags, out) {
340
365
  } catch (err) {
341
366
  const { CurviateError } = await import("@curviate/sdk");
342
367
  if (err instanceof CurviateError) {
343
- const { getExitCode } = await import("./exit-codes-4RCNQJUB.js");
368
+ const { getExitCode } = await import("./exit-codes-U5CHA6FT.js");
344
369
  renderError(err, outOpts, out);
345
370
  process.exit(getExitCode(err.code));
346
371
  }
@@ -377,7 +402,7 @@ async function runProfileRelations(client, flags, out) {
377
402
  } catch (err) {
378
403
  const { CurviateError } = await import("@curviate/sdk");
379
404
  if (err instanceof CurviateError) {
380
- const { getExitCode } = await import("./exit-codes-4RCNQJUB.js");
405
+ const { getExitCode } = await import("./exit-codes-U5CHA6FT.js");
381
406
  renderError(err, outOpts, out);
382
407
  process.exit(getExitCode(err.code));
383
408
  }
@@ -417,7 +442,7 @@ async function runProfileEndorse(client, flags, out) {
417
442
  async function handleSdkError(err, outOpts, out) {
418
443
  const { CurviateError } = await import("@curviate/sdk");
419
444
  if (err instanceof CurviateError) {
420
- const { getExitCode } = await import("./exit-codes-4RCNQJUB.js");
445
+ const { getExitCode } = await import("./exit-codes-U5CHA6FT.js");
421
446
  renderError(err, outOpts, out);
422
447
  process.exit(getExitCode(err.code));
423
448
  }
@@ -649,6 +674,7 @@ var profileMeCommand = defineCommand({
649
674
  meta: { name: "me", description: "Get your own profile, or list own activity with --posts/--comments/--reactions/--followers." },
650
675
  args: {
651
676
  ...GLOBAL_FLAGS,
677
+ ...RETRIEVAL_FLAGS,
652
678
  sections: {
653
679
  type: "string",
654
680
  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)."
@@ -852,6 +878,7 @@ var profileCommand = defineCommand({
852
878
  reactions: { type: "boolean", description: "List the profile's reactions.", default: false },
853
879
  followers: { type: "boolean", description: "List the profile's followers.", default: false },
854
880
  "is-company": { type: "boolean", description: "When listing posts, treat the profile as a company page.", default: false },
881
+ ...RETRIEVAL_FLAGS,
855
882
  sections: {
856
883
  type: "string",
857
884
  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."
@@ -15,7 +15,7 @@ import {
15
15
  import {
16
16
  pageDelayFromFlags,
17
17
  streamAll
18
- } from "./chunk-RZ36UBML.js";
18
+ } from "./chunk-63X3VI3T.js";
19
19
  import {
20
20
  BinaryOutputError,
21
21
  writeBinaryOutput
@@ -26,7 +26,7 @@ import {
26
26
  } from "./chunk-UEAX6KUB.js";
27
27
  import {
28
28
  requireAccount
29
- } from "./chunk-V75UFUF2.js";
29
+ } from "./chunk-GHT2DLZR.js";
30
30
  import {
31
31
  buildPreviewOutput
32
32
  } from "./chunk-R3VLWLVV.js";
@@ -36,7 +36,7 @@ import {
36
36
  renderSuccess,
37
37
  renderUnexpectedError,
38
38
  resolveEffectiveConfig
39
- } from "./chunk-PMWEDWJ3.js";
39
+ } from "./chunk-5KANHEBN.js";
40
40
  import "./chunk-KTY7R27U.js";
41
41
  import {
42
42
  GLOBAL_FLAGS,
@@ -45,7 +45,7 @@ import {
45
45
  WRITE_SINGLE_FLAGS,
46
46
  isStdinToken
47
47
  } from "./chunk-AHYUM2XQ.js";
48
- import "./chunk-RPRIMRIU.js";
48
+ import "./chunk-2OG6M6ME.js";
49
49
 
50
50
  // src/commands/recruiter.ts
51
51
  import { defineCommand } from "citty";
@@ -77,7 +77,7 @@ function normalizeAttachPaths(attach) {
77
77
  async function handleSdkError(err, outOpts, out) {
78
78
  const { CurviateError } = await import("@curviate/sdk");
79
79
  if (err instanceof CurviateError) {
80
- const { getExitCode } = await import("./exit-codes-4RCNQJUB.js");
80
+ const { getExitCode } = await import("./exit-codes-U5CHA6FT.js");
81
81
  renderError(err, outOpts, out);
82
82
  process.exit(getExitCode(err.code));
83
83
  }