@cavuno/board 1.3.0 → 1.5.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/dist/index.js CHANGED
@@ -149,7 +149,7 @@ async function clearSession(storage) {
149
149
  }
150
150
 
151
151
  // src/version.ts
152
- var SDK_VERSION = "1.3.0";
152
+ var SDK_VERSION = "1.5.0";
153
153
 
154
154
  // src/client.ts
155
155
  function isRawBody(body) {
@@ -530,6 +530,33 @@ function companiesNamespace(client) {
530
530
  `/companies/${encodeURIComponent(companySlug)}/jobs`,
531
531
  { ...options, query }
532
532
  );
533
+ },
534
+ /**
535
+ * List companies similar to one company — the same ranking that powers the
536
+ * hosted company page's similar-companies rail (most open roles first),
537
+ * excluding the company itself.
538
+ *
539
+ * @example
540
+ * const { data } = await board.companies.similar('acme', { limit: 6 });
541
+ */
542
+ similar(companySlug, query, options) {
543
+ return client.fetch(
544
+ `/companies/${encodeURIComponent(companySlug)}/similar`,
545
+ { ...options, query }
546
+ );
547
+ },
548
+ /**
549
+ * List the board's company markets (sectors), ranked by company count — the
550
+ * data behind the hosted companies index's market filter. A top-N preview.
551
+ *
552
+ * @example
553
+ * const { data } = await board.companies.markets({ search: 'robotics' });
554
+ */
555
+ markets(query, options) {
556
+ return client.fetch("/companies/markets", {
557
+ ...options,
558
+ query
559
+ });
533
560
  }
534
561
  };
535
562
  }
@@ -688,6 +715,28 @@ function jobsNamespace(client) {
688
715
  };
689
716
  }
690
717
 
718
+ // src/namespaces/legal.ts
719
+ function legalNamespace(client) {
720
+ return {
721
+ /**
722
+ * Retrieve a board legal/about page — owner-authored prose as portable HTML
723
+ * (`privacy-policy` / `terms-of-service` / `cookie-policy` / `about`) plus,
724
+ * for `impressum`, structured legal-entity facts. The starter authors the
725
+ * layout, breadcrumb labels, and JSON-LD. `impressum` throws
726
+ * `board_page_not_found` (404) when the board has not enabled it.
727
+ *
728
+ * @example
729
+ * const { title, content } = await board.legal.retrieve('privacy-policy');
730
+ */
731
+ retrieve(type, options) {
732
+ return client.fetch(
733
+ `/legal/${encodeURIComponent(type)}`,
734
+ options
735
+ );
736
+ }
737
+ };
738
+ }
739
+
691
740
  // src/namespaces/me.ts
692
741
  function meNamespace(client) {
693
742
  return {
@@ -870,6 +919,7 @@ function createBoardClient(options) {
870
919
  embed: embedNamespace(client),
871
920
  companies: companiesNamespace(client),
872
921
  blog: blogNamespace(client),
922
+ legal: legalNamespace(client),
873
923
  auth: authNamespace(client),
874
924
  me: meNamespace(client),
875
925
  password: passwordNamespace(client),
package/dist/index.mjs CHANGED
@@ -109,7 +109,7 @@ async function clearSession(storage) {
109
109
  }
110
110
 
111
111
  // src/version.ts
112
- var SDK_VERSION = "1.3.0";
112
+ var SDK_VERSION = "1.5.0";
113
113
 
114
114
  // src/client.ts
115
115
  function isRawBody(body) {
@@ -490,6 +490,33 @@ function companiesNamespace(client) {
490
490
  `/companies/${encodeURIComponent(companySlug)}/jobs`,
491
491
  { ...options, query }
492
492
  );
493
+ },
494
+ /**
495
+ * List companies similar to one company — the same ranking that powers the
496
+ * hosted company page's similar-companies rail (most open roles first),
497
+ * excluding the company itself.
498
+ *
499
+ * @example
500
+ * const { data } = await board.companies.similar('acme', { limit: 6 });
501
+ */
502
+ similar(companySlug, query, options) {
503
+ return client.fetch(
504
+ `/companies/${encodeURIComponent(companySlug)}/similar`,
505
+ { ...options, query }
506
+ );
507
+ },
508
+ /**
509
+ * List the board's company markets (sectors), ranked by company count — the
510
+ * data behind the hosted companies index's market filter. A top-N preview.
511
+ *
512
+ * @example
513
+ * const { data } = await board.companies.markets({ search: 'robotics' });
514
+ */
515
+ markets(query, options) {
516
+ return client.fetch("/companies/markets", {
517
+ ...options,
518
+ query
519
+ });
493
520
  }
494
521
  };
495
522
  }
@@ -648,6 +675,28 @@ function jobsNamespace(client) {
648
675
  };
649
676
  }
