@sharpapi/sharpapi-node-job-positions-database 1.0.1 → 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.1",
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": {
@@ -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,6 +2,9 @@ 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
  /**
@@ -10,171 +13,44 @@ class SharpApiJobPositionsDatabaseService extends SharpApiCoreService {
10
13
  * @param {string} [apiBaseUrl='https://sharpapi.com/api/v1'] - API base URL
11
14
  */
12
15
  constructor(apiKey, apiBaseUrl = 'https://sharpapi.com/api/v1') {
13
- super(apiKey, apiBaseUrl, '@sharpapi/sharpapi-node-job-positions-database/1.0.1');
16
+ super(apiKey, apiBaseUrl, '@sharpapi/sharpapi-node-job-positions-database/1.0.2');
14
17
  }
15
18
 
16
19
  /**
17
- * Get list of all available job positions
20
+ * Get list of all available job positions (synchronous endpoint)
18
21
  *
19
- * @returns {Promise<object>} - List of job positions
20
- */
21
- async getJobPositionsList() {
22
- const response = await this.makeRequest('GET', '/utilities/job_positions_list');
23
- return response.data;
24
- }
25
-
26
- /**
27
- * Get detailed information about a specific job position by UUID
28
- *
29
- * @param {string} uuid - The UUID of the job position
30
- * @returns {Promise<object>} - Job position information
31
- */
32
- async getJobPositionDetails(uuid) {
33
- const response = await this.makeRequest('GET', `/utilities/job_positions_details/${uuid}`);
34
- return response.data;
35
- }
36
-
37
- /**
38
- * Get information about a specific job position by ID (alias for getJobPositionDetails)
39
- *
40
- * @param {string} jobPositionId - The ID of the job position
41
- * @returns {Promise<object>} - Job position information
42
- */
43
- async getJobPositionById(jobPositionId) {
44
- return this.getJobPositionDetails(jobPositionId);
45
- }
46
-
47
- /**
48
- * Search for job positions by title or keyword
49
- *
50
- * @param {string} query - The search query
51
- * @param {object} [options] - Additional options for search
52
- * @param {number} [options.limit=20] - Maximum number of results to return
53
- * @param {number} [options.offset=0] - Number of results to skip
54
- * @param {string} [options.category] - Filter by job category
55
- * @param {string} [options.industry] - Filter by industry
56
- * @param {string} [options.level] - Filter by job level (entry, mid, senior, etc.)
57
- * @returns {Promise<object>} - Search results
58
- */
59
- async searchJobPositions(query, options = {}) {
60
- const data = { query, ...options };
61
- const response = await this.makeRequest('GET', '/utility/job-positions/search', data);
62
- return response.data;
63
- }
64
-
65
- /**
66
- * Get all job categories
67
- *
68
- * @returns {Promise<object>} - List of job categories
69
- */
70
- async getJobCategories() {
71
- const response = await this.makeRequest('GET', '/utility/job-positions/categories');
72
- return response.data;
73
- }
74
-
75
- /**
76
- * Get all industries
77
- *
78
- * @returns {Promise<object>} - List of industries
79
- */
80
- async getIndustries() {
81
- const response = await this.makeRequest('GET', '/utility/job-positions/industries');
82
- return response.data;
83
- }
84
-
85
- /**
86
- * Get all job levels
22
+ * Retrieves a paginated list of job positions with optional filtering.
87
23
  *
88
- * @returns {Promise<object>} - List of job levels
89
- */
90
- async getJobLevels() {
91
- const response = await this.makeRequest('GET', '/utility/job-positions/levels');
92
- return response.data;
93
- }
94
-
95
- /**
96
- * Get related job positions for a specific job position
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
97
29
  *
98
- * @param {string} jobPositionId - The ID of the job position
99
- * @param {object} [options] - Additional options
100
- * @param {number} [options.limit=10] - Maximum number of related job positions to return
101
- * @returns {Promise<object>} - Related job positions
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));
102
34
  */
103
- async getRelatedJobPositions(jobPositionId, options = {}) {
104
- const data = { ...options };
105
- const response = await this.makeRequest('GET', `/utility/job-positions/${jobPositionId}/related`, data);
106
- return response.data;
35
+ async getJobPositionsList(options = {}) {
36
+ const response = await this.makeRequest('GET', '/utilities/job_positions_list', options);
37
+ return response;
107
38
  }
108
39
 
109
40
  /**
110
- * Get job positions by category
41
+ * Get detailed information about a specific job position by UUID (synchronous endpoint)
111
42
  *
112
- * @param {string} categoryId - The ID of the category
113
- * @param {object} [options] - Additional options
114
- * @param {number} [options.limit=20] - Maximum number of job positions to return
115
- * @param {number} [options.offset=0] - Number of job positions to skip
116
- * @returns {Promise<object>} - Job positions in the category
117
- */
118
- async getJobPositionsByCategory(categoryId, options = {}) {
119
- const data = { ...options };
120
- const response = await this.makeRequest('GET', `/utility/job-positions/category/${categoryId}`, data);
121
- return response.data;
122
- }
123
-
124
- /**
125
- * Get job positions by industry
126
- *
127
- * @param {string} industryId - The ID of the industry
128
- * @param {object} [options] - Additional options
129
- * @param {number} [options.limit=20] - Maximum number of job positions to return
130
- * @param {number} [options.offset=0] - Number of job positions to skip
131
- * @returns {Promise<object>} - Job positions in the industry
132
- */
133
- async getJobPositionsByIndustry(industryId, options = {}) {
134
- const data = { ...options };
135
- const response = await this.makeRequest('GET', `/utility/job-positions/industry/${industryId}`, data);
136
- return response.data;
137
- }
138
-
139
- /**
140
- * Get job positions by level
141
- *
142
- * @param {string} levelId - The ID of the level
143
- * @param {object} [options] - Additional options
144
- * @param {number} [options.limit=20] - Maximum number of job positions to return
145
- * @param {number} [options.offset=0] - Number of job positions to skip
146
- * @returns {Promise<object>} - Job positions at the level
147
- */
148
- async getJobPositionsByLevel(levelId, options = {}) {
149
- const data = { ...options };
150
- const response = await this.makeRequest('GET', `/utility/job-positions/level/${levelId}`, data);
151
- return response.data;
152
- }
153
-
154
- /**
155
- * Validate if a job position exists in the database
156
- *
157
- * @param {string} jobPositionTitle - The title of the job position to validate
158
- * @returns {Promise<object>} - Validation result
159
- */
160
- async validateJobPosition(jobPositionTitle) {
161
- const data = { job_position: jobPositionTitle };
162
- const response = await this.makeRequest('POST', '/utility/job-positions/validate', data);
163
- return response.data;
164
- }
165
-
166
- /**
167
- * 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.
168
45
  *
169
- * @param {string} jobPositionId - The ID of the job position
170
- * @param {object} [options] - Additional options
171
- * @param {number} [options.limit=20] - Maximum number of skills to return
172
- * @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);
173
50
  */
174
- async getRecommendedSkills(jobPositionId, options = {}) {
175
- const data = { ...options };
176
- const response = await this.makeRequest('GET', `/utility/job-positions/${jobPositionId}/skills`, data);
177
- return response.data;
51
+ async getJobPositionDetails(uuid) {
52
+ const response = await this.makeRequest('GET', `/utilities/job_positions_details/${uuid}`);
53
+ return response;
178
54
  }
179
55
  }
180
56