@chainpatrol/cli 0.24.0 → 0.27.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 (45) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/{breakdown-XA6UUD3T.js → breakdown-5DJMXRK4.js} +2 -2
  3. package/dist/{check-NQZPNAUF.js → check-5P3EXVSN.js} +1 -2
  4. package/dist/chunk-MM5OAY2U.js +317 -0
  5. package/dist/chunk-OFUIYMPD.js +64 -0
  6. package/dist/{chunk-DVNTYW7L.js → chunk-PEX2A3IL.js} +1 -1
  7. package/dist/cli.js +38 -38
  8. package/dist/{configs-update-VDZVBTIF.js → configs-update-TAYT4JTU.js} +1 -2
  9. package/dist/{create-DGCWT2YJ.js → create-UXRULUR7.js} +1 -2
  10. package/dist/{drift-YZHCIQ5O.js → drift-TCZELVHO.js} +1 -2
  11. package/dist/{found-6JAOLM6M.js → found-NCP6H2SD.js} +2 -2
  12. package/dist/{get-RC75EJFC.js → get-2PCG3CQN.js} +24 -8
  13. package/dist/{healthcheck-7YWSOY6Y.js → healthcheck-5YEZCTXC.js} +1 -2
  14. package/dist/{list-IDR7WH5J.js → list-23C72EH4.js} +3 -3
  15. package/dist/{list-4HX2R7HU.js → list-2RHEVI2T.js} +1 -2
  16. package/dist/list-FZD2FGJA.js +83 -0
  17. package/dist/{list-4KIZLIVN.js → list-GEJQ6N2Y.js} +1 -2
  18. package/dist/{list-SRVNEUHC.js → list-JG2R7EHK.js} +24 -12
  19. package/dist/{list-WQFDRXHD.js → list-MPSB2DYU.js} +1 -2
  20. package/dist/{list-EJDWUF6W.js → list-QJYRXPXM.js} +1 -2
  21. package/dist/{list-UDT5MDQZ.js → list-QLMFMYU6.js} +1 -2
  22. package/dist/{list-YNQ6VSYV.js → list-SCA73PLA.js} +1 -2
  23. package/dist/{list-ZBC53OYA.js → list-TA4HYD66.js} +1 -2
  24. package/dist/{list-735RYNAF.js → list-TULFPPG3.js} +1 -2
  25. package/dist/{list-Q3MMBL4Y.js → list-W6JZUNS2.js} +1 -2
  26. package/dist/{list-json-7FDHNRYP.js → list-json-NJ5IFRDE.js} +1 -2
  27. package/dist/{login-AMEXCOGT.js → login-2NRI3ECY.js} +2 -2
  28. package/dist/{login-json-MPLXCSP4.js → login-json-HOCNSQQ7.js} +2 -2
  29. package/dist/{login-plain-NIJDS3D2.js → login-plain-6ZJF5KA7.js} +2 -2
  30. package/dist/{organization-NEZA6JX2.js → organization-N6RMWKJM.js} +2 -2
  31. package/dist/{run-CCVJIK7L.js → run-KOZXEYTL.js} +1 -2
  32. package/dist/{run-5QV3YD7V.js → run-SE2SUE64.js} +1 -2
  33. package/dist/{run-JLTNFOJK.js → run-TUADYLU7.js} +3 -3
  34. package/dist/{search-JXJLBV43.js → search-5DOXBWPB.js} +1 -2
  35. package/dist/{search-ZXTJPVM6.js → search-Y37B2JVP.js} +1 -2
  36. package/dist/{setup-skill-CSKNZVG2.js → setup-skill-RRTDEOR4.js} +1 -1
  37. package/dist/{snapshot-NYOLPGRW.js → snapshot-RFGSAHO7.js} +1 -2
  38. package/dist/{summary-FE6ROSOO.js → summary-XCN3DRYP.js} +2 -2
  39. package/dist/{validate-RPQEEQ36.js → validate-OYTNB2ZM.js} +1 -2
  40. package/dist/{whoami-ZIWZCBGI.js → whoami-5WCW3FOZ.js} +1 -2
  41. package/package.json +2 -1
  42. package/dist/chunk-4RKRCENC.js +0 -1964
  43. package/dist/chunk-GOQL7UCG.js +0 -422
  44. package/dist/list-ZARZ72DG.js +0 -64
  45. package/dist/{chunk-PZV55KAR.js → chunk-GGBG2R63.js} +3 -3
package/dist/cli.js CHANGED
@@ -13,7 +13,7 @@ import {
13
13
  getCliVersion,
14
14
  isSkillInstalled,
15
15
  readInstalledSkillVersion
16
- } from "./chunk-4RKRCENC.js";
16
+ } from "./chunk-MM5OAY2U.js";
17
17
  import "./chunk-6VTWWGNV.js";
