@curviate/cli 0.55.0 → 0.57.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 (68) hide show
  1. package/CHANGELOG.md +69 -0
  2. package/README.md +5 -4
  3. package/dist/{account-6L33JFZS.js → account-IRIYB2SG.js} +47 -22
  4. package/dist/{analytics-HGJGXRAM.js → analytics-IRSCLVOL.js} +5 -5
  5. package/dist/{beta-consent-LIND4PPN.js → beta-consent-NQVGFZL3.js} +4 -4
  6. package/dist/billing-TCTP44ZB.js +248 -0
  7. package/dist/{chunk-KLXDFFHT.js → chunk-3B5M2RUN.js} +1 -1
  8. package/dist/{chunk-LGUZ52BU.js → chunk-3ZQNOKEK.js} +2 -2
  9. package/dist/{chunk-QBY6L77D.js → chunk-5LGKZBAY.js} +5 -3
  10. package/dist/{chunk-Q5Z7FMXI.js → chunk-6OT6TS7N.js} +2 -2
  11. package/dist/{chunk-OYZ27Q3B.js → chunk-A6JGJGDF.js} +19 -17
  12. package/dist/{chunk-AMMAA62Z.js → chunk-AG6G3PRQ.js} +111 -14
  13. package/dist/{chunk-EA5LJ4CS.js → chunk-AMTKGO37.js} +1 -1
  14. package/dist/{chunk-J34JU27C.js → chunk-DENWYJK2.js} +2 -2
  15. package/dist/{chunk-Z3RPQ5K4.js → chunk-F7CLAS5Y.js} +2 -2
  16. package/dist/{chunk-ENBIMEKS.js → chunk-IB6ARI3R.js} +1 -1
  17. package/dist/{chunk-R7USRN52.js → chunk-OE4CY3ZL.js} +1 -1
  18. package/dist/{chunk-JKXGL7PT.js → chunk-RKNW4UX4.js} +42 -0
  19. package/dist/{chunk-BC4N5X3N.js → chunk-RTT75CXE.js} +44 -6
  20. package/dist/{chunk-S234PC5E.js → chunk-RXDG57B2.js} +1 -1
  21. package/dist/{chunk-RDKTHFQ6.js → chunk-SCUTAREU.js} +4 -0
  22. package/dist/{chunk-FHSGANM6.js → chunk-VPFV7YV3.js} +5 -5
  23. package/dist/cli.js +38 -30
  24. package/dist/{comment-IIKLEAEK.js → comment-PNHEKGZX.js} +7 -7
  25. package/dist/{company-CX5TZNB5.js → company-OUFF23SU.js} +20 -9
  26. package/dist/company-record-ULPDDB6L.js +128 -0
  27. package/dist/{config-Y4FC7QKM.js → config-U6VDNL2P.js} +2 -2
  28. package/dist/{connect-GUUBX23F.js → connect-ICNXC37R.js} +11 -11
  29. package/dist/{contact-OCYSFRTS.js → contact-K6RIVQWU.js} +9 -9
  30. package/dist/{contact-groups-HWJSYRFJ.js → contact-groups-CNH2VB6A.js} +11 -11
  31. package/dist/{contact-import-CTWSFT64.js → contact-import-FK22UTN2.js} +11 -11
  32. package/dist/core-MPEBYNSL.js +46 -0
  33. package/dist/{do-not-contact-6UVY3UKT.js → do-not-contact-BQHXNHTV.js} +46 -20
  34. package/dist/{doctor-6CB6DCY3.js → doctor-ZYPZF5BE.js} +21 -4
  35. package/dist/{document-ADK4GZA7.js → document-H65EXU4L.js} +1 -1
  36. package/dist/{domain-BUJMHYIV.js → domain-HLOT6Y4A.js} +8 -8
  37. package/dist/{draft-SII6E6Z6.js → draft-JGQ36JSH.js} +4 -4
  38. package/dist/{enrollment-OXGR5WVI.js → enrollment-CF634DB4.js} +11 -9
  39. package/dist/{examples-77WVMKZQ.js → examples-J4X5NEIE.js} +2 -2
  40. package/dist/{exit-codes-ZSOLAXQO.js → exit-codes-P2FLCKM7.js} +1 -1
  41. package/dist/{export-D32J5GRN.js → export-ZQLDQYUZ.js} +4 -4
  42. package/dist/{feed-HOFHCP6W.js → feed-RQHEDZVL.js} +6 -6
  43. package/dist/{group-AMYOAGNS.js → group-LRMG76FN.js} +6 -6
  44. package/dist/{inbox-NS2LB2WQ.js → inbox-5RGG5RQG.js} +6 -6
  45. package/dist/{inboxes-XWUZJ5PN.js → inboxes-ZFY6ZP33.js} +6 -6
  46. package/dist/{incoming-UIWRL6QS.js → incoming-3MJ4CP6H.js} +8 -8
  47. package/dist/{job-TKGPXU26.js → job-QFIUTHHT.js} +6 -6
  48. package/dist/{login-B2YWX2JP.js → login-THXWX5HZ.js} +4 -4
  49. package/dist/{mailbox-LLSGX2FF.js → mailbox-54DPLNXA.js} +27 -21
  50. package/dist/{message-M4THMNRZ.js → message-DM5OUKQS.js} +6 -6
  51. package/dist/{motion-2OUGYR3O.js → motion-NKOAK7NU.js} +101 -26
  52. package/dist/{network-MFWKXTEV.js → network-VKJUMZ2L.js} +8 -8
  53. package/dist/{notification-5K4TCYQA.js → notification-XW5J6KFA.js} +6 -6
  54. package/dist/{notifications-2GKUJB7C.js → notifications-USYOV54R.js} +17 -12
  55. package/dist/{post-BHH7YKGM.js → post-M2G3BK4A.js} +7 -7
  56. package/dist/{profile-GKMRRKZF.js → profile-3SG64IEG.js} +11 -11
  57. package/dist/{recruiter-J53ZSD4P.js → recruiter-7OUGZ776.js} +8 -8
  58. package/dist/{sales-nav-6I5SYTRX.js → sales-nav-HHQLLM5C.js} +8 -8
  59. package/dist/{search-HS2YAA33.js → search-5LMSLUH4.js} +16 -16
  60. package/dist/{setup-IYVOGVC6.js → setup-6F4HYUSZ.js} +5 -5
  61. package/dist/signal-LVODDBOY.js +331 -0
  62. package/dist/{team-N6ILUHAD.js → team-MSOPELF6.js} +62 -8
  63. package/dist/{tier-QWXKFESB.js → tier-RXHOAQ6L.js} +6 -5
  64. package/dist/{unibox-D4WIHIZX.js → unibox-UAA6WIGZ.js} +65 -12
  65. package/dist/{webhook-PKWGZZO2.js → webhook-J2H7X766.js} +9 -9
  66. package/package.json +2 -2
  67. package/dist/billing-QKPP5NPR.js +0 -124
  68. package/dist/core-37XZS2RG.js +0 -46
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk-Q3ZPRFUX.js";
13
13
  import {
14
14
  requireAccount
15
- } from "./chunk-Z3RPQ5K4.js";
15
+ } from "./chunk-F7CLAS5Y.js";
16
16
  import {
17
17
  buildPreviewOutput
18
18
  } from "./chunk-TCUYH5GO.js";
