@curviate/cli 0.56.0 → 0.57.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 (61) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/{account-ZF5NEMID.js → account-IRIYB2SG.js} +11 -11
  3. package/dist/{analytics-M7JWS67A.js → analytics-IRSCLVOL.js} +5 -5
  4. package/dist/{beta-consent-4Q2LZZQC.js → beta-consent-NQVGFZL3.js} +4 -4
  5. package/dist/{billing-LYPSX5SR.js → billing-TCTP44ZB.js} +58 -6
  6. package/dist/{chunk-UOWOKEB2.js → chunk-3B5M2RUN.js} +1 -1
  7. package/dist/{chunk-UWRWZG4N.js → chunk-3ZQNOKEK.js} +2 -2
  8. package/dist/{chunk-MWVTFTWV.js → chunk-5LGKZBAY.js} +5 -3
  9. package/dist/{chunk-XP6S6E55.js → chunk-6OT6TS7N.js} +2 -2
  10. package/dist/{chunk-J4SFOFMT.js → chunk-A6JGJGDF.js} +16 -16
  11. package/dist/{chunk-L3RJU7C3.js → chunk-AG6G3PRQ.js} +110 -13
  12. package/dist/{chunk-CRO7PJ4I.js → chunk-F7CLAS5Y.js} +2 -2
  13. package/dist/{chunk-MIOEYSBQ.js → chunk-OE4CY3ZL.js} +1 -1
  14. package/dist/{chunk-EI64VFBE.js → chunk-RTT75CXE.js} +44 -6
  15. package/dist/{chunk-7PLTQHNO.js → chunk-RXDG57B2.js} +1 -1
  16. package/dist/{chunk-RDKTHFQ6.js → chunk-SCUTAREU.js} +4 -0
  17. package/dist/{chunk-VEMK4MJM.js → chunk-VPFV7YV3.js} +5 -5
  18. package/dist/cli.js +32 -30
  19. package/dist/{comment-D6RSZTVK.js → comment-PNHEKGZX.js} +7 -7
  20. package/dist/{company-3Z6PXGTW.js → company-OUFF23SU.js} +20 -9
  21. package/dist/company-record-ULPDDB6L.js +128 -0
  22. package/dist/{config-VY5MCJMN.js → config-U6VDNL2P.js} +2 -2
  23. package/dist/{connect-G2RTLV7G.js → connect-ICNXC37R.js} +11 -11
  24. package/dist/{contact-QSLJCBDE.js → contact-K6RIVQWU.js} +9 -9
  25. package/dist/{contact-groups-OITAD73K.js → contact-groups-CNH2VB6A.js} +11 -11
  26. package/dist/{contact-import-LT7BKESC.js → contact-import-FK22UTN2.js} +10 -10
  27. package/dist/core-MPEBYNSL.js +46 -0
  28. package/dist/{do-not-contact-ZA7KS5WD.js → do-not-contact-BQHXNHTV.js} +13 -13
  29. package/dist/{doctor-JQT3DO6G.js → doctor-ZYPZF5BE.js} +21 -4
  30. package/dist/{domain-7EX4E34B.js → domain-HLOT6Y4A.js} +8 -8
  31. package/dist/{draft-7U6H4BPF.js → draft-JGQ36JSH.js} +4 -4
  32. package/dist/{enrollment-AZ6XGVVL.js → enrollment-CF634DB4.js} +9 -9
  33. package/dist/{examples-IGQJCSNL.js → examples-J4X5NEIE.js} +1 -1
  34. package/dist/{exit-codes-ZSOLAXQO.js → exit-codes-P2FLCKM7.js} +1 -1
  35. package/dist/{export-OYMQXL62.js → export-ZQLDQYUZ.js} +4 -4
  36. package/dist/{feed-M5D4SJW7.js → feed-RQHEDZVL.js} +6 -6
  37. package/dist/{group-UTC3YBKE.js → group-LRMG76FN.js} +6 -6
  38. package/dist/{inbox-VSGNHSLG.js → inbox-5RGG5RQG.js} +6 -6
  39. package/dist/{inboxes-23C2MJK4.js → inboxes-ZFY6ZP33.js} +6 -6
  40. package/dist/{incoming-QVPP32K7.js → incoming-3MJ4CP6H.js} +8 -8
  41. package/dist/{job-ZHVFFRWE.js → job-QFIUTHHT.js} +6 -6
  42. package/dist/{login-6OTNXEJZ.js → login-THXWX5HZ.js} +2 -2
  43. package/dist/{mailbox-HD2UXZCA.js → mailbox-54DPLNXA.js} +23 -16
  44. package/dist/{message-PIV77W47.js → message-DM5OUKQS.js} +6 -6
  45. package/dist/{motion-AHYF34DP.js → motion-NKOAK7NU.js} +10 -10
  46. package/dist/{network-RJHJFZEY.js → network-VKJUMZ2L.js} +8 -8
  47. package/dist/{notification-XGR4NT3S.js → notification-XW5J6KFA.js} +6 -6
  48. package/dist/{notifications-BHRWSHPR.js → notifications-USYOV54R.js} +17 -12
  49. package/dist/{post-Z7AVDDKA.js → post-M2G3BK4A.js} +7 -7
  50. package/dist/{profile-YZNBX2RP.js → profile-3SG64IEG.js} +11 -11
  51. package/dist/{recruiter-EXM4P7X7.js → recruiter-7OUGZ776.js} +6 -6
  52. package/dist/{sales-nav-CKDSEXV2.js → sales-nav-HHQLLM5C.js} +6 -6
  53. package/dist/{search-B7FB6674.js → search-5LMSLUH4.js} +14 -14
  54. package/dist/{setup-VZVPLJ4V.js → setup-6F4HYUSZ.js} +4 -4
  55. package/dist/signal-LVODDBOY.js +331 -0
  56. package/dist/{team-PYABBUHO.js → team-MSOPELF6.js} +62 -8
  57. package/dist/{tier-PRK4WQKR.js → tier-RXHOAQ6L.js} +6 -5
  58. package/dist/{unibox-ZNKX2EKL.js → unibox-UAA6WIGZ.js} +65 -12
  59. package/dist/{webhook-V74EV4E2.js → webhook-J2H7X766.js} +8 -8
  60. package/package.json +2 -2
  61. package/dist/core-RFTNNB6P.js +0 -46
