@sargonpiraev/hh-api-client 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.
@@ -0,0 +1,2 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+ export {};
@@ -0,0 +1,22 @@
1
+ export { client } from './generated/client.gen.js';
2
+ export { createClient } from './generated/client/index.js';
3
+ export type { Client, Options } from './generated/client/index.js';
4
+ export { getVacancies, getVacancy, getFavoriteVacancies, addVacancyToFavorite, deleteVacancyFromFavorite, getVacanciesSimilarToResume, applyToVacancy, } from './generated/index.js';
5
+ export { getDictionaries, getAreas, getIndustries, getLanguages, getSkills, getProfessionalRolesDictionary, getMetroStations, getMetroStationsInCity, } from './generated/index.js';
6
+ export { getCurrentUserInfo, editCurrentUserInfo, authorize, invalidateToken } from './generated/index.js';
7
+ export { getMineResumes, getResume, createResume, editResume, deleteResume, publishResume, searchForResumes, getResumeConditions, } from './generated/index.js';
8
+ export { getNegotiations, getNegotiationItem, getNegotiationMessages, sendNegotiationMessage, changeNegotiationAction, } from './generated/index.js';
9
+ export type { GetVacanciesData, GetVacanciesResponses, GetVacancyData, GetVacancyResponses, ApplyToVacancyData, ApplyToVacancyResponses, GetDictionariesResponses, GetAreasResponses, GetIndustriesResponses, GetLanguagesResponses, GetSkillsResponses, GetCurrentUserInfoResponses, AuthorizeData, AuthorizeResponses, GetMineResumesResponses, GetResumeData, GetResumeResponses, CreateResumeData, CreateResumeResponses, EditResumeData, EditResumeResponses, SearchForResumesData, SearchForResumesResponses, GetNegotiationsData, GetNegotiationsResponses, GetNegotiationItemData, GetNegotiationItemResponses, SendNegotiationMessageData, SendNegotiationMessageResponses, ChangeNegotiationActionData, ChangeNegotiationActionResponses, } from './generated/index.js';
10
+ export * from './generated/index.js';
11
+ /**
12
+ * Create a pre-configured HeadHunter API client
13
+ * @param config Configuration options
14
+ * @returns Configured client instance
15
+ */
16
+ export declare function createHeadHunterClient(config: {
17
+ userAgent: string;
18
+ accessToken?: string;
19
+ baseURL?: string;
20
+ }): import("./generated/client/types.js").Client;
21
+ export declare const HH_API_BASE_URL = "https://api.hh.ru";
22
+ export declare const HH_REQUIRED_USER_AGENT_FORMAT = "AppName/Version (contact@example.com)";
@@ -0,0 +1,37 @@
1
+ // HeadHunter API Client
2
+ // Re-exports from generated SDK with organized structure
3
+ // === Core Client & Configuration ===
4
+ export { client } from './generated/client.gen.js';
5
+ export { createClient } from './generated/client/index.js';
6
+ // === Most Used Functions ===
7
+ // Vacancy search and management
8
+ export { getVacancies, getVacancy, getFavoriteVacancies, addVacancyToFavorite, deleteVacancyFromFavorite, getVacanciesSimilarToResume, applyToVacancy, } from './generated/index.js';
9
+ // Dictionaries and references
10
+ export { getDictionaries, getAreas, getIndustries, getLanguages, getSkills, getProfessionalRolesDictionary, getMetroStations, getMetroStationsInCity, } from './generated/index.js';
11
+ // User and authentication
12
+ export { getCurrentUserInfo, editCurrentUserInfo, authorize, invalidateToken } from './generated/index.js';
13
+ // Resume management
14
+ export { getMineResumes, getResume, createResume, editResume, deleteResume, publishResume, searchForResumes, getResumeConditions, } from './generated/index.js';
15
+ // Negotiations
16
+ export { getNegotiations, getNegotiationItem, getNegotiationMessages, sendNegotiationMessage, changeNegotiationAction, } from './generated/index.js';
17
+ // === All Functions (for advanced usage) ===
18
+ export * from './generated/index.js';
19
+ // === Helper Configuration ===
20
+ import { createClient } from './generated/client/index.js';
21
+ /**
22
+ * Create a pre-configured HeadHunter API client
23
+ * @param config Configuration options
24
+ * @returns Configured client instance
25
+ */
26
+ export function createHeadHunterClient(config) {
27
+ return createClient({
28
+ baseUrl: config.baseURL || 'https://api.hh.ru',
29
+ headers: {
30
+ 'User-Agent': config.userAgent,
31
+ ...(config.accessToken && { Authorization: `Bearer ${config.accessToken}` }),
32
+ },
33
+ });
34
+ }
35
+ // === Constants ===
36
+ export const HH_API_BASE_URL = 'https://api.hh.ru';
37
+ export const HH_REQUIRED_USER_AGENT_FORMAT = 'AppName/Version (contact@example.com)';
package/package.json ADDED
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "@sargonpiraev/hh-api-client",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "main": "./build/index.js",
6
+ "types": "./build/generated/types.gen.ts",
7
+ "type": "module",
8
+ "files": [
9
+ "build"
10
+ ],
11
+ "scripts": {
12
+ "test": "jest --passWithNoTests --coverage",
13
+ "dev": "tsx watch ./src/index.ts",
14
+ "build": "tsc -p tsconfig.json",
15
+ "lint": "eslint ./src --ext .ts",
16
+ "lint:fix": "npm run lint -- --fix",
17
+ "format": "prettier --write .",
18
+ "format:check": "prettier --check .",
19
+ "prepare": "husky",
20
+ "commitlint": "commitlint --edit",
21
+ "typecheck": "tsc --noEmit",
22
+ "audit": "npm audit",
23
+ "openapi-ts": "npx @hey-api/openapi-ts",
24
+ "prebuild": "npm run openapi-ts"
25
+ },
26
+ "devDependencies": {
27
+ "@commitlint/cli": "^19.8.0",
28
+ "@commitlint/config-conventional": "^19.8.0",
29
+ "@eslint/js": "^9.26.0",
30
+ "@hey-api/openapi-ts": "^0.77.0",
31
+ "@semantic-release/gitlab": "^13.2.4",
32
+ "@types/jest": "^30.0.0",
33
+ "@types/node": "^22.15.33",
34
+ "eslint": "^9.26.0",
35
+ "globals": "^16.0.0",
36
+ "husky": "^9.1.7",
37
+ "jest": "^29.7.0",
38
+ "jest-junit": "^16.0.0",
39
+ "prettier": "^3.5.3",
40
+ "semantic-release": "^24.2.3",
41
+ "ts-jest": "^29.3.2",
42
+ "ts-node": "^10.9.2",
43
+ "tsx": "^4.19.4",
44
+ "typescript": "^5.8.3",
45
+ "typescript-eslint": "^8.31.1"
46
+ },
47
+ "publishConfig": {
48
+ "access": "public"
49
+ },
50
+ "dependencies": {
51
+ "@hey-api/client-axios": "^0.9.1",
52
+ "axios": "^1.10.0"
53
+ }
54
+ }