@@ -24,7 +24,7 @@ import {
24
24
  readablePage,
25
25
  rejectPaginationModifiersWithoutAll,
26
26
  streamAll
27
- } from "./chunk-R7USRN52.js";
27
+ } from "./chunk-OE4CY3ZL.js";
28
28
  import {
29
29
  renderError,
30
30
  renderSuccess,
@@ -34,7 +34,7 @@ import {
34
34
  import {
35
35
  createClient,
36
36
  resolveEffectiveConfig
37
- } from "./chunk-S234PC5E.js";
37
+ } from "./chunk-RXDG57B2.js";
38
38
  import {
39
39
  GLOBAL_FLAGS,
40
40
  READ_SINGLE_FLAGS,
@@ -43,9 +43,9 @@ import {
43
43
  } from "./chunk-QLKGOIWS.js";
44
44
  import {
45
45
  DESCRIPTIONS
46
- } from "./chunk-QBY6L77D.js";
46
+ } from "./chunk-5LGKZBAY.js";
47
47
  import "./chunk-ZYURL5VK.js";
48
- import "./chunk-RDKTHFQ6.js";
48
+ import "./chunk-SCUTAREU.js";
49
49
 
50
50
  // src/commands/inbox.ts
51
51
  import { defineCommand } from "citty";
@@ -107,7 +107,7 @@ function validateInboxFolder(raw, out) {
107
107
  async function handleSdkError(err, outOpts, out) {
108
108
  const { CurviateError } = await import("@curviate/sdk");
109
109
  if (err instanceof CurviateError) {
110
- const { getExitCode } = await import("./exit-codes-ZSOLAXQO.js");
110
+ const { getExitCode } = await import("./exit-codes-P2FLCKM7.js");
111
111
  renderError(err, outOpts, out);
112
112
  process.exit(getExitCode(err));
113
113
  }
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  requireAccount
4
- } from "./chunk-Z3RPQ5K4.js";
4
+ } from "./chunk-F7CLAS5Y.js";
5
5
  import {
6
6
  pageDelayFromFlags,
7
7
  readCursorFlag,
@@ -10,7 +10,7 @@ import {
10
10
  readablePage,
11
11
  rejectPaginationModifiersWithoutAll,
12
12
  streamAll
13
- } from "./chunk-R7USRN52.js";
13
+ } from "./chunk-OE4CY3ZL.js";
14
14
  import {
15
15
  renderError,
16
16
  renderSuccess,
@@ -20,7 +20,7 @@ import {
20
20
  import {
21
21
  createClient,
22
22
  resolveEffectiveConfig
23
- } from "./chunk-S234PC5E.js";
23
+ } from "./chunk-RXDG57B2.js";
24
24
  import {
25
25
  GLOBAL_FLAGS,
26
26
  READ_SINGLE_FLAGS,
@@ -28,9 +28,9 @@ import {
28
28
  } from "./chunk-QLKGOIWS.js";
29
29
  import {
30
30
  DESCRIPTIONS
31
- } from "./chunk-QBY6L77D.js";
31
+ } from "./chunk-5LGKZBAY.js";
32
32
  import "./chunk-ZYURL5VK.js";
33
- import "./chunk-RDKTHFQ6.js";
33
+ import "./chunk-SCUTAREU.js";
34
34
 
35
35
  // src/commands/inboxes.ts
36
36
  import { defineCommand } from "citty";
@@ -57,7 +57,7 @@ function resolveOutputOpts(flags) {
57
57
  async function handleSdkError(err, outOpts, out) {
58
58
  const { CurviateError } = await import("@curviate/sdk");
59
59
  if (err instanceof CurviateError) {
60
- const { getExitCode } = await import("./exit-codes-ZSOLAXQO.js");
60
+ const { getExitCode } = await import("./exit-codes-P2FLCKM7.js");
61
61
  renderError(err, outOpts, out);
62
62
  process.exit(getExitCode(err));
63
63
  }
@@ -4,13 +4,13 @@ import {
4
4
  outputOpts,
5
5
  rootClient,
6
6
  usage
7
- } from "./chunk-LGUZ52BU.js";
8
- import {
9
- buildPreviewOutput
10
- } from "./chunk-TCUYH5GO.js";
7
+ } from "./chunk-3ZQNOKEK.js";
11
8
  import {
12
9
  intFlag
13
10
  } from "./chunk-NNV2OYEF.js";
11
+ import {
12
+ buildPreviewOutput
13
+ } from "./chunk-TCUYH5GO.js";
14
14
  import {
15
15
  pageDelayFromFlags,
16
16
  readCursorFlag,
@@ -18,12 +18,12 @@ import {
18
18
  readablePage,
19
19
  rejectPaginationModifiersWithoutAll,
20
20
  streamAll
21
- } from "./chunk-R7USRN52.js";
21
+ } from "./chunk-OE4CY3ZL.js";
22
22
  import {
23
23
  renderSuccess,
24
24
  writeNdjsonItem
25
25
  } from "./chunk-QM57YDJE.js";
26
- import "./chunk-S234PC5E.js";
26
+ import "./chunk-RXDG57B2.js";
27
27
  import {
28
28
  GLOBAL_FLAGS,
29
29
  READ_SINGLE_FLAGS,
@@ -32,7 +32,7 @@ import {
32
32
  } from "./chunk-QLKGOIWS.js";
33
33
  import {
34
34
  DESCRIPTIONS
35
- } from "./chunk-QBY6L77D.js";
35
+ } from "./chunk-5LGKZBAY.js";
36
36
  import "./chunk-ZYURL5VK.js";
37
37
 
38
38
  // src/commands/incoming.ts
@@ -209,7 +209,7 @@ var incomingCommand = defineCommand({
209
209
  meta: { name: "incoming", description: DESCRIPTIONS.incoming },
210
210
  subCommands: { create: createCmd, list: listCmd, get: getCmd, update: updateCmd, delete: deleteCmd, rotate: rotateCmd, capture: captureCmd, arrivals: arrivalsCmd },
211
211
  async run() {
212
- const { showHelp } = await import("./examples-77WVMKZQ.js");
212
+ const { showHelp } = await import("./examples-J4X5NEIE.js");
213
213
  await showHelp(incomingCommand, ["curviate", "incoming"]);
214
214
  }
215
215
  });
@@ -15,7 +15,7 @@ import {
15
15
  } from "./chunk-JXDEV33Z.js";
16
16
  import {
17
17
  requireAccount
18
- } from "./chunk-Z3RPQ5K4.js";
18
+ } from "./chunk-F7CLAS5Y.js";
19
19
  import {
20
20
  buildPreviewOutput
21
21
  } from "./chunk-TCUYH5GO.js";
@@ -29,7 +29,7 @@ import {
29
29
  readablePage,
30
30
  rejectPaginationModifiersWithoutAll,
31
31
  streamAll
32
- } from "./chunk-R7USRN52.js";
32
+ } from "./chunk-OE4CY3ZL.js";
33
33
  import {
34
34
  renderError,
35
35
  renderSuccess,
@@ -40,7 +40,7 @@ import {
40
40
  createClient,
41
41
  downloadBinary,
42
42
  resolveEffectiveConfig
43
- } from "./chunk-S234PC5E.js";
43
+ } from "./chunk-RXDG57B2.js";
44
44
  import {
45
45
  GLOBAL_FLAGS,
46
46
  READ_SINGLE_FLAGS,
@@ -49,9 +49,9 @@ import {
49
49
  } from "./chunk-QLKGOIWS.js";
50
50
  import {
51
51
  DESCRIPTIONS
52
- } from "./chunk-QBY6L77D.js";
52
+ } from "./chunk-5LGKZBAY.js";
53
53
  import "./chunk-ZYURL5VK.js";
54
- import "./chunk-RDKTHFQ6.js";
54
+ import "./chunk-SCUTAREU.js";
55
55
 
56
56
  // src/commands/job.ts
57
57
  import { defineCommand } from "citty";
@@ -107,7 +107,7 @@ function requireEnum(value, allowed, flag, out) {
107
107
  async function handleSdkError(err, outOpts, out) {
108
108
  const { CurviateError } = await import("@curviate/sdk");
109
109
  if (err instanceof CurviateError) {
110
- const { getExitCode } = await import("./exit-codes-ZSOLAXQO.js");
110
+ const { getExitCode } = await import("./exit-codes-P2FLCKM7.js");
111
111
  renderError(err, outOpts, out);
112
112
  process.exit(getExitCode(err));
113
113
  }
@@ -1,17 +1,17 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  readlineSync
4
- } from "./chunk-ENBIMEKS.js";
4
+ } from "./chunk-IB6ARI3R.js";
5
5
  import {
6
6
  baseUrlProblem,
7
7
  writeProfile
8
- } from "./chunk-S234PC5E.js";
8
+ } from "./chunk-RXDG57B2.js";
9
9
  import {
10
10
  GLOBAL_FLAGS
11
11
  } from "./chunk-QLKGOIWS.js";