@@ -0,0 +1,128 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ fail,
4
+ listFlag,
5
+ outputOpts,
6
+ rootClient,
7
+ usage
8
+ } from "./chunk-3ZQNOKEK.js";
9
+ import {
10
+ buildPreviewOutput
11
+ } from "./chunk-TCUYH5GO.js";
12
+ import {
13
+ readableObject
14
+ } from "./chunk-OE4CY3ZL.js";
15
+ import {
16
+ renderSuccess
17
+ } from "./chunk-QM57YDJE.js";
18
+ import "./chunk-RXDG57B2.js";
19
+ import {
20
+ READ_SINGLE_FLAGS,
21
+ WRITE_SINGLE_FLAGS,
22
+ readOnly
23
+ } from "./chunk-QLKGOIWS.js";
24
+ import {
25
+ DESCRIPTIONS
26
+ } from "./chunk-5LGKZBAY.js";
27
+ import "./chunk-ZYURL5VK.js";
28
+
29
+ // src/commands/company-record.ts
30
+ import { defineCommand } from "citty";
31
+ var KEY = /^[A-Za-z0-9_]{1,64}$/;
32
+ var companyId = (f) => {
33
+ const id = String(f.id ?? "").trim();
34
+ if (!/^\d+$/.test(id)) usage("the company id is LinkedIn's numeric company id (the `id` of `curviate core company <handle>`), for example 1234567.");
35
+ return id;
36
+ };
37
+ function extraBody(f) {
38
+ const extra = {};
39
+ for (const pair of listFlag("set", f.set)) {
40
+ const eq = pair.indexOf("=");
41
+ const k = eq < 0 ? "" : pair.slice(0, eq);
42
+ if (!KEY.test(k)) usage("--set takes key=value; the key is 1 to 64 letters, digits or _.");
43
+ const raw = pair.slice(eq + 1);
44
+ if (raw === "") usage(`--set ${k}=: an empty value is refused; use --unset ${k} to remove the key.`);
45
+ let v = raw;
46
+ try {
47
+ v = JSON.parse(raw);
48
+ } catch {
49
+ }
50
+ extra[k] = v;
51
+ }
52
+ for (const k of listFlag("unset", f.unset)) {
53
+ if (!KEY.test(k)) usage("--unset takes a key: 1 to 64 letters, digits or _.");
54
+ extra[k] = null;
55
+ }
56
+ if (!Object.keys(extra).length) usage("pass --set key=value or --unset key, at least one.");
57
+ return { extra };
58
+ }
59
+ var online = (fn) => async ({ args }) => {
60
+ const f = args;
61
+ await fn(await rootClient(f), f);
62
+ };
63
+ var ID = { type: "positional", description: "LinkedIn's numeric company id, for example 1234567." };
64
+ var getCmd = defineCommand({
65
+ meta: {
66
+ name: "get",
67
+ description: "What your Team holds for one company: the stored record (name, industry, website, size, headcount growth, location, read_at; all null when it was never read) and your own company fields. No LinkedIn call, no budget. Every role may read it.",
68
+ risk: "read",
69
+ seeAlso: ["curviate company fields", "curviate core company"],
70
+ errors: { RESOURCE_NOT_FOUND: "no Lead of your Team works at this company and your Team never read it." },
71
+ examples: ["curviate company get 1234567"]
72
+ },
73
+ args: { ...readOnly(READ_SINGLE_FLAGS), id: ID },
74
+ run: online(async (c, f) => {
75
+ const id = companyId(f);
76
+ try {
77
+ renderSuccess(readableObject(await c.companies.get(id)), outputOpts(f), process);
78
+ } catch (err) {
79
+ await fail(err, f);
80
+ }
81
+ })
82
+ });
83
+ var fieldsCmd = defineCommand({
84
+ meta: {
85
+ name: "fields",
86
+ description: "Set or remove your Team's own fields for one company, merged by key: set once for every Lead who works there and read in a Sequence as {{company.extra.<key>}}. Keys left out stay. At most 100 keys and 32 KiB once merged.",
87
+ risk: "write",
88
+ rules: {
89
+ changes: "The company's fields in your Team; every Campaign text using {{company.extra.<key>}} reads the new value from its next send.",
90
+ visible_to: "Your Team.",
91
+ budget_rows: [],
92
+ retry: "Safe to repeat: the same values again.",
93
+ undo: "Run it again with the previous values, or --unset the key."
94
+ },
95
+ errors: { RESOURCE_NOT_FOUND: "no Lead of your Team works at this company and your Team never read it.", INVALID_REQUEST: "a key outside the pattern, or the fields would pass 100 keys or 32 KiB once merged." },
96
+ seeAlso: ["curviate company get", "curviate campaign lint"],
97
+ examples: ['curviate company fields 1234567 --set tier=A --set owner="Ana Lopez"', "curviate company fields 1234567 --unset owner"]
98
+ },
99
+ args: {
100
+ ...WRITE_SINGLE_FLAGS,
101
+ id: ID,
102
+ set: { type: "string", description: "key=value, repeatable. A JSON value (a number, true, a list) is stored as JSON, anything else as text." },
103
+ unset: { type: "string", description: "A key to remove, repeatable or a comma list." }
104
+ },
105
+ run: async ({ args }) => {
106
+ const f = args;
107
+ const id = companyId(f);
108
+ const body = extraBody(f);
109
+ if (f.preview) return void process.stdout.write(JSON.stringify(buildPreviewOutput({ method: "companies.update", args: { company_id: id }, body })) + "\n");
110
+ const c = await rootClient(f);
111
+ try {
112
+ renderSuccess(readableObject(await c.companies.update(id, body)), outputOpts(f), process);
113
+ } catch (err) {
114
+ await fail(err, f);
115
+ }
116
+ }
117
+ });
118
+ var companyRecordCommand = defineCommand({
119
+ meta: { name: "company", description: DESCRIPTIONS.companyRecord },
120
+ subCommands: { get: getCmd, fields: fieldsCmd },
121
+ async run() {
122
+ const { showHelp } = await import("./examples-J4X5NEIE.js");
123
+ await showHelp(companyRecordCommand, ["curviate", "company"]);
124
+ }
125
+ });
126
+ export {
127
+ companyRecordCommand
128
+ };
@@ -12,13 +12,13 @@ import {
12
12
  setActiveProfile,
13
13
  updateProfileField,
14
14
  withoutUserinfo
15
- } from "./chunk-7PLTQHNO.js";
15
+ } from "./chunk-RXDG57B2.js";
16
16
  import {
17
17
  GLOBAL_FLAGS
18
18
  } from "./chunk-QLKGOIWS.js";
