@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
@@ -5,7 +5,7 @@ import {
5
5
  outputOpts,
6
6
  rootClient,
7
7
  usage
8
- } from "./chunk-UWRWZG4N.js";
8
+ } from "./chunk-5OAJ4D65.js";
9
9
  import {
10
10
  buildPreviewOutput
11
11
  } from "./chunk-TCUYH5GO.js";
@@ -20,7 +20,7 @@ import {
20
20
  readablePage,
21
21
  rejectPaginationModifiersWithoutAll,
22
22
  streamAll
23
- } from "./chunk-MIOEYSBQ.js";
23
+ } from "./chunk-KUVJM5CP.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-PBJZQZPO.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-MWVTFTWV.js";
42
+ } from "./chunk-XDPU2YAF.js";
43
43
  import {
44
44
  readFileFlag
45
- } from "./chunk-RKNW4UX4.js";
45
+ } from "./chunk-JKOQX46J.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-LQDMGDII.js");
263
263
  renderError(err, outOpts, out);
264
264
  process.exit(getExitCode(err));
265
265
  }
@@ -268,7 +268,7 @@ async function handleError(err, outOpts, out) {
268
268
  }
269
269
  async function runWebhookCreate(client, flags, out) {
270
270
  if (!flags.source) {
271
- out.stderr.write("error: --source is required (messaging | user | account_status | post | campaign).\n");
271
+ out.stderr.write("error: --source is required (messaging | user | account_status | post | campaign | signal).\n");
272
272
  process.exit(2);
273
273
  }
274
274
  if (!flags["request-url"]) {
@@ -478,7 +478,7 @@ var webhookCreateCommand = defineCommand2({
478
478
  examples: [
479
479
  "curviate webhook create --source messaging --request-url https://example.com/hooks/curviate --account-ids acc_YOUR_ACCOUNT_ID",
480
480
  "curviate webhook create --source campaign --request-url https://example.com/hooks/curviate --campaign-ids mot_YOUR_CAMPAIGN_ID",
481
- "curviate webhook create --source account_status --request-url https://example.com/hooks/curviate --name status"
481
+ "curviate webhook create --source signal --events signal.matched --request-url https://example.com/hooks/curviate"
482
482
  ]
483
483
  },
484
484
  args: {
@@ -486,7 +486,7 @@ var webhookCreateCommand = defineCommand2({
486
486
  ...DELIVERY_ARGS,
487
487
  source: {
488
488
  type: "string",
489
- description: "Event source: messaging | user | account_status | post (scheduled-post results: post.published, post.publish_failed) | campaign (campaign.status_changed, enrollment.started, enrollment.accepted, enrollment.replied, enrollment.skipped, enrollment.finished, step.failed, campaign.custom_event; opt-in only, named in --events: step.executed, enrollment.seen, enrollment.reassigned).",
489
+ description: "Event source: messaging | user | account_status | post (scheduled-post results: post.published, post.publish_failed) | campaign (campaign.status_changed, enrollment.started, enrollment.accepted, enrollment.replied, enrollment.skipped, enrollment.finished, step.failed, campaign.custom_event; opt-in only, named in --events: step.executed, enrollment.seen, enrollment.reassigned) | signal (one signal.<kind> per Signal of a watched Account, and signal.matched when a rule with --send-event acts: signal.post_engaged, signal.post_reposted, signal.network_posted, signal.profile_viewed, signal.followed_you, signal.mentioned_you, signal.connection_added, signal.matched).",
490
490
  required: true
491
491
  },
492
492
  "request-url": { type: "string", description: "HTTPS URL to receive webhook deliveries.", required: true },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curviate/cli",
3
- "version": "0.56.0",
3
+ "version": "0.58.0",
4
4
  "private": false,
5
5
  "description": "Official command-line interface for the Curviate API.",
6
6
  "license": "MIT",
@@ -8,7 +8,7 @@
8
8
  "homepage": "https://docs.curviate.com",
9
9
  "repository": {
10
10
  "type": "git",
11
- "url": "git+https://github.com/curviate/curviate-cli.git"
11
+ "url": "git+https://github.com/Curviate/curviate-cli.git"
12
12
  },
13
13
  "bugs": {
14
14
  "url": "https://github.com/curviate/curviate-cli/issues"
@@ -47,7 +47,7 @@
47
47
  "clean": "rm -rf dist *.tsbuildinfo"
48
48
  },
49
49
  "dependencies": {
50
- "@curviate/sdk": "0.52.0",
50
+ "@curviate/sdk": "0.54.0",
51
51
  "citty": "^0.1.6",
52
52
  "open": "^10.1.0"
53
53
  },
@@ -1,196 +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-UWRWZG4N.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-MIOEYSBQ.js";
22
- import {
23
- renderSuccess,
24
- writeNdjsonItem
25
- } from "./chunk-QM57YDJE.js";
26
- import {
27
- downloadBinary
28
- } from "./chunk-7PLTQHNO.js";
29
- import {
30
- GLOBAL_FLAGS,
31
- READ_SINGLE_FLAGS,
32
- readOnly
33
- } from "./chunk-QLKGOIWS.js";
34
- import {
35
- DESCRIPTIONS
36
- } from "./chunk-MWVTFTWV.js";
37
- import "./chunk-ZYURL5VK.js";
38
-
39
- // src/commands/billing.ts
40
- import { defineCommand } from "citty";
41
- var online = (fn) => async ({ args }) => {
42
- const f = args;
43
- await fn(await rootClient(f), f);
44
- };
45
- async function runQuote(c, f) {
46
- const seats = intFlag("seats", f.seats ?? usage("--seats is required: how many seats to price, 1 or more."), 1);
47
- const period = f.period ?? "monthly";
48
- if (period !== "monthly" && period !== "annual") usage("--period takes monthly or annual.");
49
- try {
50
- renderSuccess(await c.billing.quote({ seats: String(seats), period }), outputOpts(f), process);
51
- } catch (err) {
52
- await fail(err, f);
53
- }
54
- }
55
- async function runCap(c, f) {
56
- try {
57
- renderSuccess(await c.billing.spendingCap(), outputOpts(f), process);
58
- } catch (err) {
59
- await fail(err, f);
60
- }
61
- }
62
- async function runChanges(c, f) {
63
- rejectPaginationModifiersWithoutAll(f, process);
64
- const params = {};
65
- if (f.limit !== void 0) params["limit"] = intFlag("limit", f.limit, 1, 100);
66
- const cursor = readCursorFlag(f, process);
67
- if (cursor) params["cursor"] = cursor;
68
- try {
69
- if (f.all) {
70
- const page = (p) => c.billing.changes(p);
71
- for await (const item of streamAll(page, params, { maxPages: readMaxPagesFlag(f, process), out: process, pageDelayMs: pageDelayFromFlags(f) })) writeNdjsonItem(process, item, f.fields);
72
- } else {
73
- renderSuccess(readablePage(await c.billing.changes(params)), outputOpts(f), process);
74
- }
75
- } catch (err) {
76
- await fail(err, f);
77
- }
78
- }
79
- async function runList(c, f) {
80
- rejectPaginationModifiersWithoutAll(f, process);
81
- const params = {};
82
- if (f.limit !== void 0) params["limit"] = intFlag("limit", f.limit, 1, 100);
83
- const cursor = readCursorFlag(f, process);
84
- if (cursor) params["cursor"] = cursor;
85
- try {
86
- if (f.all) {
87
- const page = (p) => c.billing.invoices.list(p);
88
- for await (const item of streamAll(page, params, { maxPages: readMaxPagesFlag(f, process), out: process, pageDelayMs: pageDelayFromFlags(f) })) writeNdjsonItem(process, item, f.fields);
89
- } else {
90
- renderSuccess(readablePage(await c.billing.invoices.list(params)), outputOpts(f), process);
91
- }
92
- } catch (err) {
93
- await fail(err, f);
94
- }
95
- }
96
- async function runPdf(c, f) {
97
- const number = String(f.number ?? "");
98
- if (number.trim() === "") usage("the invoice number is empty. Take it from `curviate billing invoices`.");
99
- 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.");
100
- if (f.output === "-" && process.stdout.isTTY) usage("-o - would write a PDF to the terminal. Pass a file name.");
101
- let bytes;
102
- try {
103
- bytes = Buffer.from(await downloadBinary(() => c.billing.invoices.pdf(number)));
104
- } catch (err) {
105
- return fail(err, f);
106
- }
107
- if (f.output === "-") process.stdout.write(bytes);
108
- else {
109
- try {
110
- writeAtomic(f.output, bytes);
111
- } catch (err) {
112
- usage(`-o: cannot write ${f.output}: ${err.code ?? "write error"}.`);
113
- }
114
- }
115
- process.stderr.write(`Invoice ${number}: ${bytes.length} bytes${f.output === "-" ? "" : ` written to ${f.output}`}.
116
- `);
117
- }
118
- var pdfCmd = defineCommand({
119
- meta: {
120
- name: "pdf",
121
- 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.",
122
- risk: "read",
123
- output: ["The PDF bytes, to -o <file> (replaced whole on success) or, with -o -, to stdout; a byte count on stderr."],
124
- examples: ["curviate billing invoices pdf INV-0001 -o invoice.pdf"]
125
- },
126
- args: {
127
- "api-key": GLOBAL_FLAGS["api-key"],
128
- profile: GLOBAL_FLAGS.profile,
129
- team: GLOBAL_FLAGS.team,
130
- "base-url": GLOBAL_FLAGS["base-url"],
131
- timeout: GLOBAL_FLAGS.timeout,
132
- number: { type: "positional", description: "The invoice number, from the invoice list." },
133
- output: { type: "string", alias: "o", required: true, description: "Write the PDF to this path, or - for stdout." }
134
- },
135
- run: online(runPdf)
136
- });
137
- var invoicesCmd = defineCommand({
138
- meta: {
139
- name: "invoices",
140
- 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.",
141
- risk: "read",
142
- output: ["`items` (number, created_at, period_start, period_end, total, currency, status) and a `cursor`; with --all, one invoice per line."],
143
- examples: ["curviate billing invoices", "curviate billing invoices --json --limit 12"]
144
- },
145
- args: { ...readOnly(GLOBAL_FLAGS) },
146
- subCommands: { pdf: pdfCmd },
147
- run: online(runList)
148
- });
149
- var quoteCmd = defineCommand({
150
- meta: {
151
- name: "quote",
152
- description: "Price a number of seats for one period, step by step: each seat costs the price of the step it falls in, so adding a seat never changes what the earlier ones cost. Amounts in cents. Computed from the price list; charges nothing. Owners only.",
153
- risk: "read",
154
- output: ["`total` and `steps[]` (from, up_to, unit_amount, seats, amount), in cents, with `currency` and `period`."],
155
- examples: ["curviate billing quote --seats 25", "curviate billing quote --seats 25 --period annual"]
156
- },
157
- args: {
158
- ...readOnly(READ_SINGLE_FLAGS),
159
- seats: { type: "string", required: true, description: "How many seats to price, 1 or more." },
160
- period: { type: "string", description: "monthly (default) or annual." }
161
- },
162
- run: online(runQuote)
163
- });
164
- var capCmd = defineCommand({
165
- meta: {
166
- name: "cap",
167
- description: "The spending cap: the most seats an agent may bring your Team to (100 until an Owner sets one), the seats now, the room left and what the cap's seats cost a month. Read only: an Owner changes it in the dashboard. Adding a seat past it is refused with SPENDING_CAP_REACHED. Owners only.",
168
- risk: "read",
169
- output: ["`cap_seats`, `is_default`, `seats`, `room_seats`, `monthly_amount` (cents), `currency`."],
170
- examples: ["curviate billing cap"]
171
- },
172
- args: { ...readOnly(READ_SINGLE_FLAGS) },
173
- run: online(runCap)
174
- });
175
- var changesCmd = defineCommand({
176
- meta: {
177
- name: "changes",
178
- description: "Every seat added or removed and every spending cap change on your Team, newest first: who made it (a person or an API key), the way it came in, the seat counts before and after and what it adds to the monthly price. Owners only.",
179
- risk: "read",
180
- output: ["`items` and a `cursor`; with --all, one change per line."],
181
- examples: ["curviate billing changes", "curviate billing changes --all"]
182
- },
183
- args: { ...readOnly(GLOBAL_FLAGS) },
184
- run: online(runChanges)
185
- });
186
- var billingCommand = defineCommand({
187
- meta: { name: "billing", description: DESCRIPTIONS.billing },
188
- subCommands: { quote: quoteCmd, cap: capCmd, changes: changesCmd, invoices: invoicesCmd },
189
- async run() {
190
- const { showHelp } = await import("./examples-IGQJCSNL.js");
191
- await showHelp(billingCommand, ["curviate", "billing"]);
192
- }
193
- });
194
- export {
195
- billingCommand
196
- };
@@ -1,46 +0,0 @@
1
- #!/usr/bin/env node
2
- import {
3
- DESCRIPTIONS,
4
- lazy
5
- } from "./chunk-MWVTFTWV.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-YZNBX2RP.js").then((m) => m.profileCommand)),
23
- company: lazy("company", () => import("./company-3Z6PXGTW.js").then((m) => m.companyCommand)),
24
- job: lazy("job", () => import("./job-ZHVFFRWE.js").then((m) => m.jobCommand)),
25
- connect: lazy("connect", () => import("./connect-G2RTLV7G.js").then((m) => m.connectCommand)),
26
- search: lazy("search", () => import("./search-B7FB6674.js").then((m) => m.searchCommand)),
27
- inbox: lazy("inbox", () => import("./inbox-VSGNHSLG.js").then((m) => m.inboxCommand)),
28
- inboxes: lazy("inboxes", () => import("./inboxes-23C2MJK4.js").then((m) => m.inboxesCommand)),
29
- message: lazy("message", () => import("./message-PIV77W47.js").then((m) => m.messageCommand)),
30
- post: lazy("post", () => import("./post-Z7AVDDKA.js").then((m) => m.postCommand)),
31
- comment: lazy("comment", () => import("./comment-D6RSZTVK.js").then((m) => m.commentCommand)),
32
- "sales-nav": lazy("sales-nav", () => import("./sales-nav-CKDSEXV2.js").then((m) => m.salesNavCommand)),
33
- recruiter: lazy("recruiter", () => import("./recruiter-EXM4P7X7.js").then((m) => m.recruiterCommand)),
34
- group: lazy("group", () => import("./group-UTC3YBKE.js").then((m) => m.groupCommand)),
35
- feed: lazy("feed", () => import("./feed-M5D4SJW7.js").then((m) => m.feedCommand)),
36
- notification: lazy("coreNotification", () => import("./notification-XGR4NT3S.js").then((m) => m.notificationCommand)),
37
- draft: lazy("draft", () => import("./draft-7U6H4BPF.js").then((m) => m.draftCommand))
38
- },
39
- async run() {
40
- const { showHelp } = await import("./examples-IGQJCSNL.js");
41
- await showHelp(coreCommand, ["curviate", "core"]);
42
- }
43
- });
44
- export {
45
- coreCommand
46
- };