@cavuno/board 1.3.0 → 1.4.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.d.mts CHANGED
@@ -368,6 +368,24 @@ interface BoardSeo {
368
368
  * canonical links from it — NOT the request origin.
369
369
  */
370
370
  canonicalBase: string;
371
+ /**
372
+ * Absolute URLs for the board's configured favicons / app icons (null when
373
+ * unset). The variant key implies the role + size; build `<link rel="icon">`
374
+ * tags + the web-manifest icon list from these.
375
+ */
376
+ icons: {
377
+ ico: string | null;
378
+ svg: string | null;
379
+ appleTouch: string | null;
380
+ icon192: string | null;
381
+ icon512: string | null;
382
+ iconMaskable512: string | null;
383
+ };
384
+ /** Web-manifest metadata; assemble `site.webmanifest` from this + `icons`. */
385
+ manifest: {
386
+ name: string;
387
+ themeColor: string;
388
+ };
371
389
  }
372
390
 
373
391
  /**
@@ -423,7 +441,7 @@ declare function isConflict(e: unknown): e is BoardApiError;
423
441
  * constant because the package is platform-neutral and cannot read
424
442
  * package.json at runtime.
425
443
  */
426
- declare const SDK_VERSION = "1.3.0";
444
+ declare const SDK_VERSION = "1.4.0";
427
445
 
