@audienti/cli 0.1.23 → 0.1.25

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 (3) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/package.json +1 -1
  3. package/src/cli.js +16 -10
package/CHANGELOG.md CHANGED
@@ -4,6 +4,18 @@ All notable changes to the Audienti CLI are documented here.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.1.25] - 2026-07-22
8
+
9
+ ### Added
10
+
11
+ - Add `bad_data_404` support to prospect disposition commands.
12
+
13
+ ## [0.1.24] - 2026-07-22
14
+
15
+ ### Changed
16
+
17
+ - Preserve operator outcome source metadata and return the authoritative disposition event for API nurture actions.
18
+
7
19
  ## [0.1.23] - 2026-07-21
8
20
 
9
21
  ### Changed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@audienti/cli",
3
- "version": "0.1.23",
3
+ "version": "0.1.25",
4
4
  "description": "Agent-first command-line client for Audienti.",
5
5
  "type": "module",
6
6
  "bin": {
package/src/cli.js CHANGED
@@ -30,15 +30,16 @@ const DEFAULT_PROFILE_IDENTIFIERS = [
30
30
  ];
31
31
  const DELETE_CONFIRMATION_VALUES = new Set(["yes", "true", "y"]);
32
32
  const MOTION_STATUS_VALUES = new Set(["draft", "preparing", "active", "paused", "archived"]);
33
- const PROSPECT_STATUS_VALUES = new Set(["active", "nurture", "non_responsive", "not_fit", "rejected"]);
33
+ const PROSPECT_INACTIVE_REASON_VALUES = new Set(["nurture", "non_responsive", "not_fit", "bad_data_404"]);
34
+ const PROSPECT_STATUS_VALUES = new Set(["active", ...PROSPECT_INACTIVE_REASON_VALUES, "rejected"]);
34
35
  const PROSPECTS_ADD_NOTE_USAGE = "Usage: audienti prospects add-note <prsp_id> (--message <text> [--type <note|steer|voicemail_outreach|video_outreach>] [--engagement-type <key>] | --payload <file.json>) [--json] [--account <acct_id>]";
35
36
  const PROSPECTS_ADD_STEER_USAGE = "Usage: audienti prospects add-steer <prsp_id> (--message <text> [--engagement-type <key>] | --payload <file.json>) [--json] [--account <acct_id>]";
36
37
  const PROSPECTS_ADD_PROFILE_USAGE = "Usage: audienti prospects add-profile <prsp_id> --url <profile_url|email|phone> [--json] [--account <acct_id>]";
37
38
  const PROSPECTS_REPORT_BAD_PROFILE_USAGE = "Usage: audienti prospects report-bad-profile <prsp_id> <prof_id|citation_id> [--json] [--account <acct_id>]";
38
39
  const PROSPECTS_ASSIGN_USAGE = "Usage: audienti prospects assign <prsp_id> [prsp_id...] --assigned-user <id|me|unassign> [--json] [--account <acct_id>]";
39
- const PROSPECTS_SET_STATUS_USAGE = "Usage: audienti prospects set-status <prsp_id> --status <active|nurture|non_responsive|not_fit|rejected> [--json] [--account <acct_id>]";
40
+ const PROSPECTS_SET_STATUS_USAGE = "Usage: audienti prospects set-status <prsp_id> --status <active|nurture|non_responsive|not_fit|bad_data_404|rejected> [--json] [--account <acct_id>]";
40
41
  const PROSPECTS_REJECT_USAGE = "Usage: audienti prospects reject <prsp_id> [--json] [--account <acct_id>]";
41
- const PROSPECTS_NURTURE_USAGE = "Usage: audienti prospects nurture <prsp_id> [--reason <nurture|non_responsive|not_fit>] [--json] [--account <acct_id>]";
42
+ const PROSPECTS_NURTURE_USAGE = "Usage: audienti prospects nurture <prsp_id> [--reason <nurture|non_responsive|not_fit|bad_data_404>] [--json] [--account <acct_id>]";
42
43
  const PROSPECTS_RESTORE_USAGE = "Usage: audienti prospects restore <prsp_id> [--json] [--account <acct_id>]";
43
44
  const PROSPECTS_LOCK_USAGE = "Usage: audienti prospects lock <prsp_id> [--note <text>] [--kind <protected_relationship|company_policy>] [--json] [--account <acct_id>]";
44
45
  const PROSPECTS_UNLOCK_USAGE = "Usage: audienti prospects unlock <prsp_id> [--json] [--account <acct_id>]";
@@ -1849,7 +1850,12 @@ async function prospectsDisposition(action, args, context, { accountOverride } =
1849
1850
  ...jsonOptions(),
1850
1851
  reason: { type: "string" }
1851
1852
  });
