job-scout 1.0.0 → 1.2.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.

Potentially problematic release.


This version of job-scout might be problematic. Click here for more details.

Files changed (271) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +60 -11
  3. package/dist/core/contracts.d.ts +45 -0
  4. package/dist/core/contracts.d.ts.map +1 -0
  5. package/dist/core/contracts.js +3 -0
  6. package/dist/core/contracts.js.map +1 -0
  7. package/dist/core/engine.d.ts +5 -0
  8. package/dist/core/engine.d.ts.map +1 -0
  9. package/dist/core/engine.js +52 -0
  10. package/dist/core/engine.js.map +1 -0
  11. package/dist/core/errors.d.ts +13 -0
  12. package/dist/core/errors.d.ts.map +1 -0
  13. package/dist/core/errors.js +29 -0
  14. package/dist/core/errors.js.map +1 -0
  15. package/dist/core/model.d.ts +259 -0
  16. package/dist/core/model.d.ts.map +1 -0
  17. package/dist/core/model.js +546 -0
  18. package/dist/core/model.js.map +1 -0
  19. package/dist/core/request-compiler.d.ts +4 -0
  20. package/dist/core/request-compiler.d.ts.map +1 -0
  21. package/dist/core/request-compiler.js +483 -0
  22. package/dist/core/request-compiler.js.map +1 -0
  23. package/dist/core/result-pipeline.d.ts +10 -0
  24. package/dist/core/result-pipeline.d.ts.map +1 -0
  25. package/dist/core/result-pipeline.js +71 -0
  26. package/dist/core/result-pipeline.js.map +1 -0
  27. package/dist/domain/employment-type.d.ts +5 -0
  28. package/dist/domain/employment-type.d.ts.map +1 -0
  29. package/dist/domain/employment-type.js +43 -0
  30. package/dist/domain/employment-type.js.map +1 -0
  31. package/dist/domain/index.d.ts +6 -0
  32. package/dist/domain/index.d.ts.map +1 -0
  33. package/dist/domain/index.js +16 -0
  34. package/dist/domain/index.js.map +1 -0
  35. package/dist/domain/mapper.d.ts +4 -0
  36. package/dist/domain/mapper.d.ts.map +1 -0
  37. package/dist/domain/mapper.js +118 -0
  38. package/dist/domain/mapper.js.map +1 -0
  39. package/dist/domain/row-normalizer.d.ts +4 -0
  40. package/dist/domain/row-normalizer.d.ts.map +1 -0
  41. package/dist/domain/row-normalizer.js +52 -0
  42. package/dist/domain/row-normalizer.js.map +1 -0
  43. package/dist/domain/site-mapping.d.ts +6 -0
  44. package/dist/domain/site-mapping.d.ts.map +1 -0
  45. package/dist/domain/site-mapping.js +43 -0
  46. package/dist/domain/site-mapping.js.map +1 -0
  47. package/dist/domain/types.d.ts +256 -0
  48. package/dist/domain/types.d.ts.map +1 -0
  49. package/dist/domain/types.js +3 -0
  50. package/dist/domain/types.js.map +1 -0
  51. package/dist/index.d.ts +2 -0
  52. package/dist/index.d.ts.map +1 -0
  53. package/dist/index.js +18 -0
  54. package/dist/index.js.map +1 -0
  55. package/dist/internal/http/limiter.d.ts +4 -0
  56. package/dist/internal/http/limiter.d.ts.map +1 -0
  57. package/dist/internal/http/limiter.js +16 -0
  58. package/dist/internal/http/limiter.js.map +1 -0
  59. package/dist/internal/http/retry.d.ts +8 -0
  60. package/dist/internal/http/retry.d.ts.map +1 -0
  61. package/dist/internal/http/retry.js +15 -0
  62. package/dist/internal/http/retry.js.map +1 -0
  63. package/dist/internal/http/transport.d.ts +4 -0
  64. package/dist/internal/http/transport.d.ts.map +1 -0
  65. package/dist/internal/http/transport.js +8 -0
  66. package/dist/internal/http/transport.js.map +1 -0
  67. package/dist/internal/logging.d.ts +3 -0
  68. package/dist/internal/logging.d.ts.map +1 -0
  69. package/dist/internal/logging.js +14 -0
  70. package/dist/internal/logging.js.map +1 -0
  71. package/dist/public/client.d.ts +3 -0
  72. package/dist/public/client.d.ts.map +1 -0
  73. package/dist/public/client.js +16 -0
  74. package/dist/public/client.js.map +1 -0
  75. package/dist/public/index.d.ts +7 -0
  76. package/dist/public/index.d.ts.map +1 -0
  77. package/dist/public/index.js +17 -0
  78. package/dist/public/index.js.map +1 -0
  79. package/dist/public/scout-job-rows.d.ts +3 -0
  80. package/dist/public/scout-job-rows.d.ts.map +1 -0
  81. package/dist/public/scout-job-rows.js +10 -0
  82. package/dist/public/scout-job-rows.js.map +1 -0
  83. package/dist/public/scout-jobs.d.ts +3 -0
  84. package/dist/public/scout-jobs.d.ts.map +1 -0
  85. package/dist/public/scout-jobs.js +13 -0
  86. package/dist/public/scout-jobs.js.map +1 -0
  87. package/dist/scrapers/bayt/constant.d.ts +2 -0
  88. package/dist/scrapers/bayt/constant.d.ts.map +1 -0
  89. package/dist/scrapers/bayt/constant.js +5 -0
  90. package/dist/scrapers/bayt/constant.js.map +1 -0
  91. package/dist/scrapers/bayt/index.d.ts +13 -0
  92. package/dist/scrapers/bayt/index.d.ts.map +1 -0
  93. package/dist/scrapers/bayt/index.js +136 -0
  94. package/dist/scrapers/bayt/index.js.map +1 -0
  95. package/dist/scrapers/bayt/util.d.ts +4 -0
  96. package/dist/scrapers/bayt/util.d.ts.map +1 -0
  97. package/dist/scrapers/bayt/util.js +11 -0
  98. package/dist/scrapers/bayt/util.js.map +1 -0
  99. package/dist/scrapers/bdjobs/constant.d.ts +5 -0
  100. package/dist/scrapers/bdjobs/constant.d.ts.map +1 -0
  101. package/dist/scrapers/bdjobs/constant.js +22 -0
  102. package/dist/scrapers/bdjobs/constant.js.map +1 -0
  103. package/dist/scrapers/bdjobs/index.d.ts +15 -0
  104. package/dist/scrapers/bdjobs/index.d.ts.map +1 -0
  105. package/dist/scrapers/bdjobs/index.js +311 -0
  106. package/dist/scrapers/bdjobs/index.js.map +1 -0
  107. package/dist/scrapers/bdjobs/util.d.ts +8 -0
  108. package/dist/scrapers/bdjobs/util.d.ts.map +1 -0
  109. package/dist/scrapers/bdjobs/util.js +154 -0
  110. package/dist/scrapers/bdjobs/util.js.map +1 -0
  111. package/dist/scrapers/exception.d.ts +25 -0
  112. package/dist/scrapers/exception.d.ts.map +1 -0
  113. package/dist/scrapers/exception.js +60 -0
  114. package/dist/scrapers/exception.js.map +1 -0
  115. package/dist/scrapers/glassdoor/constant.d.ts +4 -0
  116. package/dist/scrapers/glassdoor/constant.d.ts.map +1 -0
  117. package/dist/scrapers/glassdoor/constant.js +188 -0
  118. package/dist/scrapers/glassdoor/constant.js.map +1 -0
  119. package/dist/scrapers/glassdoor/index.d.ts +14 -0
  120. package/dist/scrapers/glassdoor/index.d.ts.map +1 -0
  121. package/dist/scrapers/glassdoor/index.js +285 -0
  122. package/dist/scrapers/glassdoor/index.js.map +1 -0
  123. package/dist/scrapers/glassdoor/util.d.ts +15 -0
  124. package/dist/scrapers/glassdoor/util.d.ts.map +1 -0
  125. package/dist/scrapers/glassdoor/util.js +50 -0
  126. package/dist/scrapers/glassdoor/util.js.map +1 -0
  127. package/dist/scrapers/google/constant.d.ts +4 -0
  128. package/dist/scrapers/google/constant.d.ts.map +1 -0
  129. package/dist/scrapers/google/constant.js +54 -0
  130. package/dist/scrapers/google/constant.js.map +1 -0
  131. package/dist/scrapers/google/index.d.ts +14 -0
  132. package/dist/scrapers/google/index.d.ts.map +1 -0
  133. package/dist/scrapers/google/index.js +224 -0
  134. package/dist/scrapers/google/index.js.map +1 -0
  135. package/dist/scrapers/google/util.d.ts +4 -0
  136. package/dist/scrapers/google/util.d.ts.map +1 -0
  137. package/dist/scrapers/google/util.js +49 -0
  138. package/dist/scrapers/google/util.js.map +1 -0
  139. package/dist/scrapers/indeed/constant.d.ts +3 -0
  140. package/dist/scrapers/indeed/constant.d.ts.map +1 -0
  141. package/dist/scrapers/indeed/constant.js +112 -0
  142. package/dist/scrapers/indeed/constant.js.map +1 -0
  143. package/dist/scrapers/indeed/index.d.ts +11 -0
  144. package/dist/scrapers/indeed/index.d.ts.map +1 -0
  145. package/dist/scrapers/indeed/index.js +230 -0
  146. package/dist/scrapers/indeed/index.js.map +1 -0
  147. package/dist/scrapers/indeed/util.d.ts +43 -0
  148. package/dist/scrapers/indeed/util.d.ts.map +1 -0
  149. package/dist/scrapers/indeed/util.js +61 -0
  150. package/dist/scrapers/indeed/util.js.map +1 -0
  151. package/dist/scrapers/linkedin/constant.d.ts +2 -0
  152. package/dist/scrapers/linkedin/constant.d.ts.map +1 -0
  153. package/dist/scrapers/linkedin/constant.js +12 -0
  154. package/dist/scrapers/linkedin/constant.js.map +1 -0
  155. package/dist/scrapers/linkedin/enrichment/budget-controller.d.ts +22 -0
  156. package/dist/scrapers/linkedin/enrichment/budget-controller.d.ts.map +1 -0
  157. package/dist/scrapers/linkedin/enrichment/budget-controller.js +43 -0
  158. package/dist/scrapers/linkedin/enrichment/budget-controller.js.map +1 -0
  159. package/dist/scrapers/linkedin/enrichment/config.d.ts +4 -0
  160. package/dist/scrapers/linkedin/enrichment/config.d.ts.map +1 -0
  161. package/dist/scrapers/linkedin/enrichment/config.js +30 -0
  162. package/dist/scrapers/linkedin/enrichment/config.js.map +1 -0
  163. package/dist/scrapers/linkedin/enrichment/document-collector.d.ts +20 -0
  164. package/dist/scrapers/linkedin/enrichment/document-collector.d.ts.map +1 -0
  165. package/dist/scrapers/linkedin/enrichment/document-collector.js +126 -0
  166. package/dist/scrapers/linkedin/enrichment/document-collector.js.map +1 -0
  167. package/dist/scrapers/linkedin/enrichment/extractors.d.ts +4 -0
  168. package/dist/scrapers/linkedin/enrichment/extractors.d.ts.map +1 -0
  169. package/dist/scrapers/linkedin/enrichment/extractors.js +234 -0
  170. package/dist/scrapers/linkedin/enrichment/extractors.js.map +1 -0
  171. package/dist/scrapers/linkedin/enrichment/types.d.ts +20 -0
  172. package/dist/scrapers/linkedin/enrichment/types.d.ts.map +1 -0
  173. package/dist/scrapers/linkedin/enrichment/types.js +3 -0
  174. package/dist/scrapers/linkedin/enrichment/types.js.map +1 -0
  175. package/dist/scrapers/linkedin/index.d.ts +16 -0
  176. package/dist/scrapers/linkedin/index.d.ts.map +1 -0
  177. package/dist/scrapers/linkedin/index.js +432 -0
  178. package/dist/scrapers/linkedin/index.js.map +1 -0
  179. package/dist/scrapers/linkedin/util.d.ts +7 -0
  180. package/dist/scrapers/linkedin/util.d.ts.map +1 -0
  181. package/dist/scrapers/linkedin/util.js +106 -0
  182. package/dist/scrapers/linkedin/util.js.map +1 -0
  183. package/dist/scrapers/naukri/constant.d.ts +2 -0
  184. package/dist/scrapers/naukri/constant.d.ts.map +1 -0
  185. package/dist/scrapers/naukri/constant.js +15 -0
  186. package/dist/scrapers/naukri/constant.js.map +1 -0
  187. package/dist/scrapers/naukri/index.d.ts +16 -0
  188. package/dist/scrapers/naukri/index.d.ts.map +1 -0
  189. package/dist/scrapers/naukri/index.js +267 -0
  190. package/dist/scrapers/naukri/index.js.map +1 -0
  191. package/dist/scrapers/naukri/util.d.ts +5 -0
  192. package/dist/scrapers/naukri/util.d.ts.map +1 -0
  193. package/dist/scrapers/naukri/util.js +60 -0
  194. package/dist/scrapers/naukri/util.js.map +1 -0
  195. package/dist/scrapers/ziprecruiter/constant.d.ts +3 -0
  196. package/dist/scrapers/ziprecruiter/constant.d.ts.map +1 -0
  197. package/dist/scrapers/ziprecruiter/constant.js +32 -0
  198. package/dist/scrapers/ziprecruiter/constant.js.map +1 -0
  199. package/dist/scrapers/ziprecruiter/index.d.ts +16 -0
  200. package/dist/scrapers/ziprecruiter/index.d.ts.map +1 -0
  201. package/dist/scrapers/ziprecruiter/index.js +238 -0
  202. package/dist/scrapers/ziprecruiter/index.js.map +1 -0
  203. package/dist/scrapers/ziprecruiter/util.d.ts +4 -0
  204. package/dist/scrapers/ziprecruiter/util.d.ts.map +1 -0
  205. package/dist/scrapers/ziprecruiter/util.js +37 -0
  206. package/dist/scrapers/ziprecruiter/util.js.map +1 -0
  207. package/dist/sites/bayt-provider.d.ts +2 -0
  208. package/dist/sites/bayt-provider.d.ts.map +1 -0
  209. package/dist/sites/bayt-provider.js +8 -0
  210. package/dist/sites/bayt-provider.js.map +1 -0
  211. package/dist/sites/bdjobs-provider.d.ts +2 -0
  212. package/dist/sites/bdjobs-provider.d.ts.map +1 -0
  213. package/dist/sites/bdjobs-provider.js +8 -0
  214. package/dist/sites/bdjobs-provider.js.map +1 -0
  215. package/dist/sites/glassdoor-provider.d.ts +2 -0
  216. package/dist/sites/glassdoor-provider.d.ts.map +1 -0
  217. package/dist/sites/glassdoor-provider.js +8 -0
  218. package/dist/sites/glassdoor-provider.js.map +1 -0
  219. package/dist/sites/google-provider.d.ts +2 -0
  220. package/dist/sites/google-provider.d.ts.map +1 -0
  221. package/dist/sites/google-provider.js +8 -0
  222. package/dist/sites/google-provider.js.map +1 -0
  223. package/dist/sites/indeed-provider.d.ts +2 -0
  224. package/dist/sites/indeed-provider.d.ts.map +1 -0
  225. package/dist/sites/indeed-provider.js +8 -0
  226. package/dist/sites/indeed-provider.js.map +1 -0
  227. package/dist/sites/index.d.ts +3 -0
  228. package/dist/sites/index.d.ts.map +1 -0
  229. package/dist/sites/index.js +22 -0
  230. package/dist/sites/index.js.map +1 -0
  231. package/dist/sites/linkedin-provider.d.ts +2 -0
  232. package/dist/sites/linkedin-provider.d.ts.map +1 -0
  233. package/dist/sites/linkedin-provider.js +8 -0
  234. package/dist/sites/linkedin-provider.js.map +1 -0
  235. package/dist/sites/naukri-provider.d.ts +2 -0
  236. package/dist/sites/naukri-provider.d.ts.map +1 -0
  237. package/dist/sites/naukri-provider.js +8 -0
  238. package/dist/sites/naukri-provider.js.map +1 -0
  239. package/dist/sites/provider-factory.d.ts +6 -0
  240. package/dist/sites/provider-factory.d.ts.map +1 -0
  241. package/dist/sites/provider-factory.js +17 -0
  242. package/dist/sites/provider-factory.js.map +1 -0
  243. package/dist/sites/ziprecruiter-provider.d.ts +2 -0
  244. package/dist/sites/ziprecruiter-provider.d.ts.map +1 -0
  245. package/dist/sites/ziprecruiter-provider.js +8 -0
  246. package/dist/sites/ziprecruiter-provider.js.map +1 -0
  247. package/dist/util/format.d.ts +8 -0
  248. package/dist/util/format.d.ts.map +1 -0
  249. package/dist/util/format.js +87 -0
  250. package/dist/util/format.js.map +1 -0
  251. package/dist/util/http.d.ts +55 -0
  252. package/dist/util/http.d.ts.map +1 -0
  253. package/dist/util/http.js +306 -0
  254. package/dist/util/http.js.map +1 -0
  255. package/dist/util/logger.d.ts +10 -0
  256. package/dist/util/logger.d.ts.map +1 -0
  257. package/dist/util/logger.js +70 -0
  258. package/dist/util/logger.js.map +1 -0
  259. package/dist/util/normalize.d.ts +41 -0
  260. package/dist/util/normalize.d.ts.map +1 -0
  261. package/dist/util/normalize.js +95 -0
  262. package/dist/util/normalize.js.map +1 -0
  263. package/dist/util/salary.d.ts +18 -0
  264. package/dist/util/salary.d.ts.map +1 -0
  265. package/dist/util/salary.js +164 -0
  266. package/dist/util/salary.js.map +1 -0
  267. package/dist/util/site.d.ts +6 -0
  268. package/dist/util/site.d.ts.map +1 -0
  269. package/dist/util/site.js +41 -0
  270. package/dist/util/site.js.map +1 -0
  271. package/package.json +60 -39
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Jeheskiel Ventioky Sunloy
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 CHANGED
@@ -1,11 +1,11 @@
1
- # job-scout
1
+ # job-scout · ![npm version](https://img.shields.io/npm/v/job-scout)
2
2
 
