@curviate/cli 0.57.0 → 0.59.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 +114 -0
  2. package/README.md +9 -2
  3. package/dist/{account-IRIYB2SG.js → account-EUHYWIDH.js} +52 -16
  4. package/dist/{analytics-IRSCLVOL.js → analytics-SQQIMSLF.js} +6 -6
  5. package/dist/{beta-consent-NQVGFZL3.js → beta-consent-DFS7YMZR.js} +4 -4
  6. package/dist/billing-3FRIQFY3.js +19 -0
  7. package/dist/{chunk-OE4CY3ZL.js → chunk-5AJS2V4T.js} +1 -1
  8. package/dist/{chunk-AMTKGO37.js → chunk-5Z3CCE5N.js} +1 -1
  9. package/dist/{chunk-A6JGJGDF.js → chunk-72PYX57P.js} +16 -16
  10. package/dist/{billing-TCTP44ZB.js → chunk-7CSXYRSO.js} +125 -14
  11. package/dist/{chunk-SCUTAREU.js → chunk-EWSOIFG2.js} +17 -0
  12. package/dist/{chunk-3ZQNOKEK.js → chunk-F3FEY4D5.js} +2 -2
  13. package/dist/{chunk-F7CLAS5Y.js → chunk-HG2G5OAZ.js} +2 -2
  14. package/dist/{chunk-6OT6TS7N.js → chunk-HJ7YY4HE.js} +2 -2
  15. package/dist/{chunk-RKNW4UX4.js → chunk-JKOQX46J.js} +6 -0
  16. package/dist/{chunk-VHNF6OZD.js → chunk-JY26SUNH.js} +18 -2
  17. package/dist/{chunk-RXDG57B2.js → chunk-KD2XY7RS.js} +1 -1
  18. package/dist/{chunk-RTT75CXE.js → chunk-QRTMRTKA.js} +88 -15
  19. package/dist/{chunk-VPFV7YV3.js → chunk-R2MIDSMB.js} +6 -6
  20. package/dist/{chunk-AG6G3PRQ.js → chunk-TNLIV3SW.js} +17 -13
  21. package/dist/{chunk-3B5M2RUN.js → chunk-VKHAL6WT.js} +1 -1
  22. package/dist/{chunk-5LGKZBAY.js → chunk-ZC4S4B32.js} +4 -3
  23. package/dist/cli.js +33 -33
  24. package/dist/{comment-PNHEKGZX.js → comment-DA6XPY4F.js} +8 -8
  25. package/dist/{company-OUFF23SU.js → company-IWVNUBWS.js} +8 -8
  26. package/dist/{company-record-ULPDDB6L.js → company-record-ZJMW3NC6.js} +95 -10
  27. package/dist/{config-U6VDNL2P.js → config-P4HKPOCW.js} +2 -2
  28. package/dist/{connect-ICNXC37R.js → connect-AELFEVR7.js} +11 -11
  29. package/dist/{contact-K6RIVQWU.js → contact-FHN3A7MJ.js} +9 -9
  30. package/dist/{contact-groups-CNH2VB6A.js → contact-groups-HNZTN6I6.js} +11 -11
  31. package/dist/{contact-import-FK22UTN2.js → contact-import-PJFRLCHR.js} +11 -11
  32. package/dist/core-R7R44CVA.js +46 -0
  33. package/dist/{do-not-contact-BQHXNHTV.js → do-not-contact-KSH36NMT.js} +22 -20
  34. package/dist/{doctor-ZYPZF5BE.js → doctor-BEO4E227.js} +4 -4
  35. package/dist/{document-H65EXU4L.js → document-G6UND26L.js} +1 -1
  36. package/dist/{domain-HLOT6Y4A.js → domain-HF3WXWUT.js} +5 -5
  37. package/dist/{draft-JGQ36JSH.js → draft-2KBRHBBH.js} +5 -5
  38. package/dist/{enrollment-CF634DB4.js → enrollment-QPE54QQN.js} +14 -10
  39. package/dist/{examples-J4X5NEIE.js → examples-5FJS47QF.js} +2 -2
  40. package/dist/{exit-codes-P2FLCKM7.js → exit-codes-LQDMGDII.js} +1 -1
  41. package/dist/{export-ZQLDQYUZ.js → export-J4JQRE2A.js} +4 -4
  42. package/dist/{feed-RQHEDZVL.js → feed-PHF2ROIT.js} +6 -6
  43. package/dist/{group-LRMG76FN.js → group-SLXDOCHV.js} +6 -6
  44. package/dist/{inbox-5RGG5RQG.js → inbox-IDILZLPC.js} +6 -6
  45. package/dist/{inboxes-ZFY6ZP33.js → inboxes-QLP5PWTS.js} +6 -6
  46. package/dist/{incoming-3MJ4CP6H.js → incoming-XG6IBPU6.js} +8 -8
  47. package/dist/{job-QFIUTHHT.js → job-WUYHK6OX.js} +6 -6
  48. package/dist/{login-THXWX5HZ.js → login-3RIU257N.js} +2 -2
  49. package/dist/mailbox-CJRCYZGL.js +772 -0
  50. package/dist/{message-DM5OUKQS.js → message-EBVO4ZZI.js} +7 -7
  51. package/dist/{motion-NKOAK7NU.js → motion-7XQ3E4GI.js} +121 -16
  52. package/dist/{network-VKJUMZ2L.js → network-X5XL44GB.js} +12 -12
  53. package/dist/{notification-XW5J6KFA.js → notification-QNGHG5EO.js} +6 -6
  54. package/dist/{notifications-USYOV54R.js → notifications-MOLNELNE.js} +9 -9
  55. package/dist/{post-M2G3BK4A.js → post-XYSFN5OP.js} +8 -8
  56. package/dist/{profile-3SG64IEG.js → profile-7LJLU4Y5.js} +12 -12
  57. package/dist/{recruiter-7OUGZ776.js → recruiter-ALQNIRYR.js} +9 -9
  58. package/dist/{sales-nav-HHQLLM5C.js → sales-nav-HYZXNYCC.js} +9 -9
  59. package/dist/{search-5LMSLUH4.js → search-DNCPCFRR.js} +16 -16
  60. package/dist/{setup-6F4HYUSZ.js → setup-QI5FW6VD.js} +4 -4
  61. package/dist/{signal-LVODDBOY.js → signal-J2TLIT47.js} +126 -19
  62. package/dist/{team-MSOPELF6.js → team-PPPCJ5HT.js} +8 -8
  63. package/dist/{tier-RXHOAQ6L.js → tier-NFWWW34H.js} +4 -4
  64. package/dist/{unibox-UAA6WIGZ.js → unibox-52C7G5LK.js} +318 -16
  65. package/dist/{webhook-J2H7X766.js → webhook-J3JYMSY2.js} +12 -12
  66. package/package.json +3 -3
  67. package/dist/core-MPEBYNSL.js +0 -46
  68. package/dist/mailbox-54DPLNXA.js +0 -412
