@curviate/cli 0.54.0 → 0.56.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 +57 -0
- package/README.md +35 -17
- package/dist/{account-DW5N5MJ6.js → account-ZF5NEMID.js} +132 -125
- package/dist/{analytics-T2K3OWVQ.js → analytics-M7JWS67A.js} +5 -5
- package/dist/{beta-consent-O736ONE7.js → beta-consent-4Q2LZZQC.js} +4 -4
- package/dist/{billing-NTBL32EX.js → billing-LYPSX5SR.js} +78 -6
- package/dist/{chunk-N76WNJ5T.js → chunk-7PLTQHNO.js} +1 -1
- package/dist/{chunk-N4IYTFIY.js → chunk-AMTKGO37.js} +1 -1
- package/dist/{chunk-ACKKHLUH.js → chunk-CRO7PJ4I.js} +2 -2
- package/dist/chunk-DENWYJK2.js +94 -0
- package/dist/{chunk-FBLCSVIU.js → chunk-EI64VFBE.js} +47 -47
- package/dist/{chunk-ENBIMEKS.js → chunk-IB6ARI3R.js} +1 -1
- package/dist/{chunk-Q57PZJLX.js → chunk-J4SFOFMT.js} +90 -88
- package/dist/{chunk-FUX3BRYP.js → chunk-JXDEV33Z.js} +1 -1
- package/dist/{chunk-5B4T6BMN.js → chunk-L3RJU7C3.js} +44 -44
- package/dist/{chunk-KXJJFHSD.js → chunk-MIOEYSBQ.js} +1 -1
- package/dist/{chunk-R4HS2MWM.js → chunk-MWVTFTWV.js} +15 -13
- package/dist/{chunk-QW5K5DTC.js → chunk-RDKTHFQ6.js} +25 -6
- package/dist/{chunk-62YAYAUI.js → chunk-RKNW4UX4.js} +51 -9
- package/dist/{chunk-V3HHYTBY.js → chunk-UOWOKEB2.js} +1 -1
- package/dist/{chunk-HOMRAZ6S.js → chunk-UWRWZG4N.js} +2 -2
- package/dist/{chunk-A3UNS44U.js → chunk-VEMK4MJM.js} +10 -10
- package/dist/{chunk-UFHT2KZG.js → chunk-XP6S6E55.js} +2 -2
- package/dist/cli.js +33 -25
- package/dist/{comment-ATVJOTWV.js → comment-D6RSZTVK.js} +8 -8
- package/dist/{company-BRKFROPE.js → company-3Z6PXGTW.js} +11 -11
- package/dist/{config-E223SS5K.js → config-VY5MCJMN.js} +2 -2
- package/dist/{connect-XVDQ5FTT.js → connect-G2RTLV7G.js} +15 -15
- package/dist/{contact-4HOUOVD7.js → contact-QSLJCBDE.js} +8 -8
- package/dist/{contact-groups-ENA3VGGL.js → contact-groups-OITAD73K.js} +85 -85
- package/dist/{contact-import-4EKVDFPV.js → contact-import-LT7BKESC.js} +10 -10
- package/dist/core-RFTNNB6P.js +46 -0
- package/dist/{do-not-contact-S2WGHSQL.js → do-not-contact-ZA7KS5WD.js} +59 -33
- package/dist/{doctor-OFIUGRUG.js → doctor-JQT3DO6G.js} +4 -4
- package/dist/{document-MDE2WJYX.js → document-H65EXU4L.js} +1 -1
- package/dist/domain-7EX4E34B.js +70 -0
- package/dist/{draft-DD3DTXBM.js → draft-7U6H4BPF.js} +4 -4
- package/dist/{enrollment-ESCHKQ5X.js → enrollment-AZ6XGVVL.js} +40 -38
- package/dist/{examples-KAMXHRLE.js → examples-IGQJCSNL.js} +2 -2
- package/dist/{exit-codes-CYQHN4NE.js → exit-codes-ZSOLAXQO.js} +1 -1
- package/dist/{export-GUAGB7TF.js → export-OYMQXL62.js} +5 -5
- package/dist/{feed-ZC4FY4BA.js → feed-M5D4SJW7.js} +6 -6
- package/dist/{group-42ZE7K3K.js → group-UTC3YBKE.js} +6 -6
- package/dist/{inbox-2YS7CTXH.js → inbox-VSGNHSLG.js} +9 -9
- package/dist/{inboxes-5RB3BGCQ.js → inboxes-23C2MJK4.js} +6 -6
- package/dist/{incoming-ATZN6JJA.js → incoming-QVPP32K7.js} +13 -13
- package/dist/{job-WD3Z3P3Q.js → job-ZHVFFRWE.js} +10 -10
- package/dist/{login-JQ57YHEJ.js → login-6OTNXEJZ.js} +4 -4
- package/dist/mailbox-HD2UXZCA.js +405 -0
- package/dist/{message-WGS2IIDC.js → message-PIV77W47.js} +7 -7
- package/dist/{motion-BRVBJJJP.js → motion-AHYF34DP.js} +224 -149
- package/dist/{network-CODIWCJQ.js → network-RJHJFZEY.js} +5 -5
- package/dist/{notification-RLVF4NLJ.js → notification-XGR4NT3S.js} +6 -6
- package/dist/{notifications-HGEHM5KW.js → notifications-BHRWSHPR.js} +6 -6
- package/dist/{post-3GH2IPO6.js → post-Z7AVDDKA.js} +8 -8
- package/dist/{profile-6RFJQMIB.js → profile-YZNBX2RP.js} +15 -15
- package/dist/{recruiter-GK3UNS62.js → recruiter-EXM4P7X7.js} +17 -17
- package/dist/{sales-nav-SLS3ABF4.js → sales-nav-CKDSEXV2.js} +15 -15
- package/dist/{search-45WRT5T3.js → search-B7FB6674.js} +17 -17
- package/dist/{setup-5QZOM2Q2.js → setup-VZVPLJ4V.js} +5 -5
- package/dist/{team-WM3RKOQ2.js → team-PYABBUHO.js} +6 -6
- package/dist/{tier-5AMLO5KE.js → tier-PRK4WQKR.js} +4 -4
- package/dist/{unibox-TTCF7YVO.js → unibox-ZNKX2EKL.js} +34 -34
- package/dist/{webhook-UCCCSKDO.js → webhook-V74EV4E2.js} +18 -18
- package/package.json +2 -2
- package/dist/core-6VDDV2NM.js +0 -46
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
import {
|
|
3
3
|
chunkRows,
|
|
4
4
|
csvRecords
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-L3RJU7C3.js";
|
|
6
|
+
import "./chunk-J4SFOFMT.js";
|
|
7
|
+
import "./chunk-CRO7PJ4I.js";
|
|
8
8
|
import {
|
|
9
9
|
writeAtomic
|
|
10
10
|
} from "./chunk-GOICALYQ.js";
|
|
11
11
|
import {
|
|
12
12
|
sendChunked
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-XP6S6E55.js";
|
|
14
14
|
import {
|
|
15
15
|
fail,
|
|
16
16
|
outputOpts,
|
|
17
17
|
rootClient,
|
|
18
18
|
usage
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-UWRWZG4N.js";
|
|
20
20
|
import {
|
|
21
21
|
buildPreviewOutput
|
|
22
22
|
} from "./chunk-TCUYH5GO.js";
|
|
@@ -31,14 +31,14 @@ import {
|
|
|
31
31
|
readablePage,
|
|
32
32
|
rejectPaginationModifiersWithoutAll,
|
|
33
33
|
streamAll
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-MIOEYSBQ.js";
|
|
35
35
|
import {
|
|
36
36
|
renderSuccess,
|
|
37
37
|
writeNdjsonItem
|
|
38
38
|
} from "./chunk-QM57YDJE.js";
|
|
39
39
|
import {
|
|
40
40
|
downloadBinary
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-7PLTQHNO.js";
|
|
42
42
|
import {
|
|
43
43
|
GLOBAL_FLAGS,
|
|
44
44
|
READ_SINGLE_FLAGS,
|
|
@@ -47,24 +47,30 @@ import {
|
|
|
47
47
|
} from "./chunk-QLKGOIWS.js";
|
|
48
48
|
import {
|
|
49
49
|
DESCRIPTIONS
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-MWVTFTWV.js";
|
|
51
51
|
import {
|
|
52
52
|
readFileFlag
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-RKNW4UX4.js";
|
|
54
54
|
import "./chunk-FDJMAF7D.js";
|
|
55
55
|
import {
|
|
56
56
|
isStdinToken
|
|
57
57
|
} from "./chunk-ZYURL5VK.js";
|
|
58
|
-
import "./chunk-
|
|
58
|
+
import "./chunk-RDKTHFQ6.js";
|
|
59
59
|
|
|
60
60
|
// src/commands/do-not-contact.ts
|
|
61
61
|
import { defineCommand } from "citty";
|
|
62
|
-
var REASONS = ["asked_to_stop", "existing_customer", "competitor", "partner", "employee", "other"];
|
|
62
|
+
var REASONS = ["asked_to_stop", "existing_customer", "competitor", "partner", "employee", "unsubscribed", "other"];
|
|
63
|
+
var SCOPES = ["everything", "email_only"];
|
|
63
64
|
var online = (fn) => async ({ args }) => {
|
|
64
65
|
const f = args;
|
|
65
66
|
await fn(await rootClient(f), f);
|
|
66
67
|
};
|
|
67
68
|
var preview = (method, args, body = {}) => void process.stdout.write(JSON.stringify(buildPreviewOutput({ method, args, body })) + "\n");
|
|
69
|
+
var scope = (f) => {
|
|
70
|
+
if (f.scope === void 0) return void 0;
|
|
71
|
+
if (!SCOPES.includes(f.scope)) usage(`--scope takes everything or email_only (got ${JSON.stringify(f.scope)}).`);
|
|
72
|
+
return f.scope;
|
|
73
|
+
};
|
|
68
74
|
var reason = (f, requiredFlag) => {
|
|
69
75
|
if (f.reason === void 0) return requiredFlag ? usage(`--reason is required: one of ${REASONS.join(", ")}.`) : void 0;
|
|
70
76
|
if (!REASONS.includes(f.reason)) usage(`--reason takes one of ${REASONS.join(", ")}.`);
|
|
@@ -99,11 +105,13 @@ async function runGet(c, f) {
|
|
|
99
105
|
}
|
|
100
106
|
}
|
|
101
107
|
async function runAdd(c, f) {
|
|
102
|
-
if (f.
|
|
103
|
-
for (const [flag, v] of [["
|
|
104
|
-
const body = f.
|
|
108
|
+
if (f.lead === void 0 === (f["linkedin-url"] === void 0)) usage("name the person with exactly one of --lead (con_...) or --linkedin-url.");
|
|
109
|
+
for (const [flag, v] of [["lead", f.lead], ["linkedin-url", f["linkedin-url"]]]) if (v !== void 0 && v.trim() === "") usage(`--${flag} was given an empty value.`);
|
|
110
|
+
const body = f.lead !== void 0 ? { lead_id: f.lead } : { linkedin_url: f["linkedin-url"] };
|
|
105
111
|
const why = reason(f, false);
|
|
106
112
|
if (why) body["reason"] = why;
|
|
113
|
+
const what = scope(f);
|
|
114
|
+
if (what) body["scope"] = what;
|
|
107
115
|
if (f.preview) return preview("doNotContact.add", {}, body);
|
|
108
116
|
try {
|
|
109
117
|
renderSuccess(readableObject(await c.doNotContact.add(body)), outputOpts(f), process);
|
|
@@ -168,6 +176,7 @@ async function runImport(c, f) {
|
|
|
168
176
|
if (format === void 0) usage(dash ? "--format is required with --file -: csv, json or ndjson." : "--format could not be told from the file name: pass csv, json or ndjson.");
|
|
169
177
|
}
|
|
170
178
|
if (!FORMATS.includes(format)) usage(`--format takes one of ${FORMATS.join(", ")}.`);
|
|
179
|
+
const what = scope(f);
|
|
171
180
|
const text = await readFileFlag("file", file, { allowBom: true, maxBytes: 64 * 1024 * 1024, others: f });
|
|
172
181
|
let header;
|
|
173
182
|
let rows;
|
|
@@ -198,6 +207,13 @@ async function runImport(c, f) {
|
|
|
198
207
|
if (rows.length === 0) usage("--file: no rows to import.");
|
|
199
208
|
const bad = header === void 0 ? rows.findIndex((o) => o === null || typeof o !== "object" || Array.isArray(o)) : -1;
|
|
200
209
|
if (bad >= 0) usage(`--file: row ${bad + 1} is not an object.`);
|
|
210
|
+
if (what !== void 0 && header !== void 0) {
|
|
211
|
+
if (header.split(",").some((h) => h.trim().replace(/^"|"$/g, "").toLowerCase() === "scope")) usage("--scope: the file has a scope column; set it there, or drop the column.");
|
|
212
|
+
header = `${header},scope`;
|
|
213
|
+
rows = rows.map((r) => `${r},${what}`);
|
|
214
|
+
} else if (what !== void 0) {
|
|
215
|
+
rows = rows.map((r) => "scope" in r ? r : { ...r, scope: what });
|
|
216
|
+
}
|
|
201
217
|
const chunks = chunkRows(rows, (r) => Buffer.byteLength(typeof r === "string" ? r : JSON.stringify(r)) + 1, IMPORT_MAX_ROWS);
|
|
202
218
|
const bodyOf = (part) => header !== void 0 ? { csv: [header, ...part].join("\n") } : { rows: part };
|
|
203
219
|
if (f.preview) return preview("doNotContact.import", chunks.length > 1 ? { requests: chunks.length, rows: rows.length } : {}, bodyOf(chunks[0]));
|
|
@@ -224,42 +240,51 @@ async function runImport(c, f) {
|
|
|
224
240
|
}
|
|
225
241
|
var ID = { type: "positional", description: "Entry id (dnc_...), from `curviate do-not-contact list`." };
|
|
226
242
|
var REASON_ARG = { type: "string", description: `Why: ${REASONS.join(" | ")}.` };
|
|
243
|
+
var SCOPE_ARG = {
|
|
244
|
+
type: "string",
|
|
245
|
+
description: "What the entry stops: everything (default) or email_only (No email: email steps skip the person; LinkedIn Campaigns and writes still reach them)."
|
|
246
|
+
};
|
|
227
247
|
var listCmd = defineCommand({
|
|
228
248
|
meta: {
|
|
229
249
|
name: "list",
|
|
230
|
-
description: "List your Team's do-not-contact list, newest first. No
|
|
250
|
+
description: "List your Team's do-not-contact list, newest first. No Campaign contacts a person on it and writes toward them are refused (exit 10); a reply in a conversation they wrote in stays allowed. An entry whose Lead was deleted still applies.",
|
|
231
251
|
risk: "read",
|
|
232
252
|
examples: ["curviate do-not-contact list", "curviate do-not-contact list --query jane"]
|
|
233
253
|
},
|
|
234
|
-
args: { ...readOnly(GLOBAL_FLAGS), limit: { ...GLOBAL_FLAGS.limit, description: "Entries per page (1 to 100). The API returns no total: count with --all." }, query: { type: "string", description: "Only entries whose
|
|
254
|
+
args: { ...readOnly(GLOBAL_FLAGS), limit: { ...GLOBAL_FLAGS.limit, description: "Entries per page (1 to 100). The API returns no total: count with --all." }, query: { type: "string", description: "Only entries whose Lead name matches this text." } },
|
|
235
255
|
run: online(runList)
|
|
236
256
|
});
|
|
237
257
|
var getCmd = defineCommand({
|
|
238
|
-
meta: { name: "get", description: "One do-not-contact entry: the person, the reason,
|
|
258
|
+
meta: { name: "get", description: "One do-not-contact entry: the person, the reason, the scope (everything or email_only), how it was added and by whom.", risk: "read", examples: ["curviate do-not-contact get dnc_YOUR_ENTRY_ID"] },
|
|
239
259
|
args: { ...readOnly(READ_SINGLE_FLAGS), id: ID },
|
|
240
260
|
run: online(runGet)
|
|
241
261
|
});
|
|
242
262
|
var addCmd = defineCommand({
|
|
243
263
|
meta: {
|
|
244
264
|
name: "add",
|
|
245
|
-
description: "Put one person on the list, by
|
|
265
|
+
description: "Put one person on the list, by Lead id or LinkedIn URL (a URL of someone who is not a Lead yet creates the Lead from stored data). No Campaign contacts them afterwards and writes toward them are refused; with --scope email_only only email stops (No email). One person per call; for many, `do-not-contact import`. Any member may add. Needs Automate.",
|
|
246
266
|
risk: "write",
|
|
247
267
|
rules: {
|
|
248
|
-
changes: "The person joins the list;
|
|
268
|
+
changes: "The person joins the list; Campaigns skip them and writes toward them are refused.",
|
|
249
269
|
visible_to: "Your Team.",
|
|
250
270
|
budget_rows: [],
|
|
251
271
|
retry: "Safe: a person already on the list answers with their existing entry.",
|
|
252
272
|
undo: "`curviate do-not-contact remove <id>` (Owners and Managers)."
|
|
253
273
|
},
|
|
254
|
-
errors: { TIER_REQUIRED: "your plan does not include Do-not-contact writes (Automate).", RESOURCE_NOT_FOUND: "no
|
|
274
|
+
errors: { TIER_REQUIRED: "your plan does not include Do-not-contact writes (Automate).", RESOURCE_NOT_FOUND: "no Lead has this id." },
|
|
255
275
|
seeAlso: ["curviate do-not-contact list", "curviate do-not-contact import"],
|
|
256
|
-
examples: [
|
|
276
|
+
examples: [
|
|
277
|
+
"curviate do-not-contact add --lead con_YOUR_LEAD_ID --reason asked_to_stop",
|
|
278
|
+
"curviate do-not-contact add --linkedin-url https://www.linkedin.com/in/jane-doe",
|
|
279
|
+
"curviate do-not-contact add --lead con_YOUR_LEAD_ID --scope email_only"
|
|
280
|
+
]
|
|
257
281
|
},
|
|
258
282
|
args: {
|
|
259
283
|
...WRITE_SINGLE_FLAGS,
|
|
260
|
-
|
|
261
|
-
"linkedin-url": { type: "string", description: "The person's LinkedIn profile URL, in any spelling. Not with --
|
|
262
|
-
reason: REASON_ARG
|
|
284
|
+
lead: { type: "string", description: "The Lead (con_...). Not with --linkedin-url." },
|
|
285
|
+
"linkedin-url": { type: "string", description: "The person's LinkedIn profile URL, in any spelling. Not with --lead." },
|
|
286
|
+
reason: REASON_ARG,
|
|
287
|
+
scope: SCOPE_ARG
|
|
263
288
|
},
|
|
264
289
|
run: online(runAdd)
|
|
265
290
|
});
|
|
@@ -284,11 +309,11 @@ var updateCmd = defineCommand({
|
|
|
284
309
|
var removeCmd = defineCommand({
|
|
285
310
|
meta: {
|
|
286
311
|
name: "remove",
|
|
287
|
-
description: "Take a person off the list:
|
|
312
|
+
description: "Take a person off the list: Campaigns and writes may reach them again. Owners and Managers only.",
|
|
288
313
|
risk: "high",
|
|
289
314
|
rules: {
|
|
290
|
-
changes: "The entry is deleted;
|
|
291
|
-
visible_to: "The person, if a
|
|
315
|
+
changes: "The entry is deleted; Campaigns may enroll the person and writes toward them are allowed again.",
|
|
316
|
+
visible_to: "The person, if a Campaign or write then reaches them on LinkedIn.",
|
|
292
317
|
budget_rows: [],
|
|
293
318
|
retry: "Safe: a second call answers RESOURCE_NOT_FOUND.",
|
|
294
319
|
undo: "`curviate do-not-contact add` again.",
|
|
@@ -304,7 +329,7 @@ var removeCmd = defineCommand({
|
|
|
304
329
|
var exportCmd = defineCommand({
|
|
305
330
|
meta: {
|
|
306
331
|
name: "export",
|
|
307
|
-
description: "Download your Team's whole do-not-contact list as csv, json or ndjson (default): LinkedIn URL (empty once the
|
|
332
|
+
description: "Download your Team's whole do-not-contact list as csv, json or ndjson (default): LinkedIn URL (empty once the Lead was deleted), reason, who added it, when. The file imports as it is. The data goes to stdout or --output and nothing else does; the count goes to stderr. --output is written whole or not at all, with mode 0600. Owners and Managers only.",
|
|
308
333
|
risk: "read",
|
|
309
334
|
output: ["The data only. No --json: use --format json."],
|
|
310
335
|
errors: { INSUFFICIENT_ROLE: "exporting is for Owners and Managers." },
|
|
@@ -326,16 +351,16 @@ var exportCmd = defineCommand({
|
|
|
326
351
|
var importCmd = defineCommand({
|
|
327
352
|
meta: {
|
|
328
353
|
name: "import",
|
|
329
|
-
description: "Put the people of a CSV, JSON or NDJSON file on the list: a linkedin_url per row and an optional reason (a do-not-contact export works as it is). Each row works as `add`: someone who is not a
|
|
354
|
+
description: "Put the people of a CSV, JSON or NDJSON file on the list: a linkedin_url per row and an optional reason (a do-not-contact export works as it is). Each row works as `add`: someone who is not a Lead yet becomes one from stored data, and a person already listed is reported unchanged and keeps their reason. A bad URL or reason skips its row and the server says why. A file over 10,000 rows is sent in several requests. Any member may import. Needs Automate.",
|
|
330
355
|
risk: "write",
|
|
331
356
|
rules: {
|
|
332
|
-
changes: "The people join the list;
|
|
357
|
+
changes: "The people join the list; Campaigns skip them and writes toward them are refused. Nothing is sent to LinkedIn or to the people.",
|
|
333
358
|
visible_to: "Your Team.",
|
|
334
359
|
budget_rows: [],
|
|
335
360
|
retry: "Safe to repeat: a person already listed is reported unchanged. A run stopped part way: run it again.",
|
|
336
361
|
undo: "`curviate do-not-contact remove <id>` per person (Owners and Managers)."
|
|
337
362
|
},
|
|
338
|
-
errors: { TIER_REQUIRED: "your plan does not include Do-not-contact writes (Automate).",
|
|
363
|
+
errors: { TIER_REQUIRED: "your plan does not include Do-not-contact writes (Automate).", LEAD_LIMIT_REACHED: "the Team is at its Lead cap; rows that would add a Lead past it are skipped." },
|
|
339
364
|
output: ["One report: `total_rows`, summed `counts` (created, unchanged, skipped) and `skipped` rows with their number in the file, a reason and the field."],
|
|
340
365
|
seeAlso: ["curviate do-not-contact export", "curviate do-not-contact list"],
|
|
341
366
|
examples: ["curviate do-not-contact import --file do-not-contact.csv", "curviate do-not-contact import --file - --format ndjson"]
|
|
@@ -343,7 +368,8 @@ var importCmd = defineCommand({
|
|
|
343
368
|
args: {
|
|
344
369
|
...WRITE_SINGLE_FLAGS,
|
|
345
370
|
file: { type: "string", stdinArg: true, required: true, description: "The file: a path, or - to read it from stdin (then --format is required)." },
|
|
346
|
-
format: { type: "string", description: "csv | json | ndjson. Default: from the file extension (.csv, .json, .ndjson)." }
|
|
371
|
+
format: { type: "string", description: "csv | json | ndjson. Default: from the file extension (.csv, .json, .ndjson)." },
|
|
372
|
+
scope: { ...SCOPE_ARG, description: "The scope of every row that names none: everything (default) or email_only." }
|
|
347
373
|
},
|
|
348
374
|
run: online(runImport)
|
|
349
375
|
});
|
|
@@ -351,7 +377,7 @@ var doNotContactCommand = defineCommand({
|
|
|
351
377
|
meta: { name: "do-not-contact", description: DESCRIPTIONS["do-not-contact"] },
|
|
352
378
|
subCommands: { list: listCmd, get: getCmd, add: addCmd, update: updateCmd, remove: removeCmd, export: exportCmd, import: importCmd },
|
|
353
379
|
async run() {
|
|
354
|
-
const { showHelp } = await import("./examples-
|
|
380
|
+
const { showHelp } = await import("./examples-IGQJCSNL.js");
|
|
355
381
|
await showHelp(doNotContactCommand, ["curviate", "do-not-contact"]);
|
|
356
382
|
}
|
|
357
383
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
readablePage
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-MIOEYSBQ.js";
|
|
5
5
|
import "./chunk-QM57YDJE.js";
|
|
6
6
|
import {
|
|
7
7
|
createClient,
|
|
@@ -10,17 +10,17 @@ import {
|
|
|
10
10
|
readConfigFile,
|
|
11
11
|
resolveEffectiveConfig,
|
|
12
12
|
withoutUserinfo
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7PLTQHNO.js";
|
|
14
14
|
import {
|
|
15
15
|
GLOBAL_FLAGS
|
|
16
16
|
} from "./chunk-QLKGOIWS.js";
|
|
17
17
|
import {
|
|
18
18
|
DESCRIPTIONS
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-MWVTFTWV.js";
|
|
20
20
|
import "./chunk-ZYURL5VK.js";
|
|
21
21
|
import {
|
|
22
22
|
getExitCode
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-RDKTHFQ6.js";
|
|
24
24
|
|
|
25
25
|
// src/commands/doctor.ts
|
|
26
26
|
import { defineCommand } from "citty";
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
fail,
|
|
4
|
+
outputOpts,
|
|
5
|
+
rootClient,
|
|
6
|
+
usage
|
|
7
|
+
} from "./chunk-UWRWZG4N.js";
|
|
8
|
+
import {
|
|
9
|
+
buildPreviewOutput
|
|
10
|
+
} from "./chunk-TCUYH5GO.js";
|
|
11
|
+
import {
|
|
12
|
+
readableObject
|
|
13
|
+
} from "./chunk-MIOEYSBQ.js";
|
|
14
|
+
import {
|
|
15
|
+
renderSuccess
|
|
16
|
+
} from "./chunk-QM57YDJE.js";
|
|
17
|
+
import "./chunk-7PLTQHNO.js";
|
|
18
|
+
import {
|
|
19
|
+
READ_SINGLE_FLAGS,
|
|
20
|
+
readOnly
|
|
21
|
+
} from "./chunk-QLKGOIWS.js";
|
|
22
|
+
import {
|
|
23
|
+
DESCRIPTIONS
|
|
24
|
+
} from "./chunk-MWVTFTWV.js";
|
|
25
|
+
import "./chunk-ZYURL5VK.js";
|
|
26
|
+
|
|
27
|
+
// src/commands/domain.ts
|
|
28
|
+
import { defineCommand } from "citty";
|
|
29
|
+
var checkCmd = defineCommand({
|
|
30
|
+
meta: {
|
|
31
|
+
name: "check",
|
|
32
|
+
description: "A sending domain's checks as last run (daily): mx, spf, dkim, dmarc and tracking, each pass, fail or unknown (a failed lookup, or a DKIM selector not known yet, is never a fail), with the tracking record to add and any blocklists. --now runs them now: DNS lookups only, nothing is sent and no Mailbox is contacted. A check warns and never stops sending. A domain none of your Team's Mailboxes is on is DOMAIN_NOT_FOUND.",
|
|
33
|
+
risk: "read",
|
|
34
|
+
output: ["The domain with its checks. Without --now the answer is the last daily run; with --now, the run just made."],
|
|
35
|
+
errors: { DOMAIN_NOT_FOUND: "none of your Team's Mailboxes is on this domain (another Team's domain answers the same)." },
|
|
36
|
+
seeAlso: ["curviate mailbox list"],
|
|
37
|
+
examples: ["curviate domain check acme.example", "curviate domain check acme.example --now"]
|
|
38
|
+
},
|
|
39
|
+
args: {
|
|
40
|
+
...readOnly(READ_SINGLE_FLAGS),
|
|
41
|
+
domain: { type: "positional", description: "The domain, for example acme.example: the part of a Mailbox address after the @." },
|
|
42
|
+
now: { type: "boolean", description: "Run the checks now instead of reading the last daily run." }
|
|
43
|
+
},
|
|
44
|
+
async run({ args }) {
|
|
45
|
+
const f = args;
|
|
46
|
+
const domain = String(f.domain ?? "").trim();
|
|
47
|
+
if (domain === "") usage("name the domain, for example acme.example.");
|
|
48
|
+
if (f.preview) {
|
|
49
|
+
process.stdout.write(JSON.stringify(buildPreviewOutput({ method: "domains.check", args: { domain }, body: f.now ? { now: true } : {} })) + "\n");
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
const c = await rootClient(f);
|
|
53
|
+
try {
|
|
54
|
+
renderSuccess(readableObject(await c.domains.check(domain, { now: f.now === true })), outputOpts(f), process);
|
|
55
|
+
} catch (err) {
|
|
56
|
+
await fail(err, f);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
var domainCommand = defineCommand({
|
|
61
|
+
meta: { name: "domain", description: DESCRIPTIONS["domain"] },
|
|
62
|
+
subCommands: { check: checkCmd },
|
|
63
|
+
async run() {
|
|
64
|
+
const { showHelp } = await import("./examples-IGQJCSNL.js");
|
|
65
|
+
await showHelp(domainCommand, ["curviate", "domain"]);
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
export {
|
|
69
|
+
domainCommand
|
|
70
|
+
};
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
readablePage,
|
|
21
21
|
rejectPaginationModifiersWithoutAll,
|
|
22
22
|
streamAll
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-MIOEYSBQ.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-7PLTQHNO.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-MWVTFTWV.js";
|
|
43
43
|
import {
|
|
44
44
|
resolveTextOrStdin
|
|
45
45
|
} from "./chunk-ZYURL5VK.js";
|
|
@@ -73,7 +73,7 @@ function rejectAllOnNonPaginated(all, out) {
|
|
|
73
73
|
async function handleError(err, outOpts, out) {
|
|
74
74
|
const { CurviateError } = await import("@curviate/sdk");
|
|
75
75
|
if (err instanceof CurviateError) {
|
|
76
|
-
const { getExitCode } = await import("./exit-codes-
|
|
76
|
+
const { getExitCode } = await import("./exit-codes-ZSOLAXQO.js");
|
|
77
77
|
renderError(err, outOpts, out);
|
|
78
78
|
process.exit(getExitCode(err));
|
|
79
79
|
}
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
outputOpts,
|
|
6
6
|
rootClient,
|
|
7
7
|
usage
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-UWRWZG4N.js";
|
|
9
9
|
import {
|
|
10
10
|
buildPreviewOutput
|
|
11
11
|
} from "./chunk-TCUYH5GO.js";
|
|
@@ -20,12 +20,12 @@ import {
|
|
|
20
20
|
readablePage,
|
|
21
21
|
rejectPaginationModifiersWithoutAll,
|
|
22
22
|
streamAll
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-MIOEYSBQ.js";
|
|
24
24
|
import {
|
|
25
25
|
renderSuccess,
|
|
26
26
|
writeNdjsonItem
|
|
27
27
|
} from "./chunk-QM57YDJE.js";
|
|
28
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-7PLTQHNO.js";
|
|
29
29
|
import {
|
|
30
30
|
GLOBAL_FLAGS,
|
|
31
31
|
READ_SINGLE_FLAGS,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
} from "./chunk-QLKGOIWS.js";
|
|
35
35
|
import {
|
|
36
36
|
DESCRIPTIONS
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-MWVTFTWV.js";
|
|
38
38
|
import "./chunk-ZYURL5VK.js";
|
|
39
39
|
|
|
40
40
|
// src/commands/enrollment.ts
|
|
@@ -53,8 +53,8 @@ function filters(f) {
|
|
|
53
53
|
if (typeof v !== "string" || v.trim() === "") usage(`--${String(flag)} was given an empty value.`);
|
|
54
54
|
q[key] = v;
|
|
55
55
|
};
|
|
56
|
-
one("
|
|
57
|
-
one("
|
|
56
|
+
one("campaign", "campaign_id");
|
|
57
|
+
one("lead", "lead_id");
|
|
58
58
|
one("done-step", "done_step");
|
|
59
59
|
one("outcome", "outcome");
|
|
60
60
|
one("variant", "variant_id");
|
|
@@ -80,6 +80,8 @@ function humanReasons(data) {
|
|
|
80
80
|
o["reason"] = paired(o["reason"], o["reason_message"]);
|
|
81
81
|
delete o["reason_message"];
|
|
82
82
|
}
|
|
83
|
+
const next = o["next_action"];
|
|
84
|
+
if (next && typeof next === "object" && typeof next["text"] === "string") o["next_action"] = next["text"];
|
|
83
85
|
for (const k of ["items", "history"]) if (Array.isArray(o[k])) o[k] = o[k].map(humanReasons);
|
|
84
86
|
return o;
|
|
85
87
|
}
|
|
@@ -182,8 +184,8 @@ async function runBulk(c, f) {
|
|
|
182
184
|
if (!ACTIONS.includes(action)) usage(`--action takes one of ${ACTIONS.join(", ")}.`);
|
|
183
185
|
const ids = listFlag("id", f.id);
|
|
184
186
|
const filter = filters(f);
|
|
185
|
-
if (ids.length > 0 === (f.
|
|
186
|
-
if (ids.length && Object.keys(filter).length) usage("the list filters apply with --
|
|
187
|
+
if (ids.length > 0 === (f.campaign !== void 0)) usage("name the Enrollments either with --id (repeatable, or a comma list) or with --campaign and its filters, not both.");
|
|
188
|
+
if (ids.length && Object.keys(filter).length) usage("the list filters apply with --campaign, not with --id.");
|
|
187
189
|
const body = { action, ...ids.length ? { ids } : { filter } };
|
|
188
190
|
if (f.at !== void 0) body["at"] = f.at;
|
|
189
191
|
if (f.name !== void 0) body["name"] = f.name;
|
|
@@ -206,7 +208,7 @@ async function runBulk(c, f) {
|
|
|
206
208
|
}
|
|
207
209
|
const firstError = results.find((r) => r.outcome !== "ok");
|
|
208
210
|
if (firstError) {
|
|
209
|
-
const { getExitCode } = await import("./exit-codes-
|
|
211
|
+
const { getExitCode } = await import("./exit-codes-ZSOLAXQO.js");
|
|
210
212
|
process.stderr.write(`error: ${results.filter((r) => r.outcome !== "ok").length} of ${results.length} Enrollments were refused; each refusal is listed.
|
|
211
213
|
`);
|
|
212
214
|
process.exit(getExitCode(firstError.error?.code ?? "INTERNAL"));
|
|
@@ -222,8 +224,8 @@ var NOT_ACTIVE = { ENROLLMENT_NOT_ACTIVE: "the Enrollment's status does not take
|
|
|
222
224
|
var IN_FLIGHT = { STEP_IN_FLIGHT: "a Step of the Enrollment is being sent right now; read it again in a minute, then retry." };
|
|
223
225
|
var SEE = ["curviate enrollment get", "curviate enrollment list"];
|
|
224
226
|
var FILTER_ARGS = {
|
|
225
|
-
|
|
226
|
-
|
|
227
|
+
campaign: { type: "string", description: "Only this Campaign's Enrollments (mot_...)." },
|
|
228
|
+
lead: { type: "string", description: "Only this Lead's Enrollments (con_...)." },
|
|
227
229
|
status: { type: "string", description: "Comma list of pending, active, paused, finished, skipped." },
|
|
228
230
|
step: { type: "string", description: "Only Enrollments now at one of these Step ids: repeatable or a comma list." },
|
|
229
231
|
version: { type: "string", description: "Only Enrollments running this Sequence version (1 or more)." },
|
|
@@ -231,18 +233,18 @@ var FILTER_ARGS = {
|
|
|
231
233
|
outcome: { type: "string", description: "With --done-step: executed, skipped, failed, accepted, not_accepted, replied, no_reply or seen." },
|
|
232
234
|
reason: { type: "string", description: "Comma list of reason codes (skip, finish or Step reasons; narrowed to --done-step when given)." },
|
|
233
235
|
variant: { type: "string", description: "Only Enrollments given this variant id." },
|
|
234
|
-
relationship: { type: "string", description: "Comma list of connected, not_connected, invite_pending, unknown: the
|
|
236
|
+
relationship: { type: "string", description: "Comma list of connected, not_connected, invite_pending, unknown: the Lead's relationship to the Account when it started." }
|
|
235
237
|
};
|
|
236
238
|
var listCmd = defineCommand({
|
|
237
239
|
meta: {
|
|
238
240
|
name: "list",
|
|
239
|
-
description: "List Enrollments, newest first, filtered by
|
|
241
|
+
description: "List Enrollments, newest first, filtered by Campaign, Lead, status, current Step, or how a Step ended. Each counts once per Lead, Campaign and Account. A pending Enrollment waiting in its Campaign's pool has no account_id (null) until an Account takes it; --accounts leaves such Enrollments out.",
|
|
240
242
|
risk: "read",
|
|
241
243
|
output: ["Each reason code comes with its sentence beside it (`skip_reason` and `skip_message`, `finish_reason` and `finish_message`)."],
|
|
242
244
|
examples: [
|
|
243
|
-
"curviate enrollment list --
|
|
244
|
-
"curviate enrollment list --
|
|
245
|
-
"curviate enrollment list --
|
|
245
|
+
"curviate enrollment list --campaign mot_YOUR_CAMPAIGN_ID",
|
|
246
|
+
"curviate enrollment list --campaign mot_YOUR_CAMPAIGN_ID --done-step opener --outcome failed",
|
|
247
|
+
"curviate enrollment list --campaign mot_YOUR_CAMPAIGN_ID --reason already_connected,known_chat --relationship connected"
|
|
246
248
|
]
|
|
247
249
|
},
|
|
248
250
|
args: {
|
|
@@ -274,7 +276,7 @@ var pauseCmd = defineCommand({
|
|
|
274
276
|
retry: "A second pause answers ENROLLMENT_NOT_ACTIVE; nothing changes.",
|
|
275
277
|
undo: "`curviate enrollment resume <enrollment_id>`."
|
|
276
278
|
},
|
|
277
|
-
errors: { ...NOT_ACTIVE, ...IN_FLIGHT,
|
|
279
|
+
errors: { ...NOT_ACTIVE, ...IN_FLIGHT, CAMPAIGN_STATUS_CONFLICT: "the Campaign is archived or past its end.", ...ROLE },
|
|
278
280
|
examples: ["curviate enrollment pause enr_YOUR_ENROLLMENT_ID"]
|
|
279
281
|
},
|
|
280
282
|
args: { ...WRITE_SINGLE_FLAGS, id: ID },
|
|
@@ -287,13 +289,13 @@ var resumeCmd = defineCommand({
|
|
|
287
289
|
risk: "high",
|
|
288
290
|
rules: {
|
|
289
291
|
changes: "The Enrollment runs again from its Account; with --at, from the named Step.",
|
|
290
|
-
visible_to: "The
|
|
292
|
+
visible_to: "The Lead, once its next Step reaches LinkedIn.",
|
|
291
293
|
budget_rows: [],
|
|
292
294
|
retry: "With --at, every call jumps again and may send again: read `curviate enrollment get <enrollment_id>` first.",
|
|
293
295
|
undo: "`curviate enrollment pause <enrollment_id>`; what was sent stays sent.",
|
|
294
|
-
blast_radius: "One Enrollment: one
|
|
296
|
+
blast_radius: "One Enrollment: one Lead, from one Account."
|
|
295
297
|
},
|
|
296
|
-
errors: { ...NOT_ACTIVE, ...IN_FLIGHT,
|
|
298
|
+
errors: { ...NOT_ACTIVE, ...IN_FLIGHT, CAMPAIGN_STATUS_CONFLICT: "the Campaign is archived or past its end.", ...ROLE },
|
|
297
299
|
seeAlso: ["curviate enrollment retry", "curviate enrollment get"],
|
|
298
300
|
examples: ["curviate enrollment resume enr_YOUR_ENROLLMENT_ID", "curviate enrollment resume enr_YOUR_ENROLLMENT_ID --at bump"]
|
|
299
301
|
},
|
|
@@ -311,7 +313,7 @@ var retryCmd = defineCommand({
|
|
|
311
313
|
risk: "high",
|
|
312
314
|
rules: {
|
|
313
315
|
changes: "Resumes the Enrollment at its failed Step, which runs again when its Account may send.",
|
|
314
|
-
visible_to: "The
|
|
316
|
+
visible_to: "The Lead, if the Step reaches LinkedIn.",
|
|
315
317
|
budget_rows: [],
|
|
316
318
|
retry: "Safe: with nothing failed it answers NOTHING_TO_RETRY and sends nothing.",
|
|
317
319
|
undo: "`curviate enrollment pause <enrollment_id>` before the Step runs; what was sent stays sent.",
|
|
@@ -321,7 +323,7 @@ var retryCmd = defineCommand({
|
|
|
321
323
|
NOTHING_TO_RETRY: "nothing to retry: the Enrollment's latest Step outcome is not failed.",
|
|
322
324
|
...IN_FLIGHT,
|
|
323
325
|
...NOT_ACTIVE,
|
|
324
|
-
|
|
326
|
+
CAMPAIGN_STATUS_CONFLICT: "the Campaign is archived or past its end.",
|
|
325
327
|
...ROLE
|
|
326
328
|
},
|
|
327
329
|
output: ["The re-run's record, {step_id, outcome, reason, message}. Exit 7 when the wait runs out first: the Step is resumed; read it later."],
|
|
@@ -364,7 +366,7 @@ var eventMeta = (name, description, example) => ({
|
|
|
364
366
|
risk: "write",
|
|
365
367
|
rules: {
|
|
366
368
|
changes: "Records the event; a Step waiting for it continues. Fires no webhook.",
|
|
367
|
-
visible_to: "Your Team; the
|
|
369
|
+
visible_to: "Your Team; the Lead once the next Step runs.",
|
|
368
370
|
budget_rows: [],
|
|
369
371
|
retry: "A second event is recorded again; a Step already past the wait ignores it.",
|
|
370
372
|
undo: "Cannot be undone; pause or stop the Enrollment to keep its next Step from running."
|
|
@@ -375,7 +377,7 @@ var eventMeta = (name, description, example) => ({
|
|
|
375
377
|
var eventCmd = defineCommand({
|
|
376
378
|
meta: eventMeta(
|
|
377
379
|
"event",
|
|
378
|
-
"Send a custom event to an active or paused Enrollment whose Sequence waits for it, for example once your agent wrote the researched text to the
|
|
380
|
+
"Send a custom event to an active or paused Enrollment whose Sequence waits for it, for example once your agent wrote the researched text to the Lead's custom fields. Input only: fires no webhook. Needs Automate.",
|
|
379
381
|
"curviate enrollment event enr_YOUR_ENROLLMENT_ID research_ready"
|
|
380
382
|
),
|
|
381
383
|
args: EVENT_ARGS,
|
|
@@ -396,62 +398,62 @@ var signalCmd = defineCommand({
|
|
|
396
398
|
var reassignCmd = defineCommand({
|
|
397
399
|
meta: {
|
|
398
400
|
name: "reassign",
|
|
399
|
-
description: "Move an Enrollment to another sending Account of its
|
|
401
|
+
description: "Move an Enrollment to another sending Account of its Campaign; it restarts there at the first Step of its version (one you paused stays paused). Refused, nothing changed, when its Account already engaged the person, the target already holds them, or the target has a chat with them. Needs Automate.",
|
|
400
402
|
risk: "high",
|
|
401
403
|
rules: {
|
|
402
404
|
changes: "The Enrollment restarts on the target Account; Steps already skipped are named in warnings.",
|
|
403
|
-
visible_to: "The
|
|
405
|
+
visible_to: "The Lead, once the target Account's first Step reaches LinkedIn.",
|
|
404
406
|
budget_rows: [],
|
|
405
407
|
retry: "A second call to the same Account answers ALREADY_ENROLLED_ON_ACCOUNT.",
|
|
406
408
|
undo: "Reassign it back while the target has not engaged the person yet.",
|
|
407
|
-
blast_radius: "One Enrollment: one
|
|
409
|
+
blast_radius: "One Enrollment: one Lead, from one Account."
|
|
408
410
|
},
|
|
409
411
|
errors: {
|
|
410
|
-
ACCOUNT_NOT_FOUND: "the target is not a sending Account of the
|
|
412
|
+
ACCOUNT_NOT_FOUND: "the target is not a sending Account of the Campaign.",
|
|
411
413
|
...NOT_ACTIVE,
|
|
412
414
|
...IN_FLIGHT,
|
|
413
415
|
ACCOUNT_ALREADY_ENGAGED: "its current Account already did something the person can see.",
|
|
414
|
-
ALREADY_ENROLLED_ON_ACCOUNT: "the target already holds this
|
|
416
|
+
ALREADY_ENROLLED_ON_ACCOUNT: "the target already holds this Lead in the Campaign, or is the current Account.",
|
|
415
417
|
KNOWN_CHAT: "the target already has a chat with the person.",
|
|
416
418
|
...ROLE
|
|
417
419
|
},
|
|
418
|
-
seeAlso: ["curviate enrollment get", "curviate
|
|
420
|
+
seeAlso: ["curviate enrollment get", "curviate campaign get"],
|
|
419
421
|
examples: ["curviate enrollment reassign enr_YOUR_ENROLLMENT_ID --account acc_YOUR_ACCOUNT_ID"]
|
|
420
422
|
},
|
|
421
423
|
args: {
|
|
422
424
|
...WRITE_SINGLE_FLAGS,
|
|
423
425
|
id: ID,
|
|
424
|
-
account: { type: "string", required: true, description: "The target sending Account of the
|
|
426
|
+
account: { type: "string", required: true, description: "The target sending Account of the Campaign (acc_...). Never defaulted." }
|
|
425
427
|
},
|
|
426
428
|
run: online(single("reassign", (f) => ({ account_id: required("account", f.account, "the target Account (acc_...)") })))
|
|
427
429
|
});
|
|
428
430
|
var bulkCmd = defineCommand({
|
|
429
431
|
meta: {
|
|
430
432
|
name: "bulk",
|
|
431
|
-
description: "Pause, resume, stop, retry, send an event to or reassign many Enrollments in one call, named with --id or matched by --
|
|
433
|
+
description: "Pause, resume, stop, retry, send an event to or reassign many Enrollments in one call, named with --id or matched by --campaign and the list filters. Each is decided alone, as its own command would be; not atomic. Up to 1000 items: ids, or Enrollments the filters match. List with the same filters first to see the matches.",
|
|
432
434
|
risk: "high",
|
|
433
435
|
rules: {
|
|
434
436
|
changes: "Each Enrollment gets the action as its single command would.",
|
|
435
|
-
visible_to: "The
|
|
437
|
+
visible_to: "The Leads whose next Step reaches LinkedIn.",
|
|
436
438
|
budget_rows: [],
|
|
437
439
|
retry: "A retried call is a new call: each Enrollment answers again on its own (a second stop is ENROLLMENT_NOT_ACTIVE for it).",
|
|
438
440
|
undo: "Per Enrollment, as its single command says; what was sent stays sent.",
|
|
439
|
-
blast_radius: "Up to 1000 items (Enrollments), every
|
|
441
|
+
blast_radius: "Up to 1000 items (Enrollments), every Lead and Account they cover."
|
|
440
442
|
},
|
|
441
443
|
errors: { ...NOT_ACTIVE, NOTHING_TO_RETRY: "retry, per Enrollment: nothing failed.", ...IN_FLIGHT, ...ROLE },
|
|
442
444
|
output: ["One line per Enrollment, `<enrollment_id> ok` or `<enrollment_id> error <code>: <message>`; with --json (or piped) the API's answer. Exit 0 when every one is ok, else the first refusal's exit."],
|
|
443
445
|
seeAlso: SEE,
|
|
444
446
|
examples: [
|
|
445
447
|
"curviate enrollment bulk --action stop --id enr_A,enr_B",
|
|
446
|
-
"curviate enrollment bulk --action retry --
|
|
448
|
+
"curviate enrollment bulk --action retry --campaign mot_YOUR_CAMPAIGN_ID --done-step opener --outcome failed"
|
|
447
449
|
]
|
|
448
450
|
},
|
|
449
451
|
args: {
|
|
450
452
|
...WRITE_SINGLE_FLAGS,
|
|
451
453
|
action: { type: "string", required: true, description: `One of ${ACTIONS.join(", ")}.` },
|
|
452
|
-
id: { type: "string", description: "An Enrollment id (enr_...); repeatable, or a comma list. Not with --
|
|
454
|
+
id: { type: "string", description: "An Enrollment id (enr_...); repeatable, or a comma list. Not with --campaign." },
|
|
453
455
|
...FILTER_ARGS,
|
|
454
|
-
|
|
456
|
+
campaign: { type: "string", description: "Act on this Campaign's Enrollments (mot_...) that the other filters match. Not with --id." },
|
|
455
457
|
at: { type: "string", description: "With --action resume: jump to this Step id (not guarded, see `curviate enrollment resume`)." },
|
|
456
458
|
name: { type: "string", description: "With --action event: the event name." },
|
|
457
459
|
account: { type: "string", description: "With --action reassign: the target sending Account (acc_...). Never defaulted." }
|
|
@@ -473,7 +475,7 @@ var enrollmentCommand = defineCommand({
|
|
|
473
475
|
bulk: bulkCmd
|
|
474
476
|
},
|
|
475
477
|
async run() {
|
|
476
|
-
const { showHelp } = await import("./examples-
|
|
478
|
+
const { showHelp } = await import("./examples-IGQJCSNL.js");
|
|
477
479
|
await showHelp(enrollmentCommand, ["curviate", "enrollment"]);
|
|
478
480
|
}
|
|
479
481
|
});
|