650
677
 
678
+ // src/namespaces/legal.ts
679
+ function legalNamespace(client) {
680
+ return {
681
+ /**
682
+ * Retrieve a board legal/about page — owner-authored prose as portable HTML
683
+ * (`privacy-policy` / `terms-of-service` / `cookie-policy` / `about`) plus,
684
+ * for `impressum`, structured legal-entity facts. The starter authors the
685
+ * layout, breadcrumb labels, and JSON-LD. `impressum` throws
686
+ * `board_page_not_found` (404) when the board has not enabled it.
687
+ *
688
+ * @example
689
+ * const { title, content } = await board.legal.retrieve('privacy-policy');
690
+ */
691
+ retrieve(type, options) {
692
+ return client.fetch(
693
+ `/legal/${encodeURIComponent(type)}`,
694
+ options
695
+ );
696
+ }
697
+ };
698
+ }
699
+
651
700
  // src/namespaces/me.ts
652
701
  function meNamespace(client) {
653
702
  return {
@@ -830,6 +879,7 @@ function createBoardClient(options) {
830
879
  embed: embedNamespace(client),
831
880
  companies: companiesNamespace(client),
832
881
  blog: blogNamespace(client),
882
+ legal: legalNamespace(client),
833
883
  auth: authNamespace(client),
834
884
  me: meNamespace(client),
835
885
  password: passwordNamespace(client),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cavuno/board",
3
- "version": "1.3.0",
3
+ "version": "1.5.0",
4
4
  "description": "Typed isomorphic client for the Cavuno Board API",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -50,9 +50,10 @@
50
50
  },
51
51
  "scripts": {
52
52
  "build": "tsup",
53
- "clean": "git clean -xdf .turbo dist node_modules",
53
+ "clean": "git clean -xdf .turbo dist node_modules src/generated",
54
54
  "typecheck": "tsgo --noEmit && tsgo --noEmit -p tsconfig.node.json",
55
55
  "test": "vitest run",
56
+ "gen:types": "tsx scripts/gen-types.ts",
56
57
  "gen:skills-manifest": "tsx scripts/generate-skills-manifest.ts",
57
58
  "assert-publish-target": "node -e \"const p=require('./package.json'); if(p.name!=='@cavuno/board'){throw new Error('Refusing to publish: package.json name is '+p.name+', expected @cavuno/board')}; if(p.private){throw new Error('Refusing to publish: package.json has private:true')}\"",
58
59
  "prepublishOnly": "pnpm run assert-publish-target && pnpm run gen:skills-manifest && pnpm run build"
@@ -60,6 +61,7 @@
60
61
  "devDependencies": {
61
62
  "@kit/tsconfig": "workspace:*",
62
63
  "@types/node": "catalog:",
64
+ "openapi-typescript": "^7.6.0",
63
65
  "tsup": "^8.4.0",
64
66
  "tsx": "^4.19.2",
65
67
  "vitest": "^2.1.9"
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.3.0",
2
+ "version": "1.5.0",
3
3
  "skills": [
4
4
  {
5
5
  "name": "cavuno-board-auth",