@cavuno/board 4.10.0 → 4.12.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/CHANGELOG.md +35 -0
- package/dist/{_spec-BwUP7Wni.d.mts → _spec-ChuT3QX8.d.mts} +30 -1
- package/dist/{_spec-BwUP7Wni.d.ts → _spec-ChuT3QX8.d.ts} +30 -1
- package/dist/{blog-C_xXYOxc.d.mts → blog-BB_l6xes.d.mts} +1 -1
- package/dist/{blog-DC4BfQqF.d.ts → blog-VbcrwKk9.d.ts} +1 -1
- package/dist/{board-CG8rDGTY.d.mts → board-BJCKz-Is.d.mts} +2 -2
- package/dist/{board-zdQ875ck.d.ts → board-CWQjFHWJ.d.ts} +2 -2
- package/dist/{breadcrumbs-qs9DC0yh.d.ts → breadcrumbs-6TB8Lw-C.d.ts} +2 -2
- package/dist/{breadcrumbs-BK7AqNp2.d.mts → breadcrumbs-BoIXFh0q.d.mts} +2 -2
- package/dist/browser/cavuno-board.global.min.js +1 -1
- package/dist/filters.d.mts +2 -2
- package/dist/filters.d.ts +2 -2
- package/dist/format.d.mts +4 -4
- package/dist/format.d.ts +4 -4
- package/dist/index.d.mts +92 -19
- package/dist/index.d.ts +92 -19
- package/dist/index.js +20 -6
- package/dist/index.mjs +20 -6
- package/dist/{jobs-BToqhRuU.d.mts → jobs-CV41Msa7.d.mts} +1 -1
- package/dist/{jobs-B-uO7ffG.d.ts → jobs-CsoxD0mU.d.ts} +1 -1
- package/dist/{search-Sl9-xi1z.d.ts → search-ACYoyhh3.d.ts} +1 -1
- package/dist/{search-CvwKD0Va.d.mts → search-DEVb6pdX.d.mts} +1 -1
- package/dist/{seo-D1Vc_0HF.d.ts → seo-BrC9ue1U.d.ts} +1 -1
- package/dist/{seo-B9b2AkSE.d.mts → seo-DvS9_GxS.d.mts} +1 -1
- package/dist/seo-files.d.mts +2 -2
- package/dist/seo-files.d.ts +2 -2
- package/dist/seo.d.mts +6 -6
- package/dist/seo.d.ts +6 -6
- package/dist/server.d.mts +6 -6
- package/dist/server.d.ts +6 -6
- package/dist/sitemap.d.mts +6 -6
- package/dist/sitemap.d.ts +6 -6
- package/dist/suggest.d.mts +2 -2
- package/dist/suggest.d.ts +2 -2
- package/package.json +1 -1
- package/skills/manifest.json +1 -1
package/dist/format.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { C as CurrencyDisplay, F as FormattedSalaryRange, J as JobBreadcrumb, N as NumberNotation, S as SalaryTimeframeInput, a as SalaryTimeframeValue, b as buildJobBreadcrumbs, f as formatSalaryRange, c as formatSalaryStat, d as formatSalaryStatRange, n as normalizeWebsiteUrl } from './breadcrumbs-
|
|
2
|
-
import { C as CustomFieldDefinition } from './board-
|
|
3
|
-
import { C as CustomFieldValues } from './jobs-
|
|
4
|
-
import './_spec-
|
|
1
|
+
export { C as CurrencyDisplay, F as FormattedSalaryRange, J as JobBreadcrumb, N as NumberNotation, S as SalaryTimeframeInput, a as SalaryTimeframeValue, b as buildJobBreadcrumbs, f as formatSalaryRange, c as formatSalaryStat, d as formatSalaryStatRange, n as normalizeWebsiteUrl } from './breadcrumbs-6TB8Lw-C.js';
|
|
2
|
+
import { C as CustomFieldDefinition } from './board-CWQjFHWJ.js';
|
|
3
|
+
import { C as CustomFieldValues } from './jobs-CsoxD0mU.js';
|
|
4
|
+
import './_spec-ChuT3QX8.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Date display helpers in the board language (required leading parameter,
|
package/dist/index.d.mts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { S as Schemas, c as components } from './_spec-
|
|
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-
|
|
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-
|
|
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-
|
|
5
|
-
export { a as CompanyCategorySalary, j as CompanyMarket, k as CompanyMarketRef, b as CompanySalary, l as CompanySalarySummary, C as CustomFieldDefinition, m as CustomFieldOption, n as CustomFieldType, L as LocationSalaryDetail, o as LocationSkillsIndex, p as LocationTitlesIndex, P as PublicBoard, q as PublicBoardAds, r as PublicBoardAnalytics, s as PublicBoardFeatures, t as PublicBoardJobForm, u as PublicCompany, v as PublicCompanyDetail, w as SalaryCompany, x as SalaryLocation, y as SalarySkill, z as SalaryTitle, A as SkillLocationSalary, B as SkillLocationsIndex, S as SkillSalaryDetail, D as TitleLocationSalary, E as TitleLocationsIndex, T as TitleSalaryDetail } from './board-
|
|
6
|
-
export { B as BoardSeo } from './seo-
|
|
7
|
-
import { R as RemoteOption, E as EmploymentType, S as Seniority, L as ListEnvelope, a as JobsListQuery, b as JobCardListEnvelope, c as JobsSearchBody, d as JobCardSearchEnvelope, e as JobsSimilarQuery, f as SearchEnvelope } from './jobs-
|
|
8
|
-
export { g as CustomFieldValue, C as CustomFieldValues, h as EducationRequirement, i as JobCatalogPagination, j as JobCompany, J as JobSort, O as OfficeLocation, k as OffsetPagination, P as PublicJob, l as PublicJobCard, m as RelatedSearch, n as RemotePermit, o as RemoteTimezone, p as StorefrontPagination } from './jobs-
|
|
9
|
-
import { a as BlogPostsListQuery, b as BlogSimilarQuery, c as BlogSearchBody } from './blog-
|
|
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-
|
|
1
|
+
import { S as Schemas, c as components } from './_spec-ChuT3QX8.mjs';
|
|
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-DEVb6pdX.mjs';
|
|
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-DEVb6pdX.mjs';
|
|
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-BJCKz-Is.mjs';
|
|
5
|
+
export { a as CompanyCategorySalary, j as CompanyMarket, k as CompanyMarketRef, b as CompanySalary, l as CompanySalarySummary, C as CustomFieldDefinition, m as CustomFieldOption, n as CustomFieldType, L as LocationSalaryDetail, o as LocationSkillsIndex, p as LocationTitlesIndex, P as PublicBoard, q as PublicBoardAds, r as PublicBoardAnalytics, s as PublicBoardFeatures, t as PublicBoardJobForm, u as PublicCompany, v as PublicCompanyDetail, w as SalaryCompany, x as SalaryLocation, y as SalarySkill, z as SalaryTitle, A as SkillLocationSalary, B as SkillLocationsIndex, S as SkillSalaryDetail, D as TitleLocationSalary, E as TitleLocationsIndex, T as TitleSalaryDetail } from './board-BJCKz-Is.mjs';
|
|
6
|
+
export { B as BoardSeo } from './seo-DvS9_GxS.mjs';
|
|
7
|
+
import { R as RemoteOption, E as EmploymentType, S as Seniority, L as ListEnvelope, a as JobsListQuery, b as JobCardListEnvelope, c as JobsSearchBody, d as JobCardSearchEnvelope, e as JobsSimilarQuery, f as SearchEnvelope } from './jobs-CV41Msa7.mjs';
|
|
8
|
+
export { g as CustomFieldValue, C as CustomFieldValues, h as EducationRequirement, i as JobCatalogPagination, j as JobCompany, J as JobSort, O as OfficeLocation, k as OffsetPagination, P as PublicJob, l as PublicJobCard, m as RelatedSearch, n as RemotePermit, o as RemoteTimezone, p as StorefrontPagination } from './jobs-CV41Msa7.mjs';
|
|
9
|
+
import { a as BlogPostsListQuery, b as BlogSimilarQuery, c as BlogSearchBody } from './blog-BB_l6xes.mjs';
|
|
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-BB_l6xes.mjs';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Well-known `<domain>_<snake_reason>` codes the Board API sends, grouped by
|
|
@@ -143,7 +143,7 @@ declare function paginate<Q extends Record<string, unknown>, P extends PageShape
|
|
|
143
143
|
* constant because the package is platform-neutral and cannot read
|
|
144
144
|
* package.json at runtime.
|
|
145
145
|
*/
|
|
146
|
-
declare const SDK_VERSION = "4.
|
|
146
|
+
declare const SDK_VERSION = "4.12.0";
|
|
147
147
|
|
|
148
148
|
type SavedJob = Schemas['SavedJob'];
|
|
149
149
|
type SavedJobsListQuery = {
|
|
@@ -441,21 +441,42 @@ declare function lastOwnMessageId(messages: Message[], counterpartyId: string):
|
|
|
441
441
|
* The apply-decision ladder as a pure function — a core-entry
|
|
442
442
|
* derive export like `messaging-derive`, so security/logic fixes ship via
|
|
443
443
|
* the versioned package instead of re-copied registry files. Unit-testable
|
|
444
|
-
* independent of React. Mirrors the hosted board's rule:
|
|
445
|
-
* `applicationUrl`, when present, is the
|
|
446
|
-
* never gated behind
|
|
447
|
-
* candidate is never worse off than an anonymous
|
|
444
|
+
* independent of React. Mirrors the hosted board's rule: past the
|
|
445
|
+
* registration wall an external `applicationUrl`, when present, is the
|
|
446
|
+
* apply path for EVERYONE — it is never gated behind verification, so a
|
|
447
|
+
* signed-in-but-unverified candidate is never worse off than an anonymous
|
|
448
|
+
* visitor. The wall itself gates every path including that external link,
|
|
449
|
+
* matching hosted `job-apply-button.tsx`.
|
|
448
450
|
*/
|
|
449
451
|
type ApplyAction = {
|
|
450
452
|
kind: 'external';
|
|
451
453
|
url: string;
|
|
452
|
-
}
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
* `reason` says WHY sign-in is required, because callers gate on it:
|
|
457
|
+
* `'registration-wall'` outranks an external-applications-only board
|
|
458
|
+
* (a board with `nativeApplications: false` must still show the wall's
|
|
459
|
+
* sign-in CTA), whereas `'native-apply'` is collapsed away there.
|
|
460
|
+
* Optional — absent on the deprecated `resolveApplyAction` path.
|
|
461
|
+
*/
|
|
462
|
+
| {
|
|
453
463
|
kind: 'sign-in';
|
|
464
|
+
reason?: 'registration-wall' | 'native-apply';
|
|
454
465
|
} | {
|
|
455
466
|
kind: 'verify-email';
|
|
456
467
|
} | {
|
|
457
468
|
kind: 'native';
|
|
458
469
|
jobSlug: string;
|
|
470
|
+
}
|
|
471
|
+
/**
|
|
472
|
+
* Anonymous guest apply — the visitor supplies name/email inline instead
|
|
473
|
+
* of registering. Only reachable when the board's registration wall is
|
|
474
|
+
* OFF and the caller set `allowGuestApply`, mirroring the hosted API,
|
|
475
|
+
* which rejects an anonymous apply only on a walled board.
|
|
476
|
+
*/
|
|
477
|
+
| {
|
|
478
|
+
kind: 'guest';
|
|
479
|
+
jobSlug: string;
|
|
459
480
|
} | {
|
|
460
481
|
kind: 'applied';
|
|
461
482
|
} | {
|
|
@@ -469,14 +490,46 @@ type ApplyAction = {
|
|
|
469
490
|
* targets; anything else is treated as no external URL at all.
|
|
470
491
|
*/
|
|
471
492
|
declare function isSafeApplicationUrl(url: string): boolean;
|
|
472
|
-
|
|
493
|
+
interface ApplyDecisionState {
|
|
473
494
|
jobSlug: string | null;
|
|
474
495
|
applicationUrl: string | null;
|
|
475
496
|
viewer: {
|
|
476
497
|
emailVerified: boolean;
|
|
477
498
|
} | null;
|
|
478
499
|
applied: boolean;
|
|
479
|
-
|
|
500
|
+
/**
|
|
501
|
+
* The board's `features.registrationWall`. When `true` the hosted board
|
|
502
|
+
* requires a signed-in candidate before ANY apply path — the external
|
|
503
|
+
* employer link included. When `false` an anonymous visitor may apply
|
|
504
|
+
* natively as a guest: `POST /jobs/:jobSlug/apply` accepts an
|
|
505
|
+
* unauthenticated caller who supplies name/email, and rejects a guest
|
|
506
|
+
* only when the wall is on.
|
|
507
|
+
*
|
|
508
|
+
* Sign-in — not verification — is the wall's bar, matching hosted: a
|
|
509
|
+
* signed-in-but-unverified candidate clears it.
|
|
510
|
+
*/
|
|
511
|
+
registrationWall: boolean;
|
|
512
|
+
/**
|
|
513
|
+
* Does this UI have a guest-apply form to render? Opt-in, because the
|
|
514
|
+
* decision cannot know: a client with no form must keep getting
|
|
515
|
+
* `sign-in`, not a `guest` action it cannot present. Ignored when
|
|
516
|
+
* `registrationWall` is `true` — the wall always wins.
|
|
517
|
+
*/
|
|
518
|
+
allowGuestApply?: boolean;
|
|
519
|
+
}
|
|
520
|
+
/**
|
|
521
|
+
* The full apply ladder including the registration wall. Prefer this over
|
|
522
|
+
* the deprecated `resolveApplyAction`, which cannot see the wall and so
|
|
523
|
+
* hands an anonymous visitor the external employer link on a walled board.
|
|
524
|
+
*/
|
|
525
|
+
declare function resolveApplyDecision(state: ApplyDecisionState): ApplyAction;
|
|
526
|
+
/**
|
|
527
|
+
* @deprecated Wall-blind — use {@link resolveApplyDecision}, which takes
|
|
528
|
+
* the board's `features.registrationWall`. Kept as a one-line forward
|
|
529
|
+
* (`registrationWall: false`) so pinned callers keep their behaviour
|
|
530
|
+
* byte-for-byte; see docs/policy/removals.md.
|
|
531
|
+
*/
|
|
532
|
+
declare function resolveApplyAction(state: Omit<ApplyDecisionState, 'registrationWall' | 'allowGuestApply'>): ApplyAction;
|
|
480
533
|
|
|
481
534
|
type BoardUser = Schemas['BoardUser'];
|
|
482
535
|
type BoardAuthSession = Schemas['BoardAuthSession'];
|
|
@@ -800,6 +853,7 @@ declare function createBoardClient(options: CreateBoardClientOptions): {
|
|
|
800
853
|
nativeApplications: boolean;
|
|
801
854
|
messaging: boolean;
|
|
802
855
|
};
|
|
856
|
+
talentAccessModel: "paid_messaging" | "paid_unlocks_and_messaging" | null;
|
|
803
857
|
analytics: {
|
|
804
858
|
ga4MeasurementId: string | null;
|
|
805
859
|
gtmId: string | null;
|
|
@@ -817,16 +871,29 @@ declare function createBoardClient(options: CreateBoardClientOptions): {
|
|
|
817
871
|
jobForm: {
|
|
818
872
|
salary: {
|
|
819
873
|
visible: boolean;
|
|
874
|
+
required: boolean;
|
|
875
|
+
minBound: number | null;
|
|
876
|
+
maxBound: number | null;
|
|
877
|
+
allowedCurrencies: string[] | null;
|
|
820
878
|
};
|
|
821
879
|
seniority: {
|
|
822
880
|
visible: boolean;
|
|
881
|
+
required: boolean;
|
|
882
|
+
allowedOptions: string[];
|
|
823
883
|
};
|
|
824
884
|
location: {
|
|
825
885
|
visible: boolean;
|
|
886
|
+
allowedCountries: string[] | null;
|
|
826
887
|
};
|
|
827
888
|
sponsorship: {
|
|
828
889
|
visible: boolean;
|
|
829
890
|
};
|
|
891
|
+
workArrangement: {
|
|
892
|
+
allowedOptions: string[];
|
|
893
|
+
};
|
|
894
|
+
employmentType: {
|
|
895
|
+
allowedOptions: string[];
|
|
896
|
+
};
|
|
830
897
|
};
|
|
831
898
|
contact: {
|
|
832
899
|
email: string | null;
|
|
@@ -1396,6 +1463,7 @@ declare function createBoardClient(options: CreateBoardClientOptions): {
|
|
|
1396
1463
|
refreshToken: string;
|
|
1397
1464
|
expiresAt: number;
|
|
1398
1465
|
boardUser: components["schemas"]["BoardUser"];
|
|
1466
|
+
isNewUser?: boolean;
|
|
1399
1467
|
}>;
|
|
1400
1468
|
login(body: LoginBody, options?: FetchOptions): Promise<{
|
|
1401
1469
|
object: "board_auth_session";
|
|
@@ -1403,6 +1471,7 @@ declare function createBoardClient(options: CreateBoardClientOptions): {
|
|
|
1403
1471
|
refreshToken: string;
|
|
1404
1472
|
expiresAt: number;
|
|
1405
1473
|
boardUser: components["schemas"]["BoardUser"];
|
|
1474
|
+
isNewUser?: boolean;
|
|
1406
1475
|
}>;
|
|
1407
1476
|
refresh(body?: RefreshBody, options?: FetchOptions): Promise<{
|
|
1408
1477
|
object: "board_auth_session";
|
|
@@ -1410,6 +1479,7 @@ declare function createBoardClient(options: CreateBoardClientOptions): {
|
|
|
1410
1479
|
refreshToken: string;
|
|
1411
1480
|
expiresAt: number;
|
|
1412
1481
|
boardUser: components["schemas"]["BoardUser"];
|
|
1482
|
+
isNewUser?: boolean;
|
|
1413
1483
|
}>;
|
|
1414
1484
|
logout(body?: LogoutBody, options?: FetchOptions): Promise<void>;
|
|
1415
1485
|
verifyEmail(body: VerifyEmailBody, options?: FetchOptions): Promise<void>;
|
|
@@ -1426,6 +1496,7 @@ declare function createBoardClient(options: CreateBoardClientOptions): {
|
|
|
1426
1496
|
refreshToken: string;
|
|
1427
1497
|
expiresAt: number;
|
|
1428
1498
|
boardUser: components["schemas"]["BoardUser"];
|
|
1499
|
+
isNewUser?: boolean;
|
|
1429
1500
|
}>;
|
|
1430
1501
|
getOAuthAuthorizationUrl(provider: OAuthProvider, query?: OAuthAuthorizationQuery, options?: FetchOptions): Promise<{
|
|
1431
1502
|
object: "oauth_authorization_url";
|
|
@@ -1438,6 +1509,7 @@ declare function createBoardClient(options: CreateBoardClientOptions): {
|
|
|
1438
1509
|
refreshToken: string;
|
|
1439
1510
|
expiresAt: number;
|
|
1440
1511
|
boardUser: components["schemas"]["BoardUser"];
|
|
1512
|
+
isNewUser?: boolean;
|
|
1441
1513
|
}>;
|
|
1442
1514
|
};
|
|
1443
1515
|
me: {
|
|
@@ -1457,6 +1529,7 @@ declare function createBoardClient(options: CreateBoardClientOptions): {
|
|
|
1457
1529
|
refreshToken: string;
|
|
1458
1530
|
expiresAt: number;
|
|
1459
1531
|
boardUser: components["schemas"]["BoardUser"];
|
|
1532
|
+
isNewUser?: boolean;
|
|
1460
1533
|
}>;
|
|
1461
1534
|
requestEmailChange(body: RequestEmailChangeBody, options?: FetchOptions): Promise<void>;
|
|
1462
1535
|
confirmEmailChange(body: ConfirmEmailChangeBody, options?: FetchOptions): Promise<void>;
|
|
@@ -3281,4 +3354,4 @@ declare function createBoardClient(options: CreateBoardClientOptions): {
|
|
|
3281
3354
|
};
|
|
3282
3355
|
type BoardSdk = ReturnType<typeof createBoardClient>;
|
|
3283
3356
|
|
|
3284
|
-
export { type AcceptCompanyMemberInviteBody, type AccessCheckoutBody, type AccessCheckoutSession, type AccessCheckoutSessionState, type AccessGrant, type AccessPortalBody, type AccessPortalSession, type AddApplicantNoteBody, type Alert, type AlertBody, type Application, type ApplicationsListQuery, type ApplyAction, type ApplyApprovalPlan, type ApplyApprovalReceipt, type ApplyBody, type ApplyIntent, 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 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 CreateApplyApprovalBody, type CreateApplyIntentBody, type CreateBoardClientOptions, type CreateCompanyBody, type CreateCompanyMemberInviteBody, type CreateEducationBody, type CreateEmployerJobBody, type CreateExperienceBody, type CreateJobPostingInput, type CreatePipelineStageBody, 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, type JobPostingBillingOptions, type JobPostingBillingVerification, type JobPostingLogoResult, type JobPostingPlan, type JobPostingResult, JobsListQuery, JobsSearchBody, JobsSimilarQuery, ListEnvelope, Logger, type LoginBody, type LogoutBody, type MarketingConsent, type Message, type ModerationReport, type MoveApplicantStageBody, type NotificationPreference, type OAuthAuthorizationQuery, type OAuthAuthorizationUrl, type OAuthExchangeBody, type OAuthProvider, type Paginator, type PaywallOffer, type PaywallOfferListEnvelope, type PlacesListQuery, type Plan, type PlanListEnvelope, type PlansListQuery, type PublicPlace, type PublicTaxonomyTerm, type ReadReceipt, type RecommendedJob, type RecommendedJobsListQuery, type RecommendedTalent, type RecommendedTalentListQuery, type RedirectResolution, type RefreshBody, type RegisterBody, RemoteOption, type RemotePermitTaxonomyEntry, type ReorderPipelineStagesBody, 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 StartAboutApplicationBody, type StartConversationBody, StorageMode, type TalentAccess, type TalentAccessCheckoutBody, type TalentAccessCheckoutSession, type TalentAccessCheckoutSessionState, type TalentAccessUpgrade, type TalentAccessUpgradeBody, type TalentCandidateAccess, type TalentDirectoryEntry, type TalentDirectoryListEnvelope, type TalentDirectoryQuery, 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 UpdateSkillsBody, type VerifyEmailBody, createBoardClient, isBoardApiError, isBoardPasswordRequired, isColdRule, isConflict, isForbidden, isNotFound, isOwnMessage, isRateLimited, isSafeApplicationUrl, isUnauthorized, isValidationError, lastOwnMessageId, paginate, resolveApplyAction };
|
|
3357
|
+
export { type AcceptCompanyMemberInviteBody, type AccessCheckoutBody, type AccessCheckoutSession, type AccessCheckoutSessionState, type AccessGrant, type AccessPortalBody, type AccessPortalSession, type AddApplicantNoteBody, type Alert, type AlertBody, type Application, type ApplicationsListQuery, type ApplyAction, type ApplyApprovalPlan, type ApplyApprovalReceipt, type ApplyBody, type ApplyDecisionState, type ApplyIntent, 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 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 CreateApplyApprovalBody, type CreateApplyIntentBody, type CreateBoardClientOptions, type CreateCompanyBody, type CreateCompanyMemberInviteBody, type CreateEducationBody, type CreateEmployerJobBody, type CreateExperienceBody, type CreateJobPostingInput, type CreatePipelineStageBody, 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, type JobPostingBillingOptions, type JobPostingBillingVerification, type JobPostingLogoResult, type JobPostingPlan, type JobPostingResult, JobsListQuery, JobsSearchBody, JobsSimilarQuery, ListEnvelope, Logger, type LoginBody, type LogoutBody, type MarketingConsent, type Message, type ModerationReport, type MoveApplicantStageBody, type NotificationPreference, type OAuthAuthorizationQuery, type OAuthAuthorizationUrl, type OAuthExchangeBody, type OAuthProvider, type Paginator, type PaywallOffer, type PaywallOfferListEnvelope, type PlacesListQuery, type Plan, type PlanListEnvelope, type PlansListQuery, type PublicPlace, type PublicTaxonomyTerm, type ReadReceipt, type RecommendedJob, type RecommendedJobsListQuery, type RecommendedTalent, type RecommendedTalentListQuery, type RedirectResolution, type RefreshBody, type RegisterBody, RemoteOption, type RemotePermitTaxonomyEntry, type ReorderPipelineStagesBody, 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 StartAboutApplicationBody, type StartConversationBody, StorageMode, type TalentAccess, type TalentAccessCheckoutBody, type TalentAccessCheckoutSession, type TalentAccessCheckoutSessionState, type TalentAccessUpgrade, type TalentAccessUpgradeBody, type TalentCandidateAccess, type TalentDirectoryEntry, type TalentDirectoryListEnvelope, type TalentDirectoryQuery, 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 UpdateSkillsBody, type VerifyEmailBody, createBoardClient, isBoardApiError, isBoardPasswordRequired, isColdRule, isConflict, isForbidden, isNotFound, isOwnMessage, isRateLimited, isSafeApplicationUrl, isUnauthorized, isValidationError, lastOwnMessageId, paginate, resolveApplyAction, resolveApplyDecision };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { S as Schemas, c as components } from './_spec-
|
|
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-
|
|
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-
|
|
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-
|
|
5
|
-
export { a as CompanyCategorySalary, j as CompanyMarket, k as CompanyMarketRef, b as CompanySalary, l as CompanySalarySummary, C as CustomFieldDefinition, m as CustomFieldOption, n as CustomFieldType, L as LocationSalaryDetail, o as LocationSkillsIndex, p as LocationTitlesIndex, P as PublicBoard, q as PublicBoardAds, r as PublicBoardAnalytics, s as PublicBoardFeatures, t as PublicBoardJobForm, u as PublicCompany, v as PublicCompanyDetail, w as SalaryCompany, x as SalaryLocation, y as SalarySkill, z as SalaryTitle, A as SkillLocationSalary, B as SkillLocationsIndex, S as SkillSalaryDetail, D as TitleLocationSalary, E as TitleLocationsIndex, T as TitleSalaryDetail } from './board-
|
|
6
|
-
export { B as BoardSeo } from './seo-
|
|
7
|
-
import { R as RemoteOption, E as EmploymentType, S as Seniority, L as ListEnvelope, a as JobsListQuery, b as JobCardListEnvelope, c as JobsSearchBody, d as JobCardSearchEnvelope, e as JobsSimilarQuery, f as SearchEnvelope } from './jobs-
|
|
8
|
-
export { g as CustomFieldValue, C as CustomFieldValues, h as EducationRequirement, i as JobCatalogPagination, j as JobCompany, J as JobSort, O as OfficeLocation, k as OffsetPagination, P as PublicJob, l as PublicJobCard, m as RelatedSearch, n as RemotePermit, o as RemoteTimezone, p as StorefrontPagination } from './jobs-
|
|
9
|
-
import { a as BlogPostsListQuery, b as BlogSimilarQuery, c as BlogSearchBody } from './blog-
|
|
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-
|
|
1
|
+
import { S as Schemas, c as components } from './_spec-ChuT3QX8.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-ACYoyhh3.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-ACYoyhh3.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-CWQjFHWJ.js';
|
|
5
|
+
export { a as CompanyCategorySalary, j as CompanyMarket, k as CompanyMarketRef, b as CompanySalary, l as CompanySalarySummary, C as CustomFieldDefinition, m as CustomFieldOption, n as CustomFieldType, L as LocationSalaryDetail, o as LocationSkillsIndex, p as LocationTitlesIndex, P as PublicBoard, q as PublicBoardAds, r as PublicBoardAnalytics, s as PublicBoardFeatures, t as PublicBoardJobForm, u as PublicCompany, v as PublicCompanyDetail, w as SalaryCompany, x as SalaryLocation, y as SalarySkill, z as SalaryTitle, A as SkillLocationSalary, B as SkillLocationsIndex, S as SkillSalaryDetail, D as TitleLocationSalary, E as TitleLocationsIndex, T as TitleSalaryDetail } from './board-CWQjFHWJ.js';
|
|
6
|
+
export { B as BoardSeo } from './seo-BrC9ue1U.js';
|
|
7
|
+
import { R as RemoteOption, E as EmploymentType, S as Seniority, L as ListEnvelope, a as JobsListQuery, b as JobCardListEnvelope, c as JobsSearchBody, d as JobCardSearchEnvelope, e as JobsSimilarQuery, f as SearchEnvelope } from './jobs-CsoxD0mU.js';
|
|
8
|
+
export { g as CustomFieldValue, C as CustomFieldValues, h as EducationRequirement, i as JobCatalogPagination, j as JobCompany, J as JobSort, O as OfficeLocation, k as OffsetPagination, P as PublicJob, l as PublicJobCard, m as RelatedSearch, n as RemotePermit, o as RemoteTimezone, p as StorefrontPagination } from './jobs-CsoxD0mU.js';
|
|
9
|
+
import { a as BlogPostsListQuery, b as BlogSimilarQuery, c as BlogSearchBody } from './blog-VbcrwKk9.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-VbcrwKk9.js';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Well-known `<domain>_<snake_reason>` codes the Board API sends, grouped by
|
|
@@ -143,7 +143,7 @@ declare function paginate<Q extends Record<string, unknown>, P extends PageShape
|
|
|
143
143
|
* constant because the package is platform-neutral and cannot read
|
|
144
144
|
* package.json at runtime.
|
|
145
145
|
*/
|
|
146
|
-
declare const SDK_VERSION = "4.
|
|
146
|
+
declare const SDK_VERSION = "4.12.0";
|
|
147
147
|
|
|
148
148
|
type SavedJob = Schemas['SavedJob'];
|
|
149
149
|
type SavedJobsListQuery = {
|
|
@@ -441,21 +441,42 @@ declare function lastOwnMessageId(messages: Message[], counterpartyId: string):
|
|
|
441
441
|
* The apply-decision ladder as a pure function — a core-entry
|
|
442
442
|
* derive export like `messaging-derive`, so security/logic fixes ship via
|
|
443
443
|
* the versioned package instead of re-copied registry files. Unit-testable
|
|
444
|
-
* independent of React. Mirrors the hosted board's rule:
|
|
445
|
-
* `applicationUrl`, when present, is the
|
|
446
|
-
* never gated behind
|
|
447
|
-
* candidate is never worse off than an anonymous
|
|
444
|
+
* independent of React. Mirrors the hosted board's rule: past the
|
|
445
|
+
* registration wall an external `applicationUrl`, when present, is the
|
|
446
|
+
* apply path for EVERYONE — it is never gated behind verification, so a
|
|
447
|
+
* signed-in-but-unverified candidate is never worse off than an anonymous
|
|
448
|
+
* visitor. The wall itself gates every path including that external link,
|
|
449
|
+
* matching hosted `job-apply-button.tsx`.
|
|
448
450
|
*/
|
|
449
451
|
type ApplyAction = {
|
|
450
452
|
kind: 'external';
|
|
451
453
|
url: string;
|
|
452
|
-
}
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
* `reason` says WHY sign-in is required, because callers gate on it:
|
|
457
|
+
* `'registration-wall'` outranks an external-applications-only board
|
|
458
|
+
* (a board with `nativeApplications: false` must still show the wall's
|
|
459
|
+
* sign-in CTA), whereas `'native-apply'` is collapsed away there.
|
|
460
|
+
* Optional — absent on the deprecated `resolveApplyAction` path.
|
|
461
|
+
*/
|
|
462
|
+
| {
|
|
453
463
|
kind: 'sign-in';
|
|
464
|
+
reason?: 'registration-wall' | 'native-apply';
|
|
454
465
|
} | {
|
|
455
466
|
kind: 'verify-email';
|
|
456
467
|
} | {
|
|
457
468
|
kind: 'native';
|
|
458
469
|
jobSlug: string;
|
|
470
|
+
}
|
|
471
|
+
/**
|
|
472
|
+
* Anonymous guest apply — the visitor supplies name/email inline instead
|
|
473
|
+
* of registering. Only reachable when the board's registration wall is
|
|
474
|
+
* OFF and the caller set `allowGuestApply`, mirroring the hosted API,
|
|
475
|
+
* which rejects an anonymous apply only on a walled board.
|
|
476
|
+
*/
|
|
477
|
+
| {
|
|
478
|
+
kind: 'guest';
|
|
479
|
+
jobSlug: string;
|
|
459
480
|
} | {
|
|
460
481
|
kind: 'applied';
|
|
461
482
|
} | {
|
|
@@ -469,14 +490,46 @@ type ApplyAction = {
|
|
|
469
490
|
* targets; anything else is treated as no external URL at all.
|
|
470
491
|
*/
|
|
471
492
|
declare function isSafeApplicationUrl(url: string): boolean;
|
|
472
|
-
|
|
493
|
+
interface ApplyDecisionState {
|
|
473
494
|
jobSlug: string | null;
|
|
474
495
|
applicationUrl: string | null;
|
|
475
496
|
viewer: {
|
|
476
497
|
emailVerified: boolean;
|
|
477
498
|
} | null;
|
|
478
499
|
applied: boolean;
|
|
479
|
-
|
|
500
|
+
/**
|
|
501
|
+
* The board's `features.registrationWall`. When `true` the hosted board
|
|
502
|
+
* requires a signed-in candidate before ANY apply path — the external
|
|
503
|
+
* employer link included. When `false` an anonymous visitor may apply
|
|
504
|
+
* natively as a guest: `POST /jobs/:jobSlug/apply` accepts an
|
|
505
|
+
* unauthenticated caller who supplies name/email, and rejects a guest
|
|
506
|
+
* only when the wall is on.
|
|
507
|
+
*
|
|
508
|
+
* Sign-in — not verification — is the wall's bar, matching hosted: a
|
|
509
|
+
* signed-in-but-unverified candidate clears it.
|
|
510
|
+
*/
|
|
511
|
+
registrationWall: boolean;
|
|
512
|
+
/**
|
|
513
|
+
* Does this UI have a guest-apply form to render? Opt-in, because the
|
|
514
|
+
* decision cannot know: a client with no form must keep getting
|
|
515
|
+
* `sign-in`, not a `guest` action it cannot present. Ignored when
|
|
516
|
+
* `registrationWall` is `true` — the wall always wins.
|
|
517
|
+
*/
|
|
518
|
+
allowGuestApply?: boolean;
|
|
519
|
+
}
|
|
520
|
+
/**
|
|
521
|
+
* The full apply ladder including the registration wall. Prefer this over
|
|
522
|
+
* the deprecated `resolveApplyAction`, which cannot see the wall and so
|
|
523
|
+
* hands an anonymous visitor the external employer link on a walled board.
|
|
524
|
+
*/
|
|
525
|
+
declare function resolveApplyDecision(state: ApplyDecisionState): ApplyAction;
|
|
526
|
+
/**
|
|
527
|
+
* @deprecated Wall-blind — use {@link resolveApplyDecision}, which takes
|
|
528
|
+
* the board's `features.registrationWall`. Kept as a one-line forward
|
|
529
|
+
* (`registrationWall: false`) so pinned callers keep their behaviour
|
|
530
|
+
* byte-for-byte; see docs/policy/removals.md.
|
|
531
|
+
*/
|
|
532
|
+
declare function resolveApplyAction(state: Omit<ApplyDecisionState, 'registrationWall' | 'allowGuestApply'>): ApplyAction;
|
|
480
533
|
|
|
481
534
|
type BoardUser = Schemas['BoardUser'];
|
|
482
535
|
type BoardAuthSession = Schemas['BoardAuthSession'];
|
|
@@ -800,6 +853,7 @@ declare function createBoardClient(options: CreateBoardClientOptions): {
|
|
|
800
853
|
nativeApplications: boolean;
|
|
801
854
|
messaging: boolean;
|
|
802
855
|
};
|
|
856
|
+
talentAccessModel: "paid_messaging" | "paid_unlocks_and_messaging" | null;
|
|
803
857
|
analytics: {
|
|
804
858
|
ga4MeasurementId: string | null;
|
|
805
859
|
gtmId: string | null;
|
|
@@ -817,16 +871,29 @@ declare function createBoardClient(options: CreateBoardClientOptions): {
|
|
|
817
871
|
jobForm: {
|
|
818
872
|
salary: {
|
|
819
873
|
visible: boolean;
|
|
874
|
+
required: boolean;
|
|
875
|
+
minBound: number | null;
|
|
876
|
+
maxBound: number | null;
|
|
877
|
+
allowedCurrencies: string[] | null;
|
|
820
878
|
};
|
|
821
879
|
seniority: {
|
|
822
880
|
visible: boolean;
|
|
881
|
+
required: boolean;
|
|
882
|
+
allowedOptions: string[];
|
|
823
883
|
};
|
|
824
884
|
location: {
|
|
825
885
|
visible: boolean;
|
|
886
|
+
allowedCountries: string[] | null;
|
|
826
887
|
};
|
|
827
888
|
sponsorship: {
|
|
828
889
|
visible: boolean;
|
|
829
890
|
};
|
|
891
|
+
workArrangement: {
|
|
892
|
+
allowedOptions: string[];
|
|
893
|
+
};
|
|
894
|
+
employmentType: {
|
|
895
|
+
allowedOptions: string[];
|
|
896
|
+
};
|
|
830
897
|
};
|
|
831
898
|
contact: {
|
|
832
899
|
email: string | null;
|
|
@@ -1396,6 +1463,7 @@ declare function createBoardClient(options: CreateBoardClientOptions): {
|
|
|
1396
1463
|
refreshToken: string;
|
|
1397
1464
|
expiresAt: number;
|
|
1398
1465
|
boardUser: components["schemas"]["BoardUser"];
|
|
1466
|
+
isNewUser?: boolean;
|
|
1399
1467
|
}>;
|
|
1400
1468
|
login(body: LoginBody, options?: FetchOptions): Promise<{
|
|
1401
1469
|
object: "board_auth_session";
|
|
@@ -1403,6 +1471,7 @@ declare function createBoardClient(options: CreateBoardClientOptions): {
|
|
|
1403
1471
|
refreshToken: string;
|
|
1404
1472
|
expiresAt: number;
|
|
1405
1473
|
boardUser: components["schemas"]["BoardUser"];
|
|
1474
|
+
isNewUser?: boolean;
|
|
1406
1475
|
}>;
|
|
1407
1476
|
refresh(body?: RefreshBody, options?: FetchOptions): Promise<{
|
|
1408
1477
|
object: "board_auth_session";
|
|
@@ -1410,6 +1479,7 @@ declare function createBoardClient(options: CreateBoardClientOptions): {
|
|
|
1410
1479
|
refreshToken: string;
|
|
1411
1480
|
expiresAt: number;
|
|
1412
1481
|
boardUser: components["schemas"]["BoardUser"];
|
|
1482
|
+
isNewUser?: boolean;
|
|
1413
1483
|
}>;
|
|
1414
1484
|
logout(body?: LogoutBody, options?: FetchOptions): Promise<void>;
|
|
1415
1485
|
verifyEmail(body: VerifyEmailBody, options?: FetchOptions): Promise<void>;
|
|
@@ -1426,6 +1496,7 @@ declare function createBoardClient(options: CreateBoardClientOptions): {
|
|
|
1426
1496
|
refreshToken: string;
|
|
1427
1497
|
expiresAt: number;
|
|
1428
1498
|
boardUser: components["schemas"]["BoardUser"];
|
|
1499
|
+
isNewUser?: boolean;
|
|
1429
1500
|
}>;
|
|
1430
1501
|
getOAuthAuthorizationUrl(provider: OAuthProvider, query?: OAuthAuthorizationQuery, options?: FetchOptions): Promise<{
|
|
1431
1502
|
object: "oauth_authorization_url";
|
|
@@ -1438,6 +1509,7 @@ declare function createBoardClient(options: CreateBoardClientOptions): {
|
|
|
1438
1509
|
refreshToken: string;
|
|
1439
1510
|
expiresAt: number;
|
|
1440
1511
|
boardUser: components["schemas"]["BoardUser"];
|
|
1512
|
+
isNewUser?: boolean;
|
|
1441
1513
|
}>;
|
|
1442
1514
|
};
|
|
1443
1515
|
me: {
|
|
@@ -1457,6 +1529,7 @@ declare function createBoardClient(options: CreateBoardClientOptions): {
|
|
|
1457
1529
|
refreshToken: string;
|
|
1458
1530
|
expiresAt: number;
|
|
1459
1531
|
boardUser: components["schemas"]["BoardUser"];
|
|
1532
|
+
isNewUser?: boolean;
|
|
1460
1533
|
}>;
|
|
1461
1534
|
requestEmailChange(body: RequestEmailChangeBody, options?: FetchOptions): Promise<void>;
|
|
1462
1535
|
confirmEmailChange(body: ConfirmEmailChangeBody, options?: FetchOptions): Promise<void>;
|
|
@@ -3281,4 +3354,4 @@ declare function createBoardClient(options: CreateBoardClientOptions): {
|
|
|
3281
3354
|
};
|
|
3282
3355
|
type BoardSdk = ReturnType<typeof createBoardClient>;
|
|
3283
3356
|
|
|
3284
|
-
export { type AcceptCompanyMemberInviteBody, type AccessCheckoutBody, type AccessCheckoutSession, type AccessCheckoutSessionState, type AccessGrant, type AccessPortalBody, type AccessPortalSession, type AddApplicantNoteBody, type Alert, type AlertBody, type Application, type ApplicationsListQuery, type ApplyAction, type ApplyApprovalPlan, type ApplyApprovalReceipt, type ApplyBody, type ApplyIntent, 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 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 CreateApplyApprovalBody, type CreateApplyIntentBody, type CreateBoardClientOptions, type CreateCompanyBody, type CreateCompanyMemberInviteBody, type CreateEducationBody, type CreateEmployerJobBody, type CreateExperienceBody, type CreateJobPostingInput, type CreatePipelineStageBody, 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, type JobPostingBillingOptions, type JobPostingBillingVerification, type JobPostingLogoResult, type JobPostingPlan, type JobPostingResult, JobsListQuery, JobsSearchBody, JobsSimilarQuery, ListEnvelope, Logger, type LoginBody, type LogoutBody, type MarketingConsent, type Message, type ModerationReport, type MoveApplicantStageBody, type NotificationPreference, type OAuthAuthorizationQuery, type OAuthAuthorizationUrl, type OAuthExchangeBody, type OAuthProvider, type Paginator, type PaywallOffer, type PaywallOfferListEnvelope, type PlacesListQuery, type Plan, type PlanListEnvelope, type PlansListQuery, type PublicPlace, type PublicTaxonomyTerm, type ReadReceipt, type RecommendedJob, type RecommendedJobsListQuery, type RecommendedTalent, type RecommendedTalentListQuery, type RedirectResolution, type RefreshBody, type RegisterBody, RemoteOption, type RemotePermitTaxonomyEntry, type ReorderPipelineStagesBody, 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 StartAboutApplicationBody, type StartConversationBody, StorageMode, type TalentAccess, type TalentAccessCheckoutBody, type TalentAccessCheckoutSession, type TalentAccessCheckoutSessionState, type TalentAccessUpgrade, type TalentAccessUpgradeBody, type TalentCandidateAccess, type TalentDirectoryEntry, type TalentDirectoryListEnvelope, type TalentDirectoryQuery, 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 UpdateSkillsBody, type VerifyEmailBody, createBoardClient, isBoardApiError, isBoardPasswordRequired, isColdRule, isConflict, isForbidden, isNotFound, isOwnMessage, isRateLimited, isSafeApplicationUrl, isUnauthorized, isValidationError, lastOwnMessageId, paginate, resolveApplyAction };
|
|
3357
|
+
export { type AcceptCompanyMemberInviteBody, type AccessCheckoutBody, type AccessCheckoutSession, type AccessCheckoutSessionState, type AccessGrant, type AccessPortalBody, type AccessPortalSession, type AddApplicantNoteBody, type Alert, type AlertBody, type Application, type ApplicationsListQuery, type ApplyAction, type ApplyApprovalPlan, type ApplyApprovalReceipt, type ApplyBody, type ApplyDecisionState, type ApplyIntent, 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 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 CreateApplyApprovalBody, type CreateApplyIntentBody, type CreateBoardClientOptions, type CreateCompanyBody, type CreateCompanyMemberInviteBody, type CreateEducationBody, type CreateEmployerJobBody, type CreateExperienceBody, type CreateJobPostingInput, type CreatePipelineStageBody, 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, type JobPostingBillingOptions, type JobPostingBillingVerification, type JobPostingLogoResult, type JobPostingPlan, type JobPostingResult, JobsListQuery, JobsSearchBody, JobsSimilarQuery, ListEnvelope, Logger, type LoginBody, type LogoutBody, type MarketingConsent, type Message, type ModerationReport, type MoveApplicantStageBody, type NotificationPreference, type OAuthAuthorizationQuery, type OAuthAuthorizationUrl, type OAuthExchangeBody, type OAuthProvider, type Paginator, type PaywallOffer, type PaywallOfferListEnvelope, type PlacesListQuery, type Plan, type PlanListEnvelope, type PlansListQuery, type PublicPlace, type PublicTaxonomyTerm, type ReadReceipt, type RecommendedJob, type RecommendedJobsListQuery, type RecommendedTalent, type RecommendedTalentListQuery, type RedirectResolution, type RefreshBody, type RegisterBody, RemoteOption, type RemotePermitTaxonomyEntry, type ReorderPipelineStagesBody, 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 StartAboutApplicationBody, type StartConversationBody, StorageMode, type TalentAccess, type TalentAccessCheckoutBody, type TalentAccessCheckoutSession, type TalentAccessCheckoutSessionState, type TalentAccessUpgrade, type TalentAccessUpgradeBody, type TalentCandidateAccess, type TalentDirectoryEntry, type TalentDirectoryListEnvelope, type TalentDirectoryQuery, 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 UpdateSkillsBody, type VerifyEmailBody, createBoardClient, isBoardApiError, isBoardPasswordRequired, isColdRule, isConflict, isForbidden, isNotFound, isOwnMessage, isRateLimited, isSafeApplicationUrl, isUnauthorized, isValidationError, lastOwnMessageId, paginate, resolveApplyAction, resolveApplyDecision };
|
package/dist/index.js
CHANGED
|
@@ -41,7 +41,8 @@ __export(src_exports, {
|
|
|
41
41
|
isValidationError: () => isValidationError,
|
|
42
42
|
lastOwnMessageId: () => lastOwnMessageId,
|
|
43
43
|
paginate: () => paginate,
|
|
44
|
-
resolveApplyAction: () => resolveApplyAction
|
|
44
|
+
resolveApplyAction: () => resolveApplyAction,
|
|
45
|
+
resolveApplyDecision: () => resolveApplyDecision
|
|
45
46
|
});
|
|
46
47
|
module.exports = __toCommonJS(src_exports);
|
|
47
48
|
|
|
@@ -342,7 +343,7 @@ async function clearSession(storage) {
|
|
|
342
343
|
}
|
|
343
344
|
|
|
344
345
|
// src/version.ts
|
|
345
|
-
var SDK_VERSION = "4.
|
|
346
|
+
var SDK_VERSION = "4.12.0";
|
|
346
347
|
|
|
347
348
|
// src/client.ts
|
|
348
349
|
function isRawBody(body) {
|
|
@@ -3213,16 +3214,29 @@ function isSafeApplicationUrl(url) {
|
|
|
3213
3214
|
if (scheme === void 0) return true;
|
|
3214
3215
|
return scheme === "http" || scheme === "https" || scheme === "mailto";
|
|
3215
3216
|
}
|
|
3216
|
-
function
|
|
3217
|
-
|
|
3218
|
-
|
|
3217
|
+
function resolveApplyDecision(state) {
|
|
3218
|
+
const externalUrl = state.applicationUrl && isSafeApplicationUrl(state.applicationUrl) ? state.applicationUrl : null;
|
|
3219
|
+
if (!externalUrl && !state.jobSlug) return { kind: "none" };
|
|
3220
|
+
if (state.registrationWall && !state.viewer) {
|
|
3221
|
+
return { kind: "sign-in", reason: "registration-wall" };
|
|
3219
3222
|
}
|
|
3223
|
+
if (externalUrl) return { kind: "external", url: externalUrl };
|
|
3220
3224
|
if (!state.jobSlug) return { kind: "none" };
|
|
3221
|
-
if (!state.viewer)
|
|
3225
|
+
if (!state.viewer) {
|
|
3226
|
+
return state.allowGuestApply ? { kind: "guest", jobSlug: state.jobSlug } : { kind: "sign-in", reason: "native-apply" };
|
|
3227
|
+
}
|
|
3222
3228
|
if (!state.viewer.emailVerified) return { kind: "verify-email" };
|
|
3223
3229
|
if (state.applied) return { kind: "applied" };
|
|
3224
3230
|
return { kind: "native", jobSlug: state.jobSlug };
|
|
3225
3231
|
}
|
|
3232
|
+
function resolveApplyAction(state) {
|
|
3233
|
+
const action = resolveApplyDecision({
|
|
3234
|
+
...state,
|
|
3235
|
+
registrationWall: false,
|
|
3236
|
+
allowGuestApply: false
|
|
3237
|
+
});
|
|
3238
|
+
return action.kind === "sign-in" ? { kind: "sign-in" } : action;
|
|
3239
|
+
}
|
|
3226
3240
|
|
|
3227
3241
|
// src/index.ts
|
|
3228
3242
|
function createBoardClient(options) {
|
package/dist/index.mjs
CHANGED
|
@@ -39,7 +39,7 @@ function toSearchParams(query) {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
// src/version.ts
|
|
42
|
-
var SDK_VERSION = "4.
|
|
42
|
+
var SDK_VERSION = "4.12.0";
|
|
43
43
|
|
|
44
44
|
// src/client.ts
|
|
45
45
|
function isRawBody(body) {
|
|
@@ -2880,16 +2880,29 @@ function isSafeApplicationUrl(url) {
|
|
|
2880
2880
|
if (scheme === void 0) return true;
|
|
2881
2881
|
return scheme === "http" || scheme === "https" || scheme === "mailto";
|
|
2882
2882
|
}
|
|
2883
|
-
function
|
|
2884
|
-
|
|
2885
|
-
|
|
2883
|
+
function resolveApplyDecision(state) {
|
|
2884
|
+
const externalUrl = state.applicationUrl && isSafeApplicationUrl(state.applicationUrl) ? state.applicationUrl : null;
|
|
2885
|
+
if (!externalUrl && !state.jobSlug) return { kind: "none" };
|
|
2886
|
+
if (state.registrationWall && !state.viewer) {
|
|
2887
|
+
return { kind: "sign-in", reason: "registration-wall" };
|
|
2886
2888
|
}
|
|
2889
|
+
if (externalUrl) return { kind: "external", url: externalUrl };
|
|
2887
2890
|
if (!state.jobSlug) return { kind: "none" };
|
|
2888
|
-
if (!state.viewer)
|
|
2891
|
+
if (!state.viewer) {
|
|
2892
|
+
return state.allowGuestApply ? { kind: "guest", jobSlug: state.jobSlug } : { kind: "sign-in", reason: "native-apply" };
|
|
2893
|
+
}
|
|
2889
2894
|
if (!state.viewer.emailVerified) return { kind: "verify-email" };
|
|
2890
2895
|
if (state.applied) return { kind: "applied" };
|
|
2891
2896
|
return { kind: "native", jobSlug: state.jobSlug };
|
|
2892
2897
|
}
|
|
2898
|
+
function resolveApplyAction(state) {
|
|
2899
|
+
const action = resolveApplyDecision({
|
|
2900
|
+
...state,
|
|
2901
|
+
registrationWall: false,
|
|
2902
|
+
allowGuestApply: false
|
|
2903
|
+
});
|
|
2904
|
+
return action.kind === "sign-in" ? { kind: "sign-in" } : action;
|
|
2905
|
+
}
|
|
2893
2906
|
|
|
2894
2907
|
// src/index.ts
|
|
2895
2908
|
function createBoardClient(options) {
|
|
@@ -2971,5 +2984,6 @@ export {
|
|
|
2971
2984
|
isValidationError,
|
|
2972
2985
|
lastOwnMessageId,
|
|
2973
2986
|
paginate,
|
|
2974
|
-
resolveApplyAction
|
|
2987
|
+
resolveApplyAction,
|
|
2988
|
+
resolveApplyDecision
|
|
2975
2989
|
};
|