@sargonpiraev/hh-mcp-server 1.18.0 → 1.19.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/build/main.js +1 -64
- package/build/server.js +835 -167
- package/package.json +1 -1
package/build/server.js
CHANGED
|
@@ -60,9 +60,13 @@ function handleError(error) {
|
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
62
|
// Register tools
|
|
63
|
-
mcpServer.tool('confirm-phone-in-resume', `Verify phone with a code`, {}, async (args) => {
|
|
63
|
+
mcpServer.tool('confirm-phone-in-resume', `Verify phone with a code`, {}, async (args, extra) => {
|
|
64
64
|
try {
|
|
65
|
+
// Extract authorization token from HTTP request headers
|
|
66
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
67
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
65
68
|
const response = await apiClient.request({
|
|
69
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
66
70
|
method: 'POST',
|
|
67
71
|
url: '/resume_phone_confirm',
|
|
68
72
|
data: args,
|
|
@@ -76,11 +80,15 @@ mcpServer.tool('confirm-phone-in-resume', `Verify phone with a code`, {}, async
|
|
|
76
80
|
mcpServer.tool('get-manager-settings', `Manager preferences`, {
|
|
77
81
|
employer_id: z.string(),
|
|
78
82
|
manager_id: z.string(),
|
|
79
|
-
}, async (args) => {
|
|
83
|
+
}, async (args, extra) => {
|
|
80
84
|
try {
|
|
81
85
|
const { employer_id, manager_id, ...queryParams } = args;
|
|
82
86
|
const url = `/employers/${employer_id}/managers/${manager_id}/settings`;
|
|
87
|
+
// Extract authorization token from HTTP request headers
|
|
88
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
89
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
83
90
|
const response = await apiClient.request({
|
|
91
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
84
92
|
method: 'GET',
|
|
85
93
|
url: url,
|
|
86
94
|
params: queryParams,
|
|
@@ -94,11 +102,15 @@ mcpServer.tool('get-manager-settings', `Manager preferences`, {
|
|
|
94
102
|
mcpServer.tool('get-employer-manager-limits', `Daily limit of resume views for current manager`, {
|
|
95
103
|
employer_id: z.string(),
|
|
96
104
|
manager_id: z.string(),
|
|
97
|
-
}, async (args) => {
|
|
105
|
+
}, async (args, extra) => {
|
|
98
106
|
try {
|
|
99
107
|
const { employer_id, manager_id, ...queryParams } = args;
|
|
100
108
|
const url = `/employers/${employer_id}/managers/${manager_id}/limits/resume`;
|
|
109
|
+
// Extract authorization token from HTTP request headers
|
|
110
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
111
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
101
112
|
const response = await apiClient.request({
|
|
113
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
102
114
|
method: 'GET',
|
|
103
115
|
url: url,
|
|
104
116
|
params: queryParams,
|
|
@@ -116,11 +128,15 @@ mcpServer.tool('get-employer-addresses', `Directory of employer's addresses
|
|
|
116
128
|
with_manager: z.string().optional(),
|
|
117
129
|
per_page: z.string().optional(),
|
|
118
130
|
page: z.string().optional(),
|
|
119
|
-
}, async (args) => {
|
|
131
|
+
}, async (args, extra) => {
|
|
120
132
|
try {
|
|
121
133
|
const { employer_id, ...queryParams } = args;
|
|
122
134
|
const url = `/employers/${employer_id}/addresses`;
|
|
135
|
+
// Extract authorization token from HTTP request headers
|
|
136
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
137
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
123
138
|
const response = await apiClient.request({
|
|
139
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
124
140
|
method: 'GET',
|
|
125
141
|
url: url,
|
|
126
142
|
params: queryParams,
|
|
@@ -136,11 +152,15 @@ mcpServer.tool('get-employer-managers', `Directory of employer's managers`,
|
|
|
136
152
|
page: z.string().optional(),
|
|
137
153
|
per_page: z.string().optional(),
|
|
138
154
|
search_text: z.string().optional(),
|
|
139
|
-
}, async (args) => {
|
|
155
|
+
}, async (args, extra) => {
|
|
140
156
|
try {
|
|
141
157
|
const { employer_id, ...queryParams } = args;
|
|
142
158
|
const url = `/employers/${employer_id}/managers`;
|
|
159
|
+
// Extract authorization token from HTTP request headers
|
|
160
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
161
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
143
162
|
const response = await apiClient.request({
|
|
163
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
144
164
|
method: 'GET',
|
|
145
165
|
url: url,
|
|
146
166
|
params: queryParams,
|
|
@@ -153,11 +173,15 @@ mcpServer.tool('get-employer-managers', `Directory of employer's managers`,
|
|
|
153
173
|
});
|
|
154
174
|
mcpServer.tool('add-employer-manager', `Adding a manager`, {
|
|
155
175
|
employer_id: z.string(),
|
|
156
|
-
}, async (args) => {
|
|
176
|
+
}, async (args, extra) => {
|
|
157
177
|
try {
|
|
158
178
|
const { employer_id, ...requestData } = args;
|
|
159
179
|
const url = `/employers/${employer_id}/managers`;
|
|
180
|
+
// Extract authorization token from HTTP request headers
|
|
181
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
182
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
160
183
|
const response = await apiClient.request({
|
|
184
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
161
185
|
method: 'POST',
|
|
162
186
|
url: url,
|
|
163
187
|
data: requestData,
|
|
@@ -170,11 +194,15 @@ mcpServer.tool('add-employer-manager', `Adding a manager`, {
|
|
|
170
194
|
});
|
|
171
195
|
mcpServer.tool('get-employer-manager-types', `Directory of manager types and privileges`, {
|
|
172
196
|
employer_id: z.string(),
|
|
173
|
-
}, async (args) => {
|
|
197
|
+
}, async (args, extra) => {
|
|
174
198
|
try {
|
|
175
199
|
const { employer_id, ...queryParams } = args;
|
|
176
200
|
const url = `/employers/${employer_id}/manager_types`;
|
|
201
|
+
// Extract authorization token from HTTP request headers
|
|
202
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
203
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
177
204
|
const response = await apiClient.request({
|
|
205
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
178
206
|
method: 'GET',
|
|
179
207
|
url: url,
|
|
180
208
|
params: queryParams,
|
|
@@ -185,9 +213,13 @@ mcpServer.tool('get-employer-manager-types', `Directory of manager types and pri
|
|
|
185
213
|
return handleError(error);
|
|
186
214
|
}
|
|
187
215
|
});
|
|
188
|
-
mcpServer.tool('get-manager-accounts', `Manager's work accounts`, {}, async (args) => {
|
|
216
|
+
mcpServer.tool('get-manager-accounts', `Manager's work accounts`, {}, async (args, extra) => {
|
|
189
217
|
try {
|
|
218
|
+
// Extract authorization token from HTTP request headers
|
|
219
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
220
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
190
221
|
const response = await apiClient.request({
|
|
222
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
191
223
|
method: 'GET',
|
|
192
224
|
url: '/manager_accounts/mine',
|
|
193
225
|
params: args,
|
|
@@ -200,9 +232,13 @@ mcpServer.tool('get-manager-accounts', `Manager's work accounts`, {}, async
|
|
|
200
232
|
});
|
|
201
233
|
mcpServer.tool('get-applicant-phone-info', `Get information about the applicant's phone number`, {
|
|
202
234
|
phone: z.string(),
|
|
203
|
-
}, async (args) => {
|
|
235
|
+
}, async (args, extra) => {
|
|
204
236
|
try {
|
|
237
|
+
// Extract authorization token from HTTP request headers
|
|
238
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
239
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
205
240
|
const response = await apiClient.request({
|
|
241
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
206
242
|
method: 'GET',
|
|
207
243
|
url: '/resume_should_send_sms',
|
|
208
244
|
params: args,
|
|
@@ -217,11 +253,15 @@ mcpServer.tool('get-address', `Get address by ID`, {
|
|
|
217
253
|
employer_id: z.string(),
|
|
218
254
|
address_id: z.string(),
|
|
219
255
|
with_manager: z.string().optional(),
|
|
220
|
-
}, async (args) => {
|
|
256
|
+
}, async (args, extra) => {
|
|
221
257
|
try {
|
|
222
258
|
const { employer_id, address_id, ...queryParams } = args;
|
|
223
259
|
const url = `/employers/${employer_id}/addresses/${address_id}`;
|
|
260
|
+
// Extract authorization token from HTTP request headers
|
|
261
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
262
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
224
263
|
const response = await apiClient.request({
|
|
264
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
225
265
|
method: 'GET',
|
|
226
266
|
url: url,
|
|
227
267
|
params: queryParams,
|
|
@@ -235,11 +275,15 @@ mcpServer.tool('get-address', `Get address by ID`, {
|
|
|
235
275
|
mcpServer.tool('edit-employer-manager', `Editing a manager`, {
|
|
236
276
|
employer_id: z.string(),
|
|
237
277
|
manager_id: z.string(),
|
|
238
|
-
}, async (args) => {
|
|
278
|
+
}, async (args, extra) => {
|
|
239
279
|
try {
|
|
240
280
|
const { employer_id, manager_id, ...requestData } = args;
|
|
241
281
|
const url = `/employers/${employer_id}/managers/${manager_id}`;
|
|
282
|
+
// Extract authorization token from HTTP request headers
|
|
283
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
284
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
242
285
|
const response = await apiClient.request({
|
|
286
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
243
287
|
method: 'PUT',
|
|
244
288
|
url: url,
|
|
245
289
|
data: requestData,
|
|
@@ -253,11 +297,15 @@ mcpServer.tool('edit-employer-manager', `Editing a manager`, {
|
|
|
253
297
|
mcpServer.tool('get-employer-manager', `Getting information about a manager`, {
|
|
254
298
|
employer_id: z.string(),
|
|
255
299
|
manager_id: z.string(),
|
|
256
|
-
}, async (args) => {
|
|
300
|
+
}, async (args, extra) => {
|
|
257
301
|
try {
|
|
258
302
|
const { employer_id, manager_id, ...queryParams } = args;
|
|
259
303
|
const url = `/employers/${employer_id}/managers/${manager_id}`;
|
|
304
|
+
// Extract authorization token from HTTP request headers
|
|
305
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
306
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
260
307
|
const response = await apiClient.request({
|
|
308
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
261
309
|
method: 'GET',
|
|
262
310
|
url: url,
|
|
263
311
|
params: queryParams,
|
|
@@ -272,11 +320,15 @@ mcpServer.tool('delete-employer-manager', `Deleting a manager`, {
|
|
|
272
320
|
employer_id: z.string(),
|
|
273
321
|
manager_id: z.string(),
|
|
274
322
|
successor_id: z.string(),
|
|
275
|
-
}, async (args) => {
|
|
323
|
+
}, async (args, extra) => {
|
|
276
324
|
try {
|
|
277
325
|
const { employer_id, manager_id, ...queryParams } = args;
|
|
278
326
|
const url = `/employers/${employer_id}/managers/${manager_id}`;
|
|
327
|
+
// Extract authorization token from HTTP request headers
|
|
328
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
329
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
279
330
|
const response = await apiClient.request({
|
|
331
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
280
332
|
method: 'DELETE',
|
|
281
333
|
url: url,
|
|
282
334
|
params: queryParams,
|
|
@@ -287,9 +339,13 @@ mcpServer.tool('delete-employer-manager', `Deleting a manager`, {
|
|
|
287
339
|
return handleError(error);
|
|
288
340
|
}
|
|
289
341
|
});
|
|
290
|
-
mcpServer.tool('send-code-for-verify-phone-in-resume', `Send verification code to the phone number on CV`, {}, async (args) => {
|
|
342
|
+
mcpServer.tool('send-code-for-verify-phone-in-resume', `Send verification code to the phone number on CV`, {}, async (args, extra) => {
|
|
291
343
|
try {
|
|
344
|
+
// Extract authorization token from HTTP request headers
|
|
345
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
346
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
292
347
|
const response = await apiClient.request({
|
|
348
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
293
349
|
method: 'POST',
|
|
294
350
|
url: '/resume_phone_generate_code',
|
|
295
351
|
data: args,
|
|
@@ -300,9 +356,13 @@ mcpServer.tool('send-code-for-verify-phone-in-resume', `Send verification code t
|
|
|
300
356
|
return handleError(error);
|
|
301
357
|
}
|
|
302
358
|
});
|
|
303
|
-
mcpServer.tool('authorize', `Getting an access-token`, {}, async (args) => {
|
|
359
|
+
mcpServer.tool('authorize', `Getting an access-token`, {}, async (args, extra) => {
|
|
304
360
|
try {
|
|
361
|
+
// Extract authorization token from HTTP request headers
|
|
362
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
363
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
305
364
|
const response = await apiClient.request({
|
|
365
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
306
366
|
method: 'POST',
|
|
307
367
|
url: '/oauth/token',
|
|
308
368
|
data: args,
|
|
@@ -313,9 +373,13 @@ mcpServer.tool('authorize', `Getting an access-token`, {}, async (args) => {
|
|
|
313
373
|
return handleError(error);
|
|
314
374
|
}
|
|
315
375
|
});
|
|
316
|
-
mcpServer.tool('invalidate-token', `Access token invalidation`, {}, async (args) => {
|
|
376
|
+
mcpServer.tool('invalidate-token', `Access token invalidation`, {}, async (args, extra) => {
|
|
317
377
|
try {
|
|
378
|
+
// Extract authorization token from HTTP request headers
|
|
379
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
380
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
318
381
|
const response = await apiClient.request({
|
|
382
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
319
383
|
method: 'DELETE',
|
|
320
384
|
url: '/oauth/token',
|
|
321
385
|
params: args,
|
|
@@ -326,9 +390,13 @@ mcpServer.tool('invalidate-token', `Access token invalidation`, {}, async (args)
|
|
|
326
390
|
return handleError(error);
|
|
327
391
|
}
|
|
328
392
|
});
|
|
329
|
-
mcpServer.tool('get-current-user-info', `Info on current authorized user`, {}, async (args) => {
|
|
393
|
+
mcpServer.tool('get-current-user-info', `Info on current authorized user`, {}, async (args, extra) => {
|
|
330
394
|
try {
|
|
395
|
+
// Extract authorization token from HTTP request headers
|
|
396
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
397
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
331
398
|
const response = await apiClient.request({
|
|
399
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
332
400
|
method: 'GET',
|
|
333
401
|
url: '/me',
|
|
334
402
|
params: args,
|
|
@@ -339,9 +407,13 @@ mcpServer.tool('get-current-user-info', `Info on current authorized user`, {}, a
|
|
|
339
407
|
return handleError(error);
|
|
340
408
|
}
|
|
341
409
|
});
|
|
342
|
-
mcpServer.tool('edit-current-user-info', `Editing information on the authorized user`, {}, async (args) => {
|
|
410
|
+
mcpServer.tool('edit-current-user-info', `Editing information on the authorized user`, {}, async (args, extra) => {
|
|
343
411
|
try {
|
|
412
|
+
// Extract authorization token from HTTP request headers
|
|
413
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
414
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
344
415
|
const response = await apiClient.request({
|
|
416
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
345
417
|
method: 'POST',
|
|
346
418
|
url: '/me',
|
|
347
419
|
data: args,
|
|
@@ -352,9 +424,13 @@ mcpServer.tool('edit-current-user-info', `Editing information on the authorized
|
|
|
352
424
|
return handleError(error);
|
|
353
425
|
}
|
|
354
426
|
});
|
|
355
|
-
mcpServer.tool('get-locales-for-resume', `The list of available resume locales`, {}, async (args) => {
|
|
427
|
+
mcpServer.tool('get-locales-for-resume', `The list of available resume locales`, {}, async (args, extra) => {
|
|
356
428
|
try {
|
|
429
|
+
// Extract authorization token from HTTP request headers
|
|
430
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
431
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
357
432
|
const response = await apiClient.request({
|
|
433
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
358
434
|
method: 'GET',
|
|
359
435
|
url: '/locales/resume',
|
|
360
436
|
params: args,
|
|
@@ -365,9 +441,13 @@ mcpServer.tool('get-locales-for-resume', `The list of available resume locales`,
|
|
|
365
441
|
return handleError(error);
|
|
366
442
|
}
|
|
367
443
|
});
|
|
368
|
-
mcpServer.tool('get-locales', `The list of available locales`, {}, async (args) => {
|
|
444
|
+
mcpServer.tool('get-locales', `The list of available locales`, {}, async (args, extra) => {
|
|
369
445
|
try {
|
|
446
|
+
// Extract authorization token from HTTP request headers
|
|
447
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
448
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
370
449
|
const response = await apiClient.request({
|
|
450
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
371
451
|
method: 'GET',
|
|
372
452
|
url: '/locales',
|
|
373
453
|
params: args,
|
|
@@ -380,9 +460,13 @@ mcpServer.tool('get-locales', `The list of available locales`, {}, async (args)
|
|
|
380
460
|
});
|
|
381
461
|
mcpServer.tool('get-positions-suggestions', `Resume position suggestions`, {
|
|
382
462
|
text: z.string(),
|
|
383
|
-
}, async (args) => {
|
|
463
|
+
}, async (args, extra) => {
|
|
384
464
|
try {
|
|
465
|
+
// Extract authorization token from HTTP request headers
|
|
466
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
467
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
385
468
|
const response = await apiClient.request({
|
|
469
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
386
470
|
method: 'GET',
|
|
387
471
|
url: '/suggests/positions',
|
|
388
472
|
params: args,
|
|
@@ -395,9 +479,13 @@ mcpServer.tool('get-positions-suggestions', `Resume position suggestions`, {
|
|
|
395
479
|
});
|
|
396
480
|
mcpServer.tool('get-educational-institutions-suggests', `Educational institution name suggestions`, {
|
|
397
481
|
text: z.string(),
|
|
398
|
-
}, async (args) => {
|
|
482
|
+
}, async (args, extra) => {
|
|
399
483
|
try {
|
|
484
|
+
// Extract authorization token from HTTP request headers
|
|
485
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
486
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
400
487
|
const response = await apiClient.request({
|
|
488
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
401
489
|
method: 'GET',
|
|
402
490
|
url: '/suggests/educational_institutions',
|
|
403
491
|
params: args,
|
|
@@ -411,9 +499,13 @@ mcpServer.tool('get-educational-institutions-suggests', `Educational institution
|
|
|
411
499
|
mcpServer.tool('get-area-leaves-suggests', `Suggestions for all regions that are leaves in the region tree`, {
|
|
412
500
|
text: z.string(),
|
|
413
501
|
area_id: z.string().optional(),
|
|
414
|
-
}, async (args) => {
|
|
502
|
+
}, async (args, extra) => {
|
|
415
503
|
try {
|
|
504
|
+
// Extract authorization token from HTTP request headers
|
|
505
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
506
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
416
507
|
const response = await apiClient.request({
|
|
508
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
417
509
|
method: 'GET',
|
|
418
510
|
url: '/suggests/area_leaves',
|
|
419
511
|
params: args,
|
|
@@ -426,9 +518,13 @@ mcpServer.tool('get-area-leaves-suggests', `Suggestions for all regions that are
|
|
|
426
518
|
});
|
|
427
519
|
mcpServer.tool('get-skill-set-suggests', `Key skills suggestions`, {
|
|
428
520
|
text: z.string(),
|
|
429
|
-
}, async (args) => {
|
|
521
|
+
}, async (args, extra) => {
|
|
430
522
|
try {
|
|
523
|
+
// Extract authorization token from HTTP request headers
|
|
524
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
525
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
431
526
|
const response = await apiClient.request({
|
|
527
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
432
528
|
method: 'GET',
|
|
433
529
|
url: '/suggests/skill_set',
|
|
434
530
|
params: args,
|
|
@@ -441,9 +537,13 @@ mcpServer.tool('get-skill-set-suggests', `Key skills suggestions`, {
|
|
|
441
537
|
});
|
|
442
538
|
mcpServer.tool('get-vacancy-positions-suggests', `Vacancy position suggestions`, {
|
|
443
539
|
text: z.string(),
|
|
444
|
-
}, async (args) => {
|
|
540
|
+
}, async (args, extra) => {
|
|
445
541
|
try {
|
|
542
|
+
// Extract authorization token from HTTP request headers
|
|
543
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
544
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
446
545
|
const response = await apiClient.request({
|
|
546
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
447
547
|
method: 'GET',
|
|
448
548
|
url: '/suggests/vacancy_positions',
|
|
449
549
|
params: args,
|
|
@@ -456,9 +556,13 @@ mcpServer.tool('get-vacancy-positions-suggests', `Vacancy position suggestions`,
|
|
|
456
556
|
});
|
|
457
557
|
mcpServer.tool('get-professional-roles-suggests', `Professional role suggestions`, {
|
|
458
558
|
text: z.string(),
|
|
459
|
-
}, async (args) => {
|
|
559
|
+
}, async (args, extra) => {
|
|
460
560
|
try {
|
|
561
|
+
// Extract authorization token from HTTP request headers
|
|
562
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
563
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
461
564
|
const response = await apiClient.request({
|
|
565
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
462
566
|
method: 'GET',
|
|
463
567
|
url: '/suggests/professional_roles',
|
|
464
568
|
params: args,
|
|
@@ -471,9 +575,13 @@ mcpServer.tool('get-professional-roles-suggests', `Professional role suggestions
|
|
|
471
575
|
});
|
|
472
576
|
mcpServer.tool('get-resume-search-keywords-suggests', `Suggestions for resume search key words`, {
|
|
473
577
|
text: z.string(),
|
|
474
|
-
}, async (args) => {
|
|
578
|
+
}, async (args, extra) => {
|
|
475
579
|
try {
|
|
580
|
+
// Extract authorization token from HTTP request headers
|
|
581
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
582
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
476
583
|
const response = await apiClient.request({
|
|
584
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
477
585
|
method: 'GET',
|
|
478
586
|
url: '/suggests/resume_search_keyword',
|
|
479
587
|
params: args,
|
|
@@ -488,9 +596,13 @@ mcpServer.tool('get-areas-suggests', `Suggestions for all regions`, {
|
|
|
488
596
|
text: z.string(),
|
|
489
597
|
area_id: z.string().optional(),
|
|
490
598
|
include_parent: z.string().optional(),
|
|
491
|
-
}, async (args) => {
|
|
599
|
+
}, async (args, extra) => {
|
|
492
600
|
try {
|
|
601
|
+
// Extract authorization token from HTTP request headers
|
|
602
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
603
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
493
604
|
const response = await apiClient.request({
|
|
605
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
494
606
|
method: 'GET',
|
|
495
607
|
url: '/suggests/areas',
|
|
496
608
|
params: args,
|
|
@@ -503,9 +615,13 @@ mcpServer.tool('get-areas-suggests', `Suggestions for all regions`, {
|
|
|
503
615
|
});
|
|
504
616
|
mcpServer.tool('get-vacancy-search-keywords', `Suggestions for vacancy search key words`, {
|
|
505
617
|
text: z.string(),
|
|
506
|
-
}, async (args) => {
|
|
618
|
+
}, async (args, extra) => {
|
|
507
619
|
try {
|
|
620
|
+
// Extract authorization token from HTTP request headers
|
|
621
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
622
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
508
623
|
const response = await apiClient.request({
|
|
624
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
509
625
|
method: 'GET',
|
|
510
626
|
url: '/suggests/vacancy_search_keyword',
|
|
511
627
|
params: args,
|
|
@@ -518,9 +634,13 @@ mcpServer.tool('get-vacancy-search-keywords', `Suggestions for vacancy search ke
|
|
|
518
634
|
});
|
|
519
635
|
mcpServer.tool('get-fields-of-study-suggestions', `Specialization suggestions`, {
|
|
520
636
|
text: z.string(),
|
|
521
|
-
}, async (args) => {
|
|
637
|
+
}, async (args, extra) => {
|
|
522
638
|
try {
|
|
639
|
+
// Extract authorization token from HTTP request headers
|
|
640
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
641
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
523
642
|
const response = await apiClient.request({
|
|
643
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
524
644
|
method: 'GET',
|
|
525
645
|
url: '/suggests/fields_of_study',
|
|
526
646
|
params: args,
|
|
@@ -533,9 +653,13 @@ mcpServer.tool('get-fields-of-study-suggestions', `Specialization suggestions`,
|
|
|
533
653
|
});
|
|
534
654
|
mcpServer.tool('get-registered-companies-suggests', `Organization suggestions`, {
|
|
535
655
|
text: z.string(),
|
|
536
|
-
}, async (args) => {
|
|
656
|
+
}, async (args, extra) => {
|
|
537
657
|
try {
|
|
658
|
+
// Extract authorization token from HTTP request headers
|
|
659
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
660
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
538
661
|
const response = await apiClient.request({
|
|
662
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
539
663
|
method: 'GET',
|
|
540
664
|
url: '/suggests/companies',
|
|
541
665
|
params: args,
|
|
@@ -548,11 +672,15 @@ mcpServer.tool('get-registered-companies-suggests', `Organization suggestions`,
|
|
|
548
672
|
});
|
|
549
673
|
mcpServer.tool('read-resume-profile', `Получение схемы резюме-профиля соискателя для резюме`, {
|
|
550
674
|
resume_id: z.string(),
|
|
551
|
-
}, async (args) => {
|
|
675
|
+
}, async (args, extra) => {
|
|
552
676
|
try {
|
|
553
677
|
const { resume_id, ...queryParams } = args;
|
|
554
678
|
const url = `/resume_profile/${resume_id}`;
|
|
679
|
+
// Extract authorization token from HTTP request headers
|
|
680
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
681
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
555
682
|
const response = await apiClient.request({
|
|
683
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
556
684
|
method: 'GET',
|
|
557
685
|
url: url,
|
|
558
686
|
params: queryParams,
|
|
@@ -565,11 +693,15 @@ mcpServer.tool('read-resume-profile', `Получение схемы резюм
|
|
|
565
693
|
});
|
|
566
694
|
mcpServer.tool('update-resume-profile', `Обновление резюме-профиля соискателя`, {
|
|
567
695
|
resume_id: z.string(),
|
|
568
|
-
}, async (args) => {
|
|
696
|
+
}, async (args, extra) => {
|
|
569
697
|
try {
|
|
570
698
|
const { resume_id, ...requestData } = args;
|
|
571
699
|
const url = `/resume_profile/${resume_id}`;
|
|
700
|
+
// Extract authorization token from HTTP request headers
|
|
701
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
702
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
572
703
|
const response = await apiClient.request({
|
|
704
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
573
705
|
method: 'PUT',
|
|
574
706
|
url: url,
|
|
575
707
|
data: requestData,
|
|
@@ -580,9 +712,13 @@ mcpServer.tool('update-resume-profile', `Обновление резюме-пр
|
|
|
580
712
|
return handleError(error);
|
|
581
713
|
}
|
|
582
714
|
});
|
|
583
|
-
mcpServer.tool('create-resume-profile', `Создание резюме-профиля соискателя`, {}, async (args) => {
|
|
715
|
+
mcpServer.tool('create-resume-profile', `Создание резюме-профиля соискателя`, {}, async (args, extra) => {
|
|
584
716
|
try {
|
|
717
|
+
// Extract authorization token from HTTP request headers
|
|
718
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
719
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
585
720
|
const response = await apiClient.request({
|
|
721
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
586
722
|
method: 'POST',
|
|
587
723
|
url: '/resume_profile',
|
|
588
724
|
data: args,
|
|
@@ -593,9 +729,13 @@ mcpServer.tool('create-resume-profile', `Создание резюме-проф
|
|
|
593
729
|
return handleError(error);
|
|
594
730
|
}
|
|
595
731
|
});
|
|
596
|
-
mcpServer.tool('get-resume-profile-dictionaries', `Получение cловарей резюме-профиля`, {}, async (args) => {
|
|
732
|
+
mcpServer.tool('get-resume-profile-dictionaries', `Получение cловарей резюме-профиля`, {}, async (args, extra) => {
|
|
597
733
|
try {
|
|
734
|
+
// Extract authorization token from HTTP request headers
|
|
735
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
736
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
598
737
|
const response = await apiClient.request({
|
|
738
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
599
739
|
method: 'GET',
|
|
600
740
|
url: '/resume_profile/dictionaries',
|
|
601
741
|
params: args,
|
|
@@ -608,11 +748,15 @@ mcpServer.tool('get-resume-profile-dictionaries', `Получение cлова
|
|
|
608
748
|
});
|
|
609
749
|
mcpServer.tool('get-payable-api-actions', `Information about active API services for payable methods`, {
|
|
610
750
|
employer_id: z.string(),
|
|
611
|
-
}, async (args) => {
|
|
751
|
+
}, async (args, extra) => {
|
|
612
752
|
try {
|
|
613
753
|
const { employer_id, ...queryParams } = args;
|
|
614
754
|
const url = `/employers/${employer_id}/services/payable_api_actions/active`;
|
|
755
|
+
// Extract authorization token from HTTP request headers
|
|
756
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
757
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
615
758
|
const response = await apiClient.request({
|
|
759
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
616
760
|
method: 'GET',
|
|
617
761
|
url: url,
|
|
618
762
|
params: queryParams,
|
|
@@ -626,11 +770,15 @@ mcpServer.tool('get-payable-api-actions', `Information about active API services
|
|
|
626
770
|
mcpServer.tool('get-payable-api-method-access', `Checking access to the paid methods`, {
|
|
627
771
|
employer_id: z.string(),
|
|
628
772
|
manager_id: z.string(),
|
|
629
|
-
}, async (args) => {
|
|
773
|
+
}, async (args, extra) => {
|
|
630
774
|
try {
|
|
631
775
|
const { employer_id, manager_id, ...queryParams } = args;
|
|
632
776
|
const url = `/employers/${employer_id}/managers/${manager_id}/method_access`;
|
|
777
|
+
// Extract authorization token from HTTP request headers
|
|
778
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
779
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
633
780
|
const response = await apiClient.request({
|
|
781
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
634
782
|
method: 'GET',
|
|
635
783
|
url: url,
|
|
636
784
|
params: queryParams,
|
|
@@ -644,9 +792,13 @@ mcpServer.tool('get-payable-api-method-access', `Checking access to the paid met
|
|
|
644
792
|
mcpServer.tool('get-saved-vacancy-searches', `List of saved vacancy searches`, {
|
|
645
793
|
page: z.string().optional(),
|
|
646
794
|
per_page: z.string().optional(),
|
|
647
|
-
}, async (args) => {
|
|
795
|
+
}, async (args, extra) => {
|
|
648
796
|
try {
|
|
797
|
+
// Extract authorization token from HTTP request headers
|
|
798
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
799
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
649
800
|
const response = await apiClient.request({
|
|
801
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
650
802
|
method: 'GET',
|
|
651
803
|
url: '/saved_searches/vacancies',
|
|
652
804
|
params: args,
|
|
@@ -691,9 +843,13 @@ mcpServer.tool('create-saved-vacancy-search', `Creating new saved vacancy search
|
|
|
691
843
|
premium: z.string().optional(),
|
|
692
844
|
responses_count_enabled: z.string().optional(),
|
|
693
845
|
part_time: z.string().optional(),
|
|
694
|
-
}, async (args) => {
|
|
846
|
+
}, async (args, extra) => {
|
|
695
847
|
try {
|
|
848
|
+
// Extract authorization token from HTTP request headers
|
|
849
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
850
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
696
851
|
const response = await apiClient.request({
|
|
852
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
697
853
|
method: 'POST',
|
|
698
854
|
url: '/saved_searches/vacancies',
|
|
699
855
|
data: args,
|
|
@@ -708,11 +864,15 @@ mcpServer.tool('get-vacancy-visitors', `Vacancy visitors`, {
|
|
|
708
864
|
vacancy_id: z.string(),
|
|
709
865
|
page: z.string().optional(),
|
|
710
866
|
per_page: z.string().optional(),
|
|
711
|
-
}, async (args) => {
|
|
867
|
+
}, async (args, extra) => {
|
|
712
868
|
try {
|
|
713
869
|
const { vacancy_id, ...queryParams } = args;
|
|
714
870
|
const url = `/vacancies/${vacancy_id}/visitors`;
|
|
871
|
+
// Extract authorization token from HTTP request headers
|
|
872
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
873
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
715
874
|
const response = await apiClient.request({
|
|
875
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
716
876
|
method: 'GET',
|
|
717
877
|
url: url,
|
|
718
878
|
params: queryParams,
|
|
@@ -725,11 +885,15 @@ mcpServer.tool('get-vacancy-visitors', `Vacancy visitors`, {
|
|
|
725
885
|
});
|
|
726
886
|
mcpServer.tool('get-vacancy', `View a vacancy`, {
|
|
727
887
|
vacancy_id: z.string(),
|
|
728
|
-
}, async (args) => {
|
|
888
|
+
}, async (args, extra) => {
|
|
729
889
|
try {
|
|
730
890
|
const { vacancy_id, ...queryParams } = args;
|
|
731
891
|
const url = `/vacancies/${vacancy_id}`;
|
|
892
|
+
// Extract authorization token from HTTP request headers
|
|
893
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
894
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
732
895
|
const response = await apiClient.request({
|
|
896
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
733
897
|
method: 'GET',
|
|
734
898
|
url: url,
|
|
735
899
|
params: queryParams,
|
|
@@ -744,11 +908,15 @@ mcpServer.tool('edit-vacancy', `Editing vacancies`, {
|
|
|
744
908
|
vacancy_id: z.string(),
|
|
745
909
|
ignore_duplicates: z.string().optional(),
|
|
746
910
|
ignore_replacement_warning: z.string().optional(),
|
|
747
|
-
}, async (args) => {
|
|
911
|
+
}, async (args, extra) => {
|
|
748
912
|
try {
|
|
749
913
|
const { vacancy_id, ...requestData } = args;
|
|
750
914
|
const url = `/vacancies/${vacancy_id}`;
|
|
915
|
+
// Extract authorization token from HTTP request headers
|
|
916
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
917
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
751
918
|
const response = await apiClient.request({
|
|
919
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
752
920
|
method: 'PUT',
|
|
753
921
|
url: url,
|
|
754
922
|
data: requestData,
|
|
@@ -759,9 +927,13 @@ mcpServer.tool('edit-vacancy', `Editing vacancies`, {
|
|
|
759
927
|
return handleError(error);
|
|
760
928
|
}
|
|
761
929
|
});
|
|
762
|
-
mcpServer.tool('get-blacklisted-vacancies', `List of hidden vacancies`, {}, async (args) => {
|
|
930
|
+
mcpServer.tool('get-blacklisted-vacancies', `List of hidden vacancies`, {}, async (args, extra) => {
|
|
763
931
|
try {
|
|
932
|
+
// Extract authorization token from HTTP request headers
|
|
933
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
934
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
764
935
|
const response = await apiClient.request({
|
|
936
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
765
937
|
method: 'GET',
|
|
766
938
|
url: '/vacancies/blacklisted',
|
|
767
939
|
params: args,
|
|
@@ -774,9 +946,13 @@ mcpServer.tool('get-blacklisted-vacancies', `List of hidden vacancies`, {}, asyn
|
|
|
774
946
|
});
|
|
775
947
|
mcpServer.tool('publish-vacancy', `Publishing job vacancies`, {
|
|
776
948
|
ignore_duplicates: z.string().optional(),
|
|
777
|
-
}, async (args) => {
|
|
949
|
+
}, async (args, extra) => {
|
|
778
950
|
try {
|
|
951
|
+
// Extract authorization token from HTTP request headers
|
|
952
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
953
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
779
954
|
const response = await apiClient.request({
|
|
955
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
780
956
|
method: 'POST',
|
|
781
957
|
url: '/vacancies',
|
|
782
958
|
data: args,
|
|
@@ -827,9 +1003,13 @@ mcpServer.tool('get-vacancies', `Search for vacancies`, {
|
|
|
827
1003
|
work_format: z.string().optional(),
|
|
828
1004
|
excluded_text: z.string().optional(),
|
|
829
1005
|
education: z.string().optional(),
|
|
830
|
-
}, async (args) => {
|
|
1006
|
+
}, async (args, extra) => {
|
|
831
1007
|
try {
|
|
1008
|
+
// Extract authorization token from HTTP request headers
|
|
1009
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1010
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
832
1011
|
const response = await apiClient.request({
|
|
1012
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
833
1013
|
method: 'GET',
|
|
834
1014
|
url: '/vacancies',
|
|
835
1015
|
params: args,
|
|
@@ -875,11 +1055,15 @@ mcpServer.tool('get-vacancies-related-to-vacancy', `Search for vacancies related
|
|
|
875
1055
|
premium: z.string().optional(),
|
|
876
1056
|
responses_count_enabled: z.string().optional(),
|
|
877
1057
|
part_time: z.string().optional(),
|
|
878
|
-
}, async (args) => {
|
|
1058
|
+
}, async (args, extra) => {
|
|
879
1059
|
try {
|
|
880
1060
|
const { vacancy_id, ...queryParams } = args;
|
|
881
1061
|
const url = `/vacancies/${vacancy_id}/related_vacancies`;
|
|
1062
|
+
// Extract authorization token from HTTP request headers
|
|
1063
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1064
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
882
1065
|
const response = await apiClient.request({
|
|
1066
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
883
1067
|
method: 'GET',
|
|
884
1068
|
url: url,
|
|
885
1069
|
params: queryParams,
|
|
@@ -892,11 +1076,15 @@ mcpServer.tool('get-vacancies-related-to-vacancy', `Search for vacancies related
|
|
|
892
1076
|
});
|
|
893
1077
|
mcpServer.tool('get-saved-vacancy-search', `Obtaining single saved vacancy search`, {
|
|
894
1078
|
id: z.string(),
|
|
895
|
-
}, async (args) => {
|
|
1079
|
+
}, async (args, extra) => {
|
|
896
1080
|
try {
|
|
897
1081
|
const { id, ...queryParams } = args;
|
|
898
1082
|
const url = `/saved_searches/vacancies/${id}`;
|
|
1083
|
+
// Extract authorization token from HTTP request headers
|
|
1084
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1085
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
899
1086
|
const response = await apiClient.request({
|
|
1087
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
900
1088
|
method: 'GET',
|
|
901
1089
|
url: url,
|
|
902
1090
|
params: queryParams,
|
|
@@ -911,11 +1099,15 @@ mcpServer.tool('update-saved-vacancy-search', `Updating saved vacancy search`, {
|
|
|
911
1099
|
id: z.string(),
|
|
912
1100
|
name: z.string().optional(),
|
|
913
1101
|
subscription: z.string().optional(),
|
|
914
|
-
}, async (args) => {
|
|
1102
|
+
}, async (args, extra) => {
|
|
915
1103
|
try {
|
|
916
1104
|
const { id, ...requestData } = args;
|
|
917
1105
|
const url = `/saved_searches/vacancies/${id}`;
|
|
1106
|
+
// Extract authorization token from HTTP request headers
|
|
1107
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1108
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
918
1109
|
const response = await apiClient.request({
|
|
1110
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
919
1111
|
method: 'PUT',
|
|
920
1112
|
url: url,
|
|
921
1113
|
data: requestData,
|
|
@@ -928,11 +1120,15 @@ mcpServer.tool('update-saved-vacancy-search', `Updating saved vacancy search`, {
|
|
|
928
1120
|
});
|
|
929
1121
|
mcpServer.tool('delete-saved-vacancy-search', `Deleting saved vacancy search`, {
|
|
930
1122
|
id: z.string(),
|
|
931
|
-
}, async (args) => {
|
|
1123
|
+
}, async (args, extra) => {
|
|
932
1124
|
try {
|
|
933
1125
|
const { id, ...queryParams } = args;
|
|
934
1126
|
const url = `/saved_searches/vacancies/${id}`;
|
|
1127
|
+
// Extract authorization token from HTTP request headers
|
|
1128
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1129
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
935
1130
|
const response = await apiClient.request({
|
|
1131
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
936
1132
|
method: 'DELETE',
|
|
937
1133
|
url: url,
|
|
938
1134
|
params: queryParams,
|
|
@@ -978,11 +1174,15 @@ mcpServer.tool('get-vacancies-similar-to-vacancy', `Search for vacancies similar
|
|
|
978
1174
|
premium: z.string().optional(),
|
|
979
1175
|
responses_count_enabled: z.string().optional(),
|
|
980
1176
|
part_time: z.string().optional(),
|
|
981
|
-
}, async (args) => {
|
|
1177
|
+
}, async (args, extra) => {
|
|
982
1178
|
try {
|
|
983
1179
|
const { vacancy_id, ...queryParams } = args;
|
|
984
1180
|
const url = `/vacancies/${vacancy_id}/similar_vacancies`;
|
|
1181
|
+
// Extract authorization token from HTTP request headers
|
|
1182
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1183
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
985
1184
|
const response = await apiClient.request({
|
|
1185
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
986
1186
|
method: 'GET',
|
|
987
1187
|
url: url,
|
|
988
1188
|
params: queryParams,
|
|
@@ -995,11 +1195,15 @@ mcpServer.tool('get-vacancies-similar-to-vacancy', `Search for vacancies similar
|
|
|
995
1195
|
});
|
|
996
1196
|
mcpServer.tool('get-vacancy-upgrade-list', `List of vacancy upgrades`, {
|
|
997
1197
|
vacancy_id: z.string(),
|
|
998
|
-
}, async (args) => {
|
|
1198
|
+
}, async (args, extra) => {
|
|
999
1199
|
try {
|
|
1000
1200
|
const { vacancy_id, ...queryParams } = args;
|
|
1001
1201
|
const url = `/vacancies/${vacancy_id}/upgrades`;
|
|
1202
|
+
// Extract authorization token from HTTP request headers
|
|
1203
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1204
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1002
1205
|
const response = await apiClient.request({
|
|
1206
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1003
1207
|
method: 'GET',
|
|
1004
1208
|
url: url,
|
|
1005
1209
|
params: queryParams,
|
|
@@ -1045,11 +1249,15 @@ mcpServer.tool('get-vacancies-similar-to-resume', `Search for vacancies similar
|
|
|
1045
1249
|
premium: z.string().optional(),
|
|
1046
1250
|
responses_count_enabled: z.string().optional(),
|
|
1047
1251
|
part_time: z.string().optional(),
|
|
1048
|
-
}, async (args) => {
|
|
1252
|
+
}, async (args, extra) => {
|
|
1049
1253
|
try {
|
|
1050
1254
|
const { resume_id, ...queryParams } = args;
|
|
1051
1255
|
const url = `/resumes/${resume_id}/similar_vacancies`;
|
|
1256
|
+
// Extract authorization token from HTTP request headers
|
|
1257
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1258
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1052
1259
|
const response = await apiClient.request({
|
|
1260
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1053
1261
|
method: 'GET',
|
|
1054
1262
|
url: url,
|
|
1055
1263
|
params: queryParams,
|
|
@@ -1063,9 +1271,13 @@ mcpServer.tool('get-vacancies-similar-to-resume', `Search for vacancies similar
|
|
|
1063
1271
|
mcpServer.tool('get-favorite-vacancies', `List of favorited vacancies`, {
|
|
1064
1272
|
page: z.string().optional(),
|
|
1065
1273
|
per_page: z.string().optional(),
|
|
1066
|
-
}, async (args) => {
|
|
1274
|
+
}, async (args, extra) => {
|
|
1067
1275
|
try {
|
|
1276
|
+
// Extract authorization token from HTTP request headers
|
|
1277
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1278
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1068
1279
|
const response = await apiClient.request({
|
|
1280
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1069
1281
|
method: 'GET',
|
|
1070
1282
|
url: '/vacancies/favorited',
|
|
1071
1283
|
params: args,
|
|
@@ -1078,11 +1290,15 @@ mcpServer.tool('get-favorite-vacancies', `List of favorited vacancies`, {
|
|
|
1078
1290
|
});
|
|
1079
1291
|
mcpServer.tool('add-vacancy-to-blacklisted', `Adding a vacancy in the blacklist`, {
|
|
1080
1292
|
vacancy_id: z.string(),
|
|
1081
|
-
}, async (args) => {
|
|
1293
|
+
}, async (args, extra) => {
|
|
1082
1294
|
try {
|
|
1083
1295
|
const { vacancy_id, ...requestData } = args;
|
|
1084
1296
|
const url = `/vacancies/blacklisted/${vacancy_id}`;
|
|
1297
|
+
// Extract authorization token from HTTP request headers
|
|
1298
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1299
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1085
1300
|
const response = await apiClient.request({
|
|
1301
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1086
1302
|
method: 'PUT',
|
|
1087
1303
|
url: url,
|
|
1088
1304
|
data: requestData,
|
|
@@ -1095,11 +1311,15 @@ mcpServer.tool('add-vacancy-to-blacklisted', `Adding a vacancy in the blacklist`
|
|
|
1095
1311
|
});
|
|
1096
1312
|
mcpServer.tool('delete-vacancy-from-blacklisted', `Deleting a vacancy from the blacklist`, {
|
|
1097
1313
|
vacancy_id: z.string(),
|
|
1098
|
-
}, async (args) => {
|
|
1314
|
+
}, async (args, extra) => {
|
|
1099
1315
|
try {
|
|
1100
1316
|
const { vacancy_id, ...queryParams } = args;
|
|
1101
1317
|
const url = `/vacancies/blacklisted/${vacancy_id}`;
|
|
1318
|
+
// Extract authorization token from HTTP request headers
|
|
1319
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1320
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1102
1321
|
const response = await apiClient.request({
|
|
1322
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1103
1323
|
method: 'DELETE',
|
|
1104
1324
|
url: url,
|
|
1105
1325
|
params: queryParams,
|
|
@@ -1119,11 +1339,15 @@ mcpServer.tool('get-active-vacancy-list', `View a published vacancy list`, {
|
|
|
1119
1339
|
area: z.string().optional(),
|
|
1120
1340
|
resume_id: z.string().optional(),
|
|
1121
1341
|
order_by: z.string().optional(),
|
|
1122
|
-
}, async (args) => {
|
|
1342
|
+
}, async (args, extra) => {
|
|
1123
1343
|
try {
|
|
1124
1344
|
const { employer_id, ...queryParams } = args;
|
|
1125
1345
|
const url = `/employers/${employer_id}/vacancies/active`;
|
|
1346
|
+
// Extract authorization token from HTTP request headers
|
|
1347
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1348
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1126
1349
|
const response = await apiClient.request({
|
|
1350
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1127
1351
|
method: 'GET',
|
|
1128
1352
|
url: url,
|
|
1129
1353
|
params: queryParams,
|
|
@@ -1140,11 +1364,15 @@ mcpServer.tool('get-hidden-vacancies', `Deleted vacancy list`, {
|
|
|
1140
1364
|
order_by: z.string().optional(),
|
|
1141
1365
|
per_page: z.string().optional(),
|
|
1142
1366
|
page: z.string().optional(),
|
|
1143
|
-
}, async (args) => {
|
|
1367
|
+
}, async (args, extra) => {
|
|
1144
1368
|
try {
|
|
1145
1369
|
const { employer_id, ...queryParams } = args;
|
|
1146
1370
|
const url = `/employers/${employer_id}/vacancies/hidden`;
|
|
1371
|
+
// Extract authorization token from HTTP request headers
|
|
1372
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1373
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1147
1374
|
const response = await apiClient.request({
|
|
1375
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1148
1376
|
method: 'GET',
|
|
1149
1377
|
url: url,
|
|
1150
1378
|
params: queryParams,
|
|
@@ -1158,11 +1386,15 @@ mcpServer.tool('get-hidden-vacancies', `Deleted vacancy list`, {
|
|
|
1158
1386
|
mcpServer.tool('add-vacancy-to-hidden', `Deleting vacancies`, {
|
|
1159
1387
|
employer_id: z.string(),
|
|
1160
1388
|
vacancy_id: z.string(),
|
|
1161
|
-
}, async (args) => {
|
|
1389
|
+
}, async (args, extra) => {
|
|
1162
1390
|
try {
|
|
1163
1391
|
const { employer_id, vacancy_id, ...requestData } = args;
|
|
1164
1392
|
const url = `/employers/${employer_id}/vacancies/hidden/${vacancy_id}`;
|
|
1393
|
+
// Extract authorization token from HTTP request headers
|
|
1394
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1395
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1165
1396
|
const response = await apiClient.request({
|
|
1397
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1166
1398
|
method: 'PUT',
|
|
1167
1399
|
url: url,
|
|
1168
1400
|
data: requestData,
|
|
@@ -1176,11 +1408,15 @@ mcpServer.tool('add-vacancy-to-hidden', `Deleting vacancies`, {
|
|
|
1176
1408
|
mcpServer.tool('restore-vacancy-from-hidden', `Restoring deleted vacancies`, {
|
|
1177
1409
|
employer_id: z.string(),
|
|
1178
1410
|
vacancy_id: z.string(),
|
|
1179
|
-
}, async (args) => {
|
|
1411
|
+
}, async (args, extra) => {
|
|
1180
1412
|
try {
|
|
1181
1413
|
const { employer_id, vacancy_id, ...queryParams } = args;
|
|
1182
1414
|
const url = `/employers/${employer_id}/vacancies/hidden/${vacancy_id}`;
|
|
1415
|
+
// Extract authorization token from HTTP request headers
|
|
1416
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1417
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1183
1418
|
const response = await apiClient.request({
|
|
1419
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1184
1420
|
method: 'DELETE',
|
|
1185
1421
|
url: url,
|
|
1186
1422
|
params: queryParams,
|
|
@@ -1191,9 +1427,13 @@ mcpServer.tool('restore-vacancy-from-hidden', `Restoring deleted vacancies`, {
|
|
|
1191
1427
|
return handleError(error);
|
|
1192
1428
|
}
|
|
1193
1429
|
});
|
|
1194
|
-
mcpServer.tool('get-vacancy-conditions', `Conditions for filling out fields when publishing and editing vacancies`, {}, async (args) => {
|
|
1430
|
+
mcpServer.tool('get-vacancy-conditions', `Conditions for filling out fields when publishing and editing vacancies`, {}, async (args, extra) => {
|
|
1195
1431
|
try {
|
|
1432
|
+
// Extract authorization token from HTTP request headers
|
|
1433
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1434
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1196
1435
|
const response = await apiClient.request({
|
|
1436
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1197
1437
|
method: 'GET',
|
|
1198
1438
|
url: '/vacancy_conditions',
|
|
1199
1439
|
params: args,
|
|
@@ -1206,11 +1446,15 @@ mcpServer.tool('get-vacancy-conditions', `Conditions for filling out fields when
|
|
|
1206
1446
|
});
|
|
1207
1447
|
mcpServer.tool('get-prolongation-vacancy-info', `Information about vacancy prolongation possibility`, {
|
|
1208
1448
|
vacancy_id: z.string(),
|
|
1209
|
-
}, async (args) => {
|
|
1449
|
+
}, async (args, extra) => {
|
|
1210
1450
|
try {
|
|
1211
1451
|
const { vacancy_id, ...queryParams } = args;
|
|
1212
1452
|
const url = `/vacancies/${vacancy_id}/prolongate`;
|
|
1453
|
+
// Extract authorization token from HTTP request headers
|
|
1454
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1455
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1213
1456
|
const response = await apiClient.request({
|
|
1457
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1214
1458
|
method: 'GET',
|
|
1215
1459
|
url: url,
|
|
1216
1460
|
params: queryParams,
|
|
@@ -1223,11 +1467,15 @@ mcpServer.tool('get-prolongation-vacancy-info', `Information about vacancy prolo
|
|
|
1223
1467
|
});
|
|
1224
1468
|
mcpServer.tool('vacancy-prolongation', `Vacancy prolongation`, {
|
|
1225
1469
|
vacancy_id: z.string(),
|
|
1226
|
-
}, async (args) => {
|
|
1470
|
+
}, async (args, extra) => {
|
|
1227
1471
|
try {
|
|
1228
1472
|
const { vacancy_id, ...requestData } = args;
|
|
1229
1473
|
const url = `/vacancies/${vacancy_id}/prolongate`;
|
|
1474
|
+
// Extract authorization token from HTTP request headers
|
|
1475
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1476
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1230
1477
|
const response = await apiClient.request({
|
|
1478
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1231
1479
|
method: 'POST',
|
|
1232
1480
|
url: url,
|
|
1233
1481
|
data: requestData,
|
|
@@ -1241,11 +1489,15 @@ mcpServer.tool('vacancy-prolongation', `Vacancy prolongation`, {
|
|
|
1241
1489
|
mcpServer.tool('add-vacancy-to-archive', `Archiving vacancies`, {
|
|
1242
1490
|
employer_id: z.string(),
|
|
1243
1491
|
vacancy_id: z.string(),
|
|
1244
|
-
}, async (args) => {
|
|
1492
|
+
}, async (args, extra) => {
|
|
1245
1493
|
try {
|
|
1246
1494
|
const { employer_id, vacancy_id, ...requestData } = args;
|
|
1247
1495
|
const url = `/employers/${employer_id}/vacancies/archived/${vacancy_id}`;
|
|
1496
|
+
// Extract authorization token from HTTP request headers
|
|
1497
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1498
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1248
1499
|
const response = await apiClient.request({
|
|
1500
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1249
1501
|
method: 'PUT',
|
|
1250
1502
|
url: url,
|
|
1251
1503
|
data: requestData,
|
|
@@ -1258,11 +1510,15 @@ mcpServer.tool('add-vacancy-to-archive', `Archiving vacancies`, {
|
|
|
1258
1510
|
});
|
|
1259
1511
|
mcpServer.tool('get-pref-negotiations-order', `Viewing preferred options for sorting responses`, {
|
|
1260
1512
|
id: z.string(),
|
|
1261
|
-
}, async (args) => {
|
|
1513
|
+
}, async (args, extra) => {
|
|
1262
1514
|
try {
|
|
1263
1515
|
const { id, ...queryParams } = args;
|
|
1264
1516
|
const url = `/vacancies/${id}/preferred_negotiations_order`;
|
|
1517
|
+
// Extract authorization token from HTTP request headers
|
|
1518
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1519
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1265
1520
|
const response = await apiClient.request({
|
|
1521
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1266
1522
|
method: 'GET',
|
|
1267
1523
|
url: url,
|
|
1268
1524
|
params: queryParams,
|
|
@@ -1275,11 +1531,15 @@ mcpServer.tool('get-pref-negotiations-order', `Viewing preferred options for sor
|
|
|
1275
1531
|
});
|
|
1276
1532
|
mcpServer.tool('put-pref-negotiations-order', `Changing preferred options for sorting responses`, {
|
|
1277
1533
|
id: z.string(),
|
|
1278
|
-
}, async (args) => {
|
|
1534
|
+
}, async (args, extra) => {
|
|
1279
1535
|
try {
|
|
1280
1536
|
const { id, ...requestData } = args;
|
|
1281
1537
|
const url = `/vacancies/${id}/preferred_negotiations_order`;
|
|
1538
|
+
// Extract authorization token from HTTP request headers
|
|
1539
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1540
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1282
1541
|
const response = await apiClient.request({
|
|
1542
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1283
1543
|
method: 'PUT',
|
|
1284
1544
|
url: url,
|
|
1285
1545
|
data: requestData,
|
|
@@ -1292,11 +1552,15 @@ mcpServer.tool('put-pref-negotiations-order', `Changing preferred options for so
|
|
|
1292
1552
|
});
|
|
1293
1553
|
mcpServer.tool('add-vacancy-to-favorite', `Add a vacancy in favorited`, {
|
|
1294
1554
|
vacancy_id: z.string(),
|
|
1295
|
-
}, async (args) => {
|
|
1555
|
+
}, async (args, extra) => {
|
|
1296
1556
|
try {
|
|
1297
1557
|
const { vacancy_id, ...requestData } = args;
|
|
1298
1558
|
const url = `/vacancies/favorited/${vacancy_id}`;
|
|
1559
|
+
// Extract authorization token from HTTP request headers
|
|
1560
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1561
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1299
1562
|
const response = await apiClient.request({
|
|
1563
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1300
1564
|
method: 'PUT',
|
|
1301
1565
|
url: url,
|
|
1302
1566
|
data: requestData,
|
|
@@ -1309,11 +1573,15 @@ mcpServer.tool('add-vacancy-to-favorite', `Add a vacancy in favorited`, {
|
|
|
1309
1573
|
});
|
|
1310
1574
|
mcpServer.tool('delete-vacancy-from-favorite', `Delete a vacancy from favorited`, {
|
|
1311
1575
|
vacancy_id: z.string(),
|
|
1312
|
-
}, async (args) => {
|
|
1576
|
+
}, async (args, extra) => {
|
|
1313
1577
|
try {
|
|
1314
1578
|
const { vacancy_id, ...queryParams } = args;
|
|
1315
1579
|
const url = `/vacancies/favorited/${vacancy_id}`;
|
|
1580
|
+
// Extract authorization token from HTTP request headers
|
|
1581
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1582
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1316
1583
|
const response = await apiClient.request({
|
|
1584
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1317
1585
|
method: 'DELETE',
|
|
1318
1586
|
url: url,
|
|
1319
1587
|
params: queryParams,
|
|
@@ -1327,11 +1595,15 @@ mcpServer.tool('delete-vacancy-from-favorite', `Delete a vacancy from favorited`
|
|
|
1327
1595
|
mcpServer.tool('get-available-vacancy-types', `Possible options available to current manager for publishing of vacancies`, {
|
|
1328
1596
|
employer_id: z.string(),
|
|
1329
1597
|
manager_id: z.string(),
|
|
1330
|
-
}, async (args) => {
|
|
1598
|
+
}, async (args, extra) => {
|
|
1331
1599
|
try {
|
|
1332
1600
|
const { employer_id, manager_id, ...queryParams } = args;
|
|
1333
1601
|
const url = `/employers/${employer_id}/managers/${manager_id}/vacancies/available_types`;
|
|
1602
|
+
// Extract authorization token from HTTP request headers
|
|
1603
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1604
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1334
1605
|
const response = await apiClient.request({
|
|
1606
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1335
1607
|
method: 'GET',
|
|
1336
1608
|
url: url,
|
|
1337
1609
|
params: queryParams,
|
|
@@ -1344,11 +1616,15 @@ mcpServer.tool('get-available-vacancy-types', `Possible options available to cur
|
|
|
1344
1616
|
});
|
|
1345
1617
|
mcpServer.tool('get-vacancy-stats', `Vacancy statistics`, {
|
|
1346
1618
|
vacancy_id: z.string(),
|
|
1347
|
-
}, async (args) => {
|
|
1619
|
+
}, async (args, extra) => {
|
|
1348
1620
|
try {
|
|
1349
1621
|
const { vacancy_id, ...queryParams } = args;
|
|
1350
1622
|
const url = `/vacancies/${vacancy_id}/stats`;
|
|
1623
|
+
// Extract authorization token from HTTP request headers
|
|
1624
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1625
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1351
1626
|
const response = await apiClient.request({
|
|
1627
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1352
1628
|
method: 'GET',
|
|
1353
1629
|
url: url,
|
|
1354
1630
|
params: queryParams,
|
|
@@ -1365,11 +1641,15 @@ mcpServer.tool('get-archived-vacancies', `Archived vacancy list`, {
|
|
|
1365
1641
|
order_by: z.string().optional(),
|
|
1366
1642
|
per_page: z.string().optional(),
|
|
1367
1643
|
page: z.string().optional(),
|
|
1368
|
-
}, async (args) => {
|
|
1644
|
+
}, async (args, extra) => {
|
|
1369
1645
|
try {
|
|
1370
1646
|
const { employer_id, ...queryParams } = args;
|
|
1371
1647
|
const url = `/employers/${employer_id}/vacancies/archived`;
|
|
1648
|
+
// Extract authorization token from HTTP request headers
|
|
1649
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1650
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1372
1651
|
const response = await apiClient.request({
|
|
1652
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1373
1653
|
method: 'GET',
|
|
1374
1654
|
url: url,
|
|
1375
1655
|
params: queryParams,
|
|
@@ -1380,9 +1660,13 @@ mcpServer.tool('get-archived-vacancies', `Archived vacancy list`, {
|
|
|
1380
1660
|
return handleError(error);
|
|
1381
1661
|
}
|
|
1382
1662
|
});
|
|
1383
|
-
mcpServer.tool('get-artifacts-portfolio-conditions', `Conditions for uploading portfolio`, {}, async (args) => {
|
|
1663
|
+
mcpServer.tool('get-artifacts-portfolio-conditions', `Conditions for uploading portfolio`, {}, async (args, extra) => {
|
|
1384
1664
|
try {
|
|
1665
|
+
// Extract authorization token from HTTP request headers
|
|
1666
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1667
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1385
1668
|
const response = await apiClient.request({
|
|
1669
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1386
1670
|
method: 'GET',
|
|
1387
1671
|
url: '/artifacts/portfolio/conditions',
|
|
1388
1672
|
params: args,
|
|
@@ -1395,11 +1679,15 @@ mcpServer.tool('get-artifacts-portfolio-conditions', `Conditions for uploading p
|
|
|
1395
1679
|
});
|
|
1396
1680
|
mcpServer.tool('edit-artifact', `Editing an artifact`, {
|
|
1397
1681
|
id: z.string(),
|
|
1398
|
-
}, async (args) => {
|
|
1682
|
+
}, async (args, extra) => {
|
|
1399
1683
|
try {
|
|
1400
1684
|
const { id, ...requestData } = args;
|
|
1401
1685
|
const url = `/artifacts/${id}`;
|
|
1686
|
+
// Extract authorization token from HTTP request headers
|
|
1687
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1688
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1402
1689
|
const response = await apiClient.request({
|
|
1690
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1403
1691
|
method: 'PUT',
|
|
1404
1692
|
url: url,
|
|
1405
1693
|
data: requestData,
|
|
@@ -1412,11 +1700,15 @@ mcpServer.tool('edit-artifact', `Editing an artifact`, {
|
|
|
1412
1700
|
});
|
|
1413
1701
|
mcpServer.tool('delete-artifact', `Deleting an artifact`, {
|
|
1414
1702
|
id: z.string(),
|
|
1415
|
-
}, async (args) => {
|
|
1703
|
+
}, async (args, extra) => {
|
|
1416
1704
|
try {
|
|
1417
1705
|
const { id, ...queryParams } = args;
|
|
1418
1706
|
const url = `/artifacts/${id}`;
|
|
1707
|
+
// Extract authorization token from HTTP request headers
|
|
1708
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1709
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1419
1710
|
const response = await apiClient.request({
|
|
1711
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1420
1712
|
method: 'DELETE',
|
|
1421
1713
|
url: url,
|
|
1422
1714
|
params: queryParams,
|
|
@@ -1427,9 +1719,13 @@ mcpServer.tool('delete-artifact', `Deleting an artifact`, {
|
|
|
1427
1719
|
return handleError(error);
|
|
1428
1720
|
}
|
|
1429
1721
|
});
|
|
1430
|
-
mcpServer.tool('load-artifact', `Uploading an artifact`, {}, async (args) => {
|
|
1722
|
+
mcpServer.tool('load-artifact', `Uploading an artifact`, {}, async (args, extra) => {
|
|
1431
1723
|
try {
|
|
1724
|
+
// Extract authorization token from HTTP request headers
|
|
1725
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1726
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1432
1727
|
const response = await apiClient.request({
|
|
1728
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1433
1729
|
method: 'POST',
|
|
1434
1730
|
url: '/artifacts',
|
|
1435
1731
|
data: args,
|
|
@@ -1440,9 +1736,13 @@ mcpServer.tool('load-artifact', `Uploading an artifact`, {}, async (args) => {
|
|
|
1440
1736
|
return handleError(error);
|
|
1441
1737
|
}
|
|
1442
1738
|
});
|
|
1443
|
-
mcpServer.tool('get-artifacts-portfolio', `Getting portfolios`, {}, async (args) => {
|
|
1739
|
+
mcpServer.tool('get-artifacts-portfolio', `Getting portfolios`, {}, async (args, extra) => {
|
|
1444
1740
|
try {
|
|
1741
|
+
// Extract authorization token from HTTP request headers
|
|
1742
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1743
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1445
1744
|
const response = await apiClient.request({
|
|
1745
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1446
1746
|
method: 'GET',
|
|
1447
1747
|
url: '/artifacts/portfolio',
|
|
1448
1748
|
params: args,
|
|
@@ -1453,9 +1753,13 @@ mcpServer.tool('get-artifacts-portfolio', `Getting portfolios`, {}, async (args)
|
|
|
1453
1753
|
return handleError(error);
|
|
1454
1754
|
}
|
|
1455
1755
|
});
|
|
1456
|
-
mcpServer.tool('get-artifact-photos-conditions', `Conditions for uploading photos`, {}, async (args) => {
|
|
1756
|
+
mcpServer.tool('get-artifact-photos-conditions', `Conditions for uploading photos`, {}, async (args, extra) => {
|
|
1457
1757
|
try {
|
|
1758
|
+
// Extract authorization token from HTTP request headers
|
|
1759
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1760
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1458
1761
|
const response = await apiClient.request({
|
|
1762
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1459
1763
|
method: 'GET',
|
|
1460
1764
|
url: '/artifacts/photo/conditions',
|
|
1461
1765
|
params: args,
|
|
@@ -1466,9 +1770,13 @@ mcpServer.tool('get-artifact-photos-conditions', `Conditions for uploading photo
|
|
|
1466
1770
|
return handleError(error);
|
|
1467
1771
|
}
|
|
1468
1772
|
});
|
|
1469
|
-
mcpServer.tool('get-artifact-photos', `Getting photos`, {}, async (args) => {
|
|
1773
|
+
mcpServer.tool('get-artifact-photos', `Getting photos`, {}, async (args, extra) => {
|
|
1470
1774
|
try {
|
|
1775
|
+
// Extract authorization token from HTTP request headers
|
|
1776
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1777
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1471
1778
|
const response = await apiClient.request({
|
|
1779
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1472
1780
|
method: 'GET',
|
|
1473
1781
|
url: '/artifacts/photo',
|
|
1474
1782
|
params: args,
|
|
@@ -1479,9 +1787,13 @@ mcpServer.tool('get-artifact-photos', `Getting photos`, {}, async (args) => {
|
|
|
1479
1787
|
return handleError(error);
|
|
1480
1788
|
}
|
|
1481
1789
|
});
|
|
1482
|
-
mcpServer.tool('get-dictionaries', `Directories of fields`, {}, async (args) => {
|
|
1790
|
+
mcpServer.tool('get-dictionaries', `Directories of fields`, {}, async (args, extra) => {
|
|
1483
1791
|
try {
|
|
1792
|
+
// Extract authorization token from HTTP request headers
|
|
1793
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1794
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1484
1795
|
const response = await apiClient.request({
|
|
1796
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1485
1797
|
method: 'GET',
|
|
1486
1798
|
url: '/dictionaries',
|
|
1487
1799
|
params: args,
|
|
@@ -1492,9 +1804,13 @@ mcpServer.tool('get-dictionaries', `Directories of fields`, {}, async (args) =>
|
|
|
1492
1804
|
return handleError(error);
|
|
1493
1805
|
}
|
|
1494
1806
|
});
|
|
1495
|
-
mcpServer.tool('get-languages', `The list of all languages`, {}, async (args) => {
|
|
1807
|
+
mcpServer.tool('get-languages', `The list of all languages`, {}, async (args, extra) => {
|
|
1496
1808
|
try {
|
|
1809
|
+
// Extract authorization token from HTTP request headers
|
|
1810
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1811
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1497
1812
|
const response = await apiClient.request({
|
|
1813
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1498
1814
|
method: 'GET',
|
|
1499
1815
|
url: '/languages',
|
|
1500
1816
|
params: args,
|
|
@@ -1507,9 +1823,13 @@ mcpServer.tool('get-languages', `The list of all languages`, {}, async (args) =>
|
|
|
1507
1823
|
});
|
|
1508
1824
|
mcpServer.tool('get-educational-institutions-dictionary', `Basic information about educational institutions`, {
|
|
1509
1825
|
id: z.string(),
|
|
1510
|
-
}, async (args) => {
|
|
1826
|
+
}, async (args, extra) => {
|
|
1511
1827
|
try {
|
|
1828
|
+
// Extract authorization token from HTTP request headers
|
|
1829
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1830
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1512
1831
|
const response = await apiClient.request({
|
|
1832
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1513
1833
|
method: 'GET',
|
|
1514
1834
|
url: '/educational_institutions',
|
|
1515
1835
|
params: args,
|
|
@@ -1522,9 +1842,13 @@ mcpServer.tool('get-educational-institutions-dictionary', `Basic information abo
|
|
|
1522
1842
|
});
|
|
1523
1843
|
mcpServer.tool('get-skills', `The list of key skills`, {
|
|
1524
1844
|
id: z.string(),
|
|
1525
|
-
}, async (args) => {
|
|
1845
|
+
}, async (args, extra) => {
|
|
1526
1846
|
try {
|
|
1847
|
+
// Extract authorization token from HTTP request headers
|
|
1848
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1849
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1527
1850
|
const response = await apiClient.request({
|
|
1851
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1528
1852
|
method: 'GET',
|
|
1529
1853
|
url: '/skills',
|
|
1530
1854
|
params: args,
|
|
@@ -1535,9 +1859,13 @@ mcpServer.tool('get-skills', `The list of key skills`, {
|
|
|
1535
1859
|
return handleError(error);
|
|
1536
1860
|
}
|
|
1537
1861
|
});
|
|
1538
|
-
mcpServer.tool('get-professional-roles-dictionary', `Professional role directory`, {}, async (args) => {
|
|
1862
|
+
mcpServer.tool('get-professional-roles-dictionary', `Professional role directory`, {}, async (args, extra) => {
|
|
1539
1863
|
try {
|
|
1864
|
+
// Extract authorization token from HTTP request headers
|
|
1865
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1866
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1540
1867
|
const response = await apiClient.request({
|
|
1868
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1541
1869
|
method: 'GET',
|
|
1542
1870
|
url: '/professional_roles',
|
|
1543
1871
|
params: args,
|
|
@@ -1550,11 +1878,15 @@ mcpServer.tool('get-professional-roles-dictionary', `Professional role directory
|
|
|
1550
1878
|
});
|
|
1551
1879
|
mcpServer.tool('get-faculties', `List of educational institution faculties`, {
|
|
1552
1880
|
id: z.string(),
|
|
1553
|
-
}, async (args) => {
|
|
1881
|
+
}, async (args, extra) => {
|
|
1554
1882
|
try {
|
|
1555
1883
|
const { id, ...queryParams } = args;
|
|
1556
1884
|
const url = `/educational_institutions/${id}/faculties`;
|
|
1885
|
+
// Extract authorization token from HTTP request headers
|
|
1886
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1887
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1557
1888
|
const response = await apiClient.request({
|
|
1889
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1558
1890
|
method: 'GET',
|
|
1559
1891
|
url: url,
|
|
1560
1892
|
params: queryParams,
|
|
@@ -1565,9 +1897,13 @@ mcpServer.tool('get-faculties', `List of educational institution faculties`, {
|
|
|
1565
1897
|
return handleError(error);
|
|
1566
1898
|
}
|
|
1567
1899
|
});
|
|
1568
|
-
mcpServer.tool('get-industries', `Industries`, {}, async (args) => {
|
|
1900
|
+
mcpServer.tool('get-industries', `Industries`, {}, async (args, extra) => {
|
|
1569
1901
|
try {
|
|
1902
|
+
// Extract authorization token from HTTP request headers
|
|
1903
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1904
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1570
1905
|
const response = await apiClient.request({
|
|
1906
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1571
1907
|
method: 'GET',
|
|
1572
1908
|
url: '/industries',
|
|
1573
1909
|
params: args,
|
|
@@ -1581,11 +1917,15 @@ mcpServer.tool('get-industries', `Industries`, {}, async (args) => {
|
|
|
1581
1917
|
mcpServer.tool('change-negotiation-action', `Actions with collection response/invitation`, {
|
|
1582
1918
|
collection_name: z.string(),
|
|
1583
1919
|
nid: z.string(),
|
|
1584
|
-
}, async (args) => {
|
|
1920
|
+
}, async (args, extra) => {
|
|
1585
1921
|
try {
|
|
1586
1922
|
const { collection_name, nid, ...requestData } = args;
|
|
1587
1923
|
const url = `/negotiations/${collection_name}/${nid}`;
|
|
1924
|
+
// Extract authorization token from HTTP request headers
|
|
1925
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1926
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1588
1927
|
const response = await apiClient.request({
|
|
1928
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1589
1929
|
method: 'PUT',
|
|
1590
1930
|
url: url,
|
|
1591
1931
|
data: requestData,
|
|
@@ -1596,9 +1936,13 @@ mcpServer.tool('change-negotiation-action', `Actions with collection response/in
|
|
|
1596
1936
|
return handleError(error);
|
|
1597
1937
|
}
|
|
1598
1938
|
});
|
|
1599
|
-
mcpServer.tool('apply-to-vacancy', `Apply for a vacancy`, {}, async (args) => {
|
|
1939
|
+
mcpServer.tool('apply-to-vacancy', `Apply for a vacancy`, {}, async (args, extra) => {
|
|
1600
1940
|
try {
|
|
1941
|
+
// Extract authorization token from HTTP request headers
|
|
1942
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1943
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1601
1944
|
const response = await apiClient.request({
|
|
1945
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1602
1946
|
method: 'POST',
|
|
1603
1947
|
url: '/negotiations',
|
|
1604
1948
|
data: args,
|
|
@@ -1619,9 +1963,13 @@ mcpServer.tool('get-negotiations', `Negotiation list`, {
|
|
|
1619
1963
|
has_updates: z.string().optional(),
|
|
1620
1964
|
with_job_search_status: z.string().optional(),
|
|
1621
1965
|
with_generated_collections: z.string().optional(),
|
|
1622
|
-
}, async (args) => {
|
|
1966
|
+
}, async (args, extra) => {
|
|
1623
1967
|
try {
|
|
1968
|
+
// Extract authorization token from HTTP request headers
|
|
1969
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1970
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1624
1971
|
const response = await apiClient.request({
|
|
1972
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1625
1973
|
method: 'GET',
|
|
1626
1974
|
url: '/negotiations',
|
|
1627
1975
|
params: args,
|
|
@@ -1635,11 +1983,15 @@ mcpServer.tool('get-negotiations', `Negotiation list`, {
|
|
|
1635
1983
|
mcpServer.tool('get-negotiations-statistics-manager', `Negotiation statistics for the manager`, {
|
|
1636
1984
|
employer_id: z.string(),
|
|
1637
1985
|
manager_id: z.string(),
|
|
1638
|
-
}, async (args) => {
|
|
1986
|
+
}, async (args, extra) => {
|
|
1639
1987
|
try {
|
|
1640
1988
|
const { employer_id, manager_id, ...queryParams } = args;
|
|
1641
1989
|
const url = `/employers/${employer_id}/managers/${manager_id}/negotiations_statistics`;
|
|
1990
|
+
// Extract authorization token from HTTP request headers
|
|
1991
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
1992
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1642
1993
|
const response = await apiClient.request({
|
|
1994
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1643
1995
|
method: 'GET',
|
|
1644
1996
|
url: url,
|
|
1645
1997
|
params: queryParams,
|
|
@@ -1658,9 +2010,13 @@ mcpServer.tool('get-active-negotiations', `Active negotiation list`, {
|
|
|
1658
2010
|
vacancy_id: z.string().optional(),
|
|
1659
2011
|
has_updates: z.string().optional(),
|
|
1660
2012
|
with_job_search_status: z.string().optional(),
|
|
1661
|
-
}, async (args) => {
|
|
2013
|
+
}, async (args, extra) => {
|
|
1662
2014
|
try {
|
|
2015
|
+
// Extract authorization token from HTTP request headers
|
|
2016
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2017
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1663
2018
|
const response = await apiClient.request({
|
|
2019
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1664
2020
|
method: 'GET',
|
|
1665
2021
|
url: '/negotiations/active',
|
|
1666
2022
|
params: args,
|
|
@@ -1676,11 +2032,15 @@ mcpServer.tool('get-negotiation-message-templates', `Template list for the negot
|
|
|
1676
2032
|
topic_id: z.string().optional(),
|
|
1677
2033
|
vacancy_id: z.string().optional(),
|
|
1678
2034
|
resume_id: z.string().optional(),
|
|
1679
|
-
}, async (args) => {
|
|
2035
|
+
}, async (args, extra) => {
|
|
1680
2036
|
try {
|
|
1681
2037
|
const { template, ...queryParams } = args;
|
|
1682
2038
|
const url = `/message_templates/${template}`;
|
|
2039
|
+
// Extract authorization token from HTTP request headers
|
|
2040
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2041
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1683
2042
|
const response = await apiClient.request({
|
|
2043
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1684
2044
|
method: 'GET',
|
|
1685
2045
|
url: url,
|
|
1686
2046
|
params: queryParams,
|
|
@@ -1715,9 +2075,13 @@ mcpServer.tool('get-collection-negotiations-list', `Negotiation list of the coll
|
|
|
1715
2075
|
show_only_new_responses: z.string().optional(),
|
|
1716
2076
|
show_only_with_vehicle: z.string().optional(),
|
|
1717
2077
|
show_only_new: z.string().optional(),
|
|
1718
|
-
}, async (args) => {
|
|
2078
|
+
}, async (args, extra) => {
|
|
1719
2079
|
try {
|
|
2080
|
+
// Extract authorization token from HTTP request headers
|
|
2081
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2082
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1720
2083
|
const response = await apiClient.request({
|
|
2084
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1721
2085
|
method: 'GET',
|
|
1722
2086
|
url: '/negotiations/response',
|
|
1723
2087
|
params: args,
|
|
@@ -1728,9 +2092,13 @@ mcpServer.tool('get-collection-negotiations-list', `Negotiation list of the coll
|
|
|
1728
2092
|
return handleError(error);
|
|
1729
2093
|
}
|
|
1730
2094
|
});
|
|
1731
|
-
mcpServer.tool('invite-applicant-to-vacancy', `Invite applicant for a vacancy`, {}, async (args) => {
|
|
2095
|
+
mcpServer.tool('invite-applicant-to-vacancy', `Invite applicant for a vacancy`, {}, async (args, extra) => {
|
|
1732
2096
|
try {
|
|
2097
|
+
// Extract authorization token from HTTP request headers
|
|
2098
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2099
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1733
2100
|
const response = await apiClient.request({
|
|
2101
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1734
2102
|
method: 'POST',
|
|
1735
2103
|
url: '/negotiations/phone_interview',
|
|
1736
2104
|
data: args,
|
|
@@ -1743,11 +2111,15 @@ mcpServer.tool('invite-applicant-to-vacancy', `Invite applicant for a vacancy`,
|
|
|
1743
2111
|
});
|
|
1744
2112
|
mcpServer.tool('get-negotiation-test-results', `Get test results attached to the vacancy`, {
|
|
1745
2113
|
nid: z.string(),
|
|
1746
|
-
}, async (args) => {
|
|
2114
|
+
}, async (args, extra) => {
|
|
1747
2115
|
try {
|
|
1748
2116
|
const { nid, ...queryParams } = args;
|
|
1749
2117
|
const url = `/negotiations/${nid}/test/solution`;
|
|
2118
|
+
// Extract authorization token from HTTP request headers
|
|
2119
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2120
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1750
2121
|
const response = await apiClient.request({
|
|
2122
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1751
2123
|
method: 'GET',
|
|
1752
2124
|
url: url,
|
|
1753
2125
|
params: queryParams,
|
|
@@ -1761,11 +2133,15 @@ mcpServer.tool('get-negotiation-test-results', `Get test results attached to the
|
|
|
1761
2133
|
mcpServer.tool('edit-negotiation-message', `Edit messages in the response`, {
|
|
1762
2134
|
nid: z.string(),
|
|
1763
2135
|
mid: z.string(),
|
|
1764
|
-
}, async (args) => {
|
|
2136
|
+
}, async (args, extra) => {
|
|
1765
2137
|
try {
|
|
1766
2138
|
const { nid, mid, ...requestData } = args;
|
|
1767
2139
|
const url = `/negotiations/${nid}/messages/${mid}`;
|
|
2140
|
+
// Extract authorization token from HTTP request headers
|
|
2141
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2142
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1768
2143
|
const response = await apiClient.request({
|
|
2144
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1769
2145
|
method: 'PUT',
|
|
1770
2146
|
url: url,
|
|
1771
2147
|
data: requestData,
|
|
@@ -1776,9 +2152,13 @@ mcpServer.tool('edit-negotiation-message', `Edit messages in the response`, {
|
|
|
1776
2152
|
return handleError(error);
|
|
1777
2153
|
}
|
|
1778
2154
|
});
|
|
1779
|
-
mcpServer.tool('post-negotiations-topics-read', `Mark responses as read`, {}, async (args) => {
|
|
2155
|
+
mcpServer.tool('post-negotiations-topics-read', `Mark responses as read`, {}, async (args, extra) => {
|
|
1780
2156
|
try {
|
|
2157
|
+
// Extract authorization token from HTTP request headers
|
|
2158
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2159
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1781
2160
|
const response = await apiClient.request({
|
|
2161
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1782
2162
|
method: 'POST',
|
|
1783
2163
|
url: '/negotiations/read',
|
|
1784
2164
|
data: args,
|
|
@@ -1792,11 +2172,15 @@ mcpServer.tool('post-negotiations-topics-read', `Mark responses as read`, {}, as
|
|
|
1792
2172
|
mcpServer.tool('hide-active-response', `Hide response`, {
|
|
1793
2173
|
nid: z.string(),
|
|
1794
2174
|
with_decline_message: z.string().optional(),
|
|
1795
|
-
}, async (args) => {
|
|
2175
|
+
}, async (args, extra) => {
|
|
1796
2176
|
try {
|
|
1797
2177
|
const { nid, ...queryParams } = args;
|
|
1798
2178
|
const url = `/negotiations/active/${nid}`;
|
|
2179
|
+
// Extract authorization token from HTTP request headers
|
|
2180
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2181
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1799
2182
|
const response = await apiClient.request({
|
|
2183
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1800
2184
|
method: 'DELETE',
|
|
1801
2185
|
url: url,
|
|
1802
2186
|
params: queryParams,
|
|
@@ -1809,11 +2193,15 @@ mcpServer.tool('hide-active-response', `Hide response`, {
|
|
|
1809
2193
|
});
|
|
1810
2194
|
mcpServer.tool('get-negotiation-item', `Viewing the response/invitation`, {
|
|
1811
2195
|
id: z.string(),
|
|
1812
|
-
}, async (args) => {
|
|
2196
|
+
}, async (args, extra) => {
|
|
1813
2197
|
try {
|
|
1814
2198
|
const { id, ...queryParams } = args;
|
|
1815
2199
|
const url = `/negotiations/${id}`;
|
|
2200
|
+
// Extract authorization token from HTTP request headers
|
|
2201
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2202
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1816
2203
|
const response = await apiClient.request({
|
|
2204
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1817
2205
|
method: 'GET',
|
|
1818
2206
|
url: url,
|
|
1819
2207
|
params: queryParams,
|
|
@@ -1826,11 +2214,15 @@ mcpServer.tool('get-negotiation-item', `Viewing the response/invitation`, {
|
|
|
1826
2214
|
});
|
|
1827
2215
|
mcpServer.tool('put-negotiations-collection-to-next-state', `Actions with responses/invitations`, {
|
|
1828
2216
|
id: z.string(),
|
|
1829
|
-
}, async (args) => {
|
|
2217
|
+
}, async (args, extra) => {
|
|
1830
2218
|
try {
|
|
1831
2219
|
const { id, ...requestData } = args;
|
|
1832
2220
|
const url = `/negotiations/${id}`;
|
|
2221
|
+
// Extract authorization token from HTTP request headers
|
|
2222
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2223
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1833
2224
|
const response = await apiClient.request({
|
|
2225
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1834
2226
|
method: 'PUT',
|
|
1835
2227
|
url: url,
|
|
1836
2228
|
data: requestData,
|
|
@@ -1843,11 +2235,15 @@ mcpServer.tool('put-negotiations-collection-to-next-state', `Actions with respon
|
|
|
1843
2235
|
});
|
|
1844
2236
|
mcpServer.tool('get-negotiations-statistics-employer', `Negotiation statistics for the company`, {
|
|
1845
2237
|
employer_id: z.string(),
|
|
1846
|
-
}, async (args) => {
|
|
2238
|
+
}, async (args, extra) => {
|
|
1847
2239
|
try {
|
|
1848
2240
|
const { employer_id, ...queryParams } = args;
|
|
1849
2241
|
const url = `/employers/${employer_id}/negotiations_statistics`;
|
|
2242
|
+
// Extract authorization token from HTTP request headers
|
|
2243
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2244
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1850
2245
|
const response = await apiClient.request({
|
|
2246
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1851
2247
|
method: 'GET',
|
|
1852
2248
|
url: url,
|
|
1853
2249
|
params: queryParams,
|
|
@@ -1860,11 +2256,15 @@ mcpServer.tool('get-negotiations-statistics-employer', `Negotiation statistics f
|
|
|
1860
2256
|
});
|
|
1861
2257
|
mcpServer.tool('send-negotiation-message', `Sending new message`, {
|
|
1862
2258
|
nid: z.string(),
|
|
1863
|
-
}, async (args) => {
|
|
2259
|
+
}, async (args, extra) => {
|
|
1864
2260
|
try {
|
|
1865
2261
|
const { nid, ...requestData } = args;
|
|
1866
2262
|
const url = `/negotiations/${nid}/messages`;
|
|
2263
|
+
// Extract authorization token from HTTP request headers
|
|
2264
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2265
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1867
2266
|
const response = await apiClient.request({
|
|
2267
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1868
2268
|
method: 'POST',
|
|
1869
2269
|
url: url,
|
|
1870
2270
|
data: requestData,
|
|
@@ -1878,11 +2278,15 @@ mcpServer.tool('send-negotiation-message', `Sending new message`, {
|
|
|
1878
2278
|
mcpServer.tool('get-negotiation-messages', `View the list of messages in the negotiation`, {
|
|
1879
2279
|
nid: z.string(),
|
|
1880
2280
|
with_text_only: z.string().optional(),
|
|
1881
|
-
}, async (args) => {
|
|
2281
|
+
}, async (args, extra) => {
|
|
1882
2282
|
try {
|
|
1883
2283
|
const { nid, ...queryParams } = args;
|
|
1884
2284
|
const url = `/negotiations/${nid}/messages`;
|
|
2285
|
+
// Extract authorization token from HTTP request headers
|
|
2286
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2287
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1885
2288
|
const response = await apiClient.request({
|
|
2289
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1886
2290
|
method: 'GET',
|
|
1887
2291
|
url: url,
|
|
1888
2292
|
params: queryParams,
|
|
@@ -1895,11 +2299,15 @@ mcpServer.tool('get-negotiation-messages', `View the list of messages in the neg
|
|
|
1895
2299
|
});
|
|
1896
2300
|
mcpServer.tool('get-vacancy-draft', `Obtaining a vacancy draft`, {
|
|
1897
2301
|
draft_id: z.string(),
|
|
1898
|
-
}, async (args) => {
|
|
2302
|
+
}, async (args, extra) => {
|
|
1899
2303
|
try {
|
|
1900
2304
|
const { draft_id, ...queryParams } = args;
|
|
1901
2305
|
const url = `/vacancies/drafts/${draft_id}`;
|
|
2306
|
+
// Extract authorization token from HTTP request headers
|
|
2307
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2308
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1902
2309
|
const response = await apiClient.request({
|
|
2310
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1903
2311
|
method: 'GET',
|
|
1904
2312
|
url: url,
|
|
1905
2313
|
params: queryParams,
|
|
@@ -1912,11 +2320,15 @@ mcpServer.tool('get-vacancy-draft', `Obtaining a vacancy draft`, {
|
|
|
1912
2320
|
});
|
|
1913
2321
|
mcpServer.tool('change-vacancy-draft', `Editing a vacancy draft`, {
|
|
1914
2322
|
draft_id: z.string(),
|
|
1915
|
-
}, async (args) => {
|
|
2323
|
+
}, async (args, extra) => {
|
|
1916
2324
|
try {
|
|
1917
2325
|
const { draft_id, ...requestData } = args;
|
|
1918
2326
|
const url = `/vacancies/drafts/${draft_id}`;
|
|
2327
|
+
// Extract authorization token from HTTP request headers
|
|
2328
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2329
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1919
2330
|
const response = await apiClient.request({
|
|
2331
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1920
2332
|
method: 'PUT',
|
|
1921
2333
|
url: url,
|
|
1922
2334
|
data: requestData,
|
|
@@ -1929,11 +2341,15 @@ mcpServer.tool('change-vacancy-draft', `Editing a vacancy draft`, {
|
|
|
1929
2341
|
});
|
|
1930
2342
|
mcpServer.tool('delete-vacancy-draft', `Deleting a vacancy draft`, {
|
|
1931
2343
|
draft_id: z.string(),
|
|
1932
|
-
}, async (args) => {
|
|
2344
|
+
}, async (args, extra) => {
|
|
1933
2345
|
try {
|
|
1934
2346
|
const { draft_id, ...queryParams } = args;
|
|
1935
2347
|
const url = `/vacancies/drafts/${draft_id}`;
|
|
2348
|
+
// Extract authorization token from HTTP request headers
|
|
2349
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2350
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1936
2351
|
const response = await apiClient.request({
|
|
2352
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1937
2353
|
method: 'DELETE',
|
|
1938
2354
|
url: url,
|
|
1939
2355
|
params: queryParams,
|
|
@@ -1946,11 +2362,15 @@ mcpServer.tool('delete-vacancy-draft', `Deleting a vacancy draft`, {
|
|
|
1946
2362
|
});
|
|
1947
2363
|
mcpServer.tool('publish-vacancy-from-draft', `Publishing a vacancy from draft`, {
|
|
1948
2364
|
draft_id: z.string(),
|
|
1949
|
-
}, async (args) => {
|
|
2365
|
+
}, async (args, extra) => {
|
|
1950
2366
|
try {
|
|
1951
2367
|
const { draft_id, ...requestData } = args;
|
|
1952
2368
|
const url = `/vacancies/drafts/${draft_id}/publish`;
|
|
2369
|
+
// Extract authorization token from HTTP request headers
|
|
2370
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2371
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1953
2372
|
const response = await apiClient.request({
|
|
2373
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1954
2374
|
method: 'POST',
|
|
1955
2375
|
url: url,
|
|
1956
2376
|
data: requestData,
|
|
@@ -1963,11 +2383,15 @@ mcpServer.tool('publish-vacancy-from-draft', `Publishing a vacancy from draft`,
|
|
|
1963
2383
|
});
|
|
1964
2384
|
mcpServer.tool('search-for-vacancy-draft-duplicates', `Checking for duplicates of a vacancy draft`, {
|
|
1965
2385
|
draft_id: z.string(),
|
|
1966
|
-
}, async (args) => {
|
|
2386
|
+
}, async (args, extra) => {
|
|
1967
2387
|
try {
|
|
1968
2388
|
const { draft_id, ...queryParams } = args;
|
|
1969
2389
|
const url = `/vacancies/drafts/${draft_id}/duplicates`;
|
|
2390
|
+
// Extract authorization token from HTTP request headers
|
|
2391
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2392
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1970
2393
|
const response = await apiClient.request({
|
|
2394
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1971
2395
|
method: 'GET',
|
|
1972
2396
|
url: url,
|
|
1973
2397
|
params: queryParams,
|
|
@@ -1978,9 +2402,13 @@ mcpServer.tool('search-for-vacancy-draft-duplicates', `Checking for duplicates o
|
|
|
1978
2402
|
return handleError(error);
|
|
1979
2403
|
}
|
|
1980
2404
|
});
|
|
1981
|
-
mcpServer.tool('create-vacancy-draft', `Creating vacancy draft`, {}, async (args) => {
|
|
2405
|
+
mcpServer.tool('create-vacancy-draft', `Creating vacancy draft`, {}, async (args, extra) => {
|
|
1982
2406
|
try {
|
|
2407
|
+
// Extract authorization token from HTTP request headers
|
|
2408
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2409
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1983
2410
|
const response = await apiClient.request({
|
|
2411
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
1984
2412
|
method: 'POST',
|
|
1985
2413
|
url: '/vacancies/drafts',
|
|
1986
2414
|
data: args,
|
|
@@ -1994,9 +2422,13 @@ mcpServer.tool('create-vacancy-draft', `Creating vacancy draft`, {}, async (args
|
|
|
1994
2422
|
mcpServer.tool('get-vacancy-draft-list', `Getting a list of vacancy drafts`, {
|
|
1995
2423
|
page: z.string().optional(),
|
|
1996
2424
|
per_page: z.string().optional(),
|
|
1997
|
-
}, async (args) => {
|
|
2425
|
+
}, async (args, extra) => {
|
|
1998
2426
|
try {
|
|
2427
|
+
// Extract authorization token from HTTP request headers
|
|
2428
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2429
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
1999
2430
|
const response = await apiClient.request({
|
|
2431
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2000
2432
|
method: 'GET',
|
|
2001
2433
|
url: '/vacancies/drafts',
|
|
2002
2434
|
params: args,
|
|
@@ -2009,9 +2441,13 @@ mcpServer.tool('get-vacancy-draft-list', `Getting a list of vacancy drafts`, {
|
|
|
2009
2441
|
});
|
|
2010
2442
|
mcpServer.tool('disable-automatic-vacancy-publication', `Canceling vacancy auto publication`, {
|
|
2011
2443
|
draft_id: z.string(),
|
|
2012
|
-
}, async (args) => {
|
|
2444
|
+
}, async (args, extra) => {
|
|
2013
2445
|
try {
|
|
2446
|
+
// Extract authorization token from HTTP request headers
|
|
2447
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2448
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2014
2449
|
const response = await apiClient.request({
|
|
2450
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2015
2451
|
method: 'DELETE',
|
|
2016
2452
|
url: '/vacancies/auto_publication',
|
|
2017
2453
|
params: args,
|
|
@@ -2024,11 +2460,15 @@ mcpServer.tool('disable-automatic-vacancy-publication', `Canceling vacancy auto
|
|
|
2024
2460
|
});
|
|
2025
2461
|
mcpServer.tool('change-webhook-subscription', `Change a subscription on notifications`, {
|
|
2026
2462
|
subscription_id: z.string(),
|
|
2027
|
-
}, async (args) => {
|
|
2463
|
+
}, async (args, extra) => {
|
|
2028
2464
|
try {
|
|
2029
2465
|
const { subscription_id, ...requestData } = args;
|
|
2030
2466
|
const url = `/webhook/subscriptions/${subscription_id}`;
|
|
2467
|
+
// Extract authorization token from HTTP request headers
|
|
2468
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2469
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2031
2470
|
const response = await apiClient.request({
|
|
2471
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2032
2472
|
method: 'PUT',
|
|
2033
2473
|
url: url,
|
|
2034
2474
|
data: requestData,
|
|
@@ -2041,11 +2481,15 @@ mcpServer.tool('change-webhook-subscription', `Change a subscription on notifica
|
|
|
2041
2481
|
});
|
|
2042
2482
|
mcpServer.tool('cancel-webhook-subscription', `Delete a subscription on notifications`, {
|
|
2043
2483
|
subscription_id: z.string(),
|
|
2044
|
-
}, async (args) => {
|
|
2484
|
+
}, async (args, extra) => {
|
|
2045
2485
|
try {
|
|
2046
2486
|
const { subscription_id, ...queryParams } = args;
|
|
2047
2487
|
const url = `/webhook/subscriptions/${subscription_id}`;
|
|
2488
|
+
// Extract authorization token from HTTP request headers
|
|
2489
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2490
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2048
2491
|
const response = await apiClient.request({
|
|
2492
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2049
2493
|
method: 'DELETE',
|
|
2050
2494
|
url: url,
|
|
2051
2495
|
params: queryParams,
|
|
@@ -2056,9 +2500,13 @@ mcpServer.tool('cancel-webhook-subscription', `Delete a subscription on notifica
|
|
|
2056
2500
|
return handleError(error);
|
|
2057
2501
|
}
|
|
2058
2502
|
});
|
|
2059
|
-
mcpServer.tool('post-webhook-subscription', `Subscription to notifications`, {}, async (args) => {
|
|
2503
|
+
mcpServer.tool('post-webhook-subscription', `Subscription to notifications`, {}, async (args, extra) => {
|
|
2060
2504
|
try {
|
|
2505
|
+
// Extract authorization token from HTTP request headers
|
|
2506
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2507
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2061
2508
|
const response = await apiClient.request({
|
|
2509
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2062
2510
|
method: 'POST',
|
|
2063
2511
|
url: '/webhook/subscriptions',
|
|
2064
2512
|
data: args,
|
|
@@ -2069,9 +2517,13 @@ mcpServer.tool('post-webhook-subscription', `Subscription to notifications`, {},
|
|
|
2069
2517
|
return handleError(error);
|
|
2070
2518
|
}
|
|
2071
2519
|
});
|
|
2072
|
-
mcpServer.tool('get-webhook-subscriptions', `Obtain the list of notifications that the user is subscripted`, {}, async (args) => {
|
|
2520
|
+
mcpServer.tool('get-webhook-subscriptions', `Obtain the list of notifications that the user is subscripted`, {}, async (args, extra) => {
|
|
2073
2521
|
try {
|
|
2522
|
+
// Extract authorization token from HTTP request headers
|
|
2523
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2524
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2074
2525
|
const response = await apiClient.request({
|
|
2526
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2075
2527
|
method: 'GET',
|
|
2076
2528
|
url: '/webhook/subscriptions',
|
|
2077
2529
|
params: args,
|
|
@@ -2084,11 +2536,15 @@ mcpServer.tool('get-webhook-subscriptions', `Obtain the list of notifications th
|
|
|
2084
2536
|
});
|
|
2085
2537
|
mcpServer.tool('get-tests-dictionary', `Employer's test directory`, {
|
|
2086
2538
|
employer_id: z.string(),
|
|
2087
|
-
}, async (args) => {
|
|
2539
|
+
}, async (args, extra) => {
|
|
2088
2540
|
try {
|
|
2089
2541
|
const { employer_id, ...queryParams } = args;
|
|
2090
2542
|
const url = `/employers/${employer_id}/tests`;
|
|
2543
|
+
// Extract authorization token from HTTP request headers
|
|
2544
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2545
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2091
2546
|
const response = await apiClient.request({
|
|
2547
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2092
2548
|
method: 'GET',
|
|
2093
2549
|
url: url,
|
|
2094
2550
|
params: queryParams,
|
|
@@ -2101,11 +2557,15 @@ mcpServer.tool('get-tests-dictionary', `Employer's test directory`, {
|
|
|
2101
2557
|
});
|
|
2102
2558
|
mcpServer.tool('get-employer-vacancy-areas', `List of regions with active vacancies`, {
|
|
2103
2559
|
employer_id: z.string(),
|
|
2104
|
-
}, async (args) => {
|
|
2560
|
+
}, async (args, extra) => {
|
|
2105
2561
|
try {
|
|
2106
2562
|
const { employer_id, ...queryParams } = args;
|
|
2107
2563
|
const url = `/employers/${employer_id}/vacancy_areas/active`;
|
|
2564
|
+
// Extract authorization token from HTTP request headers
|
|
2565
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2566
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2108
2567
|
const response = await apiClient.request({
|
|
2568
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2109
2569
|
method: 'GET',
|
|
2110
2570
|
url: url,
|
|
2111
2571
|
params: queryParams,
|
|
@@ -2118,11 +2578,15 @@ mcpServer.tool('get-employer-vacancy-areas', `List of regions with active vacanc
|
|
|
2118
2578
|
});
|
|
2119
2579
|
mcpServer.tool('get-employer-info', `Employer info`, {
|
|
2120
2580
|
employer_id: z.string(),
|
|
2121
|
-
}, async (args) => {
|
|
2581
|
+
}, async (args, extra) => {
|
|
2122
2582
|
try {
|
|
2123
2583
|
const { employer_id, ...queryParams } = args;
|
|
2124
2584
|
const url = `/employers/${employer_id}`;
|
|
2585
|
+
// Extract authorization token from HTTP request headers
|
|
2586
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2587
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2125
2588
|
const response = await apiClient.request({
|
|
2589
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2126
2590
|
method: 'GET',
|
|
2127
2591
|
url: url,
|
|
2128
2592
|
params: queryParams,
|
|
@@ -2135,11 +2599,15 @@ mcpServer.tool('get-employer-info', `Employer info`, {
|
|
|
2135
2599
|
});
|
|
2136
2600
|
mcpServer.tool('add-employer-to-blacklisted', `Adding an employer to the blacklist`, {
|
|
2137
2601
|
employer_id: z.string(),
|
|
2138
|
-
}, async (args) => {
|
|
2602
|
+
}, async (args, extra) => {
|
|
2139
2603
|
try {
|
|
2140
2604
|
const { employer_id, ...requestData } = args;
|
|
2141
2605
|
const url = `/employers/blacklisted/${employer_id}`;
|
|
2606
|
+
// Extract authorization token from HTTP request headers
|
|
2607
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2608
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2142
2609
|
const response = await apiClient.request({
|
|
2610
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2143
2611
|
method: 'PUT',
|
|
2144
2612
|
url: url,
|
|
2145
2613
|
data: requestData,
|
|
@@ -2152,11 +2620,15 @@ mcpServer.tool('add-employer-to-blacklisted', `Adding an employer to the blackli
|
|
|
2152
2620
|
});
|
|
2153
2621
|
mcpServer.tool('delete-employer-from-blacklisted', `Deleting an employer from the blacklist`, {
|
|
2154
2622
|
employer_id: z.string(),
|
|
2155
|
-
}, async (args) => {
|
|
2623
|
+
}, async (args, extra) => {
|
|
2156
2624
|
try {
|
|
2157
2625
|
const { employer_id, ...queryParams } = args;
|
|
2158
2626
|
const url = `/employers/blacklisted/${employer_id}`;
|
|
2627
|
+
// Extract authorization token from HTTP request headers
|
|
2628
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2629
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2159
2630
|
const response = await apiClient.request({
|
|
2631
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2160
2632
|
method: 'DELETE',
|
|
2161
2633
|
url: url,
|
|
2162
2634
|
params: queryParams,
|
|
@@ -2175,9 +2647,13 @@ mcpServer.tool('search-employer', `Employer search`, {
|
|
|
2175
2647
|
sort_by: z.string().optional(),
|
|
2176
2648
|
page: z.string().optional(),
|
|
2177
2649
|
per_page: z.string().optional(),
|
|
2178
|
-
}, async (args) => {
|
|
2650
|
+
}, async (args, extra) => {
|
|
2179
2651
|
try {
|
|
2652
|
+
// Extract authorization token from HTTP request headers
|
|
2653
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2654
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2180
2655
|
const response = await apiClient.request({
|
|
2656
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2181
2657
|
method: 'GET',
|
|
2182
2658
|
url: '/employers',
|
|
2183
2659
|
params: args,
|
|
@@ -2190,11 +2666,15 @@ mcpServer.tool('search-employer', `Employer search`, {
|
|
|
2190
2666
|
});
|
|
2191
2667
|
mcpServer.tool('get-employer-departments', `Employer's department directory`, {
|
|
2192
2668
|
employer_id: z.string(),
|
|
2193
|
-
}, async (args) => {
|
|
2669
|
+
}, async (args, extra) => {
|
|
2194
2670
|
try {
|
|
2195
2671
|
const { employer_id, ...queryParams } = args;
|
|
2196
2672
|
const url = `/employers/${employer_id}/departments`;
|
|
2673
|
+
// Extract authorization token from HTTP request headers
|
|
2674
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2675
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2197
2676
|
const response = await apiClient.request({
|
|
2677
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2198
2678
|
method: 'GET',
|
|
2199
2679
|
url: url,
|
|
2200
2680
|
params: queryParams,
|
|
@@ -2207,11 +2687,15 @@ mcpServer.tool('get-employer-departments', `Employer's department directory
|
|
|
2207
2687
|
});
|
|
2208
2688
|
mcpServer.tool('get-vacancy-branded-templates-list', `Employer's branded vacancy templates`, {
|
|
2209
2689
|
employer_id: z.string(),
|
|
2210
|
-
}, async (args) => {
|
|
2690
|
+
}, async (args, extra) => {
|
|
2211
2691
|
try {
|
|
2212
2692
|
const { employer_id, ...queryParams } = args;
|
|
2213
2693
|
const url = `/employers/${employer_id}/vacancy_branded_templates`;
|
|
2694
|
+
// Extract authorization token from HTTP request headers
|
|
2695
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2696
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2214
2697
|
const response = await apiClient.request({
|
|
2698
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2215
2699
|
method: 'GET',
|
|
2216
2700
|
url: url,
|
|
2217
2701
|
params: queryParams,
|
|
@@ -2222,9 +2706,13 @@ mcpServer.tool('get-vacancy-branded-templates-list', `Employer's branded va
|
|
|
2222
2706
|
return handleError(error);
|
|
2223
2707
|
}
|
|
2224
2708
|
});
|
|
2225
|
-
mcpServer.tool('get-blacklisted-employers', `List of hidden employers`, {}, async (args) => {
|
|
2709
|
+
mcpServer.tool('get-blacklisted-employers', `List of hidden employers`, {}, async (args, extra) => {
|
|
2226
2710
|
try {
|
|
2711
|
+
// Extract authorization token from HTTP request headers
|
|
2712
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2713
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2227
2714
|
const response = await apiClient.request({
|
|
2715
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2228
2716
|
method: 'GET',
|
|
2229
2717
|
url: '/employers/blacklisted',
|
|
2230
2718
|
params: args,
|
|
@@ -2235,9 +2723,13 @@ mcpServer.tool('get-blacklisted-employers', `List of hidden employers`, {}, asyn
|
|
|
2235
2723
|
return handleError(error);
|
|
2236
2724
|
}
|
|
2237
2725
|
});
|
|
2238
|
-
mcpServer.tool('get-all-districts', `List of available city districts`, {}, async (args) => {
|
|
2726
|
+
mcpServer.tool('get-all-districts', `List of available city districts`, {}, async (args, extra) => {
|
|
2239
2727
|
try {
|
|
2728
|
+
// Extract authorization token from HTTP request headers
|
|
2729
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2730
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2240
2731
|
const response = await apiClient.request({
|
|
2732
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2241
2733
|
method: 'GET',
|
|
2242
2734
|
url: '/districts',
|
|
2243
2735
|
params: args,
|
|
@@ -2256,11 +2748,15 @@ mcpServer.tool('get-salary-evaluation', `Salary assessment without forecasts`, {
|
|
|
2256
2748
|
speciality: z.string().optional(),
|
|
2257
2749
|
extend_sources: z.string().optional(),
|
|
2258
2750
|
position_name: z.string().optional(),
|
|
2259
|
-
}, async (args) => {
|
|
2751
|
+
}, async (args, extra) => {
|
|
2260
2752
|
try {
|
|
2261
2753
|
const { area_id, ...queryParams } = args;
|
|
2262
2754
|
const url = `/salary_statistics/paid/salary_evaluation/${area_id}`;
|
|
2755
|
+
// Extract authorization token from HTTP request headers
|
|
2756
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2757
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2263
2758
|
const response = await apiClient.request({
|
|
2759
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2264
2760
|
method: 'GET',
|
|
2265
2761
|
url: url,
|
|
2266
2762
|
params: queryParams,
|
|
@@ -2271,9 +2767,13 @@ mcpServer.tool('get-salary-evaluation', `Salary assessment without forecasts`, {
|
|
|
2271
2767
|
return handleError(error);
|
|
2272
2768
|
}
|
|
2273
2769
|
});
|
|
2274
|
-
mcpServer.tool('get-metro-stations', `The list of metro stations in all cities`, {}, async (args) => {
|
|
2770
|
+
mcpServer.tool('get-metro-stations', `The list of metro stations in all cities`, {}, async (args, extra) => {
|
|
2275
2771
|
try {
|
|
2772
|
+
// Extract authorization token from HTTP request headers
|
|
2773
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2774
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2276
2775
|
const response = await apiClient.request({
|
|
2776
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2277
2777
|
method: 'GET',
|
|
2278
2778
|
url: '/metro',
|
|
2279
2779
|
params: args,
|
|
@@ -2286,11 +2786,15 @@ mcpServer.tool('get-metro-stations', `The list of metro stations in all cities`,
|
|
|
2286
2786
|
});
|
|
2287
2787
|
mcpServer.tool('get-metro-stations-in-city', `The list of metro stations in the specified city`, {
|
|
2288
2788
|
city_id: z.string(),
|
|
2289
|
-
}, async (args) => {
|
|
2789
|
+
}, async (args, extra) => {
|
|
2290
2790
|
try {
|
|
2291
2791
|
const { city_id, ...queryParams } = args;
|
|
2292
2792
|
const url = `/metro/${city_id}`;
|
|
2793
|
+
// Extract authorization token from HTTP request headers
|
|
2794
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2795
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2293
2796
|
const response = await apiClient.request({
|
|
2797
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2294
2798
|
method: 'GET',
|
|
2295
2799
|
url: url,
|
|
2296
2800
|
params: queryParams,
|
|
@@ -2304,11 +2808,15 @@ mcpServer.tool('get-metro-stations-in-city', `The list of metro stations in the
|
|
|
2304
2808
|
mcpServer.tool('move-saved-resume-search', `Moving saved resumes search to other manager`, {
|
|
2305
2809
|
saved_search_id: z.string(),
|
|
2306
2810
|
manager_id: z.string(),
|
|
2307
|
-
}, async (args) => {
|
|
2811
|
+
}, async (args, extra) => {
|
|
2308
2812
|
try {
|
|
2309
2813
|
const { saved_search_id, manager_id, ...requestData } = args;
|
|
2310
2814
|
const url = `/saved_searches/resumes/${saved_search_id}/managers/${manager_id}`;
|
|
2815
|
+
// Extract authorization token from HTTP request headers
|
|
2816
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2817
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2311
2818
|
const response = await apiClient.request({
|
|
2819
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2312
2820
|
method: 'PUT',
|
|
2313
2821
|
url: url,
|
|
2314
2822
|
data: requestData,
|
|
@@ -2321,11 +2829,15 @@ mcpServer.tool('move-saved-resume-search', `Moving saved resumes search to other
|
|
|
2321
2829
|
});
|
|
2322
2830
|
mcpServer.tool('get-resumes-by-status', `Resumes grouped by the possibility of application for a given job`, {
|
|
2323
2831
|
vacancy_id: z.string(),
|
|
2324
|
-
}, async (args) => {
|
|
2832
|
+
}, async (args, extra) => {
|
|
2325
2833
|
try {
|
|
2326
2834
|
const { vacancy_id, ...queryParams } = args;
|
|
2327
2835
|
const url = `/vacancies/${vacancy_id}/resumes_by_status`;
|
|
2836
|
+
// Extract authorization token from HTTP request headers
|
|
2837
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2838
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2328
2839
|
const response = await apiClient.request({
|
|
2840
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2329
2841
|
method: 'GET',
|
|
2330
2842
|
url: url,
|
|
2331
2843
|
params: queryParams,
|
|
@@ -2338,11 +2850,15 @@ mcpServer.tool('get-resumes-by-status', `Resumes grouped by the possibility of a
|
|
|
2338
2850
|
});
|
|
2339
2851
|
mcpServer.tool('get-resume-status', `Resume status and readiness for publication`, {
|
|
2340
2852
|
resume_id: z.string(),
|
|
2341
|
-
}, async (args) => {
|
|
2853
|
+
}, async (args, extra) => {
|
|
2342
2854
|
try {
|
|
2343
2855
|
const { resume_id, ...queryParams } = args;
|
|
2344
2856
|
const url = `/resumes/${resume_id}/status`;
|
|
2857
|
+
// Extract authorization token from HTTP request headers
|
|
2858
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2859
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2345
2860
|
const response = await apiClient.request({
|
|
2861
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2346
2862
|
method: 'GET',
|
|
2347
2863
|
url: url,
|
|
2348
2864
|
params: queryParams,
|
|
@@ -2355,11 +2871,15 @@ mcpServer.tool('get-resume-status', `Resume status and readiness for publication
|
|
|
2355
2871
|
});
|
|
2356
2872
|
mcpServer.tool('get-resume-negotiations-history', `History of responses/invitations for a resume`, {
|
|
2357
2873
|
resume_id: z.string(),
|
|
2358
|
-
}, async (args) => {
|
|
2874
|
+
}, async (args, extra) => {
|
|
2359
2875
|
try {
|
|
2360
2876
|
const { resume_id, ...queryParams } = args;
|
|
2361
2877
|
const url = `/resumes/${resume_id}/negotiations_history`;
|
|
2878
|
+
// Extract authorization token from HTTP request headers
|
|
2879
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2880
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2362
2881
|
const response = await apiClient.request({
|
|
2882
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2363
2883
|
method: 'GET',
|
|
2364
2884
|
url: url,
|
|
2365
2885
|
params: queryParams,
|
|
@@ -2372,11 +2892,15 @@ mcpServer.tool('get-resume-negotiations-history', `History of responses/invitati
|
|
|
2372
2892
|
});
|
|
2373
2893
|
mcpServer.tool('get-saved-resume-search', `Getting single saved resume search`, {
|
|
2374
2894
|
id: z.string(),
|
|
2375
|
-
}, async (args) => {
|
|
2895
|
+
}, async (args, extra) => {
|
|
2376
2896
|
try {
|
|
2377
2897
|
const { id, ...queryParams } = args;
|
|
2378
2898
|
const url = `/saved_searches/resumes/${id}`;
|
|
2899
|
+
// Extract authorization token from HTTP request headers
|
|
2900
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2901
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2379
2902
|
const response = await apiClient.request({
|
|
2903
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2380
2904
|
method: 'GET',
|
|
2381
2905
|
url: url,
|
|
2382
2906
|
params: queryParams,
|
|
@@ -2391,11 +2915,15 @@ mcpServer.tool('update-saved-resume-search', `Updating saved resume search`, {
|
|
|
2391
2915
|
id: z.string(),
|
|
2392
2916
|
name: z.string().optional(),
|
|
2393
2917
|
subscription: z.string().optional(),
|
|
2394
|
-
}, async (args) => {
|
|
2918
|
+
}, async (args, extra) => {
|
|
2395
2919
|
try {
|
|
2396
2920
|
const { id, ...requestData } = args;
|
|
2397
2921
|
const url = `/saved_searches/resumes/${id}`;
|
|
2922
|
+
// Extract authorization token from HTTP request headers
|
|
2923
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2924
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2398
2925
|
const response = await apiClient.request({
|
|
2926
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2399
2927
|
method: 'PUT',
|
|
2400
2928
|
url: url,
|
|
2401
2929
|
data: requestData,
|
|
@@ -2408,11 +2936,15 @@ mcpServer.tool('update-saved-resume-search', `Updating saved resume search`, {
|
|
|
2408
2936
|
});
|
|
2409
2937
|
mcpServer.tool('delete-saved-resume-search', `Deleting saved resume search`, {
|
|
2410
2938
|
id: z.string(),
|
|
2411
|
-
}, async (args) => {
|
|
2939
|
+
}, async (args, extra) => {
|
|
2412
2940
|
try {
|
|
2413
2941
|
const { id, ...queryParams } = args;
|
|
2414
2942
|
const url = `/saved_searches/resumes/${id}`;
|
|
2943
|
+
// Extract authorization token from HTTP request headers
|
|
2944
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2945
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2415
2946
|
const response = await apiClient.request({
|
|
2947
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2416
2948
|
method: 'DELETE',
|
|
2417
2949
|
url: url,
|
|
2418
2950
|
params: queryParams,
|
|
@@ -2425,9 +2957,13 @@ mcpServer.tool('delete-saved-resume-search', `Deleting saved resume search`, {
|
|
|
2425
2957
|
});
|
|
2426
2958
|
mcpServer.tool('create-resume', `Resume creating`, {
|
|
2427
2959
|
source_resume_id: z.string().optional(),
|
|
2428
|
-
}, async (args) => {
|
|
2960
|
+
}, async (args, extra) => {
|
|
2429
2961
|
try {
|
|
2962
|
+
// Extract authorization token from HTTP request headers
|
|
2963
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
2964
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2430
2965
|
const response = await apiClient.request({
|
|
2966
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2431
2967
|
method: 'POST',
|
|
2432
2968
|
url: '/resumes',
|
|
2433
2969
|
data: args,
|
|
@@ -2488,9 +3024,13 @@ mcpServer.tool('search-for-resumes', `Resume search`, {
|
|
|
2488
3024
|
search_by_vacancy_id: z.string().optional(),
|
|
2489
3025
|
last_used_timestamp: z.string().optional(),
|
|
2490
3026
|
last_used: z.string().optional(),
|
|
2491
|
-
}, async (args) => {
|
|
3027
|
+
}, async (args, extra) => {
|
|
2492
3028
|
try {
|
|
3029
|
+
// Extract authorization token from HTTP request headers
|
|
3030
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
3031
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2493
3032
|
const response = await apiClient.request({
|
|
3033
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2494
3034
|
method: 'GET',
|
|
2495
3035
|
url: '/resumes',
|
|
2496
3036
|
params: args,
|
|
@@ -2501,9 +3041,13 @@ mcpServer.tool('search-for-resumes', `Resume search`, {
|
|
|
2501
3041
|
return handleError(error);
|
|
2502
3042
|
}
|
|
2503
3043
|
});
|
|
2504
|
-
mcpServer.tool('get-mine-resumes', `List of resumes for current user`, {}, async (args) => {
|
|
3044
|
+
mcpServer.tool('get-mine-resumes', `List of resumes for current user`, {}, async (args, extra) => {
|
|
2505
3045
|
try {
|
|
3046
|
+
// Extract authorization token from HTTP request headers
|
|
3047
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
3048
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2506
3049
|
const response = await apiClient.request({
|
|
3050
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2507
3051
|
method: 'GET',
|
|
2508
3052
|
url: '/resumes/mine',
|
|
2509
3053
|
params: args,
|
|
@@ -2516,11 +3060,15 @@ mcpServer.tool('get-mine-resumes', `List of resumes for current user`, {}, async
|
|
|
2516
3060
|
});
|
|
2517
3061
|
mcpServer.tool('publish-resume', `Resume publication`, {
|
|
2518
3062
|
resume_id: z.string(),
|
|
2519
|
-
}, async (args) => {
|
|
3063
|
+
}, async (args, extra) => {
|
|
2520
3064
|
try {
|
|
2521
3065
|
const { resume_id, ...requestData } = args;
|
|
2522
3066
|
const url = `/resumes/${resume_id}/publish`;
|
|
3067
|
+
// Extract authorization token from HTTP request headers
|
|
3068
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
3069
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2523
3070
|
const response = await apiClient.request({
|
|
3071
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2524
3072
|
method: 'POST',
|
|
2525
3073
|
url: url,
|
|
2526
3074
|
data: requestData,
|
|
@@ -2531,9 +3079,13 @@ mcpServer.tool('publish-resume', `Resume publication`, {
|
|
|
2531
3079
|
return handleError(error);
|
|
2532
3080
|
}
|
|
2533
3081
|
});
|
|
2534
|
-
mcpServer.tool('get-new-resume-conditions', `Conditions to fill in the fields of a new resume`, {}, async (args) => {
|
|
3082
|
+
mcpServer.tool('get-new-resume-conditions', `Conditions to fill in the fields of a new resume`, {}, async (args, extra) => {
|
|
2535
3083
|
try {
|
|
3084
|
+
// Extract authorization token from HTTP request headers
|
|
3085
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
3086
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2536
3087
|
const response = await apiClient.request({
|
|
3088
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2537
3089
|
method: 'GET',
|
|
2538
3090
|
url: '/resume_conditions',
|
|
2539
3091
|
params: args,
|
|
@@ -2546,11 +3098,15 @@ mcpServer.tool('get-new-resume-conditions', `Conditions to fill in the fields of
|
|
|
2546
3098
|
});
|
|
2547
3099
|
mcpServer.tool('get-suitable-resumes', `List of resumes suitable for job application`, {
|
|
2548
3100
|
vacancy_id: z.string(),
|
|
2549
|
-
}, async (args) => {
|
|
3101
|
+
}, async (args, extra) => {
|
|
2550
3102
|
try {
|
|
2551
3103
|
const { vacancy_id, ...queryParams } = args;
|
|
2552
3104
|
const url = `/vacancies/${vacancy_id}/suitable_resumes`;
|
|
3105
|
+
// Extract authorization token from HTTP request headers
|
|
3106
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
3107
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2553
3108
|
const response = await apiClient.request({
|
|
3109
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2554
3110
|
method: 'GET',
|
|
2555
3111
|
url: url,
|
|
2556
3112
|
params: queryParams,
|
|
@@ -2563,11 +3119,15 @@ mcpServer.tool('get-suitable-resumes', `List of resumes suitable for job applica
|
|
|
2563
3119
|
});
|
|
2564
3120
|
mcpServer.tool('get-resume-conditions', `Conditions to fill in the fields of an existent resume`, {
|
|
2565
3121
|
resume_id: z.string(),
|
|
2566
|
-
}, async (args) => {
|
|
3122
|
+
}, async (args, extra) => {
|
|
2567
3123
|
try {
|
|
2568
3124
|
const { resume_id, ...queryParams } = args;
|
|
2569
3125
|
const url = `/resumes/${resume_id}/conditions`;
|
|
3126
|
+
// Extract authorization token from HTTP request headers
|
|
3127
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
3128
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2570
3129
|
const response = await apiClient.request({
|
|
3130
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2571
3131
|
method: 'GET',
|
|
2572
3132
|
url: url,
|
|
2573
3133
|
params: queryParams,
|
|
@@ -2581,11 +3141,15 @@ mcpServer.tool('get-resume-conditions', `Conditions to fill in the fields of an
|
|
|
2581
3141
|
mcpServer.tool('get-resume-view-history', `History of resume views`, {
|
|
2582
3142
|
resume_id: z.string(),
|
|
2583
3143
|
with_employer_logo: z.string().optional(),
|
|
2584
|
-
}, async (args) => {
|
|
3144
|
+
}, async (args, extra) => {
|
|
2585
3145
|
try {
|
|
2586
3146
|
const { resume_id, ...queryParams } = args;
|
|
2587
3147
|
const url = `/resumes/${resume_id}/views`;
|
|
3148
|
+
// Extract authorization token from HTTP request headers
|
|
3149
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
3150
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2588
3151
|
const response = await apiClient.request({
|
|
3152
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2589
3153
|
method: 'GET',
|
|
2590
3154
|
url: url,
|
|
2591
3155
|
params: queryParams,
|
|
@@ -2601,11 +3165,15 @@ mcpServer.tool('get-resume', `View a resume`, {
|
|
|
2601
3165
|
with_negotiations_history: z.string().optional(),
|
|
2602
3166
|
with_creds: z.string().optional(),
|
|
2603
3167
|
with_job_search_status: z.string().optional(),
|
|
2604
|
-
}, async (args) => {
|
|
3168
|
+
}, async (args, extra) => {
|
|
2605
3169
|
try {
|
|
2606
3170
|
const { resume_id, ...queryParams } = args;
|
|
2607
3171
|
const url = `/resumes/${resume_id}`;
|
|
3172
|
+
// Extract authorization token from HTTP request headers
|
|
3173
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
3174
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2608
3175
|
const response = await apiClient.request({
|
|
3176
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2609
3177
|
method: 'GET',
|
|
2610
3178
|
url: url,
|
|
2611
3179
|
params: queryParams,
|
|
@@ -2618,11 +3186,15 @@ mcpServer.tool('get-resume', `View a resume`, {
|
|
|
2618
3186
|
});
|
|
2619
3187
|
mcpServer.tool('delete-resume', `Deleting a resume`, {
|
|
2620
3188
|
resume_id: z.string(),
|
|
2621
|
-
}, async (args) => {
|
|
3189
|
+
}, async (args, extra) => {
|
|
2622
3190
|
try {
|
|
2623
3191
|
const { resume_id, ...queryParams } = args;
|
|
2624
3192
|
const url = `/resumes/${resume_id}`;
|
|
3193
|
+
// Extract authorization token from HTTP request headers
|
|
3194
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
3195
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2625
3196
|
const response = await apiClient.request({
|
|
3197
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2626
3198
|
method: 'DELETE',
|
|
2627
3199
|
url: url,
|
|
2628
3200
|
params: queryParams,
|
|
@@ -2635,11 +3207,15 @@ mcpServer.tool('delete-resume', `Deleting a resume`, {
|
|
|
2635
3207
|
});
|
|
2636
3208
|
mcpServer.tool('edit-resume', `Resume updating`, {
|
|
2637
3209
|
resume_id: z.string(),
|
|
2638
|
-
}, async (args) => {
|
|
3210
|
+
}, async (args, extra) => {
|
|
2639
3211
|
try {
|
|
2640
3212
|
const { resume_id, ...requestData } = args;
|
|
2641
3213
|
const url = `/resumes/${resume_id}`;
|
|
3214
|
+
// Extract authorization token from HTTP request headers
|
|
3215
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
3216
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2642
3217
|
const response = await apiClient.request({
|
|
3218
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2643
3219
|
method: 'PUT',
|
|
2644
3220
|
url: url,
|
|
2645
3221
|
data: requestData,
|
|
@@ -2650,9 +3226,13 @@ mcpServer.tool('edit-resume', `Resume updating`, {
|
|
|
2650
3226
|
return handleError(error);
|
|
2651
3227
|
}
|
|
2652
3228
|
});
|
|
2653
|
-
mcpServer.tool('get-resume-creation-availability', `Availability of resume creation`, {}, async (args) => {
|
|
3229
|
+
mcpServer.tool('get-resume-creation-availability', `Availability of resume creation`, {}, async (args, extra) => {
|
|
2654
3230
|
try {
|
|
3231
|
+
// Extract authorization token from HTTP request headers
|
|
3232
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
3233
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2655
3234
|
const response = await apiClient.request({
|
|
3235
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2656
3236
|
method: 'GET',
|
|
2657
3237
|
url: '/resumes/creation_availability',
|
|
2658
3238
|
params: args,
|
|
@@ -2666,9 +3246,13 @@ mcpServer.tool('get-resume-creation-availability', `Availability of resume creat
|
|
|
2666
3246
|
mcpServer.tool('get-saved-resume-searches', `List of Saved resume searches`, {
|
|
2667
3247
|
page: z.string().optional(),
|
|
2668
3248
|
per_page: z.string().optional(),
|
|
2669
|
-
}, async (args) => {
|
|
3249
|
+
}, async (args, extra) => {
|
|
2670
3250
|
try {
|
|
3251
|
+
// Extract authorization token from HTTP request headers
|
|
3252
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
3253
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2671
3254
|
const response = await apiClient.request({
|
|
3255
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2672
3256
|
method: 'GET',
|
|
2673
3257
|
url: '/saved_searches/resumes',
|
|
2674
3258
|
params: args,
|
|
@@ -2714,9 +3298,13 @@ mcpServer.tool('create-saved-resume-search', `Creating new saved resumes search`
|
|
|
2714
3298
|
page: z.string().optional(),
|
|
2715
3299
|
per_page: z.string().optional(),
|
|
2716
3300
|
professional_role: z.string().optional(),
|
|
2717
|
-
}, async (args) => {
|
|
3301
|
+
}, async (args, extra) => {
|
|
2718
3302
|
try {
|
|
3303
|
+
// Extract authorization token from HTTP request headers
|
|
3304
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
3305
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2719
3306
|
const response = await apiClient.request({
|
|
3307
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2720
3308
|
method: 'POST',
|
|
2721
3309
|
url: '/saved_searches/resumes',
|
|
2722
3310
|
data: args,
|
|
@@ -2729,11 +3317,15 @@ mcpServer.tool('create-saved-resume-search', `Creating new saved resumes search`
|
|
|
2729
3317
|
});
|
|
2730
3318
|
mcpServer.tool('get-resume-access-types', `Retrieving a list of resume visibility types`, {
|
|
2731
3319
|
resume_id: z.string(),
|
|
2732
|
-
}, async (args) => {
|
|
3320
|
+
}, async (args, extra) => {
|
|
2733
3321
|
try {
|
|
2734
3322
|
const { resume_id, ...queryParams } = args;
|
|
2735
3323
|
const url = `/resumes/${resume_id}/access_types`;
|
|
3324
|
+
// Extract authorization token from HTTP request headers
|
|
3325
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
3326
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2736
3327
|
const response = await apiClient.request({
|
|
3328
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2737
3329
|
method: 'GET',
|
|
2738
3330
|
url: url,
|
|
2739
3331
|
params: queryParams,
|
|
@@ -2747,11 +3339,15 @@ mcpServer.tool('get-resume-access-types', `Retrieving a list of resume visibilit
|
|
|
2747
3339
|
mcpServer.tool('update-applicant-comment', `Update a comment`, {
|
|
2748
3340
|
applicant_id: z.string(),
|
|
2749
3341
|
comment_id: z.string(),
|
|
2750
|
-
}, async (args) => {
|
|
3342
|
+
}, async (args, extra) => {
|
|
2751
3343
|
try {
|
|
2752
3344
|
const { applicant_id, comment_id, ...requestData } = args;
|
|
2753
3345
|
const url = `/applicant_comments/${applicant_id}/${comment_id}`;
|
|
3346
|
+
// Extract authorization token from HTTP request headers
|
|
3347
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
3348
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2754
3349
|
const response = await apiClient.request({
|
|
3350
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2755
3351
|
method: 'PUT',
|
|
2756
3352
|
url: url,
|
|
2757
3353
|
data: requestData,
|
|
@@ -2765,11 +3361,15 @@ mcpServer.tool('update-applicant-comment', `Update a comment`, {
|
|
|
2765
3361
|
mcpServer.tool('delete-applicant-comment', `Delete a comment`, {
|
|
2766
3362
|
applicant_id: z.string(),
|
|
2767
3363
|
comment_id: z.string(),
|
|
2768
|
-
}, async (args) => {
|
|
3364
|
+
}, async (args, extra) => {
|
|
2769
3365
|
try {
|
|
2770
3366
|
const { applicant_id, comment_id, ...queryParams } = args;
|
|
2771
3367
|
const url = `/applicant_comments/${applicant_id}/${comment_id}`;
|
|
3368
|
+
// Extract authorization token from HTTP request headers
|
|
3369
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
3370
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2772
3371
|
const response = await apiClient.request({
|
|
3372
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2773
3373
|
method: 'DELETE',
|
|
2774
3374
|
url: url,
|
|
2775
3375
|
params: queryParams,
|
|
@@ -2785,11 +3385,15 @@ mcpServer.tool('get-applicant-comments-list', `List of comments`, {
|
|
|
2785
3385
|
page: z.string().optional(),
|
|
2786
3386
|
per_page: z.string().optional(),
|
|
2787
3387
|
order_by: z.string().optional(),
|
|
2788
|
-
}, async (args) => {
|
|
3388
|
+
}, async (args, extra) => {
|
|
2789
3389
|
try {
|
|
2790
3390
|
const { applicant_id, ...queryParams } = args;
|
|
2791
3391
|
const url = `/applicant_comments/${applicant_id}`;
|
|
3392
|
+
// Extract authorization token from HTTP request headers
|
|
3393
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
3394
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2792
3395
|
const response = await apiClient.request({
|
|
3396
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2793
3397
|
method: 'GET',
|
|
2794
3398
|
url: url,
|
|
2795
3399
|
params: queryParams,
|
|
@@ -2802,11 +3406,15 @@ mcpServer.tool('get-applicant-comments-list', `List of comments`, {
|
|
|
2802
3406
|
});
|
|
2803
3407
|
mcpServer.tool('add-applicant-comment', `Add a comment`, {
|
|
2804
3408
|
applicant_id: z.string(),
|
|
2805
|
-
}, async (args) => {
|
|
3409
|
+
}, async (args, extra) => {
|
|
2806
3410
|
try {
|
|
2807
3411
|
const { applicant_id, ...requestData } = args;
|
|
2808
3412
|
const url = `/applicant_comments/${applicant_id}`;
|
|
3413
|
+
// Extract authorization token from HTTP request headers
|
|
3414
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
3415
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2809
3416
|
const response = await apiClient.request({
|
|
3417
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2810
3418
|
method: 'POST',
|
|
2811
3419
|
url: url,
|
|
2812
3420
|
data: requestData,
|
|
@@ -2820,11 +3428,15 @@ mcpServer.tool('add-applicant-comment', `Add a comment`, {
|
|
|
2820
3428
|
mcpServer.tool('put-mail-templates-item', `Edit a template for response to an applicant`, {
|
|
2821
3429
|
employer_id: z.string(),
|
|
2822
3430
|
template_id: z.string(),
|
|
2823
|
-
}, async (args) => {
|
|
3431
|
+
}, async (args, extra) => {
|
|
2824
3432
|
try {
|
|
2825
3433
|
const { employer_id, template_id, ...requestData } = args;
|
|
2826
3434
|
const url = `/employers/${employer_id}/mail_templates/${template_id}`;
|
|
3435
|
+
// Extract authorization token from HTTP request headers
|
|
3436
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
3437
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2827
3438
|
const response = await apiClient.request({
|
|
3439
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2828
3440
|
method: 'PUT',
|
|
2829
3441
|
url: url,
|
|
2830
3442
|
data: requestData,
|
|
@@ -2837,11 +3449,15 @@ mcpServer.tool('put-mail-templates-item', `Edit a template for response to an ap
|
|
|
2837
3449
|
});
|
|
2838
3450
|
mcpServer.tool('get-mail-templates', `List of available templates for response to an applicant`, {
|
|
2839
3451
|
employer_id: z.string(),
|
|
2840
|
-
}, async (args) => {
|
|
3452
|
+
}, async (args, extra) => {
|
|
2841
3453
|
try {
|
|
2842
3454
|
const { employer_id, ...queryParams } = args;
|
|
2843
3455
|
const url = `/employers/${employer_id}/mail_templates`;
|
|
3456
|
+
// Extract authorization token from HTTP request headers
|
|
3457
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
3458
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2844
3459
|
const response = await apiClient.request({
|
|
3460
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2845
3461
|
method: 'GET',
|
|
2846
3462
|
url: url,
|
|
2847
3463
|
params: queryParams,
|
|
@@ -2855,9 +3471,13 @@ mcpServer.tool('get-mail-templates', `List of available templates for response t
|
|
|
2855
3471
|
mcpServer.tool('get-clickme-statistics', `Getting info about Clickme ad campaign statistics`, {
|
|
2856
3472
|
date_from: z.string(),
|
|
2857
3473
|
date_to: z.string(),
|
|
2858
|
-
}, async (args) => {
|
|
3474
|
+
}, async (args, extra) => {
|
|
2859
3475
|
try {
|
|
3476
|
+
// Extract authorization token from HTTP request headers
|
|
3477
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
3478
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2860
3479
|
const response = await apiClient.request({
|
|
3480
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2861
3481
|
method: 'GET',
|
|
2862
3482
|
url: '/clickme/statistics',
|
|
2863
3483
|
params: args,
|
|
@@ -2868,9 +3488,13 @@ mcpServer.tool('get-clickme-statistics', `Getting info about Clickme ad campaign
|
|
|
2868
3488
|
return handleError(error);
|
|
2869
3489
|
}
|
|
2870
3490
|
});
|
|
2871
|
-
mcpServer.tool('get-countries', `Countries`, {}, async (args) => {
|
|
3491
|
+
mcpServer.tool('get-countries', `Countries`, {}, async (args, extra) => {
|
|
2872
3492
|
try {
|
|
3493
|
+
// Extract authorization token from HTTP request headers
|
|
3494
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
3495
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2873
3496
|
const response = await apiClient.request({
|
|
3497
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2874
3498
|
method: 'GET',
|
|
2875
3499
|
url: '/areas/countries',
|
|
2876
3500
|
params: args,
|
|
@@ -2883,9 +3507,13 @@ mcpServer.tool('get-countries', `Countries`, {}, async (args) => {
|
|
|
2883
3507
|
});
|
|
2884
3508
|
mcpServer.tool('get-areas', `Tree view of all regions`, {
|
|
2885
3509
|
additional_case: z.string().optional(),
|
|
2886
|
-
}, async (args) => {
|
|
3510
|
+
}, async (args, extra) => {
|
|
2887
3511
|
try {
|
|
3512
|
+
// Extract authorization token from HTTP request headers
|
|
3513
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
3514
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2888
3515
|
const response = await apiClient.request({
|
|
3516
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2889
3517
|
method: 'GET',
|
|
2890
3518
|
url: '/areas',
|
|
2891
3519
|
params: args,
|
|
@@ -2899,11 +3527,15 @@ mcpServer.tool('get-areas', `Tree view of all regions`, {
|
|
|
2899
3527
|
mcpServer.tool('get-areas-from-specified', `Region directory, starting from the specified region`, {
|
|
2900
3528
|
area_id: z.string(),
|
|
2901
3529
|
additional_case: z.string().optional(),
|
|
2902
|
-
}, async (args) => {
|
|
3530
|
+
}, async (args, extra) => {
|
|
2903
3531
|
try {
|
|
2904
3532
|
const { area_id, ...queryParams } = args;
|
|
2905
3533
|
const url = `/areas/${area_id}`;
|
|
3534
|
+
// Extract authorization token from HTTP request headers
|
|
3535
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
3536
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2906
3537
|
const response = await apiClient.request({
|
|
3538
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2907
3539
|
method: 'GET',
|
|
2908
3540
|
url: url,
|
|
2909
3541
|
params: queryParams,
|
|
@@ -2914,9 +3546,13 @@ mcpServer.tool('get-areas-from-specified', `Region directory, starting from the
|
|
|
2914
3546
|
return handleError(error);
|
|
2915
3547
|
}
|
|
2916
3548
|
});
|
|
2917
|
-
mcpServer.tool('get-salary-employee-levels', `Competency levels`, {}, async (args) => {
|
|
3549
|
+
mcpServer.tool('get-salary-employee-levels', `Competency levels`, {}, async (args, extra) => {
|
|
2918
3550
|
try {
|
|
3551
|
+
// Extract authorization token from HTTP request headers
|
|
3552
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
3553
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2919
3554
|
const response = await apiClient.request({
|
|
3555
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2920
3556
|
method: 'GET',
|
|
2921
3557
|
url: '/salary_statistics/dictionaries/employee_levels',
|
|
2922
3558
|
params: args,
|
|
@@ -2927,9 +3563,13 @@ mcpServer.tool('get-salary-employee-levels', `Competency levels`, {}, async (arg
|
|
|
2927
3563
|
return handleError(error);
|
|
2928
3564
|
}
|
|
2929
3565
|
});
|
|
2930
|
-
mcpServer.tool('get-salary-salary-areas', `Regions and cities`, {}, async (args) => {
|
|
3566
|
+
mcpServer.tool('get-salary-salary-areas', `Regions and cities`, {}, async (args, extra) => {
|
|
2931
3567
|
try {
|
|
3568
|
+
// Extract authorization token from HTTP request headers
|
|
3569
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
3570
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2932
3571
|
const response = await apiClient.request({
|
|
3572
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2933
3573
|
method: 'GET',
|
|
2934
3574
|
url: '/salary_statistics/dictionaries/salary_areas',
|
|
2935
3575
|
params: args,
|
|
@@ -2940,9 +3580,13 @@ mcpServer.tool('get-salary-salary-areas', `Regions and cities`, {}, async (args)
|
|
|
2940
3580
|
return handleError(error);
|
|
2941
3581
|
}
|
|
2942
3582
|
});
|
|
2943
|
-
mcpServer.tool('get-salary-professional-areas', `Professions and specializations`, {}, async (args) => {
|
|
3583
|
+
mcpServer.tool('get-salary-professional-areas', `Professions and specializations`, {}, async (args, extra) => {
|
|
2944
3584
|
try {
|
|
3585
|
+
// Extract authorization token from HTTP request headers
|
|
3586
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
3587
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2945
3588
|
const response = await apiClient.request({
|
|
3589
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2946
3590
|
method: 'GET',
|
|
2947
3591
|
url: '/salary_statistics/dictionaries/professional_areas',
|
|
2948
3592
|
params: args,
|
|
@@ -2953,9 +3597,13 @@ mcpServer.tool('get-salary-professional-areas', `Professions and specializations
|
|
|
2953
3597
|
return handleError(error);
|
|
2954
3598
|
}
|
|
2955
3599
|
});
|
|
2956
|
-
mcpServer.tool('get-salary-industries', `Industries and fields of expertise`, {}, async (args) => {
|
|
3600
|
+
mcpServer.tool('get-salary-industries', `Industries and fields of expertise`, {}, async (args, extra) => {
|
|
2957
3601
|
try {
|
|
3602
|
+
// Extract authorization token from HTTP request headers
|
|
3603
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
3604
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2958
3605
|
const response = await apiClient.request({
|
|
3606
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2959
3607
|
method: 'GET',
|
|
2960
3608
|
url: '/salary_statistics/dictionaries/salary_industries',
|
|
2961
3609
|
params: args,
|
|
@@ -2972,11 +3620,15 @@ mcpServer.tool('get-resume-visibility-employers-list', `Searching for employers
|
|
|
2972
3620
|
text: z.string(),
|
|
2973
3621
|
per_page: z.string().optional(),
|
|
2974
3622
|
page: z.string().optional(),
|
|
2975
|
-
}, async (args) => {
|
|
3623
|
+
}, async (args, extra) => {
|
|
2976
3624
|
try {
|
|
2977
3625
|
const { resume_id, list_type, ...queryParams } = args;
|
|
2978
3626
|
const url = `/resumes/${resume_id}/${list_type}/search`;
|
|
3627
|
+
// Extract authorization token from HTTP request headers
|
|
3628
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
3629
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2979
3630
|
const response = await apiClient.request({
|
|
3631
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2980
3632
|
method: 'GET',
|
|
2981
3633
|
url: url,
|
|
2982
3634
|
params: queryParams,
|
|
@@ -2990,11 +3642,15 @@ mcpServer.tool('get-resume-visibility-employers-list', `Searching for employers
|
|
|
2990
3642
|
mcpServer.tool('get-resume-visibility-list', `Getting visibility lists`, {
|
|
2991
3643
|
resume_id: z.string(),
|
|
2992
3644
|
list_type: z.string(),
|
|
2993
|
-
}, async (args) => {
|
|
3645
|
+
}, async (args, extra) => {
|
|
2994
3646
|
try {
|
|
2995
3647
|
const { resume_id, list_type, ...queryParams } = args;
|
|
2996
3648
|
const url = `/resumes/${resume_id}/${list_type}`;
|
|
3649
|
+
// Extract authorization token from HTTP request headers
|
|
3650
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
3651
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
2997
3652
|
const response = await apiClient.request({
|
|
3653
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
2998
3654
|
method: 'GET',
|
|
2999
3655
|
url: url,
|
|
3000
3656
|
params: queryParams,
|
|
@@ -3008,11 +3664,15 @@ mcpServer.tool('get-resume-visibility-list', `Getting visibility lists`, {
|
|
|
3008
3664
|
mcpServer.tool('add-resume-visibility-list', `Adding employers to the visibility list`, {
|
|
3009
3665
|
resume_id: z.string(),
|
|
3010
3666
|
list_type: z.string(),
|
|
3011
|
-
}, async (args) => {
|
|
3667
|
+
}, async (args, extra) => {
|
|
3012
3668
|
try {
|
|
3013
3669
|
const { resume_id, list_type, ...requestData } = args;
|
|
3014
3670
|
const url = `/resumes/${resume_id}/${list_type}`;
|
|
3671
|
+
// Extract authorization token from HTTP request headers
|
|
3672
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
3673
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
3015
3674
|
const response = await apiClient.request({
|
|
3675
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
3016
3676
|
method: 'POST',
|
|
3017
3677
|
url: url,
|
|
3018
3678
|
data: requestData,
|
|
@@ -3026,11 +3686,15 @@ mcpServer.tool('add-resume-visibility-list', `Adding employers to the visibility
|
|
|
3026
3686
|
mcpServer.tool('delete-resume-visibility-list', `Clearing the visibility list`, {
|
|
3027
3687
|
resume_id: z.string(),
|
|
3028
3688
|
list_type: z.string(),
|
|
3029
|
-
}, async (args) => {
|
|
3689
|
+
}, async (args, extra) => {
|
|
3030
3690
|
try {
|
|
3031
3691
|
const { resume_id, list_type, ...queryParams } = args;
|
|
3032
3692
|
const url = `/resumes/${resume_id}/${list_type}`;
|
|
3693
|
+
// Extract authorization token from HTTP request headers
|
|
3694
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
3695
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
3033
3696
|
const response = await apiClient.request({
|
|
3697
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
3034
3698
|
method: 'DELETE',
|
|
3035
3699
|
url: url,
|
|
3036
3700
|
params: queryParams,
|
|
@@ -3045,11 +3709,15 @@ mcpServer.tool('delete-employer-from-resume-visibility-list', `Removing employer
|
|
|
3045
3709
|
resume_id: z.string(),
|
|
3046
3710
|
list_type: z.string(),
|
|
3047
3711
|
id: z.string(),
|
|
3048
|
-
}, async (args) => {
|
|
3712
|
+
}, async (args, extra) => {
|
|
3049
3713
|
try {
|
|
3050
3714
|
const { resume_id, list_type, ...queryParams } = args;
|
|
3051
3715
|
const url = `/resumes/${resume_id}/${list_type}/employer`;
|
|
3716
|
+
// Extract authorization token from HTTP request headers
|
|
3717
|
+
const authorization = extra?.requestInfo?.headers?.authorization;
|
|
3718
|
+
const bearer = authorization?.replace('Bearer ', '');
|
|
3052
3719
|
const response = await apiClient.request({
|
|
3720
|
+
headers: bearer ? { Authorization: `Bearer ${bearer}` } : undefined,
|
|
3053
3721
|
method: 'DELETE',
|
|
3054
3722
|
url: url,
|
|
3055
3723
|
params: queryParams,
|