linkedin-mcp-search 1.0.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/LICENSE +21 -0
- package/README.md +259 -0
- package/dist/config/constants.d.ts +79 -0
- package/dist/config/constants.d.ts.map +1 -0
- package/dist/config/constants.js +124 -0
- package/dist/config/constants.js.map +1 -0
- package/dist/config/env.d.ts +20 -0
- package/dist/config/env.d.ts.map +1 -0
- package/dist/config/env.js +34 -0
- package/dist/config/env.js.map +1 -0
- package/dist/config/index.d.ts +7 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +7 -0
- package/dist/config/index.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +126 -0
- package/dist/index.js.map +1 -0
- package/dist/services/auth/index.d.ts +7 -0
- package/dist/services/auth/index.d.ts.map +1 -0
- package/dist/services/auth/index.js +6 -0
- package/dist/services/auth/index.js.map +1 -0
- package/dist/services/auth/oauth.service.d.ts +43 -0
- package/dist/services/auth/oauth.service.d.ts.map +1 -0
- package/dist/services/auth/oauth.service.js +278 -0
- package/dist/services/auth/oauth.service.js.map +1 -0
- package/dist/services/index.d.ts +9 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +10 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/linkedin/company.service.d.ts +30 -0
- package/dist/services/linkedin/company.service.d.ts.map +1 -0
- package/dist/services/linkedin/company.service.js +57 -0
- package/dist/services/linkedin/company.service.js.map +1 -0
- package/dist/services/linkedin/index.d.ts +8 -0
- package/dist/services/linkedin/index.d.ts.map +1 -0
- package/dist/services/linkedin/index.js +8 -0
- package/dist/services/linkedin/index.js.map +1 -0
- package/dist/services/linkedin/job.service.d.ts +44 -0
- package/dist/services/linkedin/job.service.d.ts.map +1 -0
- package/dist/services/linkedin/job.service.js +128 -0
- package/dist/services/linkedin/job.service.js.map +1 -0
- package/dist/services/linkedin/parser.service.d.ts +39 -0
- package/dist/services/linkedin/parser.service.d.ts.map +1 -0
- package/dist/services/linkedin/parser.service.js +235 -0
- package/dist/services/linkedin/parser.service.js.map +1 -0
- package/dist/tools/definitions.d.ts +27 -0
- package/dist/tools/definitions.d.ts.map +1 -0
- package/dist/tools/definitions.js +285 -0
- package/dist/tools/definitions.js.map +1 -0
- package/dist/tools/handlers/auth.handler.d.ts +23 -0
- package/dist/tools/handlers/auth.handler.d.ts.map +1 -0
- package/dist/tools/handlers/auth.handler.js +97 -0
- package/dist/tools/handlers/auth.handler.js.map +1 -0
- package/dist/tools/handlers/company.handler.d.ts +25 -0
- package/dist/tools/handlers/company.handler.d.ts.map +1 -0
- package/dist/tools/handlers/company.handler.js +83 -0
- package/dist/tools/handlers/company.handler.js.map +1 -0
- package/dist/tools/handlers/helper.handler.d.ts +21 -0
- package/dist/tools/handlers/helper.handler.d.ts.map +1 -0
- package/dist/tools/handlers/helper.handler.js +56 -0
- package/dist/tools/handlers/helper.handler.js.map +1 -0
- package/dist/tools/handlers/index.d.ts +10 -0
- package/dist/tools/handlers/index.d.ts.map +1 -0
- package/dist/tools/handlers/index.js +13 -0
- package/dist/tools/handlers/index.js.map +1 -0
- package/dist/tools/handlers/job.handler.d.ts +35 -0
- package/dist/tools/handlers/job.handler.d.ts.map +1 -0
- package/dist/tools/handlers/job.handler.js +168 -0
- package/dist/tools/handlers/job.handler.js.map +1 -0
- package/dist/tools/index.d.ts +7 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +9 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/types/auth.types.d.ts +39 -0
- package/dist/types/auth.types.d.ts.map +1 -0
- package/dist/types/auth.types.js +6 -0
- package/dist/types/auth.types.js.map +1 -0
- package/dist/types/company.types.d.ts +25 -0
- package/dist/types/company.types.d.ts.map +1 -0
- package/dist/types/company.types.js +6 -0
- package/dist/types/company.types.js.map +1 -0
- package/dist/types/index.d.ts +9 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +7 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/job.types.d.ts +106 -0
- package/dist/types/job.types.d.ts.map +1 -0
- package/dist/types/job.types.js +6 -0
- package/dist/types/job.types.js.map +1 -0
- package/dist/utils/http.d.ts +19 -0
- package/dist/utils/http.d.ts.map +1 -0
- package/dist/utils/http.js +38 -0
- package/dist/utils/http.js.map +1 -0
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +8 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/parsers.d.ts +35 -0
- package/dist/utils/parsers.d.ts.map +1 -0
- package/dist/utils/parsers.js +100 -0
- package/dist/utils/parsers.js.map +1 -0
- package/dist/utils/url-builder.d.ts +15 -0
- package/dist/utils/url-builder.d.ts.map +1 -0
- package/dist/utils/url-builder.js +98 -0
- package/dist/utils/url-builder.js.map +1 -0
- package/package.json +60 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
# LinkedIn Job Search MCP
|
|
2
|
+
|
|
3
|
+
A Model Context Protocol (MCP) server for LinkedIn job search. Search jobs, filter by location, experience level, remote work, and more - all from Claude, Cursor, or any MCP client.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/linkedin-mcp-search)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
|
|
8
|
+
## 🚀 Quick Start
|
|
9
|
+
|
|
10
|
+
### Option 1: Using npx (Recommended - No Installation)
|
|
11
|
+
|
|
12
|
+
Add to your Claude Desktop or Cursor MCP configuration:
|
|
13
|
+
|
|
14
|
+
**Claude Desktop** (`claude_desktop_config.json`):
|
|
15
|
+
|
|
16
|
+
```json
|
|
17
|
+
{
|
|
18
|
+
"mcpServers": {
|
|
19
|
+
"linkedin": {
|
|
20
|
+
"command": "npx",
|
|
21
|
+
"args": ["-y", "linkedin-mcp-search"]
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
**Cursor** (`.cursor/mcp.json` in your project or global config):
|
|
28
|
+
|
|
29
|
+
```json
|
|
30
|
+
{
|
|
31
|
+
"mcpServers": {
|
|
32
|
+
"linkedin": {
|
|
33
|
+
"command": "npx",
|
|
34
|
+
"args": ["-y", "linkedin-mcp-search"]
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Option 2: Global Installation
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npm install -g linkedin-mcp-search
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Then configure:
|
|
47
|
+
|
|
48
|
+
```json
|
|
49
|
+
{
|
|
50
|
+
"mcpServers": {
|
|
51
|
+
"linkedin": {
|
|
52
|
+
"command": "linkedin-mcp"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Option 3: Local Installation
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
git clone https://github.com/yourusername/linkedin-mcp-search.git
|
|
62
|
+
cd linkedin-mcp-search
|
|
63
|
+
npm install
|
|
64
|
+
npm run build
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Then configure with full path:
|
|
68
|
+
|
|
69
|
+
```json
|
|
70
|
+
{
|
|
71
|
+
"mcpServers": {
|
|
72
|
+
"linkedin": {
|
|
73
|
+
"command": "node",
|
|
74
|
+
"args": ["C:/path/to/linkedin-mcp-search/dist/index.js"]
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## 📍 Config File Locations
|
|
81
|
+
|
|
82
|
+
| Platform | Config File Location |
|
|
83
|
+
|----------|---------------------|
|
|
84
|
+
| **Claude Desktop (macOS)** | `~/Library/Application Support/Claude/claude_desktop_config.json` |
|
|
85
|
+
| **Claude Desktop (Windows)** | `%APPDATA%\Claude\claude_desktop_config.json` |
|
|
86
|
+
| **Cursor (Project)** | `.cursor/mcp.json` in your project root |
|
|
87
|
+
| **Cursor (Global)** | `~/.cursor/mcp.json` |
|
|
88
|
+
|
|
89
|
+
## 🔧 Features
|
|
90
|
+
|
|
91
|
+
### Job Search (No Authentication Required)
|
|
92
|
+
- **Keyword search** - "Software Engineer", "Data Scientist Python", etc.
|
|
93
|
+
- **Location filtering** - City, state, country, or "Remote"
|
|
94
|
+
- **Job type** - Full-time, Part-time, Contract, Internship
|
|
95
|
+
- **Experience level** - Entry-level, Mid-Senior, Director, Executive
|
|
96
|
+
- **Workplace type** - Remote, Hybrid, On-site
|
|
97
|
+
- **Date posted** - Last 24 hours, week, or month
|
|
98
|
+
- **Easy Apply filter** - Only jobs with LinkedIn Easy Apply
|
|
99
|
+
- **Sorting** - Most relevant or most recent
|
|
100
|
+
- **Pagination** - Browse through all results
|
|
101
|
+
|
|
102
|
+
### Optional: OAuth Authentication
|
|
103
|
+
For future features like saved jobs (requires LinkedIn Partner API):
|
|
104
|
+
|
|
105
|
+
```json
|
|
106
|
+
{
|
|
107
|
+
"mcpServers": {
|
|
108
|
+
"linkedin": {
|
|
109
|
+
"command": "npx",
|
|
110
|
+
"args": ["-y", "linkedin-mcp-search"],
|
|
111
|
+
"env": {
|
|
112
|
+
"LINKEDIN_CLIENT_ID": "your_client_id",
|
|
113
|
+
"LINKEDIN_CLIENT_SECRET": "your_client_secret"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## 🛠️ Available Tools
|
|
121
|
+
|
|
122
|
+
### Job Search Tools
|
|
123
|
+
|
|
124
|
+
| Tool | Description |
|
|
125
|
+
|------|-------------|
|
|
126
|
+
| `search_jobs` | Comprehensive job search with all filters |
|
|
127
|
+
| `get_job_details` | Get full job description and details |
|
|
128
|
+
| `search_remote_jobs` | Quick search for remote positions |
|
|
129
|
+
| `search_entry_level_jobs` | Search entry-level & internship jobs |
|
|
130
|
+
|
|
131
|
+
### Company Tools
|
|
132
|
+
|
|
133
|
+
| Tool | Description |
|
|
134
|
+
|------|-------------|
|
|
135
|
+
| `get_company` | Get company information |
|
|
136
|
+
| `search_companies` | Search for companies |
|
|
137
|
+
| `get_company_jobs` | Get all jobs from a specific company |
|
|
138
|
+
|
|
139
|
+
### Helper Tools
|
|
140
|
+
|
|
141
|
+
| Tool | Description |
|
|
142
|
+
|------|-------------|
|
|
143
|
+
| `get_popular_locations` | List locations with LinkedIn geo IDs |
|
|
144
|
+
| `get_industries` | List industry categories |
|
|
145
|
+
| `get_job_functions` | List job function categories |
|
|
146
|
+
| `build_job_search_url` | Generate shareable LinkedIn search URL |
|
|
147
|
+
|
|
148
|
+
### Authentication Tools
|
|
149
|
+
|
|
150
|
+
| Tool | Description |
|
|
151
|
+
|------|-------------|
|
|
152
|
+
| `linkedin_login` | Start OAuth flow (opens browser) |
|
|
153
|
+
| `linkedin_logout` | Clear stored credentials |
|
|
154
|
+
| `linkedin_status` | Check authentication status |
|
|
155
|
+
|
|
156
|
+
## 💬 Example Prompts
|
|
157
|
+
|
|
158
|
+
Once configured, you can ask Claude or Cursor:
|
|
159
|
+
|
|
160
|
+
```
|
|
161
|
+
"Search for remote software engineer jobs"
|
|
162
|
+
|
|
163
|
+
"Find entry-level data science positions in New York"
|
|
164
|
+
|
|
165
|
+
"Show me Python developer jobs posted in the last 24 hours"
|
|
166
|
+
|
|
167
|
+
"Get details for this LinkedIn job"
|
|
168
|
+
|
|
169
|
+
"Search for product manager jobs at Google"
|
|
170
|
+
|
|
171
|
+
"Find senior DevOps positions with remote work options"
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
## 📊 Search Parameters
|
|
175
|
+
|
|
176
|
+
### search_jobs
|
|
177
|
+
|
|
178
|
+
| Parameter | Type | Description |
|
|
179
|
+
|-----------|------|-------------|
|
|
180
|
+
| `keywords` | string | Search terms (e.g., "React Developer") |
|
|
181
|
+
| `location` | string | City, state, or country |
|
|
182
|
+
| `geoId` | string | LinkedIn geographic ID (more precise) |
|
|
183
|
+
| `distance` | number | Radius in miles (5, 10, 25, 50, 100) |
|
|
184
|
+
| `jobType` | array | `full-time`, `part-time`, `contract`, `temporary`, `internship`, `volunteer` |
|
|
185
|
+
| `experienceLevel` | array | `internship`, `entry-level`, `associate`, `mid-senior`, `director`, `executive` |
|
|
186
|
+
| `workplaceType` | array | `remote`, `hybrid`, `on-site` |
|
|
187
|
+
| `datePosted` | string | `past-24-hours`, `past-week`, `past-month`, `any-time` |
|
|
188
|
+
| `easyApply` | boolean | Only show Easy Apply jobs |
|
|
189
|
+
| `companyIds` | array | Filter by company IDs |
|
|
190
|
+
| `sortBy` | string | `most-relevant`, `most-recent` |
|
|
191
|
+
| `start` | number | Pagination offset |
|
|
192
|
+
| `limit` | number | Max results (default: 25, max: 50) |
|
|
193
|
+
|
|
194
|
+
## 🔒 Privacy & Rate Limiting
|
|
195
|
+
|
|
196
|
+
- **No data stored** - All searches are stateless
|
|
197
|
+
- **Public API only** - Uses LinkedIn's guest job search (no scraping of private data)
|
|
198
|
+
- **Rate limiting** - LinkedIn may temporarily block if too many requests are made. Add delays between searches if needed.
|
|
199
|
+
|
|
200
|
+
## 🏗️ Development
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
# Clone the repository
|
|
204
|
+
git clone https://github.com/yourusername/linkedin-mcp-search.git
|
|
205
|
+
cd linkedin-mcp-search
|
|
206
|
+
|
|
207
|
+
# Install dependencies
|
|
208
|
+
npm install
|
|
209
|
+
|
|
210
|
+
# Build
|
|
211
|
+
npm run build
|
|
212
|
+
|
|
213
|
+
# Run locally
|
|
214
|
+
npm start
|
|
215
|
+
|
|
216
|
+
# Development with auto-rebuild
|
|
217
|
+
npm run watch
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
## 📦 Publishing to npm
|
|
221
|
+
|
|
222
|
+
```bash
|
|
223
|
+
# Login to npm
|
|
224
|
+
npm login
|
|
225
|
+
|
|
226
|
+
# Update version in package.json
|
|
227
|
+
npm version patch # or minor/major
|
|
228
|
+
|
|
229
|
+
# Publish
|
|
230
|
+
npm publish
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
## 🐛 Troubleshooting
|
|
234
|
+
|
|
235
|
+
### "MCP server not found"
|
|
236
|
+
- Ensure Node.js 18+ is installed: `node --version`
|
|
237
|
+
- Check the config file path is correct
|
|
238
|
+
- Restart Claude Desktop / Cursor after config changes
|
|
239
|
+
|
|
240
|
+
### "No jobs found"
|
|
241
|
+
- Try broader search terms
|
|
242
|
+
- Remove some filters
|
|
243
|
+
- Check if LinkedIn is accessible in your region
|
|
244
|
+
|
|
245
|
+
### "Rate limited"
|
|
246
|
+
- Wait a few minutes between searches
|
|
247
|
+
- Reduce the number of requests
|
|
248
|
+
|
|
249
|
+
## 📄 License
|
|
250
|
+
|
|
251
|
+
MIT - See [LICENSE](LICENSE) file
|
|
252
|
+
|
|
253
|
+
## ⚠️ Disclaimer
|
|
254
|
+
|
|
255
|
+
This project is not affiliated with LinkedIn. It uses LinkedIn's public guest API for job searching. Use responsibly and in accordance with LinkedIn's terms of service.
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
**Made with ❤️ for job seekers everywhere**
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Application Constants
|
|
3
|
+
* Centralized configuration values and mappings
|
|
4
|
+
* @module config/constants
|
|
5
|
+
*/
|
|
6
|
+
import type { JobType, ExperienceLevel, WorkplaceType, DatePosted, LinkedInScope } from '../types/index.js';
|
|
7
|
+
export declare const LINKEDIN_URLS: {
|
|
8
|
+
readonly OAUTH: "https://www.linkedin.com/oauth/v2";
|
|
9
|
+
readonly API: "https://api.linkedin.com/v2";
|
|
10
|
+
readonly BASE: "https://www.linkedin.com";
|
|
11
|
+
readonly JOBS_GUEST_API: "https://www.linkedin.com/jobs-guest/jobs/api";
|
|
12
|
+
};
|
|
13
|
+
export declare const DEFAULT_CONFIG: {
|
|
14
|
+
readonly OAUTH_PORT: 8585;
|
|
15
|
+
readonly REQUEST_TIMEOUT: 30000;
|
|
16
|
+
readonly DEFAULT_JOB_LIMIT: 25;
|
|
17
|
+
readonly MAX_JOB_LIMIT: 50;
|
|
18
|
+
};
|
|
19
|
+
export declare const DEFAULT_SCOPES: LinkedInScope[];
|
|
20
|
+
export declare const JOB_TYPE_CODES: Record<JobType, string>;
|
|
21
|
+
export declare const EXPERIENCE_LEVEL_CODES: Record<ExperienceLevel, string>;
|
|
22
|
+
export declare const WORKPLACE_TYPE_CODES: Record<Exclude<WorkplaceType, 'unknown'>, string>;
|
|
23
|
+
export declare const DATE_POSTED_CODES: Record<DatePosted, string>;
|
|
24
|
+
export declare const POPULAR_LOCATIONS: readonly [{
|
|
25
|
+
readonly name: "United States";
|
|
26
|
+
readonly geoId: "103644278";
|
|
27
|
+
}, {
|
|
28
|
+
readonly name: "New York, NY";
|
|
29
|
+
readonly geoId: "102571732";
|
|
30
|
+
}, {
|
|
31
|
+
readonly name: "San Francisco Bay Area";
|
|
32
|
+
readonly geoId: "90000084";
|
|
33
|
+
}, {
|
|
34
|
+
readonly name: "Los Angeles, CA";
|
|
35
|
+
readonly geoId: "102448103";
|
|
36
|
+
}, {
|
|
37
|
+
readonly name: "Seattle, WA";
|
|
38
|
+
readonly geoId: "104116203";
|
|
39
|
+
}, {
|
|
40
|
+
readonly name: "Austin, TX";
|
|
41
|
+
readonly geoId: "104472866";
|
|
42
|
+
}, {
|
|
43
|
+
readonly name: "Chicago, IL";
|
|
44
|
+
readonly geoId: "103112676";
|
|
45
|
+
}, {
|
|
46
|
+
readonly name: "Boston, MA";
|
|
47
|
+
readonly geoId: "102380872";
|
|
48
|
+
}, {
|
|
49
|
+
readonly name: "Denver, CO";
|
|
50
|
+
readonly geoId: "103203548";
|
|
51
|
+
}, {
|
|
52
|
+
readonly name: "United Kingdom";
|
|
53
|
+
readonly geoId: "101165590";
|
|
54
|
+
}, {
|
|
55
|
+
readonly name: "London, UK";
|
|
56
|
+
readonly geoId: "102257491";
|
|
57
|
+
}, {
|
|
58
|
+
readonly name: "Canada";
|
|
59
|
+
readonly geoId: "101174742";
|
|
60
|
+
}, {
|
|
61
|
+
readonly name: "Toronto, Canada";
|
|
62
|
+
readonly geoId: "100025096";
|
|
63
|
+
}, {
|
|
64
|
+
readonly name: "Germany";
|
|
65
|
+
readonly geoId: "101282230";
|
|
66
|
+
}, {
|
|
67
|
+
readonly name: "India";
|
|
68
|
+
readonly geoId: "102713980";
|
|
69
|
+
}];
|
|
70
|
+
export declare const INDUSTRIES: readonly ["Technology, Information and Internet", "Hospitals and Health Care", "Financial Services", "IT Services and IT Consulting", "Software Development", "Retail", "Staffing and Recruiting", "Manufacturing", "Higher Education", "Banking", "Insurance", "Real Estate", "Construction", "Marketing Services", "Telecommunications", "Automotive", "Entertainment Providers", "Non-profit Organizations", "Government Administration", "Legal Services"];
|
|
71
|
+
export declare const JOB_FUNCTIONS: readonly ["Engineering", "Information Technology", "Sales", "Marketing", "Human Resources", "Finance", "Operations", "Product Management", "Design", "Data Science", "Project Management", "Business Development", "Customer Service", "Legal", "Research", "Quality Assurance", "Administrative", "Consulting", "Writing/Editing", "Healthcare Services"];
|
|
72
|
+
export declare const DEFAULT_HEADERS: {
|
|
73
|
+
readonly 'User-Agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36";
|
|
74
|
+
readonly Accept: "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8";
|
|
75
|
+
readonly 'Accept-Language': "en-US,en;q=0.5";
|
|
76
|
+
readonly Connection: "keep-alive";
|
|
77
|
+
readonly 'Upgrade-Insecure-Requests': "1";
|
|
78
|
+
};
|
|
79
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/config/constants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAI5G,eAAO,MAAM,aAAa;;;;;CAKhB,CAAC;AAIX,eAAO,MAAM,cAAc;;;;;CAKjB,CAAC;AAEX,eAAO,MAAM,cAAc,EAAE,aAAa,EAIzC,CAAC;AAIF,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAQlD,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,eAAe,EAAE,MAAM,CAOlE,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,OAAO,CAAC,aAAa,EAAE,SAAS,CAAC,EAAE,MAAM,CAIlF,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAKxD,CAAC;AAIF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBpB,CAAC;AAEX,eAAO,MAAM,UAAU,gcAqBb,CAAC;AAEX,eAAO,MAAM,aAAa,4VAqBhB,CAAC;AAIX,eAAO,MAAM,eAAe;;;;;;CAMlB,CAAC"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Application Constants
|
|
3
|
+
* Centralized configuration values and mappings
|
|
4
|
+
* @module config/constants
|
|
5
|
+
*/
|
|
6
|
+
// ==================== API Endpoints ====================
|
|
7
|
+
export const LINKEDIN_URLS = {
|
|
8
|
+
OAUTH: 'https://www.linkedin.com/oauth/v2',
|
|
9
|
+
API: 'https://api.linkedin.com/v2',
|
|
10
|
+
BASE: 'https://www.linkedin.com',
|
|
11
|
+
JOBS_GUEST_API: 'https://www.linkedin.com/jobs-guest/jobs/api',
|
|
12
|
+
};
|
|
13
|
+
// ==================== Default Configuration ====================
|
|
14
|
+
export const DEFAULT_CONFIG = {
|
|
15
|
+
OAUTH_PORT: 8585,
|
|
16
|
+
REQUEST_TIMEOUT: 30000,
|
|
17
|
+
DEFAULT_JOB_LIMIT: 25,
|
|
18
|
+
MAX_JOB_LIMIT: 50,
|
|
19
|
+
};
|
|
20
|
+
export const DEFAULT_SCOPES = [
|
|
21
|
+
'openid',
|
|
22
|
+
'profile',
|
|
23
|
+
'email',
|
|
24
|
+
];
|
|
25
|
+
// ==================== LinkedIn Parameter Mappings ====================
|
|
26
|
+
export const JOB_TYPE_CODES = {
|
|
27
|
+
'full-time': 'F',
|
|
28
|
+
'part-time': 'P',
|
|
29
|
+
'contract': 'C',
|
|
30
|
+
'temporary': 'T',
|
|
31
|
+
'internship': 'I',
|
|
32
|
+
'volunteer': 'V',
|
|
33
|
+
'other': 'O',
|
|
34
|
+
};
|
|
35
|
+
export const EXPERIENCE_LEVEL_CODES = {
|
|
36
|
+
'internship': '1',
|
|
37
|
+
'entry-level': '2',
|
|
38
|
+
'associate': '3',
|
|
39
|
+
'mid-senior': '4',
|
|
40
|
+
'director': '5',
|
|
41
|
+
'executive': '6',
|
|
42
|
+
};
|
|
43
|
+
export const WORKPLACE_TYPE_CODES = {
|
|
44
|
+
'on-site': '1',
|
|
45
|
+
'remote': '2',
|
|
46
|
+
'hybrid': '3',
|
|
47
|
+
};
|
|
48
|
+
export const DATE_POSTED_CODES = {
|
|
49
|
+
'past-24-hours': 'r86400',
|
|
50
|
+
'past-week': 'r604800',
|
|
51
|
+
'past-month': 'r2592000',
|
|
52
|
+
'any-time': '',
|
|
53
|
+
};
|
|
54
|
+
// ==================== Reference Data ====================
|
|
55
|
+
export const POPULAR_LOCATIONS = [
|
|
56
|
+
{ name: 'United States', geoId: '103644278' },
|
|
57
|
+
{ name: 'New York, NY', geoId: '102571732' },
|
|
58
|
+
{ name: 'San Francisco Bay Area', geoId: '90000084' },
|
|
59
|
+
{ name: 'Los Angeles, CA', geoId: '102448103' },
|
|
60
|
+
{ name: 'Seattle, WA', geoId: '104116203' },
|
|
61
|
+
{ name: 'Austin, TX', geoId: '104472866' },
|
|
62
|
+
{ name: 'Chicago, IL', geoId: '103112676' },
|
|
63
|
+
{ name: 'Boston, MA', geoId: '102380872' },
|
|
64
|
+
{ name: 'Denver, CO', geoId: '103203548' },
|
|
65
|
+
{ name: 'United Kingdom', geoId: '101165590' },
|
|
66
|
+
{ name: 'London, UK', geoId: '102257491' },
|
|
67
|
+
{ name: 'Canada', geoId: '101174742' },
|
|
68
|
+
{ name: 'Toronto, Canada', geoId: '100025096' },
|
|
69
|
+
{ name: 'Germany', geoId: '101282230' },
|
|
70
|
+
{ name: 'India', geoId: '102713980' },
|
|
71
|
+
];
|
|
72
|
+
export const INDUSTRIES = [
|
|
73
|
+
'Technology, Information and Internet',
|
|
74
|
+
'Hospitals and Health Care',
|
|
75
|
+
'Financial Services',
|
|
76
|
+
'IT Services and IT Consulting',
|
|
77
|
+
'Software Development',
|
|
78
|
+
'Retail',
|
|
79
|
+
'Staffing and Recruiting',
|
|
80
|
+
'Manufacturing',
|
|
81
|
+
'Higher Education',
|
|
82
|
+
'Banking',
|
|
83
|
+
'Insurance',
|
|
84
|
+
'Real Estate',
|
|
85
|
+
'Construction',
|
|
86
|
+
'Marketing Services',
|
|
87
|
+
'Telecommunications',
|
|
88
|
+
'Automotive',
|
|
89
|
+
'Entertainment Providers',
|
|
90
|
+
'Non-profit Organizations',
|
|
91
|
+
'Government Administration',
|
|
92
|
+
'Legal Services',
|
|
93
|
+
];
|
|
94
|
+
export const JOB_FUNCTIONS = [
|
|
95
|
+
'Engineering',
|
|
96
|
+
'Information Technology',
|
|
97
|
+
'Sales',
|
|
98
|
+
'Marketing',
|
|
99
|
+
'Human Resources',
|
|
100
|
+
'Finance',
|
|
101
|
+
'Operations',
|
|
102
|
+
'Product Management',
|
|
103
|
+
'Design',
|
|
104
|
+
'Data Science',
|
|
105
|
+
'Project Management',
|
|
106
|
+
'Business Development',
|
|
107
|
+
'Customer Service',
|
|
108
|
+
'Legal',
|
|
109
|
+
'Research',
|
|
110
|
+
'Quality Assurance',
|
|
111
|
+
'Administrative',
|
|
112
|
+
'Consulting',
|
|
113
|
+
'Writing/Editing',
|
|
114
|
+
'Healthcare Services',
|
|
115
|
+
];
|
|
116
|
+
// ==================== HTTP Headers ====================
|
|
117
|
+
export const DEFAULT_HEADERS = {
|
|
118
|
+
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
|
|
119
|
+
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
|
|
120
|
+
'Accept-Language': 'en-US,en;q=0.5',
|
|
121
|
+
'Connection': 'keep-alive',
|
|
122
|
+
'Upgrade-Insecure-Requests': '1',
|
|
123
|
+
};
|
|
124
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/config/constants.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Environment Configuration
|
|
3
|
+
* Loads and validates environment variables
|
|
4
|
+
* @module config/env
|
|
5
|
+
*/
|
|
6
|
+
export interface EnvConfig {
|
|
7
|
+
linkedIn: {
|
|
8
|
+
clientId: string;
|
|
9
|
+
clientSecret: string;
|
|
10
|
+
redirectPort: number;
|
|
11
|
+
};
|
|
12
|
+
isOAuthConfigured: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Load environment configuration
|
|
16
|
+
* Validates and provides defaults for missing values
|
|
17
|
+
*/
|
|
18
|
+
export declare function loadEnvConfig(): EnvConfig;
|
|
19
|
+
export declare function getEnvConfig(): EnvConfig;
|
|
20
|
+
//# sourceMappingURL=env.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/config/env.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE;QACR,QAAQ,EAAE,MAAM,CAAC;QACjB,YAAY,EAAE,MAAM,CAAC;QACrB,YAAY,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,SAAS,CAgBzC;AAOD,wBAAgB,YAAY,IAAI,SAAS,CAKxC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Environment Configuration
|
|
3
|
+
* Loads and validates environment variables
|
|
4
|
+
* @module config/env
|
|
5
|
+
*/
|
|
6
|
+
import { DEFAULT_CONFIG } from './constants.js';
|
|
7
|
+
/**
|
|
8
|
+
* Load environment configuration
|
|
9
|
+
* Validates and provides defaults for missing values
|
|
10
|
+
*/
|
|
11
|
+
export function loadEnvConfig() {
|
|
12
|
+
const clientId = process.env.LINKEDIN_CLIENT_ID || '';
|
|
13
|
+
const clientSecret = process.env.LINKEDIN_CLIENT_SECRET || '';
|
|
14
|
+
const redirectPort = parseInt(process.env.LINKEDIN_REDIRECT_PORT || String(DEFAULT_CONFIG.OAUTH_PORT), 10);
|
|
15
|
+
return {
|
|
16
|
+
linkedIn: {
|
|
17
|
+
clientId,
|
|
18
|
+
clientSecret,
|
|
19
|
+
redirectPort,
|
|
20
|
+
},
|
|
21
|
+
isOAuthConfigured: Boolean(clientId && clientSecret),
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Get environment configuration (singleton pattern)
|
|
26
|
+
*/
|
|
27
|
+
let envConfig = null;
|
|
28
|
+
export function getEnvConfig() {
|
|
29
|
+
if (!envConfig) {
|
|
30
|
+
envConfig = loadEnvConfig();
|
|
31
|
+
}
|
|
32
|
+
return envConfig;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=env.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/config/env.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAWhD;;;GAGG;AACH,MAAM,UAAU,aAAa;IAC3B,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,EAAE,CAAC;IACtD,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,sBAAsB,IAAI,EAAE,CAAC;IAC9D,MAAM,YAAY,GAAG,QAAQ,CAC3B,OAAO,CAAC,GAAG,CAAC,sBAAsB,IAAI,MAAM,CAAC,cAAc,CAAC,UAAU,CAAC,EACvE,EAAE,CACH,CAAC;IAEF,OAAO;QACL,QAAQ,EAAE;YACR,QAAQ;YACR,YAAY;YACZ,YAAY;SACb;QACD,iBAAiB,EAAE,OAAO,CAAC,QAAQ,IAAI,YAAY,CAAC;KACrD,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,IAAI,SAAS,GAAqB,IAAI,CAAC;AAEvC,MAAM,UAAU,YAAY;IAC1B,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,SAAS,GAAG,aAAa,EAAE,CAAC;IAC9B,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;GAIG"}
|