@curviate/cli 0.53.0 → 0.55.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.
Files changed (65) hide show
  1. package/CHANGELOG.md +30 -1
  2. package/README.md +34 -17
  3. package/dist/{account-24YCNFNY.js → account-6L33JFZS.js} +98 -116
  4. package/dist/{analytics-RMRTJPHK.js → analytics-HGJGXRAM.js} +5 -5
  5. package/dist/{beta-consent-KCJUJFAR.js → beta-consent-LIND4PPN.js} +4 -4
  6. package/dist/{billing-5GK6WIXR.js → billing-QKPP5NPR.js} +5 -5
  7. package/dist/{chunk-AA2UTHCS.js → chunk-AMMAA62Z.js} +44 -44
  8. package/dist/{chunk-R5VJTBAJ.js → chunk-BC4N5X3N.js} +47 -47
  9. package/dist/{chunk-N4IYTFIY.js → chunk-EA5LJ4CS.js} +1 -1
  10. package/dist/{chunk-WYFTBTDQ.js → chunk-FHSGANM6.js} +10 -10
  11. package/dist/chunk-J34JU27C.js +94 -0
  12. package/dist/{chunk-62YAYAUI.js → chunk-JKXGL7PT.js} +9 -9
  13. package/dist/{chunk-FUX3BRYP.js → chunk-JXDEV33Z.js} +1 -1
  14. package/dist/{chunk-4YGTPVEH.js → chunk-KLXDFFHT.js} +1 -1
  15. package/dist/{chunk-WY73KWPF.js → chunk-LGUZ52BU.js} +2 -2
  16. package/dist/{chunk-FNENKSJ7.js → chunk-OYZ27Q3B.js} +88 -88
  17. package/dist/{chunk-TIYRNMGW.js → chunk-Q5Z7FMXI.js} +2 -2
  18. package/dist/{chunk-AQVE6HO5.js → chunk-QBY6L77D.js} +15 -13
  19. package/dist/{chunk-PAXWRJNA.js → chunk-R7USRN52.js} +1 -1
  20. package/dist/{chunk-QW5K5DTC.js → chunk-RDKTHFQ6.js} +25 -6
  21. package/dist/{chunk-YHXIFKCU.js → chunk-S234PC5E.js} +1 -1
  22. package/dist/{chunk-IRKTIZUM.js → chunk-Z3RPQ5K4.js} +2 -2
  23. package/dist/cli.js +27 -25
  24. package/dist/{comment-UUA7B5YC.js → comment-IIKLEAEK.js} +8 -8
  25. package/dist/{company-65ILSE2U.js → company-CX5TZNB5.js} +11 -11
  26. package/dist/{config-TMFMXS7T.js → config-Y4FC7QKM.js} +2 -2
  27. package/dist/{connect-URFFJVYY.js → connect-GUUBX23F.js} +15 -15
  28. package/dist/{contact-A3S2HEBM.js → contact-OCYSFRTS.js} +8 -8
  29. package/dist/{contact-groups-CEV2YITT.js → contact-groups-HWJSYRFJ.js} +85 -85
  30. package/dist/{contact-import-HHVKVRJW.js → contact-import-CTWSFT64.js} +10 -10
  31. package/dist/core-37XZS2RG.js +46 -0
  32. package/dist/{do-not-contact-QYPADRLJ.js → do-not-contact-6UVY3UKT.js} +29 -29
  33. package/dist/{doctor-M7JVNQPQ.js → doctor-6CB6DCY3.js} +4 -4
  34. package/dist/{document-MDE2WJYX.js → document-ADK4GZA7.js} +1 -1
  35. package/dist/domain-BUJMHYIV.js +70 -0
  36. package/dist/{draft-6KY4F5AE.js → draft-SII6E6Z6.js} +4 -4
  37. package/dist/{enrollment-IXQD5IGZ.js → enrollment-OXGR5WVI.js} +38 -38
  38. package/dist/{examples-KAMXHRLE.js → examples-77WVMKZQ.js} +2 -2
  39. package/dist/{exit-codes-CYQHN4NE.js → exit-codes-ZSOLAXQO.js} +1 -1
  40. package/dist/{export-7ILY53LY.js → export-D32J5GRN.js} +5 -5
  41. package/dist/{feed-GESAX65K.js → feed-HOFHCP6W.js} +6 -6
  42. package/dist/{group-KKTBXE42.js → group-AMYOAGNS.js} +6 -6
  43. package/dist/{inbox-QQ6AQDVB.js → inbox-NS2LB2WQ.js} +9 -9
  44. package/dist/{inboxes-352YK6UB.js → inboxes-XWUZJ5PN.js} +6 -6
  45. package/dist/{incoming-5T2ELEDF.js → incoming-UIWRL6QS.js} +13 -13
  46. package/dist/{job-KBILRJJO.js → job-TKGPXU26.js} +10 -10
  47. package/dist/{login-DQPKKDVA.js → login-B2YWX2JP.js} +2 -2
  48. package/dist/mailbox-LLSGX2FF.js +406 -0
  49. package/dist/{message-ZB2IGJIQ.js → message-M4THMNRZ.js} +7 -7
  50. package/dist/{motion-NNCRSOT6.js → motion-2OUGYR3O.js} +147 -147
  51. package/dist/{network-FLPECF4C.js → network-MFWKXTEV.js} +5 -5
  52. package/dist/{notification-B3MRXH3A.js → notification-5K4TCYQA.js} +6 -6
  53. package/dist/{notifications-PMJDG45H.js → notifications-2GKUJB7C.js} +6 -6
  54. package/dist/{post-O5DYXSHK.js → post-BHH7YKGM.js} +8 -8
  55. package/dist/{profile-ZDP23SNN.js → profile-GKMRRKZF.js} +15 -15
  56. package/dist/{recruiter-QENVOZFV.js → recruiter-J53ZSD4P.js} +17 -17
  57. package/dist/{sales-nav-JFAYF6DM.js → sales-nav-6I5SYTRX.js} +15 -15
  58. package/dist/{search-5HPVIIUJ.js → search-HS2YAA33.js} +17 -17
  59. package/dist/{setup-QUD7TUCB.js → setup-IYVOGVC6.js} +4 -4
  60. package/dist/{team-ZTGY45Y7.js → team-N6ILUHAD.js} +6 -6
  61. package/dist/{tier-3ISVHJJ5.js → tier-QWXKFESB.js} +8 -10
  62. package/dist/{unibox-JQBP7COE.js → unibox-D4WIHIZX.js} +34 -34
  63. package/dist/{webhook-GPGFPF5P.js → webhook-PKWGZZO2.js} +18 -18
  64. package/package.json +2 -2
  65. package/dist/core-IOGPY6HS.js +0 -46
@@ -5,14 +5,14 @@ import {
5
5
  } from "./chunk-VHNF6OZD.js";
6
6
  import {
7
7
  sendInChunks
8
- } from "./chunk-TIYRNMGW.js";
8
+ } from "./chunk-Q5Z7FMXI.js";
9
9
  import {
10
10
  fail,
11
11
  listFlag,
12
12
  outputOpts,
13
13
  rootClient,
14
14
  usage
15
- } from "./chunk-WY73KWPF.js";
15
+ } from "./chunk-LGUZ52BU.js";
16
16
  import {
17
17
  buildPreviewOutput
18
18
  } from "./chunk-TCUYH5GO.js";
