@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
package/CHANGELOG.md CHANGED
@@ -6,6 +6,75 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
6
6
  Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html):
7
7
  a new command or flag is a minor; a breaking command/flag/exit-code change is a major (before 1.0.0, a minor); a fix is a patch.
8
8
 
9
+ ## [0.57.0] - 2026-11-18
10
+
11
+ Requires `@curviate/sdk` 0.53.0 (exact pin). The vendored OpenAPI fixture is re-copied from the SDK's (production document, server commit `c8b370ae4`); `commands.json` regenerated; `src/schemas/documents.json` re-derived (unchanged).
12
+
13
+ ### Reply labels
14
+
15
+ - **`unibox list --reply-label <label>`** keeps chats by their latest Reply label (repeatable; `none` adds unlabelled chats); the table shows a LABEL column.
16
+ - **`unibox label <message_id>`** prints a reply's label and its history (source, confidence); **`--set <label>`** corrects it (Needs Automate). `REPLY_NOT_LABELLABLE` exits 2.
17
+ - **`team reply-labels`** reads the Team's settings; **`--on|--off`**, **`--not-interested-dnc`** and **`--tag <label>=<tag_id>`** change them (Owners and Managers).
18
+
19
+ ### Lead imports from LinkedIn
20
+
21
+ - **`lead import --source <kind>`** or **`--source-url <url>`** with **`--account`**: a people, Sales Navigator, Recruiter or company search (by URL, `--filter key=value` or `--filters-json`), a Sales Navigator lead list (`--list-id`), a post's engagers (`--post-id`) or a group's members (`--group-id`); `--titles`, `--max`, `--continue <imp_id>`, `--restart`. One create request; the server reads the source page by page.
22
+ - **`lead imports pause|resume|stop <id>`**. `IMPORT_STATUS_CONFLICT` and `IMPORT_CANNOT_CONTINUE` exit 2. `lead imports get` help names `waiting` (`active_hours`, `budget`, `pushback`) and `estimate`.
23
+
24
+ ### Email
25
+
26
+ - **`analytics email`**: sent, the reply, open, bounce and opt-out rates, today against the daily caps; `--campaigns`, `--accounts`, the window flags, `--include weeks`.
27
+ - **`notification list --channel email|linkedin|team`**.
28
+ - **`mailbox update --display-name <name>`** and **`--clear-display-name`**; **`mailbox connect --display-name`**. `mailbox discover` and `domain check` help follow the API (`source: none`, a check before the first Mailbox, `dkim_selector`).
29
+ - **`doctor`** adds a `mailboxes` line (how many, how many can send; never fails the run) and **`tier`** says email sends once a Mailbox is connected.
30
+
31
+ ### Companies
32
+
33
+ - **`company get <company_id>`** and **`company fields <company_id> --set key=value --unset key`**: your Team's company record and its own fields (`{{company.extra.<key>}}`). No LinkedIn call.
34
+ - **`core company <id> --mode --max-age`**: the company read takes the retrieval mode.
35
+ - `campaign lint` checks company variables offline (R16 names the nearest company fields), as the API does.
36
+
37
+ ### Signals
38
+
39
+ - **`signal list|get|kinds|watch`**, **`signal settings --post-engaged on|off --profile-viewed on|off`**, **`signal rules list|get|create|update|delete`** (`--kind`, `--accounts` or `--all-accounts`, `--add-to-list`, `--send-event`, `--unknown-people`, `--on|--off`).
40
+
41
+ ### Billing
42
+
43
+ - **`billing price move`**: moves a subscription on a previous price to the current price now. It charges money: it asks at a terminal, and anywhere else it needs `--yes` (without it: exit 2, nothing sent). Owners only.
44
+
45
+ ## [0.56.0] - 2026-11-17
46
+
47
+ Requires `@curviate/sdk` 0.52.0 (exact pin). The vendored OpenAPI fixture is re-copied from the SDK's (server commit `8c675b5b8`); `src/schemas/documents.json` and `commands.json` regenerated.
48
+
49
+ ### Email in Campaigns
50
+
51
+ - **`campaign check <id>`**: the Lead check (Leads without an email address, bounced, on the Do-not-contact list for email only, variables they lack). Stored as `lead_check` on the Campaign.
52
+ - **`campaign start|resume --skip-missing-email`**: start a Campaign with an email step although some Leads have no address (they are never enrolled).
53
+ - Campaign files take `shared_mailbox_ids`, `schedule.min_email_gap_minutes` and `settings.reply_scope` (checked offline against the vendored schema); `campaign lint` runs the email step, per-variable fallbacks (`{{lead.first_name|there}}`), `on_missing` and the changed R17/R19 rules offline through the SDK.
54
+
55
+ ### Campaign parity
56
+
57
+ - **`campaign preview --limit --cursor --all`**: preview pages over every Lead (`next_cursor`); `--all` merges every page into one answer (`--max-pages`, `--page-delay`). `--sample` stays as an alias of `--limit`.
58
+ - `enrollment get|list` print `next_action` as its sentence in human mode; `--json` keeps the object.
59
+ - `campaign lint` checks weighted variants (2 to 5, `weight` 1 to 100) and business-day waits (`5bd`) offline.
60
+
61
+ ### Do-not-contact and Leads
62
+
63
+ - **`do-not-contact add --scope everything|email_only`** and **`do-not-contact import --scope`** (the scope of every row that names none; a CSV with its own `scope` column is refused with the flag). `list` and `get` print `scope` and `how`; `--reason` takes `unsubscribed`.
64
+ - `lead get|list` print `do_not_contact` (`{scope, reason, how, at}` or `null`; `scope: email_only` is "No email").
65
+
66
+ ### Billing (read only)
67
+
68
+ - **`billing quote --seats <n> [--period monthly|annual]`**, **`billing cap`**, **`billing changes`** (paged, `--all`). Owners only. Nothing here buys or cancels.
69
+
70
+ ### Limits
71
+
72
+ - **`account warm-up on --preset gradual|custom --start --step --every`**; help and the summary line describe the day ramp (Gradual: 30% on day 1 to 100% on day 14), and `account link --warm-up` / `account connect-request create --warm-up` help follows.
73
+
74
+ ### Other
75
+
76
+ - Any `--*-stdin=VALUE` (`--password-stdin=`, `--li-at-stdin=`) is refused (exit 2) on every command, `account link` included, before anything is read or sent. A secret typed on a terminal keeps its leading spaces, so a secret typed and the same secret piped are the same bytes.
77
+
9
78
  ## [0.55.0] - 2026-11-17
