@sharpapi/sharpapi-node-job-positions-database 1.0.0 → 1.0.2

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 CHANGED
@@ -7,7 +7,7 @@
7
7
  [![npm version](https://img.shields.io/npm/v/@sharpapi/sharpapi-node-job-positions-database.svg)](https://www.npmjs.com/package/@sharpapi/sharpapi-node-job-positions-database)
8
8
  [![License](https://img.shields.io/npm/l/@sharpapi/sharpapi-node-job-positions-database.svg)](https://github.com/sharpapi/sharpapi-node-client/blob/master/LICENSE.md)
9
9
 
10
- **SharpAPI Job Positions Database** provides access to a comprehensive database of professional job positions with categories, industries, levels, and related positions. Perfect for HR applications, job boards, and career platforms.
10
+ **SharpAPI Job Positions Database** provides access to a comprehensive database of job positions with detailed information about roles, responsibilities, and requirements. Perfect for HR tech applications and career platforms.
11
11
 
12
12
  ---
13
13
 
@@ -18,7 +18,10 @@
18
18
  3. [Usage](#usage)
19
19
  4. [API Documentation](#api-documentation)
20
20
  5. [Examples](#examples)
21
- 6. [License](#license)
21
+ 6. [Use Cases](#use-cases)
22
+ 7. [API Endpoint](#api-endpoint)
23
+ 8. [Related Packages](#related-packages)
24
+ 9. [License](#license)
22
25
 
23
26
  ---
24
27
 
@@ -48,30 +51,26 @@ Visit [SharpAPI.com](https://sharpapi.com/) to get your API key.
48
51
  ```javascript
49
52
  const { SharpApiJobPositionsDatabaseService } = require('@sharpapi/sharpapi-node-job-positions-database');
50
53
 
51
- const apiKey = process.env.SHARP_API_KEY;
54
+ const apiKey = process.env.SHARP_API_KEY; // Store your API key in environment variables
52
55
  const service = new SharpApiJobPositionsDatabaseService(apiKey);
53
56
 
54
- async function browseJobPositions() {
57
+ const text = 'Your content here...';
58
+
59
+ async function processText() {
55
60
  try {
56
- // Get list of all job positions
57
- const positions = await service.getJobPositionsList();
58
- console.log(`Found ${positions.length} job positions`);
59
-
60
- // Search for specific positions
61
- const results = await service.searchJobPositions('Software Engineer', {
62
- limit: 10,
63
- level: 'senior'
64
- });
65
-
66
- results.forEach(position => {
67
- console.log(`${position.title} - ${position.category}`);
68
- });
61
+ // Submit processing job
62
+ const statusUrl = await service.processContent(text);
63
+ console.log('Job submitted. Status URL:', statusUrl);
64
+
65
+ // Fetch results (polls automatically until complete)
66
+ const result = await service.fetchResults(statusUrl);
67
+ console.log('Result:', result.getResultJson());
69
68
  } catch (error) {
70
69
  console.error('Error:', error.message);
71
70
  }
72
71
  }
73
72
 
74
- browseJobPositions();
73
+ processText();
75
74
  ```
76
75
 
77
76
  ---
@@ -80,100 +79,43 @@ browseJobPositions();
80
79
 
81
80
  ### Methods
82
81
 
83
- #### `getJobPositionsList(): Promise<object>`
84
- Get complete list of all available job positions.
85
-
86
- #### `getJobPositionDetails(uuid: string): Promise<object>`
87
- Get detailed information about a specific job position.
88
-
89
- #### `searchJobPositions(query: string, options?:object): Promise<object>`
90
- Search job positions by title or keyword with filters.
91
-
92
- **Options:**
93
- - `limit` (number): Maximum results
94
- - `offset` (number): Pagination offset
95
- - `category` (string): Filter by category
96
- - `industry` (string): Filter by industry
97
- - `level` (string): Filter by job level
98
-
99
- #### `getJobCategories(): Promise<object>`
100
- Get all job categories.
82
+ This utility provides synchronous data access. Refer to the [Postman Documentation](https://documenter.getpostman.com/view/31106842/2sBXVeGsVm) for query parameters and response format.
101
83
 
102
- #### `getIndustries(): Promise<object>`
103
- Get all industries.
84
+ ### Response Format
104
85
 
105
- #### `getJobLevels(): Promise<object>`
106
- Get all job levels.
107
-
108
- #### `getRelatedJobPositions(jobPositionId: string, options?: object): Promise<object>`
109
- Get related job positions.
110
-
111
- #### `validateJobPosition(jobPositionTitle: string): Promise<object>`
112
- Validate if a job position exists.
113
-
114
- #### `getRecommendedSkills(jobPositionId: string, options?: object): Promise<object>`
115
- Get recommended skills for a job position.
86
+ Returns JSON data immediately (synchronous operation).
116
87
 
117
88
  ---
118
89
 
119
90
  ## Examples
120
91
 
121
- ### Job Board Integration
92
+ ### Basic Example
122
93
 
123
94
  ```javascript
124
- const service = new SharpApiJobPositionsDatabaseService(process.env.SHARP_API_KEY);
125
-
126
- async function buildJobFilters() {
127
- const [categories, industries, levels] = await Promise.all([
128
- service.getJobCategories(),
129
- service.getIndustries(),
130
- service.getJobLevels()
131
- ]);
132
-
133
- return {
134
- categories: categories.map(c => ({ id: c.id, name: c.name })),
135
- industries: industries.map(i => ({ id: i.id, name: i.name })),
136
- levels: levels.map(l => ({ id: l.id, name: l.name }))
137
- };
138
- }
139
-
140
- const filters = await buildJobFilters();
141
- console.log('Available Filters:', filters);
142
- ```
143
-
144
- ### Career Path Recommendations
95
+ const { SharpApiJobPositionsDatabaseService } = require('@sharpapi/sharpapi-node-job-positions-database');
145
96
 
146
- ```javascript
147
97
  const service = new SharpApiJobPositionsDatabaseService(process.env.SHARP_API_KEY);
148
98
 
149
- async function suggestCareerPath(currentPosition) {
150
- const related = await service.getRelatedJobPositions(currentPosition, {
151
- limit: 5
152
- });
153
-
154
- console.log('Career Path Suggestions:');
155
- related.forEach((position, index) => {
156
- console.log(`${index + 1}. ${position.title}`);
157
- console.log(` Similarity: ${position.weight}/10`);
158
- console.log(` Category: ${position.category}`);
159
- });
99
+ // Customize polling behavior if needed
100
+ service.setApiJobStatusPollingInterval(10); // Poll every 10 seconds
101
+ service.setApiJobStatusPollingWait(180); // Wait up to 3 minutes
160
102
 
161
- return related;
162
- }
163
-
164
- await suggestCareerPath('software-engineer-id');
103
+ // Use the service
104
+ // ... (implementation depends on specific service)
165
105
  ```
166
106
 
107
+ For more examples, visit the [Product Page](https://sharpapi.com/en/catalog/utility/job-positions-api).
108
+
167
109
  ---
168
110
 
169
111
  ## Use Cases
170
112
 
171
- - **Job Boards**: Standardized job position listings
172
- - **ATS Systems**: Job position validation
173
- - **Career Platforms**: Career path recommendations
174
- - **HR Applications**: Position database and management
175
- - **Recruitment Tools**: Position categorization
176
- - **Skills Mapping**: Position-to-skills relationships
113
+ - **Job Boards**: Populate job listings with standardized position data
114
+ - **Career Planning**: Help users explore career options
115
+ - **HR Systems**: Integrate standardized job titles and descriptions
116
+ - **Recruitment Tools**: Enable consistent job position naming
117
+ - **Talent Management**: Structure organizational roles and hierarchies
118
+ - **Skills Mapping**: Link positions to required skills and qualifications
177
119
 
178
120
  ---
179
121
 
@@ -182,15 +124,16 @@ await suggestCareerPath('software-engineer-id');
182
124
  **GET** `/utilities/job_positions_list`
183
125
 
184
126
  For detailed API specifications, refer to:
185
- - [Postman Documentation](https://documenter.getpostman.com/view/31106842/2sBXVeGsW5)
127
+ - [Postman Documentation](https://documenter.getpostman.com/view/31106842/2sBXVeGsVm)
186
128
  - [Product Page](https://sharpapi.com/en/catalog/utility/job-positions-api)
187
129
 
188
130
  ---
189
131
 
190
132
  ## Related Packages
191
133
 
192
- - [@sharpapi/sharpapi-node-related-job-positions](https://www.npmjs.com/package/@sharpapi/sharpapi-node-related-job-positions) - AI-powered related positions
193
- - [@sharpapi/sharpapi-node-skills-database](https://www.npmjs.com/package/@sharpapi/sharpapi-node-skills-database) - Skills database
134
+ - [@sharpapi/sharpapi-node-related-job-positions](https://www.npmjs.com/package/@sharpapi/sharpapi-node-related-job-positions)
135
+ - [@sharpapi/sharpapi-node-job-description](https://www.npmjs.com/package/@sharpapi/sharpapi-node-job-description)
136
+ - [@sharpapi/sharpapi-node-skills-database](https://www.npmjs.com/package/@sharpapi/sharpapi-node-skills-database)
194
137
  - [@sharpapi/sharpapi-node-client](https://www.npmjs.com/package/@sharpapi/sharpapi-node-client) - Full SharpAPI SDK
195
138
 
196
139
  ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sharpapi/sharpapi-node-job-positions-database",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "SharpAPI.com Node.js SDK for Job Positions Database API",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -21,7 +21,7 @@
21
21
  "author": "Dawid Makowski <contact@sharpapi.com>",
22
22
  "license": "MIT",
23
23
  "dependencies": {
24
- "@sharpapi/sharpapi-node-core": "file:../sharpapi-node-core"
24
+ "@sharpapi/sharpapi-node-core": "^1.0.0"
25
25
  },
26
26
  "devDependencies": {
27
27
  "jest": "^29.7.0"
@@ -0,0 +1,7 @@
1
+ <claude-mem-context>
2
+ # Recent Activity
3
+
4
+ <!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
5
+
6
+ *No recent activity*
7
+ </claude-mem-context>
package/src/CLAUDE.md ADDED
@@ -0,0 +1,7 @@
1
+ <claude-mem-context>
2
+ # Recent Activity
3
+
4
+ <!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->
5
+
6
+ *No recent activity*
7
+ </claude-mem-context>
@@ -2,170 +2,55 @@ const { SharpApiCoreService } = require('@sharpapi/sharpapi-node-core');
2
2
 
3
3
  /**
4
4
  * Service for accessing Job Positions Database API using SharpAPI.com
5
+ *
6
+ * Provides access to a comprehensive database of job positions with detailed information.
7
+ * All endpoints are synchronous and return immediate responses.
5
8
  */
6
9
  class SharpApiJobPositionsDatabaseService extends SharpApiCoreService {
7
10
  /**
8
- * Get list of all available job positions
9
- *
10
- * @returns {Promise<object>} - List of job positions
11
- */
12
- async getJobPositionsList() {
13
- const response = await this.makeRequest('GET', '/utilities/job_positions_list');
14
- return response.data;
15
- }
16
-
17
- /**
18
- * Get detailed information about a specific job position by UUID
19
- *
20
- * @param {string} uuid - The UUID of the job position
21
- * @returns {Promise<object>} - Job position information
22
- */
23
- async getJobPositionDetails(uuid) {
24
- const response = await this.makeRequest('GET', `/utilities/job_positions_details/${uuid}`);
25
- return response.data;
26
- }
27
-
28
- /**
29
- * Get information about a specific job position by ID (alias for getJobPositionDetails)
30
- *
31
- * @param {string} jobPositionId - The ID of the job position
32
- * @returns {Promise<object>} - Job position information
33
- */
34
- async getJobPositionById(jobPositionId) {
35
- return this.getJobPositionDetails(jobPositionId);
36
- }
37
-
38
- /**
39
- * Search for job positions by title or keyword
40
- *
41
- * @param {string} query - The search query
42
- * @param {object} [options] - Additional options for search
43
- * @param {number} [options.limit=20] - Maximum number of results to return
44
- * @param {number} [options.offset=0] - Number of results to skip
45
- * @param {string} [options.category] - Filter by job category
46
- * @param {string} [options.industry] - Filter by industry
47
- * @param {string} [options.level] - Filter by job level (entry, mid, senior, etc.)
48
- * @returns {Promise<object>} - Search results
49
- */
50
- async searchJobPositions(query, options = {}) {
51
- const data = { query, ...options };
52
- const response = await this.makeRequest('GET', '/utility/job-positions/search', data);
53
- return response.data;
54
- }
55
-
56
- /**
57
- * Get all job categories
58
- *
59
- * @returns {Promise<object>} - List of job categories
60
- */
61
- async getJobCategories() {
62
- const response = await this.makeRequest('GET', '/utility/job-positions/categories');
63
- return response.data;
64
- }
65
-
66
- /**
67
- * Get all industries
68
- *
69
- * @returns {Promise<object>} - List of industries
11
+ * Creates a new SharpApiJobPositionsDatabaseService instance
12
+ * @param {string} apiKey - Your SharpAPI API key
13
+ * @param {string} [apiBaseUrl='https://sharpapi.com/api/v1'] - API base URL
70
14
  */
71
- async getIndustries() {
72
- const response = await this.makeRequest('GET', '/utility/job-positions/industries');
73
- return response.data;
15
+ constructor(apiKey, apiBaseUrl = 'https://sharpapi.com/api/v1') {
16
+ super(apiKey, apiBaseUrl, '@sharpapi/sharpapi-node-job-positions-database/1.0.2');
74
17
  }
75
18
 
76
19
  /**
77
- * Get all job levels
20
+ * Get list of all available job positions (synchronous endpoint)
78
21
  *
79
- * @returns {Promise<object>} - List of job levels
80
- */
81
- async getJobLevels() {
82
- const response = await this.makeRequest('GET', '/utility/job-positions/levels');
83
- return response.data;
84
- }
85
-
86
- /**
87
- * Get related job positions for a specific job position
22
+ * Retrieves a paginated list of job positions with optional filtering.
88
23
  *
89
- * @param {string} jobPositionId - The ID of the job position
90
- * @param {object} [options] - Additional options
91
- * @param {number} [options.limit=10] - Maximum number of related job positions to return
92
- * @returns {Promise<object>} - Related job positions
93
- */
94
- async getRelatedJobPositions(jobPositionId, options = {}) {
95
- const data = { ...options };
96
- const response = await this.makeRequest('GET', `/utility/job-positions/${jobPositionId}/related`, data);
97
- return response.data;
98
- }
99
-
100
- /**
101
- * Get job positions by category
24
+ * @param {object} [options={}] - Query options
25
+ * @param {number} [options.per_page] - Items per page (default 10, min 0, max 100)
26
+ * @param {boolean} [options.include_related] - Include related job positions with weights
27
+ * @param {string} [options.name] - Filter by job position name
28
+ * @returns {Promise<object>} - Paginated list of job positions with data, links, and meta
102
29
  *
103
- * @param {string} categoryId - The ID of the category
104
- * @param {object} [options] - Additional options
105
- * @param {number} [options.limit=20] - Maximum number of job positions to return
106
- * @param {number} [options.offset=0] - Number of job positions to skip
107
- * @returns {Promise<object>} - Job positions in the category
30
+ * @example
31
+ * const positions = await service.getJobPositionsList({ per_page: 50, name: 'Developer' });
32
+ * console.log('Total positions:', positions.meta.total);
33
+ * positions.data.forEach(pos => console.log(pos.name));
108
34
  */
109
- async getJobPositionsByCategory(categoryId, options = {}) {
110
- const data = { ...options };
111
- const response = await this.makeRequest('GET', `/utility/job-positions/category/${categoryId}`, data);
112
- return response.data;
35
+ async getJobPositionsList(options = {}) {
36
+ const response = await this.makeRequest('GET', '/utilities/job_positions_list', options);
37
+ return response;
113
38
  }
114
39
 
115
40
  /**
116
- * Get job positions by industry
41
+ * Get detailed information about a specific job position by UUID (synchronous endpoint)
117
42
  *
118
- * @param {string} industryId - The ID of the industry
119
- * @param {object} [options] - Additional options
120
- * @param {number} [options.limit=20] - Maximum number of job positions to return
121
- * @param {number} [options.offset=0] - Number of job positions to skip
122
- * @returns {Promise<object>} - Job positions in the industry
123
- */
124
- async getJobPositionsByIndustry(industryId, options = {}) {
125
- const data = { ...options };
126
- const response = await this.makeRequest('GET', `/utility/job-positions/industry/${industryId}`, data);
127
- return response.data;
128
- }
129
-
130
- /**
131
- * Get job positions by level
132
- *
133
- * @param {string} levelId - The ID of the level
134
- * @param {object} [options] - Additional options
135
- * @param {number} [options.limit=20] - Maximum number of job positions to return
136
- * @param {number} [options.offset=0] - Number of job positions to skip
137
- * @returns {Promise<object>} - Job positions at the level
138
- */
139
- async getJobPositionsByLevel(levelId, options = {}) {
140
- const data = { ...options };
141
- const response = await this.makeRequest('GET', `/utility/job-positions/level/${levelId}`, data);
142
- return response.data;
143
- }
144
-
145
- /**
146
- * Validate if a job position exists in the database
147
- *
148
- * @param {string} jobPositionTitle - The title of the job position to validate
149
- * @returns {Promise<object>} - Validation result
150
- */
151
- async validateJobPosition(jobPositionTitle) {
152
- const data = { job_position: jobPositionTitle };
153
- const response = await this.makeRequest('POST', '/utility/job-positions/validate', data);
154
- return response.data;
155
- }
156
-
157
- /**
158
- * Get recommended skills for a job position
43
+ * @param {string} uuid - The UUID of the job position
44
+ * @returns {Promise<object>} - Detailed job position information including name, description, related positions, etc.
159
45
  *
160
- * @param {string} jobPositionId - The ID of the job position
161
- * @param {object} [options] - Additional options
162
- * @param {number} [options.limit=20] - Maximum number of skills to return
163
- * @returns {Promise<object>} - Recommended skills
46
+ * @example
47
+ * const position = await service.getJobPositionDetails('1ef266de-5a6c-67d6-86a1-06bb2780ed98');
48
+ * console.log('Position:', position.name);
49
+ * console.log('Description:', position.description);
164
50
  */
165
- async getRecommendedSkills(jobPositionId, options = {}) {
166
- const data = { ...options };
167
- const response = await this.makeRequest('GET', `/utility/job-positions/${jobPositionId}/skills`, data);
168
- return response.data;
51
+ async getJobPositionDetails(uuid) {
52
+ const response = await this.makeRequest('GET', `/utilities/job_positions_details/${uuid}`);
53
+ return response;
169
54
  }
170
55
  }
171
56