@curviate/cli 0.55.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 (68) hide show
  1. package/CHANGELOG.md +69 -0
  2. package/README.md +5 -4
  3. package/dist/{account-6L33JFZS.js → account-IRIYB2SG.js} +47 -22
  4. package/dist/{analytics-HGJGXRAM.js → analytics-IRSCLVOL.js} +5 -5
  5. package/dist/{beta-consent-LIND4PPN.js → beta-consent-NQVGFZL3.js} +4 -4
  6. package/dist/billing-TCTP44ZB.js +248 -0
  7. package/dist/{chunk-KLXDFFHT.js → chunk-3B5M2RUN.js} +1 -1
  8. package/dist/{chunk-LGUZ52BU.js → chunk-3ZQNOKEK.js} +2 -2
  9. package/dist/{chunk-QBY6L77D.js → chunk-5LGKZBAY.js} +5 -3
  10. package/dist/{chunk-Q5Z7FMXI.js → chunk-6OT6TS7N.js} +2 -2
  11. package/dist/{chunk-OYZ27Q3B.js → chunk-A6JGJGDF.js} +19 -17
  12. package/dist/{chunk-AMMAA62Z.js → chunk-AG6G3PRQ.js} +111 -14
  13. package/dist/{chunk-EA5LJ4CS.js → chunk-AMTKGO37.js} +1 -1
  14. package/dist/{chunk-J34JU27C.js → chunk-DENWYJK2.js} +2 -2
  15. package/dist/{chunk-Z3RPQ5K4.js → chunk-F7CLAS5Y.js} +2 -2
  16. package/dist/{chunk-ENBIMEKS.js → chunk-IB6ARI3R.js} +1 -1
  17. package/dist/{chunk-R7USRN52.js → chunk-OE4CY3ZL.js} +1 -1
  18. package/dist/{chunk-JKXGL7PT.js → chunk-RKNW4UX4.js} +42 -0
  19. package/dist/{chunk-BC4N5X3N.js → chunk-RTT75CXE.js} +44 -6
  20. package/dist/{chunk-S234PC5E.js → chunk-RXDG57B2.js} +1 -1
  21. package/dist/{chunk-RDKTHFQ6.js → chunk-SCUTAREU.js} +4 -0
  22. package/dist/{chunk-FHSGANM6.js → chunk-VPFV7YV3.js} +5 -5
  23. package/dist/cli.js +38 -30
  24. package/dist/{comment-IIKLEAEK.js → comment-PNHEKGZX.js} +7 -7
  25. package/dist/{company-CX5TZNB5.js → company-OUFF23SU.js} +20 -9
  26. package/dist/company-record-ULPDDB6L.js +128 -0
  27. package/dist/{config-Y4FC7QKM.js → config-U6VDNL2P.js} +2 -2
  28. package/dist/{connect-GUUBX23F.js → connect-ICNXC37R.js} +11 -11
  29. package/dist/{contact-OCYSFRTS.js → contact-K6RIVQWU.js} +9 -9
  30. package/dist/{contact-groups-HWJSYRFJ.js → contact-groups-CNH2VB6A.js} +11 -11
  31. package/dist/{contact-import-CTWSFT64.js → contact-import-FK22UTN2.js} +11 -11
  32. package/dist/core-MPEBYNSL.js +46 -0
  33. package/dist/{do-not-contact-6UVY3UKT.js → do-not-contact-BQHXNHTV.js} +46 -20
  34. package/dist/{doctor-6CB6DCY3.js → doctor-ZYPZF5BE.js} +21 -4
  35. package/dist/{document-ADK4GZA7.js → document-H65EXU4L.js} +1 -1
  36. package/dist/{domain-BUJMHYIV.js → domain-HLOT6Y4A.js} +8 -8
  37. package/dist/{draft-SII6E6Z6.js → draft-JGQ36JSH.js} +4 -4
  38. package/dist/{enrollment-OXGR5WVI.js → enrollment-CF634DB4.js} +11 -9
  39. package/dist/{examples-77WVMKZQ.js → examples-J4X5NEIE.js} +2 -2
  40. package/dist/{exit-codes-ZSOLAXQO.js → exit-codes-P2FLCKM7.js} +1 -1
  41. package/dist/{export-D32J5GRN.js → export-ZQLDQYUZ.js} +4 -4
  42. package/dist/{feed-HOFHCP6W.js → feed-RQHEDZVL.js} +6 -6
  43. package/dist/{group-AMYOAGNS.js → group-LRMG76FN.js} +6 -6
  44. package/dist/{inbox-NS2LB2WQ.js → inbox-5RGG5RQG.js} +6 -6
  45. package/dist/{inboxes-XWUZJ5PN.js → inboxes-ZFY6ZP33.js} +6 -6
  46. package/dist/{incoming-UIWRL6QS.js → incoming-3MJ4CP6H.js} +8 -8
  47. package/dist/{job-TKGPXU26.js → job-QFIUTHHT.js} +6 -6
  48. package/dist/{login-B2YWX2JP.js → login-THXWX5HZ.js} +4 -4
  49. package/dist/{mailbox-LLSGX2FF.js → mailbox-54DPLNXA.js} +27 -21
  50. package/dist/{message-M4THMNRZ.js → message-DM5OUKQS.js} +6 -6
  51. package/dist/{motion-2OUGYR3O.js → motion-NKOAK7NU.js} +101 -26
  52. package/dist/{network-MFWKXTEV.js → network-VKJUMZ2L.js} +8 -8
  53. package/dist/{notification-5K4TCYQA.js → notification-XW5J6KFA.js} +6 -6
  54. package/dist/{notifications-2GKUJB7C.js → notifications-USYOV54R.js} +17 -12
  55. package/dist/{post-BHH7YKGM.js → post-M2G3BK4A.js} +7 -7
  56. package/dist/{profile-GKMRRKZF.js → profile-3SG64IEG.js} +11 -11
  57. package/dist/{recruiter-J53ZSD4P.js → recruiter-7OUGZ776.js} +8 -8
  58. package/dist/{sales-nav-6I5SYTRX.js → sales-nav-HHQLLM5C.js} +8 -8
  59. package/dist/{search-HS2YAA33.js → search-5LMSLUH4.js} +16 -16
  60. package/dist/{setup-IYVOGVC6.js → setup-6F4HYUSZ.js} +5 -5
  61. package/dist/signal-LVODDBOY.js +331 -0
  62. package/dist/{team-N6ILUHAD.js → team-MSOPELF6.js} +62 -8
  63. package/dist/{tier-QWXKFESB.js → tier-RXHOAQ6L.js} +6 -5
  64. package/dist/{unibox-D4WIHIZX.js → unibox-UAA6WIGZ.js} +65 -12
  65. package/dist/{webhook-PKWGZZO2.js → webhook-J2H7X766.js} +9 -9
  66. package/package.json +2 -2
  67. package/dist/billing-QKPP5NPR.js +0 -124
  68. package/dist/core-37XZS2RG.js +0 -46
