@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
@@ -5,13 +5,13 @@ import {
5
5
  outputOpts,
6
6
  rootClient,
7
7
  usage
8
- } from "./chunk-LGUZ52BU.js";
9
- import {
10
- buildPreviewOutput
11
- } from "./chunk-TCUYH5GO.js";
8
+ } from "./chunk-3ZQNOKEK.js";
12
9
  import {
13
10
  intFlag
14
11
  } from "./chunk-NNV2OYEF.js";
12
+ import {
13
+ buildPreviewOutput
14
+ } from "./chunk-TCUYH5GO.js";
15
15
  import {
16
16
  pageDelayFromFlags,
17
17
  readCursorFlag,
@@ -20,7 +20,7 @@ import {
20
20
  readablePage,
21
21
  rejectPaginationModifiersWithoutAll,
22
22
  streamAll
23
- } from "./chunk-R7USRN52.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-S234PC5E.js";
33
+ } from "./chunk-RXDG57B2.js";
34
34
  import {
35
35
  GLOBAL_FLAGS,
36
36
  READ_SINGLE_FLAGS,
@@ -39,10 +39,10 @@ import {
39
39
  } from "./chunk-QLKGOIWS.js";
40
40
  import {
41
41
  DESCRIPTIONS
42
- } from "./chunk-QBY6L77D.js";
42
+ } from "./chunk-5LGKZBAY.js";
43
43
  import {
44
44
  readFileFlag
45
- } from "./chunk-JKXGL7PT.js";
45
+ } from "./chunk-RKNW4UX4.js";
46
46
  import "./chunk-FDJMAF7D.js";
