@linkedapi/linkedin-cli 1.1.0 → 1.2.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/README.md +44 -0
- package/dist/commands/connection/accept.d.ts +17 -0
- package/dist/commands/connection/accept.d.ts.map +1 -0
- package/dist/commands/connection/accept.js +43 -0
- package/dist/commands/connection/accept.js.map +1 -0
- package/dist/commands/connection/ignore.d.ts +17 -0
- package/dist/commands/connection/ignore.d.ts.map +1 -0
- package/dist/commands/connection/ignore.js +43 -0
- package/dist/commands/connection/ignore.js.map +1 -0
- package/dist/commands/connection/requests.d.ts +14 -0
- package/dist/commands/connection/requests.d.ts.map +1 -0
- package/dist/commands/connection/requests.js +33 -0
- package/dist/commands/connection/requests.js.map +1 -0
- package/dist/commands/inbox/get.d.ts +17 -0
- package/dist/commands/inbox/get.d.ts.map +1 -0
- package/dist/commands/inbox/get.js +51 -0
- package/dist/commands/inbox/get.js.map +1 -0
- package/dist/commands/inbox/sync.d.ts +15 -0
- package/dist/commands/inbox/sync.d.ts.map +1 -0
- package/dist/commands/inbox/sync.js +41 -0
- package/dist/commands/inbox/sync.js.map +1 -0
- package/dist/commands/message/manage.d.ts +18 -0
- package/dist/commands/message/manage.d.ts.map +1 -0
- package/dist/commands/message/manage.js +50 -0
- package/dist/commands/message/manage.js.map +1 -0
- package/dist/commands/message/send.d.ts +2 -1
- package/dist/commands/message/send.d.ts.map +1 -1
- package/dist/commands/message/send.js +13 -2
- package/dist/commands/message/send.js.map +1 -1
- package/dist/commands/navigator/message/manage.d.ts +18 -0
- package/dist/commands/navigator/message/manage.d.ts.map +1 -0
- package/dist/commands/navigator/message/manage.js +47 -0
- package/dist/commands/navigator/message/manage.js.map +1 -0
- package/dist/commands/navigator/message/send.d.ts +3 -2
- package/dist/commands/navigator/message/send.d.ts.map +1 -1
- package/dist/commands/navigator/message/send.js +19 -4
- package/dist/commands/navigator/message/send.js.map +1 -1
- package/oclif.manifest.json +873 -371
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -368,6 +368,18 @@ linkedin connection pending
|
|
|
368
368
|
linkedin connection pending --json
|
|
369
369
|
```
|
|
370
370
|
|
|
371
|
+
#### `connection requests`
|
|
372
|
+
|
|
373
|
+
List incoming connection requests.
|
|
374
|
+
|
|
375
|
+
```bash
|
|
376
|
+
linkedin connection requests
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
```bash
|
|
380
|
+
linkedin connection requests --json
|
|
381
|
+
```
|
|
382
|
+
|
|
371
383
|
#### `connection withdraw`
|
|
372
384
|
|
|
373
385
|
Withdraw a pending connection request.
|
|
@@ -389,6 +401,38 @@ linkedin connection withdraw https://www.linkedin.com/in/vprudnikoff
|
|
|
389
401
|
linkedin connection withdraw https://www.linkedin.com/in/vprudnikoff --no-unfollow
|
|
390
402
|
```
|
|
391
403
|
|
|
404
|
+
#### `connection accept`
|
|
405
|
+
|
|
406
|
+
Accept an incoming connection request.
|
|
407
|
+
|
|
408
|
+
```bash
|
|
409
|
+
linkedin connection accept <url>
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
| Arg | Required | Description |
|
|
413
|
+
|-----|----------|-------------|
|
|
414
|
+
| `url` | yes | LinkedIn profile URL |
|
|
415
|
+
|
|
416
|
+
```bash
|
|
417
|
+
linkedin connection accept https://www.linkedin.com/in/vprudnikoff
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
#### `connection ignore`
|
|
421
|
+
|
|
422
|
+
Ignore an incoming connection request.
|
|
423
|
+
|
|
424
|
+
```bash
|
|
425
|
+
linkedin connection ignore <url>
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
| Arg | Required | Description |
|
|
429
|
+
|-----|----------|-------------|
|
|
430
|
+
| `url` | yes | LinkedIn profile URL |
|
|
431
|
+
|
|
432
|
+
```bash
|
|
433
|
+
linkedin connection ignore https://www.linkedin.com/in/vprudnikoff
|
|
434
|
+
```
|
|
435
|
+
|
|
392
436
|
#### `connection remove`
|
|
393
437
|
|
|
394
438
|
Remove an existing connection.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command';
|
|
2
|
+
export default class ConnectionAccept 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=accept.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accept.d.ts","sourceRoot":"","sources":["../../../src/commands/connection/accept.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,WAAW;IACvD,OAAgB,WAAW,SAA2C;IAEtE,OAAgB,IAAI;;MAKlB;IAEF,OAAgB,KAAK;;;;;;MAEnB;IAEF,OAAgB,QAAQ,WAEtB;IAEW,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA0BlC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
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 ConnectionAccept extends _base_command_1.BaseCommand {
|
|
8
|
+
static description = 'Accept an incoming connection request';
|
|
9
|
+
static args = {
|
|
10
|
+
url: core_1.Args.string({
|
|
11
|
+
description: 'LinkedIn profile URL',
|
|
12
|
+
required: true,
|
|
13
|
+
}),
|
|
14
|
+
};
|
|
15
|
+
static flags = {
|
|
16
|
+
..._base_command_1.BaseCommand.baseFlags,
|
|
17
|
+
};
|
|
18
|
+
static examples = [
|
|
19
|
+
'<%= config.bin %> connection accept https://www.linkedin.com/in/john-doe',
|
|
20
|
+
];
|
|
21
|
+
async run() {
|
|
22
|
+
const { args, flags } = await this.parse(ConnectionAccept);
|
|
23
|
+
const client = await this.buildAuthenticatedClient();
|
|
24
|
+
try {
|
|
25
|
+
const result = await (0, workflow_runner_1.runVoidWorkflow)(client.acceptConnectionRequest, {
|
|
26
|
+
personUrl: args.url,
|
|
27
|
+
}, {
|
|
28
|
+
isQuiet: flags.quiet,
|
|
29
|
+
});
|
|
30
|
+
(0, formatter_1.formatVoidOutput)({
|
|
31
|
+
errors: result.errors,
|
|
32
|
+
isJson: flags.json,
|
|
33
|
+
isQuiet: flags.quiet,
|
|
34
|
+
successMessage: 'Connection request accepted.',
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
this.handleError(error);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.default = ConnectionAccept;
|
|
43
|
+
//# sourceMappingURL=accept.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accept.js","sourceRoot":"","sources":["../../../src/commands/connection/accept.ts"],"names":[],"mappings":";;AAAA,sCAAmC;AAEnC,iDAA4C;AAC5C,sDAA0D;AAC1D,oEAAiE;AAEjE,MAAqB,gBAAiB,SAAQ,2BAAW;IACvD,MAAM,CAAU,WAAW,GAAG,uCAAuC,CAAC;IAEtE,MAAM,CAAU,IAAI,GAAG;QACrB,GAAG,EAAE,WAAI,CAAC,MAAM,CAAC;YACf,WAAW,EAAE,sBAAsB;YACnC,QAAQ,EAAE,IAAI;SACf,CAAC;KACH,CAAC;IAEF,MAAM,CAAU,KAAK,GAAG;QACtB,GAAG,2BAAW,CAAC,SAAS;KACzB,CAAC;IAEF,MAAM,CAAU,QAAQ,GAAG;QACzB,0EAA0E;KAC3E,CAAC;IAEK,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;QAE3D,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,wBAAwB,EAAE,CAAC;QAErD,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAA,iCAAe,EAClC,MAAM,CAAC,uBAAuB,EAC9B;gBACE,SAAS,EAAE,IAAI,CAAC,GAAG;aACpB,EACD;gBACE,OAAO,EAAE,KAAK,CAAC,KAAK;aACrB,CACF,CAAC;YAEF,IAAA,4BAAgB,EAAC;gBACf,MAAM,EAAE,MAAM,CAAC,MAAM;gBACrB,MAAM,EAAE,KAAK,CAAC,IAAI;gBAClB,OAAO,EAAE,KAAK,CAAC,KAAK;gBACpB,cAAc,EAAE,8BAA8B;aAC/C,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAC1B,CAAC;IACH,CAAC;;AA3CH,mCA4CC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command';
|
|
2
|
+
export default class ConnectionIgnore 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=ignore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ignore.d.ts","sourceRoot":"","sources":["../../../src/commands/connection/ignore.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,WAAW;IACvD,OAAgB,WAAW,SAA2C;IAEtE,OAAgB,IAAI;;MAKlB;IAEF,OAAgB,KAAK;;;;;;MAEnB;IAEF,OAAgB,QAAQ,WAEtB;IAEW,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA0BlC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
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 ConnectionIgnore extends _base_command_1.BaseCommand {
|
|
8
|
+
static description = 'Ignore an incoming connection request';
|
|
9
|
+
static args = {
|
|
10
|
+
url: core_1.Args.string({
|
|
11
|
+
description: 'LinkedIn profile URL',
|
|
12
|
+
required: true,
|
|
13
|
+
}),
|
|
14
|
+
};
|
|
15
|
+
static flags = {
|
|
16
|
+
..._base_command_1.BaseCommand.baseFlags,
|
|
17
|
+
};
|
|
18
|
+
static examples = [
|
|
19
|
+
'<%= config.bin %> connection ignore https://www.linkedin.com/in/john-doe',
|
|
20
|
+
];
|
|
21
|
+
async run() {
|
|
22
|
+
const { args, flags } = await this.parse(ConnectionIgnore);
|
|
23
|
+
const client = await this.buildAuthenticatedClient();
|
|
24
|
+
try {
|
|
25
|
+
const result = await (0, workflow_runner_1.runVoidWorkflow)(client.ignoreConnectionRequest, {
|
|
26
|
+
personUrl: args.url,
|
|
27
|
+
}, {
|
|
28
|
+
isQuiet: flags.quiet,
|
|
29
|
+
});
|
|
30
|
+
(0, formatter_1.formatVoidOutput)({
|
|
31
|
+
errors: result.errors,
|
|
32
|
+
isJson: flags.json,
|
|
33
|
+
isQuiet: flags.quiet,
|
|
34
|
+
successMessage: 'Connection request ignored.',
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
this.handleError(error);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.default = ConnectionIgnore;
|
|
43
|
+
//# sourceMappingURL=ignore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ignore.js","sourceRoot":"","sources":["../../../src/commands/connection/ignore.ts"],"names":[],"mappings":";;AAAA,sCAAmC;AAEnC,iDAA4C;AAC5C,sDAA0D;AAC1D,oEAAiE;AAEjE,MAAqB,gBAAiB,SAAQ,2BAAW;IACvD,MAAM,CAAU,WAAW,GAAG,uCAAuC,CAAC;IAEtE,MAAM,CAAU,IAAI,GAAG;QACrB,GAAG,EAAE,WAAI,CAAC,MAAM,CAAC;YACf,WAAW,EAAE,sBAAsB;YACnC,QAAQ,EAAE,IAAI;SACf,CAAC;KACH,CAAC;IAEF,MAAM,CAAU,KAAK,GAAG;QACtB,GAAG,2BAAW,CAAC,SAAS;KACzB,CAAC;IAEF,MAAM,CAAU,QAAQ,GAAG;QACzB,0EAA0E;KAC3E,CAAC;IAEK,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;QAE3D,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,wBAAwB,EAAE,CAAC;QAErD,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAA,iCAAe,EAClC,MAAM,CAAC,uBAAuB,EAC9B;gBACE,SAAS,EAAE,IAAI,CAAC,GAAG;aACpB,EACD;gBACE,OAAO,EAAE,KAAK,CAAC,KAAK;aACrB,CACF,CAAC;YAEF,IAAA,4BAAgB,EAAC;gBACf,MAAM,EAAE,MAAM,CAAC,MAAM;gBACrB,MAAM,EAAE,KAAK,CAAC,IAAI;gBAClB,OAAO,EAAE,KAAK,CAAC,KAAK;gBACpB,cAAc,EAAE,6BAA6B;aAC9C,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAC1B,CAAC;IACH,CAAC;;AA3CH,mCA4CC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command';
|
|
2
|
+
export default class ConnectionRequests extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {
|
|
5
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
6
|
+
fields: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
7
|
+
quiet: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
8
|
+
'no-color': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
account: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
};
|
|
11
|
+
static examples: string[];
|
|
12
|
+
run(): Promise<void>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=requests.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requests.d.ts","sourceRoot":"","sources":["../../../src/commands/connection/requests.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,WAAW;IACzD,OAAgB,WAAW,SAAuC;IAElE,OAAgB,KAAK;;;;;;MAEnB;IAEF,OAAgB,QAAQ,WAAoD;IAE/D,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAqBlC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const _base_command_1 = require("../../base-command");
|
|
4
|
+
const formatter_1 = require("../../core/output/formatter");
|
|
5
|
+
const workflow_runner_1 = require("../../core/workflow/workflow-runner");
|
|
6
|
+
class ConnectionRequests extends _base_command_1.BaseCommand {
|
|
7
|
+
static description = 'List incoming connection requests';
|
|
8
|
+
static flags = {
|
|
9
|
+
..._base_command_1.BaseCommand.baseFlags,
|
|
10
|
+
};
|
|
11
|
+
static examples = ['<%= config.bin %> connection requests --json'];
|
|
12
|
+
async run() {
|
|
13
|
+
const { flags } = await this.parse(ConnectionRequests);
|
|
14
|
+
const client = await this.buildAuthenticatedClient();
|
|
15
|
+
try {
|
|
16
|
+
const result = await (0, workflow_runner_1.runWorkflow)(client.retrieveConnectionRequests, {}, {
|
|
17
|
+
isQuiet: flags.quiet,
|
|
18
|
+
});
|
|
19
|
+
(0, formatter_1.formatOutput)({
|
|
20
|
+
data: result.data,
|
|
21
|
+
errors: result.errors,
|
|
22
|
+
isJson: flags.json,
|
|
23
|
+
fields: flags.fields,
|
|
24
|
+
isQuiet: flags.quiet,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
catch (error) {
|
|
28
|
+
this.handleError(error);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.default = ConnectionRequests;
|
|
33
|
+
//# sourceMappingURL=requests.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requests.js","sourceRoot":"","sources":["../../../src/commands/connection/requests.ts"],"names":[],"mappings":";;AAAA,iDAA4C;AAC5C,sDAAsD;AACtD,oEAA6D;AAE7D,MAAqB,kBAAmB,SAAQ,2BAAW;IACzD,MAAM,CAAU,WAAW,GAAG,mCAAmC,CAAC;IAElE,MAAM,CAAU,KAAK,GAAG;QACtB,GAAG,2BAAW,CAAC,SAAS;KACzB,CAAC;IAEF,MAAM,CAAU,QAAQ,GAAG,CAAC,8CAA8C,CAAC,CAAC;IAErE,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;QAEvD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,wBAAwB,EAAE,CAAC;QAErD,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAA,6BAAW,EAAC,MAAM,CAAC,0BAA0B,EAAE,EAAE,EAAE;gBACtE,OAAO,EAAE,KAAK,CAAC,KAAK;aACrB,CAAC,CAAC;YAEH,IAAA,wBAAY,EAAC;gBACX,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,MAAM,EAAE,MAAM,CAAC,MAAM;gBACrB,MAAM,EAAE,KAAK,CAAC,IAAI;gBAClB,MAAM,EAAE,KAAK,CAAC,MAAM;gBACpB,OAAO,EAAE,KAAK,CAAC,KAAK;aACrB,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAC1B,CAAC;IACH,CAAC;;AA7BH,qCA8BC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command';
|
|
2
|
+
export default class InboxGet extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {
|
|
5
|
+
since: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
6
|
+
type: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
7
|
+
'thread-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
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=get.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../src/commands/inbox/get.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,WAAW;IAC/C,OAAgB,WAAW,SAAoE;IAE/F,OAAgB,KAAK;;;;;;;;;MAYnB;IAEF,OAAgB,QAAQ,WAGtB;IAEW,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA2BlC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
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
|
+
class InboxGet extends _base_command_1.BaseCommand {
|
|
7
|
+
static description = 'Get messages from the monitored inbox across all conversations';
|
|
8
|
+
static flags = {
|
|
9
|
+
..._base_command_1.BaseCommand.baseFlags,
|
|
10
|
+
since: core_1.Flags.string({
|
|
11
|
+
description: 'Retrieve messages after ISO timestamp',
|
|
12
|
+
}),
|
|
13
|
+
type: core_1.Flags.string({
|
|
14
|
+
description: 'Filter by inbox type',
|
|
15
|
+
options: ['st', 'nv'],
|
|
16
|
+
}),
|
|
17
|
+
'thread-id': core_1.Flags.string({
|
|
18
|
+
description: 'Restrict to a single conversation thread',
|
|
19
|
+
}),
|
|
20
|
+
};
|
|
21
|
+
static examples = [
|
|
22
|
+
'<%= config.bin %> inbox get',
|
|
23
|
+
'<%= config.bin %> inbox get --since 2024-01-15T10:30:00Z --type nv',
|
|
24
|
+
];
|
|
25
|
+
async run() {
|
|
26
|
+
const { flags } = await this.parse(InboxGet);
|
|
27
|
+
const client = await this.buildAuthenticatedClient();
|
|
28
|
+
try {
|
|
29
|
+
if (!flags.quiet) {
|
|
30
|
+
process.stderr.write('Fetching inbox...\n');
|
|
31
|
+
}
|
|
32
|
+
const result = await client.pollInbox({
|
|
33
|
+
since: flags.since,
|
|
34
|
+
type: flags.type,
|
|
35
|
+
threadId: flags['thread-id'],
|
|
36
|
+
});
|
|
37
|
+
(0, formatter_1.formatOutput)({
|
|
38
|
+
data: result.data,
|
|
39
|
+
errors: result.errors,
|
|
40
|
+
isJson: flags.json,
|
|
41
|
+
fields: flags.fields,
|
|
42
|
+
isQuiet: flags.quiet,
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
catch (error) {
|
|
46
|
+
this.handleError(error);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
exports.default = InboxGet;
|
|
51
|
+
//# sourceMappingURL=get.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../../src/commands/inbox/get.ts"],"names":[],"mappings":";;AAAA,sCAAoC;AAEpC,iDAA4C;AAC5C,sDAAsD;AAEtD,MAAqB,QAAS,SAAQ,2BAAW;IAC/C,MAAM,CAAU,WAAW,GAAG,gEAAgE,CAAC;IAE/F,MAAM,CAAU,KAAK,GAAG;QACtB,GAAG,2BAAW,CAAC,SAAS;QACxB,KAAK,EAAE,YAAK,CAAC,MAAM,CAAC;YAClB,WAAW,EAAE,uCAAuC;SACrD,CAAC;QACF,IAAI,EAAE,YAAK,CAAC,MAAM,CAAC;YACjB,WAAW,EAAE,sBAAsB;YACnC,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;SACtB,CAAC;QACF,WAAW,EAAE,YAAK,CAAC,MAAM,CAAC;YACxB,WAAW,EAAE,0CAA0C;SACxD,CAAC;KACH,CAAC;IAEF,MAAM,CAAU,QAAQ,GAAG;QACzB,6BAA6B;QAC7B,oEAAoE;KACrE,CAAC;IAEK,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAE7C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,wBAAwB,EAAE,CAAC;QAErD,IAAI,CAAC;YACH,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;gBACjB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;YAC9C,CAAC;YAED,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC;gBACpC,KAAK,EAAE,KAAK,CAAC,KAAK;gBAClB,IAAI,EAAE,KAAK,CAAC,IAA+B;gBAC3C,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC;aAC7B,CAAC,CAAC;YAEH,IAAA,wBAAY,EAAC;gBACX,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,MAAM,EAAE,MAAM,CAAC,MAAM;gBACrB,MAAM,EAAE,KAAK,CAAC,IAAI;gBAClB,MAAM,EAAE,KAAK,CAAC,MAAM;gBACpB,OAAO,EAAE,KAAK,CAAC,KAAK;aACrB,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAC1B,CAAC;IACH,CAAC;;AAhDH,2BAiDC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command';
|
|
2
|
+
export default class InboxSync extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {
|
|
5
|
+
nv: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
6
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
7
|
+
fields: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
8
|
+
quiet: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
'no-color': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
account: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
};
|
|
12
|
+
static examples: string[];
|
|
13
|
+
run(): Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=sync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../../src/commands/inbox/sync.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,WAAW;IAChD,OAAgB,WAAW,SAC0D;IAErF,OAAgB,KAAK;;;;;;;MAMnB;IAEF,OAAgB,QAAQ,WAGtB;IAEW,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAsBlC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
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 InboxSync extends _base_command_1.BaseCommand {
|
|
8
|
+
static description = 'Enable whole-inbox monitoring so every conversation can be read with "inbox get"';
|
|
9
|
+
static flags = {
|
|
10
|
+
..._base_command_1.BaseCommand.baseFlags,
|
|
11
|
+
nv: core_1.Flags.boolean({
|
|
12
|
+
description: 'Enable monitoring for the Sales Navigator inbox instead of the standard one',
|
|
13
|
+
default: false,
|
|
14
|
+
}),
|
|
15
|
+
};
|
|
16
|
+
static examples = [
|
|
17
|
+
'<%= config.bin %> inbox sync',
|
|
18
|
+
'<%= config.bin %> inbox sync --nv',
|
|
19
|
+
];
|
|
20
|
+
async run() {
|
|
21
|
+
const { flags } = await this.parse(InboxSync);
|
|
22
|
+
const client = await this.buildAuthenticatedClient();
|
|
23
|
+
try {
|
|
24
|
+
const operation = flags.nv ? client.nvSyncInbox : client.syncInbox;
|
|
25
|
+
const result = await (0, workflow_runner_1.runVoidWorkflow)(operation, {}, { isQuiet: flags.quiet });
|
|
26
|
+
(0, formatter_1.formatVoidOutput)({
|
|
27
|
+
errors: result.errors,
|
|
28
|
+
isJson: flags.json,
|
|
29
|
+
isQuiet: flags.quiet,
|
|
30
|
+
successMessage: flags.nv
|
|
31
|
+
? 'Sales Navigator inbox monitoring enabled.'
|
|
32
|
+
: 'Inbox monitoring enabled.',
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
this.handleError(error);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.default = InboxSync;
|
|
41
|
+
//# sourceMappingURL=sync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync.js","sourceRoot":"","sources":["../../../src/commands/inbox/sync.ts"],"names":[],"mappings":";;AAAA,sCAAoC;AAEpC,iDAA4C;AAC5C,sDAA0D;AAC1D,oEAAiE;AAEjE,MAAqB,SAAU,SAAQ,2BAAW;IAChD,MAAM,CAAU,WAAW,GACzB,kFAAkF,CAAC;IAErF,MAAM,CAAU,KAAK,GAAG;QACtB,GAAG,2BAAW,CAAC,SAAS;QACxB,EAAE,EAAE,YAAK,CAAC,OAAO,CAAC;YAChB,WAAW,EAAE,6EAA6E;YAC1F,OAAO,EAAE,KAAK;SACf,CAAC;KACH,CAAC;IAEF,MAAM,CAAU,QAAQ,GAAG;QACzB,8BAA8B;QAC9B,mCAAmC;KACpC,CAAC;IAEK,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAE9C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,wBAAwB,EAAE,CAAC;QAErD,IAAI,CAAC;YACH,MAAM,SAAS,GAAG,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC;YAEnE,MAAM,MAAM,GAAG,MAAM,IAAA,iCAAe,EAAC,SAAS,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC;YAE9E,IAAA,4BAAgB,EAAC;gBACf,MAAM,EAAE,MAAM,CAAC,MAAM;gBACrB,MAAM,EAAE,KAAK,CAAC,IAAI;gBAClB,OAAO,EAAE,KAAK,CAAC,KAAK;gBACpB,cAAc,EAAE,KAAK,CAAC,EAAE;oBACtB,CAAC,CAAC,2CAA2C;oBAC7C,CAAC,CAAC,2BAA2B;aAChC,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAC1B,CAAC;IACH,CAAC;;AAtCH,4BAuCC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command';
|
|
2
|
+
export default class MessageManage extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static args: {
|
|
5
|
+
'thread-id': import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
|
+
operation: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
static flags: {
|
|
9
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
fields: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
quiet: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
12
|
+
'no-color': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
13
|
+
account: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
|
+
};
|
|
15
|
+
static examples: string[];
|
|
16
|
+
run(): Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=manage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manage.d.ts","sourceRoot":"","sources":["../../../src/commands/message/manage.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,WAAW;IACpD,OAAgB,WAAW,SAAkD;IAE7E,OAAgB,IAAI;;;MAUlB;IAEF,OAAgB,KAAK;;;;;;MAEnB;IAEF,OAAgB,QAAQ,WAGtB;IAEW,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA2BlC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
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 MessageManage extends _base_command_1.BaseCommand {
|
|
8
|
+
static description = 'Archive, star, or mute a conversation thread';
|
|
9
|
+
static args = {
|
|
10
|
+
'thread-id': core_1.Args.string({
|
|
11
|
+
description: 'Conversation thread identifier',
|
|
12
|
+
required: true,
|
|
13
|
+
}),
|
|
14
|
+
operation: core_1.Args.string({
|
|
15
|
+
description: 'One of archive, unarchive, star, unstar, mute, unmute',
|
|
16
|
+
required: true,
|
|
17
|
+
options: ['archive', 'unarchive', 'star', 'unstar', 'mute', 'unmute'],
|
|
18
|
+
}),
|
|
19
|
+
};
|
|
20
|
+
static flags = {
|
|
21
|
+
..._base_command_1.BaseCommand.baseFlags,
|
|
22
|
+
};
|
|
23
|
+
static examples = [
|
|
24
|
+
'<%= config.bin %> message manage 2-abc123... archive',
|
|
25
|
+
'<%= config.bin %> message manage 2-abc123... unmute',
|
|
26
|
+
];
|
|
27
|
+
async run() {
|
|
28
|
+
const { args, flags } = await this.parse(MessageManage);
|
|
29
|
+
const client = await this.buildAuthenticatedClient();
|
|
30
|
+
try {
|
|
31
|
+
const result = await (0, workflow_runner_1.runVoidWorkflow)(client.manageConversation, {
|
|
32
|
+
threadId: args['thread-id'],
|
|
33
|
+
operation: args.operation,
|
|
34
|
+
}, {
|
|
35
|
+
isQuiet: flags.quiet,
|
|
36
|
+
});
|
|
37
|
+
(0, formatter_1.formatVoidOutput)({
|
|
38
|
+
errors: result.errors,
|
|
39
|
+
isJson: flags.json,
|
|
40
|
+
isQuiet: flags.quiet,
|
|
41
|
+
successMessage: `Conversation "${args.operation}" applied.`,
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
this.handleError(error);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.default = MessageManage;
|
|
50
|
+
//# sourceMappingURL=manage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manage.js","sourceRoot":"","sources":["../../../src/commands/message/manage.ts"],"names":[],"mappings":";;AAAA,sCAAmC;AAEnC,iDAA4C;AAC5C,sDAA0D;AAC1D,oEAAiE;AAEjE,MAAqB,aAAc,SAAQ,2BAAW;IACpD,MAAM,CAAU,WAAW,GAAG,8CAA8C,CAAC;IAE7E,MAAM,CAAU,IAAI,GAAG;QACrB,WAAW,EAAE,WAAI,CAAC,MAAM,CAAC;YACvB,WAAW,EAAE,gCAAgC;YAC7C,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,SAAS,EAAE,WAAI,CAAC,MAAM,CAAC;YACrB,WAAW,EAAE,uDAAuD;YACpE,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC;SACtE,CAAC;KACH,CAAC;IAEF,MAAM,CAAU,KAAK,GAAG;QACtB,GAAG,2BAAW,CAAC,SAAS;KACzB,CAAC;IAEF,MAAM,CAAU,QAAQ,GAAG;QACzB,sDAAsD;QACtD,qDAAqD;KACtD,CAAC;IAEK,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;QAExD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,wBAAwB,EAAE,CAAC;QAErD,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAA,iCAAe,EAClC,MAAM,CAAC,kBAAkB,EACzB;gBACE,QAAQ,EAAE,IAAI,CAAC,WAAW,CAAC;gBAC3B,SAAS,EAAE,IAAI,CAAC,SAAS;aAC1B,EACD;gBACE,OAAO,EAAE,KAAK,CAAC,KAAK;aACrB,CACF,CAAC;YAEF,IAAA,4BAAgB,EAAC;gBACf,MAAM,EAAE,MAAM,CAAC,MAAM;gBACrB,MAAM,EAAE,KAAK,CAAC,IAAI;gBAClB,OAAO,EAAE,KAAK,CAAC,KAAK;gBACpB,cAAc,EAAE,iBAAiB,IAAI,CAAC,SAAS,YAAY;aAC5D,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAC1B,CAAC;IACH,CAAC;;AAlDH,gCAmDC"}
|
|
@@ -2,10 +2,11 @@ import { BaseCommand } from '../../base-command';
|
|
|
2
2
|
export default class MessageSend extends BaseCommand {
|
|
3
3
|
static description: string;
|
|
4
4
|
static args: {
|
|
5
|
-
'person-url': import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
|
+
'person-url': import("@oclif/core/lib/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
6
6
|
text: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
7
|
};
|
|
8
8
|
static flags: {
|
|
9
|
+
'thread-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
9
10
|
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
11
|
fields: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
12
|
quiet: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send.d.ts","sourceRoot":"","sources":["../../../src/commands/message/send.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"send.d.ts","sourceRoot":"","sources":["../../../src/commands/message/send.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAK5C,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,WAAW;IAClD,OAAgB,WAAW,SAAyC;IAEpE,OAAgB,IAAI;;;MASlB;IAEF,OAAgB,KAAK;;;;;;;MAKnB;IAEF,OAAgB,QAAQ,WAGtB;IAEW,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAkClC"}
|
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const core_1 = require("@oclif/core");
|
|
4
4
|
const _base_command_1 = require("../../base-command");
|
|
5
|
+
const exit_codes_1 = require("../../core/errors/exit-codes");
|
|
5
6
|
const formatter_1 = require("../../core/output/formatter");
|
|
6
7
|
const workflow_runner_1 = require("../../core/workflow/workflow-runner");
|
|
7
8
|
class MessageSend extends _base_command_1.BaseCommand {
|
|
8
9
|
static description = 'Send a message to a LinkedIn person';
|
|
9
10
|
static args = {
|
|
10
11
|
'person-url': core_1.Args.string({
|
|
11
|
-
description: 'LinkedIn profile URL of the recipient',
|
|
12
|
-
required:
|
|
12
|
+
description: 'LinkedIn profile URL of the recipient (omit when --thread-id is provided)',
|
|
13
|
+
required: false,
|
|
13
14
|
}),
|
|
14
15
|
text: core_1.Args.string({
|
|
15
16
|
description: 'Message text (up to 1900 characters)',
|
|
@@ -18,16 +19,26 @@ class MessageSend extends _base_command_1.BaseCommand {
|
|
|
18
19
|
};
|
|
19
20
|
static flags = {
|
|
20
21
|
..._base_command_1.BaseCommand.baseFlags,
|
|
22
|
+
'thread-id': core_1.Flags.string({
|
|
23
|
+
description: 'Reply into an existing conversation thread instead of passing person-url',
|
|
24
|
+
}),
|
|
21
25
|
};
|
|
22
26
|
static examples = [
|
|
23
27
|
'<%= config.bin %> message send https://www.linkedin.com/in/john-doe "Hello John!"',
|
|
28
|
+
'<%= config.bin %> message send --thread-id 2-abc123... "Sounds good, talk soon!"',
|
|
24
29
|
];
|
|
25
30
|
async run() {
|
|
26
31
|
const { args, flags } = await this.parse(MessageSend);
|
|
32
|
+
if (!args['person-url'] && !flags['thread-id']) {
|
|
33
|
+
this.error('Provide either a person-url argument or the --thread-id flag.', {
|
|
34
|
+
exit: exit_codes_1.EXIT_CODE.VALIDATION,
|
|
35
|
+
});
|
|
36
|
+
}
|
|
27
37
|
const client = await this.buildAuthenticatedClient();
|
|
28
38
|
try {
|
|
29
39
|
const result = await (0, workflow_runner_1.runVoidWorkflow)(client.sendMessage, {
|
|
30
40
|
personUrl: args['person-url'],
|
|
41
|
+
threadId: flags['thread-id'],
|
|
31
42
|
text: args.text,
|
|
32
43
|
}, {
|
|
33
44
|
isQuiet: flags.quiet,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send.js","sourceRoot":"","sources":["../../../src/commands/message/send.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"send.js","sourceRoot":"","sources":["../../../src/commands/message/send.ts"],"names":[],"mappings":";;AAAA,sCAA0C;AAE1C,iDAA4C;AAC5C,wDAAoD;AACpD,sDAA0D;AAC1D,oEAAiE;AAEjE,MAAqB,WAAY,SAAQ,2BAAW;IAClD,MAAM,CAAU,WAAW,GAAG,qCAAqC,CAAC;IAEpE,MAAM,CAAU,IAAI,GAAG;QACrB,YAAY,EAAE,WAAI,CAAC,MAAM,CAAC;YACxB,WAAW,EAAE,2EAA2E;YACxF,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,IAAI,EAAE,WAAI,CAAC,MAAM,CAAC;YAChB,WAAW,EAAE,sCAAsC;YACnD,QAAQ,EAAE,IAAI;SACf,CAAC;KACH,CAAC;IAEF,MAAM,CAAU,KAAK,GAAG;QACtB,GAAG,2BAAW,CAAC,SAAS;QACxB,WAAW,EAAE,YAAK,CAAC,MAAM,CAAC;YACxB,WAAW,EAAE,0EAA0E;SACxF,CAAC;KACH,CAAC;IAEF,MAAM,CAAU,QAAQ,GAAG;QACzB,mFAAmF;QACnF,kFAAkF;KACnF,CAAC;IAEK,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QAEtD,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE,CAAC;YAC/C,IAAI,CAAC,KAAK,CAAC,+DAA+D,EAAE;gBAC1E,IAAI,EAAE,sBAAS,CAAC,UAAU;aAC3B,CAAC,CAAC;QACL,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,wBAAwB,EAAE,CAAC;QAErD,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAA,iCAAe,EAClC,MAAM,CAAC,WAAW,EAClB;gBACE,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC;gBAC7B,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC;gBAC5B,IAAI,EAAE,IAAI,CAAC,IAAI;aAChB,EACD;gBACE,OAAO,EAAE,KAAK,CAAC,KAAK;aACrB,CACF,CAAC;YAEF,IAAA,4BAAgB,EAAC;gBACf,MAAM,EAAE,MAAM,CAAC,MAAM;gBACrB,MAAM,EAAE,KAAK,CAAC,IAAI;gBAClB,OAAO,EAAE,KAAK,CAAC,KAAK;gBACpB,cAAc,EAAE,eAAe;aAChC,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAC1B,CAAC;IACH,CAAC;;AA3DH,8BA4DC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base-command';
|
|
2
|
+
export default class NavigatorMessageManage extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static args: {
|
|
5
|
+
'thread-id': import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
|
+
operation: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
static flags: {
|
|
9
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
fields: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
quiet: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
12
|
+
'no-color': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
13
|
+
account: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
|
+
};
|
|
15
|
+
static examples: string[];
|
|
16
|
+
run(): Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=manage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manage.d.ts","sourceRoot":"","sources":["../../../../src/commands/navigator/message/manage.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,MAAM,CAAC,OAAO,OAAO,sBAAuB,SAAQ,WAAW;IAC7D,OAAgB,WAAW,SAAgE;IAE3F,OAAgB,IAAI;;;MAUlB;IAEF,OAAgB,KAAK;;;;;;MAEnB;IAEF,OAAgB,QAAQ,WAAsE;IAEjF,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA2BlC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
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 NavigatorMessageManage extends _base_command_1.BaseCommand {
|
|
8
|
+
static description = 'Archive or unarchive a Sales Navigator conversation thread';
|
|
9
|
+
static args = {
|
|
10
|
+
'thread-id': core_1.Args.string({
|
|
11
|
+
description: 'Conversation thread identifier',
|
|
12
|
+
required: true,
|
|
13
|
+
}),
|
|
14
|
+
operation: core_1.Args.string({
|
|
15
|
+
description: 'One of archive, unarchive',
|
|
16
|
+
required: true,
|
|
17
|
+
options: ['archive', 'unarchive'],
|
|
18
|
+
}),
|
|
19
|
+
};
|
|
20
|
+
static flags = {
|
|
21
|
+
..._base_command_1.BaseCommand.baseFlags,
|
|
22
|
+
};
|
|
23
|
+
static examples = ['<%= config.bin %> navigator message manage 2-abc123... archive'];
|
|
24
|
+
async run() {
|
|
25
|
+
const { args, flags } = await this.parse(NavigatorMessageManage);
|
|
26
|
+
const client = await this.buildAuthenticatedClient();
|
|
27
|
+
try {
|
|
28
|
+
const result = await (0, workflow_runner_1.runVoidWorkflow)(client.nvManageConversation, {
|
|
29
|
+
threadId: args['thread-id'],
|
|
30
|
+
operation: args.operation,
|
|
31
|
+
}, {
|
|
32
|
+
isQuiet: flags.quiet,
|
|
33
|
+
});
|
|
34
|
+
(0, formatter_1.formatVoidOutput)({
|
|
35
|
+
errors: result.errors,
|
|
36
|
+
isJson: flags.json,
|
|
37
|
+
isQuiet: flags.quiet,
|
|
38
|
+
successMessage: `Sales Navigator conversation "${args.operation}" applied.`,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
catch (error) {
|
|
42
|
+
this.handleError(error);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.default = NavigatorMessageManage;
|
|
47
|
+
//# sourceMappingURL=manage.js.map
|