428
446
  interface BoardUser {
429
447
  id: string;
@@ -522,6 +540,29 @@ interface RedirectResolution {
522
540
  target: string | null;
523
541
  }
524
542
 
543
+ /**
544
+ * A board legal/about page (ADR-0039 transitional portable-prose field). The
545
+ * API serves owner-authored prose as portable HTML; the starter authors the
546
+ * layout + JSON-LD. Impressum additionally carries structured legal-entity
547
+ * facts and is gated by the board's `impressumEnabled` flag (404 when off).
548
+ */
549
+ type LegalPageType = 'terms-of-service' | 'privacy-policy' | 'cookie-policy' | 'about' | 'impressum';
550
+ interface LegalEntity {
551
+ legalName: string | null;
552
+ address: string | null;
553
+ }
554
+ interface PublicLegalPage {
555
+ object: 'legal_page';
556
+ type: string;
557
+ /** Page heading (H1), with `{{board_name}}` resolved. */
558
+ title: string;
559
+ /** Owner-authored prose as portable HTML; `''` when the page has no body. */
560
+ content: string;
561
+ contentFormat: 'html';
562
+ /** Structured impressum facts; `null` for non-impressum pages. */
563
+ legalEntity: LegalEntity | null;
564
+ }
565
+
525
566
  /** Author shape embedded on posts (no `object` discriminator). */
526
567
  interface BlogAuthorEmbed {
527
568
  id: string;
@@ -631,6 +672,21 @@ type CompanyJobsListQuery = {
631
672
  /** 1–100. */
632
673
  limit?: number;
633
674
  };
675
+ type CompanySimilarQuery = {
676
+ /** 1–20, default 6. */
677
+ limit?: number;
678
+ };
679
+ interface CompanyMarket {
680
+ object: 'company_market';
681
+ slug: string;
682
+ name: string;
683
+ companyCount: number;
684
+ }
685
+ type CompanyMarketsListQuery = {
686
+ /** 1–200, default 100 (a top-by-company-count preview). */
687
+ limit?: number;
688
+ search?: string;
689
+ };
634
690
  interface CompaniesSearchBody {
635
691
  /** Free-text query, up to 200 characters. */
636
692
  query?: string;
@@ -887,6 +943,8 @@ declare function createBoardClient(options: CreateBoardClientOptions): {
887
943
  retrieve(companySlug: string, query?: Record<string, never>, options?: FetchOptions): Promise<PublicCompany>;
888
944
  search(body: CompaniesSearchBody, query?: Record<string, never>, options?: FetchOptions): Promise<SearchEnvelope<PublicCompany>>;
889
945
  listJobs(companySlug: string, query?: CompanyJobsListQuery, options?: FetchOptions): Promise<JobCardListEnvelope>;
946
+ similar(companySlug: string, query?: CompanySimilarQuery, options?: FetchOptions): Promise<ListEnvelope<PublicCompany>>;
947
+ markets(query?: CompanyMarketsListQuery, options?: FetchOptions): Promise<ListEnvelope<CompanyMarket>>;
890
948
  };
891
949
  blog: {
892
950
  posts: {
@@ -905,6 +963,9 @@ declare function createBoardClient(options: CreateBoardClientOptions): {
905
963
  };
906
964
  search(body: BlogSearchBody, query?: Record<string, never>, options?: FetchOptions): Promise<SearchEnvelope<PublicBlogPostSummary>>;
907
965
  };
966
+ legal: {
967
+ retrieve(type: LegalPageType, options?: FetchOptions): Promise<PublicLegalPage>;
968
+ };
908
969
  auth: {
909
970
  register(body: RegisterBody, options?: FetchOptions): Promise<BoardAuthSession>;
910
971
  login(body: LoginBody, options?: FetchOptions): Promise<BoardAuthSession>;
@@ -957,4 +1018,4 @@ declare function createBoardClient(options: CreateBoardClientOptions): {
957
1018
  };
958
1019
  type BoardSdk = ReturnType<typeof createBoardClient>;
959
1020
 
960
- export { ACCESS_TOKEN_KEY, type Awaitable, BOARD_ACCESS_GRANT_KEY, type BlogAuthorEmbed, type BlogPostsListQuery, type BlogSearchBody, type BlogSimilarQuery, type BlogTagEmbed, type BoardAccessGrant, BoardApiError, type BoardAuthSession, BoardClient, type BoardRequest, type BoardSdk, type BoardSeo, type BoardUser, type CompaniesListQuery, type CompaniesSearchBody, type CompanyJobsListQuery, type CreateBoardClientOptions, type CustomStorage, type EducationRequirement, type EmbedJobsQuery, type EmploymentType, type FetchOptions, type ForgotPasswordBody, type JobAlertConfirmation, type JobAlertDeletePreferenceInput, type JobAlertFiltersInput, type JobAlertFrequency, type JobAlertManageQuery, type JobAlertManageResult, type JobAlertManageState, type JobAlertManageTokenInput, type JobAlertPreference, type JobAlertRemoteOption, type JobAlertResendResult, type JobAlertStoredFilters, type JobAlertSubscribeInput, type JobAlertSubscription, type JobAlertUpdatePreferenceInput, type JobCardListEnvelope, type JobCardSearchEnvelope, type JobCompany, type JobsListQuery, type JobsSearchBody, type ListEnvelope, type Logger, type LoginBody, type LogoutBody, type OfficeLocation, type PlacesListQuery, type PublicBlogAdjacentPosts, type PublicBlogAuthor, type PublicBlogPost, type PublicBlogPostSummary, type PublicBlogTag, type PublicBoard, type PublicBoardAnalytics, type PublicBoardFeatures, type PublicBoardTheme, type PublicCompany, type PublicJob, type PublicJobCard, type PublicPlace, REFRESH_TOKEN_KEY, type RedirectResolution, type RefreshBody, type RegisterBody, type RelatedSearch, type RemoteOption, type RemotePermit, type RemoteTimezone, type ResetPasswordBody, SDK_VERSION, type SaveJobBody, type SavedJob, type SavedJobsListQuery, type SearchEnvelope, type Seniority, type StorageMode, type StorefrontPagination, type TaxonomyGeo, type TaxonomyResolution, type VerifyEmailBody, createBoardClient, isBoardApiError, isBoardPasswordRequired, isConflict, isForbidden, isNotFound, isRateLimited, isUnauthorized, isValidationError };
1021
+ export { ACCESS_TOKEN_KEY, type Awaitable, BOARD_ACCESS_GRANT_KEY, type BlogAuthorEmbed, type BlogPostsListQuery, type BlogSearchBody, type BlogSimilarQuery, type BlogTagEmbed, type BoardAccessGrant, BoardApiError, type BoardAuthSession, BoardClient, type BoardRequest, type BoardSdk, type BoardSeo, type BoardUser, type CompaniesListQuery, type CompaniesSearchBody, type CompanyJobsListQuery, type CompanyMarket, type CompanyMarketsListQuery, type CompanySimilarQuery, type CreateBoardClientOptions, type CustomStorage, type EducationRequirement, type EmbedJobsQuery, type EmploymentType, type FetchOptions, type ForgotPasswordBody, type JobAlertConfirmation, type JobAlertDeletePreferenceInput, type JobAlertFiltersInput, type JobAlertFrequency, type JobAlertManageQuery, type JobAlertManageResult, type JobAlertManageState, type JobAlertManageTokenInput, type JobAlertPreference, type JobAlertRemoteOption, type JobAlertResendResult, type JobAlertStoredFilters, type JobAlertSubscribeInput, type JobAlertSubscription, type JobAlertUpdatePreferenceInput, type JobCardListEnvelope, type JobCardSearchEnvelope, type JobCompany, type JobsListQuery, type JobsSearchBody, type LegalEntity, type LegalPageType, type ListEnvelope, type Logger, type LoginBody, type LogoutBody, type OfficeLocation, type PlacesListQuery, type PublicBlogAdjacentPosts, type PublicBlogAuthor, type PublicBlogPost, type PublicBlogPostSummary, type PublicBlogTag, type PublicBoard, type PublicBoardAnalytics, type PublicBoardFeatures, type PublicBoardTheme, type PublicCompany, type PublicJob, type PublicJobCard, type PublicLegalPage, type PublicPlace, REFRESH_TOKEN_KEY, type RedirectResolution, type RefreshBody, type RegisterBody, type RelatedSearch, type RemoteOption, type RemotePermit, type RemoteTimezone, type ResetPasswordBody, SDK_VERSION, type SaveJobBody, type SavedJob, type SavedJobsListQuery, type SearchEnvelope, type Seniority, type StorageMode, type StorefrontPagination, type TaxonomyGeo, type TaxonomyResolution, type VerifyEmailBody, createBoardClient, isBoardApiError, isBoardPasswordRequired, isConflict, isForbidden, isNotFound, isRateLimited, isUnauthorized, isValidationError };
package/dist/index.d.ts CHANGED
@@ -368,6 +368,24 @@ interface BoardSeo {
368
368
  * canonical links from it — NOT the request origin.
369
369
  */
370
370
  canonicalBase: string;
371
+ /**
372
+ * Absolute URLs for the board's configured favicons / app icons (null when
373
+ * unset). The variant key implies the role + size; build `<link rel="icon">`
374
+ * tags + the web-manifest icon list from these.
375
+ */
376
+ icons: {
377
+ ico: string | null;
378
+ svg: string | null;
379
+ appleTouch: string | null;
380
+ icon192: string | null;
381
+ icon512: string | null;
382
+ iconMaskable512: string | null;
383
+ };
384
+ /** Web-manifest metadata; assemble `site.webmanifest` from this + `icons`. */
385
+ manifest: {
386
+ name: string;
387
+ themeColor: string;
388
+ };
371
389
  }
372
390
 
373
391
  /**
@@ -423,7 +441,7 @@ declare function isConflict(e: unknown): e is BoardApiError;
423
441
  * constant because the package is platform-neutral and cannot read
424
442
  * package.json at runtime.
425
443
  */
426
- declare const SDK_VERSION = "1.3.0";
444
+ declare const SDK_VERSION = "1.4.0";
427
445
 
428
446
  interface BoardUser {
429
447
  id: string;
@@ -522,6 +540,29 @@ interface RedirectResolution {
522
540
  target: string | null;
523
541
  }
524
542
 
543
+ /**
544
+ * A board legal/about page (ADR-0039 transitional portable-prose field). The
545
+ * API serves owner-authored prose as portable HTML; the starter authors the
546
+ * layout + JSON-LD. Impressum additionally carries structured legal-entity
547
+ * facts and is gated by the board's `impressumEnabled` flag (404 when off).
548
+ */
549
+ type LegalPageType = 'terms-of-service' | 'privacy-policy' | 'cookie-policy' | 'about' | 'impressum';
550
+ interface LegalEntity {
551
+ legalName: string | null;
552
+ address: string | null;
553
+ }
554
+ interface PublicLegalPage {
555
+ object: 'legal_page';
556
+ type: string;
557
+ /** Page heading (H1), with `{{board_name}}` resolved. */
558
+ title: string;
559
+ /** Owner-authored prose as portable HTML; `''` when the page has no body. */
560
+ content: string;
561
+ contentFormat: 'html';
562
+ /** Structured impressum facts; `null` for non-impressum pages. */
563
+ legalEntity: LegalEntity | null;
564
+ }
565
+
525
566
  /** Author shape embedded on posts (no `object` discriminator). */
526
567
  interface BlogAuthorEmbed {
527
568
  id: string;
@@ -631,6 +672,21 @@ type CompanyJobsListQuery = {
631
672
  /** 1–100. */
632
673
  limit?: number;
633
674
  };
675
+ type CompanySimilarQuery = {
676
+ /** 1–20, default 6. */
677
+ limit?: number;
678
+ };
679
+ interface CompanyMarket {
680
+ object: 'company_market';
681
+ slug: string;
682
+ name: string;
683
+ companyCount: number;
684
+ }
685
+ type CompanyMarketsListQuery = {
686
+ /** 1–200, default 100 (a top-by-company-count preview). */
687
+ limit?: number;
688
+ search?: string;
689
+ };
634
690
  interface CompaniesSearchBody {
635
691
  /** Free-text query, up to 200 characters. */
636
692
  query?: string;
@@ -887,6 +943,8 @@ declare function createBoardClient(options: CreateBoardClientOptions): {
887
943
  retrieve(companySlug: string, query?: Record<string, never>, options?: FetchOptions): Promise<PublicCompany>;
888
944
  search(body: CompaniesSearchBody, query?: Record<string, never>, options?: FetchOptions): Promise<SearchEnvelope<PublicCompany>>;
889
945
  listJobs(companySlug: string, query?: CompanyJobsListQuery, options?: FetchOptions): Promise<JobCardListEnvelope>;
946
+ similar(companySlug: string, query?: CompanySimilarQuery, options?: FetchOptions): Promise<ListEnvelope<PublicCompany>>;
947
+ markets(query?: CompanyMarketsListQuery, options?: FetchOptions): Promise<ListEnvelope<CompanyMarket>>;
890
948
  };
891
949
  blog: {
892
950
  posts: {
@@ -905,6 +963,9 @@ declare function createBoardClient(options: CreateBoardClientOptions): {
905
963
  };
906
964
  search(body: BlogSearchBody, query?: Record<string, never>, options?: FetchOptions): Promise<SearchEnvelope<PublicBlogPostSummary>>;
907
965
  };
966
+ legal: {
967
+ retrieve(type: LegalPageType, options?: FetchOptions): Promise<PublicLegalPage>;
968
+ };
908
969
  auth: {
909
970
  register(body: RegisterBody, options?: FetchOptions): Promise<BoardAuthSession>;
910
971
  login(body: LoginBody, options?: FetchOptions): Promise<BoardAuthSession>;
@@ -957,4 +1018,4 @@ declare function createBoardClient(options: CreateBoardClientOptions): {
957
1018
  };
958
1019
  type BoardSdk = ReturnType<typeof createBoardClient>;
959
1020
 
960
- export { ACCESS_TOKEN_KEY, type Awaitable, BOARD_ACCESS_GRANT_KEY, type BlogAuthorEmbed, type BlogPostsListQuery, type BlogSearchBody, type BlogSimilarQuery, type BlogTagEmbed, type BoardAccessGrant, BoardApiError, type BoardAuthSession, BoardClient, type BoardRequest, type BoardSdk, type BoardSeo, type BoardUser, type CompaniesListQuery, type CompaniesSearchBody, type CompanyJobsListQuery, type CreateBoardClientOptions, type CustomStorage, type EducationRequirement, type EmbedJobsQuery, type EmploymentType, type FetchOptions, type ForgotPasswordBody, type JobAlertConfirmation, type JobAlertDeletePreferenceInput, type JobAlertFiltersInput, type JobAlertFrequency, type JobAlertManageQuery, type JobAlertManageResult, type JobAlertManageState, type JobAlertManageTokenInput, type JobAlertPreference, type JobAlertRemoteOption, type JobAlertResendResult, type JobAlertStoredFilters, type JobAlertSubscribeInput, type JobAlertSubscription, type JobAlertUpdatePreferenceInput, type JobCardListEnvelope, type JobCardSearchEnvelope, type JobCompany, type JobsListQuery, type JobsSearchBody, type ListEnvelope, type Logger, type LoginBody, type LogoutBody, type OfficeLocation, type PlacesListQuery, type PublicBlogAdjacentPosts, type PublicBlogAuthor, type PublicBlogPost, type PublicBlogPostSummary, type PublicBlogTag, type PublicBoard, type PublicBoardAnalytics, type PublicBoardFeatures, type PublicBoardTheme, type PublicCompany, type PublicJob, type PublicJobCard, type PublicPlace, REFRESH_TOKEN_KEY, type RedirectResolution, type RefreshBody, type RegisterBody, type RelatedSearch, type RemoteOption, type RemotePermit, type RemoteTimezone, type ResetPasswordBody, SDK_VERSION, type SaveJobBody, type SavedJob, type SavedJobsListQuery, type SearchEnvelope, type Seniority, type StorageMode, type StorefrontPagination, type TaxonomyGeo, type TaxonomyResolution, type VerifyEmailBody, createBoardClient, isBoardApiError, isBoardPasswordRequired, isConflict, isForbidden, isNotFound, isRateLimited, isUnauthorized, isValidationError };
1021
+ export { ACCESS_TOKEN_KEY, type Awaitable, BOARD_ACCESS_GRANT_KEY, type BlogAuthorEmbed, type BlogPostsListQuery, type BlogSearchBody, type BlogSimilarQuery, type BlogTagEmbed, type BoardAccessGrant, BoardApiError, type BoardAuthSession, BoardClient, type BoardRequest, type BoardSdk, type BoardSeo, type BoardUser, type CompaniesListQuery, type CompaniesSearchBody, type CompanyJobsListQuery, type CompanyMarket, type CompanyMarketsListQuery, type CompanySimilarQuery, type CreateBoardClientOptions, type CustomStorage, type EducationRequirement, type EmbedJobsQuery, type EmploymentType, type FetchOptions, type ForgotPasswordBody, type JobAlertConfirmation, type JobAlertDeletePreferenceInput, type JobAlertFiltersInput, type JobAlertFrequency, type JobAlertManageQuery, type JobAlertManageResult, type JobAlertManageState, type JobAlertManageTokenInput, type JobAlertPreference, type JobAlertRemoteOption, type JobAlertResendResult, type JobAlertStoredFilters, type JobAlertSubscribeInput, type JobAlertSubscription, type JobAlertUpdatePreferenceInput, type JobCardListEnvelope, type JobCardSearchEnvelope, type JobCompany, type JobsListQuery, type JobsSearchBody, type LegalEntity, type LegalPageType, type ListEnvelope, type Logger, type LoginBody, type LogoutBody, type OfficeLocation, type PlacesListQuery, type PublicBlogAdjacentPosts, type PublicBlogAuthor, type PublicBlogPost, type PublicBlogPostSummary, type PublicBlogTag, type PublicBoard, type PublicBoardAnalytics, type PublicBoardFeatures, type PublicBoardTheme, type PublicCompany, type PublicJob, type PublicJobCard, type PublicLegalPage, type PublicPlace, REFRESH_TOKEN_KEY, type RedirectResolution, type RefreshBody, type RegisterBody, type RelatedSearch, type RemoteOption, type RemotePermit, type RemoteTimezone, type ResetPasswordBody, SDK_VERSION, type SaveJobBody, type SavedJob, type SavedJobsListQuery, type SearchEnvelope, type Seniority, type StorageMode, type StorefrontPagination, type TaxonomyGeo, type TaxonomyResolution, type VerifyEmailBody, createBoardClient, isBoardApiError, isBoardPasswordRequired, isConflict, isForbidden, isNotFound, isRateLimited, isUnauthorized, isValidationError };
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.4.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.4.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.4.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.3.0",
2
+ "version": "1.4.0",
3
3
  "skills": [
4
4
  {
5
5
  "name": "cavuno-board-auth",