@cavuno/board 4.30.0 → 4.31.1

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.
Files changed (46) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/{_spec-CuSpfit_.d.mts → _spec-BD5My4zL.d.mts} +76 -0
  3. package/dist/{_spec-CuSpfit_.d.ts → _spec-BD5My4zL.d.ts} +76 -0
  4. package/dist/bin.mjs +31 -8
  5. package/dist/{blog-CvQeoBc8.d.ts → blog-CcLmN5Tw.d.ts} +1 -1
  6. package/dist/{blog-21XnewAu.d.mts → blog-Dh-Ru5QZ.d.mts} +1 -1
  7. package/dist/{board-t_j16FrX.d.ts → board-BRWS1m6D.d.mts} +16 -3
  8. package/dist/{board-VrjkKuZ-.d.mts → board-CF66EdYi.d.ts} +16 -3
  9. package/dist/{breadcrumbs-BpONykkn.d.mts → breadcrumbs-AEupw3fi.d.mts} +2 -2
  10. package/dist/{breadcrumbs-CJ5eu_ye.d.ts → breadcrumbs-Bu1lN6qA.d.ts} +2 -2
  11. package/dist/browser/cavuno-board.global.min.js +1 -1
  12. package/dist/{chunk-EHSB2VAJ.mjs → chunk-WSO6JN5C.mjs} +37 -1
  13. package/dist/doctor.js +31 -8
  14. package/dist/doctor.mjs +31 -8
  15. package/dist/filters.d.mts +2 -2
  16. package/dist/filters.d.ts +2 -2
  17. package/dist/format.d.mts +4 -4
  18. package/dist/format.d.ts +4 -4
  19. package/dist/index.d.mts +238 -13
  20. package/dist/index.d.ts +238 -13
  21. package/dist/index.js +250 -5
  22. package/dist/index.mjs +222 -6
  23. package/dist/{jobs-h-ewgbXn.d.mts → jobs-BPTMfkal.d.mts} +1 -1
  24. package/dist/{jobs-CErce8Tw.d.ts → jobs-BbtjrUo2.d.ts} +1 -1
  25. package/dist/{search-BefsJD_f.d.mts → search-CIjAdPR-.d.mts} +1 -1
  26. package/dist/{search-B2LdM6bj.d.ts → search-CqPIHkv8.d.ts} +1 -1
  27. package/dist/{seo-BFQIA81t.d.mts → seo-BypmVm97.d.mts} +1 -1
  28. package/dist/{seo-BPDNxOiZ.d.ts → seo-C-NQ0T9w.d.ts} +1 -1
  29. package/dist/seo-files.d.mts +2 -2
  30. package/dist/seo-files.d.ts +2 -2
  31. package/dist/seo.d.mts +6 -6
  32. package/dist/seo.d.ts +6 -6
  33. package/dist/server.d.mts +27 -22
  34. package/dist/server.d.ts +27 -22
  35. package/dist/server.js +8 -13
  36. package/dist/server.mjs +9 -14
  37. package/dist/sitemap.d.mts +6 -6
  38. package/dist/sitemap.d.ts +6 -6
  39. package/dist/sitemap.mjs +1 -1
  40. package/dist/suggest.d.mts +2 -2
  41. package/dist/suggest.d.ts +2 -2
  42. package/package.json +1 -1
  43. package/skills/cavuno-board-auth/SKILL.md +1 -1
  44. package/skills/cavuno-board-server-sessions/SKILL.md +5 -5
  45. package/skills/cavuno-board-setup/SKILL.md +1 -1
  46. package/skills/manifest.json +2 -2