19
19
  import {
20
20
  DESCRIPTIONS
21
- } from "./chunk-MWVTFTWV.js";
21
+ } from "./chunk-5LGKZBAY.js";
22
22
  import "./chunk-ZYURL5VK.js";
23
23
 
24
24
  // src/commands/config.ts
@@ -15,7 +15,7 @@ import {
15
15
  } from "./chunk-JXDEV33Z.js";
16
16
  import {
17
17
  requireAccount
18
- } from "./chunk-CRO7PJ4I.js";
18
+ } from "./chunk-F7CLAS5Y.js";
19
19
  import {
20
20
  buildPreviewOutput
21
21
  } from "./chunk-TCUYH5GO.js";
@@ -26,7 +26,7 @@ import {
26
26
  readablePage,
27
27
  rejectPaginationModifiersWithoutAll,
28
28
  streamAll
29
- } from "./chunk-MIOEYSBQ.js";
29
+ } from "./chunk-OE4CY3ZL.js";
30
30
  import {
31
31
  renderError,
32
32
  renderSuccess,
@@ -36,7 +36,7 @@ import {
36
36
  import {
37
37
  createClient,
38
38
  resolveEffectiveConfig
39
- } from "./chunk-7PLTQHNO.js";
39
+ } from "./chunk-RXDG57B2.js";
40
40
  import {
41
41
  GLOBAL_FLAGS,
42
42
  WRITE_FLAGS,
@@ -44,12 +44,12 @@ import {
44
44
  } from "./chunk-QLKGOIWS.js";
45
45
  import {
46
46
  DESCRIPTIONS
47
- } from "./chunk-MWVTFTWV.js";
47
+ } from "./chunk-5LGKZBAY.js";
48
48
  import {
49
49
  nearestSubcommand
50
50
  } from "./chunk-FDJMAF7D.js";
51
51
  import "./chunk-ZYURL5VK.js";
52
- import "./chunk-RDKTHFQ6.js";
52
+ import "./chunk-SCUTAREU.js";
53
53
 
54
54
  // src/commands/connect.ts
55
55
  import { defineCommand } from "citty";
@@ -93,7 +93,7 @@ async function runConnectSend(client, flags, out) {
93
93
  } catch (err) {
94
94
  const { CurviateError } = await import("@curviate/sdk");
95
95
  if (err instanceof CurviateError) {
96
- const { getExitCode } = await import("./exit-codes-ZSOLAXQO.js");
96
+ const { getExitCode } = await import("./exit-codes-P2FLCKM7.js");
97
97
  renderError(err, outOpts, out);
98
98
  process.exit(getExitCode(err));
99
99
  }
@@ -132,7 +132,7 @@ async function runConnectSent(client, flags, out) {
132
132
  } catch (err) {
133
133
  const { CurviateError } = await import("@curviate/sdk");
134
134
  if (err instanceof CurviateError) {
135
- const { getExitCode } = await import("./exit-codes-ZSOLAXQO.js");
135
+ const { getExitCode } = await import("./exit-codes-P2FLCKM7.js");
136
136
  renderError(err, outOpts, out);
137
137
  process.exit(getExitCode(err));
138
138
  }
@@ -171,7 +171,7 @@ async function runConnectReceived(client, flags, out) {
171
171
  } catch (err) {
172
172
  const { CurviateError } = await import("@curviate/sdk");
173
173
  if (err instanceof CurviateError) {
174
- const { getExitCode } = await import("./exit-codes-ZSOLAXQO.js");
174
+ const { getExitCode } = await import("./exit-codes-P2FLCKM7.js");
175
175
  renderError(err, outOpts, out);
176
176
  process.exit(getExitCode(err));
177
177
  }
@@ -200,7 +200,7 @@ async function runConnectAccept(client, flags, out) {
200
200
  } catch (err) {
201
201
  const { CurviateError } = await import("@curviate/sdk");
202
202
  if (err instanceof CurviateError) {
203
- const { getExitCode } = await import("./exit-codes-ZSOLAXQO.js");
203
+ const { getExitCode } = await import("./exit-codes-P2FLCKM7.js");
204
204
  renderError(err, outOpts, out);
205
205
  process.exit(getExitCode(err));
206
206
  }
@@ -229,7 +229,7 @@ async function runConnectDecline(client, flags, out) {
229
229
  } catch (err) {
230
230
  const { CurviateError } = await import("@curviate/sdk");
231
231
  if (err instanceof CurviateError) {
232
- const { getExitCode } = await import("./exit-codes-ZSOLAXQO.js");
232
+ const { getExitCode } = await import("./exit-codes-P2FLCKM7.js");
233
233
  renderError(err, outOpts, out);
234
234
  process.exit(getExitCode(err));
235
235
  }
@@ -258,7 +258,7 @@ async function runConnectCancel(client, flags, out) {
258
258
  } catch (err) {
259
259
  const { CurviateError } = await import("@curviate/sdk");
260
260
  if (err instanceof CurviateError) {
261
- const { getExitCode } = await import("./exit-codes-ZSOLAXQO.js");
261
+ const { getExitCode } = await import("./exit-codes-P2FLCKM7.js");
262
262
  renderError(err, outOpts, out);
263
263
  process.exit(getExitCode(err));
264
264
  }
@@ -7,20 +7,20 @@ import {
7
7
  online,
8
8
  positionals,
9
9
  preview
10
- } from "./chunk-J4SFOFMT.js";
11
- import "./chunk-CRO7PJ4I.js";
10
+ } from "./chunk-A6JGJGDF.js";
12
11
  import "./chunk-GOICALYQ.js";
13
- import "./chunk-XP6S6E55.js";
14
- import "./chunk-UWRWZG4N.js";
15
- import "./chunk-TCUYH5GO.js";
12
+ import "./chunk-F7CLAS5Y.js";
13
+ import "./chunk-6OT6TS7N.js";
14
+ import "./chunk-3ZQNOKEK.js";
16
15
  import "./chunk-NNV2OYEF.js";
17
- import "./chunk-MIOEYSBQ.js";
16
+ import "./chunk-TCUYH5GO.js";
17
+ import "./chunk-OE4CY3ZL.js";
18
18
  import "./chunk-QM57YDJE.js";
19
- import "./chunk-7PLTQHNO.js";
19
+ import "./chunk-RXDG57B2.js";
20
20
  import "./chunk-QLKGOIWS.js";
21
- import "./chunk-MWVTFTWV.js";
21
+ import "./chunk-5LGKZBAY.js";
22
22
  import "./chunk-ZYURL5VK.js";
23
- import "./chunk-RDKTHFQ6.js";
23
+ import "./chunk-SCUTAREU.js";
24
24
  export {
25
25
  BULK_MAX_IDS,
26
26
  contactCommand,
@@ -8,22 +8,22 @@ import {
8
8
  online,
9
9
  preview,
10
10
  readFilter
11
- } from "./chunk-J4SFOFMT.js";
12
- import "./chunk-CRO7PJ4I.js";
11
+ } from "./chunk-A6JGJGDF.js";
13
12
  import "./chunk-GOICALYQ.js";
13
+ import "./chunk-F7CLAS5Y.js";
14
14
  import {
15
15
  sendInChunks
16
- } from "./chunk-XP6S6E55.js";
16
+ } from "./chunk-6OT6TS7N.js";
17
17
  import {
18
18
  fail,
19
19
  listFlag,
20
20
  outputOpts,
21
21
  usage
22
- } from "./chunk-UWRWZG4N.js";
23
- import "./chunk-TCUYH5GO.js";
22
+ } from "./chunk-3ZQNOKEK.js";
24
23
  import {
25
24
  intFlag
26
25
  } from "./chunk-NNV2OYEF.js";
26
+ import "./chunk-TCUYH5GO.js";
27
27
  import {
28
28
  pageDelayFromFlags,
29
29
  readCursorFlag,
@@ -32,21 +32,21 @@ import {
32
32
  readablePage,
33
33
  rejectPaginationModifiersWithoutAll,
34
34
  streamAll
35
- } from "./chunk-MIOEYSBQ.js";
35
+ } from "./chunk-OE4CY3ZL.js";
36
36
  import {
37
37
  renderSuccess,
38
38
  writeNdjsonItem
39
39
  } from "./chunk-QM57YDJE.js";
40
- import "./chunk-7PLTQHNO.js";
40
+ import "./chunk-RXDG57B2.js";
41
41
  import {
42
42
  GLOBAL_FLAGS,
43
43
  READ_SINGLE_FLAGS,
44
44
  WRITE_SINGLE_FLAGS,
45
45
  readOnly
46
46
  } from "./chunk-QLKGOIWS.js";
47
- import "./chunk-MWVTFTWV.js";
47
+ import "./chunk-5LGKZBAY.js";
48
48
  import "./chunk-ZYURL5VK.js";
49
- import "./chunk-RDKTHFQ6.js";
49
+ import "./chunk-SCUTAREU.js";
50
50
 
51
51
  // src/commands/contact-groups.ts
52
52
  import { defineCommand } from "citty";
@@ -293,7 +293,7 @@ var contactListsCommand = defineCommand({
293
293
  meta: { name: "lists", description: "Lead lists: named sets of Leads a Campaign enrolls from." },
294
294
  subCommands: { list: listsList, get: listsGet, create: listsCreate, combine: listsCombine, update: listsUpdate, delete: listsDelete, add: membership("add"), remove: membership("remove") },
295
295
  async run() {
296
- const { showHelp } = await import("./examples-IGQJCSNL.js");
296
+ const { showHelp } = await import("./examples-J4X5NEIE.js");
297
297
  await showHelp(contactListsCommand, ["curviate", "lead", "lists"]);
298
298
  }
299
299
  });
@@ -390,7 +390,7 @@ var contactTagsCommand = defineCommand({
390
390
  meta: { name: "tags", description: "Tags: labels on Leads." },
391
391
  subCommands: { list: tagsList, update: tagsUpdate, delete: tagsDelete, add: tagging("add"), remove: tagging("remove") },
392
392
  async run() {
393
- const { showHelp } = await import("./examples-IGQJCSNL.js");
393
+ const { showHelp } = await import("./examples-J4X5NEIE.js");
394
394
  await showHelp(contactTagsCommand, ["curviate", "lead", "tags"]);
395
395
  }
396
396
  });
@@ -7,23 +7,23 @@ import {
7
7
  contactImportCommand,
8
8
  contactImportsCommand,
9
9
  csvRecords
10
- } from "./chunk-L3RJU7C3.js";
11
- import "./chunk-J4SFOFMT.js";
12
- import "./chunk-CRO7PJ4I.js";
10
+ } from "./chunk-AG6G3PRQ.js";
11
+ import "./chunk-A6JGJGDF.js";
13
12
  import "./chunk-GOICALYQ.js";
14
- import "./chunk-XP6S6E55.js";
15
- import "./chunk-UWRWZG4N.js";
16
- import "./chunk-TCUYH5GO.js";
13
+ import "./chunk-F7CLAS5Y.js";
14
+ import "./chunk-6OT6TS7N.js";
15
+ import "./chunk-3ZQNOKEK.js";
17
16
  import "./chunk-NNV2OYEF.js";
18
- import "./chunk-MIOEYSBQ.js";
17
+ import "./chunk-TCUYH5GO.js";
18
+ import "./chunk-OE4CY3ZL.js";
19
19
  import "./chunk-QM57YDJE.js";
20
- import "./chunk-7PLTQHNO.js";
20
+ import "./chunk-RXDG57B2.js";
21
21
  import "./chunk-QLKGOIWS.js";
22
- import "./chunk-MWVTFTWV.js";
22
+ import "./chunk-5LGKZBAY.js";
23
23
  import "./chunk-RKNW4UX4.js";
24
24
  import "./chunk-FDJMAF7D.js";
25
25
  import "./chunk-ZYURL5VK.js";
26
- import "./chunk-RDKTHFQ6.js";
26
+ import "./chunk-SCUTAREU.js";
27
27
  export {
28
28
  IMPORT_MAX_BODY_BYTES,
29
29
  IMPORT_MAX_ROWS,
@@ -0,0 +1,46 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ DESCRIPTIONS,
4
+ lazy
5
+ } from "./chunk-5LGKZBAY.js";
6
+
7
+ // src/commands/core.ts
8
+ import { defineCommand } from "citty";
9
+ var coreCommand = defineCommand({
10
+ meta: {
11
+ name: "core",
12
+ description: DESCRIPTIONS.core,
13
+ rules: {
14
+ notes: [
15
+ "Writes reach LinkedIn immediately and are seen by the people they touch.",
16
+ "A retry after a timeout can repeat a write: requests carry no idempotency key. Read the current state before retrying.",
17
+ "Budget rows, ceilings and what is left: `curviate account get <account_id>`."
18
+ ]
19
+ }
20
+ },
21
+ subCommands: {
22
+ profile: lazy("profile", () => import("./profile-3SG64IEG.js").then((m) => m.profileCommand)),
23
+ company: lazy("company", () => import("./company-OUFF23SU.js").then((m) => m.companyCommand)),
24
+ job: lazy("job", () => import("./job-QFIUTHHT.js").then((m) => m.jobCommand)),
25
+ connect: lazy("connect", () => import("./connect-ICNXC37R.js").then((m) => m.connectCommand)),
26
+ search: lazy("search", () => import("./search-5LMSLUH4.js").then((m) => m.searchCommand)),
27
+ inbox: lazy("inbox", () => import("./inbox-5RGG5RQG.js").then((m) => m.inboxCommand)),
28
+ inboxes: lazy("inboxes", () => import("./inboxes-ZFY6ZP33.js").then((m) => m.inboxesCommand)),
29
+ message: lazy("message", () => import("./message-DM5OUKQS.js").then((m) => m.messageCommand)),
30
+ post: lazy("post", () => import("./post-M2G3BK4A.js").then((m) => m.postCommand)),
31
+ comment: lazy("comment", () => import("./comment-PNHEKGZX.js").then((m) => m.commentCommand)),
32
+ "sales-nav": lazy("sales-nav", () => import("./sales-nav-HHQLLM5C.js").then((m) => m.salesNavCommand)),
33
+ recruiter: lazy("recruiter", () => import("./recruiter-7OUGZ776.js").then((m) => m.recruiterCommand)),
34
+ group: lazy("group", () => import("./group-LRMG76FN.js").then((m) => m.groupCommand)),
35
+ feed: lazy("feed", () => import("./feed-RQHEDZVL.js").then((m) => m.feedCommand)),
36
+ notification: lazy("coreNotification", () => import("./notification-XW5J6KFA.js").then((m) => m.notificationCommand)),
37
+ draft: lazy("draft", () => import("./draft-JGQ36JSH.js").then((m) => m.draftCommand))
38
+ },
39
+ async run() {
40
+ const { showHelp } = await import("./examples-J4X5NEIE.js");
41
+ await showHelp(coreCommand, ["curviate", "core"]);
42
+ }
43
+ });
44
+ export {
45
+ coreCommand
46
+ };
@@ -2,27 +2,27 @@
2
2
  import {
3
3
  chunkRows,
4
4
  csvRecords
5
- } from "./chunk-L3RJU7C3.js";
6
- import "./chunk-J4SFOFMT.js";
7
- import "./chunk-CRO7PJ4I.js";
5
+ } from "./chunk-AG6G3PRQ.js";
6
+ import "./chunk-A6JGJGDF.js";
8
7
  import {
9
8
  writeAtomic
10
9
  } from "./chunk-GOICALYQ.js";
10
+ import "./chunk-F7CLAS5Y.js";
11
11
  import {
12
12
  sendChunked
13
- } from "./chunk-XP6S6E55.js";
13
+ } from "./chunk-6OT6TS7N.js";
14
14
  import {
15
15
  fail,
16
16
  outputOpts,
17
17
  rootClient,
18
18
  usage
19
- } from "./chunk-UWRWZG4N.js";
20
- import {
21
- buildPreviewOutput
22
- } from "./chunk-TCUYH5GO.js";
19
+ } from "./chunk-3ZQNOKEK.js";
23
20
  import {
24
21
  intFlag
25
22
  } from "./chunk-NNV2OYEF.js";