18
18
  import {
19
19
  DateTime
@@ -1093,12 +1093,12 @@ function parseAttachmentUrls() {
1093
1093
  }
1094
1094
  async function handleConfigsList(org) {
1095
1095
  if (jsonMode) {
1096
- const { listConfigsJson } = await import("./list-json-7FDHNRYP.js");
1096
+ const { listConfigsJson } = await import("./list-json-NJ5IFRDE.js");
1097
1097
  await listConfigsJson({ org });
1098
1098
  return;
1099
1099
  }
1100
1100
  const { render } = await import("ink");
1101
- const { default: ConfigsList } = await import("./list-4HX2R7HU.js");
1101
+ const { default: ConfigsList } = await import("./list-2RHEVI2T.js");
1102
1102
  const { default: React } = await import("react");
1103
1103
  render(React.createElement(ConfigsList, { org }));
1104
1104
  }
@@ -1153,14 +1153,14 @@ async function main() {
1153
1153
  );
1154
1154
  }
1155
1155
  if (jsonMode) {
1156
- const { loginJson } = await import("./login-json-MPLXCSP4.js");
1156
+ const { loginJson } = await import("./login-json-HOCNSQQ7.js");
1157
1157
  await loginJson();
1158
1158
  } else if (!process.stdout.isTTY) {
1159
- const { loginPlain } = await import("./login-plain-NIJDS3D2.js");
1159
+ const { loginPlain } = await import("./login-plain-6ZJF5KA7.js");
1160
1160
  await loginPlain();
1161
1161
  } else {
1162
1162
  const { render } = await import("ink");
1163
- const { default: Login } = await import("./login-AMEXCOGT.js");
1163
+ const { default: Login } = await import("./login-2NRI3ECY.js");
1164
1164
  const { default: React } = await import("react");
1165
1165
  render(React.createElement(Login));
1166
1166
  }
