@curviate/cli 0.19.0 → 0.21.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/CHANGELOG.md +133 -0
- package/dist/{account-EGJJNBXW.js → account-A3FOYUKC.js} +29 -29
- package/dist/{chunk-42VUUKQ3.js → chunk-56ORAZJO.js} +4 -1
- package/dist/{chunk-TMU3CSPR.js → chunk-CUTMZWL6.js} +5 -1
- package/dist/chunk-HOQ7EUHJ.js +50 -0
- package/dist/{chunk-M33MI53G.js → chunk-LMVDURUZ.js} +23 -1
- package/dist/{chunk-KVV6LZ7E.js → chunk-Q7XG2VIF.js} +60 -24
- package/dist/chunk-ZYURL5VK.js +83 -0
- package/dist/cli.js +51 -36
- package/dist/{comment-VT6PO4MN.js → comment-RPLZHFJQ.js} +9 -9
- package/dist/{company-XEEBBCRZ.js → company-DFJK2RHM.js} +23 -22
- package/dist/{config-P5CPF5WC.js → config-FPWWYG7G.js} +3 -2
- package/dist/{connect-6PU7QCOL.js → connect-ELSSMOIC.js} +37 -15
- package/dist/{feed-KAUDRE5K.js → feed-23Z7OQNL.js} +4 -3
- package/dist/{group-LPVVJ2JX.js → group-52MP24W3.js} +8 -7
- package/dist/{inbox-BXCWHGWP.js → inbox-G6KNWWLI.js} +10 -9
- package/dist/{inboxes-MTPWLP5F.js → inboxes-NTTYCQPM.js} +5 -4
- package/dist/{job-EIXBJXLW.js → job-WOPIAHOR.js} +8 -7
- package/dist/{login-GDLWR542.js → login-ZLDDIAFW.js} +14 -15
- package/dist/{message-UWMRE2SJ.js → message-KJXY5RCD.js} +7 -4
- package/dist/{notification-RYFDHM3G.js → notification-MNEABNVW.js} +6 -5
- package/dist/{post-HK6HHIKV.js → post-A7YZWBFG.js} +12 -12
- package/dist/{profile-PES67647.js → profile-XOMDIYSY.js} +14 -13
- package/dist/{recruiter-MVPSTH2V.js → recruiter-CCLG4PM4.js} +38 -35
- package/dist/{sales-nav-TMXWDKSE.js → sales-nav-5ZRE2UAQ.js} +20 -19
- package/dist/{search-O2LACGHE.js → search-NDESJC3Y.js} +16 -14
- package/dist/{webhook-QFSZN3P2.js → webhook-TNZF3FMN.js} +51 -19
- package/package.json +2 -2
- package/dist/chunk-U7Y4EXHT.js +0 -33
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
sentAsNotice
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import
|
|
6
|
-
resolveTextOrStdin
|
|
7
|
-
} from "./chunk-U7Y4EXHT.js";
|
|
4
|
+
} from "./chunk-Q7XG2VIF.js";
|
|
5
|
+
import "./chunk-HOQ7EUHJ.js";
|
|
8
6
|
import {
|
|
9
7
|
AttachError,
|
|
10
8
|
readAttachment,
|
|
@@ -36,11 +34,14 @@ import {
|
|
|
36
34
|
renderSuccess,
|
|
37
35
|
renderUnexpectedError,
|
|
38
36
|
resolveEffectiveConfig
|
|
39
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-LMVDURUZ.js";
|
|
40
38
|
import {
|
|
41
39
|
GLOBAL_FLAGS,
|
|
42
40
|
WRITE_FLAGS
|
|
43
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-CUTMZWL6.js";
|
|
42
|
+
import {
|
|
43
|
+
resolveTextOrStdin
|
|
44
|
+
} from "./chunk-ZYURL5VK.js";
|
|
44
45
|
|
|
45
46
|
// src/commands/company.ts
|
|
46
47
|
import { defineCommand } from "citty";
|
|
@@ -509,7 +510,7 @@ var companyEmployeesCommand = defineCommand({
|
|
|
509
510
|
profile: flags.profile
|
|
510
511
|
});
|
|
511
512
|
if (!cfg.apiKey) {
|
|
512
|
-
process.stderr.write("error: no API key
|
|
513
|
+
process.stderr.write("error: no API key, run `curviate login` or pass --api-key.\n");
|
|
513
514
|
process.exit(3);
|
|
514
515
|
}
|
|
515
516
|
const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
|
|
@@ -533,7 +534,7 @@ var companyPostsCommand = defineCommand({
|
|
|
533
534
|
profile: flags.profile
|
|
534
535
|
});
|
|
535
536
|
if (!cfg.apiKey) {
|
|
536
|
-
process.stderr.write("error: no API key
|
|
537
|
+
process.stderr.write("error: no API key, run `curviate login` or pass --api-key.\n");
|
|
537
538
|
process.exit(3);
|
|
538
539
|
}
|
|
539
540
|
const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
|
|
@@ -558,7 +559,7 @@ var companyJobsCommand = defineCommand({
|
|
|
558
559
|
profile: flags.profile
|
|
559
560
|
});
|
|
560
561
|
if (!cfg.apiKey) {
|
|
561
|
-
process.stderr.write("error: no API key
|
|
562
|
+
process.stderr.write("error: no API key, run `curviate login` or pass --api-key.\n");
|
|
562
563
|
process.exit(3);
|
|
563
564
|
}
|
|
564
565
|
const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
|
|
@@ -585,7 +586,7 @@ var companyInvitableFollowersCommand = defineCommand({
|
|
|
585
586
|
profile: flags.profile
|
|
586
587
|
});
|
|
587
588
|
if (!cfg.apiKey) {
|
|
588
|
-
process.stderr.write("error: no API key
|
|
589
|
+
process.stderr.write("error: no API key, run `curviate login` or pass --api-key.\n");
|
|
589
590
|
process.exit(3);
|
|
590
591
|
}
|
|
591
592
|
const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
|
|
@@ -616,7 +617,7 @@ var companyFollowInviteCommand = defineCommand({
|
|
|
616
617
|
profile: flags.profile
|
|
617
618
|
});
|
|
618
619
|
if (!cfg.apiKey) {
|
|
619
|
-
process.stderr.write("error: no API key
|
|
620
|
+
process.stderr.write("error: no API key, run `curviate login` or pass --api-key.\n");
|
|
620
621
|
process.exit(3);
|
|
621
622
|
}
|
|
622
623
|
const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
|
|
@@ -637,7 +638,7 @@ var companyManagedCommand = defineCommand({
|
|
|
637
638
|
profile: flags.profile
|
|
638
639
|
});
|
|
639
640
|
if (!cfg.apiKey) {
|
|
640
|
-
process.stderr.write("error: no API key
|
|
641
|
+
process.stderr.write("error: no API key, run `curviate login` or pass --api-key.\n");
|
|
641
642
|
process.exit(3);
|
|
642
643
|
}
|
|
643
644
|
const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
|
|
@@ -661,7 +662,7 @@ var companyFollowersCommand = defineCommand({
|
|
|
661
662
|
profile: flags.profile
|
|
662
663
|
});
|
|
663
664
|
if (!cfg.apiKey) {
|
|
664
|
-
process.stderr.write("error: no API key
|
|
665
|
+
process.stderr.write("error: no API key, run `curviate login` or pass --api-key.\n");
|
|
665
666
|
process.exit(3);
|
|
666
667
|
}
|
|
667
668
|
const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
|
|
@@ -688,7 +689,7 @@ var companyChatsCommand = defineCommand({
|
|
|
688
689
|
profile: flags.profile
|
|
689
690
|
});
|
|
690
691
|
if (!cfg.apiKey) {
|
|
691
|
-
process.stderr.write("error: no API key
|
|
692
|
+
process.stderr.write("error: no API key, run `curviate login` or pass --api-key.\n");
|
|
692
693
|
process.exit(3);
|
|
693
694
|
}
|
|
694
695
|
const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
|
|
@@ -716,7 +717,7 @@ var companyChatCommand = defineCommand({
|
|
|
716
717
|
profile: flags.profile
|
|
717
718
|
});
|
|
718
719
|
if (!cfg.apiKey) {
|
|
719
|
-
process.stderr.write("error: no API key
|
|
720
|
+
process.stderr.write("error: no API key, run `curviate login` or pass --api-key.\n");
|
|
720
721
|
process.exit(3);
|
|
721
722
|
}
|
|
722
723
|
const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
|
|
@@ -744,7 +745,7 @@ var companyMessagesCommand = defineCommand({
|
|
|
744
745
|
profile: flags.profile
|
|
745
746
|
});
|
|
746
747
|
if (!cfg.apiKey) {
|
|
747
|
-
process.stderr.write("error: no API key
|
|
748
|
+
process.stderr.write("error: no API key, run `curviate login` or pass --api-key.\n");
|
|
748
749
|
process.exit(3);
|
|
749
750
|
}
|
|
750
751
|
const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
|
|
@@ -773,7 +774,7 @@ var companyMessageCommand = defineCommand({
|
|
|
773
774
|
profile: flags.profile
|
|
774
775
|
});
|
|
775
776
|
if (!cfg.apiKey) {
|
|
776
|
-
process.stderr.write("error: no API key
|
|
777
|
+
process.stderr.write("error: no API key, run `curviate login` or pass --api-key.\n");
|
|
777
778
|
process.exit(3);
|
|
778
779
|
}
|
|
779
780
|
const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
|
|
@@ -803,7 +804,7 @@ var companySearchChatsCommand = defineCommand({
|
|
|
803
804
|
profile: flags.profile
|
|
804
805
|
});
|
|
805
806
|
if (!cfg.apiKey) {
|
|
806
|
-
process.stderr.write("error: no API key
|
|
807
|
+
process.stderr.write("error: no API key, run `curviate login` or pass --api-key.\n");
|
|
807
808
|
process.exit(3);
|
|
808
809
|
}
|
|
809
810
|
const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
|
|
@@ -823,7 +824,7 @@ var companyReplyCommand = defineCommand({
|
|
|
823
824
|
type: "positional",
|
|
824
825
|
description: "The 2-\u2026 chat id from `company chats`, passed through verbatim (no client-side check)."
|
|
825
826
|
},
|
|
826
|
-
text: { type: "positional", description: "Reply text. Pass - to read from stdin (e.g. via heredoc or pipe)." },
|
|
827
|
+
text: { type: "positional", stdinArg: true, description: "Reply text. Pass - to read from stdin (e.g. via heredoc or pipe)." },
|
|
827
828
|
attach: { type: "string", description: "File to attach (repeatable)." }
|
|
828
829
|
},
|
|
829
830
|
async run({ args }) {
|
|
@@ -836,7 +837,7 @@ var companyReplyCommand = defineCommand({
|
|
|
836
837
|
profile: flags.profile
|
|
837
838
|
});
|
|
838
839
|
if (!cfg.apiKey) {
|
|
839
|
-
process.stderr.write("error: no API key
|
|
840
|
+
process.stderr.write("error: no API key, run `curviate login` or pass --api-key.\n");
|
|
840
841
|
process.exit(3);
|
|
841
842
|
}
|
|
842
843
|
const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
|
|
@@ -849,7 +850,7 @@ var companyCommand = defineCommand({
|
|
|
849
850
|
args: {
|
|
850
851
|
...GLOBAL_FLAGS,
|
|
851
852
|
id: { type: "positional", description: "Company identifier (URL, slug, or native id)." },
|
|
852
|
-
sections: { type: "string", description: "Not supported on company commands
|
|
853
|
+
sections: { type: "string", description: "Not supported on company commands; a usage error (exit 2) if supplied." }
|
|
853
854
|
},
|
|
854
855
|
subCommands: {
|
|
855
856
|
employees: companyEmployeesCommand,
|
|
@@ -876,7 +877,7 @@ var companyCommand = defineCommand({
|
|
|
876
877
|
profile: flags.profile
|
|
877
878
|
});
|
|
878
879
|
if (!cfg.apiKey) {
|
|
879
|
-
process.stderr.write("error: no API key
|
|
880
|
+
process.stderr.write("error: no API key, run `curviate login` or pass --api-key.\n");
|
|
880
881
|
process.exit(3);
|
|
881
882
|
}
|
|
882
883
|
const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
|
|
@@ -7,7 +7,8 @@ import {
|
|
|
7
7
|
renameProfile,
|
|
8
8
|
setActiveProfile,
|
|
9
9
|
updateProfileField
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-CUTMZWL6.js";
|
|
11
|
+
import "./chunk-ZYURL5VK.js";
|
|
11
12
|
|
|
12
13
|
// src/commands/config.ts
|
|
13
14
|
import { defineCommand } from "citty";
|
|
@@ -177,7 +178,7 @@ var configCommand = defineCommand({
|
|
|
177
178
|
);
|
|
178
179
|
if (url === void 0 || url === "") {
|
|
179
180
|
process.stderr.write(
|
|
180
|
-
`Cleared baseUrl on profile "${profileName}"
|
|
181
|
+
`Cleared baseUrl on profile "${profileName}", using the API default.
|
|
181
182
|
`
|
|
182
183
|
);
|
|
183
184
|
} else {
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
nearestSubcommand
|
|
4
|
+
} from "./chunk-HOQ7EUHJ.js";
|
|
2
5
|
import {
|
|
3
6
|
slimInviteReceived,
|
|
4
7
|
slimInviteReceivedItem,
|
|
@@ -21,11 +24,12 @@ import {
|
|
|
21
24
|
renderSuccess,
|
|
22
25
|
renderUnexpectedError,
|
|
23
26
|
resolveEffectiveConfig
|
|
24
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-LMVDURUZ.js";
|
|
25
28
|
import {
|
|
26
29
|
GLOBAL_FLAGS,
|
|
27
30
|
WRITE_FLAGS
|
|
28
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-CUTMZWL6.js";
|
|
32
|
+
import "./chunk-ZYURL5VK.js";
|
|
29
33
|
|
|
30
34
|
// src/commands/connect.ts
|
|
31
35
|
import { defineCommand } from "citty";
|
|
@@ -256,7 +260,7 @@ async function runConnectCancel(client, flags, out) {
|
|
|
256
260
|
var connectSentCommand = defineCommand({
|
|
257
261
|
meta: {
|
|
258
262
|
name: "sent",
|
|
259
|
-
description: "Returns pending sent invitations only
|
|
263
|
+
description: "Returns pending sent invitations only. Accepted and declined invitations are not returned (LinkedIn API limitation). Use `id` with `connect cancel`; use `user.id` (native member URN; the sent-variant carries no public slug) to identify the recipient. `created_at` is the platform's own ISO-8601 timestamp (not an approximation). No total count is available; use `connect sent --all` and count client-side. A very recently sent invitation may take a few minutes to appear here (LinkedIn-side indexing)."
|
|
260
264
|
},
|
|
261
265
|
args: { ...GLOBAL_FLAGS },
|
|
262
266
|
async run({ args }) {
|
|
@@ -269,7 +273,7 @@ var connectSentCommand = defineCommand({
|
|
|
269
273
|
profile: flags.profile
|
|
270
274
|
});
|
|
271
275
|
if (!cfg.apiKey) {
|
|
272
|
-
process.stderr.write("error: no API key
|
|
276
|
+
process.stderr.write("error: no API key, run `curviate login` or pass --api-key.\n");
|
|
273
277
|
process.exit(3);
|
|
274
278
|
}
|
|
275
279
|
const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
|
|
@@ -280,7 +284,7 @@ var connectSentCommand = defineCommand({
|
|
|
280
284
|
var connectReceivedCommand = defineCommand({
|
|
281
285
|
meta: {
|
|
282
286
|
name: "received",
|
|
283
|
-
description: "Returns pending received invitations only
|
|
287
|
+
description: "Returns pending received invitations only. Already-handled invitations are not returned. The `user.*` fields (`public_identifier`, `display_name`, `first_name`, `last_name`) identify who sent the request. Use the `id` field with `connect accept` or `connect decline`. A very recently received invitation may take a few minutes to appear here (LinkedIn-side indexing)."
|
|
284
288
|
},
|
|
285
289
|
args: { ...GLOBAL_FLAGS },
|
|
286
290
|
async run({ args }) {
|
|
@@ -293,7 +297,7 @@ var connectReceivedCommand = defineCommand({
|
|
|
293
297
|
profile: flags.profile
|
|
294
298
|
});
|
|
295
299
|
if (!cfg.apiKey) {
|
|
296
|
-
process.stderr.write("error: no API key
|
|
300
|
+
process.stderr.write("error: no API key, run `curviate login` or pass --api-key.\n");
|
|
297
301
|
process.exit(3);
|
|
298
302
|
}
|
|
299
303
|
const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
|
|
@@ -307,7 +311,7 @@ var connectAcceptCommand = defineCommand({
|
|
|
307
311
|
...WRITE_FLAGS,
|
|
308
312
|
id: {
|
|
309
313
|
type: "positional",
|
|
310
|
-
description: "Invitation id to accept
|
|
314
|
+
description: "Invitation id to accept. Use the `id` field from `connect received`."
|
|
311
315
|
}
|
|
312
316
|
},
|
|
313
317
|
async run({ args }) {
|
|
@@ -320,7 +324,7 @@ var connectAcceptCommand = defineCommand({
|
|
|
320
324
|
profile: flags.profile
|
|
321
325
|
});
|
|
322
326
|
if (!cfg.apiKey) {
|
|
323
|
-
process.stderr.write("error: no API key
|
|
327
|
+
process.stderr.write("error: no API key, run `curviate login` or pass --api-key.\n");
|
|
324
328
|
process.exit(3);
|
|
325
329
|
}
|
|
326
330
|
const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
|
|
@@ -334,7 +338,7 @@ var connectDeclineCommand = defineCommand({
|
|
|
334
338
|
...WRITE_FLAGS,
|
|
335
339
|
id: {
|
|
336
340
|
type: "positional",
|
|
337
|
-
description: "Invitation id to decline
|
|
341
|
+
description: "Invitation id to decline. Use the `id` field from `connect received`."
|
|
338
342
|
}
|
|
339
343
|
},
|
|
340
344
|
async run({ args }) {
|
|
@@ -347,7 +351,7 @@ var connectDeclineCommand = defineCommand({
|
|
|
347
351
|
profile: flags.profile
|
|
348
352
|
});
|
|
349
353
|
if (!cfg.apiKey) {
|
|
350
|
-
process.stderr.write("error: no API key
|
|
354
|
+
process.stderr.write("error: no API key, run `curviate login` or pass --api-key.\n");
|
|
351
355
|
process.exit(3);
|
|
352
356
|
}
|
|
353
357
|
const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
|
|
@@ -371,7 +375,7 @@ var connectCancelCommand = defineCommand({
|
|
|
371
375
|
profile: flags.profile
|
|
372
376
|
});
|
|
373
377
|
if (!cfg.apiKey) {
|
|
374
|
-
process.stderr.write("error: no API key
|
|
378
|
+
process.stderr.write("error: no API key, run `curviate login` or pass --api-key.\n");
|
|
375
379
|
process.exit(3);
|
|
376
380
|
}
|
|
377
381
|
const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
|
|
@@ -379,6 +383,24 @@ var connectCancelCommand = defineCommand({
|
|
|
379
383
|
await runConnectCancel(client, { ...flags, account: flags.account ?? cfg.account }, out);
|
|
380
384
|
}
|
|
381
385
|
});
|
|
386
|
+
var CONNECT_SUBCOMMANDS = ["sent", "received", "accept", "decline", "cancel"];
|
|
387
|
+
var CONNECT_USAGE = "Usage: curviate connect <id> [--note <text>]\n curviate connect sent\n curviate connect received\n curviate connect accept <invitation_id>\n curviate connect decline <invitation_id>\n curviate connect cancel <invitation_id>\n";
|
|
388
|
+
function guardBareConnectForm(id, out) {
|
|
389
|
+
const suggestion = nearestSubcommand(id, [...CONNECT_SUBCOMMANDS]);
|
|
390
|
+
if (suggestion === null) return;
|
|
391
|
+
out.stderr.write(
|
|
392
|
+
`error: \`${id}\` looks like a mistyped \`${suggestion}\` subcommand, and \`curviate connect <id>\` SENDS a connection invitation, so this is refused rather than guessed.
|
|
393
|
+
`
|
|
394
|
+
);
|
|
395
|
+
out.stderr.write(`hint: did you mean \`curviate connect ${suggestion}\`?
|
|
396
|
+
`);
|
|
397
|
+
out.stderr.write(
|
|
398
|
+
`hint: if \`${id}\` really is the profile you meant, pass the full profile URL (https://www.linkedin.com/in/${id}) or the provider id instead.
|
|
399
|
+
`
|
|
400
|
+
);
|
|
401
|
+
out.stderr.write(CONNECT_USAGE);
|
|
402
|
+
process.exit(2);
|
|
403
|
+
}
|
|
382
404
|
var connectCommand = defineCommand({
|
|
383
405
|
meta: {
|
|
384
406
|
name: "connect",
|
|
@@ -406,11 +428,10 @@ var connectCommand = defineCommand({
|
|
|
406
428
|
async run({ args }) {
|
|
407
429
|
const flags = args;
|
|
408
430
|
if (!flags.id) {
|
|
409
|
-
process.stderr.write(
|
|
410
|
-
"Usage: curviate connect <id> [--note <text>]\n curviate connect sent\n curviate connect received\n curviate connect accept <invitation_id>\n curviate connect decline <invitation_id>\n curviate connect cancel <invitation_id>\n"
|
|
411
|
-
);
|
|
431
|
+
process.stderr.write(CONNECT_USAGE);
|
|
412
432
|
process.exit(2);
|
|
413
433
|
}
|
|
434
|
+
guardBareConnectForm(flags.id, buildOutputStreams());
|
|
414
435
|
const cfg = await resolveEffectiveConfig({
|
|
415
436
|
apiKey: flags["api-key"],
|
|
416
437
|
baseUrl: flags["base-url"],
|
|
@@ -419,7 +440,7 @@ var connectCommand = defineCommand({
|
|
|
419
440
|
profile: flags.profile
|
|
420
441
|
});
|
|
421
442
|
if (!cfg.apiKey) {
|
|
422
|
-
process.stderr.write("error: no API key
|
|
443
|
+
process.stderr.write("error: no API key, run `curviate login` or pass --api-key.\n");
|
|
423
444
|
process.exit(3);
|
|
424
445
|
}
|
|
425
446
|
const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
|
|
@@ -429,6 +450,7 @@ var connectCommand = defineCommand({
|
|
|
429
450
|
});
|
|
430
451
|
export {
|
|
431
452
|
connectCommand,
|
|
453
|
+
guardBareConnectForm,
|
|
432
454
|
runConnectAccept,
|
|
433
455
|
runConnectCancel,
|
|
434
456
|
runConnectDecline,
|
|
@@ -9,10 +9,11 @@ import {
|
|
|
9
9
|
renderSuccess,
|
|
10
10
|
renderUnexpectedError,
|
|
11
11
|
resolveEffectiveConfig
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-LMVDURUZ.js";
|
|
13
13
|
import {
|
|
14
14
|
GLOBAL_FLAGS
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-CUTMZWL6.js";
|
|
16
|
+
import "./chunk-ZYURL5VK.js";
|
|
16
17
|
|
|
17
18
|
// src/commands/feed.ts
|
|
18
19
|
import { defineCommand } from "citty";
|
|
@@ -102,7 +103,7 @@ var feedHomeCommand = defineCommand({
|
|
|
102
103
|
profile: flags.profile
|
|
103
104
|
});
|
|
104
105
|
if (!cfg.apiKey) {
|
|
105
|
-
process.stderr.write("error: no API key
|
|
106
|
+
process.stderr.write("error: no API key, run `curviate login` or pass --api-key.\n");
|
|
106
107
|
process.exit(3);
|
|
107
108
|
}
|
|
108
109
|
const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
|
|
@@ -9,11 +9,12 @@ import {
|
|
|
9
9
|
renderSuccess,
|
|
10
10
|
renderUnexpectedError,
|
|
11
11
|
resolveEffectiveConfig
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-LMVDURUZ.js";
|
|
13
13
|
import {
|
|
14
14
|
GLOBAL_FLAGS,
|
|
15
15
|
READ_SINGLE_FLAGS
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-CUTMZWL6.js";
|
|
17
|
+
import "./chunk-ZYURL5VK.js";
|
|
17
18
|
|
|
18
19
|
// src/commands/group.ts
|
|
19
20
|
import { defineCommand } from "citty";
|
|
@@ -134,7 +135,7 @@ async function runGroupMembers(client, flags, out) {
|
|
|
134
135
|
}
|
|
135
136
|
}
|
|
136
137
|
var groupListCommand = defineCommand({
|
|
137
|
-
meta: { name: "list", description: "List the groups the connected account belongs to. Pass --
|
|
138
|
+
meta: { name: "list", description: "List the groups the connected account belongs to. Pass --target to enumerate another member's groups instead (a partial, interests-only read)." },
|
|
138
139
|
args: {
|
|
139
140
|
...GLOBAL_FLAGS,
|
|
140
141
|
target: {
|
|
@@ -152,7 +153,7 @@ var groupListCommand = defineCommand({
|
|
|
152
153
|
profile: flags.profile
|
|
153
154
|
});
|
|
154
155
|
if (!cfg.apiKey) {
|
|
155
|
-
process.stderr.write("error: no API key
|
|
156
|
+
process.stderr.write("error: no API key, run `curviate login` or pass --api-key.\n");
|
|
156
157
|
process.exit(3);
|
|
157
158
|
}
|
|
158
159
|
const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
|
|
@@ -176,7 +177,7 @@ var groupGetCommand = defineCommand({
|
|
|
176
177
|
profile: flags.profile
|
|
177
178
|
});
|
|
178
179
|
if (!cfg.apiKey) {
|
|
179
|
-
process.stderr.write("error: no API key
|
|
180
|
+
process.stderr.write("error: no API key, run `curviate login` or pass --api-key.\n");
|
|
180
181
|
process.exit(3);
|
|
181
182
|
}
|
|
182
183
|
const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
|
|
@@ -207,7 +208,7 @@ var groupMembersCommand = defineCommand({
|
|
|
207
208
|
profile: flags.profile
|
|
208
209
|
});
|
|
209
210
|
if (!cfg.apiKey) {
|
|
210
|
-
process.stderr.write("error: no API key
|
|
211
|
+
process.stderr.write("error: no API key, run `curviate login` or pass --api-key.\n");
|
|
211
212
|
process.exit(3);
|
|
212
213
|
}
|
|
213
214
|
const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
|
|
@@ -224,7 +225,7 @@ var groupCommand = defineCommand({
|
|
|
224
225
|
},
|
|
225
226
|
async run() {
|
|
226
227
|
process.stderr.write(
|
|
227
|
-
"Usage: curviate group <subcommand>\n list [--
|
|
228
|
+
"Usage: curviate group <subcommand>\n list [--target <slug>]\n get <group_id>\n members <group_id> [--name <filter>]\n"
|
|
228
229
|
);
|
|
229
230
|
}
|
|
230
231
|
});
|
|
@@ -15,12 +15,13 @@ import {
|
|
|
15
15
|
renderSuccess,
|
|
16
16
|
renderUnexpectedError,
|
|
17
17
|
resolveEffectiveConfig
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-LMVDURUZ.js";
|
|
19
19
|
import {
|
|
20
20
|
GLOBAL_FLAGS,
|
|
21
21
|
READ_SINGLE_FLAGS,
|
|
22
22
|
WRITE_SINGLE_FLAGS
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-CUTMZWL6.js";
|
|
24
|
+
import "./chunk-ZYURL5VK.js";
|
|
24
25
|
|
|
25
26
|
// src/commands/inbox.ts
|
|
26
27
|
import { defineCommand } from "citty";
|
|
@@ -241,7 +242,7 @@ var inboxListCommand = defineCommand({
|
|
|
241
242
|
profile: flags.profile
|
|
242
243
|
});
|
|
243
244
|
if (!cfg.apiKey) {
|
|
244
|
-
process.stderr.write("error: no API key
|
|
245
|
+
process.stderr.write("error: no API key, run `curviate login` or pass --api-key.\n");
|
|
245
246
|
process.exit(3);
|
|
246
247
|
}
|
|
247
248
|
const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
|
|
@@ -266,7 +267,7 @@ var inboxGetCommand = defineCommand({
|
|
|
266
267
|
profile: flags.profile
|
|
267
268
|
});
|
|
268
269
|
if (!cfg.apiKey) {
|
|
269
|
-
process.stderr.write("error: no API key
|
|
270
|
+
process.stderr.write("error: no API key, run `curviate login` or pass --api-key.\n");
|
|
270
271
|
process.exit(3);
|
|
271
272
|
}
|
|
272
273
|
const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
|
|
@@ -291,7 +292,7 @@ var inboxMarkReadCommand = defineCommand({
|
|
|
291
292
|
profile: flags.profile
|
|
292
293
|
});
|
|
293
294
|
if (!cfg.apiKey) {
|
|
294
|
-
process.stderr.write("error: no API key
|
|
295
|
+
process.stderr.write("error: no API key, run `curviate login` or pass --api-key.\n");
|
|
295
296
|
process.exit(3);
|
|
296
297
|
}
|
|
297
298
|
const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
|
|
@@ -307,11 +308,11 @@ var inboxMessagesCommand = defineCommand({
|
|
|
307
308
|
chatId: { type: "positional", description: "Chat ID." },
|
|
308
309
|
before: {
|
|
309
310
|
type: "string",
|
|
310
|
-
description: "Return messages before this timestamp (ISO-8601, UTC
|
|
311
|
+
description: "Return messages before this timestamp (ISO-8601, UTC; Z suffix required, e.g. 2025-01-01T00:00:00Z)."
|
|
311
312
|
},
|
|
312
313
|
after: {
|
|
313
314
|
type: "string",
|
|
314
|
-
description: "Return messages after this timestamp (ISO-8601, UTC
|
|
315
|
+
description: "Return messages after this timestamp (ISO-8601, UTC; Z suffix required, e.g. 2025-01-01T00:00:00Z)."
|
|
315
316
|
}
|
|
316
317
|
},
|
|
317
318
|
async run({ args }) {
|
|
@@ -324,7 +325,7 @@ var inboxMessagesCommand = defineCommand({
|
|
|
324
325
|
profile: flags.profile
|
|
325
326
|
});
|
|
326
327
|
if (!cfg.apiKey) {
|
|
327
|
-
process.stderr.write("error: no API key
|
|
328
|
+
process.stderr.write("error: no API key, run `curviate login` or pass --api-key.\n");
|
|
328
329
|
process.exit(3);
|
|
329
330
|
}
|
|
330
331
|
const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
|
|
@@ -349,7 +350,7 @@ var inboxSearchCommand = defineCommand({
|
|
|
349
350
|
profile: flags.profile
|
|
350
351
|
});
|
|
351
352
|
if (!cfg.apiKey) {
|
|
352
|
-
process.stderr.write("error: no API key
|
|
353
|
+
process.stderr.write("error: no API key, run `curviate login` or pass --api-key.\n");
|
|
353
354
|
process.exit(3);
|
|
354
355
|
}
|
|
355
356
|
const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
|
|
@@ -9,11 +9,12 @@ import {
|
|
|
9
9
|
renderSuccess,
|
|
10
10
|
renderUnexpectedError,
|
|
11
11
|
resolveEffectiveConfig
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-LMVDURUZ.js";
|
|
13
13
|
import {
|
|
14
14
|
GLOBAL_FLAGS,
|
|
15
15
|
READ_SINGLE_FLAGS
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-CUTMZWL6.js";
|
|
17
|
+
import "./chunk-ZYURL5VK.js";
|
|
17
18
|
|
|
18
19
|
// src/commands/inboxes.ts
|
|
19
20
|
import { defineCommand } from "citty";
|
|
@@ -141,7 +142,7 @@ var inboxesListCommand = defineCommand({
|
|
|
141
142
|
profile: flags.profile
|
|
142
143
|
});
|
|
143
144
|
if (!cfg.apiKey) {
|
|
144
|
-
process.stderr.write("error: no API key
|
|
145
|
+
process.stderr.write("error: no API key, run `curviate login` or pass --api-key.\n");
|
|
145
146
|
process.exit(3);
|
|
146
147
|
}
|
|
147
148
|
const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
|
|
@@ -169,7 +170,7 @@ var inboxesChatsCommand = defineCommand({
|
|
|
169
170
|
profile: flags.profile
|
|
170
171
|
});
|
|
171
172
|
if (!cfg.apiKey) {
|
|
172
|
-
process.stderr.write("error: no API key
|
|
173
|
+
process.stderr.write("error: no API key, run `curviate login` or pass --api-key.\n");
|
|
173
174
|
process.exit(3);
|
|
174
175
|
}
|
|
175
176
|
const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
|
|
@@ -24,12 +24,13 @@ import {
|
|
|
24
24
|
renderSuccess,
|
|
25
25
|
renderUnexpectedError,
|
|
26
26
|
resolveEffectiveConfig
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-LMVDURUZ.js";
|
|
28
28
|
import {
|
|
29
29
|
GLOBAL_FLAGS,
|
|
30
30
|
READ_SINGLE_FLAGS,
|
|
31
31
|
WRITE_SINGLE_FLAGS
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-CUTMZWL6.js";
|
|
33
|
+
import "./chunk-ZYURL5VK.js";
|
|
33
34
|
|
|
34
35
|
// src/commands/job.ts
|
|
35
36
|
import { defineCommand } from "citty";
|
|
@@ -181,7 +182,7 @@ async function runJobList(client, flags, out) {
|
|
|
181
182
|
function pace(ms) {
|
|
182
183
|
return ms > 0 ? new Promise((resolve) => setTimeout(resolve, ms)) : Promise.resolve();
|
|
183
184
|
}
|
|
184
|
-
var JOB_LIST_UNION_CAVEAT = "note: --state ALL is a best-effort client-side union over DRAFT/OPEN/CLOSED/REVIEW/SUSPENDED. LinkedIn's per-state filter is best-effort, so each state is queried, its items are re-filtered against their own state, and the results are merged and de-duplicated by id. There is no unified pagination cursor
|
|
185
|
+
var JOB_LIST_UNION_CAVEAT = "note: --state ALL is a best-effort client-side union over DRAFT/OPEN/CLOSED/REVIEW/SUSPENDED. LinkedIn's per-state filter is best-effort, so each state is queried, its items are re-filtered against their own state, and the results are merged and de-duplicated by id. There is no unified pagination cursor; each state is walked independently and --max-pages applies per state.\n";
|
|
185
186
|
function jobItemId(item) {
|
|
186
187
|
const id = item.id;
|
|
187
188
|
return typeof id === "string" ? id : void 0;
|
|
@@ -453,7 +454,7 @@ async function withClient(flags, fn) {
|
|
|
453
454
|
profile: flags.profile
|
|
454
455
|
});
|
|
455
456
|
if (!cfg.apiKey) {
|
|
456
|
-
process.stderr.write("error: no API key
|
|
457
|
+
process.stderr.write("error: no API key, run `curviate login` or pass --api-key.\n");
|
|
457
458
|
process.exit(3);
|
|
458
459
|
}
|
|
459
460
|
const client = createClient({ apiKey: cfg.apiKey, baseUrl: cfg.baseUrl, timeout: cfg.timeout });
|
|
@@ -468,7 +469,7 @@ var JOB_BODY_FLAGS = {
|
|
|
468
469
|
"workplace-type": { type: "string", description: "Workplace arrangement: ON_SITE|HYBRID|REMOTE." },
|
|
469
470
|
location: { type: "string", description: "A LOCATION parameter id (from search parameters)." },
|
|
470
471
|
"employment-status": { type: "string", description: "Employment type: FULL_TIME|PART_TIME|CONTRACT|TEMPORARY|OTHER|VOLUNTEER|INTERNSHIP." },
|
|
471
|
-
description: { type: "string", description: "Full job description (required; minimum 200 characters
|
|
472
|
+
description: { type: "string", description: "Full job description (required; minimum 200 characters, enforced server-side)." },
|
|
472
473
|
"apply-method": { type: "string", description: "How candidates apply: linkedin|external." },
|
|
473
474
|
"notification-email": { type: "string", description: "Email notified of new applicants (required when --apply-method is linkedin)." },
|
|
474
475
|
"website-url": { type: "string", description: "External apply URL (required when --apply-method is external)." },
|
|
@@ -526,13 +527,13 @@ var jobBudgetCommand = defineCommand({
|
|
|
526
527
|
}
|
|
527
528
|
});
|
|
528
529
|
var jobPublishCommand = defineCommand({
|
|
529
|
-
meta: { name: "publish", description: "Publish a draft. PROMOTED/PROMOTED_PLUS spend real money and require --budget
|
|
530
|
+
meta: { name: "publish", description: "Publish a draft. PROMOTED/PROMOTED_PLUS spend real money and require --budget-amount, --budget-currency, and --budget-scope." },
|
|
530
531
|
args: {
|
|
531
532
|
...WRITE_SINGLE_FLAGS,
|
|
532
533
|
id: { type: "positional", description: "Job id to publish." },
|
|
533
534
|
mode: { type: "string", description: "Publish mode (required): FREE|PROMOTED|PROMOTED_PLUS.", required: true },
|
|
534
535
|
"budget-currency": { type: "string", description: "ISO-4217 currency (required for a paid publish), e.g. EUR." },
|
|
535
|
-
"budget-amount": { type: "string", description: "Budget amount
|
|
536
|
+
"budget-amount": { type: "string", description: "Budget amount, a non-negative number (required for a paid publish)." },
|
|
536
537
|
"budget-scope": { type: "string", description: "Budget scope (required for a paid publish): DAILY|TOTAL." }
|
|
537
538
|
},
|
|
538
539
|
async run({ args }) {
|
|
@@ -5,7 +5,11 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
GLOBAL_FLAGS,
|
|
7
7
|
writeProfile
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-CUTMZWL6.js";
|
|
9
|
+
import {
|
|
10
|
+
defaultReadStdin,
|
|
11
|
+
resolveTextOrStdin
|
|
12
|
+
} from "./chunk-ZYURL5VK.js";
|
|
9
13
|
|
|
10
14
|
// src/commands/login.ts
|
|
11
15
|
import { defineCommand } from "citty";
|
|
@@ -43,6 +47,7 @@ var loginCommand = defineCommand({
|
|
|
43
47
|
...GLOBAL_FLAGS,
|
|
44
48
|
"api-key": {
|
|
45
49
|
type: "string",
|
|
50
|
+
stdinArg: true,
|
|
46
51
|
description: 'API key to save. Pass "-" to read from stdin (keeps the key off argv).'
|
|
47
52
|
},
|
|
48
53
|
account: {
|
|
@@ -58,21 +63,25 @@ var loginCommand = defineCommand({
|
|
|
58
63
|
async run({ args }) {
|
|
59
64
|
const profileName = args.profile ?? "default";
|
|
60
65
|
let apiKey = args["api-key"];
|
|
61
|
-
|
|
62
|
-
|
|
66
|
+
const out = { stderr: { write: (s) => process.stderr.write(s) } };
|
|
67
|
+
if (apiKey !== void 0) {
|
|
68
|
+
apiKey = await resolveTextOrStdin(
|
|
69
|
+
apiKey,
|
|
70
|
+
out,
|
|
71
|
+
async () => (await defaultReadStdin()).trim()
|
|
72
|
+
);
|
|
63
73
|
}
|
|
64
74
|
if (apiKey === void 0) {
|
|
65
75
|
if (process.stdin.isTTY) {
|
|
66
76
|
apiKey = await promptMasked("Enter your API key: ");
|
|
67
77
|
} else {
|
|
68
78
|
process.stderr.write(
|
|
69
|
-
"error: no API key
|
|
79
|
+
"error: no API key, pass --api-key or run interactively on a TTY.\n"
|
|
70
80
|
);
|
|
71
81
|
process.exit(2);
|
|
72
82
|
return;
|
|
73
83
|
}
|
|
74
84
|
}
|
|
75
|
-
const out = { stderr: { write: (s) => process.stderr.write(s) } };
|
|
76
85
|
await runLogin(
|
|
77
86
|
{
|
|
78
87
|
"api-key": apiKey,
|
|
@@ -84,16 +93,6 @@ var loginCommand = defineCommand({
|
|
|
84
93
|
);
|
|
85
94
|
}
|
|
86
95
|
});
|
|
87
|
-
async function readStdin() {
|
|
88
|
-
return new Promise((resolve, reject) => {
|
|
89
|
-
const chunks = [];
|
|
90
|
-
process.stdin.on("data", (chunk) => chunks.push(chunk));
|
|
91
|
-
process.stdin.on("end", () => {
|
|
92
|
-
resolve(Buffer.concat(chunks).toString("utf8").trim());
|
|
93
|
-
});
|
|
94
|
-
process.stdin.on("error", reject);
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
96
|
async function promptMasked(prompt) {
|
|
98
97
|
return readlineSync(prompt, { mask: true });
|
|
99
98
|
}
|