23
+ import {
24
+ buildPreviewOutput
25
+ } from "./chunk-TCUYH5GO.js";
26
26
  import {
27
27
  pageDelayFromFlags,
28
28
  readCursorFlag,
@@ -31,14 +31,14 @@ import {
31
31
  readablePage,
32
32
  rejectPaginationModifiersWithoutAll,
33
33
  streamAll
34
- } from "./chunk-MIOEYSBQ.js";
34
+ } from "./chunk-OE4CY3ZL.js";
35
35
  import {
36
36
  renderSuccess,
37
37
  writeNdjsonItem
38
38
  } from "./chunk-QM57YDJE.js";
39
39
  import {
40
40
  downloadBinary
41
- } from "./chunk-7PLTQHNO.js";
41
+ } from "./chunk-RXDG57B2.js";
42
42
  import {
43
43
  GLOBAL_FLAGS,
44
44
  READ_SINGLE_FLAGS,
@@ -47,7 +47,7 @@ import {
47
47
  } from "./chunk-QLKGOIWS.js";
48
48
  import {
49
49
  DESCRIPTIONS
50
- } from "./chunk-MWVTFTWV.js";
50
+ } from "./chunk-5LGKZBAY.js";
51
51
  import {
52
52
  readFileFlag
53
53
  } from "./chunk-RKNW4UX4.js";
