@curviate/cli 0.21.1 → 0.23.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 +236 -116
- package/README.md +18 -18
- package/dist/{account-OIV73PXX.js → account-MIPWTAG5.js} +27 -27
- package/dist/chunk-3BO6GVS2.js +182 -0
- package/dist/{chunk-HZFK45IW.js → chunk-H6XD3F66.js} +1 -1
- package/dist/{chunk-VPKMJYIF.js → chunk-JA3NNST6.js} +9 -1
- package/dist/{chunk-OE7OMTCM.js → chunk-MBO4LBLY.js} +19 -23
- package/dist/{chunk-M6UDWFHX.js → chunk-PMRQXBCP.js} +1 -1
- package/dist/{chunk-WYRYCTUM.js → chunk-RFUO2G3M.js} +2 -2
- package/dist/{chunk-QJZ3LWOX.js → chunk-RJTG5YWE.js} +1 -1
- package/dist/{chunk-DMQZEPQE.js → chunk-UEAX6KUB.js} +10 -0
- package/dist/cli.js +58 -26
- package/dist/{comment-W4XTOTHN.js → comment-TUXC7K72.js} +19 -22
- package/dist/{company-NT4VO6JV.js → company-LHYDAO2C.js} +31 -34
- package/dist/{connect-VXWRLGQZ.js → connect-5S4TFQAF.js} +23 -26
- package/dist/{exit-codes-63JE5GM5.js → exit-codes-KAVZN5BQ.js} +1 -1
- package/dist/{feed-4Q3B56WI.js → feed-ISNH4NXB.js} +8 -11
- package/dist/{group-43PHTFP7.js → group-PHGUOOJE.js} +15 -15
- package/dist/{inbox-GZAOUWZP.js → inbox-3IQPPQMH.js} +14 -17
- package/dist/{inboxes-6AZOB43U.js → inboxes-JK36F6SK.js} +11 -14
- package/dist/{job-VOVQZGCK.js → job-JQG34ATV.js} +19 -22
- package/dist/{message-FIEWH2BU.js → message-2WIZESSM.js} +5 -3
- package/dist/{notification-65V67NWK.js → notification-ORSZY2IJ.js} +10 -13
- package/dist/{post-G4IMWUE2.js → post-JRJMGV2I.js} +22 -25
- package/dist/{profile-GADE33FY.js → profile-SUKHRWQP.js} +27 -30
- package/dist/{recruiter-LI2TMRHY.js → recruiter-NIKKDGMR.js} +38 -41
- package/dist/{sales-nav-OXLRN6YK.js → sales-nav-4MFL2JSE.js} +23 -26
- package/dist/{search-V35MFTXL.js → search-MZQJDJTX.js} +26 -29
- package/dist/{webhook-5HXMJQFO.js → webhook-7ESDSIRU.js} +9 -9
- package/package.json +4 -3
|
@@ -13,10 +13,13 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
pageDelayFromFlags,
|
|
15
15
|
streamAll
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-H6XD3F66.js";
|
|
17
17
|
import {
|
|
18
18
|
resolveIdentifier
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-UEAX6KUB.js";
|
|
20
|
+
import {
|
|
21
|
+
requireAccount
|
|
22
|
+
} from "./chunk-3BO6GVS2.js";
|
|
20
23
|
import {
|
|
21
24
|
buildPreviewOutput
|
|
22
25
|
} from "./chunk-R3VLWLVV.js";
|
|
@@ -26,13 +29,14 @@ import {
|
|
|
26
29
|
renderSuccess,
|
|
27
30
|
renderUnexpectedError,
|
|
28
31
|
resolveEffectiveConfig
|
|
29
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-JA3NNST6.js";
|
|
30
33
|
import {
|
|
31
34
|
GLOBAL_FLAGS,
|
|
32
35
|
READ_SINGLE_FLAGS,
|
|
33
36
|
WRITE_FLAGS
|
|
34
37
|
} from "./chunk-CUTMZWL6.js";
|
|
35
38
|
import "./chunk-ZYURL5VK.js";
|
|
39
|
+
import "./chunk-PMRQXBCP.js";
|
|
36
40
|
|
|
37
41
|
// src/commands/sales-nav.ts
|
|
38
42
|
import { defineCommand } from "citty";
|
|
@@ -42,13 +46,6 @@ function buildOutputStreams() {
|
|
|
42
46
|
stderr: { write: (s) => process.stderr.write(s) }
|
|
43
47
|
};
|
|
44
48
|
}
|
|
45
|
-
function requireAccount(account, out) {
|
|
46
|
-
if (!account) {
|
|
47
|
-
out.stderr.write("error: --account is required for this command. Set it via --account, CURVIATE_ACCOUNT, or `curviate config set-account`.\n");
|
|
48
|
-
process.exit(2);
|
|
49
|
-
}
|
|
50
|
-
return account;
|
|
51
|
-
}
|
|
52
49
|
function rejectPreviewOnRead(preview, out) {
|
|
53
50
|
if (preview) {
|
|
54
51
|
out.stderr.write("error: --preview is only valid on write commands (mutations). Reads just run.\n");
|
|
@@ -69,7 +66,7 @@ function normalizeAttachPaths(attach) {
|
|
|
69
66
|
async function handleSdkError(err, outOpts, out) {
|
|
70
67
|
const { CurviateError } = await import("@curviate/sdk");
|
|
71
68
|
if (err instanceof CurviateError) {
|
|
72
|
-
const { getExitCode } = await import("./exit-codes-
|
|
69
|
+
const { getExitCode } = await import("./exit-codes-KAVZN5BQ.js");
|
|
73
70
|
renderError(err, outOpts, out);
|
|
74
71
|
process.exit(getExitCode(err.code));
|
|
75
72
|
}
|
|
@@ -78,7 +75,7 @@ async function handleSdkError(err, outOpts, out) {
|
|
|
78
75
|
}
|
|
79
76
|
async function runSalesNavSearchPeople(client, flags, out, readers = DEFAULT_FILTER_READERS) {
|
|
80
77
|
rejectPreviewOnRead(flags.preview, out);
|
|
81
|
-
const accountId = requireAccount(flags
|
|
78
|
+
const accountId = await requireAccount(client, flags, out);
|
|
82
79
|
const ns = client.account(accountId);
|
|
83
80
|
const outOpts = resolveOutputOpts(flags);
|
|
84
81
|
const all = flags.all ?? false;
|
|
@@ -128,7 +125,7 @@ async function runSalesNavSearchPeople(client, flags, out, readers = DEFAULT_FIL
|
|
|
128
125
|
}
|
|
129
126
|
async function runSalesNavSearchCompanies(client, flags, out, readers = DEFAULT_FILTER_READERS) {
|
|
130
127
|
rejectPreviewOnRead(flags.preview, out);
|
|
131
|
-
const accountId = requireAccount(flags
|
|
128
|
+
const accountId = await requireAccount(client, flags, out);
|
|
132
129
|
const ns = client.account(accountId);
|
|
133
130
|
const outOpts = resolveOutputOpts(flags);
|
|
134
131
|
const all = flags.all ?? false;
|
|
@@ -181,7 +178,7 @@ async function runSalesNavGetParameters(client, flags, out) {
|
|
|
181
178
|
out.stderr.write("error: --type is required.\n");
|
|
182
179
|
process.exit(2);
|
|
183
180
|
}
|
|
184
|
-
const accountId = requireAccount(flags
|
|
181
|
+
const accountId = await requireAccount(client, flags, out);
|
|
185
182
|
const ns = client.account(accountId);
|
|
186
183
|
const outOpts = resolveOutputOpts(flags);
|
|
187
184
|
const params = { type: flags.type };
|
|
@@ -196,7 +193,7 @@ async function runSalesNavGetParameters(client, flags, out) {
|
|
|
196
193
|
}
|
|
197
194
|
async function runSalesNavSearchFromUrl(client, flags, out) {
|
|
198
195
|
rejectPreviewOnRead(flags.preview, out);
|
|
199
|
-
const accountId = requireAccount(flags
|
|
196
|
+
const accountId = await requireAccount(client, flags, out);
|
|
200
197
|
const url = flags.url ?? "";
|
|
201
198
|
const ns = client.account(accountId);
|
|
202
199
|
const outOpts = resolveOutputOpts(flags);
|
|
@@ -234,7 +231,7 @@ async function runSalesNavSearchFromUrl(client, flags, out) {
|
|
|
234
231
|
}
|
|
235
232
|
}
|
|
236
233
|
async function runSalesNavMessageNew(client, flags, out) {
|
|
237
|
-
const accountId = requireAccount(flags
|
|
234
|
+
const accountId = await requireAccount(client, flags, out);
|
|
238
235
|
const to = flags.to ?? "";
|
|
239
236
|
const text = flags.text ?? "";
|
|
240
237
|
const subject = flags.subject ?? "";
|
|
@@ -300,7 +297,7 @@ async function runSalesNavMessageNew(client, flags, out) {
|
|
|
300
297
|
}
|
|
301
298
|
async function runSalesNavProfile(client, flags, out) {
|
|
302
299
|
rejectPreviewOnRead(flags.preview, out);
|
|
303
|
-
const accountId = requireAccount(flags
|
|
300
|
+
const accountId = await requireAccount(client, flags, out);
|
|
304
301
|
const rawId = flags.identifier ?? "";
|
|
305
302
|
const resolvedId = resolveIdentifier(rawId);
|
|
306
303
|
const ns = client.account(accountId);
|
|
@@ -313,7 +310,7 @@ async function runSalesNavProfile(client, flags, out) {
|
|
|
313
310
|
}
|
|
314
311
|
}
|
|
315
312
|
async function runSalesNavSaveLead(client, flags, out) {
|
|
316
|
-
const accountId = requireAccount(flags
|
|
313
|
+
const accountId = await requireAccount(client, flags, out);
|
|
317
314
|
const userId = flags.userId ?? "";
|
|
318
315
|
const listId = flags.list ?? "";
|
|
319
316
|
const outOpts = resolveOutputOpts(flags);
|
|
@@ -338,7 +335,7 @@ async function runSalesNavSaveLead(client, flags, out) {
|
|
|
338
335
|
}
|
|
339
336
|
async function runSalesNavAccountLists(client, flags, out) {
|
|
340
337
|
rejectPreviewOnRead(flags.preview, out);
|
|
341
|
-
const accountId = requireAccount(flags
|
|
338
|
+
const accountId = await requireAccount(client, flags, out);
|
|
342
339
|
const ns = client.account(accountId);
|
|
343
340
|
const outOpts = resolveOutputOpts(flags);
|
|
344
341
|
const all = flags.all ?? false;
|
|
@@ -366,7 +363,7 @@ async function runSalesNavAccountLists(client, flags, out) {
|
|
|
366
363
|
}
|
|
367
364
|
async function runSalesNavLeadLists(client, flags, out) {
|
|
368
365
|
rejectPreviewOnRead(flags.preview, out);
|
|
369
|
-
const accountId = requireAccount(flags
|
|
366
|
+
const accountId = await requireAccount(client, flags, out);
|
|
370
367
|
const ns = client.account(accountId);
|
|
371
368
|
const outOpts = resolveOutputOpts(flags);
|
|
372
369
|
const all = flags.all ?? false;
|
|
@@ -394,7 +391,7 @@ async function runSalesNavLeadLists(client, flags, out) {
|
|
|
394
391
|
}
|
|
395
392
|
async function runSalesNavBrowseAccountList(client, flags, out) {
|
|
396
393
|
rejectPreviewOnRead(flags.preview, out);
|
|
397
|
-
const accountId = requireAccount(flags
|
|
394
|
+
const accountId = await requireAccount(client, flags, out);
|
|
398
395
|
const listId = flags.listId ?? "";
|
|
399
396
|
const ns = client.account(accountId);
|
|
400
397
|
const outOpts = resolveOutputOpts(flags);
|
|
@@ -427,7 +424,7 @@ async function runSalesNavBrowseAccountList(client, flags, out) {
|
|
|
427
424
|
}
|
|
428
425
|
async function runSalesNavBrowseLeadList(client, flags, out) {
|
|
429
426
|
rejectPreviewOnRead(flags.preview, out);
|
|
430
|
-
const accountId = requireAccount(flags
|
|
427
|
+
const accountId = await requireAccount(client, flags, out);
|
|
431
428
|
const listId = flags.listId ?? "";
|
|
432
429
|
const ns = client.account(accountId);
|
|
433
430
|
const outOpts = resolveOutputOpts(flags);
|
|
@@ -459,7 +456,7 @@ async function runSalesNavBrowseLeadList(client, flags, out) {
|
|
|
459
456
|
}
|
|
460
457
|
}
|
|
461
458
|
async function runSalesNavSaveAccount(client, flags, out) {
|
|
462
|
-
const accountId = requireAccount(flags
|
|
459
|
+
const accountId = await requireAccount(client, flags, out);
|
|
463
460
|
const listId = flags.list ?? "";
|
|
464
461
|
const companyId = flags.companyId ?? "";
|
|
465
462
|
const outOpts = resolveOutputOpts(flags);
|
|
@@ -489,7 +486,7 @@ var salesNavMessageNewCommand = defineCommand({
|
|
|
489
486
|
...WRITE_FLAGS,
|
|
490
487
|
to: {
|
|
491
488
|
type: "string",
|
|
492
|
-
description: "Recipient's LinkedIn provider ID (ACw
|
|
489
|
+
description: "Recipient's LinkedIn provider ID (ACw... format, e.g. from a Sales Navigator search result or profile). Not resolved from a URL/slug. Pass the provider ID directly.",
|
|
493
490
|
required: true
|
|
494
491
|
},
|
|
495
492
|
subject: { type: "string", description: "Message subject line (required for Sales Navigator messaging).", required: true },
|
|
@@ -523,7 +520,7 @@ var salesNavMessageCommand = defineCommand({
|
|
|
523
520
|
new: salesNavMessageNewCommand
|
|
524
521
|
},
|
|
525
522
|
async run() {
|
|
526
|
-
process.stderr.write('Usage: curviate sales-nav message new --to <id> "<text>" [--attach <file
|
|
523
|
+
process.stderr.write('Usage: curviate sales-nav message new --to <id> "<text>" [--attach <file>...]\n');
|
|
527
524
|
}
|
|
528
525
|
});
|
|
529
526
|
var salesNavSearchPeopleCommand = defineCommand({
|
|
@@ -683,7 +680,7 @@ var salesNavSaveLeadCommand = defineCommand({
|
|
|
683
680
|
args: {
|
|
684
681
|
// Write command: WRITE_FLAGS omits pagination/projection flags
|
|
685
682
|
...WRITE_FLAGS,
|
|
686
|
-
userId: { type: "positional", description: "Sales Navigator member ID (ACw
|
|
683
|
+
userId: { type: "positional", description: "Sales Navigator member ID (ACw... format)." },
|
|
687
684
|
list: { type: "string", description: "Lead list ID to save the member into (required; the v2 save always targets a specific list).", required: true }
|
|
688
685
|
},
|
|
689
686
|
async run({ args }) {
|
|
@@ -14,22 +14,26 @@ import {
|
|
|
14
14
|
slimSearchPeopleItem,
|
|
15
15
|
slimSearchPosts,
|
|
16
16
|
slimSearchPostsItem
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-RFUO2G3M.js";
|
|
18
18
|
import {
|
|
19
19
|
pageDelayFromFlags,
|
|
20
20
|
streamAll
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-H6XD3F66.js";
|
|
22
|
+
import {
|
|
23
|
+
requireAccount
|
|
24
|
+
} from "./chunk-3BO6GVS2.js";
|
|
22
25
|
import {
|
|
23
26
|
createClient,
|
|
24
27
|
renderError,
|
|
25
28
|
renderSuccess,
|
|
26
29
|
renderUnexpectedError,
|
|
27
30
|
resolveEffectiveConfig
|
|
28
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-JA3NNST6.js";
|
|
29
32
|
import {
|
|
30
33
|
GLOBAL_FLAGS
|
|
31
34
|
} from "./chunk-CUTMZWL6.js";
|
|
32
35
|
import "./chunk-ZYURL5VK.js";
|
|
36
|
+
import "./chunk-PMRQXBCP.js";
|
|
33
37
|
|
|
34
38
|
// src/commands/search.ts
|
|
35
39
|
import { defineCommand } from "citty";
|
|
@@ -60,13 +64,6 @@ function buildOutputStreams() {
|
|
|
60
64
|
stderr: { write: (s) => process.stderr.write(s) }
|
|
61
65
|
};
|
|
62
66
|
}
|
|
63
|
-
function requireAccount(account, out) {
|
|
64
|
-
if (!account) {
|
|
65
|
-
out.stderr.write("error: --account is required for this command. Set it via --account, CURVIATE_ACCOUNT, or `curviate config set-account`.\n");
|
|
66
|
-
process.exit(2);
|
|
67
|
-
}
|
|
68
|
-
return account;
|
|
69
|
-
}
|
|
70
67
|
function rejectPreviewOnRead(preview, out) {
|
|
71
68
|
if (preview) {
|
|
72
69
|
out.stderr.write("error: --preview is only valid on write commands (mutations). Reads just run.\n");
|
|
@@ -191,7 +188,7 @@ async function runSearchPeople(client, flags, out, readers = DEFAULT_FILTER_READ
|
|
|
191
188
|
process.exit(2);
|
|
192
189
|
}
|
|
193
190
|
}
|
|
194
|
-
const accountId = requireAccount(flags
|
|
191
|
+
const accountId = await requireAccount(client, flags, out);
|
|
195
192
|
const ns = client.account(accountId);
|
|
196
193
|
const outOpts = resolveOutputOpts(flags);
|
|
197
194
|
const verbose = flags.verbose ?? false;
|
|
@@ -222,7 +219,7 @@ async function runSearchPeople(client, flags, out, readers = DEFAULT_FILTER_READ
|
|
|
222
219
|
} catch (err) {
|
|
223
220
|
const { CurviateError } = await import("@curviate/sdk");
|
|
224
221
|
if (err instanceof CurviateError) {
|
|
225
|
-
const { getExitCode } = await import("./exit-codes-
|
|
222
|
+
const { getExitCode } = await import("./exit-codes-KAVZN5BQ.js");
|
|
226
223
|
renderError(err, outOpts, out);
|
|
227
224
|
process.exit(getExitCode(err.code));
|
|
228
225
|
}
|
|
@@ -232,7 +229,7 @@ async function runSearchPeople(client, flags, out, readers = DEFAULT_FILTER_READ
|
|
|
232
229
|
}
|
|
233
230
|
async function runSearchCompanies(client, flags, out, readers = DEFAULT_FILTER_READERS) {
|
|
234
231
|
rejectPreviewOnRead(flags.preview, out);
|
|
235
|
-
const accountId = requireAccount(flags
|
|
232
|
+
const accountId = await requireAccount(client, flags, out);
|
|
236
233
|
const ns = client.account(accountId);
|
|
237
234
|
const outOpts = resolveOutputOpts(flags);
|
|
238
235
|
const verbose = flags.verbose ?? false;
|
|
@@ -263,7 +260,7 @@ async function runSearchCompanies(client, flags, out, readers = DEFAULT_FILTER_R
|
|
|
263
260
|
} catch (err) {
|
|
264
261
|
const { CurviateError } = await import("@curviate/sdk");
|
|
265
262
|
if (err instanceof CurviateError) {
|
|
266
|
-
const { getExitCode } = await import("./exit-codes-
|
|
263
|
+
const { getExitCode } = await import("./exit-codes-KAVZN5BQ.js");
|
|
267
264
|
renderError(err, outOpts, out);
|
|
268
265
|
process.exit(getExitCode(err.code));
|
|
269
266
|
}
|
|
@@ -273,7 +270,7 @@ async function runSearchCompanies(client, flags, out, readers = DEFAULT_FILTER_R
|
|
|
273
270
|
}
|
|
274
271
|
async function runSearchPosts(client, flags, out, readers = DEFAULT_FILTER_READERS) {
|
|
275
272
|
rejectPreviewOnRead(flags.preview, out);
|
|
276
|
-
const accountId = requireAccount(flags
|
|
273
|
+
const accountId = await requireAccount(client, flags, out);
|
|
277
274
|
const ns = client.account(accountId);
|
|
278
275
|
const outOpts = resolveOutputOpts(flags);
|
|
279
276
|
const verbose = flags.verbose ?? false;
|
|
@@ -304,7 +301,7 @@ async function runSearchPosts(client, flags, out, readers = DEFAULT_FILTER_READE
|
|
|
304
301
|
} catch (err) {
|
|
305
302
|
const { CurviateError } = await import("@curviate/sdk");
|
|
306
303
|
if (err instanceof CurviateError) {
|
|
307
|
-
const { getExitCode } = await import("./exit-codes-
|
|
304
|
+
const { getExitCode } = await import("./exit-codes-KAVZN5BQ.js");
|
|
308
305
|
renderError(err, outOpts, out);
|
|
309
306
|
process.exit(getExitCode(err.code));
|
|
310
307
|
}
|
|
@@ -314,7 +311,7 @@ async function runSearchPosts(client, flags, out, readers = DEFAULT_FILTER_READE
|
|
|
314
311
|
}
|
|
315
312
|
async function runSearchJobs(client, flags, out, readers = DEFAULT_FILTER_READERS) {
|
|
316
313
|
rejectPreviewOnRead(flags.preview, out);
|
|
317
|
-
const accountId = requireAccount(flags
|
|
314
|
+
const accountId = await requireAccount(client, flags, out);
|
|
318
315
|
const ns = client.account(accountId);
|
|
319
316
|
const outOpts = resolveOutputOpts(flags);
|
|
320
317
|
const verbose = flags.verbose ?? false;
|
|
@@ -345,7 +342,7 @@ async function runSearchJobs(client, flags, out, readers = DEFAULT_FILTER_READER
|
|
|
345
342
|
} catch (err) {
|
|
346
343
|
const { CurviateError } = await import("@curviate/sdk");
|
|
347
344
|
if (err instanceof CurviateError) {
|
|
348
|
-
const { getExitCode } = await import("./exit-codes-
|
|
345
|
+
const { getExitCode } = await import("./exit-codes-KAVZN5BQ.js");
|
|
349
346
|
renderError(err, outOpts, out);
|
|
350
347
|
process.exit(getExitCode(err.code));
|
|
351
348
|
}
|
|
@@ -364,7 +361,7 @@ async function runSearchParameters(client, flags, out) {
|
|
|
364
361
|
out.stderr.write("error: --keywords is required (v2: required for every --type).\n");
|
|
365
362
|
process.exit(2);
|
|
366
363
|
}
|
|
367
|
-
const accountId = requireAccount(flags
|
|
364
|
+
const accountId = await requireAccount(client, flags, out);
|
|
368
365
|
const ns = client.account(accountId);
|
|
369
366
|
const outOpts = resolveOutputOpts(flags);
|
|
370
367
|
const query = {
|
|
@@ -378,7 +375,7 @@ async function runSearchParameters(client, flags, out) {
|
|
|
378
375
|
} catch (err) {
|
|
379
376
|
const { CurviateError } = await import("@curviate/sdk");
|
|
380
377
|
if (err instanceof CurviateError) {
|
|
381
|
-
const { getExitCode } = await import("./exit-codes-
|
|
378
|
+
const { getExitCode } = await import("./exit-codes-KAVZN5BQ.js");
|
|
382
379
|
renderError(err, outOpts, out);
|
|
383
380
|
process.exit(getExitCode(err.code));
|
|
384
381
|
}
|
|
@@ -393,7 +390,7 @@ async function runSearchGroups(client, flags, out) {
|
|
|
393
390
|
out.stderr.write("error: <query> is required.\n");
|
|
394
391
|
process.exit(2);
|
|
395
392
|
}
|
|
396
|
-
const accountId = requireAccount(flags
|
|
393
|
+
const accountId = await requireAccount(client, flags, out);
|
|
397
394
|
const ns = client.account(accountId);
|
|
398
395
|
const outOpts = resolveOutputOpts(flags);
|
|
399
396
|
const all = flags.all ?? false;
|
|
@@ -418,7 +415,7 @@ async function runSearchGroups(client, flags, out) {
|
|
|
418
415
|
} catch (err) {
|
|
419
416
|
const { CurviateError } = await import("@curviate/sdk");
|
|
420
417
|
if (err instanceof CurviateError) {
|
|
421
|
-
const { getExitCode } = await import("./exit-codes-
|
|
418
|
+
const { getExitCode } = await import("./exit-codes-KAVZN5BQ.js");
|
|
422
419
|
renderError(err, outOpts, out);
|
|
423
420
|
process.exit(getExitCode(err.code));
|
|
424
421
|
}
|
|
@@ -428,7 +425,7 @@ async function runSearchGroups(client, flags, out) {
|
|
|
428
425
|
}
|
|
429
426
|
async function runSearchServices(client, flags, out) {
|
|
430
427
|
rejectPreviewOnRead(flags.preview, out);
|
|
431
|
-
const accountId = requireAccount(flags
|
|
428
|
+
const accountId = await requireAccount(client, flags, out);
|
|
432
429
|
const ns = client.account(accountId);
|
|
433
430
|
const outOpts = resolveOutputOpts(flags);
|
|
434
431
|
const all = flags.all ?? false;
|
|
@@ -460,7 +457,7 @@ async function runSearchServices(client, flags, out) {
|
|
|
460
457
|
} catch (err) {
|
|
461
458
|
const { CurviateError } = await import("@curviate/sdk");
|
|
462
459
|
if (err instanceof CurviateError) {
|
|
463
|
-
const { getExitCode } = await import("./exit-codes-
|
|
460
|
+
const { getExitCode } = await import("./exit-codes-KAVZN5BQ.js");
|
|
464
461
|
renderError(err, outOpts, out);
|
|
465
462
|
process.exit(getExitCode(err.code));
|
|
466
463
|
}
|
|
@@ -475,7 +472,7 @@ async function runSearchServiceParameters(client, flags, out) {
|
|
|
475
472
|
out.stderr.write("error: --keywords is required.\n");
|
|
476
473
|
process.exit(2);
|
|
477
474
|
}
|
|
478
|
-
const accountId = requireAccount(flags
|
|
475
|
+
const accountId = await requireAccount(client, flags, out);
|
|
479
476
|
const ns = client.account(accountId);
|
|
480
477
|
const outOpts = resolveOutputOpts(flags);
|
|
481
478
|
const query = { keywords: flags.keywords };
|
|
@@ -487,7 +484,7 @@ async function runSearchServiceParameters(client, flags, out) {
|
|
|
487
484
|
} catch (err) {
|
|
488
485
|
const { CurviateError } = await import("@curviate/sdk");
|
|
489
486
|
if (err instanceof CurviateError) {
|
|
490
|
-
const { getExitCode } = await import("./exit-codes-
|
|
487
|
+
const { getExitCode } = await import("./exit-codes-KAVZN5BQ.js");
|
|
491
488
|
renderError(err, outOpts, out);
|
|
492
489
|
process.exit(getExitCode(err.code));
|
|
493
490
|
}
|
|
@@ -497,7 +494,7 @@ async function runSearchServiceParameters(client, flags, out) {
|
|
|
497
494
|
}
|
|
498
495
|
async function runSearchFromUrl(client, flags, out) {
|
|
499
496
|
rejectPreviewOnRead(flags.preview, out);
|
|
500
|
-
const accountId = requireAccount(flags
|
|
497
|
+
const accountId = await requireAccount(client, flags, out);
|
|
501
498
|
const url = flags.url ?? "";
|
|
502
499
|
const ns = client.account(accountId);
|
|
503
500
|
const outOpts = resolveOutputOpts(flags);
|
|
@@ -524,7 +521,7 @@ async function runSearchFromUrl(client, flags, out) {
|
|
|
524
521
|
} catch (err) {
|
|
525
522
|
const { CurviateError } = await import("@curviate/sdk");
|
|
526
523
|
if (err instanceof CurviateError) {
|
|
527
|
-
const { getExitCode } = await import("./exit-codes-
|
|
524
|
+
const { getExitCode } = await import("./exit-codes-KAVZN5BQ.js");
|
|
528
525
|
renderError(err, outOpts, out);
|
|
529
526
|
process.exit(getExitCode(err.code));
|
|
530
527
|
}
|
|
@@ -643,7 +640,7 @@ var searchJobsCommand = defineCommand({
|
|
|
643
640
|
...GLOBAL_FLAGS,
|
|
644
641
|
keywords: { type: "string", description: "Full-text keyword search." },
|
|
645
642
|
...FILTER_FLAGS,
|
|
646
|
-
// On jobs, --location maps to the geo region filter (not a location array
|
|
643
|
+
// On jobs, --location maps to the geo region filter (not a location array, different API shape for jobs vs people)
|
|
647
644
|
location: { type: "string", description: "geo region id (single id; resolve via search parameters --type LOCATION); maps to region filter" },
|
|
648
645
|
industry: { type: "string", description: "Industry ids (comma-separated)." },
|
|
649
646
|
seniority: { type: "string", description: "seniority level, closed enum: executive|director|mid_senior|associate|entry|intern (comma-separated)" },
|
|
@@ -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
|
} from "./chunk-CUTMZWL6.js";
|
|
@@ -52,7 +52,7 @@ function resolveOutputOpts(flags) {
|
|
|
52
52
|
async function handleError(err, outOpts, out) {
|
|
53
53
|
const { CurviateError } = await import("@curviate/sdk");
|
|
54
54
|
if (err instanceof CurviateError) {
|
|
55
|
-
const { getExitCode } = await import("./exit-codes-
|
|
55
|
+
const { getExitCode } = await import("./exit-codes-KAVZN5BQ.js");
|
|
56
56
|
renderError(err, outOpts, out);
|
|
57
57
|
process.exit(getExitCode(err.code));
|
|
58
58
|
}
|
|
@@ -69,7 +69,7 @@ async function runWebhookCreate(client, flags, out) {
|
|
|
69
69
|
process.exit(2);
|
|
70
70
|
}
|
|
71
71
|
if (!flags["account-ids"]) {
|
|
72
|
-
out.stderr.write("error: --account-ids is required (comma-separated list of acc_
|
|
72
|
+
out.stderr.write("error: --account-ids is required (comma-separated list of acc_... ids).\n");
|
|
73
73
|
process.exit(2);
|
|
74
74
|
}
|
|
75
75
|
const accountIds = flags["account-ids"].split(",").map((s) => s.trim()).filter(Boolean);
|
|
@@ -273,7 +273,7 @@ var webhookCreateCommand = defineCommand({
|
|
|
273
273
|
source: { type: "string", description: "Event source: messaging | user | account_status.", required: true },
|
|
274
274
|
"request-url": { type: "string", description: "HTTPS URL to receive webhook deliveries.", required: true },
|
|
275
275
|
"account-ids": { type: "string", description: "Comma-separated account ids to target (required).", required: true },
|
|
276
|
-
name: { type: "string", description: "Human-readable name (1
|
|
276
|
+
name: { type: "string", description: "Human-readable name (1-100 chars)." },
|
|
277
277
|
format: { type: "string", description: "Delivery encoding: json | form (default: json)." },
|
|
278
278
|
enabled: { type: "boolean", description: "Create as enabled (default: true).", default: true },
|
|
279
279
|
events: { type: "string", description: "Comma-separated event names to subscribe to." },
|
|
@@ -340,7 +340,7 @@ var webhookGetCommand = defineCommand({
|
|
|
340
340
|
meta: { name: "get", description: "Get a single webhook owned by the calling tenant." },
|
|
341
341
|
args: {
|
|
342
342
|
...GLOBAL_FLAGS,
|
|
343
|
-
id: { type: "positional", description: "Webhook id (wh_
|
|
343
|
+
id: { type: "positional", description: "Webhook id (wh_...)." }
|
|
344
344
|
},
|
|
345
345
|
async run({ args }) {
|
|
346
346
|
const flags = args;
|
|
@@ -363,7 +363,7 @@ var webhookUpdateCommand = defineCommand({
|
|
|
363
363
|
meta: { name: "update", description: "Update a webhook in place (source is immutable)." },
|
|
364
364
|
args: {
|
|
365
365
|
...GLOBAL_FLAGS,
|
|
366
|
-
id: { type: "positional", description: "Webhook id (wh_
|
|
366
|
+
id: { type: "positional", description: "Webhook id (wh_...)." },
|
|
367
367
|
"request-url": { type: "string", description: "Replace the delivery URL." },
|
|
368
368
|
name: { type: "string", description: "Replace the name (or clear with empty string)." },
|
|
369
369
|
enabled: { type: "boolean", description: "Enable or disable the webhook." },
|
|
@@ -393,7 +393,7 @@ var webhookDeleteCommand = defineCommand({
|
|
|
393
393
|
meta: { name: "delete", description: "Permanently remove a webhook subscription." },
|
|
394
394
|
args: {
|
|
395
395
|
...GLOBAL_FLAGS,
|
|
396
|
-
id: { type: "positional", description: "Webhook id (wh_
|
|
396
|
+
id: { type: "positional", description: "Webhook id (wh_...)." }
|
|
397
397
|
},
|
|
398
398
|
async run({ args }) {
|
|
399
399
|
const flags = args;
|
|
@@ -423,7 +423,7 @@ var webhookVerifyCommand = defineCommand({
|
|
|
423
423
|
},
|
|
424
424
|
header: {
|
|
425
425
|
type: "string",
|
|
426
|
-
description: "The full Curviate-Signature header value from the delivery (t
|
|
426
|
+
description: "The full Curviate-Signature header value from the delivery (t=...,v1=...).",
|
|
427
427
|
required: true
|
|
428
428
|
},
|
|
429
429
|
body: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@curviate/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Official command-line interface for the Curviate API.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -30,18 +30,19 @@
|
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
32
|
"build": "tsup",
|
|
33
|
-
"prepack": "node scripts/check-clean.mjs && tsup && node scripts/check-clean.mjs --dist",
|
|
33
|
+
"prepack": "node scripts/check-clean.mjs && node scripts/check-copy.mjs && tsup && node scripts/check-clean.mjs --dist",
|
|
34
34
|
"test": "vitest run",
|
|
35
35
|
"test:watch": "vitest",
|
|
36
36
|
"typecheck": "tsc --noEmit",
|
|
37
37
|
"lint": "eslint src test",
|
|
38
38
|
"check:clean": "node scripts/check-clean.mjs",
|
|
39
39
|
"check:clean:dist": "node scripts/check-clean.mjs --dist",
|
|
40
|
+
"check:copy": "node scripts/check-copy.mjs",
|
|
40
41
|
"verify:dist": "pnpm build && node scripts/verify-dist.mjs",
|
|
41
42
|
"clean": "rm -rf dist *.tsbuildinfo"
|
|
42
43
|
},
|
|
43
44
|
"dependencies": {
|
|
44
|
-
"@curviate/sdk": "^0.
|
|
45
|
+
"@curviate/sdk": "^0.20.1",
|
|
45
46
|
"citty": "^0.1.6",
|
|
46
47
|
"open": "^10.1.0"
|
|
47
48
|
},
|