10
79
 
11
80
  Requires `@curviate/sdk` 0.51.0 (exact pin). The vendored OpenAPI fixture is re-copied from the SDK's; `commands.json` regenerated.
package/README.md CHANGED
@@ -354,14 +354,15 @@ A Campaign runs one Sequence for the Leads of your Lead lists, from its sending
354
354
  curviate campaign init --template connect-and-converse --output campaign.json # offline; fill lead_list_ids and account_ids
355
355
  curviate campaign lint --file campaign.json # offline: the rules the API applies
356
356
  curviate campaign create --file campaign.json --json
357
- curviate campaign preview mot_1 --sample 3 --json # rendered messages and the budget projection; spends nothing
358
- curviate campaign start mot_1 --json
357
+ curviate campaign preview mot_1 --limit 3 --json # rendered messages and the budget projection; spends nothing (--all: every Lead)
358
+ curviate campaign check mot_1 --json # with an email step: the Lead check start needs
359
+ curviate campaign start mot_1 --json # --skip-missing-email: start without the Leads lacking an address
359
360
  ```
360
361
 
361
362
  `curviate campaign lint` prints one line per finding, compiler style, and exits 2 on any error:
362
363
 
363
364
  ```text
364
- campaign.json:7:32 error R12 pause.wait: must be a duration between 1m and 365d: a number then m, h or d, like 30d. Use a duration between 1m and 365d, for example 1d. -> https://docs.curviate.com/reference/sequence-rules#r12
365
+ campaign.json:7:32 error R12 pause.wait: must be a duration between 1m and 365d: a number then m, h or d, like 30d, or business days from 1bd to 250bd. Use a duration between 1m and 365d, for example 1d. -> https://docs.curviate.com/reference/sequence-rules#r12
365
366
  ```
366
367
 
367
368
  `curviate campaign create` and `curviate campaign update` check the same way before anything is sent. `curviate campaign get mot_1 --json` prints a file `curviate campaign update mot_1 --file -` accepts as is; add `--if-revision <n>` to refuse the save when someone changed the Sequence since you read it.
@@ -379,7 +380,7 @@ curviate campaign voice-clip get vc_01J8Z3K9P0Q1R2S3T4V5W6X7Y8
379
380
  { "id": "voice", "do": "voice.send", "with": { "clip_id": "vc_01J8Z3K9P0Q1R2S3T4V5W6X7Y8", "fallback": "Hi, thanks for connecting." }, "next": "end" }
380
381
  ```
381
382
 
