hirify-cli 0.6.7 → 0.6.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/bin/lib/cli.js +1 -0
- package/bin/lib/commands.js +20 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
package/bin/lib/cli.js
CHANGED
|
@@ -26,6 +26,7 @@ export const COMMANDS = {
|
|
|
26
26
|
'feed create': { args: [1, 1], flags: ['filters', 'telegram', 'no-telegram', 'webhook'], description: 'save a search and its delivery settings' },
|
|
27
27
|
'feed deliver': { args: [1, 1], flags: ['telegram', 'no-telegram', 'webhook', 'no-webhook'], description: 'change delivery settings' },
|
|
28
28
|
'profile list': { args: [0, 0], description: 'profiles you can apply with' },
|
|
29
|
+
'profile duplicate': { args: [1, 1], description: 'copy a profile in full, contacts included; counts toward the profile limit' },
|
|
29
30
|
'webhook list': { args: [0, 0], description: 'your delivery endpoints' },
|
|
30
31
|
'webhook create': { args: [2, 2], description: 'create an endpoint: <name> <url>' },
|
|
31
32
|
'filter guide': { args: [0, 0], description: 'supported search filters, from the server' },
|
package/bin/lib/commands.js
CHANGED
|
@@ -465,6 +465,25 @@ async function cmdProfileList() {
|
|
|
465
465
|
})
|
|
466
466
|
}
|
|
467
467
|
|
|
468
|
+
/**
|
|
469
|
+
* A copy of one profile, the same as the site's Duplicate button: everything, contacts
|
|
470
|
+
* included. A copy rebuilt from text loses the contacts, so this is the way to a CV variant.
|
|
471
|
+
*/
|
|
472
|
+
async function cmdProfileDuplicate(_, words) {
|
|
473
|
+
const [id] = words
|
|
474
|
+
if (!/^\d+$/.test(id ?? '')) die('a profile id is required, a number: hirify profile duplicate <id>. See hirify profile list.')
|
|
475
|
+
|
|
476
|
+
const res = await callCapability('profiles.duplicate', { params: { profile_id: Number(id) }, allow: [200, 403, 404] })
|
|
477
|
+
if (res.status === 404) die('there is no profile with that id. See hirify profile list.')
|
|
478
|
+
if (res.status === 403) die(serverMessage(res.body) || 'the profile could not be copied.')
|
|
479
|
+
|
|
480
|
+
const p = res.body?.data ?? {}
|
|
481
|
+
out(res.body, () => {
|
|
482
|
+
console.log(`Copied. New profile ${p.profile_id ?? '-'}: ${p.name || p.title || '(untitled)'}`)
|
|
483
|
+
console.log('The copy has no public page yet. Change it on hirify.me/account/profile.')
|
|
484
|
+
})
|
|
485
|
+
}
|
|
486
|
+
|
|
468
487
|
/**
|
|
469
488
|
* Send a real application, on Hirify, to a real person. This is the one command here
|
|
470
489
|
* that cannot be undone, so it never guesses: if the account has several profiles and
|
|
@@ -835,7 +854,7 @@ return {
|
|
|
835
854
|
'vacancy search': cmdVacancySearch, 'vacancy read': cmdVacancyRead, 'vacancy reveal': cmdVacancyReveal, 'vacancy apply': cmdVacancyApply,
|
|
836
855
|
'vacancy hide': cmdVacancyHide, 'company hide': cmdCompanyHide, 'hidden list': cmdHiddenList,
|
|
837
856
|
'feed list': cmdFeedList, 'feed show': cmdFeedShow, 'feed create': cmdFeedCreate, 'feed deliver': cmdFeedDeliver,
|
|
838
|
-
'profile list': cmdProfileList, 'webhook list': cmdWebhookList, 'webhook create': cmdWebhookCreate,
|
|
857
|
+
'profile list': cmdProfileList, 'profile duplicate': cmdProfileDuplicate, 'webhook list': cmdWebhookList, 'webhook create': cmdWebhookCreate,
|
|
839
858
|
'feedback send': cmdFeedbackSend, 'filter guide': cmdFilterGuide, 'api call': cmdApiCall,
|
|
840
859
|
'capabilities list': async () => output.json(await api.loadManifest()),
|
|
841
860
|
'capabilities show': async (_, words) => output.json(await api.resolveCapability(words[0])),
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hirify-cli",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.8",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "hirify-cli",
|
|
9
|
-
"version": "0.6.
|
|
9
|
+
"version": "0.6.8",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"cross-spawn": "7.0.6",
|
package/package.json
CHANGED