@curviate/cli 0.56.0 → 0.58.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 (70) hide show
  1. package/CHANGELOG.md +129 -0
  2. package/README.md +9 -2
  3. package/dist/{account-ZF5NEMID.js → account-GSL6BCNX.js} +49 -13
  4. package/dist/{analytics-M7JWS67A.js → analytics-4FUMJSMC.js} +6 -6
  5. package/dist/{beta-consent-4Q2LZZQC.js → beta-consent-EC2QF6CM.js} +4 -4
  6. package/dist/billing-STRNXA4H.js +19 -0
  7. package/dist/{chunk-XP6S6E55.js → chunk-3IL3D5IZ.js} +2 -2
  8. package/dist/{chunk-UWRWZG4N.js → chunk-5OAJ4D65.js} +2 -2
  9. package/dist/{chunk-AMTKGO37.js → chunk-5Z3CCE5N.js} +1 -1
  10. package/dist/chunk-7F6B7P32.js +359 -0
  11. package/dist/{chunk-UOWOKEB2.js → chunk-CQHCPZ5I.js} +1 -1
  12. package/dist/{chunk-RDKTHFQ6.js → chunk-EWSOIFG2.js} +21 -0
  13. package/dist/{chunk-RKNW4UX4.js → chunk-JKOQX46J.js} +6 -0
  14. package/dist/{chunk-VHNF6OZD.js → chunk-JY26SUNH.js} +18 -2
  15. package/dist/{chunk-VEMK4MJM.js → chunk-KS4I4B3Z.js} +6 -6
  16. package/dist/{chunk-MIOEYSBQ.js → chunk-KUVJM5CP.js} +1 -1
  17. package/dist/{chunk-CRO7PJ4I.js → chunk-MLZSXQZC.js} +2 -2
  18. package/dist/{chunk-7PLTQHNO.js → chunk-PBJZQZPO.js} +1 -1
  19. package/dist/{chunk-J4SFOFMT.js → chunk-WGGZWJPO.js} +11 -11
  20. package/dist/{chunk-L3RJU7C3.js → chunk-WITIJCUU.js} +115 -14
  21. package/dist/{chunk-MWVTFTWV.js → chunk-XDPU2YAF.js} +8 -5
  22. package/dist/{chunk-EI64VFBE.js → chunk-XXB4MAX3.js} +121 -11
  23. package/dist/cli.js +30 -28
  24. package/dist/{comment-D6RSZTVK.js → comment-MUELYZYN.js} +8 -8
  25. package/dist/{company-3Z6PXGTW.js → company-5N7CXORR.js} +21 -10
  26. package/dist/company-record-HWLTP4TV.js +213 -0
  27. package/dist/{config-VY5MCJMN.js → config-PI7JMQ2L.js} +2 -2
  28. package/dist/{connect-G2RTLV7G.js → connect-NNZOOPWV.js} +11 -11
  29. package/dist/{contact-QSLJCBDE.js → contact-VNG7HRCN.js} +8 -8
  30. package/dist/{contact-groups-OITAD73K.js → contact-groups-6JF7VX6Q.js} +10 -10
  31. package/dist/{contact-import-LT7BKESC.js → contact-import-TMJWY2VD.js} +10 -10
  32. package/dist/core-ZRJY3HTF.js +46 -0
  33. package/dist/{do-not-contact-ZA7KS5WD.js → do-not-contact-GDVIUNMT.js} +19 -17
  34. package/dist/{doctor-JQT3DO6G.js → doctor-ZNAR5AZ2.js} +21 -4
  35. package/dist/{document-H65EXU4L.js → document-G6UND26L.js} +1 -1
  36. package/dist/{domain-7EX4E34B.js → domain-62YUYVDW.js} +8 -8
  37. package/dist/{draft-7U6H4BPF.js → draft-ED6RL67K.js} +5 -5
  38. package/dist/{enrollment-AZ6XGVVL.js → enrollment-LN3Z3RC5.js} +11 -7
  39. package/dist/{examples-IGQJCSNL.js → examples-5FJS47QF.js} +2 -2
  40. package/dist/{exit-codes-ZSOLAXQO.js → exit-codes-LQDMGDII.js} +1 -1
  41. package/dist/{export-OYMQXL62.js → export-S6D4FEAG.js} +4 -4
  42. package/dist/{feed-M5D4SJW7.js → feed-AC7HWUCD.js} +6 -6
  43. package/dist/{group-UTC3YBKE.js → group-6N37Q5ZS.js} +6 -6
  44. package/dist/{inbox-VSGNHSLG.js → inbox-JFRBROQ2.js} +6 -6
  45. package/dist/{inboxes-23C2MJK4.js → inboxes-IBZHZKSD.js} +6 -6
  46. package/dist/{incoming-QVPP32K7.js → incoming-YDRPPO24.js} +5 -5
  47. package/dist/{job-ZHVFFRWE.js → job-CSRHIFZM.js} +6 -6
  48. package/dist/{login-6OTNXEJZ.js → login-M7ZLOR2U.js} +2 -2
  49. package/dist/mailbox-E2K3I2VH.js +712 -0
  50. package/dist/{message-PIV77W47.js → message-SX6RDGWP.js} +7 -7
  51. package/dist/{motion-AHYF34DP.js → motion-4HH3OFI6.js} +118 -13
  52. package/dist/{network-RJHJFZEY.js → network-JQYLSQDH.js} +9 -9
  53. package/dist/{notification-XGR4NT3S.js → notification-ZAQM463D.js} +6 -6
  54. package/dist/{notifications-BHRWSHPR.js → notifications-N55F3DP3.js} +14 -9
  55. package/dist/{post-Z7AVDDKA.js → post-SIHHJX3P.js} +8 -8
  56. package/dist/{profile-YZNBX2RP.js → profile-VBHX3QGP.js} +12 -12
  57. package/dist/{recruiter-EXM4P7X7.js → recruiter-7AGFKQPI.js} +9 -9
  58. package/dist/{sales-nav-CKDSEXV2.js → sales-nav-ADVFBKWB.js} +9 -9
  59. package/dist/{search-B7FB6674.js → search-THJFPGOH.js} +16 -16
  60. package/dist/{setup-VZVPLJ4V.js → setup-D6D7SNND.js} +4 -4
  61. package/dist/signal-TGSF7WEP.js +438 -0
  62. package/dist/{team-PYABBUHO.js → team-MVNHCWJP.js} +59 -5
  63. package/dist/{tier-PRK4WQKR.js → tier-DAF7Y2HN.js} +6 -5
  64. package/dist/unibox-7B6B4SXB.js +741 -0
  65. package/dist/{webhook-V74EV4E2.js → webhook-NUVSTDXF.js} +9 -9
  66. package/package.json +3 -3
  67. package/dist/billing-LYPSX5SR.js +0 -196
  68. package/dist/core-RFTNNB6P.js +0 -46
  69. package/dist/mailbox-HD2UXZCA.js +0 -405
  70. package/dist/unibox-ZNKX2EKL.js +0 -410
