@curviate/cli 0.54.0 → 0.56.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/README.md +35 -17
  3. package/dist/{account-DW5N5MJ6.js → account-ZF5NEMID.js} +132 -125
  4. package/dist/{analytics-T2K3OWVQ.js → analytics-M7JWS67A.js} +5 -5
  5. package/dist/{beta-consent-O736ONE7.js → beta-consent-4Q2LZZQC.js} +4 -4
  6. package/dist/{billing-NTBL32EX.js → billing-LYPSX5SR.js} +78 -6
  7. package/dist/{chunk-N76WNJ5T.js → chunk-7PLTQHNO.js} +1 -1
  8. package/dist/{chunk-N4IYTFIY.js → chunk-AMTKGO37.js} +1 -1
  9. package/dist/{chunk-ACKKHLUH.js → chunk-CRO7PJ4I.js} +2 -2
  10. package/dist/chunk-DENWYJK2.js +94 -0
  11. package/dist/{chunk-FBLCSVIU.js → chunk-EI64VFBE.js} +47 -47
  12. package/dist/{chunk-ENBIMEKS.js → chunk-IB6ARI3R.js} +1 -1
  13. package/dist/{chunk-Q57PZJLX.js → chunk-J4SFOFMT.js} +90 -88
  14. package/dist/{chunk-FUX3BRYP.js → chunk-JXDEV33Z.js} +1 -1
  15. package/dist/{chunk-5B4T6BMN.js → chunk-L3RJU7C3.js} +44 -44
  16. package/dist/{chunk-KXJJFHSD.js → chunk-MIOEYSBQ.js} +1 -1
  17. package/dist/{chunk-R4HS2MWM.js → chunk-MWVTFTWV.js} +15 -13
  18. package/dist/{chunk-QW5K5DTC.js → chunk-RDKTHFQ6.js} +25 -6
  19. package/dist/{chunk-62YAYAUI.js → chunk-RKNW4UX4.js} +51 -9
  20. package/dist/{chunk-V3HHYTBY.js → chunk-UOWOKEB2.js} +1 -1
  21. package/dist/{chunk-HOMRAZ6S.js → chunk-UWRWZG4N.js} +2 -2
  22. package/dist/{chunk-A3UNS44U.js → chunk-VEMK4MJM.js} +10 -10
  23. package/dist/{chunk-UFHT2KZG.js → chunk-XP6S6E55.js} +2 -2
  24. package/dist/cli.js +33 -25
  25. package/dist/{comment-ATVJOTWV.js → comment-D6RSZTVK.js} +8 -8
  26. package/dist/{company-BRKFROPE.js → company-3Z6PXGTW.js} +11 -11
  27. package/dist/{config-E223SS5K.js → config-VY5MCJMN.js} +2 -2
  28. package/dist/{connect-XVDQ5FTT.js → connect-G2RTLV7G.js} +15 -15
  29. package/dist/{contact-4HOUOVD7.js → contact-QSLJCBDE.js} +8 -8
  30. package/dist/{contact-groups-ENA3VGGL.js → contact-groups-OITAD73K.js} +85 -85
  31. package/dist/{contact-import-4EKVDFPV.js → contact-import-LT7BKESC.js} +10 -10
  32. package/dist/core-RFTNNB6P.js +46 -0
  33. package/dist/{do-not-contact-S2WGHSQL.js → do-not-contact-ZA7KS5WD.js} +59 -33
  34. package/dist/{doctor-OFIUGRUG.js → doctor-JQT3DO6G.js} +4 -4
  35. package/dist/{document-MDE2WJYX.js → document-H65EXU4L.js} +1 -1
  36. package/dist/domain-7EX4E34B.js +70 -0
  37. package/dist/{draft-DD3DTXBM.js → draft-7U6H4BPF.js} +4 -4
  38. package/dist/{enrollment-ESCHKQ5X.js → enrollment-AZ6XGVVL.js} +40 -38
  39. package/dist/{examples-KAMXHRLE.js → examples-IGQJCSNL.js} +2 -2
  40. package/dist/{exit-codes-CYQHN4NE.js → exit-codes-ZSOLAXQO.js} +1 -1
  41. package/dist/{export-GUAGB7TF.js → export-OYMQXL62.js} +5 -5
  42. package/dist/{feed-ZC4FY4BA.js → feed-M5D4SJW7.js} +6 -6
  43. package/dist/{group-42ZE7K3K.js → group-UTC3YBKE.js} +6 -6
  44. package/dist/{inbox-2YS7CTXH.js → inbox-VSGNHSLG.js} +9 -9
  45. package/dist/{inboxes-5RB3BGCQ.js → inboxes-23C2MJK4.js} +6 -6
  46. package/dist/{incoming-ATZN6JJA.js → incoming-QVPP32K7.js} +13 -13
  47. package/dist/{job-WD3Z3P3Q.js → job-ZHVFFRWE.js} +10 -10
  48. package/dist/{login-JQ57YHEJ.js → login-6OTNXEJZ.js} +4 -4
  49. package/dist/mailbox-HD2UXZCA.js +405 -0
  50. package/dist/{message-WGS2IIDC.js → message-PIV77W47.js} +7 -7
  51. package/dist/{motion-BRVBJJJP.js → motion-AHYF34DP.js} +224 -149
  52. package/dist/{network-CODIWCJQ.js → network-RJHJFZEY.js} +5 -5
  53. package/dist/{notification-RLVF4NLJ.js → notification-XGR4NT3S.js} +6 -6
  54. package/dist/{notifications-HGEHM5KW.js → notifications-BHRWSHPR.js} +6 -6
  55. package/dist/{post-3GH2IPO6.js → post-Z7AVDDKA.js} +8 -8
  56. package/dist/{profile-6RFJQMIB.js → profile-YZNBX2RP.js} +15 -15
  57. package/dist/{recruiter-GK3UNS62.js → recruiter-EXM4P7X7.js} +17 -17
  58. package/dist/{sales-nav-SLS3ABF4.js → sales-nav-CKDSEXV2.js} +15 -15
  59. package/dist/{search-45WRT5T3.js → search-B7FB6674.js} +17 -17
  60. package/dist/{setup-5QZOM2Q2.js → setup-VZVPLJ4V.js} +5 -5
  61. package/dist/{team-WM3RKOQ2.js → team-PYABBUHO.js} +6 -6
  62. package/dist/{tier-5AMLO5KE.js → tier-PRK4WQKR.js} +4 -4
  63. package/dist/{unibox-TTCF7YVO.js → unibox-ZNKX2EKL.js} +34 -34
  64. package/dist/{webhook-UCCCSKDO.js → webhook-V74EV4E2.js} +18 -18
  65. package/package.json +2 -2
  66. package/dist/core-6VDDV2NM.js +0 -46