12
12
  import {
13
13
  DESCRIPTIONS
14
- } from "./chunk-QBY6L77D.js";
14
+ } from "./chunk-5LGKZBAY.js";
15
15
  import {
16
16
  defaultReadStdin,
17
17
  resolveTextOrStdin
@@ -103,7 +103,7 @@ var loginCommand = defineCommand({
103
103
  }
104
104
  if (apiKey === void 0) {
105
105
  if (process.stdin.isTTY) {
106
- apiKey = await promptMasked("Enter your API key: ");
106
+ apiKey = (await promptMasked("Enter your API key: ")).trim();
107
107
  } else {
108
108
  process.stderr.write(
109
109
  "error: no API key, pass --api-key or run interactively on a TTY.\n"
@@ -1,19 +1,19 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  resolveSecret
4
- } from "./chunk-J34JU27C.js";
4
+ } from "./chunk-DENWYJK2.js";
5
5
  import {
6
6
  fail,
7
7
  outputOpts,
8
8
  rootClient,
9
9
  usage
10
- } from "./chunk-LGUZ52BU.js";
11
- import {
12
- buildPreviewOutput
13
- } from "./chunk-TCUYH5GO.js";
10
+ } from "./chunk-3ZQNOKEK.js";
14
11
  import {
15
12
  intFlag
16
13
  } from "./chunk-NNV2OYEF.js";
14
+ import {
15
+ buildPreviewOutput
16
+ } from "./chunk-TCUYH5GO.js";
17
17
  import {
18
18
  pageDelayFromFlags,
19
19
  readCursorFlag,
@@ -22,13 +22,13 @@ import {
22
22
  readablePage,
23
23
  rejectPaginationModifiersWithoutAll,
24
24
  streamAll
25
- } from "./chunk-R7USRN52.js";
25
+ } from "./chunk-OE4CY3ZL.js";
26
26
  import {
27
27
  renderSuccess,
28
28
  writeNdjsonItem
29
29
  } from "./chunk-QM57YDJE.js";
30
- import "./chunk-ENBIMEKS.js";
31
- import "./chunk-S234PC5E.js";
30
+ import "./chunk-IB6ARI3R.js";
31
+ import "./chunk-RXDG57B2.js";
32
32
  import {
33
33
  GLOBAL_FLAGS,
34
34
  READ_SINGLE_FLAGS,
@@ -37,23 +37,22 @@ import {
37
37
  } from "./chunk-QLKGOIWS.js";
38
38
  import {
39
39
  DESCRIPTIONS
40
- } from "./chunk-QBY6L77D.js";
40
+ } from "./chunk-5LGKZBAY.js";
41
41
  import {
42
42
  readFileFlag
43
- } from "./chunk-JKXGL7PT.js";
43
+ } from "./chunk-RKNW4UX4.js";
44
44
  import "./chunk-FDJMAF7D.js";
45
45
  import "./chunk-ZYURL5VK.js";
46
46
  import {
47
47
  getExitCode
48
- } from "./chunk-RDKTHFQ6.js";
48
+ } from "./chunk-SCUTAREU.js";
49
49
 
