@curviate/cli 0.54.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 +24 -0
  2. package/README.md +34 -17
  3. package/dist/{account-DW5N5MJ6.js → account-6L33JFZS.js} +98 -116
  4. package/dist/{analytics-T2K3OWVQ.js → analytics-HGJGXRAM.js} +5 -5
  5. package/dist/{beta-consent-O736ONE7.js → beta-consent-LIND4PPN.js} +4 -4
  6. package/dist/{billing-NTBL32EX.js → billing-QKPP5NPR.js} +5 -5
  7. package/dist/{chunk-5B4T6BMN.js → chunk-AMMAA62Z.js} +44 -44
  8. package/dist/{chunk-FBLCSVIU.js → chunk-BC4N5X3N.js} +47 -47
  9. package/dist/{chunk-N4IYTFIY.js → chunk-EA5LJ4CS.js} +1 -1
  10. package/dist/{chunk-A3UNS44U.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-V3HHYTBY.js → chunk-KLXDFFHT.js} +1 -1
  15. package/dist/{chunk-HOMRAZ6S.js → chunk-LGUZ52BU.js} +2 -2
  16. package/dist/{chunk-Q57PZJLX.js → chunk-OYZ27Q3B.js} +88 -88
  17. package/dist/{chunk-UFHT2KZG.js → chunk-Q5Z7FMXI.js} +2 -2
  18. package/dist/{chunk-R4HS2MWM.js → chunk-QBY6L77D.js} +14 -12
  19. package/dist/{chunk-KXJJFHSD.js → chunk-R7USRN52.js} +1 -1
  20. package/dist/{chunk-QW5K5DTC.js → chunk-RDKTHFQ6.js} +25 -6
  21. package/dist/{chunk-N76WNJ5T.js → chunk-S234PC5E.js} +1 -1
  22. package/dist/{chunk-ACKKHLUH.js → chunk-Z3RPQ5K4.js} +2 -2
  23. package/dist/cli.js +27 -25
  24. package/dist/{comment-ATVJOTWV.js → comment-IIKLEAEK.js} +8 -8
  25. package/dist/{company-BRKFROPE.js → company-CX5TZNB5.js} +11 -11
  26. package/dist/{config-E223SS5K.js → config-Y4FC7QKM.js} +2 -2
  27. package/dist/{connect-XVDQ5FTT.js → connect-GUUBX23F.js} +15 -15
  28. package/dist/{contact-4HOUOVD7.js → contact-OCYSFRTS.js} +8 -8
  29. package/dist/{contact-groups-ENA3VGGL.js → contact-groups-HWJSYRFJ.js} +85 -85
  30. package/dist/{contact-import-4EKVDFPV.js → contact-import-CTWSFT64.js} +10 -10
  31. package/dist/core-37XZS2RG.js +46 -0
  32. package/dist/{do-not-contact-S2WGHSQL.js → do-not-contact-6UVY3UKT.js} +29 -29
  33. package/dist/{doctor-OFIUGRUG.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-DD3DTXBM.js → draft-SII6E6Z6.js} +4 -4
  37. package/dist/{enrollment-ESCHKQ5X.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-GUAGB7TF.js → export-D32J5GRN.js} +5 -5
  41. package/dist/{feed-ZC4FY4BA.js → feed-HOFHCP6W.js} +6 -6
  42. package/dist/{group-42ZE7K3K.js → group-AMYOAGNS.js} +6 -6
  43. package/dist/{inbox-2YS7CTXH.js → inbox-NS2LB2WQ.js} +9 -9
  44. package/dist/{inboxes-5RB3BGCQ.js → inboxes-XWUZJ5PN.js} +6 -6
  45. package/dist/{incoming-ATZN6JJA.js → incoming-UIWRL6QS.js} +13 -13
  46. package/dist/{job-WD3Z3P3Q.js → job-TKGPXU26.js} +10 -10
  47. package/dist/{login-JQ57YHEJ.js → login-B2YWX2JP.js} +2 -2
  48. package/dist/mailbox-LLSGX2FF.js +406 -0
  49. package/dist/{message-WGS2IIDC.js → message-M4THMNRZ.js} +7 -7
  50. package/dist/{motion-BRVBJJJP.js → motion-2OUGYR3O.js} +147 -147
  51. package/dist/{network-CODIWCJQ.js → network-MFWKXTEV.js} +5 -5
  52. package/dist/{notification-RLVF4NLJ.js → notification-5K4TCYQA.js} +6 -6
  53. package/dist/{notifications-HGEHM5KW.js → notifications-2GKUJB7C.js} +6 -6
  54. package/dist/{post-3GH2IPO6.js → post-BHH7YKGM.js} +8 -8
  55. package/dist/{profile-6RFJQMIB.js → profile-GKMRRKZF.js} +15 -15
  56. package/dist/{recruiter-GK3UNS62.js → recruiter-J53ZSD4P.js} +17 -17
  57. package/dist/{sales-nav-SLS3ABF4.js → sales-nav-6I5SYTRX.js} +15 -15
  58. package/dist/{search-45WRT5T3.js → search-HS2YAA33.js} +17 -17
  59. package/dist/{setup-5QZOM2Q2.js → setup-IYVOGVC6.js} +4 -4
  60. package/dist/{team-WM3RKOQ2.js → team-N6ILUHAD.js} +6 -6
  61. package/dist/{tier-5AMLO5KE.js → tier-QWXKFESB.js} +4 -4
  62. package/dist/{unibox-TTCF7YVO.js → unibox-D4WIHIZX.js} +34 -34
  63. package/dist/{webhook-UCCCSKDO.js → webhook-PKWGZZO2.js} +18 -18
  64. package/package.json +2 -2
  65. package/dist/core-6VDDV2NM.js +0 -46
@@ -7,7 +7,7 @@ import {
7
7
  outputOpts,
8
8
  rootClient,
9
9
  usage
10
- } from "./chunk-HOMRAZ6S.js";
10
+ } from "./chunk-LGUZ52BU.js";
11
11
  import {
12
12
  intFlag
13
13
  } from "./chunk-NNV2OYEF.js";
@@ -18,21 +18,21 @@ import {
18
18
  readablePage,
19
19
  rejectPaginationModifiersWithoutAll,
20
20
  streamAll
21
- } from "./chunk-KXJJFHSD.js";
21
+ } from "./chunk-R7USRN52.js";
22
22
  import {
23
23
  renderSuccess,
24
24
  writeNdjsonItem
25
25
  } from "./chunk-QM57YDJE.js";