@@ -13,21 +13,21 @@ import {
13
13
  runMessageSend,
14
14
  sentAsNotice,
15
15
  willSendAsNotice
16
- } from "./chunk-VEMK4MJM.js";
16
+ } from "./chunk-KS4I4B3Z.js";
17
17
  import "./chunk-UWO2D4HW.js";
18
18
  import "./chunk-UEAX6KUB.js";
19
19
  import "./chunk-Q3ZPRFUX.js";
20
- import "./chunk-VHNF6OZD.js";
21
- import "./chunk-CRO7PJ4I.js";
20
+ import "./chunk-JY26SUNH.js";
21
+ import "./chunk-MLZSXQZC.js";
22
22
  import "./chunk-TCUYH5GO.js";
23
- import "./chunk-MIOEYSBQ.js";
23
+ import "./chunk-KUVJM5CP.js";
24
24
  import "./chunk-QM57YDJE.js";
25
- import "./chunk-7PLTQHNO.js";
25
+ import "./chunk-PBJZQZPO.js";
26
26
  import "./chunk-QLKGOIWS.js";
27
- import "./chunk-MWVTFTWV.js";
27
+ import "./chunk-XDPU2YAF.js";
28
28
  import "./chunk-FDJMAF7D.js";
29
29
  import "./chunk-ZYURL5VK.js";
30
- import "./chunk-RDKTHFQ6.js";
30
+ import "./chunk-EWSOIFG2.js";
31
31
  export {
32
32
  guardBareMessageForm,
33
33
  messageCommand,
@@ -1,18 +1,19 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  AttachError,
4
+ openUpload,
4
5
  readAttachment
5
- } from "./chunk-VHNF6OZD.js";
6
+ } from "./chunk-JY26SUNH.js";
6
7
  import {
7
8
  sendInChunks
8
- } from "./chunk-XP6S6E55.js";
9
+ } from "./chunk-3IL3D5IZ.js";
9
10
  import {
10
11
  fail,
11
12
  listFlag,
12
13
  outputOpts,
13
14
  rootClient,
14
15
  usage
15
- } from "./chunk-UWRWZG4N.js";
16
+ } from "./chunk-5OAJ4D65.js";
16
17
  import {
17
18
  buildPreviewOutput
18
19
  } from "./chunk-TCUYH5GO.js";
@@ -28,12 +29,12 @@ import {
28
29
  readablePage,
29
30
  rejectPaginationModifiersWithoutAll,
30
31
  streamAll
31
- } from "./chunk-MIOEYSBQ.js";
32
+ } from "./chunk-KUVJM5CP.js";
32
33
  import {
33
34
  renderSuccess,
34
35
  writeNdjsonItem
35
36
  } from "./chunk-QM57YDJE.js";
36
- import "./chunk-7PLTQHNO.js";
37
+ import "./chunk-PBJZQZPO.js";
37
38
  import {
38
39
  GLOBAL_FLAGS,
39
40
  READ_SINGLE_FLAGS,
@@ -42,14 +43,14 @@ import {
42
43
  } from "./chunk-QLKGOIWS.js";
43
44
  import {
44
45
  DESCRIPTIONS
45
- } from "./chunk-MWVTFTWV.js";
46
+ } from "./chunk-XDPU2YAF.js";
46
47
  import {
47
48
  documentSchema,
48
49
  parseDocument,
49
50
  readFileFlag,
50
51
  reportIssues,
51
52
  validate
52
- } from "./chunk-RKNW4UX4.js";
53
+ } from "./chunk-JKOQX46J.js";
53
54
  import "./chunk-FDJMAF7D.js";
