@curviate/cli 0.62.0 → 0.64.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.
- package/CHANGELOG.md +19 -0
- package/dist/{account-KHGIDS7C.js → account-55QRBRX2.js} +76 -18
- package/dist/{analytics-PCKJMU2Z.js → analytics-DOGKBULH.js} +6 -6
- package/dist/{beta-consent-WBT4UPXA.js → beta-consent-3EPBXPPQ.js} +4 -4
- package/dist/{billing-EVZOOTM5.js → billing-2A7EZWZX.js} +6 -6
- package/dist/{chunk-34A5CHXH.js → chunk-2JL554FW.js} +11 -11
- package/dist/{chunk-7HYLUMA2.js → chunk-33GDPBLY.js} +1 -1
- package/dist/{chunk-VRS37BII.js → chunk-3M52GHII.js} +5 -5
- package/dist/{chunk-QLKGOIWS.js → chunk-65UYYCWD.js} +7 -0
- package/dist/{chunk-2JHRIBHB.js → chunk-66HEPUAX.js} +33 -4
- package/dist/{chunk-KI7N6UTH.js → chunk-AFP5F3I6.js} +1 -1
- package/dist/{chunk-PHSP5WZP.js → chunk-FUPVALUL.js} +25 -3
- package/dist/{chunk-WBOYMBTN.js → chunk-KSRNDK2N.js} +118 -12
- package/dist/{chunk-MMDUAADN.js → chunk-PITCPTWX.js} +2 -2
- package/dist/{chunk-66MWBCOR.js → chunk-QFG3DRHY.js} +2 -2
- package/dist/{chunk-R5IWR5D3.js → chunk-WISP4QXZ.js} +1 -1
- package/dist/{chunk-RNQ2TGTR.js → chunk-YE2WKE3R.js} +5 -5
- package/dist/{chunk-NUQTAH66.js → chunk-YW6CYOX6.js} +5 -5
- package/dist/cli.js +26 -26
- package/dist/{comment-KSTMPDPW.js → comment-CERAB2Z5.js} +6 -6
- package/dist/{company-RZH4IOB3.js → company-WC6SGDTE.js} +6 -6
- package/dist/{company-record-AIOQFNYA.js → company-record-GVOCKW7U.js} +9 -9
- package/dist/{config-2ZPYE7IM.js → config-RC377EZ7.js} +2 -2
- package/dist/{connect-D7LTT2TN.js → connect-V63CQIO7.js} +5 -5
- package/dist/{contact-3JE6UMAW.js → contact-4OH5AVMI.js} +8 -8
- package/dist/{contact-groups-G44SEWGV.js → contact-groups-OILNTYGH.js} +8 -8
- package/dist/{contact-import-I2CSUJM4.js → contact-import-X5EUG77K.js} +19 -11
- package/dist/{core-VY7AWN5A.js → core-FM222KR6.js} +16 -16
- package/dist/{do-not-contact-WM3PXFUW.js → do-not-contact-SA6IXJIE.js} +9 -9
- package/dist/{doctor-3V26HZ64.js → doctor-6XQRPRBT.js} +4 -4
- package/dist/{domain-BDGB2IGY.js → domain-N7BBT5WI.js} +5 -5
- package/dist/{draft-HSYD6AEU.js → draft-6KPWHEPU.js} +4 -4
- package/dist/{enrollment-6AGTQFQN.js → enrollment-PCE6OGCV.js} +5 -5
- package/dist/{export-VFENGCZ2.js → export-WC64TMKR.js} +4 -4
- package/dist/{feed-M6NTLLSN.js → feed-WC2UCUSC.js} +5 -5
- package/dist/{group-FDD3QDBT.js → group-FSZU62CS.js} +5 -5
- package/dist/{inbox-BWNR3N4L.js → inbox-O422BPE5.js} +5 -5
- package/dist/{inboxes-2C5Z3XPV.js → inboxes-NBLCSHHK.js} +5 -5
- package/dist/{incoming-SAJXKQ7R.js → incoming-S5Q7YJM3.js} +5 -5
- package/dist/{job-XFJFYZRQ.js → job-CJUFB5DB.js} +5 -5
- package/dist/{login-UROMY3OS.js → login-5A4KOIBU.js} +2 -2
- package/dist/{mailbox-AFP65FCW.js → mailbox-OZI2NREM.js} +10 -9
- package/dist/{message-DCLIKQ5V.js → message-WAHQQHTF.js} +6 -6
- package/dist/{motion-LEIFCNMP.js → motion-SZSJ4WZI.js} +6 -6
- package/dist/{network-CJ7O4JK6.js → network-3CQGZMQF.js} +5 -5
- package/dist/{notification-WEUR4B7W.js → notification-OUZ44XYA.js} +5 -5
- package/dist/{notifications-UZKV5RHZ.js → notifications-BNLH3ESH.js} +5 -5
- package/dist/{post-YUNPJZZM.js → post-2IABIGUC.js} +6 -6
- package/dist/{profile-D7VC227S.js → profile-FTNWMCKB.js} +6 -6
- package/dist/{recruiter-WS4IFAHV.js → recruiter-OZSLGPYO.js} +16 -8
- package/dist/{sales-nav-Z5VWWMTU.js → sales-nav-RZF65ZRA.js} +16 -8
- package/dist/{search-MQZAJXBF.js → search-YTZQ4XUN.js} +25 -11
- package/dist/{setup-Q4YCWD6T.js → setup-67FMKDKO.js} +4 -4
- package/dist/{signal-BYCWA7B3.js → signal-XCCCE434.js} +5 -5
- package/dist/{team-52T56NUY.js → team-EC5CFT7D.js} +5 -5
- package/dist/{tier-VMGEMTXH.js → tier-M6LZVGH3.js} +5 -5
- package/dist/{unibox-IIIVB7JT.js → unibox-U3RPEUJI.js} +5 -5
- package/dist/{webhook-44LDBVZI.js → webhook-EAXWPNQZ.js} +5 -5
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,25 @@ 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.64.0] - 2026-11-20
|
|
10
|
+
|
|
11
|
+
Requires `@curviate/sdk` 0.59.0 (exact pin; the vendored fixture is re-copied from the SDK's and its hash recomputed). `commands.json` regenerated. No new command, flag or exit code.
|
|
12
|
+
|
|
13
|
+
- **An import from a LinkedIn source says where it stands, in the dashboard's words.** `lead import --source`, `lead imports get` and `lead imports list` print a `progress` line after `status`: the wait with the time of the next page (`Next page in 2 minutes`, `Hourly search limit reached. Next page at 14:05`, `Daily search limit reached. Next page tomorrow at 09:00`, `Monthly search limit reached`, `Outside the Account's Active hours`, `Paused: LinkedIn slowed this search down`, `Starts after the import ahead of it (imp_...). First page in 3 minutes`, `Resumes once the Account is reconnected`), then how long is left (`About 8 to 11 minutes left`, from `estimate.seconds_min` and `seconds_max`: minutes under 90, hours under 36, then days; never a range with equal ends); a finished import says how long it took (`Done in 12 minutes: reached its maximum`). Times are local. With `--json` (or piped output) stdout is the API's object unchanged, and `lead imports get` writes the line to stderr.
|
|
14
|
+
- **The estimate's working days are no longer printed** (deprecated by the API; still in `--json`).
|
|
15
|
+
- `lead imports get` help: `next_page_at`, `waiting.budget` (hour, day, lines, month), `waiting.kind` `import_ahead` with `import_id`, `halt`, `account_unavailable`, `estimate` in seconds, and `counts.updated` (Leads the import filled at least one field on). No need to poll: look again at `next_page_at`.
|
|
16
|
+
|
|
17
|
+
## [0.63.0] - 2026-11-20
|
|
18
|
+
|
|
19
|
+
Requires `@curviate/sdk` 0.58.0 (exact pin; the vendored fixture is re-copied from the SDK's and its hash recomputed). `commands.json` regenerated. New flags, no new exit code: a search refusal is `BUDGET_EXHAUSTED`, exit 13; a search paused after LinkedIn server errors is `PLATFORM_ERROR`, exit 7.
|
|
20
|
+
|
|
21
|
+
- **Search budgets.** `account safety get` shows `search_pacing` and prints it in plain lines on stderr: the search pages read in the last 24 hours, the last hour and LinkedIn's month against each limit, with its default and maximum, a saved value held to the maximum, when LinkedIn's month starts again, and the random pause between pages. `account safety update <account> --search-pages-per-day N`, `--search-pages-per-hour N`, `--search-pages-per-month N` set them (`default` goes back to the default), alone or beside `--file`; above the maximum the API refuses it, exit 2, naming the maximum.
|
|
22
|
+
- **Search is paced per Account, one LinkedIn page a call.** Every search page command's `--limit` help and RULES say so: ask for a full page (10 classic, 25 jobs, Sales Navigator and Recruiter) and follow the cursor.
|
|
23
|
+
- **A search refusal in plain words.** At a terminal, a `BUDGET_EXHAUSTED` on a search names its budget (`Search budget: the random pause between two search pages ...`), `Retry in N s (instant)`, and for the Account's own settings the flag that raises it. `--json` carries `searchBudget` and `retryAfterSeconds` on the error envelope. A `PLATFORM_ERROR` naming a row says the row is paused after LinkedIn server errors.
|
|
24
|
+
- **`--all` waits out the pause between search pages**: a page refused with `budget: gap` is asked again after the wait it names (up to three times, each at most 90 seconds), with `Search pause: the next page in N s.` on stderr. Any other refusal ends the stream after the pages already written, with `Stopped after N page(s). Resume later with --cursor <c>` on stderr.
|
|
25
|
+
- **Mailboxes from Curviate**: `mailbox quote` says why a Team billed in another currency cannot order (contact support); an order ended `cancelled` with reason `currency` says nothing was charged and to contact support; `mailbox purchase get --help` lists every cancel reason.
|
|
26
|
+
- **Imports from a LinkedIn source**: `lead imports get` prints why the import waits and when it resumes (`active_hours`, `budget`, `pushback`, `search_limited`) on stderr; its help says the same.
|
|
27
|
+
|
|
9
28
|
## [0.62.0] - 2026-11-20
|
|
10
29
|
|
|
11
30
|
Requires `@curviate/sdk` 0.57.0 (exact pin). The vendored OpenAPI fixture is re-copied from the SDK's (production's document, server commit `c17f1b853`); its hash is recomputed. No command, flag, exit code or output change: the SDK release is docs only (the plan, never a Tier).
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
grammarParams,
|
|
15
15
|
renderOverview,
|
|
16
16
|
windowParams
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-YE2WKE3R.js";
|
|
18
18
|
import "./chunk-PPGKQJKU.js";
|
|
19
19
|
import {
|
|
20
20
|
print,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
outputOpts,
|
|
27
27
|
rootClient,
|
|
28
28
|
usage
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-PITCPTWX.js";
|
|
30
30
|
import {
|
|
31
31
|
buildPreviewOutput
|
|
32
32
|
} from "./chunk-TCUYH5GO.js";
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
readablePage,
|
|
42
42
|
rejectPaginationModifiersWithoutAll,
|
|
43
43
|
streamAll
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-FUPVALUL.js";
|
|
45
45
|
import {
|
|
46
46
|
isJsonMode,
|
|
47
47
|
renderError,
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
renderSuccess,
|
|
50
50
|
renderUnexpectedError,
|
|
51
51
|
writeNdjsonItem
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-66HEPUAX.js";
|
|
53
53
|
import {
|
|
54
54
|
readHiddenToEof,
|
|
55
55
|
readlineSync
|
|
@@ -57,14 +57,14 @@ import {
|
|
|
57
57
|
import {
|
|
58
58
|
createClient,
|
|
59
59
|
resolveEffectiveConfig
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-QFG3DRHY.js";
|
|
61
61
|
import {
|
|
62
62
|
GLOBAL_FLAGS,
|
|
63
63
|
READ_SINGLE_FLAGS,
|
|
64
64
|
WRITE_SINGLE_FLAGS,
|
|
65
65
|
readOnly,
|
|
66
66
|
setTeamFlag
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-65UYYCWD.js";
|
|
68
68
|
import {
|
|
69
69
|
DESCRIPTIONS
|
|
70
70
|
} from "./chunk-Z647LR4F.js";
|
|
@@ -238,6 +238,57 @@ var EMAIL_FLAGS = {
|
|
|
238
238
|
"email-opt-out-link-text": { type: "string", description: 'With --team: the text before the opt-out link, up to 100 characters, one plain line, no variables. "" restores the shipped default.' },
|
|
239
239
|
"email-opt-out-link-word": { type: "string", description: `With --team: the opt-out link's word, up to 30 characters, for example Abmelden. "" restores the shipped default.` }
|
|
240
240
|
};
|
|
241
|
+
var SEARCH_FLAGS = {
|
|
242
|
+
"search-pages-per-day": { type: "string", description: "The Account's search pages a day (the last 24 hours): a whole number from 1 to the maximum `curviate account safety get` shows, or default. Above the maximum the API refuses it and names the maximum." },
|
|
243
|
+
"search-pages-per-hour": { type: "string", description: "The Account's search pages an hour (the last 60 minutes): 1 to the maximum, which is the daily maximum, or default." },
|
|
244
|
+
"search-pages-per-month": { type: "string", description: "The Account's classic search pages in LinkedIn's month (from the 1st, 00:00 Pacific time): 1 to the maximum, or default. Sales Navigator and Recruiter have no monthly budget." }
|
|
245
|
+
};
|
|
246
|
+
function searchPacingFlags(f) {
|
|
247
|
+
const out = {};
|
|
248
|
+
for (const flag of Object.keys(SEARCH_FLAGS)) {
|
|
249
|
+
const v = f[flag];
|
|
250
|
+
if (v === void 0) continue;
|
|
251
|
+
out[flag.replace("search-", "").replace(/-/g, "_")] = v === "default" ? null : intFlag(flag, v);
|
|
252
|
+
}
|
|
253
|
+
return Object.keys(out).length > 0 ? out : void 0;
|
|
254
|
+
}
|
|
255
|
+
var PLAN_WORDS = {
|
|
256
|
+
classic_free: "free or Premium Career search",
|
|
257
|
+
classic_business: "Premium Business search",
|
|
258
|
+
sales_navigator: "Sales Navigator search",
|
|
259
|
+
recruiter: "Recruiter search"
|
|
260
|
+
};
|
|
261
|
+
function searchPacingNote(policy) {
|
|
262
|
+
const sp = policy?.search_pacing;
|
|
263
|
+
if (!sp || typeof sp !== "object") return null;
|
|
264
|
+
const line = (label, b, flag) => {
|
|
265
|
+
if (!b || typeof b !== "object") return null;
|
|
266
|
+
const x = b;
|
|
267
|
+
let l = ` ${label}: ${x.used ?? 0} of ${x.effective ?? x.value} (default ${x.default}, at most ${x.maximum}${x.source === "account" ? `, set to ${x.value}` : ""}; --search-pages-per-${flag})`;
|
|
268
|
+
if (x.effective !== void 0 && x.value !== void 0 && x.effective < x.value) l += `
|
|
269
|
+
Warm-up holds it to ${x.effective} for now.`;
|
|
270
|
+
if (x.source === "maximum") l += `
|
|
271
|
+
Saved as ${x.saved}, above what this Account allows now, so ${x.maximum} applies.`;
|
|
272
|
+
return l;
|
|
273
|
+
};
|
|
274
|
+
const lines = [`Search pages (${PLAN_WORDS[String(sp["plan"])] ?? String(sp["plan"])}):`];
|
|
275
|
+
for (const l of [
|
|
276
|
+
line("Last 24 hours", sp["pages_per_day"], "day"),
|
|
277
|
+
line("Last hour", sp["pages_per_hour"], "hour"),
|
|
278
|
+
line("This LinkedIn month", sp["pages_per_month"], "month")
|
|
279
|
+
]) if (l) lines.push(l);
|
|
280
|
+
if (sp["month_resets_at"]) lines.push(` LinkedIn's month starts again ${String(sp["month_resets_at"])}.`);
|
|
281
|
+
const stopped = sp["stopped"];
|
|
282
|
+
if (stopped) lines.push(` LinkedIn showed this Account its monthly search limit: classic search waits until ${stopped.until}.`);
|
|
283
|
+
if (sp["next_page_at"]) lines.push(` Next page from ${String(sp["next_page_at"])}.`);
|
|
284
|
+
lines.push(` Pages are read ${sp["min_gap_seconds"]} to ${sp["max_gap_seconds"]} seconds apart at random, inside Active hours; the pause is not a setting.`);
|
|
285
|
+
return lines.join("\n");
|
|
286
|
+
}
|
|
287
|
+
function printPolicy(policy, f) {
|
|
288
|
+
renderSuccess(policy, outputOpts(f), process);
|
|
289
|
+
const note = searchPacingNote(policy);
|
|
290
|
+
if (note) process.stderr.write(note + "\n");
|
|
291
|
+
}
|
|
241
292
|
function teamScope(f) {
|
|
242
293
|
const asked = f.team !== void 0;
|
|
243
294
|
const id = String(f.accountId ?? "");
|
|
@@ -251,10 +302,10 @@ function teamScope(f) {
|
|
|
251
302
|
var getCmd = defineCommand3({
|
|
252
303
|
meta: {
|
|
253
304
|
name: "get",
|
|
254
|
-
description: "With --team, the Team's own policy: its defaults per limit profile and budget row and `email` (default_daily_cap, opt_out_scope and the three opt-out texts in force, the shipped default when none is set). Otherwise one Account's safety policy: every budget row with its ceiling, effective_ceiling and (strict rows) target and effective_target, Active hours, warm-up, pacing, auto_withdraw
|
|
305
|
+
description: "With --team, the Team's own policy: its defaults per limit profile and budget row and `email` (default_daily_cap, opt_out_scope and the three opt-out texts in force, the shipped default when none is set). Otherwise one Account's safety policy: every budget row with its ceiling, effective_ceiling and (strict rows) target and effective_target, Active hours, warm-up, pacing, auto_withdraw, the Activity level (activity_level, and activity_level_effective with activity_level_reason when it runs lower) and search_pacing: the search pages read in the last 24 hours, the last hour and LinkedIn's month against each limit, with its default and maximum (also printed in plain lines on stderr). A read: no LinkedIn call.",
|
|
255
306
|
risk: "read",
|
|
256
307
|
seeAlso: ["curviate account safety update", "curviate account get"],
|
|
257
|
-
examples: ["curviate account safety get acc_YOUR_ACCOUNT_ID", "curviate account safety get acc_YOUR_ACCOUNT_ID --fields
|
|
308
|
+
examples: ["curviate account safety get acc_YOUR_ACCOUNT_ID", "curviate account safety get acc_YOUR_ACCOUNT_ID --fields search_pacing", "curviate account safety get --team"]
|
|
258
309
|
},
|
|
259
310
|
args: { ...readOnly(READ_SINGLE_FLAGS), team: TEAM, accountId: ACCOUNT },
|
|
260
311
|
async run({ args }) {
|
|
@@ -262,7 +313,8 @@ var getCmd = defineCommand3({
|
|
|
262
313
|
const team = teamScope(f);
|
|
263
314
|
const c = await rootClient(f);
|
|
264
315
|
try {
|
|
265
|
-
|
|
316
|
+
if (team) renderSuccess(await c.accounts.getTeamSafetyPolicy(), outputOpts(f), process);
|
|
317
|
+
else printPolicy(await c.accounts.getSafetyPolicy(String(f.accountId ?? "")), f);
|
|
266
318
|
} catch (err) {
|
|
267
319
|
await fail(err, f);
|
|
268
320
|
}
|
|
@@ -279,7 +331,7 @@ async function updateTeam(f) {
|
|
|
279
331
|
for (const [flag, key] of [["email-opt-out-text", "opt_out_text"], ["email-opt-out-link-text", "opt_out_link_text"], ["email-opt-out-link-word", "opt_out_link_word"]]) {
|
|
280
332
|
if (f[flag] !== void 0) email[key] = f[flag];
|
|
281
333
|
}
|
|
282
|
-
if (f.file !== void 0 || f["activity-level"] !== void 0) usage("--team takes the --email-* flags, not --file or --
|
|
334
|
+
if (f.file !== void 0 || f["activity-level"] !== void 0 || searchPacingFlags(f)) usage("--team takes the --email-* flags, not --file, --activity-level or --search-pages-*.");
|
|
283
335
|
if (Object.keys(email).length === 0) usage("pass at least one --email-* flag with --team.");
|
|
284
336
|
const body = { email };
|
|
285
337
|
if (f.preview) {
|
|
@@ -331,7 +383,7 @@ var eventsCmd = defineCommand3({
|
|
|
331
383
|
var updateCmd = defineCommand3({
|
|
332
384
|
meta: {
|
|
333
385
|
name: "update",
|
|
334
|
-
description: 'With --team, change the Team\'s email defaults instead, with the --email-* flags: the daily cap a new Mailbox gets (--email-default-cap, at most 50), what an opt-out covers (--email-opt-out-scope everything|email_only) and the three opt-out texts every email step carries (--email-opt-out-text up to 200 characters, --email-opt-out-link-text up to 100, --email-opt-out-link-word up to 30; one plain line, no variables; "" restores the shipped default). Prints the Team policy. Otherwise change one Account\'s safety policy from a JSON document: `rows`, for example {"rows":[{"budget_row":"profile_views","ceiling":40}]}, `active_hours`, for example {"active_hours":{"days":["mon","tue"],"start":"09:00","end":"17:00"}}, `auto_withdraw` (true or false: Curviate withdraws its own invitations older than 14 days once more than 400 are pending) and `activity_level`. --activity-level normal|increased sets the Activity level alone, or beside --file: how close the Account\'s daily targets sit to its limits. normal (the default) aims about midway between the green figure and the limit; increased works close to the limit, never past it, and raises the chance LinkedIn notices the activity. It runs as normal, and the setting stays, while warm-up is on or the Account\'s health is not healthy; the printed policy\'s activity_level_effective and activity_level_reason say which level is in force. Active hours hold Campaigns and other live writes, never a direct message (send, new chat, edit, delete, reaction, read mark). A row\'s `green` is its target, what Campaigns aim at; the ceiling is the most it may do. Fields you leave out stay as they are; null clears an override. Prints the policy.',
|
|
386
|
+
description: 'With --team, change the Team\'s email defaults instead, with the --email-* flags: the daily cap a new Mailbox gets (--email-default-cap, at most 50), what an opt-out covers (--email-opt-out-scope everything|email_only) and the three opt-out texts every email step carries (--email-opt-out-text up to 200 characters, --email-opt-out-link-text up to 100, --email-opt-out-link-word up to 30; one plain line, no variables; "" restores the shipped default). Prints the Team policy. Otherwise change one Account\'s safety policy from a JSON document: `rows`, for example {"rows":[{"budget_row":"profile_views","ceiling":40}]}, `active_hours`, for example {"active_hours":{"days":["mon","tue"],"start":"09:00","end":"17:00"}}, `auto_withdraw` (true or false: Curviate withdraws its own invitations older than 14 days once more than 400 are pending) and `activity_level`. --activity-level normal|increased sets the Activity level alone, or beside --file: how close the Account\'s daily targets sit to its limits. normal (the default) aims about midway between the green figure and the limit; increased works close to the limit, never past it, and raises the chance LinkedIn notices the activity. It runs as normal, and the setting stays, while warm-up is on or the Account\'s health is not healthy; the printed policy\'s activity_level_effective and activity_level_reason say which level is in force. Active hours hold Campaigns and other live writes, never a direct message (send, new chat, edit, delete, reaction, read mark). A row\'s `green` is its target, what Campaigns aim at; the ceiling is the most it may do. Fields you leave out stay as they are; null clears an override. --search-pages-per-day, --search-pages-per-hour and --search-pages-per-month set the Account\'s own search budgets (search_pacing), alone or beside --file: a whole number from 1 to the maximum `curviate account safety get` shows (pages an hour up to the daily maximum; a month on classic search only), or default. Above the maximum the API refuses it (exit 2) and names the maximum; nothing is lowered for you. The random pause between search pages is not a setting. Prints the policy.',
|
|
335
387
|
risk: "write",
|
|
336
388
|
rules: {
|
|
337
389
|
changes: "The Account's limits, Active hours or Activity level, from the next action on.",
|
|
@@ -345,15 +397,16 @@ var updateCmd = defineCommand3({
|
|
|
345
397
|
seeAlso: ["curviate account safety get", "curviate account warm-up"],
|
|
346
398
|
examples: [
|
|
347
399
|
"curviate account safety update acc_YOUR_ACCOUNT_ID --file policy.json",
|
|
348
|
-
"curviate account safety update acc_YOUR_ACCOUNT_ID --
|
|
400
|
+
"curviate account safety update acc_YOUR_ACCOUNT_ID --search-pages-per-hour 12",
|
|
349
401
|
"curviate account safety update --team --email-default-cap 40 --email-opt-out-link-word Abmelden"
|
|
350
402
|
],
|
|
351
|
-
requires: ["an Account id with --file or --
|
|
403
|
+
requires: ["an Account id with --file, --activity-level or a --search-pages-* flag, or several (a flag wins over the document's own key); or --team with at least one --email-* flag."]
|
|
352
404
|
},
|
|
353
405
|
args: {
|
|
354
406
|
...WRITE_SINGLE_FLAGS,
|
|
355
407
|
team: TEAM,
|
|
356
408
|
...EMAIL_FLAGS,
|
|
409
|
+
...SEARCH_FLAGS,
|
|
357
410
|
accountId: ACCOUNT,
|
|
358
411
|
file: { type: "string", description: "The JSON document: a path, or - to read it from stdin." },
|
|
359
412
|
"activity-level": { type: "string", description: "normal (default) or increased: how close the Account's daily targets sit to its limits. increased raises the chance LinkedIn notices the activity; it runs as normal while warm-up is on or health is not healthy." }
|
|
@@ -370,26 +423,31 @@ var updateCmd = defineCommand3({
|
|
|
370
423
|
`);
|
|
371
424
|
process.exit(2);
|
|
372
425
|
}
|
|
373
|
-
|
|
374
|
-
|
|
426
|
+
const search = searchPacingFlags(f);
|
|
427
|
+
if (f.file === void 0 && level === void 0 && search === void 0) {
|
|
428
|
+
process.stderr.write("error: pass --file <policy.json>, --activity-level normal|increased or a --search-pages-* flag.\n");
|
|
375
429
|
process.exit(2);
|
|
376
430
|
}
|
|
377
431
|
const doc = f.file === void 0 ? {} : parseDocument("file", await readFileFlag("file", f.file, { others: f }));
|
|
378
|
-
const body = level === void 0 ? doc : { ...doc, activity_level: level };
|
|
432
|
+
const body = level === void 0 ? { ...doc } : { ...doc, activity_level: level };
|
|
433
|
+
if (search) {
|
|
434
|
+
const own = doc["search_pacing"];
|
|
435
|
+
body["search_pacing"] = { ...own && typeof own === "object" && !Array.isArray(own) ? own : {}, ...search };
|
|
436
|
+
}
|
|
379
437
|
if (f.preview) {
|
|
380
438
|
process.stdout.write(JSON.stringify(buildPreviewOutput({ method: "accounts.updateSafetyPolicy", args: { accountId }, body })) + "\n");
|
|
381
439
|
return;
|
|
382
440
|
}
|
|
383
441
|
const c = await rootClient(f);
|
|
384
442
|
try {
|
|
385
|
-
|
|
443
|
+
printPolicy(await c.accounts.updateSafetyPolicy(accountId, body), f);
|
|
386
444
|
} catch (err) {
|
|
387
445
|
await fail(err, f);
|
|
388
446
|
}
|
|
389
447
|
}
|
|
390
448
|
});
|
|
391
449
|
var accountSafetyCommand = defineCommand3({
|
|
392
|
-
meta: { name: "safety", description: "Read or change one Account's safety policy (limits per budget row, Active hours, the Activity level), read its limit hits (events), or with --team your Team's email defaults." },
|
|
450
|
+
meta: { name: "safety", description: "Read or change one Account's safety policy (limits per budget row, Active hours, the Activity level, search pages), read its limit hits (events), or with --team your Team's email defaults." },
|
|
393
451
|
subCommands: { get: getCmd, update: updateCmd, events: eventsCmd },
|
|
394
452
|
async run() {
|
|
395
453
|
process.stderr.write("Usage: curviate account safety get|update <account> | --team\n");
|
|
@@ -6,15 +6,15 @@ import {
|
|
|
6
6
|
grammarParams,
|
|
7
7
|
renderOverview,
|
|
8
8
|
windowParams
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-YE2WKE3R.js";
|
|
10
10
|
import "./chunk-PPGKQJKU.js";
|
|
11
11
|
import "./chunk-5S3MJVI5.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-PITCPTWX.js";
|
|
13
13
|
import "./chunk-NNV2OYEF.js";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-FUPVALUL.js";
|
|
15
|
+
import "./chunk-66HEPUAX.js";
|
|
16
|
+
import "./chunk-QFG3DRHY.js";
|
|
17
|
+
import "./chunk-65UYYCWD.js";
|
|
18
18
|
import "./chunk-Z647LR4F.js";
|
|
19
19
|
import "./chunk-ZYURL5VK.js";
|
|
20
20
|
export {
|
|
@@ -4,19 +4,19 @@ import {
|
|
|
4
4
|
outputOpts,
|
|
5
5
|
rootClient,
|
|
6
6
|
usage
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-PITCPTWX.js";
|
|
8
8
|
import {
|
|
9
9
|
buildPreviewOutput
|
|
10
10
|
} from "./chunk-TCUYH5GO.js";
|
|
11
11
|
import {
|
|
12
12
|
renderSuccess
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-66HEPUAX.js";
|
|
14
|
+
import "./chunk-QFG3DRHY.js";
|
|
15
15
|
import {
|
|
16
16
|
READ_SINGLE_FLAGS,
|
|
17
17
|
WRITE_SINGLE_FLAGS,
|
|
18
18
|
readOnly
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-65UYYCWD.js";
|
|
20
20
|
import {
|
|
21
21
|
DESCRIPTIONS
|
|
22
22
|
} from "./chunk-Z647LR4F.js";
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
import {
|
|
3
3
|
billingCommand,
|
|
4
4
|
confirmMoney
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-YW6CYOX6.js";
|
|
6
6
|
import "./chunk-GOICALYQ.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-PITCPTWX.js";
|
|
8
8
|
import "./chunk-TCUYH5GO.js";
|
|
9
9
|
import "./chunk-NNV2OYEF.js";
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-FUPVALUL.js";
|
|
11
|
+
import "./chunk-66HEPUAX.js";
|
|
12
|
+
import "./chunk-QFG3DRHY.js";
|
|
13
|
+
import "./chunk-65UYYCWD.js";
|
|
14
14
|
import "./chunk-Z647LR4F.js";
|
|
15
15
|
import "./chunk-ZYURL5VK.js";
|
|
16
16
|
export {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
requireAccount
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WISP4QXZ.js";
|
|
5
5
|
import {
|
|
6
6
|
writeAtomic
|
|
7
7
|
} from "./chunk-GOICALYQ.js";
|
|
8
8
|
import {
|
|
9
9
|
sendInChunks
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-33GDPBLY.js";
|
|
11
11
|
import {
|
|
12
12
|
fail,
|
|
13
13
|
listFlag,
|
|
14
14
|
outputOpts,
|
|
15
15
|
rootClient,
|
|
16
16
|
usage
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-PITCPTWX.js";
|
|
18
18
|
import {
|
|
19
19
|
buildPreviewOutput
|
|
20
20
|
} from "./chunk-TCUYH5GO.js";
|
|
@@ -29,20 +29,20 @@ import {
|
|
|
29
29
|
readablePage,
|
|
30
30
|
rejectPaginationModifiersWithoutAll,
|
|
31
31
|
streamAll
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-FUPVALUL.js";
|
|
33
33
|
import {
|
|
34
34
|
renderSuccess,
|
|
35
35
|
writeNdjsonItem
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-66HEPUAX.js";
|
|
37
37
|
import {
|
|
38
38
|
downloadBinary
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-QFG3DRHY.js";
|
|
40
40
|
import {
|
|
41
41
|
GLOBAL_FLAGS,
|
|
42
42
|
READ_SINGLE_FLAGS,
|
|
43
43
|
WRITE_SINGLE_FLAGS,
|
|
44
44
|
readOnly
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-65UYYCWD.js";
|
|
46
46
|
import {
|
|
47
47
|
DESCRIPTIONS,
|
|
48
48
|
lazy
|
|
@@ -503,12 +503,12 @@ var contactCommand = defineCommand({
|
|
|
503
503
|
create: createCmd,
|
|
504
504
|
update: updateCmd,
|
|
505
505
|
delete: deleteCmd,
|
|
506
|
-
import: lazy("contactImport", () => import("./contact-import-
|
|
506
|
+
import: lazy("contactImport", () => import("./contact-import-X5EUG77K.js").then((m) => m.contactImportCommand)),
|
|
507
507
|
export: exportCmd,
|
|
508
508
|
enrich: enrichCmd,
|
|
509
|
-
lists: lazy("contactLists", () => import("./contact-groups-
|
|
510
|
-
tags: lazy("contactTags", () => import("./contact-groups-
|
|
511
|
-
imports: lazy("contactImports", () => import("./contact-import-
|
|
509
|
+
lists: lazy("contactLists", () => import("./contact-groups-OILNTYGH.js").then((m) => m.contactListsCommand)),
|
|
510
|
+
tags: lazy("contactTags", () => import("./contact-groups-OILNTYGH.js").then((m) => m.contactTagsCommand)),
|
|
511
|
+
imports: lazy("contactImports", () => import("./contact-import-X5EUG77K.js").then((m) => m.contactImportsCommand))
|
|
512
512
|
},
|
|
513
513
|
async run() {
|
|
514
514
|
const { showHelp } = await import("./examples-G4IC5TJU.js");
|
|
@@ -21,29 +21,29 @@ import {
|
|
|
21
21
|
} from "./chunk-JY26SUNH.js";
|
|
22
22
|
import {
|
|
23
23
|
requireAccount
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-WISP4QXZ.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-
|
|
31
|
+
} from "./chunk-FUPVALUL.js";
|
|
32
32
|
import {
|
|
33
33
|
renderError,
|
|
34
34
|
renderSuccess,
|
|
35
35
|
renderUnexpectedError
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-66HEPUAX.js";
|
|
37
37
|
import {
|
|
38
38
|
createClient,
|
|
39
39
|
downloadBinary,
|
|
40
40
|
resolveEffectiveConfig
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-QFG3DRHY.js";
|
|
42
42
|
import {
|
|
43
43
|
READ_SINGLE_FLAGS,
|
|
44
44
|
WRITE_FLAGS,
|
|
45
45
|
readOnly
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-65UYYCWD.js";
|
|
47
47
|
import {
|
|
48
48
|
DESCRIPTIONS
|
|
49
49
|
} from "./chunk-Z647LR4F.js";
|
|
@@ -77,6 +77,11 @@ var GLOBAL_FLAGS = {
|
|
|
77
77
|
description: "Allow beta operations for THIS call only (--beta, --beta=false). A gated operation refuses BETA_NOT_ENABLED (exit 5) until beta is enabled for the Team (`curviate beta update --enabled true`, an Owner; `PATCH /v1/tenant/beta`), or you pass --beta for this call. Persists nothing."
|
|
78
78
|
}
|
|
79
79
|
};
|
|
80
|
+
var SEARCH_PAGE_NOTE = "Search is paced per Account: one LinkedIn page per call, a random pause between pages, pages an hour, a day and (classic) a LinkedIn month. A refusal exits 13 and names its budget and the seconds to wait; `curviate account safety get <account_id>` shows the pages used and each limit.";
|
|
81
|
+
var SEARCH_PAGE_LIMIT = {
|
|
82
|
+
type: "string",
|
|
83
|
+
description: "Results per call, at most one LinkedIn page (10 on classic search, 25 on jobs, Sales Navigator and Recruiter); above it you get one page and a cursor. Ask for a full page and follow the cursor (--cursor or --all): a smaller limit still costs a whole page of the Account's search budget."
|
|
84
|
+
};
|
|
80
85
|
var NON_STREAM_FLAGS = {
|
|
81
86
|
"api-key": GLOBAL_FLAGS["api-key"],
|
|
82
87
|
profile: GLOBAL_FLAGS.profile,
|
|
@@ -213,6 +218,8 @@ export {
|
|
|
213
218
|
setBetaOverride,
|
|
214
219
|
betaOverrideHeader,
|
|
215
220
|
GLOBAL_FLAGS,
|
|
221
|
+
SEARCH_PAGE_NOTE,
|
|
222
|
+
SEARCH_PAGE_LIMIT,
|
|
216
223
|
NON_STREAM_FLAGS,
|
|
217
224
|
WRITE_FLAGS,
|
|
218
225
|
READ_SINGLE_FLAGS,
|
|
@@ -173,6 +173,26 @@ ${kv}` : notices;
|
|
|
173
173
|
}
|
|
174
174
|
return String(data);
|
|
175
175
|
}
|
|
176
|
+
function searchBudgetWords(budget) {
|
|
177
|
+
switch (budget) {
|
|
178
|
+
case "gap":
|
|
179
|
+
return "the random pause between two search pages of this Account (not a setting)";
|
|
180
|
+
case "hour":
|
|
181
|
+
return "search pages in the last hour";
|
|
182
|
+
case "day":
|
|
183
|
+
return "search pages in the last 24 hours";
|
|
184
|
+
case "lines":
|
|
185
|
+
return "search results in the last 24 hours (they follow search pages a day)";
|
|
186
|
+
case "month":
|
|
187
|
+
return "search pages this LinkedIn month (it starts again on the 1st at 00:00 Pacific time)";
|
|
188
|
+
case "active_hours":
|
|
189
|
+
return "outside the Account's Active hours";
|
|
190
|
+
case "commercial_use":
|
|
191
|
+
return "LinkedIn showed this Account its monthly search limit; classic search waits for LinkedIn's next month (not a setting)";
|
|
192
|
+
default:
|
|
193
|
+
return budget;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
176
196
|
function renderError(err, opts, out) {
|
|
177
197
|
const json = isJsonMode(opts);
|
|
178
198
|
const errJson = err.toJSON();
|
|
@@ -188,19 +208,27 @@ function renderError(err, opts, out) {
|
|
|
188
208
|
if (safety.budgetRow) {
|
|
189
209
|
if (errJson.code === "BUDGET_EXHAUSTED") {
|
|
190
210
|
const why = safety.safetyReason === "activity_window" ? "outside its activity window" : "at its ceiling";
|
|
191
|
-
|
|
211
|
+
const search = safety.searchBudget !== void 0 ? searchBudgetWords(safety.searchBudget) : void 0;
|
|
212
|
+
msg += search ? `
|
|
213
|
+
Search budget: ${search}` : `
|
|
192
214
|
Safety budget: ${safety.budgetRow} is ${why}`;
|
|
215
|
+
if (search && safety.retryAfterSeconds !== void 0) {
|
|
216
|
+
msg += `
|
|
217
|
+
Retry in ${safety.retryAfterSeconds} s${safety.resetAt ? ` (${safety.resetAt})` : ""}`;
|
|
218
|
+
}
|
|
193
219
|
if (safety.resetAt === null) {
|
|
194
220
|
const frees = safety.budgetRow === "inmail" ? "when LinkedIn regrants credits" : safety.budgetRow === "pending_invites" ? "when the backlog clears" : "on its own";
|
|
195
221
|
msg += `
|
|
196
222
|
No reset instant: this frees ${frees}, not on a schedule`;
|
|
197
|
-
} else if (safety.resetAt) {
|
|
223
|
+
} else if (safety.resetAt && !(search && safety.retryAfterSeconds !== void 0)) {
|
|
198
224
|
msg += `
|
|
199
225
|
Resets at: ${safety.resetAt}`;
|
|
200
226
|
}
|
|
201
|
-
if (safety.safetyHint?.parameter) {
|
|
227
|
+
if (safety.safetyHint?.parameter && safety.safetyHint.parameter !== "none") {
|
|
228
|
+
const flag = /^search_pacing\.pages_per_(day|hour|month)$/.exec(safety.safetyHint.parameter)?.[1];
|
|
202
229
|
msg += `
|
|
203
230
|
Change: ${safety.safetyHint.parameter}`;
|
|
231
|
+
if (flag) msg += ` (curviate account safety update <account> --search-pages-per-${flag} N; \`curviate account safety get <account>\` shows the maximum)`;
|
|
204
232
|
}
|
|
205
233
|
if (safety.safetyHint?.message) {
|
|
206
234
|
msg += `
|
|
@@ -208,8 +236,9 @@ ${safety.safetyHint.message}`;
|
|
|
208
236
|
}
|
|
209
237
|
} else {
|
|
210
238
|
const wait = safety.retryAfterSeconds ? ` for ${safety.retryAfterSeconds}s` : "";
|
|
239
|
+
const cause = errJson.code === "PLATFORM_ERROR" ? ", after LinkedIn server errors; retry then" : "";
|
|
211
240
|
msg += `
|
|
212
|
-
Paused budget row: ${safety.budgetRow}${wait} (other rows on this account still work)`;
|
|
241
|
+
Paused budget row: ${safety.budgetRow}${wait}${cause} (other rows on this account still work)`;
|
|
213
242
|
}
|
|
214
243
|
}
|
|
215
244
|
const loc = errJson.connectionLocation;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
renderNotices,
|
|
4
4
|
renderProvenanceNote
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-66HEPUAX.js";
|
|
6
6
|
import {
|
|
7
7
|
isPlainObject
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-QFG3DRHY.js";
|
|
9
9
|
|
|
10
10
|
// src/lib/paginate.ts
|
|
11
11
|
import { CurviateError } from "@curviate/sdk";
|
|
@@ -82,6 +82,12 @@ function pageDelayFrom(raw) {
|
|
|
82
82
|
function pageDelayFromFlags(flags) {
|
|
83
83
|
return pageDelayFrom(flags["page-delay"]);
|
|
84
84
|
}
|
|
85
|
+
var MAX_GAP_WAITS = 3;
|
|
86
|
+
function searchGapSeconds(err) {
|
|
87
|
+
if (!(err instanceof CurviateError) || err.code !== "BUDGET_EXHAUSTED" || err.searchBudget !== "gap") return void 0;
|
|
88
|
+
const s = err.retryAfterSeconds;
|
|
89
|
+
return s !== void 0 && s >= 0 && s <= 90 ? Math.max(1, Math.ceil(s)) : void 0;
|
|
90
|
+
}
|
|
85
91
|
var realSleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
86
92
|
function truncationSentinelLine(pagesFetched, hasMore) {
|
|
87
93
|
return JSON.stringify({ object: "stream_truncated", pages_fetched: pagesFetched, has_more: hasMore }) + "\n";
|
|
@@ -95,7 +101,23 @@ async function* streamAll(fn, params, opts = {}) {
|
|
|
95
101
|
let firstPage = true;
|
|
96
102
|
while (true) {
|
|
97
103
|
const pageParams = cursor !== void 0 && cursor !== null ? { ...params, cursor } : params;
|
|
98
|
-
|
|
104
|
+
let page;
|
|
105
|
+
for (let waits = 0; ; waits++) {
|
|
106
|
+
try {
|
|
107
|
+
page = readablePage(await fn(pageParams));
|
|
108
|
+
break;
|
|
109
|
+
} catch (err) {
|
|
110
|
+
const wait = searchGapSeconds(err);
|
|
111
|
+
if (wait === void 0 || waits >= MAX_GAP_WAITS) {
|
|
112
|
+
if (opts.out && cursor) opts.out.stderr.write(`Stopped after ${pageCount} page(s). Resume later with --cursor ${cursor}
|
|
113
|
+
`);
|
|
114
|
+
throw err;
|
|
115
|
+
}
|
|
116
|
+
if (opts.out) opts.out.stderr.write(`Search pause: the next page in ${wait} s.
|
|
117
|
+
`);
|
|
118
|
+
await sleep(wait * 1e3);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
99
121
|
pageCount++;
|
|
100
122
|
const items = page.items;
|
|
101
123
|
if (firstPage) {
|