@sargonpiraev/hh-api-client 1.4.0 → 1.6.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/README.md +19 -3
- package/package.json +27 -26
package/README.md
CHANGED
|
@@ -42,7 +42,12 @@ Before installation, you'll need HeadHunter API credentials:
|
|
|
42
42
|
## Quick Start
|
|
43
43
|
|
|
44
44
|
```typescript
|
|
45
|
-
import {
|
|
45
|
+
import {
|
|
46
|
+
createHeadHunterClient,
|
|
47
|
+
getVacancies,
|
|
48
|
+
getAreas,
|
|
49
|
+
type GetVacanciesData,
|
|
50
|
+
} from '@sargonpiraev/hh-api-client'
|
|
46
51
|
|
|
47
52
|
// Create a configured client
|
|
48
53
|
const client = createHeadHunterClient({
|
|
@@ -127,7 +132,12 @@ await applyToVacancy({
|
|
|
127
132
|
### Work with Dictionaries
|
|
128
133
|
|
|
129
134
|
```typescript
|
|
130
|
-
import {
|
|
135
|
+
import {
|
|
136
|
+
getAreas,
|
|
137
|
+
getIndustries,
|
|
138
|
+
getSkills,
|
|
139
|
+
getProfessionalRolesDictionary,
|
|
140
|
+
} from '@sargonpiraev/hh-api-client'
|
|
131
141
|
|
|
132
142
|
// Get all areas (cities/regions)
|
|
133
143
|
const areas = await getAreas({ client })
|
|
@@ -234,7 +244,13 @@ import {
|
|
|
234
244
|
Full TypeScript support with generated types:
|
|
235
245
|
|
|
236
246
|
```typescript
|
|
237
|
-
import type {
|
|
247
|
+
import type {
|
|
248
|
+
GetVacanciesData,
|
|
249
|
+
GetVacanciesResponses,
|
|
250
|
+
Vacancy,
|
|
251
|
+
Area,
|
|
252
|
+
Industry,
|
|
253
|
+
} from '@sargonpiraev/hh-api-client'
|
|
238
254
|
|
|
239
255
|
const handleVacancy = (vacancy: Vacancy) => {
|
|
240
256
|
console.log(vacancy.name)
|
package/package.json
CHANGED
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sargonpiraev/hh-api-client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "A TypeScript client for the HeadHunter API, generated from the official OpenAPI specification.",
|
|
5
|
-
"main": "./build/index.js",
|
|
6
|
-
"types": "./build/index.d.ts",
|
|
7
|
-
"type": "module",
|
|
8
|
-
"files": [
|
|
9
|
-
"build",
|
|
10
|
-
"README.md",
|
|
11
|
-
"LICENSE"
|
|
12
|
-
],
|
|
13
5
|
"keywords": [
|
|
14
6
|
"api-client",
|
|
15
7
|
"typescript",
|
|
@@ -20,33 +12,35 @@
|
|
|
20
12
|
"job-search",
|
|
21
13
|
"recruiting"
|
|
22
14
|
],
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
"
|
|
15
|
+
"homepage": "https://github.com/sargonpiraev/shared/tree/main/packages/hh-api-client#readme",
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/sargonpiraev/shared/issues"
|
|
26
18
|
},
|
|
27
|
-
"license": "MIT",
|
|
28
19
|
"repository": {
|
|
29
20
|
"type": "git",
|
|
30
21
|
"url": "git+https://github.com/sargonpiraev/shared.git",
|
|
31
22
|
"directory": "packages/hh-api-client"
|
|
32
23
|
},
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
"engines": {
|
|
38
|
-
"node": ">=18.0.0"
|
|
24
|
+
"license": "MIT",
|
|
25
|
+
"author": {
|
|
26
|
+
"name": "Sargon Piraev",
|
|
27
|
+
"email": "sargonpiraev@gmail.com"
|
|
39
28
|
},
|
|
29
|
+
"type": "module",
|
|
30
|
+
"main": "./build/index.js",
|
|
31
|
+
"types": "./build/index.d.ts",
|
|
32
|
+
"files": [
|
|
33
|
+
"build",
|
|
34
|
+
"README.md",
|
|
35
|
+
"LICENSE"
|
|
36
|
+
],
|
|
40
37
|
"scripts": {
|
|
41
|
-
"generate": "openapi-ts",
|
|
42
38
|
"build": "tsc -p tsconfig.json",
|
|
43
39
|
"check-types": "tsc -p tsconfig.json --noEmit",
|
|
40
|
+
"generate": "openapi-ts",
|
|
44
41
|
"lint": "eslint ./src --ext .ts",
|
|
45
|
-
"test": "jest --passWithNoTests --coverage"
|
|
46
|
-
|
|
47
|
-
"publishConfig": {
|
|
48
|
-
"access": "public",
|
|
49
|
-
"provenance": true
|
|
42
|
+
"test": "jest --passWithNoTests --coverage",
|
|
43
|
+
"test:unit": "jest --passWithNoTests --coverage"
|
|
50
44
|
},
|
|
51
45
|
"dependencies": {
|
|
52
46
|
"@hey-api/client-axios": "^0.9.1",
|
|
@@ -55,6 +49,13 @@
|
|
|
55
49
|
"devDependencies": {
|
|
56
50
|
"@hey-api/openapi-ts": "^0.77.0",
|
|
57
51
|
"@types/node": "^22.15.33",
|
|
58
|
-
"typescript": "
|
|
52
|
+
"typescript": "5.9.2"
|
|
53
|
+
},
|
|
54
|
+
"engines": {
|
|
55
|
+
"node": ">=18.0.0"
|
|
56
|
+
},
|
|
57
|
+
"publishConfig": {
|
|
58
|
+
"access": "public",
|
|
59
|
+
"provenance": true
|
|
59
60
|
}
|
|
60
61
|
}
|