package/dist/index.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- import { S as Schemas, c as components } from './_spec-CuSpfit_.js';
2
- import { F as FetchOptions, S as StorageMode, B as BoardRequest, A as Awaitable, L as Logger, a as BoardClient, b as SearchSuggestQuery } from './search-B2LdM6bj.js';
3
- export { c as ACCESS_TOKEN_KEY, d as BOARD_ACCESS_GRANT_KEY, C as CompanySuggestion, e as CustomStorage, M as MarketSuggestion, R as REFRESH_TOKEN_KEY, f as SearchSuggestType, g as SuggestResult, h as SuggestionItem, T as TermSuggestion } from './search-B2LdM6bj.js';
4
- import { c as CompaniesListQuery, d as CompanyListEnvelope, e as CompaniesSearchBody, f as CompanyJobsListQuery, g as CompanySimilarQuery, h as CompanyMarketsListQuery, i as SalaryDetailQuery } from './board-t_j16FrX.js';
5
- export { B as BoardFormBuiltinField, j as BoardFormField, k as BoardFormLayout, l as BoardFormLockReason, m as BoardJobFormField, n as BoardProfileFormField, a as CompanyCategorySalary, o as CompanyMarket, p as CompanyMarketRef, b as CompanySalary, q as CompanySalarySummary, C as CustomFieldDefinition, r as CustomFieldOption, s as CustomFieldType, L as LocationSalaryDetail, t as LocationSkillsIndex, u as LocationTitlesIndex, P as PublicBoard, v as PublicBoardAds, w as PublicBoardAnalytics, x as PublicBoardFeatures, y as PublicBoardJobForm, z as PublicCompany, A as PublicCompanyDetail, D as PublicCompanyMembership, E as SalaryCompany, F as SalaryLocation, G as SalarySkill, H as SalaryTitle, I as SkillLocationSalary, J as SkillLocationsIndex, S as SkillSalaryDetail, K as TitleLocationSalary, M as TitleLocationsIndex, T as TitleSalaryDetail } from './board-t_j16FrX.js';
6
- export { B as BoardSeo } from './seo-BPDNxOiZ.js';
7
- import { R as RemoteOption, E as EmploymentType, S as Seniority, a as CustomFieldFilter, O as ObjectReferenceFilter, L as ListEnvelope, b as JobCollectionChoiceQuery, c as JobsListQuery, d as JobCardListEnvelope, e as JobsSearchBody, f as JobCardSearchEnvelope, g as JobsSimilarQuery, h as SearchEnvelope } from './jobs-CErce8Tw.js';
8
- export { i as CustomFieldValue, C as CustomFieldValues, j as CustomFilterValue, k as EducationRequirement, l as JobCatalogPagination, m as JobCollectionChoiceList, n as JobCollectionFieldDefinition, o as JobCompany, J as JobSort, p as OfficeLocation, q as OffsetPagination, P as PublicJob, r as PublicJobCard, s as RelatedSearch, t as RemotePermit, u as RemoteTimezone, v as ResolvedJobCollectionField, w as StorefrontPagination } from './jobs-CErce8Tw.js';
9
- import { a as BlogPostsListQuery, b as BlogSimilarQuery, c as BlogSearchBody } from './blog-CvQeoBc8.js';
10
- export { B as BlogAuthorEmbed, d as BlogTagEmbed, e as PublicBlogAdjacentPosts, f as PublicBlogAuthor, g as PublicBlogPost, P as PublicBlogPostSummary, h as PublicBlogTag } from './blog-CvQeoBc8.js';
1
+ import { S as Schemas, c as components } from './_spec-BD5My4zL.js';
2
+ import { F as FetchOptions, S as StorageMode, B as BoardRequest, A as Awaitable, L as Logger, a as BoardClient, b as SearchSuggestQuery } from './search-CqPIHkv8.js';
3
+ export { c as ACCESS_TOKEN_KEY, d as BOARD_ACCESS_GRANT_KEY, C as CompanySuggestion, e as CustomStorage, M as MarketSuggestion, R as REFRESH_TOKEN_KEY, f as SearchSuggestType, g as SuggestResult, h as SuggestionItem, T as TermSuggestion } from './search-CqPIHkv8.js';
4
+ import { c as CompaniesListQuery, d as CompanyListEnvelope, e as CompaniesSearchBody, f as CompanyJobsListQuery, g as CompanySimilarQuery, h as CompanyMarketsListQuery, i as SalaryDetailQuery } from './board-CF66EdYi.js';
5
+ export { B as BoardFormBuiltinField, j as BoardFormField, k as BoardFormLayout, l as BoardFormLockReason, m as BoardJobFormField, n as BoardProfileFormField, o as BoardRoleSignIn, p as BoardSignInSsoConnection, a as CompanyCategorySalary, q as CompanyMarket, r as CompanyMarketRef, b as CompanySalary, s as CompanySalarySummary, C as CustomFieldDefinition, t as CustomFieldOption, u as CustomFieldType, L as LocationSalaryDetail, v as LocationSkillsIndex, w as LocationTitlesIndex, P as PublicBoard, x as PublicBoardAds, y as PublicBoardAnalytics, z as PublicBoardFeatures, A as PublicBoardJobForm, D as PublicBoardSignIn, E as PublicCompany, F as PublicCompanyDetail, G as PublicCompanyMembership, H as SalaryCompany, I as SalaryLocation, J as SalarySkill, K as SalaryTitle, M as SkillLocationSalary, N as SkillLocationsIndex, S as SkillSalaryDetail, O as TitleLocationSalary, Q as TitleLocationsIndex, T as TitleSalaryDetail } from './board-CF66EdYi.js';
6
+ export { B as BoardSeo } from './seo-C-NQ0T9w.js';
7
+ import { R as RemoteOption, E as EmploymentType, S as Seniority, a as CustomFieldFilter, O as ObjectReferenceFilter, L as ListEnvelope, b as JobCollectionChoiceQuery, c as JobsListQuery, d as JobCardListEnvelope, e as JobsSearchBody, f as JobCardSearchEnvelope, g as JobsSimilarQuery, h as SearchEnvelope } from './jobs-BbtjrUo2.js';
8
+ export { i as CustomFieldValue, C as CustomFieldValues, j as CustomFilterValue, k as EducationRequirement, l as JobCatalogPagination, m as JobCollectionChoiceList, n as JobCollectionFieldDefinition, o as JobCompany, J as JobSort, p as OfficeLocation, q as OffsetPagination, P as PublicJob, r as PublicJobCard, s as RelatedSearch, t as RemotePermit, u as RemoteTimezone, v as ResolvedJobCollectionField, w as StorefrontPagination } from './jobs-BbtjrUo2.js';
9
+ import { a as BlogPostsListQuery, b as BlogSimilarQuery, c as BlogSearchBody } from './blog-CcLmN5Tw.js';
10
+ export { B as BlogAuthorEmbed, d as BlogTagEmbed, e as PublicBlogAdjacentPosts, f as PublicBlogAuthor, g as PublicBlogPost, P as PublicBlogPostSummary, h as PublicBlogTag } from './blog-CcLmN5Tw.js';
11
11
 
12
12
  /**
13
13
  * Well-known `<domain>_<snake_reason>` codes the Board API sends, grouped by
@@ -20,7 +20,7 @@ export { B as BlogAuthorEmbed, d as BlogTagEmbed, e as PublicBlogAdjacentPosts,
20
20
  * `unknown_error` is SDK-synthesized when a response carries no parseable
21
21
  * envelope.
22
22
  */