@@ -3,7 +3,7 @@ import {
3
3
  DEFAULT_FILTER_READERS,
4
4
  assembleFilters,
5
5
  splitCsv
6
- } from "./chunk-AMTKGO37.js";
6
+ } from "./chunk-5Z3CCE5N.js";
7
7
  import {
8
8
  resolveIdentifier
9
9
  } from "./chunk-UEAX6KUB.js";
@@ -16,10 +16,10 @@ import {
16
16
  AttachError,
17
17
  readAttachment,
18
18
  toAttachmentPayload
19
- } from "./chunk-VHNF6OZD.js";
19
+ } from "./chunk-JY26SUNH.js";
20
20
  import {
21
21
  requireAccount
22
- } from "./chunk-F7CLAS5Y.js";
22
+ } from "./chunk-HG2G5OAZ.js";
23
23
  import {
24
24
  buildPreviewOutput
25
25
  } from "./chunk-TCUYH5GO.js";
@@ -31,7 +31,7 @@ import {
31
31
  readablePage,
32
32
  rejectPaginationModifiersWithoutAll,
33
33
  streamAll
34
- } from "./chunk-OE4CY3ZL.js";
34
+ } from "./chunk-5AJS2V4T.js";
35
35
  import {
36
36
  renderError,
37
37
  renderSuccess,
@@ -41,7 +41,7 @@ import {
41
41
  import {
42
42
  createClient,
43
43
  resolveEffectiveConfig
44
- } from "./chunk-RXDG57B2.js";
44
+ } from "./chunk-KD2XY7RS.js";
45
45
  import {
46
46
  GLOBAL_FLAGS,
47
47
  READ_SINGLE_FLAGS,
@@ -50,11 +50,11 @@ import {
50
50
  } from "./chunk-QLKGOIWS.js";
51
51
  import {
52
52
  DESCRIPTIONS
53
- } from "./chunk-5LGKZBAY.js";
54
- import "./chunk-RKNW4UX4.js";
53
+ } from "./chunk-ZC4S4B32.js";
54
+ import "./chunk-JKOQX46J.js";
55
55
  import "./chunk-FDJMAF7D.js";
56
56
  import "./chunk-ZYURL5VK.js";
57
- import "./chunk-SCUTAREU.js";
57
+ import "./chunk-EWSOIFG2.js";
58
58
 
59
59
  // src/commands/sales-nav.ts
60
60
  import { defineCommand } from "citty";
@@ -78,7 +78,7 @@ function normalizeAttachPaths(attach) {
78
78
  async function handleSdkError(err, outOpts, out) {
79
79
  const { CurviateError } = await import("@curviate/sdk");
80
80
  if (err instanceof CurviateError) {
81
- const { getExitCode } = await import("./exit-codes-P2FLCKM7.js");
81
+ const { getExitCode } = await import("./exit-codes-LQDMGDII.js");
82
82
  renderError(err, outOpts, out);
83
83
  process.exit(getExitCode(err));
84
84
  }
@@ -3,7 +3,7 @@ import {
3
3
  DEFAULT_FILTER_READERS,
4
4
  assembleFilters,
5
5
  splitCsv
6
- } from "./chunk-AMTKGO37.js";
6
+ } from "./chunk-5Z3CCE5N.js";
7
7
  import {
8
8
  slimSearchCompanies,
9
9
  slimSearchCompaniesItem,
@@ -16,7 +16,7 @@ import {
16
16
  } from "./chunk-JXDEV33Z.js";
17
17
  import {
18
18
  requireAccount
19
- } from "./chunk-F7CLAS5Y.js";
19
+ } from "./chunk-HG2G5OAZ.js";
20
20
  import {
21
21
  intFlag,
22
22
  intListFlag
@@ -28,7 +28,7 @@ import {
28
28
  readablePage,
29
29
  rejectPaginationModifiersWithoutAll,
30
30
  streamAll
31
- } from "./chunk-OE4CY3ZL.js";
31
+ } from "./chunk-5AJS2V4T.js";
32
32
  import {
33
33
  renderError,
34
34
  renderSuccess,
@@ -38,18 +38,18 @@ import {
38
38
  import {
39
39
  createClient,
40
40
  resolveEffectiveConfig
41
- } from "./chunk-RXDG57B2.js";
41
+ } from "./chunk-KD2XY7RS.js";
42
42
  import {
43
43
  GLOBAL_FLAGS,
44
44
  readOnly
45
45
  } from "./chunk-QLKGOIWS.js";
46
46
  import {
47
47
  DESCRIPTIONS
48
- } from "./chunk-5LGKZBAY.js";
49
- import "./chunk-RKNW4UX4.js";
48
+ } from "./chunk-ZC4S4B32.js";
49
+ import "./chunk-JKOQX46J.js";
50
50
  import "./chunk-FDJMAF7D.js";
51
51
  import "./chunk-ZYURL5VK.js";
52
- import "./chunk-SCUTAREU.js";
52
+ import "./chunk-EWSOIFG2.js";
53
53
 
54
54
  // src/commands/search.ts
55
55
  import { defineCommand } from "citty";
@@ -226,7 +226,7 @@ async function runSearchPeople(client, flags, out, readers = DEFAULT_FILTER_READ
226
226
  } catch (err) {
227
227
  const { CurviateError } = await import("@curviate/sdk");
228
228
  if (err instanceof CurviateError) {
229
- const { getExitCode } = await import("./exit-codes-P2FLCKM7.js");
229
+ const { getExitCode } = await import("./exit-codes-LQDMGDII.js");
230
230
  renderError(err, outOpts, out);
231
231
  process.exit(getExitCode(err));
232
232
  }
@@ -268,7 +268,7 @@ async function runSearchCompanies(client, flags, out, readers = DEFAULT_FILTER_R
268
268
  } catch (err) {
269
269
  const { CurviateError } = await import("@curviate/sdk");
270
270
  if (err instanceof CurviateError) {
271
- const { getExitCode } = await import("./exit-codes-P2FLCKM7.js");
271
+ const { getExitCode } = await import("./exit-codes-LQDMGDII.js");
272
272
  renderError(err, outOpts, out);
273
273
  process.exit(getExitCode(err));
274
274
  }
@@ -310,7 +310,7 @@ async function runSearchPosts(client, flags, out, readers = DEFAULT_FILTER_READE
310
310
  } catch (err) {
311
311
  const { CurviateError } = await import("@curviate/sdk");
312
312
  if (err instanceof CurviateError) {
313
- const { getExitCode } = await import("./exit-codes-P2FLCKM7.js");
313
+ const { getExitCode } = await import("./exit-codes-LQDMGDII.js");
314
314
  renderError(err, outOpts, out);
315
315
  process.exit(getExitCode(err));
316
316
  }
@@ -352,7 +352,7 @@ async function runSearchJobs(client, flags, out, readers = DEFAULT_FILTER_READER
352
352
  } catch (err) {
353
353
  const { CurviateError } = await import("@curviate/sdk");
354
354
  if (err instanceof CurviateError) {
355
- const { getExitCode } = await import("./exit-codes-P2FLCKM7.js");
355
+ const { getExitCode } = await import("./exit-codes-LQDMGDII.js");
356
356
  renderError(err, outOpts, out);
357
357
  process.exit(getExitCode(err));
358
358
  }
@@ -400,7 +400,7 @@ async function runSearchParameters(client, flags, out) {
400
400
  } catch (err) {
401
401
  const { CurviateError } = await import("@curviate/sdk");
402
402
  if (err instanceof CurviateError) {
403
- const { getExitCode } = await import("./exit-codes-P2FLCKM7.js");
403
+ const { getExitCode } = await import("./exit-codes-LQDMGDII.js");
404
404
  renderError(err, outOpts, out);
405
405
  process.exit(getExitCode(err));
406
406
  }
@@ -442,7 +442,7 @@ async function runSearchGroups(client, flags, out) {
442
442
  } catch (err) {
443
443
  const { CurviateError } = await import("@curviate/sdk");
444
444
  if (err instanceof CurviateError) {
445
- const { getExitCode } = await import("./exit-codes-P2FLCKM7.js");
445
+ const { getExitCode } = await import("./exit-codes-LQDMGDII.js");
446
446
  renderError(err, outOpts, out);
447
447
  process.exit(getExitCode(err));
448
448
  }
@@ -486,7 +486,7 @@ async function runSearchServices(client, flags, out) {
486
486
  } catch (err) {
487
487
  const { CurviateError } = await import("@curviate/sdk");
488
488
  if (err instanceof CurviateError) {
489
- const { getExitCode } = await import("./exit-codes-P2FLCKM7.js");
489
+ const { getExitCode } = await import("./exit-codes-LQDMGDII.js");
490
490
  renderError(err, outOpts, out);
491
491
  process.exit(getExitCode(err));
492
492
  }
@@ -528,7 +528,7 @@ async function runSearchServiceParameters(client, flags, out) {
528
528
  } catch (err) {
529
529
  const { CurviateError } = await import("@curviate/sdk");
530
530
  if (err instanceof CurviateError) {
531
- const { getExitCode } = await import("./exit-codes-P2FLCKM7.js");
531
+ const { getExitCode } = await import("./exit-codes-LQDMGDII.js");
532
532
  renderError(err, outOpts, out);
533
533
  process.exit(getExitCode(err));
534
534
  }
@@ -567,7 +567,7 @@ async function runSearchFromUrl(client, flags, out) {
567
567
  } catch (err) {
568
568
  const { CurviateError } = await import("@curviate/sdk");
569
569
  if (err instanceof CurviateError) {
570
- const { getExitCode } = await import("./exit-codes-P2FLCKM7.js");
570
+ const { getExitCode } = await import("./exit-codes-LQDMGDII.js");
571
571
  renderError(err, outOpts, out);
572
572
  process.exit(getExitCode(err));
573
573
  }
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  readablePage
4
- } from "./chunk-OE4CY3ZL.js";
4
+ } from "./chunk-5AJS2V4T.js";
5
5
  import "./chunk-QM57YDJE.js";
6
6
  import {
7
7
  readlineSync
@@ -12,14 +12,14 @@ import {
12
12
  isPlainObject,
13
13
  resolveEffectiveConfig,
14
14
  writeProfile
15
- } from "./chunk-RXDG57B2.js";
15
+ } from "./chunk-KD2XY7RS.js";
16
16
  import {
17
17
  GLOBAL_FLAGS,
18
18
  getTeamFlag
19
19
  } from "./chunk-QLKGOIWS.js";
20
20
  import {
21
21
  DESCRIPTIONS
22
- } from "./chunk-5LGKZBAY.js";
22
+ } from "./chunk-ZC4S4B32.js";
23
23
  import {
24
24
  defaultReadStdin,
25
25
  isStdinToken,
@@ -27,7 +27,7 @@ import {
27
27
  } from "./chunk-ZYURL5VK.js";
28
28
  import {
29
29
  getExitCode
30
- } from "./chunk-SCUTAREU.js";
30
+ } from "./chunk-EWSOIFG2.js";
31
31
 
32
32
  // src/commands/setup.ts
33
33
  import { defineCommand } from "citty";
@@ -9,13 +9,13 @@ import {
9
9
  outputOpts,
10
10
  rootClient,
11
11
  usage
12
- } from "./chunk-3ZQNOKEK.js";
13
- import {
14
- intFlag
15
- } from "./chunk-NNV2OYEF.js";
12
+ } from "./chunk-F3FEY4D5.js";
16
13
  import {
17
14
  buildPreviewOutput
18
15
  } from "./chunk-TCUYH5GO.js";
16
+ import {
17
+ intFlag
18
+ } from "./chunk-NNV2OYEF.js";
19
19
  import {
20
20
  pageDelayFromFlags,
21
21
  readCursorFlag,
@@ -24,12 +24,12 @@ import {
24
24
  readablePage,
25
25
  rejectPaginationModifiersWithoutAll,
26
26
  streamAll
27
- } from "./chunk-OE4CY3ZL.js";
27
+ } from "./chunk-5AJS2V4T.js";
28
28
  import {
29
29
  renderSuccess,
30
30
  writeNdjsonItem
31
31
  } from "./chunk-QM57YDJE.js";
32
- import "./chunk-RXDG57B2.js";
32
+ import "./chunk-KD2XY7RS.js";
33
33
  import {
34
34
  GLOBAL_FLAGS,
35
35
  READ_SINGLE_FLAGS,
@@ -38,13 +38,14 @@ import {
38
38
  } from "./chunk-QLKGOIWS.js";
39
39
  import {
40
40
  DESCRIPTIONS
41
- } from "./chunk-5LGKZBAY.js";
41
+ } from "./chunk-ZC4S4B32.js";
42
42
  import "./chunk-ZYURL5VK.js";
43
43
 
44
44
  // src/commands/signal.ts
45
45
  import { defineCommand } from "citty";
46
46
  var KINDS = ["post_engaged", "post_reposted", "network_posted", "profile_viewed", "followed_you", "mentioned_you", "connection_added", "post_engaged.reaction", "post_engaged.comment"];
47
47
  var MATCHES = ["lead", "connection", "followed", "unknown", "anonymous"];
48
+ var OUTCOMES = ["added_to_list", "already_in_list", "event_sent", "skipped"];
48
49
  var online = (fn) => async ({ args }) => {
49
50
  const f = args;
50
51
  await fn(await rootClient(f), f);
@@ -134,15 +135,34 @@ function ruleBody(f, create) {
134
135
  }
135
136
  const outcomes = [];
136
137
  if (f["add-to-list"] !== void 0) outcomes.push({ type: "add_to_list", list_id: nonEmpty("--add-to-list", f["add-to-list"]) });
138
+ if (f.enroll !== void 0) outcomes.push({ type: "enroll", campaign_id: nonEmpty("--enroll", f.enroll) });
137
139
  if (f["send-event"]) outcomes.push({ type: "send_event" });
138
140
  if (outcomes.length) body["outcomes"] = outcomes;
141
+ if (f["act-on-last-7-days"]) {
142
+ if (!create) usage("--act-on-last-7-days goes with `signal rules create` only.");
143
+ body["act_on_last_7_days"] = true;
144
+ }
139
145
  if (create) {
140
146
  if (body["name"] === void 0) usage("--name is required: the rule's name, 1 to 100 characters.");
141
147
  if (body["kinds"] === void 0) usage("--kind is required: the Signal kinds the rule acts on, repeatable or a comma list.");
142
- if (!outcomes.length) usage("pass --add-to-list <cl_...>, --send-event, or both: what the rule does.");
143
- } else if (!Object.keys(body).length) usage("pass what changes: --name, --kind, --accounts, --all-accounts, --add-to-list, --send-event, --unknown-people, --on or --off.");
148
+ if (!outcomes.length) usage("pass --add-to-list <cl_...>, --enroll <mot_...>, --send-event, or several: what the rule does.");
149
+ } else if (!Object.keys(body).length) usage("pass what changes: --name, --kind, --accounts, --all-accounts, --add-to-list, --enroll, --send-event, --unknown-people, --on or --off.");
144
150
  return body;
145
151
  }
152
+ async function runActions(c, f) {
153
+ const q = {};
154
+ if (f["lead-id"] !== void 0) q["lead_id"] = f["lead-id"];
155
+ if (f["rule-id"] !== void 0) q["rule_id"] = f["rule-id"];
156
+ if (f.outcome !== void 0) {
157
+ if (!OUTCOMES.includes(f.outcome)) usage(`--outcome takes one of ${OUTCOMES.join(", ")}.`);
158
+ q["outcome"] = f.outcome;
159
+ }
160
+ try {
161
+ await paged(f, q, (p) => c.signals.actions(p), (items) => print(table(["SIGNAL", "RULE", "LEAD", "OUTCOME", "AT"], items.map((i) => [i["signal_id"], i["rule_id"], i["lead_id"], i["reason"] ? `${String(i["outcome"])} (${String(i["reason"])})` : i["outcome"], i["created_at"]]))));
162
+ } catch (err) {
163
+ await fail(err, f);
164
+ }
165
+ }
146
166
  var ID = { type: "positional", description: "Signal id (sig_...)." };
147
167
  var RULE_ID = { type: "positional", description: "Rule id (sgr_...)." };
148
168
  var listCmd = defineCommand({
@@ -151,7 +171,7 @@ var listCmd = defineCommand({
151
171
  description: "The Signals of the Accounts you may operate, newest first, at most 7 days old and only for Accounts whose Signal watch is on. Filter by --kind, --account-id, --match (lead, connection, followed, unknown, anonymous), --listed and --since. No LinkedIn call.",
152
172
  risk: "read",
153
173
  output: ["A table of Signal, kind, Account, person and when it happened; --json (or piped) prints the API page."],
154
- seeAlso: ["curviate signal watch", "curviate signal rules list"],
174
+ seeAlso: ["curviate signal watch list", "curviate signal rules list"],
155
175
  examples: ["curviate signal list", "curviate signal list --kind profile_viewed --match lead", "curviate signal list --since 2026-11-17T00:00:00Z --all"]
156
176
  },
157
177
  args: {
@@ -170,20 +190,80 @@ var getCmd = defineCommand({
170
190
  args: { ...readOnly(READ_SINGLE_FLAGS), id: ID },
171
191
  run: online((c, f) => one(f, () => c.signals.get(nonEmpty("the Signal id", f.id))))
172
192
  });
193
+ var actionsCmd = defineCommand({
194
+ meta: {
195
+ name: "actions",
196
+ description: "What Signal rules did, newest first: added_to_list, already_in_list, event_sent, or skipped with its reason. Records stay while the Lead exists, after the Signal is gone. Filter by --lead-id, --rule-id and --outcome. Every role; only the Accounts you may operate. No LinkedIn call.",
197
+ risk: "read",
198
+ output: ["A table of Signal, rule, Lead, outcome and when; --json (or piped) prints the API page."],
199
+ seeAlso: ["curviate signal rules list", "curviate signal list"],
200
+ examples: ["curviate signal actions", "curviate signal actions --outcome skipped", "curviate signal actions --rule-id sgr_YOUR_RULE_ID --all"]
201
+ },
202
+ args: {
203
+ ...readOnly(GLOBAL_FLAGS),
204
+ limit: { ...GLOBAL_FLAGS.limit, description: "Records per page (1 to 100)." },
205
+ "lead-id": { type: "string", description: "Only what rules did for this Lead (con_...)." },
206
+ "rule-id": { type: "string", description: "Only what this rule did (sgr_...)." },
207
+ outcome: { type: "string", description: "Only this outcome: added_to_list, already_in_list, event_sent or skipped." }
208
+ },
209
+ run: online(runActions)
210
+ });
173
211
  var kindsCmd = defineCommand({
174
212
  meta: { name: "kinds", description: "Every Signal kind with its sub-kinds, the follow-up read a card of that kind can trigger (engagers, viewers or none), whether it is on for your Team, and the limit rows it uses.", risk: "read", examples: ["curviate signal kinds"] },
175
213
  args: readOnly(READ_SINGLE_FLAGS),
176
214
  run: online((c, f) => one(f, () => c.signals.kinds()))
177
215
  });
178
- var watchCmd = defineCommand({
216
+ var watchSetCmd = defineCommand({
179
217
  meta: {
180
- name: "watch",
218
+ name: "set",
219
+ description: "Switch one Account's Signal watch on or off. Off is the default, and this is the only way an Account becomes watched: once a day, inside its Active hours, Curviate reads its notifications and turns them into Signals. Off stops it from the next plan on; the Signals already stored stay until they are 7 days old. An Account that needs reconnecting can be switched on and reads paused until it is reconnected. Owners and Managers. The switch itself makes no LinkedIn call.",
220
+ risk: "write",
221
+ rules: {
222
+ changes: "Whether this Account's daily visit reads its notifications into Signals, from its next plan on.",
223
+ visible_to: "Your Team. On LinkedIn, the watch reads what the Account's own notifications show, like a person opening them.",
224
+ budget_rows: [],
225
+ retry: "Safe to repeat: the same state again.",
226
+ undo: "Run it again with the other value."
227
+ },
228
+ errors: { INSUFFICIENT_ROLE: "only an Owner or a Manager switches the Signal watch.", ACCOUNT_NOT_FOUND: "the Account is not one you may operate, or not this Team's." },
229
+ seeAlso: ["curviate signal watch list", "curviate signal list"],
230
+ examples: ["curviate signal watch set acc_YOUR_ACCOUNT_ID on", "curviate signal watch set acc_YOUR_ACCOUNT_ID off"]
231
+ },
232
+ args: {
233
+ ...WRITE_SINGLE_FLAGS,
234
+ account: { type: "positional", description: "The Account (acc_...)." },
235
+ state: { type: "positional", description: "on or off." }
236
+ },
237
+ run: async ({ args }) => {
238
+ const f = args;
239
+ const account = nonEmpty("the Account id", f.account);
240
+ const on = onOff("state", f.state);
241
+ if (on === void 0) usage("say on or off: `curviate signal watch set <account_id> on`.");
242
+ const body = { signal_watch: on };
243
+ if (f.preview) return void preview("signals.setWatch", { account_id: account }, body);
244
+ await one(f, async () => (await rootClient(f)).signals.setWatch(account, body));
245
+ }
246
+ });
247
+ var watchListCmd = defineCommand({
248
+ meta: {
249
+ name: "list",
181
250
  description: "For each Account you may operate: whether its Signal watch is on, its state (watching, paused with a reason, or off, the default), its last visit and today's visits and reads. No LinkedIn call.",
182
251
  risk: "read",
183
- examples: ["curviate signal watch"]
252
+ seeAlso: ["curviate signal watch set"],
253
+ examples: ["curviate signal watch list"]
254
+ },
255
+ args: readOnly(READ_SINGLE_FLAGS),
256
+ run: online(runWatch)
257
+ });
258
+ var watchCmd = defineCommand({
259
+ meta: {
260
+ name: "watch",
261
+ description: "Each Account's Signal watch: `list` reads every Account's state (bare `signal watch` does too), `set <account_id> on|off` switches one."
184
262
  },
185
263
  args: readOnly(READ_SINGLE_FLAGS),
264
+ subCommands: { list: watchListCmd, set: watchSetCmd },
186
265
  run: online(runWatch)
266
+ // bare `signal watch` keeps listing, as before the switch existed
187
267
  });
188
268
  var settingsCmd = defineCommand({
189
269
  meta: {
@@ -218,6 +298,7 @@ var RULE_FLAGS = {
218
298
  accounts: { type: "string", description: "Only these Accounts (acc_...), a comma list. Default on create: every Account of the Team, now and later." },
219
299
  "all-accounts": { type: "boolean", description: "Every Account of the Team, now and later." },
220
300
  "add-to-list": { type: "string", description: "Outcome: add the person to this Lead list (cl_...)." },
301
+ enroll: { type: "string", description: "Outcome: enroll the person in this Campaign (mot_...) through the Account that caught the Signal." },
221
302
  "send-event": { type: "boolean", description: "Outcome: send signal.matched to your webhooks." },
222
303
  "unknown-people": { type: "string", description: "skip (default): a person Curviate knows nothing about is skipped. visit_profile: read their profile once; the person may see the visit." },
223
304
  on: { type: "boolean", description: "Turn the rule on." },
@@ -227,8 +308,32 @@ var RULE_ERRORS = {
227
308
  INSUFFICIENT_ROLE: "your role does not allow adding Leads to a Lead list, which the rule does.",
228
309
  ACCOUNT_NOT_SHARED: "--accounts names an Account you may not operate."
229
310
  };
311
+ var switchCmd = (name) => defineCommand({
312
+ meta: {
313
+ name,
314
+ description: name === "enable" ? "Turn a rule on: it acts on every matching Signal from now on." : "Turn a rule off: it acts on no Signal until it is enabled again. What it did stays.",
315
+ risk: "write",
316
+ rules: {
317
+ changes: name === "enable" ? "The rule acts again, from the next Signal on." : "The rule stops acting, from the next Signal on.",
318
+ visible_to: "Your Team.",
319
+ budget_rows: [],
320
+ retry: "Safe to repeat: the same state again.",
321
+ undo: `\`curviate signal rules ${name === "enable" ? "disable" : "enable"} <rule_id>\`.`
322
+ },
323
+ errors: RULE_ERRORS,
324
+ examples: [`curviate signal rules ${name} sgr_YOUR_RULE_ID`]
325
+ },
326
+ args: { ...WRITE_SINGLE_FLAGS, id: RULE_ID },
327
+ run: async ({ args }) => {
328
+ const f = args;
329
+ const id = nonEmpty("the rule id", f.id);
330
+ const body = { enabled: name === "enable" };
331
+ if (f.preview) return void preview("signals.rules.update", { id }, body);
332
+ await one(f, async () => (await rootClient(f)).signals.rules.update(id, body));
333
+ }
334
+ });
230
335
  var rulesCmd = defineCommand({
231
- meta: { name: "rules", description: "Signal rules: what happens to a person when a Signal of a kind arrives on an Account (add them to a Lead list, send signal.matched to your webhooks)." },
336
+ meta: { name: "rules", description: "Signal rules: what happens to a person when a Signal of a kind arrives on an Account (add them to a Lead list, enroll them in a Campaign, send signal.matched to your webhooks)." },
232
337
  subCommands: {
233
338
  list: defineCommand({
234
339
  meta: { name: "list", description: "This Team's rules, newest first, each with its one-sentence summary. Every role may read them.", risk: "read", examples: ["curviate signal rules list", "curviate signal rules list --no-enabled"] },
@@ -251,10 +356,10 @@ var rulesCmd = defineCommand({
251
356
  create: defineCommand({
252
357
  meta: {
253
358
  name: "create",
254
- description: "Create a rule: for --kind on --accounts (default every Account), add the person to a Lead list (--add-to-list) and/or send signal.matched to your webhooks (--send-event). --unknown-people visit_profile reads the profile of a person Curviate does not know, once; the person may see the visit. The answer's summary is the rule as one sentence.",
359
+ description: "Create a rule: for --kind on --accounts (default every Account), add the person to a Lead list (--add-to-list), enroll them in a Campaign through the Account that caught the Signal (--enroll) and/or send signal.matched to your webhooks (--send-event). --unknown-people visit_profile reads the profile of a person Curviate does not know, once; the person may see the visit. --act-on-last-7-days also acts, once, on the Team's Signals of the last 7 days. The answer's summary is the rule as one sentence.",
255
360
  risk: "write",
256
361
  rules: {
257
- changes: "A rule that acts on every matching Signal from now on: Leads join the list, events are sent.",
362
+ changes: "A rule that acts on every matching Signal from now on: Leads join the list or the Campaign, events are sent.",
258
363
  visible_to: "Your Team; with --unknown-people visit_profile, the people whose profiles are read.",
259
364
  budget_rows: [],
260
365
  retry: "A second call creates a second rule: list them first.",
@@ -263,7 +368,7 @@ var rulesCmd = defineCommand({
263
368
  errors: RULE_ERRORS,
264
369
  examples: ['curviate signal rules create --name "Viewers to list" --kind profile_viewed --add-to-list cl_YOUR_LIST_ID', 'curviate signal rules create --name "Engagers" --kind post_engaged --send-event --accounts acc_YOUR_ACCOUNT_ID']
265
370
  },
266
- args: { ...WRITE_SINGLE_FLAGS, ...RULE_FLAGS },
371
+ args: { ...WRITE_SINGLE_FLAGS, ...RULE_FLAGS, "act-on-last-7-days": { type: "boolean", description: "Also act, once, on the Team's Signals of the last 7 days." } },
267
372
  run: async ({ args }) => {
268
373
  const f = args;
269
374
  const body = ruleBody(f, true);
@@ -295,6 +400,8 @@ var rulesCmd = defineCommand({
295
400
  await one(f, async () => (await rootClient(f)).signals.rules.update(id, body));
296
401
  }
297
402
  }),
403
+ enable: switchCmd("enable"),
404
+ disable: switchCmd("disable"),
298
405
  delete: defineCommand({
299
406
  meta: {
300
407
  name: "delete",
@@ -320,9 +427,9 @@ var rulesCmd = defineCommand({
320
427
  });
321
428
  var signalCommand = defineCommand({
322
429
  meta: { name: "signal", description: DESCRIPTIONS.signal },
323
- subCommands: { list: listCmd, get: getCmd, kinds: kindsCmd, watch: watchCmd, settings: settingsCmd, rules: rulesCmd },
430
+ subCommands: { list: listCmd, get: getCmd, actions: actionsCmd, kinds: kindsCmd, watch: watchCmd, settings: settingsCmd, rules: rulesCmd },
324
431
  async run() {
325
- const { showHelp } = await import("./examples-J4X5NEIE.js");
432
+ const { showHelp } = await import("./examples-5FJS47QF.js");
326
433
  await showHelp(signalCommand, ["curviate", "signal"]);
327
434
  }
328
435
  });
@@ -5,13 +5,13 @@ import {
5
5
  outputOpts,
6
6
  rootClient,
7
7
  usage
8
- } from "./chunk-3ZQNOKEK.js";
9
- import {
10
- intFlag
11
- } from "./chunk-NNV2OYEF.js";
8
+ } from "./chunk-F3FEY4D5.js";
12
9
  import {
13
10
  buildPreviewOutput
14
11
  } from "./chunk-TCUYH5GO.js";
12
+ import {
13
+ intFlag
14
+ } from "./chunk-NNV2OYEF.js";
15
15
  import {
16
16
  pageDelayFromFlags,
17
17
  readCursorFlag,
@@ -20,7 +20,7 @@ import {
20
20
  readablePage,
21
21
  rejectPaginationModifiersWithoutAll,
22
22
  streamAll
23
- } from "./chunk-OE4CY3ZL.js";
23
+ } from "./chunk-5AJS2V4T.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-RXDG57B2.js";
33
+ } from "./chunk-KD2XY7RS.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-5LGKZBAY.js";
42
+ } from "./chunk-ZC4S4B32.js";
43
43
  import "./chunk-ZYURL5VK.js";
44
44
 
45
45
  // src/commands/team.ts
@@ -495,7 +495,7 @@ var teamCommand = defineCommand({
495
495
  seats: seatsCmd
496
496
  },
497
497
  async run() {
498
- const { showHelp } = await import("./examples-J4X5NEIE.js");
498
+ const { showHelp } = await import("./examples-5FJS47QF.js");
499
499
  await showHelp(teamCommand, ["curviate", "team"]);
500
500
  }
501
501
  });
@@ -3,21 +3,21 @@ import {
3
3
  fail,
4
4
  outputOpts,
5
5
  rootClient
6
- } from "./chunk-3ZQNOKEK.js";
6
+ } from "./chunk-F3FEY4D5.js";
7
7
  import {
8
8
  readableObject
9
- } from "./chunk-OE4CY3ZL.js";
9
+ } from "./chunk-5AJS2V4T.js";
10
10
  import {
11
11
  renderSuccess
12
12
  } from "./chunk-QM57YDJE.js";
13
- import "./chunk-RXDG57B2.js";
13
+ import "./chunk-KD2XY7RS.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-5LGKZBAY.js";
20
+ } from "./chunk-ZC4S4B32.js";
21
21
  import "./chunk-ZYURL5VK.js";
22
22
 
23
23
  // src/commands/tier.ts