@@ -55,7 +55,7 @@ import "./chunk-FDJMAF7D.js";
55
55
  import {
56
56
  isStdinToken
57
57
  } from "./chunk-ZYURL5VK.js";
58
- import "./chunk-RDKTHFQ6.js";
58
+ import "./chunk-SCUTAREU.js";
59
59
 
60
60
  // src/commands/do-not-contact.ts
61
61
  import { defineCommand } from "citty";
@@ -377,7 +377,7 @@ var doNotContactCommand = defineCommand({
377
377
  meta: { name: "do-not-contact", description: DESCRIPTIONS["do-not-contact"] },
378
378
  subCommands: { list: listCmd, get: getCmd, add: addCmd, update: updateCmd, remove: removeCmd, export: exportCmd, import: importCmd },
379
379
  async run() {
380
- const { showHelp } = await import("./examples-IGQJCSNL.js");
380
+ const { showHelp } = await import("./examples-J4X5NEIE.js");
381
381
  await showHelp(doNotContactCommand, ["curviate", "do-not-contact"]);
382
382
  }
383
383
  });
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  readablePage
4
- } from "./chunk-MIOEYSBQ.js";
4
+ } from "./chunk-OE4CY3ZL.js";
5
5
  import "./chunk-QM57YDJE.js";