50
50
  // src/commands/mailbox.ts
51
51
  import { defineCommand } from "citty";
52
52
  var STATES = ["connected", "ramping", "paused", "paused_by_bounces", "paused_by_provider", "reconnect_needed"];
53
53
  var SIGNATURE_MAX_BYTES = 64 * 1024;
54
- var online = (fn) => async ({ args, rawArgs }) => {
54
+ var online = (fn) => async ({ args }) => {
55
55
  const f = args;
56
- if ((rawArgs ?? []).some((t) => t.startsWith("--password-stdin="))) usage("--password-stdin takes no value: the password is read from stdin.");
57
56
  await fn(await rootClient(f), f);
58
57
  };
59
58
  var preview = (method, args, body = {}) => void process.stdout.write(JSON.stringify(buildPreviewOutput({ method, args, body })) + "\n");
@@ -101,7 +100,10 @@ async function runUpdate(c, f) {
101
100
  }
102
101
  if (f["daily-cap"] !== void 0) body["daily_cap"] = intFlag("daily-cap", f["daily-cap"]);
103
102
  if (f["signature-file"] !== void 0) body["signature"] = (await readFileFlag("signature-file", f["signature-file"], { maxBytes: SIGNATURE_MAX_BYTES, others: f })).trimEnd();
104
- if (Object.keys(body).length === 0) usage("pass at least one of --sends-for, --daily-cap, --signature-file.");
103
+ if (f["display-name"] !== void 0 && f["clear-display-name"]) usage("--display-name and --clear-display-name cannot be combined.");
104
+ if (f["display-name"] !== void 0) body["display_name"] = f["display-name"];
105
+ if (f["clear-display-name"]) body["display_name"] = null;
106
+ if (Object.keys(body).length === 0) usage("pass at least one of --sends-for, --daily-cap, --signature-file, --display-name, --clear-display-name.");
105
107
  if (f.preview) return preview("mailboxes.update", { id }, body);
106
108
  try {
107
109
  renderSuccess(readableObject(await c.mailboxes.update(id, body)), outputOpts(f), process);
@@ -169,6 +171,7 @@ async function runConnect(c, f) {
169
171
  if (!CONNECTIONS.includes(connection)) usage(`--connection takes one of ${CONNECTIONS.join(", ")}.`);
170
172
  if (f["password-stdin"] && !PASSWORD_CONNECTIONS.includes(connection)) usage(`--password-stdin does not apply to ${connection}: the person signs in on the provider's page. It takes ${PASSWORD_CONNECTIONS.join(" or ")}.`);
171
173
  const mailbox = { connection, address };
174
+ if (f["display-name"] !== void 0) mailbox["display_name"] = f["display-name"];
172
175
  if (connection === "imap_smtp") {
173
176
  const missing = SERVER_FLAGS.filter((k) => f[k] === void 0 || f[k].trim() === "");
174
177
  if (missing.length > 0) usage(`--connection imap_smtp needs ${missing.map((k) => `--${k}`).join(", ")} (the settings from \`curviate mailbox discover\`, as the person confirmed them).`);
@@ -226,10 +229,10 @@ var getCmd = defineCommand({
226
229
  var updateCmd = defineCommand({
227
230
  meta: {
228
231
  name: "update",
229
- description: "Change one Mailbox: who it sends for (--sends-for an Account id, or shared), its daily cap (--daily-cap, 1 to 50, one cap across every Campaign and Account, a hard maximum for every caller) and its signature (--signature-file, plain text, up to 2,000 characters, available as {{mailbox.signature}}; nothing adds it to an email by itself). Flags you leave out stay as they are. A Mailbox linked to no Account sends nothing. Owners and Managers change any Mailbox; a Member only the ones they connected.",
232
+ description: "Change one Mailbox: who it sends for (--sends-for an Account id, or shared), its daily cap (--daily-cap, 1 to 50, one cap across every Campaign and Account, a hard maximum for every caller) its signature (--signature-file, plain text, up to 2,000 characters, available as {{mailbox.signature}}; nothing adds it to an email by itself) and its From name (--display-name, one line, up to 100 characters; --clear-display-name sends with the name of the Account it sends for). Flags you leave out stay as they are. A Mailbox linked to no Account sends nothing. Owners and Managers change any Mailbox; a Member only the ones they connected.",
230
233
  risk: "write",
231
234
  rules: {
232
- changes: "The Mailbox's link, daily cap or signature, from the next email on. Open threads stay on it.",
235
+ changes: "The Mailbox's link, daily cap, signature or From name, from the next email on. Open threads stay on it.",
233
236
  visible_to: "Your Team; the signature reaches recipients where a step uses {{mailbox.signature}}.",
234
237
  budget_rows: [],
235
238
  retry: "Safe: the same flags leave the same Mailbox.",
@@ -241,16 +244,18 @@ var updateCmd = defineCommand({
241
244
  examples: [
242
245
  "curviate mailbox update mbx_YOUR_MAILBOX_ID --sends-for acc_YOUR_ACCOUNT_ID",
243
246
  "curviate mailbox update mbx_YOUR_MAILBOX_ID --sends-for shared --daily-cap 40",
244
- "curviate mailbox update mbx_YOUR_MAILBOX_ID --signature-file signature.txt"
247
+ 'curviate mailbox update mbx_YOUR_MAILBOX_ID --display-name "Ana from Acme"'
245
248
  ],
246
- requires: ["at least one of --sends-for, --daily-cap, --signature-file."]
249
+ requires: ["at least one of --sends-for, --daily-cap, --signature-file, --display-name, --clear-display-name."]
247
250
  },
248
251
  args: {
249
252
  ...WRITE_SINGLE_FLAGS,
250
253
  id: ID,
251
254
  "sends-for": { type: "string", description: "An Account id (acc_..., it then sends only for that Account) or shared (any Account of your Team may send from it)." },
252
255
  "daily-cap": { type: "string", description: "Emails a day across every Campaign and Account, 1 to 50. The API refuses a higher value (exit 2, the message names 50)." },
253
- "signature-file": { type: "string", stdinArg: true, description: "A plain-text file with the sign-off: a path, or - to read it from stdin. Up to 2,000 characters." }
256
+ "signature-file": { type: "string", stdinArg: true, description: "A plain-text file with the sign-off: a path, or - to read it from stdin. Up to 2,000 characters." },
257
+ "display-name": { type: "string", description: "The name recipients see in From, one line, up to 100 characters." },
258
+ "clear-display-name": { type: "boolean", description: "Clear the From name: the Mailbox sends with the name of the Account it sends for." }
254
259
  },
255
260
  run: online(runUpdate)
256
261
  });
@@ -323,7 +328,7 @@ var PASSWORD_STDIN = {
323
328
  var discoverCmd = defineCommand({
324
329
  meta: {
325
330
  name: "discover",
326
- description: "Find the IMAP and SMTP settings for an email address, to show the person and confirm before connecting. An address on Google or Microsoft answers with its connection. confirm_required marks settings that arrived unencrypted. Takes no password and the answer holds none.",
331
+ description: "Find the IMAP and SMTP settings for an email address, to show the person and confirm before connecting. An address on Google or Microsoft answers with its connection. confirm_required marks settings that arrived unencrypted or are a guess; a domain with nothing usable answers source none with no settings. Takes no password and the answer holds none.",
327
332
  risk: "read",
328
333
  seeAlso: ["curviate mailbox connect"],
329
334
  examples: ["curviate mailbox discover anna@acme.example"]
@@ -363,6 +368,7 @@ var connectCmd = defineCommand({
363
368
  address: ADDRESS,
364
369
  connection: { type: "string", description: `How the Mailbox connects: ${CONNECTIONS.join(" | ")}.` },
365
370
  "password-stdin": PASSWORD_STDIN,
371
+ "display-name": { type: "string", description: 'The name recipients see in From ("Name" <address>), one line, up to 100 characters. Default: the name of the Account the Mailbox sends for, else the bare address.' },
366
372
  "imap-host": { type: "string", description: "imap_smtp only: the IMAP host." },
367
373
  "imap-port": { type: "string", description: "imap_smtp only: the IMAP port (usually 993 with tls, 143 with starttls)." },
368
374
  "imap-security": { type: "string", description: "imap_smtp only: tls (TLS from the first byte) or starttls. Never cleartext." },
@@ -395,7 +401,7 @@ var mailboxCommand = defineCommand({
395
401
  meta: { name: "mailbox", description: DESCRIPTIONS["mailbox"] },
396
402
  subCommands: { list: listCmd, get: getCmd, update: updateCmd, pause: pauseCmd, resume: resumeCmd, remove: removeCmd, discover: discoverCmd, connect: connectCmd, reconnect: reconnectCmd },
397
403
  async run() {
398
- const { showHelp } = await import("./examples-77WVMKZQ.js");
404
+ const { showHelp } = await import("./examples-J4X5NEIE.js");
399
405
  await showHelp(mailboxCommand, ["curviate", "mailbox"]);
400
406
  }
401
407
  });
@@ -13,21 +13,21 @@ import {
13
13
  runMessageSend,
14
14
  sentAsNotice,
15
15
  willSendAsNotice
16
- } from "./chunk-FHSGANM6.js";
16
+ } from "./chunk-VPFV7YV3.js";
17
17
  import "./chunk-UWO2D4HW.js";
18
18
  import "./chunk-UEAX6KUB.js";
19
19
  import "./chunk-Q3ZPRFUX.js";
20
20
  import "./chunk-VHNF6OZD.js";
21
- import "./chunk-Z3RPQ5K4.js";
21
+ import "./chunk-F7CLAS5Y.js";
22
22
  import "./chunk-TCUYH5GO.js";
23
- import "./chunk-R7USRN52.js";
23
+ import "./chunk-OE4CY3ZL.js";
24
24
  import "./chunk-QM57YDJE.js";
25
- import "./chunk-S234PC5E.js";
25
+ import "./chunk-RXDG57B2.js";
26
26
  import "./chunk-QLKGOIWS.js";
27
- import "./chunk-QBY6L77D.js";
27
+ import "./chunk-5LGKZBAY.js";
28
28
  import "./chunk-FDJMAF7D.js";
29
29
  import "./chunk-ZYURL5VK.js";
30
- import "./chunk-RDKTHFQ6.js";
30
+ import "./chunk-SCUTAREU.js";
31
31
  export {
32
32
  guardBareMessageForm,
33
33
  messageCommand,
@@ -5,21 +5,22 @@ import {
5
5
  } from "./chunk-VHNF6OZD.js";
6
6
  import {
7
7
  sendInChunks
8
- } from "./chunk-Q5Z7FMXI.js";
8
+ } from "./chunk-6OT6TS7N.js";
9
9
  import {
10
10
  fail,
11
11
  listFlag,
12
12
  outputOpts,
13
13
  rootClient,
14
14
  usage
15
- } from "./chunk-LGUZ52BU.js";
16
- import {
17
- buildPreviewOutput
18
- } from "./chunk-TCUYH5GO.js";
15
+ } from "./chunk-3ZQNOKEK.js";
19
16
  import {
20
17
  intFlag
21
18
  } from "./chunk-NNV2OYEF.js";
22
19
  import {
20
+ buildPreviewOutput
21
+ } from "./chunk-TCUYH5GO.js";
22
+ import {
23
+ DEFAULT_PAGE_DELAY_MS,
23
24
  pageDelayFromFlags,
24
25
  readCursorFlag,
25
26
  readMaxPagesFlag,
@@ -27,12 +28,12 @@ import {
27
28
  readablePage,
28
29
  rejectPaginationModifiersWithoutAll,
29
30
  streamAll
30
- } from "./chunk-R7USRN52.js";
31
+ } from "./chunk-OE4CY3ZL.js";
31
32
  import {
32
33
  renderSuccess,
33
34
  writeNdjsonItem
34
35
  } from "./chunk-QM57YDJE.js";
35
- import "./chunk-S234PC5E.js";
36
+ import "./chunk-RXDG57B2.js";
36
37
  import {
37
38
  GLOBAL_FLAGS,
38
39
  READ_SINGLE_FLAGS,
@@ -41,14 +42,14 @@ import {
41
42
  } from "./chunk-QLKGOIWS.js";
42
43
  import {
43
44
  DESCRIPTIONS
44
- } from "./chunk-QBY6L77D.js";
45
+ } from "./chunk-5LGKZBAY.js";
45
46
  import {
46
47
  documentSchema,
47
48
  parseDocument,
48
49
  readFileFlag,
49
50
  reportIssues,
50
51
  validate
51
- } from "./chunk-JKXGL7PT.js";
52
+ } from "./chunk-RKNW4UX4.js";
52
53
  import "./chunk-FDJMAF7D.js";
53
54
  import {
54
55
  isStdinToken
@@ -525,20 +526,55 @@ async function runUpdate(c, f) {
525
526
  }
526
527
  }
527
528
  var lifecycle = (method) => async (c, f) => {
528
- if (f.preview) return preview(`campaigns.${method}`, { id: f.id });
529
+ const body = f["skip-missing-email"] ? { skip_missing_email: true } : void 0;
530
+ if (f.preview) return preview(`campaigns.${method}`, { id: f.id }, body);
529
531
  try {
530
- renderSuccess(await c.campaigns[method](f.id ?? ""), outputOpts(f), process);
532
+ const id = f.id ?? "";
533
+ renderSuccess(await (method === "start" || method === "resume" ? c.campaigns[method](id, body) : c.campaigns[method](id)), outputOpts(f), process);
531
534
  } catch (err) {
532
535
  await fail(err, f);
533
536
  }
534
537
  };
538
+ async function previewAll(c, f, params) {
539
+ const maxPages = readMaxPagesFlag(f, process);
540
+ const delay = pageDelayFromFlags(f) ?? DEFAULT_PAGE_DELAY_MS;
541
+ let merged;
542
+ for (let pages = 1; ; pages++) {
543
+ const page = await c.campaigns.preview(f.id ?? "", params);
544
+ merged = merged ? { ...merged, samples: [...merged["samples"], ...page["samples"] ?? []], next_cursor: page["next_cursor"] } : page;
545
+ const next = page["next_cursor"];
546
+ if (typeof next !== "string" || !next) return merged;
547
+ if (pages >= maxPages) {
548
+ process.stderr.write(`warning: stopped after ${maxPages} pages (--max-pages); next_cursor resumes it.
549
+ `);
550
+ return merged;
551
+ }
552
+ params = { ...params, cursor: next };
553
+ if (delay > 0) await new Promise((r) => setTimeout(r, delay));
554
+ }
555
+ }
535
556
  async function runPreview(c, f) {
536
557
  const params = {};
537
558
  if (f.sample !== void 0) params["sample"] = intFlag("sample", f.sample, 1, 20);
559
+ if (f.limit !== void 0) params["limit"] = intFlag("limit", f.limit, 1, 20);
538
560
  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.");
561
+ if (params["sample"] !== void 0 && params["limit"] !== void 0) usage("--sample is an alias of --limit: pass one.");
562
+ if ((params["sample"] ?? params["limit"]) !== void 0 && params["lead_ids"] !== void 0) usage("--limit and --lead cannot be combined: name the Leads, or let Curviate page.");
563
+ if (f.all && params["lead_ids"] !== void 0) usage("--all pages over every Lead; with --lead there is one page.");
564
+ rejectPaginationModifiersWithoutAll(f, process);
565
+ const cursor = readCursorFlag(f, process);
566
+ if (cursor) params["cursor"] = cursor;
567
+ try {
568
+ const result = f.all ? await previewAll(c, f, params) : await c.campaigns.preview(f.id ?? "", params);
569
+ renderSuccess(readableObject(result), outputOpts(f), process);
570
+ } catch (err) {
571
+ await fail(err, f);
572
+ }
573
+ }
574
+ async function runCheck(c, f) {
575
+ if (f.preview) return preview("campaigns.check", { id: f.id });
540
576
  try {
541
- renderSuccess(readableObject(await c.campaigns.preview(f.id ?? "", params)), outputOpts(f), process);
577
+ renderSuccess(await c.campaigns.check(f.id ?? ""), outputOpts(f), process);
542
578
  } catch (err) {
543
579
  await fail(err, f);
544
580
  }
@@ -727,13 +763,23 @@ EOF`
727
763
  },
728
764
  run: online(runUpdate)
729
765
  });
766
+ var SKIP_MISSING_EMAIL = {
767
+ "skip-missing-email": {
768
+ type: "boolean",
769
+ description: "With an email step: start even though some Leads have no email address (`curviate campaign check` counts them). They are never enrolled either way."
770
+ }
771
+ };
730
772
  var lifecycleCmd = (name, meta) => defineCommand({
731
- meta: { name, ...meta, examples: [`curviate campaign ${name} mot_YOUR_CAMPAIGN_ID`] },
732
- args: { ...WRITE_SINGLE_FLAGS, id: ID },
773
+ meta: {
774
+ name,
775
+ ...meta,
776
+ examples: [`curviate campaign ${name} mot_YOUR_CAMPAIGN_ID`, ...name === "start" ? ["curviate campaign start mot_YOUR_CAMPAIGN_ID --skip-missing-email"] : []]
777
+ },
778
+ args: { ...WRITE_SINGLE_FLAGS, id: ID, ...name === "start" || name === "resume" ? SKIP_MISSING_EMAIL : {} },
733
779
  run: online(lifecycle(name))
734
780
  });
735
781
  var startCmd = lifecycleCmd("start", {
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.",
782
+ 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. With an email step it needs `curviate campaign check` at the current Sequence revision, and is refused while Leads have no email address unless --skip-missing-email. Needs Automate.",
737
783
  risk: "high",
738
784
  rules: {
739
785
  changes: "The Campaign starts enrolling its Leads and running its Steps from its sending Accounts, paced on its schedule.",
@@ -743,8 +789,13 @@ var startCmd = lifecycleCmd("start", {
743
789
  undo: "`curviate campaign pause <campaign_id>` stops new Steps; what was sent stays sent.",
744
790
  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
791
  },
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"]
792
+ errors: {
793
+ CAMPAIGN_NOT_STARTABLE: "a gap stops it (Lead list, sending Account, Sequence, with an email step the Lead check and Leads without an address); each is listed.",
794
+ CAMPAIGN_STATUS_CONFLICT: "only a draft starts.",
795
+ ...ROLE_ERRORS,
796
+ TIER_REQUIRED: "Campaigns need the Automate plan."
797
+ },
798
+ seeAlso: ["curviate campaign check", "curviate campaign preview", "curviate campaign pause"]
748
799
  });
749
800
  var pauseCmd = lifecycleCmd("pause", {
750
801
  description: "Pause an active or scheduled Campaign: no Step runs until it is resumed. Waits keep their time.",
@@ -760,7 +811,7 @@ var pauseCmd = lifecycleCmd("pause", {
760
811
  seeAlso: SEE_LIFECYCLE
761
812
  });
762
813
  var resumeCmd = lifecycleCmd("resume", {
763
- description: "Resume a paused Campaign. Runs the start checks again. Needs Automate.",
814
+ description: "Resume a paused Campaign. Runs the start checks again, the Lead check and --skip-missing-email included. Needs Automate.",
764
815
  risk: "high",
765
816
  rules: {
766
817
  changes: "The Campaign's Steps run again from its sending Accounts.",
@@ -804,18 +855,41 @@ var deleteCmd = lifecycleCmd("delete", {
804
855
  var previewCmd = defineCommand({
805
856
  meta: {
806
857
  name: "preview",
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.",
858
+ description: "What the Campaign would do, in any status: every path through its Sequence, rendered messages for its Leads a page at a time (--limit, 1 to 20, default 5; --cursor the previous page's next_cursor; --all every page, merged) or for named Leads, and the budget projection on the first page: 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
859
  risk: "read",
809
- examples: ["curviate campaign preview mot_YOUR_CAMPAIGN_ID", "curviate campaign preview mot_YOUR_CAMPAIGN_ID --sample 3"]
860
+ examples: [
861
+ "curviate campaign preview mot_YOUR_CAMPAIGN_ID",
862
+ "curviate campaign preview mot_YOUR_CAMPAIGN_ID --limit 3",
863
+ "curviate campaign preview mot_YOUR_CAMPAIGN_ID --all"
864
+ ]
810
865
  },
811
866
  args: {
812
- ...readOnly(READ_SINGLE_FLAGS),
867
+ ...readOnly(GLOBAL_FLAGS),
813
868
  id: ID,
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." }
869
+ sample: { type: "string", description: "Alias of --limit." },
870
+ lead: { type: "string", description: "A Lead id (con_...) to render; repeatable, or a comma list. Not with --limit or --all." }
816
871
  },
817
872
  run: online(runPreview)
818
873
  });
874
+ var checkCmd = defineCommand({
875
+ meta: {
876
+ name: "check",
877
+ description: "Run the Lead check: one count over every Lead the Campaign would enroll (no usable email address, a bounced one, on the Do-not-contact list for email only) and the Lead variables without a fallback they lack. Stored as lead_check on the Campaign; starting a Campaign with an email step needs one at the current Sequence revision. Any status; sends nothing.",
878
+ risk: "write",
879
+ rules: {
880
+ changes: "Stores the check as the Campaign's lead_check, replacing the previous one. Nothing is sent.",
881
+ visible_to: "Your Team.",
882
+ budget_rows: [],
883
+ retry: "Safe: a retry runs the check again.",
884
+ undo: "Not needed: it changes no Lead and no Step."
885
+ },
886
+ output: ["The check: leads, without_email, email_bounced, no_email, fields[] (variable, steps, on_missing, missing), checked_at, sequence_revision."],
887
+ seeAlso: ["curviate campaign start", "curviate campaign preview"],
888
+ examples: ["curviate campaign check mot_YOUR_CAMPAIGN_ID"]
889
+ },
890
+ args: { ...WRITE_SINGLE_FLAGS, id: ID },
891
+ run: online(runCheck)
892
+ });
819
893
  var membershipCmd = (kind) => defineCommand({
820
894
  meta: {
821
895
  name: kind,
@@ -929,7 +1003,7 @@ var voiceClipCommand = defineCommand({
929
1003
  meta: { name: "voice-clip", description: DESCRIPTIONS.campaignVoiceClip },
930
1004
  subCommands: { upload: voiceClipUploadCmd, get: voiceClipGetCmd },
931
1005
  async run() {
932
- const { showHelp } = await import("./examples-77WVMKZQ.js");
1006
+ const { showHelp } = await import("./examples-J4X5NEIE.js");
933
1007
  await showHelp(voiceClipCommand, ["curviate", "campaign", "voice-clip"]);
934
1008
  }
935
1009
  });
@@ -946,6 +1020,7 @@ var campaignCommand = defineCommand({
946
1020
  archive: archiveCmd,
947
1021
  delete: deleteCmd,
948
1022
  preview: previewCmd,
1023
+ check: checkCmd,
949
1024
  add: membershipCmd("add"),
950
1025
  remove: membershipCmd("remove"),
951
1026
  lint: lintCmd,
@@ -953,7 +1028,7 @@ var campaignCommand = defineCommand({
953
1028
  "voice-clip": voiceClipCommand
954
1029
  },
955
1030
  async run() {
956
- const { showHelp } = await import("./examples-77WVMKZQ.js");
1031
+ const { showHelp } = await import("./examples-J4X5NEIE.js");
957
1032
  await showHelp(campaignCommand, ["curviate", "campaign"]);
958
1033
  }
959
1034
  });