@curviate/cli 0.57.0 → 0.58.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 +93 -0
- package/README.md +9 -2
- package/dist/{account-IRIYB2SG.js → account-GSL6BCNX.js} +52 -16
- package/dist/{analytics-IRSCLVOL.js → analytics-4FUMJSMC.js} +6 -6
- package/dist/{beta-consent-NQVGFZL3.js → beta-consent-EC2QF6CM.js} +4 -4
- package/dist/billing-STRNXA4H.js +19 -0
- package/dist/{chunk-6OT6TS7N.js → chunk-3IL3D5IZ.js} +2 -2
- package/dist/{chunk-3ZQNOKEK.js → chunk-5OAJ4D65.js} +2 -2
- package/dist/{chunk-AMTKGO37.js → chunk-5Z3CCE5N.js} +1 -1
- package/dist/{billing-TCTP44ZB.js → chunk-7F6B7P32.js} +123 -12
- package/dist/{chunk-3B5M2RUN.js → chunk-CQHCPZ5I.js} +1 -1
- package/dist/{chunk-SCUTAREU.js → chunk-EWSOIFG2.js} +17 -0
- package/dist/{chunk-RKNW4UX4.js → chunk-JKOQX46J.js} +6 -0
- package/dist/{chunk-VHNF6OZD.js → chunk-JY26SUNH.js} +18 -2
- package/dist/{chunk-VPFV7YV3.js → chunk-KS4I4B3Z.js} +6 -6
- package/dist/{chunk-OE4CY3ZL.js → chunk-KUVJM5CP.js} +1 -1
- package/dist/{chunk-F7CLAS5Y.js → chunk-MLZSXQZC.js} +2 -2
- package/dist/{chunk-RXDG57B2.js → chunk-PBJZQZPO.js} +1 -1
- package/dist/{chunk-A6JGJGDF.js → chunk-WGGZWJPO.js} +16 -16
- package/dist/{chunk-AG6G3PRQ.js → chunk-WITIJCUU.js} +17 -13
- package/dist/{chunk-5LGKZBAY.js → chunk-XDPU2YAF.js} +4 -3
- package/dist/{chunk-RTT75CXE.js → chunk-XXB4MAX3.js} +86 -14
- package/dist/cli.js +33 -33
- package/dist/{comment-PNHEKGZX.js → comment-MUELYZYN.js} +8 -8
- package/dist/{company-OUFF23SU.js → company-5N7CXORR.js} +8 -8
- package/dist/{company-record-ULPDDB6L.js → company-record-HWLTP4TV.js} +95 -10
- package/dist/{config-U6VDNL2P.js → config-PI7JMQ2L.js} +2 -2
- package/dist/{connect-ICNXC37R.js → connect-NNZOOPWV.js} +11 -11
- package/dist/{contact-K6RIVQWU.js → contact-VNG7HRCN.js} +9 -9
- package/dist/{contact-groups-CNH2VB6A.js → contact-groups-6JF7VX6Q.js} +11 -11
- package/dist/{contact-import-FK22UTN2.js → contact-import-TMJWY2VD.js} +11 -11
- package/dist/core-ZRJY3HTF.js +46 -0
- package/dist/{do-not-contact-BQHXNHTV.js → do-not-contact-GDVIUNMT.js} +22 -20
- package/dist/{doctor-ZYPZF5BE.js → doctor-ZNAR5AZ2.js} +4 -4
- package/dist/{document-H65EXU4L.js → document-G6UND26L.js} +1 -1
- package/dist/{domain-HLOT6Y4A.js → domain-62YUYVDW.js} +5 -5
- package/dist/{draft-JGQ36JSH.js → draft-ED6RL67K.js} +5 -5
- package/dist/{enrollment-CF634DB4.js → enrollment-LN3Z3RC5.js} +14 -10
- package/dist/{examples-J4X5NEIE.js → examples-5FJS47QF.js} +2 -2
- package/dist/{exit-codes-P2FLCKM7.js → exit-codes-LQDMGDII.js} +1 -1
- package/dist/{export-ZQLDQYUZ.js → export-S6D4FEAG.js} +4 -4
- package/dist/{feed-RQHEDZVL.js → feed-AC7HWUCD.js} +6 -6
- package/dist/{group-LRMG76FN.js → group-6N37Q5ZS.js} +6 -6
- package/dist/{inbox-5RGG5RQG.js → inbox-JFRBROQ2.js} +6 -6
- package/dist/{inboxes-ZFY6ZP33.js → inboxes-IBZHZKSD.js} +6 -6
- package/dist/{incoming-3MJ4CP6H.js → incoming-YDRPPO24.js} +8 -8
- package/dist/{job-QFIUTHHT.js → job-CSRHIFZM.js} +6 -6
- package/dist/{login-THXWX5HZ.js → login-M7ZLOR2U.js} +2 -2
- package/dist/mailbox-E2K3I2VH.js +712 -0
- package/dist/{message-DM5OUKQS.js → message-SX6RDGWP.js} +7 -7
- package/dist/{motion-NKOAK7NU.js → motion-4HH3OFI6.js} +121 -16
- package/dist/{network-VKJUMZ2L.js → network-JQYLSQDH.js} +12 -12
- package/dist/{notification-XW5J6KFA.js → notification-ZAQM463D.js} +6 -6
- package/dist/{notifications-USYOV54R.js → notifications-N55F3DP3.js} +9 -9
- package/dist/{post-M2G3BK4A.js → post-SIHHJX3P.js} +8 -8
- package/dist/{profile-3SG64IEG.js → profile-VBHX3QGP.js} +12 -12
- package/dist/{recruiter-7OUGZ776.js → recruiter-7AGFKQPI.js} +9 -9
- package/dist/{sales-nav-HHQLLM5C.js → sales-nav-ADVFBKWB.js} +9 -9
- package/dist/{search-5LMSLUH4.js → search-THJFPGOH.js} +16 -16
- package/dist/{setup-6F4HYUSZ.js → setup-D6D7SNND.js} +4 -4
- package/dist/{signal-LVODDBOY.js → signal-TGSF7WEP.js} +126 -19
- package/dist/{team-MSOPELF6.js → team-MVNHCWJP.js} +8 -8
- package/dist/{tier-RXHOAQ6L.js → tier-DAF7Y2HN.js} +4 -4
- package/dist/{unibox-UAA6WIGZ.js → unibox-7B6B4SXB.js} +292 -14
- package/dist/{webhook-J2H7X766.js → webhook-NUVSTDXF.js} +12 -12
- package/package.json +3 -3
- package/dist/core-MPEBYNSL.js +0 -46
- package/dist/mailbox-54DPLNXA.js +0 -412
package/dist/cli.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
intFlag
|
|
4
|
-
} from "./chunk-NNV2OYEF.js";
|
|
5
2
|
import {
|
|
6
3
|
SECRET_FLAGS
|
|
7
4
|
} from "./chunk-TCUYH5GO.js";
|
|
5
|
+
import {
|
|
6
|
+
intFlag
|
|
7
|
+
} from "./chunk-NNV2OYEF.js";
|
|
8
8
|
import {
|
|
9
9
|
GLOBAL_FLAGS,
|
|
10
10
|
STATE_WRITES,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./chunk-QLKGOIWS.js";
|
|
16
16
|
import {
|
|
17
17
|
lazy
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-XDPU2YAF.js";
|
|
19
19
|
import {
|
|
20
20
|
editDistance
|
|
21
21
|
} from "./chunk-FDJMAF7D.js";
|
|
@@ -45,37 +45,37 @@ var main = defineCommand({
|
|
|
45
45
|
// Subcommand registry, names and descriptions are static for help rendering;
|
|
46
46
|
// the handler implementation is loaded lazily on first invocation.
|
|
47
47
|
subCommands: {
|
|
48
|
-
setup: lazy("setup", () => import("./setup-
|
|
49
|
-
doctor: lazy("doctor", () => import("./doctor-
|
|
50
|
-
login: lazy("login", () => import("./login-
|
|
51
|
-
config: lazy("config", () => import("./config-
|
|
52
|
-
account: lazy("account", () => import("./account-
|
|
53
|
-
campaign: lazy("campaign", () => import("./motion-
|
|
54
|
-
enrollment: lazy("enrollment", () => import("./enrollment-
|
|
55
|
-
lead: lazy("lead", () => import("./contact-
|
|
56
|
-
company: lazy("companyRecord", () => import("./company-record-
|
|
57
|
-
signal: lazy("signal", () => import("./signal-
|
|
58
|
-
"do-not-contact": lazy("do-not-contact", () => import("./do-not-contact-
|
|
59
|
-
mailbox: lazy("mailbox", () => import("./mailbox-
|
|
60
|
-
domain: lazy("domain", () => import("./domain-
|
|
61
|
-
unibox: lazy("unibox", () => import("./unibox-
|
|
62
|
-
network: lazy("network", () => import("./network-
|
|
63
|
-
analytics: lazy("analytics", () => import("./analytics-
|
|
64
|
-
notification: lazy("notification", () => import("./notifications-
|
|
65
|
-
export: lazy("export", () => import("./export-
|
|
66
|
-
billing: lazy("billing", () => import("./billing-
|
|
67
|
-
tier: lazy("tier", () => import("./tier-
|
|
68
|
-
team: lazy("team", () => import("./team-
|
|
69
|
-
incoming: lazy("incoming", () => import("./incoming-
|
|
70
|
-
beta: lazy("beta", () => import("./beta-consent-
|
|
71
|
-
webhook: lazy("webhook", () => import("./webhook-
|
|
48
|
+
setup: lazy("setup", () => import("./setup-D6D7SNND.js").then((m) => m.setupCommand)),
|
|
49
|
+
doctor: lazy("doctor", () => import("./doctor-ZNAR5AZ2.js").then((m) => m.doctorCommand)),
|
|
50
|
+
login: lazy("login", () => import("./login-M7ZLOR2U.js").then((m) => m.loginCommand)),
|
|
51
|
+
config: lazy("config", () => import("./config-PI7JMQ2L.js").then((m) => m.configCommand)),
|
|
52
|
+
account: lazy("account", () => import("./account-GSL6BCNX.js").then((m) => m.accountCommand)),
|
|
53
|
+
campaign: lazy("campaign", () => import("./motion-4HH3OFI6.js").then((m) => m.campaignCommand)),
|
|
54
|
+
enrollment: lazy("enrollment", () => import("./enrollment-LN3Z3RC5.js").then((m) => m.enrollmentCommand)),
|
|
55
|
+
lead: lazy("lead", () => import("./contact-VNG7HRCN.js").then((m) => m.contactCommand)),
|
|
56
|
+
company: lazy("companyRecord", () => import("./company-record-HWLTP4TV.js").then((m) => m.companyRecordCommand)),
|
|
57
|
+
signal: lazy("signal", () => import("./signal-TGSF7WEP.js").then((m) => m.signalCommand)),
|
|
58
|
+
"do-not-contact": lazy("do-not-contact", () => import("./do-not-contact-GDVIUNMT.js").then((m) => m.doNotContactCommand)),
|
|
59
|
+
mailbox: lazy("mailbox", () => import("./mailbox-E2K3I2VH.js").then((m) => m.mailboxCommand)),
|
|
60
|
+
domain: lazy("domain", () => import("./domain-62YUYVDW.js").then((m) => m.domainCommand)),
|
|
61
|
+
unibox: lazy("unibox", () => import("./unibox-7B6B4SXB.js").then((m) => m.uniboxCommand)),
|
|
62
|
+
network: lazy("network", () => import("./network-JQYLSQDH.js").then((m) => m.networkCommand)),
|
|
63
|
+
analytics: lazy("analytics", () => import("./analytics-4FUMJSMC.js").then((m) => m.analyticsCommand)),
|
|
64
|
+
notification: lazy("notification", () => import("./notifications-N55F3DP3.js").then((m) => m.notificationsCommand)),
|
|
65
|
+
export: lazy("export", () => import("./export-S6D4FEAG.js").then((m) => m.exportCommand)),
|
|
66
|
+
billing: lazy("billing", () => import("./billing-STRNXA4H.js").then((m) => m.billingCommand)),
|
|
67
|
+
tier: lazy("tier", () => import("./tier-DAF7Y2HN.js").then((m) => m.tierCommand)),
|
|
68
|
+
team: lazy("team", () => import("./team-MVNHCWJP.js").then((m) => m.teamCommand)),
|
|
69
|
+
incoming: lazy("incoming", () => import("./incoming-YDRPPO24.js").then((m) => m.incomingCommand)),
|
|
70
|
+
beta: lazy("beta", () => import("./beta-consent-EC2QF6CM.js").then((m) => m.betaCommand)),
|
|
71
|
+
webhook: lazy("webhook", () => import("./webhook-NUVSTDXF.js").then((m) => m.webhookCommand)),
|
|
72
72
|
// The LinkedIn building blocks. Reserved product groups
|
|
73
73
|
// (unibox, network, analytics, team) land
|
|
74
74
|
// between `enrollment` and `webhook` with their owning specs.
|
|
75
|
-
core: lazy("core", () => import("./core-
|
|
75
|
+
core: lazy("core", () => import("./core-ZRJY3HTF.js").then((m) => m.coreCommand))
|
|
76
76
|
},
|
|
77
77
|
async run() {
|
|
78
|
-
const { showHelp } = await import("./examples-
|
|
78
|
+
const { showHelp } = await import("./examples-5FJS47QF.js");
|
|
79
79
|
await showHelp(main, ["curviate"]);
|
|
80
80
|
}
|
|
81
81
|
});
|
|
@@ -367,7 +367,7 @@ async function dispatch(root, rawArgs) {
|
|
|
367
367
|
helpFor = "curviate";
|
|
368
368
|
if (rawArgs.includes("--help") || rawArgs.includes("-h")) {
|
|
369
369
|
const { leaf, path } = await resolveLeaf(root, rawArgs.filter((a) => a !== "--help" && a !== "-h"));
|
|
370
|
-
const { showHelp } = await import("./examples-
|
|
370
|
+
const { showHelp } = await import("./examples-5FJS47QF.js");
|
|
371
371
|
await showHelp(leaf, path);
|
|
372
372
|
await new Promise((done) => process.stdout.write("", () => done()));
|
|
373
373
|
process.exit(0);
|
|
@@ -391,7 +391,7 @@ async function dispatch(root, rawArgs) {
|
|
|
391
391
|
const inline = (end === -1 ? argsAfterBeta : argsAfterBeta.slice(0, end)).find((a) => /^--[a-z-]+-stdin=/.test(a));
|
|
392
392
|
if (inline !== void 0) {
|
|
393
393
|
const flag = inline.slice(0, inline.indexOf("="));
|
|
394
|
-
usageError(`${flag} takes no value: the secret is read from
|
|
394
|
+
usageError(`${flag} takes no value: the secret is read from standard input, typed by the person at their own terminal.`, "nothing was sent; a secret never passes through an agent: use a Connect request link instead (curviate account connect-request create, or the command without the flag)");
|
|
395
395
|
}
|
|
396
396
|
let hintLeaf;
|
|
397
397
|
try {
|
|
@@ -455,7 +455,7 @@ async function dispatch(root, rawArgs) {
|
|
|
455
455
|
if (code === "EARG") process.stderr.write(helpPointer());
|
|
456
456
|
const { CurviateError } = await import("@curviate/sdk");
|
|
457
457
|
if (err instanceof CurviateError) {
|
|
458
|
-
const { getExitCode } = await import("./exit-codes-
|
|
458
|
+
const { getExitCode } = await import("./exit-codes-LQDMGDII.js");
|
|
459
459
|
process.exit(getExitCode(err));
|
|
460
460
|
}
|
|
461
461
|
process.exit(code === "EARG" ? 2 : 1);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
resolveMemberOrMeProviderId
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-CQHCPZ5I.js";
|
|
5
5
|
import "./chunk-UEAX6KUB.js";
|
|
6
6
|
import {
|
|
7
7
|
AS_ACCOUNT,
|
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
describeAttachment,
|
|
14
14
|
readAttachment,
|
|
15
15
|
toAttachmentPayload
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-JY26SUNH.js";
|
|
17
17
|
import {
|
|
18
18
|
requireAccount
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-MLZSXQZC.js";
|
|
20
20
|
import {
|
|
21
21
|
buildPreviewOutput
|
|
22
22
|
} from "./chunk-TCUYH5GO.js";
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
readablePage,
|
|
28
28
|
rejectPaginationModifiersWithoutAll,
|
|
29
29
|
streamAll
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-KUVJM5CP.js";
|
|
31
31
|
import {
|
|
32
32
|
renderError,
|
|
33
33
|
renderSuccess,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
import {
|
|
38
38
|
createClient,
|
|
39
39
|
resolveEffectiveConfig
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-PBJZQZPO.js";
|
|
41
41
|
import {
|
|
42
42
|
GLOBAL_FLAGS,
|
|
43
43
|
WRITE_SINGLE_FLAGS,
|
|
@@ -45,11 +45,11 @@ import {
|
|
|
45
45
|
} from "./chunk-QLKGOIWS.js";
|
|
46
46
|
import {
|
|
47
47
|
DESCRIPTIONS
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-XDPU2YAF.js";
|
|
49
49
|
import {
|
|
50
50
|
resolveTextOrStdin
|
|
51
51
|
} from "./chunk-ZYURL5VK.js";
|
|
52
|
-
import "./chunk-
|
|
52
|
+
import "./chunk-EWSOIFG2.js";
|
|
53
53
|
|
|
54
54
|
// src/commands/comment.ts
|
|
55
55
|
import { defineCommand } from "citty";
|
|
@@ -78,7 +78,7 @@ function buildListQuery(flags, out) {
|
|
|
78
78
|
async function handleSdkError(err, outOpts, out) {
|
|
79
79
|
const { CurviateError } = await import("@curviate/sdk");
|
|
80
80
|
if (err instanceof CurviateError) {
|
|
81
|
-
const { getExitCode } = await import("./exit-codes-
|
|
81
|
+
const { getExitCode } = await import("./exit-codes-LQDMGDII.js");
|
|
82
82
|
renderError(err, outOpts, out);
|
|
83
83
|
process.exit(getExitCode(err));
|
|
84
84
|
}
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-L7JH3W56.js";
|
|
7
7
|
import {
|
|
8
8
|
sentAsNotice
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-KS4I4B3Z.js";
|
|
10
10
|
import "./chunk-UWO2D4HW.js";
|
|
11
11
|
import {
|
|
12
12
|
resolveIdentifier
|
|
@@ -28,10 +28,10 @@ import {
|
|
|
28
28
|
AttachError,
|
|
29
29
|
readAttachment,
|
|
30
30
|
toAttachmentPayload
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-JY26SUNH.js";
|
|
32
32
|
import {
|
|
33
33
|
requireAccount
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-MLZSXQZC.js";
|
|
35
35
|
import {
|
|
36
36
|
buildPreviewOutput
|
|
37
37
|
} from "./chunk-TCUYH5GO.js";
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
readablePage,
|
|
45
45
|
rejectPaginationModifiersWithoutAll,
|
|
46
46
|
streamAll
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-KUVJM5CP.js";
|
|
48
48
|
import {
|
|
49
49
|
renderError,
|
|
50
50
|
renderSuccess,
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
import {
|
|
55
55
|
createClient,
|
|
56
56
|
resolveEffectiveConfig
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-PBJZQZPO.js";
|
|
58
58
|
import {
|
|
59
59
|
GLOBAL_FLAGS,
|
|
60
60
|
READ_SINGLE_FLAGS,
|
|
@@ -63,12 +63,12 @@ import {
|
|
|
63
63
|
} from "./chunk-QLKGOIWS.js";
|
|
64
64
|
import {
|
|
65
65
|
DESCRIPTIONS
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-XDPU2YAF.js";
|
|
67
67
|
import "./chunk-FDJMAF7D.js";
|
|
68
68
|
import {
|
|
69
69
|
resolveTextOrStdin
|
|
70
70
|
} from "./chunk-ZYURL5VK.js";
|
|
71
|
-
import "./chunk-
|
|
71
|
+
import "./chunk-EWSOIFG2.js";
|
|
72
72
|
|
|
73
73
|
// src/commands/company.ts
|
|
74
74
|
import { defineCommand } from "citty";
|
|
@@ -102,7 +102,7 @@ async function resolveCompanyId(ns, raw) {
|
|
|
102
102
|
async function handleSdkError(err, outOpts, out) {
|
|
103
103
|
const { CurviateError } = await import("@curviate/sdk");
|
|
104
104
|
if (err instanceof CurviateError) {
|
|
105
|
-
const { getExitCode } = await import("./exit-codes-
|
|
105
|
+
const { getExitCode } = await import("./exit-codes-LQDMGDII.js");
|
|
106
106
|
renderError(err, outOpts, out);
|
|
107
107
|
process.exit(getExitCode(err));
|
|
108
108
|
}
|
|
@@ -1,21 +1,29 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
csvRecords
|
|
4
|
+
} from "./chunk-WITIJCUU.js";
|
|
5
|
+
import "./chunk-WGGZWJPO.js";
|
|
6
|
+
import "./chunk-MLZSXQZC.js";
|
|
7
|
+
import "./chunk-GOICALYQ.js";
|
|
8
|
+
import "./chunk-3IL3D5IZ.js";
|
|
2
9
|
import {
|
|
3
10
|
fail,
|
|
4
11
|
listFlag,
|
|
5
12
|
outputOpts,
|
|
6
13
|
rootClient,
|
|
7
14
|
usage
|
|
8
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-5OAJ4D65.js";
|
|
9
16
|
import {
|
|
10
17
|
buildPreviewOutput
|
|
11
18
|
} from "./chunk-TCUYH5GO.js";
|
|
19
|
+
import "./chunk-NNV2OYEF.js";
|
|
12
20
|
import {
|
|
13
21
|
readableObject
|
|
14
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-KUVJM5CP.js";
|
|
15
23
|
import {
|
|
16
24
|
renderSuccess
|
|
17
25
|
} from "./chunk-QM57YDJE.js";
|
|
18
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-PBJZQZPO.js";
|
|
19
27
|
import {
|
|
20
28
|
READ_SINGLE_FLAGS,
|
|
21
29
|
WRITE_SINGLE_FLAGS,
|
|
@@ -23,11 +31,68 @@ import {
|
|
|
23
31
|
} from "./chunk-QLKGOIWS.js";
|
|
24
32
|
import {
|
|
25
33
|
DESCRIPTIONS
|
|
26
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-XDPU2YAF.js";
|
|
35
|
+
import {
|
|
36
|
+
readFileFlag
|
|
37
|
+
} from "./chunk-JKOQX46J.js";
|
|
38
|
+
import "./chunk-FDJMAF7D.js";
|
|
27
39
|
import "./chunk-ZYURL5VK.js";
|
|
40
|
+
import "./chunk-EWSOIFG2.js";
|
|
28
41
|
|
|
29
42
|
// src/commands/company-record.ts
|
|
30
43
|
import { defineCommand } from "citty";
|
|
44
|
+
var FILE_MAX_COMPANIES = 1e3;
|
|
45
|
+
function csvCells(record) {
|
|
46
|
+
const cells = [];
|
|
47
|
+
let cur = "";
|
|
48
|
+
let quoted = false;
|
|
49
|
+
for (let i = 0; i < record.length; i++) {
|
|
50
|
+
const ch = record[i];
|
|
51
|
+
if (ch === '"') {
|
|
52
|
+
if (quoted && record[i + 1] === '"') {
|
|
53
|
+
cur += '"';
|
|
54
|
+
i++;
|
|
55
|
+
} else quoted = !quoted;
|
|
56
|
+
} else if (ch === "," && !quoted) {
|
|
57
|
+
cells.push(cur);
|
|
58
|
+
cur = "";
|
|
59
|
+
} else cur += ch;
|
|
60
|
+
}
|
|
61
|
+
cells.push(cur);
|
|
62
|
+
return cells.map((c) => c.trim());
|
|
63
|
+
}
|
|
64
|
+
var cellValue = (raw) => {
|
|
65
|
+
try {
|
|
66
|
+
return JSON.parse(raw);
|
|
67
|
+
} catch {
|
|
68
|
+
return raw;
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
function companyRows(text) {
|
|
72
|
+
const [header, ...rows] = csvRecords(text);
|
|
73
|
+
const cols = csvCells(header ?? "");
|
|
74
|
+
if (cols[0] !== "company_id") usage("--file: the first column is company_id (LinkedIn's numeric company id), then one column per field key.");
|
|
75
|
+
const keys = cols.slice(1);
|
|
76
|
+
const badKey = keys.find((k) => !KEY.test(k));
|
|
77
|
+
if (!keys.length || badKey !== void 0) usage(`--file: each field column is a key of 1 to 64 letters, digits or _${badKey !== void 0 ? ` (got ${JSON.stringify(badKey)})` : ""}.`);
|
|
78
|
+
if (new Set(keys).size !== keys.length) usage("--file: a key appears twice in the header.");
|
|
79
|
+
if (rows.length > FILE_MAX_COMPANIES) usage(`--file: at most ${FILE_MAX_COMPANIES} companies a file (one request each); split it.`);
|
|
80
|
+
const seen = /* @__PURE__ */ new Set();
|
|
81
|
+
return rows.map((r, n) => {
|
|
82
|
+
const cells = csvCells(r);
|
|
83
|
+
const id = cells[0] ?? "";
|
|
84
|
+
if (!/^\d+$/.test(id)) usage(`--file line ${n + 2}: company_id must be LinkedIn's numeric company id.`);
|
|
85
|
+
if (seen.has(id)) usage(`--file line ${n + 2}: company ${id} appears twice.`);
|
|
86
|
+
seen.add(id);
|
|
87
|
+
const extra = {};
|
|
88
|
+
keys.forEach((k, i) => {
|
|
89
|
+
const raw = cells[i + 1] ?? "";
|
|
90
|
+
if (raw !== "") extra[k] = cellValue(raw);
|
|
91
|
+
});
|
|
92
|
+
if (!Object.keys(extra).length) usage(`--file line ${n + 2}: no field to set for company ${id}.`);
|
|
93
|
+
return { id, extra };
|
|
94
|
+
});
|
|
95
|
+
}
|
|
31
96
|
var KEY = /^[A-Za-z0-9_]{1,64}$/;
|
|
32
97
|
var companyId = (f) => {
|
|
33
98
|
const id = String(f.id ?? "").trim();
|
|
@@ -83,7 +148,7 @@ var getCmd = defineCommand({
|
|
|
83
148
|
var fieldsCmd = defineCommand({
|
|
84
149
|
meta: {
|
|
85
150
|
name: "fields",
|
|
86
|
-
description: "Set or remove your Team's own fields for one company, merged by key: set once for every Lead who works there and read in a Sequence as {{company.extra.<key>}}. Keys left out stay. At most 100 keys and 32 KiB once merged.",
|
|
151
|
+
description: "Set or remove your Team's own fields for one company, merged by key: set once for every Lead who works there and read in a Sequence as {{company.extra.<key>}}. Keys left out stay. At most 100 keys and 32 KiB once merged. --file sets many companies from a CSV (header company_id, then one column per key; an empty cell leaves that key): one request per company, in file order; it stops at the first refusal, and the companies before it are set.",
|
|
87
152
|
risk: "write",
|
|
88
153
|
rules: {
|
|
89
154
|
changes: "The company's fields in your Team; every Campaign text using {{company.extra.<key>}} reads the new value from its next send.",
|
|
@@ -94,16 +159,35 @@ var fieldsCmd = defineCommand({
|
|
|
94
159
|
},
|
|
95
160
|
errors: { RESOURCE_NOT_FOUND: "no Lead of your Team works at this company and your Team never read it.", INVALID_REQUEST: "a key outside the pattern, or the fields would pass 100 keys or 32 KiB once merged." },
|
|
96
161
|
seeAlso: ["curviate company get", "curviate campaign lint"],
|
|
97
|
-
examples: ['curviate company fields 1234567 --set tier=A --set owner="Ana Lopez"', "curviate company fields 1234567 --unset owner"]
|
|
162
|
+
examples: ['curviate company fields 1234567 --set tier=A --set owner="Ana Lopez"', "curviate company fields 1234567 --unset owner", "curviate company fields --file companies.csv"]
|
|
98
163
|
},
|
|
99
164
|
args: {
|
|
100
165
|
...WRITE_SINGLE_FLAGS,
|
|
101
|
-
id: ID,
|
|
166
|
+
id: { ...ID, required: false, description: "LinkedIn's numeric company id, for example 1234567. Not with --file." },
|
|
102
167
|
set: { type: "string", description: "key=value, repeatable. A JSON value (a number, true, a list) is stored as JSON, anything else as text." },
|
|
103
|
-
unset: { type: "string", description: "A key to remove, repeatable or a comma list." }
|
|
168
|
+
unset: { type: "string", description: "A key to remove, repeatable or a comma list." },
|
|
169
|
+
file: { type: "string", stdinArg: true, description: "A CSV of many companies: a path, or - for stdin. Header company_id, then one column per key. Not with an id, --set or --unset." }
|
|
104
170
|
},
|
|
105
171
|
run: async ({ args }) => {
|
|
106
172
|
const f = args;
|
|
173
|
+
if (f.file !== void 0) {
|
|
174
|
+
if (f.id !== void 0 || f.set !== void 0 || f.unset !== void 0) usage("--file sets companies from the file: pass no company id, --set or --unset with it.");
|
|
175
|
+
const rows = companyRows(await readFileFlag("file", f.file, { others: f }));
|
|
176
|
+
if (!rows.length) usage("--file holds no company row.");
|
|
177
|
+
if (f.preview) return void process.stdout.write(JSON.stringify(buildPreviewOutput({ method: "companies.update", args: { company_ids: rows.map((r) => r.id) }, body: { extra: rows[0].extra } })) + "\n");
|
|
178
|
+
const c2 = await rootClient(f);
|
|
179
|
+
const done = [];
|
|
180
|
+
for (const r of rows) {
|
|
181
|
+
try {
|
|
182
|
+
done.push(readableObject(await c2.companies.update(r.id, { extra: r.extra })));
|
|
183
|
+
} catch (err) {
|
|
184
|
+
process.stderr.write(`Stopped at company ${r.id}; the ${done.length} before it are set.
|
|
185
|
+
`);
|
|
186
|
+
return void await fail(err, f);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
return renderSuccess({ object: "list", items: done }, outputOpts(f), process);
|
|
190
|
+
}
|
|
107
191
|
const id = companyId(f);
|
|
108
192
|
const body = extraBody(f);
|
|
109
193
|
if (f.preview) return void process.stdout.write(JSON.stringify(buildPreviewOutput({ method: "companies.update", args: { company_id: id }, body })) + "\n");
|
|
@@ -119,10 +203,11 @@ var companyRecordCommand = defineCommand({
|
|
|
119
203
|
meta: { name: "company", description: DESCRIPTIONS.companyRecord },
|
|
120
204
|
subCommands: { get: getCmd, fields: fieldsCmd },
|
|
121
205
|
async run() {
|
|
122
|
-
const { showHelp } = await import("./examples-
|
|
206
|
+
const { showHelp } = await import("./examples-5FJS47QF.js");
|
|
123
207
|
await showHelp(companyRecordCommand, ["curviate", "company"]);
|
|
124
208
|
}
|
|
125
209
|
});
|
|
126
210
|
export {
|
|
127
|
-
companyRecordCommand
|
|
211
|
+
companyRecordCommand,
|
|
212
|
+
companyRows
|
|
128
213
|
};
|
|
@@ -12,13 +12,13 @@ import {
|
|
|
12
12
|
setActiveProfile,
|
|
13
13
|
updateProfileField,
|
|
14
14
|
withoutUserinfo
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-PBJZQZPO.js";
|
|
16
16
|
import {
|
|
17
17
|
GLOBAL_FLAGS
|
|
18
18
|
} from "./chunk-QLKGOIWS.js";
|
|
19
19
|
import {
|
|
20
20
|
DESCRIPTIONS
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-XDPU2YAF.js";
|
|
22
22
|
import "./chunk-ZYURL5VK.js";
|
|
23
23
|
|
|
24
24
|
// src/commands/config.ts
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./chunk-JXDEV33Z.js";
|
|
16
16
|
import {
|
|
17
17
|
requireAccount
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-MLZSXQZC.js";
|
|
19
19
|
import {
|
|
20
20
|
buildPreviewOutput
|
|
21
21
|
} from "./chunk-TCUYH5GO.js";
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
readablePage,
|
|
27
27
|
rejectPaginationModifiersWithoutAll,
|
|
28
28
|
streamAll
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-KUVJM5CP.js";
|
|
30
30
|
import {
|
|
31
31
|
renderError,
|
|
32
32
|
renderSuccess,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
import {
|
|
37
37
|
createClient,
|
|
38
38
|
resolveEffectiveConfig
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-PBJZQZPO.js";
|
|
40
40
|
import {
|
|
41
41
|
GLOBAL_FLAGS,
|
|
42
42
|
WRITE_FLAGS,
|
|
@@ -44,12 +44,12 @@ import {
|
|
|
44
44
|
} from "./chunk-QLKGOIWS.js";
|
|
45
45
|
import {
|
|
46
46
|
DESCRIPTIONS
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-XDPU2YAF.js";
|
|
48
48
|
import {
|
|
49
49
|
nearestSubcommand
|
|
50
50
|
} from "./chunk-FDJMAF7D.js";
|
|
51
51
|
import "./chunk-ZYURL5VK.js";
|
|
52
|
-
import "./chunk-
|
|
52
|
+
import "./chunk-EWSOIFG2.js";
|
|
53
53
|
|
|
54
54
|
// src/commands/connect.ts
|
|
55
55
|
import { defineCommand } from "citty";
|
|
@@ -93,7 +93,7 @@ async function runConnectSend(client, flags, out) {
|
|
|
93
93
|
} catch (err) {
|
|
94
94
|
const { CurviateError } = await import("@curviate/sdk");
|
|
95
95
|
if (err instanceof CurviateError) {
|
|
96
|
-
const { getExitCode } = await import("./exit-codes-
|
|
96
|
+
const { getExitCode } = await import("./exit-codes-LQDMGDII.js");
|
|
97
97
|
renderError(err, outOpts, out);
|
|
98
98
|
process.exit(getExitCode(err));
|
|
99
99
|
}
|
|
@@ -132,7 +132,7 @@ async function runConnectSent(client, flags, out) {
|
|
|
132
132
|
} catch (err) {
|
|
133
133
|
const { CurviateError } = await import("@curviate/sdk");
|
|
134
134
|
if (err instanceof CurviateError) {
|
|
135
|
-
const { getExitCode } = await import("./exit-codes-
|
|
135
|
+
const { getExitCode } = await import("./exit-codes-LQDMGDII.js");
|
|
136
136
|
renderError(err, outOpts, out);
|
|
137
137
|
process.exit(getExitCode(err));
|
|
138
138
|
}
|
|
@@ -171,7 +171,7 @@ async function runConnectReceived(client, flags, out) {
|
|
|
171
171
|
} catch (err) {
|
|
172
172
|
const { CurviateError } = await import("@curviate/sdk");
|
|
173
173
|
if (err instanceof CurviateError) {
|
|
174
|
-
const { getExitCode } = await import("./exit-codes-
|
|
174
|
+
const { getExitCode } = await import("./exit-codes-LQDMGDII.js");
|
|
175
175
|
renderError(err, outOpts, out);
|
|
176
176
|
process.exit(getExitCode(err));
|
|
177
177
|
}
|
|
@@ -200,7 +200,7 @@ async function runConnectAccept(client, flags, out) {
|
|
|
200
200
|
} catch (err) {
|
|
201
201
|
const { CurviateError } = await import("@curviate/sdk");
|
|
202
202
|
if (err instanceof CurviateError) {
|
|
203
|
-
const { getExitCode } = await import("./exit-codes-
|
|
203
|
+
const { getExitCode } = await import("./exit-codes-LQDMGDII.js");
|
|
204
204
|
renderError(err, outOpts, out);
|
|
205
205
|
process.exit(getExitCode(err));
|
|
206
206
|
}
|
|
@@ -229,7 +229,7 @@ async function runConnectDecline(client, flags, out) {
|
|
|
229
229
|
} catch (err) {
|
|
230
230
|
const { CurviateError } = await import("@curviate/sdk");
|
|
231
231
|
if (err instanceof CurviateError) {
|
|
232
|
-
const { getExitCode } = await import("./exit-codes-
|
|
232
|
+
const { getExitCode } = await import("./exit-codes-LQDMGDII.js");
|
|
233
233
|
renderError(err, outOpts, out);
|
|
234
234
|
process.exit(getExitCode(err));
|
|
235
235
|
}
|
|
@@ -258,7 +258,7 @@ async function runConnectCancel(client, flags, out) {
|
|
|
258
258
|
} catch (err) {
|
|
259
259
|
const { CurviateError } = await import("@curviate/sdk");
|
|
260
260
|
if (err instanceof CurviateError) {
|
|
261
|
-
const { getExitCode } = await import("./exit-codes-
|
|
261
|
+
const { getExitCode } = await import("./exit-codes-LQDMGDII.js");
|
|
262
262
|
renderError(err, outOpts, out);
|
|
263
263
|
process.exit(getExitCode(err));
|
|
264
264
|
}
|
|
@@ -7,20 +7,20 @@ import {
|
|
|
7
7
|
online,
|
|
8
8
|
positionals,
|
|
9
9
|
preview
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-WGGZWJPO.js";
|
|
11
|
+
import "./chunk-MLZSXQZC.js";
|
|
11
12
|
import "./chunk-GOICALYQ.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-3ZQNOKEK.js";
|
|
15
|
-
import "./chunk-NNV2OYEF.js";
|
|
13
|
+
import "./chunk-3IL3D5IZ.js";
|
|
14
|
+
import "./chunk-5OAJ4D65.js";
|
|
16
15
|
import "./chunk-TCUYH5GO.js";
|
|
17
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-NNV2OYEF.js";
|
|
17
|
+
import "./chunk-KUVJM5CP.js";
|
|
18
18
|
import "./chunk-QM57YDJE.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-PBJZQZPO.js";
|
|
20
20
|
import "./chunk-QLKGOIWS.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-XDPU2YAF.js";
|
|
22
22
|
import "./chunk-ZYURL5VK.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-EWSOIFG2.js";
|
|
24
24
|
export {
|
|
25
25
|
BULK_MAX_IDS,
|
|
26
26
|
contactCommand,
|
|
@@ -8,22 +8,22 @@ import {
|
|
|
8
8
|
online,
|
|
9
9
|
preview,
|
|
10
10
|
readFilter
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-WGGZWJPO.js";
|
|
12
|
+
import "./chunk-MLZSXQZC.js";
|
|
12
13
|
import "./chunk-GOICALYQ.js";
|
|
13
|
-
import "./chunk-F7CLAS5Y.js";
|
|
14
14
|
import {
|
|
15
15
|
sendInChunks
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-3IL3D5IZ.js";
|
|
17
17
|
import {
|
|
18
18
|
fail,
|
|
19
19
|
listFlag,
|
|
20
20
|
outputOpts,
|
|
21
21
|
usage
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-5OAJ4D65.js";
|
|
23
|
+
import "./chunk-TCUYH5GO.js";
|
|
23
24
|
import {
|
|
24
25
|
intFlag
|
|
25
26
|
} from "./chunk-NNV2OYEF.js";
|
|
26
|
-
import "./chunk-TCUYH5GO.js";
|
|
27
27
|
import {
|
|
28
28
|
pageDelayFromFlags,
|
|
29
29
|
readCursorFlag,
|
|
@@ -32,21 +32,21 @@ import {
|
|
|
32
32
|
readablePage,
|
|
33
33
|
rejectPaginationModifiersWithoutAll,
|
|
34
34
|
streamAll
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-KUVJM5CP.js";
|
|
36
36
|
import {
|
|
37
37
|
renderSuccess,
|
|
38
38
|
writeNdjsonItem
|
|
39
39
|
} from "./chunk-QM57YDJE.js";
|
|
40
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-PBJZQZPO.js";
|
|
41
41
|
import {
|
|
42
42
|
GLOBAL_FLAGS,
|
|
43
43
|
READ_SINGLE_FLAGS,
|
|
44
44
|
WRITE_SINGLE_FLAGS,
|
|
45
45
|
readOnly
|
|
46
46
|
} from "./chunk-QLKGOIWS.js";
|
|
47
|
-
import "./chunk-
|
|
47
|
+
import "./chunk-XDPU2YAF.js";
|
|
48
48
|
import "./chunk-ZYURL5VK.js";
|
|
49
|
-
import "./chunk-
|
|
49
|
+
import "./chunk-EWSOIFG2.js";
|
|
50
50
|
|
|
51
51
|
// src/commands/contact-groups.ts
|
|
52
52
|
import { defineCommand } from "citty";
|
|
@@ -293,7 +293,7 @@ var contactListsCommand = defineCommand({
|
|
|
293
293
|
meta: { name: "lists", description: "Lead lists: named sets of Leads a Campaign enrolls from." },
|
|
294
294
|
subCommands: { list: listsList, get: listsGet, create: listsCreate, combine: listsCombine, update: listsUpdate, delete: listsDelete, add: membership("add"), remove: membership("remove") },
|
|
295
295
|
async run() {
|
|
296
|
-
const { showHelp } = await import("./examples-
|
|
296
|
+
const { showHelp } = await import("./examples-5FJS47QF.js");
|
|
297
297
|
await showHelp(contactListsCommand, ["curviate", "lead", "lists"]);
|
|
298
298
|
}
|
|
299
299
|
});
|
|
@@ -390,7 +390,7 @@ var contactTagsCommand = defineCommand({
|
|
|
390
390
|
meta: { name: "tags", description: "Tags: labels on Leads." },
|
|
391
391
|
subCommands: { list: tagsList, update: tagsUpdate, delete: tagsDelete, add: tagging("add"), remove: tagging("remove") },
|
|
392
392
|
async run() {
|
|
393
|
-
const { showHelp } = await import("./examples-
|
|
393
|
+
const { showHelp } = await import("./examples-5FJS47QF.js");
|
|
394
394
|
await showHelp(contactTagsCommand, ["curviate", "lead", "tags"]);
|
|
395
395
|
}
|
|
396
396
|
});
|
|
@@ -7,23 +7,23 @@ import {
|
|
|
7
7
|
contactImportCommand,
|
|
8
8
|
contactImportsCommand,
|
|
9
9
|
csvRecords
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-WITIJCUU.js";
|
|
11
|
+
import "./chunk-WGGZWJPO.js";
|
|
12
|
+
import "./chunk-MLZSXQZC.js";
|
|
12
13
|
import "./chunk-GOICALYQ.js";
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-3ZQNOKEK.js";
|
|
16
|
-
import "./chunk-NNV2OYEF.js";
|
|
14
|
+
import "./chunk-3IL3D5IZ.js";
|
|
15
|
+
import "./chunk-5OAJ4D65.js";
|
|
17
16
|
import "./chunk-TCUYH5GO.js";
|
|
18
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-NNV2OYEF.js";
|
|
18
|
+
import "./chunk-KUVJM5CP.js";
|
|
19
19
|
import "./chunk-QM57YDJE.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-PBJZQZPO.js";
|
|
21
21
|
import "./chunk-QLKGOIWS.js";
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-XDPU2YAF.js";
|
|
23
|
+
import "./chunk-JKOQX46J.js";
|
|
24
24
|
import "./chunk-FDJMAF7D.js";
|
|
25
25
|
import "./chunk-ZYURL5VK.js";
|
|
26
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-EWSOIFG2.js";
|
|
27
27
|
export {
|
|
28
28
|
IMPORT_MAX_BODY_BYTES,
|
|
29
29
|
IMPORT_MAX_ROWS,
|