@curviate/cli 0.57.0 → 0.58.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 +93 -0
- package/README.md +9 -2
- package/dist/{account-IRIYB2SG.js → account-GSL6BCNX.js} +52 -16
- package/dist/{analytics-IRSCLVOL.js → analytics-4FUMJSMC.js} +6 -6
- package/dist/{beta-consent-NQVGFZL3.js → beta-consent-EC2QF6CM.js} +4 -4
- package/dist/billing-STRNXA4H.js +19 -0
- package/dist/{chunk-6OT6TS7N.js → chunk-3IL3D5IZ.js} +2 -2
- package/dist/{chunk-3ZQNOKEK.js → chunk-5OAJ4D65.js} +2 -2
- package/dist/{chunk-AMTKGO37.js → chunk-5Z3CCE5N.js} +1 -1
- package/dist/{billing-TCTP44ZB.js → chunk-7F6B7P32.js} +123 -12
- package/dist/{chunk-3B5M2RUN.js → chunk-CQHCPZ5I.js} +1 -1
- package/dist/{chunk-SCUTAREU.js → chunk-EWSOIFG2.js} +17 -0
- package/dist/{chunk-RKNW4UX4.js → chunk-JKOQX46J.js} +6 -0
- package/dist/{chunk-VHNF6OZD.js → chunk-JY26SUNH.js} +18 -2
- package/dist/{chunk-VPFV7YV3.js → chunk-KS4I4B3Z.js} +6 -6
- package/dist/{chunk-OE4CY3ZL.js → chunk-KUVJM5CP.js} +1 -1
- package/dist/{chunk-F7CLAS5Y.js → chunk-MLZSXQZC.js} +2 -2
- package/dist/{chunk-RXDG57B2.js → chunk-PBJZQZPO.js} +1 -1
- package/dist/{chunk-A6JGJGDF.js → chunk-WGGZWJPO.js} +16 -16
- package/dist/{chunk-AG6G3PRQ.js → chunk-WITIJCUU.js} +17 -13
- package/dist/{chunk-5LGKZBAY.js → chunk-XDPU2YAF.js} +4 -3
- package/dist/{chunk-RTT75CXE.js → chunk-XXB4MAX3.js} +86 -14
- package/dist/cli.js +33 -33
- package/dist/{comment-PNHEKGZX.js → comment-MUELYZYN.js} +8 -8
- package/dist/{company-OUFF23SU.js → company-5N7CXORR.js} +8 -8
- package/dist/{company-record-ULPDDB6L.js → company-record-HWLTP4TV.js} +95 -10
- package/dist/{config-U6VDNL2P.js → config-PI7JMQ2L.js} +2 -2
- package/dist/{connect-ICNXC37R.js → connect-NNZOOPWV.js} +11 -11
- package/dist/{contact-K6RIVQWU.js → contact-VNG7HRCN.js} +9 -9
- package/dist/{contact-groups-CNH2VB6A.js → contact-groups-6JF7VX6Q.js} +11 -11
- package/dist/{contact-import-FK22UTN2.js → contact-import-TMJWY2VD.js} +11 -11
- package/dist/core-ZRJY3HTF.js +46 -0
- package/dist/{do-not-contact-BQHXNHTV.js → do-not-contact-GDVIUNMT.js} +22 -20
- package/dist/{doctor-ZYPZF5BE.js → doctor-ZNAR5AZ2.js} +4 -4
- package/dist/{document-H65EXU4L.js → document-G6UND26L.js} +1 -1
- package/dist/{domain-HLOT6Y4A.js → domain-62YUYVDW.js} +5 -5
- package/dist/{draft-JGQ36JSH.js → draft-ED6RL67K.js} +5 -5
- package/dist/{enrollment-CF634DB4.js → enrollment-LN3Z3RC5.js} +14 -10
- package/dist/{examples-J4X5NEIE.js → examples-5FJS47QF.js} +2 -2
- package/dist/{exit-codes-P2FLCKM7.js → exit-codes-LQDMGDII.js} +1 -1
- package/dist/{export-ZQLDQYUZ.js → export-S6D4FEAG.js} +4 -4
- package/dist/{feed-RQHEDZVL.js → feed-AC7HWUCD.js} +6 -6
- package/dist/{group-LRMG76FN.js → group-6N37Q5ZS.js} +6 -6
- package/dist/{inbox-5RGG5RQG.js → inbox-JFRBROQ2.js} +6 -6
- package/dist/{inboxes-ZFY6ZP33.js → inboxes-IBZHZKSD.js} +6 -6
- package/dist/{incoming-3MJ4CP6H.js → incoming-YDRPPO24.js} +8 -8
- package/dist/{job-QFIUTHHT.js → job-CSRHIFZM.js} +6 -6
- package/dist/{login-THXWX5HZ.js → login-M7ZLOR2U.js} +2 -2
- package/dist/mailbox-E2K3I2VH.js +712 -0
- package/dist/{message-DM5OUKQS.js → message-SX6RDGWP.js} +7 -7
- package/dist/{motion-NKOAK7NU.js → motion-4HH3OFI6.js} +121 -16
- package/dist/{network-VKJUMZ2L.js → network-JQYLSQDH.js} +12 -12
- package/dist/{notification-XW5J6KFA.js → notification-ZAQM463D.js} +6 -6
- package/dist/{notifications-USYOV54R.js → notifications-N55F3DP3.js} +9 -9
- package/dist/{post-M2G3BK4A.js → post-SIHHJX3P.js} +8 -8
- package/dist/{profile-3SG64IEG.js → profile-VBHX3QGP.js} +12 -12
- package/dist/{recruiter-7OUGZ776.js → recruiter-7AGFKQPI.js} +9 -9
- package/dist/{sales-nav-HHQLLM5C.js → sales-nav-ADVFBKWB.js} +9 -9
- package/dist/{search-5LMSLUH4.js → search-THJFPGOH.js} +16 -16
- package/dist/{setup-6F4HYUSZ.js → setup-D6D7SNND.js} +4 -4
- package/dist/{signal-LVODDBOY.js → signal-TGSF7WEP.js} +126 -19
- package/dist/{team-MSOPELF6.js → team-MVNHCWJP.js} +8 -8
- package/dist/{tier-RXHOAQ6L.js → tier-DAF7Y2HN.js} +4 -4
- package/dist/{unibox-UAA6WIGZ.js → unibox-7B6B4SXB.js} +292 -14
- package/dist/{webhook-J2H7X766.js → webhook-NUVSTDXF.js} +12 -12
- package/package.json +3 -3
- package/dist/core-MPEBYNSL.js +0 -46
- package/dist/mailbox-54DPLNXA.js +0 -412
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
DEFAULT_FILTER_READERS,
|
|
4
4
|
assembleFilters,
|
|
5
5
|
splitCsv
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5Z3CCE5N.js";
|
|
7
7
|
import {
|
|
8
8
|
resolveIdentifier
|
|
9
9
|
} from "./chunk-UEAX6KUB.js";
|
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
AttachError,
|
|
17
17
|
readAttachment,
|
|
18
18
|
toAttachmentPayload
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-JY26SUNH.js";
|
|
20
20
|
import {
|
|
21
21
|
requireAccount
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-MLZSXQZC.js";
|
|
23
23
|
import {
|
|
24
24
|
buildPreviewOutput
|
|
25
25
|
} from "./chunk-TCUYH5GO.js";
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
readablePage,
|
|
32
32
|
rejectPaginationModifiersWithoutAll,
|
|
33
33
|
streamAll
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-KUVJM5CP.js";
|
|
35
35
|
import {
|
|
36
36
|
renderError,
|
|
37
37
|
renderSuccess,
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
import {
|
|
42
42
|
createClient,
|
|
43
43
|
resolveEffectiveConfig
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-PBJZQZPO.js";
|
|
45
45
|
import {
|
|
46
46
|
GLOBAL_FLAGS,
|
|
47
47
|
READ_SINGLE_FLAGS,
|
|
@@ -50,11 +50,11 @@ import {
|
|
|
50
50
|
} from "./chunk-QLKGOIWS.js";
|
|
51
51
|
import {
|
|
52
52
|
DESCRIPTIONS
|
|
53
|
-
} from "./chunk-
|
|
54
|
-
import "./chunk-
|
|
53
|
+
} from "./chunk-XDPU2YAF.js";
|
|
54
|
+
import "./chunk-JKOQX46J.js";
|
|
55
55
|
import "./chunk-FDJMAF7D.js";
|
|
56
56
|
import "./chunk-ZYURL5VK.js";
|
|
57
|
-
import "./chunk-
|
|
57
|
+
import "./chunk-EWSOIFG2.js";
|
|
58
58
|
|
|
59
59
|
// src/commands/sales-nav.ts
|
|
60
60
|
import { defineCommand } from "citty";
|
|
@@ -78,7 +78,7 @@ function normalizeAttachPaths(attach) {
|
|
|
78
78
|
async function handleSdkError(err, outOpts, out) {
|
|
79
79
|
const { CurviateError } = await import("@curviate/sdk");
|
|
80
80
|
if (err instanceof CurviateError) {
|
|
81
|
-
const { getExitCode } = await import("./exit-codes-
|
|
81
|
+
const { getExitCode } = await import("./exit-codes-LQDMGDII.js");
|
|
82
82
|
renderError(err, outOpts, out);
|
|
83
83
|
process.exit(getExitCode(err));
|
|
84
84
|
}
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
DEFAULT_FILTER_READERS,
|
|
4
4
|
assembleFilters,
|
|
5
5
|
splitCsv
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5Z3CCE5N.js";
|
|
7
7
|
import {
|
|
8
8
|
slimSearchCompanies,
|
|
9
9
|
slimSearchCompaniesItem,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from "./chunk-JXDEV33Z.js";
|
|
17
17
|
import {
|
|
18
18
|
requireAccount
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-MLZSXQZC.js";
|
|
20
20
|
import {
|
|
21
21
|
intFlag,
|
|
22
22
|
intListFlag
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
readablePage,
|
|
29
29
|
rejectPaginationModifiersWithoutAll,
|
|
30
30
|
streamAll
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-KUVJM5CP.js";
|
|
32
32
|
import {
|
|
33
33
|
renderError,
|
|
34
34
|
renderSuccess,
|
|
@@ -38,18 +38,18 @@ import {
|
|
|
38
38
|
import {
|
|
39
39
|
createClient,
|
|
40
40
|
resolveEffectiveConfig
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-PBJZQZPO.js";
|
|
42
42
|
import {
|
|
43
43
|
GLOBAL_FLAGS,
|
|
44
44
|
readOnly
|
|
45
45
|
} from "./chunk-QLKGOIWS.js";
|
|
46
46
|
import {
|
|
47
47
|
DESCRIPTIONS
|
|
48
|
-
} from "./chunk-
|
|
49
|
-
import "./chunk-
|
|
48
|
+
} from "./chunk-XDPU2YAF.js";
|
|
49
|
+
import "./chunk-JKOQX46J.js";
|
|
50
50
|
import "./chunk-FDJMAF7D.js";
|
|
51
51
|
import "./chunk-ZYURL5VK.js";
|
|
52
|
-
import "./chunk-
|
|
52
|
+
import "./chunk-EWSOIFG2.js";
|
|
53
53
|
|
|
54
54
|
// src/commands/search.ts
|
|
55
55
|
import { defineCommand } from "citty";
|
|
@@ -226,7 +226,7 @@ async function runSearchPeople(client, flags, out, readers = DEFAULT_FILTER_READ
|
|
|
226
226
|
} catch (err) {
|
|
227
227
|
const { CurviateError } = await import("@curviate/sdk");
|
|
228
228
|
if (err instanceof CurviateError) {
|
|
229
|
-
const { getExitCode } = await import("./exit-codes-
|
|
229
|
+
const { getExitCode } = await import("./exit-codes-LQDMGDII.js");
|
|
230
230
|
renderError(err, outOpts, out);
|
|
231
231
|
process.exit(getExitCode(err));
|
|
232
232
|
}
|
|
@@ -268,7 +268,7 @@ async function runSearchCompanies(client, flags, out, readers = DEFAULT_FILTER_R
|
|
|
268
268
|
} catch (err) {
|
|
269
269
|
const { CurviateError } = await import("@curviate/sdk");
|
|
270
270
|
if (err instanceof CurviateError) {
|
|
271
|
-
const { getExitCode } = await import("./exit-codes-
|
|
271
|
+
const { getExitCode } = await import("./exit-codes-LQDMGDII.js");
|
|
272
272
|
renderError(err, outOpts, out);
|
|
273
273
|
process.exit(getExitCode(err));
|
|
274
274
|
}
|
|
@@ -310,7 +310,7 @@ async function runSearchPosts(client, flags, out, readers = DEFAULT_FILTER_READE
|
|
|
310
310
|
} catch (err) {
|
|
311
311
|
const { CurviateError } = await import("@curviate/sdk");
|
|
312
312
|
if (err instanceof CurviateError) {
|
|
313
|
-
const { getExitCode } = await import("./exit-codes-
|
|
313
|
+
const { getExitCode } = await import("./exit-codes-LQDMGDII.js");
|
|
314
314
|
renderError(err, outOpts, out);
|
|
315
315
|
process.exit(getExitCode(err));
|
|
316
316
|
}
|
|
@@ -352,7 +352,7 @@ async function runSearchJobs(client, flags, out, readers = DEFAULT_FILTER_READER
|
|
|
352
352
|
} catch (err) {
|
|
353
353
|
const { CurviateError } = await import("@curviate/sdk");
|
|
354
354
|
if (err instanceof CurviateError) {
|
|
355
|
-
const { getExitCode } = await import("./exit-codes-
|
|
355
|
+
const { getExitCode } = await import("./exit-codes-LQDMGDII.js");
|
|
356
356
|
renderError(err, outOpts, out);
|
|
357
357
|
process.exit(getExitCode(err));
|
|
358
358
|
}
|
|
@@ -400,7 +400,7 @@ async function runSearchParameters(client, flags, out) {
|
|
|
400
400
|
} catch (err) {
|
|
401
401
|
const { CurviateError } = await import("@curviate/sdk");
|
|
402
402
|
if (err instanceof CurviateError) {
|
|
403
|
-
const { getExitCode } = await import("./exit-codes-
|
|
403
|
+
const { getExitCode } = await import("./exit-codes-LQDMGDII.js");
|
|
404
404
|
renderError(err, outOpts, out);
|
|
405
405
|
process.exit(getExitCode(err));
|
|
406
406
|
}
|
|
@@ -442,7 +442,7 @@ async function runSearchGroups(client, flags, out) {
|
|
|
442
442
|
} catch (err) {
|
|
443
443
|
const { CurviateError } = await import("@curviate/sdk");
|
|
444
444
|
if (err instanceof CurviateError) {
|
|
445
|
-
const { getExitCode } = await import("./exit-codes-
|
|
445
|
+
const { getExitCode } = await import("./exit-codes-LQDMGDII.js");
|
|
446
446
|
renderError(err, outOpts, out);
|
|
447
447
|
process.exit(getExitCode(err));
|
|
448
448
|
}
|
|
@@ -486,7 +486,7 @@ async function runSearchServices(client, flags, out) {
|
|
|
486
486
|
} catch (err) {
|
|
487
487
|
const { CurviateError } = await import("@curviate/sdk");
|
|
488
488
|
if (err instanceof CurviateError) {
|
|
489
|
-
const { getExitCode } = await import("./exit-codes-
|
|
489
|
+
const { getExitCode } = await import("./exit-codes-LQDMGDII.js");
|
|
490
490
|
renderError(err, outOpts, out);
|
|
491
491
|
process.exit(getExitCode(err));
|
|
492
492
|
}
|
|
@@ -528,7 +528,7 @@ async function runSearchServiceParameters(client, flags, out) {
|
|
|
528
528
|
} catch (err) {
|
|
529
529
|
const { CurviateError } = await import("@curviate/sdk");
|
|
530
530
|
if (err instanceof CurviateError) {
|
|
531
|
-
const { getExitCode } = await import("./exit-codes-
|
|
531
|
+
const { getExitCode } = await import("./exit-codes-LQDMGDII.js");
|
|
532
532
|
renderError(err, outOpts, out);
|
|
533
533
|
process.exit(getExitCode(err));
|
|
534
534
|
}
|
|
@@ -567,7 +567,7 @@ async function runSearchFromUrl(client, flags, out) {
|
|
|
567
567
|
} catch (err) {
|
|
568
568
|
const { CurviateError } = await import("@curviate/sdk");
|
|
569
569
|
if (err instanceof CurviateError) {
|
|
570
|
-
const { getExitCode } = await import("./exit-codes-
|
|
570
|
+
const { getExitCode } = await import("./exit-codes-LQDMGDII.js");
|
|
571
571
|
renderError(err, outOpts, out);
|
|
572
572
|
process.exit(getExitCode(err));
|
|
573
573
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
readablePage
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KUVJM5CP.js";
|
|
5
5
|
import "./chunk-QM57YDJE.js";
|
|
6
6
|
import {
|
|
7
7
|
readlineSync
|
|
@@ -12,14 +12,14 @@ import {
|
|
|
12
12
|
isPlainObject,
|
|
13
13
|
resolveEffectiveConfig,
|
|
14
14
|
writeProfile
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-PBJZQZPO.js";
|
|
16
16
|
import {
|
|
17
17
|
GLOBAL_FLAGS,
|
|
18
18
|
getTeamFlag
|
|
19
19
|
} from "./chunk-QLKGOIWS.js";
|
|
20
20
|
import {
|
|
21
21
|
DESCRIPTIONS
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-XDPU2YAF.js";
|
|
23
23
|
import {
|
|
24
24
|
defaultReadStdin,
|
|
25
25
|
isStdinToken,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
} from "./chunk-ZYURL5VK.js";
|
|
28
28
|
import {
|
|
29
29
|
getExitCode
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-EWSOIFG2.js";
|
|
31
31
|
|
|
32
32
|
// src/commands/setup.ts
|
|
33
33
|
import { defineCommand } from "citty";
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
outputOpts,
|
|
10
10
|
rootClient,
|
|
11
11
|
usage
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import {
|
|
14
|
-
intFlag
|
|
15
|
-
} from "./chunk-NNV2OYEF.js";
|
|
12
|
+
} from "./chunk-5OAJ4D65.js";
|
|
16
13
|
import {
|
|
17
14
|
buildPreviewOutput
|
|
18
15
|
} from "./chunk-TCUYH5GO.js";
|
|
16
|
+
import {
|
|
17
|
+
intFlag
|
|
18
|
+
} from "./chunk-NNV2OYEF.js";
|
|
19
19
|
import {
|
|
20
20
|
pageDelayFromFlags,
|
|
21
21
|
readCursorFlag,
|
|
@@ -24,12 +24,12 @@ import {
|
|
|
24
24
|
readablePage,
|
|
25
25
|
rejectPaginationModifiersWithoutAll,
|
|
26
26
|
streamAll
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-KUVJM5CP.js";
|
|
28
28
|
import {
|
|
29
29
|
renderSuccess,
|
|
30
30
|
writeNdjsonItem
|
|
31
31
|
} from "./chunk-QM57YDJE.js";
|
|
32
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-PBJZQZPO.js";
|
|
33
33
|
import {
|
|
34
34
|
GLOBAL_FLAGS,
|
|
35
35
|
READ_SINGLE_FLAGS,
|
|
@@ -38,13 +38,14 @@ import {
|
|
|
38
38
|
} from "./chunk-QLKGOIWS.js";
|
|
39
39
|
import {
|
|
40
40
|
DESCRIPTIONS
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-XDPU2YAF.js";
|
|
42
42
|
import "./chunk-ZYURL5VK.js";
|
|
43
43
|
|
|
44
44
|
// src/commands/signal.ts
|
|
45
45
|
import { defineCommand } from "citty";
|
|
46
46
|
var KINDS = ["post_engaged", "post_reposted", "network_posted", "profile_viewed", "followed_you", "mentioned_you", "connection_added", "post_engaged.reaction", "post_engaged.comment"];
|
|
47
47
|
var MATCHES = ["lead", "connection", "followed", "unknown", "anonymous"];
|
|
48
|
+
var OUTCOMES = ["added_to_list", "already_in_list", "event_sent", "skipped"];
|
|
48
49
|
var online = (fn) => async ({ args }) => {
|
|
49
50
|
const f = args;
|
|
50
51
|
await fn(await rootClient(f), f);
|
|
@@ -134,15 +135,34 @@ function ruleBody(f, create) {
|
|
|
134
135
|
}
|
|
135
136
|
const outcomes = [];
|
|
136
137
|
if (f["add-to-list"] !== void 0) outcomes.push({ type: "add_to_list", list_id: nonEmpty("--add-to-list", f["add-to-list"]) });
|
|
138
|
+
if (f.enroll !== void 0) outcomes.push({ type: "enroll", campaign_id: nonEmpty("--enroll", f.enroll) });
|
|
137
139
|
if (f["send-event"]) outcomes.push({ type: "send_event" });
|
|
138
140
|
if (outcomes.length) body["outcomes"] = outcomes;
|
|
141
|
+
if (f["act-on-last-7-days"]) {
|
|
142
|
+
if (!create) usage("--act-on-last-7-days goes with `signal rules create` only.");
|
|
143
|
+
body["act_on_last_7_days"] = true;
|
|
144
|
+
}
|
|
139
145
|
if (create) {
|
|
140
146
|
if (body["name"] === void 0) usage("--name is required: the rule's name, 1 to 100 characters.");
|
|
141
147
|
if (body["kinds"] === void 0) usage("--kind is required: the Signal kinds the rule acts on, repeatable or a comma list.");
|
|
142
|
-
if (!outcomes.length) usage("pass --add-to-list <cl_...>, --send-event, or
|
|
143
|
-
} else if (!Object.keys(body).length) usage("pass what changes: --name, --kind, --accounts, --all-accounts, --add-to-list, --send-event, --unknown-people, --on or --off.");
|
|
148
|
+
if (!outcomes.length) usage("pass --add-to-list <cl_...>, --enroll <mot_...>, --send-event, or several: what the rule does.");
|
|
149
|
+
} else if (!Object.keys(body).length) usage("pass what changes: --name, --kind, --accounts, --all-accounts, --add-to-list, --enroll, --send-event, --unknown-people, --on or --off.");
|
|
144
150
|
return body;
|
|
145
151
|
}
|
|
152
|
+
async function runActions(c, f) {
|
|
153
|
+
const q = {};
|
|
154
|
+
if (f["lead-id"] !== void 0) q["lead_id"] = f["lead-id"];
|
|
155
|
+
if (f["rule-id"] !== void 0) q["rule_id"] = f["rule-id"];
|
|
156
|
+
if (f.outcome !== void 0) {
|
|
157
|
+
if (!OUTCOMES.includes(f.outcome)) usage(`--outcome takes one of ${OUTCOMES.join(", ")}.`);
|
|
158
|
+
q["outcome"] = f.outcome;
|
|
159
|
+
}
|
|
160
|
+
try {
|
|
161
|
+
await paged(f, q, (p) => c.signals.actions(p), (items) => print(table(["SIGNAL", "RULE", "LEAD", "OUTCOME", "AT"], items.map((i) => [i["signal_id"], i["rule_id"], i["lead_id"], i["reason"] ? `${String(i["outcome"])} (${String(i["reason"])})` : i["outcome"], i["created_at"]]))));
|
|
162
|
+
} catch (err) {
|
|
163
|
+
await fail(err, f);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
146
166
|
var ID = { type: "positional", description: "Signal id (sig_...)." };
|
|
147
167
|
var RULE_ID = { type: "positional", description: "Rule id (sgr_...)." };
|
|
148
168
|
var listCmd = defineCommand({
|
|
@@ -151,7 +171,7 @@ var listCmd = defineCommand({
|
|
|
151
171
|
description: "The Signals of the Accounts you may operate, newest first, at most 7 days old and only for Accounts whose Signal watch is on. Filter by --kind, --account-id, --match (lead, connection, followed, unknown, anonymous), --listed and --since. No LinkedIn call.",
|
|
152
172
|
risk: "read",
|
|
153
173
|
output: ["A table of Signal, kind, Account, person and when it happened; --json (or piped) prints the API page."],
|
|
154
|
-
seeAlso: ["curviate signal watch", "curviate signal rules list"],
|
|
174
|
+
seeAlso: ["curviate signal watch list", "curviate signal rules list"],
|
|
155
175
|
examples: ["curviate signal list", "curviate signal list --kind profile_viewed --match lead", "curviate signal list --since 2026-11-17T00:00:00Z --all"]
|
|
156
176
|
},
|
|
157
177
|
args: {
|
|
@@ -170,20 +190,80 @@ var getCmd = defineCommand({
|
|
|
170
190
|
args: { ...readOnly(READ_SINGLE_FLAGS), id: ID },
|
|
171
191
|
run: online((c, f) => one(f, () => c.signals.get(nonEmpty("the Signal id", f.id))))
|
|
172
192
|
});
|
|
193
|
+
var actionsCmd = defineCommand({
|
|
194
|
+
meta: {
|
|
195
|
+
name: "actions",
|
|
196
|
+
description: "What Signal rules did, newest first: added_to_list, already_in_list, event_sent, or skipped with its reason. Records stay while the Lead exists, after the Signal is gone. Filter by --lead-id, --rule-id and --outcome. Every role; only the Accounts you may operate. No LinkedIn call.",
|
|
197
|
+
risk: "read",
|
|
198
|
+
output: ["A table of Signal, rule, Lead, outcome and when; --json (or piped) prints the API page."],
|
|
199
|
+
seeAlso: ["curviate signal rules list", "curviate signal list"],
|
|
200
|
+
examples: ["curviate signal actions", "curviate signal actions --outcome skipped", "curviate signal actions --rule-id sgr_YOUR_RULE_ID --all"]
|
|
201
|
+
},
|
|
202
|
+
args: {
|
|
203
|
+
...readOnly(GLOBAL_FLAGS),
|
|
204
|
+
limit: { ...GLOBAL_FLAGS.limit, description: "Records per page (1 to 100)." },
|
|
205
|
+
"lead-id": { type: "string", description: "Only what rules did for this Lead (con_...)." },
|
|
206
|
+
"rule-id": { type: "string", description: "Only what this rule did (sgr_...)." },
|
|
207
|
+
outcome: { type: "string", description: "Only this outcome: added_to_list, already_in_list, event_sent or skipped." }
|
|
208
|
+
},
|
|
209
|
+
run: online(runActions)
|
|
210
|
+
});
|
|
173
211
|
var kindsCmd = defineCommand({
|
|
174
212
|
meta: { name: "kinds", description: "Every Signal kind with its sub-kinds, the follow-up read a card of that kind can trigger (engagers, viewers or none), whether it is on for your Team, and the limit rows it uses.", risk: "read", examples: ["curviate signal kinds"] },
|
|
175
213
|
args: readOnly(READ_SINGLE_FLAGS),
|
|
176
214
|
run: online((c, f) => one(f, () => c.signals.kinds()))
|
|
177
215
|
});
|
|
178
|
-
var
|
|
216
|
+
var watchSetCmd = defineCommand({
|
|
179
217
|
meta: {
|
|
180
|
-
name: "
|
|
218
|
+
name: "set",
|
|
219
|
+
description: "Switch one Account's Signal watch on or off. Off is the default, and this is the only way an Account becomes watched: once a day, inside its Active hours, Curviate reads its notifications and turns them into Signals. Off stops it from the next plan on; the Signals already stored stay until they are 7 days old. An Account that needs reconnecting can be switched on and reads paused until it is reconnected. Owners and Managers. The switch itself makes no LinkedIn call.",
|
|
220
|
+
risk: "write",
|
|
221
|
+
rules: {
|
|
222
|
+
changes: "Whether this Account's daily visit reads its notifications into Signals, from its next plan on.",
|
|
223
|
+
visible_to: "Your Team. On LinkedIn, the watch reads what the Account's own notifications show, like a person opening them.",
|
|
224
|
+
budget_rows: [],
|
|
225
|
+
retry: "Safe to repeat: the same state again.",
|
|
226
|
+
undo: "Run it again with the other value."
|
|
227
|
+
},
|
|
228
|
+
errors: { INSUFFICIENT_ROLE: "only an Owner or a Manager switches the Signal watch.", ACCOUNT_NOT_FOUND: "the Account is not one you may operate, or not this Team's." },
|
|
229
|
+
seeAlso: ["curviate signal watch list", "curviate signal list"],
|
|
230
|
+
examples: ["curviate signal watch set acc_YOUR_ACCOUNT_ID on", "curviate signal watch set acc_YOUR_ACCOUNT_ID off"]
|
|
231
|
+
},
|
|
232
|
+
args: {
|
|
233
|
+
...WRITE_SINGLE_FLAGS,
|
|
234
|
+
account: { type: "positional", description: "The Account (acc_...)." },
|
|
235
|
+
state: { type: "positional", description: "on or off." }
|
|
236
|
+
},
|
|
237
|
+
run: async ({ args }) => {
|
|
238
|
+
const f = args;
|
|
239
|
+
const account = nonEmpty("the Account id", f.account);
|
|
240
|
+
const on = onOff("state", f.state);
|
|
241
|
+
if (on === void 0) usage("say on or off: `curviate signal watch set <account_id> on`.");
|
|
242
|
+
const body = { signal_watch: on };
|
|
243
|
+
if (f.preview) return void preview("signals.setWatch", { account_id: account }, body);
|
|
244
|
+
await one(f, async () => (await rootClient(f)).signals.setWatch(account, body));
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
var watchListCmd = defineCommand({
|
|
248
|
+
meta: {
|
|
249
|
+
name: "list",
|
|
181
250
|
description: "For each Account you may operate: whether its Signal watch is on, its state (watching, paused with a reason, or off, the default), its last visit and today's visits and reads. No LinkedIn call.",
|
|
182
251
|
risk: "read",
|
|
183
|
-
|
|
252
|
+
seeAlso: ["curviate signal watch set"],
|
|
253
|
+
examples: ["curviate signal watch list"]
|
|
254
|
+
},
|
|
255
|
+
args: readOnly(READ_SINGLE_FLAGS),
|
|
256
|
+
run: online(runWatch)
|
|
257
|
+
});
|
|
258
|
+
var watchCmd = defineCommand({
|
|
259
|
+
meta: {
|
|
260
|
+
name: "watch",
|
|
261
|
+
description: "Each Account's Signal watch: `list` reads every Account's state (bare `signal watch` does too), `set <account_id> on|off` switches one."
|
|
184
262
|
},
|
|
185
263
|
args: readOnly(READ_SINGLE_FLAGS),
|
|
264
|
+
subCommands: { list: watchListCmd, set: watchSetCmd },
|
|
186
265
|
run: online(runWatch)
|
|
266
|
+
// bare `signal watch` keeps listing, as before the switch existed
|
|
187
267
|
});
|
|
188
268
|
var settingsCmd = defineCommand({
|
|
189
269
|
meta: {
|
|
@@ -218,6 +298,7 @@ var RULE_FLAGS = {
|
|
|
218
298
|
accounts: { type: "string", description: "Only these Accounts (acc_...), a comma list. Default on create: every Account of the Team, now and later." },
|
|
219
299
|
"all-accounts": { type: "boolean", description: "Every Account of the Team, now and later." },
|
|
220
300
|
"add-to-list": { type: "string", description: "Outcome: add the person to this Lead list (cl_...)." },
|
|
301
|
+
enroll: { type: "string", description: "Outcome: enroll the person in this Campaign (mot_...) through the Account that caught the Signal." },
|
|
221
302
|
"send-event": { type: "boolean", description: "Outcome: send signal.matched to your webhooks." },
|
|
222
303
|
"unknown-people": { type: "string", description: "skip (default): a person Curviate knows nothing about is skipped. visit_profile: read their profile once; the person may see the visit." },
|
|
223
304
|
on: { type: "boolean", description: "Turn the rule on." },
|
|
@@ -227,8 +308,32 @@ var RULE_ERRORS = {
|
|
|
227
308
|
INSUFFICIENT_ROLE: "your role does not allow adding Leads to a Lead list, which the rule does.",
|
|
228
309
|
ACCOUNT_NOT_SHARED: "--accounts names an Account you may not operate."
|
|
229
310
|
};
|
|
311
|
+
var switchCmd = (name) => defineCommand({
|
|
312
|
+
meta: {
|
|
313
|
+
name,
|
|
314
|
+
description: name === "enable" ? "Turn a rule on: it acts on every matching Signal from now on." : "Turn a rule off: it acts on no Signal until it is enabled again. What it did stays.",
|
|
315
|
+
risk: "write",
|
|
316
|
+
rules: {
|
|
317
|
+
changes: name === "enable" ? "The rule acts again, from the next Signal on." : "The rule stops acting, from the next Signal on.",
|
|
318
|
+
visible_to: "Your Team.",
|
|
319
|
+
budget_rows: [],
|
|
320
|
+
retry: "Safe to repeat: the same state again.",
|
|
321
|
+
undo: `\`curviate signal rules ${name === "enable" ? "disable" : "enable"} <rule_id>\`.`
|
|
322
|
+
},
|
|
323
|
+
errors: RULE_ERRORS,
|
|
324
|
+
examples: [`curviate signal rules ${name} sgr_YOUR_RULE_ID`]
|
|
325
|
+
},
|
|
326
|
+
args: { ...WRITE_SINGLE_FLAGS, id: RULE_ID },
|
|
327
|
+
run: async ({ args }) => {
|
|
328
|
+
const f = args;
|
|
329
|
+
const id = nonEmpty("the rule id", f.id);
|
|
330
|
+
const body = { enabled: name === "enable" };
|
|
331
|
+
if (f.preview) return void preview("signals.rules.update", { id }, body);
|
|
332
|
+
await one(f, async () => (await rootClient(f)).signals.rules.update(id, body));
|
|
333
|
+
}
|
|
334
|
+
});
|
|
230
335
|
var rulesCmd = defineCommand({
|
|
231
|
-
meta: { name: "rules", description: "Signal rules: what happens to a person when a Signal of a kind arrives on an Account (add them to a Lead list, send signal.matched to your webhooks)." },
|
|
336
|
+
meta: { name: "rules", description: "Signal rules: what happens to a person when a Signal of a kind arrives on an Account (add them to a Lead list, enroll them in a Campaign, send signal.matched to your webhooks)." },
|
|
232
337
|
subCommands: {
|
|
233
338
|
list: defineCommand({
|
|
234
339
|
meta: { name: "list", description: "This Team's rules, newest first, each with its one-sentence summary. Every role may read them.", risk: "read", examples: ["curviate signal rules list", "curviate signal rules list --no-enabled"] },
|
|
@@ -251,10 +356,10 @@ var rulesCmd = defineCommand({
|
|
|
251
356
|
create: defineCommand({
|
|
252
357
|
meta: {
|
|
253
358
|
name: "create",
|
|
254
|
-
description: "Create a rule: for --kind on --accounts (default every Account), add the person to a Lead list (--add-to-list) and/or send signal.matched to your webhooks (--send-event). --unknown-people visit_profile reads the profile of a person Curviate does not know, once; the person may see the visit. The answer's summary is the rule as one sentence.",
|
|
359
|
+
description: "Create a rule: for --kind on --accounts (default every Account), add the person to a Lead list (--add-to-list), enroll them in a Campaign through the Account that caught the Signal (--enroll) and/or send signal.matched to your webhooks (--send-event). --unknown-people visit_profile reads the profile of a person Curviate does not know, once; the person may see the visit. --act-on-last-7-days also acts, once, on the Team's Signals of the last 7 days. The answer's summary is the rule as one sentence.",
|
|
255
360
|
risk: "write",
|
|
256
361
|
rules: {
|
|
257
|
-
changes: "A rule that acts on every matching Signal from now on: Leads join the list, events are sent.",
|
|
362
|
+
changes: "A rule that acts on every matching Signal from now on: Leads join the list or the Campaign, events are sent.",
|
|
258
363
|
visible_to: "Your Team; with --unknown-people visit_profile, the people whose profiles are read.",
|
|
259
364
|
budget_rows: [],
|
|
260
365
|
retry: "A second call creates a second rule: list them first.",
|
|
@@ -263,7 +368,7 @@ var rulesCmd = defineCommand({
|
|
|
263
368
|
errors: RULE_ERRORS,
|
|
264
369
|
examples: ['curviate signal rules create --name "Viewers to list" --kind profile_viewed --add-to-list cl_YOUR_LIST_ID', 'curviate signal rules create --name "Engagers" --kind post_engaged --send-event --accounts acc_YOUR_ACCOUNT_ID']
|
|
265
370
|
},
|
|
266
|
-
args: { ...WRITE_SINGLE_FLAGS, ...RULE_FLAGS },
|
|
371
|
+
args: { ...WRITE_SINGLE_FLAGS, ...RULE_FLAGS, "act-on-last-7-days": { type: "boolean", description: "Also act, once, on the Team's Signals of the last 7 days." } },
|
|
267
372
|
run: async ({ args }) => {
|
|
268
373
|
const f = args;
|
|
269
374
|
const body = ruleBody(f, true);
|
|
@@ -295,6 +400,8 @@ var rulesCmd = defineCommand({
|
|
|
295
400
|
await one(f, async () => (await rootClient(f)).signals.rules.update(id, body));
|
|
296
401
|
}
|
|
297
402
|
}),
|
|
403
|
+
enable: switchCmd("enable"),
|
|
404
|
+
disable: switchCmd("disable"),
|
|
298
405
|
delete: defineCommand({
|
|
299
406
|
meta: {
|
|
300
407
|
name: "delete",
|
|
@@ -320,9 +427,9 @@ var rulesCmd = defineCommand({
|
|
|
320
427
|
});
|
|
321
428
|
var signalCommand = defineCommand({
|
|
322
429
|
meta: { name: "signal", description: DESCRIPTIONS.signal },
|
|
323
|
-
subCommands: { list: listCmd, get: getCmd, kinds: kindsCmd, watch: watchCmd, settings: settingsCmd, rules: rulesCmd },
|
|
430
|
+
subCommands: { list: listCmd, get: getCmd, actions: actionsCmd, kinds: kindsCmd, watch: watchCmd, settings: settingsCmd, rules: rulesCmd },
|
|
324
431
|
async run() {
|
|
325
|
-
const { showHelp } = await import("./examples-
|
|
432
|
+
const { showHelp } = await import("./examples-5FJS47QF.js");
|
|
326
433
|
await showHelp(signalCommand, ["curviate", "signal"]);
|
|
327
434
|
}
|
|
328
435
|
});
|
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
outputOpts,
|
|
6
6
|
rootClient,
|
|
7
7
|
usage
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import {
|
|
10
|
-
intFlag
|
|
11
|
-
} from "./chunk-NNV2OYEF.js";
|
|
8
|
+
} from "./chunk-5OAJ4D65.js";
|
|
12
9
|
import {
|
|
13
10
|
buildPreviewOutput
|
|
14
11
|
} from "./chunk-TCUYH5GO.js";
|
|
12
|
+
import {
|
|
13
|
+
intFlag
|
|
14
|
+
} from "./chunk-NNV2OYEF.js";
|
|
15
15
|
import {
|
|
16
16
|
pageDelayFromFlags,
|
|
17
17
|
readCursorFlag,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
readablePage,
|
|
21
21
|
rejectPaginationModifiersWithoutAll,
|
|
22
22
|
streamAll
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-KUVJM5CP.js";
|
|
24
24
|
import {
|
|
25
25
|
renderSuccess,
|
|
26
26
|
writeNdjsonItem
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
readConfig,
|
|
31
31
|
resolveEffectiveConfig,
|
|
32
32
|
writeProfile
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-PBJZQZPO.js";
|
|
34
34
|
import {
|
|
35
35
|
GLOBAL_FLAGS,
|
|
36
36
|
READ_SINGLE_FLAGS,
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
} from "./chunk-QLKGOIWS.js";
|
|
40
40
|
import {
|
|
41
41
|
DESCRIPTIONS
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-XDPU2YAF.js";
|
|
43
43
|
import "./chunk-ZYURL5VK.js";
|
|
44
44
|
|
|
45
45
|
// src/commands/team.ts
|
|
@@ -495,7 +495,7 @@ var teamCommand = defineCommand({
|
|
|
495
495
|
seats: seatsCmd
|
|
496
496
|
},
|
|
497
497
|
async run() {
|
|
498
|
-
const { showHelp } = await import("./examples-
|
|
498
|
+
const { showHelp } = await import("./examples-5FJS47QF.js");
|
|
499
499
|
await showHelp(teamCommand, ["curviate", "team"]);
|
|
500
500
|
}
|
|
501
501
|
});
|
|
@@ -3,21 +3,21 @@ import {
|
|
|
3
3
|
fail,
|
|
4
4
|
outputOpts,
|
|
5
5
|
rootClient
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5OAJ4D65.js";
|
|
7
7
|
import {
|
|
8
8
|
readableObject
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-KUVJM5CP.js";
|
|
10
10
|
import {
|
|
11
11
|
renderSuccess
|
|
12
12
|
} from "./chunk-QM57YDJE.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-PBJZQZPO.js";
|
|
14
14
|
import {
|
|
15
15
|
READ_SINGLE_FLAGS,
|
|
16
16
|
readOnly
|
|
17
17
|
} from "./chunk-QLKGOIWS.js";
|
|
18
18
|
import {
|
|
19
19
|
DESCRIPTIONS
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-XDPU2YAF.js";
|
|
21
21
|
import "./chunk-ZYURL5VK.js";
|
|
22
22
|
|
|
23
23
|
// src/commands/tier.ts
|