26
26
  import {
27
27
  downloadBinary
28
- } from "./chunk-N76WNJ5T.js";
28
+ } from "./chunk-S234PC5E.js";
29
29
  import {
30
30
  GLOBAL_FLAGS,
31
31
  readOnly
32
32
  } from "./chunk-QLKGOIWS.js";
33
33
  import {
34
34
  DESCRIPTIONS
35
- } from "./chunk-R4HS2MWM.js";
35
+ } from "./chunk-QBY6L77D.js";
36
36
  import "./chunk-ZYURL5VK.js";
37
37
 
38
38
  // src/commands/billing.ts
@@ -115,7 +115,7 @@ var billingCommand = defineCommand({
115
115
  meta: { name: "billing", description: DESCRIPTIONS.billing },
116
116
  subCommands: { invoices: invoicesCmd },
117
117
  async run() {
118
- const { showHelp } = await import("./examples-KAMXHRLE.js");
118
+ const { showHelp } = await import("./examples-77WVMKZQ.js");
119
119
  await showHelp(billingCommand, ["curviate", "billing"]);
120
120
  }
121
121
  });
@@ -2,16 +2,16 @@
2
2
  import {
3
3
  online,
4
4
  preview
5
- } from "./chunk-Q57PZJLX.js";
5
+ } from "./chunk-OYZ27Q3B.js";
6
6
  import {
7
7
  sendChunked
8
- } from "./chunk-UFHT2KZG.js";
8
+ } from "./chunk-Q5Z7FMXI.js";
9
9
  import {
10
10
  fail,
11
11
  listFlag,
12
12
  outputOpts,
13
13
  usage
14
- } from "./chunk-HOMRAZ6S.js";
14
+ } from "./chunk-LGUZ52BU.js";
15
15
  import {
16
16
  intFlag
17
17
  } from "./chunk-NNV2OYEF.js";
@@ -23,14 +23,14 @@ import {
23
23
  readablePage,
24
24
  rejectPaginationModifiersWithoutAll,
25
25
  streamAll
26
- } from "./chunk-KXJJFHSD.js";
26
+ } from "./chunk-R7USRN52.js";
27
27
  import {
28
28
  renderSuccess,
29
29
  writeNdjsonItem
30
30
  } from "./chunk-QM57YDJE.js";
31
31
  import {
32
32
  withWireNotes
33
- } from "./chunk-N76WNJ5T.js";
33
+ } from "./chunk-S234PC5E.js";
34
34
  import {
35
35
  GLOBAL_FLAGS,
36
36
  WRITE_SINGLE_FLAGS,
@@ -38,7 +38,7 @@ import {
38
38
  } from "./chunk-QLKGOIWS.js";
39
39
  import {
40
40
  readFileFlag
41
- } from "./chunk-62YAYAUI.js";
41
+ } from "./chunk-JKXGL7PT.js";
42
42
  import {
43
43
  isStdinToken
44
44
  } from "./chunk-ZYURL5VK.js";
@@ -109,7 +109,7 @@ function split(text, format) {
109
109
  } catch (err) {
110
110
  usage(`--file: not valid JSON, at ${whereJson(text, err)}.`);
111
111
  }
112
- if (!Array.isArray(doc)) usage("--file: a JSON import is an array of objects, one per Contact.");
112
+ if (!Array.isArray(doc)) usage("--file: a JSON import is an array of objects, one per Lead.");
113
113
  objs = doc;
