@curviate/cli 0.21.0 → 0.22.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 +190 -116
- package/README.md +18 -18
- package/dist/{account-A3FOYUKC.js → account-QRGWUQXF.js} +25 -25
- package/dist/{chunk-EEMJDJ4W.js → chunk-H6XD3F66.js} +7 -0
- package/dist/{chunk-LMVDURUZ.js → chunk-JA3NNST6.js} +35 -4
- package/dist/{chunk-M6UDWFHX.js → chunk-PMRQXBCP.js} +1 -1
- package/dist/{chunk-ROULHEFW.js → chunk-RFUO2G3M.js} +4 -3
- package/dist/{chunk-Q7XG2VIF.js → chunk-T5LPGAGJ.js} +6 -6
- package/dist/cli.js +58 -26
- package/dist/{comment-RPLZHFJQ.js → comment-MCGXFMN4.js} +3 -3
- package/dist/{company-DFJK2RHM.js → company-WDDLWP7E.js} +12 -12
- package/dist/{connect-ELSSMOIC.js → connect-5OROSY5C.js} +12 -12
- package/dist/{exit-codes-63JE5GM5.js → exit-codes-KAVZN5BQ.js} +1 -1
- package/dist/{feed-23Z7OQNL.js → feed-SFVYEAYP.js} +3 -3
- package/dist/{group-52MP24W3.js → group-HSZY2IJU.js} +3 -3
- package/dist/{inbox-G6KNWWLI.js → inbox-L6JBGZIB.js} +4 -4
- package/dist/{inboxes-NTTYCQPM.js → inboxes-UIO74C5Q.js} +5 -5
- package/dist/{job-WOPIAHOR.js → job-75ML7R7I.js} +4 -4
- package/dist/{message-KJXY5RCD.js → message-DAQHRBSJ.js} +2 -2
- package/dist/{notification-MNEABNVW.js → notification-DYJN4ZHN.js} +3 -3
- package/dist/{post-A7YZWBFG.js → post-RGDOCGC4.js} +5 -5
- package/dist/{profile-XOMDIYSY.js → profile-TJS2YAZD.js} +8 -8
- package/dist/{recruiter-CCLG4PM4.js → recruiter-NSM33IEK.js} +10 -10
- package/dist/{sales-nav-5ZRE2UAQ.js → sales-nav-5O7FR57S.js} +6 -6
- package/dist/{search-NDESJC3Y.js → search-TDSLK2MB.js} +13 -13
- package/dist/{webhook-TNZF3FMN.js → webhook-7ESDSIRU.js} +9 -9
- package/package.json +4 -3
package/dist/cli.js
CHANGED
|
@@ -78,6 +78,15 @@ async function nodeName(cmd) {
|
|
|
78
78
|
const meta = await resolveValue(cmd.meta ?? {});
|
|
79
79
|
return meta.name ?? "this command";
|
|
80
80
|
}
|
|
81
|
+
function renderPath(path) {
|
|
82
|
+
const parts = path[0] === "curviate" ? path.slice(1) : path;
|
|
83
|
+
return ["curviate", ...parts].join(" ");
|
|
84
|
+
}
|
|
85
|
+
function arityPhrase(count) {
|
|
86
|
+
if (count === 0) return "no positional arguments";
|
|
87
|
+
if (count === 1) return "1 positional argument";
|
|
88
|
+
return `${count} positional arguments`;
|
|
89
|
+
}
|
|
81
90
|
function positionalTokens(rawArgs, booleanFlags) {
|
|
82
91
|
const out = [];
|
|
83
92
|
let afterDoubleDash = false;
|
|
@@ -104,6 +113,24 @@ function positionalTokens(rawArgs, booleanFlags) {
|
|
|
104
113
|
}
|
|
105
114
|
return out;
|
|
106
115
|
}
|
|
116
|
+
async function extraPositionals(cmd, rawArgs) {
|
|
117
|
+
const booleanFlags = await booleanFlagNames(cmd);
|
|
118
|
+
const positionals = positionalTokens(rawArgs, booleanFlags);
|
|
119
|
+
const declaredCount = await nodePositionalCount(cmd);
|
|
120
|
+
return positionals.slice(declaredCount);
|
|
121
|
+
}
|
|
122
|
+
async function assertLeafConsumesPositionals(leaf, leafArgs, path, siblings) {
|
|
123
|
+
const extras = await extraPositionals(leaf, leafArgs);
|
|
124
|
+
if (extras.length === 0) return;
|
|
125
|
+
const token = extras[0].token;
|
|
126
|
+
const form = renderPath(path);
|
|
127
|
+
const arity = arityPhrase(await nodePositionalCount(leaf));
|
|
128
|
+
const hint = siblings && Object.prototype.hasOwnProperty.call(siblings, token) ? `Did you mean \`${renderPath([...path.slice(0, -1), token])}\`?` : void 0;
|
|
129
|
+
usageError(
|
|
130
|
+
`unexpected argument \`${token}\` after \`${form}\`. \`${form}\` takes ${arity}. Run \`${form} --help\` for its usage.`,
|
|
131
|
+
hint
|
|
132
|
+
);
|
|
133
|
+
}
|
|
107
134
|
async function declaredArgNames(cmd) {
|
|
108
135
|
const names = /* @__PURE__ */ new Set();
|
|
109
136
|
const argsDef = await resolveValue(cmd.args ?? {});
|
|
@@ -155,7 +182,8 @@ function usageError(message, hint) {
|
|
|
155
182
|
process.stderr.write("Run `curviate --help` for usage.\n");
|
|
156
183
|
process.exit(2);
|
|
157
184
|
}
|
|
158
|
-
async function resolveLeaf(cmd, rawArgs) {
|
|
185
|
+
async function resolveLeaf(cmd, rawArgs, descent) {
|
|
186
|
+
const here = descent ?? { path: [await nodeName(cmd)] };
|
|
159
187
|
const subCommands = await resolveValue(cmd.subCommands);
|
|
160
188
|
if (subCommands && Object.keys(subCommands).length > 0) {
|
|
161
189
|
const idx = firstPositionalIndex(rawArgs);
|
|
@@ -163,7 +191,10 @@ async function resolveLeaf(cmd, rawArgs) {
|
|
|
163
191
|
const hasBarePositional = await nodeHasPositional(cmd);
|
|
164
192
|
if (token !== void 0 && subCommands[token]) {
|
|
165
193
|
const sub = await resolveValue(subCommands[token]);
|
|
166
|
-
return resolveLeaf(sub, rawArgs.slice(idx + 1)
|
|
194
|
+
return resolveLeaf(sub, rawArgs.slice(idx + 1), {
|
|
195
|
+
path: [...here.path, token],
|
|
196
|
+
siblings: subCommands
|
|
197
|
+
});
|
|
167
198
|
}
|
|
168
199
|
if (token !== void 0) {
|
|
169
200
|
const hint = successorHint(await nodeName(cmd), token);
|
|
@@ -172,16 +203,16 @@ async function resolveLeaf(cmd, rawArgs) {
|
|
|
172
203
|
}
|
|
173
204
|
}
|
|
174
205
|
if (token !== void 0 && hasBarePositional) {
|
|
175
|
-
const
|
|
176
|
-
const positionals = positionalTokens(rawArgs, booleanFlags);
|
|
177
|
-
const declaredCount = await nodePositionalCount(cmd);
|
|
178
|
-
const extras = positionals.slice(declaredCount);
|
|
206
|
+
const extras = await extraPositionals(cmd, rawArgs);
|
|
179
207
|
if (extras.length > 0) {
|
|
180
208
|
const first = extras[0];
|
|
181
209
|
if (extras.length === 1 && Object.prototype.hasOwnProperty.call(subCommands, first.token)) {
|
|
182
210
|
const sub = await resolveValue(subCommands[first.token]);
|
|
183
211
|
const remaining = rawArgs.filter((_, i) => i !== first.index);
|
|
184
|
-
return resolveLeaf(sub, remaining
|
|
212
|
+
return resolveLeaf(sub, remaining, {
|
|
213
|
+
path: [...here.path, first.token],
|
|
214
|
+
siblings: subCommands
|
|
215
|
+
});
|
|
185
216
|
}
|
|
186
217
|
const name = await nodeName(cmd);
|
|
187
218
|
usageError(
|
|
@@ -195,6 +226,7 @@ async function resolveLeaf(cmd, rawArgs) {
|
|
|
195
226
|
}
|
|
196
227
|
return { leaf: cmd, leafArgs: rawArgs };
|
|
197
228
|
}
|
|
229
|
+
await assertLeafConsumesPositionals(cmd, rawArgs, here.path, here.siblings);
|
|
198
230
|
return { leaf: cmd, leafArgs: rawArgs };
|
|
199
231
|
}
|
|
200
232
|
async function dispatch(root, rawArgs) {
|
|
@@ -259,31 +291,31 @@ var main = defineCommand({
|
|
|
259
291
|
version: pkg.version,
|
|
260
292
|
description: "Official command-line interface for the Curviate API."
|
|
261
293
|
},
|
|
262
|
-
// Subcommand registry
|
|
294
|
+
// Subcommand registry, names and descriptions are static for help rendering;
|
|
263
295
|
// the handler implementation is loaded lazily on first invocation.
|
|
264
296
|
subCommands: {
|
|
265
297
|
login: () => import("./login-ZLDDIAFW.js").then((m) => m.loginCommand),
|
|
266
298
|
config: () => import("./config-FPWWYG7G.js").then((m) => m.configCommand),
|
|
267
299
|
// ---------------------------------------------------------------------------
|
|
268
|
-
// Noun groups
|
|
300
|
+
// Noun groups, lazy-loaded on first invocation.
|
|
269
301
|
// ---------------------------------------------------------------------------
|
|
270
|
-
profile: () => import("./profile-
|
|
271
|
-
company: () => import("./company-
|
|
272
|
-
job: () => import("./job-
|
|
273
|
-
connect: () => import("./connect-
|
|
274
|
-
search: () => import("./search-
|
|
275
|
-
inbox: () => import("./inbox-
|
|
276
|
-
inboxes: () => import("./inboxes-
|
|
277
|
-
message: () => import("./message-
|
|
278
|
-
post: () => import("./post-
|
|
279
|
-
comment: () => import("./comment-
|
|
280
|
-
account: () => import("./account-
|
|
281
|
-
webhook: () => import("./webhook-
|
|
282
|
-
"sales-nav": () => import("./sales-nav-
|
|
283
|
-
recruiter: () => import("./recruiter-
|
|
284
|
-
group: () => import("./group-
|
|
285
|
-
feed: () => import("./feed-
|
|
286
|
-
notification: () => import("./notification-
|
|
302
|
+
profile: () => import("./profile-TJS2YAZD.js").then((m) => m.profileCommand),
|
|
303
|
+
company: () => import("./company-WDDLWP7E.js").then((m) => m.companyCommand),
|
|
304
|
+
job: () => import("./job-75ML7R7I.js").then((m) => m.jobCommand),
|
|
305
|
+
connect: () => import("./connect-5OROSY5C.js").then((m) => m.connectCommand),
|
|
306
|
+
search: () => import("./search-TDSLK2MB.js").then((m) => m.searchCommand),
|
|
307
|
+
inbox: () => import("./inbox-L6JBGZIB.js").then((m) => m.inboxCommand),
|
|
308
|
+
inboxes: () => import("./inboxes-UIO74C5Q.js").then((m) => m.inboxesCommand),
|
|
309
|
+
message: () => import("./message-DAQHRBSJ.js").then((m) => m.messageCommand),
|
|
310
|
+
post: () => import("./post-RGDOCGC4.js").then((m) => m.postCommand),
|
|
311
|
+
comment: () => import("./comment-MCGXFMN4.js").then((m) => m.commentCommand),
|
|
312
|
+
account: () => import("./account-QRGWUQXF.js").then((m) => m.accountCommand),
|
|
313
|
+
webhook: () => import("./webhook-7ESDSIRU.js").then((m) => m.webhookCommand),
|
|
314
|
+
"sales-nav": () => import("./sales-nav-5O7FR57S.js").then((m) => m.salesNavCommand),
|
|
315
|
+
recruiter: () => import("./recruiter-NSM33IEK.js").then((m) => m.recruiterCommand),
|
|
316
|
+
group: () => import("./group-HSZY2IJU.js").then((m) => m.groupCommand),
|
|
317
|
+
feed: () => import("./feed-SFVYEAYP.js").then((m) => m.feedCommand),
|
|
318
|
+
notification: () => import("./notification-DYJN4ZHN.js").then((m) => m.notificationCommand)
|
|
287
319
|
},
|
|
288
320
|
async run() {
|
|
289
321
|
const { runMain } = await import("citty");
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
pageDelayFromFlags,
|
|
13
13
|
streamAll
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-H6XD3F66.js";
|
|
15
15
|
import "./chunk-DMQZEPQE.js";
|
|
16
16
|
import {
|
|
17
17
|
buildPreviewOutput
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
renderSuccess,
|
|
23
23
|
renderUnexpectedError,
|
|
24
24
|
resolveEffectiveConfig
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-JA3NNST6.js";
|
|
26
26
|
import {
|
|
27
27
|
GLOBAL_FLAGS,
|
|
28
28
|
WRITE_SINGLE_FLAGS
|
|
@@ -70,7 +70,7 @@ function buildListQuery(flags) {
|
|
|
70
70
|
async function handleSdkError(err, outOpts, out) {
|
|
71
71
|
const { CurviateError } = await import("@curviate/sdk");
|
|
72
72
|
if (err instanceof CurviateError) {
|
|
73
|
-
const { getExitCode } = await import("./exit-codes-
|
|
73
|
+
const { getExitCode } = await import("./exit-codes-KAVZN5BQ.js");
|
|
74
74
|
renderError(err, outOpts, out);
|
|
75
75
|
process.exit(getExitCode(err.code));
|
|
76
76
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
sentAsNotice
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-T5LPGAGJ.js";
|
|
5
5
|
import "./chunk-HOQ7EUHJ.js";
|
|
6
6
|
import {
|
|
7
7
|
AttachError,
|
|
@@ -16,11 +16,11 @@ import {
|
|
|
16
16
|
slimSearchJobs,
|
|
17
17
|
slimSearchPeople,
|
|
18
18
|
slimSearchPosts
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-RFUO2G3M.js";
|
|
20
20
|
import {
|
|
21
21
|
pageDelayFromFlags,
|
|
22
22
|
streamAll
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-H6XD3F66.js";
|
|
24
24
|
import "./chunk-UWO2D4HW.js";
|
|
25
25
|
import {
|
|
26
26
|
resolveIdentifier
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
renderSuccess,
|
|
35
35
|
renderUnexpectedError,
|
|
36
36
|
resolveEffectiveConfig
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-JA3NNST6.js";
|
|
38
38
|
import {
|
|
39
39
|
GLOBAL_FLAGS,
|
|
40
40
|
WRITE_FLAGS
|
|
@@ -89,7 +89,7 @@ async function resolveCompanyId(ns, raw) {
|
|
|
89
89
|
async function handleSdkError(err, outOpts, out) {
|
|
90
90
|
const { CurviateError } = await import("@curviate/sdk");
|
|
91
91
|
if (err instanceof CurviateError) {
|
|
92
|
-
const { getExitCode } = await import("./exit-codes-
|
|
92
|
+
const { getExitCode } = await import("./exit-codes-KAVZN5BQ.js");
|
|
93
93
|
renderError(err, outOpts, out);
|
|
94
94
|
process.exit(getExitCode(err.code));
|
|
95
95
|
}
|
|
@@ -597,14 +597,14 @@ var companyInvitableFollowersCommand = defineCommand({
|
|
|
597
597
|
var companyFollowInviteCommand = defineCommand({
|
|
598
598
|
meta: {
|
|
599
599
|
name: "follow-invite",
|
|
600
|
-
description: "Invite the account's 1st-degree connections to follow the administered company page. Write, admin-gated (the account must administer the page with invite rights). Pass the AC
|
|
600
|
+
description: "Invite the account's 1st-degree connections to follow the administered company page. Write, admin-gated (the account must administer the page with invite rights). Pass the AC... member ids from `company invitable-followers`, one --invitee per invitee. All-or-nothing: for an all-valid request you get one outcome per invitee, in request order (invited/already_invited/ineligible/not_found); if any invitee id is invalid the whole request rejects with a 404, not a partial result. Re-inviting an already-invited member is a safe no-op (the same invitation id, never a duplicate)."
|
|
601
601
|
},
|
|
602
602
|
args: {
|
|
603
603
|
...WRITE_FLAGS,
|
|
604
604
|
id: { type: "positional", description: "Company identifier (URL, slug, or numeric id), resolved to the numeric id first, including under --preview." },
|
|
605
605
|
invitee: {
|
|
606
606
|
type: "string",
|
|
607
|
-
description: "AC
|
|
607
|
+
description: "AC... member id to invite (from `company invitable-followers`). Repeatable, at least one required, max 50 per request."
|
|
608
608
|
}
|
|
609
609
|
},
|
|
610
610
|
async run({ args }) {
|
|
@@ -705,7 +705,7 @@ var companyChatCommand = defineCommand({
|
|
|
705
705
|
args: {
|
|
706
706
|
...GLOBAL_FLAGS,
|
|
707
707
|
id: { type: "positional", description: "Company identifier (URL, slug, or numeric id), a slug/URL is resolved to the numeric id first." },
|
|
708
|
-
chatId: { type: "positional", description: "The 2
|
|
708
|
+
chatId: { type: "positional", description: "The 2-... chat id from `company chats`, passed through verbatim." }
|
|
709
709
|
},
|
|
710
710
|
async run({ args }) {
|
|
711
711
|
const flags = args;
|
|
@@ -733,7 +733,7 @@ var companyMessagesCommand = defineCommand({
|
|
|
733
733
|
args: {
|
|
734
734
|
...GLOBAL_FLAGS,
|
|
735
735
|
id: { type: "positional", description: "Company identifier (URL, slug, or numeric id), a slug/URL is resolved to the numeric id first." },
|
|
736
|
-
chatId: { type: "positional", description: "The 2
|
|
736
|
+
chatId: { type: "positional", description: "The 2-... chat id from `company chats`, passed through verbatim." }
|
|
737
737
|
},
|
|
738
738
|
async run({ args }) {
|
|
739
739
|
const flags = args;
|
|
@@ -761,7 +761,7 @@ var companyMessageCommand = defineCommand({
|
|
|
761
761
|
args: {
|
|
762
762
|
...GLOBAL_FLAGS,
|
|
763
763
|
id: { type: "positional", description: "Company identifier (URL, slug, or numeric id), a slug/URL is resolved to the numeric id first." },
|
|
764
|
-
chatId: { type: "positional", description: "The 2
|
|
764
|
+
chatId: { type: "positional", description: "The 2-... chat id from `company chats`, passed through verbatim." },
|
|
765
765
|
messageId: { type: "positional", description: "The message id from `company messages`, passed through verbatim." }
|
|
766
766
|
},
|
|
767
767
|
async run({ args }) {
|
|
@@ -815,14 +815,14 @@ var companySearchChatsCommand = defineCommand({
|
|
|
815
815
|
var companyReplyCommand = defineCommand({
|
|
816
816
|
meta: {
|
|
817
817
|
name: "reply",
|
|
818
|
-
description: "Reply to a company-inbox conversation, as the page (write, admin-gated: the account must administer the page). Takes the normal 2
|
|
818
|
+
description: "Reply to a company-inbox conversation, as the page (write, admin-gated: the account must administer the page). Takes the normal 2-... chat id from `company chats`; the endpoint resolves the page mailbox internally from the company id. Reply-only, this cannot start a new conversation on the page's behalf. See also: `company chats` (the read that returns the chat id) and `message send` (the personal equivalent)."
|
|
819
819
|
},
|
|
820
820
|
args: {
|
|
821
821
|
...WRITE_FLAGS,
|
|
822
822
|
id: { type: "positional", description: "Company identifier (URL, slug, or numeric id), resolved to the numeric id first, including under --preview." },
|
|
823
823
|
chatId: {
|
|
824
824
|
type: "positional",
|
|
825
|
-
description: "The 2
|
|
825
|
+
description: "The 2-... chat id from `company chats`, passed through verbatim (no client-side check)."
|
|
826
826
|
},
|
|
827
827
|
text: { type: "positional", stdinArg: true, description: "Reply text. Pass - to read from stdin (e.g. via heredoc or pipe)." },
|
|
828
828
|
attach: { type: "string", description: "File to attach (repeatable)." }
|
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
slimInviteReceivedItem,
|
|
8
8
|
slimInviteSent,
|
|
9
9
|
slimInviteSentItem
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-RFUO2G3M.js";
|
|
11
11
|
import {
|
|
12
12
|
pageDelayFromFlags,
|
|
13
13
|
streamAll
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-H6XD3F66.js";
|
|
15
15
|
import {
|
|
16
16
|
resolveIdentifier
|
|
17
17
|
} from "./chunk-DMQZEPQE.js";
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
renderSuccess,
|
|
25
25
|
renderUnexpectedError,
|
|
26
26
|
resolveEffectiveConfig
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-JA3NNST6.js";
|
|
28
28
|
import {
|
|
29
29
|
GLOBAL_FLAGS,
|
|
30
30
|
WRITE_FLAGS
|
|
@@ -86,7 +86,7 @@ async function runConnectSend(client, flags, out) {
|
|
|
86
86
|
} catch (err) {
|
|
87
87
|
const { CurviateError } = await import("@curviate/sdk");
|
|
88
88
|
if (err instanceof CurviateError) {
|
|
89
|
-
const { getExitCode } = await import("./exit-codes-
|
|
89
|
+
const { getExitCode } = await import("./exit-codes-KAVZN5BQ.js");
|
|
90
90
|
renderError(err, outOpts, out);
|
|
91
91
|
process.exit(getExitCode(err.code));
|
|
92
92
|
}
|
|
@@ -124,7 +124,7 @@ async function runConnectSent(client, flags, out) {
|
|
|
124
124
|
} catch (err) {
|
|
125
125
|
const { CurviateError } = await import("@curviate/sdk");
|
|
126
126
|
if (err instanceof CurviateError) {
|
|
127
|
-
const { getExitCode } = await import("./exit-codes-
|
|
127
|
+
const { getExitCode } = await import("./exit-codes-KAVZN5BQ.js");
|
|
128
128
|
renderError(err, outOpts, out);
|
|
129
129
|
process.exit(getExitCode(err.code));
|
|
130
130
|
}
|
|
@@ -162,7 +162,7 @@ async function runConnectReceived(client, flags, out) {
|
|
|
162
162
|
} catch (err) {
|
|
163
163
|
const { CurviateError } = await import("@curviate/sdk");
|
|
164
164
|
if (err instanceof CurviateError) {
|
|
165
|
-
const { getExitCode } = await import("./exit-codes-
|
|
165
|
+
const { getExitCode } = await import("./exit-codes-KAVZN5BQ.js");
|
|
166
166
|
renderError(err, outOpts, out);
|
|
167
167
|
process.exit(getExitCode(err.code));
|
|
168
168
|
}
|
|
@@ -191,7 +191,7 @@ async function runConnectAccept(client, flags, out) {
|
|
|
191
191
|
} catch (err) {
|
|
192
192
|
const { CurviateError } = await import("@curviate/sdk");
|
|
193
193
|
if (err instanceof CurviateError) {
|
|
194
|
-
const { getExitCode } = await import("./exit-codes-
|
|
194
|
+
const { getExitCode } = await import("./exit-codes-KAVZN5BQ.js");
|
|
195
195
|
renderError(err, outOpts, out);
|
|
196
196
|
process.exit(getExitCode(err.code));
|
|
197
197
|
}
|
|
@@ -220,7 +220,7 @@ async function runConnectDecline(client, flags, out) {
|
|
|
220
220
|
} catch (err) {
|
|
221
221
|
const { CurviateError } = await import("@curviate/sdk");
|
|
222
222
|
if (err instanceof CurviateError) {
|
|
223
|
-
const { getExitCode } = await import("./exit-codes-
|
|
223
|
+
const { getExitCode } = await import("./exit-codes-KAVZN5BQ.js");
|
|
224
224
|
renderError(err, outOpts, out);
|
|
225
225
|
process.exit(getExitCode(err.code));
|
|
226
226
|
}
|
|
@@ -249,7 +249,7 @@ async function runConnectCancel(client, flags, out) {
|
|
|
249
249
|
} catch (err) {
|
|
250
250
|
const { CurviateError } = await import("@curviate/sdk");
|
|
251
251
|
if (err instanceof CurviateError) {
|
|
252
|
-
const { getExitCode } = await import("./exit-codes-
|
|
252
|
+
const { getExitCode } = await import("./exit-codes-KAVZN5BQ.js");
|
|
253
253
|
renderError(err, outOpts, out);
|
|
254
254
|
process.exit(getExitCode(err.code));
|
|
255
255
|
}
|
|
@@ -404,18 +404,18 @@ function guardBareConnectForm(id, out) {
|
|
|
404
404
|
var connectCommand = defineCommand({
|
|
405
405
|
meta: {
|
|
406
406
|
name: "connect",
|
|
407
|
-
description: "Send or manage connection invitations. Connection requests may take 10
|
|
407
|
+
description: "Send or manage connection invitations. Connection requests may take 10-30 seconds to appear in the recipient's received list (LinkedIn propagation delay)."
|
|
408
408
|
},
|
|
409
409
|
args: {
|
|
410
410
|
...WRITE_FLAGS,
|
|
411
411
|
id: {
|
|
412
412
|
type: "positional",
|
|
413
|
-
description: "Recipient's LinkedIn URL, public slug, or provider_id (ACoAAA
|
|
413
|
+
description: "Recipient's LinkedIn URL, public slug, or provider_id (ACoAAA... from `curviate profile`). LinkedIn URN (`urn:li:member:N`) also accepted but the numeric member ID is not exposed by this API.",
|
|
414
414
|
required: false
|
|
415
415
|
},
|
|
416
416
|
note: {
|
|
417
417
|
type: "string",
|
|
418
|
-
description: "Personalized message shown to the recipient alongside the connection request (
|
|
418
|
+
description: "Personalized message shown to the recipient alongside the connection request (<=300 chars; LinkedIn cap). Omit to send a generic note. Personalized messages increase acceptance rates."
|
|
419
419
|
}
|
|
420
420
|
},
|
|
421
421
|
subCommands: {
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import {
|
|
3
3
|
pageDelayFromFlags,
|
|
4
4
|
streamAll
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-H6XD3F66.js";
|
|
6
6
|
import {
|
|
7
7
|
createClient,
|
|
8
8
|
renderError,
|
|
9
9
|
renderSuccess,
|
|
10
10
|
renderUnexpectedError,
|
|
11
11
|
resolveEffectiveConfig
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-JA3NNST6.js";
|
|
13
13
|
import {
|
|
14
14
|
GLOBAL_FLAGS
|
|
15
15
|
} from "./chunk-CUTMZWL6.js";
|
|
@@ -47,7 +47,7 @@ function resolveOutputOpts(flags) {
|
|
|
47
47
|
async function handleSdkError(err, outOpts, out) {
|
|
48
48
|
const { CurviateError } = await import("@curviate/sdk");
|
|
49
49
|
if (err instanceof CurviateError) {
|
|
50
|
-
const { getExitCode } = await import("./exit-codes-
|
|
50
|
+
const { getExitCode } = await import("./exit-codes-KAVZN5BQ.js");
|
|
51
51
|
renderError(err, outOpts, out);
|
|
52
52
|
process.exit(getExitCode(err.code));
|
|
53
53
|
}
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import {
|
|
3
3
|
pageDelayFromFlags,
|
|
4
4
|
streamAll
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-H6XD3F66.js";
|
|
6
6
|
import {
|
|
7
7
|
createClient,
|
|
8
8
|
renderError,
|
|
9
9
|
renderSuccess,
|
|
10
10
|
renderUnexpectedError,
|
|
11
11
|
resolveEffectiveConfig
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-JA3NNST6.js";
|
|
13
13
|
import {
|
|
14
14
|
GLOBAL_FLAGS,
|
|
15
15
|
READ_SINGLE_FLAGS
|
|
@@ -54,7 +54,7 @@ function resolveOutputOpts(flags) {
|
|
|
54
54
|
async function handleSdkError(err, outOpts, out) {
|
|
55
55
|
const { CurviateError } = await import("@curviate/sdk");
|
|
56
56
|
if (err instanceof CurviateError) {
|
|
57
|
-
const { getExitCode } = await import("./exit-codes-
|
|
57
|
+
const { getExitCode } = await import("./exit-codes-KAVZN5BQ.js");
|
|
58
58
|
renderError(err, outOpts, out);
|
|
59
59
|
process.exit(getExitCode(err.code));
|
|
60
60
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
pageDelayFromFlags,
|
|
4
4
|
streamAll
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-H6XD3F66.js";
|
|
6
6
|
import {
|
|
7
7
|
normalizeChatId
|
|
8
8
|
} from "./chunk-DMQZEPQE.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
renderSuccess,
|
|
16
16
|
renderUnexpectedError,
|
|
17
17
|
resolveEffectiveConfig
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-JA3NNST6.js";
|
|
19
19
|
import {
|
|
20
20
|
GLOBAL_FLAGS,
|
|
21
21
|
READ_SINGLE_FLAGS,
|
|
@@ -85,7 +85,7 @@ function validateLimitRange(raw, out) {
|
|
|
85
85
|
async function handleSdkError(err, outOpts, out) {
|
|
86
86
|
const { CurviateError } = await import("@curviate/sdk");
|
|
87
87
|
if (err instanceof CurviateError) {
|
|
88
|
-
const { getExitCode } = await import("./exit-codes-
|
|
88
|
+
const { getExitCode } = await import("./exit-codes-KAVZN5BQ.js");
|
|
89
89
|
renderError(err, outOpts, out);
|
|
90
90
|
process.exit(getExitCode(err.code));
|
|
91
91
|
}
|
|
@@ -229,7 +229,7 @@ var inboxListCommand = defineCommand({
|
|
|
229
229
|
unread: {
|
|
230
230
|
type: "boolean",
|
|
231
231
|
description: "Show unread chats only (--no-unread for read-only; omit for all)."
|
|
232
|
-
// No default
|
|
232
|
+
// No default -> three-way semantics: undefined when omitted, true for --unread, false for --no-unread
|
|
233
233
|
}
|
|
234
234
|
},
|
|
235
235
|
async run({ args }) {
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import {
|
|
3
3
|
pageDelayFromFlags,
|
|
4
4
|
streamAll
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-H6XD3F66.js";
|
|
6
6
|
import {
|
|
7
7
|
createClient,
|
|
8
8
|
renderError,
|
|
9
9
|
renderSuccess,
|
|
10
10
|
renderUnexpectedError,
|
|
11
11
|
resolveEffectiveConfig
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-JA3NNST6.js";
|
|
13
13
|
import {
|
|
14
14
|
GLOBAL_FLAGS,
|
|
15
15
|
READ_SINGLE_FLAGS
|
|
@@ -54,7 +54,7 @@ function resolveOutputOpts(flags) {
|
|
|
54
54
|
async function handleSdkError(err, outOpts, out) {
|
|
55
55
|
const { CurviateError } = await import("@curviate/sdk");
|
|
56
56
|
if (err instanceof CurviateError) {
|
|
57
|
-
const { getExitCode } = await import("./exit-codes-
|
|
57
|
+
const { getExitCode } = await import("./exit-codes-KAVZN5BQ.js");
|
|
58
58
|
renderError(err, outOpts, out);
|
|
59
59
|
process.exit(getExitCode(err.code));
|
|
60
60
|
}
|
|
@@ -121,7 +121,7 @@ var inboxesListCommand = defineCommand({
|
|
|
121
121
|
meta: { name: "list", description: "Discover the account's inboxes (personal + company pages)." },
|
|
122
122
|
args: {
|
|
123
123
|
// Single-object-shaped read: READ_SINGLE_FLAGS omits pagination flags
|
|
124
|
-
// (this response carries no cursor
|
|
124
|
+
// (this response carries no cursor, every inbox comes back in one call).
|
|
125
125
|
...READ_SINGLE_FLAGS,
|
|
126
126
|
kind: {
|
|
127
127
|
type: "string",
|
|
@@ -153,7 +153,7 @@ var inboxesListCommand = defineCommand({
|
|
|
153
153
|
var inboxesChatsCommand = defineCommand({
|
|
154
154
|
meta: {
|
|
155
155
|
name: "chats",
|
|
156
|
-
description: "List an inbox's conversations. Each chat id is send-ready: reply with `message send <chat_id> \"<text>\"`. A company inbox's chat id (e.g. COMPANY_83734124_2
|
|
156
|
+
description: "List an inbox's conversations. Each chat id is send-ready: reply with `message send <chat_id> \"<text>\"`. A company inbox's chat id (e.g. COMPANY_83734124_2-...) sends AS THE PAGE, no separate flag needed. Company inboxes are reply-only and cannot start a new conversation."
|
|
157
157
|
},
|
|
158
158
|
args: {
|
|
159
159
|
...GLOBAL_FLAGS,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
slimJob
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RFUO2G3M.js";
|
|
5
5
|
import {
|
|
6
6
|
DEFAULT_PAGE_DELAY_MS,
|
|
7
7
|
ndjsonModeNotice,
|
|
8
8
|
pageDelayFromFlags,
|
|
9
9
|
streamAll
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-H6XD3F66.js";
|
|
11
11
|
import {
|
|
12
12
|
BinaryOutputError,
|
|
13
13
|
writeBinaryOutput
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
renderSuccess,
|
|
25
25
|
renderUnexpectedError,
|
|
26
26
|
resolveEffectiveConfig
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-JA3NNST6.js";
|
|
28
28
|
import {
|
|
29
29
|
GLOBAL_FLAGS,
|
|
30
30
|
READ_SINGLE_FLAGS,
|
|
@@ -99,7 +99,7 @@ function requireEnum(value, allowed, flag, out) {
|
|
|
99
99
|
async function handleSdkError(err, outOpts, out) {
|
|
100
100
|
const { CurviateError } = await import("@curviate/sdk");
|
|
101
101
|
if (err instanceof CurviateError) {
|
|
102
|
-
const { getExitCode } = await import("./exit-codes-
|
|
102
|
+
const { getExitCode } = await import("./exit-codes-KAVZN5BQ.js");
|
|
103
103
|
renderError(err, outOpts, out);
|
|
104
104
|
process.exit(getExitCode(err.code));
|
|
105
105
|
}
|
|
@@ -13,13 +13,13 @@ import {
|
|
|
13
13
|
runMessageSend,
|
|
14
14
|
sentAsNotice,
|
|
15
15
|
willSendAsNotice
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-T5LPGAGJ.js";
|
|
17
17
|
import "./chunk-HOQ7EUHJ.js";
|
|
18
18
|
import "./chunk-BGZW6B7G.js";
|
|
19
19
|
import "./chunk-UWO2D4HW.js";
|
|
20
20
|
import "./chunk-DMQZEPQE.js";
|
|
21
21
|
import "./chunk-R3VLWLVV.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-JA3NNST6.js";
|
|
23
23
|
import "./chunk-CUTMZWL6.js";
|
|
24
24
|
import "./chunk-ZYURL5VK.js";
|
|
25
25
|
export {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
pageDelayFromFlags,
|
|
4
4
|
streamAll
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-H6XD3F66.js";
|
|
6
6
|
import {
|
|
7
7
|
buildPreviewOutput
|
|
8
8
|
} from "./chunk-R3VLWLVV.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
renderSuccess,
|
|
13
13
|
renderUnexpectedError,
|
|
14
14
|
resolveEffectiveConfig
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-JA3NNST6.js";
|
|
16
16
|
import {
|
|
17
17
|
GLOBAL_FLAGS,
|
|
18
18
|
WRITE_SINGLE_FLAGS
|
|
@@ -51,7 +51,7 @@ function resolveOutputOpts(flags) {
|
|
|
51
51
|
async function handleSdkError(err, outOpts, out) {
|
|
52
52
|
const { CurviateError } = await import("@curviate/sdk");
|
|
53
53
|
if (err instanceof CurviateError) {
|
|
54
|
-
const { getExitCode } = await import("./exit-codes-
|
|
54
|
+
const { getExitCode } = await import("./exit-codes-KAVZN5BQ.js");
|
|
55
55
|
renderError(err, outOpts, out);
|
|
56
56
|
process.exit(getExitCode(err.code));
|
|
57
57
|
}
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
pageDelayFromFlags,
|
|
12
12
|
streamAll
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-H6XD3F66.js";
|
|
14
14
|
import "./chunk-DMQZEPQE.js";
|
|
15
15
|
import {
|
|
16
16
|
buildPreviewOutput
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
renderSuccess,
|
|
22
22
|
renderUnexpectedError,
|
|
23
23
|
resolveEffectiveConfig
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-JA3NNST6.js";
|
|
25
25
|
import {
|
|
26
26
|
GLOBAL_FLAGS,
|
|
27
27
|
WRITE_FLAGS,
|
|
@@ -79,7 +79,7 @@ function normalizeAttachPaths(attach) {
|
|
|
79
79
|
async function handleSdkError(err, outOpts, out) {
|
|
80
80
|
const { CurviateError } = await import("@curviate/sdk");
|
|
81
81
|
if (err instanceof CurviateError) {
|
|
82
|
-
const { getExitCode } = await import("./exit-codes-
|
|
82
|
+
const { getExitCode } = await import("./exit-codes-KAVZN5BQ.js");
|
|
83
83
|
renderError(err, outOpts, out);
|
|
84
84
|
process.exit(getExitCode(err.code));
|
|
85
85
|
}
|
|
@@ -448,7 +448,7 @@ var postReactCommand = defineCommand({
|
|
|
448
448
|
reaction: {
|
|
449
449
|
type: "positional",
|
|
450
450
|
required: false,
|
|
451
|
-
description: "Write-side reaction (lowercase). Write values: like, celebrate, support, love, insightful, funny. Read-side vocabulary (in the value and user_reacted response fields): LIKE, PRAISE, APPRECIATION, EMPATHY, INTEREST, ENTERTAINMENT. Confirmed write
|
|
451
|
+
description: "Write-side reaction (lowercase). Write values: like, celebrate, support, love, insightful, funny. Read-side vocabulary (in the value and user_reacted response fields): LIKE, PRAISE, APPRECIATION, EMPATHY, INTEREST, ENTERTAINMENT. Confirmed write->read mappings: like=LIKE, celebrate=PRAISE, insightful=INTEREST. (support, love, and funny are valid write values; their read-side pairings are unconfirmed.)"
|
|
452
452
|
},
|
|
453
453
|
reactionAlias: {
|
|
454
454
|
type: "string",
|
|
@@ -606,7 +606,7 @@ var postCommand = defineCommand({
|
|
|
606
606
|
},
|
|
607
607
|
async run() {
|
|
608
608
|
process.stderr.write(
|
|
609
|
-
'Usage: curviate post <subcommand>\n get <post_id>\n create "<text>" [--attach <file
|
|
609
|
+
'Usage: curviate post <subcommand>\n get <post_id>\n create "<text>" [--attach <file>...]\n react <post_id> <reaction> [--as-organization <org_id>]\n reactions <post_id>\n delete <post_id>\n unreact <post_id> <reaction>\n saved\n save <post_id>\n unsave <post_id>\n user-posts <user_id>\n user-reactions <user_id>\n\nComment operations moved to the `comment` command group.\n'
|
|
610
610
|
);
|
|
611
611
|
}
|
|
612
612
|
});
|