23
- declare const BOARD_API_ERROR_CODES: readonly ["internal_error", "validation_bad_request", "validation_payload_too_large", "rate_limited", "rate_limit_unavailable", "search_unavailable", "search_filter_unavailable", "too_many_filter_values", "pagination_invalid_cursor", "pagination_offset_too_large", "auth_unauthenticated", "auth_forbidden", "plan_upgrade_required", "unknown_error", "boards_not_found", "board_page_not_found", "board_auth_account_not_found", "board_auth_email_taken", "board_auth_invalid_credentials", "board_auth_invalid_token", "board_auth_registration_disabled", "board_auth_token_expired", "invalid_current_password", "no_password", "same_email", "email_taken", "invalid_token", "board_password_required", "board_password_invalid", "jobs_not_found", "jobs_invalid_filter", "categories_not_found", "skills_not_found", "places_not_found", "locations_invalid_id", "locations_unavailable", "companies_not_found", "company_markets_not_found", "company_salary_not_found", "company_category_salary_not_found", "salaries_title_not_found", "salaries_skill_not_found", "salaries_location_not_found", "salaries_title_location_not_found", "salaries_skill_location_not_found", "blog_post_not_found", "blog_author_not_found", "blog_tag_not_found", "talent_not_found", "talent_directory_not_found", "talent_directory_restricted", "job_recommendations_not_found", "recommended_talent_not_found", "job_alert_not_found", "job_alerts_disabled", "candidate_alert_limit_reached", "candidate_alert_not_found", "candidate_entry_not_found", "candidate_handle_taken", "candidate_job_not_found", "candidate_notification_preference_paused", "candidate_profile_required", "resume_invalid_file", "resume_upload_forbidden", "applications_external_apply_only", "applications_country_not_allowed", "applications_guest_not_allowed", "applications_job_not_found", "applications_not_found", "applications_resume_invalid_file", "applications_unprocessable", "messaging_application_not_found", "messaging_application_not_linked", "messaging_blocked", "messaging_cannot_block_self", "messaging_cold_rule", "messaging_conversation_not_found", "messaging_disabled", "messaging_edit_window_expired", "messaging_message_deleted", "messaging_message_not_found", "messaging_not_author", "messaging_not_participant", "messaging_not_permitted", "messaging_not_recipient", "messaging_rate_limited", "messaging_recipient_not_found", "messaging_recipient_not_open", "messaging_unsend_window_expired", "employer_applicant_not_found", "employer_ats_unprocessable", "employer_checkout_failed", "employer_company_exists", "employer_free_email_website", "employer_company_name_taken", "employer_company_not_found", "employer_job_not_found", "employer_job_slug_taken", "employer_jobs_quota_exceeded", "membership_required", "employer_not_member", "employer_payment_required", "employer_pipeline_stage_not_found", "employer_member_not_found", "employer_invite_not_found", "not_company_admin", "not_company_member", "company_deletion_disabled", "last_admin", "already_member", "already_invited", "invalid_email", "invite_email_mismatch", "candidate_role", "job_not_published", "talent_list_not_found", "sourced_candidate_not_found", "sourced_convert_unavailable", "candidate_paywall_access_required", "paywall_already_active", "paywall_disabled", "paywall_invalid_checkout_session", "paywall_no_candidate_profile", "paywall_no_recurring_subscription", "paywall_offer_not_found", "talent_access_unavailable", "company_required", "already_on_plan", "talent_access_required", "messaging_talent_access_required", "stripe_not_connected", "membership_plan_not_found", "membership_seat_taken", "job_posting_logo_lookup_unavailable", "job_posting_logo_not_found", "job_posting_rejected"];
23
+ declare const BOARD_API_ERROR_CODES: readonly ["internal_error", "validation_bad_request", "validation_payload_too_large", "rate_limited", "rate_limit_unavailable", "search_unavailable", "search_filter_unavailable", "too_many_filter_values", "pagination_invalid_cursor", "pagination_offset_too_large", "auth_unauthenticated", "auth_forbidden", "plan_upgrade_required", "unknown_error", "boards_not_found", "board_page_not_found", "board_auth_account_not_found", "board_auth_email_taken", "board_auth_invalid_credentials", "board_auth_invalid_token", "board_auth_registration_disabled", "board_auth_token_expired", "board_development_origin_not_allowed_for_email", "board_development_origin_not_registered", "board_development_origin_requires_publishable_key", "sso_required", "board_auth_method_unavailable", "board_auth_sso_connection_not_found", "board_auth_sso_role_unavailable", "board_auth_sso_provider_unavailable", "board_auth_sso_browser_mismatch", "board_auth_sso_not_provisioned", "board_auth_sso_identity_linked_elsewhere", "invalid_current_password", "no_password", "same_email", "email_taken", "invalid_token", "board_password_required", "board_password_invalid", "jobs_not_found", "jobs_invalid_filter", "categories_not_found", "skills_not_found", "places_not_found", "locations_invalid_id", "locations_unavailable", "companies_not_found", "company_markets_not_found", "company_salary_not_found", "company_category_salary_not_found", "salaries_title_not_found", "salaries_skill_not_found", "salaries_location_not_found", "salaries_title_location_not_found", "salaries_skill_location_not_found", "blog_post_not_found", "blog_author_not_found", "blog_tag_not_found", "feeds_not_found", "feed_not_ready", "talent_not_found", "talent_directory_not_found", "talent_directory_restricted", "job_recommendations_not_found", "recommended_talent_not_found", "job_alert_not_found", "job_alerts_disabled", "candidate_alert_limit_reached", "candidate_alert_not_found", "candidate_entry_not_found", "candidate_handle_taken", "candidate_job_not_found", "candidate_notification_preference_paused", "candidate_profile_required", "resume_invalid_file", "resume_upload_forbidden", "applications_external_apply_only", "applications_country_not_allowed", "applications_guest_not_allowed", "applications_job_not_found", "applications_not_found", "applications_resume_invalid_file", "applications_unprocessable", "messaging_application_not_found", "messaging_application_not_linked", "messaging_blocked", "messaging_cannot_block_self", "messaging_cold_rule", "messaging_conversation_not_found", "messaging_disabled", "messaging_edit_window_expired", "messaging_message_deleted", "messaging_message_not_found", "messaging_not_author", "messaging_not_participant", "messaging_not_permitted", "messaging_not_recipient", "messaging_rate_limited", "messaging_recipient_not_found", "messaging_recipient_not_open", "messaging_unsend_window_expired", "employer_applicant_not_found", "employer_ats_unprocessable", "employer_checkout_failed", "employer_company_exists", "employer_free_email_website", "employer_company_name_taken", "employer_company_not_found", "employer_job_not_found", "employer_job_slug_taken", "employer_jobs_quota_exceeded", "membership_required", "employer_not_member", "employer_payment_required", "employer_pipeline_stage_not_found", "employer_member_not_found", "employer_invite_not_found", "not_company_admin", "not_company_member", "company_deletion_disabled", "last_admin", "already_member", "already_invited", "invalid_email", "invite_email_mismatch", "candidate_role", "job_not_published", "talent_list_not_found", "sourced_candidate_not_found", "sourced_convert_unavailable", "candidate_paywall_access_required", "paywall_already_active", "paywall_disabled", "paywall_invalid_checkout_session", "paywall_no_candidate_profile", "paywall_no_recurring_subscription", "paywall_offer_not_found", "talent_access_unavailable", "company_required", "already_on_plan", "talent_access_required", "messaging_talent_access_required", "stripe_not_connected", "membership_plan_not_found", "membership_seat_taken", "job_posting_logo_lookup_unavailable", "job_posting_logo_not_found", "job_posting_rejected"];
24
24
  /**
25
25
  * The known code set plus open string — new codes ship additively within v1,
26
26
  * so exhaustive narrowing is intentionally impossible.
@@ -87,6 +87,58 @@ declare function isConflict(e: unknown): e is BoardApiError;
87
87
  * (or omit website), not retry the same domain.
88
88
  */