114
114
  } else {
115
115
  objs = text.split("\n").flatMap((line, i) => {
@@ -152,18 +152,18 @@ async function createChunk(c, body, rows, seen, k, n) {
152
152
  const notes = {};
153
153
  const started = Date.now();
154
154
  try {
155
- return readableObject(await withWireNotes(notes, () => c.contacts.imports.create(body)));
155
+ return readableObject(await withWireNotes(notes, () => c.leads.imports.create(body)));
156
156
  } catch (err) {
157
157
  if (!(err instanceof CurviateError)) throw err;
158
158
  if (err.code === "RATE_LIMIT_TENANT") {
159
159
  const wait = notes.retryAfterS ?? RETRY_DEFAULT_S;
160
160
  const d = err.details;
161
- const holder = typeof d?.import_id === "string" ? ` Import ${d.import_id} (started ${String(d.started_at)}) holds the Team's write lock: read it with \`curviate contact imports get ${d.import_id}\`.` : "";
161
+ const holder = typeof d?.import_id === "string" ? ` Import ${d.import_id} (started ${String(d.started_at)}) holds the Team's write lock: read it with \`curviate lead imports get ${d.import_id}\`.` : "";
162
162
  if (wait > RETRY_AFTER_BOUND_S || sends >= MAX_SENDS) {
163
163
  const why = wait > RETRY_AFTER_BOUND_S ? ` The API asked to wait ${wait} s, more than the ${RETRY_AFTER_BOUND_S} s the CLI waits.` : "";
164
164
  throw new CurviateError({ code: err.code, message: `${err.message}${why} Nothing in this chunk was imported; send it again later.${holder}`, httpStatus: 429, userFixable: false, retryLikelyToSucceed: true, ...err.details ? { details: err.details } : {} });
165
165
  }
166
- say(`Import ${k} of ${n}: the Team has other Contact writes running (nothing was imported); waiting ${wait} s, then sending it again.${holder}`);
166
+ say(`Import ${k} of ${n}: the Team has other Lead writes running (nothing was imported); waiting ${wait} s, then sending it again.${holder}`);
167
167
  await sleep(wait * 1e3);
168
168
  continue;
169
169
  }
@@ -180,17 +180,17 @@ async function recover(c, body, rows, seen, started, notes, err, k, n) {
180
180
  let found;
181
181
  for (let tries = 0; ; tries++) {
182
182
  try {
183
- const page = await c.contacts.imports.list({ limit: 20 });
183
+ const page = await c.leads.imports.list({ limit: 20 });
184
184
  found = (page.items ?? []).find(
185
185
  (i) => !seen.includes(String(i.id)) && i.total_rows === rows && i.format === (body["csv"] !== void 0 ? "csv" : "rows") && (body["list_id"] === void 0 || i.list_id === body["list_id"]) && Date.parse(i.created_at ?? "") >= started - CLOCK_SKEW_MS
186
186
  );
187
187
  } catch {
188
- throw fresh(`${err.message} The check for an import it made failed too: read \`curviate contact imports list\` before running this again, it may have been imported.`);
188
+ throw fresh(`${err.message} The check for an import it made failed too: read \`curviate lead imports list\` before running this again, it may have been imported.`);
189
189
  }
190
190
  if (found || tries >= RELIST_TRIES) break;
191
191
  await sleep(relistMs());
192
192
  }
193
- if (!found) throw fresh(`${err.message} No import from this request appeared within 30 s, so nothing was imported so far. If the API is only slow, one may still appear: read \`curviate contact imports list\` before running this again.`);
193
+ if (!found) throw fresh(`${err.message} No import from this request appeared within 30 s, so nothing was imported so far. If the API is only slow, one may still appear: read \`curviate lead imports list\` before running this again.`);
194
194
  say(`Import ${k} of ${n}: the API did apply it. Import ${found.id} is ${found.status}${found.status === "completed" ? ` (${COUNTS.map((x) => `${x} ${found.counts?.[x] ?? 0}`).join(", ")})` : ""}.`);
195
195
  return found;
196
196
  }
@@ -225,12 +225,12 @@ async function runImport(c, f) {
225
225
  const { header, chunks } = split(text, format);
226
226
  const bodyOf = (rows) => ({ ...base, ...header !== void 0 ? { csv: [header, ...rows].join("\n") } : { rows } });
227
227
  const total = chunks.reduce((n, x) => n + x.length, 0);
228
- if (f.preview) return preview("contacts.imports.create", chunks.length > 1 ? { imports: chunks.length, rows: total } : {}, bodyOf(chunks[0]));
228
+ if (f.preview) return preview("leads.imports.create", chunks.length > 1 ? { imports: chunks.length, rows: total } : {}, bodyOf(chunks[0]));
229
229
  const wait = !(f["no-wait"] === true || f.wait === false || f.async === true);
230
230
  const poll = async (made) => {
231
231
  let imp = made;
232
232
  while (wait && imp.status !== "completed" && imp.status !== "failed") {
233
- imp = readableObject(await c.contacts.imports.get(String(imp.id)));
233
+ imp = readableObject(await c.leads.imports.get(String(imp.id)));
234
234
  if (imp.status !== "completed" && imp.status !== "failed") await sleep(POLL_MS);
235
235
  }
236
236
  return imp;
@@ -247,7 +247,7 @@ async function runImport(c, f) {
247
247
  at += rows.length;
248
248
  done.push(imp);
249
249
  if (imp.status === "failed") throw await failedImport(imp);
250
- if (!wait && imp.status !== "completed") say(`Import ${done.length} of ${chunks.length}: ${imp.id} is ${imp.status}; read its progress with \`curviate contact imports get ${imp.id}\`.`);
250
+ if (!wait && imp.status !== "completed") say(`Import ${done.length} of ${chunks.length}: ${imp.id} is ${imp.status}; read its progress with \`curviate lead imports get ${imp.id}\`.`);
251
251
  return imp;
252
252
  },
253
253
  f,
@@ -271,7 +271,7 @@ async function skippedRows(c, imp) {
271
271
  const rows = [];
272
272
  let cursor;
273
273
  do {
274
- const page = await c.contacts.imports.rows(String(imp.id), { outcome: "skipped", limit: 100, ...cursor ? { cursor } : {} });
274
+ const page = await c.leads.imports.rows(String(imp.id), { outcome: "skipped", limit: 100, ...cursor ? { cursor } : {} });
275
275
  rows.push(...page.items ?? []);
276
276
  cursor = page.cursor;
277
277
  } while (cursor);
@@ -280,49 +280,49 @@ async function skippedRows(c, imp) {
280
280
  var importCmd = defineCommand({
281
281
  meta: {
282
282
  name: "import",
283
- description: `Import Contacts from a CSV, JSON (an array of objects) or NDJSON file. The format comes from the extension; with --file - pass --format. A file above ${IMPORT_MAX_ROWS} rows or ${(IMPORT_MAX_BODY_BYTES / 1048576).toFixed(0)} MiB is split into several imports, run one after the other (a CSV's header is repeated), each awaited unless --async (or --no-wait); the first refused or failed import stops the run. Only the file's structure is checked here; the server skips bad rows and reports why. Re-importing merges: a Contact already there is updated or left as it is. If the request times out or the connection drops, the CLI looks up the Team's newest imports, again every 2 s for up to 30 s while none shows, and reports the one this request made (id and status; it waits on a running one); it says nothing was imported only when none appeared. A busy-Team 429 (RATE_LIMIT_TENANT) waits the advertised Retry-After (up to ${RETRY_AFTER_BOUND_S} s) and sends that import again, naming the import holding the Team's write lock when the API names one; a longer wait fails. Needs Automate.`,
283
+ description: `Import Leads from a CSV, JSON (an array of objects) or NDJSON file. The format comes from the extension; with --file - pass --format. A file above ${IMPORT_MAX_ROWS} rows or ${(IMPORT_MAX_BODY_BYTES / 1048576).toFixed(0)} MiB is split into several imports, run one after the other (a CSV's header is repeated), each awaited unless --async (or --no-wait); the first refused or failed import stops the run. Only the file's structure is checked here; the server skips bad rows and reports why. Re-importing merges: a Lead already there is updated or left as it is. If the request times out or the connection drops, the CLI looks up the Team's newest imports, again every 2 s for up to 30 s while none shows, and reports the one this request made (id and status; it waits on a running one); it says nothing was imported only when none appeared. A busy-Team 429 (RATE_LIMIT_TENANT) waits the advertised Retry-After (up to ${RETRY_AFTER_BOUND_S} s) and sends that import again, naming the import holding the Team's write lock when the API names one; a longer wait fails. Needs Automate.`,
284
284
  risk: "write",
285
285
  rules: {
286
- changes: "Contacts are created or updated, joined to --list (and, with --apply-lists, to the lists their `lists` column names) and tagged with --tag. Nothing is sent to LinkedIn or to the people.",
286
+ changes: "Leads are created or updated, joined to --list (and, with --apply-lists, to the lists their `lists` column names) and tagged with --tag. Nothing is sent to LinkedIn or to the people.",
287
287
  visible_to: "Your Team.",
288
288
  budget_rows: [],
289
- retry: "After a timeout the CLI reports the import it made; do not run it again then. Otherwise Contacts converge: a second run reports them `unchanged`. A run stopped part way: read `curviate contact imports list`, then import the rest.",
290
- undo: "Cannot be undone as a whole. `curviate contact delete --import IMPORT_ID` deletes every Contact in its report, those it only updated included; Tags and list membership are undone with `curviate contact tags remove` and `curviate contact lists remove`."
289
+ retry: "After a timeout the CLI reports the import it made; do not run it again then. Otherwise Leads converge: a second run reports them `unchanged`. A run stopped part way: read `curviate lead imports list`, then import the rest.",
290
+ undo: "Cannot be undone as a whole. `curviate lead delete --import IMPORT_ID` deletes every Lead in its report, those it only updated included; Tags and list membership are undone with `curviate lead tags remove` and `curviate lead lists remove`."
291
291
  },
292
292
  errors: {
293
- CONTACT_LIMIT_REACHED: "the Team is at its Contact cap; rows past it are skipped.",
293
+ LEAD_LIMIT_REACHED: "the Team is at its Lead cap; rows past it are skipped.",
294
294
  IMPORT_QUEUE_FULL: "too many imports are queued (429); wait, then run it again.",
295
- RATE_LIMIT_TENANT: `the Team has other Contact or Motion writes running (429, nothing imported); the CLI waits Retry-After (up to ${RETRY_AFTER_BOUND_S} s) and sends again, a longer wait stops the run. When an import holds the Team's write lock, the message and \`details.import_id\` name it: read it with \`curviate contact imports get\`.`,
296
- CLIENT_TIMEOUT: "no answer within --timeout; the CLI reads the Team's newest imports (again for up to 30 s while none shows) and reports the import this request made. None found: nothing was imported so far, but read `curviate contact imports list` before running it again.",
295
+ RATE_LIMIT_TENANT: `the Team has other Lead or Campaign writes running (429, nothing imported); the CLI waits Retry-After (up to ${RETRY_AFTER_BOUND_S} s) and sends again, a longer wait stops the run. When an import holds the Team's write lock, the message and \`details.import_id\` name it: read it with \`curviate lead imports get\`.`,
296
+ CLIENT_TIMEOUT: "no answer within --timeout; the CLI reads the Team's newest imports (again for up to 30 s while none shows) and reports the import this request made. None found: nothing was imported so far, but read `curviate lead imports list` before running it again.",
297
297
  NAME_TAKEN: "--list-name names a list that exists."
298
298
  },
299
- output: ["With --json stdout is exactly one JSON document; progress and waits go to stderr. One report: `imports` (id and status each), `total_rows`, summed `counts` (created, updated, unchanged, skipped) and `skipped` rows with their number in the file, a reason and the field. With --async (or --no-wait): the imports' ids and statuses only, printed as soon as each is accepted; a queued one's progress is `curviate contact imports get IMPORT_ID` (stderr names it)."],
300
- seeAlso: ["curviate contact imports get", "curviate contact list"],
299
+ output: ["With --json stdout is exactly one JSON document; progress and waits go to stderr. One report: `imports` (id and status each), `total_rows`, summed `counts` (created, updated, unchanged, skipped) and `skipped` rows with their number in the file, a reason and the field. With --async (or --no-wait): the imports' ids and statuses only, printed as soon as each is accepted; a queued one's progress is `curviate lead imports get IMPORT_ID` (stderr names it)."],
300
+ seeAlso: ["curviate lead imports get", "curviate lead list"],
301
301
  examples: [
302
- 'curviate contact import --file prospects.csv --list-name "Q4 prospects" --tag conference',
303
- "curviate contact import --file contacts-export.csv --apply-lists --async",
304
- "curviate contact import --file - --format ndjson --list cl_YOUR_LIST_ID"
302
+ 'curviate lead import --file prospects.csv --list-name "Q4 prospects" --tag conference',
303
+ "curviate lead import --file leads-export.csv --apply-lists --async",
304
+ "curviate lead import --file - --format ndjson --list cl_YOUR_LIST_ID"
305
305
  ]
306
306
  },
307
307
  args: {
308
308
  ...WRITE_SINGLE_FLAGS,
309
309
  file: { type: "string", stdinArg: true, required: true, description: "The file: a path, or - to read it from stdin (then --format is required)." },
310
310
  format: { type: "string", description: "csv | json | ndjson. Default: from the file extension (.csv, .json, .ndjson)." },
311
- list: { type: "string", description: "Add every imported Contact to this Contact list (cl_...)." },
311
+ list: { type: "string", description: "Add every imported Lead to this Lead list (cl_...)." },
312
312
  "list-name": { type: "string", description: "Add them to the list of this name (up to 100 characters), creating it. Not with --list." },
313
- tag: { type: "string", description: "Put this Tag on every imported Contact (up to 64 characters); repeatable." },
314
- "remove-tag": { type: "string", description: "Take this Tag off every imported Contact; repeatable." },
315
- "apply-lists": { type: "boolean", description: "Add each Contact to the Contact lists named in its `lists` (an export's column), creating a missing list by name. Only adds. A row past the Team's list limit is skipped (list_limit_reached). Default: the column is ignored." },
316
- map: { type: "string", description: 'Map a file header to a Contact field: header=target, for example "LinkedIn Profile=linkedin_url"; repeatable.' },
313
+ tag: { type: "string", description: "Put this Tag on every imported Lead (up to 64 characters); repeatable." },
314
+ "remove-tag": { type: "string", description: "Take this Tag off every imported Lead; repeatable." },
315
+ "apply-lists": { type: "boolean", description: "Add each Lead to the Lead lists named in its `lists` (an export's column), creating a missing list by name. Only adds. A row past the Team's list limit is skipped (list_limit_reached). Default: the column is ignored." },
316
+ map: { type: "string", description: 'Map a file header to a Lead field: header=target, for example "LinkedIn Profile=linkedin_url"; repeatable.' },
317
317
  delimiter: { type: "string", description: "A CSV's separator: comma, semicolon or tab. Default: found by the server." },
318
- async: { type: "boolean", description: "Print the imports' ids as soon as each is accepted and exit 0, without waiting for them to finish; follow one with `curviate contact imports get IMPORT_ID`. Stops only on a refused request." },
318
+ async: { type: "boolean", description: "Print the imports' ids as soon as each is accepted and exit 0, without waiting for them to finish; follow one with `curviate lead imports get IMPORT_ID`. Stops only on a refused request." },
319
319
  "no-wait": { type: "boolean", description: "Same as --async." }
320
320
  },
321
321
  run: online(runImport)
322
322
  });
323
323
  var ID = { type: "positional", description: "Import id (imp_...)." };
324
324
  var importsList = defineCommand({
325
- meta: { name: "list", description: "List your Team's imports, newest first: status, counts and failure.", risk: "read", examples: ["curviate contact imports list"] },
325
+ meta: { name: "list", description: "List your Team's imports, newest first: status, counts and failure.", risk: "read", examples: ["curviate lead imports list"] },
326
326
  args: { ...readOnly(GLOBAL_FLAGS) },
327
327
  run: online(async (c, f) => {
328
328
  rejectPaginationModifiersWithoutAll(f, process);
@@ -332,10 +332,10 @@ var importsList = defineCommand({
332
332
  if (cursor) params["cursor"] = cursor;
333
333
  try {
334
334
  if (f.all) {
335
- const next = (p) => c.contacts.imports.list(p);
335
+ const next = (p) => c.leads.imports.list(p);
336
336
  for await (const item of streamAll(next, params, { maxPages: readMaxPagesFlag(f, process), out: process, pageDelayMs: pageDelayFromFlags(f) })) writeNdjsonItem(process, item, f.fields);
337
337
  } else {
338
- renderSuccess(readablePage(await c.contacts.imports.list(params)), outputOpts(f), process);
338
+ renderSuccess(readablePage(await c.leads.imports.list(params)), outputOpts(f), process);
339
339
  }
340
340
  } catch (err) {
341
341
  await fail(err, f);
@@ -347,7 +347,7 @@ var importsGet = defineCommand({
347
347
  name: "get",
348
348
  description: "One import: its status, counts, the columns it mapped or ignored, and its failure. With --outcome, its rows instead: one per row of the file with what happened (created, updated, unchanged, skipped), the reason and the field. Import records are kept for a limited time.",
349
349
  risk: "read",
350
- examples: ["curviate contact imports get imp_YOUR_IMPORT_ID", "curviate contact imports get imp_YOUR_IMPORT_ID --outcome skipped"]
350
+ examples: ["curviate lead imports get imp_YOUR_IMPORT_ID", "curviate lead imports get imp_YOUR_IMPORT_ID --outcome skipped"]
351
351
  },
352
352
  args: {
353
353
  ...readOnly(GLOBAL_FLAGS),
@@ -357,17 +357,17 @@ var importsGet = defineCommand({
357
357
  run: online(async (c, f) => {
358
358
  const id = String(f.id ?? "");
359
359
  try {
360
- if (f.outcome === void 0) return renderSuccess(readableObject(await c.contacts.imports.get(id)), outputOpts(f), process);
360
+ if (f.outcome === void 0) return renderSuccess(readableObject(await c.leads.imports.get(id)), outputOpts(f), process);
361
361
  rejectPaginationModifiersWithoutAll(f, process);
362
362
  const params = { outcome: listFlag("outcome", f.outcome).join(",") };
363
363
  if (f.limit !== void 0) params["limit"] = intFlag("limit", f.limit, 1, 100);
364
364
  const cursor = readCursorFlag(f, process);
365
365
  if (cursor) params["cursor"] = cursor;
366
366
  if (f.all) {
367
- const next = (p) => c.contacts.imports.rows(id, p);
367
+ const next = (p) => c.leads.imports.rows(id, p);
368
368
  for await (const item of streamAll(next, params, { maxPages: readMaxPagesFlag(f, process), out: process, pageDelayMs: pageDelayFromFlags(f) })) writeNdjsonItem(process, item, f.fields);
369
369
  } else {
370
- renderSuccess(readablePage(await c.contacts.imports.rows(id, params)), outputOpts(f), process);
370
+ renderSuccess(readablePage(await c.leads.imports.rows(id, params)), outputOpts(f), process);
371
371
  }
372
372
  } catch (err) {
373
373
  await fail(err, f);
@@ -379,8 +379,8 @@ var contactImportsCommand = defineCommand({
379
379
  meta: { name: "imports", description: "Your Team's import records." },
380
380
  subCommands: { list: importsList, get: importsGet },
381
381
  async run() {
382
- const { showHelp } = await import("./examples-KAMXHRLE.js");
383
- await showHelp(contactImportsCommand, ["curviate", "contact", "imports"]);
382
+ const { showHelp } = await import("./examples-77WVMKZQ.js");
383
+ await showHelp(contactImportsCommand, ["curviate", "lead", "imports"]);
384
384
  }
385
385
  });
386
386
 
@@ -13,7 +13,7 @@ import {
13
13
  outputOpts,
14
14
  rootClient,
15
15
  usage
16
- } from "./chunk-HOMRAZ6S.js";
16
+ } from "./chunk-LGUZ52BU.js";
17
17
  import {
18
18
  intFlag
19
19
  } from "./chunk-NNV2OYEF.js";
@@ -24,14 +24,14 @@ import {
24
24
  readablePage,
25
25
  rejectPaginationModifiersWithoutAll,
26
26
  streamAll
27
- } from "./chunk-KXJJFHSD.js";
27
+ } from "./chunk-R7USRN52.js";
28
28
  import {
29
29
  renderSuccess,
30
30
  writeNdjsonItem
31
31
  } from "./chunk-QM57YDJE.js";
32
32
  import {
33
33
  downloadBinary
34
- } from "./chunk-N76WNJ5T.js";
34
+ } from "./chunk-S234PC5E.js";
35
35
  import {
36
36
  GLOBAL_FLAGS,
37
37
  READ_SINGLE_FLAGS,
@@ -39,7 +39,7 @@ import {
39
39
  } from "./chunk-QLKGOIWS.js";
40
40
  import {
41
41
  DESCRIPTIONS
42
- } from "./chunk-R4HS2MWM.js";
42
+ } from "./chunk-QBY6L77D.js";
43
43
 
44
44
  // src/commands/analytics.ts
45
45
  import { defineCommand } from "citty";
@@ -68,7 +68,7 @@ function grammarParams(f) {
68
68
  }
69
69
  function filterParams(f, keys) {
70
70
  const q = {};
71
- if (keys.includes("motions") && f.motions !== void 0) q["motion_id"] = listFlag("motions", f.motions);
71
+ if (keys.includes("campaigns") && f.campaigns !== void 0) q["campaign_id"] = listFlag("campaigns", f.campaigns);
72
72
  if (keys.includes("accounts") && f.accounts !== void 0) q["account_id"] = listFlag("accounts", f.accounts);
73
73
  if (keys.includes("origin") && f.origin !== void 0) q["origin"] = listFlag("origin", f.origin);
74
74
  return q;
@@ -115,14 +115,14 @@ function renderOverview(body) {
115
115
  }
116
116
  const limits = body["limits"]?.["rows"];
117
117
  if (Array.isArray(limits) && limits.length) out.push(table(["BUDGET ROW", "USED", "CEILING", "LEFT"], limits.map((r) => [r["budget_row"], r["used"], r["effective_ceiling"], r["remaining"]])));
118
- out.push(rowsTable("MOTION", "motion_id", "name", body["motions"]));
118
+ out.push(rowsTable("CAMPAIGN", "campaign_id", "name", body["campaigns"]));
119
119
  out.push(rowsTable("ACCOUNT", "account_id", "account_name", body["accounts"]));
120
120
  const forecast = body["forecast"];
121
121
  if (forecast?.status === "computing") out.push("forecast: being computed (an Account has had no simulation yet); read again in a few minutes");
122
122
  else if (forecast?.daily?.length) {
123
- out.push(`forecast through ${forecast.through} (Motions only, the configuration as it is now)`);
123
+ out.push(`forecast through ${forecast.through} (Campaigns only, the configuration as it is now)`);
124
124
  out.push(table(["DATE", "INVITES", "ACCEPTED", "MESSAGES", "REPLIES", "INMAILS", "INMAIL REPLIES"], forecast.daily.map((d) => [d["date"], d["invites_sent"], d["accepted"], d["messages_sent"], d["replies"], d["inmails_sent"], d["inmail_replies"]])));
125
- } else if (forecast === null) out.push("forecast: none (pick an Account for this Motion)");
125
+ } else if (forecast === null) out.push("forecast: none (pick an Account for this Campaign)");
126
126
  for (const fl of body["flags"] ?? []) out.push(`${fl["code"]}: ${fl["message"]}${fl["next"] ? ` (${fl["next"]})` : ""}`);
127
127
  print(out.filter((x) => !!x).join("\n"));
128
128
  }
@@ -132,13 +132,13 @@ function renderActivity(body) {
132
132
  print(out.join("\n"));
133
133
  }
134
134
  async function runGet(c, f) {
135
- const view = f.view ?? "motions";
136
- if (view !== "motions" && view !== "activity") usage("--view takes motions or activity.");
135
+ const view = f.view ?? "campaigns";
136
+ if (view !== "campaigns" && view !== "activity") usage("--view takes campaigns or activity.");
137
137
  if (view === "activity") {
138
- const motionOnly = ["motion", "motions", "origin", "include", "sort", "limit", "compare", "forecast-days", "version"].find((k) => f[k] !== void 0);
139
- if (motionOnly) usage(`--${motionOnly} reads Motions: --view activity takes the window and --accounts only.`);
138
+ const campaignOnly = ["campaign", "campaigns", "origin", "include", "sort", "limit", "compare", "forecast-days", "version"].find((k) => f[k] !== void 0);
139
+ if (campaignOnly) usage(`--${campaignOnly} reads Campaigns: --view activity takes the window and --accounts only.`);
140
140
  }
141
- if (f.version !== void 0 && f.motion === void 0) usage("--version needs --motion.");
141
+ if (f.version !== void 0 && f.campaign === void 0) usage("--version needs --campaign.");
142
142
  const q = { ...windowParams(f), ...filterParams(f, view === "activity" ? ["accounts"] : ["accounts", "origin"]) };
143
143
  try {
144
144
  if (view === "activity") {
@@ -148,8 +148,8 @@ async function runGet(c, f) {
148
148
  Object.assign(q, grammarParams(f));
149
149
  if (f.version !== void 0) q["version"] = intFlag("version", f.version);
150
150
  let body;
151
- if (f.motion !== void 0) body = await c.analytics.motions.get(f.motion, q);
152
- else body = await c.analytics.motions.list({ ...q, ...filterParams(f, ["motions"]) });
151
+ if (f.campaign !== void 0) body = await c.analytics.campaigns.get(f.campaign, q);
152
+ else body = await c.analytics.campaigns.list({ ...q, ...filterParams(f, ["campaigns"]) });
153
153
  return outputOpts(f).json ? renderSuccess(body, outputOpts(f), process) : renderOverview(body);
154
154
  } catch (err) {
155
155
  await fail(err, f);
@@ -157,11 +157,11 @@ async function runGet(c, f) {
157
157
  }
158
158
  async function runEvents(c, f) {
159
159
  rejectPaginationModifiersWithoutAll(f, process);
160
- if (f.step !== void 0 && f.motion === void 0) usage("--step needs --motion: a step id names a step of one Motion.");
160
+ if (f.step !== void 0 && f.campaign === void 0) usage("--step needs --campaign: a step id names a step of one Campaign.");
161
161
  const q = { ...filterParams(f, ["origin"]) };
162
- if (f.motion !== void 0) q["motion_id"] = f.motion;
162
+ if (f.campaign !== void 0) q["campaign_id"] = f.campaign;
163
163
  if (f.step !== void 0) q["step_id"] = f.step;
164
- if (f.contact !== void 0) q["contact_id"] = f.contact;
164
+ if (f.lead !== void 0) q["lead_id"] = f.lead;
165
165
  if (f.accounts !== void 0) q["account_id"] = listFlag("accounts", f.accounts).join(",");
166
166
  if (f.kind !== void 0) q["kind"] = listFlag("kind", f.kind);
167
167
  if (f.limit !== void 0) q["limit"] = intFlag("limit", f.limit, 1, 100);
@@ -176,16 +176,16 @@ async function runEvents(c, f) {
176
176
  const page = readablePage(await c.analytics.events.list(q));
177
177
  if (outputOpts(f).json) return renderSuccess(page, outputOpts(f), process);
178
178
  print(table(
179
- ["AT", "KIND", "ORIGIN", "MOTION", "STEP", "OUTCOME", "REASON", "CONTACT"],
180
- page.items.map((e) => [e["occurred_at"], e["kind"], e["origin"], e["motion_name"], e["step_id"], e["outcome"], e["reason"] ? `${e["reason"]}: ${e["reason_message"] ?? ""}` : null, e["contact"]?.["full_name"]])
179
+ ["AT", "KIND", "ORIGIN", "CAMPAIGN", "STEP", "OUTCOME", "REASON", "LEAD"],
180
+ page.items.map((e) => [e["occurred_at"], e["kind"], e["origin"], e["campaign_name"], e["step_id"], e["outcome"], e["reason"] ? `${e["reason"]}: ${e["reason_message"] ?? ""}` : null, e["lead"]?.["full_name"]])
181
181
  ));
182
182
  if (page["cursor"]) print(`next page: --cursor ${String(page["cursor"])}`);
183
183
  } catch (err) {
184
184
  await fail(err, f);
185
185
  }
186
186
  }
187
- var ANALYTICS_TABLES = ["daily", "accounts", "motions", "enrollments"];
188
- var JOB_ENTITIES = ["motion_activity", "account_activity", "account_metrics"];
187
+ var ANALYTICS_TABLES = ["daily", "accounts", "campaigns", "enrollments"];
188
+ var JOB_ENTITIES = ["campaign_activity", "account_activity", "account_metrics"];
189
189
  async function runExport(c, f) {
190
190
  if (f.json) usage("export commands take no --json: pass --format json.");
191
191
  const tables = f.table === void 0 ? [] : listFlag("table", f.table);
@@ -194,7 +194,7 @@ async function runExport(c, f) {
194
194
  const unknown = tables.find((t) => !ANALYTICS_TABLES.includes(t) && t !== entity);
195
195
  if (unknown !== void 0) usage(`--table takes ${ANALYTICS_TABLES.join(", ")}, or one of ${JOB_ENTITIES.join(", ")} with --job.`);
196
196
  const format = f.format ?? "csv";
197
- const filters = { ...windowParams(f), ...filterParams(f, ["motions", "accounts", "origin"]) };
197
+ const filters = { ...windowParams(f), ...filterParams(f, ["campaigns", "accounts", "origin"]) };
198
198
  try {
199
199
  if (f.job) {
200
200
  const exp = await c.exports.create({ entity, tables: tables.length ? tables : ANALYTICS_TABLES, format, filters });
@@ -217,7 +217,7 @@ var online = (fn) => async ({ args }) => {
217
217
  var WINDOW_ARGS = {
218
218
  from: {
219
219
  type: "string",
220
- description: "First day, YYYY-MM-DD, inclusive, in --timezone. A Motion read (with or without --motion) or an Account overview may start more than a year back: up to `window.counts_only_through` the figures come from daily counts (UTC days, no step, variant or seen detail), and `paths` cover only the days after `window.paths_through`. --view activity and the activity exports keep their own cap, named in the refusal."
220
+ description: "First day, YYYY-MM-DD, inclusive, in --timezone. A Campaign read (with or without --campaign) or an Account overview may start more than a year back: up to `window.counts_only_through` the figures come from daily counts (UTC days, no step, variant or seen detail), and `paths` cover only the days after `window.paths_through`. --view activity and the activity exports keep their own cap, named in the refusal."
221
221
  },
222
222
  to: { type: "string", description: "Last day, YYYY-MM-DD, inclusive, in --timezone (default today). Same rules as --from." },
223
223
  range: { type: "string", description: "Instead of --from/--to: 7d, 30d, 90d, 12m or all." },
@@ -226,40 +226,40 @@ var WINDOW_ARGS = {
226
226
  };
227
227
  var FILTER_ARGS = {
228
228
  accounts: { type: "string", description: "Only these Accounts: a comma list of ids (acc_...). Never filled from your profile's default Account." },
229
- origin: { type: "string", description: "Who sent the actions: a comma list of motion, unibox, api; direct is an alias for unibox and api." }
229
+ origin: { type: "string", description: "Who sent the actions: a comma list of campaign, unibox, api; direct is an alias for unibox and api." }
230
230
  };
231
231
  var GRAMMAR_ARGS = {
232
- include: { type: "string", description: "Sections to return, comma list (for example performance,motions,accounts,steps,variants,paths,flags). forecast: what your Motions are expected to send and get per day from today, a simulation with their observed rates; Motions only, the configuration frozen as it is now (no new Enrollments, no edits), never in the summary." },
232
+ include: { type: "string", description: "Sections to return, comma list (for example performance,campaigns,accounts,steps,variants,paths,flags). forecast: what your Campaigns are expected to send and get per day from today, a simulation with their observed rates; Campaigns only, the configuration frozen as it is now (no new Enrollments, no edits), never in the summary." },
233
233
  "forecast-days": { type: "string", description: "With --include forecast: days after today, 1-365 (default 30); the forecast ends sooner when activity does." },
234
- sort: { type: "string", description: "Order of the Motion and Account lists, comma list of sent, acceptance.rate, reply.rate, inmail_reply.rate, last_activity_at, name; a leading - sorts descending." },
235
- limit: { type: "string", description: "How many Motions and Accounts to return." },
234
+ sort: { type: "string", description: "Order of the Campaign and Account lists, comma list of sent, acceptance.rate, reply.rate, inmail_reply.rate, last_activity_at, name; a leading - sorts descending." },
235
+ limit: { type: "string", description: "How many Campaigns and Accounts to return." },
236
236
  compare: { type: "string", description: "previous_period: add the same number of days before --from to every rate (`previous`, `delta`)." }
237
237
  };
238
238
  var getCmd = defineCommand({
239
239
  meta: {
240
240
  name: "get",
241
- description: "Motion outcomes over a window: invitations, acceptance, messages, reply and InMail reply as outcomes so far, with each Motion and Account. With --motion: one Motion's steps, paths and Accounts. With --view activity: the budget rows your Accounts used. Each Contact counts once per Account.",
241
+ description: "Campaign outcomes over a window: invitations, acceptance, messages, reply and InMail reply as outcomes so far, with each Campaign and Account. With --campaign: one Campaign's steps, paths and Accounts. With --view activity: the budget rows your Accounts used. Each Lead counts once per Account.",
242
242
  risk: "read",
243
243
  output: [
244
244
  "acceptance: invitations accepted over invitations sent in the window, so far.",
245
245
  "reply: people who replied over people messaged; InMail reply the same for InMails. Rates move as replies and acceptances arrive; `maturing` counts what was sent under 7 days ago and `low_sample` marks fewer than 30.",
246
- "seen (--motion): messages read or replied over messages sent, per message step.",
247
- "forecast (--include forecast): per day from today, the expected invitations, acceptances, messages, replies (InMail replies included), InMails and InMail replies; a draft Motion as if turned on now.",
246
+ "seen (--campaign): messages read or replied over messages sent, per message step.",
247
+ "forecast (--include forecast): per day from today, the expected invitations, acceptances, messages, replies (InMail replies included), InMails and InMail replies; a draft Campaign as if turned on now.",
248
248
  "A compact table by default; --json (or piped) prints the API body."
249
249
  ],
250
250
  seeAlso: ["curviate analytics events list", "curviate account overview", "Judgement on reading the numbers: https://github.com/curviate/curviate-plugin"],
251
251
  examples: [
252
252
  "curviate analytics get --range 30d",
253
- "curviate analytics get --motion mot_YOUR_MOTION_ID --include steps,paths,forecast --forecast-days 14",
253
+ "curviate analytics get --campaign mot_YOUR_CAMPAIGN_ID --include steps,paths,forecast --forecast-days 14",
254
254
  "curviate analytics get --view activity --from 2026-10-01 --to 2026-10-28"
255
255
  ]
256
256
  },
257
257
  args: {
258
258
  ...readOnly(READ_SINGLE_FLAGS),
259
- view: { type: "string", description: "motions (default): Motion outcomes; activity: budget rows used, not with --motion." },
260
- motion: { type: "string", description: "One Motion (mot_...): its steps, paths and Accounts." },
261
- motions: { type: "string", description: "Without --motion: only these Motions, comma list (mot_...)." },
262
- version: { type: "string", description: "With --motion: only this Sequence version." },
259
+ view: { type: "string", description: "campaigns (default): Campaign outcomes; activity: budget rows used, not with --campaign." },
260
+ campaign: { type: "string", description: "One Campaign (mot_...): its steps, paths and Accounts." },
261
+ campaigns: { type: "string", description: "Without --campaign: only these Campaigns, comma list (mot_...)." },
262
+ version: { type: "string", description: "With --campaign: only this Sequence version." },
263
263
  ...WINDOW_ARGS,
264
264
  ...FILTER_ARGS,
265
265
  ...GRAMMAR_ARGS
@@ -272,15 +272,15 @@ var eventsListCmd = defineCommand({
272
272
  description: "The records behind the numbers, newest first: steps executed or failed, invitations accepted, replies; each reason with its sentence. Metadata only, never message text.",
273
273
  risk: "read",
274
274
  examples: [
275
- "curviate analytics events list --motion mot_YOUR_MOTION_ID --step opener",
276
- "curviate analytics events list --contact con_YOUR_CONTACT_ID --origin unibox,api --all"
275
+ "curviate analytics events list --campaign mot_YOUR_CAMPAIGN_ID --step opener",
276
+ "curviate analytics events list --lead con_YOUR_LEAD_ID --origin unibox,api --all"
277
277
  ]
278
278
  },
279
279
  args: {
280
280
  ...readOnly(GLOBAL_FLAGS),
281
- motion: { type: "string", description: "Only this Motion's records (mot_...)." },
282
- step: { type: "string", description: "With --motion: only this step's records." },
283
- contact: { type: "string", description: "Only this Contact's records (con_...): its Motion records and its direct ones." },
281
+ campaign: { type: "string", description: "Only this Campaign's records (mot_...)." },
282
+ step: { type: "string", description: "With --campaign: only this step's records." },
283
+ lead: { type: "string", description: "Only this Lead's records (con_...): its Campaign records and its direct ones." },
284
284
  kind: { type: "string", description: "Comma list of step.executed, step.failed, invite.accepted, message.replied." },
285
285
  accounts: FILTER_ARGS.accounts,
286
286
  origin: FILTER_ARGS.origin
@@ -290,14 +290,14 @@ var eventsListCmd = defineCommand({
290
290
  var exportCmd = defineCommand({
291
291
  meta: {
292
292
  name: "export",
293
- description: "Export the Analytics tables (daily, accounts, motions, enrollments) under the same window and filters: streamed now, or with --job built in the background (then `curviate export get` and `curviate export download`). One table is one file; several are one ZIP. Never message text. Owners and Managers only.",
293
+ description: "Export the Analytics tables (daily, accounts, campaigns, enrollments) under the same window and filters: streamed now, or with --job built in the background (then `curviate export get` and `curviate export download`). One table is one file; several are one ZIP. Never message text. Owners and Managers only.",
294
294
  risk: "read",
295
295
  output: ["Data only on stdout or the --output file (mode 0600); with --job the export record."],
296
296
  errors: { INSUFFICIENT_ROLE: "Members cannot export: ask an Owner or Manager.", EXPORT_IN_PROGRESS: "your Team already has an export running; read it with `curviate export get <export_id>`." },
297
297
  seeAlso: ["curviate export get", "curviate export download"],
298
298
  examples: [
299
299
  "curviate analytics export --table enrollments --format csv --range 30d -o enrollments.csv",
300
- "curviate analytics export --table daily,accounts,motions,enrollments --format csv --range 90d --job"
300
+ "curviate analytics export --table daily,accounts,campaigns,enrollments --format csv --range 90d --job"
301
301
  ]
302
302
  },
303
303
  args: {
@@ -306,11 +306,11 @@ var exportCmd = defineCommand({
306
306
  team: GLOBAL_FLAGS.team,
307
307
  "base-url": GLOBAL_FLAGS["base-url"],
308
308
  timeout: GLOBAL_FLAGS.timeout,
309
- table: { type: "string", description: "Comma list of daily, accounts, motions, enrollments (default all four); or, with --job, one of motion_activity, account_activity, account_metrics." },
309
+ table: { type: "string", description: "Comma list of daily, accounts, campaigns, enrollments (default all four); or, with --job, one of campaign_activity, account_activity, account_metrics." },
310
310
  format: { type: "string", description: "csv (default), json or ndjson (ndjson takes one table)." },
311
311
  output: { type: "string", alias: "o", description: "File to write (mode 0600), or - for stdout (default)." },
312
312
  job: { type: "boolean", description: "Build it in the background and print the export record instead of streaming it." },
313
- motions: { type: "string", description: "Only these Motions, comma list (mot_...)." },
313
+ campaigns: { type: "string", description: "Only these Campaigns, comma list (mot_...)." },
314
314
  ...WINDOW_ARGS,
315
315
  ...FILTER_ARGS,
316
316
  json: { type: "boolean", description: "Not taken by exports: pass --format json." }
@@ -321,7 +321,7 @@ var eventsCommand = defineCommand({
321
321
  meta: { name: "events", description: "The records behind the analytics numbers." },
322
322
  subCommands: { list: eventsListCmd },
323
323
  async run() {
324
- const { showHelp } = await import("./examples-KAMXHRLE.js");
324
+ const { showHelp } = await import("./examples-77WVMKZQ.js");
325
325
  await showHelp(eventsCommand, ["curviate", "analytics", "events"]);
326
326
  }
327
327
  });
@@ -333,7 +333,7 @@ var analyticsCommand = defineCommand({
333
333
  export: exportCmd
334
334
  },
335
335
  async run() {
336
- const { showHelp } = await import("./examples-KAMXHRLE.js");
336
+ const { showHelp } = await import("./examples-77WVMKZQ.js");
337
337
  await showHelp(analyticsCommand, ["curviate", "analytics"]);
338
338
  }
339
339
  });
@@ -3,7 +3,7 @@ import {
3
3
  parseDocument,
4
4
  readFileFlag,
5
5
  readStdinCapped
6
- } from "./chunk-62YAYAUI.js";
6
+ } from "./chunk-JKXGL7PT.js";
7
7
  import {
8
8
  isStdinToken
9
9
  } from "./chunk-ZYURL5VK.js";