@curviate/cli 0.63.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 +8 -0
- package/dist/{account-4T7S3HZD.js → account-55QRBRX2.js} +4 -4
- package/dist/{analytics-4Z4PKAJ3.js → analytics-DOGKBULH.js} +4 -4
- package/dist/{beta-consent-HYJPCSJ4.js → beta-consent-3EPBXPPQ.js} +2 -2
- package/dist/{billing-V65MIXTE.js → billing-2A7EZWZX.js} +4 -4
- package/dist/{chunk-4G46D4PW.js → chunk-2JL554FW.js} +9 -9
- package/dist/{chunk-5GNACRVM.js → chunk-33GDPBLY.js} +1 -1
- package/dist/{chunk-VMYY6QVQ.js → chunk-3M52GHII.js} +3 -3
- package/dist/{chunk-LJ4KKQX3.js → chunk-AFP5F3I6.js} +1 -1
- package/dist/{chunk-I6KOMJVE.js → chunk-FUPVALUL.js} +1 -1
- package/dist/{chunk-EO42KWBI.js → chunk-KSRNDK2N.js} +109 -27
- package/dist/{chunk-TU4IAQU7.js → chunk-PITCPTWX.js} +1 -1
- package/dist/{chunk-D6IQCQMP.js → chunk-QFG3DRHY.js} +1 -1
- package/dist/{chunk-OJI6MXDZ.js → chunk-WISP4QXZ.js} +1 -1
- package/dist/{chunk-REUJDFUI.js → chunk-YE2WKE3R.js} +3 -3
- package/dist/{chunk-A36LF5KC.js → chunk-YW6CYOX6.js} +3 -3
- package/dist/cli.js +25 -25
- package/dist/{comment-HWQ2QKMC.js → comment-CERAB2Z5.js} +4 -4
- package/dist/{company-7IQVEW5C.js → company-WC6SGDTE.js} +4 -4
- package/dist/{company-record-VKRYZT36.js → company-record-GVOCKW7U.js} +7 -7
- package/dist/{config-H42PGDKK.js → config-RC377EZ7.js} +1 -1
- package/dist/{connect-WKZBF3HH.js → connect-V63CQIO7.js} +3 -3
- package/dist/{contact-YNPRX24V.js → contact-4OH5AVMI.js} +6 -6
- package/dist/{contact-groups-3IKE27LP.js → contact-groups-OILNTYGH.js} +6 -6
- package/dist/{contact-import-CNUUBV2G.js → contact-import-X5EUG77K.js} +15 -9
- package/dist/{core-WYX2KPXO.js → core-FM222KR6.js} +16 -16
- package/dist/{do-not-contact-SK3X2GUZ.js → do-not-contact-SA6IXJIE.js} +7 -7
- package/dist/{doctor-JXZ6IA7V.js → doctor-6XQRPRBT.js} +2 -2
- package/dist/{domain-3O3RRDDE.js → domain-N7BBT5WI.js} +3 -3
- package/dist/{draft-N25LUN3O.js → draft-6KPWHEPU.js} +2 -2
- package/dist/{enrollment-XVOTQJCW.js → enrollment-PCE6OGCV.js} +3 -3
- package/dist/{export-WZURNCW4.js → export-WC64TMKR.js} +2 -2
- package/dist/{feed-TQNYEIKA.js → feed-WC2UCUSC.js} +3 -3
- package/dist/{group-YH74XB2A.js → group-FSZU62CS.js} +3 -3
- package/dist/{inbox-ONG2WAQF.js → inbox-O422BPE5.js} +3 -3
- package/dist/{inboxes-2UUPV7YG.js → inboxes-NBLCSHHK.js} +3 -3
- package/dist/{incoming-36FVTDLR.js → incoming-S5Q7YJM3.js} +3 -3
- package/dist/{job-ZUXQNQWE.js → job-CJUFB5DB.js} +3 -3
- package/dist/{login-2XMBLHXZ.js → login-5A4KOIBU.js} +1 -1
- package/dist/{mailbox-3SAHMUXD.js → mailbox-OZI2NREM.js} +4 -4
- package/dist/{message-6RXPM34Y.js → message-WAHQQHTF.js} +4 -4
- package/dist/{motion-H3VRJTMG.js → motion-SZSJ4WZI.js} +4 -4
- package/dist/{network-TJNJ2KOZ.js → network-3CQGZMQF.js} +3 -3
- package/dist/{notification-3RCR3752.js → notification-OUZ44XYA.js} +3 -3
- package/dist/{notifications-JLCI2HNY.js → notifications-BNLH3ESH.js} +3 -3
- package/dist/{post-LFIOTRVB.js → post-2IABIGUC.js} +4 -4
- package/dist/{profile-4AND35NT.js → profile-FTNWMCKB.js} +4 -4
- package/dist/{recruiter-WCD6QX6I.js → recruiter-OZSLGPYO.js} +3 -3
- package/dist/{sales-nav-GNRI37BT.js → sales-nav-RZF65ZRA.js} +3 -3
- package/dist/{search-EO42F7WY.js → search-YTZQ4XUN.js} +3 -3
- package/dist/{setup-MXG4WJ3O.js → setup-67FMKDKO.js} +2 -2
- package/dist/{signal-VWJ2AEIA.js → signal-XCCCE434.js} +3 -3
- package/dist/{team-JAW7XI3C.js → team-EC5CFT7D.js} +3 -3
- package/dist/{tier-DHUKMNWG.js → tier-M6LZVGH3.js} +3 -3
- package/dist/{unibox-JV2VN6TC.js → unibox-U3RPEUJI.js} +3 -3
- package/dist/{webhook-R4SR6TYR.js → webhook-EAXWPNQZ.js} +3 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,14 @@ 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
|
+
|
|
9
17
|
## [0.63.0] - 2026-11-20
|
|
10
18
|
|
|
11
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.
|
|
@@ -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,
|
|
@@ -57,7 +57,7 @@ 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,
|
|
@@ -6,14 +6,14 @@ 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-
|
|
14
|
+
import "./chunk-FUPVALUL.js";
|
|
15
15
|
import "./chunk-66HEPUAX.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-QFG3DRHY.js";
|
|
17
17
|
import "./chunk-65UYYCWD.js";
|
|
18
18
|
import "./chunk-Z647LR4F.js";
|
|
19
19
|
import "./chunk-ZYURL5VK.js";
|
|
@@ -4,14 +4,14 @@ 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
13
|
} from "./chunk-66HEPUAX.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-QFG3DRHY.js";
|
|
15
15
|
import {
|
|
16
16
|
READ_SINGLE_FLAGS,
|
|
17
17
|
WRITE_SINGLE_FLAGS,
|
|
@@ -2,14 +2,14 @@
|
|
|
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-
|
|
10
|
+
import "./chunk-FUPVALUL.js";
|
|
11
11
|
import "./chunk-66HEPUAX.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-QFG3DRHY.js";
|
|
13
13
|
import "./chunk-65UYYCWD.js";
|
|
14
14
|
import "./chunk-Z647LR4F.js";
|
|
15
15
|
import "./chunk-ZYURL5VK.js";
|
|
@@ -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,14 +29,14 @@ 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
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,
|
|
@@ -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,14 +21,14 @@ 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,
|
|
@@ -38,7 +38,7 @@ 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,
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
import {
|
|
3
3
|
online,
|
|
4
4
|
preview
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-2JL554FW.js";
|
|
6
6
|
import {
|
|
7
7
|
sendChunked
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-33GDPBLY.js";
|
|
9
9
|
import {
|
|
10
10
|
fail,
|
|
11
11
|
listFlag,
|
|
12
12
|
outputOpts,
|
|
13
13
|
usage
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-PITCPTWX.js";
|
|
15
15
|
import {
|
|
16
16
|
intFlag
|
|
17
17
|
} from "./chunk-NNV2OYEF.js";
|
|
@@ -23,14 +23,15 @@ import {
|
|
|
23
23
|
readablePage,
|
|
24
24
|
rejectPaginationModifiersWithoutAll,
|
|
25
25
|
streamAll
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-FUPVALUL.js";
|
|
27
27
|
import {
|
|
28
|
+
isJsonMode,
|
|
28
29
|
renderSuccess,
|
|
29
30
|
writeNdjsonItem
|
|
30
31
|
} from "./chunk-66HEPUAX.js";
|
|
31
32
|
import {
|
|
32
33
|
withWireNotes
|
|
33
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-QFG3DRHY.js";
|
|
34
35
|
import {
|
|
35
36
|
GLOBAL_FLAGS,
|
|
36
37
|
WRITE_SINGLE_FLAGS,
|
|
@@ -246,7 +247,7 @@ async function runSourceImport(c, f) {
|
|
|
246
247
|
if (f.preview) return preview("leads.imports.create", {}, body);
|
|
247
248
|
try {
|
|
248
249
|
const imp = await c.leads.imports.create(body);
|
|
249
|
-
renderSuccess(readableObject(imp),
|
|
250
|
+
renderSuccess(readableObject(imp), importOpts(f, importHuman), process);
|
|
250
251
|
if (!outputOpts(f).json) process.stderr.write(`Follow it with \`curviate lead imports get ${String(imp["id"])}\`; pause, resume or stop it with \`curviate lead imports pause|resume|stop\`.
|
|
251
252
|
`);
|
|
252
253
|
} catch (err) {
|
|
@@ -398,7 +399,7 @@ var importCmd = defineCommand({
|
|
|
398
399
|
});
|
|
399
400
|
var ID = { type: "positional", description: "Import id (imp_...)." };
|
|
400
401
|
var importsList = defineCommand({
|
|
401
|
-
meta: { name: "list", description: "List your Team's imports, newest first: status, counts and failure.", risk: "read", examples: ["curviate lead imports list"] },
|
|
402
|
+
meta: { name: "list", description: "List your Team's imports, newest first: status, counts and failure; an import from a LinkedIn source also its `progress` line without --json (the wait, when its next page is read, how long is left), and `next_page_at`, `waiting`, `estimate` as `lead imports get` describes.", risk: "read", examples: ["curviate lead imports list"] },
|
|
402
403
|
args: { ...readOnly(GLOBAL_FLAGS) },
|
|
403
404
|
run: online(async (c, f) => {
|
|
404
405
|
rejectPaginationModifiersWithoutAll(f, process);
|
|
@@ -411,34 +412,112 @@ var importsList = defineCommand({
|
|
|
411
412
|
const next = (p) => c.leads.imports.list(p);
|
|
412
413
|
for await (const item of streamAll(next, params, { maxPages: readMaxPagesFlag(f, process), out: process, pageDelayMs: pageDelayFromFlags(f) })) writeNdjsonItem(process, item, f.fields);
|
|
413
414
|
} else {
|
|
414
|
-
renderSuccess(readablePage(await c.leads.imports.list(params)),
|
|
415
|
+
renderSuccess(readablePage(await c.leads.imports.list(params)), importOpts(f, importsHuman), process);
|
|
415
416
|
}
|
|
416
417
|
} catch (err) {
|
|
417
418
|
await fail(err, f);
|
|
418
419
|
}
|
|
419
420
|
})
|
|
420
421
|
});
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
422
|
+
var UNITS = [["minute", 60, 90 * 60], ["hour", 3600, 36 * 3600], ["day", 86400, Infinity]];
|
|
423
|
+
var unitOf = (s) => UNITS.find(([, , below]) => s < below);
|
|
424
|
+
var plural = (n, unit) => `${n.toLocaleString("en-GB")} ${unit}${n === 1 ? "" : "s"}`;
|
|
425
|
+
var amount = (s, size) => Math.max(1, Math.round(s / size));
|
|
426
|
+
var HM = new Intl.DateTimeFormat("en-GB", { hour: "2-digit", minute: "2-digit" });
|
|
427
|
+
var WD = new Intl.DateTimeFormat("en-GB", { weekday: "short", day: "numeric", month: "short" });
|
|
428
|
+
var dayKey = (t) => new Date(t).toDateString();
|
|
429
|
+
function durationText(seconds) {
|
|
430
|
+
const [unit, size] = unitOf(seconds);
|
|
431
|
+
return plural(amount(seconds, size), unit);
|
|
432
|
+
}
|
|
433
|
+
function estimateText(min, max) {
|
|
434
|
+
if (max < 60) return "Less than a minute";
|
|
435
|
+
const [ua, sa] = unitOf(min), [ub, sb] = unitOf(max);
|
|
436
|
+
const a = amount(min, sa), b = amount(max, sb);
|
|
437
|
+
if (ua !== ub) return `About ${plural(a, ua)} to ${plural(b, ub)}`;
|
|
438
|
+
return a === b ? `About ${plural(a, ua)}` : `About ${a.toLocaleString("en-GB")} to ${plural(b, ub)}`;
|
|
439
|
+
}
|
|
440
|
+
function whenText(iso, now) {
|
|
441
|
+
const at = Date.parse(iso);
|
|
442
|
+
if (Number.isNaN(at)) return iso;
|
|
443
|
+
const ms = at - now;
|
|
444
|
+
if (ms < 6e4) return "in under a minute";
|
|
445
|
+
if (ms < 90 * 6e4) return `in ${durationText(ms / 1e3)}`;
|
|
446
|
+
if (dayKey(at) === dayKey(now)) return `at ${HM.format(at)}`;
|
|
447
|
+
if (dayKey(at) === dayKey(now + 864e5)) return `tomorrow at ${HM.format(at)}`;
|
|
448
|
+
return `on ${WD.format(at)} at ${HM.format(at)}`;
|
|
449
|
+
}
|
|
450
|
+
var LIMIT = { hour: "Hourly search limit reached", month: "Monthly search limit reached" };
|
|
451
|
+
function importStatusLine(imp, now = Date.now()) {
|
|
452
|
+
const im = imp ?? {};
|
|
453
|
+
if (im.format !== "source") return null;
|
|
454
|
+
const w = im.waiting && typeof im.waiting === "object" ? im.waiting : null;
|
|
455
|
+
const iso = (v) => typeof v === "string" ? v : null;
|
|
456
|
+
const nextAt = iso(im.next_page_at), until = iso(w?.until);
|
|
457
|
+
const next = nextAt ? `Next page ${whenText(nextAt, now)}` : null;
|
|
458
|
+
const e = im.estimate;
|
|
459
|
+
const left = e && typeof e.seconds_min === "number" && typeof e.seconds_max === "number" && e.seconds_max > 0 ? `${estimateText(e.seconds_min, e.seconds_max)} left` : null;
|
|
460
|
+
const join = (...parts) => parts.filter(Boolean).join(". ");
|
|
461
|
+
const started = iso(im.started_at), finished = iso(im.finished_at);
|
|
462
|
+
const took = started && finished ? ` in ${durationText(Math.max(1, (Date.parse(finished) - Date.parse(started)) / 1e3))}` : "";
|
|
463
|
+
switch (im.status) {
|
|
464
|
+
case "queued":
|
|
465
|
+
if (w?.kind === "import_ahead") return join(`Starts after the import ahead of it${typeof w.import_id === "string" ? ` (${w.import_id})` : ""}`, nextAt ? `First page ${whenText(nextAt, now)}` : null, left);
|
|
466
|
+
return join("Starts in a moment", left);
|
|
467
|
+
case "running":
|
|
468
|
+
if (!w) return join(next, left) || "Reading";
|
|
469
|
+
switch (w.kind) {
|
|
470
|
+
case "account_unavailable":
|
|
471
|
+
return "Resumes once the Account is reconnected";
|
|
472
|
+
case "active_hours":
|
|
473
|
+
return join("Outside the Account's Active hours", next, left);
|
|
474
|
+
case "budget":
|
|
475
|
+
return join(LIMIT[String(w.budget)] ?? "Daily search limit reached", next, left);
|
|
476
|
+
case "pushback":
|
|
477
|
+
return join("Paused: LinkedIn slowed this search down", next, left);
|
|
478
|
+
case "search_limited":
|
|
479
|
+
return join(`LinkedIn shows this Account only a few search results for now. Resumes when that lifts${until ? `, at the latest ${whenText(until, now)}` : ""}`, left);
|
|
480
|
+
case "halt":
|
|
481
|
+
return join("Held by a safety pause", until ? `Resumes ${whenText(until, now)}` : null, left);
|
|
482
|
+
default:
|
|
483
|
+
return join(`Waiting (${String(w.kind)})`, next ?? (until ? `Resumes ${whenText(until, now)}` : null), left);
|
|
484
|
+
}
|
|
485
|
+
case "paused":
|
|
486
|
+
return "Paused. Nothing is read until you resume it";
|
|
487
|
+
case "stopped":
|
|
488
|
+
return `Stopped. The ${typeof im.counts?.found === "number" ? im.counts.found.toLocaleString("en-GB") : "people"} found stay in the list`;
|
|
489
|
+
case "completed":
|
|
490
|
+
return im.finish_reason === "max_reached" ? `Done${took}: reached its maximum` : im.finish_reason === "no_new_leads" ? `Done${took}: three pages in a row brought nobody new` : `Done${took}: read every result`;
|
|
491
|
+
case "failed":
|
|
492
|
+
return typeof im.failure?.message === "string" ? im.failure.message : "Failed";
|
|
434
493
|
default:
|
|
435
|
-
return
|
|
494
|
+
return null;
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
function importHuman(imp) {
|
|
498
|
+
if (!imp || typeof imp !== "object" || Array.isArray(imp)) return imp;
|
|
499
|
+
const line = importStatusLine(imp);
|
|
500
|
+
const out = {};
|
|
501
|
+
for (const [k, v] of Object.entries(imp)) {
|
|
502
|
+
if (k === "estimate" && v && typeof v === "object") {
|
|
503
|
+
out[k] = Object.fromEntries(Object.entries(v).filter(([key]) => !key.startsWith("working_days_")));
|
|
504
|
+
} else out[k] = v;
|
|
505
|
+
if (k === "status" && line) out["progress"] = line;
|
|
436
506
|
}
|
|
507
|
+
return out;
|
|
437
508
|
}
|
|
509
|
+
var importsHuman = (page) => {
|
|
510
|
+
const p = page;
|
|
511
|
+
return Array.isArray(p?.items) ? { ...p, items: p.items.map(importHuman) } : page;
|
|
512
|
+
};
|
|
513
|
+
var importOpts = (f, slim) => {
|
|
514
|
+
const o = outputOpts(f);
|
|
515
|
+
return isJsonMode(o) ? o : { ...o, slim };
|
|
516
|
+
};
|
|
438
517
|
var importsGet = defineCommand({
|
|
439
518
|
meta: {
|
|
440
519
|
name: "get",
|
|
441
|
-
description:
|
|
520
|
+
description: 'One import: its status, counts, the columns it mapped or ignored, and its failure. An import from a LinkedIn source also carries `next_page_at` (when its next page is read), `waiting` (why no page is read now, with `until`: active_hours, outside the Account\'s Active hours; budget, a search limit of the Account is reached, named by `budget`: hour, day, lines or month; pushback, LinkedIn slowed this search down; search_limited, LinkedIn shows this Account only a few search results for now; halt, a safety pause; account_unavailable, the Account needs reconnecting; import_ahead, queued behind `import_id`, another import of the same Account) and `estimate` (`seconds_min`, `seconds_max`: how long it still runs; `working_days_*` are deprecated). Without --json, `progress` says it in one line, for example "Daily search limit reached. Next page tomorrow at 09:00. About 2 to 3 days left". Nothing to retry and no need to poll: it resumes by itself; look again at `next_page_at`. Only a reconnect needs you, and a search limit you may raise with `curviate account safety update`. `counts.updated`: Leads the import filled at least one field on. With --outcome, its rows instead: one per row of the file with what happened (created, updated, unchanged, skipped), the reason and the field. Import records are kept for a limited time.',
|
|
442
521
|
risk: "read",
|
|
443
522
|
examples: ["curviate lead imports get imp_YOUR_IMPORT_ID", "curviate lead imports get imp_YOUR_IMPORT_ID --outcome skipped"]
|
|
444
523
|
},
|
|
@@ -452,9 +531,9 @@ var importsGet = defineCommand({
|
|
|
452
531
|
try {
|
|
453
532
|
if (f.outcome === void 0) {
|
|
454
533
|
const imp = readableObject(await c.leads.imports.get(id));
|
|
455
|
-
renderSuccess(imp,
|
|
456
|
-
const
|
|
457
|
-
if (
|
|
534
|
+
renderSuccess(imp, importOpts(f, importHuman), process);
|
|
535
|
+
const line = importStatusLine(imp);
|
|
536
|
+
if (line && isJsonMode(outputOpts(f))) process.stderr.write(line + "\n");
|
|
458
537
|
return;
|
|
459
538
|
}
|
|
460
539
|
rejectPaginationModifiersWithoutAll(f, process);
|
|
@@ -514,7 +593,10 @@ export {
|
|
|
514
593
|
csvRecords,
|
|
515
594
|
chunkRows,
|
|
516
595
|
RETRY_AFTER_BOUND_S,
|
|
517
|
-
|
|
596
|
+
durationText,
|
|
597
|
+
estimateText,
|
|
598
|
+
whenText,
|
|
599
|
+
importStatusLine,
|
|
518
600
|
contactImportCommand,
|
|
519
601
|
contactImportsCommand
|
|
520
602
|
};
|
|
@@ -274,7 +274,7 @@ import { AsyncLocalStorage } from "async_hooks";
|
|
|
274
274
|
import { Curviate, CurviateError as CurviateError2 } from "@curviate/sdk";
|
|
275
275
|
|
|
276
276
|
// package.json
|
|
277
|
-
var version = "0.
|
|
277
|
+
var version = "0.64.0";
|
|
278
278
|
|
|
279
279
|
// src/lib/client.ts
|
|
280
280
|
function headerStrings(headers) {
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
outputOpts,
|
|
14
14
|
rootClient,
|
|
15
15
|
usage
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-PITCPTWX.js";
|
|
17
17
|
import {
|
|
18
18
|
intFlag
|
|
19
19
|
} from "./chunk-NNV2OYEF.js";
|
|
@@ -24,14 +24,14 @@ import {
|
|
|
24
24
|
readablePage,
|
|
25
25
|
rejectPaginationModifiersWithoutAll,
|
|
26
26
|
streamAll
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-FUPVALUL.js";
|
|
28
28
|
import {
|
|
29
29
|
renderSuccess,
|
|
30
30
|
writeNdjsonItem
|
|
31
31
|
} from "./chunk-66HEPUAX.js";
|
|
32
32
|
import {
|
|
33
33
|
downloadBinary
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-QFG3DRHY.js";
|
|
35
35
|
import {
|
|
36
36
|
GLOBAL_FLAGS,
|
|
37
37
|
READ_SINGLE_FLAGS,
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
outputOpts,
|
|
8
8
|
rootClient,
|
|
9
9
|
usage
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-PITCPTWX.js";
|
|
11
11
|
import {
|
|
12
12
|
buildPreviewOutput
|
|
13
13
|
} from "./chunk-TCUYH5GO.js";
|
|
@@ -21,14 +21,14 @@ import {
|
|
|
21
21
|
readablePage,
|
|
22
22
|
rejectPaginationModifiersWithoutAll,
|
|
23
23
|
streamAll
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-FUPVALUL.js";
|
|
25
25
|
import {
|
|
26
26
|
renderSuccess,
|
|
27
27
|
writeNdjsonItem
|
|
28
28
|
} from "./chunk-66HEPUAX.js";
|
|
29
29
|
import {
|
|
30
30
|
downloadBinary
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-QFG3DRHY.js";
|
|
32
32
|
import {
|
|
33
33
|
GLOBAL_FLAGS,
|
|
34
34
|
READ_SINGLE_FLAGS,
|
package/dist/cli.js
CHANGED
|
@@ -45,34 +45,34 @@ var main = defineCommand({
|
|
|
45
45
|
// Subcommand registry, names and descriptions are static for help rendering;
|
|
46
46
|
// the handler implementation is loaded lazily on first invocation.
|
|
47
47
|
subCommands: {
|
|
48
|
-
setup: lazy("setup", () => import("./setup-
|
|
49
|
-
doctor: lazy("doctor", () => import("./doctor-
|
|
50
|
-
login: lazy("login", () => import("./login-
|
|
51
|
-
config: lazy("config", () => import("./config-
|
|
52
|
-
account: lazy("account", () => import("./account-
|
|
53
|
-
campaign: lazy("campaign", () => import("./motion-
|
|
54
|
-
enrollment: lazy("enrollment", () => import("./enrollment-
|
|
55
|
-
lead: lazy("lead", () => import("./contact-
|
|
56
|
-
company: lazy("companyRecord", () => import("./company-record-
|
|
57
|
-
signal: lazy("signal", () => import("./signal-
|
|
58
|
-
"do-not-contact": lazy("do-not-contact", () => import("./do-not-contact-
|
|
59
|
-
mailbox: lazy("mailbox", () => import("./mailbox-
|
|
60
|
-
domain: lazy("domain", () => import("./domain-
|
|
61
|
-
unibox: lazy("unibox", () => import("./unibox-
|
|
62
|
-
network: lazy("network", () => import("./network-
|
|
63
|
-
analytics: lazy("analytics", () => import("./analytics-
|
|
64
|
-
notification: lazy("notification", () => import("./notifications-
|
|
65
|
-
export: lazy("export", () => import("./export-
|
|
66
|
-
billing: lazy("billing", () => import("./billing-
|
|
67
|
-
tier: lazy("tier", () => import("./tier-
|
|
68
|
-
team: lazy("team", () => import("./team-
|
|
69
|
-
incoming: lazy("incoming", () => import("./incoming-
|
|
70
|
-
beta: lazy("beta", () => import("./beta-consent-
|
|
71
|
-
webhook: lazy("webhook", () => import("./webhook-
|
|
48
|
+
setup: lazy("setup", () => import("./setup-67FMKDKO.js").then((m) => m.setupCommand)),
|
|
49
|
+
doctor: lazy("doctor", () => import("./doctor-6XQRPRBT.js").then((m) => m.doctorCommand)),
|
|
50
|
+
login: lazy("login", () => import("./login-5A4KOIBU.js").then((m) => m.loginCommand)),
|
|
51
|
+
config: lazy("config", () => import("./config-RC377EZ7.js").then((m) => m.configCommand)),
|
|
52
|
+
account: lazy("account", () => import("./account-55QRBRX2.js").then((m) => m.accountCommand)),
|
|
53
|
+
campaign: lazy("campaign", () => import("./motion-SZSJ4WZI.js").then((m) => m.campaignCommand)),
|
|
54
|
+
enrollment: lazy("enrollment", () => import("./enrollment-PCE6OGCV.js").then((m) => m.enrollmentCommand)),
|
|
55
|
+
lead: lazy("lead", () => import("./contact-4OH5AVMI.js").then((m) => m.contactCommand)),
|
|
56
|
+
company: lazy("companyRecord", () => import("./company-record-GVOCKW7U.js").then((m) => m.companyRecordCommand)),
|
|
57
|
+
signal: lazy("signal", () => import("./signal-XCCCE434.js").then((m) => m.signalCommand)),
|
|
58
|
+
"do-not-contact": lazy("do-not-contact", () => import("./do-not-contact-SA6IXJIE.js").then((m) => m.doNotContactCommand)),
|
|
59
|
+
mailbox: lazy("mailbox", () => import("./mailbox-OZI2NREM.js").then((m) => m.mailboxCommand)),
|
|
60
|
+
domain: lazy("domain", () => import("./domain-N7BBT5WI.js").then((m) => m.domainCommand)),
|
|
61
|
+
unibox: lazy("unibox", () => import("./unibox-U3RPEUJI.js").then((m) => m.uniboxCommand)),
|
|
62
|
+
network: lazy("network", () => import("./network-3CQGZMQF.js").then((m) => m.networkCommand)),
|
|
63
|
+
analytics: lazy("analytics", () => import("./analytics-DOGKBULH.js").then((m) => m.analyticsCommand)),
|
|
64
|
+
notification: lazy("notification", () => import("./notifications-BNLH3ESH.js").then((m) => m.notificationsCommand)),
|
|
65
|
+
export: lazy("export", () => import("./export-WC64TMKR.js").then((m) => m.exportCommand)),
|
|
66
|
+
billing: lazy("billing", () => import("./billing-2A7EZWZX.js").then((m) => m.billingCommand)),
|
|
67
|
+
tier: lazy("tier", () => import("./tier-M6LZVGH3.js").then((m) => m.tierCommand)),
|
|
68
|
+
team: lazy("team", () => import("./team-EC5CFT7D.js").then((m) => m.teamCommand)),
|
|
69
|
+
incoming: lazy("incoming", () => import("./incoming-S5Q7YJM3.js").then((m) => m.incomingCommand)),
|
|
70
|
+
beta: lazy("beta", () => import("./beta-consent-3EPBXPPQ.js").then((m) => m.betaCommand)),
|
|
71
|
+
webhook: lazy("webhook", () => import("./webhook-EAXWPNQZ.js").then((m) => m.webhookCommand)),
|
|
72
72
|
// The LinkedIn building blocks. Reserved product groups
|
|
73
73
|
// (unibox, network, analytics, team) land
|
|
74
74
|
// between `enrollment` and `webhook` with their owning specs.
|
|
75
|
-
core: lazy("core", () => import("./core-
|
|
75
|
+
core: lazy("core", () => import("./core-FM222KR6.js").then((m) => m.coreCommand))
|
|
76
76
|
},
|
|
77
77
|
async run() {
|
|
78
78
|
const { showHelp } = await import("./examples-G4IC5TJU.js");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
resolveMemberOrMeProviderId
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-AFP5F3I6.js";
|
|
5
5
|
import "./chunk-UEAX6KUB.js";
|
|
6
6
|
import {
|
|
7
7
|
AS_ACCOUNT,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from "./chunk-JY26SUNH.js";
|
|
17
17
|
import {
|
|
18
18
|
requireAccount
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-WISP4QXZ.js";
|
|
20
20
|
import {
|
|
21
21
|
buildPreviewOutput
|
|
22
22
|
} from "./chunk-TCUYH5GO.js";
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
readablePage,
|
|
28
28
|
rejectPaginationModifiersWithoutAll,
|
|
29
29
|
streamAll
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-FUPVALUL.js";
|
|
31
31
|
import {
|
|
32
32
|
renderError,
|
|
33
33
|
renderSuccess,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
import {
|
|
38
38
|
createClient,
|
|
39
39
|
resolveEffectiveConfig
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-QFG3DRHY.js";
|
|
41
41
|
import {
|
|
42
42
|
GLOBAL_FLAGS,
|
|
43
43
|
WRITE_SINGLE_FLAGS,
|