@curviate/cli 0.9.0 → 0.11.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.
@@ -1,27 +1,27 @@
1
1
  #!/usr/bin/env node
2
- import {
3
- buildPreviewOutput
4
- } from "./chunk-R3VLWLVV.js";
5
- import {
6
- resolveIdentifier
7
- } from "./chunk-SZB3CFRZ.js";
8
2
  import {
9
3
  streamAll
10
4
  } from "./chunk-GXTZION6.js";
5
+ import {
6
+ buildPreviewOutput
7
+ } from "./chunk-R3VLWLVV.js";
11
8
  import {
12
9
  slimProfile,
13
10
  slimProfileMe
14
- } from "./chunk-P4UYBDCB.js";
11
+ } from "./chunk-SSPILTKF.js";
12
+ import {
13
+ resolveIdentifier
14
+ } from "./chunk-DMQZEPQE.js";
15
15
  import {
16
16
  createClient,
17
17
  renderError,
18
18
  renderSuccess,
19
19
  renderUnexpectedError,
20
20
  resolveEffectiveConfig
21
- } from "./chunk-47SYFQRF.js";
21
+ } from "./chunk-JXF47TRY.js";
22
22
  import {
23
23
  GLOBAL_FLAGS
24
- } from "./chunk-TDYIQHQX.js";
24
+ } from "./chunk-4JHGVY7R.js";
25
25
 
26
26
  // src/commands/profile.ts
27
27
  import { defineCommand } from "citty";