@@ -5,7 +5,7 @@ import {
5
5
  outputOpts,
6
6
  rootClient,
7
7
  usage
8
- } from "./chunk-HOMRAZ6S.js";
8
+ } from "./chunk-UWRWZG4N.js";
9
9
  import {
10
10
  buildPreviewOutput
11
11
  } from "./chunk-TCUYH5GO.js";
@@ -20,7 +20,7 @@ import {
20
20
  readablePage,
21
21
  rejectPaginationModifiersWithoutAll,
22
22
  streamAll
23
- } from "./chunk-KXJJFHSD.js";
23
+ } from "./chunk-MIOEYSBQ.js";
24
24
  import {
25
25
  renderSuccess,
26
26
  writeNdjsonItem
@@ -30,7 +30,7 @@ import {
30
30
  readConfig,
31
31
  resolveEffectiveConfig,
32
32
  writeProfile
33
- } from "./chunk-N76WNJ5T.js";
33
+ } from "./chunk-7PLTQHNO.js";
34
34
  import {
35
35
  GLOBAL_FLAGS,
36
36
  READ_SINGLE_FLAGS,
@@ -39,7 +39,7 @@ import {
39
39
  } from "./chunk-QLKGOIWS.js";
40
40
  import {
41
41
  DESCRIPTIONS
42
- } from "./chunk-R4HS2MWM.js";
42
+ } from "./chunk-MWVTFTWV.js";
43
43
  import "./chunk-ZYURL5VK.js";
44
44
 
45
45
  // src/commands/team.ts
@@ -121,7 +121,7 @@ var PAGE_FLAGS = readOnly(GLOBAL_FLAGS);
121
121
  var listCmd = defineCommand({
122
122
  meta: {
123
123
  name: "list",
124
- description: "The Teams you are a member of, with your role; is_current marks the Team this call acts in. --counts adds each Team's Tier, trial, Accounts, active Motions and, where you are an Owner, seats.",
124
+ description: "The Teams you are a member of, with your role; is_current marks the Team this call acts in. --counts adds each Team's Tier, trial, Accounts, active Campaigns and, where you are an Owner, seats.",
125
125
  risk: "read",
126
126
  examples: ["curviate team list", "curviate team list --counts --json"]
127
127
  },
@@ -441,7 +441,7 @@ var teamCommand = defineCommand({
441
441
  seats: seatsCmd
442
442
  },
443
443
  async run() {
444
- const { showHelp } = await import("./examples-KAMXHRLE.js");
444
+ const { showHelp } = await import("./examples-IGQJCSNL.js");
445
445
  await showHelp(teamCommand, ["curviate", "team"]);
446
446
  }
447
447
  });
@@ -3,21 +3,21 @@ import {
3
3
  fail,
4
4
  outputOpts,
5
5
  rootClient
6
- } from "./chunk-HOMRAZ6S.js";
6
+ } from "./chunk-UWRWZG4N.js";
7
7
  import {
8
8
  readableObject
9
- } from "./chunk-KXJJFHSD.js";
9
+ } from "./chunk-MIOEYSBQ.js";
10
10
  import {
11
11
  renderSuccess
12
12
  } from "./chunk-QM57YDJE.js";
13
- import "./chunk-N76WNJ5T.js";
13
+ import "./chunk-7PLTQHNO.js";
14
14
  import {
15
15
  READ_SINGLE_FLAGS,
16
16
  readOnly
17
17
  } from "./chunk-QLKGOIWS.js";