1852
- if (positionals.length !== 1 || (action !== "nurture" && values.reason)) {
1853
+ const inactiveReason = values.reason ? String(values.reason).trim() : undefined;
1854
+ if (
1855
+ positionals.length !== 1 ||
1856
+ (action !== "nurture" && inactiveReason) ||
1857
+ (action === "nurture" && inactiveReason && !PROSPECT_INACTIVE_REASON_VALUES.has(inactiveReason))
1858
+ ) {
1853
1859
  throw new CommandError(usageText);
1854
1860
  }
1855
1861
 
@@ -1859,7 +1865,7 @@ async function prospectsDisposition(action, args, context, { accountOverride } =
1859
1865
  await client.rejectProspect(accountId, prospectId) :
1860
1866
  action === "restore" ?
1861
1867
  await client.restoreProspect(accountId, prospectId) :
1862
- await client.nurtureProspect(accountId, prospectId, compactObject({ inactive_reason: values.reason }));
1868
+ await client.nurtureProspect(accountId, prospectId, compactObject({ inactive_reason: inactiveReason }));
1863
1869
  if (values.json) return writeJson(context.stdout, payload);
1864
1870
 
1865
1871
  renderProspectDisposition(payload, context, { action });
@@ -5372,7 +5378,7 @@ const HELP_TOPICS = new Map([
5372
5378
  " audienti prospects check [filters]",
5373
5379
  " audienti prospects show <prsp_id>",
5374
5380
  " audienti prospects assign <prsp_id> --assigned-user <id|me|unassign>",
5375
- " audienti prospects set-status <prsp_id> --status <active|nurture|non_responsive|not_fit|rejected>",
5381
+ " audienti prospects set-status <prsp_id> --status <active|nurture|non_responsive|not_fit|bad_data_404|rejected>",
5376
5382
  " audienti prospects lock <prsp_id> [--note <text>]",
5377
5383
  " audienti prospects reject <prsp_id>",
5378
5384
  " audienti prospects nurture <prsp_id> [--reason <reason>]",
@@ -6874,7 +6880,7 @@ const HELP_TOPICS = new Map([
6874
6880
  " audienti prospects check [--json|--csv] [filters]",
6875
6881
  " audienti prospects show <prsp_id> [--json]",
6876
6882
  " audienti prospects assign <prsp_id> [prsp_id...] --assigned-user <id|me|unassign> [--json]",
6877
- " audienti prospects set-status <prsp_id> --status <active|nurture|non_responsive|not_fit|rejected> [--json]",
6883
+ " audienti prospects set-status <prsp_id> --status <active|nurture|non_responsive|not_fit|bad_data_404|rejected> [--json]",
6878
6884
  " audienti prospects reject <prsp_id> [--json]",
6879
6885
  " audienti prospects nurture <prsp_id> [--reason <reason>] [--json]",
6880
6886
  " audienti prospects restore <prsp_id> [--json]",
@@ -7032,10 +7038,10 @@ const HELP_TOPICS = new Map([
7032
7038
  " Set the account-scoped prospect disposition directly, without routing through a motion.",
7033
7039
  "",
7034
7040
  "Input shape:",
7035
- " status: active | nurture | non_responsive | not_fit | rejected",
7041
+ " status: active | nurture | non_responsive | not_fit | bad_data_404 | rejected",
7036
7042
  "",
7037
7043
  "Behavior:",
7038
- " active restores the prospect, rejected uses the rejection/DNC path, and nurture/non_responsive/not_fit use the shared inactive disposition path.",
7044
+ " active restores the prospect, rejected uses the rejection/DNC path, and nurture/non_responsive/not_fit/bad_data_404 use the shared inactive disposition path.",
7039
7045
  "",
7040
7046
  "API:",
7041
7047
  " POST /api/v1/accounts/:account_id/prospects/:id/restore.json",
@@ -7079,7 +7085,7 @@ const HELP_TOPICS = new Map([
7079
7085
  " Move one prospect to an inactive nurture disposition through the shared disposition path.",
7080
7086
  "",
7081
7087
  "Input shape:",
7082
- " reason: nurture | non_responsive | not_fit. Defaults to nurture.",
7088
+ " reason: nurture | non_responsive | not_fit | bad_data_404. Defaults to nurture.",
7083
7089
  "",
7084
7090
  "API:",
7085
7091
  " POST /api/v1/accounts/:account_id/prospects/:id/nurture.json"