@curviate/cli 0.50.0-next.4 → 0.50.0-next.5
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 +3 -0
- package/README.md +14 -0
- package/dist/{account-7KKJEHAM.js → account-WF27VTZF.js} +4 -4
- package/dist/{analytics-XBAFRYSC.js → analytics-Z7AE5JEI.js} +4 -4
- package/dist/{beta-consent-FP2QGN6M.js → beta-consent-VETVR6KP.js} +2 -2
- package/dist/{billing-AQ5VNIYA.js → billing-TYXPR6ZC.js} +3 -3
- package/dist/{chunk-COYDNWKF.js → chunk-5YQXZIFH.js} +1 -1
- package/dist/{chunk-Q5GVXN7Z.js → chunk-EHTSCHKM.js} +1 -1
- package/dist/{chunk-3SF6JIMA.js → chunk-GGJTO3PN.js} +1 -1
- package/dist/{chunk-JYCNHE72.js → chunk-HOS3JH4L.js} +1 -1
- package/dist/{chunk-56JSZNRW.js → chunk-I3HD5UFH.js} +1 -1
- package/dist/{chunk-2MWTZLAG.js → chunk-QLBNUWM2.js} +82 -32
- package/dist/{chunk-QL6VKMTA.js → chunk-RLZP2PL4.js} +9 -9
- package/dist/{chunk-FO54X4T2.js → chunk-UFHZGBFD.js} +1 -1
- package/dist/{chunk-RRSWFGXM.js → chunk-X62K5XDP.js} +3 -3
- package/dist/cli.js +21 -21
- package/dist/{comment-OZZGWNIV.js → comment-YAQSZNYS.js} +4 -4
- package/dist/{company-HM23JZT4.js → company-4K75VGBM.js} +4 -4
- package/dist/{config-KHXQZD6F.js → config-OESEJHKZ.js} +1 -1
- package/dist/{connect-HBQ4PLTS.js → connect-LZJQOYX2.js} +3 -3
- package/dist/{contact-325QZ5IB.js → contact-XE7HK4RI.js} +6 -6
- package/dist/{contact-groups-TXPUYQYC.js → contact-groups-IHF7GMNG.js} +6 -6
- package/dist/{contact-import-6G2DUCIN.js → contact-import-SSPUBHAH.js} +6 -6
- package/dist/{core-HXREJJCJ.js → core-524AMFTQ.js} +16 -16
- package/dist/{do-not-contact-CP6WKW5T.js → do-not-contact-LOUCA7JT.js} +3 -3
- package/dist/{doctor-GDBH2PH7.js → doctor-Q3434Q7N.js} +2 -2
- package/dist/{draft-IWI7E5VJ.js → draft-SOO3UJIO.js} +2 -2
- package/dist/{enrollment-2JVHRUNI.js → enrollment-YQMSDXVJ.js} +3 -3
- package/dist/{export-URIKCSIO.js → export-F6ZFNZ7L.js} +2 -2
- package/dist/{feed-ZBATBTD2.js → feed-YE4HOQ2M.js} +3 -3
- package/dist/{group-D43R5JQU.js → group-OCKSOR65.js} +3 -3
- package/dist/{inbox-6DTW4XJE.js → inbox-VGCODDRH.js} +3 -3
- package/dist/{inboxes-TFZQ57MK.js → inboxes-XHP6F3MQ.js} +3 -3
- package/dist/{incoming-RHKXXZQE.js → incoming-AA3MTRAG.js} +3 -3
- package/dist/{job-ARXJVJID.js → job-KFZNTBXT.js} +3 -3
- package/dist/{login-CH75UC6I.js → login-BD7JQXGX.js} +1 -1
- package/dist/{message-WTGOJZGL.js → message-IXUDKHBW.js} +4 -4
- package/dist/{motion-TQU6ZS6N.js → motion-QSANYJKR.js} +4 -4
- package/dist/{network-JUQA3X5S.js → network-A5M6SLRI.js} +3 -3
- package/dist/{notification-GN5Y25GL.js → notification-XRCV5XNX.js} +3 -3
- package/dist/{notifications-C5CBK574.js → notifications-SU7NKFGF.js} +3 -3
- package/dist/{post-HT2UWXXO.js → post-YWXQ2MVL.js} +4 -4
- package/dist/{profile-ZSBAZPFQ.js → profile-JVNJAAZ7.js} +4 -4
- package/dist/{recruiter-CSG4XSZ4.js → recruiter-34G433BX.js} +3 -3
- package/dist/{sales-nav-LDI7MTGU.js → sales-nav-34WK5HF6.js} +3 -3
- package/dist/{search-NLIL5SXI.js → search-43YUBUEH.js} +3 -3
- package/dist/{setup-UGELD4FZ.js → setup-RFSXQVN6.js} +2 -2
- package/dist/{team-LWDBXG4K.js → team-WSRM74PS.js} +3 -3
- package/dist/{tier-LOI4ZOVV.js → tier-JQYS4MMF.js} +3 -3
- package/dist/{unibox-IL6SRMK2.js → unibox-LFTLITLA.js} +11 -4
- package/dist/{webhook-TAXMQNEK.js → webhook-HX2NOPNE.js} +3 -3
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -12,6 +12,9 @@ Requires the next `@curviate/sdk` (a commit pin on the SDK PR build until it is
|
|
|
12
12
|
|
|
13
13
|
### Added
|
|
14
14
|
|
|
15
|
+
- `message new --to` is repeatable: two or more different people start a group chat, `--subject` its name. A person named twice counts once (`--preview` shows the list sent). A voice note stays out of groups.
|
|
16
|
+
- `message new` and `message send` (and the bare `message <chat_id>`) take `--share-post <id>` or `--share-job <id>`: a post or job posting shown natively beside the text. Text is required; both flags together, no text or `--attach` is exit `2` with nothing sent. A job URL reduces to its numeric id. Company-page, Sales Navigator and Recruiter chats do not take it. Whether a post id renders in the message is unproven until a live send.
|
|
17
|
+
- `unibox list` names a group chat in WITH: its title, else its other members (`group` on the Unibox chat; `--json` carries it whole).
|
|
15
18
|
- `curviate account safety get|update <account>`: read and change one Account's limits and Active hours. `curviate account team-access on|off <account>`: share an Account with its Team or keep it to its person.
|
|
16
19
|
|
|
17
20
|
### Account orchestration
|
package/README.md
CHANGED
|
@@ -262,6 +262,20 @@ curviate core search jobs --keywords "founding engineer" --location "Berlin" --a
|
|
|
262
262
|
curviate core job get "https://www.linkedin.com/jobs/view/4428113858" --account acc_1
|
|
263
263
|
```
|
|
264
264
|
|
|
265
|
+
### 8. Start a group chat, share a post or a job
|
|
266
|
+
|
|
267
|
+
Repeat `--to` for a group chat; `--subject` is its name. A person named twice counts once. A voice note stays out of groups.
|
|
268
|
+
|
|
269
|
+
```bash
|
|
270
|
+
curviate core message new --to janesmith --to ACoAAAexample --subject "Q4 intro" \
|
|
271
|
+
--account acc_1 "Hi both, you two should meet." --preview # nothing sent
|
|
272
|
+
|
|
273
|
+
# Show a post or job posting natively beside the text. Text is required, no --attach.
|
|
274
|
+
curviate core message send 2-YTQ3ODU3Njgt --share-job 4012345678 --account acc_1 "Thought of you for this one." --preview
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
`--share-post` takes the post id from `curviate core post get` or a list (an activity id, URN or share URL also works); `--share-job` takes the numeric job id or a job URL. Both together, no text, or `--attach` is exit `2` with nothing sent. A company-page chat and Sales Navigator or Recruiter chats do not take shared content. Whether a post id renders in the message is unproven until a live send.
|
|
278
|
+
|
|
265
279
|
## Company
|
|
266
280
|
|
|
267
281
|
Company commands (`curviate core company ...`) are Core-tier reads. `curviate core company <id>` accepts a public
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
grammarParams,
|
|
11
11
|
renderOverview,
|
|
12
12
|
windowParams
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-X62K5XDP.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-GGJTO3PN.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-UFHZGBFD.js";
|
|
41
41
|
import {
|
|
42
42
|
isJsonMode,
|
|
43
43
|
renderError,
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
import {
|
|
54
54
|
createClient,
|
|
55
55
|
resolveEffectiveConfig
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-I3HD5UFH.js";
|
|
57
57
|
import {
|
|
58
58
|
GLOBAL_FLAGS,
|
|
59
59
|
READ_SINGLE_FLAGS,
|
|
@@ -6,14 +6,14 @@ import {
|
|
|
6
6
|
grammarParams,
|
|
7
7
|
renderOverview,
|
|
8
8
|
windowParams
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-X62K5XDP.js";
|
|
10
10
|
import "./chunk-5S3MJVI5.js";
|
|
11
11
|
import "./chunk-PPGKQJKU.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-GGJTO3PN.js";
|
|
13
13
|
import "./chunk-NNV2OYEF.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-UFHZGBFD.js";
|
|
15
15
|
import "./chunk-QM57YDJE.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-I3HD5UFH.js";
|
|
17
17
|
import "./chunk-RYWWSZUH.js";
|
|
18
18
|
import "./chunk-73DJ3KNE.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-GGJTO3PN.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-I3HD5UFH.js";
|
|
15
15
|
import {
|
|
16
16
|
READ_SINGLE_FLAGS,
|
|
17
17
|
WRITE_SINGLE_FLAGS,
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
outputOpts,
|
|
8
8
|
rootClient,
|
|
9
9
|
usage
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-GGJTO3PN.js";
|
|
11
11
|
import {
|
|
12
12
|
intFlag
|
|
13
13
|
} from "./chunk-NNV2OYEF.js";
|
|
@@ -18,14 +18,14 @@ import {
|
|
|
18
18
|
readablePage,
|
|
19
19
|
rejectPaginationModifiersWithoutAll,
|
|
20
20
|
streamAll
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-UFHZGBFD.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-I3HD5UFH.js";
|
|
29
29
|
import {
|
|
30
30
|
GLOBAL_FLAGS,
|
|
31
31
|
readOnly
|
|
@@ -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.50.0-next.
|
|
277
|
+
var version = "0.50.0-next.5";
|
|
278
278
|
|
|
279
279
|
// src/lib/client.ts
|
|
280
280
|
function headerStrings(headers) {
|
|
@@ -15,18 +15,19 @@ import {
|
|
|
15
15
|
} from "./chunk-Q3ZPRFUX.js";
|
|
16
16
|
import {
|
|
17
17
|
normalizeChatId,
|
|
18
|
-
resolveIdentifier
|
|
18
|
+
resolveIdentifier,
|
|
19
|
+
resolveJobIdentifier
|
|
19
20
|
} from "./chunk-UEAX6KUB.js";
|
|
20
21
|
import {
|
|
21
22
|
requireAccount
|
|
22
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-HOS3JH4L.js";
|
|
23
24
|
import {
|
|
24
25
|
buildPreviewOutput
|
|
25
26
|
} from "./chunk-TCUYH5GO.js";
|
|
26
27
|
import {
|
|
27
28
|
readableId,
|
|
28
29
|
readableObject
|
|
29
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-UFHZGBFD.js";
|
|
30
31
|
import {
|
|
31
32
|
renderError,
|
|
32
33
|
renderSuccess,
|
|
@@ -36,7 +37,7 @@ import {
|
|
|
36
37
|
createClient,
|
|
37
38
|
downloadBinary,
|
|
38
39
|
resolveEffectiveConfig
|
|
39
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-I3HD5UFH.js";
|
|
40
41
|
import {
|
|
41
42
|
READ_SINGLE_FLAGS,
|
|
42
43
|
WRITE_FLAGS,
|
|
@@ -112,6 +113,26 @@ function normalizeAttachPaths(attach) {
|
|
|
112
113
|
if (!attach) return [];
|
|
113
114
|
return Array.isArray(attach) ? attach : [attach];
|
|
114
115
|
}
|
|
116
|
+
function readSharedContent(flags, text, attachPaths, out) {
|
|
117
|
+
const post = flags["share-post"];
|
|
118
|
+
const job = flags["share-job"];
|
|
119
|
+
if (post === void 0 && job === void 0) return void 0;
|
|
120
|
+
const refuse = (msg) => {
|
|
121
|
+
out.stderr.write(`error: ${msg}
|
|
122
|
+
`);
|
|
123
|
+
process.exit(2);
|
|
124
|
+
};
|
|
125
|
+
if (post !== void 0 && job !== void 0) refuse("pass --share-post or --share-job, not both.");
|
|
126
|
+
const flag = post !== void 0 ? "--share-post" : "--share-job";
|
|
127
|
+
const raw = (post ?? job ?? "").trim();
|
|
128
|
+
if (raw === "") refuse(`${flag} was given an empty value. Pass the id, or omit the flag.`);
|
|
129
|
+
if (text.trim() === "") refuse(`${flag} needs the message text: the ${post !== void 0 ? "post" : "job posting"} is shown beside it.`);
|
|
130
|
+
if (attachPaths.length > 0) refuse(`${flag} cannot be combined with --attach.`);
|
|
131
|
+
return post !== void 0 ? { type: "post", id: raw } : { type: "job_posting", id: resolveJobIdentifier(raw) };
|
|
132
|
+
}
|
|
133
|
+
function normalizeToValues(to) {
|
|
134
|
+
return (Array.isArray(to) ? to : to === void 0 ? [] : [to]).filter((v) => v !== "");
|
|
135
|
+
}
|
|
115
136
|
var MEMBER_URN_RE = /^urn:li:member:\d+$/;
|
|
116
137
|
var MEMBER_PROVIDER_ID_RE = /^A[CDE][A-Za-z0-9_-]{4,}$/;
|
|
117
138
|
async function handleSdkError(err, outOpts, out) {
|
|
@@ -137,7 +158,7 @@ function willSendAsNotice(chatId) {
|
|
|
137
158
|
async function runMessageNew(client, flags, out, _readStdin) {
|
|
138
159
|
const subject = readChatSubjectFlag(flags, out);
|
|
139
160
|
const accountId = await requireAccount(client, flags, out);
|
|
140
|
-
const
|
|
161
|
+
const rawTos = normalizeToValues(flags.to);
|
|
141
162
|
const rawText = flags.text ?? "";
|
|
142
163
|
const attachPaths = normalizeAttachPaths(flags.attach);
|
|
143
164
|
let attachBuffers = [];
|
|
@@ -154,24 +175,34 @@ async function runMessageNew(client, flags, out, _readStdin) {
|
|
|
154
175
|
const ns = client.account(accountId);
|
|
155
176
|
const outOpts = resolveOutputOpts(flags);
|
|
156
177
|
const text = await resolveTextOrStdin(rawText, out, _readStdin);
|
|
157
|
-
const
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
providerId =
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
|
|
178
|
+
const sharedContent = readSharedContent(flags, text, attachPaths, out);
|
|
179
|
+
const attendeeIds = [];
|
|
180
|
+
for (const rawTo of rawTos) {
|
|
181
|
+
const resolvedSlugOrId = resolveIdentifier(rawTo);
|
|
182
|
+
let providerId;
|
|
183
|
+
if (MEMBER_PROVIDER_ID_RE.test(resolvedSlugOrId)) {
|
|
184
|
+
providerId = resolvedSlugOrId;
|
|
185
|
+
} else {
|
|
186
|
+
try {
|
|
187
|
+
providerId = readableId(await ns.users.get(resolvedSlugOrId, {}));
|
|
188
|
+
} catch (err) {
|
|
189
|
+
await handleSdkError(err, outOpts, out);
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
167
192
|
}
|
|
193
|
+
if (providerId !== void 0 && !attendeeIds.includes(providerId)) attendeeIds.push(providerId);
|
|
168
194
|
}
|
|
169
195
|
const attachmentPayloads = attachBuffers.map((buf, i) => toAttachmentPayload(attachPaths[i], buf));
|
|
170
196
|
if (flags.preview) {
|
|
171
197
|
const preview = buildPreviewOutput({
|
|
172
198
|
method: "messaging.startChat",
|
|
173
|
-
args: { attendees_ids:
|
|
174
|
-
body: {
|
|
199
|
+
args: { attendees_ids: attendeeIds },
|
|
200
|
+
body: {
|
|
201
|
+
attendees_ids: attendeeIds,
|
|
202
|
+
text,
|
|
203
|
+
...subject !== void 0 ? { subject } : {},
|
|
204
|
+
...sharedContent ? { shared_content: sharedContent } : {}
|
|
205
|
+
},
|
|
175
206
|
account: accountId,
|
|
176
207
|
attachments: attachBuffers.map((buf, i) => ({
|
|
177
208
|
name: attachPaths[i] ? attachPaths[i].split("/").pop() ?? attachPaths[i] : `attachment_${i}`,
|
|
@@ -182,12 +213,13 @@ async function runMessageNew(client, flags, out, _readStdin) {
|
|
|
182
213
|
return;
|
|
183
214
|
}
|
|
184
215
|
const body = {
|
|
185
|
-
attendees_ids:
|
|
216
|
+
attendees_ids: attendeeIds,
|
|
186
217
|
text,
|
|
187
218
|
// Present only when the flag was given: an absent subject must leave the
|
|
188
219
|
// key out, never send `subject: ""` (the server has no `.min(1)`).
|
|
189
220
|
...subject !== void 0 ? { subject } : {},
|
|
190
|
-
...attachmentPayloads.length > 0 ? { attachments: attachmentPayloads } : {}
|
|
221
|
+
...attachmentPayloads.length > 0 ? { attachments: attachmentPayloads } : {},
|
|
222
|
+
...sharedContent ? { shared_content: sharedContent } : {}
|
|
191
223
|
};
|
|
192
224
|
try {
|
|
193
225
|
const result = await ns.messaging.startChat(body);
|
|
@@ -202,6 +234,7 @@ async function runMessageSend(client, flags, out, _readStdin) {
|
|
|
202
234
|
const rawText = flags.text ?? "";
|
|
203
235
|
const attachPaths = normalizeAttachPaths(flags.attach);
|
|
204
236
|
const text = await resolveTextOrStdin(rawText, out, _readStdin);
|
|
237
|
+
const sharedContent = readSharedContent(flags, text, attachPaths, out);
|
|
205
238
|
let attachBuffers = [];
|
|
206
239
|
try {
|
|
207
240
|
attachBuffers = await Promise.all(attachPaths.map((p) => readAttachment(p)));
|
|
@@ -217,7 +250,7 @@ async function runMessageSend(client, flags, out, _readStdin) {
|
|
|
217
250
|
const preview = buildPreviewOutput({
|
|
218
251
|
method: "messaging.sendMessage",
|
|
219
252
|
args: { chat_id: chatId },
|
|
220
|
-
body: { text },
|
|
253
|
+
body: { text, ...sharedContent ? { shared_content: sharedContent } : {} },
|
|
221
254
|
account: accountId,
|
|
222
255
|
attachments: attachBuffers.map((buf, i) => ({
|
|
223
256
|
name: attachPaths[i] ? attachPaths[i].split("/").pop() ?? attachPaths[i] : `attachment_${i}`,
|
|
@@ -232,7 +265,8 @@ async function runMessageSend(client, flags, out, _readStdin) {
|
|
|
232
265
|
const attachmentPayloads = attachBuffers.map((buf, i) => toAttachmentPayload(attachPaths[i], buf));
|
|
233
266
|
const body = {
|
|
234
267
|
text,
|
|
235
|
-
...attachmentPayloads.length > 0 ? { attachments: attachmentPayloads } : {}
|
|
268
|
+
...attachmentPayloads.length > 0 ? { attachments: attachmentPayloads } : {},
|
|
269
|
+
...sharedContent ? { shared_content: sharedContent } : {}
|
|
236
270
|
};
|
|
237
271
|
const ns = client.account(accountId);
|
|
238
272
|
const outOpts = resolveOutputOpts(flags);
|
|
@@ -363,7 +397,7 @@ async function runMessageAttachment(client, flags, out, isTTY) {
|
|
|
363
397
|
async function runMessageInMail(client, flags, out, _readStdin) {
|
|
364
398
|
const subject = readInMailSubjectFlag(flags, out);
|
|
365
399
|
const accountId = await requireAccount(client, flags, out);
|
|
366
|
-
const rawTo = flags.to ?? "";
|
|
400
|
+
const rawTo = normalizeToValues(flags.to)[0] ?? "";
|
|
367
401
|
if (!rawTo) {
|
|
368
402
|
out.stderr.write(
|
|
369
403
|
"error: --to: not a valid LinkedIn URL, slug, provider-id, or URN.\n"
|
|
@@ -424,21 +458,33 @@ async function runMessageInMailBalance(client, flags, out) {
|
|
|
424
458
|
await handleSdkError(err, outOpts, out);
|
|
425
459
|
}
|
|
426
460
|
}
|
|
461
|
+
var SHARE_ARGS = {
|
|
462
|
+
"share-post": {
|
|
463
|
+
type: "string",
|
|
464
|
+
description: "Show a post natively in the message, beside the text (text required, no --attach). The post id from `curviate core post get` or a list; an activity id, URN or share URL also works. Not with --share-job. Whether a post id renders in the message is unproven until a live send."
|
|
465
|
+
},
|
|
466
|
+
"share-job": {
|
|
467
|
+
type: "string",
|
|
468
|
+
description: "Show a job posting natively in the message, beside the text (text required, no --attach). The numeric job id or a LinkedIn job URL. Not with --share-post."
|
|
469
|
+
}
|
|
470
|
+
};
|
|
427
471
|
var messageNewCommand = defineCommand({
|
|
428
472
|
meta: {
|
|
429
473
|
name: "new",
|
|
430
474
|
description: "Start a new chat with one or more members.",
|
|
431
475
|
risk: "write",
|
|
432
476
|
rules: {
|
|
433
|
-
changes: "Starts a chat with the recipient and sends the opening message from your Account.",
|
|
434
|
-
visible_to: "The recipient, in their LinkedIn inbox.",
|
|
477
|
+
changes: "Starts a chat with the recipient (a group chat with two or more --to) and sends the opening message from your Account.",
|
|
478
|
+
visible_to: "The recipient, or every member of a group, in their LinkedIn inbox.",
|
|
435
479
|
budget_rows: ["messages_first_degree"],
|
|
436
480
|
retry: "Not safe: requests carry no idempotency key, so a retry after a timeout can repeat it. Read `curviate core inbox list` first.",
|
|
437
481
|
undo: "`curviate core message delete <chat_id> <message_id>` removes the message; the chat stays and the recipient may have read it."
|
|
438
482
|
},
|
|
439
483
|
errors: { ...AS_ACCOUNT, ...BUDGET, ...TARGET, RECIPIENT_UNREACHABLE: "LinkedIn will not let the Account message this person." },
|
|
440
484
|
examples: [
|
|
441
|
-
'curviate core message new --to janesmith "Hi Jane, enjoyed your post on agent evals."'
|
|
485
|
+
'curviate core message new --to janesmith "Hi Jane, enjoyed your post on agent evals."',
|
|
486
|
+
'curviate core message new --to janesmith --to ACoAAAexample --subject "Q4 intro" "Hi both, meet each other." --preview',
|
|
487
|
+
'curviate core message new --to janesmith --share-job 4012345678 "Thought of you for this one."'
|
|
442
488
|
]
|
|
443
489
|
},
|
|
444
490
|
args: {
|
|
@@ -446,15 +492,16 @@ var messageNewCommand = defineCommand({
|
|
|
446
492
|
...WRITE_FLAGS,
|
|
447
493
|
to: {
|
|
448
494
|
type: "string",
|
|
449
|
-
description: "Recipient: LinkedIn profile URL (e.g. https://www.linkedin.com/in/some-slug), bare slug (e.g. some-slug), or provider ID (e.g. ACoAAA...). URL and slug inputs resolve the provider ID automatically.",
|
|
495
|
+
description: "Recipient (repeatable): LinkedIn profile URL (e.g. https://www.linkedin.com/in/some-slug), bare slug (e.g. some-slug), or provider ID (e.g. ACoAAA...). URL and slug inputs resolve the provider ID automatically. One --to starts a direct chat; two or more different people start a group chat. A person named twice counts once.",
|
|
450
496
|
required: true
|
|
451
497
|
},
|
|
452
498
|
text: { type: "positional", stdinArg: true, description: "Opening message text. Pass - to read from stdin (e.g. via heredoc or pipe)." },
|
|
453
499
|
subject: {
|
|
454
500
|
type: "string",
|
|
455
|
-
description: "Optional conversation name / subject line (at most 200 characters). Omit it for an unnamed chat; an empty value is a usage error."
|
|
501
|
+
description: "Optional conversation name / subject line (at most 200 characters). The group's name when there are two or more people. Omit it for an unnamed chat; an empty value is a usage error."
|
|
456
502
|
},
|
|
457
|
-
attach: { type: "string", description: "File to attach (repeatable)." }
|
|
503
|
+
attach: { type: "string", description: "File to attach (repeatable). Not with --share-post or --share-job. A voice note stays out of groups." },
|
|
504
|
+
...SHARE_ARGS
|
|
458
505
|
},
|
|
459
506
|
async run({ args }) {
|
|
460
507
|
const flags = args;
|
|
@@ -742,7 +789,8 @@ var messageSendCommand = defineCommand({
|
|
|
742
789
|
},
|
|
743
790
|
errors: { ...AS_ACCOUNT, ...BUDGET, ...TARGET, RECIPIENT_UNREACHABLE: "LinkedIn will not let the Account message this person.", CHAT_NOT_VISIBLE: "the chat is not visible to the Account." },
|
|
744
791
|
examples: [
|
|
745
|
-
'curviate core message send 2-YTQ3ODU3Njgt "Thanks, that makes sense."'
|
|
792
|
+
'curviate core message send 2-YTQ3ODU3Njgt "Thanks, that makes sense."',
|
|
793
|
+
'curviate core message send 2-YTQ3ODU3Njgt --share-post 7380123456789012345 "This is the post I meant." --preview'
|
|
746
794
|
]
|
|
747
795
|
},
|
|
748
796
|
args: {
|
|
@@ -753,7 +801,8 @@ var messageSendCommand = defineCommand({
|
|
|
753
801
|
description: "Chat ID or LinkedIn messaging thread URL. A COMPANY_ chat id sends as the company page; any other chat id sends as the connected member."
|
|
754
802
|
},
|
|
755
803
|
text: { type: "positional", stdinArg: true, description: "Message text. Pass - to read from stdin (e.g. via heredoc or pipe)." },
|
|
756
|
-
attach: { type: "string", description: "File to attach (repeatable)." }
|
|
804
|
+
attach: { type: "string", description: "File to attach (repeatable). Not with --share-post or --share-job." },
|
|
805
|
+
...SHARE_ARGS
|
|
757
806
|
},
|
|
758
807
|
async run({ args }) {
|
|
759
808
|
const flags = args;
|
|
@@ -815,7 +864,7 @@ var MESSAGE_SUBCOMMANDS = [
|
|
|
815
864
|
"inmail",
|
|
816
865
|
"inmail-balance"
|
|
817
866
|
];
|
|
818
|
-
var MESSAGE_USAGE = 'Usage: curviate core message new --to <attendee
|
|
867
|
+
var MESSAGE_USAGE = 'Usage: curviate core message new --to <attendee>... "<text>" [--subject <s>] [--attach <file>... | --share-post <id> | --share-job <id>]\n curviate core message send <chat_id> "<text>" [--attach <file>... | --share-post <id> | --share-job <id>]\n curviate core message <chat_id> "<text>" [--attach <file>... | --share-post <id> | --share-job <id>]\n curviate core message get <chat_id> <message_id>\n curviate core message edit <chat_id> <message_id> "<text>"\n curviate core message delete <chat_id> <message_id>\n curviate core message react <chat_id> <message_id> <emoji>\n curviate core message attachment <chat_id> <message_id> <attachment_id> [-o <file>]\n curviate core message inmail --to <id> --subject <s> "<text>"\n curviate core message inmail-balance\n';
|
|
819
868
|
function guardBareMessageForm(chatId, out) {
|
|
820
869
|
if (!looksLikeCommandWord(chatId)) return;
|
|
821
870
|
const suggestion = nearestSubcommand(chatId, [...MESSAGE_SUBCOMMANDS]);
|
|
@@ -863,7 +912,8 @@ var messageCommand = defineCommand({
|
|
|
863
912
|
required: false
|
|
864
913
|
},
|
|
865
914
|
text: { type: "positional", stdinArg: true, description: "Message text. Pass - to read from stdin.", required: false },
|
|
866
|
-
attach: { type: "string", description: "File to attach (repeatable)." }
|
|
915
|
+
attach: { type: "string", description: "File to attach (repeatable). Not with --share-post or --share-job." },
|
|
916
|
+
...SHARE_ARGS
|
|
867
917
|
},
|
|
868
918
|
subCommands: {
|
|
869
919
|
new: messageNewCommand,
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
requireAccount
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-HOS3JH4L.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-5YQXZIFH.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-GGJTO3PN.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-UFHZGBFD.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-I3HD5UFH.js";
|
|
40
40
|
import {
|
|
41
41
|
GLOBAL_FLAGS,
|
|
42
42
|
READ_SINGLE_FLAGS,
|
|
@@ -501,12 +501,12 @@ 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-SSPUBHAH.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-IHF7GMNG.js").then((m) => m.contactListsCommand)),
|
|
508
|
+
tags: lazy("contactTags", () => import("./contact-groups-IHF7GMNG.js").then((m) => m.contactTagsCommand)),
|
|
509
|
+
imports: lazy("contactImports", () => import("./contact-import-SSPUBHAH.js").then((m) => m.contactImportsCommand))
|
|
510
510
|
},
|
|
511
511
|
async run() {
|
|
512
512
|
const { showHelp } = await import("./examples-74FXGJ7X.js");
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
outputOpts,
|
|
14
14
|
rootClient,
|
|
15
15
|
usage
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-GGJTO3PN.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-UFHZGBFD.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-I3HD5UFH.js";
|
|
35
35
|
import {
|
|
36
36
|
GLOBAL_FLAGS,
|
|
37
37
|
READ_SINGLE_FLAGS,
|
package/dist/cli.js
CHANGED
|
@@ -45,30 +45,30 @@ 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
|
-
motion: lazy("motion", () => import("./motion-
|
|
54
|
-
enrollment: lazy("enrollment", () => import("./enrollment-
|
|
55
|
-
contact: lazy("contact", () => import("./contact-
|
|
56
|
-
"do-not-contact": lazy("do-not-contact", () => import("./do-not-contact-
|
|
57
|
-
unibox: lazy("unibox", () => import("./unibox-
|
|
58
|
-
network: lazy("network", () => import("./network-
|
|
59
|
-
analytics: lazy("analytics", () => import("./analytics-
|
|
60
|
-
notification: lazy("notification", () => import("./notifications-
|
|
61
|
-
export: lazy("export", () => import("./export-
|
|
62
|
-
billing: lazy("billing", () => import("./billing-
|
|
63
|
-
tier: lazy("tier", () => import("./tier-
|
|
64
|
-
team: lazy("team", () => import("./team-
|
|
65
|
-
incoming: lazy("incoming", () => import("./incoming-
|
|
66
|
-
beta: lazy("beta", () => import("./beta-consent-
|
|
67
|
-
webhook: lazy("webhook", () => import("./webhook-
|
|
48
|
+
setup: lazy("setup", () => import("./setup-RFSXQVN6.js").then((m) => m.setupCommand)),
|
|
49
|
+
doctor: lazy("doctor", () => import("./doctor-Q3434Q7N.js").then((m) => m.doctorCommand)),
|
|
50
|
+
login: lazy("login", () => import("./login-BD7JQXGX.js").then((m) => m.loginCommand)),
|
|
51
|
+
config: lazy("config", () => import("./config-OESEJHKZ.js").then((m) => m.configCommand)),
|
|
52
|
+
account: lazy("account", () => import("./account-WF27VTZF.js").then((m) => m.accountCommand)),
|
|
53
|
+
motion: lazy("motion", () => import("./motion-QSANYJKR.js").then((m) => m.motionCommand)),
|
|
54
|
+
enrollment: lazy("enrollment", () => import("./enrollment-YQMSDXVJ.js").then((m) => m.enrollmentCommand)),
|
|
55
|
+
contact: lazy("contact", () => import("./contact-XE7HK4RI.js").then((m) => m.contactCommand)),
|
|
56
|
+
"do-not-contact": lazy("do-not-contact", () => import("./do-not-contact-LOUCA7JT.js").then((m) => m.doNotContactCommand)),
|
|
57
|
+
unibox: lazy("unibox", () => import("./unibox-LFTLITLA.js").then((m) => m.uniboxCommand)),
|
|
58
|
+
network: lazy("network", () => import("./network-A5M6SLRI.js").then((m) => m.networkCommand)),
|
|
59
|
+
analytics: lazy("analytics", () => import("./analytics-Z7AE5JEI.js").then((m) => m.analyticsCommand)),
|
|
60
|
+
notification: lazy("notification", () => import("./notifications-SU7NKFGF.js").then((m) => m.notificationsCommand)),
|
|
61
|
+
export: lazy("export", () => import("./export-F6ZFNZ7L.js").then((m) => m.exportCommand)),
|
|
62
|
+
billing: lazy("billing", () => import("./billing-TYXPR6ZC.js").then((m) => m.billingCommand)),
|
|
63
|
+
tier: lazy("tier", () => import("./tier-JQYS4MMF.js").then((m) => m.tierCommand)),
|
|
64
|
+
team: lazy("team", () => import("./team-WSRM74PS.js").then((m) => m.teamCommand)),
|
|
65
|
+
incoming: lazy("incoming", () => import("./incoming-AA3MTRAG.js").then((m) => m.incomingCommand)),
|
|
66
|
+
beta: lazy("beta", () => import("./beta-consent-VETVR6KP.js").then((m) => m.betaCommand)),
|
|
67
|
+
webhook: lazy("webhook", () => import("./webhook-HX2NOPNE.js").then((m) => m.webhookCommand)),
|
|
68
68
|
// The LinkedIn building blocks. Reserved product groups
|
|
69
69
|
// (unibox, network, analytics, team) land
|
|
70
70
|
// between `enrollment` and `webhook` with their owning specs.
|
|
71
|
-
core: lazy("core", () => import("./core-
|
|
71
|
+
core: lazy("core", () => import("./core-524AMFTQ.js").then((m) => m.coreCommand))
|
|
72
72
|
},
|
|
73
73
|
async run() {
|
|
74
74
|
const { showHelp } = await import("./examples-74FXGJ7X.js");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
resolveMemberOrMeProviderId
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-EHTSCHKM.js";
|
|
5
5
|
import {
|
|
6
6
|
AttachError,
|
|
7
7
|
describeAttachment,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
import "./chunk-UEAX6KUB.js";
|
|
17
17
|
import {
|
|
18
18
|
requireAccount
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-HOS3JH4L.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-UFHZGBFD.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-I3HD5UFH.js";
|
|
41
41
|
import {
|
|
42
42
|
GLOBAL_FLAGS,
|
|
43
43
|
WRITE_SINGLE_FLAGS,
|