@cavuno/board 1.23.0 → 1.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +223 -98
- package/dist/index.d.ts +223 -98
- package/dist/index.js +97 -2
- package/dist/index.mjs +97 -2
- package/package.json +1 -1
- package/skills/manifest.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,61 @@
|
|
|
1
1
|
interface components {
|
|
2
2
|
schemas: {
|
|
3
|
+
AccessCheckoutBody: {
|
|
4
|
+
/**
|
|
5
|
+
* @description The offer tier to purchase (from `GET /paywall/offers/enabled`).
|
|
6
|
+
* @enum {string}
|
|
7
|
+
*/
|
|
8
|
+
offerKey: "daily" | "weekly" | "monthly" | "quarterly" | "yearly" | "lifetime";
|
|
9
|
+
/** @description Relative path Stripe returns the buyer to on completion; `session_id` is appended. */
|
|
10
|
+
returnPath: string;
|
|
11
|
+
/** @enum {string} */
|
|
12
|
+
colorMode: "light" | "dark";
|
|
13
|
+
};
|
|
14
|
+
AccessCheckoutSession: {
|
|
15
|
+
/** @enum {string} */
|
|
16
|
+
object: "checkout_session";
|
|
17
|
+
sessionId: string;
|
|
18
|
+
/** @description The Checkout Session client secret to mount the embedded form. */
|
|
19
|
+
clientSecret: string;
|
|
20
|
+
/** @description The board’s connected Stripe account to initialise Stripe.js with. */
|
|
21
|
+
stripeAccountId: string;
|
|
22
|
+
/** @description The platform Stripe publishable key for `loadStripe`. */
|
|
23
|
+
publishableKey: string;
|
|
24
|
+
/**
|
|
25
|
+
* @description `recurring` grants get a manage-subscription portal; `lifetime` do not.
|
|
26
|
+
* @enum {string}
|
|
27
|
+
*/
|
|
28
|
+
offerType: "recurring" | "lifetime";
|
|
29
|
+
};
|
|
30
|
+
AccessCheckoutSessionState: {
|
|
31
|
+
/** @enum {string} */
|
|
32
|
+
object: "checkout_session_state";
|
|
33
|
+
/** @enum {string} */
|
|
34
|
+
status: "open" | "complete" | "expired";
|
|
35
|
+
clientSecret: string | null;
|
|
36
|
+
};
|
|
37
|
+
AccessGrant: {
|
|
38
|
+
/** @enum {string} */
|
|
39
|
+
object: "access_grant";
|
|
40
|
+
hasAccess: boolean;
|
|
41
|
+
/** @enum {string|null} */
|
|
42
|
+
status: "active" | "past_due" | "unpaid" | "incomplete" | "incomplete_expired" | "canceled" | "pending" | null;
|
|
43
|
+
/** @enum {string|null} */
|
|
44
|
+
offerType: "recurring" | "lifetime" | null;
|
|
45
|
+
offerKey: string | null;
|
|
46
|
+
currentPeriodEnd: string | null;
|
|
47
|
+
cancelAtPeriodEnd: boolean;
|
|
48
|
+
};
|
|
49
|
+
AccessPortalBody: {
|
|
50
|
+
/** @description Relative path Stripe returns the buyer to; defaults to the board root. */
|
|
51
|
+
returnPath?: string;
|
|
52
|
+
};
|
|
53
|
+
AccessPortalSession: {
|
|
54
|
+
/** @enum {string} */
|
|
55
|
+
object: "portal_session";
|
|
56
|
+
/** Format: uri */
|
|
57
|
+
url: string;
|
|
58
|
+
};
|
|
3
59
|
AddApplicantNoteBody: {
|
|
4
60
|
/** @description The note text. */
|
|
5
61
|
body: string;
|
|
@@ -2191,6 +2247,24 @@ interface components {
|
|
|
2191
2247
|
[key: string]: unknown;
|
|
2192
2248
|
};
|
|
2193
2249
|
};
|
|
2250
|
+
PaywallOffer: {
|
|
2251
|
+
/** @enum {string} */
|
|
2252
|
+
object: "paywall_offer";
|
|
2253
|
+
/** @description The tier key posted to checkout (e.g. `monthly`, `lifetime`). */
|
|
2254
|
+
offerKey: string;
|
|
2255
|
+
label: string;
|
|
2256
|
+
billingLabel: string;
|
|
2257
|
+
amountCents: number;
|
|
2258
|
+
currency: string;
|
|
2259
|
+
/**
|
|
2260
|
+
* @description `recurring` tiers get a manage-subscription portal; `lifetime` do not.
|
|
2261
|
+
* @enum {string}
|
|
2262
|
+
*/
|
|
2263
|
+
offerType: "recurring" | "lifetime";
|
|
2264
|
+
intervalUnit: string | null;
|
|
2265
|
+
intervalCount: number | null;
|
|
2266
|
+
isDefault: boolean;
|
|
2267
|
+
};
|
|
2194
2268
|
Plan: {
|
|
2195
2269
|
/** @enum {string} */
|
|
2196
2270
|
object: "plan";
|
|
@@ -3650,102 +3724,6 @@ interface components {
|
|
|
3650
3724
|
pathItems: never;
|
|
3651
3725
|
}
|
|
3652
3726
|
|
|
3653
|
-
type Schemas = components['schemas'];
|
|
3654
|
-
|
|
3655
|
-
/**
|
|
3656
|
-
* Stripe-shaped success envelopes (`01-conventions.md` §5.1). The
|
|
3657
|
-
* server MAY add top-level fields; consumers MUST ignore unknown
|
|
3658
|
-
* fields.
|
|
3659
|
-
*/
|
|
3660
|
-
/**
|
|
3661
|
-
* Medusa-style storefront pagination fields (ADR-0037 §7), populated only by
|
|
3662
|
-
* the board jobs catalog reads (browse / search / company-jobs); absent on
|
|
3663
|
-
* every other list/search. `nextCursor` is preserved alongside (offset-encoded).
|
|
3664
|
-
*/
|
|
3665
|
-
interface StorefrontPagination {
|
|
3666
|
-
/** Total matching results ("X jobs"). */
|
|
3667
|
-
count?: number;
|
|
3668
|
-
/** The page size used for this response. */
|
|
3669
|
-
limit?: number;
|
|
3670
|
-
/** Number of items skipped before this page. */
|
|
3671
|
-
offset?: number;
|
|
3672
|
-
/** Items hidden behind the candidate paywall for the current viewer; absent/0 when entitled. */
|
|
3673
|
-
gatedCount?: number;
|
|
3674
|
-
}
|
|
3675
|
-
interface ListEnvelope<T> extends StorefrontPagination {
|
|
3676
|
-
object: 'list';
|
|
3677
|
-
url: string;
|
|
3678
|
-
hasMore: boolean;
|
|
3679
|
-
/** `null` when `hasMore` is false — always present, never undefined. */
|
|
3680
|
-
nextCursor: string | null;
|
|
3681
|
-
data: T[];
|
|
3682
|
-
}
|
|
3683
|
-
interface SearchEnvelope<T> extends StorefrontPagination {
|
|
3684
|
-
object: 'search_result';
|
|
3685
|
-
url: string;
|
|
3686
|
-
hasMore: boolean;
|
|
3687
|
-
nextCursor: string | null;
|
|
3688
|
-
data: T[];
|
|
3689
|
-
}
|
|
3690
|
-
|
|
3691
|
-
type PublicJob = Schemas['PublicJob'];
|
|
3692
|
-
type PublicJobCard = Schemas['PublicJobCard'];
|
|
3693
|
-
type JobCompany = Schemas['JobCompany'];
|
|
3694
|
-
type OfficeLocation = Schemas['JobOfficeLocation'];
|
|
3695
|
-
type RemoteOption = NonNullable<PublicJob['remoteOption']>;
|
|
3696
|
-
type EmploymentType = NonNullable<PublicJob['employmentType']>;
|
|
3697
|
-
type Seniority = NonNullable<PublicJob['seniority']>;
|
|
3698
|
-
/** Candidate-facing result ordering (ADR-0048); `relevance` is the default. */
|
|
3699
|
-
type JobSort = NonNullable<Schemas['PublicSearchJobsBody']['sort']>;
|
|
3700
|
-
type EducationRequirement = PublicJob['educationRequirements'][number];
|
|
3701
|
-
type RemotePermit = PublicJob['remotePermits'][number];
|
|
3702
|
-
type RemoteTimezone = PublicJob['remoteTimezones'][number];
|
|
3703
|
-
/**
|
|
3704
|
-
* Derived suggestion on a browse list (ADR-0037 §8): jobs surface `category`
|
|
3705
|
-
* and `skill` terms; the companies list surfaces `market` terms.
|
|
3706
|
-
*/
|
|
3707
|
-
interface RelatedSearch {
|
|
3708
|
-
type: 'category' | 'skill' | 'market';
|
|
3709
|
-
slug: string;
|
|
3710
|
-
term: string;
|
|
3711
|
-
count: number;
|
|
3712
|
-
}
|
|
3713
|
-
/** The browse list envelope — `PublicJobCard`s + storefront fields + `relatedSearches`. */
|
|
3714
|
-
interface JobCardListEnvelope extends ListEnvelope<PublicJobCard> {
|
|
3715
|
-
relatedSearches?: RelatedSearch[];
|
|
3716
|
-
}
|
|
3717
|
-
/** The search envelope — `PublicJobCard`s + storefront fields. */
|
|
3718
|
-
type JobCardSearchEnvelope = SearchEnvelope<PublicJobCard>;
|
|
3719
|
-
type JobsListQuery = {
|
|
3720
|
-
cursor?: string;
|
|
3721
|
-
/** 1–100. */
|
|
3722
|
-
limit?: number;
|
|
3723
|
-
/** Storefront page offset; takes precedence over `cursor`. `offset + limit` ≤ 10,000. */
|
|
3724
|
-
offset?: number;
|
|
3725
|
-
/** Repeated param (up to 10) — OR-matched. Repeat `companyId` per value. */
|
|
3726
|
-
companyId?: string[];
|
|
3727
|
-
remoteOption?: RemoteOption[];
|
|
3728
|
-
employmentType?: EmploymentType[];
|
|
3729
|
-
seniority?: Seniority[];
|
|
3730
|
-
/** Result ordering (ADR-0048). Absent ⇒ `relevance` (the featured-ranked browse). */
|
|
3731
|
-
sort?: JobSort;
|
|
3732
|
-
/** Place slug for a geo radius search; unresolvable slugs are ignored. */
|
|
3733
|
-
location?: string;
|
|
3734
|
-
/** Radius in km around `location` (10–250; default 50). */
|
|
3735
|
-
radius?: number;
|
|
3736
|
-
/** Category slug seed (the `/jobs/[keyword]` page) — server resolves it to the English source name; unresolvable → 404. */
|
|
3737
|
-
category?: string;
|
|
3738
|
-
/** Skill slug seed (the `/jobs/skills/[skill]` page) — server-resolved; unresolvable → 404. */
|
|
3739
|
-
skill?: string;
|
|
3740
|
-
/** Sparse fieldset (Medusa-style `+field`). Only `'+description'` is supported — adds `description` to each card. */
|
|
3741
|
-
fields?: string;
|
|
3742
|
-
};
|
|
3743
|
-
type JobsSimilarQuery = {
|
|
3744
|
-
/** How many similar jobs to return (1–20; default 5). */
|
|
3745
|
-
limit?: number;
|
|
3746
|
-
};
|
|
3747
|
-
type JobsSearchBody = Schemas['PublicSearchJobsBody'];
|
|
3748
|
-
|
|
3749
3727
|
type Awaitable<T> = T | Promise<T>;
|
|
3750
3728
|
/**
|
|
3751
3729
|
* Async token storage. The SDK reads the access token from storage on
|
|
@@ -3865,7 +3843,9 @@ declare function isConflict(e: unknown): e is BoardApiError;
|
|
|
3865
3843
|
* constant because the package is platform-neutral and cannot read
|
|
3866
3844
|
* package.json at runtime.
|
|
3867
3845
|
*/
|
|
3868
|
-
declare const SDK_VERSION = "1.
|
|
3846
|
+
declare const SDK_VERSION = "1.24.0";
|
|
3847
|
+
|
|
3848
|
+
type Schemas = components['schemas'];
|
|
3869
3849
|
|
|
3870
3850
|
type BoardUser = Schemas['BoardUser'];
|
|
3871
3851
|
type BoardAuthSession = Schemas['BoardAuthSession'];
|
|
@@ -3898,6 +3878,100 @@ type PublicBoardTheme = NonNullable<PublicBoard['theme']>;
|
|
|
3898
3878
|
*/
|
|
3899
3879
|
type BoardSeo = Schemas['BoardSeo'];
|
|
3900
3880
|
|
|
3881
|
+
/**
|
|
3882
|
+
* Stripe-shaped success envelopes (`01-conventions.md` §5.1). The
|
|
3883
|
+
* server MAY add top-level fields; consumers MUST ignore unknown
|
|
3884
|
+
* fields.
|
|
3885
|
+
*/
|
|
3886
|
+
/**
|
|
3887
|
+
* Medusa-style storefront pagination fields (ADR-0037 §7), populated only by
|
|
3888
|
+
* the board jobs catalog reads (browse / search / company-jobs); absent on
|
|
3889
|
+
* every other list/search. `nextCursor` is preserved alongside (offset-encoded).
|
|
3890
|
+
*/
|
|
3891
|
+
interface StorefrontPagination {
|
|
3892
|
+
/** Total matching results ("X jobs"). */
|
|
3893
|
+
count?: number;
|
|
3894
|
+
/** The page size used for this response. */
|
|
3895
|
+
limit?: number;
|
|
3896
|
+
/** Number of items skipped before this page. */
|
|
3897
|
+
offset?: number;
|
|
3898
|
+
/** Items hidden behind the candidate paywall for the current viewer; absent/0 when entitled. */
|
|
3899
|
+
gatedCount?: number;
|
|
3900
|
+
}
|
|
3901
|
+
interface ListEnvelope<T> extends StorefrontPagination {
|
|
3902
|
+
object: 'list';
|
|
3903
|
+
url: string;
|
|
3904
|
+
hasMore: boolean;
|
|
3905
|
+
/** `null` when `hasMore` is false — always present, never undefined. */
|
|
3906
|
+
nextCursor: string | null;
|
|
3907
|
+
data: T[];
|
|
3908
|
+
}
|
|
3909
|
+
interface SearchEnvelope<T> extends StorefrontPagination {
|
|
3910
|
+
object: 'search_result';
|
|
3911
|
+
url: string;
|
|
3912
|
+
hasMore: boolean;
|
|
3913
|
+
nextCursor: string | null;
|
|
3914
|
+
data: T[];
|
|
3915
|
+
}
|
|
3916
|
+
|
|
3917
|
+
type PublicJob = Schemas['PublicJob'];
|
|
3918
|
+
type PublicJobCard = Schemas['PublicJobCard'];
|
|
3919
|
+
type JobCompany = Schemas['JobCompany'];
|
|
3920
|
+
type OfficeLocation = Schemas['JobOfficeLocation'];
|
|
3921
|
+
type RemoteOption = NonNullable<PublicJob['remoteOption']>;
|
|
3922
|
+
type EmploymentType = NonNullable<PublicJob['employmentType']>;
|
|
3923
|
+
type Seniority = NonNullable<PublicJob['seniority']>;
|
|
3924
|
+
/** Candidate-facing result ordering (ADR-0048); `relevance` is the default. */
|
|
3925
|
+
type JobSort = NonNullable<Schemas['PublicSearchJobsBody']['sort']>;
|
|
3926
|
+
type EducationRequirement = PublicJob['educationRequirements'][number];
|
|
3927
|
+
type RemotePermit = PublicJob['remotePermits'][number];
|
|
3928
|
+
type RemoteTimezone = PublicJob['remoteTimezones'][number];
|
|
3929
|
+
/**
|
|
3930
|
+
* Derived suggestion on a browse list (ADR-0037 §8): jobs surface `category`
|
|
3931
|
+
* and `skill` terms; the companies list surfaces `market` terms.
|
|
3932
|
+
*/
|
|
3933
|
+
interface RelatedSearch {
|
|
3934
|
+
type: 'category' | 'skill' | 'market';
|
|
3935
|
+
slug: string;
|
|
3936
|
+
term: string;
|
|
3937
|
+
count: number;
|
|
3938
|
+
}
|
|
3939
|
+
/** The browse list envelope — `PublicJobCard`s + storefront fields + `relatedSearches`. */
|
|
3940
|
+
interface JobCardListEnvelope extends ListEnvelope<PublicJobCard> {
|
|
3941
|
+
relatedSearches?: RelatedSearch[];
|
|
3942
|
+
}
|
|
3943
|
+
/** The search envelope — `PublicJobCard`s + storefront fields. */
|
|
3944
|
+
type JobCardSearchEnvelope = SearchEnvelope<PublicJobCard>;
|
|
3945
|
+
type JobsListQuery = {
|
|
3946
|
+
cursor?: string;
|
|
3947
|
+
/** 1–100. */
|
|
3948
|
+
limit?: number;
|
|
3949
|
+
/** Storefront page offset; takes precedence over `cursor`. `offset + limit` ≤ 10,000. */
|
|
3950
|
+
offset?: number;
|
|
3951
|
+
/** Repeated param (up to 10) — OR-matched. Repeat `companyId` per value. */
|
|
3952
|
+
companyId?: string[];
|
|
3953
|
+
remoteOption?: RemoteOption[];
|
|
3954
|
+
employmentType?: EmploymentType[];
|
|
3955
|
+
seniority?: Seniority[];
|
|
3956
|
+
/** Result ordering (ADR-0048). Absent ⇒ `relevance` (the featured-ranked browse). */
|
|
3957
|
+
sort?: JobSort;
|
|
3958
|
+
/** Place slug for a geo radius search; unresolvable slugs are ignored. */
|
|
3959
|
+
location?: string;
|
|
3960
|
+
/** Radius in km around `location` (10–250; default 50). */
|
|
3961
|
+
radius?: number;
|
|
3962
|
+
/** Category slug seed (the `/jobs/[keyword]` page) — server resolves it to the English source name; unresolvable → 404. */
|
|
3963
|
+
category?: string;
|
|
3964
|
+
/** Skill slug seed (the `/jobs/skills/[skill]` page) — server-resolved; unresolvable → 404. */
|
|
3965
|
+
skill?: string;
|
|
3966
|
+
/** Sparse fieldset (Medusa-style `+field`). Only `'+description'` is supported — adds `description` to each card. */
|
|
3967
|
+
fields?: string;
|
|
3968
|
+
};
|
|
3969
|
+
type JobsSimilarQuery = {
|
|
3970
|
+
/** How many similar jobs to return (1–20; default 5). */
|
|
3971
|
+
limit?: number;
|
|
3972
|
+
};
|
|
3973
|
+
type JobsSearchBody = Schemas['PublicSearchJobsBody'];
|
|
3974
|
+
|
|
3901
3975
|
type EmbedJobsQuery = {
|
|
3902
3976
|
/** Free-text search query, up to 200 characters. */
|
|
3903
3977
|
q?: string;
|
|
@@ -4051,6 +4125,26 @@ type PlansListQuery = {
|
|
|
4051
4125
|
type PlanListEnvelope = ListEnvelope<Plan>;
|
|
4052
4126
|
type SalesLedPlanListEnvelope = ListEnvelope<SalesLedPlan>;
|
|
4053
4127
|
|
|
4128
|
+
/** An enabled candidate-access paywall offer tier (public). */
|
|
4129
|
+
type PaywallOffer = Schemas['PaywallOffer'];
|
|
4130
|
+
/**
|
|
4131
|
+
* The connected-account embedded-checkout mount kit returned by
|
|
4132
|
+
* `board.me.access.checkout`. Mount with `loadStripe(publishableKey, {
|
|
4133
|
+
* stripeAccount: stripeAccountId })` then `initEmbeddedCheckout({ clientSecret })`.
|
|
4134
|
+
*/
|
|
4135
|
+
type AccessCheckoutSession = Schemas['AccessCheckoutSession'];
|
|
4136
|
+
/** The polled state of a checkout session (`board.me.access.retrieveCheckout`). */
|
|
4137
|
+
type AccessCheckoutSessionState = Schemas['AccessCheckoutSessionState'];
|
|
4138
|
+
/** The viewer's candidate-access entitlement (`board.me.access.grant`). */
|
|
4139
|
+
type AccessGrant = Schemas['AccessGrant'];
|
|
4140
|
+
/** A minted Stripe billing-portal session (`board.me.access.portal`). */
|
|
4141
|
+
type AccessPortalSession = Schemas['AccessPortalSession'];
|
|
4142
|
+
/** Body for `board.me.access.checkout`. */
|
|
4143
|
+
type AccessCheckoutBody = Schemas['AccessCheckoutBody'];
|
|
4144
|
+
/** Body for `board.me.access.portal`. */
|
|
4145
|
+
type AccessPortalBody = Schemas['AccessPortalBody'];
|
|
4146
|
+
type PaywallOfferListEnvelope = ListEnvelope<PaywallOffer>;
|
|
4147
|
+
|
|
4054
4148
|
type SavedJob = Schemas['SavedJob'];
|
|
4055
4149
|
type SavedJobsListQuery = {
|
|
4056
4150
|
cursor?: string;
|
|
@@ -5898,6 +5992,34 @@ declare function createBoardClient(options: CreateBoardClientOptions): {
|
|
|
5898
5992
|
blocked: boolean;
|
|
5899
5993
|
}>;
|
|
5900
5994
|
};
|
|
5995
|
+
access: {
|
|
5996
|
+
checkout(body: AccessCheckoutBody, options?: FetchOptions): Promise<{
|
|
5997
|
+
object: "checkout_session";
|
|
5998
|
+
sessionId: string;
|
|
5999
|
+
clientSecret: string;
|
|
6000
|
+
stripeAccountId: string;
|
|
6001
|
+
publishableKey: string;
|
|
6002
|
+
offerType: "recurring" | "lifetime";
|
|
6003
|
+
}>;
|
|
6004
|
+
retrieveCheckout(sessionId: string, options?: FetchOptions): Promise<{
|
|
6005
|
+
object: "checkout_session_state";
|
|
6006
|
+
status: "open" | "complete" | "expired";
|
|
6007
|
+
clientSecret: string | null;
|
|
6008
|
+
}>;
|
|
6009
|
+
grant(options?: FetchOptions): Promise<{
|
|
6010
|
+
object: "access_grant";
|
|
6011
|
+
hasAccess: boolean;
|
|
6012
|
+
status: "active" | "past_due" | "unpaid" | "incomplete" | "incomplete_expired" | "canceled" | "pending" | null;
|
|
6013
|
+
offerType: "recurring" | "lifetime" | null;
|
|
6014
|
+
offerKey: string | null;
|
|
6015
|
+
currentPeriodEnd: string | null;
|
|
6016
|
+
cancelAtPeriodEnd: boolean;
|
|
6017
|
+
}>;
|
|
6018
|
+
portal(body?: AccessPortalBody, options?: FetchOptions): Promise<{
|
|
6019
|
+
object: "portal_session";
|
|
6020
|
+
url: string;
|
|
6021
|
+
}>;
|
|
6022
|
+
};
|
|
5901
6023
|
};
|
|
5902
6024
|
password: {
|
|
5903
6025
|
verify(password: string, options?: FetchOptions): Promise<BoardAccessGrant>;
|
|
@@ -6594,7 +6716,10 @@ declare function createBoardClient(options: CreateBoardClientOptions): {
|
|
|
6594
6716
|
list(query?: PlansListQuery, options?: FetchOptions): Promise<PlanListEnvelope>;
|
|
6595
6717
|
salesLed(options?: FetchOptions): Promise<SalesLedPlanListEnvelope>;
|
|
6596
6718
|
};
|
|
6719
|
+
paywall: {
|
|
6720
|
+
offers(options?: FetchOptions): Promise<PaywallOfferListEnvelope>;
|
|
6721
|
+
};
|
|
6597
6722
|
};
|
|
6598
6723
|
type BoardSdk = ReturnType<typeof createBoardClient>;
|
|
6599
6724
|
|
|
6600
|
-
export { ACCESS_TOKEN_KEY, type AddApplicantNoteBody, type Alert, type AlertBody, type Application, type ApplicationsListQuery, type ApplyBody, type Awaitable, BOARD_ACCESS_GRANT_KEY, type Block, type BlockStatus, type BlockUserBody, type BlockedUser, type BlogAuthorEmbed, type BlogPostsListQuery, type BlogSearchBody, type BlogSimilarQuery, type BlogTagEmbed, type BoardAccessGrant, BoardApiError, type BoardAuthSession, BoardClient, type BoardRequest, type BoardSdk, type BoardSeo, type BoardUser, type BulkMoveApplicantsBody, type BulkRejectApplicantsBody, type CandidateAvatar, type CandidateEducation, type CandidateExperience, type CandidateLanguage, type CandidateProfile, type CandidateSkill, type ClaimableCompany, type CompaniesListQuery, type CompaniesSearchBody, type CompanyCategorySalary, type CompanyJobsListQuery, type CompanyListEnvelope, type CompanyMarket, type CompanyMarketRef, type CompanyMarketsListQuery, type CompanyMembership, type CompanySalary, type CompanySimilarQuery, type ConfirmWorkEmailBody, type ConsumeMagicLinkBody, type Conversation, type ConversationArchive, type ConversationDetail, type ConversationRef, type ConversationsListQuery, type CreateBoardClientOptions, type CreateCompanyBody, type CreateEducationBody, type CreateEmployerJobBody, type CreateExperienceBody, type CreateJobPostingInput, type CreatePipelineStageBody, type CustomStorage, type EditMessageBody, type EducationRequirement, type EmbedJobsQuery, type EmployerApplicant, type EmployerBillingOption, type EmployerCheckout, type EmployerCheckoutBody, type EmployerCompany, type EmployerCompanySearchQuery, type EmployerJob, type EmployerJobSummary, type EmployerJobsListQuery, type EmployerPipeline, type EmployerPipelineQuery, type EmployerPipelineStage, type EmploymentType, type 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, type JobCardListEnvelope, type JobCardSearchEnvelope, type JobCompany, type JobPostingBillingCheck, type JobPostingBillingOptions, type JobPostingBillingVerification, type JobPostingLogoResult, type JobPostingPlan, type JobPostingResult, type JobPostingSubscriptionEntitlements, type JobSort, type JobsListQuery, type JobsSearchBody, type LegalEntity, type LegalPageType, type ListEnvelope, type LocationSalaryDetail, type LocationSkillsIndex, type LocationTitlesIndex, type Logger, type LoginBody, type LogoutBody, type Message, type ModerationReport, type MoveApplicantStageBody, type NotificationPreference, type OAuthAuthorizationQuery, type OAuthAuthorizationUrl, type OAuthExchangeBody, type OAuthProvider, type OfficeLocation, type PlacesListQuery, type Plan, type PlanListEnvelope, type PlansListQuery, type PublicBlogAdjacentPosts, type PublicBlogAuthor, type PublicBlogPost, type PublicBlogPostSummary, type PublicBlogTag, type PublicBoard, type PublicBoardAnalytics, type PublicBoardFeatures, type PublicBoardTheme, type PublicCompany, type PublicCompanyDetail, type PublicJob, type PublicJobCard, type PublicLegalPage, type PublicPlace, REFRESH_TOKEN_KEY, type ReadReceipt, type RedirectResolution, type RefreshBody, type RegisterBody, type RelatedSearch, type RemoteOption, type RemotePermit, type RemoteTimezone, type ReorderPipelineStagesBody, type ReplyBody, type ReportBody, type RequestMagicLinkBody, type ResetPasswordBody, type Resume, type ResumeUploadOptions, SDK_VERSION, type SalaryCompany, type SalaryDetailQuery, type SalaryLocation, type SalarySkill, type SalaryTitle, type SalesLedPlan, type SalesLedPlanListEnvelope, type SaveJobBody, type SavedJob, type SavedJobsListQuery, type SearchEnvelope, type SendWorkEmailBody, type Seniority, type SkillLocationSalary, type SkillLocationsIndex, type SkillSalaryDetail, type StartAboutApplicationBody, type StartConversationBody, type StorageMode, type StorefrontPagination, type TalentDirectoryEntry, type TalentDirectoryListEnvelope, type TalentDirectoryQuery, type TalentProfile, type TaxonomyGeo, type TaxonomyResolution, type ThreadMessagesQuery, type TitleLocationSalary, type TitleLocationsIndex, type TitleSalaryDetail, type UnreadCount, type UnsubscribeBody, type UpdateApplicationFactsBody, type UpdateCandidateProfileBody, type UpdateEducationBody, type UpdateEmployerCompanyBody, type UpdateEmployerJobBody, type UpdateExperienceBody, type UpdateLanguagesBody, type UpdateNotificationPreferenceBody, type UpdatePipelineStageBody, type UpdateSkillsBody, type VerifyEmailBody, createBoardClient, isBoardApiError, isBoardPasswordRequired, isConflict, isForbidden, isNotFound, isRateLimited, isUnauthorized, isValidationError };
|
|
6725
|
+
export { ACCESS_TOKEN_KEY, type AccessCheckoutBody, type AccessCheckoutSession, type AccessCheckoutSessionState, type AccessGrant, type AccessPortalBody, type AccessPortalSession, type AddApplicantNoteBody, type Alert, type AlertBody, type Application, type ApplicationsListQuery, type ApplyBody, type Awaitable, BOARD_ACCESS_GRANT_KEY, type Block, type BlockStatus, type BlockUserBody, type BlockedUser, type BlogAuthorEmbed, type BlogPostsListQuery, type BlogSearchBody, type BlogSimilarQuery, type BlogTagEmbed, type BoardAccessGrant, BoardApiError, type BoardAuthSession, BoardClient, type BoardRequest, type BoardSdk, type BoardSeo, type BoardUser, type BulkMoveApplicantsBody, type BulkRejectApplicantsBody, type CandidateAvatar, type CandidateEducation, type CandidateExperience, type CandidateLanguage, type CandidateProfile, type CandidateSkill, type ClaimableCompany, type CompaniesListQuery, type CompaniesSearchBody, type CompanyCategorySalary, type CompanyJobsListQuery, type CompanyListEnvelope, type CompanyMarket, type CompanyMarketRef, type CompanyMarketsListQuery, type CompanyMembership, type CompanySalary, type CompanySimilarQuery, type ConfirmWorkEmailBody, type ConsumeMagicLinkBody, type Conversation, type ConversationArchive, type ConversationDetail, type ConversationRef, type ConversationsListQuery, type CreateBoardClientOptions, type CreateCompanyBody, type CreateEducationBody, type CreateEmployerJobBody, type CreateExperienceBody, type CreateJobPostingInput, type CreatePipelineStageBody, type CustomStorage, type EditMessageBody, type EducationRequirement, type EmbedJobsQuery, type EmployerApplicant, type EmployerBillingOption, type EmployerCheckout, type EmployerCheckoutBody, type EmployerCompany, type EmployerCompanySearchQuery, type EmployerJob, type EmployerJobSummary, type EmployerJobsListQuery, type EmployerPipeline, type EmployerPipelineQuery, type EmployerPipelineStage, type EmploymentType, type 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, type JobCardListEnvelope, type JobCardSearchEnvelope, type JobCompany, type JobPostingBillingCheck, type JobPostingBillingOptions, type JobPostingBillingVerification, type JobPostingLogoResult, type JobPostingPlan, type JobPostingResult, type JobPostingSubscriptionEntitlements, type JobSort, type JobsListQuery, type JobsSearchBody, type JobsSimilarQuery, type LegalEntity, type LegalPageType, type ListEnvelope, type LocationSalaryDetail, type LocationSkillsIndex, type LocationTitlesIndex, type Logger, type LoginBody, type LogoutBody, type Message, type ModerationReport, type MoveApplicantStageBody, type NotificationPreference, type OAuthAuthorizationQuery, type OAuthAuthorizationUrl, type OAuthExchangeBody, type OAuthProvider, type OfficeLocation, type PaywallOffer, type PaywallOfferListEnvelope, type PlacesListQuery, type Plan, type PlanListEnvelope, type PlansListQuery, type PublicBlogAdjacentPosts, type PublicBlogAuthor, type PublicBlogPost, type PublicBlogPostSummary, type PublicBlogTag, type PublicBoard, type PublicBoardAnalytics, type PublicBoardFeatures, type PublicBoardTheme, type PublicCompany, type PublicCompanyDetail, type PublicJob, type PublicJobCard, type PublicLegalPage, type PublicPlace, REFRESH_TOKEN_KEY, type ReadReceipt, type RedirectResolution, type RefreshBody, type RegisterBody, type RelatedSearch, type RemoteOption, type RemotePermit, type RemoteTimezone, type ReorderPipelineStagesBody, type ReplyBody, type ReportBody, type RequestMagicLinkBody, type ResetPasswordBody, type Resume, type ResumeUploadOptions, SDK_VERSION, type SalaryCompany, type SalaryDetailQuery, type SalaryLocation, type SalarySkill, type SalaryTitle, type SalesLedPlan, type SalesLedPlanListEnvelope, type SaveJobBody, type SavedJob, type SavedJobsListQuery, type SearchEnvelope, type SendWorkEmailBody, type Seniority, type SkillLocationSalary, type SkillLocationsIndex, type SkillSalaryDetail, type StartAboutApplicationBody, type StartConversationBody, type StorageMode, type StorefrontPagination, type TalentDirectoryEntry, type TalentDirectoryListEnvelope, type TalentDirectoryQuery, type TalentProfile, type TaxonomyGeo, type TaxonomyResolution, type ThreadMessagesQuery, type TitleLocationSalary, type TitleLocationsIndex, type TitleSalaryDetail, type UnreadCount, type UnsubscribeBody, type UpdateApplicationFactsBody, type UpdateCandidateProfileBody, type UpdateEducationBody, type UpdateEmployerCompanyBody, type UpdateEmployerJobBody, type UpdateExperienceBody, type UpdateLanguagesBody, type UpdateNotificationPreferenceBody, type UpdatePipelineStageBody, type UpdateSkillsBody, type VerifyEmailBody, createBoardClient, isBoardApiError, isBoardPasswordRequired, isConflict, isForbidden, isNotFound, isRateLimited, isUnauthorized, isValidationError };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,61 @@
|
|
|
1
1
|
interface components {
|
|
2
2
|
schemas: {
|
|
3
|
+
AccessCheckoutBody: {
|
|
4
|
+
/**
|
|
5
|
+
* @description The offer tier to purchase (from `GET /paywall/offers/enabled`).
|
|
6
|
+
* @enum {string}
|
|
7
|
+
*/
|
|
8
|
+
offerKey: "daily" | "weekly" | "monthly" | "quarterly" | "yearly" | "lifetime";
|
|
9
|
+
/** @description Relative path Stripe returns the buyer to on completion; `session_id` is appended. */
|
|
10
|
+
returnPath: string;
|
|
11
|
+
/** @enum {string} */
|
|
12
|
+
colorMode: "light" | "dark";
|
|
13
|
+
};
|
|
14
|
+
AccessCheckoutSession: {
|
|
15
|
+
/** @enum {string} */
|
|
16
|
+
object: "checkout_session";
|
|
17
|
+
sessionId: string;
|
|
18
|
+
/** @description The Checkout Session client secret to mount the embedded form. */
|
|
19
|
+
clientSecret: string;
|
|
20
|
+
/** @description The board’s connected Stripe account to initialise Stripe.js with. */
|
|
21
|
+
stripeAccountId: string;
|
|
22
|
+
/** @description The platform Stripe publishable key for `loadStripe`. */
|
|
23
|
+
publishableKey: string;
|
|
24
|
+
/**
|
|
25
|
+
* @description `recurring` grants get a manage-subscription portal; `lifetime` do not.
|
|
26
|
+
* @enum {string}
|
|
27
|
+
*/
|
|
28
|
+
offerType: "recurring" | "lifetime";
|
|
29
|
+
};
|
|
30
|
+
AccessCheckoutSessionState: {
|
|
31
|
+
/** @enum {string} */
|
|
32
|
+
object: "checkout_session_state";
|
|
33
|
+
/** @enum {string} */
|
|
34
|
+
status: "open" | "complete" | "expired";
|
|
35
|
+
clientSecret: string | null;
|
|
36
|
+
};
|
|
37
|
+
AccessGrant: {
|
|
38
|
+
/** @enum {string} */
|
|
39
|
+
object: "access_grant";
|
|
40
|
+
hasAccess: boolean;
|
|
41
|
+
/** @enum {string|null} */
|
|
42
|
+
status: "active" | "past_due" | "unpaid" | "incomplete" | "incomplete_expired" | "canceled" | "pending" | null;
|
|
43
|
+
/** @enum {string|null} */
|
|
44
|
+
offerType: "recurring" | "lifetime" | null;
|
|
45
|
+
offerKey: string | null;
|
|
46
|
+
currentPeriodEnd: string | null;
|
|
47
|
+
cancelAtPeriodEnd: boolean;
|
|
48
|
+
};
|
|
49
|
+
AccessPortalBody: {
|
|
50
|
+
/** @description Relative path Stripe returns the buyer to; defaults to the board root. */
|
|
51
|
+
returnPath?: string;
|
|
52
|
+
};
|
|
53
|
+
AccessPortalSession: {
|
|
54
|
+
/** @enum {string} */
|
|
55
|
+
object: "portal_session";
|
|
56
|
+
/** Format: uri */
|
|
57
|
+
url: string;
|
|
58
|
+
};
|
|
3
59
|
AddApplicantNoteBody: {
|
|
4
60
|
/** @description The note text. */
|
|
5
61
|
body: string;
|
|
@@ -2191,6 +2247,24 @@ interface components {
|
|
|
2191
2247
|
[key: string]: unknown;
|
|
2192
2248
|
};
|
|
2193
2249
|
};
|
|
2250
|
+
PaywallOffer: {
|
|
2251
|
+
/** @enum {string} */
|
|
2252
|
+
object: "paywall_offer";
|
|
2253
|
+
/** @description The tier key posted to checkout (e.g. `monthly`, `lifetime`). */
|
|
2254
|
+
offerKey: string;
|
|
2255
|
+
label: string;
|
|
2256
|
+
billingLabel: string;
|
|
2257
|
+
amountCents: number;
|
|
2258
|
+
currency: string;
|
|
2259
|
+
/**
|
|
2260
|
+
* @description `recurring` tiers get a manage-subscription portal; `lifetime` do not.
|
|
2261
|
+
* @enum {string}
|
|
2262
|
+
*/
|
|
2263
|
+
offerType: "recurring" | "lifetime";
|
|
2264
|
+
intervalUnit: string | null;
|
|
2265
|
+
intervalCount: number | null;
|
|
2266
|
+
isDefault: boolean;
|
|
2267
|
+
};
|
|
2194
2268
|
Plan: {
|
|
2195
2269
|
/** @enum {string} */
|
|
2196
2270
|
object: "plan";
|
|
@@ -3650,102 +3724,6 @@ interface components {
|
|
|
3650
3724
|
pathItems: never;
|
|
3651
3725
|
}
|
|
3652
3726
|
|
|
3653
|
-
type Schemas = components['schemas'];
|
|
3654
|
-
|
|
3655
|
-
/**
|
|
3656
|
-
* Stripe-shaped success envelopes (`01-conventions.md` §5.1). The
|
|
3657
|
-
* server MAY add top-level fields; consumers MUST ignore unknown
|
|
3658
|
-
* fields.
|
|
3659
|
-
*/
|
|
3660
|
-
/**
|
|
3661
|
-
* Medusa-style storefront pagination fields (ADR-0037 §7), populated only by
|
|
3662
|
-
* the board jobs catalog reads (browse / search / company-jobs); absent on
|
|
3663
|
-
* every other list/search. `nextCursor` is preserved alongside (offset-encoded).
|
|
3664
|
-
*/
|
|
3665
|
-
interface StorefrontPagination {
|
|
3666
|
-
/** Total matching results ("X jobs"). */
|
|
3667
|
-
count?: number;
|
|
3668
|
-
/** The page size used for this response. */
|
|
3669
|
-
limit?: number;
|
|
3670
|
-
/** Number of items skipped before this page. */
|
|
3671
|
-
offset?: number;
|
|
3672
|
-
/** Items hidden behind the candidate paywall for the current viewer; absent/0 when entitled. */
|
|
3673
|
-
gatedCount?: number;
|
|
3674
|
-
}
|
|
3675
|
-
interface ListEnvelope<T> extends StorefrontPagination {
|
|
3676
|
-
object: 'list';
|
|
3677
|
-
url: string;
|
|
3678
|
-
hasMore: boolean;
|
|
3679
|
-
/** `null` when `hasMore` is false — always present, never undefined. */
|
|
3680
|
-
nextCursor: string | null;
|
|
3681
|
-
data: T[];
|
|
3682
|
-
}
|
|
3683
|
-
interface SearchEnvelope<T> extends StorefrontPagination {
|
|
3684
|
-
object: 'search_result';
|
|
3685
|
-
url: string;
|
|
3686
|
-
hasMore: boolean;
|
|
3687
|
-
nextCursor: string | null;
|
|
3688
|
-
data: T[];
|
|
3689
|
-
}
|
|
3690
|
-
|
|
3691
|
-
type PublicJob = Schemas['PublicJob'];
|
|
3692
|
-
type PublicJobCard = Schemas['PublicJobCard'];
|
|
3693
|
-
type JobCompany = Schemas['JobCompany'];
|
|
3694
|
-
type OfficeLocation = Schemas['JobOfficeLocation'];
|
|
3695
|
-
type RemoteOption = NonNullable<PublicJob['remoteOption']>;
|
|
3696
|
-
type EmploymentType = NonNullable<PublicJob['employmentType']>;
|
|
3697
|
-
type Seniority = NonNullable<PublicJob['seniority']>;
|
|
3698
|
-
/** Candidate-facing result ordering (ADR-0048); `relevance` is the default. */
|
|
3699
|
-
type JobSort = NonNullable<Schemas['PublicSearchJobsBody']['sort']>;
|
|
3700
|
-
type EducationRequirement = PublicJob['educationRequirements'][number];
|
|
3701
|
-
type RemotePermit = PublicJob['remotePermits'][number];
|
|
3702
|
-
type RemoteTimezone = PublicJob['remoteTimezones'][number];
|
|
3703
|
-
/**
|
|
3704
|
-
* Derived suggestion on a browse list (ADR-0037 §8): jobs surface `category`
|
|
3705
|
-
* and `skill` terms; the companies list surfaces `market` terms.
|
|
3706
|
-
*/
|
|
3707
|
-
interface RelatedSearch {
|
|
3708
|
-
type: 'category' | 'skill' | 'market';
|
|
3709
|
-
slug: string;
|
|
3710
|
-
term: string;
|
|
3711
|
-
count: number;
|
|
3712
|
-
}
|
|
3713
|
-
/** The browse list envelope — `PublicJobCard`s + storefront fields + `relatedSearches`. */
|
|
3714
|
-
interface JobCardListEnvelope extends ListEnvelope<PublicJobCard> {
|
|
3715
|
-
relatedSearches?: RelatedSearch[];
|
|
3716
|
-
}
|
|
3717
|
-
/** The search envelope — `PublicJobCard`s + storefront fields. */
|
|
3718
|
-
type JobCardSearchEnvelope = SearchEnvelope<PublicJobCard>;
|
|
3719
|
-
type JobsListQuery = {
|
|
3720
|
-
cursor?: string;
|
|
3721
|
-
/** 1–100. */
|
|
3722
|
-
limit?: number;
|
|
3723
|
-
/** Storefront page offset; takes precedence over `cursor`. `offset + limit` ≤ 10,000. */
|
|
3724
|
-
offset?: number;
|
|
3725
|
-
/** Repeated param (up to 10) — OR-matched. Repeat `companyId` per value. */
|
|
3726
|
-
companyId?: string[];
|
|
3727
|
-
remoteOption?: RemoteOption[];
|
|
3728
|
-
employmentType?: EmploymentType[];
|
|
3729
|
-
seniority?: Seniority[];
|
|
3730
|
-
/** Result ordering (ADR-0048). Absent ⇒ `relevance` (the featured-ranked browse). */
|
|
3731
|
-
sort?: JobSort;
|
|
3732
|
-
/** Place slug for a geo radius search; unresolvable slugs are ignored. */
|
|
3733
|
-
location?: string;
|
|
3734
|
-
/** Radius in km around `location` (10–250; default 50). */
|
|
3735
|
-
radius?: number;
|
|
3736
|
-
/** Category slug seed (the `/jobs/[keyword]` page) — server resolves it to the English source name; unresolvable → 404. */
|
|
3737
|
-
category?: string;
|
|
3738
|
-
/** Skill slug seed (the `/jobs/skills/[skill]` page) — server-resolved; unresolvable → 404. */
|
|
3739
|
-
skill?: string;
|
|
3740
|
-
/** Sparse fieldset (Medusa-style `+field`). Only `'+description'` is supported — adds `description` to each card. */
|
|
3741
|
-
fields?: string;
|
|
3742
|
-
};
|
|
3743
|
-
type JobsSimilarQuery = {
|
|
3744
|
-
/** How many similar jobs to return (1–20; default 5). */
|
|
3745
|
-
limit?: number;
|
|
3746
|
-
};
|
|
3747
|
-
type JobsSearchBody = Schemas['PublicSearchJobsBody'];
|
|
3748
|
-
|
|
3749
3727
|
type Awaitable<T> = T | Promise<T>;
|
|
3750
3728
|
/**
|
|
3751
3729
|
* Async token storage. The SDK reads the access token from storage on
|
|
@@ -3865,7 +3843,9 @@ declare function isConflict(e: unknown): e is BoardApiError;
|
|
|
3865
3843
|
* constant because the package is platform-neutral and cannot read
|
|
3866
3844
|
* package.json at runtime.
|
|
3867
3845
|
*/
|
|
3868
|
-
declare const SDK_VERSION = "1.
|
|
3846
|
+
declare const SDK_VERSION = "1.24.0";
|
|
3847
|
+
|
|
3848
|
+
type Schemas = components['schemas'];
|
|
3869
3849
|
|
|
3870
3850
|
type BoardUser = Schemas['BoardUser'];
|
|
3871
3851
|
type BoardAuthSession = Schemas['BoardAuthSession'];
|
|
@@ -3898,6 +3878,100 @@ type PublicBoardTheme = NonNullable<PublicBoard['theme']>;
|
|
|
3898
3878
|
*/
|
|
3899
3879
|
type BoardSeo = Schemas['BoardSeo'];
|
|
3900
3880
|
|
|
3881
|
+
/**
|
|
3882
|
+
* Stripe-shaped success envelopes (`01-conventions.md` §5.1). The
|
|
3883
|
+
* server MAY add top-level fields; consumers MUST ignore unknown
|
|
3884
|
+
* fields.
|
|
3885
|
+
*/
|
|
3886
|
+
/**
|
|
3887
|
+
* Medusa-style storefront pagination fields (ADR-0037 §7), populated only by
|
|
3888
|
+
* the board jobs catalog reads (browse / search / company-jobs); absent on
|
|
3889
|
+
* every other list/search. `nextCursor` is preserved alongside (offset-encoded).
|
|
3890
|
+
*/
|
|
3891
|
+
interface StorefrontPagination {
|
|
3892
|
+
/** Total matching results ("X jobs"). */
|
|
3893
|
+
count?: number;
|
|
3894
|
+
/** The page size used for this response. */
|
|
3895
|
+
limit?: number;
|
|
3896
|
+
/** Number of items skipped before this page. */
|
|
3897
|
+
offset?: number;
|
|
3898
|
+
/** Items hidden behind the candidate paywall for the current viewer; absent/0 when entitled. */
|
|
3899
|
+
gatedCount?: number;
|
|
3900
|
+
}
|
|
3901
|
+
interface ListEnvelope<T> extends StorefrontPagination {
|
|
3902
|
+
object: 'list';
|
|
3903
|
+
url: string;
|
|
3904
|
+
hasMore: boolean;
|
|
3905
|
+
/** `null` when `hasMore` is false — always present, never undefined. */
|
|
3906
|
+
nextCursor: string | null;
|
|
3907
|
+
data: T[];
|
|
3908
|
+
}
|
|
3909
|
+
interface SearchEnvelope<T> extends StorefrontPagination {
|
|
3910
|
+
object: 'search_result';
|
|
3911
|
+
url: string;
|
|
3912
|
+
hasMore: boolean;
|
|
3913
|
+
nextCursor: string | null;
|
|
3914
|
+
data: T[];
|
|
3915
|
+
}
|
|
3916
|
+
|
|
3917
|
+
type PublicJob = Schemas['PublicJob'];
|
|
3918
|
+
type PublicJobCard = Schemas['PublicJobCard'];
|
|
3919
|
+
type JobCompany = Schemas['JobCompany'];
|
|
3920
|
+
type OfficeLocation = Schemas['JobOfficeLocation'];
|
|
3921
|
+
type RemoteOption = NonNullable<PublicJob['remoteOption']>;
|
|
3922
|
+
type EmploymentType = NonNullable<PublicJob['employmentType']>;
|
|
3923
|
+
type Seniority = NonNullable<PublicJob['seniority']>;
|
|
3924
|
+
/** Candidate-facing result ordering (ADR-0048); `relevance` is the default. */
|
|
3925
|
+
type JobSort = NonNullable<Schemas['PublicSearchJobsBody']['sort']>;
|
|
3926
|
+
type EducationRequirement = PublicJob['educationRequirements'][number];
|
|
3927
|
+
type RemotePermit = PublicJob['remotePermits'][number];
|
|
3928
|
+
type RemoteTimezone = PublicJob['remoteTimezones'][number];
|
|
3929
|
+
/**
|
|
3930
|
+
* Derived suggestion on a browse list (ADR-0037 §8): jobs surface `category`
|
|
3931
|
+
* and `skill` terms; the companies list surfaces `market` terms.
|
|
3932
|
+
*/
|
|
3933
|
+
interface RelatedSearch {
|
|
3934
|
+
type: 'category' | 'skill' | 'market';
|
|
3935
|
+
slug: string;
|
|
3936
|
+
term: string;
|
|
3937
|
+
count: number;
|
|
3938
|
+
}
|
|
3939
|
+
/** The browse list envelope — `PublicJobCard`s + storefront fields + `relatedSearches`. */
|
|
3940
|
+
interface JobCardListEnvelope extends ListEnvelope<PublicJobCard> {
|
|
3941
|
+
relatedSearches?: RelatedSearch[];
|
|
3942
|
+
}
|
|
3943
|
+
/** The search envelope — `PublicJobCard`s + storefront fields. */
|
|
3944
|
+
type JobCardSearchEnvelope = SearchEnvelope<PublicJobCard>;
|
|
3945
|
+
type JobsListQuery = {
|
|
3946
|
+
cursor?: string;
|
|
3947
|
+
/** 1–100. */
|
|
3948
|
+
limit?: number;
|
|
3949
|
+
/** Storefront page offset; takes precedence over `cursor`. `offset + limit` ≤ 10,000. */
|
|
3950
|
+
offset?: number;
|
|
3951
|
+
/** Repeated param (up to 10) — OR-matched. Repeat `companyId` per value. */
|
|
3952
|
+
companyId?: string[];
|
|
3953
|
+
remoteOption?: RemoteOption[];
|
|
3954
|
+
employmentType?: EmploymentType[];
|
|
3955
|
+
seniority?: Seniority[];
|
|
3956
|
+
/** Result ordering (ADR-0048). Absent ⇒ `relevance` (the featured-ranked browse). */
|
|
3957
|
+
sort?: JobSort;
|
|
3958
|
+
/** Place slug for a geo radius search; unresolvable slugs are ignored. */
|
|
3959
|
+
location?: string;
|
|
3960
|
+
/** Radius in km around `location` (10–250; default 50). */
|
|
3961
|
+
radius?: number;
|
|
3962
|
+
/** Category slug seed (the `/jobs/[keyword]` page) — server resolves it to the English source name; unresolvable → 404. */
|
|
3963
|
+
category?: string;
|
|
3964
|
+
/** Skill slug seed (the `/jobs/skills/[skill]` page) — server-resolved; unresolvable → 404. */
|
|
3965
|
+
skill?: string;
|
|
3966
|
+
/** Sparse fieldset (Medusa-style `+field`). Only `'+description'` is supported — adds `description` to each card. */
|
|
3967
|
+
fields?: string;
|
|
3968
|
+
};
|
|
3969
|
+
type JobsSimilarQuery = {
|
|
3970
|
+
/** How many similar jobs to return (1–20; default 5). */
|
|
3971
|
+
limit?: number;
|
|
3972
|
+
};
|
|
3973
|
+
type JobsSearchBody = Schemas['PublicSearchJobsBody'];
|
|
3974
|
+
|
|
3901
3975
|
type EmbedJobsQuery = {
|
|
3902
3976
|
/** Free-text search query, up to 200 characters. */
|
|
3903
3977
|
q?: string;
|
|
@@ -4051,6 +4125,26 @@ type PlansListQuery = {
|
|
|
4051
4125
|
type PlanListEnvelope = ListEnvelope<Plan>;
|
|
4052
4126
|
type SalesLedPlanListEnvelope = ListEnvelope<SalesLedPlan>;
|
|
4053
4127
|
|
|
4128
|
+
/** An enabled candidate-access paywall offer tier (public). */
|
|
4129
|
+
type PaywallOffer = Schemas['PaywallOffer'];
|
|
4130
|
+
/**
|
|
4131
|
+
* The connected-account embedded-checkout mount kit returned by
|
|
4132
|
+
* `board.me.access.checkout`. Mount with `loadStripe(publishableKey, {
|
|
4133
|
+
* stripeAccount: stripeAccountId })` then `initEmbeddedCheckout({ clientSecret })`.
|
|
4134
|
+
*/
|
|
4135
|
+
type AccessCheckoutSession = Schemas['AccessCheckoutSession'];
|
|
4136
|
+
/** The polled state of a checkout session (`board.me.access.retrieveCheckout`). */
|
|
4137
|
+
type AccessCheckoutSessionState = Schemas['AccessCheckoutSessionState'];
|
|
4138
|
+
/** The viewer's candidate-access entitlement (`board.me.access.grant`). */
|
|
4139
|
+
type AccessGrant = Schemas['AccessGrant'];
|
|
4140
|
+
/** A minted Stripe billing-portal session (`board.me.access.portal`). */
|
|
4141
|
+
type AccessPortalSession = Schemas['AccessPortalSession'];
|
|
4142
|
+
/** Body for `board.me.access.checkout`. */
|
|
4143
|
+
type AccessCheckoutBody = Schemas['AccessCheckoutBody'];
|
|
4144
|
+
/** Body for `board.me.access.portal`. */
|
|
4145
|
+
type AccessPortalBody = Schemas['AccessPortalBody'];
|
|
4146
|
+
type PaywallOfferListEnvelope = ListEnvelope<PaywallOffer>;
|
|
4147
|
+
|
|
4054
4148
|
type SavedJob = Schemas['SavedJob'];
|
|
4055
4149
|
type SavedJobsListQuery = {
|
|
4056
4150
|
cursor?: string;
|
|
@@ -5898,6 +5992,34 @@ declare function createBoardClient(options: CreateBoardClientOptions): {
|
|
|
5898
5992
|
blocked: boolean;
|
|
5899
5993
|
}>;
|
|
5900
5994
|
};
|
|
5995
|
+
access: {
|
|
5996
|
+
checkout(body: AccessCheckoutBody, options?: FetchOptions): Promise<{
|
|
5997
|
+
object: "checkout_session";
|
|
5998
|
+
sessionId: string;
|
|
5999
|
+
clientSecret: string;
|
|
6000
|
+
stripeAccountId: string;
|
|
6001
|
+
publishableKey: string;
|
|
6002
|
+
offerType: "recurring" | "lifetime";
|
|
6003
|
+
}>;
|
|
6004
|
+
retrieveCheckout(sessionId: string, options?: FetchOptions): Promise<{
|
|
6005
|
+
object: "checkout_session_state";
|
|
6006
|
+
status: "open" | "complete" | "expired";
|
|
6007
|
+
clientSecret: string | null;
|
|
6008
|
+
}>;
|
|
6009
|
+
grant(options?: FetchOptions): Promise<{
|
|
6010
|
+
object: "access_grant";
|
|
6011
|
+
hasAccess: boolean;
|
|
6012
|
+
status: "active" | "past_due" | "unpaid" | "incomplete" | "incomplete_expired" | "canceled" | "pending" | null;
|
|
6013
|
+
offerType: "recurring" | "lifetime" | null;
|
|
6014
|
+
offerKey: string | null;
|
|
6015
|
+
currentPeriodEnd: string | null;
|
|
6016
|
+
cancelAtPeriodEnd: boolean;
|
|
6017
|
+
}>;
|
|
6018
|
+
portal(body?: AccessPortalBody, options?: FetchOptions): Promise<{
|
|
6019
|
+
object: "portal_session";
|
|
6020
|
+
url: string;
|
|
6021
|
+
}>;
|
|
6022
|
+
};
|
|
5901
6023
|
};
|
|
5902
6024
|
password: {
|
|
5903
6025
|
verify(password: string, options?: FetchOptions): Promise<BoardAccessGrant>;
|
|
@@ -6594,7 +6716,10 @@ declare function createBoardClient(options: CreateBoardClientOptions): {
|
|
|
6594
6716
|
list(query?: PlansListQuery, options?: FetchOptions): Promise<PlanListEnvelope>;
|
|
6595
6717
|
salesLed(options?: FetchOptions): Promise<SalesLedPlanListEnvelope>;
|
|
6596
6718
|
};
|
|
6719
|
+
paywall: {
|
|
6720
|
+
offers(options?: FetchOptions): Promise<PaywallOfferListEnvelope>;
|
|
6721
|
+
};
|
|
6597
6722
|
};
|
|
6598
6723
|
type BoardSdk = ReturnType<typeof createBoardClient>;
|
|
6599
6724
|
|
|
6600
|
-
export { ACCESS_TOKEN_KEY, type AddApplicantNoteBody, type Alert, type AlertBody, type Application, type ApplicationsListQuery, type ApplyBody, type Awaitable, BOARD_ACCESS_GRANT_KEY, type Block, type BlockStatus, type BlockUserBody, type BlockedUser, type BlogAuthorEmbed, type BlogPostsListQuery, type BlogSearchBody, type BlogSimilarQuery, type BlogTagEmbed, type BoardAccessGrant, BoardApiError, type BoardAuthSession, BoardClient, type BoardRequest, type BoardSdk, type BoardSeo, type BoardUser, type BulkMoveApplicantsBody, type BulkRejectApplicantsBody, type CandidateAvatar, type CandidateEducation, type CandidateExperience, type CandidateLanguage, type CandidateProfile, type CandidateSkill, type ClaimableCompany, type CompaniesListQuery, type CompaniesSearchBody, type CompanyCategorySalary, type CompanyJobsListQuery, type CompanyListEnvelope, type CompanyMarket, type CompanyMarketRef, type CompanyMarketsListQuery, type CompanyMembership, type CompanySalary, type CompanySimilarQuery, type ConfirmWorkEmailBody, type ConsumeMagicLinkBody, type Conversation, type ConversationArchive, type ConversationDetail, type ConversationRef, type ConversationsListQuery, type CreateBoardClientOptions, type CreateCompanyBody, type CreateEducationBody, type CreateEmployerJobBody, type CreateExperienceBody, type CreateJobPostingInput, type CreatePipelineStageBody, type CustomStorage, type EditMessageBody, type EducationRequirement, type EmbedJobsQuery, type EmployerApplicant, type EmployerBillingOption, type EmployerCheckout, type EmployerCheckoutBody, type EmployerCompany, type EmployerCompanySearchQuery, type EmployerJob, type EmployerJobSummary, type EmployerJobsListQuery, type EmployerPipeline, type EmployerPipelineQuery, type EmployerPipelineStage, type EmploymentType, type 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, type JobCardListEnvelope, type JobCardSearchEnvelope, type JobCompany, type JobPostingBillingCheck, type JobPostingBillingOptions, type JobPostingBillingVerification, type JobPostingLogoResult, type JobPostingPlan, type JobPostingResult, type JobPostingSubscriptionEntitlements, type JobSort, type JobsListQuery, type JobsSearchBody, type LegalEntity, type LegalPageType, type ListEnvelope, type LocationSalaryDetail, type LocationSkillsIndex, type LocationTitlesIndex, type Logger, type LoginBody, type LogoutBody, type Message, type ModerationReport, type MoveApplicantStageBody, type NotificationPreference, type OAuthAuthorizationQuery, type OAuthAuthorizationUrl, type OAuthExchangeBody, type OAuthProvider, type OfficeLocation, type PlacesListQuery, type Plan, type PlanListEnvelope, type PlansListQuery, type PublicBlogAdjacentPosts, type PublicBlogAuthor, type PublicBlogPost, type PublicBlogPostSummary, type PublicBlogTag, type PublicBoard, type PublicBoardAnalytics, type PublicBoardFeatures, type PublicBoardTheme, type PublicCompany, type PublicCompanyDetail, type PublicJob, type PublicJobCard, type PublicLegalPage, type PublicPlace, REFRESH_TOKEN_KEY, type ReadReceipt, type RedirectResolution, type RefreshBody, type RegisterBody, type RelatedSearch, type RemoteOption, type RemotePermit, type RemoteTimezone, type ReorderPipelineStagesBody, type ReplyBody, type ReportBody, type RequestMagicLinkBody, type ResetPasswordBody, type Resume, type ResumeUploadOptions, SDK_VERSION, type SalaryCompany, type SalaryDetailQuery, type SalaryLocation, type SalarySkill, type SalaryTitle, type SalesLedPlan, type SalesLedPlanListEnvelope, type SaveJobBody, type SavedJob, type SavedJobsListQuery, type SearchEnvelope, type SendWorkEmailBody, type Seniority, type SkillLocationSalary, type SkillLocationsIndex, type SkillSalaryDetail, type StartAboutApplicationBody, type StartConversationBody, type StorageMode, type StorefrontPagination, type TalentDirectoryEntry, type TalentDirectoryListEnvelope, type TalentDirectoryQuery, type TalentProfile, type TaxonomyGeo, type TaxonomyResolution, type ThreadMessagesQuery, type TitleLocationSalary, type TitleLocationsIndex, type TitleSalaryDetail, type UnreadCount, type UnsubscribeBody, type UpdateApplicationFactsBody, type UpdateCandidateProfileBody, type UpdateEducationBody, type UpdateEmployerCompanyBody, type UpdateEmployerJobBody, type UpdateExperienceBody, type UpdateLanguagesBody, type UpdateNotificationPreferenceBody, type UpdatePipelineStageBody, type UpdateSkillsBody, type VerifyEmailBody, createBoardClient, isBoardApiError, isBoardPasswordRequired, isConflict, isForbidden, isNotFound, isRateLimited, isUnauthorized, isValidationError };
|
|
6725
|
+
export { ACCESS_TOKEN_KEY, type AccessCheckoutBody, type AccessCheckoutSession, type AccessCheckoutSessionState, type AccessGrant, type AccessPortalBody, type AccessPortalSession, type AddApplicantNoteBody, type Alert, type AlertBody, type Application, type ApplicationsListQuery, type ApplyBody, type Awaitable, BOARD_ACCESS_GRANT_KEY, type Block, type BlockStatus, type BlockUserBody, type BlockedUser, type BlogAuthorEmbed, type BlogPostsListQuery, type BlogSearchBody, type BlogSimilarQuery, type BlogTagEmbed, type BoardAccessGrant, BoardApiError, type BoardAuthSession, BoardClient, type BoardRequest, type BoardSdk, type BoardSeo, type BoardUser, type BulkMoveApplicantsBody, type BulkRejectApplicantsBody, type CandidateAvatar, type CandidateEducation, type CandidateExperience, type CandidateLanguage, type CandidateProfile, type CandidateSkill, type ClaimableCompany, type CompaniesListQuery, type CompaniesSearchBody, type CompanyCategorySalary, type CompanyJobsListQuery, type CompanyListEnvelope, type CompanyMarket, type CompanyMarketRef, type CompanyMarketsListQuery, type CompanyMembership, type CompanySalary, type CompanySimilarQuery, type ConfirmWorkEmailBody, type ConsumeMagicLinkBody, type Conversation, type ConversationArchive, type ConversationDetail, type ConversationRef, type ConversationsListQuery, type CreateBoardClientOptions, type CreateCompanyBody, type CreateEducationBody, type CreateEmployerJobBody, type CreateExperienceBody, type CreateJobPostingInput, type CreatePipelineStageBody, type CustomStorage, type EditMessageBody, type EducationRequirement, type EmbedJobsQuery, type EmployerApplicant, type EmployerBillingOption, type EmployerCheckout, type EmployerCheckoutBody, type EmployerCompany, type EmployerCompanySearchQuery, type EmployerJob, type EmployerJobSummary, type EmployerJobsListQuery, type EmployerPipeline, type EmployerPipelineQuery, type EmployerPipelineStage, type EmploymentType, type 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, type JobCardListEnvelope, type JobCardSearchEnvelope, type JobCompany, type JobPostingBillingCheck, type JobPostingBillingOptions, type JobPostingBillingVerification, type JobPostingLogoResult, type JobPostingPlan, type JobPostingResult, type JobPostingSubscriptionEntitlements, type JobSort, type JobsListQuery, type JobsSearchBody, type JobsSimilarQuery, type LegalEntity, type LegalPageType, type ListEnvelope, type LocationSalaryDetail, type LocationSkillsIndex, type LocationTitlesIndex, type Logger, type LoginBody, type LogoutBody, type Message, type ModerationReport, type MoveApplicantStageBody, type NotificationPreference, type OAuthAuthorizationQuery, type OAuthAuthorizationUrl, type OAuthExchangeBody, type OAuthProvider, type OfficeLocation, type PaywallOffer, type PaywallOfferListEnvelope, type PlacesListQuery, type Plan, type PlanListEnvelope, type PlansListQuery, type PublicBlogAdjacentPosts, type PublicBlogAuthor, type PublicBlogPost, type PublicBlogPostSummary, type PublicBlogTag, type PublicBoard, type PublicBoardAnalytics, type PublicBoardFeatures, type PublicBoardTheme, type PublicCompany, type PublicCompanyDetail, type PublicJob, type PublicJobCard, type PublicLegalPage, type PublicPlace, REFRESH_TOKEN_KEY, type ReadReceipt, type RedirectResolution, type RefreshBody, type RegisterBody, type RelatedSearch, type RemoteOption, type RemotePermit, type RemoteTimezone, type ReorderPipelineStagesBody, type ReplyBody, type ReportBody, type RequestMagicLinkBody, type ResetPasswordBody, type Resume, type ResumeUploadOptions, SDK_VERSION, type SalaryCompany, type SalaryDetailQuery, type SalaryLocation, type SalarySkill, type SalaryTitle, type SalesLedPlan, type SalesLedPlanListEnvelope, type SaveJobBody, type SavedJob, type SavedJobsListQuery, type SearchEnvelope, type SendWorkEmailBody, type Seniority, type SkillLocationSalary, type SkillLocationsIndex, type SkillSalaryDetail, type StartAboutApplicationBody, type StartConversationBody, type StorageMode, type StorefrontPagination, type TalentDirectoryEntry, type TalentDirectoryListEnvelope, type TalentDirectoryQuery, type TalentProfile, type TaxonomyGeo, type TaxonomyResolution, type ThreadMessagesQuery, type TitleLocationSalary, type TitleLocationsIndex, type TitleSalaryDetail, type UnreadCount, type UnsubscribeBody, type UpdateApplicationFactsBody, type UpdateCandidateProfileBody, type UpdateEducationBody, type UpdateEmployerCompanyBody, type UpdateEmployerJobBody, type UpdateExperienceBody, type UpdateLanguagesBody, type UpdateNotificationPreferenceBody, type UpdatePipelineStageBody, type UpdateSkillsBody, type VerifyEmailBody, createBoardClient, isBoardApiError, isBoardPasswordRequired, isConflict, isForbidden, isNotFound, isRateLimited, isUnauthorized, isValidationError };
|
package/dist/index.js
CHANGED
|
@@ -149,7 +149,7 @@ async function clearSession(storage) {
|
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
// src/version.ts
|
|
152
|
-
var SDK_VERSION = "1.
|
|
152
|
+
var SDK_VERSION = "1.24.0";
|
|
153
153
|
|
|
154
154
|
// src/client.ts
|
|
155
155
|
function isRawBody(body) {
|
|
@@ -2054,6 +2054,79 @@ function meNamespace(client) {
|
|
|
2054
2054
|
{ ...options, method: "POST", body }
|
|
2055
2055
|
);
|
|
2056
2056
|
}
|
|
2057
|
+
},
|
|
2058
|
+
/**
|
|
2059
|
+
* The candidate job-access paywall — the authenticated money flow (doc 36 /
|
|
2060
|
+
* ADR-0056). Enumerate offers publicly with `board.paywall.offers()`, then
|
|
2061
|
+
* `checkout` here; poll `retrieveCheckout` until complete and confirm with
|
|
2062
|
+
* `grant`. The SDK stays Stripe-agnostic — `checkout` returns a mount kit
|
|
2063
|
+
* and the frontend brings `@stripe/stripe-js`.
|
|
2064
|
+
*/
|
|
2065
|
+
access: {
|
|
2066
|
+
/**
|
|
2067
|
+
* Start an embedded checkout for one offer and return a connected-account
|
|
2068
|
+
* mount kit `{ sessionId, clientSecret, stripeAccountId, publishableKey,
|
|
2069
|
+
* offerType }`. `returnPath` is a safe relative path. Requires a candidate
|
|
2070
|
+
* profile.
|
|
2071
|
+
*
|
|
2072
|
+
* @example
|
|
2073
|
+
* const kit = await board.me.access.checkout({
|
|
2074
|
+
* offerKey: 'monthly',
|
|
2075
|
+
* returnPath: '/account/access',
|
|
2076
|
+
* colorMode: 'light',
|
|
2077
|
+
* });
|
|
2078
|
+
* const stripe = await loadStripe(kit.publishableKey, {
|
|
2079
|
+
* stripeAccount: kit.stripeAccountId,
|
|
2080
|
+
* });
|
|
2081
|
+
*/
|
|
2082
|
+
checkout(body, options) {
|
|
2083
|
+
return client.fetch("/me/access/checkout", {
|
|
2084
|
+
...options,
|
|
2085
|
+
method: "POST",
|
|
2086
|
+
body
|
|
2087
|
+
});
|
|
2088
|
+
},
|
|
2089
|
+
/**
|
|
2090
|
+
* Poll a checkout session's state: `open` (re-mountable via
|
|
2091
|
+
* `clientSecret`), `complete`, or `expired`. On `complete`, re-read
|
|
2092
|
+
* `grant()` to confirm entitlement.
|
|
2093
|
+
*
|
|
2094
|
+
* @example
|
|
2095
|
+
* const s = await board.me.access.retrieveCheckout(kit.sessionId);
|
|
2096
|
+
*/
|
|
2097
|
+
retrieveCheckout(sessionId, options) {
|
|
2098
|
+
return client.fetch(
|
|
2099
|
+
`/me/access/checkout/${encodeURIComponent(sessionId)}`,
|
|
2100
|
+
options
|
|
2101
|
+
);
|
|
2102
|
+
},
|
|
2103
|
+
/**
|
|
2104
|
+
* The viewer's candidate-access entitlement — always resolves (no-access
|
|
2105
|
+
* is `{ hasAccess: false, … }`, not an error). Gate the ungated jobs
|
|
2106
|
+
* listing on `hasAccess`.
|
|
2107
|
+
*
|
|
2108
|
+
* @example
|
|
2109
|
+
* const { hasAccess } = await board.me.access.grant();
|
|
2110
|
+
*/
|
|
2111
|
+
grant(options) {
|
|
2112
|
+
return client.fetch("/me/access/grant", options);
|
|
2113
|
+
},
|
|
2114
|
+
/**
|
|
2115
|
+
* Open a Stripe billing-portal session to manage a recurring subscription
|
|
2116
|
+
* (only when the grant's `offerType` is `recurring`). Optional
|
|
2117
|
+
* `returnPath` threads through to Stripe's return URL.
|
|
2118
|
+
*
|
|
2119
|
+
* @example
|
|
2120
|
+
* const { url } = await board.me.access.portal({ returnPath: '/account' });
|
|
2121
|
+
* location.href = url;
|
|
2122
|
+
*/
|
|
2123
|
+
portal(body, options) {
|
|
2124
|
+
return client.fetch("/me/access/portal", {
|
|
2125
|
+
...options,
|
|
2126
|
+
method: "POST",
|
|
2127
|
+
body
|
|
2128
|
+
});
|
|
2129
|
+
}
|
|
2057
2130
|
}
|
|
2058
2131
|
};
|
|
2059
2132
|
}
|
|
@@ -2082,6 +2155,27 @@ function passwordNamespace(client) {
|
|
|
2082
2155
|
};
|
|
2083
2156
|
}
|
|
2084
2157
|
|
|
2158
|
+
// src/namespaces/paywall.ts
|
|
2159
|
+
function paywallNamespace(client) {
|
|
2160
|
+
return {
|
|
2161
|
+
/**
|
|
2162
|
+
* List the board's enabled candidate-access paywall offers (public) — the
|
|
2163
|
+
* pricing tiers a candidate picks before starting checkout
|
|
2164
|
+
* (`board.me.access.checkout`). Returns `[]` when the paywall is disabled.
|
|
2165
|
+
* The internal Stripe price id is never exposed.
|
|
2166
|
+
*
|
|
2167
|
+
* @example
|
|
2168
|
+
* const { data } = await board.paywall.offers();
|
|
2169
|
+
*/
|
|
2170
|
+
offers(options) {
|
|
2171
|
+
return client.fetch(
|
|
2172
|
+
"/paywall/offers/enabled",
|
|
2173
|
+
options
|
|
2174
|
+
);
|
|
2175
|
+
}
|
|
2176
|
+
};
|
|
2177
|
+
}
|
|
2178
|
+
|
|
2085
2179
|
// src/namespaces/plans.ts
|
|
2086
2180
|
function plansNamespace(client) {
|
|
2087
2181
|
return {
|
|
@@ -2358,6 +2452,7 @@ function createBoardClient(options) {
|
|
|
2358
2452
|
jobPosting: jobPostingNamespace(client),
|
|
2359
2453
|
salaries: salariesNamespace(client),
|
|
2360
2454
|
talent: talentNamespace(client),
|
|
2361
|
-
plans: plansNamespace(client)
|
|
2455
|
+
plans: plansNamespace(client),
|
|
2456
|
+
paywall: paywallNamespace(client)
|
|
2362
2457
|
};
|
|
2363
2458
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -109,7 +109,7 @@ async function clearSession(storage) {
|
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
// src/version.ts
|
|
112
|
-
var SDK_VERSION = "1.
|
|
112
|
+
var SDK_VERSION = "1.24.0";
|
|
113
113
|
|
|
114
114
|
// src/client.ts
|
|
115
115
|
function isRawBody(body) {
|
|
@@ -2014,6 +2014,79 @@ function meNamespace(client) {
|
|
|
2014
2014
|
{ ...options, method: "POST", body }
|
|
2015
2015
|
);
|
|
2016
2016
|
}
|
|
2017
|
+
},
|
|
2018
|
+
/**
|
|
2019
|
+
* The candidate job-access paywall — the authenticated money flow (doc 36 /
|
|
2020
|
+
* ADR-0056). Enumerate offers publicly with `board.paywall.offers()`, then
|
|
2021
|
+
* `checkout` here; poll `retrieveCheckout` until complete and confirm with
|
|
2022
|
+
* `grant`. The SDK stays Stripe-agnostic — `checkout` returns a mount kit
|
|
2023
|
+
* and the frontend brings `@stripe/stripe-js`.
|
|
2024
|
+
*/
|
|
2025
|
+
access: {
|
|
2026
|
+
/**
|
|
2027
|
+
* Start an embedded checkout for one offer and return a connected-account
|
|
2028
|
+
* mount kit `{ sessionId, clientSecret, stripeAccountId, publishableKey,
|
|
2029
|
+
* offerType }`. `returnPath` is a safe relative path. Requires a candidate
|
|
2030
|
+
* profile.
|
|
2031
|
+
*
|
|
2032
|
+
* @example
|
|
2033
|
+
* const kit = await board.me.access.checkout({
|
|
2034
|
+
* offerKey: 'monthly',
|
|
2035
|
+
* returnPath: '/account/access',
|
|
2036
|
+
* colorMode: 'light',
|
|
2037
|
+
* });
|
|
2038
|
+
* const stripe = await loadStripe(kit.publishableKey, {
|
|
2039
|
+
* stripeAccount: kit.stripeAccountId,
|
|
2040
|
+
* });
|
|
2041
|
+
*/
|
|
2042
|
+
checkout(body, options) {
|
|
2043
|
+
return client.fetch("/me/access/checkout", {
|
|
2044
|
+
...options,
|
|
2045
|
+
method: "POST",
|
|
2046
|
+
body
|
|
2047
|
+
});
|
|
2048
|
+
},
|
|
2049
|
+
/**
|
|
2050
|
+
* Poll a checkout session's state: `open` (re-mountable via
|
|
2051
|
+
* `clientSecret`), `complete`, or `expired`. On `complete`, re-read
|
|
2052
|
+
* `grant()` to confirm entitlement.
|
|
2053
|
+
*
|
|
2054
|
+
* @example
|
|
2055
|
+
* const s = await board.me.access.retrieveCheckout(kit.sessionId);
|
|
2056
|
+
*/
|
|
2057
|
+
retrieveCheckout(sessionId, options) {
|
|
2058
|
+
return client.fetch(
|
|
2059
|
+
`/me/access/checkout/${encodeURIComponent(sessionId)}`,
|
|
2060
|
+
options
|
|
2061
|
+
);
|
|
2062
|
+
},
|
|
2063
|
+
/**
|
|
2064
|
+
* The viewer's candidate-access entitlement — always resolves (no-access
|
|
2065
|
+
* is `{ hasAccess: false, … }`, not an error). Gate the ungated jobs
|
|
2066
|
+
* listing on `hasAccess`.
|
|
2067
|
+
*
|
|
2068
|
+
* @example
|
|
2069
|
+
* const { hasAccess } = await board.me.access.grant();
|
|
2070
|
+
*/
|
|
2071
|
+
grant(options) {
|
|
2072
|
+
return client.fetch("/me/access/grant", options);
|
|
2073
|
+
},
|
|
2074
|
+
/**
|
|
2075
|
+
* Open a Stripe billing-portal session to manage a recurring subscription
|
|
2076
|
+
* (only when the grant's `offerType` is `recurring`). Optional
|
|
2077
|
+
* `returnPath` threads through to Stripe's return URL.
|
|
2078
|
+
*
|
|
2079
|
+
* @example
|
|
2080
|
+
* const { url } = await board.me.access.portal({ returnPath: '/account' });
|
|
2081
|
+
* location.href = url;
|
|
2082
|
+
*/
|
|
2083
|
+
portal(body, options) {
|
|
2084
|
+
return client.fetch("/me/access/portal", {
|
|
2085
|
+
...options,
|
|
2086
|
+
method: "POST",
|
|
2087
|
+
body
|
|
2088
|
+
});
|
|
2089
|
+
}
|
|
2017
2090
|
}
|
|
2018
2091
|
};
|
|
2019
2092
|
}
|
|
@@ -2042,6 +2115,27 @@ function passwordNamespace(client) {
|
|
|
2042
2115
|
};
|
|
2043
2116
|
}
|
|
2044
2117
|
|
|
2118
|
+
// src/namespaces/paywall.ts
|
|
2119
|
+
function paywallNamespace(client) {
|
|
2120
|
+
return {
|
|
2121
|
+
/**
|
|
2122
|
+
* List the board's enabled candidate-access paywall offers (public) — the
|
|
2123
|
+
* pricing tiers a candidate picks before starting checkout
|
|
2124
|
+
* (`board.me.access.checkout`). Returns `[]` when the paywall is disabled.
|
|
2125
|
+
* The internal Stripe price id is never exposed.
|
|
2126
|
+
*
|
|
2127
|
+
* @example
|
|
2128
|
+
* const { data } = await board.paywall.offers();
|
|
2129
|
+
*/
|
|
2130
|
+
offers(options) {
|
|
2131
|
+
return client.fetch(
|
|
2132
|
+
"/paywall/offers/enabled",
|
|
2133
|
+
options
|
|
2134
|
+
);
|
|
2135
|
+
}
|
|
2136
|
+
};
|
|
2137
|
+
}
|
|
2138
|
+
|
|
2045
2139
|
// src/namespaces/plans.ts
|
|
2046
2140
|
function plansNamespace(client) {
|
|
2047
2141
|
return {
|
|
@@ -2318,7 +2412,8 @@ function createBoardClient(options) {
|
|
|
2318
2412
|
jobPosting: jobPostingNamespace(client),
|
|
2319
2413
|
salaries: salariesNamespace(client),
|
|
2320
2414
|
talent: talentNamespace(client),
|
|
2321
|
-
plans: plansNamespace(client)
|
|
2415
|
+
plans: plansNamespace(client),
|
|
2416
|
+
paywall: paywallNamespace(client)
|
|
2322
2417
|
};
|
|
2323
2418
|
}
|
|
2324
2419
|
export {
|
package/package.json
CHANGED
package/skills/manifest.json
CHANGED