@curviate/cli 0.15.2 → 0.17.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.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,75 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
6
6
  Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html):
7
7
  a new command or flag is a minor; a breaking command/flag/exit-code change is a major; a fix is a patch.
8
8
 
9
+ ## [Unreleased]
10
+
11
+ ## [0.17.0] - 2026-07-17
12
+
13
+ A minor release adding the `company follow-invite` and `company invitable-followers`
14
+ commands. No breaking changes, built against `@curviate/sdk` 0.17.0.
15
+
16
+ ### Added
17
+
18
+ - **`company follow-invite <id> --invitee <AC…> [--invitee <AC…> ...]`** (write, admin-gated,
19
+ `--preview` accepted). Invites the connected account's 1st-degree connections to follow an
20
+ administered company page. `--invitee` is repeatable, at least one required, max 50 per
21
+ request. All-or-nothing: for an all-valid request you get one outcome per requested invitee,
22
+ in request order (`status: "invited" | "already_invited" | "ineligible" | "not_found"`); if
23
+ any invitee id is invalid the whole request rejects with a 404, not a partial result.
24
+ Re-inviting an already-invited member is a safe no-op, the same `invitation_id`, never a
25
+ duplicate. `<id>`
26
+ accepts a URL, slug, or numeric id, resolved to the numeric provider_id first (including
27
+ under `--preview`, so the preview renders the actual request that would be sent).
28
+ - **`company invitable-followers <id> [--limit] [--cursor] [--all]`** (paginated read). Lists
29
+ the connections eligible to be invited to follow a company page you administer, the read
30
+ that seeds `company follow-invite`. Items carry no name or headline; hydrate a candidate via
31
+ `profile <id>` first. `invite_token` is always re-encoded as base64 in CLI output (the raw
32
+ value can carry bytes unsafe to print in a terminal), in every output mode.
33
+
34
+ ## [0.16.0] - 2026-07-17
35
+
36
+ A minor release adding the `inboxes` command group. No breaking changes,
37
+ built against `@curviate/sdk` 0.16.0.
38
+
39
+ ### Added
40
+
41
+ - **New `inboxes` command group (Beta), the reply-as-a-page workflow.**
42
+ `inboxes list [--kind personal|company] [--company-id <id>]` discovers the
43
+ account's personal inbox plus, when the company product is attached, one
44
+ entry per company page (id like `COMPANY_83734124_PRIMARY`), a flat,
45
+ non-paginated read (rejects `--all`). `inboxes chats <inbox_id> [--limit]
46
+ [--cursor] [--all]` lists a single inbox's conversations, cursor-paginated
47
+ like every other list command. Every returned chat id is send-ready: reply
48
+ with the existing `message send <chat_id> "<text>"`. A company inbox's
49
+ chat id (e.g. `COMPANY_83734124_2-…`) sends AS THE PAGE, no separate flag
50
+ needed. Company inboxes are reply-only and cannot start a new conversation.
51
+ Distinct from the existing `inbox` command group (a friendlier front door
52
+ to the account's own message-thread inbox: `messaging.listChats`/`getChat`/
53
+ `markChatRead`/`messages`). `inboxes` (plural) wraps the newer
54
+ inbox-*discovery* resource, so both groups coexist without a naming
55
+ collision.
56
+ - **`PREMIUM_CONFLICT` and `REAUTH_REQUIRED` mapped to exit code 8**
57
+ (account/connection state) in the error to exit table, the two new SDK
58
+ error codes surfacing from `account link`'s underlying `auth.intent` call:
59
+ a seat resolving to both individual-Premium tiers at once, and a
60
+ scope-changing reconnect attempted with a cookie instead of credentials.
61
+ - **`message send` names the acting identity on a company-page reply.**
62
+ When the response's `sent_as.kind` is `"company"`, the default output
63
+ (not just `--verbose --json`) now prints `Sent as <name> (company page)`
64
+ to stderr right after the send (the data itself was already on the
65
+ response; this makes it visible without inspecting raw JSON). A personal
66
+ send prints nothing new.
67
+ - **`message send --preview` echoes the acting identity for a `COMPANY_`
68
+ chat id.** Prints `Will send as a company page` to stderr, derived purely
69
+ from the chat id's own prefix so `--preview` still makes zero network
70
+ calls. A personal chat id prints nothing new.
71
+ - **`--limit` on `inbox list`, `inbox messages`, and `inboxes chats` is now
72
+ validated client-side against the server's accepted range (1-25).** A
73
+ value outside that range now exits 2 with `error: --limit must be
74
+ between 1 and 25 (default 20); got <value>.` before any network call,
75
+ instead of round-tripping to the server for the same 400. `--help` on
76
+ all three now states the range explicitly.
77
+
9
78
  ## [0.15.2] - 2026-07-12
10
79
 
11
80
  A patch release fixing an interactive-terminal hang on `account link`.
@@ -7,19 +7,19 @@ import {
7
7
  } from "./chunk-H4KV7MIN.js";
8
8
  import {
9
9
  AUTH_NEEDED
10
- } from "./chunk-ZE7QGR3F.js";
11
- import {
12
- buildPreviewOutput
13
- } from "./chunk-R3VLWLVV.js";
10
+ } from "./chunk-M6UDWFHX.js";
14
11
  import {
15
12
  slimAccountGet,
16
13
  slimAccountList,
17
14
  slimAccountListItem
18
- } from "./chunk-45KHSWCV.js";
15
+ } from "./chunk-ROULHEFW.js";
19
16
  import {
20
17
  pageDelayFromFlags,
21
18
  streamAll
22
19
  } from "./chunk-EEMJDJ4W.js";