382
- `fallback` is required and has no variables: it is sent as text when the audio cannot go. For A/B, use `variants: [{ "id": "a", "clip_id": "vc_..." }, { "id": "b", "clip_id": "vc_..." }]` with a shared `with.fallback`, and no text. `curviate campaign lint` checks the shape (`R13` a malformed `clip_id`, `R19` no `fallback`); a `clip_id` that is not a clip of your Team is refused when the Campaign is saved. `VOICE_CLIP_INVALID` (exit 2) names the reason an upload was refused: not audio, unreadable, under 1 or over 120 seconds; a clip is never shortened. Over 20 MiB is `PAYLOAD_TOO_LARGE`; the 101st upload in 24 hours is `RATE_LIMIT_TENANT` (exit 6, `Retry-After`). A clip no Sequence uses is deleted 30 days after its upload.
383
+ `fallback` is required and has no variables: it is sent as text when the audio cannot go. For variants, use `variants: [{ "id": "a", "clip_id": "vc_..." }, { "id": "b", "clip_id": "vc_..." }]` with a shared `with.fallback`, and no text. `curviate campaign lint` checks the shape (`R13` a malformed `clip_id`, `R19` no `fallback`); a `clip_id` that is not a clip of your Team is refused when the Campaign is saved. `VOICE_CLIP_INVALID` (exit 2) names the reason an upload was refused: not audio, unreadable, under 1 or over 120 seconds; a clip is never shortened. Over 20 MiB is `PAYLOAD_TOO_LARGE`; the 101st upload in 24 hours is `RATE_LIMIT_TENANT` (exit 6, `Retry-After`). A clip no Sequence uses is deleted 30 days after its upload.
383
384
 
384
385
  ### 2. Find and fix Enrollments
385
386
 
@@ -7,14 +7,14 @@ import {
7
7
  import {
8
8
  checkCredentialConflicts,
9
9
  resolveSecret
10
- } from "./chunk-J34JU27C.js";
10
+ } from "./chunk-DENWYJK2.js";
11
11
  import {
12
12
  GRAMMAR_ARGS,
13
13
  WINDOW_ARGS,
14
14
  grammarParams,
15
15
  renderOverview,
16
16
  windowParams
17
- } from "./chunk-BC4N5X3N.js";
17
+ } from "./chunk-RTT75CXE.js";
18
18
  import {
19
19
  print,
20
20
  table
@@ -26,13 +26,13 @@ import {
26
26
  outputOpts,
27
27
  rootClient,
28
28
  usage
29
- } from "./chunk-LGUZ52BU.js";
30
- import {
31
- buildPreviewOutput
32
- } from "./chunk-TCUYH5GO.js";
29
+ } from "./chunk-3ZQNOKEK.js";
33
30
  import {
34
31
  intFlag
35
32
  } from "./chunk-NNV2OYEF.js";
33
+ import {
34
+ buildPreviewOutput
35
+ } from "./chunk-TCUYH5GO.js";
36
36
  import {
37
37
  pageDelayFromFlags,
38
38
  readCursorFlag,
@@ -41,7 +41,7 @@ import {
41
41
  readablePage,
42
42
  rejectPaginationModifiersWithoutAll,
43
43
  streamAll
44
- } from "./chunk-R7USRN52.js";
44
+ } from "./chunk-OE4CY3ZL.js";
45
45
  import {
46
46
  isJsonMode,
47
47
  renderError,
@@ -53,11 +53,11 @@ import {
53
53
  import {
54
54
  readHiddenToEof,
55
55
  readlineSync
56
- } from "./chunk-ENBIMEKS.js";
56
+ } from "./chunk-IB6ARI3R.js";
57
57
  import {
58
58
  createClient,
59
59
  resolveEffectiveConfig
60
- } from "./chunk-S234PC5E.js";
60
+ } from "./chunk-RXDG57B2.js";
61
61
  import {
62
62
  GLOBAL_FLAGS,
63
63
  READ_SINGLE_FLAGS,
@@ -67,11 +67,11 @@ import {
67
67
  } from "./chunk-QLKGOIWS.js";
68
68
  import {
69
69
  DESCRIPTIONS
70
- } from "./chunk-QBY6L77D.js";
70
+ } from "./chunk-5LGKZBAY.js";
71
71
  import {
72
72
  parseDocument,
73
73
  readFileFlag
74
- } from "./chunk-JKXGL7PT.js";
74
+ } from "./chunk-RKNW4UX4.js";
75
75
  import "./chunk-FDJMAF7D.js";
76
76
  import {
77
77
  defaultReadStdin,
@@ -79,7 +79,7 @@ import {
79
79
  } from "./chunk-ZYURL5VK.js";
80
80
  import {
81
81
  AUTH_NEEDED
82
- } from "./chunk-RDKTHFQ6.js";
82
+ } from "./chunk-SCUTAREU.js";
83
83
 
84
84
  // src/commands/account-insights.ts
85
85
  import { defineCommand } from "citty";
