@linkedapi/linkedin-cli 1.0.14 → 1.0.16
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 +58 -0
- package/dist/commands/admin/accounts/reconnect.d.ts +16 -0
- package/dist/commands/admin/accounts/reconnect.d.ts.map +1 -0
- package/dist/commands/admin/accounts/reconnect.js +37 -0
- package/dist/commands/admin/accounts/reconnect.js.map +1 -0
- package/dist/commands/admin/accounts/reparse.d.ts +16 -0
- package/dist/commands/admin/accounts/reparse.d.ts.map +1 -0
- package/dist/commands/admin/accounts/reparse.js +37 -0
- package/dist/commands/admin/accounts/reparse.js.map +1 -0
- package/dist/commands/jobs/fetch.d.ts +17 -0
- package/dist/commands/jobs/fetch.d.ts.map +1 -0
- package/dist/commands/jobs/fetch.js +46 -0
- package/dist/commands/jobs/fetch.js.map +1 -0
- package/dist/commands/jobs/search.d.ts +29 -0
- package/dist/commands/jobs/search.d.ts.map +1 -0
- package/dist/commands/jobs/search.js +126 -0
- package/dist/commands/jobs/search.js.map +1 -0
- package/oclif.manifest.json +804 -458
- package/package.json +6 -3
package/README.md
CHANGED
|
@@ -770,6 +770,64 @@ linkedin workflow status abc123 --wait --json
|
|
|
770
770
|
|
|
771
771
|
---
|
|
772
772
|
|
|
773
|
+
### Administration
|
|
774
|
+
|
|
775
|
+
Admin commands use your Linked API Token and do not require an active LinkedIn account in the CLI.
|
|
776
|
+
|
|
777
|
+
#### `admin subscription`
|
|
778
|
+
|
|
779
|
+
Manage subscription status, seats, pricing, billing, and cancellation.
|
|
780
|
+
|
|
781
|
+
```bash
|
|
782
|
+
linkedin admin subscription status
|
|
783
|
+
linkedin admin subscription seats
|
|
784
|
+
linkedin admin subscription pricing
|
|
785
|
+
linkedin admin subscription set-seats --quantity 5 --type plus --period year
|
|
786
|
+
linkedin admin subscription billing-link
|
|
787
|
+
linkedin admin subscription cancel
|
|
788
|
+
```
|
|
789
|
+
|
|
790
|
+
#### `admin accounts`
|
|
791
|
+
|
|
792
|
+
Manage connected accounts and connection sessions.
|
|
793
|
+
|
|
794
|
+
```bash
|
|
795
|
+
linkedin admin accounts list
|
|
796
|
+
linkedin admin accounts connect
|
|
797
|
+
linkedin admin accounts reconnect <accountId>
|
|
798
|
+
linkedin admin accounts reparse <accountId>
|
|
799
|
+
linkedin admin accounts session <sessionId>
|
|
800
|
+
linkedin admin accounts cancel-session <sessionId>
|
|
801
|
+
linkedin admin accounts disconnect <accountId>
|
|
802
|
+
linkedin admin accounts regenerate-token <accountId>
|
|
803
|
+
```
|
|
804
|
+
|
|
805
|
+
| Command | Description |
|
|
806
|
+
|---------|-------------|
|
|
807
|
+
| `list` | List connected accounts, pending sessions, and reconnection links |
|
|
808
|
+
| `connect` | Create a connection session for a new LinkedIn account |
|
|
809
|
+
| `reconnect` | Create a fresh reconnection session for an account requiring reconnection |
|
|
810
|
+
| `reparse` | Refresh stored profile URL, avatar, headline, and name |
|
|
811
|
+
| `session` | Get connection or reconnection session status |
|
|
812
|
+
| `cancel-session` | Cancel a pending connection session |
|
|
813
|
+
| `disconnect` | Disconnect an account |
|
|
814
|
+
| `regenerate-token` | Regenerate an account identification token |
|
|
815
|
+
|
|
816
|
+
#### `admin limits`
|
|
817
|
+
|
|
818
|
+
Configure and inspect per-account action limits.
|
|
819
|
+
|
|
820
|
+
```bash
|
|
821
|
+
linkedin admin limits defaults
|
|
822
|
+
linkedin admin limits get <accountId>
|
|
823
|
+
linkedin admin limits usage <accountId>
|
|
824
|
+
linkedin admin limits set <accountId> --category stMessages --period daily --max 25
|
|
825
|
+
linkedin admin limits delete <accountId> --category stMessages --period daily
|
|
826
|
+
linkedin admin limits reset <accountId>
|
|
827
|
+
```
|
|
828
|
+
|
|
829
|
+
---
|
|
830
|
+
|
|
773
831
|
### Account Management
|
|
774
832
|
|
|
775
833
|
#### `account list`
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AdminBaseCommand } from '../../../admin-base-command';
|
|
2
|
+
export default class AdminAccountsReconnect extends AdminBaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static args: {
|
|
5
|
+
accountId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
|
+
};
|
|
7
|
+
static flags: {
|
|
8
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
fields: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
quiet: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
'no-color': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
12
|
+
};
|
|
13
|
+
static examples: string[];
|
|
14
|
+
run(): Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=reconnect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reconnect.d.ts","sourceRoot":"","sources":["../../../../src/commands/admin/accounts/reconnect.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAGvD,MAAM,CAAC,OAAO,OAAO,sBAAuB,SAAQ,gBAAgB;IAClE,OAAgB,WAAW,SAAkD;IAE7E,OAAgB,IAAI;;MAKlB;IAEF,OAAgB,KAAK;;;;;MAEnB;IAEF,OAAgB,QAAQ,WAA+D;IAE1E,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAkBlC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const _admin_base_command_1 = require("../../../admin-base-command");
|
|
5
|
+
const admin_formatter_1 = require("../../../core/output/admin-formatter");
|
|
6
|
+
class AdminAccountsReconnect extends _admin_base_command_1.AdminBaseCommand {
|
|
7
|
+
static description = 'Create a reconnection session for an account';
|
|
8
|
+
static args = {
|
|
9
|
+
accountId: core_1.Args.string({
|
|
10
|
+
description: 'Account UUID',
|
|
11
|
+
required: true,
|
|
12
|
+
}),
|
|
13
|
+
};
|
|
14
|
+
static flags = {
|
|
15
|
+
..._admin_base_command_1.AdminBaseCommand.baseFlags,
|
|
16
|
+
};
|
|
17
|
+
static examples = ['<%= config.bin %> admin accounts reconnect f9b4346a-...'];
|
|
18
|
+
async run() {
|
|
19
|
+
const { args, flags } = await this.parse(AdminAccountsReconnect);
|
|
20
|
+
const admin = await this.buildAdminClient();
|
|
21
|
+
try {
|
|
22
|
+
const result = await admin.accounts.createReconnectionSession({
|
|
23
|
+
accountId: args.accountId,
|
|
24
|
+
});
|
|
25
|
+
(0, admin_formatter_1.formatAdminOutput)({
|
|
26
|
+
data: result,
|
|
27
|
+
isJson: flags.json,
|
|
28
|
+
fields: flags.fields,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
this.handleError(error);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.default = AdminAccountsReconnect;
|
|
37
|
+
//# sourceMappingURL=reconnect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reconnect.js","sourceRoot":"","sources":["../../../../src/commands/admin/accounts/reconnect.ts"],"names":[],"mappings":";;AAAA,sCAAmC;AAEnC,6DAAuD;AACvD,kEAAiE;AAEjE,MAAqB,sBAAuB,SAAQ,sCAAgB;IAClE,MAAM,CAAU,WAAW,GAAG,8CAA8C,CAAC;IAE7E,MAAM,CAAU,IAAI,GAAG;QACrB,SAAS,EAAE,WAAI,CAAC,MAAM,CAAC;YACrB,WAAW,EAAE,cAAc;YAC3B,QAAQ,EAAE,IAAI;SACf,CAAC;KACH,CAAC;IAEF,MAAM,CAAU,KAAK,GAAG;QACtB,GAAG,sCAAgB,CAAC,SAAS;KAC9B,CAAC;IAEF,MAAM,CAAU,QAAQ,GAAG,CAAC,yDAAyD,CAAC,CAAC;IAEhF,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC;QACjE,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,gBAAgB,EAAE,CAAC;QAE5C,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,QAAQ,CAAC,yBAAyB,CAAC;gBAC5D,SAAS,EAAE,IAAI,CAAC,SAAS;aAC1B,CAAC,CAAC;YAEH,IAAA,mCAAiB,EAAC;gBAChB,IAAI,EAAE,MAAM;gBACZ,MAAM,EAAE,KAAK,CAAC,IAAI;gBAClB,MAAM,EAAE,KAAK,CAAC,MAAM;aACrB,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAC1B,CAAC;IACH,CAAC;;AAjCH,yCAkCC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AdminBaseCommand } from '../../../admin-base-command';
|
|
2
|
+
export default class AdminAccountsReparse extends AdminBaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static args: {
|
|
5
|
+
accountId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
|
+
};
|
|
7
|
+
static flags: {
|
|
8
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
fields: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
quiet: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
'no-color': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
12
|
+
};
|
|
13
|
+
static examples: string[];
|
|
14
|
+
run(): Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=reparse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reparse.d.ts","sourceRoot":"","sources":["../../../../src/commands/admin/accounts/reparse.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAGvD,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,gBAAgB;IAChE,OAAgB,WAAW,SAAgD;IAE3E,OAAgB,IAAI;;MAKlB;IAEF,OAAgB,KAAK;;;;;MAEnB;IAEF,OAAgB,QAAQ,WAA6D;IAExE,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAkBlC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const _admin_base_command_1 = require("../../../admin-base-command");
|
|
5
|
+
const admin_formatter_1 = require("../../../core/output/admin-formatter");
|
|
6
|
+
class AdminAccountsReparse extends _admin_base_command_1.AdminBaseCommand {
|
|
7
|
+
static description = 'Refresh stored profile info for an account';
|
|
8
|
+
static args = {
|
|
9
|
+
accountId: core_1.Args.string({
|
|
10
|
+
description: 'Account UUID',
|
|
11
|
+
required: true,
|
|
12
|
+
}),
|
|
13
|
+
};
|
|
14
|
+
static flags = {
|
|
15
|
+
..._admin_base_command_1.AdminBaseCommand.baseFlags,
|
|
16
|
+
};
|
|
17
|
+
static examples = ['<%= config.bin %> admin accounts reparse f9b4346a-...'];
|
|
18
|
+
async run() {
|
|
19
|
+
const { args, flags } = await this.parse(AdminAccountsReparse);
|
|
20
|
+
const admin = await this.buildAdminClient();
|
|
21
|
+
try {
|
|
22
|
+
const result = await admin.accounts.reparseAccountInfo({
|
|
23
|
+
accountId: args.accountId,
|
|
24
|
+
});
|
|
25
|
+
(0, admin_formatter_1.formatAdminOutput)({
|
|
26
|
+
data: result,
|
|
27
|
+
isJson: flags.json,
|
|
28
|
+
fields: flags.fields,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
this.handleError(error);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.default = AdminAccountsReparse;
|
|
37
|
+
//# sourceMappingURL=reparse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reparse.js","sourceRoot":"","sources":["../../../../src/commands/admin/accounts/reparse.ts"],"names":[],"mappings":";;AAAA,sCAAmC;AAEnC,6DAAuD;AACvD,kEAAiE;AAEjE,MAAqB,oBAAqB,SAAQ,sCAAgB;IAChE,MAAM,CAAU,WAAW,GAAG,4CAA4C,CAAC;IAE3E,MAAM,CAAU,IAAI,GAAG;QACrB,SAAS,EAAE,WAAI,CAAC,MAAM,CAAC;YACrB,WAAW,EAAE,cAAc;YAC3B,QAAQ,EAAE,IAAI;SACf,CAAC;KACH,CAAC;IAEF,MAAM,CAAU,KAAK,GAAG;QACtB,GAAG,sCAAgB,CAAC,SAAS;KAC9B,CAAC;IAEF,MAAM,CAAU,QAAQ,GAAG,CAAC,uDAAuD,CAAC,CAAC;IAE9E,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;QAC/D,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,gBAAgB,EAAE,CAAC;QAE5C,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,QAAQ,CAAC,kBAAkB,CAAC;gBACrD,SAAS,EAAE,IAAI,CAAC,SAAS;aAC1B,CAAC,CAAC;YAEH,IAAA,mCAAiB,EAAC;gBAChB,IAAI,EAAE,MAAM;gBACZ,MAAM,EAAE,KAAK,CAAC,IAAI;gBAClB,MAAM,EAAE,KAAK,CAAC,MAAM;aACrB,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAC1B,CAAC;IACH,CAAC;;AAjCH,uCAkCC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command';
|
|
2
|
+
export default class JobsFetch extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static args: {
|
|
5
|
+
url: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
|
+
};
|
|
7
|
+
static flags: {
|
|
8
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
fields: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
quiet: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
'no-color': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
12
|
+
account: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
|
+
};
|
|
14
|
+
static examples: string[];
|
|
15
|
+
run(): Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=fetch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../../src/commands/jobs/fetch.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,WAAW;IAChD,OAAgB,WAAW,SAA0B;IAErD,OAAgB,IAAI;;MAKlB;IAEF,OAAgB,KAAK;;;;;;MAEnB;IAEF,OAAgB,QAAQ,WAGtB;IAEW,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAyBlC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const _base_command_1 = require("../../base-command");
|
|
5
|
+
const formatter_1 = require("../../core/output/formatter");
|
|
6
|
+
const workflow_runner_1 = require("../../core/workflow/workflow-runner");
|
|
7
|
+
class JobsFetch extends _base_command_1.BaseCommand {
|
|
8
|
+
static description = 'Fetch a LinkedIn job';
|
|
9
|
+
static args = {
|
|
10
|
+
url: core_1.Args.string({
|
|
11
|
+
description: 'LinkedIn job URL',
|
|
12
|
+
required: true,
|
|
13
|
+
}),
|
|
14
|
+
};
|
|
15
|
+
static flags = {
|
|
16
|
+
..._base_command_1.BaseCommand.baseFlags,
|
|
17
|
+
};
|
|
18
|
+
static examples = [
|
|
19
|
+
'<%= config.bin %> jobs fetch https://www.linkedin.com/jobs/view/4416248954/',
|
|
20
|
+
'<%= config.bin %> jobs fetch https://www.linkedin.com/jobs/view/4416248954/ --json',
|
|
21
|
+
];
|
|
22
|
+
async run() {
|
|
23
|
+
const { args, flags } = await this.parse(JobsFetch);
|
|
24
|
+
const client = await this.buildAuthenticatedClient();
|
|
25
|
+
const params = {
|
|
26
|
+
jobUrl: args.url,
|
|
27
|
+
};
|
|
28
|
+
try {
|
|
29
|
+
const result = await (0, workflow_runner_1.runWorkflow)(client.fetchJob, params, {
|
|
30
|
+
isQuiet: flags.quiet,
|
|
31
|
+
});
|
|
32
|
+
(0, formatter_1.formatOutput)({
|
|
33
|
+
data: result.data,
|
|
34
|
+
errors: result.errors,
|
|
35
|
+
isJson: flags.json,
|
|
36
|
+
fields: flags.fields,
|
|
37
|
+
isQuiet: flags.quiet,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
catch (error) {
|
|
41
|
+
this.handleError(error);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.default = JobsFetch;
|
|
46
|
+
//# sourceMappingURL=fetch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch.js","sourceRoot":"","sources":["../../../src/commands/jobs/fetch.ts"],"names":[],"mappings":";;AA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
|
1
|
+
import { BaseCommand } from '../../base-command';
|
|
2
|
+
export default class JobsSearch extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {
|
|
5
|
+
term: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
6
|
+
limit: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
7
|
+
location: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
8
|
+
'date-posted': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
9
|
+
'experience-levels': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
'employment-types': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
'workplace-types': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
+
companies: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
|
+
industries: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
|
+
'job-functions': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
15
|
+
'easy-apply': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
16
|
+
'has-verifications': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
17
|
+
'under-10-applicants': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
18
|
+
'in-your-network': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
19
|
+
'fair-chance-employer': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
20
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
21
|
+
fields: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
22
|
+
quiet: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
23
|
+
'no-color': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
24
|
+
account: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
25
|
+
};
|
|
26
|
+
static examples: string[];
|
|
27
|
+
run(): Promise<void>;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../src/commands/jobs/search.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,WAAW;IACjD,OAAgB,WAAW,SAAiC;IAE5D,OAAgB,KAAK;;;;;;;;;;;;;;;;;;;;;MAuDnB;IAEF,OAAgB,QAAQ,WAGtB;IAEW,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA6ClC"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const _base_command_1 = require("../../base-command");
|
|
5
|
+
const formatter_1 = require("../../core/output/formatter");
|
|
6
|
+
const workflow_runner_1 = require("../../core/workflow/workflow-runner");
|
|
7
|
+
class JobsSearch extends _base_command_1.BaseCommand {
|
|
8
|
+
static description = 'Search for jobs on LinkedIn';
|
|
9
|
+
static flags = {
|
|
10
|
+
..._base_command_1.BaseCommand.baseFlags,
|
|
11
|
+
term: core_1.Flags.string({
|
|
12
|
+
description: 'Search keyword or phrase',
|
|
13
|
+
}),
|
|
14
|
+
limit: core_1.Flags.integer({
|
|
15
|
+
description: 'Max results to return',
|
|
16
|
+
}),
|
|
17
|
+
location: core_1.Flags.string({
|
|
18
|
+
description: 'Filter by location',
|
|
19
|
+
}),
|
|
20
|
+
'date-posted': core_1.Flags.string({
|
|
21
|
+
description: 'Filter by date posted',
|
|
22
|
+
options: ['anyTime', 'past24Hours', 'pastWeek', 'pastMonth'],
|
|
23
|
+
}),
|
|
24
|
+
'experience-levels': core_1.Flags.string({
|
|
25
|
+
description: 'Filter by experience levels (comma-separated: internship, entryLevel, associate, midSeniorLevel, director, executive)',
|
|
26
|
+
}),
|
|
27
|
+
'employment-types': core_1.Flags.string({
|
|
28
|
+
description: 'Filter by employment types (comma-separated: fullTime, partTime, contract, temporary, volunteer, internship, other)',
|
|
29
|
+
}),
|
|
30
|
+
'workplace-types': core_1.Flags.string({
|
|
31
|
+
description: 'Filter by workplace types (comma-separated: onSite, remote, hybrid)',
|
|
32
|
+
}),
|
|
33
|
+
companies: core_1.Flags.string({
|
|
34
|
+
description: 'Filter by company names (comma-separated)',
|
|
35
|
+
}),
|
|
36
|
+
industries: core_1.Flags.string({
|
|
37
|
+
description: 'Filter by industries (comma-separated)',
|
|
38
|
+
}),
|
|
39
|
+
'job-functions': core_1.Flags.string({
|
|
40
|
+
description: 'Filter by job functions (comma-separated)',
|
|
41
|
+
}),
|
|
42
|
+
'easy-apply': core_1.Flags.boolean({
|
|
43
|
+
description: 'Only jobs with Easy Apply',
|
|
44
|
+
default: false,
|
|
45
|
+
}),
|
|
46
|
+
'has-verifications': core_1.Flags.boolean({
|
|
47
|
+
description: 'Only jobs with verification signals',
|
|
48
|
+
default: false,
|
|
49
|
+
}),
|
|
50
|
+
'under-10-applicants': core_1.Flags.boolean({
|
|
51
|
+
description: 'Only jobs with fewer than 10 applicants',
|
|
52
|
+
default: false,
|
|
53
|
+
}),
|
|
54
|
+
'in-your-network': core_1.Flags.boolean({
|
|
55
|
+
description: 'Only jobs from your network',
|
|
56
|
+
default: false,
|
|
57
|
+
}),
|
|
58
|
+
'fair-chance-employer': core_1.Flags.boolean({
|
|
59
|
+
description: 'Only fair chance employer jobs',
|
|
60
|
+
default: false,
|
|
61
|
+
}),
|
|
62
|
+
};
|
|
63
|
+
static examples = [
|
|
64
|
+
'<%= config.bin %> jobs search --term "product manager" --location "San Francisco" --limit 20',
|
|
65
|
+
'<%= config.bin %> jobs search --term engineer --workplace-types "remote,hybrid" --easy-apply --json',
|
|
66
|
+
];
|
|
67
|
+
async run() {
|
|
68
|
+
const { flags } = await this.parse(JobsSearch);
|
|
69
|
+
const client = await this.buildAuthenticatedClient();
|
|
70
|
+
const params = {};
|
|
71
|
+
if (flags.term)
|
|
72
|
+
params.term = flags.term;
|
|
73
|
+
if (flags.limit)
|
|
74
|
+
params.limit = flags.limit;
|
|
75
|
+
const filter = {};
|
|
76
|
+
if (flags.location)
|
|
77
|
+
filter.location = flags.location;
|
|
78
|
+
if (flags['date-posted'])
|
|
79
|
+
filter.datePosted = flags['date-posted'];
|
|
80
|
+
if (flags['experience-levels'])
|
|
81
|
+
filter.experienceLevels = splitCsv(flags['experience-levels']);
|
|
82
|
+
if (flags['employment-types'])
|
|
83
|
+
filter.employmentTypes = splitCsv(flags['employment-types']);
|
|
84
|
+
if (flags['workplace-types'])
|
|
85
|
+
filter.workplaceTypes = splitCsv(flags['workplace-types']);
|
|
86
|
+
if (flags.companies)
|
|
87
|
+
filter.companies = splitCsv(flags.companies);
|
|
88
|
+
if (flags.industries)
|
|
89
|
+
filter.industries = splitCsv(flags.industries);
|
|
90
|
+
if (flags['job-functions'])
|
|
91
|
+
filter.jobFunctions = splitCsv(flags['job-functions']);
|
|
92
|
+
if (flags['easy-apply'])
|
|
93
|
+
filter.easyApply = true;
|
|
94
|
+
if (flags['has-verifications'])
|
|
95
|
+
filter.hasVerifications = true;
|
|
96
|
+
if (flags['under-10-applicants'])
|
|
97
|
+
filter.under10Applicants = true;
|
|
98
|
+
if (flags['in-your-network'])
|
|
99
|
+
filter.inYourNetwork = true;
|
|
100
|
+
if (flags['fair-chance-employer'])
|
|
101
|
+
filter.fairChanceEmployer = true;
|
|
102
|
+
if (Object.keys(filter).length > 0) {
|
|
103
|
+
params.filter = filter;
|
|
104
|
+
}
|
|
105
|
+
try {
|
|
106
|
+
const result = await (0, workflow_runner_1.runWorkflow)(client.searchJobs, params, {
|
|
107
|
+
isQuiet: flags.quiet,
|
|
108
|
+
});
|
|
109
|
+
(0, formatter_1.formatOutput)({
|
|
110
|
+
data: result.data,
|
|
111
|
+
errors: result.errors,
|
|
112
|
+
isJson: flags.json,
|
|
113
|
+
fields: flags.fields,
|
|
114
|
+
isQuiet: flags.quiet,
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
catch (error) {
|
|
118
|
+
this.handleError(error);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
exports.default = JobsSearch;
|
|
123
|
+
function splitCsv(value) {
|
|
124
|
+
return value.split(',').map((s) => s.trim());
|
|
125
|
+
}
|
|
126
|
+
//# sourceMappingURL=search.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../../src/commands/jobs/search.ts"],"names":[],"mappings":";;AAAA,sCAAoC;AAEpC,iDAA4C;AAC5C,sDAAsD;AACtD,oEAA6D;AAE7D,MAAqB,UAAW,SAAQ,2BAAW;IACjD,MAAM,CAAU,WAAW,GAAG,6BAA6B,CAAC;IAE5D,MAAM,CAAU,KAAK,GAAG;QACtB,GAAG,2BAAW,CAAC,SAAS;QACxB,IAAI,EAAE,YAAK,CAAC,MAAM,CAAC;YACjB,WAAW,EAAE,0BAA0B;SACxC,CAAC;QACF,KAAK,EAAE,YAAK,CAAC,OAAO,CAAC;YACnB,WAAW,EAAE,uBAAuB;SACrC,CAAC;QACF,QAAQ,EAAE,YAAK,CAAC,MAAM,CAAC;YACrB,WAAW,EA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