@curviate/cli 0.38.0 → 0.41.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 +115 -0
- package/README.md +2 -2
- package/dist/{account-TYKHUB7X.js → account-QZ5RYKIT.js} +13 -3
- package/dist/{chunk-BN7L7WSY.js → chunk-4AAKZPOM.js} +34 -4
- package/dist/{chunk-MNDXMGPX.js → chunk-BLFGJIJJ.js} +1 -1
- package/dist/{chunk-7JU4IXXG.js → chunk-CBHL3QQJ.js} +32 -1
- package/dist/{chunk-ZJ7D3NFS.js → chunk-WAE7YLO5.js} +1 -1
- package/dist/cli.js +19 -19
- package/dist/{comment-G6RB2PBZ.js → comment-SYA6OKEY.js} +16 -13
- package/dist/{company-OWND3W3L.js → company-IXQ4OFU3.js} +36 -21
- package/dist/{connect-3E7EC5ZM.js → connect-TTA2X3KO.js} +8 -6
- package/dist/{doctor-Z6OSCGKT.js → doctor-ET7XQ22E.js} +1 -1
- package/dist/{feed-VDTFIMKN.js → feed-556LS3CN.js} +7 -4
- package/dist/{group-KDJHY2IM.js → group-DIIG4XQT.js} +12 -6
- package/dist/{inbox-DQLX2LR7.js → inbox-SRVTUTE6.js} +16 -11
- package/dist/{inboxes-WMNHOPY7.js → inboxes-XHZTAUQ7.js} +9 -4
- package/dist/{job-ESKS2LDJ.js → job-QNVGEM4J.js} +14 -6
- package/dist/{message-5W2R3YHS.js → message-2JEL6P7E.js} +3 -3
- package/dist/{notification-IGNUH2GR.js → notification-T4SRAIJ3.js} +7 -4
- package/dist/{post-NLI76K74.js → post-PV4UQVPO.js} +18 -13
- package/dist/{profile-TBKKIICM.js → profile-K5BZNGX5.js} +26 -15
- package/dist/{recruiter-AEJRHIX5.js → recruiter-OBKS4ZVL.js} +27 -15
- package/dist/{sales-nav-SW6WJVMD.js → sales-nav-WPTMS6QF.js} +46 -19
- package/dist/{search-WRMVQU6C.js → search-YAKZKK74.js} +51 -35
- package/dist/{setup-YUSWG77F.js → setup-NZQUWJYC.js} +1 -1
- package/dist/{webhook-NGMRJMQ5.js → webhook-PXSLDB2F.js} +8 -3
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
resolveMemberOrMeProviderId
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WAE7YLO5.js";
|
|
5
5
|
import {
|
|
6
6
|
AttachError,
|
|
7
7
|
readAttachment,
|
|
@@ -10,12 +10,15 @@ import {
|
|
|
10
10
|
import "./chunk-UEAX6KUB.js";
|
|
11
11
|
import {
|
|
12
12
|
requireAccount
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-BLFGJIJJ.js";
|
|
14
14
|
import {
|
|
15
15
|
buildPreviewOutput
|
|
16
16
|
} from "./chunk-TCUYH5GO.js";
|
|
17
17
|
import {
|
|
18
18
|
pageDelayFromFlags,
|
|
19
|
+
readCursorFlag,
|
|
20
|
+
readMaxPagesFlag,
|
|
21
|
+
readableObject,
|
|
19
22
|
readablePage,
|
|
20
23
|
rejectPaginationModifiersWithoutAll,
|
|
21
24
|
renderError,
|
|
@@ -24,7 +27,7 @@ import {
|
|
|
24
27
|
resolveEffectiveConfig,
|
|
25
28
|
streamAll,
|
|
26
29
|
writeNdjsonItem
|
|
27
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-CBHL3QQJ.js";
|
|
28
31
|
import "./chunk-XZJQQJBE.js";
|
|
29
32
|
import {
|
|
30
33
|
createClient
|
|
@@ -65,10 +68,11 @@ function resolveOutputOpts(flags) {
|
|
|
65
68
|
fields: flags.fields
|
|
66
69
|
};
|
|
67
70
|
}
|
|
68
|
-
function buildPaginationParams(flags) {
|
|
71
|
+
function buildPaginationParams(flags, out) {
|
|
69
72
|
const params = {};
|
|
70
73
|
if (flags.limit !== void 0) params["limit"] = parseInt(flags.limit, 10);
|
|
71
|
-
|
|
74
|
+
const cursor = readCursorFlag(flags, out);
|
|
75
|
+
if (cursor) params["cursor"] = cursor;
|
|
72
76
|
return params;
|
|
73
77
|
}
|
|
74
78
|
function normalizeAttachPaths(attach) {
|
|
@@ -94,6 +98,7 @@ async function runPostGet(client, flags, out) {
|
|
|
94
98
|
const outOpts = resolveOutputOpts(flags);
|
|
95
99
|
try {
|
|
96
100
|
const result = await ns.posts.get(postId);
|
|
101
|
+
readableObject(result);
|
|
97
102
|
renderSuccess(result, outOpts, out);
|
|
98
103
|
} catch (err) {
|
|
99
104
|
await handleSdkError(err, outOpts, out);
|
|
@@ -188,8 +193,8 @@ async function runPostReactions(client, flags, out) {
|
|
|
188
193
|
const ns = client.account(accountId);
|
|
189
194
|
const outOpts = resolveOutputOpts(flags);
|
|
190
195
|
const all = flags.all ?? false;
|
|
191
|
-
const maxPages =
|
|
192
|
-
const params = buildPaginationParams(flags);
|
|
196
|
+
const maxPages = readMaxPagesFlag(flags, out);
|
|
197
|
+
const params = buildPaginationParams(flags, out);
|
|
193
198
|
try {
|
|
194
199
|
if (all) {
|
|
195
200
|
const fn = (p) => ns.posts.listReactions(postId, p);
|
|
@@ -216,8 +221,8 @@ async function runPostSaved(client, flags, out) {
|
|
|
216
221
|
const ns = client.account(accountId);
|
|
217
222
|
const outOpts = resolveOutputOpts(flags);
|
|
218
223
|
const all = flags.all ?? false;
|
|
219
|
-
const maxPages =
|
|
220
|
-
const params = buildPaginationParams(flags);
|
|
224
|
+
const maxPages = readMaxPagesFlag(flags, out);
|
|
225
|
+
const params = buildPaginationParams(flags, out);
|
|
221
226
|
try {
|
|
222
227
|
if (all) {
|
|
223
228
|
const fn = (p) => ns.posts.listSaved(p);
|
|
@@ -331,8 +336,8 @@ async function runPostUserPosts(client, flags, out) {
|
|
|
331
336
|
return;
|
|
332
337
|
}
|
|
333
338
|
const all = flags.all ?? false;
|
|
334
|
-
const maxPages =
|
|
335
|
-
const params = buildPaginationParams(flags);
|
|
339
|
+
const maxPages = readMaxPagesFlag(flags, out);
|
|
340
|
+
const params = buildPaginationParams(flags, out);
|
|
336
341
|
try {
|
|
337
342
|
if (all) {
|
|
338
343
|
const fn = (p) => ns.posts.listUserPosts(userId, p);
|
|
@@ -366,8 +371,8 @@ async function runPostUserReactions(client, flags, out) {
|
|
|
366
371
|
return;
|
|
367
372
|
}
|
|
368
373
|
const all = flags.all ?? false;
|
|
369
|
-
const maxPages =
|
|
370
|
-
const params = buildPaginationParams(flags);
|
|
374
|
+
const maxPages = readMaxPagesFlag(flags, out);
|
|
375
|
+
const params = buildPaginationParams(flags, out);
|
|
371
376
|
try {
|
|
372
377
|
if (all) {
|
|
373
378
|
const fn = (p) => ns.posts.listUserReactions(userId, p);
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
resolveMemberOrMeProviderId,
|
|
15
15
|
resolveMemberProviderId
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-WAE7YLO5.js";
|
|
17
17
|
import {
|
|
18
18
|
AttachError,
|
|
19
19
|
readAttachment,
|
|
@@ -24,13 +24,16 @@ import {
|
|
|
24
24
|
} from "./chunk-UEAX6KUB.js";
|
|
25
25
|
import {
|
|
26
26
|
requireAccount
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-BLFGJIJJ.js";
|
|
28
28
|
import {
|
|
29
29
|
buildPreviewOutput
|
|
30
30
|
} from "./chunk-TCUYH5GO.js";
|
|
31
31
|
import {
|
|
32
32
|
pageDelayFromFlags,
|
|
33
|
+
readCursorFlag,
|
|
34
|
+
readMaxPagesFlag,
|
|
33
35
|
readableId,
|
|
36
|
+
readableObject,
|
|
34
37
|
readablePage,
|
|
35
38
|
rejectPaginationModifiersWithoutAll,
|
|
36
39
|
renderError,
|
|
@@ -39,7 +42,7 @@ import {
|
|
|
39
42
|
resolveEffectiveConfig,
|
|
40
43
|
streamAll,
|
|
41
44
|
writeNdjsonItem
|
|
42
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-CBHL3QQJ.js";
|
|
43
46
|
import "./chunk-XZJQQJBE.js";
|
|
44
47
|
import {
|
|
45
48
|
createClient
|
|
@@ -114,10 +117,11 @@ async function runProfileMe(client, flags, out) {
|
|
|
114
117
|
const outOpts = resolveOutputOpts(flags);
|
|
115
118
|
if (hasActivityFlag) {
|
|
116
119
|
const all = flags.all ?? false;
|
|
117
|
-
const maxPages =
|
|
120
|
+
const maxPages = readMaxPagesFlag(flags, out);
|
|
118
121
|
const params2 = {};
|
|
119
122
|
if (flags.limit) params2.limit = parseInt(flags.limit, 10);
|
|
120
|
-
|
|
123
|
+
const cursor = readCursorFlag(flags, out);
|
|
124
|
+
if (cursor) params2.cursor = cursor;
|
|
121
125
|
try {
|
|
122
126
|
if (flags.posts) {
|
|
123
127
|
if (all) {
|
|
@@ -204,6 +208,7 @@ async function runProfileMe(client, flags, out) {
|
|
|
204
208
|
}
|
|
205
209
|
try {
|
|
206
210
|
const result = await ns.users.get("me", params);
|
|
211
|
+
readableObject(result);
|
|
207
212
|
const slimOutOpts = { ...outOpts, slim: withRequestedSections(slimProfileMe, params.linkedin_sections) };
|
|
208
213
|
renderSuccess(result, slimOutOpts, out);
|
|
209
214
|
} catch (err) {
|
|
@@ -244,9 +249,9 @@ async function runProfileGet(client, flags, out) {
|
|
|
244
249
|
const ns = client.account(accountId);
|
|
245
250
|
const outOpts = resolveOutputOpts(flags);
|
|
246
251
|
const all = flags.all ?? false;
|
|
247
|
-
const maxPages =
|
|
252
|
+
const maxPages = readMaxPagesFlag(flags, out);
|
|
248
253
|
const limit = flags.limit ? parseInt(flags.limit, 10) : void 0;
|
|
249
|
-
const cursor = flags
|
|
254
|
+
const cursor = readCursorFlag(flags, out);
|
|
250
255
|
try {
|
|
251
256
|
if (flags.posts) {
|
|
252
257
|
const params = {};
|
|
@@ -335,6 +340,7 @@ async function runProfileGet(client, flags, out) {
|
|
|
335
340
|
}
|
|
336
341
|
const getId = flags.sections ? await resolveMemberOrMeProviderId(ns, rawId, retrievalQuery) : resolvedId;
|
|
337
342
|
const result = await ns.users.get(getId, params);
|
|
343
|
+
readableObject(result);
|
|
338
344
|
const getOutOpts = { ...outOpts, slim: withRequestedSections(slimProfile, parsedSections) };
|
|
339
345
|
renderSuccess(result, getOutOpts, out);
|
|
340
346
|
}
|
|
@@ -356,9 +362,9 @@ async function runProfileRelations(client, flags, out) {
|
|
|
356
362
|
const ns = client.account(accountId);
|
|
357
363
|
const outOpts = resolveOutputOpts(flags);
|
|
358
364
|
const all = flags.all ?? false;
|
|
359
|
-
const maxPages =
|
|
365
|
+
const maxPages = readMaxPagesFlag(flags, out);
|
|
360
366
|
const limit = flags.limit ? parseInt(flags.limit, 10) : void 0;
|
|
361
|
-
const cursor = flags
|
|
367
|
+
const cursor = readCursorFlag(flags, out);
|
|
362
368
|
const params = {};
|
|
363
369
|
if (limit !== void 0) params.limit = limit;
|
|
364
370
|
if (cursor) params.cursor = cursor;
|
|
@@ -435,6 +441,7 @@ async function runProfileSubscription(client, flags, out) {
|
|
|
435
441
|
const outOpts = resolveOutputOpts(flags);
|
|
436
442
|
try {
|
|
437
443
|
const result = await ns.profile.subscription();
|
|
444
|
+
readableObject(result);
|
|
438
445
|
renderSuccess(result, outOpts, out);
|
|
439
446
|
} catch (err) {
|
|
440
447
|
await handleSdkError(err, outOpts, out);
|
|
@@ -448,6 +455,7 @@ async function runProfileAnalytics(client, flags, out) {
|
|
|
448
455
|
const outOpts = resolveOutputOpts(flags);
|
|
449
456
|
try {
|
|
450
457
|
const result = await ns.profile.analytics();
|
|
458
|
+
readableObject(result);
|
|
451
459
|
renderSuccess(result, outOpts, out);
|
|
452
460
|
} catch (err) {
|
|
453
461
|
await handleSdkError(err, outOpts, out);
|
|
@@ -460,9 +468,9 @@ async function runProfileVisitors(client, flags, out) {
|
|
|
460
468
|
const ns = client.account(accountId);
|
|
461
469
|
const outOpts = resolveOutputOpts(flags);
|
|
462
470
|
const all = flags.all ?? false;
|
|
463
|
-
const maxPages =
|
|
471
|
+
const maxPages = readMaxPagesFlag(flags, out);
|
|
464
472
|
const limit = flags.limit ? parseInt(flags.limit, 10) : void 0;
|
|
465
|
-
const cursor = flags
|
|
473
|
+
const cursor = readCursorFlag(flags, out);
|
|
466
474
|
const params = {};
|
|
467
475
|
if (limit !== void 0) params.limit = limit;
|
|
468
476
|
if (cursor) params.cursor = cursor;
|
|
@@ -493,6 +501,7 @@ async function runProfileSsi(client, flags, out) {
|
|
|
493
501
|
const outOpts = resolveOutputOpts(flags);
|
|
494
502
|
try {
|
|
495
503
|
const result = await ns.profile.ssi();
|
|
504
|
+
readableObject(result);
|
|
496
505
|
renderSuccess(result, outOpts, out);
|
|
497
506
|
} catch (err) {
|
|
498
507
|
await handleSdkError(err, outOpts, out);
|
|
@@ -600,10 +609,11 @@ async function runProfileFollowers(client, flags, out) {
|
|
|
600
609
|
const ns = client.account(accountId);
|
|
601
610
|
const outOpts = resolveOutputOpts(flags);
|
|
602
611
|
const all = flags.all ?? false;
|
|
603
|
-
const maxPages =
|
|
612
|
+
const maxPages = readMaxPagesFlag(flags, out);
|
|
604
613
|
const params = {};
|
|
605
614
|
if (flags.limit) params.limit = parseInt(flags.limit, 10);
|
|
606
|
-
|
|
615
|
+
const cursor = readCursorFlag(flags, out);
|
|
616
|
+
if (cursor) params.cursor = cursor;
|
|
607
617
|
try {
|
|
608
618
|
if (all) {
|
|
609
619
|
const fn = (p) => ns.users.listFollowers(resolvedId, p);
|
|
@@ -631,10 +641,11 @@ async function runProfileFollowing(client, flags, out) {
|
|
|
631
641
|
const ns = client.account(accountId);
|
|
632
642
|
const outOpts = resolveOutputOpts(flags);
|
|
633
643
|
const all = flags.all ?? false;
|
|
634
|
-
const maxPages =
|
|
644
|
+
const maxPages = readMaxPagesFlag(flags, out);
|
|
635
645
|
const params = {};
|
|
636
646
|
if (flags.limit) params.limit = parseInt(flags.limit, 10);
|
|
637
|
-
|
|
647
|
+
const cursor = readCursorFlag(flags, out);
|
|
648
|
+
if (cursor) params.cursor = cursor;
|
|
638
649
|
try {
|
|
639
650
|
if (all) {
|
|
640
651
|
const fn = (p) => ns.users.listFollowing(resolvedId, p);
|
|
@@ -22,12 +22,15 @@ import {
|
|
|
22
22
|
} from "./chunk-UEAX6KUB.js";
|
|
23
23
|
import {
|
|
24
24
|
requireAccount
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-BLFGJIJJ.js";
|
|
26
26
|
import {
|
|
27
27
|
buildPreviewOutput
|
|
28
28
|
} from "./chunk-TCUYH5GO.js";
|
|
29
29
|
import {
|
|
30
30
|
pageDelayFromFlags,
|
|
31
|
+
readCursorFlag,
|
|
32
|
+
readMaxPagesFlag,
|
|
33
|
+
readableObject,
|
|
31
34
|
readablePage,
|
|
32
35
|
rejectPaginationModifiersWithoutAll,
|
|
33
36
|
renderError,
|
|
@@ -36,7 +39,7 @@ import {
|
|
|
36
39
|
resolveEffectiveConfig,
|
|
37
40
|
streamAll,
|
|
38
41
|
writeNdjsonItem
|
|
39
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-CBHL3QQJ.js";
|
|
40
43
|
import "./chunk-XZJQQJBE.js";
|
|
41
44
|
import {
|
|
42
45
|
createClient,
|
|
@@ -262,6 +265,7 @@ async function runRecruiterProfile(client, flags, out) {
|
|
|
262
265
|
const outOpts = resolveOutputOpts(flags);
|
|
263
266
|
try {
|
|
264
267
|
const result = await ns.recruiter.getProfile(resolvedId, {});
|
|
268
|
+
readableObject(result);
|
|
265
269
|
renderSuccess(result, outOpts, out);
|
|
266
270
|
} catch (err) {
|
|
267
271
|
await handleSdkError(err, outOpts, out);
|
|
@@ -274,9 +278,9 @@ async function runRecruiterSearchPeople(client, flags, out, readers = DEFAULT_FI
|
|
|
274
278
|
const ns = client.account(accountId);
|
|
275
279
|
const outOpts = resolveOutputOpts(flags);
|
|
276
280
|
const all = flags.all ?? false;
|
|
277
|
-
const maxPages =
|
|
281
|
+
const maxPages = readMaxPagesFlag(flags, out);
|
|
278
282
|
const limit = flags.limit ? parseInt(flags.limit, 10) : void 0;
|
|
279
|
-
const cursor = flags
|
|
283
|
+
const cursor = readCursorFlag(flags, out);
|
|
280
284
|
const assembled = await assembleFilters(flags, readers);
|
|
281
285
|
if ("error" in assembled) {
|
|
282
286
|
out.stderr.write(`error: ${assembled.error}
|
|
@@ -342,6 +346,7 @@ async function runRecruiterSearchParameters(client, flags, out) {
|
|
|
342
346
|
if (flags.limit) params["limit"] = parseInt(flags.limit, 10);
|
|
343
347
|
try {
|
|
344
348
|
const result = await ns.recruiter.searchParameters(body, Object.keys(params).length > 0 ? params : void 0);
|
|
349
|
+
readableObject(result);
|
|
345
350
|
renderSuccess(result, outOpts, out);
|
|
346
351
|
} catch (err) {
|
|
347
352
|
await handleSdkError(err, outOpts, out);
|
|
@@ -355,9 +360,9 @@ async function runRecruiterSearchFromUrl(client, flags, out) {
|
|
|
355
360
|
const ns = client.account(accountId);
|
|
356
361
|
const outOpts = resolveOutputOpts(flags);
|
|
357
362
|
const all = flags.all ?? false;
|
|
358
|
-
const maxPages =
|
|
363
|
+
const maxPages = readMaxPagesFlag(flags, out);
|
|
359
364
|
const limit = flags.limit ? parseInt(flags.limit, 10) : void 0;
|
|
360
|
-
const cursor = flags
|
|
365
|
+
const cursor = readCursorFlag(flags, out);
|
|
361
366
|
const body = { url };
|
|
362
367
|
const params = {};
|
|
363
368
|
if (limit !== void 0) params["limit"] = limit;
|
|
@@ -395,9 +400,9 @@ async function runRecruiterListProjects(client, flags, out) {
|
|
|
395
400
|
const ns = client.account(accountId);
|
|
396
401
|
const outOpts = resolveOutputOpts(flags);
|
|
397
402
|
const all = flags.all ?? false;
|
|
398
|
-
const maxPages =
|
|
403
|
+
const maxPages = readMaxPagesFlag(flags, out);
|
|
399
404
|
const limit = flags.limit ? parseInt(flags.limit, 10) : void 0;
|
|
400
|
-
const cursor = flags
|
|
405
|
+
const cursor = readCursorFlag(flags, out);
|
|
401
406
|
const params = {};
|
|
402
407
|
if (limit !== void 0) params["limit"] = limit;
|
|
403
408
|
if (cursor) params["cursor"] = cursor;
|
|
@@ -428,6 +433,7 @@ async function runRecruiterGetProject(client, flags, out) {
|
|
|
428
433
|
const outOpts = resolveOutputOpts(flags);
|
|
429
434
|
try {
|
|
430
435
|
const result = await ns.recruiter.getProject(projectId);
|
|
436
|
+
readableObject(result);
|
|
431
437
|
renderSuccess(result, outOpts, out);
|
|
432
438
|
} catch (err) {
|
|
433
439
|
await handleSdkError(err, outOpts, out);
|
|
@@ -477,9 +483,9 @@ async function runRecruiterListPipeline(client, flags, out) {
|
|
|
477
483
|
const ns = client.account(accountId);
|
|
478
484
|
const outOpts = resolveOutputOpts(flags);
|
|
479
485
|
const all = flags.all ?? false;
|
|
480
|
-
const maxPages =
|
|
486
|
+
const maxPages = readMaxPagesFlag(flags, out);
|
|
481
487
|
const limit = flags.limit ? parseInt(flags.limit, 10) : void 0;
|
|
482
|
-
const cursor = flags
|
|
488
|
+
const cursor = readCursorFlag(flags, out);
|
|
483
489
|
const body = {};
|
|
484
490
|
if (flags.keywords) body["keywords"] = flags.keywords;
|
|
485
491
|
if (flags["stage-id"]) body["stage_id"] = flags["stage-id"];
|
|
@@ -526,6 +532,7 @@ async function runRecruiterGetProjectJob(client, flags, out) {
|
|
|
526
532
|
const outOpts = resolveOutputOpts(flags);
|
|
527
533
|
try {
|
|
528
534
|
const result = await ns.recruiter.getProjectJob(projectId);
|
|
535
|
+
readableObject(result);
|
|
529
536
|
renderSuccess(result, outOpts, out);
|
|
530
537
|
} catch (err) {
|
|
531
538
|
await handleSdkError(err, outOpts, out);
|
|
@@ -540,6 +547,7 @@ async function runRecruiterGetProjectJobBudget(client, flags, out) {
|
|
|
540
547
|
const outOpts = resolveOutputOpts(flags);
|
|
541
548
|
try {
|
|
542
549
|
const result = await ns.recruiter.getProjectJobBudget(projectId, jobId);
|
|
550
|
+
readableObject(result);
|
|
543
551
|
renderSuccess(result, outOpts, out);
|
|
544
552
|
} catch (err) {
|
|
545
553
|
await handleSdkError(err, outOpts, out);
|
|
@@ -578,9 +586,9 @@ async function runRecruiterListJobs(client, flags, out) {
|
|
|
578
586
|
const ns = client.account(accountId);
|
|
579
587
|
const outOpts = resolveOutputOpts(flags);
|
|
580
588
|
const all = flags.all ?? false;
|
|
581
|
-
const maxPages =
|
|
589
|
+
const maxPages = readMaxPagesFlag(flags, out);
|
|
582
590
|
const limit = flags.limit ? parseInt(flags.limit, 10) : void 0;
|
|
583
|
-
const cursor = flags
|
|
591
|
+
const cursor = readCursorFlag(flags, out);
|
|
584
592
|
const params = {};
|
|
585
593
|
if (limit !== void 0) params["limit"] = limit;
|
|
586
594
|
if (cursor) params["cursor"] = cursor;
|
|
@@ -788,9 +796,9 @@ async function runRecruiterSearchTalentPool(client, flags, out, readers = DEFAUL
|
|
|
788
796
|
const ns = client.account(accountId);
|
|
789
797
|
const outOpts = resolveOutputOpts(flags);
|
|
790
798
|
const all = flags.all ?? false;
|
|
791
|
-
const maxPages =
|
|
799
|
+
const maxPages = readMaxPagesFlag(flags, out);
|
|
792
800
|
const limit = flags.limit ? parseInt(flags.limit, 10) : void 0;
|
|
793
|
-
const cursor = flags
|
|
801
|
+
const cursor = readCursorFlag(flags, out);
|
|
794
802
|
const assembled = await assembleFilters(flags, readers);
|
|
795
803
|
if ("error" in assembled) {
|
|
796
804
|
out.stderr.write(`error: ${assembled.error}
|
|
@@ -842,9 +850,11 @@ async function runRecruiterListApplicants(client, flags, out) {
|
|
|
842
850
|
const body = { channel_id: flags["channel-id"] };
|
|
843
851
|
const params = {};
|
|
844
852
|
if (flags.limit) params["limit"] = parseInt(flags.limit, 10);
|
|
845
|
-
|
|
853
|
+
const cursor = readCursorFlag(flags, out);
|
|
854
|
+
if (cursor) params["cursor"] = cursor;
|
|
846
855
|
try {
|
|
847
856
|
const result = await ns.recruiter.listApplicants(projectId, body, Object.keys(params).length > 0 ? params : void 0);
|
|
857
|
+
readablePage(result);
|
|
848
858
|
renderSuccess(result, outOpts, out);
|
|
849
859
|
} catch (err) {
|
|
850
860
|
await handleSdkError(err, outOpts, out);
|
|
@@ -859,6 +869,7 @@ async function runRecruiterGetJob(client, flags, out) {
|
|
|
859
869
|
const outOpts = resolveOutputOpts(flags);
|
|
860
870
|
try {
|
|
861
871
|
const result = await ns.recruiter.getJob(jobId);
|
|
872
|
+
readableObject(result);
|
|
862
873
|
renderSuccess(result, { ...outOpts, slim: slimJob }, out);
|
|
863
874
|
} catch (err) {
|
|
864
875
|
await handleSdkError(err, outOpts, out);
|
|
@@ -873,6 +884,7 @@ async function runRecruiterGetApplicant(client, flags, out) {
|
|
|
873
884
|
const outOpts = resolveOutputOpts(flags);
|
|
874
885
|
try {
|
|
875
886
|
const result = await ns.recruiter.getApplicant(projectId, applicantId);
|
|
887
|
+
readableObject(result);
|
|
876
888
|
renderSuccess(result, outOpts, out);
|
|
877
889
|
} catch (err) {
|
|
878
890
|
await handleSdkError(err, outOpts, out);
|
|
@@ -14,12 +14,15 @@ import {
|
|
|
14
14
|
} from "./chunk-UEAX6KUB.js";
|
|
15
15
|
import {
|
|
16
16
|
requireAccount
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-BLFGJIJJ.js";
|
|
18
18
|
import {
|
|
19
19
|
buildPreviewOutput
|
|
20
20
|
} from "./chunk-TCUYH5GO.js";
|
|
21
21
|
import {
|
|
22
22
|
pageDelayFromFlags,
|
|
23
|
+
readCursorFlag,
|
|
24
|
+
readMaxPagesFlag,
|
|
25
|
+
readableObject,
|
|
23
26
|
readablePage,
|
|
24
27
|
rejectPaginationModifiersWithoutAll,
|
|
25
28
|
renderError,
|
|
@@ -28,14 +31,13 @@ import {
|
|
|
28
31
|
resolveEffectiveConfig,
|
|
29
32
|
streamAll,
|
|
30
33
|
writeNdjsonItem
|
|
31
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-CBHL3QQJ.js";
|
|
32
35
|
import "./chunk-XZJQQJBE.js";
|
|
33
36
|
import {
|
|
34
37
|
createClient
|
|
35
38
|
} from "./chunk-DCZR4M7G.js";
|
|
36
39
|
import {
|
|
37
40
|
GLOBAL_FLAGS,
|
|
38
|
-
NON_STREAM_FLAGS,
|
|
39
41
|
READ_SINGLE_FLAGS,
|
|
40
42
|
WRITE_FLAGS
|
|
41
43
|
} from "./chunk-XDQHNUEU.js";
|
|
@@ -82,9 +84,9 @@ async function runSalesNavSearchPeople(client, flags, out, readers = DEFAULT_FIL
|
|
|
82
84
|
const ns = client.account(accountId);
|
|
83
85
|
const outOpts = resolveOutputOpts(flags);
|
|
84
86
|
const all = flags.all ?? false;
|
|
85
|
-
const maxPages =
|
|
87
|
+
const maxPages = readMaxPagesFlag(flags, out);
|
|
86
88
|
const limit = flags.limit ? parseInt(flags.limit, 10) : void 0;
|
|
87
|
-
const cursor = flags
|
|
89
|
+
const cursor = readCursorFlag(flags, out);
|
|
88
90
|
const assembled = await assembleFilters(flags, readers);
|
|
89
91
|
if ("error" in assembled) {
|
|
90
92
|
out.stderr.write(`error: ${assembled.error}
|
|
@@ -134,9 +136,9 @@ async function runSalesNavSearchCompanies(client, flags, out, readers = DEFAULT_
|
|
|
134
136
|
const ns = client.account(accountId);
|
|
135
137
|
const outOpts = resolveOutputOpts(flags);
|
|
136
138
|
const all = flags.all ?? false;
|
|
137
|
-
const maxPages =
|
|
139
|
+
const maxPages = readMaxPagesFlag(flags, out);
|
|
138
140
|
const limit = flags.limit ? parseInt(flags.limit, 10) : void 0;
|
|
139
|
-
const cursor = flags
|
|
141
|
+
const cursor = readCursorFlag(flags, out);
|
|
140
142
|
const assembled = await assembleFilters(flags, readers);
|
|
141
143
|
if ("error" in assembled) {
|
|
142
144
|
out.stderr.write(`error: ${assembled.error}
|
|
@@ -177,6 +179,7 @@ async function runSalesNavSearchCompanies(client, flags, out, readers = DEFAULT_
|
|
|
177
179
|
}
|
|
178
180
|
async function runSalesNavGetParameters(client, flags, out) {
|
|
179
181
|
rejectPreviewOnRead(flags.preview, out);
|
|
182
|
+
rejectPaginationModifiersWithoutAll(flags, out);
|
|
180
183
|
if (!flags.type) {
|
|
181
184
|
out.stderr.write("error: --type is required.\n");
|
|
182
185
|
process.exit(2);
|
|
@@ -184,11 +187,27 @@ async function runSalesNavGetParameters(client, flags, out) {
|
|
|
184
187
|
const accountId = await requireAccount(client, flags, out);
|
|
185
188
|
const ns = client.account(accountId);
|
|
186
189
|
const outOpts = resolveOutputOpts(flags);
|
|
190
|
+
const all = flags.all ?? false;
|
|
191
|
+
const maxPages = readMaxPagesFlag(flags, out);
|
|
187
192
|
const params = { type: flags.type };
|
|
188
193
|
if (flags.keywords) params.keywords = flags.keywords;
|
|
189
194
|
if (flags.limit) params.limit = parseInt(flags.limit, 10);
|
|
195
|
+
const cursor = readCursorFlag(flags, out);
|
|
196
|
+
if (cursor) params.cursor = cursor;
|
|
190
197
|
try {
|
|
198
|
+
if (all) {
|
|
199
|
+
const fn = (p) => ns.salesNavigator.getParameters(p);
|
|
200
|
+
for await (const item of streamAll(fn, params, {
|
|
201
|
+
maxPages,
|
|
202
|
+
out,
|
|
203
|
+
pageDelayMs: pageDelayFromFlags(flags)
|
|
204
|
+
})) {
|
|
205
|
+
writeNdjsonItem(out, item, outOpts.fields);
|
|
206
|
+
}
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
191
209
|
const result = await ns.salesNavigator.getParameters(params);
|
|
210
|
+
readablePage(result);
|
|
192
211
|
renderSuccess(result, outOpts, out);
|
|
193
212
|
} catch (err) {
|
|
194
213
|
await handleSdkError(err, outOpts, out);
|
|
@@ -202,9 +221,9 @@ async function runSalesNavSearchFromUrl(client, flags, out) {
|
|
|
202
221
|
const ns = client.account(accountId);
|
|
203
222
|
const outOpts = resolveOutputOpts(flags);
|
|
204
223
|
const all = flags.all ?? false;
|
|
205
|
-
const maxPages =
|
|
224
|
+
const maxPages = readMaxPagesFlag(flags, out);
|
|
206
225
|
const limit = flags.limit ? parseInt(flags.limit, 10) : void 0;
|
|
207
|
-
const cursor = flags
|
|
226
|
+
const cursor = readCursorFlag(flags, out);
|
|
208
227
|
const body = { url };
|
|
209
228
|
const params = {};
|
|
210
229
|
if (limit !== void 0) params["limit"] = limit;
|
|
@@ -309,6 +328,7 @@ async function runSalesNavProfile(client, flags, out) {
|
|
|
309
328
|
const outOpts = resolveOutputOpts(flags);
|
|
310
329
|
try {
|
|
311
330
|
const result = await ns.salesNavigator.getProfile(resolvedId, {});
|
|
331
|
+
readableObject(result);
|
|
312
332
|
renderSuccess(result, outOpts, out);
|
|
313
333
|
} catch (err) {
|
|
314
334
|
await handleSdkError(err, outOpts, out);
|
|
@@ -345,10 +365,11 @@ async function runSalesNavAccountLists(client, flags, out) {
|
|
|
345
365
|
const ns = client.account(accountId);
|
|
346
366
|
const outOpts = resolveOutputOpts(flags);
|
|
347
367
|
const all = flags.all ?? false;
|
|
348
|
-
const maxPages =
|
|
368
|
+
const maxPages = readMaxPagesFlag(flags, out);
|
|
349
369
|
const params = {};
|
|
350
370
|
if (flags.limit) params["limit"] = parseInt(flags.limit, 10);
|
|
351
|
-
|
|
371
|
+
const cursor = readCursorFlag(flags, out);
|
|
372
|
+
if (cursor) params["cursor"] = cursor;
|
|
352
373
|
try {
|
|
353
374
|
if (all) {
|
|
354
375
|
const fn = (p) => ns.salesNavigator.accountLists(p);
|
|
@@ -375,10 +396,11 @@ async function runSalesNavLeadLists(client, flags, out) {
|
|
|
375
396
|
const ns = client.account(accountId);
|
|
376
397
|
const outOpts = resolveOutputOpts(flags);
|
|
377
398
|
const all = flags.all ?? false;
|
|
378
|
-
const maxPages =
|
|
399
|
+
const maxPages = readMaxPagesFlag(flags, out);
|
|
379
400
|
const params = {};
|
|
380
401
|
if (flags.limit) params["limit"] = parseInt(flags.limit, 10);
|
|
381
|
-
|
|
402
|
+
const cursor = readCursorFlag(flags, out);
|
|
403
|
+
if (cursor) params["cursor"] = cursor;
|
|
382
404
|
try {
|
|
383
405
|
if (all) {
|
|
384
406
|
const fn = (p) => ns.salesNavigator.leadLists(p);
|
|
@@ -406,14 +428,15 @@ async function runSalesNavBrowseAccountList(client, flags, out) {
|
|
|
406
428
|
const ns = client.account(accountId);
|
|
407
429
|
const outOpts = resolveOutputOpts(flags);
|
|
408
430
|
const all = flags.all ?? false;
|
|
409
|
-
const maxPages =
|
|
431
|
+
const maxPages = readMaxPagesFlag(flags, out);
|
|
410
432
|
const body = {};
|
|
411
433
|
if (flags.filter) body["filter"] = flags.filter;
|
|
412
434
|
if (flags["sort-by"]) body["sort_by"] = flags["sort-by"];
|
|
413
435
|
if (flags["sort-order"]) body["sort_order"] = flags["sort-order"];
|
|
414
436
|
const params = {};
|
|
415
437
|
if (flags.limit) params["limit"] = parseInt(flags.limit, 10);
|
|
416
|
-
|
|
438
|
+
const cursor = readCursorFlag(flags, out);
|
|
439
|
+
if (cursor) params["cursor"] = cursor;
|
|
417
440
|
try {
|
|
418
441
|
if (all) {
|
|
419
442
|
const fn = (p) => ns.salesNavigator.browseAccountList(listId, body, p);
|
|
@@ -441,14 +464,15 @@ async function runSalesNavBrowseLeadList(client, flags, out) {
|
|
|
441
464
|
const ns = client.account(accountId);
|
|
442
465
|
const outOpts = resolveOutputOpts(flags);
|
|
443
466
|
const all = flags.all ?? false;
|
|
444
|
-
const maxPages =
|
|
467
|
+
const maxPages = readMaxPagesFlag(flags, out);
|
|
445
468
|
const body = {};
|
|
446
469
|
if (flags.spotlight) body["spotlight"] = flags.spotlight;
|
|
447
470
|
if (flags["sort-by"]) body["sort_by"] = flags["sort-by"];
|
|
448
471
|
if (flags["sort-order"]) body["sort_order"] = flags["sort-order"];
|
|
449
472
|
const params = {};
|
|
450
473
|
if (flags.limit) params["limit"] = parseInt(flags.limit, 10);
|
|
451
|
-
|
|
474
|
+
const cursor = readCursorFlag(flags, out);
|
|
475
|
+
if (cursor) params["cursor"] = cursor;
|
|
452
476
|
try {
|
|
453
477
|
if (all) {
|
|
454
478
|
const fn = (p) => ns.salesNavigator.browseLeadList(listId, body, p);
|
|
@@ -593,9 +617,12 @@ var salesNavSearchCompaniesCommand = defineCommand({
|
|
|
593
617
|
}
|
|
594
618
|
});
|
|
595
619
|
var salesNavSearchParametersCommand = defineCommand({
|
|
596
|
-
meta: {
|
|
620
|
+
meta: {
|
|
621
|
+
name: "parameters",
|
|
622
|
+
description: "Resolve Sales Navigator filter parameter IDs. Paginated: --cursor pages manually, --all streams every page as NDJSON."
|
|
623
|
+
},
|
|
597
624
|
args: {
|
|
598
|
-
...
|
|
625
|
+
...GLOBAL_FLAGS,
|
|
599
626
|
type: {
|
|
600
627
|
type: "string",
|
|
601
628
|
description: "Parameter type to resolve. One of: GROUPS, SALES_INDUSTRY, DEPARTMENT, PERSONA, ACCOUNT_LISTS, LEAD_LISTS, TECHNOLOGIES, SAVED_ACCOUNTS, SAVED_SEARCHES, RECENT_SEARCHES, REGION, POSTAL_CODE.",
|