18
18
  import {
19
19
  DESCRIPTIONS
20
- } from "./chunk-R4HS2MWM.js";
20
+ } from "./chunk-MWVTFTWV.js";
21
21
  import "./chunk-ZYURL5VK.js";
22
22
 
23
23
  // src/commands/tier.ts
@@ -9,7 +9,7 @@ import {
9
9
  outputOpts,
10
10
  rootClient,
11
11
  usage
12
- } from "./chunk-HOMRAZ6S.js";
12
+ } from "./chunk-UWRWZG4N.js";
13
13
  import {
14
14
  buildPreviewOutput
15
15
  } from "./chunk-TCUYH5GO.js";
@@ -23,12 +23,12 @@ import {
23
23
  readablePage,
24
24
  rejectPaginationModifiersWithoutAll,
25
25
  streamAll
26
- } from "./chunk-KXJJFHSD.js";
26
+ } from "./chunk-MIOEYSBQ.js";
27
27
  import {
28
28
  renderSuccess,
29
29
  writeNdjsonItem
30
30
  } from "./chunk-QM57YDJE.js";
31
- import "./chunk-N76WNJ5T.js";
31
+ import "./chunk-7PLTQHNO.js";
32
32
  import {
33
33
  GLOBAL_FLAGS,
34
34
  WRITE_SINGLE_FLAGS,
@@ -36,7 +36,7 @@ import {
36
36
  } from "./chunk-QLKGOIWS.js";
37
37
  import {
38
38
  DESCRIPTIONS
39
- } from "./chunk-R4HS2MWM.js";
39
+ } from "./chunk-MWVTFTWV.js";
40
40
  import "./chunk-ZYURL5VK.js";
41
41
 
42
42
  // src/commands/unibox.ts
