@curviate/cli 0.58.0 → 0.60.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 +30 -0
- package/dist/{account-GSL6BCNX.js → account-BGFQH7MZ.js} +10 -10
- package/dist/{analytics-4FUMJSMC.js → analytics-SLZF5CUV.js} +5 -5
- package/dist/{beta-consent-EC2QF6CM.js → beta-consent-WT5HRWAP.js} +4 -4
- package/dist/{billing-STRNXA4H.js → billing-EY6SVYLK.js} +5 -5
- package/dist/{chunk-KUVJM5CP.js → chunk-2NYGMKWI.js} +1 -1
- package/dist/{chunk-XXB4MAX3.js → chunk-3WXR6WEO.js} +10 -8
- package/dist/{chunk-7F6B7P32.js → chunk-4MGTH4FK.js} +9 -9
- package/dist/{chunk-5OAJ4D65.js → chunk-65UHJVXP.js} +2 -2
- package/dist/{chunk-KS4I4B3Z.js → chunk-7HOSWMH2.js} +5 -5
- package/dist/{chunk-CQHCPZ5I.js → chunk-AJVFJAOR.js} +1 -1
- package/dist/{chunk-EWSOIFG2.js → chunk-DLYVUDNF.js} +1 -1
- package/dist/{chunk-JXDEV33Z.js → chunk-EIPQUQK2.js} +1 -1
- package/dist/{chunk-3IL3D5IZ.js → chunk-ER5Y2SS5.js} +2 -2
- package/dist/{chunk-XDPU2YAF.js → chunk-GZMSX7CA.js} +4 -4
- package/dist/{chunk-MLZSXQZC.js → chunk-KQMTZIXC.js} +2 -2
- package/dist/{chunk-WITIJCUU.js → chunk-L6MTOKXI.js} +8 -8
- package/dist/{chunk-WGGZWJPO.js → chunk-OEMFSUEI.js} +14 -14
- package/dist/{chunk-PBJZQZPO.js → chunk-RQ6KL2ZU.js} +1 -1
- package/dist/cli.js +29 -29
- package/dist/{comment-MUELYZYN.js → comment-MIH3WEH2.js} +7 -7
- package/dist/{company-5N7CXORR.js → company-H6UDF2HF.js} +8 -8
- package/dist/{company-record-HWLTP4TV.js → company-record-L6DI7B6I.js} +10 -10
- package/dist/{config-PI7JMQ2L.js → config-C757QH2N.js} +2 -2
- package/dist/{connect-NNZOOPWV.js → connect-GRYHFCF3.js} +12 -12
- package/dist/{contact-VNG7HRCN.js → contact-5LYCPTQH.js} +8 -8
- package/dist/{contact-groups-6JF7VX6Q.js → contact-groups-GZML25CV.js} +16 -16
- package/dist/{contact-import-TMJWY2VD.js → contact-import-VM4RS475.js} +9 -9
- package/dist/core-3ZYU463V.js +46 -0
- package/dist/{do-not-contact-GDVIUNMT.js → do-not-contact-AWDCWC2D.js} +16 -16
- package/dist/{doctor-ZNAR5AZ2.js → doctor-ZW6M7YXP.js} +4 -4
- package/dist/{domain-62YUYVDW.js → domain-CW7G5NS2.js} +5 -5
- package/dist/{draft-ED6RL67K.js → draft-VUNBMMTW.js} +10 -10
- package/dist/{enrollment-LN3Z3RC5.js → enrollment-R2T4GBXR.js} +10 -10
- package/dist/{examples-5FJS47QF.js → examples-G4IC5TJU.js} +1 -1
- package/dist/{exit-codes-LQDMGDII.js → exit-codes-MMGNZCJ5.js} +1 -1
- package/dist/{export-S6D4FEAG.js → export-IYXSEGKH.js} +4 -4
- package/dist/{feed-AC7HWUCD.js → feed-3MMVHTB4.js} +6 -6
- package/dist/{group-6N37Q5ZS.js → group-24VZ4XIM.js} +6 -6
- package/dist/{inbox-JFRBROQ2.js → inbox-7N2JKEAC.js} +6 -6
- package/dist/{inboxes-IBZHZKSD.js → inboxes-EPD3JMO3.js} +6 -6
- package/dist/{incoming-YDRPPO24.js → incoming-T2PZOUBL.js} +8 -8
- package/dist/{job-CSRHIFZM.js → job-UD4FBCE2.js} +7 -7
- package/dist/{login-M7ZLOR2U.js → login-GMNDQODN.js} +2 -2
- package/dist/{mailbox-E2K3I2VH.js → mailbox-XC73FZQ6.js} +82 -21
- package/dist/{message-SX6RDGWP.js → message-XFAFZZGT.js} +6 -6
- package/dist/{motion-4HH3OFI6.js → motion-C7WTTC6E.js} +20 -20
- package/dist/{network-JQYLSQDH.js → network-T2H7S3GL.js} +6 -6
- package/dist/{notification-ZAQM463D.js → notification-GMFRGQLD.js} +6 -6
- package/dist/{notifications-N55F3DP3.js → notifications-55U3PGJN.js} +6 -6
- package/dist/{post-SIHHJX3P.js → post-LZ74DJDI.js} +7 -7
- package/dist/{profile-VBHX3QGP.js → profile-HCT4JEIA.js} +12 -12
- package/dist/{recruiter-7AGFKQPI.js → recruiter-UWZM3UMU.js} +7 -7
- package/dist/{sales-nav-ADVFBKWB.js → sales-nav-ZA7CBHRD.js} +6 -6
- package/dist/{search-THJFPGOH.js → search-ZPJLTGM4.js} +15 -15
- package/dist/{setup-D6D7SNND.js → setup-L7EC5V73.js} +4 -4
- package/dist/{signal-TGSF7WEP.js → signal-JVUGQOEV.js} +5 -5
- package/dist/{team-MVNHCWJP.js → team-45R6ZOR7.js} +5 -5
- package/dist/{tier-DAF7Y2HN.js → tier-LQ5UYRUE.js} +4 -4
- package/dist/{unibox-7B6B4SXB.js → unibox-RGMMGAFR.js} +58 -34
- package/dist/{webhook-NUVSTDXF.js → webhook-5MNKEBOQ.js} +5 -5
- package/package.json +2 -2
- package/dist/core-ZRJY3HTF.js +0 -46
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
} from "./chunk-5S3MJVI5.js";
|
|
6
6
|
import {
|
|
7
7
|
AttachError,
|
|
8
|
+
openUpload,
|
|
8
9
|
readAttachment,
|
|
9
10
|
toAttachmentPayload
|
|
10
11
|
} from "./chunk-JY26SUNH.js";
|
|
@@ -14,7 +15,7 @@ import {
|
|
|
14
15
|
outputOpts,
|
|
15
16
|
rootClient,
|
|
16
17
|
usage
|
|
17
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-65UHJVXP.js";
|
|
18
19
|
import {
|
|
19
20
|
buildPreviewOutput
|
|
20
21
|
} from "./chunk-TCUYH5GO.js";
|
|
@@ -28,12 +29,12 @@ import {
|
|
|
28
29
|
readablePage,
|
|
29
30
|
rejectPaginationModifiersWithoutAll,
|
|
30
31
|
streamAll
|
|
31
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-2NYGMKWI.js";
|
|
32
33
|
import {
|
|
33
34
|
renderSuccess,
|
|
34
35
|
writeNdjsonItem
|
|
35
36
|
} from "./chunk-QM57YDJE.js";
|
|
36
|
-
import "./chunk-
|
|
37
|
+
import "./chunk-RQ6KL2ZU.js";
|
|
37
38
|
import {
|
|
38
39
|
GLOBAL_FLAGS,
|
|
39
40
|
WRITE_SINGLE_FLAGS,
|
|
@@ -41,13 +42,16 @@ import {
|
|
|
41
42
|
} from "./chunk-QLKGOIWS.js";
|
|
42
43
|
import {
|
|
43
44
|
DESCRIPTIONS
|
|
44
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-GZMSX7CA.js";
|
|
45
46
|
import "./chunk-ZYURL5VK.js";
|
|
46
47
|
|
|
47
48
|
// src/commands/unibox.ts
|
|
48
49
|
import { defineCommand } from "citty";
|
|
50
|
+
import { stat } from "fs/promises";
|
|
51
|
+
import { basename } from "path";
|
|
49
52
|
var EMAIL_MAX_FILES = 10;
|
|
50
53
|
var EMAIL_MAX_FILE_BYTES = 20 * 1024 * 1024;
|
|
54
|
+
var EMAIL_INLINE_MAX_BYTES = 6 * 1024 * 1024;
|
|
51
55
|
var ids = (f) => ({ accountId: String(f.accountId ?? ""), chatId: String(f.chatId ?? "") });
|
|
52
56
|
var preview = (method, args, body = {}) => print(JSON.stringify(buildPreviewOutput({ method, args, body })));
|
|
53
57
|
async function paged(f, params, fetch, human) {
|
|
@@ -88,10 +92,14 @@ async function runList(c, f) {
|
|
|
88
92
|
const unread = (i) => i["unread"] ? i["marked_unread"] ? "marked" : "yes" : "";
|
|
89
93
|
const campaign = (i) => i["campaign_context"]?.["campaign_name"];
|
|
90
94
|
const label = (i) => i["reply_label"]?.["label"];
|
|
95
|
+
const channels = (i) => (i["channels"] ?? []).join("+");
|
|
96
|
+
const marks = (i) => Object.entries(i["marks"] ?? {}).filter(([, v]) => v).map(([k]) => k).join(", ");
|
|
97
|
+
const next = (i) => [i["chat_id"] ? "reply" : "", i["channels"]?.includes("email") && !marks(i) ? "email" : ""].filter(Boolean).join(", ");
|
|
91
98
|
print(table(
|
|
92
|
-
["ACCOUNT", "CHAT", "WITH", "UNREAD", "LAST", "FROM", "LABEL", "CAMPAIGN", "TAGS"],
|
|
93
|
-
page.items.map((i) => [i["account_id"], i["chat_id"], chatWith(i), unread(i), i["last_activity_at"], i["last_message_from"], label(i), campaign(i), i["tags"]?.join(", ")])
|
|
99
|
+
["ACCOUNT", "CHAT", "WITH", "CHANNELS", "UNREAD", "LAST", "FROM", "LABEL", "MARKS", "NEXT", "CAMPAIGN", "TAGS", "CONVERSATION"],
|
|
100
|
+
page.items.map((i) => [i["account_id"], i["chat_id"], chatWith(i), channels(i), unread(i), i["last_activity_at"], i["last_message_from"], label(i), marks(i), next(i), campaign(i), i["tags"]?.join(", "), i["conversation_id"]])
|
|
94
101
|
));
|
|
102
|
+
if (page.items.length) print('NEXT reply: `curviate unibox reply <ACCOUNT> <CHAT> "<text>"`; email: `curviate unibox email send <CONVERSATION> "<text>" --thread <thread_id>` (threads: `curviate unibox conversation timeline <CONVERSATION> --channel email`). An email-only conversation has no CHAT and takes email only.');
|
|
95
103
|
if (typeof page["total"] === "number") print(`total: ${page["total"]} chats match`);
|
|
96
104
|
});
|
|
97
105
|
} catch (err) {
|
|
@@ -151,23 +159,37 @@ async function runEmailSend(c, f) {
|
|
|
151
159
|
if (bcc.length) body["bcc"] = bcc;
|
|
152
160
|
const paths = f.attach === void 0 ? [] : [].concat(f.attach);
|
|
153
161
|
if (paths.length > EMAIL_MAX_FILES) usage(`--attach takes at most ${EMAIL_MAX_FILES} files.`);
|
|
154
|
-
const
|
|
162
|
+
const sizes = [];
|
|
155
163
|
for (const p of paths) {
|
|
156
164
|
try {
|
|
157
|
-
|
|
165
|
+
const st = await stat(p);
|
|
166
|
+
if (!st.isFile()) throw new Error("not a file");
|
|
167
|
+
sizes.push(st.size);
|
|
158
168
|
} catch (err) {
|
|
159
|
-
|
|
160
|
-
throw err;
|
|
169
|
+
usage(`Cannot read attachment "${basename(p)}": ${err instanceof Error ? err.message : "unknown error"}. Pass a valid file path.`);
|
|
161
170
|
}
|
|
162
171
|
}
|
|
163
|
-
const total =
|
|
172
|
+
const total = sizes.reduce((n, x) => n + x, 0);
|
|
164
173
|
if (total > EMAIL_MAX_FILE_BYTES) usage(`--attach: the files total ${total} bytes, over 20 MiB; nothing was sent. A link usually lands better than a file.`);
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
174
|
+
const byId = total > EMAIL_INLINE_MAX_BYTES;
|
|
175
|
+
if (f.preview) {
|
|
176
|
+
const note = byId ? { attachment_ids: paths.map((p, i) => `<upload ${basename(p)} (${sizes[i]} bytes)>`) } : { attachments: paths.map((p, i) => `${basename(p)} (${sizes[i]} bytes)`) };
|
|
177
|
+
return void print(JSON.stringify(buildPreviewOutput({ method: "unibox.sendEmail", args: { conversation_id: id }, body: { ...body, ...note } })));
|
|
178
|
+
}
|
|
170
179
|
try {
|
|
180
|
+
if (byId) {
|
|
181
|
+
const ids2 = [];
|
|
182
|
+
for (const p of paths) {
|
|
183
|
+
const file = await openUpload(p, EMAIL_MAX_FILE_BYTES);
|
|
184
|
+
ids2.push((await c.campaigns.attachments.upload(file.data, { filename: basename(p) })).id);
|
|
185
|
+
}
|
|
186
|
+
body["attachment_ids"] = ids2;
|
|
187
|
+
} else if (paths.length) {
|
|
188
|
+
body["attachments"] = await Promise.all(paths.map(async (p) => {
|
|
189
|
+
const a = toAttachmentPayload(p, await readAttachment(p));
|
|
190
|
+
return { filename: a.filename, content_type: a.content_type, content: a.content };
|
|
191
|
+
}));
|
|
192
|
+
}
|
|
171
193
|
const sent = await c.unibox.sendEmail(id, body);
|
|
172
194
|
for (const w of sent["warnings"] ?? []) {
|
|
173
195
|
process.stderr.write(`warning: ${String(w["code"])}: ${(w["addresses"] ?? []).join(", ")} got nothing; everyone else did.
|
|
@@ -175,6 +197,7 @@ async function runEmailSend(c, f) {
|
|
|
175
197
|
}
|
|
176
198
|
renderSuccess(sent, outputOpts(f), process);
|
|
177
199
|
} catch (err) {
|
|
200
|
+
if (err instanceof AttachError) usage(err.message);
|
|
178
201
|
if (err.outcomeUnknown === true) {
|
|
179
202
|
process.stderr.write(`The outcome is unknown: the email may have been sent, and it is kept in the conversation as sent. Do not send it again; read \`curviate unibox conversation timeline ${id} --channel email\`.
|
|
180
203
|
`);
|
|
@@ -342,7 +365,7 @@ var online = (fn) => async ({ args }) => {
|
|
|
342
365
|
var ACCOUNT = { type: "positional", description: "The chat's Account (acc_...), as `curviate unibox list` prints it." };
|
|
343
366
|
var CHAT = { type: "positional", description: "The chat id, as `curviate unibox list` prints it." };
|
|
344
367
|
var ACCOUNTS = { type: "string", description: "Only these Accounts: a comma list of ids (acc_...). Never filled from your profile's default Account." };
|
|
345
|
-
var
|
|
368
|
+
var NEEDS_SUBSCRIPTION = { TIER_REQUIRED: "your Team needs a subscription for the Unibox actions." };
|
|
346
369
|
var ONE_TO_ONE = { CHAT_NOT_ONE_TO_ONE: "the chat is a group chat: there is no one person to save." };
|
|
347
370
|
var listCmd = defineCommand({
|
|
348
371
|
meta: {
|
|
@@ -431,14 +454,14 @@ var conversationCmd = defineCommand({
|
|
|
431
454
|
meta: { name: "conversation", description: "One person on one Account across LinkedIn and email: read it (get), its timeline, mark it read or unread." },
|
|
432
455
|
subCommands: { get: conversationGetCmd, timeline: conversationTimelineCmd, mark: conversationMarkCmd },
|
|
433
456
|
async run() {
|
|
434
|
-
const { showHelp } = await import("./examples-
|
|
457
|
+
const { showHelp } = await import("./examples-G4IC5TJU.js");
|
|
435
458
|
await showHelp(conversationCmd, ["curviate", "unibox", "conversation"]);
|
|
436
459
|
}
|
|
437
460
|
});
|
|
438
461
|
var emailSendCmd = defineCommand({
|
|
439
462
|
meta: {
|
|
440
463
|
name: "send",
|
|
441
|
-
description: "Send one plain-text email to the conversation's Lead, at once: a reply in one of its threads (--thread, a thread_id from `conversation timeline`), or a new thread (--subject, and --mailbox when more than one Mailbox can send). It goes to the Lead's one address with no signature and no opt-out line, counts against the Mailbox's daily limit, and ends the Lead's open Enrollments on this Account as a reply would. --cc and --bcc (at most 20 addresses together) and --attach (files, at most 10, 20 MiB in all, refused here before anything is sent) ride along; a link usually lands better than a file. A Cc or Bcc address the receiving server refused while it took the Lead's is a recipients_refused warning on stderr: those got nothing, everyone else did. Check first with `conversation get` that email is available. One request: a retry after a timeout can send twice, so read the timeline before you send again. An unknown outcome (the provider stopped answering after it had the whole email) exits 1, never 7: do not send it again.",
|
|
464
|
+
description: "Send one plain-text email to the conversation's Lead, at once: a reply in one of its threads (--thread, a thread_id from `conversation timeline`), or a new thread (--subject, and --mailbox when more than one Mailbox can send). It goes to the Lead's one address with no signature and no opt-out line, counts against the Mailbox's daily limit, and ends the Lead's open Enrollments on this Account as a reply would. --cc and --bcc (at most 20 addresses together) and --attach (files read from paths on this machine, at most 10, 20 MiB in all, refused here before anything is sent) ride along; a link usually lands better than a file. Up to 6 MiB in all the files go inside the one request; above that each is first uploaded as a file of your Team (`campaign attachment upload`, counted against its daily uploads, kept 30 days) and the email names them by id. Bcc addresses are never shown to the other recipients; do not repeat them where others read. A Cc or Bcc address the receiving server refused while it took the Lead's is a recipients_refused warning on stderr: those got nothing, everyone else did. Check first with `conversation get` that email is available. One request: a retry after a timeout can send twice, so read the timeline before you send again. An unknown outcome (the provider stopped answering after it had the whole email) exits 1, never 7: do not send it again.",
|
|
442
465
|
risk: "write",
|
|
443
466
|
rules: {
|
|
444
467
|
changes: "An email is sent to the Lead now; their open Enrollments on this Account end as on a reply.",
|
|
@@ -451,7 +474,8 @@ var emailSendCmd = defineCommand({
|
|
|
451
474
|
EMAIL_UNAVAILABLE: "email is not available in this conversation; reason names why (no_email_address, email_bounced, no_email, do_not_contact, no_mailbox, group_chat). Nothing is sent.",
|
|
452
475
|
MAILBOX_STATE_CONFLICT: "the Mailbox needs reconnecting, is paused, or has sent its daily limit; the message names the way on.",
|
|
453
476
|
DO_NOT_CONTACT: "a Cc or Bcc address is a Lead on your Do-not-contact list or opted out of email; nothing was sent.",
|
|
454
|
-
PLATFORM_ERROR: "the provider did not take the email: nothing was sent (exit 7 when a retry may work). With an unknown outcome it may have been sent: exit 1, do not send it again.",
|
|
477
|
+
PLATFORM_ERROR: "the provider did not take the email: nothing was sent (exit 7 when a retry may work). reason attachment_refused: the files were refused (from a Microsoft sign-in Mailbox, more than about 2.2 MB in all, refused before anything is sent): send a link or smaller files. With an unknown outcome it may have been sent: exit 1, do not send it again.",
|
|
478
|
+
RESOURCE_NOT_FOUND: "no such conversation, or an uploaded file is gone; nothing was sent.",
|
|
455
479
|
UNSUPPORTED_MEDIA_TYPE: "an attachment is an executable, a script or a macro-enabled Office file; nothing was sent."
|
|
456
480
|
},
|
|
457
481
|
seeAlso: ["curviate unibox conversation get", "curviate unibox conversation timeline"],
|
|
@@ -469,7 +493,7 @@ var emailSendCmd = defineCommand({
|
|
|
469
493
|
mailbox: { type: "string", description: "New thread only: the Mailbox to send from (mbx_...), one of the conversation's email.mailboxes." },
|
|
470
494
|
cc: { type: "string", description: "Cc addresses, repeatable or a comma list; every recipient sees them." },
|
|
471
495
|
bcc: { type: "string", description: "Bcc addresses, repeatable or a comma list; no other recipient sees them." },
|
|
472
|
-
attach: { type: "string", description: "A file to send, repeatable: at most 10, 20 MiB in all. From a Microsoft sign-in Mailbox, about 2.2 MB in all go
|
|
496
|
+
attach: { type: "string", description: "A file on this machine to send, repeatable: at most 10, 20 MiB in all (never a URL). From a Microsoft sign-in Mailbox, about 2.2 MB in all go; more is refused with PLATFORM_ERROR (reason attachment_refused) and nothing is sent: send a link or a smaller file." }
|
|
473
497
|
},
|
|
474
498
|
run: online(runEmailSend)
|
|
475
499
|
});
|
|
@@ -477,7 +501,7 @@ var emailCmd = defineCommand({
|
|
|
477
501
|
meta: { name: "email", description: "Email from a conversation: send one plain-text email to its Lead." },
|
|
478
502
|
subCommands: { send: emailSendCmd },
|
|
479
503
|
async run() {
|
|
480
|
-
const { showHelp } = await import("./examples-
|
|
504
|
+
const { showHelp } = await import("./examples-G4IC5TJU.js");
|
|
481
505
|
await showHelp(emailCmd, ["curviate", "unibox", "email"]);
|
|
482
506
|
}
|
|
483
507
|
});
|
|
@@ -528,7 +552,7 @@ var referralCmd = defineCommand({
|
|
|
528
552
|
meta: { name: "referral", description: "A reply labelled Referral: find the referred person on LinkedIn, then save them as a Lead." },
|
|
529
553
|
subCommands: { search: referralSearchCmd, confirm: referralConfirmCmd },
|
|
530
554
|
async run() {
|
|
531
|
-
const { showHelp } = await import("./examples-
|
|
555
|
+
const { showHelp } = await import("./examples-G4IC5TJU.js");
|
|
532
556
|
await showHelp(referralCmd, ["curviate", "unibox", "referral"]);
|
|
533
557
|
}
|
|
534
558
|
});
|
|
@@ -598,7 +622,7 @@ var markCmd = defineCommand({
|
|
|
598
622
|
var tagCmd = defineCommand({
|
|
599
623
|
meta: {
|
|
600
624
|
name: "tag",
|
|
601
|
-
description: "Save the other person of a one-to-one chat as a Lead (or find the one you hold) and add tags, never removing any. Needs
|
|
625
|
+
description: "Save the other person of a one-to-one chat as a Lead (or find the one you hold) and add tags, never removing any. Needs a subscription.",
|
|
602
626
|
risk: "write",
|
|
603
627
|
rules: {
|
|
604
628
|
changes: "Creates or finds the Lead and adds the tags.",
|
|
@@ -607,7 +631,7 @@ var tagCmd = defineCommand({
|
|
|
607
631
|
retry: "Safe to repeat: the same Lead, tags already there stay.",
|
|
608
632
|
undo: "Remove the tags or the Lead with `curviate lead`."
|
|
609
633
|
},
|
|
610
|
-
errors: { ...
|
|
634
|
+
errors: { ...NEEDS_SUBSCRIPTION, ...ONE_TO_ONE },
|
|
611
635
|
examples: ["curviate unibox tag acc_YOUR_ACCOUNT_ID YOUR_CHAT_ID --tag warm"]
|
|
612
636
|
},
|
|
613
637
|
args: { ...WRITE_SINGLE_FLAGS, accountId: ACCOUNT, chatId: CHAT, tag: { type: "string", description: "A tag to add; repeatable or a comma list. Omit to only save the Lead." } },
|
|
@@ -616,7 +640,7 @@ var tagCmd = defineCommand({
|
|
|
616
640
|
var enrollCmd = defineCommand({
|
|
617
641
|
meta: {
|
|
618
642
|
name: "enroll",
|
|
619
|
-
description: "Save the other person of a one-to-one chat as a Lead and enroll them in a Campaign through this chat's Account (one of its sending Accounts). A direct add: the rule that skips people you already chat with does not apply; every other rule does. Needs
|
|
643
|
+
description: "Save the other person of a one-to-one chat as a Lead and enroll them in a Campaign through this chat's Account (one of its sending Accounts). A direct add: the rule that skips people you already chat with does not apply; every other rule does. Needs a subscription.",
|
|
620
644
|
risk: "high",
|
|
621
645
|
rules: {
|
|
622
646
|
changes: "Creates the Enrollment; the Campaign's Steps run for this person from this Account.",
|
|
@@ -626,7 +650,7 @@ var enrollCmd = defineCommand({
|
|
|
626
650
|
undo: "`curviate enrollment stop <enrollment_id>`; what was sent stays sent.",
|
|
627
651
|
blast_radius: "One person, from one Account."
|
|
628
652
|
},
|
|
629
|
-
errors: { ...
|
|
653
|
+
errors: { ...NEEDS_SUBSCRIPTION, ...ONE_TO_ONE, ALREADY_ENROLLED_ON_ACCOUNT: "the person is already in this Campaign on this Account." },
|
|
630
654
|
seeAlso: ["curviate enrollment get"],
|
|
631
655
|
examples: ["curviate unibox enroll acc_YOUR_ACCOUNT_ID YOUR_CHAT_ID --campaign mot_YOUR_CAMPAIGN_ID"]
|
|
632
656
|
},
|
|
@@ -636,7 +660,7 @@ var enrollCmd = defineCommand({
|
|
|
636
660
|
var refreshCmd = defineCommand({
|
|
637
661
|
meta: {
|
|
638
662
|
name: "refresh",
|
|
639
|
-
description: "Queue a re-read of the newest chats of each Account the inbox poll covers, or of --accounts; it runs within minutes. Once per Account in a short cooldown: a repeat answers cooldown with next_allowed_at. An Account without Sync full inbox is re-read for its Campaign conversations only; one with neither answers not_synced. The poll keeps the Account's active hours: on a Team whose active days are Monday to Friday nothing is polled at the weekend, and a refresh then answers paused until the next active day. Needs
|
|
663
|
+
description: "Queue a re-read of the newest chats of each Account the inbox poll covers, or of --accounts; it runs within minutes. Once per Account in a short cooldown: a repeat answers cooldown with next_allowed_at. An Account without Sync full inbox is re-read for its Campaign conversations only; one with neither answers not_synced. The poll keeps the Account's active hours: on a Team whose active days are Monday to Friday nothing is polled at the weekend, and a refresh then answers paused until the next active day. Needs a subscription.",
|
|
640
664
|
risk: "write",
|
|
641
665
|
rules: {
|
|
642
666
|
changes: "Queues one read of each Account's newest chats.",
|
|
@@ -645,7 +669,7 @@ var refreshCmd = defineCommand({
|
|
|
645
669
|
retry: "A repeat inside the cooldown answers cooldown; nothing new is queued.",
|
|
646
670
|
undo: "Nothing to undo: a refresh only reads."
|
|
647
671
|
},
|
|
648
|
-
errors:
|
|
672
|
+
errors: NEEDS_SUBSCRIPTION,
|
|
649
673
|
examples: ["curviate unibox refresh", "curviate unibox refresh --accounts acc_YOUR_ACCOUNT_ID"]
|
|
650
674
|
},
|
|
651
675
|
args: { ...WRITE_SINGLE_FLAGS, accounts: ACCOUNTS },
|
|
@@ -654,7 +678,7 @@ var refreshCmd = defineCommand({
|
|
|
654
678
|
var labelCmd = defineCommand({
|
|
655
679
|
meta: {
|
|
656
680
|
name: "label",
|
|
657
|
-
description: "Read a reply's Reply label and its history (who set it, Curviate's confidence as a whole percent, or a rule), or with --set correct it. A correction acts as when Curviate sets the label: opt_out puts the person on your Do-not-contact list (not_interested too when your Team turned that on), out_of_office makes the Lead wait 7 days, and your Team's Tag for the label is added. No LinkedIn call. --set needs
|
|
681
|
+
description: "Read a reply's Reply label and its history (who set it, Curviate's confidence as a whole percent, or a rule), or with --set correct it. A correction acts as when Curviate sets the label: opt_out puts the person on your Do-not-contact list (not_interested too when your Team turned that on), out_of_office makes the Lead wait 7 days, and your Team's Tag for the label is added. No LinkedIn call. --set needs a subscription.",
|
|
658
682
|
risk: "write",
|
|
659
683
|
rules: {
|
|
660
684
|
changes: "With --set: the message's Reply label, stored as a correction; the earlier label stays in the history.",
|
|
@@ -663,7 +687,7 @@ var labelCmd = defineCommand({
|
|
|
663
687
|
retry: "Safe to repeat: the same label again.",
|
|
664
688
|
undo: "Set the label back with --set; a Do-not-contact entry it added stays: `curviate do-not-contact remove`."
|
|
665
689
|
},
|
|
666
|
-
errors: { ...
|
|
690
|
+
errors: { ...NEEDS_SUBSCRIPTION, REPLY_NOT_LABELLABLE: "this message takes no Reply label: a direct conversation (no Campaign), your own message, or a warm-up message." },
|
|
667
691
|
seeAlso: ["curviate unibox messages", "curviate team reply-labels"],
|
|
668
692
|
examples: ["curviate unibox label YOUR_MESSAGE_ID", "curviate unibox label YOUR_MESSAGE_ID --set not_now"]
|
|
669
693
|
},
|
|
@@ -690,7 +714,7 @@ var accountsCmd = defineCommand({
|
|
|
690
714
|
var consentCmd = defineCommand({
|
|
691
715
|
meta: {
|
|
692
716
|
name: "consent",
|
|
693
|
-
description: "Turn Sync full inbox on or off for one Account. Only the person who connected the Account can. On starts a paced listing that takes hours (needs
|
|
717
|
+
description: "Turn Sync full inbox on or off for one Account. Only the person who connected the Account can. On starts a paced listing that takes hours (needs a subscription); off hides the Account's non-Campaign chats at once and deletes them shortly after.",
|
|
694
718
|
risk: "high",
|
|
695
719
|
rules: {
|
|
696
720
|
changes: "Copies the Account's whole inbox into the Unibox (on), or removes the non-Campaign chats from it (off).",
|
|
@@ -700,7 +724,7 @@ var consentCmd = defineCommand({
|
|
|
700
724
|
undo: "Run it with the other flag; chats removed by off are listed again by a new sync.",
|
|
701
725
|
blast_radius: "One Account's whole inbox."
|
|
702
726
|
},
|
|
703
|
-
errors: { ...
|
|
727
|
+
errors: { ...NEEDS_SUBSCRIPTION, ACCOUNT_OWNER_ONLY: "only the person who connected the Account can change this." },
|
|
704
728
|
seeAlso: ["curviate unibox refresh", "curviate unibox list"],
|
|
705
729
|
examples: ["curviate unibox consent acc_YOUR_ACCOUNT_ID --on"]
|
|
706
730
|
},
|
|
@@ -732,7 +756,7 @@ var uniboxCommand = defineCommand({
|
|
|
732
756
|
consent: consentCmd
|
|
733
757
|
},
|
|
734
758
|
async run() {
|
|
735
|
-
const { showHelp } = await import("./examples-
|
|
759
|
+
const { showHelp } = await import("./examples-G4IC5TJU.js");
|
|
736
760
|
await showHelp(uniboxCommand, ["curviate", "unibox"]);
|
|
737
761
|
}
|
|
738
762
|
});
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
outputOpts,
|
|
6
6
|
rootClient,
|
|
7
7
|
usage
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-65UHJVXP.js";
|
|
9
9
|
import {
|
|
10
10
|
buildPreviewOutput
|
|
11
11
|
} from "./chunk-TCUYH5GO.js";
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
readablePage,
|
|
21
21
|
rejectPaginationModifiersWithoutAll,
|
|
22
22
|
streamAll
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-2NYGMKWI.js";
|
|
24
24
|
import {
|
|
25
25
|
renderError,
|
|
26
26
|
renderSuccess,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
import {
|
|
31
31
|
createClient,
|
|
32
32
|
resolveEffectiveConfig
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-RQ6KL2ZU.js";
|
|
34
34
|
import {
|
|
35
35
|
GLOBAL_FLAGS,
|
|
36
36
|
READ_SINGLE_FLAGS,
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
} from "./chunk-QLKGOIWS.js";
|
|
40
40
|
import {
|
|
41
41
|
DESCRIPTIONS
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-GZMSX7CA.js";
|
|
43
43
|
import {
|
|
44
44
|
readFileFlag
|
|
45
45
|
} from "./chunk-JKOQX46J.js";
|
|
@@ -259,7 +259,7 @@ function resolveOutputOpts(flags) {
|
|
|
259
259
|
async function handleError(err, outOpts, out) {
|
|
260
260
|
const { CurviateError } = await import("@curviate/sdk");
|
|
261
261
|
if (err instanceof CurviateError) {
|
|
262
|
-
const { getExitCode } = await import("./exit-codes-
|
|
262
|
+
const { getExitCode } = await import("./exit-codes-MMGNZCJ5.js");
|
|
263
263
|
renderError(err, outOpts, out);
|
|
264
264
|
process.exit(getExitCode(err));
|
|
265
265
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@curviate/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.60.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Official command-line interface for the Curviate API.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"clean": "rm -rf dist *.tsbuildinfo"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@curviate/sdk": "0.
|
|
50
|
+
"@curviate/sdk": "0.56.0",
|
|
51
51
|
"citty": "^0.1.6",
|
|
52
52
|
"open": "^10.1.0"
|
|
53
53
|
},
|
package/dist/core-ZRJY3HTF.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
DESCRIPTIONS,
|
|
4
|
-
lazy
|
|
5
|
-
} from "./chunk-XDPU2YAF.js";
|
|
6
|
-
|
|
7
|
-
// src/commands/core.ts
|
|
8
|
-
import { defineCommand } from "citty";
|
|
9
|
-
var coreCommand = defineCommand({
|
|
10
|
-
meta: {
|
|
11
|
-
name: "core",
|
|
12
|
-
description: DESCRIPTIONS.core,
|
|
13
|
-
rules: {
|
|
14
|
-
notes: [
|
|
15
|
-
"Writes reach LinkedIn immediately and are seen by the people they touch.",
|
|
16
|
-
"A retry after a timeout can repeat a write: requests carry no idempotency key. Read the current state before retrying.",
|
|
17
|
-
"Budget rows, ceilings and what is left: `curviate account get <account_id>`."
|
|
18
|
-
]
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
subCommands: {
|
|
22
|
-
profile: lazy("profile", () => import("./profile-VBHX3QGP.js").then((m) => m.profileCommand)),
|
|
23
|
-
company: lazy("company", () => import("./company-5N7CXORR.js").then((m) => m.companyCommand)),
|
|
24
|
-
job: lazy("job", () => import("./job-CSRHIFZM.js").then((m) => m.jobCommand)),
|
|
25
|
-
connect: lazy("connect", () => import("./connect-NNZOOPWV.js").then((m) => m.connectCommand)),
|
|
26
|
-
search: lazy("search", () => import("./search-THJFPGOH.js").then((m) => m.searchCommand)),
|
|
27
|
-
inbox: lazy("inbox", () => import("./inbox-JFRBROQ2.js").then((m) => m.inboxCommand)),
|
|
28
|
-
inboxes: lazy("inboxes", () => import("./inboxes-IBZHZKSD.js").then((m) => m.inboxesCommand)),
|
|
29
|
-
message: lazy("message", () => import("./message-SX6RDGWP.js").then((m) => m.messageCommand)),
|
|
30
|
-
post: lazy("post", () => import("./post-SIHHJX3P.js").then((m) => m.postCommand)),
|
|
31
|
-
comment: lazy("comment", () => import("./comment-MUELYZYN.js").then((m) => m.commentCommand)),
|
|
32
|
-
"sales-nav": lazy("sales-nav", () => import("./sales-nav-ADVFBKWB.js").then((m) => m.salesNavCommand)),
|
|
33
|
-
recruiter: lazy("recruiter", () => import("./recruiter-7AGFKQPI.js").then((m) => m.recruiterCommand)),
|
|
34
|
-
group: lazy("group", () => import("./group-6N37Q5ZS.js").then((m) => m.groupCommand)),
|
|
35
|
-
feed: lazy("feed", () => import("./feed-AC7HWUCD.js").then((m) => m.feedCommand)),
|
|
36
|
-
notification: lazy("coreNotification", () => import("./notification-ZAQM463D.js").then((m) => m.notificationCommand)),
|
|
37
|
-
draft: lazy("draft", () => import("./draft-ED6RL67K.js").then((m) => m.draftCommand))
|
|
38
|
-
},
|
|
39
|
-
async run() {
|
|
40
|
-
const { showHelp } = await import("./examples-5FJS47QF.js");
|
|
41
|
-
await showHelp(coreCommand, ["curviate", "core"]);
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
export {
|
|
45
|
-
coreCommand
|
|
46
|
-
};
|