@cavuno/board 1.1.0 → 1.2.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 +48 -2
- package/dist/index.d.ts +48 -2
- package/dist/index.js +34 -2
- package/dist/index.mjs +34 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -345,6 +345,27 @@ interface PublicBoard {
|
|
|
345
345
|
theme: PublicBoardTheme | null;
|
|
346
346
|
}
|
|
347
347
|
|
|
348
|
+
/**
|
|
349
|
+
* The public SEO-infra payload (`board.seo()`). The four values a headless
|
|
350
|
+
* frontend rebuilds `robots.txt` / `ads.txt` / `indexnow-key.txt` (+ the Google
|
|
351
|
+
* site-verification `<meta>`) from — byte-identically to the hosted board.
|
|
352
|
+
*/
|
|
353
|
+
interface BoardSeo {
|
|
354
|
+
object: 'board_seo';
|
|
355
|
+
/** Verbatim `ads.txt` content, or `null` when not configured (the handler 404s). */
|
|
356
|
+
adsTxt: string | null;
|
|
357
|
+
/** IndexNow key-file content, or `null` when not configured (the handler 404s). */
|
|
358
|
+
indexNowKey: string | null;
|
|
359
|
+
/** Google site-verification token for the `<meta>` tag, or `null`. */
|
|
360
|
+
googleSiteVerification: string | null;
|
|
361
|
+
/**
|
|
362
|
+
* The board's canonical base URL (honours a configured custom domain). Build
|
|
363
|
+
* the `robots.txt` `Sitemap:` line (`${canonicalBase}/sitemap.xml`) and
|
|
364
|
+
* canonical links from it — NOT the request origin.
|
|
365
|
+
*/
|
|
366
|
+
canonicalBase: string;
|
|
367
|
+
}
|
|
368
|
+
|
|
348
369
|
/**
|
|
349
370
|
* Error raised for every non-2xx Board API response.
|
|
350
371
|
*
|
|
@@ -392,7 +413,7 @@ declare function isConflict(e: unknown): e is BoardApiError;
|
|
|
392
413
|
* constant because the package is platform-neutral and cannot read
|
|
393
414
|
* package.json at runtime.
|
|
394
415
|
*/
|
|
395
|
-
declare const SDK_VERSION = "1.
|
|
416
|
+
declare const SDK_VERSION = "1.2.0";
|
|
396
417
|
|
|
397
418
|
interface BoardUser {
|
|
398
419
|
id: string;
|
|
@@ -443,6 +464,19 @@ interface ResetPasswordBody {
|
|
|
443
464
|
password: string;
|
|
444
465
|
}
|
|
445
466
|
|
|
467
|
+
/**
|
|
468
|
+
* The result of resolving a path against the board's configured redirects
|
|
469
|
+
* (`board.redirects.resolve()`). A headless frontend 308s to `target`, or 404s
|
|
470
|
+
* when it's `null`.
|
|
471
|
+
*/
|
|
472
|
+
interface RedirectResolution {
|
|
473
|
+
object: 'redirect_resolution';
|
|
474
|
+
/** The path that was resolved. */
|
|
475
|
+
path: string;
|
|
476
|
+
/** The redirect target (board-relative), or `null` when no redirect matches. */
|
|
477
|
+
target: string | null;
|
|
478
|
+
}
|
|
479
|
+
|
|
446
480
|
/** Author shape embedded on posts (no `object` discriminator). */
|
|
447
481
|
interface BlogAuthorEmbed {
|
|
448
482
|
id: string;
|
|
@@ -652,6 +686,15 @@ declare function createBoardClient(options: CreateBoardClientOptions): {
|
|
|
652
686
|
* const { name, theme } = await board.context();
|
|
653
687
|
*/
|
|
654
688
|
context(options?: FetchOptions): Promise<PublicBoard>;
|
|
689
|
+
/**
|
|
690
|
+
* Board SEO infra — `ads.txt`, IndexNow key, Google site-verification, and
|
|
691
|
+
* the canonical base URL. Rebuild `robots.txt` / `ads.txt` /
|
|
692
|
+
* `indexnow-key.txt` from it.
|
|
693
|
+
*
|
|
694
|
+
* @example
|
|
695
|
+
* const { adsTxt, canonicalBase } = await board.seo();
|
|
696
|
+
*/
|
|
697
|
+
seo(options?: FetchOptions): Promise<BoardSeo>;
|
|
655
698
|
jobs: {
|
|
656
699
|
list(query?: JobsListQuery, options?: FetchOptions): Promise<JobCardListEnvelope>;
|
|
657
700
|
retrieve(jobSlug: string, query?: Record<string, never>, options?: FetchOptions): Promise<PublicJob>;
|
|
@@ -708,7 +751,10 @@ declare function createBoardClient(options: CreateBoardClientOptions): {
|
|
|
708
751
|
resolve(slug: string, options?: FetchOptions): Promise<TaxonomyResolution>;
|
|
709
752
|
};
|
|
710
753
|
};
|
|
754
|
+
redirects: {
|
|
755
|
+
resolve(path: string, options?: FetchOptions): Promise<RedirectResolution>;
|
|
756
|
+
};
|
|
711
757
|
};
|
|
712
758
|
type BoardSdk = ReturnType<typeof createBoardClient>;
|
|
713
759
|
|
|
714
|
-
export { ACCESS_TOKEN_KEY, type Awaitable, type BlogAuthorEmbed, type BlogPostsListQuery, type BlogSearchBody, type BlogTagEmbed, BoardApiError, type BoardAuthSession, BoardClient, type BoardRequest, type BoardSdk, type BoardUser, type CompaniesListQuery, type CompaniesSearchBody, type CompanyJobsListQuery, type CreateBoardClientOptions, type CustomStorage, type EducationRequirement, type EmploymentType, type FetchOptions, type ForgotPasswordBody, type JobCardListEnvelope, type JobCardSearchEnvelope, type JobCompany, type JobsListQuery, type JobsSearchBody, type ListEnvelope, type Logger, type LoginBody, type LogoutBody, type OfficeLocation, 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 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, isConflict, isForbidden, isNotFound, isRateLimited, isUnauthorized, isValidationError };
|
|
760
|
+
export { ACCESS_TOKEN_KEY, type Awaitable, type BlogAuthorEmbed, type BlogPostsListQuery, type BlogSearchBody, type BlogTagEmbed, 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 EmploymentType, type FetchOptions, type ForgotPasswordBody, type JobCardListEnvelope, type JobCardSearchEnvelope, type JobCompany, type JobsListQuery, type JobsSearchBody, type ListEnvelope, type Logger, type LoginBody, type LogoutBody, type OfficeLocation, 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, isConflict, isForbidden, isNotFound, isRateLimited, isUnauthorized, isValidationError };
|
package/dist/index.d.ts
CHANGED
|
@@ -345,6 +345,27 @@ interface PublicBoard {
|
|
|
345
345
|
theme: PublicBoardTheme | null;
|
|
346
346
|
}
|
|
347
347
|
|
|
348
|
+
/**
|
|
349
|
+
* The public SEO-infra payload (`board.seo()`). The four values a headless
|
|
350
|
+
* frontend rebuilds `robots.txt` / `ads.txt` / `indexnow-key.txt` (+ the Google
|
|
351
|
+
* site-verification `<meta>`) from — byte-identically to the hosted board.
|
|
352
|
+
*/
|
|
353
|
+
interface BoardSeo {
|
|
354
|
+
object: 'board_seo';
|
|
355
|
+
/** Verbatim `ads.txt` content, or `null` when not configured (the handler 404s). */
|
|
356
|
+
adsTxt: string | null;
|
|
357
|
+
/** IndexNow key-file content, or `null` when not configured (the handler 404s). */
|
|
358
|
+
indexNowKey: string | null;
|
|
359
|
+
/** Google site-verification token for the `<meta>` tag, or `null`. */
|
|
360
|
+
googleSiteVerification: string | null;
|
|
361
|
+
/**
|
|
362
|
+
* The board's canonical base URL (honours a configured custom domain). Build
|
|
363
|
+
* the `robots.txt` `Sitemap:` line (`${canonicalBase}/sitemap.xml`) and
|
|
364
|
+
* canonical links from it — NOT the request origin.
|
|
365
|
+
*/
|
|
366
|
+
canonicalBase: string;
|
|
367
|
+
}
|
|
368
|
+
|
|
348
369
|
/**
|
|
349
370
|
* Error raised for every non-2xx Board API response.
|
|
350
371
|
*
|
|
@@ -392,7 +413,7 @@ declare function isConflict(e: unknown): e is BoardApiError;
|
|
|
392
413
|
* constant because the package is platform-neutral and cannot read
|
|
393
414
|
* package.json at runtime.
|
|
394
415
|
*/
|
|
395
|
-
declare const SDK_VERSION = "1.
|
|
416
|
+
declare const SDK_VERSION = "1.2.0";
|
|
396
417
|
|
|
397
418
|
interface BoardUser {
|
|
398
419
|
id: string;
|
|
@@ -443,6 +464,19 @@ interface ResetPasswordBody {
|
|
|
443
464
|
password: string;
|
|
444
465
|
}
|
|
445
466
|
|
|
467
|
+
/**
|
|
468
|
+
* The result of resolving a path against the board's configured redirects
|
|
469
|
+
* (`board.redirects.resolve()`). A headless frontend 308s to `target`, or 404s
|
|
470
|
+
* when it's `null`.
|
|
471
|
+
*/
|
|
472
|
+
interface RedirectResolution {
|
|
473
|
+
object: 'redirect_resolution';
|
|
474
|
+
/** The path that was resolved. */
|
|
475
|
+
path: string;
|
|
476
|
+
/** The redirect target (board-relative), or `null` when no redirect matches. */
|
|
477
|
+
target: string | null;
|
|
478
|
+
}
|
|
479
|
+
|
|
446
480
|
/** Author shape embedded on posts (no `object` discriminator). */
|
|
447
481
|
interface BlogAuthorEmbed {
|
|
448
482
|
id: string;
|
|
@@ -652,6 +686,15 @@ declare function createBoardClient(options: CreateBoardClientOptions): {
|
|
|
652
686
|
* const { name, theme } = await board.context();
|
|
653
687
|
*/
|
|
654
688
|
context(options?: FetchOptions): Promise<PublicBoard>;
|
|
689
|
+
/**
|
|
690
|
+
* Board SEO infra — `ads.txt`, IndexNow key, Google site-verification, and
|
|
691
|
+
* the canonical base URL. Rebuild `robots.txt` / `ads.txt` /
|
|
692
|
+
* `indexnow-key.txt` from it.
|
|
693
|
+
*
|
|
694
|
+
* @example
|
|
695
|
+
* const { adsTxt, canonicalBase } = await board.seo();
|
|
696
|
+
*/
|
|
697
|
+
seo(options?: FetchOptions): Promise<BoardSeo>;
|
|
655
698
|
jobs: {
|
|
656
699
|
list(query?: JobsListQuery, options?: FetchOptions): Promise<JobCardListEnvelope>;
|
|
657
700
|
retrieve(jobSlug: string, query?: Record<string, never>, options?: FetchOptions): Promise<PublicJob>;
|
|
@@ -708,7 +751,10 @@ declare function createBoardClient(options: CreateBoardClientOptions): {
|
|
|
708
751
|
resolve(slug: string, options?: FetchOptions): Promise<TaxonomyResolution>;
|
|
709
752
|
};
|
|
710
753
|
};
|
|
754
|
+
redirects: {
|
|
755
|
+
resolve(path: string, options?: FetchOptions): Promise<RedirectResolution>;
|
|
756
|
+
};
|
|
711
757
|
};
|
|
712
758
|
type BoardSdk = ReturnType<typeof createBoardClient>;
|
|
713
759
|
|
|
714
|
-
export { ACCESS_TOKEN_KEY, type Awaitable, type BlogAuthorEmbed, type BlogPostsListQuery, type BlogSearchBody, type BlogTagEmbed, BoardApiError, type BoardAuthSession, BoardClient, type BoardRequest, type BoardSdk, type BoardUser, type CompaniesListQuery, type CompaniesSearchBody, type CompanyJobsListQuery, type CreateBoardClientOptions, type CustomStorage, type EducationRequirement, type EmploymentType, type FetchOptions, type ForgotPasswordBody, type JobCardListEnvelope, type JobCardSearchEnvelope, type JobCompany, type JobsListQuery, type JobsSearchBody, type ListEnvelope, type Logger, type LoginBody, type LogoutBody, type OfficeLocation, 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 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, isConflict, isForbidden, isNotFound, isRateLimited, isUnauthorized, isValidationError };
|
|
760
|
+
export { ACCESS_TOKEN_KEY, type Awaitable, type BlogAuthorEmbed, type BlogPostsListQuery, type BlogSearchBody, type BlogTagEmbed, 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 EmploymentType, type FetchOptions, type ForgotPasswordBody, type JobCardListEnvelope, type JobCardSearchEnvelope, type JobCompany, type JobsListQuery, type JobsSearchBody, type ListEnvelope, type Logger, type LoginBody, type LogoutBody, type OfficeLocation, 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, isConflict, isForbidden, isNotFound, isRateLimited, isUnauthorized, isValidationError };
|
package/dist/index.js
CHANGED
|
@@ -143,7 +143,7 @@ async function clearSession(storage) {
|
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
// src/version.ts
|
|
146
|
-
var SDK_VERSION = "1.
|
|
146
|
+
var SDK_VERSION = "1.2.0";
|
|
147
147
|
|
|
148
148
|
// src/client.ts
|
|
149
149
|
function isRawBody(body) {
|
|
@@ -625,6 +625,26 @@ function meNamespace(client) {
|
|
|
625
625
|
};
|
|
626
626
|
}
|
|
627
627
|
|
|
628
|
+
// src/namespaces/redirects.ts
|
|
629
|
+
function redirectsNamespace(client) {
|
|
630
|
+
return {
|
|
631
|
+
/**
|
|
632
|
+
* Resolve a board-relative path against the board's configured redirects —
|
|
633
|
+
* the same resolution the hosted board's catch-all performs. 308 to
|
|
634
|
+
* `target`, or 404 when `target` is `null`.
|
|
635
|
+
*
|
|
636
|
+
* @example
|
|
637
|
+
* const { target } = await board.redirects.resolve('/old-jobs')
|
|
638
|
+
*/
|
|
639
|
+
resolve(path, options) {
|
|
640
|
+
return client.fetch("/redirects/resolve", {
|
|
641
|
+
...options,
|
|
642
|
+
query: { path }
|
|
643
|
+
});
|
|
644
|
+
}
|
|
645
|
+
};
|
|
646
|
+
}
|
|
647
|
+
|
|
628
648
|
// src/namespaces/taxonomy.ts
|
|
629
649
|
function taxonomyResolver(client, kind) {
|
|
630
650
|
return {
|
|
@@ -681,11 +701,23 @@ function createBoardClient(options) {
|
|
|
681
701
|
context(options2) {
|
|
682
702
|
return client.fetch("", options2);
|
|
683
703
|
},
|
|
704
|
+
/**
|
|
705
|
+
* Board SEO infra — `ads.txt`, IndexNow key, Google site-verification, and
|
|
706
|
+
* the canonical base URL. Rebuild `robots.txt` / `ads.txt` /
|
|
707
|
+
* `indexnow-key.txt` from it.
|
|
708
|
+
*
|
|
709
|
+
* @example
|
|
710
|
+
* const { adsTxt, canonicalBase } = await board.seo();
|
|
711
|
+
*/
|
|
712
|
+
seo(options2) {
|
|
713
|
+
return client.fetch("/seo", options2);
|
|
714
|
+
},
|
|
684
715
|
jobs: jobsNamespace(client),
|
|
685
716
|
companies: companiesNamespace(client),
|
|
686
717
|
blog: blogNamespace(client),
|
|
687
718
|
auth: authNamespace(client),
|
|
688
719
|
me: meNamespace(client),
|
|
689
|
-
taxonomy: taxonomyNamespace(client)
|
|
720
|
+
taxonomy: taxonomyNamespace(client),
|
|
721
|
+
redirects: redirectsNamespace(client)
|
|
690
722
|
};
|
|
691
723
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -105,7 +105,7 @@ async function clearSession(storage) {
|
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
// src/version.ts
|
|
108
|
-
var SDK_VERSION = "1.
|
|
108
|
+
var SDK_VERSION = "1.2.0";
|
|
109
109
|
|
|
110
110
|
// src/client.ts
|
|
111
111
|
function isRawBody(body) {
|
|
@@ -587,6 +587,26 @@ function meNamespace(client) {
|
|
|
587
587
|
};
|
|
588
588
|
}
|
|
589
589
|
|
|
590
|
+
// src/namespaces/redirects.ts
|
|
591
|
+
function redirectsNamespace(client) {
|
|
592
|
+
return {
|
|
593
|
+
/**
|
|
594
|
+
* Resolve a board-relative path against the board's configured redirects —
|
|
595
|
+
* the same resolution the hosted board's catch-all performs. 308 to
|
|
596
|
+
* `target`, or 404 when `target` is `null`.
|
|
597
|
+
*
|
|
598
|
+
* @example
|
|
599
|
+
* const { target } = await board.redirects.resolve('/old-jobs')
|
|
600
|
+
*/
|
|
601
|
+
resolve(path, options) {
|
|
602
|
+
return client.fetch("/redirects/resolve", {
|
|
603
|
+
...options,
|
|
604
|
+
query: { path }
|
|
605
|
+
});
|
|
606
|
+
}
|
|
607
|
+
};
|
|
608
|
+
}
|
|
609
|
+
|
|
590
610
|
// src/namespaces/taxonomy.ts
|
|
591
611
|
function taxonomyResolver(client, kind) {
|
|
592
612
|
return {
|
|
@@ -643,12 +663,24 @@ function createBoardClient(options) {
|
|
|
643
663
|
context(options2) {
|
|
644
664
|
return client.fetch("", options2);
|
|
645
665
|
},
|
|
666
|
+
/**
|
|
667
|
+
* Board SEO infra — `ads.txt`, IndexNow key, Google site-verification, and
|
|
668
|
+
* the canonical base URL. Rebuild `robots.txt` / `ads.txt` /
|
|
669
|
+
* `indexnow-key.txt` from it.
|
|
670
|
+
*
|
|
671
|
+
* @example
|
|
672
|
+
* const { adsTxt, canonicalBase } = await board.seo();
|
|
673
|
+
*/
|
|
674
|
+
seo(options2) {
|
|
675
|
+
return client.fetch("/seo", options2);
|
|
676
|
+
},
|
|
646
677
|
jobs: jobsNamespace(client),
|
|
647
678
|
companies: companiesNamespace(client),
|
|
648
679
|
blog: blogNamespace(client),
|
|
649
680
|
auth: authNamespace(client),
|
|
650
681
|
me: meNamespace(client),
|
|
651
|
-
taxonomy: taxonomyNamespace(client)
|
|
682
|
+
taxonomy: taxonomyNamespace(client),
|
|
683
|
+
redirects: redirectsNamespace(client)
|
|
652
684
|
};
|
|
653
685
|
}
|
|
654
686
|
export {
|