20
+ import {
21
+ buildPreviewOutput
22
+ } from "./chunk-R3VLWLVV.js";
23
23
  import {
24
24
  createClient,
25
25
  renderError,
@@ -221,7 +221,7 @@ function resolveOutputOpts(flags) {
221
221
  async function handleError(err, outOpts, out) {
222
222
  const { CurviateError } = await import("@curviate/sdk");
223
223
  if (err instanceof CurviateError) {
224
- const { getExitCode } = await import("./exit-codes-SL3GQF7W.js");
224
+ const { getExitCode } = await import("./exit-codes-63JE5GM5.js");
225
225
  renderError(err, outOpts, out);
226
226
  process.exit(getExitCode(err.code));
227
227
  }
@@ -34,6 +34,8 @@ var EXIT_CODE_MAP = {
34
34
  ACCOUNT_ALREADY_LINKED: 8,
35
35
  LINKEDIN_OPERATION_NOT_SUPPORTED: 8,
36
36
  CONNECTION_REQUEST_CONFLICT: 8,
37
+ PREMIUM_CONFLICT: 8,
38
+ REAUTH_REQUIRED: 8,
37
39
  // Checkpoint flow (9)
38
40
  CHECKPOINT_NOT_FOUND: 9,
39
41
  CHECKPOINT_EXPIRED: 9,
@@ -255,6 +255,32 @@ function slimCompany(data) {
255
255
  follower_count: d["follower_count"] ?? null
256
256
  };
257
257
  }
258
+ function encodeInviteToken(token) {
259
+ if (typeof token !== "string" || token.length === 0) return token;
260
+ return Buffer.from(token, "utf8").toString("base64");
261
+ }
262
+ function reencodeInviteTokenItem(item) {
263
+ if (!("invite_token" in item)) return item;
264
+ return { ...item, invite_token: encodeInviteToken(item["invite_token"]) };
265
+ }
266
+ function reencodeInvitableFollowers(data) {
267
+ const d = data !== null && data !== void 0 && typeof data === "object" ? data : {};
268
+ const items = Array.isArray(d["items"]) ? d["items"].map(reencodeInviteTokenItem) : [];
269
+ return { ...d, items };
270
+ }
271
+ function slimCompanyInvitableFollowerItem(item) {
272
+ return {
273
+ object: item["object"] ?? null,
274
+ id: item["id"] ?? null,
275
+ profile_urn: item["profile_urn"] ?? null,
276
+ invite_token: item["invite_token"] ?? null
277
+ };
278
+ }
279
+ function slimCompanyInvitableFollowers(data) {
280
+ const d = data !== null && data !== void 0 && typeof data === "object" ? data : {};
281
+ const items = Array.isArray(d["items"]) ? d["items"].map(slimCompanyInvitableFollowerItem) : [];
282
+ return { ...d, items };
283
+ }
258
284
 
259
285
  export {
260
286
  slimProfileMe,
@@ -275,5 +301,8 @@ export {
275
301
  slimAccountList,
276
302
  slimAccountGet,
277
303
  slimJob,
278
- slimCompany
304
+ slimCompany,
305
+ reencodeInviteTokenItem,
306
+ reencodeInvitableFollowers,
307
+ slimCompanyInvitableFollowers
279
308
  };
package/dist/cli.js CHANGED
@@ -255,19 +255,20 @@ var main = defineCommand({
255
255
  // ---------------------------------------------------------------------------
256
256
  // Noun groups — lazy-loaded on first invocation.
257
257
  // ---------------------------------------------------------------------------
258
- profile: () => import("./profile-57RJEL7H.js").then((m) => m.profileCommand),
259
- company: () => import("./company-IYTMW64G.js").then((m) => m.companyCommand),
260
- job: () => import("./job-YARGTHUY.js").then((m) => m.jobCommand),
261
- connect: () => import("./connect-TTJHMBUP.js").then((m) => m.connectCommand),
262
- search: () => import("./search-RD4TXNV7.js").then((m) => m.searchCommand),
263
- inbox: () => import("./inbox-EOOGJ3ZN.js").then((m) => m.inboxCommand),
264
- message: () => import("./message-2DLIQIE6.js").then((m) => m.messageCommand),
265
- post: () => import("./post-GRIJ7X52.js").then((m) => m.postCommand),
266
- comment: () => import("./comment-NCDXERSI.js").then((m) => m.commentCommand),
267
- account: () => import("./account-PD3QLOTG.js").then((m) => m.accountCommand),
268
- webhook: () => import("./webhook-CEP7SGP5.js").then((m) => m.webhookCommand),
269
- "sales-nav": () => import("./sales-nav-NUMEYOEO.js").then((m) => m.salesNavCommand),
270
- recruiter: () => import("./recruiter-CTYH7AYG.js").then((m) => m.recruiterCommand)
258
+ profile: () => import("./profile-MLSIFVDJ.js").then((m) => m.profileCommand),
259
+ company: () => import("./company-CU3BEHRW.js").then((m) => m.companyCommand),
260
+ job: () => import("./job-6GEPEDLS.js").then((m) => m.jobCommand),
261
+ connect: () => import("./connect-DO3J5OUV.js").then((m) => m.connectCommand),
262
+ search: () => import("./search-ZQUKLQ6T.js").then((m) => m.searchCommand),
263
+ inbox: () => import("./inbox-RZOMPFDA.js").then((m) => m.inboxCommand),
264
+ inboxes: () => import("./inboxes-MTPWLP5F.js").then((m) => m.inboxesCommand),
265
+ message: () => import("./message-KOSPK33G.js").then((m) => m.messageCommand),
266
+ post: () => import("./post-TSOE327K.js").then((m) => m.postCommand),
267
+ comment: () => import("./comment-56VBPLGW.js").then((m) => m.commentCommand),
268
+ account: () => import("./account-VDKORNPQ.js").then((m) => m.accountCommand),
269
+ webhook: () => import("./webhook-QFSZN3P2.js").then((m) => m.webhookCommand),
270
+ "sales-nav": () => import("./sales-nav-GD5WQCJI.js").then((m) => m.salesNavCommand),
271
+ recruiter: () => import("./recruiter-OWEQIFYG.js").then((m) => m.recruiterCommand)
271
272
  },
272
273
  async run() {
273
274
  const { runMain } = await import("citty");
@@ -11,14 +11,14 @@ import {
11
11
  readAttachment,
12
12
  toAttachmentPayload
13
13
  } from "./chunk-BGZW6B7G.js";
14
- import {
15
- buildPreviewOutput
16
- } from "./chunk-R3VLWLVV.js";
17
14
  import "./chunk-DMQZEPQE.js";
18
15
  import {
19
16
  pageDelayFromFlags,
20
17
  streamAll
21
18
  } from "./chunk-EEMJDJ4W.js";
19
+ import {
20
+ buildPreviewOutput
21
+ } from "./chunk-R3VLWLVV.js";
22
22
  import {
23
23
  createClient,
24
24
  renderError,
@@ -70,7 +70,7 @@ function buildListQuery(flags) {
70
70
  async function handleSdkError(err, outOpts, out) {
71
71
  const { CurviateError } = await import("@curviate/sdk");
72
72
  if (err instanceof CurviateError) {
73
- const { getExitCode } = await import("./exit-codes-SL3GQF7W.js");
73
+ const { getExitCode } = await import("./exit-codes-63JE5GM5.js");
74
74
  renderError(err, outOpts, out);
75
75
  process.exit(getExitCode(err.code));
76
76
  }
@@ -1,17 +1,23 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
+ resolveIdentifier
4
+ } from "./chunk-DMQZEPQE.js";
5
+ import {
6
+ reencodeInvitableFollowers,
7
+ reencodeInviteTokenItem,
3
8
  slimCompany,
9
+ slimCompanyInvitableFollowers,
4
10
  slimSearchJobs,
5
11
  slimSearchPeople,
6
12
  slimSearchPosts
7
- } from "./chunk-45KHSWCV.js";
8
- import {
9
- resolveIdentifier
10
- } from "./chunk-DMQZEPQE.js";
13
+ } from "./chunk-ROULHEFW.js";
11
14
  import {
12
15
  pageDelayFromFlags,
13
16
  streamAll
14
17
  } from "./chunk-EEMJDJ4W.js";
18
+ import {
19
+ buildPreviewOutput
20
+ } from "./chunk-R3VLWLVV.js";
15
21
  import {
16
22
  createClient,
17
23
  renderError,
@@ -20,7 +26,8 @@ import {
20
26
  resolveEffectiveConfig
21
27
  } from "./chunk-M33MI53G.js";
22
28
  import {
23
- GLOBAL_FLAGS
29
+ GLOBAL_FLAGS,
30
+ WRITE_FLAGS
24
31
  } from "./chunk-TMU3CSPR.js";
25
32
 
26
33
  // src/commands/company.ts
@@ -52,6 +59,10 @@ function resolveOutputOpts(flags) {
52
59
  verbose: flags.verbose ?? false
53
60
  };
54
61
  }
62
+ function normalizeInviteeIds(invitee) {
63
+ if (!invitee) return [];
64
+ return Array.isArray(invitee) ? invitee : [invitee];
65
+ }
55
66
  async function resolveCompanyId(ns, raw) {
56
67
  const normalized = resolveIdentifier(raw);
57
68
  if (/^\d+$/.test(normalized)) return normalized;
@@ -61,7 +72,7 @@ async function resolveCompanyId(ns, raw) {
61
72
  async function handleSdkError(err, outOpts, out) {
62
73
  const { CurviateError } = await import("@curviate/sdk");
63
74
  if (err instanceof CurviateError) {
64
- const { getExitCode } = await import("./exit-codes-SL3GQF7W.js");
75
+ const { getExitCode } = await import("./exit-codes-63JE5GM5.js");
65
76
  renderError(err, outOpts, out);
66
77
  process.exit(getExitCode(err.code));
67
78
  }
@@ -176,6 +187,64 @@ async function runCompanyJobs(client, flags, out) {
176
187
  await handleSdkError(err, outOpts, out);
177
188
  }
178
189
  }
190
+ async function runCompanyInvitableFollowers(client, flags, out) {
191
+ rejectPreviewOnRead(flags.preview, out);
192
+ const accountId = requireAccount(flags.account, out);
193
+ const ns = client.account(accountId);
194
+ const outOpts = resolveOutputOpts(flags);
195
+ const params = {};
196
+ if (flags.limit) params["limit"] = parseInt(flags.limit, 10);
197
+ if (flags.cursor) params["cursor"] = flags.cursor;
198
+ try {
199
+ const identifier = await resolveCompanyId(ns, flags.id ?? "");
200
+ if (flags.all) {
201
+ const maxPages = flags["max-pages"] ? parseInt(flags["max-pages"], 10) : 100;
202
+ const fn = (p) => ns.companies.invitableFollowers(identifier, p);
203
+ for await (const item of streamAll(fn, params, {
204
+ maxPages,
205
+ out,
206
+ pageDelayMs: pageDelayFromFlags(flags)
207
+ })) {
208
+ out.stdout.write(JSON.stringify(reencodeInviteTokenItem(item)) + "\n");
209
+ }
210
+ return;
211
+ }
212
+ const result = await ns.companies.invitableFollowers(identifier, params);
213
+ const safeResult = reencodeInvitableFollowers(result);
214
+ renderSuccess(safeResult, { ...outOpts, slim: slimCompanyInvitableFollowers }, out);
215
+ } catch (err) {
216
+ await handleSdkError(err, outOpts, out);
217
+ }
218
+ }
219
+ async function runCompanyFollowInvite(client, flags, out) {
220
+ const accountId = requireAccount(flags.account, out);
221
+ const ns = client.account(accountId);
222
+ const outOpts = resolveOutputOpts(flags);
223
+ const inviteeIds = normalizeInviteeIds(flags.invitee);
224
+ if (inviteeIds.length === 0) {
225
+ out.stderr.write("error: at least one --invitee is required.\n");
226
+ process.exit(2);
227
+ return;
228
+ }
229
+ try {
230
+ const identifier = await resolveCompanyId(ns, flags.id ?? "");
231
+ const body = { invitee_ids: inviteeIds };
232
+ if (flags.preview) {
233
+ const preview = buildPreviewOutput({
234
+ method: "companies.followInvite",
235
+ args: { identifier },
236
+ body,
237
+ account: accountId
238
+ });
239
+ out.stdout.write(JSON.stringify(preview) + "\n");
240
+ return;
241
+ }
242
+ const result = await ns.companies.followInvite(identifier, body);
243
+ renderSuccess(result, outOpts, out);
244
+ } catch (err) {
245
+ await handleSdkError(err, outOpts, out);
246
+ }
247
+ }
179
248
  var companyEmployeesCommand = defineCommand({
180
249
  meta: { name: "employees", description: "List people who currently work at the company." },
181
250
  args: {
@@ -251,6 +320,64 @@ var companyJobsCommand = defineCommand({
251
320
  await runCompanyJobs(client, { ...flags, account: flags.account ?? cfg.account }, out);
252
321
  }
253
322
  });
323
+ var companyInvitableFollowersCommand = defineCommand({
324
+ meta: {
325
+ name: "invitable-followers",
326
+ description: "List the account's 1st-degree connections who are eligible to be invited to follow the company page. This is the read that seeds `company follow-invite`. Items carry no name or headline (a wire limitation), so hydrate a candidate via `profile <id>` before deciding who to invite. `invite_token` is always returned as base64 (the raw value can carry binary bytes unsafe to print)."
327
+ },
328
+ args: {
329
+ ...GLOBAL_FLAGS,
330
+ id: { type: "positional", description: "Company identifier (URL, slug, or numeric id), resolved to the numeric id first." }
331
+ },
332
+ async run({ args }) {
333
+ const flags = args;
334
+ const cfg = await resolveEffectiveConfig({
335
+ apiKey: flags["api-key"],
336
+ baseUrl: flags["base-url"],
337
+ timeout: flags.timeout,
338
+ account: flags.account,
339
+ profile: flags.profile
340
+ });
341
+ if (!cfg.apiKey) {
342
+ process.stderr.write("error: no API key \u2014 run `curviate login` or pass --api-key.\n");
343
+ process.exit(3);
344
+ }
345
+ const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
346
+ const out = buildOutputStreams();
347
+ await runCompanyInvitableFollowers(client, { ...flags, account: flags.account ?? cfg.account }, out);
348
+ }
349
+ });
350
+ var companyFollowInviteCommand = defineCommand({
351
+ meta: {
352
+ name: "follow-invite",
353
+ description: "Invite the account's 1st-degree connections to follow the administered company page. Write, admin-gated (the account must administer the page with invite rights). Pass the AC\u2026 member ids from `company invitable-followers`, one --invitee per invitee. All-or-nothing: for an all-valid request you get one outcome per invitee, in request order (invited/already_invited/ineligible/not_found); if any invitee id is invalid the whole request rejects with a 404, not a partial result. Re-inviting an already-invited member is a safe no-op (the same invitation id, never a duplicate)."
354
+ },
355
+ args: {
356
+ ...WRITE_FLAGS,
357
+ id: { type: "positional", description: "Company identifier (URL, slug, or numeric id), resolved to the numeric id first, including under --preview." },
358
+ invitee: {
359
+ type: "string",
360
+ description: "AC\u2026 member id to invite (from `company invitable-followers`). Repeatable, at least one required, max 50 per request."
361
+ }
362
+ },
363
+ async run({ args }) {
364
+ const flags = args;
365
+ const cfg = await resolveEffectiveConfig({
366
+ apiKey: flags["api-key"],
367
+ baseUrl: flags["base-url"],
368
+ timeout: flags.timeout,
369
+ account: flags.account,
370
+ profile: flags.profile
371
+ });
372
+ if (!cfg.apiKey) {
373
+ process.stderr.write("error: no API key \u2014 run `curviate login` or pass --api-key.\n");
374
+ process.exit(3);
375
+ }
376
+ const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
377
+ const out = buildOutputStreams();
378
+ await runCompanyFollowInvite(client, { ...flags, account: flags.account ?? cfg.account }, out);
379
+ }
380
+ });
254
381
  var companyCommand = defineCommand({
255
382
  meta: { name: "company", description: "Fetch a company profile by URL, slug, or numeric id, and its sub-resources." },
256
383
  args: {
@@ -261,7 +388,9 @@ var companyCommand = defineCommand({
261
388
  subCommands: {
262
389
  employees: companyEmployeesCommand,
263
390
  posts: companyPostsCommand,
264
- jobs: companyJobsCommand
391
+ jobs: companyJobsCommand,
392
+ "invitable-followers": companyInvitableFollowersCommand,
393
+ "follow-invite": companyFollowInviteCommand
265
394
  },
266
395
  async run({ args }) {
267
396
  const flags = args;
@@ -284,7 +413,9 @@ var companyCommand = defineCommand({
284
413
  export {
285
414
  companyCommand,
286
415
  runCompanyEmployees,
416
+ runCompanyFollowInvite,
287
417
  runCompanyGet,
418
+ runCompanyInvitableFollowers,
288
419
  runCompanyJobs,
289
420
  runCompanyPosts
290
421
  };
@@ -1,20 +1,20 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
- buildPreviewOutput
4
- } from "./chunk-R3VLWLVV.js";
3
+ resolveIdentifier
4
+ } from "./chunk-DMQZEPQE.js";
5
5
  import {
6
6
  slimInviteReceived,
7
7
  slimInviteReceivedItem,
8
8
  slimInviteSent,
9
9
  slimInviteSentItem
10
- } from "./chunk-45KHSWCV.js";
11
- import {
12
- resolveIdentifier
13
- } from "./chunk-DMQZEPQE.js";
10
+ } from "./chunk-ROULHEFW.js";
14
11
  import {
15
12
  pageDelayFromFlags,
16
13
  streamAll
17
14
  } from "./chunk-EEMJDJ4W.js";
15
+ import {
16
+ buildPreviewOutput
17
+ } from "./chunk-R3VLWLVV.js";
18
18
  import {
19
19
  createClient,
20
20
  renderError,
@@ -82,7 +82,7 @@ async function runConnectSend(client, flags, out) {
82
82
  } catch (err) {
83
83
  const { CurviateError } = await import("@curviate/sdk");
84
84
  if (err instanceof CurviateError) {
85
- const { getExitCode } = await import("./exit-codes-SL3GQF7W.js");
85
+ const { getExitCode } = await import("./exit-codes-63JE5GM5.js");
86
86
  renderError(err, outOpts, out);
87
87
  process.exit(getExitCode(err.code));
88
88
  }
@@ -120,7 +120,7 @@ async function runConnectSent(client, flags, out) {
120
120
  } catch (err) {
121
121
  const { CurviateError } = await import("@curviate/sdk");
122
122
  if (err instanceof CurviateError) {
123
- const { getExitCode } = await import("./exit-codes-SL3GQF7W.js");
123
+ const { getExitCode } = await import("./exit-codes-63JE5GM5.js");
124
124
  renderError(err, outOpts, out);
125
125
  process.exit(getExitCode(err.code));
126
126
  }
@@ -158,7 +158,7 @@ async function runConnectReceived(client, flags, out) {
158
158
  } catch (err) {
159
159
  const { CurviateError } = await import("@curviate/sdk");
160
160
  if (err instanceof CurviateError) {
161
- const { getExitCode } = await import("./exit-codes-SL3GQF7W.js");
161
+ const { getExitCode } = await import("./exit-codes-63JE5GM5.js");
162
162
  renderError(err, outOpts, out);
163
163
  process.exit(getExitCode(err.code));
164
164
  }
@@ -187,7 +187,7 @@ async function runConnectAccept(client, flags, out) {
187
187
  } catch (err) {
188
188
  const { CurviateError } = await import("@curviate/sdk");
189
189
  if (err instanceof CurviateError) {
190
- const { getExitCode } = await import("./exit-codes-SL3GQF7W.js");
190
+ const { getExitCode } = await import("./exit-codes-63JE5GM5.js");
191
191
  renderError(err, outOpts, out);
192
192
  process.exit(getExitCode(err.code));
193
193
  }
@@ -216,7 +216,7 @@ async function runConnectDecline(client, flags, out) {
216
216
  } catch (err) {
217
217
  const { CurviateError } = await import("@curviate/sdk");
218
218
  if (err instanceof CurviateError) {
219
- const { getExitCode } = await import("./exit-codes-SL3GQF7W.js");
219
+ const { getExitCode } = await import("./exit-codes-63JE5GM5.js");
220
220
  renderError(err, outOpts, out);
221
221
  process.exit(getExitCode(err.code));
222
222
  }
@@ -245,7 +245,7 @@ async function runConnectCancel(client, flags, out) {
245
245
  } catch (err) {
246
246
  const { CurviateError } = await import("@curviate/sdk");
247
247
  if (err instanceof CurviateError) {
248
- const { getExitCode } = await import("./exit-codes-SL3GQF7W.js");
248
+ const { getExitCode } = await import("./exit-codes-63JE5GM5.js");
249
249
  renderError(err, outOpts, out);
250
250
  process.exit(getExitCode(err.code));
251
251
  }
@@ -3,7 +3,7 @@ import {
3
3
  AUTH_NEEDED,
4
4
  EXIT_CODE_MAP,
5
5
  getExitCode
6
- } from "./chunk-ZE7QGR3F.js";
6
+ } from "./chunk-M6UDWFHX.js";
7
7
  export {
8
8
  AUTH_NEEDED,
9
9
  EXIT_CODE_MAP,
@@ -1,7 +1,4 @@
1
1
  #!/usr/bin/env node
2
- import {
3
- buildPreviewOutput
4
- } from "./chunk-R3VLWLVV.js";
5
2
  import {
6
3
  normalizeChatId
7
4
  } from "./chunk-DMQZEPQE.js";
@@ -9,6 +6,9 @@ import {
9
6
  pageDelayFromFlags,
10
7
  streamAll
11
8
  } from "./chunk-EEMJDJ4W.js";
9
+ import {
10
+ buildPreviewOutput
11
+ } from "./chunk-R3VLWLVV.js";
12
12
  import {
13
13
  createClient,
14
14
  renderError,
@@ -71,10 +71,20 @@ function validateIsoZTimestamp(value, flagName, out) {
71
71
  process.exit(2);
72
72
  }
73
73
  }
74
+ function validateLimitRange(raw, out) {
75
+ if (raw === void 0) return;
76
+ const n = Number(raw);
77
+ if (!Number.isFinite(n)) return;
78
+ if (n < 1 || n > 25) {
79
+ out.stderr.write(`error: --limit must be between 1 and 25 (default 20); got ${raw}.
80
+ `);
81
+ process.exit(2);
82
+ }
83
+ }
74
84
  async function handleSdkError(err, outOpts, out) {
75
85
  const { CurviateError } = await import("@curviate/sdk");
76
86
  if (err instanceof CurviateError) {
77
- const { getExitCode } = await import("./exit-codes-SL3GQF7W.js");
87
+ const { getExitCode } = await import("./exit-codes-63JE5GM5.js");
78
88
  renderError(err, outOpts, out);
79
89
  process.exit(getExitCode(err.code));
80
90
  }
@@ -89,6 +99,7 @@ async function runInboxList(client, flags, out) {
89
99
  const all = flags.all ?? false;
90
100
  const maxPages = flags["max-pages"] ? parseInt(flags["max-pages"], 10) : 100;
91
101
  const params = buildPaginationParams(flags);
102
+ validateLimitRange(flags.limit, out);
92
103
  if (flags.unread !== void 0) {
93
104
  params.unread = flags.unread;
94
105
  }
@@ -151,6 +162,7 @@ async function runInboxMessages(client, flags, out) {
151
162
  const all = flags.all ?? false;
152
163
  const maxPages = flags["max-pages"] ? parseInt(flags["max-pages"], 10) : 100;
153
164
  const params = buildPaginationParams(flags);
165
+ validateLimitRange(flags.limit, out);
154
166
  if (flags.before !== void 0) {
155
167
  validateIsoZTimestamp(flags.before, "before", out);
156
168
  params.before = flags.before;
@@ -181,6 +193,7 @@ var inboxListCommand = defineCommand({
181
193
  meta: { name: "list", description: "List inbox chats." },
182
194
  args: {
183
195
  ...GLOBAL_FLAGS,
196
+ limit: { type: "string", description: "Number of items to return per page (1-25, default 20)." },
184
197
  unread: {
185
198
  type: "boolean",
186
199
  description: "Show unread chats only (--no-unread for read-only; omit for all)."
@@ -259,6 +272,7 @@ var inboxMessagesCommand = defineCommand({
259
272
  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." },
260
273
  args: {
261
274
  ...GLOBAL_FLAGS,
275
+ limit: { type: "string", description: "Number of items to return per page (1-25, default 20)." },
262
276
  chatId: { type: "positional", description: "Chat ID." },
263
277
  before: {
264
278
  type: "string",
@@ -0,0 +1,199 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ pageDelayFromFlags,
4
+ streamAll
5
+ } from "./chunk-EEMJDJ4W.js";
6
+ import {
7
+ createClient,
8
+ renderError,
9
+ renderSuccess,
10
+ renderUnexpectedError,
11
+ resolveEffectiveConfig
12
+ } from "./chunk-M33MI53G.js";
13
+ import {
14
+ GLOBAL_FLAGS,
15
+ READ_SINGLE_FLAGS
16
+ } from "./chunk-TMU3CSPR.js";
17
+
18
+ // src/commands/inboxes.ts
19
+ import { defineCommand } from "citty";
20
+ function buildOutputStreams() {
21
+ return {
22
+ stdout: { write: (s) => process.stdout.write(s) },
23
+ stderr: { write: (s) => process.stderr.write(s) }
24
+ };
25
+ }
26
+ function requireAccount(account, out) {
27
+ if (!account) {
28
+ out.stderr.write("error: --account is required for this command. Set it via --account, CURVIATE_ACCOUNT, or `curviate config set-account`.\n");
29
+ process.exit(2);
30
+ }
31
+ return account;
32
+ }
33
+ function rejectPreviewOnRead(preview, out) {
34
+ if (preview) {
35
+ out.stderr.write("error: --preview is only valid on write commands (mutations). Reads just run.\n");
36
+ process.exit(2);
37
+ }
38
+ }
39
+ function rejectAllOnNonPaginated(all, out) {
40
+ if (all) {
41
+ out.stderr.write("error: --all is not supported on non-paginated commands.\n");
42
+ process.exit(2);
43
+ }
44
+ }
45
+ function resolveOutputOpts(flags) {
46
+ return {
47
+ json: (flags.json ?? false) || !process.stdout.isTTY,
48
+ isTTY: process.stdout.isTTY ?? false,
49
+ fields: flags.fields,
50
+ verbose: flags.verbose ?? false
51
+ };
52
+ }
53
+ async function handleSdkError(err, outOpts, out) {
54
+ const { CurviateError } = await import("@curviate/sdk");
55
+ if (err instanceof CurviateError) {
56
+ const { getExitCode } = await import("./exit-codes-63JE5GM5.js");
57
+ renderError(err, outOpts, out);
58
+ process.exit(getExitCode(err.code));
59
+ }
60
+ renderUnexpectedError(err, out);
61
+ process.exit(1);
62
+ }
63
+ function validateLimitRange(raw, out) {
64
+ if (raw === void 0) return;
65
+ const n = Number(raw);
66
+ if (!Number.isFinite(n)) return;
67
+ if (n < 1 || n > 25) {
68
+ out.stderr.write(`error: --limit must be between 1 and 25 (default 20); got ${raw}.
69
+ `);
70
+ process.exit(2);
71
+ }
72
+ }
73
+ async function runInboxesList(client, flags, out) {
74
+ rejectPreviewOnRead(flags.preview, out);
75
+ rejectAllOnNonPaginated(flags.all, out);
76
+ const accountId = requireAccount(flags.account, out);
77
+ const ns = client.account(accountId);
78
+ const outOpts = resolveOutputOpts(flags);
79
+ const params = {};
80
+ if (flags.kind) params["kind"] = flags.kind;
81
+ if (flags["company-id"]) params["company_id"] = flags["company-id"];
82
+ try {
83
+ const result = await ns.inboxes.list(params);
84
+ renderSuccess(result, outOpts, out);
85
+ } catch (err) {
86
+ await handleSdkError(err, outOpts, out);
87
+ }
88
+ }
89
+ async function runInboxesChats(client, flags, out) {
90
+ rejectPreviewOnRead(flags.preview, out);
91
+ const accountId = requireAccount(flags.account, out);
92
+ const inboxId = flags.inboxId ?? "";
93
+ const ns = client.account(accountId);
94
+ const outOpts = resolveOutputOpts(flags);
95
+ const all = flags.all ?? false;
96
+ const maxPages = flags["max-pages"] ? parseInt(flags["max-pages"], 10) : 100;
97
+ validateLimitRange(flags.limit, out);
98
+ const params = {};
99
+ if (flags.limit) params["limit"] = parseInt(flags.limit, 10);
100
+ if (flags.cursor) params["cursor"] = flags.cursor;
101
+ try {
102
+ if (all) {
103
+ const fn = (p) => ns.inboxes.listChats(inboxId, p);
104
+ for await (const item of streamAll(fn, params, {
105
+ maxPages,
106
+ out,
107
+ pageDelayMs: pageDelayFromFlags(flags)
108
+ })) {
109
+ out.stdout.write(JSON.stringify(item) + "\n");
110
+ }
111
+ } else {
112
+ const result = await ns.inboxes.listChats(inboxId, params);
113
+ renderSuccess(result, outOpts, out);
114
+ }
115
+ } catch (err) {
116
+ await handleSdkError(err, outOpts, out);
117
+ }
118
+ }
119
+ var inboxesListCommand = defineCommand({
120
+ meta: { name: "list", description: "Discover the account's inboxes (personal + company pages)." },
121
+ args: {
122
+ // Single-object-shaped read: READ_SINGLE_FLAGS omits pagination flags
123
+ // (this response carries no cursor — every inbox comes back in one call).
124
+ ...READ_SINGLE_FLAGS,
125
+ kind: {
126
+ type: "string",
127
+ description: "Filter to only personal or only company inboxes: personal | company. Omit to list both."
128
+ },
129
+ "company-id": {
130
+ type: "string",
131
+ description: "Filter to the one company inbox correlated to this managed-company id (e.g. 112013061)."
132
+ }
133
+ },
134
+ async run({ args }) {
135
+ const flags = args;
136
+ const cfg = await resolveEffectiveConfig({
137
+ apiKey: flags["api-key"],
138
+ baseUrl: flags["base-url"],
139
+ timeout: flags.timeout,
140
+ account: flags.account,
141
+ profile: flags.profile
142
+ });
143
+ if (!cfg.apiKey) {
144
+ process.stderr.write("error: no API key \u2014 run `curviate login` or pass --api-key.\n");
145
+ process.exit(3);
146
+ }
147
+ const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
148
+ const out = buildOutputStreams();
149
+ await runInboxesList(client, { ...flags, account: flags.account ?? cfg.account }, out);
150
+ }
151
+ });
152
+ var inboxesChatsCommand = defineCommand({
153
+ meta: {
154
+ name: "chats",
155
+ description: "List an inbox's conversations. Each chat id is send-ready: reply with `message send <chat_id> \"<text>\"`. A company inbox's chat id (e.g. COMPANY_83734124_2-\u2026) sends AS THE PAGE, no separate flag needed. Company inboxes are reply-only and cannot start a new conversation."
156
+ },
157
+ args: {
158
+ ...GLOBAL_FLAGS,
159
+ limit: { type: "string", description: "Number of items to return per page (1-25, default 20)." },
160
+ inboxId: { type: "positional", description: "Inbox id from `inboxes list` (e.g. CLASSIC_PRIMARY or COMPANY_83734124_PRIMARY)." }
161
+ },
162
+ async run({ args }) {
163
+ const flags = args;
164
+ const cfg = await resolveEffectiveConfig({
165
+ apiKey: flags["api-key"],
166
+ baseUrl: flags["base-url"],
167
+ timeout: flags.timeout,
168
+ account: flags.account,
169
+ profile: flags.profile
170
+ });
171
+ if (!cfg.apiKey) {
172
+ process.stderr.write("error: no API key \u2014 run `curviate login` or pass --api-key.\n");
173
+ process.exit(3);
174
+ }
175
+ const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
176
+ const out = buildOutputStreams();
177
+ await runInboxesChats(client, { ...flags, account: flags.account ?? cfg.account }, out);
178
+ }
179
+ });
180
+ var inboxesCommand = defineCommand({
181
+ meta: {
182
+ name: "inboxes",
183
+ description: "Discover LinkedIn inboxes (personal + company pages) and list their conversations. Beta. See also: `inbox` (the account's own message-thread inbox), `message send` (reply to a chat)."
184
+ },
185
+ subCommands: {
186
+ list: inboxesListCommand,
187
+ chats: inboxesChatsCommand
188
+ },
189
+ async run() {
190
+ process.stderr.write(
191
+ "Usage: curviate inboxes <subcommand>\n list [--kind personal|company] [--company-id <id>]\n chats <inbox_id> [--limit] [--cursor] [--all]\n"
192
+ );
193
+ }
194
+ });
195
+ export {
196
+ inboxesCommand,
197
+ runInboxesChats,
198
+ runInboxesList
199
+ };
@@ -3,21 +3,21 @@ import {
3
3
  BinaryOutputError,
4
4
  writeBinaryOutput
5
5
  } from "./chunk-UWO2D4HW.js";
6
- import {
7
- buildPreviewOutput
8
- } from "./chunk-R3VLWLVV.js";
9
- import {
10
- slimJob
11
- } from "./chunk-45KHSWCV.js";
12
6
  import {
13
7
  resolveJobIdentifier
14
8
  } from "./chunk-DMQZEPQE.js";
9
+ import {
10
+ slimJob
11
+ } from "./chunk-ROULHEFW.js";
15
12
  import {
16
13
  DEFAULT_PAGE_DELAY_MS,
17
14
  ndjsonModeNotice,
18
15
  pageDelayFromFlags,
19
16
  streamAll
20
17
  } from "./chunk-EEMJDJ4W.js";
18
+ import {
19
+ buildPreviewOutput
20
+ } from "./chunk-R3VLWLVV.js";
21
21
  import {
22
22
  createClient,
23
23
  renderError,
@@ -98,7 +98,7 @@ function requireEnum(value, allowed, flag, out) {
98
98
  async function handleSdkError(err, outOpts, out) {
99
99
  const { CurviateError } = await import("@curviate/sdk");
100
100
  if (err instanceof CurviateError) {
101
- const { getExitCode } = await import("./exit-codes-SL3GQF7W.js");
101
+ const { getExitCode } = await import("./exit-codes-63JE5GM5.js");
102
102
  renderError(err, outOpts, out);
103
103
  process.exit(getExitCode(err.code));
104
104
  }
@@ -11,13 +11,13 @@ import {
11
11
  BinaryOutputError,
12
12
  writeBinaryOutput
13
13
  } from "./chunk-UWO2D4HW.js";
14
- import {
15
- buildPreviewOutput
16
- } from "./chunk-R3VLWLVV.js";
17
14
  import {
18
15
  normalizeChatId,
19
16
  resolveIdentifier
20
17
  } from "./chunk-DMQZEPQE.js";
18
+ import {
19
+ buildPreviewOutput
20
+ } from "./chunk-R3VLWLVV.js";
21
21
  import {
22
22
  createClient,
23
23
  renderError,
@@ -73,13 +73,23 @@ var MEMBER_PROVIDER_ID_RE = /^A[CDE][A-Za-z0-9_-]{4,}$/;
73
73
  async function handleSdkError(err, outOpts, out) {
74
74
  const { CurviateError } = await import("@curviate/sdk");
75
75
  if (err instanceof CurviateError) {
76
- const { getExitCode } = await import("./exit-codes-SL3GQF7W.js");
76
+ const { getExitCode } = await import("./exit-codes-63JE5GM5.js");
77
77
  renderError(err, outOpts, out);
78
78
  process.exit(getExitCode(err.code));
79
79
  }
80
80
  renderUnexpectedError(err, out);
81
81
  process.exit(1);
82
82
  }
83
+ function sentAsNotice(sentAs) {
84
+ if (!sentAs || typeof sentAs !== "object") return null;
85
+ const s = sentAs;
86
+ if (s.kind !== "company") return null;
87
+ return s.name ? `Sent as ${s.name} (company page)
88
+ ` : "Sent as a company page\n";
89
+ }
90
+ function willSendAsNotice(chatId) {
91
+ return chatId.startsWith("COMPANY_") ? "Will send as a company page\n" : null;
92
+ }
83
93
  async function runMessageNew(client, flags, out, _readStdin) {
84
94
  const accountId = requireAccount(flags.account, out);
85
95
  const rawTo = flags.to ?? "";
@@ -168,6 +178,8 @@ async function runMessageSend(client, flags, out, _readStdin) {
168
178
  }))
169
179
  });
170
180
  out.stdout.write(JSON.stringify(preview) + "\n");
181
+ const willSendAs = willSendAsNotice(chatId);
182
+ if (willSendAs) out.stderr.write(willSendAs);
171
183
  return;
172
184
  }
173
185
  const attachmentPayloads = attachBuffers.map((buf, i) => toAttachmentPayload(attachPaths[i], buf));
@@ -180,6 +192,8 @@ async function runMessageSend(client, flags, out, _readStdin) {
180
192
  try {
181
193
  const result = await ns.messaging.sendMessage(chatId, body);
182
194
  renderSuccess(result, outOpts, out);
195
+ const notice = sentAsNotice(result?.["sent_as"]);
196
+ if (notice) out.stderr.write(notice);
183
197
  } catch (err) {
184
198
  await handleSdkError(err, outOpts, out);
185
199
  }
@@ -572,11 +586,17 @@ var messageInMailCommand = defineCommand({
572
586
  }
573
587
  });
574
588
  var messageSendCommand = defineCommand({
575
- meta: { name: "send", description: "Send a message to an existing chat." },
589
+ meta: {
590
+ name: "send",
591
+ description: 'Send a message to an existing chat. Pass a COMPANY_ chat id (from `inboxes chats`) to send as that company page instead of yourself, no separate flag needed. The output shows the acting identity: a company-page send prints "Sent as <name> (company page)", a personal send prints nothing new. See also: `inboxes chats` (discover a COMPANY_ chat id) and the Reply as a company page guide.'
592
+ },
576
593
  args: {
577
594
  // Write command: WRITE_FLAGS omits pagination/projection flags
578
595
  ...WRITE_FLAGS,
579
- chatId: { type: "positional", description: "Chat ID or LinkedIn messaging thread URL." },
596
+ chatId: {
597
+ type: "positional",
598
+ description: "Chat ID or LinkedIn messaging thread URL. A COMPANY_ chat id sends as the company page; any other chat id sends as the connected member."
599
+ },
580
600
  text: { type: "positional", description: "Message text. Pass - to read from stdin (e.g. via heredoc or pipe)." },
581
601
  attach: { type: "string", description: "File to attach (repeatable)." }
582
602
  },
@@ -623,11 +643,18 @@ var messageInMailBalanceCommand = defineCommand({
623
643
  }
624
644
  });
625
645
  var messageCommand = defineCommand({
626
- meta: { name: "message", description: "Send and manage LinkedIn messages." },
646
+ meta: {
647
+ name: "message",
648
+ description: "Send and manage LinkedIn messages. A COMPANY_ chat id (from `inboxes chats`) sends as that company page instead of yourself; see `message send --help`."
649
+ },
627
650
  args: {
628
651
  // Write command (message send): WRITE_FLAGS omits pagination/projection flags
629
652
  ...WRITE_FLAGS,
630
- chatId: { type: "positional", description: "Chat ID to send a message to.", required: false },
653
+ chatId: {
654
+ type: "positional",
655
+ description: "Chat ID to send a message to. A COMPANY_ chat id sends as the company page.",
656
+ required: false
657
+ },
631
658
  text: { type: "positional", description: "Message text. Pass - to read from stdin.", required: false },
632
659
  attach: { type: "string", description: "File to attach (repeatable)." }
633
660
  },
@@ -10,14 +10,14 @@ import {
10
10
  readAttachment,
11
11
  toAttachmentPayload
12
12
  } from "./chunk-BGZW6B7G.js";
13
- import {
14
- buildPreviewOutput
15
- } from "./chunk-R3VLWLVV.js";
16
13
  import "./chunk-DMQZEPQE.js";
17
14
  import {
18
15
  pageDelayFromFlags,
19
16
  streamAll
20
17
  } from "./chunk-EEMJDJ4W.js";
18
+ import {
19
+ buildPreviewOutput
20
+ } from "./chunk-R3VLWLVV.js";
21
21
  import {
22
22
  createClient,
23
23
  renderError,
@@ -79,7 +79,7 @@ function normalizeAttachPaths(attach) {
79
79
  async function handleSdkError(err, outOpts, out) {
80
80
  const { CurviateError } = await import("@curviate/sdk");
81
81
  if (err instanceof CurviateError) {
82
- const { getExitCode } = await import("./exit-codes-SL3GQF7W.js");
82
+ const { getExitCode } = await import("./exit-codes-63JE5GM5.js");
83
83
  renderError(err, outOpts, out);
84
84
  process.exit(getExitCode(err.code));
85
85
  }
@@ -9,19 +9,19 @@ import {
9
9
  toAttachmentPayload
10
10
  } from "./chunk-BGZW6B7G.js";
11
11
  import {
12
- buildPreviewOutput
13
- } from "./chunk-R3VLWLVV.js";
12
+ resolveIdentifier
13
+ } from "./chunk-DMQZEPQE.js";
14
14
  import {
15
15
  slimProfile,
16
16
  slimProfileMe
17
- } from "./chunk-45KHSWCV.js";
18
- import {
19
- resolveIdentifier
20
- } from "./chunk-DMQZEPQE.js";
17
+ } from "./chunk-ROULHEFW.js";
21
18
  import {
22
19
  pageDelayFromFlags,
23
20
  streamAll
24
21
  } from "./chunk-EEMJDJ4W.js";
22
+ import {
23
+ buildPreviewOutput
24
+ } from "./chunk-R3VLWLVV.js";
25
25
  import {
26
26
  createClient,
27
27
  renderError,
@@ -189,7 +189,7 @@ async function runProfileMe(client, flags, out) {
189
189
  } catch (err) {
190
190
  const { CurviateError } = await import("@curviate/sdk");
191
191
  if (err instanceof CurviateError) {
192
- const { getExitCode } = await import("./exit-codes-SL3GQF7W.js");
192
+ const { getExitCode } = await import("./exit-codes-63JE5GM5.js");
193
193
  renderError(err, outOpts, out);
194
194
  process.exit(getExitCode(err.code));
195
195
  }
@@ -215,7 +215,7 @@ async function runProfileMe(client, flags, out) {
215
215
  } catch (err) {
216
216
  const { CurviateError } = await import("@curviate/sdk");
217
217
  if (err instanceof CurviateError) {
218
- const { getExitCode } = await import("./exit-codes-SL3GQF7W.js");
218
+ const { getExitCode } = await import("./exit-codes-63JE5GM5.js");
219
219
  renderError(err, outOpts, out);
220
220
  process.exit(getExitCode(err.code));
221
221
  }
@@ -341,7 +341,7 @@ async function runProfileGet(client, flags, out) {
341
341
  } catch (err) {
342
342
  const { CurviateError } = await import("@curviate/sdk");
343
343
  if (err instanceof CurviateError) {
344
- const { getExitCode } = await import("./exit-codes-SL3GQF7W.js");
344
+ const { getExitCode } = await import("./exit-codes-63JE5GM5.js");
345
345
  renderError(err, outOpts, out);
346
346
  process.exit(getExitCode(err.code));
347
347
  }
@@ -378,7 +378,7 @@ async function runProfileRelations(client, flags, out) {
378
378
  } catch (err) {
379
379
  const { CurviateError } = await import("@curviate/sdk");
380
380
  if (err instanceof CurviateError) {
381
- const { getExitCode } = await import("./exit-codes-SL3GQF7W.js");
381
+ const { getExitCode } = await import("./exit-codes-63JE5GM5.js");
382
382
  renderError(err, outOpts, out);
383
383
  process.exit(getExitCode(err.code));
384
384
  }
@@ -418,7 +418,7 @@ async function runProfileEndorse(client, flags, out) {
418
418
  async function handleSdkError(err, outOpts, out) {
419
419
  const { CurviateError } = await import("@curviate/sdk");
420
420
  if (err instanceof CurviateError) {
421
- const { getExitCode } = await import("./exit-codes-SL3GQF7W.js");
421
+ const { getExitCode } = await import("./exit-codes-63JE5GM5.js");
422
422
  renderError(err, outOpts, out);
423
423
  process.exit(getExitCode(err.code));
424
424
  }
@@ -13,20 +13,20 @@ import {
13
13
  BinaryOutputError,
14
14
  writeBinaryOutput
15
15
  } from "./chunk-UWO2D4HW.js";
16
- import {
17
- buildPreviewOutput
18
- } from "./chunk-R3VLWLVV.js";
19
- import {
20
- slimJob
21
- } from "./chunk-45KHSWCV.js";
22
16
  import {
23
17
  resolveIdentifier,
24
18
  resolveJobIdentifier
25
19
  } from "./chunk-DMQZEPQE.js";
20
+ import {
21
+ slimJob
22
+ } from "./chunk-ROULHEFW.js";
26
23
  import {
27
24
  pageDelayFromFlags,
28
25
  streamAll
29
26
  } from "./chunk-EEMJDJ4W.js";
27
+ import {
28
+ buildPreviewOutput
29
+ } from "./chunk-R3VLWLVV.js";
30
30
  import {
31
31
  createClient,
32
32
  renderError,
@@ -78,7 +78,7 @@ function normalizeAttachPaths(attach) {
78
78
  async function handleSdkError(err, outOpts, out) {
79
79
  const { CurviateError } = await import("@curviate/sdk");
80
80
  if (err instanceof CurviateError) {
81
- const { getExitCode } = await import("./exit-codes-SL3GQF7W.js");
81
+ const { getExitCode } = await import("./exit-codes-63JE5GM5.js");
82
82
  renderError(err, outOpts, out);
83
83
  process.exit(getExitCode(err.code));
84
84
  }
@@ -10,9 +10,6 @@ import {
10
10
  readAttachment,
11
11
  toAttachmentPayload
12
12
  } from "./chunk-BGZW6B7G.js";
13
- import {
14
- buildPreviewOutput
15
- } from "./chunk-R3VLWLVV.js";
16
13
  import {
17
14
  resolveIdentifier
18
15
  } from "./chunk-DMQZEPQE.js";
@@ -20,6 +17,9 @@ import {
20
17
  pageDelayFromFlags,
21
18
  streamAll
22
19
  } from "./chunk-EEMJDJ4W.js";
20
+ import {
21
+ buildPreviewOutput
22
+ } from "./chunk-R3VLWLVV.js";
23
23
  import {
24
24
  createClient,
25
25
  renderError,
@@ -68,7 +68,7 @@ function normalizeAttachPaths(attach) {
68
68
  async function handleSdkError(err, outOpts, out) {
69
69
  const { CurviateError } = await import("@curviate/sdk");
70
70
  if (err instanceof CurviateError) {
71
- const { getExitCode } = await import("./exit-codes-SL3GQF7W.js");
71
+ const { getExitCode } = await import("./exit-codes-63JE5GM5.js");
72
72
  renderError(err, outOpts, out);
73
73
  process.exit(getExitCode(err.code));
74
74
  }
@@ -14,7 +14,7 @@ import {
14
14
  slimSearchPeopleItem,
15
15
  slimSearchPosts,
16
16
  slimSearchPostsItem
17
- } from "./chunk-45KHSWCV.js";
17
+ } from "./chunk-ROULHEFW.js";
18
18
  import {
19
19
  pageDelayFromFlags,
20
20
  streamAll
@@ -220,7 +220,7 @@ async function runSearchPeople(client, flags, out, readers = DEFAULT_FILTER_READ
220
220
  } catch (err) {
221
221
  const { CurviateError } = await import("@curviate/sdk");
222
222
  if (err instanceof CurviateError) {
223
- const { getExitCode } = await import("./exit-codes-SL3GQF7W.js");
223
+ const { getExitCode } = await import("./exit-codes-63JE5GM5.js");
224
224
  renderError(err, outOpts, out);
225
225
  process.exit(getExitCode(err.code));
226
226
  }
@@ -261,7 +261,7 @@ async function runSearchCompanies(client, flags, out, readers = DEFAULT_FILTER_R
261
261
  } catch (err) {
262
262
  const { CurviateError } = await import("@curviate/sdk");
263
263
  if (err instanceof CurviateError) {
264
- const { getExitCode } = await import("./exit-codes-SL3GQF7W.js");
264
+ const { getExitCode } = await import("./exit-codes-63JE5GM5.js");
265
265
  renderError(err, outOpts, out);
266
266
  process.exit(getExitCode(err.code));
267
267
  }
@@ -302,7 +302,7 @@ async function runSearchPosts(client, flags, out, readers = DEFAULT_FILTER_READE
302
302
  } catch (err) {
303
303
  const { CurviateError } = await import("@curviate/sdk");
304
304
  if (err instanceof CurviateError) {
305
- const { getExitCode } = await import("./exit-codes-SL3GQF7W.js");
305
+ const { getExitCode } = await import("./exit-codes-63JE5GM5.js");
306
306
  renderError(err, outOpts, out);
307
307
  process.exit(getExitCode(err.code));
308
308
  }
@@ -343,7 +343,7 @@ async function runSearchJobs(client, flags, out, readers = DEFAULT_FILTER_READER
343
343
  } catch (err) {
344
344
  const { CurviateError } = await import("@curviate/sdk");
345
345
  if (err instanceof CurviateError) {
346
- const { getExitCode } = await import("./exit-codes-SL3GQF7W.js");
346
+ const { getExitCode } = await import("./exit-codes-63JE5GM5.js");
347
347
  renderError(err, outOpts, out);
348
348
  process.exit(getExitCode(err.code));
349
349
  }
@@ -376,7 +376,7 @@ async function runSearchParameters(client, flags, out) {
376
376
  } catch (err) {
377
377
  const { CurviateError } = await import("@curviate/sdk");
378
378
  if (err instanceof CurviateError) {
379
- const { getExitCode } = await import("./exit-codes-SL3GQF7W.js");
379
+ const { getExitCode } = await import("./exit-codes-63JE5GM5.js");
380
380
  renderError(err, outOpts, out);
381
381
  process.exit(getExitCode(err.code));
382
382
  }
@@ -413,7 +413,7 @@ async function runSearchFromUrl(client, flags, out) {
413
413
  } catch (err) {
414
414
  const { CurviateError } = await import("@curviate/sdk");
415
415
  if (err instanceof CurviateError) {
416
- const { getExitCode } = await import("./exit-codes-SL3GQF7W.js");
416
+ const { getExitCode } = await import("./exit-codes-63JE5GM5.js");
417
417
  renderError(err, outOpts, out);
418
418
  process.exit(getExitCode(err.code));
419
419
  }
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
- import {
3
- buildPreviewOutput
4
- } from "./chunk-R3VLWLVV.js";
5
2
  import {
6
3
  pageDelayFromFlags,
7
4
  streamAll
8
5
  } from "./chunk-EEMJDJ4W.js";
6
+ import {
7
+ buildPreviewOutput
8
+ } from "./chunk-R3VLWLVV.js";
9
9
  import {
10
10
  createClient,
11
11
  renderError,
@@ -48,7 +48,7 @@ function resolveOutputOpts(flags) {
48
48
  async function handleError(err, outOpts, out) {
49
49
  const { CurviateError } = await import("@curviate/sdk");
50
50
  if (err instanceof CurviateError) {
51
- const { getExitCode } = await import("./exit-codes-SL3GQF7W.js");
51
+ const { getExitCode } = await import("./exit-codes-63JE5GM5.js");
52
52
  renderError(err, outOpts, out);
53
53
  process.exit(getExitCode(err.code));
54
54
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curviate/cli",
3
- "version": "0.15.2",
3
+ "version": "0.17.0",
4
4
  "private": false,
5
5
  "description": "Official command-line interface for the Curviate API.",
6
6
  "license": "MIT",
@@ -41,7 +41,7 @@
41
41
  "clean": "rm -rf dist *.tsbuildinfo"
42
42
  },
43
43
  "dependencies": {
44
- "@curviate/sdk": "^0.15.0",
44
+ "@curviate/sdk": "^0.17.0",
45
45
  "citty": "^0.1.6",
46
46
  "open": "^10.1.0"
47
47
  },