@@ -27,12 +27,12 @@ import {
27
27
  readablePage,
28
28
  rejectPaginationModifiersWithoutAll,
29
29
  streamAll
30
- } from "./chunk-PAXWRJNA.js";
30
+ } from "./chunk-R7USRN52.js";
31
31
  import {
32
32
  renderSuccess,
33
33
  writeNdjsonItem
34
34
  } from "./chunk-QM57YDJE.js";
35
- import "./chunk-YHXIFKCU.js";
35
+ import "./chunk-S234PC5E.js";
36
36
  import {
37
37
  GLOBAL_FLAGS,
38
38
  READ_SINGLE_FLAGS,
@@ -41,14 +41,14 @@ import {
41
41
  } from "./chunk-QLKGOIWS.js";
42
42
  import {
43
43
  DESCRIPTIONS
44
- } from "./chunk-AQVE6HO5.js";
44
+ } from "./chunk-QBY6L77D.js";
45
45
  import {
46
46
  documentSchema,
47
47
  parseDocument,
48
48
  readFileFlag,
49
49
  reportIssues,
50
50
  validate
51
- } from "./chunk-62YAYAUI.js";
51
+ } from "./chunk-JKXGL7PT.js";
52
52
  import "./chunk-FDJMAF7D.js";
53
53
  import {
54
54
  isStdinToken
@@ -134,7 +134,7 @@ var connect_and_converse_default = {
134
134
  {
135
135
  id: "has_post",
136
136
  if: {
137
- "contact.posted_within": "14d"
137
+ "lead.posted_within": "14d"
138
138
  },
139
139
  then: "w_like",
140
140
  else: "w_invite"
@@ -254,7 +254,7 @@ var engage_then_connect_default = {
254
254
  text: "{{comment}}",
255
255
  fallback: "skip"
256
256
  },
257
- note: "Your AI writes one comment per Contact; no product mention."
257
+ note: "Your AI writes one comment per Lead; no product mention."
258
258
  },
259
259
  {
260
260
  id: "w_invite",
@@ -330,7 +330,7 @@ var nurture_connections_default = {
330
330
  {
331
331
  id: "is_connected",
332
332
  if: {
333
- "contact.connected": true
333
+ "lead.connected": true
334
334
  },
335
335
  then: "dm",
336
336
  else: "not_connected"
@@ -406,7 +406,7 @@ function assignWarning(sequence, assign) {
406
406
  const at = steps.findIndex((s) => s?.["do"] === "invite.send" && typeof s["id"] === "string");
407
407
  if (at < 0) return [];
408
408
  const rule = "settings.assign is already_connected, so anyone not already connected to a sending Account is skipped and this invitation never runs for them; use assign: auto";
409
- const hint = "Set settings.assign to auto, the default: it prefers an Account already connected and invites everyone else. Keep already_connected only for a Motion that writes to existing Connections.";
409
+ const hint = "Set settings.assign to auto, the default: it prefers an Account already connected and invites everyone else. Keep already_connected only for a Campaign that writes to existing Connections.";
410
410
  return [{ code: "W17", path: `${steps[at]["id"]}.do`, rule, message: rule, pointer: `/steps/${at}/do`, hint, docs_url: "https://docs.curviate.com/reference/sequence-rules#w17", severity: "warning" }];
411
411
  }
412
412
  async function checkSequence(f, text, sequence, prefix, settings) {
@@ -426,14 +426,14 @@ async function checkSequence(f, text, sequence, prefix, settings) {
426
426
  `).join(""));
427
427
  return verdict;
428
428
  }
429
- function checkMotionFields(f, command, doc) {
429
+ function checkCampaignFields(f, command, doc) {
430
430
  const schema = documentSchema(command);
431
431
  let body = doc;
432
432
  if (doc && typeof doc === "object" && !Array.isArray(doc)) {
433
433
  const readOnlyKeys = schema["x-curviate-response-only"];
434
434
  const dropped = Object.keys(doc).filter((k) => readOnlyKeys.includes(k));
435
435
  if (dropped.length) {
436
- process.stderr.write(`warning: dropped ${dropped.join(", ")}: set by Curviate, not part of a Motion file (\`curviate motion get\` output carries them).
436
+ process.stderr.write(`warning: dropped ${dropped.join(", ")}: set by Curviate, not part of a Campaign file (\`curviate campaign get\` output carries them).
437
437
  `);
438
438
  body = Object.fromEntries(Object.entries(doc).filter(([k]) => !dropped.includes(k)));
439
439
  }
@@ -442,9 +442,9 @@ function checkMotionFields(f, command, doc) {
442
442
  if (issues.length) reportIssues(issues, outputOpts(f).json);
443
443
  return body;
444
444
  }
445
- async function readMotionFile(f, command) {
445
+ async function readCampaignFile(f, command) {
446
446
  const text = await readFileFlag("file", f.file ?? "", { others: f });
447
- const body = checkMotionFields(f, command, parseDocument("file", text));
447
+ const body = checkCampaignFields(f, command, parseDocument("file", text));
448
448
  if (body["sequence"] != null) await checkSequence(f, text, body["sequence"], "/sequence", body["settings"]);
449
449
  return { body, text };
450
450
  }
@@ -457,7 +457,7 @@ function explain(err, f, text) {
457
457
  if (e.code === "SEQUENCE_CONFLICT" && e.current) {
458
458
  const c = e.current;
459
459
  process.stderr.write(
460
- `The Sequence was saved since revision ${f["if-revision"]}: revision ${c.sequence_revision} by ${c.sequence_updated_by_user_id ?? "an unknown user"} at ${c.updated_at ?? "an unknown time"}. Read it with \`curviate motion get ${f.id}\` and merge, or send yours again with --if-revision ${c.sequence_revision} to replace it.
460
+ `The Sequence was saved since revision ${f["if-revision"]}: revision ${c.sequence_revision} by ${c.sequence_updated_by_user_id ?? "an unknown user"} at ${c.updated_at ?? "an unknown time"}. Read it with \`curviate campaign get ${f.id}\` and merge, or send yours again with --if-revision ${c.sequence_revision} to replace it.
461
461
  `
462
462
  );
463
463
  }
@@ -482,10 +482,10 @@ async function runList(c, f) {
482
482
  if (cursor) params["cursor"] = cursor;
483
483
  try {
484
484
  if (f.all) {
485
- const page = (p) => c.motions.list(p);
485
+ const page = (p) => c.campaigns.list(p);
486
486
  for await (const item of streamAll(page, params, { maxPages: readMaxPagesFlag(f, process), out: process, pageDelayMs: pageDelayFromFlags(f) })) writeNdjsonItem(process, item, f.fields);
487
487
  } else {
488
- renderSuccess(readablePage(await c.motions.list(params)), outputOpts(f), process);
488
+ renderSuccess(readablePage(await c.campaigns.list(params)), outputOpts(f), process);
489
489
  }
490
490
  } catch (err) {
491
491
  await fail(err, f);
@@ -493,41 +493,41 @@ async function runList(c, f) {
493
493
  }
494
494
  async function runGet(c, f) {
495
495
  try {
496
- const result = f.version === void 0 ? await c.motions.get(f.id ?? "") : await c.motions.getSequenceVersion(f.id ?? "", { version: intFlag("version", f.version) });
496
+ const result = f.version === void 0 ? await c.campaigns.get(f.id ?? "") : await c.campaigns.getSequenceVersion(f.id ?? "", { version: intFlag("version", f.version) });
497
497
  renderSuccess(readableObject(result), outputOpts(f), process);
498
498
  } catch (err) {
499
499
  await fail(err, f);
500
500
  }
501
501
  }
502
502
  async function runCreate(c, f) {
503
- const { body, text } = await readMotionFile(f, "motion create");
504
- if (f.preview) return preview("motions.create", {}, body);
503
+ const { body, text } = await readCampaignFile(f, "campaign create");
504
+ if (f.preview) return preview("campaigns.create", {}, body);
505
505
  try {
506
- renderSuccess(await c.motions.create(body), outputOpts(f), process);
506
+ renderSuccess(await c.campaigns.create(body), outputOpts(f), process);
507
507
  } catch (err) {
508
508
  explain(err, f, text);
509
509
  await fail(err, f);
510
510
  }
511
511
  }
512
512
  async function runUpdate(c, f) {
513
- const { body, text } = await readMotionFile(f, "motion update");
513
+ const { body, text } = await readCampaignFile(f, "campaign update");
514
514
  if ("if_sequence_revision" in body) {
515
515
  process.stderr.write("warning: dropped if_sequence_revision from the file: pass --if-revision <n> to send it.\n");
516
516
  delete body["if_sequence_revision"];
517
517
  }
518
518
  if (f["if-revision"] !== void 0) body["if_sequence_revision"] = intFlag("if-revision", f["if-revision"], 0);
519
- if (f.preview) return preview("motions.update", { id: f.id }, body);
519
+ if (f.preview) return preview("campaigns.update", { id: f.id }, body);
520
520
  try {
521
- renderSuccess(await c.motions.update(f.id ?? "", body), outputOpts(f), process);
521
+ renderSuccess(await c.campaigns.update(f.id ?? "", body), outputOpts(f), process);
522
522
  } catch (err) {
523
523
  explain(err, f, text);
524
524
  await fail(err, f);
525
525
  }
526
526
  }
527
527
  var lifecycle = (method) => async (c, f) => {
528
- if (f.preview) return preview(`motions.${method}`, { id: f.id });
528
+ if (f.preview) return preview(`campaigns.${method}`, { id: f.id });
529
529
  try {
530
- renderSuccess(await c.motions[method](f.id ?? ""), outputOpts(f), process);
530
+ renderSuccess(await c.campaigns[method](f.id ?? ""), outputOpts(f), process);
531
531
  } catch (err) {
532
532
  await fail(err, f);
533
533
  }
@@ -535,22 +535,22 @@ var lifecycle = (method) => async (c, f) => {
535
535
  async function runPreview(c, f) {
536
536
  const params = {};
537
537
  if (f.sample !== void 0) params["sample"] = intFlag("sample", f.sample, 1, 20);
538
- if (f.contact !== void 0) params["contact_ids"] = listFlag("contact", f.contact);
539
- if (params["sample"] !== void 0 && params["contact_ids"] !== void 0) usage("--sample and --contact cannot be combined: name the Contacts, or let Curviate sample.");
538
+ if (f.lead !== void 0) params["lead_ids"] = listFlag("lead", f.lead);
539
+ if (params["sample"] !== void 0 && params["lead_ids"] !== void 0) usage("--sample and --lead cannot be combined: name the Leads, or let Curviate sample.");
540
540
  try {
541
- renderSuccess(readableObject(await c.motions.preview(f.id ?? "", params)), outputOpts(f), process);
541
+ renderSuccess(readableObject(await c.campaigns.preview(f.id ?? "", params)), outputOpts(f), process);
542
542
  } catch (err) {
543
543
  await fail(err, f);
544
544
  }
545
545
  }
546
546
  var membership = (kind) => async (c, f) => {
547
- const ids = listFlag("contact", f.contact);
548
- if (!ids.length) usage("--contact is required: one or more Contact ids (con_...).");
549
- if (f.account !== void 0 && f.account.trim() === "") usage("--account was given an empty value. Pass an acc_... id of the Motion, or omit it to let Curviate assign one.");
550
- const body = (chunk) => ({ contact_ids: chunk, ...f.account !== void 0 ? { account_id: f.account } : {} });
551
- const method = kind === "add" ? "addContacts" : "removeContacts";
552
- if (f.preview) return preview(`motions.${method}`, { id: f.id }, body(ids.slice(0, BULK_MAX_IDS)));
553
- const results = await sendInChunks(ids, BULK_MAX_IDS, (chunk) => c.motions[method](f.id ?? "", body(chunk)), f);
547
+ const ids = listFlag("lead", f.lead);
548
+ if (!ids.length) usage("--lead is required: one or more Lead ids (con_...).");
549
+ if (f.account !== void 0 && f.account.trim() === "") usage("--account was given an empty value. Pass an acc_... id of the Campaign, or omit it to let Curviate assign one.");
550
+ const body = (chunk) => ({ lead_ids: chunk, ...f.account !== void 0 ? { account_id: f.account } : {} });
551
+ const method = kind === "add" ? "addLeads" : "removeLeads";
552
+ if (f.preview) return preview(`campaigns.${method}`, { id: f.id }, body(ids.slice(0, BULK_MAX_IDS)));
553
+ const results = await sendInChunks(ids, BULK_MAX_IDS, (chunk) => c.campaigns[method](f.id ?? "", body(chunk)), f);
554
554
  if (results.length === 1) return renderSuccess(results[0], outputOpts(f), process);
555
555
  const last = results[results.length - 1] ?? {};
556
556
  const merged = kind === "add" ? { ...last, results: results.flatMap((r) => r?.results ?? []) } : {
@@ -562,7 +562,7 @@ var membership = (kind) => async (c, f) => {
562
562
  };
563
563
  async function runVoiceClipUpload(c, f) {
564
564
  const path = f.file ?? "";
565
- if (path.trim() === "") usage("the audio file is missing. Pass its path: `curviate motion voice-clip upload intro.mp3`.");
565
+ if (path.trim() === "") usage("the audio file is missing. Pass its path: `curviate campaign voice-clip upload intro.mp3`.");
566
566
  const filename = basename(path);
567
567
  let bytes;
568
568
  try {
@@ -572,17 +572,17 @@ async function runVoiceClipUpload(c, f) {
572
572
  throw err;
573
573
  }
574
574
  if (f.preview) {
575
- return void process.stdout.write(JSON.stringify(buildPreviewOutput({ method: "motions.voiceClips.upload", args: { filename }, body: {}, attachments: [{ name: filename, buffer: bytes }] })) + "\n");
575
+ return void process.stdout.write(JSON.stringify(buildPreviewOutput({ method: "campaigns.voiceClips.upload", args: { filename }, body: {}, attachments: [{ name: filename, buffer: bytes }] })) + "\n");
576
576
  }
577
577
  try {
578
- renderSuccess(await c.motions.voiceClips.upload(bytes, { filename }), outputOpts(f), process);
578
+ renderSuccess(await c.campaigns.voiceClips.upload(bytes, { filename }), outputOpts(f), process);
579
579
  } catch (err) {
580
580
  await fail(err, f);
581
581
  }
582
582
  }
583
583
  async function runVoiceClipGet(c, f) {
584
584
  try {
585
- renderSuccess(await c.motions.voiceClips.get(f.id ?? ""), outputOpts(f), process);
585
+ renderSuccess(await c.campaigns.voiceClips.get(f.id ?? ""), outputOpts(f), process);
586
586
  } catch (err) {
587
587
  await fail(err, f);
588
588
  }
@@ -590,10 +590,10 @@ async function runVoiceClipGet(c, f) {
590
590
  async function runLint(f) {
591
591
  const text = await readFileFlag("file", f.file ?? "", { others: f });
592
592
  const doc = parseDocument("file", text);
593
- const motionFile = !!doc && typeof doc === "object" && !Array.isArray(doc) && !("steps" in doc) && ("sequence" in doc || "name" in doc);
594
- if (motionFile) checkMotionFields(f, "motion create", doc);
595
- if (motionFile && doc["sequence"] == null) usage("--file: the Motion file has no sequence; there is nothing to lint.");
596
- const verdict = await checkSequence(f, text, motionFile ? doc["sequence"] : doc, motionFile ? "/sequence" : "", motionFile ? doc["settings"] : void 0);
593
+ const campaignFile = !!doc && typeof doc === "object" && !Array.isArray(doc) && !("steps" in doc) && ("sequence" in doc || "name" in doc);
594
+ if (campaignFile) checkCampaignFields(f, "campaign create", doc);
595
+ if (campaignFile && doc["sequence"] == null) usage("--file: the Campaign file has no sequence; there is nothing to lint.");
596
+ const verdict = await checkSequence(f, text, campaignFile ? doc["sequence"] : doc, campaignFile ? "/sequence" : "", campaignFile ? doc["settings"] : void 0);
597
597
  if (outputOpts(f).json) process.stdout.write(JSON.stringify({ errors: [], warnings: verdict.warnings }) + "\n");
598
598
  }
599
599
  async function runInit(f) {
@@ -608,31 +608,31 @@ async function runInit(f) {
608
608
  } catch (err) {
609
609
  usage(`--output: cannot write ${f.output}: ${err.code ?? "write error"}.`);
610
610
  }
611
- process.stderr.write(`Wrote ${f.output}. Next: fill contact_list_ids and account_ids, then \`curviate motion create --file ${f.output}\`.
611
+ process.stderr.write(`Wrote ${f.output}. Next: fill lead_list_ids and account_ids, then \`curviate campaign create --file ${f.output}\`.
612
612
  `);
613
613
  }
614
614
  var online = (fn) => async ({ args }) => {
615
615
  const f = args;
616
616
  await fn(await rootClient(f), f);
617
617
  };
618
- var ID = { type: "positional", description: "Motion id (mot_...)." };
619
- var FILE_DESC = "The Motion file: a path, or - to read it from stdin. `curviate motion get` output is accepted as is.";
620
- var SEQUENCE_ERRORS = { SEQUENCE_INVALID: "the Sequence breaks a rule; every error is listed, one line each, as `curviate motion lint` prints them." };
618
+ var ID = { type: "positional", description: "Campaign id (mot_...)." };
619
+ var FILE_DESC = "The Campaign file: a path, or - to read it from stdin. `curviate campaign get` output is accepted as is.";
620
+ var SEQUENCE_ERRORS = { SEQUENCE_INVALID: "the Sequence breaks a rule; every error is listed, one line each, as `curviate campaign lint` prints them." };
621
621
  var ROLE_ERRORS = {
622
- INSUFFICIENT_ROLE: "your role cannot send from a sending Account of this Motion.",
622
+ INSUFFICIENT_ROLE: "your role cannot send from a sending Account of this Campaign.",
623
623
  ACCOUNT_NOT_SHARED: "a sending Account is not shared with you."
624
624
  };
625
- var SEE_LIFECYCLE = ["curviate motion get", "curviate enrollment list"];
625
+ var SEE_LIFECYCLE = ["curviate campaign get", "curviate enrollment list"];
626
626
  var listCmd = defineCommand({
627
627
  meta: {
628
628
  name: "list",
629
- description: "List your Team's Motions, most recently updated first (--sort activity: latest activity first, `last_activity_at`). Items carry no Sequence: read one with `curviate motion get <motion_id>`. A cursor belongs to its sort.",
629
+ description: "List your Team's Campaigns, most recently updated first (--sort activity: latest activity first, `last_activity_at`). Items carry no Sequence: read one with `curviate campaign get <campaign_id>`. A cursor belongs to its sort.",
630
630
  risk: "read",
631
- examples: ["curviate motion list", "curviate motion list --status active,paused", "curviate motion list --accounts acc_A,acc_B --sort activity"]
631
+ examples: ["curviate campaign list", "curviate campaign list --status active,paused", "curviate campaign list --accounts acc_A,acc_B --sort activity"]
632
632
  },
633
633
  args: {
634
634
  ...readOnly(GLOBAL_FLAGS),
635
- accounts: { type: "string", description: "Only Motions sending from one of these Accounts: a comma list of ids (acc_...). --account a,b is accepted as the same filter." },
635
+ accounts: { type: "string", description: "Only Campaigns sending from one of these Accounts: a comma list of ids (acc_...). --account a,b is accepted as the same filter." },
636
636
  sort: { type: "string", description: "updated (default) or activity." },
637
637
  status: { type: "string", description: `Comma list of ${STATUSES.join(", ")}. Default: all but archived.` }
638
638
  },
@@ -641,10 +641,10 @@ var listCmd = defineCommand({
641
641
  var getCmd = defineCommand({
642
642
  meta: {
643
643
  name: "get",
644
- description: "One Motion with its current Sequence and lint warnings. With --version, that Sequence version instead, and how many Enrollments still run on it.",
644
+ description: "One Campaign with its current Sequence and lint warnings. With --version, that Sequence version instead, and how many Enrollments still run on it.",
645
645
  risk: "read",
646
- output: ["The full Motion, pasteable: `curviate motion create --file -` and `curviate motion update <motion_id> --file -` accept it as is, dropping the keys Curviate sets."],
647
- examples: ["curviate motion get mot_YOUR_MOTION_ID", "curviate motion get mot_YOUR_MOTION_ID --version 1"]
646
+ output: ["The full Campaign, pasteable: `curviate campaign create --file -` and `curviate campaign update <campaign_id> --file -` accept it as is, dropping the keys Curviate sets."],
647
+ examples: ["curviate campaign get mot_YOUR_CAMPAIGN_ID", "curviate campaign get mot_YOUR_CAMPAIGN_ID --version 1"]
648
648
  },
649
649
  args: {
650
650
  ...readOnly(READ_SINGLE_FLAGS),
@@ -653,9 +653,9 @@ var getCmd = defineCommand({
653
653
  },
654
654
  run: online(runGet)
655
655
  });
656
- var MOTION_DOC = `{
656
+ var CAMPAIGN_DOC = `{
657
657
  "name": "Q4 webinar follow-up",
658
- "contact_list_ids": ["cl_YOUR_LIST_ID"],
658
+ "lead_list_ids": ["cl_YOUR_LIST_ID"],
659
659
  "account_ids": ["acc_YOUR_ACCOUNT_ID"],
660
660
  "sequence": {
661
661
  "on_reply": "end",
@@ -667,22 +667,22 @@ var MOTION_DOC = `{
667
667
  var createCmd = defineCommand({
668
668
  meta: {
669
669
  name: "create",
670
- description: "Create a Motion from a Motion file, always as a draft: nothing runs until `curviate motion start`. The file is checked before anything is sent, its Sequence as `curviate motion lint` checks it. settings.priority (normal or prioritized) sets the Motion's weight in each Account's budgets: 1 or 1.5, on every budget; every Motion with work due still progresses and no limit is passed. Needs Automate.",
670
+ description: "Create a Campaign from a Campaign file, always as a draft: nothing runs until `curviate campaign start`. The file is checked before anything is sent, its Sequence as `curviate campaign lint` checks it. settings.priority (normal or prioritized) sets the Campaign's weight in each Account's budgets: 1 or 1.5, on every budget; every Campaign with work due still progresses and no limit is passed. Needs Automate.",
671
671
  risk: "write",
672
672
  rules: {
673
- changes: "Creates a draft Motion. No Contact is enrolled and nothing reaches LinkedIn until it is started.",
673
+ changes: "Creates a draft Campaign. No Lead is enrolled and nothing reaches LinkedIn until it is started.",
674
674
  visible_to: "Your Team.",
675
675
  budget_rows: [],
676
- retry: "A retry creates a second draft: list with `curviate motion list --status draft` first.",
677
- undo: "`curviate motion delete <motion_id>` deletes a draft."
676
+ retry: "A retry creates a second draft: list with `curviate campaign list --status draft` first.",
677
+ undo: "`curviate campaign delete <campaign_id>` deletes a draft."
678
678
  },
679
- errors: { ...SEQUENCE_ERRORS, ...ROLE_ERRORS, TIER_REQUIRED: "Motions need the Automate plan." },
680
- seeAlso: ["curviate motion lint", "curviate motion init", "curviate motion preview"],
681
- document: "motion create",
679
+ errors: { ...SEQUENCE_ERRORS, ...ROLE_ERRORS, TIER_REQUIRED: "Campaigns need the Automate plan." },
680
+ seeAlso: ["curviate campaign lint", "curviate campaign init", "curviate campaign preview"],
681
+ document: "campaign create",
682
682
  examples: [
683
- "curviate motion create --file motion.json",
684
- `curviate motion create --file - <<'EOF'
685
- ${MOTION_DOC}
683
+ "curviate campaign create --file campaign.json",
684
+ `curviate campaign create --file - <<'EOF'
685
+ ${CAMPAIGN_DOC}
686
686
  EOF`
687
687
  ]
688
688
  },
@@ -695,27 +695,27 @@ EOF`
695
695
  var updateCmd = defineCommand({
696
696
  meta: {
697
697
  name: "update",
698
- description: "Change a Motion from a Motion file: objects (schedule, settings) merge by key, arrays and the Sequence replace whole, null clears. settings.priority (normal or prioritized) weighs the Motion 1 or 1.5 in each Account's budgets, on every budget (every Motion with work due still progresses, and no limit is passed); settings.new_enrollments_per_account_per_day and settings.assign even are retired (accepted and ignored until 2027-01-28, with a notice). After start, a structural Sequence change makes a new version; running Enrollments keep theirs. With --if-revision the save is refused when someone saved the Sequence since. Needs Automate.",
698
+ description: "Change a Campaign from a Campaign file: objects (schedule, settings) merge by key, arrays and the Sequence replace whole, null clears. settings.priority (normal or prioritized) weighs the Campaign 1 or 1.5 in each Account's budgets, on every budget (every Campaign with work due still progresses, and no limit is passed); settings.new_enrollments_per_account_per_day and settings.assign even are retired (accepted and ignored until 2027-01-28, with a notice). After start, a structural Sequence change makes a new version; running Enrollments keep theirs. With --if-revision the save is refused when someone saved the Sequence since. Needs Automate.",
699
699
  risk: "write",
700
700
  rules: {
701
- changes: "Changes the Motion. A running Motion picks the change up at each Enrollment's next Step.",
702
- visible_to: "Your Team, and the Contacts its next Steps reach.",
701
+ changes: "Changes the Campaign. A running Campaign picks the change up at each Enrollment's next Step.",
702
+ visible_to: "Your Team, and the Leads its next Steps reach.",
703
703
  budget_rows: [],
704
704
  retry: "Safe: the same file sends the same change. Without --if-revision the last save wins.",
705
- undo: "Send the previous file again (`curviate motion get <motion_id> --version <n>` reads an earlier Sequence)."
705
+ undo: "Send the previous file again (`curviate campaign get <campaign_id> --version <n>` reads an earlier Sequence)."
706
706
  },
707
707
  errors: {
708
708
  ...SEQUENCE_ERRORS,
709
709
  SEQUENCE_CONFLICT: "with --if-revision: someone saved the Sequence since that revision; the message names the newer revision and who saved it.",
710
- MOTION_STATUS_CONFLICT: "an archived Motion, or one past its end, cannot change.",
710
+ CAMPAIGN_STATUS_CONFLICT: "an archived Campaign, or one past its end, cannot change.",
711
711
  ...ROLE_ERRORS
712
712
  },
713
- seeAlso: ["curviate motion get", "curviate motion lint"],
714
- document: "motion update",
713
+ seeAlso: ["curviate campaign get", "curviate campaign lint"],
714
+ document: "campaign update",
715
715
  examples: [
716
- "curviate motion update mot_YOUR_MOTION_ID --file motion.json --if-revision 3",
717
- `curviate motion update mot_YOUR_MOTION_ID --file - <<'EOF'
718
- ${MOTION_DOC}
716
+ "curviate campaign update mot_YOUR_CAMPAIGN_ID --file campaign.json --if-revision 3",
717
+ `curviate campaign update mot_YOUR_CAMPAIGN_ID --file - <<'EOF'
718
+ ${CAMPAIGN_DOC}
719
719
  EOF`
720
720
  ]
721
721
  },
@@ -723,128 +723,128 @@ EOF`
723
723
  ...WRITE_SINGLE_FLAGS,
724
724
  id: ID,
725
725
  file: { type: "string", stdinArg: true, required: true, description: FILE_DESC },
726
- "if-revision": { type: "string", description: "The sequence_revision you read (`curviate motion get`). The save is refused with SEQUENCE_CONFLICT when the stored Sequence moved past it. Omitted: the last save wins." }
726
+ "if-revision": { type: "string", description: "The sequence_revision you read (`curviate campaign get`). The save is refused with SEQUENCE_CONFLICT when the stored Sequence moved past it. Omitted: the last save wins." }
727
727
  },
728
728
  run: online(runUpdate)
729
729
  });
730
730
  var lifecycleCmd = (name, meta) => defineCommand({
731
- meta: { name, ...meta, examples: [`curviate motion ${name} mot_YOUR_MOTION_ID`] },
731
+ meta: { name, ...meta, examples: [`curviate campaign ${name} mot_YOUR_CAMPAIGN_ID`] },
732
732
  args: { ...WRITE_SINGLE_FLAGS, id: ID },
733
733
  run: online(lifecycle(name))
734
734
  });
735
735
  var startCmd = lifecycleCmd("start", {
736
- description: "Start a draft: scheduled when its start time is ahead, else active. Freezes Sequence version 1. A Motion missing what it needs is refused with every gap listed. Needs Automate.",
736
+ description: "Start a draft: scheduled when its start time is ahead, else active. Freezes Sequence version 1. A Campaign missing what it needs is refused with every gap listed. Needs Automate.",
737
737
  risk: "high",
738
738
  rules: {
739
- changes: "The Motion starts enrolling its Contacts and running its Steps from its sending Accounts, paced on its schedule.",
740
- visible_to: "The Contacts each Step reaches on LinkedIn.",
739
+ changes: "The Campaign starts enrolling its Leads and running its Steps from its sending Accounts, paced on its schedule.",
740
+ visible_to: "The Leads each Step reaches on LinkedIn.",
741
741
  budget_rows: [],
742
- retry: "A retry on a started Motion answers MOTION_STATUS_CONFLICT; nothing runs twice.",
743
- undo: "`curviate motion pause <motion_id>` stops new Steps; what was sent stays sent.",
744
- blast_radius: "Every Contact of its Contact lists, from every sending Account, each Step spending that Account's budgets (`curviate account get <account_id>`)."
742
+ retry: "A retry on a started Campaign answers CAMPAIGN_STATUS_CONFLICT; nothing runs twice.",
743
+ undo: "`curviate campaign pause <campaign_id>` stops new Steps; what was sent stays sent.",
744
+ blast_radius: "Every Lead of its Lead lists, from every sending Account, each Step spending that Account's budgets (`curviate account get <account_id>`)."
745
745
  },
746
- errors: { MOTION_NOT_STARTABLE: "a gap stops it (Contact list, sending Account, Sequence); each is listed.", MOTION_STATUS_CONFLICT: "only a draft starts.", ...ROLE_ERRORS, TIER_REQUIRED: "Motions need the Automate plan." },
747
- seeAlso: ["curviate motion preview", "curviate motion pause"]
746
+ errors: { CAMPAIGN_NOT_STARTABLE: "a gap stops it (Lead list, sending Account, Sequence); each is listed.", CAMPAIGN_STATUS_CONFLICT: "only a draft starts.", ...ROLE_ERRORS, TIER_REQUIRED: "Campaigns need the Automate plan." },
747
+ seeAlso: ["curviate campaign preview", "curviate campaign pause"]
748
748
  });
749
749
  var pauseCmd = lifecycleCmd("pause", {
750
- description: "Pause an active or scheduled Motion: no Step runs until it is resumed. Waits keep their time.",
750
+ description: "Pause an active or scheduled Campaign: no Step runs until it is resumed. Waits keep their time.",
751
751
  risk: "write",
752
752
  rules: {
753
- changes: "No Step of the Motion runs while it is paused.",
753
+ changes: "No Step of the Campaign runs while it is paused.",
754
754
  visible_to: "Your Team.",
755
755
  budget_rows: [],
756
- retry: "Safe: a paused Motion answers MOTION_STATUS_CONFLICT.",
757
- undo: "`curviate motion resume <motion_id>`."
756
+ retry: "Safe: a paused Campaign answers CAMPAIGN_STATUS_CONFLICT.",
757
+ undo: "`curviate campaign resume <campaign_id>`."
758
758
  },
759
- errors: { MOTION_STATUS_CONFLICT: "only an active or scheduled Motion pauses.", ...ROLE_ERRORS },
759
+ errors: { CAMPAIGN_STATUS_CONFLICT: "only an active or scheduled Campaign pauses.", ...ROLE_ERRORS },
760
760
  seeAlso: SEE_LIFECYCLE
761
761
  });
762
762
  var resumeCmd = lifecycleCmd("resume", {
763
- description: "Resume a paused Motion. Runs the start checks again. Needs Automate.",
763
+ description: "Resume a paused Campaign. Runs the start checks again. Needs Automate.",
764
764
  risk: "high",
765
765
  rules: {
766
- changes: "The Motion's Steps run again from its sending Accounts.",
767
- visible_to: "The Contacts each Step reaches on LinkedIn.",
766
+ changes: "The Campaign's Steps run again from its sending Accounts.",
767
+ visible_to: "The Leads each Step reaches on LinkedIn.",
768
768
  budget_rows: [],
769
- retry: "A retry on a running Motion answers MOTION_STATUS_CONFLICT.",
770
- undo: "`curviate motion pause <motion_id>`; what was sent stays sent.",
771
- blast_radius: "Every open Enrollment of the Motion."
769
+ retry: "A retry on a running Campaign answers CAMPAIGN_STATUS_CONFLICT.",
770
+ undo: "`curviate campaign pause <campaign_id>`; what was sent stays sent.",
771
+ blast_radius: "Every open Enrollment of the Campaign."
772
772
  },
773
- errors: { MOTION_NOT_STARTABLE: "a gap stops it; each is listed.", MOTION_STATUS_CONFLICT: "only a paused Motion resumes.", ...ROLE_ERRORS, TIER_REQUIRED: "Motions need the Automate plan." },
773
+ errors: { CAMPAIGN_NOT_STARTABLE: "a gap stops it; each is listed.", CAMPAIGN_STATUS_CONFLICT: "only a paused Campaign resumes.", ...ROLE_ERRORS, TIER_REQUIRED: "Campaigns need the Automate plan." },
774
774
  seeAlso: SEE_LIFECYCLE
775
775
  });
776
776
  var archiveCmd = lifecycleCmd("archive", {
777
- description: "Archive a Motion: its open Enrollments end (motion_archived) and it never runs again.",
777
+ description: "Archive a Campaign: its open Enrollments end (campaign_archived) and it never runs again.",
778
778
  risk: "high",
779
779
  rules: {
780
- changes: "Ends every open Enrollment and freezes the Motion.",
780
+ changes: "Ends every open Enrollment and freezes the Campaign.",
781
781
  visible_to: "Your Team.",
782
782
  budget_rows: [],
783
- retry: "A retry answers MOTION_STATUS_CONFLICT.",
784
- undo: "Cannot be undone. Create a new Motion from `curviate motion get <motion_id>` output.",
785
- blast_radius: "Every open Enrollment of the Motion."
783
+ retry: "A retry answers CAMPAIGN_STATUS_CONFLICT.",
784
+ undo: "Cannot be undone. Create a new Campaign from `curviate campaign get <campaign_id>` output.",
785
+ blast_radius: "Every open Enrollment of the Campaign."
786
786
  },
787
- errors: { MOTION_STATUS_CONFLICT: "already archived.", ...ROLE_ERRORS },
787
+ errors: { CAMPAIGN_STATUS_CONFLICT: "already archived.", ...ROLE_ERRORS },
788
788
  seeAlso: SEE_LIFECYCLE
789
789
  });
790
790
  var deleteCmd = lifecycleCmd("delete", {
791
- description: "Delete a draft Motion with its Sequence versions. Any other status: archive it instead.",
791
+ description: "Delete a draft Campaign with its Sequence versions. Any other status: archive it instead.",
792
792
  risk: "high",
793
793
  rules: {
794
794
  changes: "Deletes the draft and its Sequence versions.",
795
795
  visible_to: "Your Team.",
796
796
  budget_rows: [],
797
797
  retry: "A retry answers RESOURCE_NOT_FOUND.",
798
- undo: "Cannot be undone. Keep `curviate motion get <motion_id>` output to create it again.",
799
- blast_radius: "One draft Motion; it has no Enrollments."
798
+ undo: "Cannot be undone. Keep `curviate campaign get <campaign_id>` output to create it again.",
799
+ blast_radius: "One draft Campaign; it has no Enrollments."
800
800
  },
801
- errors: { RESOURCE_NOT_FOUND: "no Motion with this id.", MOTION_STATUS_CONFLICT: "only a draft is deleted; archive the others.", ...ROLE_ERRORS },
802
- seeAlso: ["curviate motion archive", "curviate motion list"]
801
+ errors: { RESOURCE_NOT_FOUND: "no Campaign with this id.", CAMPAIGN_STATUS_CONFLICT: "only a draft is deleted; archive the others.", ...ROLE_ERRORS },
802
+ seeAlso: ["curviate campaign archive", "curviate campaign list"]
803
803
  });
804
804
  var previewCmd = defineCommand({
805
805
  meta: {
806
806
  name: "preview",
807
- description: "What the Motion would do, in any status: every path through its Sequence, rendered messages for sampled or named Contacts, and the budget projection: per Account the pool that binds its pace, the expected actions a day (a draft: the mean daily invitations, messages and InMails of the first 7 days of its forecast, as if turned on now), and warnings (hours_below_share, no_sending_account). A read: never reaches LinkedIn, spends nothing.",
807
+ description: "What the Campaign would do, in any status: every path through its Sequence, rendered messages for sampled or named Leads, and the budget projection: per Account the pool that binds its pace, the expected actions a day (a draft: the mean daily invitations, messages and InMails of the first 7 days of its forecast, as if turned on now), and warnings (hours_below_share, no_sending_account). A read: never reaches LinkedIn, spends nothing.",
808
808
  risk: "read",
809
- examples: ["curviate motion preview mot_YOUR_MOTION_ID", "curviate motion preview mot_YOUR_MOTION_ID --sample 3"]
809
+ examples: ["curviate campaign preview mot_YOUR_CAMPAIGN_ID", "curviate campaign preview mot_YOUR_CAMPAIGN_ID --sample 3"]
810
810
  },
811
811
  args: {
812
812
  ...readOnly(READ_SINGLE_FLAGS),
813
813
  id: ID,
814
- sample: { type: "string", description: "How many Contacts to render (default 5)." },
815
- contact: { type: "string", description: "A Contact id (con_...) to render; repeatable, or a comma list. Not with --sample." }
814
+ sample: { type: "string", description: "How many Leads to render (default 5)." },
815
+ lead: { type: "string", description: "A Lead id (con_...) to render; repeatable, or a comma list. Not with --sample." }
816
816
  },
817
817
  run: online(runPreview)
818
818
  });
819
819
  var membershipCmd = (kind) => defineCommand({
820
820
  meta: {
821
821
  name: kind,
822
- description: kind === "add" ? "Enroll Contacts directly, on an Account of the Motion (--account) or one Curviate assigns. Every exclusion and filter applies; each Contact's outcome says what happened. Sent in requests of up to 1000 ids, in order. Needs Automate." : "Take Contacts out of the Motion: their open Enrollments end (removed). Sent in requests of up to 1000 ids, in order.",
822
+ description: kind === "add" ? "Enroll Leads directly, on an Account of the Campaign (--account) or one Curviate assigns. Every exclusion and filter applies; each Lead's outcome says what happened. Sent in requests of up to 1000 ids, in order. Needs Automate." : "Take Leads out of the Campaign: their open Enrollments end (removed). Sent in requests of up to 1000 ids, in order.",
823
823
  risk: "high",
824
824
  rules: kind === "add" ? {
825
- changes: "Each queued Contact becomes a pending Enrollment; a running Motion reaches it on its schedule.",
826
- visible_to: "Your Team now; the Contacts once their Steps run.",
825
+ changes: "Each queued Lead becomes a pending Enrollment; a running Campaign reaches it on its schedule.",
826
+ visible_to: "Your Team now; the Leads once their Steps run.",
827
827
  budget_rows: [],
828
- retry: "Safe: a Contact already in the Motion answers already_enrolled. After a failed request, send the ids from the failed one on.",
829
- undo: "`curviate motion remove <motion_id> --contact <contact_id>`; what was sent stays sent.",
830
- blast_radius: "Every Contact given."
828
+ retry: "Safe: a Lead already in the Campaign answers already_enrolled. After a failed request, send the ids from the failed one on.",
829
+ undo: "`curviate campaign remove <campaign_id> --lead <lead_id>`; what was sent stays sent.",
830
+ blast_radius: "Every Lead given."
831
831
  } : {
832
- changes: "Ends each named Contact's open Enrollments in the Motion (removed).",
832
+ changes: "Ends each named Lead's open Enrollments in the Campaign (removed).",
833
833
  visible_to: "Your Team.",
834
834
  budget_rows: [],
835
- retry: "Safe: a Contact no longer in the Motion is listed in not_found.",
836
- undo: "`curviate motion add <motion_id> --contact <contact_id>` enrolls it again.",
837
- blast_radius: "Every Contact given."
835
+ retry: "Safe: a Lead no longer in the Campaign is listed in not_found.",
836
+ undo: "`curviate campaign add <campaign_id> --lead <lead_id>` enrolls it again.",
837
+ blast_radius: "Every Lead given."
838
838
  },
839
- errors: { MOTION_STATUS_CONFLICT: "an archived Motion, or one past its end, takes no Contacts.", ...ROLE_ERRORS },
839
+ errors: { CAMPAIGN_STATUS_CONFLICT: "an archived Campaign, or one past its end, takes no Leads.", ...ROLE_ERRORS },
840
840
  seeAlso: ["curviate enrollment list"],
841
- examples: kind === "add" ? ["curviate motion add mot_YOUR_MOTION_ID --contact con_YOUR_CONTACT_ID", "curviate motion add mot_YOUR_MOTION_ID --contact con_A,con_B --account acc_YOUR_ACCOUNT_ID"] : ["curviate motion remove mot_YOUR_MOTION_ID --contact con_YOUR_CONTACT_ID"]
841
+ examples: kind === "add" ? ["curviate campaign add mot_YOUR_CAMPAIGN_ID --lead con_YOUR_LEAD_ID", "curviate campaign add mot_YOUR_CAMPAIGN_ID --lead con_A,con_B --account acc_YOUR_ACCOUNT_ID"] : ["curviate campaign remove mot_YOUR_CAMPAIGN_ID --lead con_YOUR_LEAD_ID"]
842
842
  },
843
843
  args: {
844
844
  ...WRITE_SINGLE_FLAGS,
845
845
  id: ID,
846
- contact: { type: "string", required: true, description: "A Contact id (con_...); repeatable, or a comma list." },
847
- ...kind === "add" ? { account: { type: "string", description: "Enroll them on this sending Account of the Motion (acc_...). Never defaulted: omit it and Curviate assigns one." } } : {}
846
+ lead: { type: "string", required: true, description: "A Lead id (con_...); repeatable, or a comma list." },
847
+ ...kind === "add" ? { account: { type: "string", description: "Enroll them on this sending Account of the Campaign (acc_...). Never defaulted: omit it and Curviate assigns one." } } : {}
848
848
  },
849
849
  run: online(membership(kind))
850
850
  });
@@ -852,15 +852,15 @@ var OFFLINE = { notes: ["Offline: no API call."] };
852
852
  var lintCmd = defineCommand({
853
853
  meta: {
854
854
  name: "lint",
855
- description: "Check a Sequence offline with the rules the API applies: a Motion file (its sequence) or a bare Sequence document. One line per finding, `<file>:<line>:<col> error|warning <code> <path>: <message>. <hint> -> <docs_url>`; exit 2 on any error, 0 otherwise.",
855
+ description: "Check a Sequence offline with the rules the API applies: a Campaign file (its sequence) or a bare Sequence document. One line per finding, `<file>:<line>:<col> error|warning <code> <path>: <message>. <hint> -> <docs_url>`; exit 2 on any error, 0 otherwise.",
856
856
  risk: "read",
857
857
  rules: OFFLINE,
858
858
  output: ["Findings on stderr. With --json (or piped), stdout carries `{errors, warnings}`, or on errors the SEQUENCE_INVALID refusal the API would send."],
859
- examples: ["curviate motion lint --file motion.json"]
859
+ examples: ["curviate campaign lint --file campaign.json"]
860
860
  },
861
861
  args: {
862
862
  json: GLOBAL_FLAGS.json,
863
- file: { type: "string", stdinArg: true, required: true, description: "A Motion file or a Sequence document: a path, or - to read it from stdin." }
863
+ file: { type: "string", stdinArg: true, required: true, description: "A Campaign file or a Sequence document: a path, or - to read it from stdin." }
864
864
  },
865
865
  async run({ args }) {
866
866
  await runLint(args);
@@ -869,11 +869,11 @@ var lintCmd = defineCommand({
869
869
  var initCmd = defineCommand({
870
870
  meta: {
871
871
  name: "init",
872
- description: `Write a Motion file from a template (${Object.keys(TEMPLATES).join(", ")}). Fill contact_list_ids and account_ids, then create it.`,
872
+ description: `Write a Campaign file from a template (${Object.keys(TEMPLATES).join(", ")}). Fill lead_list_ids and account_ids, then create it.`,
873
873
  risk: "read",
874
874
  rules: OFFLINE,
875
- output: ["The Motion file on stdout, or in the --output file."],
876
- examples: ["curviate motion init --template connect-and-converse --output motion.json"]
875
+ output: ["The Campaign file on stdout, or in the --output file."],
876
+ examples: ["curviate campaign init --template connect-and-converse --output campaign.json"]
877
877
  },
878
878
  args: {
879
879
  template: { type: "string", required: true, description: `One of ${Object.keys(TEMPLATES).join(", ")}.` },
@@ -889,7 +889,7 @@ var voiceClipUploadCmd = defineCommand({
889
889
  description: "Upload one audio file (MP3, WAV, M4A, WebM or Ogg) and print the clip: its `id` (vc_...) is the `clip_id` of a `voice.send` step. 1 to 120 seconds, up to 20 MiB, 100 uploads per Team per 24 hours. The file is converted once and the original is discarded. Nothing reaches LinkedIn. Needs Automate.",
890
890
  risk: "write",
891
891
  rules: {
892
- changes: "Stores one converted clip for your Team. No Motion changes and nothing is sent to anyone.",
892
+ changes: "Stores one converted clip for your Team. No Campaign changes and nothing is sent to anyone.",
893
893
  visible_to: "Your Team.",
894
894
  budget_rows: [],
895
895
  retry: "A retry stores a second clip (it counts toward the 24-hour cap); an unused clip is deleted 30 days after its upload.",
@@ -903,8 +903,8 @@ var voiceClipUploadCmd = defineCommand({
903
903
  TIER_REQUIRED: "Voice clips need the Automate plan.",
904
904
  ...ROLE_ERRORS
905
905
  },
906
- seeAlso: ["curviate motion voice-clip get", "curviate motion lint", "curviate motion create"],
907
- examples: ["curviate motion voice-clip upload intro.mp3", "curviate motion voice-clip upload intro.m4a --preview"]
906
+ seeAlso: ["curviate campaign voice-clip get", "curviate campaign lint", "curviate campaign create"],
907
+ examples: ["curviate campaign voice-clip upload intro.mp3", "curviate campaign voice-clip upload intro.m4a --preview"]
908
908
  },
909
909
  args: {
910
910
  ...WRITE_SINGLE_FLAGS,
@@ -917,7 +917,7 @@ var voiceClipGetCmd = defineCommand({
917
917
  name: "get",
918
918
  description: "One Voice clip: duration, size, file name and upload time. No download link. Another Team's clip is RESOURCE_NOT_FOUND, like an unknown id.",
919
919
  risk: "read",
920
- examples: ["curviate motion voice-clip get vc_YOUR_CLIP_ID"]
920
+ examples: ["curviate campaign voice-clip get vc_YOUR_CLIP_ID"]
921
921
  },
922
922
  args: {
923
923
  ...readOnly(READ_SINGLE_FLAGS),
@@ -926,15 +926,15 @@ var voiceClipGetCmd = defineCommand({
926
926
  run: online(runVoiceClipGet)
927
927
  });
928
928
  var voiceClipCommand = defineCommand({
929
- meta: { name: "voice-clip", description: DESCRIPTIONS.motionVoiceClip },
929
+ meta: { name: "voice-clip", description: DESCRIPTIONS.campaignVoiceClip },
930
930
  subCommands: { upload: voiceClipUploadCmd, get: voiceClipGetCmd },
931
931
  async run() {
932
- const { showHelp } = await import("./examples-KAMXHRLE.js");
933
- await showHelp(voiceClipCommand, ["curviate", "motion", "voice-clip"]);
932
+ const { showHelp } = await import("./examples-77WVMKZQ.js");
933
+ await showHelp(voiceClipCommand, ["curviate", "campaign", "voice-clip"]);
934
934
  }
935
935
  });
936
- var motionCommand = defineCommand({
937
- meta: { name: "motion", description: DESCRIPTIONS.motion },
936
+ var campaignCommand = defineCommand({
937
+ meta: { name: "campaign", description: DESCRIPTIONS.campaign },
938
938
  subCommands: {
939
939
  list: listCmd,
940
940
  get: getCmd,
@@ -953,14 +953,14 @@ var motionCommand = defineCommand({
953
953
  "voice-clip": voiceClipCommand
954
954
  },
955
955
  async run() {
956
- const { showHelp } = await import("./examples-KAMXHRLE.js");
957
- await showHelp(motionCommand, ["curviate", "motion"]);
956
+ const { showHelp } = await import("./examples-77WVMKZQ.js");
957
+ await showHelp(campaignCommand, ["curviate", "campaign"]);
958
958
  }
959
959
  });
960
960
  export {
961
961
  BULK_MAX_IDS,
962
962
  TEMPLATES,
963
- motionCommand,
963
+ campaignCommand,
964
964
  runInit,
965
965
  runLint
966
966
  };