@@ -141,7 +141,7 @@ async function runProfileMe(client, flags, out) {
141
141
  } catch (err) {
142
142
  const { CurviateError } = await import("@curviate/sdk");
143
143
  if (err instanceof CurviateError) {
144
- const { getExitCode } = await import("./exit-codes-NFIR57ZA.js");
144
+ const { getExitCode } = await import("./exit-codes-2ASIFXGR.js");
145
145
  renderError(err, outOpts, out);
146
146
  process.exit(getExitCode(err.code));
147
147
  }
@@ -161,7 +161,7 @@ async function runProfileMe(client, flags, out) {
161
161
  } catch (err) {
162
162
  const { CurviateError } = await import("@curviate/sdk");
163
163
  if (err instanceof CurviateError) {
164
- const { getExitCode } = await import("./exit-codes-NFIR57ZA.js");
164
+ const { getExitCode } = await import("./exit-codes-2ASIFXGR.js");
165
165
  renderError(err, outOpts, out);
166
166
  process.exit(getExitCode(err.code));
167
167
  }
@@ -278,7 +278,7 @@ async function runProfileGet(client, flags, out) {
278
278
  } catch (err) {
279
279
  const { CurviateError } = await import("@curviate/sdk");
280
280
  if (err instanceof CurviateError) {
281
- const { getExitCode } = await import("./exit-codes-NFIR57ZA.js");
281
+ const { getExitCode } = await import("./exit-codes-2ASIFXGR.js");
282
282
  renderError(err, outOpts, out);
283
283
  process.exit(getExitCode(err.code));
284
284
  }
@@ -315,7 +315,7 @@ async function runProfileConnections(client, flags, out) {
315
315
  } catch (err) {
316
316
  const { CurviateError } = await import("@curviate/sdk");
317
317
  if (err instanceof CurviateError) {
318
- const { getExitCode } = await import("./exit-codes-NFIR57ZA.js");
318
+ const { getExitCode } = await import("./exit-codes-2ASIFXGR.js");
319
319
  renderError(err, outOpts, out);
320
320
  process.exit(getExitCode(err.code));
321
321
  }
@@ -346,7 +346,7 @@ async function runProfileEndorse(client, flags, out) {
346
346
  } catch (err) {
347
347
  const { CurviateError } = await import("@curviate/sdk");
348
348
  if (err instanceof CurviateError) {
349
- const { getExitCode } = await import("./exit-codes-NFIR57ZA.js");
349
+ const { getExitCode } = await import("./exit-codes-2ASIFXGR.js");
350
350
  renderError(err, outOpts, out);
351
351
  process.exit(getExitCode(err.code));
352
352
  }
@@ -3,36 +3,40 @@ import {
3
3
  BinaryOutputError,
4
4
  writeBinaryOutput
5
5
  } from "./chunk-UWO2D4HW.js";
6
+ import {
7
+ DEFAULT_FILTER_READERS,
8
+ assembleFilters,
9
+ splitCsv
10
+ } from "./chunk-42VUUKQ3.js";
6
11
  import {
7
12
  AttachError,
8
13
  readAttachment
9
14
  } from "./chunk-Q43HZUN3.js";
15
+ import {
16
+ streamAll
17
+ } from "./chunk-GXTZION6.js";
10
18
  import {
11
19
  buildPreviewOutput
12
20
  } from "./chunk-R3VLWLVV.js";
13
21
  import {
14
- resolveIdentifier
15
- } from "./chunk-SZB3CFRZ.js";
16
- import {
17
- DEFAULT_FILTER_READERS,
18
- assembleFilters,
19
- splitCsv
20
- } from "./chunk-42VUUKQ3.js";
22
+ slimJob
23
+ } from "./chunk-SSPILTKF.js";
21
24
  import {
22
- streamAll
23
- } from "./chunk-GXTZION6.js";
25
+ resolveIdentifier,
26
+ resolveJobIdentifier
27
+ } from "./chunk-DMQZEPQE.js";
24
28
  import {
25
29
  createClient,
26
30
  renderError,
27
31
  renderSuccess,
28
32
  renderUnexpectedError,
29
33
  resolveEffectiveConfig
30
- } from "./chunk-47SYFQRF.js";
34
+ } from "./chunk-JXF47TRY.js";
31
35
  import {
32
36
  GLOBAL_FLAGS,
33
37
  READ_SINGLE_FLAGS,
34
38
  WRITE_FLAGS
35
- } from "./chunk-TDYIQHQX.js";
39
+ } from "./chunk-4JHGVY7R.js";
36
40
 
37
41
  // src/commands/recruiter.ts
38
42
  import { defineCommand } from "citty";
@@ -60,7 +64,8 @@ function resolveOutputOpts(flags) {
60
64
  return {
61
65
  json: (flags.json ?? false) || !process.stdout.isTTY,
62
66
  isTTY: process.stdout.isTTY ?? false,
63
- fields: flags.fields
67
+ fields: flags.fields,
68
+ verbose: flags.verbose ?? false
64
69
  };
65
70
  }
66
71
  function normalizeAttachPaths(attach) {
@@ -70,7 +75,7 @@ function normalizeAttachPaths(attach) {
70
75
  async function handleSdkError(err, outOpts, out) {
71
76
  const { CurviateError } = await import("@curviate/sdk");
72
77
  if (err instanceof CurviateError) {
73
- const { getExitCode } = await import("./exit-codes-NFIR57ZA.js");
78
+ const { getExitCode } = await import("./exit-codes-2ASIFXGR.js");
74
79
  renderError(err, outOpts, out);
75
80
  process.exit(getExitCode(err.code));
76
81
  }
@@ -532,6 +537,20 @@ async function runRecruiterListApplicants(client, flags, out) {
532
537
  await handleSdkError(err, outOpts, out);
533
538
  }
534
539
  }
540
+ async function runRecruiterGetJob(client, flags, out) {
541
+ rejectPreviewOnRead(flags.preview, out);
542
+ const accountId = requireAccount(flags.account, out);
543
+ const rawJobId = flags.jobId ?? "";
544
+ const jobId = resolveJobIdentifier(rawJobId);
545
+ const ns = client.account(accountId);
546
+ const outOpts = resolveOutputOpts(flags);
547
+ try {
548
+ const result = await ns.recruiter.getJob(jobId);
549
+ renderSuccess(result, { ...outOpts, slim: slimJob }, out);
550
+ } catch (err) {
551
+ await handleSdkError(err, outOpts, out);
552
+ }
553
+ }
535
554
  async function runRecruiterGetApplicant(client, flags, out) {
536
555
  rejectPreviewOnRead(flags.preview, out);
537
556
  const accountId = requireAccount(flags.account, out);
@@ -993,6 +1012,30 @@ var recruiterJobApplicantsCommand = defineCommand({
993
1012
  await runRecruiterListApplicants(client, { ...flags, account: flags.account ?? cfg.account }, out);
994
1013
  }
995
1014
  });
1015
+ var recruiterJobGetCommand = defineCommand({
1016
+ meta: { name: "get", description: "Get a job posting via the Recruiter lens (any public posting, not only your own)." },
1017
+ args: {
1018
+ ...READ_SINGLE_FLAGS,
1019
+ jobId: { type: "positional", description: "Job URL (e.g. https://www.linkedin.com/jobs/view/4428113858) or a bare numeric job id." }
1020
+ },
1021
+ async run({ args }) {
1022
+ const flags = args;
1023
+ const cfg = await resolveEffectiveConfig({
1024
+ apiKey: flags["api-key"],
1025
+ baseUrl: flags["base-url"],
1026
+ timeout: flags.timeout,
1027
+ account: flags.account,
1028
+ profile: flags.profile
1029
+ });
1030
+ if (!cfg.apiKey) {
1031
+ process.stderr.write("error: no API key \u2014 run `curviate login` or pass --api-key.\n");
1032
+ process.exit(3);
1033
+ }
1034
+ const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
1035
+ const out = buildOutputStreams();
1036
+ await runRecruiterGetJob(client, { ...flags, account: flags.account ?? cfg.account }, out);
1037
+ }
1038
+ });
996
1039
  var recruiterJobCommand = defineCommand({
997
1040
  meta: { name: "job", description: "Recruiter job posting operations." },
998
1041
  args: { ...GLOBAL_FLAGS },
@@ -1000,11 +1043,12 @@ var recruiterJobCommand = defineCommand({
1000
1043
  create: recruiterJobCreateCommand,
1001
1044
  publish: recruiterJobPublishCommand,
1002
1045
  checkpoint: recruiterJobCheckpointCommand,
1003
- applicants: recruiterJobApplicantsCommand
1046
+ applicants: recruiterJobApplicantsCommand,
1047
+ get: recruiterJobGetCommand
1004
1048
  },
1005
1049
  async run() {
1006
1050
  process.stderr.write(
1007
- "Usage: curviate recruiter job create [flags\u2026]\n curviate recruiter job publish <job_id> [--mode <m>]\n curviate recruiter job checkpoint <job_id> --input <v>\n curviate recruiter job applicants <job_id>\n"
1051
+ "Usage: curviate recruiter job create [flags\u2026]\n curviate recruiter job publish <job_id> [--mode <m>]\n curviate recruiter job checkpoint <job_id> --input <v>\n curviate recruiter job applicants <job_id>\n curviate recruiter job get <url|id>\n"
1008
1052
  );
1009
1053
  }
1010
1054
  });
@@ -1092,7 +1136,7 @@ var recruiterCommand = defineCommand({
1092
1136
  },
1093
1137
  async run() {
1094
1138
  process.stderr.write(
1095
- 'Usage: curviate recruiter sync\n curviate recruiter message new --to <id> "<text>"\n curviate recruiter profile <identifier>\n curviate recruiter search people [--keywords <k>]\n curviate recruiter search parameters --type <t>\n curviate recruiter projects\n curviate recruiter project <project_id>\n curviate recruiter add-candidate <user_id> --hiring-project-id <id>\n curviate recruiter add-applicant <user_id> --hiring-project-id <id>\n curviate recruiter reject-applicant <user_id> --hiring-project-id <id> --reason <r>\n curviate recruiter jobs\n curviate recruiter job create [flags\u2026]\n curviate recruiter job publish <job_id> [--mode <m>]\n curviate recruiter job checkpoint <job_id> --input <v>\n curviate recruiter job applicants <job_id>\n curviate recruiter applicant <applicant_id>\n curviate recruiter applicant resume <applicant_id> -o <file>\n'
1139
+ 'Usage: curviate recruiter sync\n curviate recruiter message new --to <id> "<text>"\n curviate recruiter profile <identifier>\n curviate recruiter search people [--keywords <k>]\n curviate recruiter search parameters --type <t>\n curviate recruiter projects\n curviate recruiter project <project_id>\n curviate recruiter add-candidate <user_id> --hiring-project-id <id>\n curviate recruiter add-applicant <user_id> --hiring-project-id <id>\n curviate recruiter reject-applicant <user_id> --hiring-project-id <id> --reason <r>\n curviate recruiter jobs\n curviate recruiter job create [flags\u2026]\n curviate recruiter job publish <job_id> [--mode <m>]\n curviate recruiter job checkpoint <job_id> --input <v>\n curviate recruiter job applicants <job_id>\n curviate recruiter job get <url|id>\n curviate recruiter applicant <applicant_id>\n curviate recruiter applicant resume <applicant_id> -o <file>\n'
1096
1140
  );
1097
1141
  }
1098
1142
  });
@@ -1103,6 +1147,7 @@ export {
1103
1147
  runRecruiterCreateJob,
1104
1148
  runRecruiterDownloadResume,
1105
1149
  runRecruiterGetApplicant,
1150
+ runRecruiterGetJob,
1106
1151
  runRecruiterGetParameters,
1107
1152
  runRecruiterGetProject,
1108
1153
  runRecruiterJobCheckpoint,
@@ -1,35 +1,35 @@
1
1
  #!/usr/bin/env node
2
- import {
3
- AttachError,
4
- readAttachment
5
- } from "./chunk-Q43HZUN3.js";
6
- import {
7
- buildPreviewOutput
8
- } from "./chunk-R3VLWLVV.js";
9
- import {
10
- resolveIdentifier
11
- } from "./chunk-SZB3CFRZ.js";
12
2
  import {
13
3
  DEFAULT_FILTER_READERS,
14
4
  assembleFilters,
15
5
  splitCsv,
16
6
  splitCsvNumbers
17
7
  } from "./chunk-42VUUKQ3.js";
8
+ import {
9
+ AttachError,
10
+ readAttachment
11
+ } from "./chunk-Q43HZUN3.js";
18
12
  import {
19
13
  streamAll
20
14
  } from "./chunk-GXTZION6.js";
15
+ import {
16
+ buildPreviewOutput
17
+ } from "./chunk-R3VLWLVV.js";
18
+ import {
19
+ resolveIdentifier
20
+ } from "./chunk-DMQZEPQE.js";
21
21
  import {
22
22
  createClient,
23
23
  renderError,
24
24
  renderSuccess,
25
25
  renderUnexpectedError,
26
26
  resolveEffectiveConfig
27
- } from "./chunk-47SYFQRF.js";
27
+ } from "./chunk-JXF47TRY.js";
28
28
  import {
29
29
  GLOBAL_FLAGS,
30
30
  READ_SINGLE_FLAGS,
31
31
  WRITE_FLAGS
32
- } from "./chunk-TDYIQHQX.js";
32
+ } from "./chunk-4JHGVY7R.js";
33
33
 
34
34
  // src/commands/sales-nav.ts
35
35
  import { defineCommand } from "citty";
@@ -66,7 +66,7 @@ function normalizeAttachPaths(attach) {
66
66
  async function handleSdkError(err, outOpts, out) {
67
67
  const { CurviateError } = await import("@curviate/sdk");
68
68
  if (err instanceof CurviateError) {
69
- const { getExitCode } = await import("./exit-codes-NFIR57ZA.js");
69
+ const { getExitCode } = await import("./exit-codes-2ASIFXGR.js");
70
70
  renderError(err, outOpts, out);
71
71
  process.exit(getExitCode(err.code));
72
72
  }
@@ -17,17 +17,17 @@ import {
17
17
  slimSearchPeopleItem,
18
18
  slimSearchPosts,
19
19
  slimSearchPostsItem
20
- } from "./chunk-P4UYBDCB.js";
20
+ } from "./chunk-SSPILTKF.js";
21
21
  import {
22
22
  createClient,
23
23
  renderError,
24
24
  renderSuccess,
25
25
  renderUnexpectedError,
26
26
  resolveEffectiveConfig
27
- } from "./chunk-47SYFQRF.js";
27
+ } from "./chunk-JXF47TRY.js";
28
28
  import {
29
29
  GLOBAL_FLAGS
30
- } from "./chunk-TDYIQHQX.js";
30
+ } from "./chunk-4JHGVY7R.js";
31
31
 
32
32
  // src/commands/search.ts
33
33
  import { defineCommand } from "citty";
@@ -222,7 +222,7 @@ async function runSearchPeople(client, flags, out, readers = DEFAULT_FILTER_READ
222
222
  } catch (err) {
223
223
  const { CurviateError } = await import("@curviate/sdk");
224
224
  if (err instanceof CurviateError) {
225
- const { getExitCode } = await import("./exit-codes-NFIR57ZA.js");
225
+ const { getExitCode } = await import("./exit-codes-2ASIFXGR.js");
226
226
  renderError(err, outOpts, out);
227
227
  process.exit(getExitCode(err.code));
228
228
  }
@@ -264,7 +264,7 @@ async function runSearchCompanies(client, flags, out, readers = DEFAULT_FILTER_R
264
264
  } catch (err) {
265
265
  const { CurviateError } = await import("@curviate/sdk");
266
266
  if (err instanceof CurviateError) {
267
- const { getExitCode } = await import("./exit-codes-NFIR57ZA.js");
267
+ const { getExitCode } = await import("./exit-codes-2ASIFXGR.js");
268
268
  renderError(err, outOpts, out);
269
269
  process.exit(getExitCode(err.code));
270
270
  }
@@ -306,7 +306,7 @@ async function runSearchPosts(client, flags, out, readers = DEFAULT_FILTER_READE
306
306
  } catch (err) {
307
307
  const { CurviateError } = await import("@curviate/sdk");
308
308
  if (err instanceof CurviateError) {
309
- const { getExitCode } = await import("./exit-codes-NFIR57ZA.js");
309
+ const { getExitCode } = await import("./exit-codes-2ASIFXGR.js");
310
310
  renderError(err, outOpts, out);
311
311
  process.exit(getExitCode(err.code));
312
312
  }
@@ -348,7 +348,7 @@ async function runSearchJobs(client, flags, out, readers = DEFAULT_FILTER_READER
348
348
  } catch (err) {
349
349
  const { CurviateError } = await import("@curviate/sdk");
350
350
  if (err instanceof CurviateError) {
351
- const { getExitCode } = await import("./exit-codes-NFIR57ZA.js");
351
+ const { getExitCode } = await import("./exit-codes-2ASIFXGR.js");
352
352
  renderError(err, outOpts, out);
353
353
  process.exit(getExitCode(err.code));
354
354
  }
@@ -372,7 +372,7 @@ async function runSearchParameters(client, flags, out) {
372
372
  } catch (err) {
373
373
  const { CurviateError } = await import("@curviate/sdk");
374
374
  if (err instanceof CurviateError) {
375
- const { getExitCode } = await import("./exit-codes-NFIR57ZA.js");
375
+ const { getExitCode } = await import("./exit-codes-2ASIFXGR.js");
376
376
  renderError(err, outOpts, out);
377
377
  process.exit(getExitCode(err.code));
378
378
  }
@@ -1,20 +1,20 @@
1
1
  #!/usr/bin/env node
2
- import {
3
- buildPreviewOutput
4
- } from "./chunk-R3VLWLVV.js";
5
2
  import {
6
3
  streamAll
7
4
  } from "./chunk-GXTZION6.js";
5
+ import {
6
+ buildPreviewOutput
7
+ } from "./chunk-R3VLWLVV.js";
8
8
  import {
9
9
  createClient,
10
10
  renderError,
11
11
  renderSuccess,
12
12
  renderUnexpectedError,
13
13
  resolveEffectiveConfig
14
- } from "./chunk-47SYFQRF.js";
14
+ } from "./chunk-JXF47TRY.js";
15
15
  import {
16
16
  GLOBAL_FLAGS
17
- } from "./chunk-TDYIQHQX.js";
17
+ } from "./chunk-4JHGVY7R.js";
18
18
 
19
19
  // src/commands/webhook.ts
20
20
  import { defineCommand } from "citty";
@@ -47,7 +47,7 @@ function resolveOutputOpts(flags) {
47
47
  async function handleError(err, outOpts, out) {
48
48
  const { CurviateError } = await import("@curviate/sdk");
49
49
  if (err instanceof CurviateError) {
50
- const { getExitCode } = await import("./exit-codes-NFIR57ZA.js");
50
+ const { getExitCode } = await import("./exit-codes-2ASIFXGR.js");
51
51
  renderError(err, outOpts, out);
52
52
  process.exit(getExitCode(err.code));
53
53
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curviate/cli",
3
- "version": "0.9.0",
3
+ "version": "0.11.0",
4
4
  "private": false,
5
5
  "description": "Official command-line interface for the Curviate API.",
6
6
  "license": "MIT",
@@ -40,8 +40,9 @@
40
40
  "clean": "rm -rf dist *.tsbuildinfo"
41
41
  },
42
42
  "dependencies": {
43
- "@curviate/sdk": "^0.9.0",
44
- "citty": "^0.1.6"
43
+ "@curviate/sdk": "^0.11.0",
44
+ "citty": "^0.1.6",
45
+ "open": "^10.1.0"
45
46
  },
46
47
  "devDependencies": {
47
48
  "@types/node": "^22.15.21",