@cavuno/board 1.7.0 → 1.9.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.7.0";
152
+ var SDK_VERSION = "1.9.0";
153
153
 
154
154
  // src/client.ts
155
155
  function isRawBody(body) {
@@ -480,9 +480,23 @@ function blogNamespace(client) {
480
480
 
481
481
  // src/namespaces/companies.ts
482
482
  function companiesNamespace(client) {
483
+ const markets = Object.assign(
484
+ (query, options) => client.fetch("/companies/markets", {
485
+ ...options,
486
+ query
487
+ }),
488
+ {
489
+ resolve(market, options) {
490
+ return client.fetch(
491
+ `/companies/markets/${encodeURIComponent(market)}`,
492
+ options
493
+ );
494
+ }
495
+ }
496
+ );
483
497
  return {
484
498
  /**
485
- * List companies on the board.
499
+ * List companies on the board. Pass `marketSlug` to scope to one market.
486
500
  *
487
501
  * @example
488
502
  * const { data } = await board.companies.list({ limit: 20 });
@@ -494,7 +508,7 @@ function companiesNamespace(client) {
494
508
  });
495
509
  },
496
510
  /**
497
- * Retrieve one company by slug.
511
+ * Retrieve one company by slug. The detail carries the company's `markets`.
498
512
  *
499
513
  * @example
500
514
  * const company = await board.companies.retrieve('acme');
@@ -545,19 +559,7 @@ function companiesNamespace(client) {
545
559
  { ...options, query }
546
560
  );
547
561
  },
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
- });
560
- }
562
+ markets
561
563
  };
562
564
  }
563
565
 
@@ -841,6 +843,36 @@ function redirectsNamespace(client) {
841
843
  };
842
844
  }
843
845
 
846
+ // src/namespaces/salaries.ts
847
+ function salariesNamespace(client) {
848
+ return {
849
+ titles: {
850
+ retrieve(categorySlug, query, options) {
851
+ return client.fetch(
852
+ `/salaries/titles/${encodeURIComponent(categorySlug)}`,
853
+ { ...options, query }
854
+ );
855
+ }
856
+ },
857
+ skills: {
858
+ retrieve(skillSlug, query, options) {
859
+ return client.fetch(
860
+ `/salaries/skills/${encodeURIComponent(skillSlug)}`,
861
+ { ...options, query }
862
+ );
863
+ }
864
+ },
865
+ locations: {
866
+ retrieve(locationSlug, query, options) {
867
+ return client.fetch(
868
+ `/salaries/locations/${encodeURIComponent(locationSlug)}`,
869
+ { ...options, query }
870
+ );
871
+ }
872
+ }
873
+ };
874
+ }
875
+
844
876
  // src/namespaces/taxonomy.ts
845
877
  function taxonomyResolver(client, kind) {
846
878
  return {
@@ -925,6 +957,7 @@ function createBoardClient(options) {
925
957
  password: passwordNamespace(client),
926
958
  taxonomy: taxonomyNamespace(client),
927
959
  redirects: redirectsNamespace(client),
928
- jobAlerts: jobAlertsNamespace(client)
960
+ jobAlerts: jobAlertsNamespace(client),
961
+ salaries: salariesNamespace(client)
929
962
  };
930
963
  }
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.7.0";
112
+ var SDK_VERSION = "1.9.0";
113
113
 
114
114
  // src/client.ts
115
115
  function isRawBody(body) {
@@ -440,9 +440,23 @@ function blogNamespace(client) {
440
440
 
441
441
  // src/namespaces/companies.ts
442
442
  function companiesNamespace(client) {
443
+ const markets = Object.assign(
444
+ (query, options) => client.fetch("/companies/markets", {
445
+ ...options,
446
+ query
447
+ }),
448
+ {
449
+ resolve(market, options) {
450
+ return client.fetch(
451
+ `/companies/markets/${encodeURIComponent(market)}`,
452
+ options
453
+ );
454
+ }
455
+ }
456
+ );
443
457
  return {
444
458
  /**
445
- * List companies on the board.
459
+ * List companies on the board. Pass `marketSlug` to scope to one market.
446
460
  *
447
461
  * @example
448
462
  * const { data } = await board.companies.list({ limit: 20 });
@@ -454,7 +468,7 @@ function companiesNamespace(client) {
454
468
  });
455
469
  },
456
470
  /**
457
- * Retrieve one company by slug.
471
+ * Retrieve one company by slug. The detail carries the company's `markets`.
458
472
  *
459
473
  * @example
460
474
  * const company = await board.companies.retrieve('acme');
@@ -505,19 +519,7 @@ function companiesNamespace(client) {
505
519
  { ...options, query }
506
520
  );
507
521
  },
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
- });
520
- }
522
+ markets
521
523
  };
522
524
  }
523
525
 
@@ -801,6 +803,36 @@ function redirectsNamespace(client) {
801
803
  };
802
804
  }
803
805
 
806
+ // src/namespaces/salaries.ts
807
+ function salariesNamespace(client) {
808
+ return {
809
+ titles: {
810
+ retrieve(categorySlug, query, options) {
811
+ return client.fetch(
812
+ `/salaries/titles/${encodeURIComponent(categorySlug)}`,
813
+ { ...options, query }
814
+ );
815
+ }
816
+ },
817
+ skills: {
818
+ retrieve(skillSlug, query, options) {
819
+ return client.fetch(
820
+ `/salaries/skills/${encodeURIComponent(skillSlug)}`,
821
+ { ...options, query }
822
+ );
823
+ }
824
+ },
825
+ locations: {
826
+ retrieve(locationSlug, query, options) {
827
+ return client.fetch(
828
+ `/salaries/locations/${encodeURIComponent(locationSlug)}`,
829
+ { ...options, query }
830
+ );
831
+ }
832
+ }
833
+ };
834
+ }
835
+
804
836
  // src/namespaces/taxonomy.ts
805
837
  function taxonomyResolver(client, kind) {
806
838
  return {
@@ -885,7 +917,8 @@ function createBoardClient(options) {
885
917
  password: passwordNamespace(client),
886
918
  taxonomy: taxonomyNamespace(client),
887
919
  redirects: redirectsNamespace(client),
888
- jobAlerts: jobAlertsNamespace(client)
920
+ jobAlerts: jobAlertsNamespace(client),
921
+ salaries: salariesNamespace(client)
889
922
  };
890
923
  }
891
924
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cavuno/board",
3
- "version": "1.7.0",
3
+ "version": "1.9.0",
4
4
  "description": "Typed isomorphic client for the Cavuno Board API",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.7.0",
2
+ "version": "1.9.0",
3
3
  "skills": [
4
4
  {
5
5
  "name": "cavuno-board-auth",