89
89
  declare function isFreeEmailWebsiteError(e: unknown): e is BoardApiError;
90
+ /** Built-in sign-in method keys, as used in `signIn.<role>.methods`. */
91
+ type BuiltInSignInMethod = 'password' | 'magicLink' | 'google' | 'linkedin';
92
+ /**
93
+ * What a role can sign in with instead, from
94
+ * `board_auth_method_unavailable` → `details.availableMethods`.
95
+ */
96
+ interface AvailableSignInMethods {
97
+ /**
98
+ * Built-in methods switched on for the role. Kept open: new method keys
99
+ * may ship, so ignore any you do not render.
100
+ */
101
+ methods: Array<BuiltInSignInMethod | (string & {})>;
102
+ /** SSO connections switched on for the role. */
103
+ ssoConnectionIds: string[];
104
+ }
105
+ /** @deprecated Use isSignInMethodUnavailable and details.availableMethods. */
106
+ declare function isSsoRequired(e: unknown): e is BoardApiError & {
107
+ details: {
108
+ connectionIds: string[];
109
+ };
110
+ };
111
+ /**
112
+ * The sign-in method is switched off for the role being signed into
113
+ * (`board_auth_method_unavailable`, 403). Password, magic link, Google,
114
+ * LinkedIn and SSO can each be switched off per role, so any sign-in call
115
+ * may be refused. `details.availableMethods` lists what the role can use
116
+ * instead: built-in `methods` and `ssoConnectionIds` — match the ids
117
+ * against `signIn.<role>.ssoConnections` from `board.context()`. Both lists
118
+ * are empty when the role has no way to sign in.
119
+ *
120
+ * @example
121
+ * try {
122
+ * await board.auth.login({ email, password });
123
+ * } catch (e) {
124
+ * if (isSignInMethodUnavailable(e)) {
125
+ * const { methods, ssoConnectionIds } = e.details.availableMethods;
126
+ * showSignInOptions(methods, ssoConnectionIds);
127
+ * } else throw e;
128
+ * }
129
+ */
130
+ declare function isSignInMethodUnavailable(e: unknown): e is BoardApiError & {
131
+ details: {
132
+ availableMethods: AvailableSignInMethods;
133
+ };
134
+ };
135
+ /**
136
+ * An SSO link-proof link was opened in a different browser than the one
137
+ * that started the sign-in (`board_auth_sso_browser_mismatch`, 403). Ask
138
+ * the user to open the link on the device where they started signing in;
139
+ * the emailed link stays usable there.
140
+ */
141
+ declare function isSsoBrowserMismatch(e: unknown): e is BoardApiError;
90
142
 
91
143
  /** The minimal page shape every v1 list/search envelope satisfies. */