@@ -150,18 +150,31 @@ var accountMetricsCommand = defineCommand({
150
150
 
151
151
  // src/commands/account-warm-up.ts
152
152
  import { defineCommand as defineCommand2 } from "citty";
153
+ function ramp(f) {
154
+ const w = {};
155
+ if (f.preset !== void 0) {
156
+ if (f.preset !== "gradual" && f.preset !== "custom") usage("--preset takes gradual or custom.");
157
+ w["preset"] = f.preset;
158
+ }
159
+ if (f.start !== void 0) w["start"] = intFlag("start", f.start, 5, 90);
160
+ if (f.step !== void 0) w["step"] = intFlag("step", f.step, 1, 50);
161
+ if (f.every !== void 0) w["every"] = intFlag("every", f.every, 1, 7);
162
+ return w;
163
+ }
153
164
  async function run(f, enabled) {
154
165
  const accountId = String(f.accountId ?? "");
166
+ const warm_up = { enabled, ...enabled ? ramp(f) : {} };
155
167
  if (f.preview) {
156
- process.stdout.write(JSON.stringify(buildPreviewOutput({ method: "accounts.updateSafetyPolicy", args: { accountId }, body: { warm_up: { enabled } } })) + "\n");
168
+ process.stdout.write(JSON.stringify(buildPreviewOutput({ method: "accounts.updateSafetyPolicy", args: { accountId }, body: { warm_up } })) + "\n");
157
169
  return;
158
170
  }
159
171
  const c = await rootClient(f);
160
172
  try {
161
- const policy = await c.accounts.updateSafetyPolicy(accountId, { warm_up: { enabled } });
173
+ const policy = await c.accounts.updateSafetyPolicy(accountId, { warm_up });
162
174
  if (outputOpts(f).json) return renderSuccess(policy, outputOpts(f), process);
163
175
  const w = policy.warm_up ?? {};
164
- process.stdout.write(`Warm-up ${w.enabled ? "on" : "off"} for ${accountId}: state ${w.state ?? "unknown"}, factor ${w.factor ?? "unknown"}${w.dormant ? ", dormant" : ""}.
176
+ const at = w.preset ? `, ${w.preset}${w.day != null ? ` day ${w.day}` : ""}` : "";
177
+ process.stdout.write(`Warm-up ${w.enabled ? "on" : "off"} for ${accountId}: state ${w.state ?? "unknown"}, factor ${w.factor ?? "unknown"}${at}${w.dormant ? ", dormant" : ""}.
165
178
  `);
166
179
  } catch (err) {
167
180
  await fail(err, f);
@@ -170,7 +183,7 @@ async function run(f, enabled) {
170
183
  var switchCommand = (name) => defineCommand2({
171
184
  meta: {
172
185
  name,
173
- description: name === "on" ? "Turn the Account's warm-up on: its limits start at 15% from now and rise to full over 5 weeks. Prints the resulting warm-up." : "Turn the Account's warm-up off (the default): full limits at once; recovery after a LinkedIn restriction still applies. Prints the resulting warm-up.",
186
+ description: name === "on" ? "Turn the Account's warm-up on: its limits ramp from now in its sending days, Gradual (30% on day 1 to 100% on day 14) or Custom (--start percent on day 1, plus --step points every --every sending days). Prints the resulting warm-up." : "Turn the Account's warm-up off (the default): full limits at once; recovery after a LinkedIn restriction still applies. Prints the resulting warm-up.",
174
187
  risk: "write",
175
188
  rules: {
176
189
  changes: `The Account's warm-up switch is set ${name}; every budget row's effective ceiling follows.`,
@@ -181,9 +194,21 @@ var switchCommand = (name) => defineCommand2({
181
194
  blast_radius: "One Account's pace."
182
195
  },
183
196
  seeAlso: ["curviate account get"],
184
- examples: [`curviate account warm-up ${name} acc_YOUR_ACCOUNT_ID`]
197
+ examples: [
198
+ `curviate account warm-up ${name} acc_YOUR_ACCOUNT_ID`,
199
+ ...name === "on" ? ["curviate account warm-up on acc_YOUR_ACCOUNT_ID --preset custom --start 20 --step 10 --every 2"] : []
200
+ ]
201
+ },
202
+ args: {
203
+ ...WRITE_SINGLE_FLAGS,
204
+ accountId: { type: "positional", description: "The Account (acc_...)." },
205
+ ...name === "on" ? {
206
+ preset: { type: "string", description: "gradual (default: 30% on day 1 to 100% on day 14) or custom." },
207
+ start: { type: "string", description: "Custom: the percentage on day 1, 5 to 90." },
208
+ step: { type: "string", description: "Custom: percentage points added each time, 1 to 50." },
209
+ every: { type: "string", description: "Custom: sending days between steps, 1 to 7." }
210
+ } : {}
185
211
  },
186
- args: { ...WRITE_SINGLE_FLAGS, accountId: { type: "positional", description: "The Account (acc_...)." } },
187
212
  async run({ args }) {
188
213
  await run(args, name === "on");
189
214
  }
@@ -622,7 +647,7 @@ var createCmd = defineCommand4({
622
647
  args: {
623
648
  ...WRITE_SINGLE_FLAGS,
624
649
  reconnect: { type: "string", description: "Reconnect this account (acc_...) instead of connecting a new one." },
625
- "warm-up": { type: "boolean", description: "--warm-up: the new account starts with warm-up on once the person connects it (limits at 15%, rising to full over 5 weeks). Default off (full limits from the start); --no-warm-up is accepted and changes nothing. A new connect only." }
650
+ "warm-up": { type: "boolean", description: "--warm-up: the new account starts with warm-up on once the person connects it (limits at 30%, rising to full by day 14 of its sending days). Default off (full limits from the start); --no-warm-up is accepted and changes nothing. A new connect only." }
626
651
  },
627
652
  run: online2(runCreate)
628
653
  });
@@ -663,7 +688,7 @@ var connectRequestCommand = defineCommand4({
663
688
  meta: { name: "connect-request", description: "Connect a LinkedIn account without any credential passing through you: create a request, give the person its link, read it until done." },
664
689
  subCommands: { create: createCmd, get: getCmd2, cancel: cancelCmd },
665
690
  async run() {
666
- const { showHelp } = await import("./examples-77WVMKZQ.js");
691
+ const { showHelp } = await import("./examples-J4X5NEIE.js");
667
692
  await showHelp(connectRequestCommand, ["curviate", "account", "connect-request"]);
668
693
  }
669
694
  });
@@ -694,7 +719,7 @@ function resolveOutputOpts(flags) {
694
719
  async function handleError(err, outOpts, out) {
695
720
  const { CurviateError } = await import("@curviate/sdk");
696
721
  if (err instanceof CurviateError) {
697
- const { getExitCode } = await import("./exit-codes-ZSOLAXQO.js");
722
+ const { getExitCode } = await import("./exit-codes-P2FLCKM7.js");
698
723
  renderError(err, outOpts, out);
699
724
  process.exit(getExitCode(err));
700
725
  }
@@ -1772,7 +1797,7 @@ var accountLinkCommand = defineCommand5({
1772
1797
  products: { type: "string", description: "Comma-separated premium products to ask for: sales_navigator, recruiter. Omit to ask for both (--linkedin-premium still narrows). Classic LinkedIn and company pages are always included." },
1773
1798
  "external-id": { type: "string", description: "Your own id for this account's end user (1-255 chars, not unique). Returned on the account and every account webhook; filter with `curviate account list --external-id`. Use an opaque id, not an email." },
1774
1799
  timezone: { type: "string", description: "Ignored: the account's time zone follows its connection location. Accepted so existing scripts keep working; nothing is sent." },
1775
- "warm-up": { type: "boolean", description: "--warm-up connects the new account with warm-up on: its limits start at 15% and rise to full over 5 weeks. Default off (full limits from the start); --no-warm-up is accepted and changes nothing. A new connect only; for a connected account use `curviate account warm-up`." },
1800
+ "warm-up": { type: "boolean", description: "--warm-up connects the new account with warm-up on: its limits start at 30% and rise to full by day 14 of its sending days (the Gradual ramp). Default off (full limits from the start); --no-warm-up is accepted and changes nothing. A new connect only; for a connected account use `curviate account warm-up`." },
1776
1801
  "account-id": { type: "string", description: "Existing account id (acc_...) to re-authenticate IN PLACE. Passing it makes this an in-place reconnect of that account. Omit to connect a NEW account into --seat-id." },
1777
1802
  "no-interactive": {
1778
1803
  type: "boolean",
@@ -6,16 +6,16 @@ import {
6
6
  grammarParams,
7
7
  renderOverview,
8
8
  windowParams
9
- } from "./chunk-BC4N5X3N.js";
9
+ } from "./chunk-RTT75CXE.js";
10
10
  import "./chunk-5S3MJVI5.js";
11
11
  import "./chunk-PPGKQJKU.js";
12
- import "./chunk-LGUZ52BU.js";
12
+ import "./chunk-3ZQNOKEK.js";
13
13
  import "./chunk-NNV2OYEF.js";
14
- import "./chunk-R7USRN52.js";
14
+ import "./chunk-OE4CY3ZL.js";
15
15
  import "./chunk-QM57YDJE.js";
16
- import "./chunk-S234PC5E.js";
16
+ import "./chunk-RXDG57B2.js";
17
17
  import "./chunk-QLKGOIWS.js";
18
- import "./chunk-QBY6L77D.js";
18
+ import "./chunk-5LGKZBAY.js";
19
19
  import "./chunk-ZYURL5VK.js";
20
20
  export {
21
21
  GRAMMAR_ARGS,
@@ -4,14 +4,14 @@ import {
4
4
  outputOpts,
5
5
  rootClient,
6
6
  usage
7
- } from "./chunk-LGUZ52BU.js";
7
+ } from "./chunk-3ZQNOKEK.js";
8
8
  import {
9
9
  buildPreviewOutput
10
10
  } from "./chunk-TCUYH5GO.js";
11
11
  import {
12
12
  renderSuccess
13
13
  } from "./chunk-QM57YDJE.js";
14
- import "./chunk-S234PC5E.js";
14
+ import "./chunk-RXDG57B2.js";
15
15
  import {
16
16
  READ_SINGLE_FLAGS,
17
17
  WRITE_SINGLE_FLAGS,
@@ -19,7 +19,7 @@ import {
19
19
  } from "./chunk-QLKGOIWS.js";
20
20
  import {
21
21
  DESCRIPTIONS
22
- } from "./chunk-QBY6L77D.js";
22
+ } from "./chunk-5LGKZBAY.js";
23
23
  import "./chunk-ZYURL5VK.js";
24
24
 
25
25
  // src/commands/beta-consent.ts
@@ -72,7 +72,7 @@ var betaCommand = defineCommand({
72
72
  meta: { name: "beta", description: DESCRIPTIONS.beta },
73
73
  subCommands: { status: statusCmd, update: updateCmd },
74
74
  async run() {
75
- const { showHelp } = await import("./examples-77WVMKZQ.js");
75
+ const { showHelp } = await import("./examples-J4X5NEIE.js");
76
76
  await showHelp(betaCommand, ["curviate", "beta"]);
77
77
  }
78
78
  });
@@ -0,0 +1,248 @@
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-3ZQNOKEK.js";
11
+ import {
12
+ intFlag
13
+ } from "./chunk-NNV2OYEF.js";
14
+ import {
15
+ buildPreviewOutput
16
+ } from "./chunk-TCUYH5GO.js";
17
+ import {
18
+ pageDelayFromFlags,
19
+ readCursorFlag,
20
+ readMaxPagesFlag,
21
+ readablePage,
22
+ rejectPaginationModifiersWithoutAll,
23
+ streamAll
24
+ } from "./chunk-OE4CY3ZL.js";
25
+ import {
26
+ renderSuccess,
27
+ writeNdjsonItem
28
+ } from "./chunk-QM57YDJE.js";
29
+ import {
30
+ downloadBinary
31
+ } from "./chunk-RXDG57B2.js";
32
+ import {
33
+ GLOBAL_FLAGS,
34
+ READ_SINGLE_FLAGS,
35
+ WRITE_SINGLE_FLAGS,
36
+ readOnly
37
+ } from "./chunk-QLKGOIWS.js";
38
+ import {
39
+ DESCRIPTIONS
40
+ } from "./chunk-5LGKZBAY.js";
41
+ import "./chunk-ZYURL5VK.js";
42
+
43
+ // src/commands/billing.ts
44
+ import { defineCommand } from "citty";
45
+ var online = (fn) => async ({ args }) => {
46
+ const f = args;
47
+ await fn(await rootClient(f), f);
48
+ };
49
+ async function runQuote(c, f) {
50
+ const seats = intFlag("seats", f.seats ?? usage("--seats is required: how many seats to price, 1 or more."), 1);
51
+ const period = f.period ?? "monthly";
52
+ if (period !== "monthly" && period !== "annual") usage("--period takes monthly or annual.");
53
+ try {
54
+ renderSuccess(await c.billing.quote({ seats: String(seats), period }), outputOpts(f), process);
55
+ } catch (err) {
56
+ await fail(err, f);
57
+ }
58
+ }
59
+ async function runCap(c, f) {
60
+ try {
61
+ renderSuccess(await c.billing.spendingCap(), outputOpts(f), process);
62
+ } catch (err) {
63
+ await fail(err, f);
64
+ }
65
+ }
66
+ async function runChanges(c, f) {
67
+ rejectPaginationModifiersWithoutAll(f, process);
68
+ const params = {};
69
+ if (f.limit !== void 0) params["limit"] = intFlag("limit", f.limit, 1, 100);
70
+ const cursor = readCursorFlag(f, process);
71
+ if (cursor) params["cursor"] = cursor;
72
+ try {
73
+ if (f.all) {
74
+ const page = (p) => c.billing.changes(p);
75
+ for await (const item of streamAll(page, params, { maxPages: readMaxPagesFlag(f, process), out: process, pageDelayMs: pageDelayFromFlags(f) })) writeNdjsonItem(process, item, f.fields);
76
+ } else {
77
+ renderSuccess(readablePage(await c.billing.changes(params)), outputOpts(f), process);
78
+ }
79
+ } catch (err) {
80
+ await fail(err, f);
81
+ }
82
+ }
83
+ async function runList(c, f) {
84
+ rejectPaginationModifiersWithoutAll(f, process);
85
+ const params = {};
86
+ if (f.limit !== void 0) params["limit"] = intFlag("limit", f.limit, 1, 100);
87
+ const cursor = readCursorFlag(f, process);
88
+ if (cursor) params["cursor"] = cursor;
89
+ try {
90
+ if (f.all) {
91
+ const page = (p) => c.billing.invoices.list(p);
92
+ for await (const item of streamAll(page, params, { maxPages: readMaxPagesFlag(f, process), out: process, pageDelayMs: pageDelayFromFlags(f) })) writeNdjsonItem(process, item, f.fields);
93
+ } else {
94
+ renderSuccess(readablePage(await c.billing.invoices.list(params)), outputOpts(f), process);
95
+ }
96
+ } catch (err) {
97
+ await fail(err, f);
98
+ }
99
+ }
100
+ async function runPdf(c, f) {
101
+ const number = String(f.number ?? "");
102
+ if (number.trim() === "") usage("the invoice number is empty. Take it from `curviate billing invoices`.");
103
+ 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.");
104
+ if (f.output === "-" && process.stdout.isTTY) usage("-o - would write a PDF to the terminal. Pass a file name.");
105
+ let bytes;
106
+ try {
107
+ bytes = Buffer.from(await downloadBinary(() => c.billing.invoices.pdf(number)));
108
+ } catch (err) {
109
+ return fail(err, f);
110
+ }
111
+ if (f.output === "-") process.stdout.write(bytes);
112
+ else {
113
+ try {
114
+ writeAtomic(f.output, bytes);
115
+ } catch (err) {
116
+ usage(`-o: cannot write ${f.output}: ${err.code ?? "write error"}.`);
117
+ }
118
+ }
119
+ process.stderr.write(`Invoice ${number}: ${bytes.length} bytes${f.output === "-" ? "" : ` written to ${f.output}`}.
120
+ `);
121
+ }
122
+ async function confirmMoney(f, question) {
123
+ if (f.yes) return true;
124
+ if (!process.stdin.isTTY) usage("this charges money: pass --yes to confirm (no terminal to ask at). Read the price first with `curviate billing quote`.");
125
+ process.stderr.write(`${question} [y/N] `);
126
+ const answer = await new Promise((resolve) => {
127
+ process.stdin.setEncoding("utf8");
128
+ process.stdin.once("data", (chunk) => resolve(chunk.trim().toLowerCase()));
129
+ });
130
+ process.stdin.pause();
131
+ if (answer === "y" || answer === "yes") return true;
132
+ process.stderr.write("Aborted: nothing was charged.\n");
133
+ return false;
134
+ }
135
+ async function runMove(f) {
136
+ if (f.preview) return void process.stdout.write(JSON.stringify(buildPreviewOutput({ method: "billing.moveToCurrentPrice", args: {}, body: {} })) + "\n");
137
+ const c = await rootClient(f);
138
+ if (!await confirmMoney(f, "Move your subscription to the current price now? The unused time is credited and the current price charged for the rest of the period (yearly: today).")) return;
139
+ try {
140
+ renderSuccess(await c.billing.moveToCurrentPrice(), outputOpts(f), process);
141
+ } catch (err) {
142
+ await fail(err, f);
143
+ }
144
+ }
145
+ var moveCmd = defineCommand({
146
+ meta: {
147
+ name: "move",
148
+ description: "Move a subscription on a previous price (Build, Automate or Seat) to the current price now, same seats and billing period. This charges money: the unused time on the previous price is credited and the current price charged for the rest of the period, monthly on the next invoice, yearly today. Asks first at a terminal; elsewhere pass --yes. A Team already on the current price is refused and nothing is charged. Owners only.",
149
+ risk: "high",
150
+ rules: {
151
+ changes: "The subscription's price; a yearly move charges the difference today.",
152
+ visible_to: "Your Team's Owners, on the invoice.",
153
+ budget_rows: [],
154
+ retry: "A second call is refused (already on the current price); nothing is charged twice.",
155
+ undo: "None: there is no move back to a previous price.",
156
+ blast_radius: "The Team's whole subscription."
157
+ },
158
+ errors: { INVALID_REQUEST: "already on the current price, no subscription, or a previous price that cannot be moved in place; nothing was charged.", INSUFFICIENT_ROLE: "only an Owner moves the price." },
159
+ output: ["`moved`, `period`, `seats` and `charged_today` (cents, tax included; 0 for a monthly move)."],
160
+ seeAlso: ["curviate billing quote", "curviate tier"],
161
+ examples: ["curviate billing price move", "curviate billing price move --yes --json"]
162
+ },
163
+ args: { ...WRITE_SINGLE_FLAGS, yes: { type: "boolean", description: "Confirm the charge without a prompt (needed when no terminal can ask)." } },
164
+ run: async ({ args }) => runMove(args)
165
+ });
166
+ var priceCmd = defineCommand({
167
+ meta: { name: "price", description: "Your subscription's price: move one on a previous price to the current price." },
168
+ subCommands: { move: moveCmd }
169
+ });
170
+ var pdfCmd = defineCommand({
171
+ meta: {
172
+ name: "pdf",
173
+ 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.",
174
+ risk: "read",
175
+ output: ["The PDF bytes, to -o <file> (replaced whole on success) or, with -o -, to stdout; a byte count on stderr."],
176
+ examples: ["curviate billing invoices pdf INV-0001 -o invoice.pdf"]
177
+ },
178
+ args: {
179
+ "api-key": GLOBAL_FLAGS["api-key"],
180
+ profile: GLOBAL_FLAGS.profile,
181
+ team: GLOBAL_FLAGS.team,
182
+ "base-url": GLOBAL_FLAGS["base-url"],
183
+ timeout: GLOBAL_FLAGS.timeout,
184
+ number: { type: "positional", description: "The invoice number, from the invoice list." },
185
+ output: { type: "string", alias: "o", required: true, description: "Write the PDF to this path, or - for stdout." }
186
+ },
187
+ run: online(runPdf)
188
+ });
189
+ var invoicesCmd = defineCommand({
190
+ meta: {
191
+ name: "invoices",
192
+ 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.",
193
+ risk: "read",
194
+ output: ["`items` (number, created_at, period_start, period_end, total, currency, status) and a `cursor`; with --all, one invoice per line."],
195
+ examples: ["curviate billing invoices", "curviate billing invoices --json --limit 12"]
196
+ },
197
+ args: { ...readOnly(GLOBAL_FLAGS) },
198
+ subCommands: { pdf: pdfCmd },
199
+ run: online(runList)
200
+ });
201
+ var quoteCmd = defineCommand({
202
+ meta: {
203
+ name: "quote",
204
+ 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.",
205
+ risk: "read",
206
+ output: ["`total` and `steps[]` (from, up_to, unit_amount, seats, amount), in cents, with `currency` and `period`."],
207
+ examples: ["curviate billing quote --seats 25", "curviate billing quote --seats 25 --period annual"]
208
+ },
209
+ args: {
210
+ ...readOnly(READ_SINGLE_FLAGS),
211
+ seats: { type: "string", required: true, description: "How many seats to price, 1 or more." },
212
+ period: { type: "string", description: "monthly (default) or annual." }
213
+ },
214
+ run: online(runQuote)
215
+ });
216
+ var capCmd = defineCommand({
217
+ meta: {
218
+ name: "cap",
219
+ 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.",
220
+ risk: "read",
221
+ output: ["`cap_seats`, `is_default`, `seats`, `room_seats`, `monthly_amount` (cents), `currency`."],
222
+ examples: ["curviate billing cap"]
223
+ },
224
+ args: { ...readOnly(READ_SINGLE_FLAGS) },
225
+ run: online(runCap)
226
+ });
227
+ var changesCmd = defineCommand({
228
+ meta: {
229
+ name: "changes",
230
+ 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.",
231
+ risk: "read",
232
+ output: ["`items` and a `cursor`; with --all, one change per line."],
233
+ examples: ["curviate billing changes", "curviate billing changes --all"]
234
+ },
235
+ args: { ...readOnly(GLOBAL_FLAGS) },
236
+ run: online(runChanges)
237
+ });
238
+ var billingCommand = defineCommand({
239
+ meta: { name: "billing", description: DESCRIPTIONS.billing },
240
+ subCommands: { quote: quoteCmd, cap: capCmd, changes: changesCmd, invoices: invoicesCmd, price: priceCmd },
241
+ async run() {
242
+ const { showHelp } = await import("./examples-J4X5NEIE.js");
243
+ await showHelp(billingCommand, ["curviate", "billing"]);
244
+ }
245
+ });
246
+ export {
247
+ billingCommand
248
+ };
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-UEAX6KUB.js";
5
5
  import {
6
6
  readableId
7
- } from "./chunk-R7USRN52.js";
7
+ } from "./chunk-OE4CY3ZL.js";
8
8
 
9
9
  // src/lib/member-id.ts
10
10
  var MEMBER_PROVIDER_ID_RE = /^A[CDE][A-Za-z0-9_-]{4,}$/;
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  createClient,
8
8
  resolveEffectiveConfig
9
- } from "./chunk-S234PC5E.js";
9
+ } from "./chunk-RXDG57B2.js";
10
10
 
11
11
  // src/lib/root-command.ts
12
12
  var outputOpts = (f) => ({
@@ -35,7 +35,7 @@ async function rootClient(f) {
35
35
  async function fail(err, f) {
36
36
  const { CurviateError } = await import("@curviate/sdk");
37
37
  if (err instanceof CurviateError) {
38
- const { getExitCode } = await import("./exit-codes-ZSOLAXQO.js");
38
+ const { getExitCode } = await import("./exit-codes-P2FLCKM7.js");
39
39
  renderError(err, outputOpts(f), process);
40
40
  process.exit(getExitCode(err));
41
41
  }