3
- TypeScript-first job scraping library for LinkedIn, Indeed, ZipRecruiter, Glassdoor, Google Jobs, Bayt, Naukri, and BDJobs.
3
+ TypeScript-first job scraping library with stable support for LinkedIn, Indeed, Bayt, and Naukri, plus experimental support for ZipRecruiter, Glassdoor, Google Jobs, and BDJobs.
4
4
 
5
5
  ## Install
6
6
 
7
7
  ```bash
8
- bun add job-scout
8
+ npm install job-scout
9
9
  ```
10
10
 
11
11
  Node `>=20` is required.
@@ -17,21 +17,33 @@ import { scoutJobs } from 'job-scout'
17
17
 
18
18
  const jobs = await scoutJobs(
19
19
  {
20
- sites: ['indeed', 'linkedin', 'zipRecruiter', 'google'],
20
+ sites: ['indeed', 'linkedin', 'google'],
21
21
  query: 'software engineer',
22
- location: 'San Francisco, CA',
22
+ location: 'Ambon, Indonesia',
23
23
  pagination: { limitPerSite: 20 },
24
24
  filters: { postedWithinHours: 72 },
25
25
  google: {
26
- query: 'software engineer jobs near San Francisco, CA since yesterday',
26
+ query: 'software engineer jobs near Ambon, Indonesia since yesterday',
27
+ },
28
+ indeed: { country: 'indonesia' },
29
+ enrichment: { enabled: true, mode: 'low' },
30
+ linkedin: {
31
+ fetchDescription: true,
32
+ enrichment: {
33
+ fields: { emails: true, skills: true },
34
+ exposeMeta: true,
35
+ },
27
36
  },
28
- indeed: { country: 'usa' },
29
- linkedin: { fetchDescription: true },
30
37
  },
31
38
  {
32
39
  transport: {
33
40
  timeoutMs: 20_000,
34
41
  },
42
+ experimental: {
43
+ experimentalSites: {
44
+ google: true,
45
+ },
46
+ },
35
47
  logging: {
36
48
  level: 'warn',
37
49
  },
@@ -71,17 +83,31 @@ const jobs = await client.scoutJobs({
71
83
 
72
84
  `JobSearchRequest` supports:
73
85
 
74
- - `sites?: JobSite[]`
86
+ - `sites: JobSite[]` (required, non-empty)
87
+ - Stable by default: `indeed | linkedin | bayt | naukri`
88
+ - Experimental (opt-in required): `zipRecruiter | glassdoor | google | bdjobs`
75
89
  - `query?: string`
76
90
  - `location?: string`
77
91
  - `pagination?: { limitPerSite?: number; offset?: number }`
78
92
  - `filters?: { distanceMiles?: number; remote?: boolean; easyApply?: boolean; employmentType?: ...; postedWithinHours?: number }`
79
- - `linkedin?: { fetchDescription?: boolean; companyIds?: number[] }`
93
+ - `enrichment?: EnrichmentConfig`
94
+ - `linkedin?: { fetchDescription?: boolean; companyIds?: number[]; enrichment?: EnrichmentConfig }`
80
95
  - `indeed?: { country?: string }`
81
96
  - `google?: { query?: string }`
82
97
 
83
- Constraint rules enforced at runtime:
98
+ `EnrichmentConfig` supports:
99
+
100
+ - `enabled?: boolean` (default `false`)
101
+ - `mode?: 'off' | 'low' | 'medium' | 'high'`
102
+ - `budget?: { maxExtraRequestsPerJob?: number; maxPagesPerDomain?: number; requestTimeoutMs?: number }`
103
+ - `sources?: { jobDetailPage?: boolean; externalApplyPage?: boolean; companyPages?: boolean }`
104
+ - `fields?: { emails?: boolean; skills?: boolean; seniority?: boolean; companyWebsite?: boolean; workMode?: boolean; companySize?: boolean }`
105
+ - `exposeMeta?: boolean` (default `false`, adds `job.enrichmentMeta`)
106
+
107
+ Constraint rules are enforced at compile time (TypeScript) and runtime:
84
108
 
109
+ - Experimental sites must be explicitly enabled with
110
+ `config.experimental.experimentalSites.<site> = true`.
85
111
  - If `sites` includes `google`, `google.query` is required.
86
112
  - For Indeed, use only one filter group at a time:
87
113
  - `filters.postedWithinHours`
@@ -95,6 +121,7 @@ Constraint rules enforced at runtime:
95
121
 
96
122
  - `transport`: proxies, user agent, CA cert path, timeout
97
123
  - `performance`: global/site concurrency, retry policy, adaptive concurrency
124
+ - `experimental`: `{ experimentalSites: Record<Site, boolean> }` (partial overrides allowed; missing keys default to `false`)
98
125
  - `output`: description format, salary annualization, salary fallback behavior
99
126
  - `logging`: `error | warn | info | debug`
100
127
 
@@ -118,3 +145,25 @@ Full suite:
118
145
  ```bash
119
146
  bun run test:all
120
147
  ```
148
+
149
+ ## Release
150
+
151
+ This package is published through GitHub Actions using npm trusted publishing (OIDC).
152
+
153
+ ### Publish a new version
154
+
155
+ 1. Update the version in `package.json`.
156
+ 2. Commit and push the version change.
157
+ 3. Create and push a matching tag:
158
+
159
+ ```bash
160
+ git tag v<package-version>
161
+ git push origin v<package-version>
162
+ ```
163
+
164
+ The publish workflow verifies that `v<package-version>` exactly matches `package.json` and then runs:
165
+
166
+ - `bun run typecheck`
167
+ - `bun run test`
168
+ - `bun run build`
169
+ - `npm publish --provenance --access public`
@@ -0,0 +1,45 @@
1
+ import type { Country, DescriptionFormat, JobPost, ScraperInput, ScraperOptions, Site } from '../core/model';
2
+ import type { HttpClient, HttpClientConfig } from '../util/http';
3
+ import type { JobScoutConfig, JobSearchRequestForSites, JobSite } from '../domain/types';
4
+ export interface ResolvedJobScoutConfig {
5
+ raw: unknown;
6
+ experimental: {
7
+ experimentalSites: Record<JobSite, boolean>;
8
+ };
9
+ logging: {
10
+ level: 'error' | 'warn' | 'info' | 'debug';
11
+ };
12
+ transport: {
13
+ http: HttpClientConfig;
14
+ scraperOptions: ScraperOptions;
15
+ };
16
+ output: {
17
+ descriptionFormat: DescriptionFormat;
18
+ annualizeSalary: boolean;
19
+ salaryFallback: 'usOnly';
20
+ };
21
+ }
22
+ export interface CompiledSiteRequest {
23
+ site: Site;
24
+ scraperInput: ScraperInput;
25
+ scraperOptions: ScraperOptions;
26
+ }
27
+ export interface CompiledSearchRequest<Sites extends readonly JobSite[] = readonly JobSite[], C extends JobScoutConfig | undefined = undefined> {
28
+ request: JobSearchRequestForSites<Sites, C>;
29
+ config: ResolvedJobScoutConfig;
30
+ country: Country;
31
+ siteRequests: CompiledSiteRequest[];
32
+ }
33
+ export interface SearchContext {
34
+ transport: HttpClient;
35
+ config: ResolvedJobScoutConfig;
36
+ }
37
+ export interface SiteProvider {
38
+ readonly site: Site;
39
+ search(request: CompiledSiteRequest, context: SearchContext): Promise<JobPost[]>;
40
+ }
41
+ export interface SiteSearchResult {
42
+ site: Site;
43
+ jobs: JobPost[];
44
+ }
45
+ //# sourceMappingURL=contracts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../src/core/contracts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,OAAO,EACP,iBAAiB,EACjB,OAAO,EACP,YAAY,EACZ,cAAc,EACd,IAAI,EACJ,MAAM,cAAc,CAAA;AACrB,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAE/D,OAAO,KAAK,EAAE,cAAc,EAAE,wBAAwB,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAEvF,MAAM,WAAW,sBAAsB;IACtC,GAAG,EAAE,OAAO,CAAA;IACZ,YAAY,EAAE;QACb,iBAAiB,EAAE,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;KAC3C,CAAA;IACD,OAAO,EAAE;QACR,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;KAC1C,CAAA;IACD,SAAS,EAAE;QACV,IAAI,EAAE,gBAAgB,CAAA;QACtB,cAAc,EAAE,cAAc,CAAA;KAC9B,CAAA;IACD,MAAM,EAAE;QACP,iBAAiB,EAAE,iBAAiB,CAAA;QACpC,eAAe,EAAE,OAAO,CAAA;QACxB,cAAc,EAAE,QAAQ,CAAA;KACxB,CAAA;CACD;AAED,MAAM,WAAW,mBAAmB;IACnC,IAAI,EAAE,IAAI,CAAA;IACV,YAAY,EAAE,YAAY,CAAA;IAC1B,cAAc,EAAE,cAAc,CAAA;CAC9B;AAED,MAAM,WAAW,qBAAqB,CACrC,KAAK,SAAS,SAAS,OAAO,EAAE,GAAG,SAAS,OAAO,EAAE,EACrD,CAAC,SAAS,cAAc,GAAG,SAAS,GAAG,SAAS;IAEhD,OAAO,EAAE,wBAAwB,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;IAC3C,MAAM,EAAE,sBAAsB,CAAA;IAC9B,OAAO,EAAE,OAAO,CAAA;IAChB,YAAY,EAAE,mBAAmB,EAAE,CAAA;CACnC;AAED,MAAM,WAAW,aAAa;IAC7B,SAAS,EAAE,UAAU,CAAA;IACrB,MAAM,EAAE,sBAAsB,CAAA;CAC9B;AAED,MAAM,WAAW,YAAY;IAC5B,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAA;IACnB,MAAM,CACL,OAAO,EAAE,mBAAmB,EAC5B,OAAO,EAAE,aAAa,GACpB,OAAO,CAAC,OAAO,EAAE,CAAC,CAAA;CACrB;AAED,MAAM,WAAW,gBAAgB;IAChC,IAAI,EAAE,IAAI,CAAA;IACV,IAAI,EAAE,OAAO,EAAE,CAAA;CACf"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=contracts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contracts.js","sourceRoot":"","sources":["../../src/core/contracts.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import type { JobPost } from "../core/model";
2
+ import type { JobSite } from "../domain/types";
3
+ import type { CompiledSearchRequest, SiteProvider } from "../core/contracts";
4
+ export declare function executeSearch<const Sites extends readonly JobSite[]>(compiled: CompiledSearchRequest<Sites>, providers: SiteProvider[]): Promise<JobPost[]>;
5
+ //# sourceMappingURL=engine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../../src/core/engine.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAG5C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAoB,MAAM,kBAAkB,CAAC;AAc9F,wBAAsB,aAAa,CAAC,KAAK,CAAC,KAAK,SAAS,SAAS,OAAO,EAAE,EACxE,QAAQ,EAAE,qBAAqB,CAAC,KAAK,CAAC,EACtC,SAAS,EAAE,YAAY,EAAE,GACxB,OAAO,CAAC,OAAO,EAAE,CAAC,CAuCpB"}
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.executeSearch = executeSearch;
4
+ const logger_1 = require("../util/logger");
5
+ const transport_1 = require("../internal/http/transport");
6
+ const logging_1 = require("../internal/logging");
7
+ const errors_1 = require("../core/errors");
8
+ const result_pipeline_1 = require("../core/result-pipeline");
9
+ const log = (0, logger_1.createLogger)("engine");
10
+ function buildProviderMap(providers) {
11
+ const map = new Map();
12
+ for (const provider of providers) {
13
+ map.set(provider.site, provider);
14
+ }
15
+ return map;
16
+ }
17
+ async function executeSearch(compiled, providers) {
18
+ (0, logging_1.applyLogLevel)(compiled.config.logging.level);
19
+ const providerMap = buildProviderMap(providers);
20
+ const transport = (0, transport_1.createTransport)(compiled.config.transport.http);
21
+ try {
22
+ const results = await Promise.all(compiled.siteRequests.map(async (siteRequest) => {
23
+ const provider = providerMap.get(siteRequest.site);
24
+ if (!provider) {
25
+ throw new errors_1.SiteExecutionError(siteRequest.site, "No provider registered for site.");
26
+ }
27
+ try {
28
+ const jobs = await provider.search(siteRequest, {
29
+ transport,
30
+ config: compiled.config
31
+ });
32
+ log.info(`${siteRequest.site} finished scraping`);
33
+ return {
34
+ site: siteRequest.site,
35
+ jobs
36
+ };
37
+ }
38
+ catch (error) {
39
+ throw new errors_1.SiteExecutionError(siteRequest.site, "Site scrape failed.", error);
40
+ }
41
+ }));
42
+ return (0, result_pipeline_1.runResultPipeline)(results, {
43
+ country: compiled.country,
44
+ annualizeSalary: compiled.config.output.annualizeSalary,
45
+ salaryFallback: compiled.config.output.salaryFallback
46
+ });
47
+ }
48
+ finally {
49
+ await transport.close();
50
+ }
51
+ }
52
+ //# sourceMappingURL=engine.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"engine.js","sourceRoot":"","sources":["../../src/core/engine.ts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AAC,IAAI,CAAC,GAAG,WAAW,CAAC,IAAI,oBAAoB,CAAC,CAAC;gBAClD,OAAO;oBACL,IAAI,EAAE,WAAW,CAAC,IAAI;oBACtB,IAAI;iBACL,CAAC;YACJ,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,IAAI,2BAAkB,CAAC,WAAW,CAAC,IAAI,EAAE,qBAAqB,EAAE,KAAK,CAAC,CAAC;YAC/E,CAAC;QACH,CAAC,CAAC,CACH,CAAC;QAEF,OAAO,IAAA,mCAAiB,EAAC,OAAO,EAAE;YAChC,OAAO,EAAE,QAAQ,CAAC,OAAO;YACzB,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,eAAe;YACvD,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,cAAc;SACtD,CAAC,CAAC;IACL,CAAC;YAAS,CAAC;QACT,MAAM,SAAS,CAAC,KAAK,EAAE,CAAC;IAC1B,CAAC;AACH,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { Site } from '../core/model';
2
+ export declare class JobScoutError extends Error {
3
+ constructor(message: string);
4
+ }
5
+ export declare class JobScoutValidationError extends JobScoutError {
6
+ constructor(message: string);
7
+ }
8
+ export declare class SiteExecutionError extends JobScoutError {
9
+ readonly site: Site;
10
+ readonly rootCause?: unknown | undefined;
11
+ constructor(site: Site, message: string, rootCause?: unknown | undefined);
12
+ }
13
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/core/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAExC,qBAAa,aAAc,SAAQ,KAAK;gBAC3B,OAAO,EAAE,MAAM;CAI3B;AAED,qBAAa,uBAAwB,SAAQ,aAAa;gBAC7C,OAAO,EAAE,MAAM;CAI3B;AAED,qBAAa,kBAAmB,SAAQ,aAAa;aAEnC,IAAI,EAAE,IAAI;aAEV,SAAS,CAAC,EAAE,OAAO;gBAFnB,IAAI,EAAE,IAAI,EAC1B,OAAO,EAAE,MAAM,EACC,SAAS,CAAC,EAAE,OAAO,YAAA;CAKpC"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SiteExecutionError = exports.JobScoutValidationError = exports.JobScoutError = void 0;
4
+ class JobScoutError extends Error {
5
+ constructor(message) {
6
+ super(message);
7
+ this.name = 'JobScoutError';
8
+ }
9
+ }
10
+ exports.JobScoutError = JobScoutError;
11
+ class JobScoutValidationError extends JobScoutError {
12
+ constructor(message) {
13
+ super(message);
14
+ this.name = 'JobScoutValidationError';
15
+ }
16
+ }
17
+ exports.JobScoutValidationError = JobScoutValidationError;
18
+ class SiteExecutionError extends JobScoutError {
19
+ site;
20
+ rootCause;
21
+ constructor(site, message, rootCause) {
22
+ super(`[${site}] ${message}`);
23
+ this.site = site;
24
+ this.rootCause = rootCause;
25
+ this.name = 'SiteExecutionError';
26
+ }
27
+ }
28
+ exports.SiteExecutionError = SiteExecutionError;
29
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/core/errors.ts"],"names":[],"mappings":";;;AAEA,MAAa,aAAc,SAAQ,KAAK;IACvC,YAAY,OAAe;QAC1B,KAAK,CAAC,OAAO,CAAC,CAAA;QACd,IAAI,CAAC,IAAI,GAAG,eAAe,CAAA;IAC5B,CAAC;CACD;AALD,sCAKC;AAED,MAAa,uBAAwB,SAAQ,aAAa;IACzD,YAAY,OAAe;QAC1B,KAAK,CAAC,OAAO,CAAC,CAAA;QACd,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAA;IACtC,CAAC;CACD;AALD,0DAKC;AAED,MAAa,kBAAmB,SAAQ,aAAa;IAEnC;IAEA;IAHjB,YACiB,IAAU,EAC1B,OAAe,EACC,SAAmB;QAEnC,KAAK,CAAC,IAAI,IAAI,KAAK,OAAO,EAAE,CAAC,CAAA;QAJb,SAAI,GAAJ,IAAI,CAAM;QAEV,cAAS,GAAT,SAAS,CAAU;QAGnC,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAA;IACjC,CAAC;CACD;AATD,gDASC"}
@@ -0,0 +1,259 @@
1
+ import type { HttpClient, RetryPolicy } from "../util/http";
2
+ export declare enum JobType {
3
+ FULL_TIME = "fulltime",
4
+ PART_TIME = "parttime",
5
+ CONTRACT = "contract",
6
+ TEMPORARY = "temporary",
7
+ INTERNSHIP = "internship",
8
+ PER_DIEM = "perdiem",
9
+ NIGHTS = "nights",
10
+ OTHER = "other",
11
+ SUMMER = "summer",
12
+ VOLUNTEER = "volunteer"
13
+ }
14
+ export declare class Country {
15
+ readonly name: string;
16
+ private readonly spec;
17
+ private static readonly registry;
18
+ readonly aliases: string[];
19
+ private constructor();
20
+ get displayName(): string;
21
+ get indeedDomainValue(): [string, string];
22
+ get glassdoorDomainValue(): string;
23
+ getGlassdoorUrl(): string;
24
+ static fromString(countryStr: string): Country;
25
+ static values(): Country[];
26
+ static readonly ARGENTINA: Country;
27
+ static readonly AUSTRALIA: Country;
28
+ static readonly AUSTRIA: Country;
29
+ static readonly BAHRAIN: Country;
30
+ static readonly BANGLADESH: Country;
31
+ static readonly BELGIUM: Country;
32
+ static readonly BULGARIA: Country;
33
+ static readonly BRAZIL: Country;
34
+ static readonly CANADA: Country;
35
+ static readonly CHILE: Country;
36
+ static readonly CHINA: Country;
37
+ static readonly COLOMBIA: Country;
38
+ static readonly COSTARICA: Country;
39
+ static readonly CROATIA: Country;
40
+ static readonly CYPRUS: Country;
41
+ static readonly CZECHREPUBLIC: Country;
42
+ static readonly DENMARK: Country;
43
+ static readonly ECUADOR: Country;
44
+ static readonly EGYPT: Country;
45
+ static readonly ESTONIA: Country;
46
+ static readonly FINLAND: Country;
47
+ static readonly FRANCE: Country;
48
+ static readonly GERMANY: Country;
49
+ static readonly GREECE: Country;
50
+ static readonly HONGKONG: Country;
51
+ static readonly HUNGARY: Country;
52
+ static readonly INDIA: Country;
53
+ static readonly INDONESIA: Country;
54
+ static readonly IRELAND: Country;
55
+ static readonly ISRAEL: Country;
56
+ static readonly ITALY: Country;
57
+ static readonly JAPAN: Country;
58
+ static readonly KUWAIT: Country;
59
+ static readonly LATVIA: Country;
60
+ static readonly LITHUANIA: Country;
61
+ static readonly LUXEMBOURG: Country;
62
+ static readonly MALAYSIA: Country;
63
+ static readonly MALTA: Country;
64
+ static readonly MEXICO: Country;
65
+ static readonly MOROCCO: Country;
66
+ static readonly NETHERLANDS: Country;
67
+ static readonly NEWZEALAND: Country;
68
+ static readonly NIGERIA: Country;
69
+ static readonly NORWAY: Country;
70
+ static readonly OMAN: Country;
71
+ static readonly PAKISTAN: Country;
72
+ static readonly PANAMA: Country;
73
+ static readonly PERU: Country;
74
+ static readonly PHILIPPINES: Country;
75
+ static readonly POLAND: Country;
76
+ static readonly PORTUGAL: Country;
77
+ static readonly QATAR: Country;
78
+ static readonly ROMANIA: Country;
79
+ static readonly SAUDIARABIA: Country;
80
+ static readonly SINGAPORE: Country;
81
+ static readonly SLOVAKIA: Country;
82
+ static readonly SLOVENIA: Country;
83
+ static readonly SOUTHAFRICA: Country;
84
+ static readonly SOUTHKOREA: Country;
85
+ static readonly SPAIN: Country;
86
+ static readonly SWEDEN: Country;
87
+ static readonly SWITZERLAND: Country;
88
+ static readonly TAIWAN: Country;
89
+ static readonly THAILAND: Country;
90
+ static readonly TURKEY: Country;
91
+ static readonly UKRAINE: Country;
92
+ static readonly UNITEDARABEMIRATES: Country;
93
+ static readonly UK: Country;
94
+ static readonly USA: Country;
95
+ static readonly URUGUAY: Country;
96
+ static readonly VENEZUELA: Country;
97
+ static readonly VIETNAM: Country;
98
+ static readonly US_CANADA: Country;
99
+ static readonly WORLDWIDE: Country;
100
+ }
101
+ export declare class Location {
102
+ country: Country | string | null;
103
+ city: string | null;
104
+ state: string | null;
105
+ constructor(input?: {
106
+ country?: Country | string | null;
107
+ city?: string | null;
108
+ state?: string | null;
109
+ });
110
+ displayLocation(): string;
111
+ }
112
+ export declare enum CompensationInterval {
113
+ YEARLY = "yearly",
114
+ MONTHLY = "monthly",
115
+ WEEKLY = "weekly",
116
+ DAILY = "daily",
117
+ HOURLY = "hourly"
118
+ }
119
+ export declare function getCompensationInterval(payPeriod: string): CompensationInterval | null;
120
+ export interface Compensation {
121
+ interval?: CompensationInterval | null;
122
+ min_amount?: number | null;
123
+ max_amount?: number | null;
124
+ currency?: string | null;
125
+ }
126
+ export declare enum DescriptionFormat {
127
+ MARKDOWN = "markdown",
128
+ HTML = "html",
129
+ PLAIN = "plain"
130
+ }
131
+ export type EnrichmentMode = "off" | "low" | "medium" | "high";
132
+ export type EnrichmentConfidence = "high" | "medium" | "low";
133
+ export interface ResolvedEnrichmentConfig {
134
+ enabled: boolean;
135
+ mode: EnrichmentMode;
136
+ budget: {
137
+ maxExtraRequestsPerJob: number;
138
+ maxPagesPerDomain: number;
139
+ requestTimeoutMs: number;
140
+ };
141
+ sources: {
142
+ jobDetailPage: boolean;
143
+ externalApplyPage: boolean;
144
+ companyPages: boolean;
145
+ };
146
+ fields: {
147
+ emails: boolean;
148
+ skills: boolean;
149
+ seniority: boolean;
150
+ companyWebsite: boolean;
151
+ workMode: boolean;
152
+ companySize: boolean;
153
+ };
154
+ exposeMeta: boolean;
155
+ }
156
+ export interface EnrichmentMeta {
157
+ enabled: boolean;
158
+ sources_used: string[];
159
+ budget_used: {
160
+ requests: number;
161
+ domains: number;
162
+ pages: number;
163
+ exhausted: boolean;
164
+ };
165
+ field_confidence: Record<string, EnrichmentConfidence>;
166
+ }
167
+ export interface JobPost {
168
+ id?: string | null;
169
+ title: string;
170
+ company_name?: string | null;
171
+ job_url: string;
172
+ job_url_direct?: string | null;
173
+ location?: Location | null;
174
+ description?: string | null;
175
+ company_url?: string | null;
176
+ company_url_direct?: string | null;
177
+ job_type?: JobType[] | null;
178
+ compensation?: Compensation | null;
179
+ salary_source?: SalarySource | null;
180
+ date_posted?: Date | null;
181
+ emails?: string[] | null;
182
+ is_remote?: boolean | null;
183
+ listing_type?: string | null;
184
+ job_level?: string | null;
185
+ company_industry?: string | null;
186
+ company_addresses?: string | null;
187
+ company_num_employees?: string | null;
188
+ company_revenue?: string | null;
189
+ company_description?: string | null;
190
+ company_logo?: string | null;
191
+ banner_photo_url?: string | null;
192
+ job_function?: string | null;
193
+ skills?: string[] | null;
194
+ experience_range?: string | null;
195
+ company_rating?: number | null;
196
+ company_reviews_count?: number | null;
197
+ vacancy_count?: number | null;
198
+ work_from_home_type?: string | null;
199
+ enrichment_meta?: EnrichmentMeta;
200
+ site?: Site | null;
201
+ }
202
+ export interface JobResponse {
203
+ jobs: JobPost[];
204
+ }
205
+ export declare enum Site {
206
+ LINKEDIN = "linkedin",
207
+ INDEED = "indeed",
208
+ ZIP_RECRUITER = "zip_recruiter",
209
+ GLASSDOOR = "glassdoor",
210
+ GOOGLE = "google",
211
+ BAYT = "bayt",
212
+ NAUKRI = "naukri",
213
+ BDJOBS = "bdjobs"
214
+ }
215
+ export declare enum SalarySource {
216
+ DIRECT_DATA = "direct_data",
217
+ DESCRIPTION = "description"
218
+ }
219
+ export interface ScraperInput {
220
+ siteType: Site[];
221
+ searchTerm?: string | null;
222
+ googleSearchTerm?: string | null;
223
+ location?: string | null;
224
+ country?: Country;
225
+ distance?: number | null;
226
+ isRemote: boolean;
227
+ jobType?: JobType | null;
228
+ easyApply?: boolean | null;
229
+ offset: number;
230
+ linkedinFetchDescription: boolean;
231
+ linkedinCompanyIds?: number[] | null;
232
+ linkedinEnrichment: ResolvedEnrichmentConfig;
233
+ descriptionFormat: DescriptionFormat;
234
+ requestTimeout: number;
235
+ resultsWanted: number;
236
+ hoursOld?: number | null;
237
+ }
238
+ export interface ScrapeJobsPerformanceConfig {
239
+ maxConcurrencyPerSite?: Partial<Record<Site, number>>;
240
+ maxGlobalConcurrency?: number;
241
+ retryPolicy?: RetryPolicy;
242
+ requestTimeoutMs?: number;
243
+ enableAdaptiveConcurrency?: boolean;
244
+ }
245
+ export interface ScraperOptions {
246
+ proxies?: string[] | string | null;
247
+ caCert?: string | null;
248
+ userAgent?: string | null;
249
+ }
250
+ export declare abstract class Scraper {
251
+ readonly site: Site;
252
+ protected readonly http: HttpClient;
253
+ protected readonly options: ScraperOptions;
254
+ constructor(site: Site, http: HttpClient, options?: ScraperOptions);
255
+ abstract scrape(scraperInput: ScraperInput): Promise<JobResponse>;
256
+ }
257
+ export declare function getEnumFromJobType(jobTypeStr: string): JobType | null;
258
+ export declare function getJobTypeAliases(jobType: JobType): string[];
259
+ //# sourceMappingURL=model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/core/model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE3D,oBAAY,OAAO;IACjB,SAAS,aAAa;IACtB,SAAS,aAAa;IACtB,QAAQ,aAAa;IACrB,SAAS,cAAc;IACvB,UAAU,eAAe;IACzB,QAAQ,YAAY;IACpB,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,SAAS,cAAc;CACxB;AAuDD,qBAAa,OAAO;aAMA,IAAI,EAAE,MAAM;IAC5B,OAAO,CAAC,QAAQ,CAAC,IAAI;IANvB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAiB;IAEjD,SAAgB,OAAO,EAAE,MAAM,EAAE,CAAC;IAElC,OAAO;IAWP,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,IAAI,iBAAiB,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAMxC;IAED,IAAI,oBAAoB,IAAI,MAAM,CASjC;IAED,eAAe,IAAI,MAAM;IAIzB,MAAM,CAAC,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;IAa9C,MAAM,CAAC,MAAM,IAAI,OAAO,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