6
6
  import {
7
7
  createClient,
@@ -10,17 +10,17 @@ import {
10
10
  readConfigFile,
11
11
  resolveEffectiveConfig,
12
12
  withoutUserinfo
13
- } from "./chunk-7PLTQHNO.js";
13
+ } from "./chunk-RXDG57B2.js";
14
14
  import {
15
15
  GLOBAL_FLAGS
16
16
  } from "./chunk-QLKGOIWS.js";
17
17
  import {
18
18
  DESCRIPTIONS
19
- } from "./chunk-MWVTFTWV.js";
19
+ } from "./chunk-5LGKZBAY.js";
20
20
  import "./chunk-ZYURL5VK.js";
21
21
  import {
22
22
  getExitCode
23
- } from "./chunk-RDKTHFQ6.js";
23
+ } from "./chunk-SCUTAREU.js";
24
24
 
25
25
  // src/commands/doctor.ts
26
26
  import { defineCommand } from "citty";
@@ -42,6 +42,9 @@ function defaultVersion() {
42
42
  async function defaultListAccounts(apiKey, baseUrl, timeout) {
43
43
  return createClient({ apiKey, baseUrl, timeout }).accounts.list();
44
44
  }
45
+ async function defaultListMailboxes(apiKey, baseUrl, timeout, team) {
46
+ return createClient({ apiKey, baseUrl, timeout, ...team ? { team } : {} }).mailboxes.list({ limit: 100 });
47
+ }
45
48
  async function defaultListTeams(apiKey, baseUrl, timeout) {
46
49
  return createClient({ apiKey, baseUrl, timeout, team: null }).teams.list({ limit: 100 });
47
50
  }
@@ -57,6 +60,7 @@ function resolveDoctorIO(io = {}) {
57
60
  isOutputTTY: io.isOutputTTY ?? (process.stdout.isTTY ?? false),
58
61
  listAccounts: io.listAccounts ?? defaultListAccounts,
59
62
  listTeams: io.listTeams ?? defaultListTeams,
63
+ listMailboxes: io.listMailboxes ?? defaultListMailboxes,
60
64
  version: io.version ?? defaultVersion
61
65
  };
62
66
  }