@@ -21,14 +21,14 @@ import {
21
21
  } from "./chunk-VHNF6OZD.js";
22
22
  import {
23
23
  requireAccount
24
- } from "./chunk-Z3RPQ5K4.js";
24
+ } from "./chunk-F7CLAS5Y.js";
25
25
  import {
26
26
  buildPreviewOutput
27
27
  } from "./chunk-TCUYH5GO.js";
28
28
  import {
29
29
  readableId,
30
30
  readableObject
31
- } from "./chunk-R7USRN52.js";
31
+ } from "./chunk-OE4CY3ZL.js";
32
32
  import {
33
33
  renderError,
34
34
  renderSuccess,
@@ -38,7 +38,7 @@ import {
38
38
  createClient,
39
39
  downloadBinary,
40
40
  resolveEffectiveConfig
41
- } from "./chunk-S234PC5E.js";
41
+ } from "./chunk-RXDG57B2.js";
42
42
  import {
43
43
  READ_SINGLE_FLAGS,
44
44
  WRITE_FLAGS,
@@ -46,7 +46,7 @@ import {
46
46
  } from "./chunk-QLKGOIWS.js";
47
47
  import {
48
48
  DESCRIPTIONS
49
- } from "./chunk-QBY6L77D.js";
49
+ } from "./chunk-5LGKZBAY.js";
50
50
  import {
51
51
  looksLikeCommandWord,
52
52
  nearestSubcommand
@@ -153,7 +153,7 @@ var MEMBER_PROVIDER_ID_RE = /^A[CDE][A-Za-z0-9_-]{4,}$/;
153
153
  async function handleSdkError(err, outOpts, out) {
154
154
  const { CurviateError } = await import("@curviate/sdk");
155
155
  if (err instanceof CurviateError) {
156
- const { getExitCode } = await import("./exit-codes-ZSOLAXQO.js");
156
+ const { getExitCode } = await import("./exit-codes-P2FLCKM7.js");
157
157
  renderError(err, outOpts, out);
158
158
  process.exit(getExitCode(err));
159
159
  }
package/dist/cli.js CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- import {
3
- SECRET_FLAGS
4
- } from "./chunk-TCUYH5GO.js";
5
2
  import {
6
3
  intFlag
7
4
  } from "./chunk-NNV2OYEF.js";
5
+ import {
6
+ SECRET_FLAGS
7
+ } from "./chunk-TCUYH5GO.js";
8
8
  import {
9
9
  GLOBAL_FLAGS,
10
10
  STATE_WRITES,
@@ -15,7 +15,7 @@ import {
15
15
  } from "./chunk-QLKGOIWS.js";
16
16
  import {
17
17
  lazy
18
- } from "./chunk-QBY6L77D.js";
18
+ } from "./chunk-5LGKZBAY.js";
19
19
  import {
20
20
  editDistance
21
21
  } from "./chunk-FDJMAF7D.js";
@@ -45,35 +45,37 @@ var main = defineCommand({
45
45
  // Subcommand registry, names and descriptions are static for help rendering;
46
46
  // the handler implementation is loaded lazily on first invocation.
47
47
  subCommands: {
48
- setup: lazy("setup", () => import("./setup-IYVOGVC6.js").then((m) => m.setupCommand)),
49
- doctor: lazy("doctor", () => import("./doctor-6CB6DCY3.js").then((m) => m.doctorCommand)),
50
- login: lazy("login", () => import("./login-B2YWX2JP.js").then((m) => m.loginCommand)),
51
- config: lazy("config", () => import("./config-Y4FC7QKM.js").then((m) => m.configCommand)),
52
- account: lazy("account", () => import("./account-6L33JFZS.js").then((m) => m.accountCommand)),
53
- campaign: lazy("campaign", () => import("./motion-2OUGYR3O.js").then((m) => m.campaignCommand)),
54
- enrollment: lazy("enrollment", () => import("./enrollment-OXGR5WVI.js").then((m) => m.enrollmentCommand)),
55
- lead: lazy("lead", () => import("./contact-OCYSFRTS.js").then((m) => m.contactCommand)),
56
- "do-not-contact": lazy("do-not-contact", () => import("./do-not-contact-6UVY3UKT.js").then((m) => m.doNotContactCommand)),
57
- mailbox: lazy("mailbox", () => import("./mailbox-LLSGX2FF.js").then((m) => m.mailboxCommand)),
58
- domain: lazy("domain", () => import("./domain-BUJMHYIV.js").then((m) => m.domainCommand)),
59
- unibox: lazy("unibox", () => import("./unibox-D4WIHIZX.js").then((m) => m.uniboxCommand)),
60
- network: lazy("network", () => import("./network-MFWKXTEV.js").then((m) => m.networkCommand)),
61
- analytics: lazy("analytics", () => import("./analytics-HGJGXRAM.js").then((m) => m.analyticsCommand)),
62
- notification: lazy("notification", () => import("./notifications-2GKUJB7C.js").then((m) => m.notificationsCommand)),
63
- export: lazy("export", () => import("./export-D32J5GRN.js").then((m) => m.exportCommand)),
64
- billing: lazy("billing", () => import("./billing-QKPP5NPR.js").then((m) => m.billingCommand)),
65
- tier: lazy("tier", () => import("./tier-QWXKFESB.js").then((m) => m.tierCommand)),
66
- team: lazy("team", () => import("./team-N6ILUHAD.js").then((m) => m.teamCommand)),
67
- incoming: lazy("incoming", () => import("./incoming-UIWRL6QS.js").then((m) => m.incomingCommand)),
68
- beta: lazy("beta", () => import("./beta-consent-LIND4PPN.js").then((m) => m.betaCommand)),
69
- webhook: lazy("webhook", () => import("./webhook-PKWGZZO2.js").then((m) => m.webhookCommand)),
48
+ setup: lazy("setup", () => import("./setup-6F4HYUSZ.js").then((m) => m.setupCommand)),
49
+ doctor: lazy("doctor", () => import("./doctor-ZYPZF5BE.js").then((m) => m.doctorCommand)),
50
+ login: lazy("login", () => import("./login-THXWX5HZ.js").then((m) => m.loginCommand)),
51
+ config: lazy("config", () => import("./config-U6VDNL2P.js").then((m) => m.configCommand)),
52
+ account: lazy("account", () => import("./account-IRIYB2SG.js").then((m) => m.accountCommand)),
53
+ campaign: lazy("campaign", () => import("./motion-NKOAK7NU.js").then((m) => m.campaignCommand)),
54
+ enrollment: lazy("enrollment", () => import("./enrollment-CF634DB4.js").then((m) => m.enrollmentCommand)),
55
+ lead: lazy("lead", () => import("./contact-K6RIVQWU.js").then((m) => m.contactCommand)),
56
+ company: lazy("companyRecord", () => import("./company-record-ULPDDB6L.js").then((m) => m.companyRecordCommand)),
57
+ signal: lazy("signal", () => import("./signal-LVODDBOY.js").then((m) => m.signalCommand)),
58
+ "do-not-contact": lazy("do-not-contact", () => import("./do-not-contact-BQHXNHTV.js").then((m) => m.doNotContactCommand)),
59
+ mailbox: lazy("mailbox", () => import("./mailbox-54DPLNXA.js").then((m) => m.mailboxCommand)),
60
+ domain: lazy("domain", () => import("./domain-HLOT6Y4A.js").then((m) => m.domainCommand)),
61
+ unibox: lazy("unibox", () => import("./unibox-UAA6WIGZ.js").then((m) => m.uniboxCommand)),
62
+ network: lazy("network", () => import("./network-VKJUMZ2L.js").then((m) => m.networkCommand)),
63
+ analytics: lazy("analytics", () => import("./analytics-IRSCLVOL.js").then((m) => m.analyticsCommand)),
64
+ notification: lazy("notification", () => import("./notifications-USYOV54R.js").then((m) => m.notificationsCommand)),
65
+ export: lazy("export", () => import("./export-ZQLDQYUZ.js").then((m) => m.exportCommand)),
66
+ billing: lazy("billing", () => import("./billing-TCTP44ZB.js").then((m) => m.billingCommand)),
67
+ tier: lazy("tier", () => import("./tier-RXHOAQ6L.js").then((m) => m.tierCommand)),
68
+ team: lazy("team", () => import("./team-MSOPELF6.js").then((m) => m.teamCommand)),
69
+ incoming: lazy("incoming", () => import("./incoming-3MJ4CP6H.js").then((m) => m.incomingCommand)),
70
+ beta: lazy("beta", () => import("./beta-consent-NQVGFZL3.js").then((m) => m.betaCommand)),
71
+ webhook: lazy("webhook", () => import("./webhook-J2H7X766.js").then((m) => m.webhookCommand)),
70
72
  // The LinkedIn building blocks. Reserved product groups
71
73
  // (unibox, network, analytics, team) land
72
74
  // between `enrollment` and `webhook` with their owning specs.
73
- core: lazy("core", () => import("./core-37XZS2RG.js").then((m) => m.coreCommand))
75
+ core: lazy("core", () => import("./core-MPEBYNSL.js").then((m) => m.coreCommand))
74
76
  },
75
77
  async run() {
76
- const { showHelp } = await import("./examples-77WVMKZQ.js");
78
+ const { showHelp } = await import("./examples-J4X5NEIE.js");
77
79
  await showHelp(main, ["curviate"]);
78
80
  }
79
81
  });
@@ -365,7 +367,7 @@ async function dispatch(root, rawArgs) {
365
367
  helpFor = "curviate";
366
368
  if (rawArgs.includes("--help") || rawArgs.includes("-h")) {
367
369
  const { leaf, path } = await resolveLeaf(root, rawArgs.filter((a) => a !== "--help" && a !== "-h"));
368
- const { showHelp } = await import("./examples-77WVMKZQ.js");
370
+ const { showHelp } = await import("./examples-J4X5NEIE.js");
369
371
  await showHelp(leaf, path);
370
372
  await new Promise((done) => process.stdout.write("", () => done()));
371
373
  process.exit(0);
@@ -385,6 +387,12 @@ async function dispatch(root, rawArgs) {
385
387
  }
386
388
  setBetaOverride(beta.ok ? beta.value : void 0);
387
389
  const argsAfterBeta = beta.ok ? beta.rest : rawArgs;
390
+ const end = argsAfterBeta.indexOf("--");
391
+ const inline = (end === -1 ? argsAfterBeta : argsAfterBeta.slice(0, end)).find((a) => /^--[a-z-]+-stdin=/.test(a));
392
+ if (inline !== void 0) {
393
+ const flag = inline.slice(0, inline.indexOf("="));
394
+ usageError(`${flag} takes no value: the secret is read from stdin.`, `pipe it in: printf '%s' "$SECRET" | curviate ... ${flag}`);
395
+ }
388
396
  let hintLeaf;
389
397
  try {
390
398
  const { leaf, leafArgs: resolvedArgs, path: leafPath } = await resolveLeaf(root, argsAfterBeta);
@@ -447,7 +455,7 @@ async function dispatch(root, rawArgs) {
447
455
  if (code === "EARG") process.stderr.write(helpPointer());
448
456
  const { CurviateError } = await import("@curviate/sdk");
449
457
  if (err instanceof CurviateError) {
450
- const { getExitCode } = await import("./exit-codes-ZSOLAXQO.js");
458
+ const { getExitCode } = await import("./exit-codes-P2FLCKM7.js");
451
459
  process.exit(getExitCode(err));
452
460
  }
453
461
  process.exit(code === "EARG" ? 2 : 1);
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  resolveMemberOrMeProviderId
4
- } from "./chunk-KLXDFFHT.js";
4
+ } from "./chunk-3B5M2RUN.js";
5
5
  import "./chunk-UEAX6KUB.js";
6
6
  import {
7
7
  AS_ACCOUNT,
@@ -16,7 +16,7 @@ import {
16
16
  } from "./chunk-VHNF6OZD.js";
17
17
  import {
18
18
  requireAccount
19
- } from "./chunk-Z3RPQ5K4.js";
19
+ } from "./chunk-F7CLAS5Y.js";
20
20
  import {
21
21
  buildPreviewOutput
22
22
  } from "./chunk-TCUYH5GO.js";
@@ -27,7 +27,7 @@ import {
27
27
  readablePage,
28
28
  rejectPaginationModifiersWithoutAll,
29
29
  streamAll
30
- } from "./chunk-R7USRN52.js";
30
+ } from "./chunk-OE4CY3ZL.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-S234PC5E.js";
40
+ } from "./chunk-RXDG57B2.js";
41
41
  import {
42
42
  GLOBAL_FLAGS,
43
43
  WRITE_SINGLE_FLAGS,
@@ -45,11 +45,11 @@ import {
45
45
  } from "./chunk-QLKGOIWS.js";
46
46
  import {
47
47
  DESCRIPTIONS
48
- } from "./chunk-QBY6L77D.js";
48
+ } from "./chunk-5LGKZBAY.js";
49
49
  import {
50
50
  resolveTextOrStdin
51
51
  } from "./chunk-ZYURL5VK.js";
52
- import "./chunk-RDKTHFQ6.js";
52
+ import "./chunk-SCUTAREU.js";
53
53
 
54
54
  // src/commands/comment.ts
55
55
  import { defineCommand } from "citty";
@@ -78,7 +78,7 @@ function buildListQuery(flags, out) {
78
78
  async function handleSdkError(err, outOpts, out) {
79
79
  const { CurviateError } = await import("@curviate/sdk");
80
80
  if (err instanceof CurviateError) {
81
- const { getExitCode } = await import("./exit-codes-ZSOLAXQO.js");
81
+ const { getExitCode } = await import("./exit-codes-P2FLCKM7.js");
82
82
  renderError(err, outOpts, out);
83
83
  process.exit(getExitCode(err));
84
84
  }
@@ -1,7 +1,12 @@
1
1
  #!/usr/bin/env node
2
+ import {
3
+ RETRIEVAL_FLAGS,
4
+ hasRetrievalFlags,
5
+ parseRetrievalFlags
6
+ } from "./chunk-L7JH3W56.js";
2
7
  import {
3
8
  sentAsNotice
4
- } from "./chunk-FHSGANM6.js";
9
+ } from "./chunk-VPFV7YV3.js";
5
10
  import "./chunk-UWO2D4HW.js";
6
11
  import {
7
12
  resolveIdentifier
@@ -26,7 +31,7 @@ import {
26
31
  } from "./chunk-VHNF6OZD.js";
27
32
  import {
28
33
  requireAccount
29
- } from "./chunk-Z3RPQ5K4.js";
34
+ } from "./chunk-F7CLAS5Y.js";
30
35
  import {
31
36
  buildPreviewOutput
32
37
  } from "./chunk-TCUYH5GO.js";
@@ -39,7 +44,7 @@ import {
39
44
  readablePage,
40
45
  rejectPaginationModifiersWithoutAll,
41
46
  streamAll
42
- } from "./chunk-R7USRN52.js";
47
+ } from "./chunk-OE4CY3ZL.js";
43
48
  import {
44
49
  renderError,
45
50
  renderSuccess,
@@ -49,7 +54,7 @@ import {
49
54
  import {
50
55
  createClient,
51
56
  resolveEffectiveConfig
52
- } from "./chunk-S234PC5E.js";
57
+ } from "./chunk-RXDG57B2.js";
53
58
  import {
54
59
  GLOBAL_FLAGS,
55
60
  READ_SINGLE_FLAGS,
@@ -58,12 +63,12 @@ import {
58
63
  } from "./chunk-QLKGOIWS.js";
59
64
  import {
60
65
  DESCRIPTIONS
61
- } from "./chunk-QBY6L77D.js";
66
+ } from "./chunk-5LGKZBAY.js";
62
67
  import "./chunk-FDJMAF7D.js";
63
68
  import {
64
69
  resolveTextOrStdin
65
70
  } from "./chunk-ZYURL5VK.js";
66
- import "./chunk-RDKTHFQ6.js";
71
+ import "./chunk-SCUTAREU.js";
67
72
 
68
73
  // src/commands/company.ts
69
74
  import { defineCommand } from "citty";
@@ -97,7 +102,7 @@ async function resolveCompanyId(ns, raw) {
97
102
  async function handleSdkError(err, outOpts, out) {
98
103
  const { CurviateError } = await import("@curviate/sdk");
99
104
  if (err instanceof CurviateError) {
100
- const { getExitCode } = await import("./exit-codes-ZSOLAXQO.js");
105
+ const { getExitCode } = await import("./exit-codes-P2FLCKM7.js");
101
106
  renderError(err, outOpts, out);
102
107
  process.exit(getExitCode(err));
103
108
  }
@@ -113,12 +118,17 @@ async function runCompanyGet(client, flags, out) {
113
118
  out.stderr.write("error: --sections is not supported on company commands.\n");
114
119
  process.exit(2);
115
120
  }
121
+ const retrieval = parseRetrievalFlags(flags);
122
+ if (!retrieval.ok) {
123
+ out.stderr.write(retrieval.error);
124
+ process.exit(2);
125
+ }
116
126
  const accountId = await requireAccount(client, flags, out);
117
127
  const rawId = flags.id ?? "";
118
128
  const resolvedId = resolveIdentifier(rawId);
119
129
  const outOpts = { ...resolveOutputOpts(flags), slim: slimCompany };
120
130
  try {
121
- const result = await client.account(accountId).companies.get(resolvedId);
131
+ const result = hasRetrievalFlags(flags) ? await client.account(accountId).companies.get(resolvedId, retrieval.query) : await client.account(accountId).companies.get(resolvedId);
122
132
  readableObject(result);
123
133
  renderSuccess(result, outOpts, out);
124
134
  } catch (err) {
@@ -987,7 +997,8 @@ var companyCommand = defineCommand({
987
997
  args: {
988
998
  ...readOnly(READ_SINGLE_FLAGS),
989
999
  id: { type: "positional", description: "Company identifier (URL, slug, or native id)." },
990
- sections: { type: "string", description: "Not supported on company commands; a usage error (exit 2) if supplied." }
1000
+ sections: { type: "string", description: "Not supported on company commands; a usage error (exit 2) if supplied." },
1001
+ ...RETRIEVAL_FLAGS
991
1002
  },
992
1003
  subCommands: {
993
1004
  employees: companyEmployeesCommand,
@@ -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-S234PC5E.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-QBY6L77D.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-Z3RPQ5K4.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-R7USRN52.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-S234PC5E.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-QBY6L77D.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-OYZ27Q3B.js";
11
- import "./chunk-Z3RPQ5K4.js";
10
+ } from "./chunk-A6JGJGDF.js";
12
11
  import "./chunk-GOICALYQ.js";
13
- import "./chunk-Q5Z7FMXI.js";
14
- import "./chunk-LGUZ52BU.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-R7USRN52.js";
16
+ import "./chunk-TCUYH5GO.js";
17
+ import "./chunk-OE4CY3ZL.js";
18
18
  import "./chunk-QM57YDJE.js";
19
- import "./chunk-S234PC5E.js";
19
+ import "./chunk-RXDG57B2.js";
20
20
  import "./chunk-QLKGOIWS.js";
21
- import "./chunk-QBY6L77D.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-OYZ27Q3B.js";
12
- import "./chunk-Z3RPQ5K4.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-Q5Z7FMXI.js";
16
+ } from "./chunk-6OT6TS7N.js";
17
17
  import {
18
18
  fail,
19
19
  listFlag,
20
20
  outputOpts,
21
21
  usage
22
- } from "./chunk-LGUZ52BU.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-R7USRN52.js";
35
+ } from "./chunk-OE4CY3ZL.js";
36
36
  import {
37
37
  renderSuccess,
38
38
  writeNdjsonItem
39
39
  } from "./chunk-QM57YDJE.js";
40
- import "./chunk-S234PC5E.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-QBY6L77D.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-77WVMKZQ.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-77WVMKZQ.js");
393
+ const { showHelp } = await import("./examples-J4X5NEIE.js");
394
394
  await showHelp(contactTagsCommand, ["curviate", "lead", "tags"]);
395
395
  }
396
396
  });