54
55
  import {
55
56
  isStdinToken
@@ -511,7 +512,10 @@ async function runCreate(c, f) {
511
512
  }
512
513
  }
513
514
  async function runUpdate(c, f) {
514
- const { body, text } = await readCampaignFile(f, "campaign update");
515
+ const olpc = f["one-lead-per-company"];
516
+ if (f.file === void 0 && olpc === void 0) usage("pass --file <campaign.json>, --one-lead-per-company or --no-one-lead-per-company.");
517
+ const { body, text } = f.file === void 0 ? { body: {}, text: "" } : await readCampaignFile(f, "campaign update");
518
+ if (olpc !== void 0) body["settings"] = { ...body["settings"] ?? {}, one_lead_per_company: olpc };
515
519
  if ("if_sequence_revision" in body) {
516
520
  process.stderr.write("warning: dropped if_sequence_revision from the file: pass --if-revision <n> to send it.\n");
517
521
  delete body["if_sequence_revision"];
@@ -571,6 +575,13 @@ async function runPreview(c, f) {
571
575
  await fail(err, f);
572
576
  }
573
577
  }
578
+ async function runPlacement(c, f) {
579
+ try {
580
+ renderSuccess(await c.campaigns.placementChecks(f.id ?? ""), outputOpts(f), process);
581
+ } catch (err) {
582
+ await fail(err, f);
583
+ }
584
+ }
574
585
  async function runCheck(c, f) {
575
586
  if (f.preview) return preview("campaigns.check", { id: f.id });
576
587
  try {
@@ -616,6 +627,34 @@ async function runVoiceClipUpload(c, f) {
616
627
  await fail(err, f);
617
628
  }
618
629
  }
630
+ var ATTACHMENT_MAX_BYTES = 20 * 1024 * 1024;
631
+ async function runAttachmentUpload(c, f) {
632
+ const path = f.file ?? "";
633
+ if (path.trim() === "") usage("the file is missing. Pass its path: `curviate campaign attachment upload pricing.pdf`.");
634
+ const filename = basename(path);
635
+ let file;
636
+ try {
637
+ file = await openUpload(path, ATTACHMENT_MAX_BYTES);
638
+ } catch (err) {
639
+ if (err instanceof AttachError) usage(err.message);
640
+ throw err;
641
+ }
642
+ if (f.preview) {
643
+ return void process.stdout.write(JSON.stringify(buildPreviewOutput({ method: "campaigns.attachments.upload", args: { filename, bytes: file.size }, body: {} })) + "\n");
644
+ }
645
+ try {
646
+ renderSuccess(await c.campaigns.attachments.upload(file.data, { filename }), outputOpts(f), process);
647
+ } catch (err) {
648
+ await fail(err, f);
649
+ }
650
+ }
651
+ async function runAttachmentGet(c, f) {
652
+ try {
653
+ renderSuccess(await c.campaigns.attachments.get(f.id ?? ""), outputOpts(f), process);
654
+ } catch (err) {
655
+ await fail(err, f);
656
+ }
657
+ }
619
658
  async function runVoiceClipGet(c, f) {
620
659
  try {
621
660
  renderSuccess(await c.campaigns.voiceClips.get(f.id ?? ""), outputOpts(f), process);
@@ -731,7 +770,7 @@ EOF`
731
770
  var updateCmd = defineCommand({
732
771
  meta: {
733
772
  name: "update",
734
- description: "Change a Campaign from a Campaign file: objects (schedule, settings) merge by key, arrays and the Sequence replace whole, null clears. settings.priority (normal or prioritized) weighs the Campaign 1 or 1.5 in each Account's budgets, on every budget (every Campaign with work due still progresses, and no limit is passed); settings.new_enrollments_per_account_per_day and settings.assign even are retired (accepted and ignored until 2027-01-28, with a notice). After start, a structural Sequence change makes a new version; running Enrollments keep theirs. With --if-revision the save is refused when someone saved the Sequence since. Needs Automate.",
773
+ description: "Change a Campaign from a Campaign file: objects (schedule, settings) merge by key, arrays and the Sequence replace whole, null clears. settings.priority (normal or prioritized) weighs the Campaign 1 or 1.5 in each Account's budgets, on every budget (every Campaign with work due still progresses, and no limit is passed); settings.new_enrollments_per_account_per_day and settings.assign even are retired (accepted and ignored until 2027-01-28, with a notice). --one-lead-per-company enrolls at most one Lead per company (a Lead whose company already has one in the Campaign is skipped, same_company, naming the Lead kept; one with no known company never is); --no-one-lead-per-company turns it off; either works with or without --file. After start, a structural Sequence change makes a new version; running Enrollments keep theirs. With --if-revision the save is refused when someone saved the Sequence since. Needs Automate.",
735
774
  risk: "write",
736
775
  rules: {
737
776
  changes: "Changes the Campaign. A running Campaign picks the change up at each Enrollment's next Step.",
@@ -750,6 +789,7 @@ var updateCmd = defineCommand({
750
789
  document: "campaign update",
751
790
  examples: [
752
791
  "curviate campaign update mot_YOUR_CAMPAIGN_ID --file campaign.json --if-revision 3",
792
+ "curviate campaign update mot_YOUR_CAMPAIGN_ID --one-lead-per-company",
753
793
  `curviate campaign update mot_YOUR_CAMPAIGN_ID --file - <<'EOF'
754
794
  ${CAMPAIGN_DOC}
755
795
  EOF`
@@ -758,7 +798,8 @@ EOF`
758
798
  args: {
759
799
  ...WRITE_SINGLE_FLAGS,
760
800
  id: ID,
761
- file: { type: "string", stdinArg: true, required: true, description: FILE_DESC },
801
+ file: { type: "string", stdinArg: true, description: FILE_DESC },
802
+ "one-lead-per-company": { type: "boolean", description: "Enroll at most one Lead per company (settings.one_lead_per_company); --no-one-lead-per-company turns it off." },
762
803
  "if-revision": { type: "string", description: "The sequence_revision you read (`curviate campaign get`). The save is refused with SEQUENCE_CONFLICT when the stored Sequence moved past it. Omitted: the last save wins." }
763
804
  },
764
805
  run: online(runUpdate)
@@ -890,6 +931,18 @@ var checkCmd = defineCommand({
890
931
  args: { ...WRITE_SINGLE_FLAGS, id: ID },
891
932
  run: online(runCheck)
892
933
  });
934
+ var placementCmd = defineCommand({
935
+ meta: {
936
+ name: "placement",
937
+ description: "The Campaign's weekly placement checks, newest first, at most 26: each calendar week its first email step, and each email step whose text changed that week, goes from one of its Mailboxes to test inboxes and is read like a placement test (`curviate mailbox test`). Each check: week (its Monday), mailbox_id, step_id, status (running, complete, waiting, skipped), reason (no_mailbox, cap, seeds) and the google_workspace and microsoft_365 verdicts (inbox, partly_spam, spam) once complete. Every role reads. One API call.",
938
+ risk: "read",
939
+ output: ["The checks: items[] (week, mailbox_id, step_id, status, reason, google_workspace, microsoft_365)."],
940
+ seeAlso: ["curviate mailbox test", "curviate analytics email"],
941
+ examples: ["curviate campaign placement mot_YOUR_CAMPAIGN_ID"]
942
+ },
943
+ args: { ...readOnly(READ_SINGLE_FLAGS), id: ID },
944
+ run: online(runPlacement)
945
+ });
893
946
  var membershipCmd = (kind) => defineCommand({
894
947
  meta: {
895
948
  name: kind,
@@ -1003,10 +1056,60 @@ var voiceClipCommand = defineCommand({
1003
1056
  meta: { name: "voice-clip", description: DESCRIPTIONS.campaignVoiceClip },
1004
1057
  subCommands: { upload: voiceClipUploadCmd, get: voiceClipGetCmd },
1005
1058
  async run() {
1006
- const { showHelp } = await import("./examples-IGQJCSNL.js");
1059
+ const { showHelp } = await import("./examples-5FJS47QF.js");
1007
1060
  await showHelp(voiceClipCommand, ["curviate", "campaign", "voice-clip"]);
1008
1061
  }
1009
1062
  });
1063
+ var attachmentUploadCmd = defineCommand({
1064
+ meta: {
1065
+ name: "upload",
1066
+ description: "Upload one file and print it: its `id` (cat_...) goes in an email step's `attachment_ids` (at most 10 a step, 20 MiB in total). Up to 20 MiB, 100 uploads per Team per 24 hours. Curviate reads the type from the file's bytes; executables, scripts, installers and macro-enabled Office files are refused. A link usually lands better than a file. Nothing is sent. Needs Automate. The CLI reads the path here, on your machine, and streams it in one request; a file over 20 MiB is refused before it leaves (exit 2). Curviate never fetches a path or a URL. From a Microsoft sign-in Mailbox, files of about 2.2 MB in all go today; a step's files above that are refused at send (attachment_refused).",
1067
+ risk: "write",
1068
+ rules: {
1069
+ changes: "Stores one file for your Team. No Campaign changes and nothing is sent to anyone.",
1070
+ visible_to: "Your Team; the recipients of the emails whose step names it.",
1071
+ budget_rows: [],
1072
+ retry: "A retry stores a second file (it counts toward the 24-hour cap); a file no Sequence uses is deleted 30 days after its upload.",
1073
+ undo: "Not needed: a file no Sequence uses is deleted after 30 days."
1074
+ },
1075
+ output: ["The file: `id`, `filename`, `content_type`, `bytes`, `created_at`. No download link."],
1076
+ errors: {
1077
+ UNSUPPORTED_MEDIA_TYPE: "an executable, a script, an installer, a shortcut, a disk image or a macro-enabled Office file; the message names the type. Nothing is stored.",
1078
+ PAYLOAD_TOO_LARGE: "the file is over 20 MiB.",
1079
+ RATE_LIMIT_TENANT: "100 uploads in the last 24 hours; Retry-After is the wait.",
1080
+ TIER_REQUIRED: "Campaign attachments need the Automate plan.",
1081
+ ...ROLE_ERRORS
1082
+ },
1083
+ seeAlso: ["curviate campaign attachment get", "curviate campaign lint", "curviate campaign check"],
1084
+ examples: ["curviate campaign attachment upload pricing.pdf", "curviate campaign attachment upload deck.pdf --preview"]
1085
+ },
1086
+ args: {
1087
+ ...WRITE_SINGLE_FLAGS,
1088
+ file: { type: "positional", required: true, description: "The file's path." }
1089
+ },
1090
+ run: online(runAttachmentUpload)
1091
+ });
1092
+ var attachmentGetCmd = defineCommand({
1093
+ meta: {
1094
+ name: "get",
1095
+ description: "One Campaign attachment: file name, type, size and upload time. No download link. Another Team's file is RESOURCE_NOT_FOUND, like an unknown id.",
1096
+ risk: "read",
1097
+ examples: ["curviate campaign attachment get cat_YOUR_ATTACHMENT_ID"]
1098
+ },
1099
+ args: {
1100
+ ...readOnly(READ_SINGLE_FLAGS),
1101
+ id: { type: "positional", description: "Attachment id (cat_...)." }
1102
+ },
1103
+ run: online(runAttachmentGet)
1104
+ });
1105
+ var attachmentCommand = defineCommand({
1106
+ meta: { name: "attachment", description: DESCRIPTIONS.campaignAttachment },
1107
+ subCommands: { upload: attachmentUploadCmd, get: attachmentGetCmd },
1108
+ async run() {
1109
+ const { showHelp } = await import("./examples-5FJS47QF.js");
1110
+ await showHelp(attachmentCommand, ["curviate", "campaign", "attachment"]);
1111
+ }
1112
+ });
1010
1113
  var campaignCommand = defineCommand({
1011
1114
  meta: { name: "campaign", description: DESCRIPTIONS.campaign },
1012
1115
  subCommands: {
@@ -1021,14 +1124,16 @@ var campaignCommand = defineCommand({
1021
1124
  delete: deleteCmd,
1022
1125
  preview: previewCmd,
1023
1126
  check: checkCmd,
1127
+ placement: placementCmd,
1024
1128
  add: membershipCmd("add"),
1025
1129
  remove: membershipCmd("remove"),
1026
1130
  lint: lintCmd,
1027
1131
  init: initCmd,
1028
- "voice-clip": voiceClipCommand
1132
+ "voice-clip": voiceClipCommand,
1133
+ attachment: attachmentCommand
1029
1134
  },
1030
1135
  async run() {
1031
- const { showHelp } = await import("./examples-IGQJCSNL.js");
1136
+ const { showHelp } = await import("./examples-5FJS47QF.js");
1032
1137
  await showHelp(campaignCommand, ["curviate", "campaign"]);
1033
1138
  }
1034
1139
  });
@@ -1,19 +1,19 @@
1
1
  #!/usr/bin/env node
2
- import {
3
- print,
4
- table
5
- } from "./chunk-5S3MJVI5.js";
6
2
  import {
7
3
  formatRows,
8
4
  writeExport
9
5
  } from "./chunk-PPGKQJKU.js";
6
+ import {
7
+ print,
8
+ table
9
+ } from "./chunk-5S3MJVI5.js";
10
10
  import {
11
11
  fail,
12
12
  listFlag,
13
13
  outputOpts,
14
14
  rootClient,
15
15
  usage
16
- } from "./chunk-UWRWZG4N.js";
16
+ } from "./chunk-5OAJ4D65.js";
17
17
  import {
18
18
  buildPreviewOutput
19
19
  } from "./chunk-TCUYH5GO.js";
@@ -27,12 +27,12 @@ import {
27
27
  readablePage,
28
28
  rejectPaginationModifiersWithoutAll,
29
29
  streamAll
30
- } from "./chunk-MIOEYSBQ.js";
30
+ } from "./chunk-KUVJM5CP.js";
31
31
  import {
32
32
  renderSuccess,
33
33
  writeNdjsonItem
34
34
  } from "./chunk-QM57YDJE.js";
35
- import "./chunk-7PLTQHNO.js";
35
+ import "./chunk-PBJZQZPO.js";
36
36
  import {
37
37
  GLOBAL_FLAGS,
38
38
  WRITE_SINGLE_FLAGS,
@@ -40,7 +40,7 @@ import {
40
40
  } from "./chunk-QLKGOIWS.js";
41
41
  import {
42
42
  DESCRIPTIONS
43
- } from "./chunk-MWVTFTWV.js";
43
+ } from "./chunk-XDPU2YAF.js";
44
44
  import "./chunk-ZYURL5VK.js";
45
45
 
46
46
  // src/commands/network.ts
@@ -225,7 +225,7 @@ var networkCommand = defineCommand({
225
225
  meta: { name: "network", description: DESCRIPTIONS.network },
226
226
  subCommands: { list: listCmd, status: statusCmd, export: exportCmd, resync: resyncCmd },
227
227
  async run() {
228
- const { showHelp } = await import("./examples-IGQJCSNL.js");
228
+ const { showHelp } = await import("./examples-5FJS47QF.js");
229
229
  await showHelp(networkCommand, ["curviate", "network"]);
230
230
  }
231
231
  });
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-Q3ZPRFUX.js";
6
6
  import {
7
7
  requireAccount
8
- } from "./chunk-CRO7PJ4I.js";
8
+ } from "./chunk-MLZSXQZC.js";
9
9
  import {
10
10
  buildPreviewOutput
11
11
  } from "./chunk-TCUYH5GO.js";
@@ -16,7 +16,7 @@ import {
16
16
  readablePage,
17
17
  rejectPaginationModifiersWithoutAll,
18
18
  streamAll
19
- } from "./chunk-MIOEYSBQ.js";
19
+ } from "./chunk-KUVJM5CP.js";
20
20
  import {
21
21
  renderError,
22
22
  renderSuccess,
@@ -26,7 +26,7 @@ import {
26
26
  import {
27
27
  createClient,
28
28
  resolveEffectiveConfig
29
- } from "./chunk-7PLTQHNO.js";
29
+ } from "./chunk-PBJZQZPO.js";
30
30
  import {
31
31
  GLOBAL_FLAGS,
32
32
  WRITE_SINGLE_FLAGS,
@@ -34,9 +34,9 @@ import {
34
34
  } from "./chunk-QLKGOIWS.js";
35
35
  import {
36
36
  DESCRIPTIONS
37
- } from "./chunk-MWVTFTWV.js";
37
+ } from "./chunk-XDPU2YAF.js";
38
38
  import "./chunk-ZYURL5VK.js";
39
- import "./chunk-RDKTHFQ6.js";
39
+ import "./chunk-EWSOIFG2.js";
40
40
 
41
41
  // src/commands/notification.ts
42
42
  import { defineCommand } from "citty";
@@ -57,7 +57,7 @@ function resolveOutputOpts(flags) {
57
57
  async function handleSdkError(err, outOpts, out) {
58
58
  const { CurviateError } = await import("@curviate/sdk");
59
59
  if (err instanceof CurviateError) {
60
- const { getExitCode } = await import("./exit-codes-ZSOLAXQO.js");
60
+ const { getExitCode } = await import("./exit-codes-LQDMGDII.js");
61
61
  renderError(err, outOpts, out);
62
62
  process.exit(getExitCode(err));
63
63
  }
@@ -4,7 +4,7 @@ import {
4
4
  outputOpts,
5
5
  rootClient,
6
6
  usage
7
- } from "./chunk-UWRWZG4N.js";
7
+ } from "./chunk-5OAJ4D65.js";
8
8
  import {
9
9
  buildPreviewOutput
10
10
  } from "./chunk-TCUYH5GO.js";
@@ -19,12 +19,12 @@ import {
19
19
  readablePage,
20
20
  rejectPaginationModifiersWithoutAll,
21
21
  streamAll
22
- } from "./chunk-MIOEYSBQ.js";
22
+ } from "./chunk-KUVJM5CP.js";
23
23
  import {
24
24
  renderSuccess,
25
25
  writeNdjsonItem
26
26
  } from "./chunk-QM57YDJE.js";
27
- import "./chunk-7PLTQHNO.js";
27
+ import "./chunk-PBJZQZPO.js";
28
28
  import {
29
29
  GLOBAL_FLAGS,
30
30
  READ_SINGLE_FLAGS,
@@ -33,7 +33,7 @@ import {
33
33
  } from "./chunk-QLKGOIWS.js";
34
34
  import {
35
35
  DESCRIPTIONS
36
- } from "./chunk-MWVTFTWV.js";
36
+ } from "./chunk-XDPU2YAF.js";
37
37
  import "./chunk-ZYURL5VK.js";
38
38
 
39
39
  // src/commands/notifications.ts
@@ -54,6 +54,10 @@ async function runList(c, f) {
54
54
  rejectPaginationModifiersWithoutAll(f, process);
55
55
  if (f.unread === true && f.archived === true) usage("--unread and --archived cannot be combined: an item is archived or unread, not both. Pass one.");
56
56
  const params = { filter: f.unread === true ? "unread" : f.archived === true ? "archived" : "all" };
57
+ if (f.channel !== void 0) {
58
+ if (!["email", "linkedin", "team"].includes(f.channel)) usage("--channel takes email, linkedin or team.");
59
+ params["channel"] = f.channel;
60
+ }
57
61
  if (f.limit !== void 0) params["limit"] = intFlag("limit", f.limit, 1, 100);
58
62
  const cursor = readCursorFlag(f, process);
59
63
  if (cursor) params["cursor"] = cursor;
@@ -103,7 +107,7 @@ var update = (body) => async (c, f) => {
103
107
  if (notFoundError) {
104
108
  process.stderr.write(`error: ${notFound.length} of ${all.length} notifications were not found (not yours, or already gone): ${notFound.join(", ")}. The others were applied.
105
109
  `);
106
- const { getExitCode } = await import("./exit-codes-ZSOLAXQO.js");
110
+ const { getExitCode } = await import("./exit-codes-LQDMGDII.js");
107
111
  process.exit(getExitCode(notFoundError));
108
112
  }
109
113
  };
@@ -124,15 +128,16 @@ var SEE = ["curviate notification list", "curviate core notification"];
124
128
  var listCmd = defineCommand({
125
129
  meta: {
126
130
  name: "list",
127
- description: "List your Curviate Notifications, newest first, with the unread count. Curviate's own, per Team; LinkedIn's notification cards are `curviate core notification list`. --unread lists unread ones, --archived archived ones, neither all (archived kept apart); --no-unread keeps only read ones. Kept for a limited time.",
131
+ description: "List your Curviate Notifications, newest first, with the unread count. Curviate's own, per Team; LinkedIn's notification cards are `curviate core notification list`. --unread lists unread ones, --archived archived ones, neither all (archived kept apart); --no-unread keeps only read ones. --channel keeps one channel. Problems that stop sending arrive unread; advice arrives read. Kept for a limited time.",
128
132
  risk: "read",
129
133
  output: ["`items`, a `cursor` for the next page, and `unread_count`, the Team-wide unread badge, not a count of the items shown."],
130
- examples: ["curviate notification list", "curviate notification list --unread", "curviate notification list --archived --limit 50"]
134
+ examples: ["curviate notification list", "curviate notification list --unread", "curviate notification list --channel email"]
131
135
  },
132
136
  args: {
133
137
  ...readOnly(GLOBAL_FLAGS),
134
138
  unread: { type: "boolean", description: "Only unread notifications (--no-unread: only read ones). Not with --archived." },
135
- archived: { type: "boolean", description: "Only archived notifications (--no-archived: not archived, which is also the default)." }
139
+ archived: { type: "boolean", description: "Only archived notifications (--no-archived: not archived, which is also the default)." },
140
+ channel: { type: "string", description: "Only this channel: email (Mailbox, domain and email-step problems), linkedin (an Account's LinkedIn trouble) or team." }
136
141
  },
137
142
  run: online(runList)
138
143
  });
@@ -222,7 +227,7 @@ var notificationsCommand = defineCommand({
222
227
  meta: { name: "notification", description: DESCRIPTIONS.notification },
223
228
  subCommands: { list: listCmd, count: countCmd, read: readCmd, "read-all": readAllCmd, archive: archiveCmd, unarchive: unarchiveCmd },
224
229
  async run() {
225
- const { showHelp } = await import("./examples-IGQJCSNL.js");
230
+ const { showHelp } = await import("./examples-5FJS47QF.js");
226
231
  await showHelp(notificationsCommand, ["curviate", "notification"]);
227
232
  }
228
233
  });
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  resolveMemberOrMeProviderId
4
- } from "./chunk-UOWOKEB2.js";
4
+ } from "./chunk-CQHCPZ5I.js";
5
5
  import "./chunk-UEAX6KUB.js";
6
6
  import {
7
7
  AS_ACCOUNT,
@@ -12,10 +12,10 @@ import {
12
12
  AttachError,
13
13
  readAttachment,
14
14
  toAttachmentPayload
15
- } from "./chunk-VHNF6OZD.js";
15
+ } from "./chunk-JY26SUNH.js";
16
16
  import {
17
17
  requireAccount
18
- } from "./chunk-CRO7PJ4I.js";
18
+ } from "./chunk-MLZSXQZC.js";
19
19
  import {
20
20
  buildPreviewOutput
21
21
  } from "./chunk-TCUYH5GO.js";
@@ -27,7 +27,7 @@ import {
27
27
  readablePage,
28
28
  rejectPaginationModifiersWithoutAll,
29
29
  streamAll
30
- } from "./chunk-MIOEYSBQ.js";
30
+ } from "./chunk-KUVJM5CP.js";
31
31
  import {
32
32
  renderError,
33
33
  renderSuccess,
@@ -37,7 +37,7 @@ import {
37
37
  import {
38
38
  createClient,
39
39
  resolveEffectiveConfig
40
- } from "./chunk-7PLTQHNO.js";
40
+ } from "./chunk-PBJZQZPO.js";
41
41
  import {
42
42
  GLOBAL_FLAGS,
43
43
  READ_SINGLE_FLAGS,
@@ -47,11 +47,11 @@ import {
47
47
  } from "./chunk-QLKGOIWS.js";
48
48
  import {
49
49
  DESCRIPTIONS
50
- } from "./chunk-MWVTFTWV.js";
50
+ } from "./chunk-XDPU2YAF.js";
51
51
  import {
52
52
  resolveTextOrStdin
53
53
  } from "./chunk-ZYURL5VK.js";
54
- import "./chunk-RDKTHFQ6.js";
54
+ import "./chunk-EWSOIFG2.js";
55
55
 
56
56
  // src/commands/post.ts
57
57
  import { defineCommand } from "citty";
@@ -89,7 +89,7 @@ function normalizeAttachPaths(attach) {
89
89
  async function handleSdkError(err, outOpts, out) {
90
90
  const { CurviateError } = await import("@curviate/sdk");
91
91
  if (err instanceof CurviateError) {
92
- const { getExitCode } = await import("./exit-codes-ZSOLAXQO.js");
92
+ const { getExitCode } = await import("./exit-codes-LQDMGDII.js");
93
93
  renderError(err, outOpts, out);
94
94
  process.exit(getExitCode(err));
95
95
  }
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  resolveMemberOrMeProviderId,
9
9
  resolveMemberProviderId
10
- } from "./chunk-UOWOKEB2.js";
10
+ } from "./chunk-CQHCPZ5I.js";
11
11
  import {
12
12
  resolveIdentifier
13
13
  } from "./chunk-UEAX6KUB.js";
@@ -26,10 +26,10 @@ import {
26
26
  AttachError,
27
27
  readAttachment,
28
28
  toAttachmentPayload
29
- } from "./chunk-VHNF6OZD.js";
29
+ } from "./chunk-JY26SUNH.js";
30
30
  import {
31
31
  requireAccount
32
- } from "./chunk-CRO7PJ4I.js";
32
+ } from "./chunk-MLZSXQZC.js";
33
33
  import {
34
34
  buildPreviewOutput
35
35
  } from "./chunk-TCUYH5GO.js";
@@ -42,7 +42,7 @@ import {
42
42
  readablePage,
43
43
  rejectPaginationModifiersWithoutAll,
44
44
  streamAll
45
- } from "./chunk-MIOEYSBQ.js";
45
+ } from "./chunk-KUVJM5CP.js";
46
46
  import {
47
47
  renderError,
48
48
  renderSuccess,
@@ -52,7 +52,7 @@ import {
52
52
  import {
53
53
  createClient,
54
54
  resolveEffectiveConfig
55
- } from "./chunk-7PLTQHNO.js";
55
+ } from "./chunk-PBJZQZPO.js";
56
56
  import {
57
57
  GLOBAL_FLAGS,
58
58
  READ_SINGLE_FLAGS,
@@ -61,9 +61,9 @@ import {
61
61
  } from "./chunk-QLKGOIWS.js";
62
62
  import {
63
63
  DESCRIPTIONS
64
- } from "./chunk-MWVTFTWV.js";
64
+ } from "./chunk-XDPU2YAF.js";
65
65
  import "./chunk-ZYURL5VK.js";
66
- import "./chunk-RDKTHFQ6.js";
66
+ import "./chunk-EWSOIFG2.js";
67
67
 
68
68
  // src/commands/profile.ts
69
69
  import { defineCommand } from "citty";
@@ -191,7 +191,7 @@ async function runProfileMe(client, flags, out) {
191
191
  } catch (err) {
192
192
  const { CurviateError } = await import("@curviate/sdk");
193
193
  if (err instanceof CurviateError) {
194
- const { getExitCode } = await import("./exit-codes-ZSOLAXQO.js");
194
+ const { getExitCode } = await import("./exit-codes-LQDMGDII.js");
195
195
  renderError(err, outOpts, out);
196
196
  process.exit(getExitCode(err));
197
197
  }
@@ -218,7 +218,7 @@ async function runProfileMe(client, flags, out) {
218
218
  } catch (err) {
219
219
  const { CurviateError } = await import("@curviate/sdk");
220
220
  if (err instanceof CurviateError) {
221
- const { getExitCode } = await import("./exit-codes-ZSOLAXQO.js");
221
+ const { getExitCode } = await import("./exit-codes-LQDMGDII.js");
222
222
  renderError(err, outOpts, out);
223
223
  process.exit(getExitCode(err));
224
224
  }
@@ -350,7 +350,7 @@ async function runProfileGet(client, flags, out) {
350
350
  } catch (err) {
351
351
  const { CurviateError } = await import("@curviate/sdk");
352
352
  if (err instanceof CurviateError) {
353
- const { getExitCode } = await import("./exit-codes-ZSOLAXQO.js");
353
+ const { getExitCode } = await import("./exit-codes-LQDMGDII.js");
354
354
  renderError(err, outOpts, out);
355
355
  process.exit(getExitCode(err));
356
356
  }
@@ -388,7 +388,7 @@ async function runProfileRelations(client, flags, out) {
388
388
  } catch (err) {
389
389
  const { CurviateError } = await import("@curviate/sdk");
390
390
  if (err instanceof CurviateError) {
391
- const { getExitCode } = await import("./exit-codes-ZSOLAXQO.js");
391
+ const { getExitCode } = await import("./exit-codes-LQDMGDII.js");
392
392
  renderError(err, outOpts, out);
393
393
  process.exit(getExitCode(err));
394
394
  }
@@ -428,7 +428,7 @@ async function runProfileEndorse(client, flags, out) {
428
428
  async function handleSdkError(err, outOpts, out) {
429
429
  const { CurviateError } = await import("@curviate/sdk");
430
430
  if (err instanceof CurviateError) {
431
- const { getExitCode } = await import("./exit-codes-ZSOLAXQO.js");
431
+ const { getExitCode } = await import("./exit-codes-LQDMGDII.js");
432
432
  renderError(err, outOpts, out);
433
433
  process.exit(getExitCode(err));
434
434
  }