@@ -132,6 +136,7 @@ async function runDoctor(args, io) {
132
136
  exit: 8
133
137
  });
134
138
  team = await checkTeam(io, effective.apiKey, effective.baseUrl, effective.timeout, keyScope, team, checks);
139
+ checks.push(await checkMailboxes(io, effective.apiKey, effective.baseUrl, effective.timeout, team?.team_id));
135
140
  } catch (err) {
136
141
  const error = err;
137
142
  const code = typeof error.code === "string" ? error.code : void 0;
@@ -180,6 +185,18 @@ async function runDoctor(args, io) {
180
185
  };
181
186
  return report;
182
187
  }
188
+ async function checkMailboxes(io, apiKey, baseUrl, timeout, team) {
189
+ try {
190
+ const payload = await io.listMailboxes(apiKey, baseUrl, timeout, team);
191
+ const items = isPlainObject(payload) && Array.isArray(payload["items"]) ? payload["items"] : [];
192
+ const sending = items.filter((m) => isPlainObject(m) && (m["state"] === "connected" || m["state"] === "ramping")).length;
193
+ const detail = items.length === 0 ? "none: email steps cannot send (`curviate mailbox connect`)" : `${items.length} (${sending} can send)`;
194
+ return { name: "mailboxes", ok: true, detail, exit: 0 };
195
+ } catch (err) {
196
+ const code = err.code;
197
+ return { name: "mailboxes", ok: true, detail: `not read (${typeof code === "string" ? code : "error"})`, exit: 0 };
198
+ }
199
+ }
183
200
  async function checkTeam(io, apiKey, baseUrl, timeout, scope, team, checks) {
184
201
  let rows;
185
202
  try {
@@ -4,24 +4,24 @@ import {
4
4
  outputOpts,
5
5
  rootClient,
6
6
  usage
7
- } from "./chunk-UWRWZG4N.js";
7
+ } from "./chunk-3ZQNOKEK.js";
8
8
  import {
9
9
  buildPreviewOutput
10
10
  } from "./chunk-TCUYH5GO.js";
11
11
  import {
12
12
  readableObject
13
- } from "./chunk-MIOEYSBQ.js";
13
+ } from "./chunk-OE4CY3ZL.js";
14
14
  import {
15
15
  renderSuccess
16
16
  } from "./chunk-QM57YDJE.js";
