@curviate/cli 0.41.0 → 0.42.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 +39 -0
- package/dist/{account-QZ5RYKIT.js → account-PFK5YROZ.js} +73 -26
- package/dist/{chunk-CBHL3QQJ.js → chunk-B5NIX4G6.js} +1 -1
- package/dist/{chunk-BLFGJIJJ.js → chunk-BLJGV6ST.js} +2 -2
- package/dist/{chunk-6W7364S3.js → chunk-KJ24DIAJ.js} +1 -1
- package/dist/{chunk-4AAKZPOM.js → chunk-OUMMWC7G.js} +76 -26
- package/dist/{chunk-WAE7YLO5.js → chunk-PCZH5QJA.js} +1 -1
- package/dist/{chunk-XDQHNUEU.js → chunk-TC4ZPUWI.js} +12 -6
- package/dist/{chunk-DCZR4M7G.js → chunk-UJOTQPL6.js} +1 -1
- package/dist/cli.js +64 -53
- package/dist/{comment-SYA6OKEY.js → comment-G4EXIIAQ.js} +83 -29
- package/dist/{company-IXQ4OFU3.js → company-WX5QOASS.js} +100 -50
- package/dist/{config-RUBXWFQ3.js → config-K4G3VSBA.js} +44 -9
- package/dist/{connect-TTA2X3KO.js → connect-IYTFL7NT.js} +44 -21
- package/dist/{doctor-ET7XQ22E.js → doctor-ICAEETCL.js} +8 -4
- package/dist/examples-IJL3A6SZ.js +18 -0
- package/dist/{feed-556LS3CN.js → feed-XC5235UF.js} +16 -14
- package/dist/{group-DIIG4XQT.js → group-JDP2HVSV.js} +29 -20
- package/dist/{inbox-SRVTUTE6.js → inbox-W3KR65VD.js} +49 -24
- package/dist/{inboxes-XHZTAUQ7.js → inboxes-XYS3IRT6.js} +21 -17
- package/dist/{job-QNVGEM4J.js → job-XW3WM57J.js} +108 -34
- package/dist/{login-YTVPIN27.js → login-OHAHNBRW.js} +7 -3
- package/dist/{message-2JEL6P7E.js → message-5XC7U4JC.js} +5 -5
- package/dist/{notification-T4SRAIJ3.js → notification-RIUSYJV6.js} +26 -16
- package/dist/{post-PV4UQVPO.js → post-LSEBRQYK.js} +94 -32
- package/dist/{profile-K5BZNGX5.js → profile-NHTYGX7K.js} +124 -43
- package/dist/{recruiter-OBKS4ZVL.js → recruiter-4SDAROK4.js} +210 -67
- package/dist/{sales-nav-WPTMS6QF.js → sales-nav-77NP3UXV.js} +100 -42
- package/dist/{search-YAKZKK74.js → search-XDOQZAVG.js} +80 -39
- package/dist/{setup-NZQUWJYC.js → setup-BPNLAHPC.js} +9 -4
- package/dist/{webhook-PXSLDB2F.js → webhook-XOPRW63N.js} +59 -23
- package/package.json +2 -1
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "./chunk-XP2LN6F6.js";
|
|
11
11
|
import {
|
|
12
12
|
sentAsNotice
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-OUMMWC7G.js";
|
|
14
14
|
import "./chunk-UWO2D4HW.js";
|
|
15
15
|
import "./chunk-HOQ7EUHJ.js";
|
|
16
16
|
import {
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
} from "./chunk-UEAX6KUB.js";
|
|
24
24
|
import {
|
|
25
25
|
requireAccount
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-BLJGV6ST.js";
|
|
27
27
|
import {
|
|
28
28
|
buildPreviewOutput
|
|
29
29
|
} from "./chunk-TCUYH5GO.js";
|
|
@@ -41,17 +41,18 @@ import {
|
|
|
41
41
|
resolveEffectiveConfig,
|
|
42
42
|
streamAll,
|
|
43
43
|
writeNdjsonItem
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-B5NIX4G6.js";
|
|
45
45
|
import "./chunk-XZJQQJBE.js";
|
|
46
46
|
import {
|
|
47
47
|
createClient
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-UJOTQPL6.js";
|
|
49
49
|
import {
|
|
50
50
|
GLOBAL_FLAGS,
|
|
51
51
|
NON_STREAM_FLAGS,
|
|
52
52
|
WRITE_FLAGS,
|
|
53
|
+
readOnly,
|
|
53
54
|
resolveTextOrStdin
|
|
54
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-TC4ZPUWI.js";
|
|
55
56
|
|
|
56
57
|
// src/commands/company.ts
|
|
57
58
|
import { defineCommand } from "citty";
|
|
@@ -61,12 +62,6 @@ function buildOutputStreams() {
|
|
|
61
62
|
stderr: { write: (s) => process.stderr.write(s) }
|
|
62
63
|
};
|
|
63
64
|
}
|
|
64
|
-
function rejectPreviewOnRead(preview, out) {
|
|
65
|
-
if (preview) {
|
|
66
|
-
out.stderr.write("error: --preview is only valid on write commands (mutations). Reads just run.\n");
|
|
67
|
-
process.exit(2);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
65
|
function resolveOutputOpts(flags) {
|
|
71
66
|
return {
|
|
72
67
|
json: (flags.json ?? false) || !process.stdout.isTTY,
|
|
@@ -99,7 +94,6 @@ async function handleSdkError(err, outOpts, out) {
|
|
|
99
94
|
process.exit(1);
|
|
100
95
|
}
|
|
101
96
|
async function runCompanyGet(client, flags, out) {
|
|
102
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
103
97
|
if (flags.all) {
|
|
104
98
|
out.stderr.write("error: --all is not supported on non-paginated commands.\n");
|
|
105
99
|
process.exit(2);
|
|
@@ -121,7 +115,6 @@ async function runCompanyGet(client, flags, out) {
|
|
|
121
115
|
}
|
|
122
116
|
}
|
|
123
117
|
async function runCompanyEmployees(client, flags, out) {
|
|
124
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
125
118
|
rejectPaginationModifiersWithoutAll(flags, out);
|
|
126
119
|
const accountId = await requireAccount(client, flags, out);
|
|
127
120
|
const ns = client.account(accountId);
|
|
@@ -154,7 +147,6 @@ async function runCompanyEmployees(client, flags, out) {
|
|
|
154
147
|
}
|
|
155
148
|
}
|
|
156
149
|
async function runCompanyPosts(client, flags, out) {
|
|
157
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
158
150
|
rejectPaginationModifiersWithoutAll(flags, out);
|
|
159
151
|
const accountId = await requireAccount(client, flags, out);
|
|
160
152
|
const ns = client.account(accountId);
|
|
@@ -185,7 +177,6 @@ async function runCompanyPosts(client, flags, out) {
|
|
|
185
177
|
}
|
|
186
178
|
}
|
|
187
179
|
async function runCompanyJobs(client, flags, out) {
|
|
188
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
189
180
|
rejectPaginationModifiersWithoutAll(flags, out);
|
|
190
181
|
const accountId = await requireAccount(client, flags, out);
|
|
191
182
|
const ns = client.account(accountId);
|
|
@@ -217,7 +208,6 @@ async function runCompanyJobs(client, flags, out) {
|
|
|
217
208
|
}
|
|
218
209
|
}
|
|
219
210
|
async function runCompanyInvitableFollowers(client, flags, out) {
|
|
220
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
221
211
|
rejectPaginationModifiersWithoutAll(flags, out);
|
|
222
212
|
const accountId = await requireAccount(client, flags, out);
|
|
223
213
|
const ns = client.account(accountId);
|
|
@@ -278,7 +268,6 @@ async function runCompanyFollowInvite(client, flags, out) {
|
|
|
278
268
|
}
|
|
279
269
|
}
|
|
280
270
|
async function runCompanyManaged(client, flags, out) {
|
|
281
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
282
271
|
rejectPaginationModifiersWithoutAll(flags, out);
|
|
283
272
|
const accountId = await requireAccount(client, flags, out);
|
|
284
273
|
const ns = client.account(accountId);
|
|
@@ -308,7 +297,6 @@ async function runCompanyManaged(client, flags, out) {
|
|
|
308
297
|
}
|
|
309
298
|
}
|
|
310
299
|
async function runCompanyFollowers(client, flags, out) {
|
|
311
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
312
300
|
rejectPaginationModifiersWithoutAll(flags, out);
|
|
313
301
|
const accountId = await requireAccount(client, flags, out);
|
|
314
302
|
const ns = client.account(accountId);
|
|
@@ -339,7 +327,6 @@ async function runCompanyFollowers(client, flags, out) {
|
|
|
339
327
|
}
|
|
340
328
|
}
|
|
341
329
|
async function runCompanyChats(client, flags, out) {
|
|
342
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
343
330
|
rejectPaginationModifiersWithoutAll(flags, out);
|
|
344
331
|
const accountId = await requireAccount(client, flags, out);
|
|
345
332
|
const ns = client.account(accountId);
|
|
@@ -370,7 +357,6 @@ async function runCompanyChats(client, flags, out) {
|
|
|
370
357
|
}
|
|
371
358
|
}
|
|
372
359
|
async function runCompanyChat(client, flags, out) {
|
|
373
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
374
360
|
if (flags.all) {
|
|
375
361
|
out.stderr.write("error: --all is not supported on non-paginated commands.\n");
|
|
376
362
|
process.exit(2);
|
|
@@ -389,7 +375,6 @@ async function runCompanyChat(client, flags, out) {
|
|
|
389
375
|
}
|
|
390
376
|
}
|
|
391
377
|
async function runCompanyMessages(client, flags, out) {
|
|
392
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
393
378
|
rejectPaginationModifiersWithoutAll(flags, out);
|
|
394
379
|
const accountId = await requireAccount(client, flags, out);
|
|
395
380
|
const ns = client.account(accountId);
|
|
@@ -421,7 +406,6 @@ async function runCompanyMessages(client, flags, out) {
|
|
|
421
406
|
}
|
|
422
407
|
}
|
|
423
408
|
async function runCompanyMessage(client, flags, out) {
|
|
424
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
425
409
|
if (flags.all) {
|
|
426
410
|
out.stderr.write("error: --all is not supported on non-paginated commands.\n");
|
|
427
411
|
process.exit(2);
|
|
@@ -441,7 +425,6 @@ async function runCompanyMessage(client, flags, out) {
|
|
|
441
425
|
}
|
|
442
426
|
}
|
|
443
427
|
async function runCompanySearchChats(client, flags, out) {
|
|
444
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
445
428
|
rejectPaginationModifiersWithoutAll(flags, out);
|
|
446
429
|
const accountId = await requireAccount(client, flags, out);
|
|
447
430
|
const ns = client.account(accountId);
|
|
@@ -525,9 +508,16 @@ async function runCompanyReply(client, flags, out, _readStdin) {
|
|
|
525
508
|
}
|
|
526
509
|
}
|
|
527
510
|
var companyEmployeesCommand = defineCommand({
|
|
528
|
-
meta: {
|
|
511
|
+
meta: {
|
|
512
|
+
name: "employees",
|
|
513
|
+
description: "List people who currently work at the company.",
|
|
514
|
+
examples: [
|
|
515
|
+
"curviate company employees acmecorp",
|
|
516
|
+
'curviate company employees 1234567 --keywords "machine learning"'
|
|
517
|
+
]
|
|
518
|
+
},
|
|
529
519
|
args: {
|
|
530
|
-
...GLOBAL_FLAGS,
|
|
520
|
+
...readOnly(GLOBAL_FLAGS),
|
|
531
521
|
id: { type: "positional", description: "Company identifier (URL, slug, or numeric id), a slug/URL is resolved to the numeric id first." },
|
|
532
522
|
keywords: { type: "string", description: "Free-text keyword filter across employee profile fields." },
|
|
533
523
|
location: { type: "string", description: "Opaque location id from `curviate search parameters --type LOCATION`." }
|
|
@@ -551,9 +541,16 @@ var companyEmployeesCommand = defineCommand({
|
|
|
551
541
|
}
|
|
552
542
|
});
|
|
553
543
|
var companyPostsCommand = defineCommand({
|
|
554
|
-
meta: {
|
|
544
|
+
meta: {
|
|
545
|
+
name: "posts",
|
|
546
|
+
description: "List the company's posts.",
|
|
547
|
+
examples: [
|
|
548
|
+
"curviate company posts acmecorp",
|
|
549
|
+
"curviate company posts 1234567 --limit 5"
|
|
550
|
+
]
|
|
551
|
+
},
|
|
555
552
|
args: {
|
|
556
|
-
...GLOBAL_FLAGS,
|
|
553
|
+
...readOnly(GLOBAL_FLAGS),
|
|
557
554
|
id: { type: "positional", description: "Company identifier (URL, slug, or numeric id), a slug/URL is resolved to the numeric id first." }
|
|
558
555
|
},
|
|
559
556
|
async run({ args }) {
|
|
@@ -575,9 +572,16 @@ var companyPostsCommand = defineCommand({
|
|
|
575
572
|
}
|
|
576
573
|
});
|
|
577
574
|
var companyJobsCommand = defineCommand({
|
|
578
|
-
meta: {
|
|
575
|
+
meta: {
|
|
576
|
+
name: "jobs",
|
|
577
|
+
description: "List the company's open job postings.",
|
|
578
|
+
examples: [
|
|
579
|
+
"curviate company jobs acmecorp",
|
|
580
|
+
"curviate company jobs 1234567 --keywords engineer"
|
|
581
|
+
]
|
|
582
|
+
},
|
|
579
583
|
args: {
|
|
580
|
-
...GLOBAL_FLAGS,
|
|
584
|
+
...readOnly(GLOBAL_FLAGS),
|
|
581
585
|
id: { type: "positional", description: "Company identifier (URL, slug, or numeric id), a slug/URL is resolved to the numeric id first." },
|
|
582
586
|
keywords: { type: "string", description: "Free-text keyword filter across job postings." }
|
|
583
587
|
},
|
|
@@ -602,10 +606,13 @@ var companyJobsCommand = defineCommand({
|
|
|
602
606
|
var companyInvitableFollowersCommand = defineCommand({
|
|
603
607
|
meta: {
|
|
604
608
|
name: "invitable-followers",
|
|
605
|
-
description: "List the account's 1st-degree connections who are eligible to be invited to follow the company page. This is the read that seeds `company follow-invite`. Items carry no name or headline (a wire limitation), so hydrate a candidate via `profile <id>` before deciding who to invite. `invite_token` is always returned as base64 (the raw value can carry binary bytes unsafe to print)."
|
|
609
|
+
description: "List the account's 1st-degree connections who are eligible to be invited to follow the company page. This is the read that seeds `company follow-invite`. Items carry no name or headline (a wire limitation), so hydrate a candidate via `profile <id>` before deciding who to invite. `invite_token` is always returned as base64 (the raw value can carry binary bytes unsafe to print).",
|
|
610
|
+
examples: [
|
|
611
|
+
"curviate company invitable-followers 1234567"
|
|
612
|
+
]
|
|
606
613
|
},
|
|
607
614
|
args: {
|
|
608
|
-
...GLOBAL_FLAGS,
|
|
615
|
+
...readOnly(GLOBAL_FLAGS),
|
|
609
616
|
id: { type: "positional", description: "Company identifier (URL, slug, or numeric id), resolved to the numeric id first." }
|
|
610
617
|
},
|
|
611
618
|
async run({ args }) {
|
|
@@ -629,14 +636,18 @@ var companyInvitableFollowersCommand = defineCommand({
|
|
|
629
636
|
var companyFollowInviteCommand = defineCommand({
|
|
630
637
|
meta: {
|
|
631
638
|
name: "follow-invite",
|
|
632
|
-
description: "Invite the account's 1st-degree connections to follow the administered company page. Write, admin-gated (the account must administer the page with invite rights). Pass the AC... member ids from `company invitable-followers`, one --invitee per invitee. All-or-nothing: for an all-valid request you get one outcome per invitee, in request order (invited/already_invited/ineligible/not_found); if any invitee id is invalid the whole request rejects with a 404, not a partial result. Re-inviting an already-invited member is a safe no-op (the same invitation id, never a duplicate)."
|
|
639
|
+
description: "Invite the account's 1st-degree connections to follow the administered company page. Write, admin-gated (the account must administer the page with invite rights). Pass the AC... member ids from `company invitable-followers`, one --invitee per invitee. All-or-nothing: for an all-valid request you get one outcome per invitee, in request order (invited/already_invited/ineligible/not_found); if any invitee id is invalid the whole request rejects with a 404, not a partial result. Re-inviting an already-invited member is a safe no-op (the same invitation id, never a duplicate).",
|
|
640
|
+
examples: [
|
|
641
|
+
"curviate company follow-invite 1234567 --invitee ACoAAB1cDeFgHiJkLmNoP"
|
|
642
|
+
]
|
|
633
643
|
},
|
|
634
644
|
args: {
|
|
635
645
|
...WRITE_FLAGS,
|
|
636
646
|
id: { type: "positional", description: "Company identifier (URL, slug, or numeric id), resolved to the numeric id first, including under --preview." },
|
|
637
647
|
invitee: {
|
|
638
648
|
type: "string",
|
|
639
|
-
description: "AC... member id to invite (from `company invitable-followers`). Repeatable, at least one required, max 50 per request."
|
|
649
|
+
description: "AC... member id to invite (from `company invitable-followers`). Repeatable, at least one required, max 50 per request.",
|
|
650
|
+
required: true
|
|
640
651
|
}
|
|
641
652
|
},
|
|
642
653
|
async run({ args }) {
|
|
@@ -658,8 +669,14 @@ var companyFollowInviteCommand = defineCommand({
|
|
|
658
669
|
}
|
|
659
670
|
});
|
|
660
671
|
var companyManagedCommand = defineCommand({
|
|
661
|
-
meta: {
|
|
662
|
-
|
|
672
|
+
meta: {
|
|
673
|
+
name: "managed",
|
|
674
|
+
description: "List the company pages the connected account administers. An empty result is valid, the account administers no pages.",
|
|
675
|
+
examples: [
|
|
676
|
+
"curviate company managed"
|
|
677
|
+
]
|
|
678
|
+
},
|
|
679
|
+
args: { ...readOnly(GLOBAL_FLAGS) },
|
|
663
680
|
async run({ args }) {
|
|
664
681
|
const flags = args;
|
|
665
682
|
const cfg = await resolveEffectiveConfig({
|
|
@@ -679,9 +696,16 @@ var companyManagedCommand = defineCommand({
|
|
|
679
696
|
}
|
|
680
697
|
});
|
|
681
698
|
var companyFollowersCommand = defineCommand({
|
|
682
|
-
meta: {
|
|
699
|
+
meta: {
|
|
700
|
+
name: "followers",
|
|
701
|
+
description: "List a company page's followers, newest first. Admin-gated: the account must administer the page (see `company managed`).",
|
|
702
|
+
examples: [
|
|
703
|
+
"curviate company followers 1234567",
|
|
704
|
+
"curviate company followers 1234567 --all"
|
|
705
|
+
]
|
|
706
|
+
},
|
|
683
707
|
args: {
|
|
684
|
-
...GLOBAL_FLAGS,
|
|
708
|
+
...readOnly(GLOBAL_FLAGS),
|
|
685
709
|
id: { type: "positional", description: "Company identifier (URL, slug, or numeric id), a slug/URL is resolved to the numeric id first." }
|
|
686
710
|
},
|
|
687
711
|
async run({ args }) {
|
|
@@ -705,10 +729,13 @@ var companyFollowersCommand = defineCommand({
|
|
|
705
729
|
var companyChatsCommand = defineCommand({
|
|
706
730
|
meta: {
|
|
707
731
|
name: "chats",
|
|
708
|
-
description: "List the conversations in a company page's admin message inbox, newest-activity-first. Admin-gated. Beta."
|
|
732
|
+
description: "List the conversations in a company page's admin message inbox, newest-activity-first. Admin-gated. Beta.",
|
|
733
|
+
examples: [
|
|
734
|
+
"curviate company chats 1234567"
|
|
735
|
+
]
|
|
709
736
|
},
|
|
710
737
|
args: {
|
|
711
|
-
...GLOBAL_FLAGS,
|
|
738
|
+
...readOnly(GLOBAL_FLAGS),
|
|
712
739
|
id: { type: "positional", description: "Company identifier (URL, slug, or numeric id), a slug/URL is resolved to the numeric id first." }
|
|
713
740
|
},
|
|
714
741
|
async run({ args }) {
|
|
@@ -732,10 +759,13 @@ var companyChatsCommand = defineCommand({
|
|
|
732
759
|
var companyChatCommand = defineCommand({
|
|
733
760
|
meta: {
|
|
734
761
|
name: "chat",
|
|
735
|
-
description: "Retrieve one conversation from a company page's admin inbox. Admin-gated."
|
|
762
|
+
description: "Retrieve one conversation from a company page's admin inbox. Admin-gated.",
|
|
763
|
+
examples: [
|
|
764
|
+
"curviate company chat 1234567 2-YTQ3ODU3Njgt"
|
|
765
|
+
]
|
|
736
766
|
},
|
|
737
767
|
args: {
|
|
738
|
-
...NON_STREAM_FLAGS,
|
|
768
|
+
...readOnly(NON_STREAM_FLAGS),
|
|
739
769
|
id: { type: "positional", description: "Company identifier (URL, slug, or numeric id), a slug/URL is resolved to the numeric id first." },
|
|
740
770
|
chatId: { type: "positional", description: "The 2-... chat id from `company chats`, passed through verbatim." }
|
|
741
771
|
},
|
|
@@ -760,10 +790,13 @@ var companyChatCommand = defineCommand({
|
|
|
760
790
|
var companyMessagesCommand = defineCommand({
|
|
761
791
|
meta: {
|
|
762
792
|
name: "messages",
|
|
763
|
-
description: "List a company-inbox conversation's messages, newest first. Admin-gated."
|
|
793
|
+
description: "List a company-inbox conversation's messages, newest first. Admin-gated.",
|
|
794
|
+
examples: [
|
|
795
|
+
"curviate company messages 1234567 2-YTQ3ODU3Njgt"
|
|
796
|
+
]
|
|
764
797
|
},
|
|
765
798
|
args: {
|
|
766
|
-
...GLOBAL_FLAGS,
|
|
799
|
+
...readOnly(GLOBAL_FLAGS),
|
|
767
800
|
id: { type: "positional", description: "Company identifier (URL, slug, or numeric id), a slug/URL is resolved to the numeric id first." },
|
|
768
801
|
chatId: { type: "positional", description: "The 2-... chat id from `company chats`, passed through verbatim." }
|
|
769
802
|
},
|
|
@@ -788,10 +821,13 @@ var companyMessagesCommand = defineCommand({
|
|
|
788
821
|
var companyMessageCommand = defineCommand({
|
|
789
822
|
meta: {
|
|
790
823
|
name: "message",
|
|
791
|
-
description: "Retrieve one message from a company-inbox conversation. Admin-gated. See also: `company reply` (send)."
|
|
824
|
+
description: "Retrieve one message from a company-inbox conversation. Admin-gated. See also: `company reply` (send).",
|
|
825
|
+
examples: [
|
|
826
|
+
"curviate company message 1234567 2-YTQ3ODU3Njgt MSG_ID"
|
|
827
|
+
]
|
|
792
828
|
},
|
|
793
829
|
args: {
|
|
794
|
-
...NON_STREAM_FLAGS,
|
|
830
|
+
...readOnly(NON_STREAM_FLAGS),
|
|
795
831
|
id: { type: "positional", description: "Company identifier (URL, slug, or numeric id), a slug/URL is resolved to the numeric id first." },
|
|
796
832
|
chatId: { type: "positional", description: "The 2-... chat id from `company chats`, passed through verbatim." },
|
|
797
833
|
messageId: { type: "positional", description: "The message id from `company messages`, passed through verbatim." }
|
|
@@ -817,10 +853,14 @@ var companyMessageCommand = defineCommand({
|
|
|
817
853
|
var companySearchChatsCommand = defineCommand({
|
|
818
854
|
meta: {
|
|
819
855
|
name: "search-chats",
|
|
820
|
-
description: "Search or filter a company page's admin inbox. Exactly one mode per call: free-text <query>, --topic, or --unread; mutually exclusive, enforced server-side. Admin-gated. Beta."
|
|
856
|
+
description: "Search or filter a company page's admin inbox. Exactly one mode per call: free-text <query>, --topic, or --unread; mutually exclusive, enforced server-side. Admin-gated. Beta.",
|
|
857
|
+
examples: [
|
|
858
|
+
"curviate company search-chats 1234567 sophie",
|
|
859
|
+
"curviate company search-chats 1234567 sophie --unread"
|
|
860
|
+
]
|
|
821
861
|
},
|
|
822
862
|
args: {
|
|
823
|
-
...GLOBAL_FLAGS,
|
|
863
|
+
...readOnly(GLOBAL_FLAGS),
|
|
824
864
|
id: { type: "positional", description: "Company identifier (URL, slug, or numeric id), a slug/URL is resolved to the numeric id first." },
|
|
825
865
|
query: { type: "positional", required: false, description: "Free-text term, matches participant names and message content." },
|
|
826
866
|
topic: { type: "string", description: "Filter mode, one inbox topic card: 1-5 or its name (Service request, Request a demo, Support, Careers, Other)." },
|
|
@@ -847,7 +887,10 @@ var companySearchChatsCommand = defineCommand({
|
|
|
847
887
|
var companyReplyCommand = defineCommand({
|
|
848
888
|
meta: {
|
|
849
889
|
name: "reply",
|
|
850
|
-
description: "Reply to a company-inbox conversation, as the page (write, admin-gated: the account must administer the page). Takes the normal 2-... chat id from `company chats`; the endpoint resolves the page mailbox internally from the company id. Reply-only, this cannot start a new conversation on the page's behalf. See also: `company chats` (the read that returns the chat id) and `message send` (the personal equivalent)."
|
|
890
|
+
description: "Reply to a company-inbox conversation, as the page (write, admin-gated: the account must administer the page). Takes the normal 2-... chat id from `company chats`; the endpoint resolves the page mailbox internally from the company id. Reply-only, this cannot start a new conversation on the page's behalf. See also: `company chats` (the read that returns the chat id) and `message send` (the personal equivalent).",
|
|
891
|
+
examples: [
|
|
892
|
+
'curviate company reply 1234567 2-YTQ3ODU3Njgt "Thanks for reaching out, happy to help."'
|
|
893
|
+
]
|
|
851
894
|
},
|
|
852
895
|
args: {
|
|
853
896
|
...WRITE_FLAGS,
|
|
@@ -878,9 +921,16 @@ var companyReplyCommand = defineCommand({
|
|
|
878
921
|
}
|
|
879
922
|
});
|
|
880
923
|
var companyCommand = defineCommand({
|
|
881
|
-
meta: {
|
|
924
|
+
meta: {
|
|
925
|
+
name: "company",
|
|
926
|
+
description: "Fetch a company profile by URL, slug, or numeric id, and its sub-resources.",
|
|
927
|
+
examples: [
|
|
928
|
+
"curviate company acmecorp",
|
|
929
|
+
"curviate company https://www.linkedin.com/company/acmecorp"
|
|
930
|
+
]
|
|
931
|
+
},
|
|
882
932
|
args: {
|
|
883
|
-
...NON_STREAM_FLAGS,
|
|
933
|
+
...readOnly(NON_STREAM_FLAGS),
|
|
884
934
|
id: { type: "positional", description: "Company identifier (URL, slug, or native id)." },
|
|
885
935
|
sections: { type: "string", description: "Not supported on company commands; a usage error (exit 2) if supplied." }
|
|
886
936
|
},
|
|
@@ -12,10 +12,10 @@ import {
|
|
|
12
12
|
setActiveProfile,
|
|
13
13
|
updateProfileField,
|
|
14
14
|
withoutUserinfo
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-UJOTQPL6.js";
|
|
16
16
|
import {
|
|
17
17
|
GLOBAL_FLAGS
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-TC4ZPUWI.js";
|
|
19
19
|
|
|
20
20
|
// src/commands/config.ts
|
|
21
21
|
import { defineCommand } from "citty";
|
|
@@ -35,7 +35,13 @@ var configCommand = defineCommand({
|
|
|
35
35
|
},
|
|
36
36
|
subCommands: {
|
|
37
37
|
list: defineCommand({
|
|
38
|
-
meta: {
|
|
38
|
+
meta: {
|
|
39
|
+
name: "list",
|
|
40
|
+
description: "List all profiles (keys redacted).",
|
|
41
|
+
examples: [
|
|
42
|
+
"curviate config list"
|
|
43
|
+
]
|
|
44
|
+
},
|
|
39
45
|
args: { json: GLOBAL_FLAGS.json },
|
|
40
46
|
async run({ args }) {
|
|
41
47
|
const file = await readConfigFile();
|
|
@@ -101,13 +107,25 @@ var configCommand = defineCommand({
|
|
|
101
107
|
}
|
|
102
108
|
}),
|
|
103
109
|
path: defineCommand({
|
|
104
|
-
meta: {
|
|
110
|
+
meta: {
|
|
111
|
+
name: "path",
|
|
112
|
+
description: "Print the config file path.",
|
|
113
|
+
examples: [
|
|
114
|
+
"curviate config path"
|
|
115
|
+
]
|
|
116
|
+
},
|
|
105
117
|
async run() {
|
|
106
118
|
process.stdout.write(getConfigPath() + "\n");
|
|
107
119
|
}
|
|
108
120
|
}),
|
|
109
121
|
use: defineCommand({
|
|
110
|
-
meta: {
|
|
122
|
+
meta: {
|
|
123
|
+
name: "use",
|
|
124
|
+
description: "Set the active profile.",
|
|
125
|
+
examples: [
|
|
126
|
+
"curviate config use work"
|
|
127
|
+
]
|
|
128
|
+
},
|
|
111
129
|
args: {
|
|
112
130
|
name: { type: "positional", description: "Profile name to activate." }
|
|
113
131
|
},
|
|
@@ -127,7 +145,13 @@ var configCommand = defineCommand({
|
|
|
127
145
|
}
|
|
128
146
|
}),
|
|
129
147
|
rename: defineCommand({
|
|
130
|
-
meta: {
|
|
148
|
+
meta: {
|
|
149
|
+
name: "rename",
|
|
150
|
+
description: "Rename a profile.",
|
|
151
|
+
examples: [
|
|
152
|
+
"curviate config rename default personal"
|
|
153
|
+
]
|
|
154
|
+
},
|
|
131
155
|
args: {
|
|
132
156
|
old: { type: "positional", description: "Current profile name." },
|
|
133
157
|
new: { type: "positional", description: "New profile name." }
|
|
@@ -151,7 +175,10 @@ var configCommand = defineCommand({
|
|
|
151
175
|
"set-account": defineCommand({
|
|
152
176
|
meta: {
|
|
153
177
|
name: "set-account",
|
|
154
|
-
description: "Set the default account on a profile."
|
|
178
|
+
description: "Set the default account on a profile.",
|
|
179
|
+
examples: [
|
|
180
|
+
"curviate config set-account acc_YOUR_ACCOUNT_ID"
|
|
181
|
+
]
|
|
155
182
|
},
|
|
156
183
|
args: {
|
|
157
184
|
profile: GLOBAL_FLAGS.profile,
|
|
@@ -185,7 +212,11 @@ var configCommand = defineCommand({
|
|
|
185
212
|
"set-base-url": defineCommand({
|
|
186
213
|
meta: {
|
|
187
214
|
name: "set-base-url",
|
|
188
|
-
description: "Set or clear the base URL on a profile."
|
|
215
|
+
description: "Set or clear the base URL on a profile.",
|
|
216
|
+
examples: [
|
|
217
|
+
"curviate config set-base-url https://api.curviate.com",
|
|
218
|
+
"curviate config set-base-url --reset"
|
|
219
|
+
]
|
|
189
220
|
},
|
|
190
221
|
args: {
|
|
191
222
|
profile: GLOBAL_FLAGS.profile,
|
|
@@ -245,7 +276,11 @@ var configCommand = defineCommand({
|
|
|
245
276
|
reset: defineCommand({
|
|
246
277
|
meta: {
|
|
247
278
|
name: "reset",
|
|
248
|
-
description: "Remove the config file (or a single profile)."
|
|
279
|
+
description: "Remove the config file (or a single profile).",
|
|
280
|
+
examples: [
|
|
281
|
+
"curviate config reset --profile work --yes",
|
|
282
|
+
"curviate config reset --yes"
|
|
283
|
+
]
|
|
249
284
|
},
|
|
250
285
|
args: {
|
|
251
286
|
json: GLOBAL_FLAGS.json,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from "./chunk-UEAX6KUB.js";
|
|
14
14
|
import {
|
|
15
15
|
requireAccount
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-BLJGV6ST.js";
|
|
17
17
|
import {
|
|
18
18
|
buildPreviewOutput
|
|
19
19
|
} from "./chunk-TCUYH5GO.js";
|
|
@@ -29,15 +29,16 @@ import {
|
|
|
29
29
|
resolveEffectiveConfig,
|
|
30
30
|
streamAll,
|
|
31
31
|
writeNdjsonItem
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-B5NIX4G6.js";
|
|
33
33
|
import "./chunk-XZJQQJBE.js";
|
|
34
34
|
import {
|
|
35
35
|
createClient
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-UJOTQPL6.js";
|
|
37
37
|
import {
|
|
38
38
|
GLOBAL_FLAGS,
|
|
39
|
-
WRITE_FLAGS
|
|
40
|
-
|
|
39
|
+
WRITE_FLAGS,
|
|
40
|
+
readOnly
|
|
41
|
+
} from "./chunk-TC4ZPUWI.js";
|
|
41
42
|
|
|
42
43
|
// src/commands/connect.ts
|
|
43
44
|
import { defineCommand } from "citty";
|
|
@@ -47,12 +48,6 @@ function buildOutputStreams() {
|
|
|
47
48
|
stderr: { write: (s) => process.stderr.write(s) }
|
|
48
49
|
};
|
|
49
50
|
}
|
|
50
|
-
function rejectPreviewOnRead(preview, out) {
|
|
51
|
-
if (preview) {
|
|
52
|
-
out.stderr.write("error: --preview is only valid on write commands (mutations). Reads just run.\n");
|
|
53
|
-
process.exit(2);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
51
|
function resolveOutputOpts(flags) {
|
|
57
52
|
return {
|
|
58
53
|
json: (flags.json ?? false) || !process.stdout.isTTY,
|
|
@@ -96,7 +91,6 @@ async function runConnectSend(client, flags, out) {
|
|
|
96
91
|
}
|
|
97
92
|
}
|
|
98
93
|
async function runConnectSent(client, flags, out) {
|
|
99
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
100
94
|
rejectPaginationModifiersWithoutAll(flags, out);
|
|
101
95
|
const accountId = await requireAccount(client, flags, out);
|
|
102
96
|
const ns = client.account(accountId);
|
|
@@ -136,7 +130,6 @@ async function runConnectSent(client, flags, out) {
|
|
|
136
130
|
}
|
|
137
131
|
}
|
|
138
132
|
async function runConnectReceived(client, flags, out) {
|
|
139
|
-
rejectPreviewOnRead(flags.preview, out);
|
|
140
133
|
rejectPaginationModifiersWithoutAll(flags, out);
|
|
141
134
|
const accountId = await requireAccount(client, flags, out);
|
|
142
135
|
const ns = client.account(accountId);
|
|
@@ -265,9 +258,13 @@ async function runConnectCancel(client, flags, out) {
|
|
|
265
258
|
var connectSentCommand = defineCommand({
|
|
266
259
|
meta: {
|
|
267
260
|
name: "sent",
|
|
268
|
-
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)."
|
|
261
|
+
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).",
|
|
262
|
+
examples: [
|
|
263
|
+
"curviate connect sent",
|
|
264
|
+
"curviate connect sent --all"
|
|
265
|
+
]
|
|
269
266
|
},
|
|
270
|
-
args: { ...GLOBAL_FLAGS },
|
|
267
|
+
args: { ...readOnly(GLOBAL_FLAGS) },
|
|
271
268
|
async run({ args }) {
|
|
272
269
|
const flags = args;
|
|
273
270
|
const cfg = await resolveEffectiveConfig({
|
|
@@ -289,9 +286,13 @@ var connectSentCommand = defineCommand({
|
|
|
289
286
|
var connectReceivedCommand = defineCommand({
|
|
290
287
|
meta: {
|
|
291
288
|
name: "received",
|
|
292
|
-
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)."
|
|
289
|
+
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).",
|
|
290
|
+
examples: [
|
|
291
|
+
"curviate connect received",
|
|
292
|
+
"curviate connect received --json"
|
|
293
|
+
]
|
|
293
294
|
},
|
|
294
|
-
args: { ...GLOBAL_FLAGS },
|
|
295
|
+
args: { ...readOnly(GLOBAL_FLAGS) },
|
|
295
296
|
async run({ args }) {
|
|
296
297
|
const flags = args;
|
|
297
298
|
const cfg = await resolveEffectiveConfig({
|
|
@@ -311,7 +312,13 @@ var connectReceivedCommand = defineCommand({
|
|
|
311
312
|
}
|
|
312
313
|
});
|
|
313
314
|
var connectAcceptCommand = defineCommand({
|
|
314
|
-
meta: {
|
|
315
|
+
meta: {
|
|
316
|
+
name: "accept",
|
|
317
|
+
description: "Accept a received invitation.",
|
|
318
|
+
examples: [
|
|
319
|
+
"curviate connect accept INVITATION_ID"
|
|
320
|
+
]
|
|
321
|
+
},
|
|
315
322
|
args: {
|
|
316
323
|
...WRITE_FLAGS,
|
|
317
324
|
id: {
|
|
@@ -338,7 +345,13 @@ var connectAcceptCommand = defineCommand({
|
|
|
338
345
|
}
|
|
339
346
|
});
|
|
340
347
|
var connectDeclineCommand = defineCommand({
|
|
341
|
-
meta: {
|
|
348
|
+
meta: {
|
|
349
|
+
name: "decline",
|
|
350
|
+
description: "Decline a received invitation.",
|
|
351
|
+
examples: [
|
|
352
|
+
"curviate connect decline INVITATION_ID"
|
|
353
|
+
]
|
|
354
|
+
},
|
|
342
355
|
args: {
|
|
343
356
|
...WRITE_FLAGS,
|
|
344
357
|
id: {
|
|
@@ -365,7 +378,13 @@ var connectDeclineCommand = defineCommand({
|
|
|
365
378
|
}
|
|
366
379
|
});
|
|
367
380
|
var connectCancelCommand = defineCommand({
|
|
368
|
-
meta: {
|
|
381
|
+
meta: {
|
|
382
|
+
name: "cancel",
|
|
383
|
+
description: "Cancel a sent invitation.",
|
|
384
|
+
examples: [
|
|
385
|
+
"curviate connect cancel INVITATION_ID"
|
|
386
|
+
]
|
|
387
|
+
},
|
|
369
388
|
args: {
|
|
370
389
|
...WRITE_FLAGS,
|
|
371
390
|
id: { type: "positional", description: "Invitation id to cancel." }
|
|
@@ -409,7 +428,11 @@ function guardBareConnectForm(id, out) {
|
|
|
409
428
|
var connectCommand = defineCommand({
|
|
410
429
|
meta: {
|
|
411
430
|
name: "connect",
|
|
412
|
-
description: "Send or manage connection invitations. Connection requests may take 10-30 seconds to appear in the recipient's received list (LinkedIn propagation delay)."
|
|
431
|
+
description: "Send or manage connection invitations. Connection requests may take 10-30 seconds to appear in the recipient's received list (LinkedIn propagation delay).",
|
|
432
|
+
examples: [
|
|
433
|
+
"curviate connect janesmith",
|
|
434
|
+
'curviate connect https://www.linkedin.com/in/janesmith --note "Enjoyed your talk on agents, would love to connect."'
|
|
435
|
+
]
|
|
413
436
|
},
|
|
414
437
|
args: {
|
|
415
438
|
...WRITE_FLAGS,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
readablePage,
|
|
4
4
|
resolveEffectiveConfig
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-B5NIX4G6.js";
|
|
6
6
|
import {
|
|
7
7
|
getExitCode
|
|
8
8
|
} from "./chunk-XZJQQJBE.js";
|
|
@@ -12,10 +12,10 @@ import {
|
|
|
12
12
|
isPlainObject,
|
|
13
13
|
readConfigFile,
|
|
14
14
|
withoutUserinfo
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-UJOTQPL6.js";
|
|
16
16
|
import {
|
|
17
17
|
GLOBAL_FLAGS
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-TC4ZPUWI.js";
|
|
19
19
|
|
|
20
20
|
// src/commands/doctor.ts
|
|
21
21
|
import { defineCommand } from "citty";
|
|
@@ -170,7 +170,11 @@ function renderHuman(report, io) {
|
|
|
170
170
|
var doctorCommand = defineCommand({
|
|
171
171
|
meta: {
|
|
172
172
|
name: "doctor",
|
|
173
|
-
description: "Check that this machine can call the API: config, credential source, workspace, reachability and connected accounts."
|
|
173
|
+
description: "Check that this machine can call the API: config, credential source, workspace, reachability and connected accounts.",
|
|
174
|
+
examples: [
|
|
175
|
+
"curviate doctor",
|
|
176
|
+
"curviate doctor --json"
|
|
177
|
+
]
|
|
174
178
|
},
|
|
175
179
|
args: {
|
|
176
180
|
profile: GLOBAL_FLAGS.profile,
|