47
47
  import {
48
48
  isStdinToken
@@ -259,7 +259,7 @@ function resolveOutputOpts(flags) {
259
259
  async function handleError(err, outOpts, out) {
260
260
  const { CurviateError } = await import("@curviate/sdk");
261
261
  if (err instanceof CurviateError) {
262
- const { getExitCode } = await import("./exit-codes-ZSOLAXQO.js");
262
+ const { getExitCode } = await import("./exit-codes-P2FLCKM7.js");
263
263
  renderError(err, outOpts, out);
264
264
  process.exit(getExitCode(err));
265
265
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curviate/cli",
3
- "version": "0.55.0",
3
+ "version": "0.57.0",
4
4
  "private": false,
5
5
  "description": "Official command-line interface for the Curviate API.",
6
6
  "license": "MIT",
@@ -47,7 +47,7 @@
47
47
  "clean": "rm -rf dist *.tsbuildinfo"
48
48
  },
49
49
  "dependencies": {
50
- "@curviate/sdk": "0.51.0",
50
+ "@curviate/sdk": "0.53.0",
51
51
  "citty": "^0.1.6",
52
52
  "open": "^10.1.0"
53
53
  },
@@ -1,124 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- writeAtomic
4
- } from "./chunk-GOICALYQ.js";
5
- import {
6
- fail,
7
- outputOpts,
8
- rootClient,
9
- usage
10
- } from "./chunk-LGUZ52BU.js";
11
- import {
12
- intFlag
13
- } from "./chunk-NNV2OYEF.js";
14
- import {
15
- pageDelayFromFlags,
16
- readCursorFlag,
17
- readMaxPagesFlag,
18
- readablePage,
19
- rejectPaginationModifiersWithoutAll,
20
- streamAll
21
- } from "./chunk-R7USRN52.js";
22
- import {
23
- renderSuccess,
24
- writeNdjsonItem
25
- } from "./chunk-QM57YDJE.js";
26
- import {
27
- downloadBinary
28
- } from "./chunk-S234PC5E.js";
29
- import {
30
- GLOBAL_FLAGS,
31
- readOnly
32
- } from "./chunk-QLKGOIWS.js";
33
- import {
34
- DESCRIPTIONS
35
- } from "./chunk-QBY6L77D.js";
36
- import "./chunk-ZYURL5VK.js";
37
-
38
- // src/commands/billing.ts
39
- import { defineCommand } from "citty";
40
- var online = (fn) => async ({ args }) => {
41
- const f = args;
42
- await fn(await rootClient(f), f);
43
- };
44
- async function runList(c, f) {
45
- rejectPaginationModifiersWithoutAll(f, process);
46
- const params = {};
47
- if (f.limit !== void 0) params["limit"] = intFlag("limit", f.limit, 1, 100);
48
- const cursor = readCursorFlag(f, process);
49
- if (cursor) params["cursor"] = cursor;
50
- try {
51
- if (f.all) {
52
- const page = (p) => c.billing.invoices.list(p);
53
- for await (const item of streamAll(page, params, { maxPages: readMaxPagesFlag(f, process), out: process, pageDelayMs: pageDelayFromFlags(f) })) writeNdjsonItem(process, item, f.fields);
54
- } else {
55
- renderSuccess(readablePage(await c.billing.invoices.list(params)), outputOpts(f), process);
56
- }
57
- } catch (err) {
58
- await fail(err, f);
59
- }
60
- }
61
- async function runPdf(c, f) {
62
- const number = String(f.number ?? "");
63
- if (number.trim() === "") usage("the invoice number is empty. Take it from `curviate billing invoices`.");
64
- if (f.output === void 0 || f.output.trim() === "") usage("-o <file> is required: the PDF is written there, or to stdout with -o - when stdout is not a terminal.");
65
- if (f.output === "-" && process.stdout.isTTY) usage("-o - would write a PDF to the terminal. Pass a file name.");
66
- let bytes;
67
- try {
68
- bytes = Buffer.from(await downloadBinary(() => c.billing.invoices.pdf(number)));
69
- } catch (err) {
70
- return fail(err, f);
71
- }
72
- if (f.output === "-") process.stdout.write(bytes);
73
- else {
74
- try {
75
- writeAtomic(f.output, bytes);
76
- } catch (err) {
77
- usage(`-o: cannot write ${f.output}: ${err.code ?? "write error"}.`);
78
- }
79
- }
80
- process.stderr.write(`Invoice ${number}: ${bytes.length} bytes${f.output === "-" ? "" : ` written to ${f.output}`}.
81
- `);
82
- }
83
- var pdfCmd = defineCommand({
84
- meta: {
85
- name: "pdf",
86
- description: "Download one invoice as a PDF, by its number from `curviate billing invoices`. Owners only. The file is written whole or not at all.",
87
- risk: "read",
88
- output: ["The PDF bytes, to -o <file> (replaced whole on success) or, with -o -, to stdout; a byte count on stderr."],
89
- examples: ["curviate billing invoices pdf INV-0001 -o invoice.pdf"]
90
- },
91
- args: {
92
- "api-key": GLOBAL_FLAGS["api-key"],
93
- profile: GLOBAL_FLAGS.profile,
94
- team: GLOBAL_FLAGS.team,
95
- "base-url": GLOBAL_FLAGS["base-url"],
96
- timeout: GLOBAL_FLAGS.timeout,
97
- number: { type: "positional", description: "The invoice number, from the invoice list." },
98
- output: { type: "string", alias: "o", required: true, description: "Write the PDF to this path, or - for stdout." }
99
- },
100
- run: online(runPdf)
101
- });
102
- var invoicesCmd = defineCommand({
103
- meta: {
104
- name: "invoices",
105
- description: "List your Team's issued invoices, newest first: number, amount (in the currency's smallest unit), status and service period. No links: download a PDF by its number. Owners only.",
106
- risk: "read",
107
- output: ["`items` (number, created_at, period_start, period_end, total, currency, status) and a `cursor`; with --all, one invoice per line."],
108
- examples: ["curviate billing invoices", "curviate billing invoices --json --limit 12"]
109
- },
110
- args: { ...readOnly(GLOBAL_FLAGS) },
111
- subCommands: { pdf: pdfCmd },
112
- run: online(runList)
113
- });
114
- var billingCommand = defineCommand({
115
- meta: { name: "billing", description: DESCRIPTIONS.billing },
116
- subCommands: { invoices: invoicesCmd },
117
- async run() {
118
- const { showHelp } = await import("./examples-77WVMKZQ.js");
119
- await showHelp(billingCommand, ["curviate", "billing"]);
120
- }
121
- });
122
- export {
123
- billingCommand
124
- };
@@ -1,46 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- DESCRIPTIONS,
4
- lazy
5
- } from "./chunk-QBY6L77D.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-GKMRRKZF.js").then((m) => m.profileCommand)),
23
- company: lazy("company", () => import("./company-CX5TZNB5.js").then((m) => m.companyCommand)),
24
- job: lazy("job", () => import("./job-TKGPXU26.js").then((m) => m.jobCommand)),
25
- connect: lazy("connect", () => import("./connect-GUUBX23F.js").then((m) => m.connectCommand)),
26
- search: lazy("search", () => import("./search-HS2YAA33.js").then((m) => m.searchCommand)),
27
- inbox: lazy("inbox", () => import("./inbox-NS2LB2WQ.js").then((m) => m.inboxCommand)),
28
- inboxes: lazy("inboxes", () => import("./inboxes-XWUZJ5PN.js").then((m) => m.inboxesCommand)),
29
- message: lazy("message", () => import("./message-M4THMNRZ.js").then((m) => m.messageCommand)),
30
- post: lazy("post", () => import("./post-BHH7YKGM.js").then((m) => m.postCommand)),
31
- comment: lazy("comment", () => import("./comment-IIKLEAEK.js").then((m) => m.commentCommand)),
32
- "sales-nav": lazy("sales-nav", () => import("./sales-nav-6I5SYTRX.js").then((m) => m.salesNavCommand)),
33
- recruiter: lazy("recruiter", () => import("./recruiter-J53ZSD4P.js").then((m) => m.recruiterCommand)),
34
- group: lazy("group", () => import("./group-AMYOAGNS.js").then((m) => m.groupCommand)),
35
- feed: lazy("feed", () => import("./feed-HOFHCP6W.js").then((m) => m.feedCommand)),
36
- notification: lazy("coreNotification", () => import("./notification-5K4TCYQA.js").then((m) => m.notificationCommand)),
37
- draft: lazy("draft", () => import("./draft-SII6E6Z6.js").then((m) => m.draftCommand))
38
- },
39
- async run() {
40
- const { showHelp } = await import("./examples-77WVMKZQ.js");
41
- await showHelp(coreCommand, ["curviate", "core"]);
42
- }
43
- });
44
- export {
45
- coreCommand
46
- };