@@ -1198,7 +1198,7 @@ async function main() {
1198
1198
  const positionals = cli.input.slice(2);
1199
1199
  const flagAssets = parseAssetInputs();
1200
1200
  const contents = [...positionals, ...flagAssets];
1201
- const { runAssetCheck } = await import("./check-NQZPNAUF.js");
1201
+ const { runAssetCheck } = await import("./check-5P3EXVSN.js");
1202
1202
  await runAssetCheck({
1203
1203
  contents,
1204
1204
  json: jsonMode,
@@ -1208,7 +1208,7 @@ async function main() {
1208
1208
  break;
1209
1209
  }
1210
1210
  if (subcommand === "list") {
1211
- const { runAssetList } = await import("./list-4KIZLIVN.js");
1211
+ const { runAssetList } = await import("./list-GEJQ6N2Y.js");
1212
1212
  await runAssetList({
1213
1213
  type: cli.flags.type ?? cli.flags.assetType,
1214
1214
  status: cli.flags.assetStatus ?? cli.flags.status,
@@ -1233,7 +1233,7 @@ async function main() {
1233
1233
  }
1234
1234
  return n;
1235
1235
  });
1236
- const { runAssetSearch } = await import("./search-ZXTJPVM6.js");
1236
+ const { runAssetSearch } = await import("./search-Y37B2JVP.js");
1237
1237
  await runAssetSearch({
1238
1238
  contents: contents.length > 0 ? contents : void 0,
1239
1239
  ids: ids.length > 0 ? ids : void 0,
@@ -1258,7 +1258,7 @@ async function main() {
1258
1258
  case "detections": {
1259
1259
  const org = await resolveOrg();
1260
1260
  if (subcommand === "healthcheck") {
1261
- const { runDetectionsHealthcheck } = await import("./healthcheck-7YWSOY6Y.js");
1261
+ const { runDetectionsHealthcheck } = await import("./healthcheck-5YEZCTXC.js");
1262
1262
  await runDetectionsHealthcheck({
1263
1263
  org,
1264
1264
  source: cli.flags.source,
@@ -1273,7 +1273,7 @@ async function main() {
1273
1273
  break;
1274
1274
  }
1275
1275
  if (subcommand === "validate") {
1276
- const { runDetectionsValidate } = await import("./validate-RPQEEQ36.js");
1276
+ const { runDetectionsValidate } = await import("./validate-OYTNB2ZM.js");
1277
1277
  await runDetectionsValidate({
1278
1278
  org,
1279
1279
  source: cli.flags.source,
@@ -1288,7 +1288,7 @@ async function main() {
1288
1288
  break;
1289
1289
  }
1290
1290
  if (subcommand === "drift") {
1291
- const { runDetectionsDrift } = await import("./drift-YZHCIQ5O.js");
1291
+ const { runDetectionsDrift } = await import("./drift-TCZELVHO.js");
1292
1292
  await runDetectionsDrift({
1293
1293
  org,
1294
1294
  source: cli.flags.source,
@@ -1302,7 +1302,7 @@ async function main() {
1302
1302
  break;
1303
1303
  }
1304
1304
  if (subcommand === "run") {
1305
- const { runDetectionsRun } = await import("./run-CCVJIK7L.js");
1305
+ const { runDetectionsRun } = await import("./run-KOZXEYTL.js");
1306
1306
  await runDetectionsRun({
1307
1307
  org,
1308
1308
  configId: cli.flags.configId,
@@ -1316,7 +1316,7 @@ async function main() {
1316
1316
  break;
1317
1317
  }
1318
1318
  if (subcommand === "list") {
1319
- const { runDetectionsList } = await import("./list-Q3MMBL4Y.js");
1319
+ const { runDetectionsList } = await import("./list-W6JZUNS2.js");
1320
1320
  await runDetectionsList({
1321
1321
  org,
1322
1322
  cursor: cli.flags.cursor,
@@ -1345,7 +1345,7 @@ async function main() {
1345
1345
  break;
1346
1346
  }
1347
1347
  if (action === "run") {
1348
- const { runDetectionsRun } = await import("./run-CCVJIK7L.js");
1348
+ const { runDetectionsRun } = await import("./run-KOZXEYTL.js");
1349
1349
  await runDetectionsRun({
1350
1350
  org,
1351
1351
  configId: cli.flags.configId,
@@ -1363,7 +1363,7 @@ async function main() {
1363
1363
  throw new Error("detections configs update requires --config-id");
1364
1364
  }
1365
1365
  const configPatch = getConfigPatchFromSetFlags();
1366
- const { runDetectionsConfigsUpdate } = await import("./configs-update-VDZVBTIF.js");
1366
+ const { runDetectionsConfigsUpdate } = await import("./configs-update-TAYT4JTU.js");
1367
1367
  await runDetectionsConfigsUpdate({
1368
1368
  org,
1369
1369
  configId: cli.flags.configId,
@@ -1399,7 +1399,7 @@ async function main() {
1399
1399
  const slugs = parseCsvList(cli.flags.slugs);
1400
1400
  const allMyOrgs = cli.flags.allMyOrgs;
1401
1401
  const org2 = slugs && slugs.length > 0 || allMyOrgs ? void 0 : await tryResolveOrg();
1402
- const { runMetricsOrganization } = await import("./organization-NEZA6JX2.js");
1402
+ const { runMetricsOrganization } = await import("./organization-N6RMWKJM.js");
1403
1403
  await runMetricsOrganization({
1404
1404
  org: org2,
1405
1405
  slugs,
@@ -1418,7 +1418,7 @@ async function main() {
1418
1418
  }
1419
1419
  const org = await resolveOrg();
1420
1420
  if (subcommand === "summary") {
1421
- const { runMetricsSummary } = await import("./summary-FE6ROSOO.js");
1421
+ const { runMetricsSummary } = await import("./summary-XCN3DRYP.js");
1422
1422
  await runMetricsSummary({
1423
1423
  org,
1424
1424
  from: cli.flags.from,
@@ -1431,7 +1431,7 @@ async function main() {
1431
1431
  break;
1432
1432
  }
1433
1433
  if (subcommand === "found") {
1434
- const { runMetricsFound } = await import("./found-6JAOLM6M.js");
1434
+ const { runMetricsFound } = await import("./found-NCP6H2SD.js");
1435
1435
  await runMetricsFound({
1436
1436
  org,
1437
1437
  from: cli.flags.from,
@@ -1448,7 +1448,7 @@ async function main() {
1448
1448
  if (!by || !["day", "type", "brand"].includes(by)) {
1449
1449
  throw new Error("metrics breakdown requires --by <day|type|brand>");
1450
1450
  }
1451
- const { runMetricsBreakdown } = await import("./breakdown-XA6UUD3T.js");
1451
+ const { runMetricsBreakdown } = await import("./breakdown-5DJMXRK4.js");
1452
1452
  await runMetricsBreakdown({
1453
1453
  org,
1454
1454
  by,
@@ -1469,7 +1469,7 @@ async function main() {
1469
1469
  case "reports": {
1470
1470
  if (subcommand === "list") {
1471
1471
  const org = await resolveOrg();
1472
- const { runReportsList } = await import("./list-735RYNAF.js");
1472
+ const { runReportsList } = await import("./list-TULFPPG3.js");
1473
1473
  await runReportsList({
1474
1474
  org,
1475
1475
  limit: cli.flags.limit,
@@ -1497,7 +1497,7 @@ async function main() {
1497
1497
  }
1498
1498
  if (subcommand === "create") {
1499
1499
  const org = await tryResolveOrg();
1500
- const { runReportsCreate } = await import("./create-DGCWT2YJ.js");
1500
+ const { runReportsCreate } = await import("./create-UXRULUR7.js");
1501
1501
  await runReportsCreate({
1502
1502
  org,
1503
1503
  title: cli.flags.title,
@@ -1518,7 +1518,7 @@ async function main() {
1518
1518
  const positionals = cli.input.slice(2);
1519
1519
  const flagAssets = parseAssetInputs();
1520
1520
  const assetContents = [...positionals, ...flagAssets];
1521
- const { runReportsSearch } = await import("./search-JXJLBV43.js");
1521
+ const { runReportsSearch } = await import("./search-5DOXBWPB.js");
1522
1522
  await runReportsSearch({
1523
1523
  assetContents,
1524
1524
  reportedByCustomer: cli.flags.reportedByCustomer,
@@ -1534,7 +1534,7 @@ async function main() {
1534
1534
  }
1535
1535
  case "threats": {
1536
1536
  if (subcommand === "list") {
1537
- const { runThreatsList } = await import("./list-YNQ6VSYV.js");
1537
+ const { runThreatsList } = await import("./list-SCA73PLA.js");
1538
1538
  await runThreatsList({
1539
1539
  query: cli.flags.query,
1540
1540
  from: cli.flags.from,
@@ -1557,7 +1557,7 @@ async function main() {
1557
1557
  case "takedowns": {
1558
1558
  if (subcommand === "list") {
1559
1559
  const org = await tryResolveOrg();
1560
- const { runTakedownsList } = await import("./list-ZBC53OYA.js");
1560
+ const { runTakedownsList } = await import("./list-TA4HYD66.js");
1561
1561
  await runTakedownsList({
1562
1562
  org,
1563
1563
  query: cli.flags.query,
@@ -1588,7 +1588,7 @@ async function main() {
1588
1588
  }
1589
1589
  case "queues": {
1590
1590
  if (subcommand === "snapshot") {
1591
- const { runQueuesSnapshot } = await import("./snapshot-NYOLPGRW.js");
1591
+ const { runQueuesSnapshot } = await import("./snapshot-RFGSAHO7.js");
1592
1592
  await runQueuesSnapshot({
1593
1593
  org: cli.flags.org,
1594
1594
  all: cli.flags.all,
@@ -1606,7 +1606,7 @@ async function main() {
1606
1606
  }
1607
1607
  case "orgs": {
1608
1608
  if (subcommand === "list") {
1609
- const { runOrgsList } = await import("./list-SRVNEUHC.js");
1609
+ const { runOrgsList } = await import("./list-JG2R7EHK.js");
1610
1610
  await runOrgsList({
1611
1611
  query: cli.flags.query,
1612
1612
  subscriptionStatus: cli.flags.subscriptionStatus,
@@ -1628,7 +1628,7 @@ async function main() {
1628
1628
  if (subcommand === "get") {
1629
1629
  const positionalSlug = action;
1630
1630
  const slug = positionalSlug ?? await tryResolveOrg();
1631
- const { runOrgsGet } = await import("./get-RC75EJFC.js");
1631
+ const { runOrgsGet } = await import("./get-2PCG3CQN.js");
1632
1632
  await runOrgsGet({
1633
1633
  slug,
1634
1634
  json: jsonMode,
@@ -1638,7 +1638,7 @@ async function main() {
1638
1638
  }
1639
1639
  if (subcommand === "assets") {
1640
1640
  if (action === "list") {
1641
- const { runOrgsAssetsList } = await import("./list-WQFDRXHD.js");
1641
+ const { runOrgsAssetsList } = await import("./list-MPSB2DYU.js");
1642
1642
  await runOrgsAssetsList({
1643
1643
  type: cli.flags.type ?? cli.flags.assetType,
1644
1644
  groupId: cli.flags.groupId,
@@ -1654,7 +1654,7 @@ async function main() {
1654
1654
  }
1655
1655
  if (subcommand === "asset-groups") {
1656
1656
  if (action === "list") {
1657
- const { runOrgsAssetGroupsList } = await import("./list-UDT5MDQZ.js");
1657
+ const { runOrgsAssetGroupsList } = await import("./list-QLMFMYU6.js");
1658
1658
  await runOrgsAssetGroupsList({
1659
1659
  json: jsonMode,
1660
1660
  outputFormat: cliContext.outputFormat
@@ -1676,7 +1676,7 @@ async function main() {
1676
1676
  "brands list --type must be ORGANIZATION or INDIVIDUAL (case-insensitive)."
1677
1677
  );
1678
1678
  }
1679
- const { runBrandsList } = await import("./list-ZARZ72DG.js");
1679
+ const { runBrandsList } = await import("./list-FZD2FGJA.js");
1680
1680
  await runBrandsList({
1681
1681
  type: rawType,
1682
1682
  json: jsonMode,
@@ -1690,7 +1690,7 @@ async function main() {
1690
1690
  );
1691
1691
  }
1692
1692
  case "whoami": {
1693
- const { runWhoami } = await import("./whoami-ZIWZCBGI.js");
1693
+ const { runWhoami } = await import("./whoami-5WCW3FOZ.js");
1694
1694
  await runWhoami({
1695
1695
  json: jsonMode,
1696
1696
  outputFormat: cliContext.outputFormat
@@ -1699,7 +1699,7 @@ async function main() {
1699
1699
  }
1700
1700
  case "healthchecks": {
1701
1701
  if (subcommand === "list") {
1702
- const { runHealthchecksList } = await import("./list-EJDWUF6W.js");
1702
+ const { runHealthchecksList } = await import("./list-QJYRXPXM.js");
1703
1703
  await runHealthchecksList({
1704
1704
  json: jsonMode,
1705
1705
  outputFormat: cliContext.outputFormat
@@ -1713,7 +1713,7 @@ async function main() {
1713
1713
  thresholds.minResults = cli.flags.minResults;
1714
1714
  if (cli.flags.lookbackHours !== void 0)
1715
1715
  thresholds.lookbackHours = cli.flags.lookbackHours;
1716
- const { runHealthchecksRun } = await import("./run-5QV3YD7V.js");
1716
+ const { runHealthchecksRun } = await import("./run-SE2SUE64.js");
1717
1717
  await runHealthchecksRun({
1718
1718
  org,
1719
1719
  id: action,
@@ -1731,7 +1731,7 @@ async function main() {
1731
1731
  }
1732
1732
  case "presets": {
1733
1733
  if (subcommand === "list") {
1734
- const { runPresetsList } = await import("./list-IDR7WH5J.js");
1734
+ const { runPresetsList } = await import("./list-23C72EH4.js");
1735
1735
  await runPresetsList({ outputFormat: cliContext.outputFormat });
1736
1736
  break;
1737
1737
  }
@@ -1742,7 +1742,7 @@ async function main() {
1742
1742
  );
1743
1743
  }
1744
1744
  const org = await resolveOrg();
1745
- const { runPresetsRun } = await import("./run-JLTNFOJK.js");
1745
+ const { runPresetsRun } = await import("./run-TUADYLU7.js");
1746
1746
  await runPresetsRun({
1747
1747
  presetId: action,
1748
1748
  org,
@@ -1759,12 +1759,12 @@ async function main() {
1759
1759
  case "setup":
1760
1760
  case "install":
1761
1761
  case "i": {
1762
- const { setupSkill } = await import("./setup-skill-CSKNZVG2.js");
1762
+ const { setupSkill } = await import("./setup-skill-RRTDEOR4.js");
1763
1763
  setupSkill({ json: jsonMode, cloud: cli.flags.cloud });
1764
1764
  break;
1765
1765
  }
1766
1766
  case "uninstall": {
1767
- const { uninstallSkill } = await import("./setup-skill-CSKNZVG2.js");
1767
+ const { uninstallSkill } = await import("./setup-skill-RRTDEOR4.js");
1768
1768
  uninstallSkill({ json: jsonMode });
1769
1769
  break;
1770
1770
  }
@@ -7,9 +7,8 @@ import {
7
7
  } from "./chunk-VFT3TD3E.js";
8
8
  import {
9
9
  createApiClient
10
- } from "./chunk-GOQL7UCG.js";
10
+ } from "./chunk-OFUIYMPD.js";
11
11
  import "./chunk-EGWK6SRQ.js";
12
- import "./chunk-TFCNKBRC.js";
13
12
  import "./chunk-U73SABXK.js";
14
13
 
15
14
  // src/commands/detections/configs-update.ts
@@ -8,9 +8,8 @@ import {
8
8
  } from "./chunk-VFT3TD3E.js";
9
9
  import {
10
10
  createApiClient
11
- } from "./chunk-GOQL7UCG.js";
11
+ } from "./chunk-OFUIYMPD.js";
12
12
  import "./chunk-EGWK6SRQ.js";
13
- import "./chunk-TFCNKBRC.js";
14
13
  import "./chunk-U73SABXK.js";
15
14
 
16
15
  // src/commands/reports/create.ts
@@ -8,9 +8,8 @@ import {
8
8
  } from "./chunk-VFT3TD3E.js";
9
9
  import {
10
10
  createApiClient
11
- } from "./chunk-GOQL7UCG.js";
11
+ } from "./chunk-OFUIYMPD.js";
12
12
  import "./chunk-EGWK6SRQ.js";
13
- import "./chunk-TFCNKBRC.js";
14
13
  import "./chunk-U73SABXK.js";
15
14
 
16
15
  // src/commands/detections/drift.ts
@@ -7,9 +7,9 @@ import {
7
7
  } from "./chunk-VFT3TD3E.js";
8
8
  import {
9
9
  createApiClient
10
- } from "./chunk-GOQL7UCG.js";
11
- import "./chunk-EGWK6SRQ.js";
10
+ } from "./chunk-OFUIYMPD.js";
12
11
  import "./chunk-TFCNKBRC.js";
12
+ import "./chunk-EGWK6SRQ.js";
13
13
  import "./chunk-U73SABXK.js";
14
14
 
15
15
  // src/commands/metrics/found.ts
@@ -8,9 +8,8 @@ import {
8
8
  } from "./chunk-VFT3TD3E.js";
9
9
  import {
10
10
  createApiClient
11
- } from "./chunk-GOQL7UCG.js";
11
+ } from "./chunk-OFUIYMPD.js";
12
12
  import "./chunk-EGWK6SRQ.js";
13
- import "./chunk-TFCNKBRC.js";
14
13
  import "./chunk-U73SABXK.js";
15
14
 
16
15
  // src/commands/orgs/get.ts
@@ -38,6 +37,20 @@ function summarizePendingApprovals(org) {
38
37
  );
39
38
  return labels.join(", ");
40
39
  }
40
+ function summarizeIntegrations(org) {
41
+ const parts = [];
42
+ if (org.integrations.slack) parts.push("slack");
43
+ if (org.integrations.discord) parts.push("discord");
44
+ if (org.integrations.telegram.connected) {
45
+ parts.push(
46
+ org.integrations.telegram.groupCount === 1 ? "telegram" : `telegram(${org.integrations.telegram.groupCount} groups)`
47
+ );
48
+ }
49
+ if (org.integrations.vercel) parts.push("vercel");
50
+ if (org.integrations.intercom) parts.push("intercom");
51
+ if (org.integrations.moderation) parts.push("moderation-api");
52
+ return parts.length > 0 ? parts.join(" ") : "(none)";
53
+ }
41
54
  async function runOrgsGet(options) {
42
55
  const slug = options.slug?.trim();
43
56
  if (!slug) {
@@ -59,6 +72,7 @@ async function runOrgsGet(options) {
59
72
  `- Contact URL: ${organization.contactUrl ?? "(not set)"}`,
60
73
  `- Subscription status: ${organization.subscriptionStatus}`,
61
74
  `- Services: ${summarizeServices(organization)}`,
75
+ `- Integrations: ${summarizeIntegrations(organization)}`,
62
76
  `- Obligatory admin approval: ${summarizeObligatoryAdminApproval(organization)}`,
63
77
  `- Pending service approvals: ${summarizePendingApprovals(organization)}`
64
78
  ].join("\n"),
@@ -72,17 +86,18 @@ async function runOrgsGet(options) {
72
86
  reviewingActive: organization.services.reviewing.active,
73
87
  protectionActive: organization.services.protection.active,
74
88
  takedownsActive: organization.services.takedowns.active,
75
- // `takedowns` is the only service with a meaningful automation flag.
76
89
  takedownsAutomated: organization.services.takedowns.automated,
77
90
  detectionActive: organization.services.detection.active,
78
91
  darkWebMonitoringActive: organization.services.darkWebMonitoring.active,
92
+ slackConnected: organization.integrations.slack,
93
+ discordConnected: organization.integrations.discord,
94
+ telegramConnected: organization.integrations.telegram.connected,
95
+ telegramGroupCount: organization.integrations.telegram.groupCount,
96
+ vercelConnected: organization.integrations.vercel,
97
+ intercomConnected: organization.integrations.intercom,
98
+ moderationApiConnected: organization.integrations.moderation,
79
99
  obligatoryAdminApprovalActive: organization.obligatoryAdminApproval.active,
80
- // Empty list + active=true means "applies to all asset types" — read
81
- // the active column alongside this one to interpret.
82
100
  obligatoryAdminApprovalAssetTypes: organization.obligatoryAdminApproval.assetTypes.join("|"),
83
- // Pending staff requests to enable Wallet Blocking / Takedowns that a
84
- // higher-up has not yet approved. Raw `serviceType` enum values,
85
- // de-duplicated; an empty cell means nothing is awaiting approval.
86
101
  pendingServiceApprovals: Array.from(
87
102
  new Set(
88
103
  organization.pendingServiceApprovals.map((approval) => approval.serviceType)
@@ -95,6 +110,7 @@ async function runOrgsGet(options) {
95
110
  console.log(` contactUrl: ${organization.contactUrl ?? "(not set)"}`);
96
111
  console.log(` subscriptionStatus: ${organization.subscriptionStatus}`);
97
112
  console.log(` services: ${summarizeServices(organization)}`);
113
+ console.log(` integrations: ${summarizeIntegrations(organization)}`);
98
114
  console.log(
99
115
  ` obligatoryAdminApproval: ${summarizeObligatoryAdminApproval(organization)}`
100
116
  );
@@ -8,9 +8,8 @@ import {
8
8
  } from "./chunk-VFT3TD3E.js";
9
9
  import {
10
10
  createApiClient
11
- } from "./chunk-GOQL7UCG.js";
11
+ } from "./chunk-OFUIYMPD.js";
12
12
  import "./chunk-EGWK6SRQ.js";
13
- import "./chunk-TFCNKBRC.js";
14
13
  import "./chunk-U73SABXK.js";
15
14
 
16
15
  // src/commands/detections/healthcheck.ts
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  PRESETS
3
- } from "./chunk-DVNTYW7L.js";
3
+ } from "./chunk-PEX2A3IL.js";
4
4
  import "./chunk-E2LAMILJ.js";
5
5
  import {
6
6
  printOutput,
7
7
  toCsvRows
8
8
  } from "./chunk-VFT3TD3E.js";
9
- import "./chunk-GOQL7UCG.js";
10
- import "./chunk-EGWK6SRQ.js";
9
+ import "./chunk-OFUIYMPD.js";
11
10
  import "./chunk-TFCNKBRC.js";
11
+ import "./chunk-EGWK6SRQ.js";
12
12
  import "./chunk-U73SABXK.js";
13
13
 
14
14
  // src/commands/presets/list.ts
@@ -4,13 +4,12 @@ import {
4
4
  } from "./chunk-JCMWDZYY.js";
5
5
  import {
6
6
  createApiClient
7
- } from "./chunk-GOQL7UCG.js";
7
+ } from "./chunk-OFUIYMPD.js";
8
8
  import {
9
9
  AuthCorruptedError,
10
10
  AuthExpiredError,
11
11
  AuthNotLoggedInError
12
12
  } from "./chunk-EGWK6SRQ.js";
13
- import "./chunk-TFCNKBRC.js";
14
13
  import "./chunk-U73SABXK.js";
15
14
 
16
15
  // src/commands/configs/list.tsx
@@ -0,0 +1,83 @@
1
+ import {
2
+ printOutput,
3
+ toCsvRows
4
+ } from "./chunk-VFT3TD3E.js";
5
+ import {
6
+ createApiClient
7
+ } from "./chunk-OFUIYMPD.js";
8
+ import "./chunk-EGWK6SRQ.js";
9
+ import "./chunk-U73SABXK.js";
10
+
11
+ // src/commands/brands/list.ts
12
+ function toRow(brand) {
13
+ return {
14
+ id: brand.id,
15
+ slug: brand.slug,
16
+ name: brand.name,
17
+ type: brand.type,
18
+ description: brand.description ?? "",
19
+ avatarUrl: brand.avatarUrl ?? "",
20
+ websiteUrl: brand.websiteUrl ?? "",
21
+ twitterHandle: brand.twitterHandle ?? "",
22
+ brandColors: brand.brandColors.join(", "),
23
+ includedTerms: brand.includedTerms.join(", "),
24
+ excludedTerms: brand.excludedTerms.join(", "),
25
+ tickers: brand.tickers.join(", "),
26
+ brandGroupId: brand.brandGroupId,
27
+ createdAt: brand.createdAt
28
+ };
29
+ }
30
+ async function runBrandsList(options) {
31
+ const outputFormat = options.outputFormat ?? (options.json ? "json" : "human");
32
+ const client = options.apiClient ?? createApiClient();
33
+ const result = await client.listOrganizationBrands();
34
+ const brands = options.type ? result.brands.filter((brand) => brand.type === options.type) : result.brands;
35
+ const rows = brands.map(toRow);
36
+ printOutput({
37
+ outputFormat,
38
+ json: options.type ? { ...result, brands } : result,
39
+ markdown: [
40
+ "# Organization brands",
41
+ "",
42
+ `- Returned: ${brands.length}${options.type ? ` (filtered to type=${options.type})` : ""}`,
43
+ "",
44
+ ...rows.map((row) => {
45
+ const parts = [`slug=${row.slug}`, `type=${row.type}`];
46
+ if (row.brandGroupId !== null) parts.push(`groupId=${row.brandGroupId}`);
47
+ if (row.websiteUrl) parts.push(`website=${row.websiteUrl}`);
48
+ if (row.twitterHandle) parts.push(`twitter=@${row.twitterHandle}`);
49
+ if (row.brandColors) parts.push(`colors=${row.brandColors}`);
50
+ if (row.includedTerms) parts.push(`included=${row.includedTerms}`);
51
+ if (row.excludedTerms) parts.push(`excluded=${row.excludedTerms}`);
52
+ if (row.tickers) parts.push(`tickers=${row.tickers}`);
53
+ return `- #${row.id} ${row.name} (${parts.join(", ")})`;
54
+ })
55
+ ].join("\n"),
56
+ csv: toCsvRows(rows),
57
+ human: () => {
58
+ if (brands.length === 0) {
59
+ console.log(
60
+ options.type ? `No brands of type ${options.type} found.` : "No brands found."
61
+ );
62
+ return;
63
+ }
64
+ console.log(
65
+ `Organization brands \u2014 returned ${brands.length}${options.type ? ` (type=${options.type})` : ""}`
66
+ );
67
+ for (const row of rows) {
68
+ const parts = [`slug=${row.slug}`, `type=${row.type}`];
69
+ if (row.brandGroupId !== null) parts.push(`groupId=${row.brandGroupId}`);
70
+ if (row.websiteUrl) parts.push(`website=${row.websiteUrl}`);
71
+ if (row.twitterHandle) parts.push(`twitter=@${row.twitterHandle}`);
72
+ if (row.brandColors) parts.push(`colors=${row.brandColors}`);
73
+ if (row.includedTerms) parts.push(`included=${row.includedTerms}`);
74
+ if (row.excludedTerms) parts.push(`excluded=${row.excludedTerms}`);
75
+ if (row.tickers) parts.push(`tickers=${row.tickers}`);
76
+ console.log(`#${row.id} ${row.name} (${parts.join(", ")})`);
77
+ }
78
+ }
79
+ });
80
+ }
81
+ export {
82
+ runBrandsList
83
+ };
@@ -8,9 +8,8 @@ import {
8
8
  } from "./chunk-VFT3TD3E.js";
9
9
  import {
10
10
  createApiClient
11
- } from "./chunk-GOQL7UCG.js";
11
+ } from "./chunk-OFUIYMPD.js";
12
12
  import "./chunk-EGWK6SRQ.js";
13
- import "./chunk-TFCNKBRC.js";
14
13
  import "./chunk-U73SABXK.js";
15
14
 
16
15
  // src/commands/asset/list.ts
@@ -8,9 +8,8 @@ import {
8
8
  } from "./chunk-VFT3TD3E.js";
9
9
  import {
10
10
  createApiClient
11
- } from "./chunk-GOQL7UCG.js";
11
+ } from "./chunk-OFUIYMPD.js";
12
12
  import "./chunk-EGWK6SRQ.js";
13
- import "./chunk-TFCNKBRC.js";
14
13
  import "./chunk-U73SABXK.js";
15
14
 
16
15
  // src/commands/orgs/list.ts
@@ -197,6 +196,20 @@ function summarizePendingApprovals(org) {
197
196
  );
198
197
  return labels.join(", ");
199
198
  }
199
+ function summarizeIntegrations(org) {
200
+ const parts = [];
201
+ if (org.integrations.slack) parts.push("slack");
202
+ if (org.integrations.discord) parts.push("discord");
203
+ if (org.integrations.telegram.connected) {
204
+ parts.push(
205
+ org.integrations.telegram.groupCount === 1 ? "telegram" : `telegram(${org.integrations.telegram.groupCount} groups)`
206
+ );
207
+ }
208
+ if (org.integrations.vercel) parts.push("vercel");
209
+ if (org.integrations.intercom) parts.push("intercom");
210
+ if (org.integrations.moderation) parts.push("moderation-api");
211
+ return parts.length > 0 ? parts.join(" ") : "(none)";
212
+ }
200
213
  async function runOrgsList(options) {
201
214
  const client = options.apiClient ?? createApiClient();
202
215
  const outputFormat = options.outputFormat ?? (options.json ? "json" : "human");
@@ -216,7 +229,7 @@ async function runOrgsList(options) {
216
229
  `# Organizations (${organizations.length})`,
217
230
  "",
218
231
  ...organizations.map(
219
- (org) => `- \`${org.slug}\` \u2014 ${org.name} \u2014 ${org.subscriptionStatus} \u2014 contact: ${org.contactUrl ?? "(not set)"} \u2014 ${summarizeServices(org)} \u2014 admin-approval: ${summarizeObligatoryAdminApproval(org)} \u2014 pending-approval: ${summarizePendingApprovals(org)}`
232
+ (org) => `- \`${org.slug}\` \u2014 ${org.name} \u2014 ${org.subscriptionStatus} \u2014 contact: ${org.contactUrl ?? "(not set)"} \u2014 ${summarizeServices(org)} \u2014 integrations: ${summarizeIntegrations(org)} \u2014 admin-approval: ${summarizeObligatoryAdminApproval(org)} \u2014 pending-approval: ${summarizePendingApprovals(org)}`
220
233
  )
221
234
  ].join("\n"),
222
235
  csv: toCsvRows(
@@ -229,19 +242,18 @@ async function runOrgsList(options) {
229
242
  reviewingActive: org.services.reviewing.active,
230
243
  protectionActive: org.services.protection.active,
231
244
  takedownsActive: org.services.takedowns.active,
232
- // `takedowns` is the only service with a meaningful automation flag.
233
245
  takedownsAutomated: org.services.takedowns.automated,
234
246
  detectionActive: org.services.detection.active,
235
247
  darkWebMonitoringActive: org.services.darkWebMonitoring.active,
248
+ slackConnected: org.integrations.slack,
249
+ discordConnected: org.integrations.discord,
250
+ telegramConnected: org.integrations.telegram.connected,
251
+ telegramGroupCount: org.integrations.telegram.groupCount,
252
+ vercelConnected: org.integrations.vercel,
253
+ intercomConnected: org.integrations.intercom,
254
+ moderationApiConnected: org.integrations.moderation,
236
255
  obligatoryAdminApprovalActive: org.obligatoryAdminApproval.active,
237
- // Empty list + active means "applies to all asset types"; we keep
238
- // the cell empty in CSV so spreadsheets render it as the natural
239
- // "no narrowing" value — pair it with the active column.
240
256
  obligatoryAdminApprovalAssetTypes: org.obligatoryAdminApproval.assetTypes.join("|"),
241
- // Pending staff requests to enable Wallet Blocking / Takedowns that
242
- // a higher-up has not yet approved. We emit the raw `serviceType`
243
- // enum values (de-duplicated) so the column is machine-filterable;
244
- // an empty cell means nothing is awaiting approval.
245
257
  pendingServiceApprovals: Array.from(
246
258
  new Set(org.pendingServiceApprovals.map((approval) => approval.serviceType))
247
259
  ).join("|")
@@ -258,7 +270,7 @@ async function runOrgsList(options) {
258
270
  for (const org of organizations) {
259
271
  const contact = org.contactUrl ?? "(no contact)";
260
272
  console.log(
261
- ` ${org.slug.padEnd(slugWidth)} ${org.name.padEnd(nameWidth)} ${org.subscriptionStatus.padEnd(11)} ${contact} ${summarizeServices(org)} admin-approval=${summarizeObligatoryAdminApproval(org)} pending-approval=${summarizePendingApprovals(org)}`
273
+ ` ${org.slug.padEnd(slugWidth)} ${org.name.padEnd(nameWidth)} ${org.subscriptionStatus.padEnd(11)} ${contact} ${summarizeServices(org)} integrations=${summarizeIntegrations(org)} admin-approval=${summarizeObligatoryAdminApproval(org)} pending-approval=${summarizePendingApprovals(org)}`
262
274
  );
263
275
  }
264
276
  }
@@ -8,9 +8,8 @@ import {
8
8
  } from "./chunk-VFT3TD3E.js";
9
9
  import {
10
10
  createApiClient
11
- } from "./chunk-GOQL7UCG.js";
11
+ } from "./chunk-OFUIYMPD.js";
12
12
  import "./chunk-EGWK6SRQ.js";
13
- import "./chunk-TFCNKBRC.js";
14
13
  import "./chunk-U73SABXK.js";
15
14
 
16
15
  // src/commands/orgs/assets/list.ts