@curviate/cli 0.52.0 → 0.53.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 +28 -0
- package/README.md +2 -2
- package/dist/{account-2IHGWLU7.js → account-24YCNFNY.js} +8 -8
- package/dist/{analytics-SBHNCE24.js → analytics-RMRTJPHK.js} +5 -5
- package/dist/{beta-consent-QJBRBON3.js → beta-consent-KCJUJFAR.js} +4 -4
- package/dist/{billing-KL6GL5PF.js → billing-5GK6WIXR.js} +5 -5
- package/dist/{chunk-GXEHHSM7.js → chunk-4YGTPVEH.js} +1 -1
- package/dist/{chunk-PHKICMO7.js → chunk-62YAYAUI.js} +6 -0
- package/dist/{chunk-44COK554.js → chunk-AA2UTHCS.js} +22 -18
- package/dist/{chunk-JGPR6AGO.js → chunk-FNENKSJ7.js} +11 -11
- package/dist/{chunk-XDG3TOKG.js → chunk-FUX3BRYP.js} +2 -1
- package/dist/{chunk-UXFLLYFY.js → chunk-IRKTIZUM.js} +2 -2
- package/dist/{chunk-6SBO4WXA.js → chunk-N4IYTFIY.js} +1 -1
- package/dist/{chunk-QA777QEJ.js → chunk-PAXWRJNA.js} +1 -1
- package/dist/{chunk-RYWWSZUH.js → chunk-QLKGOIWS.js} +2 -2
- package/dist/{chunk-OQKN3U74.js → chunk-R5VJTBAJ.js} +18 -9
- package/dist/{chunk-SIOEKNCN.js → chunk-TIYRNMGW.js} +1 -1
- package/dist/{chunk-OUY3GVWJ.js → chunk-WY73KWPF.js} +1 -1
- package/dist/{chunk-6BDA6B32.js → chunk-WYFTBTDQ.js} +4 -4
- package/dist/{chunk-UA4DEQ3K.js → chunk-YHXIFKCU.js} +2 -2
- package/dist/cli.js +24 -24
- package/dist/{comment-ABRBF7J4.js → comment-UUA7B5YC.js} +5 -5
- package/dist/{company-WQPWHAZJ.js → company-65ILSE2U.js} +6 -6
- package/dist/{config-RFXNYRRC.js → config-TMFMXS7T.js} +2 -2
- package/dist/{connect-R7A6RJJJ.js → connect-URFFJVYY.js} +6 -6
- package/dist/{contact-FHR4RAXL.js → contact-A3S2HEBM.js} +7 -7
- package/dist/{contact-groups-AAJT4TZ6.js → contact-groups-CEV2YITT.js} +12 -11
- package/dist/{contact-import-3KASFYC5.js → contact-import-HHVKVRJW.js} +9 -9
- package/dist/{core-GANWZKQZ.js → core-IOGPY6HS.js} +17 -17
- package/dist/{do-not-contact-QMFIJOAA.js → do-not-contact-QYPADRLJ.js} +11 -11
- package/dist/{doctor-4TNHUBYZ.js → doctor-M7JVNQPQ.js} +3 -3
- package/dist/{document-RXBOZG6M.js → document-MDE2WJYX.js} +1 -1
- package/dist/{draft-F56TKIQ3.js → draft-6KY4F5AE.js} +3 -3
- package/dist/{enrollment-WCG5MX65.js → enrollment-IXQD5IGZ.js} +5 -5
- package/dist/{examples-ICAGL2S5.js → examples-KAMXHRLE.js} +1 -1
- package/dist/{export-UVUY3IMF.js → export-7ILY53LY.js} +4 -4
- package/dist/{feed-6NN2YWOQ.js → feed-GESAX65K.js} +4 -4
- package/dist/{group-BXL4QDZL.js → group-KKTBXE42.js} +4 -4
- package/dist/{inbox-GOO5UA3J.js → inbox-QQ6AQDVB.js} +4 -4
- package/dist/{inboxes-GGN7SULO.js → inboxes-352YK6UB.js} +4 -4
- package/dist/{incoming-AZPAGR3L.js → incoming-5T2ELEDF.js} +5 -5
- package/dist/{job-R5TGUKTB.js → job-KBILRJJO.js} +5 -5
- package/dist/{login-LZH3HY2J.js → login-DQPKKDVA.js} +2 -2
- package/dist/{message-YY2BB47Z.js → message-ZB2IGJIQ.js} +5 -5
- package/dist/{motion-2RCKZSK5.js → motion-NNCRSOT6.js} +16 -12
- package/dist/{network-5VDLBVU7.js → network-FLPECF4C.js} +5 -5
- package/dist/{notification-DVHDC2IA.js → notification-B3MRXH3A.js} +4 -4
- package/dist/{notifications-GZKDD7SV.js → notifications-PMJDG45H.js} +5 -5
- package/dist/{post-JKXMJZXS.js → post-O5DYXSHK.js} +5 -5
- package/dist/{profile-CYFEDUEC.js → profile-ZDP23SNN.js} +6 -6
- package/dist/{recruiter-MRJDGK6O.js → recruiter-QENVOZFV.js} +7 -7
- package/dist/{sales-nav-5ABDKON4.js → sales-nav-JFAYF6DM.js} +6 -6
- package/dist/{search-JDNUGHRX.js → search-5HPVIIUJ.js} +7 -7
- package/dist/{setup-EXPWIHTM.js → setup-QUD7TUCB.js} +3 -3
- package/dist/{team-5XD2O5UO.js → team-ZTGY45Y7.js} +5 -5
- package/dist/{tier-CNDUZKXE.js → tier-3ISVHJJ5.js} +4 -4
- package/dist/{unibox-MAAEROM5.js → unibox-JQBP7COE.js} +7 -6
- package/dist/{webhook-XVTE3ZVM.js → webhook-GPGFPF5P.js} +5 -5
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,34 @@ a new command or flag is a minor; a breaking command/flag/exit-code change is a
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [0.53.0] - 2026-11-09
|
|
12
|
+
|
|
13
|
+
Requires `@curviate/sdk` 0.49.0 (exact pin). The vendored OpenAPI fixture is re-copied from the SDK's, fetched from production 134827ce6.
|
|
14
|
+
|
|
15
|
+
### Forecast
|
|
16
|
+
|
|
17
|
+
- **`analytics get --include forecast`** and **`account overview --include forecast`**, with **`--forecast-days N`** (default 30, the server allows 1 to 365): per day from today, what your Motions are expected to send and get (invitations, acceptances, messages, replies with InMail replies included, InMails, InMail replies), a simulation with their observed rates. Motions only; it assumes the configuration frozen as it is now. A draft Motion reads as if turned on now. The human table prints it under `forecast through <day>`; a draft with no Account says there is none, and `status: computing` (an Account of the scope has had no simulation yet) says so instead of printing zeros. `--forecast-days` is refused with `--view activity`, and when it is not a whole number (exit 2, no request).
|
|
18
|
+
- **Same wording, new meaning:** `motion preview` help: a draft's expected actions a day are the mean daily invitations, messages and InMails of the first 7 days of its forecast, as if turned on now.
|
|
19
|
+
- `analytics get` and `account overview` help name the section. `commands.json` regenerated.
|
|
20
|
+
|
|
21
|
+
### Contact import: async, and a busy Team names the import in its way
|
|
22
|
+
|
|
23
|
+
- **`contact import --async`** prints the imports' ids and statuses as soon as each is accepted and exits 0, without waiting; stderr names `curviate contact imports get IMPORT_ID` for a queued one. Same as `--no-wait`, which stays.
|
|
24
|
+
- **A busy-Team 429 (`RATE_LIMIT_TENANT`) names the import holding the Team's write lock** when the API names one (`details.import_id`, `details.started_at`): in the wait line on stderr and in the final error, so an agent reads that import instead of guessing.
|
|
25
|
+
|
|
26
|
+
- `--all` and `--max-pages` help: the default cap (100 pages), that a capped run ends with a `stream_truncated` line on stdout plus a stderr note, and that it still exits 0. Help text only.
|
|
27
|
+
|
|
28
|
+
### Hygiene
|
|
29
|
+
|
|
30
|
+
- `motion lint` checks a Motion file's fields with the schema `motion create` uses: an unknown top-level or `settings` key (`description`), a missing `name` and the other field rules now exit 2 in lint, as they do in create. A bare Sequence document is unchanged.
|
|
31
|
+
- No-Account hint (`--account` omitted, none connected) says "Team" and sends the person to the dashboard (Accounts, Connect account) or `curviate account connect-request create`, not the stdin-credential `account link`.
|
|
32
|
+
- Help states limits: `unibox list --limit` 1 to 100, `unibox messages --limit` 1 to 25, `do-not-contact list --limit` 1 to 100 (the API returns no total there, so no `--total`); `contact lists add|remove` help names `--from-list` as the list filter, with an example.
|
|
33
|
+
|
|
34
|
+
### Pending invitations
|
|
35
|
+
|
|
36
|
+
- **`core connect sent`** keeps `user.public_identifier` in the slim output (null when unknown). LinkedIn sends no slug for sent invitations; the API fills it from stored data when it knows the person.
|
|
37
|
+
- `motion preview` prints the new `pending_invite` skip count as the API returns it (Motions skip a Contact any Team Account has a pending invitation to; `settings.exclude.pending_invites`, default on). `motion create|update --file` accept `settings.exclude.pending_invites` (vendored document schemas re-derived from the OpenAPI fixture served by staging e858d1ed0; the SDK pin stays 0.48.0, whose generated types already carry it).
|
|
38
|
+
|
|
11
39
|
## [0.52.0] - 2026-11-08
|
|
12
40
|
|
|
13
41
|
Requires `@curviate/sdk` 0.48.0 (exact pin). The vendored OpenAPI fixture is re-copied from the SDK's, regenerated from staging f4ecd2656.
|
package/README.md
CHANGED
|
@@ -107,8 +107,8 @@ Global flags available on every command:
|
|
|
107
107
|
--fields Comma-separated list of fields to include in JSON output
|
|
108
108
|
--limit Maximum number of results to return per page
|
|
109
109
|
--cursor Pagination cursor from a previous response (an empty value is a usage error, never a restart)
|
|
110
|
-
--all Stream
|
|
111
|
-
--max-pages Cap on the number of pages fetched with --all (a positive integer)
|
|
110
|
+
--all Stream pages as NDJSON until --max-pages is reached, then end with a stream_truncated line
|
|
111
|
+
--max-pages Cap on the number of pages fetched with --all (a positive integer, default 100)
|
|
112
112
|
--page-delay Milliseconds to pause between pages when --all is used (default 400)
|
|
113
113
|
--preview Show what would happen without sending any write request
|
|
114
114
|
--verbose Output the full SDK response instead of the slim default
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
slimAccountGet,
|
|
4
4
|
slimAccountList,
|
|
5
5
|
slimAccountListItem
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FUX3BRYP.js";
|
|
7
7
|
import {
|
|
8
8
|
GRAMMAR_ARGS,
|
|
9
9
|
WINDOW_ARGS,
|
|
10
10
|
grammarParams,
|
|
11
11
|
renderOverview,
|
|
12
12
|
windowParams
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-R5VJTBAJ.js";
|
|
14
14
|
import {
|
|
15
15
|
print,
|
|
16
16
|
table
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
outputOpts,
|
|
23
23
|
rootClient,
|
|
24
24
|
usage
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-WY73KWPF.js";
|
|
26
26
|
import {
|
|
27
27
|
buildPreviewOutput
|
|
28
28
|
} from "./chunk-TCUYH5GO.js";
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
readablePage,
|
|
38
38
|
rejectPaginationModifiersWithoutAll,
|
|
39
39
|
streamAll
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-PAXWRJNA.js";
|
|
41
41
|
import {
|
|
42
42
|
isJsonMode,
|
|
43
43
|
renderError,
|
|
@@ -53,20 +53,20 @@ import {
|
|
|
53
53
|
import {
|
|
54
54
|
createClient,
|
|
55
55
|
resolveEffectiveConfig
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-YHXIFKCU.js";
|
|
57
57
|
import {
|
|
58
58
|
GLOBAL_FLAGS,
|
|
59
59
|
READ_SINGLE_FLAGS,
|
|
60
60
|
WRITE_SINGLE_FLAGS,
|
|
61
61
|
readOnly
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-QLKGOIWS.js";
|
|
63
63
|
import {
|
|
64
64
|
DESCRIPTIONS
|
|
65
65
|
} from "./chunk-AQVE6HO5.js";
|
|
66
66
|
import {
|
|
67
67
|
parseDocument,
|
|
68
68
|
readFileFlag
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-62YAYAUI.js";
|
|
70
70
|
import "./chunk-FDJMAF7D.js";
|
|
71
71
|
import {
|
|
72
72
|
defaultReadStdin,
|
|
@@ -681,7 +681,7 @@ var connectRequestCommand = defineCommand4({
|
|
|
681
681
|
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." },
|
|
682
682
|
subCommands: { create: createCmd, get: getCmd2, cancel: cancelCmd },
|
|
683
683
|
async run() {
|
|
684
|
-
const { showHelp } = await import("./examples-
|
|
684
|
+
const { showHelp } = await import("./examples-KAMXHRLE.js");
|
|
685
685
|
await showHelp(connectRequestCommand, ["curviate", "account", "connect-request"]);
|
|
686
686
|
}
|
|
687
687
|
});
|
|
@@ -6,15 +6,15 @@ import {
|
|
|
6
6
|
grammarParams,
|
|
7
7
|
renderOverview,
|
|
8
8
|
windowParams
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-R5VJTBAJ.js";
|
|
10
10
|
import "./chunk-5S3MJVI5.js";
|
|
11
11
|
import "./chunk-PPGKQJKU.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-WY73KWPF.js";
|
|
13
13
|
import "./chunk-NNV2OYEF.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-PAXWRJNA.js";
|
|
15
15
|
import "./chunk-QM57YDJE.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-YHXIFKCU.js";
|
|
17
|
+
import "./chunk-QLKGOIWS.js";
|
|
18
18
|
import "./chunk-AQVE6HO5.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-WY73KWPF.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-
|
|
14
|
+
import "./chunk-YHXIFKCU.js";
|
|
15
15
|
import {
|
|
16
16
|
READ_SINGLE_FLAGS,
|
|
17
17
|
WRITE_SINGLE_FLAGS,
|
|
18
18
|
readOnly
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-QLKGOIWS.js";
|
|
20
20
|
import {
|
|
21
21
|
DESCRIPTIONS
|
|
22
22
|
} from "./chunk-AQVE6HO5.js";
|
|
@@ -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-
|
|
75
|
+
const { showHelp } = await import("./examples-KAMXHRLE.js");
|
|
76
76
|
await showHelp(betaCommand, ["curviate", "beta"]);
|
|
77
77
|
}
|
|
78
78
|
});
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
outputOpts,
|
|
8
8
|
rootClient,
|
|
9
9
|
usage
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-WY73KWPF.js";
|
|
11
11
|
import {
|
|
12
12
|
intFlag
|
|
13
13
|
} from "./chunk-NNV2OYEF.js";
|
|
@@ -18,18 +18,18 @@ import {
|
|
|
18
18
|
readablePage,
|
|
19
19
|
rejectPaginationModifiersWithoutAll,
|
|
20
20
|
streamAll
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-PAXWRJNA.js";
|
|
22
22
|
import {
|
|
23
23
|
renderSuccess,
|
|
24
24
|
writeNdjsonItem
|
|
25
25
|
} from "./chunk-QM57YDJE.js";
|
|
26
26
|
import {
|
|
27
27
|
downloadBinary
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-YHXIFKCU.js";
|
|
29
29
|
import {
|
|
30
30
|
GLOBAL_FLAGS,
|
|
31
31
|
readOnly
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-QLKGOIWS.js";
|
|
33
33
|
import {
|
|
34
34
|
DESCRIPTIONS
|
|
35
35
|
} from "./chunk-AQVE6HO5.js";
|
|
@@ -115,7 +115,7 @@ var billingCommand = defineCommand({
|
|
|
115
115
|
meta: { name: "billing", description: DESCRIPTIONS.billing },
|
|
116
116
|
subCommands: { invoices: invoicesCmd },
|
|
117
117
|
async run() {
|
|
118
|
-
const { showHelp } = await import("./examples-
|
|
118
|
+
const { showHelp } = await import("./examples-KAMXHRLE.js");
|
|
119
119
|
await showHelp(billingCommand, ["curviate", "billing"]);
|
|
120
120
|
}
|
|
121
121
|
});
|
|
@@ -1013,6 +1013,9 @@ var documents_default = {
|
|
|
1013
1013
|
},
|
|
1014
1014
|
known_chats: {
|
|
1015
1015
|
type: "boolean"
|
|
1016
|
+
},
|
|
1017
|
+
pending_invites: {
|
|
1018
|
+
type: "boolean"
|
|
1016
1019
|
}
|
|
1017
1020
|
},
|
|
1018
1021
|
additionalProperties: false
|
|
@@ -1207,6 +1210,9 @@ var documents_default = {
|
|
|
1207
1210
|
},
|
|
1208
1211
|
known_chats: {
|
|
1209
1212
|
type: "boolean"
|
|
1213
|
+
},
|
|
1214
|
+
pending_invites: {
|
|
1215
|
+
type: "boolean"
|
|
1210
1216
|
}
|
|
1211
1217
|
},
|
|
1212
1218
|
additionalProperties: false
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
import {
|
|
3
3
|
online,
|
|
4
4
|
preview
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FNENKSJ7.js";
|
|
6
6
|
import {
|
|
7
7
|
sendChunked
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-TIYRNMGW.js";
|
|
9
9
|
import {
|
|
10
10
|
fail,
|
|
11
11
|
listFlag,
|
|
12
12
|
outputOpts,
|
|
13
13
|
usage
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-WY73KWPF.js";
|
|
15
15
|
import {
|
|
16
16
|
intFlag
|
|
17
17
|
} from "./chunk-NNV2OYEF.js";
|
|
@@ -23,22 +23,22 @@ import {
|
|
|
23
23
|
readablePage,
|
|
24
24
|
rejectPaginationModifiersWithoutAll,
|
|
25
25
|
streamAll
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-PAXWRJNA.js";
|
|
27
27
|
import {
|
|
28
28
|
renderSuccess,
|
|
29
29
|
writeNdjsonItem
|
|
30
30
|
} from "./chunk-QM57YDJE.js";
|
|
31
31
|
import {
|
|
32
32
|
withWireNotes
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-YHXIFKCU.js";
|
|
34
34
|
import {
|
|
35
35
|
GLOBAL_FLAGS,
|
|
36
36
|
WRITE_SINGLE_FLAGS,
|
|
37
37
|
readOnly
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-QLKGOIWS.js";
|
|
39
39
|
import {
|
|
40
40
|
readFileFlag
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-62YAYAUI.js";
|
|
42
42
|
import {
|
|
43
43
|
isStdinToken
|
|
44
44
|
} from "./chunk-ZYURL5VK.js";
|
|
@@ -157,11 +157,13 @@ async function createChunk(c, body, rows, seen, k, n) {
|
|
|
157
157
|
if (!(err instanceof CurviateError)) throw err;
|
|
158
158
|
if (err.code === "RATE_LIMIT_TENANT") {
|
|
159
159
|
const wait = notes.retryAfterS ?? RETRY_DEFAULT_S;
|
|
160
|
-
|
|
161
|
-
|
|
160
|
+
const d = err.details;
|
|
161
|
+
const holder = typeof d?.import_id === "string" ? ` Import ${d.import_id} (started ${String(d.started_at)}) holds the Team's write lock: read it with \`curviate contact imports get ${d.import_id}\`.` : "";
|
|
162
|
+
if (wait > RETRY_AFTER_BOUND_S || sends >= MAX_SENDS) {
|
|
163
|
+
const why = wait > RETRY_AFTER_BOUND_S ? ` The API asked to wait ${wait} s, more than the ${RETRY_AFTER_BOUND_S} s the CLI waits.` : "";
|
|
164
|
+
throw new CurviateError({ code: err.code, message: `${err.message}${why} Nothing in this chunk was imported; send it again later.${holder}`, httpStatus: 429, userFixable: false, retryLikelyToSucceed: true, ...err.details ? { details: err.details } : {} });
|
|
162
165
|
}
|
|
163
|
-
|
|
164
|
-
say(`Import ${k} of ${n}: the Team has other Contact writes running (nothing was imported); waiting ${wait} s, then sending it again.`);
|
|
166
|
+
say(`Import ${k} of ${n}: the Team has other Contact writes running (nothing was imported); waiting ${wait} s, then sending it again.${holder}`);
|
|
165
167
|
await sleep(wait * 1e3);
|
|
166
168
|
continue;
|
|
167
169
|
}
|
|
@@ -224,7 +226,7 @@ async function runImport(c, f) {
|
|
|
224
226
|
const bodyOf = (rows) => ({ ...base, ...header !== void 0 ? { csv: [header, ...rows].join("\n") } : { rows } });
|
|
225
227
|
const total = chunks.reduce((n, x) => n + x.length, 0);
|
|
226
228
|
if (f.preview) return preview("contacts.imports.create", chunks.length > 1 ? { imports: chunks.length, rows: total } : {}, bodyOf(chunks[0]));
|
|
227
|
-
const wait = !(f["no-wait"] === true || f.wait === false);
|
|
229
|
+
const wait = !(f["no-wait"] === true || f.wait === false || f.async === true);
|
|
228
230
|
const poll = async (made) => {
|
|
229
231
|
let imp = made;
|
|
230
232
|
while (wait && imp.status !== "completed" && imp.status !== "failed") {
|
|
@@ -245,6 +247,7 @@ async function runImport(c, f) {
|
|
|
245
247
|
at += rows.length;
|
|
246
248
|
done.push(imp);
|
|
247
249
|
if (imp.status === "failed") throw await failedImport(imp);
|
|
250
|
+
if (!wait && imp.status !== "completed") say(`Import ${done.length} of ${chunks.length}: ${imp.id} is ${imp.status}; read its progress with \`curviate contact imports get ${imp.id}\`.`);
|
|
248
251
|
return imp;
|
|
249
252
|
},
|
|
250
253
|
f,
|
|
@@ -277,7 +280,7 @@ async function skippedRows(c, imp) {
|
|
|
277
280
|
var importCmd = defineCommand({
|
|
278
281
|
meta: {
|
|
279
282
|
name: "import",
|
|
280
|
-
description: `Import Contacts from a CSV, JSON (an array of objects) or NDJSON file. The format comes from the extension; with --file - pass --format. A file above ${IMPORT_MAX_ROWS} rows or ${(IMPORT_MAX_BODY_BYTES / 1048576).toFixed(0)} MiB is split into several imports, run one after the other (a CSV's header is repeated), each awaited unless --no-wait; the first refused or failed import stops the run. Only the file's structure is checked here; the server skips bad rows and reports why. Re-importing merges: a Contact already there is updated or left as it is. If the request times out or the connection drops, the CLI looks up the Team's newest imports, again every 2 s for up to 30 s while none shows, and reports the one this request made (id and status; it waits on a running one); it says nothing was imported only when none appeared. A busy-Team 429 (RATE_LIMIT_TENANT) waits the advertised Retry-After (up to ${RETRY_AFTER_BOUND_S} s) and sends that import again; a longer wait fails. Needs Automate.`,
|
|
283
|
+
description: `Import Contacts from a CSV, JSON (an array of objects) or NDJSON file. The format comes from the extension; with --file - pass --format. A file above ${IMPORT_MAX_ROWS} rows or ${(IMPORT_MAX_BODY_BYTES / 1048576).toFixed(0)} MiB is split into several imports, run one after the other (a CSV's header is repeated), each awaited unless --async (or --no-wait); the first refused or failed import stops the run. Only the file's structure is checked here; the server skips bad rows and reports why. Re-importing merges: a Contact already there is updated or left as it is. If the request times out or the connection drops, the CLI looks up the Team's newest imports, again every 2 s for up to 30 s while none shows, and reports the one this request made (id and status; it waits on a running one); it says nothing was imported only when none appeared. A busy-Team 429 (RATE_LIMIT_TENANT) waits the advertised Retry-After (up to ${RETRY_AFTER_BOUND_S} s) and sends that import again, naming the import holding the Team's write lock when the API names one; a longer wait fails. Needs Automate.`,
|
|
281
284
|
risk: "write",
|
|
282
285
|
rules: {
|
|
283
286
|
changes: "Contacts are created or updated, joined to --list (and, with --apply-lists, to the lists their `lists` column names) and tagged with --tag. Nothing is sent to LinkedIn or to the people.",
|
|
@@ -289,15 +292,15 @@ var importCmd = defineCommand({
|
|
|
289
292
|
errors: {
|
|
290
293
|
CONTACT_LIMIT_REACHED: "the Team is at its Contact cap; rows past it are skipped.",
|
|
291
294
|
IMPORT_QUEUE_FULL: "too many imports are queued (429); wait, then run it again.",
|
|
292
|
-
RATE_LIMIT_TENANT: `the Team has other Contact or Motion writes running (429, nothing imported); the CLI waits Retry-After (up to ${RETRY_AFTER_BOUND_S} s) and sends again, a longer wait stops the run
|
|
295
|
+
RATE_LIMIT_TENANT: `the Team has other Contact or Motion writes running (429, nothing imported); the CLI waits Retry-After (up to ${RETRY_AFTER_BOUND_S} s) and sends again, a longer wait stops the run. When an import holds the Team's write lock, the message and \`details.import_id\` name it: read it with \`curviate contact imports get\`.`,
|
|
293
296
|
CLIENT_TIMEOUT: "no answer within --timeout; the CLI reads the Team's newest imports (again for up to 30 s while none shows) and reports the import this request made. None found: nothing was imported so far, but read `curviate contact imports list` before running it again.",
|
|
294
297
|
NAME_TAKEN: "--list-name names a list that exists."
|
|
295
298
|
},
|
|
296
|
-
output: ["With --json stdout is exactly one JSON document; progress and waits go to stderr. One report: `imports` (id and status each), `total_rows`, summed `counts` (created, updated, unchanged, skipped) and `skipped` rows with their number in the file, a reason and the field. With --no-wait: the imports' ids and statuses only."],
|
|
299
|
+
output: ["With --json stdout is exactly one JSON document; progress and waits go to stderr. One report: `imports` (id and status each), `total_rows`, summed `counts` (created, updated, unchanged, skipped) and `skipped` rows with their number in the file, a reason and the field. With --async (or --no-wait): the imports' ids and statuses only, printed as soon as each is accepted; a queued one's progress is `curviate contact imports get IMPORT_ID` (stderr names it)."],
|
|
297
300
|
seeAlso: ["curviate contact imports get", "curviate contact list"],
|
|
298
301
|
examples: [
|
|
299
302
|
'curviate contact import --file prospects.csv --list-name "Q4 prospects" --tag conference',
|
|
300
|
-
"curviate contact import --file contacts-export.csv --apply-lists --
|
|
303
|
+
"curviate contact import --file contacts-export.csv --apply-lists --async",
|
|
301
304
|
"curviate contact import --file - --format ndjson --list cl_YOUR_LIST_ID"
|
|
302
305
|
]
|
|
303
306
|
},
|
|
@@ -312,7 +315,8 @@ var importCmd = defineCommand({
|
|
|
312
315
|
"apply-lists": { type: "boolean", description: "Add each Contact to the Contact lists named in its `lists` (an export's column), creating a missing list by name. Only adds. A row past the Team's list limit is skipped (list_limit_reached). Default: the column is ignored." },
|
|
313
316
|
map: { type: "string", description: 'Map a file header to a Contact field: header=target, for example "LinkedIn Profile=linkedin_url"; repeatable.' },
|
|
314
317
|
delimiter: { type: "string", description: "A CSV's separator: comma, semicolon or tab. Default: found by the server." },
|
|
315
|
-
|
|
318
|
+
async: { type: "boolean", description: "Print the imports' ids as soon as each is accepted and exit 0, without waiting for them to finish; follow one with `curviate contact imports get IMPORT_ID`. Stops only on a refused request." },
|
|
319
|
+
"no-wait": { type: "boolean", description: "Same as --async." }
|
|
316
320
|
},
|
|
317
321
|
run: online(runImport)
|
|
318
322
|
});
|
|
@@ -375,7 +379,7 @@ var contactImportsCommand = defineCommand({
|
|
|
375
379
|
meta: { name: "imports", description: "Your Team's import records." },
|
|
376
380
|
subCommands: { list: importsList, get: importsGet },
|
|
377
381
|
async run() {
|
|
378
|
-
const { showHelp } = await import("./examples-
|
|
382
|
+
const { showHelp } = await import("./examples-KAMXHRLE.js");
|
|
379
383
|
await showHelp(contactImportsCommand, ["curviate", "contact", "imports"]);
|
|
380
384
|
}
|
|
381
385
|
});
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
requireAccount
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-IRKTIZUM.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-TIYRNMGW.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-WY73KWPF.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-PAXWRJNA.js";
|
|
33
33
|
import {
|
|
34
34
|
renderSuccess,
|
|
35
35
|
writeNdjsonItem
|
|
36
36
|
} from "./chunk-QM57YDJE.js";
|
|
37
37
|
import {
|
|
38
38
|
downloadBinary
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-YHXIFKCU.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-QLKGOIWS.js";
|
|
46
46
|
import {
|
|
47
47
|
DESCRIPTIONS,
|
|
48
48
|
lazy
|
|
@@ -501,15 +501,15 @@ var contactCommand = defineCommand({
|
|
|
501
501
|
create: createCmd,
|
|
502
502
|
update: updateCmd,
|
|
503
503
|
delete: deleteCmd,
|
|
504
|
-
import: lazy("contactImport", () => import("./contact-import-
|
|
504
|
+
import: lazy("contactImport", () => import("./contact-import-HHVKVRJW.js").then((m) => m.contactImportCommand)),
|
|
505
505
|
export: exportCmd,
|
|
506
506
|
enrich: enrichCmd,
|
|
507
|
-
lists: lazy("contactLists", () => import("./contact-groups-
|
|
508
|
-
tags: lazy("contactTags", () => import("./contact-groups-
|
|
509
|
-
imports: lazy("contactImports", () => import("./contact-import-
|
|
507
|
+
lists: lazy("contactLists", () => import("./contact-groups-CEV2YITT.js").then((m) => m.contactListsCommand)),
|
|
508
|
+
tags: lazy("contactTags", () => import("./contact-groups-CEV2YITT.js").then((m) => m.contactTagsCommand)),
|
|
509
|
+
imports: lazy("contactImports", () => import("./contact-import-HHVKVRJW.js").then((m) => m.contactImportsCommand))
|
|
510
510
|
},
|
|
511
511
|
async run() {
|
|
512
|
-
const { showHelp } = await import("./examples-
|
|
512
|
+
const { showHelp } = await import("./examples-KAMXHRLE.js");
|
|
513
513
|
await showHelp(contactCommand, ["curviate", "contact"]);
|
|
514
514
|
}
|
|
515
515
|
});
|
|
@@ -125,7 +125,8 @@ function slimInviteSentItem(item) {
|
|
|
125
125
|
id: rawUser["id"] ?? null,
|
|
126
126
|
display_name: rawUser["display_name"] ?? null,
|
|
127
127
|
first_name: rawUser["first_name"] ?? null,
|
|
128
|
-
last_name: rawUser["last_name"] ?? null
|
|
128
|
+
last_name: rawUser["last_name"] ?? null,
|
|
129
|
+
public_identifier: rawUser["public_identifier"] ?? null
|
|
129
130
|
} : null;
|
|
130
131
|
return {
|
|
131
132
|
id: item["id"] ?? null,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
readablePage
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-PAXWRJNA.js";
|
|
5
5
|
import {
|
|
6
6
|
assertNoStdinPlaceholder
|
|
7
7
|
} from "./chunk-ZYURL5VK.js";
|
|
@@ -141,7 +141,7 @@ async function soleConnectedAccount(client, flags, out) {
|
|
|
141
141
|
const { accounts } = listed;
|
|
142
142
|
if (accounts.length === 0) {
|
|
143
143
|
out.stderr.write(
|
|
144
|
-
"error: no LinkedIn account is connected to this
|
|
144
|
+
"error: no LinkedIn account is connected to this Team yet. Ask your user to connect one in the dashboard (Accounts, Connect account), or run `curviate account connect-request create` and hand them the link, then retry.\n"
|
|
145
145
|
);
|
|
146
146
|
process.exit(2);
|
|
147
147
|
}
|
|
@@ -47,12 +47,12 @@ var GLOBAL_FLAGS = {
|
|
|
47
47
|
},
|
|
48
48
|
all: {
|
|
49
49
|
type: "boolean",
|
|
50
|
-
description:
|
|
50
|
+
description: 'Stream pages as NDJSON until the results run out or --max-pages is reached (default 100 pages). Not exhaustive: a capped stream ends with a {"object":"stream_truncated","pages_fetched":N,"has_more":true} line on stdout, prints a "Streaming truncated" note on stderr, and still exits 0; raise --max-pages to fetch more.',
|
|
51
51
|
default: false
|
|
52
52
|
},
|
|
53
53
|
"max-pages": {
|
|
54
54
|
type: "string",
|
|
55
|
-
description: "Maximum number of pages to fetch when --all is used. Refused (exit 2) without --all."
|
|
55
|
+
description: "Maximum number of pages to fetch when --all is used (default 100). A stream that hits the cap ends with stream_truncated (exit 0). Refused (exit 2) without --all."
|
|
56
56
|
},
|
|
57
57
|
"page-delay": {
|
|
58
58
|
type: "string",
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
outputOpts,
|
|
14
14
|
rootClient,
|
|
15
15
|
usage
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-WY73KWPF.js";
|
|
17
17
|
import {
|
|
18
18
|
intFlag
|
|
19
19
|
} from "./chunk-NNV2OYEF.js";
|
|
@@ -24,19 +24,19 @@ import {
|
|
|
24
24
|
readablePage,
|
|
25
25
|
rejectPaginationModifiersWithoutAll,
|
|
26
26
|
streamAll
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-PAXWRJNA.js";
|
|
28
28
|
import {
|
|
29
29
|
renderSuccess,
|
|
30
30
|
writeNdjsonItem
|
|
31
31
|
} from "./chunk-QM57YDJE.js";
|
|
32
32
|
import {
|
|
33
33
|
downloadBinary
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-YHXIFKCU.js";
|
|
35
35
|
import {
|
|
36
36
|
GLOBAL_FLAGS,
|
|
37
37
|
READ_SINGLE_FLAGS,
|
|
38
38
|
readOnly
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-QLKGOIWS.js";
|
|
40
40
|
import {
|
|
41
41
|
DESCRIPTIONS
|
|
42
42
|
} from "./chunk-AQVE6HO5.js";
|
|
@@ -63,6 +63,7 @@ function grammarParams(f) {
|
|
|
63
63
|
if (f.sort !== void 0) q["sort"] = listFlag("sort", f.sort);
|
|
64
64
|
if (f.limit !== void 0) q["limit"] = intFlag("limit", f.limit);
|
|
65
65
|
if (f.compare !== void 0) q["compare"] = f.compare;
|
|
66
|
+
if (f["forecast-days"] !== void 0) q["forecast_days"] = intFlag("forecast-days", f["forecast-days"]);
|
|
66
67
|
return q;
|
|
67
68
|
}
|
|
68
69
|
function filterParams(f, keys) {
|
|
@@ -116,6 +117,12 @@ function renderOverview(body) {
|
|
|
116
117
|
if (Array.isArray(limits) && limits.length) out.push(table(["BUDGET ROW", "USED", "CEILING", "LEFT"], limits.map((r) => [r["budget_row"], r["used"], r["effective_ceiling"], r["remaining"]])));
|
|
117
118
|
out.push(rowsTable("MOTION", "motion_id", "name", body["motions"]));
|
|
118
119
|
out.push(rowsTable("ACCOUNT", "account_id", "account_name", body["accounts"]));
|
|
120
|
+
const forecast = body["forecast"];
|
|
121
|
+
if (forecast?.status === "computing") out.push("forecast: being computed (an Account has had no simulation yet); read again in a few minutes");
|
|
122
|
+
else if (forecast?.daily?.length) {
|
|
123
|
+
out.push(`forecast through ${forecast.through} (Motions only, the configuration as it is now)`);
|
|
124
|
+
out.push(table(["DATE", "INVITES", "ACCEPTED", "MESSAGES", "REPLIES", "INMAILS", "INMAIL REPLIES"], forecast.daily.map((d) => [d["date"], d["invites_sent"], d["accepted"], d["messages_sent"], d["replies"], d["inmails_sent"], d["inmail_replies"]])));
|
|
125
|
+
} else if (forecast === null) out.push("forecast: none (pick an Account for this Motion)");
|
|
119
126
|
for (const fl of body["flags"] ?? []) out.push(`${fl["code"]}: ${fl["message"]}${fl["next"] ? ` (${fl["next"]})` : ""}`);
|
|
120
127
|
print(out.filter((x) => !!x).join("\n"));
|
|
121
128
|
}
|
|
@@ -128,7 +135,7 @@ async function runGet(c, f) {
|
|
|
128
135
|
const view = f.view ?? "motions";
|
|
129
136
|
if (view !== "motions" && view !== "activity") usage("--view takes motions or activity.");
|
|
130
137
|
if (view === "activity") {
|
|
131
|
-
const motionOnly = ["motion", "motions", "origin", "include", "sort", "limit", "compare", "version"].find((k) => f[k] !== void 0);
|
|
138
|
+
const motionOnly = ["motion", "motions", "origin", "include", "sort", "limit", "compare", "forecast-days", "version"].find((k) => f[k] !== void 0);
|
|
132
139
|
if (motionOnly) usage(`--${motionOnly} reads Motions: --view activity takes the window and --accounts only.`);
|
|
133
140
|
}
|
|
134
141
|
if (f.version !== void 0 && f.motion === void 0) usage("--version needs --motion.");
|
|
@@ -222,7 +229,8 @@ var FILTER_ARGS = {
|
|
|
222
229
|
origin: { type: "string", description: "Who sent the actions: a comma list of motion, unibox, api; direct is an alias for unibox and api." }
|
|
223
230
|
};
|
|
224
231
|
var GRAMMAR_ARGS = {
|
|
225
|
-
include: { type: "string", description: "Sections to return, comma list (for example performance,motions,accounts,steps,variants,paths,flags)." },
|
|
232
|
+
include: { type: "string", description: "Sections to return, comma list (for example performance,motions,accounts,steps,variants,paths,flags). forecast: what your Motions are expected to send and get per day from today, a simulation with their observed rates; Motions only, the configuration frozen as it is now (no new Enrollments, no edits), never in the summary." },
|
|
233
|
+
"forecast-days": { type: "string", description: "With --include forecast: days after today, 1-365 (default 30); the forecast ends sooner when activity does." },
|
|
226
234
|
sort: { type: "string", description: "Order of the Motion and Account lists, comma list of sent, acceptance.rate, reply.rate, inmail_reply.rate, last_activity_at, name; a leading - sorts descending." },
|
|
227
235
|
limit: { type: "string", description: "How many Motions and Accounts to return." },
|
|
228
236
|
compare: { type: "string", description: "previous_period: add the same number of days before --from to every rate (`previous`, `delta`)." }
|
|
@@ -236,12 +244,13 @@ var getCmd = defineCommand({
|
|
|
236
244
|
"acceptance: invitations accepted over invitations sent in the window, so far.",
|
|
237
245
|
"reply: people who replied over people messaged; InMail reply the same for InMails. Rates move as replies and acceptances arrive; `maturing` counts what was sent under 7 days ago and `low_sample` marks fewer than 30.",
|
|
238
246
|
"seen (--motion): messages read or replied over messages sent, per message step.",
|
|
247
|
+
"forecast (--include forecast): per day from today, the expected invitations, acceptances, messages, replies (InMail replies included), InMails and InMail replies; a draft Motion as if turned on now.",
|
|
239
248
|
"A compact table by default; --json (or piped) prints the API body."
|
|
240
249
|
],
|
|
241
250
|
seeAlso: ["curviate analytics events list", "curviate account overview", "Judgement on reading the numbers: https://github.com/curviate/curviate-plugin"],
|
|
242
251
|
examples: [
|
|
243
252
|
"curviate analytics get --range 30d",
|
|
244
|
-
"curviate analytics get --motion mot_YOUR_MOTION_ID --include steps,paths --
|
|
253
|
+
"curviate analytics get --motion mot_YOUR_MOTION_ID --include steps,paths,forecast --forecast-days 14",
|
|
245
254
|
"curviate analytics get --view activity --from 2026-10-01 --to 2026-10-28"
|
|
246
255
|
]
|
|
247
256
|
},
|
|
@@ -312,7 +321,7 @@ var eventsCommand = defineCommand({
|
|
|
312
321
|
meta: { name: "events", description: "The records behind the analytics numbers." },
|
|
313
322
|
subCommands: { list: eventsListCmd },
|
|
314
323
|
async run() {
|
|
315
|
-
const { showHelp } = await import("./examples-
|
|
324
|
+
const { showHelp } = await import("./examples-KAMXHRLE.js");
|
|
316
325
|
await showHelp(eventsCommand, ["curviate", "analytics", "events"]);
|
|
317
326
|
}
|
|
318
327
|
});
|
|
@@ -324,7 +333,7 @@ var analyticsCommand = defineCommand({
|
|
|
324
333
|
export: exportCmd
|
|
325
334
|
},
|
|
326
335
|
async run() {
|
|
327
|
-
const { showHelp } = await import("./examples-
|
|
336
|
+
const { showHelp } = await import("./examples-KAMXHRLE.js");
|
|
328
337
|
await showHelp(analyticsCommand, ["curviate", "analytics"]);
|
|
329
338
|
}
|
|
330
339
|
});
|