@@ -66,7 +66,7 @@ function chatWith(i) {
66
66
  async function runList(c, f) {
67
67
  const q = {};
68
68
  if (f.accounts !== void 0) q["account_ids"] = listFlag("accounts", f.accounts);
69
- if (f.motion !== void 0) q["motion_ids"] = listFlag("motion", f.motion);
69
+ if (f.campaign !== void 0) q["campaign_ids"] = listFlag("campaign", f.campaign);
70
70
  if (f.tag !== void 0) q["tags"] = listFlag("tag", f.tag);
71
71
  if (f.person !== void 0) q["person"] = f.person;
72
72
  if (f.unread !== void 0) q["unread"] = f.unread;
@@ -78,10 +78,10 @@ async function runList(c, f) {
78
78
  try {
79
79
  await paged(f, q, (p) => c.unibox.list(p), (page) => {
80
80
  const unread = (i) => i["unread"] ? i["marked_unread"] ? "marked" : "yes" : "";
81
- const motion = (i) => i["motion_context"]?.["motion_name"];
81
+ const campaign = (i) => i["campaign_context"]?.["campaign_name"];
82
82
  print(table(
83
- ["ACCOUNT", "CHAT", "WITH", "UNREAD", "LAST", "FROM", "MOTION", "TAGS"],
84
- page.items.map((i) => [i["account_id"], i["chat_id"], chatWith(i), unread(i), i["last_activity_at"], i["last_message_from"], motion(i), i["tags"]?.join(", ")])
83
+ ["ACCOUNT", "CHAT", "WITH", "UNREAD", "LAST", "FROM", "CAMPAIGN", "TAGS"],
84
+ page.items.map((i) => [i["account_id"], i["chat_id"], chatWith(i), unread(i), i["last_activity_at"], i["last_message_from"], campaign(i), i["tags"]?.join(", ")])
85
85
  ));
86
86
  if (typeof page["total"] === "number") print(`total: ${page["total"]} chats match`);
87
87
  });
@@ -139,17 +139,17 @@ async function runMark(c, f) {
139
139
  async function runTag(c, f) {
140
140
  const { accountId, chatId } = ids(f);
141
141
  const body = f.tag === void 0 ? {} : { tags: listFlag("tag", f.tag) };
142
- if (f.preview) return preview("unibox.tagContact", { account_id: accountId, chat_id: chatId }, body);
142
+ if (f.preview) return preview("unibox.tagLead", { account_id: accountId, chat_id: chatId }, body);
143
143
  try {
144
- renderSuccess(await c.unibox.tagContact(accountId, chatId, body), outputOpts(f), process);
144
+ renderSuccess(await c.unibox.tagLead(accountId, chatId, body), outputOpts(f), process);
145
145
  } catch (err) {
146
146
  await fail(err, f);
147
147
  }
148
148
  }
149
149
  async function runEnroll(c, f) {
150
150
  const { accountId, chatId } = ids(f);
151
- const motion = typeof f.motion === "string" && f.motion.trim() !== "" ? f.motion : usage("--motion is required: the Motion to enroll the person in (mot_...).");
152
- const body = { motion_id: motion };
151
+ const campaign = typeof f.campaign === "string" && f.campaign.trim() !== "" ? f.campaign : usage("--campaign is required: the Campaign to enroll the person in (mot_...).");
152
+ const body = { campaign_id: campaign };
153
153
  if (f.preview) return preview("unibox.enroll", { account_id: accountId, chat_id: chatId }, body);
154
154
  try {
155
155
  renderSuccess(await c.unibox.enroll(accountId, chatId, body), outputOpts(f), process);
@@ -201,18 +201,18 @@ var ONE_TO_ONE = { CHAT_NOT_ONE_TO_ONE: "the chat is a group chat: there is no o
201
201
  var listCmd = defineCommand({
202
202
  meta: {
203
203
  name: "list",
204
- description: "List the chats of every Account you may operate, newest activity first. Served from Curviate's store: no LinkedIn call, no budget. An Account without full-inbox sync shows only its Motion chats; a disconnected Account's chats are listed read-only.",
204
+ description: "List the chats of every Account you may operate, newest activity first. Served from Curviate's store: no LinkedIn call, no budget. An Account without full-inbox sync shows only its Campaign chats; a disconnected Account's chats are listed read-only.",
205
205
  risk: "read",
206
- output: ["A table of Account, chat, person, unread (`marked` when made unread without a newer message), last activity, Motion and tags; with --total the count of matching chats. --json (or piped) prints the API page."],
207
- examples: ["curviate unibox list --unread", "curviate unibox list --person con_YOUR_CONTACT_ID --motion none --total"]
206
+ output: ["A table of Account, chat, person, unread (`marked` when made unread without a newer message), last activity, Campaign and tags; with --total the count of matching chats. --json (or piped) prints the API page."],
207
+ examples: ["curviate unibox list --unread", "curviate unibox list --person con_YOUR_LEAD_ID --campaign none --total"]
208
208
  },
209
209
  args: {
210
210
  ...readOnly(GLOBAL_FLAGS),
211
211
  limit: { ...GLOBAL_FLAGS.limit, description: "Chats per page (1 to 100)." },
212
212
  accounts: ACCOUNTS,
213
- motion: { type: "string", description: "Only chats linked to these Motions (mot_...), repeatable or a comma list; `none` for chats no Motion links." },
214
- person: { type: "string", description: "Only chats with this person: a Contact id (con_...) or a LinkedIn id (ACo...)." },
215
- tag: { type: "string", description: "Only chats whose Contact has this tag; repeatable or a comma list." },
213
+ campaign: { type: "string", description: "Only chats linked to these Campaigns (mot_...), repeatable or a comma list; `none` for chats no Campaign links." },
214
+ person: { type: "string", description: "Only chats with this person: a Lead id (con_...) or a LinkedIn id (ACo...)." },
215
+ tag: { type: "string", description: "Only chats whose Lead has this tag; repeatable or a comma list." },
216
216
  unread: { type: "boolean", description: "--unread for unread chats only, --no-unread for read ones; omit for both." },
217
217
  "last-from": { type: "string", description: "Who wrote the last message: me or them." },
218
218
  type: { type: "string", description: "classic, inmail, sales_navigator or recruiter." },
@@ -224,7 +224,7 @@ var listCmd = defineCommand({
224
224
  var getCmd = defineCommand({
225
225
  meta: {
226
226
  name: "get",
227
- description: "One chat as the Unibox lists it, with `marked_unread` ({origin, at}, or null) and its Motion context.",
227
+ description: "One chat as the Unibox lists it, with `marked_unread` ({origin, at}, or null) and its Campaign context.",
228
228
  risk: "read",
229
229
  examples: ["curviate unibox get acc_YOUR_ACCOUNT_ID YOUR_CHAT_ID"]
230
230
  },
@@ -244,7 +244,7 @@ var unreadCmd = defineCommand({
244
244
  var messagesCmd = defineCommand({
245
245
  meta: {
246
246
  name: "messages",
247
- description: "Read one chat's messages, newest first. Each message carries `origin` when known: motion, unibox, api or linkedin.",
247
+ description: "Read one chat's messages, newest first. Each message carries `origin` when known: campaign, unibox, api or linkedin.",
248
248
  risk: "read",
249
249
  seeAlso: ["curviate core inbox messages"],
250
250
  examples: ["curviate unibox messages acc_YOUR_ACCOUNT_ID YOUR_CHAT_ID", "curviate unibox messages acc_YOUR_ACCOUNT_ID YOUR_CHAT_ID --all"]
@@ -297,45 +297,45 @@ var markCmd = defineCommand({
297
297
  var tagCmd = defineCommand({
298
298
  meta: {
299
299
  name: "tag",
300
- description: "Save the other person of a one-to-one chat as a Contact (or find the one you hold) and add tags, never removing any. Needs Automate.",
300
+ description: "Save the other person of a one-to-one chat as a Lead (or find the one you hold) and add tags, never removing any. Needs Automate.",
301
301
  risk: "write",
302
302
  rules: {
303
- changes: "Creates or finds the Contact and adds the tags.",
303
+ changes: "Creates or finds the Lead and adds the tags.",
304
304
  visible_to: "Your Team.",
305
305
  budget_rows: [],
306
- retry: "Safe to repeat: the same Contact, tags already there stay.",
307
- undo: "Remove the tags or the Contact with `curviate contact`."
306
+ retry: "Safe to repeat: the same Lead, tags already there stay.",
307
+ undo: "Remove the tags or the Lead with `curviate lead`."
308
308
  },
309
309
  errors: { ...AUTOMATE, ...ONE_TO_ONE },
310
310
  examples: ["curviate unibox tag acc_YOUR_ACCOUNT_ID YOUR_CHAT_ID --tag warm"]
311
311
  },
312
- args: { ...WRITE_SINGLE_FLAGS, accountId: ACCOUNT, chatId: CHAT, tag: { type: "string", description: "A tag to add; repeatable or a comma list. Omit to only save the Contact." } },
312
+ args: { ...WRITE_SINGLE_FLAGS, accountId: ACCOUNT, chatId: CHAT, tag: { type: "string", description: "A tag to add; repeatable or a comma list. Omit to only save the Lead." } },
313
313
  run: online(runTag)
314
314
  });
315
315
  var enrollCmd = defineCommand({
316
316
  meta: {
317
317
  name: "enroll",
318
- description: "Save the other person of a one-to-one chat as a Contact and enroll them in a Motion through this chat's Account (one of its sending Accounts). A direct add: the rule that skips people you already chat with does not apply; every other rule does. Needs Automate.",
318
+ description: "Save the other person of a one-to-one chat as a Lead and enroll them in a Campaign through this chat's Account (one of its sending Accounts). A direct add: the rule that skips people you already chat with does not apply; every other rule does. Needs Automate.",
319
319
  risk: "high",
320
320
  rules: {
321
- changes: "Creates the Enrollment; the Motion's Steps run for this person from this Account.",
321
+ changes: "Creates the Enrollment; the Campaign's Steps run for this person from this Account.",
322
322
  visible_to: "The person, once a Step reaches LinkedIn.",
323
323
  budget_rows: [],
324
324
  retry: "A second call answers that the person is already enrolled.",
325
325
  undo: "`curviate enrollment stop <enrollment_id>`; what was sent stays sent.",
326
326
  blast_radius: "One person, from one Account."
327
327
  },
328
- errors: { ...AUTOMATE, ...ONE_TO_ONE, ALREADY_ENROLLED_ON_ACCOUNT: "the person is already in this Motion on this Account." },
328
+ errors: { ...AUTOMATE, ...ONE_TO_ONE, ALREADY_ENROLLED_ON_ACCOUNT: "the person is already in this Campaign on this Account." },
329
329
  seeAlso: ["curviate enrollment get"],
330
- examples: ["curviate unibox enroll acc_YOUR_ACCOUNT_ID YOUR_CHAT_ID --motion mot_YOUR_MOTION_ID"]
330
+ examples: ["curviate unibox enroll acc_YOUR_ACCOUNT_ID YOUR_CHAT_ID --campaign mot_YOUR_CAMPAIGN_ID"]
331
331
  },
332
- args: { ...WRITE_SINGLE_FLAGS, accountId: ACCOUNT, chatId: CHAT, motion: { type: "string", required: true, description: "The Motion (mot_...)." } },
332
+ args: { ...WRITE_SINGLE_FLAGS, accountId: ACCOUNT, chatId: CHAT, campaign: { type: "string", required: true, description: "The Campaign (mot_...)." } },
333
333
  run: online(runEnroll)
334
334
  });
335
335
  var refreshCmd = defineCommand({
336
336
  meta: {
337
337
  name: "refresh",
338
- description: "Queue a re-read of the newest chats of each Account the inbox poll covers, or of --accounts; it runs within minutes. Once per Account in a short cooldown: a repeat answers cooldown with next_allowed_at. An Account without Sync full inbox is re-read for its Motion conversations only; one with neither answers not_synced. The poll keeps the Account's active hours: on a Team whose active days are Monday to Friday nothing is polled at the weekend, and a refresh then answers paused until the next active day. Needs Automate.",
338
+ description: "Queue a re-read of the newest chats of each Account the inbox poll covers, or of --accounts; it runs within minutes. Once per Account in a short cooldown: a repeat answers cooldown with next_allowed_at. An Account without Sync full inbox is re-read for its Campaign conversations only; one with neither answers not_synced. The poll keeps the Account's active hours: on a Team whose active days are Monday to Friday nothing is polled at the weekend, and a refresh then answers paused until the next active day. Needs Automate.",
339
339
  risk: "write",
340
340
  rules: {
341
341
  changes: "Queues one read of each Account's newest chats.",
@@ -363,10 +363,10 @@ var accountsCmd = defineCommand({
363
363
  var consentCmd = defineCommand({
364
364
  meta: {
365
365
  name: "consent",
366
- description: "Turn Sync full inbox on or off for one Account. Only the person who connected the Account can. On starts a paced listing that takes hours (needs Automate); off hides the Account's non-Motion chats at once and deletes them shortly after.",
366
+ description: "Turn Sync full inbox on or off for one Account. Only the person who connected the Account can. On starts a paced listing that takes hours (needs Automate); off hides the Account's non-Campaign chats at once and deletes them shortly after.",
367
367
  risk: "high",
368
368
  rules: {
369
- changes: "Copies the Account's whole inbox into the Unibox (on), or removes the non-Motion chats from it (off).",
369
+ changes: "Copies the Account's whole inbox into the Unibox (on), or removes the non-Campaign chats from it (off).",
370
370
  visible_to: "Your Team: every teammate who may operate the Account reads its whole inbox while on.",
371
371
  budget_rows: ["inbox_sync"],
372
372
  retry: "Safe to repeat: the same setting again.",
@@ -401,7 +401,7 @@ var uniboxCommand = defineCommand({
401
401
  consent: consentCmd
402
402
  },
403
403
  async run() {
404
- const { showHelp } = await import("./examples-KAMXHRLE.js");
404
+ const { showHelp } = await import("./examples-IGQJCSNL.js");
405
405
  await showHelp(uniboxCommand, ["curviate", "unibox"]);
406
406
  }
407
407
  });
@@ -5,7 +5,7 @@ import {
5
5
  outputOpts,
6
6
  rootClient,
7
7
  usage
8
- } from "./chunk-HOMRAZ6S.js";
8
+ } from "./chunk-UWRWZG4N.js";
9
9
  import {
10
10
  buildPreviewOutput
11
11
  } from "./chunk-TCUYH5GO.js";
@@ -20,7 +20,7 @@ import {
20
20
  readablePage,
21
21
  rejectPaginationModifiersWithoutAll,
22
22
  streamAll
23
- } from "./chunk-KXJJFHSD.js";
23
+ } from "./chunk-MIOEYSBQ.js";
24
24
  import {
25
25
  renderError,
26
26
  renderSuccess,
@@ -30,7 +30,7 @@ import {
30
30
  import {
31
31
  createClient,
32
32
  resolveEffectiveConfig
33
- } from "./chunk-N76WNJ5T.js";
33
+ } from "./chunk-7PLTQHNO.js";
34
34
  import {
35
35
  GLOBAL_FLAGS,
36
36
  READ_SINGLE_FLAGS,
@@ -39,10 +39,10 @@ import {
39
39
  } from "./chunk-QLKGOIWS.js";
40
40
  import {
41
41
  DESCRIPTIONS
42
- } from "./chunk-R4HS2MWM.js";
42
+ } from "./chunk-MWVTFTWV.js";
43
43
  import {
44
44
  readFileFlag
45
- } from "./chunk-62YAYAUI.js";
45
+ } from "./chunk-RKNW4UX4.js";
46
46
  import "./chunk-FDJMAF7D.js";
47
47
  import {
48
48
  isStdinToken
@@ -50,7 +50,7 @@ import {
50
50
 
51
51
  // src/commands/webhook-ops.ts
52
52
  import { defineCommand } from "citty";
53
- var SOURCES = ["messaging", "user", "account_status", "post", "motion"];
53
+ var SOURCES = ["messaging", "user", "account_status", "post", "campaign"];
54
54
  async function deliveryFields(f) {
55
55
  const body = {};
56
56
  if (f["template-file"] !== void 0) body["body_template"] = await readFileFlag("template-file", f["template-file"], { others: f });
@@ -71,14 +71,14 @@ var DELIVERY_ARGS = {
71
71
  stdinArg: true,
72
72
  description: "The delivery body as a JSON text with {{variables}} (`curviate webhook variables --source <source>`), from a path or - for stdin. Lint it offline first: `curviate webhook lint`."
73
73
  },
74
- "custom-events": { type: "string", description: "With motion.custom_event subscribed: deliver only these custom event names (comma list). Omit for every custom event." },
74
+ "custom-events": { type: "string", description: "With campaign.custom_event subscribed: deliver only these custom event names (comma list). Omit for every custom event." },
75
75
  header: {
76
76
  type: "string",
77
77
  description: "A custom header on every delivery, KEY:VALUE; repeatable, replaces the whole set. KEY alone keeps that header's stored value (values are never read back). Not covered by the signature."
78
78
  }
79
79
  };
80
80
  async function runLint(f) {
81
- const source = f.source ?? "motion";
81
+ const source = f.source ?? "campaign";
82
82
  if (!SOURCES.includes(source)) usage(`--source takes ${SOURCES.join(", ")}.`);
83
83
  if (f["template-file"] === void 0) usage("--template-file is required: a path, or - for stdin.");
84
84
  const text = await readFileFlag("template-file", f["template-file"], { others: f });
@@ -144,12 +144,12 @@ var webhookLintCommand = defineCommand({
144
144
  risk: "read",
145
145
  rules: { notes: ["Offline: no API call."] },
146
146
  output: ['Findings on stderr, one per line: <file>:<line>:<col> error <code>: <rule>. <hint> -> <docs_url>. With --json (or piped) stdout carries the WEBHOOK_TEMPLATE_INVALID shape, or {"errors": []}. Exit 2 on any finding.'],
147
- examples: ["curviate webhook lint --template-file body.json --source motion"]
147
+ examples: ["curviate webhook lint --template-file body.json --source campaign"]
148
148
  },
149
149
  args: {
150
150
  json: GLOBAL_FLAGS.json,
151
151
  "template-file": { ...DELIVERY_ARGS["template-file"], description: "The template, from a path or - for stdin." },
152
- source: { type: "string", description: `The webhook's source, which decides the variables: ${SOURCES.join(", ")} (default motion).` }
152
+ source: { type: "string", description: `The webhook's source, which decides the variables: ${SOURCES.join(", ")} (default campaign).` }
153
153
  },
154
154
  run: async ({ args }) => runLint(args)
155
155
  });
@@ -158,7 +158,7 @@ var webhookVariablesCommand = defineCommand({
158
158
  name: "variables",
159
159
  description: "The {{variables}} a body template may use for a source, with their types and an example.",
160
160
  risk: "read",
161
- examples: ["curviate webhook variables --source motion"]
161
+ examples: ["curviate webhook variables --source campaign"]
162
162
  },
163
163
  args: { ...readOnly(READ_SINGLE_FLAGS), source: { type: "string", description: `${SOURCES.join(", ")}.` } },
164
164
  run: online(runVariables)
@@ -259,7 +259,7 @@ function resolveOutputOpts(flags) {
259
259
  async function handleError(err, outOpts, out) {
260
260
  const { CurviateError } = await import("@curviate/sdk");
261
261
  if (err instanceof CurviateError) {
262
- const { getExitCode } = await import("./exit-codes-CYQHN4NE.js");
262
+ const { getExitCode } = await import("./exit-codes-ZSOLAXQO.js");
263
263
  renderError(err, outOpts, out);
264
264
  process.exit(getExitCode(err));
265
265
  }
@@ -268,7 +268,7 @@ async function handleError(err, outOpts, out) {
268
268
  }
269
269
  async function runWebhookCreate(client, flags, out) {
270
270
  if (!flags.source) {
271
- out.stderr.write("error: --source is required (messaging | user | account_status | post | motion).\n");
271
+ out.stderr.write("error: --source is required (messaging | user | account_status | post | campaign).\n");
272
272
  process.exit(2);
273
273
  }
274
274
  if (!flags["request-url"]) {
@@ -279,7 +279,7 @@ async function runWebhookCreate(client, flags, out) {
279
279
  source: flags.source,
280
280
  request_url: flags["request-url"]
281
281
  };
282
- for (const [flag, key, omitted] of [["account-ids", "account_ids", "omit the flag to cover every account you can operate"], ["motion-ids", "motion_ids", "omit the flag for every Motion"]]) {
282
+ for (const [flag, key, omitted] of [["account-ids", "account_ids", "omit the flag to cover every account you can operate"], ["campaign-ids", "campaign_ids", "omit the flag for every Campaign"]]) {
283
283
  if (flags[flag] === void 0) continue;
284
284
  const ids = flags[flag].split(",").map((s) => s.trim()).filter(Boolean);
285
285
  if (ids.length === 0) {
@@ -477,7 +477,7 @@ var webhookCreateCommand = defineCommand2({
477
477
  errors: { WEBHOOK_TEMPLATE_INVALID: "the body template is invalid: `curviate webhook lint` names every finding." },
478
478
  examples: [
479
479
  "curviate webhook create --source messaging --request-url https://example.com/hooks/curviate --account-ids acc_YOUR_ACCOUNT_ID",
480
- "curviate webhook create --source motion --request-url https://example.com/hooks/curviate --motion-ids mot_YOUR_MOTION_ID",
480
+ "curviate webhook create --source campaign --request-url https://example.com/hooks/curviate --campaign-ids mot_YOUR_CAMPAIGN_ID",
481
481
  "curviate webhook create --source account_status --request-url https://example.com/hooks/curviate --name status"
482
482
  ]
483
483
  },
@@ -486,12 +486,12 @@ var webhookCreateCommand = defineCommand2({
486
486
  ...DELIVERY_ARGS,
487
487
  source: {
488
488
  type: "string",
489
- description: "Event source: messaging | user | account_status | post (scheduled-post results: post.published, post.publish_failed) | motion (motion.status_changed, enrollment.started, enrollment.accepted, enrollment.replied, enrollment.skipped, enrollment.finished, step.failed, motion.custom_event; opt-in only, named in --events: step.executed, enrollment.seen, enrollment.reassigned).",
489
+ description: "Event source: messaging | user | account_status | post (scheduled-post results: post.published, post.publish_failed) | campaign (campaign.status_changed, enrollment.started, enrollment.accepted, enrollment.replied, enrollment.skipped, enrollment.finished, step.failed, campaign.custom_event; opt-in only, named in --events: step.executed, enrollment.seen, enrollment.reassigned).",
490
490
  required: true
491
491
  },
492
492
  "request-url": { type: "string", description: "HTTPS URL to receive webhook deliveries.", required: true },
493
493
  "account-ids": { type: "string", description: "Comma-separated account ids to target. Omit to cover every account you can operate, now and later." },
494
- "motion-ids": { type: "string", description: "Comma-separated Motion ids (mot_...): only events of these Motions are delivered, and events that carry no Motion are not. Omit for no filter." },
494
+ "campaign-ids": { type: "string", description: "Comma-separated Campaign ids (mot_...): only events of these Campaigns are delivered, and events that carry no Campaign are not. Omit for no filter." },
495
495
  name: { type: "string", description: "Human-readable name (up to 100 characters)." },
496
496
  enabled: { type: "boolean", description: "Create as enabled (default: true).", default: true },
497
497
  events: { type: "string", description: "Comma-separated event names to subscribe to." },
@@ -544,7 +544,7 @@ var webhookListCommand = defineCommand2({
544
544
  var webhookEventsCommand = defineCommand2({
545
545
  meta: {
546
546
  name: "events",
547
- description: "List the canonical webhook event catalogue. `chat.updated` always carries `chat_id`, plus `unread` and `origin` (unibox, api or linkedin) when the stored read state changed; a send from the Unibox or the API marks the chat read and reports it. Your own-message events (`message.read`, `message.reaction`, `message.edited`, `message.deleted`) carry `origin` (motion, unibox, api or linkedin); `message.received` never does.",
547
+ description: "List the canonical webhook event catalogue. `chat.updated` always carries `chat_id`, plus `unread` and `origin` (unibox, api or linkedin) when the stored read state changed; a send from the Unibox or the API marks the chat read and reports it. Your own-message events (`message.read`, `message.reaction`, `message.edited`, `message.deleted`) carry `origin` (campaign, unibox, api or linkedin); `message.received` never does.",
548
548
  risk: "read",
549
549
  examples: [
550
550
  "curviate webhook events"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curviate/cli",
3
- "version": "0.54.0",
3
+ "version": "0.56.0",
4
4
  "private": false,
5
5
  "description": "Official command-line interface for the Curviate API.",
6
6
  "license": "MIT",
@@ -47,7 +47,7 @@
47
47
  "clean": "rm -rf dist *.tsbuildinfo"
48
48
  },
49
49
  "dependencies": {
50
- "@curviate/sdk": "0.50.1",
50
+ "@curviate/sdk": "0.52.0",
51
51
  "citty": "^0.1.6",
52
52
  "open": "^10.1.0"
53
53
  },
@@ -1,46 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- DESCRIPTIONS,
4
- lazy
5
- } from "./chunk-R4HS2MWM.js";
6
-
7
- // src/commands/core.ts
8
- import { defineCommand } from "citty";
9
- var coreCommand = defineCommand({
10
- meta: {
11
- name: "core",
12
- description: DESCRIPTIONS.core,
13
- rules: {
14
- notes: [
15
- "Writes reach LinkedIn immediately and are seen by the people they touch.",
16
- "A retry after a timeout can repeat a write: requests carry no idempotency key. Read the current state before retrying.",
17
- "Budget rows, ceilings and what is left: `curviate account get <account_id>`."
18
- ]
19
- }
20
- },
21
- subCommands: {
22
- profile: lazy("profile", () => import("./profile-6RFJQMIB.js").then((m) => m.profileCommand)),
23
- company: lazy("company", () => import("./company-BRKFROPE.js").then((m) => m.companyCommand)),
24
- job: lazy("job", () => import("./job-WD3Z3P3Q.js").then((m) => m.jobCommand)),
25
- connect: lazy("connect", () => import("./connect-XVDQ5FTT.js").then((m) => m.connectCommand)),
26
- search: lazy("search", () => import("./search-45WRT5T3.js").then((m) => m.searchCommand)),
27
- inbox: lazy("inbox", () => import("./inbox-2YS7CTXH.js").then((m) => m.inboxCommand)),
28
- inboxes: lazy("inboxes", () => import("./inboxes-5RB3BGCQ.js").then((m) => m.inboxesCommand)),
29
- message: lazy("message", () => import("./message-WGS2IIDC.js").then((m) => m.messageCommand)),
30
- post: lazy("post", () => import("./post-3GH2IPO6.js").then((m) => m.postCommand)),
31
- comment: lazy("comment", () => import("./comment-ATVJOTWV.js").then((m) => m.commentCommand)),
32
- "sales-nav": lazy("sales-nav", () => import("./sales-nav-SLS3ABF4.js").then((m) => m.salesNavCommand)),
33
- recruiter: lazy("recruiter", () => import("./recruiter-GK3UNS62.js").then((m) => m.recruiterCommand)),
34
- group: lazy("group", () => import("./group-42ZE7K3K.js").then((m) => m.groupCommand)),
35
- feed: lazy("feed", () => import("./feed-ZC4FY4BA.js").then((m) => m.feedCommand)),
36
- notification: lazy("coreNotification", () => import("./notification-RLVF4NLJ.js").then((m) => m.notificationCommand)),
37
- draft: lazy("draft", () => import("./draft-DD3DTXBM.js").then((m) => m.draftCommand))
38
- },
39
- async run() {
40
- const { showHelp } = await import("./examples-KAMXHRLE.js");
41
- await showHelp(coreCommand, ["curviate", "core"]);
42
- }
43
- });
44
- export {
45
- coreCommand
46
- };