92
144
  interface PageShape {
@@ -150,7 +202,7 @@ declare function paginate<Q extends Record<string, unknown>, P extends PageShape
150
202
  * constant because the package is platform-neutral and cannot read
151
203
  * package.json at runtime.
152
204
  */
153
- declare const SDK_VERSION = "4.30.0";
205
+ declare const SDK_VERSION = "4.31.1";
154
206
 
155
207
  type SavedJob = Schemas['SavedJob'];
156
208
  type SavedJobsListQuery = {
@@ -605,6 +657,126 @@ declare function resolveApplyDecision(state: ApplyDecisionState): ApplyAction;
605
657
  */
606
658
  declare function resolveApplyAction(state: Omit<ApplyDecisionState, 'registrationWall' | 'allowGuestApply'>): ApplyAction;
607
659
 
660
+ /**
661
+ * Helpers for the pages a headless board serves around an OAuth or SSO
662
+ * sign-in: `/auth/oauth-complete` (where the provider round trip lands) and
663
+ * `/auth/sign-in?error=…` (where it lands on failure). Pure and
664
+ * framework-neutral; nothing here performs a request or navigates.
665
+ */
666
+ type SignInRole = 'candidate' | 'employer';
667
+ /**
668
+ * `error=` codes a sign-in redirect can land on `/auth/sign-in` with. Google
669
+ * and LinkedIn use the `oauth_*` codes, SSO connections the `sso_*` ones;
670
+ * `role_disabled` comes from either. `method_unavailable` means the method
671
+ * is switched off for the user's role: offer the methods listed in
672
+ * `signIn.<role>` from `board.context()` instead. Kept open like
673
+ * `BoardApiErrorCode`: new codes may ship, so render a generic message for
674
+ * anything unlisted.
675
+ */
676
+ declare const SIGN_IN_REDIRECT_ERROR_CODES: readonly ["oauth_cancelled", "oauth_failed", "oauth_email_unverified", "role_disabled", "method_unavailable", "sso_required", "sso_state_invalid", "sso_cancelled", "sso_failed", "sso_connection_unavailable", "sso_not_provisioned", "sso_email_required", "sso_account_disabled", "sso_identity_linked_elsewhere", "sso_link_proof_rate_limited", "sso_development_origin_not_allowed_for_email"];
677
+ type SignInRedirectErrorCode = (typeof SIGN_IN_REDIRECT_ERROR_CODES)[number] | (string & {});
678
+ /**
679
+ * What a completion URL asks the page to do.
680
+ *
681
+ * - `token`: exchange it with `board.auth.exchangeOAuth({ token })`.
682
+ * - `link_proof_sent`: the provider did not vouch for the email of an
683
+ * existing account, so a confirmation email is on its way. Keep the secret established before authorization in this browser and
684
+ * tell the user to check their inbox.
685
+ * - `link_proof`: the user opened that email. Call
686
+ * `board.auth.consumeSsoLinkProof` with `linkProof` and the stored binding.
687
+ * - `error`: the sign-in failed with `error` (see
688
+ * `SIGN_IN_REDIRECT_ERROR_CODES`).
689
+ * - `invalid`: none of the above; show a generic failure.
690
+ *
691
+ * `returnTo` is always a same-origin path (`/` when absent or unsafe), so it
692
+ * is safe to redirect to.
693
+ */
694
+ type OAuthCompletion = {
695
+ kind: 'token';
696
+ token: string;
697
+ /** `google`, `linkedin` or `sso`; `null` when absent. */
698
+ method: string | null;
699
+ role: SignInRole | null;
700
+ returnTo: string;
701
+ /** True when this sign-in created the account. */
702
+ isNewUser: boolean;
703
+ } | {
704
+ kind: 'link_proof_sent';
705
+ linkProofBinding: string;
706
+ role: SignInRole | null;
707
+ returnTo: string;
708
+ } | {
709
+ kind: 'link_proof';
710
+ linkProof: string;
711
+ role: SignInRole | null;
712
+ returnTo: string;
713
+ } | {
714
+ kind: 'error';
715
+ error: SignInRedirectErrorCode;
716
+ returnTo: string;
717
+ } | {
718
+ kind: 'invalid';
719
+ returnTo: string;
720
+ };
721
+ /**
722
+ * Read the query of an `/auth/oauth-complete` (or `/auth/sign-in?error=`)
723
+ * request into one discriminated result. Accepts `URLSearchParams`, a full
724
+ * URL or query string, or a plain record (framework search-param objects).
725
+ *
726
+ * @example
727
+ * const completion = parseOAuthCompletion(new URL(request.url).searchParams);
728
+ * switch (completion.kind) {
729
+ * case 'token':
730
+ * await board.auth.exchangeOAuth({ token: completion.token });
731
+ * return redirect(completion.returnTo);
732
+ * case 'link_proof_sent':
733
+ * // Keep the secret established before authorization. Never save URL bindings.
734
+ * return showCheckYourEmail();
735
+ * // …
736
+ * }
737
+ */
738
+ declare function parseOAuthCompletion(input: URLSearchParams | string | Record<string, string | undefined>): OAuthCompletion;
739
+ /**
740
+ * Browser-secret retention from initiation: ten minutes for authorization
741
+ * plus fifteen minutes for a proof email issued at callback. This does not
742
+ * extend the proof token's own fifteen-minute validity.
743
+ */
744
+ declare const SSO_LINK_PROOF_BINDING_TTL_MS: number;
745
+ /** The subset of Web Storage the binding store needs. */
746
+ interface BindingStorage {
747
+ getItem(key: string): string | null;
748
+ setItem(key: string, value: string): void;
749
+ removeItem(key: string): void;
750
+ }
751
+ interface SsoLinkProofBindingStore {
752
+ /** Establish a random secret in this browser BEFORE requesting authorization. */
753
+ begin(): string;
754
+ /** @deprecated Completion URLs cannot install or replace the initiating browser secret. */
755
+ save(linkProofBinding: string): void;
756
+ /** The stored binding, or `null` when absent or older than 25 minutes from initiation. */
757
+ read(): string | null;
758
+ /** Forget the binding (after the proof is consumed). */
759
+ clear(): void;
760
+ }
761
+ /**
762
+ * Where the browser that started an SSO sign-in keeps its link-proof
763
+ * secret before authorization and until the user opens the confirmation email.
764
+ * Uses `localStorage` by default, because the email link usually opens in a
765
+ * new tab (which `sessionStorage` would not share). Scoped per board, expires
766
+ * 25 minutes after initiation to cover authorization and the later proof email.
767
+ * Where storage is unavailable (server rendering, blocked storage), `begin()`
768
+ * refuses before authorization and `read()` returns `null`. The proof token
769
+ * itself remains valid for fifteen minutes after it is issued at callback.
770
+ *
771
+ * @example
772
+ * // Before requesting authorization (the SDK does this automatically):
773
+ * ssoLinkProofBindingStore(boardKey).begin();
774
+ */
775
+ declare function ssoLinkProofBindingStore(board: string, options?: {
776
+ storage?: BindingStorage;
777
+ now?: () => number;
778
+ }): SsoLinkProofBindingStore;
779
+
608
780
  type BoardUser = Schemas['BoardUser'];
609
781
  type BoardAuthSession = Schemas['BoardAuthSession'];
610
782
  type RegisterBody = Schemas['BoardAuthRegisterBody'];
@@ -627,9 +799,45 @@ type OAuthAuthorizationQuery = {
627
799
  * role is fixed at authorize time and cannot be changed on the callback.
628
800
  */
629
801
  role?: 'candidate' | 'employer';
802
+ /**
803
+ * Complete sign-in on one of the board's development origins instead of
804
+ * its production origin, for example `window.location.origin` while you
805
+ * run the frontend on `http://localhost:5173`. The origin must be
806
+ * registered for the board (Settings → SDK → Development origins, or the
807
+ * Operator API); otherwise the call fails with
808
+ * `board_development_origin_not_registered`. Only accepted when the client
809
+ * identifies the board with a publishable key (`pk_...`); otherwise the
810
+ * call fails with `board_development_origin_requires_publishable_key`.
811
+ */
812
+ developmentOrigin?: string;
630
813
  };
631
814
  type OAuthAuthorizationUrl = Schemas['BoardAuthOAuthAuthorizationUrl'];
632
815
  type OAuthExchangeBody = Schemas['BoardAuthOAuthExchangeBody'];
816
+ type SsoAuthorizationQuery = {
817
+ /** SHA-256 hex of a secret already established in the initiating browser. The browser SDK supplies this automatically; server callers must retain the raw secret securely for completion. */
818
+ browserBindingHash?: string;
819
+ /** Board-relative path to land on after sign-in; defaults to `/`. */
820
+ returnTo?: string;
821
+ /**
822
+ * Role being signed into; defaults to `candidate`. Also the role profile
823
+ * created when the sign-in makes a NEW user.
824
+ */
825
+ role?: 'candidate' | 'employer';
826
+ /**
827
+ * Complete sign-in on one of the board's development origins instead of
828
+ * its production origin, for example `window.location.origin` while you
829
+ * run the frontend on `http://localhost:5173`. Same rules as
830
+ * `OAuthAuthorizationQuery.developmentOrigin`: the origin must be
831
+ * registered for the board, and the client must identify the board with a
832
+ * publishable key (`pk_...`). When an existing account has to confirm its
833
+ * inbox first, the confirmation email is an email link, so it can only
834
+ * target a localhost development origin; elsewhere that sign-in lands on
835
+ * `/auth/sign-in?error=sso_development_origin_not_allowed_for_email`.
836
+ */
837
+ developmentOrigin?: string;
838
+ };
839
+ type SsoAuthorizationUrl = Schemas['BoardAuthSsoAuthorizationUrl'];
840
+ type SsoLinkProofBody = Schemas['BoardAuthSsoLinkProofBody'];
633
841
 
634
842
  type EmbedJobsQuery = {
635
843
  /** Free-text search query, up to 200 characters. */
@@ -1027,6 +1235,10 @@ declare function createBoardClient(options: CreateBoardClientOptions): {
1027
1235
  posting: {
1028
1236
  requiresMembership: boolean;
1029
1237
  };
1238
+ signIn: {
1239
+ candidate: components["schemas"]["BoardRoleSignIn"];
1240
+ employer: components["schemas"]["BoardRoleSignIn"];
1241
+ };
1030
1242
  analytics: {
1031
1243
  ga4MeasurementId: string | null;
1032
1244
  gtmId: string | null;
@@ -1746,6 +1958,19 @@ declare function createBoardClient(options: CreateBoardClientOptions): {
1746
1958
  boardUser: components["schemas"]["BoardUser"];
1747
1959
  isNewUser?: boolean;
1748
1960
  }>;
1961
+ getSsoAuthorizationUrl(connectionId: string, query?: SsoAuthorizationQuery, options?: FetchOptions): Promise<{
1962
+ object: "sso_authorization_url";
1963
+ connectionId: string;
1964
+ authorizeUrl: string;
1965
+ }>;
1966
+ consumeSsoLinkProof(body: SsoLinkProofBody, options?: FetchOptions): Promise<{
1967
+ object: "board_auth_session";
1968
+ accessToken: string;
1969
+ refreshToken: string;
1970
+ expiresAt: number;
1971
+ boardUser: components["schemas"]["BoardUser"];
1972
+ isNewUser?: boolean;
1973
+ }>;
1749
1974
  };
1750
1975
  me: {
1751
1976
  retrieve(query?: Record<string, never>, options?: FetchOptions): Promise<{
@@ -3791,4 +4016,4 @@ declare function createBoardClient(options: CreateBoardClientOptions): {
3791
4016
  };
3792
4017
  type BoardSdk = ReturnType<typeof createBoardClient>;
3793
4018
 
3794
- export { type AcceptCompanyMemberInviteBody, type AccessCheckoutBody, type AccessCheckoutSession, type AccessCheckoutSessionState, type AccessGrant, type AccessPortalBody, type AccessPortalSession, type AddApplicantNoteBody, type AddSourcedCandidateBody, type Alert, type AlertBody, type Application, type ApplicationsListQuery, type ApplyAction, type ApplyApprovalPlan, type ApplyApprovalReceipt, type ApplyBody, type ApplyDecisionState, type ApplyIntent, type AudienceAttribution, Awaitable, BOARD_API_ERROR_CODES, type Block, type BlockStatus, type BlockUserBody, type BlockedUser, BlogPostsListQuery, BlogSearchBody, BlogSimilarQuery, type BoardAccessGrant, BoardApiError, type BoardApiErrorCode, type BoardAuthSession, BoardClient, BoardRequest, type BoardSdk, type BoardSitemapBucketSummary, type BoardSitemapIndex, type BoardUser, type BulkMoveApplicantsBody, type BulkRejectApplicantsBody, type CandidateAvatar, type CandidateEducation, type CandidateExperience, type CandidateLanguage, type CandidateProfile, type CandidateSkill, type ClaimableCompany, CompaniesListQuery, CompaniesSearchBody, type CompanyBillingPortalBody, type CompanyBillingPortalSession, CompanyJobsListQuery, CompanyListEnvelope, CompanyMarketsListQuery, type CompanyMember, type CompanyMemberInvite, type CompanyMemberInviteAcceptance, type CompanyMembership, CompanySimilarQuery, type ConfirmEmailChangeBody, type ConfirmWorkEmailBody, type ConsumeMagicLinkBody, type Conversation, type ConversationArchive, type ConversationDetail, type ConversationRef, type ConversationsListQuery, type ConvertSourcedCandidateBody, type CreateAlertBody, type CreateApplyApprovalBody, type CreateApplyIntentBody, type CreateBoardClientOptions, type CreateCompanyBody, type CreateCompanyMemberInviteBody, type CreateEducationBody, type CreateEmployerJobBody, type CreateExperienceBody, type CreateJobPostingInput, type CreatePipelineStageBody, type CreateTalentListBody, CustomFieldFilter, type EditMessageBody, type EmbedJobsQuery, type EmployerApplicant, type EmployerBillingOption, type EmployerCheckout, type EmployerCheckoutBody, type EmployerCompany, type EmployerCompanySearchQuery, type EmployerJob, type EmployerJobStat, type EmployerJobStatsPoint, type EmployerJobStatsTimeseriesQuery, type EmployerJobSummary, type EmployerJobsListQuery, type EmployerPipeline, type EmployerPipelineQuery, type EmployerPipelineStage, type EmployerProfileStats, type EmployerProfileViewsPoint, type EmployerProfileViewsTimeseriesQuery, EmploymentType, FetchOptions, type FindExistingConversationQuery, type ForgotPasswordBody, type HandleAvailability, 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, JobCardListEnvelope, JobCardSearchEnvelope, JobCollectionChoiceQuery, type JobPostingBillingOptions, type JobPostingBillingVerification, type JobPostingLogoResult, type JobPostingPlan, type JobPostingResult, JobsListQuery, JobsSearchBody, JobsSimilarQuery, ListEnvelope, type LocationResolveInput, type LocationSearchQuery, Logger, type LoginBody, type LogoutBody, type MarketingConsent, type MembershipCheckoutBody, type MembershipCheckoutSession, type MembershipCheckoutSessionState, type Message, type ModerationReport, type MoveApplicantStageBody, type NotificationPreference, type OAuthAuthorizationQuery, type OAuthAuthorizationUrl, type OAuthExchangeBody, type OAuthProvider, ObjectReferenceFilter, type Paginator, type PaywallOffer, type PaywallOfferListEnvelope, type PlacesListQuery, type Plan, type PlanListEnvelope, type PlansListQuery, type ProfileChoiceList, type ProfileChoiceQuery, type ProfileFieldEntity, type ProfileFieldValues, type ProfileObjectReferenceSelectionWrite, type ProfileObjectReferences, type PublicLocation, type PublicPlace, type PublicProfileFields, type PublicTaxonomyTerm, type ReadReceipt, type RecommendedJob, type RecommendedJobsListQuery, type RecommendedTalent, type RecommendedTalentListQuery, type RedirectResolution, type RefreshBody, type RegisterBody, RemoteOption, type RemotePermitTaxonomyEntry, type ReorderPipelineStagesBody, type ReplaceProfileObjectReferencesBody, type ReplyBody, type ReportBody, type RequestEmailChangeBody, type RequestMagicLinkBody, type ResetPasswordBody, type Resume, type ResumeUploadOptions, SDK_VERSION, SalaryDetailQuery, type SalesLedPlan, type SalesLedPlanListEnvelope, type SaveJobBody, type SavedJob, type SavedJobsListQuery, SearchEnvelope, SearchSuggestQuery, type SendWorkEmailBody, Seniority, type SitemapEntriesEnvelope, type SitemapEntriesQuery, type SitemapEntry, type SourcedCandidate, type StartAboutApplicationBody, type StartConversationBody, StorageMode, type TalentAccess, type TalentAccessCheckoutBody, type TalentAccessCheckoutSession, type TalentAccessCheckoutSessionState, type TalentAccessClaim, type TalentAccessClaimBody, type TalentAccessUpgrade, type TalentAccessUpgradeBody, type TalentCandidateAccess, type TalentDirectoryEntry, type TalentDirectoryListEnvelope, type TalentDirectoryQuery, type TalentList, type TalentListFilters, type TalentProfile, type TalentUnlock, type TalentUnlockBody, type TaxonomyGeo, type TaxonomyListQuery, type TaxonomyResolution, type ThreadMessagesQuery, type UnreadCount, type UnsubscribeBody, type UpdateApplicationFactsBody, type UpdateCandidateProfileBody, type UpdateCompanyMemberRoleBody, type UpdateEducationBody, type UpdateEmployerCompanyBody, type UpdateEmployerJobBody, type UpdateExperienceBody, type UpdateLanguagesBody, type UpdateNotificationPreferenceBody, type UpdatePasswordBody, type UpdatePipelineStageBody, type UpdateProfileFieldValuesBody, type UpdateSkillsBody, type UpdateTalentListBody, type VerifyEmailBody, createBoardClient, isBoardApiError, isBoardPasswordRequired, isColdRule, isConflict, isForbidden, isFreeEmailWebsiteError, isNotFound, isOwnMessage, isRateLimited, isSafeApplicationUrl, isUnauthorized, isValidationError, lastOwnMessageId, paginate, resolveApplyAction, resolveApplyDecision };
4019
+ export { type AcceptCompanyMemberInviteBody, type AccessCheckoutBody, type AccessCheckoutSession, type AccessCheckoutSessionState, type AccessGrant, type AccessPortalBody, type AccessPortalSession, type AddApplicantNoteBody, type AddSourcedCandidateBody, type Alert, type AlertBody, type Application, type ApplicationsListQuery, type ApplyAction, type ApplyApprovalPlan, type ApplyApprovalReceipt, type ApplyBody, type ApplyDecisionState, type ApplyIntent, type AudienceAttribution, type AvailableSignInMethods, Awaitable, BOARD_API_ERROR_CODES, type BindingStorage, type Block, type BlockStatus, type BlockUserBody, type BlockedUser, BlogPostsListQuery, BlogSearchBody, BlogSimilarQuery, type BoardAccessGrant, BoardApiError, type BoardApiErrorCode, type BoardAuthSession, BoardClient, BoardRequest, type BoardSdk, type BoardSitemapBucketSummary, type BoardSitemapIndex, type BoardUser, type BuiltInSignInMethod, type BulkMoveApplicantsBody, type BulkRejectApplicantsBody, type CandidateAvatar, type CandidateEducation, type CandidateExperience, type CandidateLanguage, type CandidateProfile, type CandidateSkill, type ClaimableCompany, CompaniesListQuery, CompaniesSearchBody, type CompanyBillingPortalBody, type CompanyBillingPortalSession, CompanyJobsListQuery, CompanyListEnvelope, CompanyMarketsListQuery, type CompanyMember, type CompanyMemberInvite, type CompanyMemberInviteAcceptance, type CompanyMembership, CompanySimilarQuery, type ConfirmEmailChangeBody, type ConfirmWorkEmailBody, type ConsumeMagicLinkBody, type Conversation, type ConversationArchive, type ConversationDetail, type ConversationRef, type ConversationsListQuery, type ConvertSourcedCandidateBody, type CreateAlertBody, type CreateApplyApprovalBody, type CreateApplyIntentBody, type CreateBoardClientOptions, type CreateCompanyBody, type CreateCompanyMemberInviteBody, type CreateEducationBody, type CreateEmployerJobBody, type CreateExperienceBody, type CreateJobPostingInput, type CreatePipelineStageBody, type CreateTalentListBody, CustomFieldFilter, type EditMessageBody, type EmbedJobsQuery, type EmployerApplicant, type EmployerBillingOption, type EmployerCheckout, type EmployerCheckoutBody, type EmployerCompany, type EmployerCompanySearchQuery, type EmployerJob, type EmployerJobStat, type EmployerJobStatsPoint, type EmployerJobStatsTimeseriesQuery, type EmployerJobSummary, type EmployerJobsListQuery, type EmployerPipeline, type EmployerPipelineQuery, type EmployerPipelineStage, type EmployerProfileStats, type EmployerProfileViewsPoint, type EmployerProfileViewsTimeseriesQuery, EmploymentType, FetchOptions, type FindExistingConversationQuery, type ForgotPasswordBody, type HandleAvailability, 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, JobCardListEnvelope, JobCardSearchEnvelope, JobCollectionChoiceQuery, type JobPostingBillingOptions, type JobPostingBillingVerification, type JobPostingLogoResult, type JobPostingPlan, type JobPostingResult, JobsListQuery, JobsSearchBody, JobsSimilarQuery, ListEnvelope, type LocationResolveInput, type LocationSearchQuery, Logger, type LoginBody, type LogoutBody, type MarketingConsent, type MembershipCheckoutBody, type MembershipCheckoutSession, type MembershipCheckoutSessionState, type Message, type ModerationReport, type MoveApplicantStageBody, type NotificationPreference, type OAuthAuthorizationQuery, type OAuthAuthorizationUrl, type OAuthCompletion, type OAuthExchangeBody, type OAuthProvider, ObjectReferenceFilter, type Paginator, type PaywallOffer, type PaywallOfferListEnvelope, type PlacesListQuery, type Plan, type PlanListEnvelope, type PlansListQuery, type ProfileChoiceList, type ProfileChoiceQuery, type ProfileFieldEntity, type ProfileFieldValues, type ProfileObjectReferenceSelectionWrite, type ProfileObjectReferences, type PublicLocation, type PublicPlace, type PublicProfileFields, type PublicTaxonomyTerm, type ReadReceipt, type RecommendedJob, type RecommendedJobsListQuery, type RecommendedTalent, type RecommendedTalentListQuery, type RedirectResolution, type RefreshBody, type RegisterBody, RemoteOption, type RemotePermitTaxonomyEntry, type ReorderPipelineStagesBody, type ReplaceProfileObjectReferencesBody, type ReplyBody, type ReportBody, type RequestEmailChangeBody, type RequestMagicLinkBody, type ResetPasswordBody, type Resume, type ResumeUploadOptions, SDK_VERSION, SIGN_IN_REDIRECT_ERROR_CODES, SSO_LINK_PROOF_BINDING_TTL_MS, SalaryDetailQuery, type SalesLedPlan, type SalesLedPlanListEnvelope, type SaveJobBody, type SavedJob, type SavedJobsListQuery, SearchEnvelope, SearchSuggestQuery, type SendWorkEmailBody, Seniority, type SignInRedirectErrorCode, type SignInRole, type SitemapEntriesEnvelope, type SitemapEntriesQuery, type SitemapEntry, type SourcedCandidate, type SsoAuthorizationQuery, type SsoAuthorizationUrl, type SsoLinkProofBindingStore, type SsoLinkProofBody, type StartAboutApplicationBody, type StartConversationBody, StorageMode, type TalentAccess, type TalentAccessCheckoutBody, type TalentAccessCheckoutSession, type TalentAccessCheckoutSessionState, type TalentAccessClaim, type TalentAccessClaimBody, type TalentAccessUpgrade, type TalentAccessUpgradeBody, type TalentCandidateAccess, type TalentDirectoryEntry, type TalentDirectoryListEnvelope, type TalentDirectoryQuery, type TalentList, type TalentListFilters, type TalentProfile, type TalentUnlock, type TalentUnlockBody, type TaxonomyGeo, type TaxonomyListQuery, type TaxonomyResolution, type ThreadMessagesQuery, type UnreadCount, type UnsubscribeBody, type UpdateApplicationFactsBody, type UpdateCandidateProfileBody, type UpdateCompanyMemberRoleBody, type UpdateEducationBody, type UpdateEmployerCompanyBody, type UpdateEmployerJobBody, type UpdateExperienceBody, type UpdateLanguagesBody, type UpdateNotificationPreferenceBody, type UpdatePasswordBody, type UpdatePipelineStageBody, type UpdateProfileFieldValuesBody, type UpdateSkillsBody, type UpdateTalentListBody, type VerifyEmailBody, createBoardClient, isBoardApiError, isBoardPasswordRequired, isColdRule, isConflict, isForbidden, isFreeEmailWebsiteError, isNotFound, isOwnMessage, isRateLimited, isSafeApplicationUrl, isSignInMethodUnavailable, isSsoBrowserMismatch, isSsoRequired, isUnauthorized, isValidationError, lastOwnMessageId, paginate, parseOAuthCompletion, resolveApplyAction, resolveApplyDecision, ssoLinkProofBindingStore };