@@ -36,6 +36,35 @@ export const JOB_WORKPLACE_TYPE = {
3636} as const ;
3737export type TJobWorkplaceType = ( typeof JOB_WORKPLACE_TYPE ) [ keyof typeof JOB_WORKPLACE_TYPE ] ;
3838
39+ /**
40+ * Experience levels of LinkedIn's AI-powered jobs search.
41+ * Not a subset of {@link JOB_EXPERIENCE_LEVEL}: `senior` corresponds to `midSeniorLevel`, `manager`
42+ * has no classic equivalent, and `internship` / `associate` are absent here.
43+ */
44+ export const JOB_PREFERENCE_EXPERIENCE_LEVEL = {
45+ entryLevel : 'entryLevel' ,
46+ senior : 'senior' ,
47+ manager : 'manager' ,
48+ director : 'director' ,
49+ executive : 'executive' ,
50+ } as const ;
51+ export type TJobPreferenceExperienceLevel =
52+ ( typeof JOB_PREFERENCE_EXPERIENCE_LEVEL ) [ keyof typeof JOB_PREFERENCE_EXPERIENCE_LEVEL ] ;
53+
54+ /**
55+ * Employment types of LinkedIn's AI-powered jobs search.
56+ * Same names as {@link JOB_EMPLOYMENT_TYPE}, minus `temporary` and `other`.
57+ */
58+ export const JOB_PREFERENCE_EMPLOYMENT_TYPE = {
59+ fullTime : 'fullTime' ,
60+ partTime : 'partTime' ,
61+ contract : 'contract' ,
62+ internship : 'internship' ,
63+ volunteer : 'volunteer' ,
64+ } as const ;
65+ export type TJobPreferenceEmploymentType =
66+ ( typeof JOB_PREFERENCE_EMPLOYMENT_TYPE ) [ keyof typeof JOB_PREFERENCE_EMPLOYMENT_TYPE ] ;
67+
3968export const JOB_SALARY_PERIOD = {
4069 yearly : 'yearly' ,
4170 monthly : 'monthly' ,
@@ -91,7 +120,12 @@ export interface TJobSalary {
91120 period : TJobSalaryPeriod | null ;
92121}
93122
123+ /**
124+ * Filtering criteria for the classic LinkedIn jobs search. Every specified field is applied, or the
125+ * action fails.
126+ */
94127export interface TJobFilter {
128+ /** @deprecated Use the top-level `location` of {@link TSearchJobsParams} instead. */
95129 location ?: string ;
96130 datePosted ?: TJobDatePosted ;
97131 experienceLevels ?: TJobExperienceLevel [ ] ;
@@ -107,10 +141,32 @@ export interface TJobFilter {
107141 fairChanceEmployer ?: boolean ;
108142}
109143
144+ /**
145+ * Filtering criteria for LinkedIn's AI-powered jobs search. LinkedIn decides which of them it
146+ * offers for a given search, and the ones it does not offer are skipped instead of failing the
147+ * action.
148+ */
149+ export interface TJobPreferences {
150+ datePosted ?: TJobDatePosted ;
151+ experienceLevels ?: TJobPreferenceExperienceLevel [ ] ;
152+ employmentTypes ?: TJobPreferenceEmploymentType [ ] ;
153+ companies ?: string [ ] ;
154+ remote ?: boolean ;
155+ easyApply ?: boolean ;
156+ under10Applicants ?: boolean ;
157+ inYourNetwork ?: boolean ;
158+ keywords ?: string [ ] ;
159+ }
160+
110161export interface TSearchJobsParams extends TBaseActionParams {
111162 term ?: string ;
112163 limit ?: number ;
164+ location ?: string ;
165+ allowSimilarResults ?: boolean ;
166+ /** Mutually exclusive with {@link TSearchJobsParams.preferences}. */
113167 filter ?: TJobFilter ;
168+ /** Mutually exclusive with {@link TSearchJobsParams.filter}. */
169+ preferences ?: TJobPreferences ;
114170 customSearchUrl ?: string ;
115171}
116172
@@ -125,6 +181,7 @@ export interface TSearchJobResult {
125181 salary : TJobSalary | null ;
126182 easyApply : boolean ;
127183 isPromoted : boolean ;
184+ isSimilarMatch : boolean ;
128185}
129186
130187export interface TBaseFetchJobParams extends TBaseActionParams {
@@ -139,7 +196,6 @@ export interface TJob {
139196 jobUrl : string ;
140197 title : string ;
141198 companyName : string | null ;
142- companyUrn : string | null ;
143199 companyUrl : string | null ;
144200 location : string | null ;
145201 postedDate : string | null ;
0 commit comments