@curviate/cli 0.37.0 → 0.38.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
@@ -8,6 +8,42 @@ a new command or flag is a minor; a breaking command/flag/exit-code change is a
8
8
 
9
9
  ## [Unreleased]
10
10
 
11
+ ## [0.38.0] - 2026-09-20
12
+
13
+ Re-vendored from `@curviate/sdk` 0.36.0.
14
+
15
+ ### Added
16
+
17
+ - **`search parameters` paginates.** The API gained a `cursor` input on the
18
+ filter-ID resolver, so the command that used to refuse `--all` now offers
19
+ the full pagination set: `--cursor` to page manually, `--all` to stream
20
+ every page as NDJSON, and `--max-pages` / `--page-delay` to bound and pace
21
+ that stream. It walks until the cursor comes back null, and behaves exactly
22
+ like `search groups`, down to the NDJSON notice and the truncation
23
+ sentinel. A call that passes none of these is unchanged.
24
+
25
+ ### Changed
26
+
27
+ - **`search parameters --help` offers the pagination flags** instead of
28
+ hiding them, and its one-liner says the command pages. `--all` was
29
+ previously an unknown flag there and exited 2; it is now accepted.
30
+ - **`--max-pages` / `--page-delay` on `search parameters` without `--all`**
31
+ is a usage error (exit 2), the same refusal every other streaming command
32
+ gives, rather than being silently ignored.
33
+ - **A `search parameters` 2xx that is not a page exits 7**, matching every
34
+ other list read. It previously rendered whatever came back.
35
+ - **Re-vendored `test/fixtures/openapi.json`** from the `@curviate/sdk`
36
+ 0.36.0 snapshot, byte-identical to it. Production now serves a `cursor`
37
+ query input on the filter-ID resolver, describes `offset` as its numeric
38
+ fallback, and names a malformed cursor among the causes of that
39
+ endpoint's `400`.
40
+
41
+ ### Fixed
42
+
43
+ - The `@curviate/sdk` pin moves from exactly `0.35.0` to exactly `0.36.0`.
44
+ The command's query type is compiler-coupled to that build, so the two move
45
+ together.
46
+
11
47
  ## [0.37.0] - 2026-09-19
12
48
 
13
49
  Re-vendored from `@curviate/sdk` 0.35.0.
package/dist/cli.js CHANGED
@@ -425,7 +425,7 @@ var main = defineCommand({
425
425
  company: () => import("./company-OWND3W3L.js").then((m) => m.companyCommand),
426
426
  job: () => import("./job-ESKS2LDJ.js").then((m) => m.jobCommand),
427
427
  connect: () => import("./connect-3E7EC5ZM.js").then((m) => m.connectCommand),
428
- search: () => import("./search-CS6VN5AG.js").then((m) => m.searchCommand),
428
+ search: () => import("./search-WRMVQU6C.js").then((m) => m.searchCommand),
429
429
  inbox: () => import("./inbox-DQLX2LR7.js").then((m) => m.inboxCommand),
430
430
  inboxes: () => import("./inboxes-WMNHOPY7.js").then((m) => m.inboxesCommand),
431
431
  message: () => import("./message-5W2R3YHS.js").then((m) => m.messageCommand),
@@ -363,7 +363,7 @@ async function runSearchJobs(client, flags, out, readers = DEFAULT_FILTER_READER
363
363
  }
364
364
  async function runSearchParameters(client, flags, out) {
365
365
  rejectPreviewOnRead(flags.preview, out);
366
- rejectAllOnNonPaginated(flags.all, out);
366
+ rejectPaginationModifiersWithoutAll(flags, out);
367
367
  if (!flags.type) {
368
368
  out.stderr.write("error: --type is required.\n");
369
369
  process.exit(2);
@@ -375,13 +375,28 @@ async function runSearchParameters(client, flags, out) {
375
375
  const accountId = await requireAccount(client, flags, out);
376
376
  const ns = client.account(accountId);
377
377
  const outOpts = resolveOutputOpts(flags);
378
+ const all = flags.all ?? false;
379
+ const maxPages = flags["max-pages"] ? parseInt(flags["max-pages"], 10) : 100;
378
380
  const query = {
379
381
  type: flags.type,
380
382
  keywords: flags.keywords
381
383
  };
382
384
  if (flags.limit) query.limit = parseInt(flags.limit, 10);
385
+ if (flags.cursor) query.cursor = flags.cursor;
383
386
  try {
387
+ if (all) {
388
+ const fn = (p) => ns.search.getParameters(p);
389
+ for await (const item of streamAll(fn, query, {
390
+ maxPages,
391
+ out,
392
+ pageDelayMs: pageDelayFromFlags(flags)
393
+ })) {
394
+ writeNdjsonItem(out, item, outOpts.fields);
395
+ }
396
+ return;
397
+ }
384
398
  const result = await ns.search.getParameters(query);
399
+ readablePage(result);
385
400
  renderSuccess(result, outOpts, out);
386
401
  } catch (err) {
387
402
  const { CurviateError } = await import("@curviate/sdk");
@@ -701,9 +716,12 @@ var searchJobsCommand = defineCommand({
701
716
  }
702
717
  });
703
718
  var searchParametersCommand = defineCommand({
704
- meta: { name: "parameters", description: "Resolve human-readable terms to opaque filter IDs." },
719
+ meta: {
720
+ name: "parameters",
721
+ description: "Resolve human-readable terms to opaque filter IDs. Paginated: --cursor pages manually, --all streams every page as NDJSON."
722
+ },
705
723
  args: {
706
- ...NON_STREAM_FLAGS,
724
+ ...GLOBAL_FLAGS,
707
725
  type: {
708
726
  type: "string",
709
727
  description: "Parameter type: LOCATION, PEOPLE, CONNECTIONS, COMPANY, SCHOOL, INDUSTRY, SERVICE, JOB_FUNCTION, JOB_TITLE, EMPLOYMENT_TYPE, SKILL.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curviate/cli",
3
- "version": "0.37.0",
3
+ "version": "0.38.0",
4
4
  "private": false,
5
5
  "description": "Official command-line interface for the Curviate API.",
6
6
  "license": "MIT",
@@ -46,7 +46,7 @@
46
46
  "clean": "rm -rf dist *.tsbuildinfo"
47
47
  },
48
48
  "dependencies": {
49
- "@curviate/sdk": "0.35.0",
49
+ "@curviate/sdk": "0.36.0",
50
50
  "citty": "^0.1.6",
51
51
  "open": "^10.1.0"
52
52
  },