17
- import "./chunk-7PLTQHNO.js";
17
+ import "./chunk-RXDG57B2.js";
18
18
  import {
19
19
  READ_SINGLE_FLAGS,
20
20
  readOnly
21
21
  } from "./chunk-QLKGOIWS.js";
22
22
  import {
23
23
  DESCRIPTIONS
24
- } from "./chunk-MWVTFTWV.js";
24
+ } from "./chunk-5LGKZBAY.js";
25
25
  import "./chunk-ZYURL5VK.js";
26
26
 
27
27
  // src/commands/domain.ts
@@ -29,12 +29,12 @@ import { defineCommand } from "citty";
29
29
  var checkCmd = defineCommand({
30
30
  meta: {
31
31
  name: "check",
32
- description: "A sending domain's checks as last run (daily): mx, spf, dkim, dmarc and tracking, each pass, fail or unknown (a failed lookup, or a DKIM selector not known yet, is never a fail), with the tracking record to add and any blocklists. --now runs them now: DNS lookups only, nothing is sent and no Mailbox is contacted. A check warns and never stops sending. A domain none of your Team's Mailboxes is on is DOMAIN_NOT_FOUND.",
32
+ description: "A sending domain's checks as last run (daily): mx, spf, dkim, dmarc and tracking, each pass, fail or unknown (a failed lookup, or a DKIM selector not known yet, is never a fail), with the tracking record to add, any blocklists and the DKIM selector found. --now runs them now: DNS lookups only, nothing is sent and no Mailbox is contacted. It takes any domain your Team names, before its first Mailbox there too, so the records can be set up first. A check warns and never stops sending.",
33
33
  risk: "read",
34
34
  output: ["The domain with its checks. Without --now the answer is the last daily run; with --now, the run just made."],
35
- errors: { DOMAIN_NOT_FOUND: "none of your Team's Mailboxes is on this domain (another Team's domain answers the same)." },
35
+ errors: { DOMAIN_NOT_FOUND: "without --now: your Team has no Mailbox on this domain and never checked it (another Team's domain answers the same); a public email provider's domain always." },
36
36
  seeAlso: ["curviate mailbox list"],
37
- examples: ["curviate domain check acme.example", "curviate domain check acme.example --now"]
37
+ examples: ["curviate domain check acme.example --now", "curviate domain check acme.example"]
38
38
  },
39
39
  args: {
40
40
  ...readOnly(READ_SINGLE_FLAGS),
@@ -61,7 +61,7 @@ var domainCommand = defineCommand({
61
61
  meta: { name: "domain", description: DESCRIPTIONS["domain"] },
62
62
  subCommands: { check: checkCmd },
63
63
  async run() {
64
- const { showHelp } = await import("./examples-IGQJCSNL.js");
64
+ const { showHelp } = await import("./examples-J4X5NEIE.js");
65
65
  await showHelp(domainCommand, ["curviate", "domain"]);
66
66
  }
67
67
  });
@@ -20,7 +20,7 @@ import {
20
20
  readablePage,
21
21
  rejectPaginationModifiersWithoutAll,
22
22
  streamAll
23
- } from "./chunk-MIOEYSBQ.js";
23
+ } from "./chunk-OE4CY3ZL.js";
24
24
  import {
25
25
  renderError,
26
26
  renderSuccess,
@@ -30,7 +30,7 @@ import {
30
30
  import {
31
31
  createClient,
32
32
  resolveEffectiveConfig
33
- } from "./chunk-7PLTQHNO.js";
33
+ } from "./chunk-RXDG57B2.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-MWVTFTWV.js";
42
+ } from "./chunk-5LGKZBAY.js";
43
43
  import {
44
44
  resolveTextOrStdin
45
45
  } from "./chunk-ZYURL5VK.js";
@@ -73,7 +73,7 @@ function rejectAllOnNonPaginated(all, out) {
73
73
  async function handleError(err, outOpts, out) {
74
74
  const { CurviateError } = await import("@curviate/sdk");
75
75
  if (err instanceof CurviateError) {
76
- const { getExitCode } = await import("./exit-codes-ZSOLAXQO.js");
76
+ const { getExitCode } = await import("./exit-codes-P2FLCKM7.js");
77
77
  renderError(err, outOpts, out);
78
78
  process.exit(getExitCode(err));
79
79
  }