@curviate/cli 0.53.0 → 0.55.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 +30 -1
- package/README.md +34 -17
- package/dist/{account-24YCNFNY.js → account-6L33JFZS.js} +98 -116
- package/dist/{analytics-RMRTJPHK.js → analytics-HGJGXRAM.js} +5 -5
- package/dist/{beta-consent-KCJUJFAR.js → beta-consent-LIND4PPN.js} +4 -4
- package/dist/{billing-5GK6WIXR.js → billing-QKPP5NPR.js} +5 -5
- package/dist/{chunk-AA2UTHCS.js → chunk-AMMAA62Z.js} +44 -44
- package/dist/{chunk-R5VJTBAJ.js → chunk-BC4N5X3N.js} +47 -47
- package/dist/{chunk-N4IYTFIY.js → chunk-EA5LJ4CS.js} +1 -1
- package/dist/{chunk-WYFTBTDQ.js → chunk-FHSGANM6.js} +10 -10
- package/dist/chunk-J34JU27C.js +94 -0
- package/dist/{chunk-62YAYAUI.js → chunk-JKXGL7PT.js} +9 -9
- package/dist/{chunk-FUX3BRYP.js → chunk-JXDEV33Z.js} +1 -1
- package/dist/{chunk-4YGTPVEH.js → chunk-KLXDFFHT.js} +1 -1
- package/dist/{chunk-WY73KWPF.js → chunk-LGUZ52BU.js} +2 -2
- package/dist/{chunk-FNENKSJ7.js → chunk-OYZ27Q3B.js} +88 -88
- package/dist/{chunk-TIYRNMGW.js → chunk-Q5Z7FMXI.js} +2 -2
- package/dist/{chunk-AQVE6HO5.js → chunk-QBY6L77D.js} +15 -13
- package/dist/{chunk-PAXWRJNA.js → chunk-R7USRN52.js} +1 -1
- package/dist/{chunk-QW5K5DTC.js → chunk-RDKTHFQ6.js} +25 -6
- package/dist/{chunk-YHXIFKCU.js → chunk-S234PC5E.js} +1 -1
- package/dist/{chunk-IRKTIZUM.js → chunk-Z3RPQ5K4.js} +2 -2
- package/dist/cli.js +27 -25
- package/dist/{comment-UUA7B5YC.js → comment-IIKLEAEK.js} +8 -8
- package/dist/{company-65ILSE2U.js → company-CX5TZNB5.js} +11 -11
- package/dist/{config-TMFMXS7T.js → config-Y4FC7QKM.js} +2 -2
- package/dist/{connect-URFFJVYY.js → connect-GUUBX23F.js} +15 -15
- package/dist/{contact-A3S2HEBM.js → contact-OCYSFRTS.js} +8 -8
- package/dist/{contact-groups-CEV2YITT.js → contact-groups-HWJSYRFJ.js} +85 -85
- package/dist/{contact-import-HHVKVRJW.js → contact-import-CTWSFT64.js} +10 -10
- package/dist/core-37XZS2RG.js +46 -0
- package/dist/{do-not-contact-QYPADRLJ.js → do-not-contact-6UVY3UKT.js} +29 -29
- package/dist/{doctor-M7JVNQPQ.js → doctor-6CB6DCY3.js} +4 -4
- package/dist/{document-MDE2WJYX.js → document-ADK4GZA7.js} +1 -1
- package/dist/domain-BUJMHYIV.js +70 -0
- package/dist/{draft-6KY4F5AE.js → draft-SII6E6Z6.js} +4 -4
- package/dist/{enrollment-IXQD5IGZ.js → enrollment-OXGR5WVI.js} +38 -38
- package/dist/{examples-KAMXHRLE.js → examples-77WVMKZQ.js} +2 -2
- package/dist/{exit-codes-CYQHN4NE.js → exit-codes-ZSOLAXQO.js} +1 -1
- package/dist/{export-7ILY53LY.js → export-D32J5GRN.js} +5 -5
- package/dist/{feed-GESAX65K.js → feed-HOFHCP6W.js} +6 -6
- package/dist/{group-KKTBXE42.js → group-AMYOAGNS.js} +6 -6
- package/dist/{inbox-QQ6AQDVB.js → inbox-NS2LB2WQ.js} +9 -9
- package/dist/{inboxes-352YK6UB.js → inboxes-XWUZJ5PN.js} +6 -6
- package/dist/{incoming-5T2ELEDF.js → incoming-UIWRL6QS.js} +13 -13
- package/dist/{job-KBILRJJO.js → job-TKGPXU26.js} +10 -10
- package/dist/{login-DQPKKDVA.js → login-B2YWX2JP.js} +2 -2
- package/dist/mailbox-LLSGX2FF.js +406 -0
- package/dist/{message-ZB2IGJIQ.js → message-M4THMNRZ.js} +7 -7
- package/dist/{motion-NNCRSOT6.js → motion-2OUGYR3O.js} +147 -147
- package/dist/{network-FLPECF4C.js → network-MFWKXTEV.js} +5 -5
- package/dist/{notification-B3MRXH3A.js → notification-5K4TCYQA.js} +6 -6
- package/dist/{notifications-PMJDG45H.js → notifications-2GKUJB7C.js} +6 -6
- package/dist/{post-O5DYXSHK.js → post-BHH7YKGM.js} +8 -8
- package/dist/{profile-ZDP23SNN.js → profile-GKMRRKZF.js} +15 -15
- package/dist/{recruiter-QENVOZFV.js → recruiter-J53ZSD4P.js} +17 -17
- package/dist/{sales-nav-JFAYF6DM.js → sales-nav-6I5SYTRX.js} +15 -15
- package/dist/{search-5HPVIIUJ.js → search-HS2YAA33.js} +17 -17
- package/dist/{setup-QUD7TUCB.js → setup-IYVOGVC6.js} +4 -4
- package/dist/{team-ZTGY45Y7.js → team-N6ILUHAD.js} +6 -6
- package/dist/{tier-3ISVHJJ5.js → tier-QWXKFESB.js} +8 -10
- package/dist/{unibox-JQBP7COE.js → unibox-D4WIHIZX.js} +34 -34
- package/dist/{webhook-GPGFPF5P.js → webhook-PKWGZZO2.js} +18 -18
- package/package.json +2 -2
- package/dist/core-IOGPY6HS.js +0 -46
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
outputOpts,
|
|
6
6
|
rootClient,
|
|
7
7
|
usage
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-LGUZ52BU.js";
|
|
9
9
|
import {
|
|
10
10
|
buildPreviewOutput
|
|
11
11
|
} from "./chunk-TCUYH5GO.js";
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
readablePage,
|
|
21
21
|
rejectPaginationModifiersWithoutAll,
|
|
22
22
|
streamAll
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-R7USRN52.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-S234PC5E.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-QBY6L77D.js";
|
|
43
43
|
import "./chunk-ZYURL5VK.js";
|
|
44
44
|
|
|
45
45
|
// src/commands/team.ts
|
|
@@ -121,7 +121,7 @@ var PAGE_FLAGS = readOnly(GLOBAL_FLAGS);
|
|
|
121
121
|
var listCmd = defineCommand({
|
|
122
122
|
meta: {
|
|
123
123
|
name: "list",
|
|
124
|
-
description: "The Teams you are a member of, with your role; is_current marks the Team this call acts in. --counts adds each Team's Tier, trial, Accounts, active
|
|
124
|
+
description: "The Teams you are a member of, with your role; is_current marks the Team this call acts in. --counts adds each Team's Tier, trial, Accounts, active Campaigns and, where you are an Owner, seats.",
|
|
125
125
|
risk: "read",
|
|
126
126
|
examples: ["curviate team list", "curviate team list --counts --json"]
|
|
127
127
|
},
|
|
@@ -441,7 +441,7 @@ var teamCommand = defineCommand({
|
|
|
441
441
|
seats: seatsCmd
|
|
442
442
|
},
|
|
443
443
|
async run() {
|
|
444
|
-
const { showHelp } = await import("./examples-
|
|
444
|
+
const { showHelp } = await import("./examples-77WVMKZQ.js");
|
|
445
445
|
await showHelp(teamCommand, ["curviate", "team"]);
|
|
446
446
|
}
|
|
447
447
|
});
|
|
@@ -3,35 +3,33 @@ import {
|
|
|
3
3
|
fail,
|
|
4
4
|
outputOpts,
|
|
5
5
|
rootClient
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-LGUZ52BU.js";
|
|
7
7
|
import {
|
|
8
8
|
readableObject
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-R7USRN52.js";
|
|
10
10
|
import {
|
|
11
11
|
renderSuccess
|
|
12
12
|
} from "./chunk-QM57YDJE.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-S234PC5E.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-QBY6L77D.js";
|
|
21
21
|
import "./chunk-ZYURL5VK.js";
|
|
22
22
|
|
|
23
23
|
// src/commands/tier.ts
|
|
24
24
|
import { defineCommand } from "citty";
|
|
25
|
-
var at = (u
|
|
25
|
+
var at = (u) => u ? `${u.tier}${u.expires_at ? ` until ${u.expires_at}` : ""}` : "none";
|
|
26
26
|
function humanTier(t) {
|
|
27
27
|
return [
|
|
28
28
|
`tier ${t.tier ?? "none"}`,
|
|
29
29
|
`bought ${t.bought_tier ?? "none"}${t.period ? ` (${t.period})` : ""}`,
|
|
30
|
-
`trial ${at(t.trial
|
|
31
|
-
`override ${at(t.override
|
|
32
|
-
`
|
|
33
|
-
`features ${t.features.length ? t.features.join(", ") : "none"}`,
|
|
34
|
-
`early access ${t.early_access.map((e) => `${e.tier} (${e.requested_at ? `requested ${e.requested_at}` : "not requested"})`).join(", ") || "none"}`
|
|
30
|
+
`trial ${at(t.trial)}`,
|
|
31
|
+
`override ${at(t.override)}`,
|
|
32
|
+
`features ${t.features.length ? t.features.join(", ") : "none"}`
|
|
35
33
|
].join("\n") + "\n";
|
|
36
34
|
}
|
|
37
35
|
var tierCommand = defineCommand({
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
outputOpts,
|
|
10
10
|
rootClient,
|
|
11
11
|
usage
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-LGUZ52BU.js";
|
|
13
13
|
import {
|
|
14
14
|
buildPreviewOutput
|
|
15
15
|
} from "./chunk-TCUYH5GO.js";
|
|
@@ -23,12 +23,12 @@ import {
|
|
|
23
23
|
readablePage,
|
|
24
24
|
rejectPaginationModifiersWithoutAll,
|
|
25
25
|
streamAll
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-R7USRN52.js";
|
|
27
27
|
import {
|
|
28
28
|
renderSuccess,
|
|
29
29
|
writeNdjsonItem
|
|
30
30
|
} from "./chunk-QM57YDJE.js";
|
|
31
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-S234PC5E.js";
|
|
32
32
|
import {
|
|
33
33
|
GLOBAL_FLAGS,
|
|
34
34
|
WRITE_SINGLE_FLAGS,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
} from "./chunk-QLKGOIWS.js";
|
|
37
37
|
import {
|
|
38
38
|
DESCRIPTIONS
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-QBY6L77D.js";
|
|
40
40
|
import "./chunk-ZYURL5VK.js";
|
|
41
41
|
|
|
42
42
|
// src/commands/unibox.ts
|
|
@@ -66,7 +66,7 @@ function chatWith(i) {
|
|
|
66
66
|
async function runList(c, f) {
|
|
67
67
|
const q = {};
|
|
68
68
|
if (f.accounts !== void 0) q["account_ids"] = listFlag("accounts", f.accounts);
|
|
69
|
-
if (f.
|
|
69
|
+
if (f.campaign !== void 0) q["campaign_ids"] = listFlag("campaign", f.campaign);
|
|
70
70
|
if (f.tag !== void 0) q["tags"] = listFlag("tag", f.tag);
|
|
71
71
|
if (f.person !== void 0) q["person"] = f.person;
|
|
72
72
|
if (f.unread !== void 0) q["unread"] = f.unread;
|
|
@@ -78,10 +78,10 @@ async function runList(c, f) {
|
|
|
78
78
|
try {
|
|
79
79
|
await paged(f, q, (p) => c.unibox.list(p), (page) => {
|
|
80
80
|
const unread = (i) => i["unread"] ? i["marked_unread"] ? "marked" : "yes" : "";
|
|
81
|
-
const
|
|
81
|
+
const campaign = (i) => i["campaign_context"]?.["campaign_name"];
|
|
82
82
|
print(table(
|
|
83
|
-
["ACCOUNT", "CHAT", "WITH", "UNREAD", "LAST", "FROM", "
|
|
84
|
-
page.items.map((i) => [i["account_id"], i["chat_id"], chatWith(i), unread(i), i["last_activity_at"], i["last_message_from"],
|
|
83
|
+
["ACCOUNT", "CHAT", "WITH", "UNREAD", "LAST", "FROM", "CAMPAIGN", "TAGS"],
|
|
84
|
+
page.items.map((i) => [i["account_id"], i["chat_id"], chatWith(i), unread(i), i["last_activity_at"], i["last_message_from"], campaign(i), i["tags"]?.join(", ")])
|
|
85
85
|
));
|
|
86
86
|
if (typeof page["total"] === "number") print(`total: ${page["total"]} chats match`);
|
|
87
87
|
});
|
|
@@ -139,17 +139,17 @@ async function runMark(c, f) {
|
|
|
139
139
|
async function runTag(c, f) {
|
|
140
140
|
const { accountId, chatId } = ids(f);
|
|
141
141
|
const body = f.tag === void 0 ? {} : { tags: listFlag("tag", f.tag) };
|
|
142
|
-
if (f.preview) return preview("unibox.
|
|
142
|
+
if (f.preview) return preview("unibox.tagLead", { account_id: accountId, chat_id: chatId }, body);
|
|
143
143
|
try {
|
|
144
|
-
renderSuccess(await c.unibox.
|
|
144
|
+
renderSuccess(await c.unibox.tagLead(accountId, chatId, body), outputOpts(f), process);
|
|
145
145
|
} catch (err) {
|
|
146
146
|
await fail(err, f);
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
async function runEnroll(c, f) {
|
|
150
150
|
const { accountId, chatId } = ids(f);
|
|
151
|
-
const
|
|
152
|
-
const body = {
|
|
151
|
+
const campaign = typeof f.campaign === "string" && f.campaign.trim() !== "" ? f.campaign : usage("--campaign is required: the Campaign to enroll the person in (mot_...).");
|
|
152
|
+
const body = { campaign_id: campaign };
|
|
153
153
|
if (f.preview) return preview("unibox.enroll", { account_id: accountId, chat_id: chatId }, body);
|
|
154
154
|
try {
|
|
155
155
|
renderSuccess(await c.unibox.enroll(accountId, chatId, body), outputOpts(f), process);
|
|
@@ -201,18 +201,18 @@ var ONE_TO_ONE = { CHAT_NOT_ONE_TO_ONE: "the chat is a group chat: there is no o
|
|
|
201
201
|
var listCmd = defineCommand({
|
|
202
202
|
meta: {
|
|
203
203
|
name: "list",
|
|
204
|
-
description: "List the chats of every Account you may operate, newest activity first. Served from Curviate's store: no LinkedIn call, no budget. An Account without full-inbox sync shows only its
|
|
204
|
+
description: "List the chats of every Account you may operate, newest activity first. Served from Curviate's store: no LinkedIn call, no budget. An Account without full-inbox sync shows only its Campaign chats; a disconnected Account's chats are listed read-only.",
|
|
205
205
|
risk: "read",
|
|
206
|
-
output: ["A table of Account, chat, person, unread (`marked` when made unread without a newer message), last activity,
|
|
207
|
-
examples: ["curviate unibox list --unread", "curviate unibox list --person
|
|
206
|
+
output: ["A table of Account, chat, person, unread (`marked` when made unread without a newer message), last activity, Campaign and tags; with --total the count of matching chats. --json (or piped) prints the API page."],
|
|
207
|
+
examples: ["curviate unibox list --unread", "curviate unibox list --person con_YOUR_LEAD_ID --campaign none --total"]
|
|
208
208
|
},
|
|
209
209
|
args: {
|
|
210
210
|
...readOnly(GLOBAL_FLAGS),
|
|
211
211
|
limit: { ...GLOBAL_FLAGS.limit, description: "Chats per page (1 to 100)." },
|
|
212
212
|
accounts: ACCOUNTS,
|
|
213
|
-
|
|
214
|
-
person: { type: "string", description: "Only chats with this person: a
|
|
215
|
-
tag: { type: "string", description: "Only chats whose
|
|
213
|
+
campaign: { type: "string", description: "Only chats linked to these Campaigns (mot_...), repeatable or a comma list; `none` for chats no Campaign links." },
|
|
214
|
+
person: { type: "string", description: "Only chats with this person: a Lead id (con_...) or a LinkedIn id (ACo...)." },
|
|
215
|
+
tag: { type: "string", description: "Only chats whose Lead has this tag; repeatable or a comma list." },
|
|
216
216
|
unread: { type: "boolean", description: "--unread for unread chats only, --no-unread for read ones; omit for both." },
|
|
217
217
|
"last-from": { type: "string", description: "Who wrote the last message: me or them." },
|
|
218
218
|
type: { type: "string", description: "classic, inmail, sales_navigator or recruiter." },
|
|
@@ -224,7 +224,7 @@ var listCmd = defineCommand({
|
|
|
224
224
|
var getCmd = defineCommand({
|
|
225
225
|
meta: {
|
|
226
226
|
name: "get",
|
|
227
|
-
description: "One chat as the Unibox lists it, with `marked_unread` ({origin, at}, or null) and its
|
|
227
|
+
description: "One chat as the Unibox lists it, with `marked_unread` ({origin, at}, or null) and its Campaign context.",
|
|
228
228
|
risk: "read",
|
|
229
229
|
examples: ["curviate unibox get acc_YOUR_ACCOUNT_ID YOUR_CHAT_ID"]
|
|
230
230
|
},
|
|
@@ -244,7 +244,7 @@ var unreadCmd = defineCommand({
|
|
|
244
244
|
var messagesCmd = defineCommand({
|
|
245
245
|
meta: {
|
|
246
246
|
name: "messages",
|
|
247
|
-
description: "Read one chat's messages, newest first. Each message carries `origin` when known:
|
|
247
|
+
description: "Read one chat's messages, newest first. Each message carries `origin` when known: campaign, unibox, api or linkedin.",
|
|
248
248
|
risk: "read",
|
|
249
249
|
seeAlso: ["curviate core inbox messages"],
|
|
250
250
|
examples: ["curviate unibox messages acc_YOUR_ACCOUNT_ID YOUR_CHAT_ID", "curviate unibox messages acc_YOUR_ACCOUNT_ID YOUR_CHAT_ID --all"]
|
|
@@ -297,45 +297,45 @@ var markCmd = defineCommand({
|
|
|
297
297
|
var tagCmd = defineCommand({
|
|
298
298
|
meta: {
|
|
299
299
|
name: "tag",
|
|
300
|
-
description: "Save the other person of a one-to-one chat as a
|
|
300
|
+
description: "Save the other person of a one-to-one chat as a Lead (or find the one you hold) and add tags, never removing any. Needs Automate.",
|
|
301
301
|
risk: "write",
|
|
302
302
|
rules: {
|
|
303
|
-
changes: "Creates or finds the
|
|
303
|
+
changes: "Creates or finds the Lead and adds the tags.",
|
|
304
304
|
visible_to: "Your Team.",
|
|
305
305
|
budget_rows: [],
|
|
306
|
-
retry: "Safe to repeat: the same
|
|
307
|
-
undo: "Remove the tags or the
|
|
306
|
+
retry: "Safe to repeat: the same Lead, tags already there stay.",
|
|
307
|
+
undo: "Remove the tags or the Lead with `curviate lead`."
|
|
308
308
|
},
|
|
309
309
|
errors: { ...AUTOMATE, ...ONE_TO_ONE },
|
|
310
310
|
examples: ["curviate unibox tag acc_YOUR_ACCOUNT_ID YOUR_CHAT_ID --tag warm"]
|
|
311
311
|
},
|
|
312
|
-
args: { ...WRITE_SINGLE_FLAGS, accountId: ACCOUNT, chatId: CHAT, tag: { type: "string", description: "A tag to add; repeatable or a comma list. Omit to only save the
|
|
312
|
+
args: { ...WRITE_SINGLE_FLAGS, accountId: ACCOUNT, chatId: CHAT, tag: { type: "string", description: "A tag to add; repeatable or a comma list. Omit to only save the Lead." } },
|
|
313
313
|
run: online(runTag)
|
|
314
314
|
});
|
|
315
315
|
var enrollCmd = defineCommand({
|
|
316
316
|
meta: {
|
|
317
317
|
name: "enroll",
|
|
318
|
-
description: "Save the other person of a one-to-one chat as a
|
|
318
|
+
description: "Save the other person of a one-to-one chat as a Lead and enroll them in a Campaign through this chat's Account (one of its sending Accounts). A direct add: the rule that skips people you already chat with does not apply; every other rule does. Needs Automate.",
|
|
319
319
|
risk: "high",
|
|
320
320
|
rules: {
|
|
321
|
-
changes: "Creates the Enrollment; the
|
|
321
|
+
changes: "Creates the Enrollment; the Campaign's Steps run for this person from this Account.",
|
|
322
322
|
visible_to: "The person, once a Step reaches LinkedIn.",
|
|
323
323
|
budget_rows: [],
|
|
324
324
|
retry: "A second call answers that the person is already enrolled.",
|
|
325
325
|
undo: "`curviate enrollment stop <enrollment_id>`; what was sent stays sent.",
|
|
326
326
|
blast_radius: "One person, from one Account."
|
|
327
327
|
},
|
|
328
|
-
errors: { ...AUTOMATE, ...ONE_TO_ONE, ALREADY_ENROLLED_ON_ACCOUNT: "the person is already in this
|
|
328
|
+
errors: { ...AUTOMATE, ...ONE_TO_ONE, ALREADY_ENROLLED_ON_ACCOUNT: "the person is already in this Campaign on this Account." },
|
|
329
329
|
seeAlso: ["curviate enrollment get"],
|
|
330
|
-
examples: ["curviate unibox enroll acc_YOUR_ACCOUNT_ID YOUR_CHAT_ID --
|
|
330
|
+
examples: ["curviate unibox enroll acc_YOUR_ACCOUNT_ID YOUR_CHAT_ID --campaign mot_YOUR_CAMPAIGN_ID"]
|
|
331
331
|
},
|
|
332
|
-
args: { ...WRITE_SINGLE_FLAGS, accountId: ACCOUNT, chatId: CHAT,
|
|
332
|
+
args: { ...WRITE_SINGLE_FLAGS, accountId: ACCOUNT, chatId: CHAT, campaign: { type: "string", required: true, description: "The Campaign (mot_...)." } },
|
|
333
333
|
run: online(runEnroll)
|
|
334
334
|
});
|
|
335
335
|
var refreshCmd = defineCommand({
|
|
336
336
|
meta: {
|
|
337
337
|
name: "refresh",
|
|
338
|
-
description: "Queue a re-read of the newest chats of each Account the inbox poll covers, or of --accounts; it runs within minutes. Once per Account in a short cooldown: a repeat answers cooldown with next_allowed_at. An Account without Sync full inbox is re-read for its
|
|
338
|
+
description: "Queue a re-read of the newest chats of each Account the inbox poll covers, or of --accounts; it runs within minutes. Once per Account in a short cooldown: a repeat answers cooldown with next_allowed_at. An Account without Sync full inbox is re-read for its Campaign conversations only; one with neither answers not_synced. The poll keeps the Account's active hours: on a Team whose active days are Monday to Friday nothing is polled at the weekend, and a refresh then answers paused until the next active day. Needs Automate.",
|
|
339
339
|
risk: "write",
|
|
340
340
|
rules: {
|
|
341
341
|
changes: "Queues one read of each Account's newest chats.",
|
|
@@ -363,10 +363,10 @@ var accountsCmd = defineCommand({
|
|
|
363
363
|
var consentCmd = defineCommand({
|
|
364
364
|
meta: {
|
|
365
365
|
name: "consent",
|
|
366
|
-
description: "Turn Sync full inbox on or off for one Account. Only the person who connected the Account can. On starts a paced listing that takes hours (needs Automate); off hides the Account's non-
|
|
366
|
+
description: "Turn Sync full inbox on or off for one Account. Only the person who connected the Account can. On starts a paced listing that takes hours (needs Automate); off hides the Account's non-Campaign chats at once and deletes them shortly after.",
|
|
367
367
|
risk: "high",
|
|
368
368
|
rules: {
|
|
369
|
-
changes: "Copies the Account's whole inbox into the Unibox (on), or removes the non-
|
|
369
|
+
changes: "Copies the Account's whole inbox into the Unibox (on), or removes the non-Campaign chats from it (off).",
|
|
370
370
|
visible_to: "Your Team: every teammate who may operate the Account reads its whole inbox while on.",
|
|
371
371
|
budget_rows: ["inbox_sync"],
|
|
372
372
|
retry: "Safe to repeat: the same setting again.",
|
|
@@ -401,7 +401,7 @@ var uniboxCommand = defineCommand({
|
|
|
401
401
|
consent: consentCmd
|
|
402
402
|
},
|
|
403
403
|
async run() {
|
|
404
|
-
const { showHelp } = await import("./examples-
|
|
404
|
+
const { showHelp } = await import("./examples-77WVMKZQ.js");
|
|
405
405
|
await showHelp(uniboxCommand, ["curviate", "unibox"]);
|
|
406
406
|
}
|
|
407
407
|
});
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
outputOpts,
|
|
6
6
|
rootClient,
|
|
7
7
|
usage
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-LGUZ52BU.js";
|
|
9
9
|
import {
|
|
10
10
|
buildPreviewOutput
|
|
11
11
|
} from "./chunk-TCUYH5GO.js";
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
readablePage,
|
|
21
21
|
rejectPaginationModifiersWithoutAll,
|
|
22
22
|
streamAll
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-R7USRN52.js";
|
|
24
24
|
import {
|
|
25
25
|
renderError,
|
|
26
26
|
renderSuccess,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
import {
|
|
31
31
|
createClient,
|
|
32
32
|
resolveEffectiveConfig
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-S234PC5E.js";
|
|
34
34
|
import {
|
|
35
35
|
GLOBAL_FLAGS,
|
|
36
36
|
READ_SINGLE_FLAGS,
|
|
@@ -39,10 +39,10 @@ import {
|
|
|
39
39
|
} from "./chunk-QLKGOIWS.js";
|
|
40
40
|
import {
|
|
41
41
|
DESCRIPTIONS
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-QBY6L77D.js";
|
|
43
43
|
import {
|
|
44
44
|
readFileFlag
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-JKXGL7PT.js";
|
|
46
46
|
import "./chunk-FDJMAF7D.js";
|
|
47
47
|
import {
|
|
48
48
|
isStdinToken
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
|
|
51
51
|
// src/commands/webhook-ops.ts
|
|
52
52
|
import { defineCommand } from "citty";
|
|
53
|
-
var SOURCES = ["messaging", "user", "account_status", "post", "
|
|
53
|
+
var SOURCES = ["messaging", "user", "account_status", "post", "campaign"];
|
|
54
54
|
async function deliveryFields(f) {
|
|
55
55
|
const body = {};
|
|
56
56
|
if (f["template-file"] !== void 0) body["body_template"] = await readFileFlag("template-file", f["template-file"], { others: f });
|
|
@@ -71,14 +71,14 @@ var DELIVERY_ARGS = {
|
|
|
71
71
|
stdinArg: true,
|
|
72
72
|
description: "The delivery body as a JSON text with {{variables}} (`curviate webhook variables --source <source>`), from a path or - for stdin. Lint it offline first: `curviate webhook lint`."
|
|
73
73
|
},
|
|
74
|
-
"custom-events": { type: "string", description: "With
|
|
74
|
+
"custom-events": { type: "string", description: "With campaign.custom_event subscribed: deliver only these custom event names (comma list). Omit for every custom event." },
|
|
75
75
|
header: {
|
|
76
76
|
type: "string",
|
|
77
77
|
description: "A custom header on every delivery, KEY:VALUE; repeatable, replaces the whole set. KEY alone keeps that header's stored value (values are never read back). Not covered by the signature."
|
|
78
78
|
}
|
|
79
79
|
};
|
|
80
80
|
async function runLint(f) {
|
|
81
|
-
const source = f.source ?? "
|
|
81
|
+
const source = f.source ?? "campaign";
|
|
82
82
|
if (!SOURCES.includes(source)) usage(`--source takes ${SOURCES.join(", ")}.`);
|
|
83
83
|
if (f["template-file"] === void 0) usage("--template-file is required: a path, or - for stdin.");
|
|
84
84
|
const text = await readFileFlag("template-file", f["template-file"], { others: f });
|
|
@@ -144,12 +144,12 @@ var webhookLintCommand = defineCommand({
|
|
|
144
144
|
risk: "read",
|
|
145
145
|
rules: { notes: ["Offline: no API call."] },
|
|
146
146
|
output: ['Findings on stderr, one per line: <file>:<line>:<col> error <code>: <rule>. <hint> -> <docs_url>. With --json (or piped) stdout carries the WEBHOOK_TEMPLATE_INVALID shape, or {"errors": []}. Exit 2 on any finding.'],
|
|
147
|
-
examples: ["curviate webhook lint --template-file body.json --source
|
|
147
|
+
examples: ["curviate webhook lint --template-file body.json --source campaign"]
|
|
148
148
|
},
|
|
149
149
|
args: {
|
|
150
150
|
json: GLOBAL_FLAGS.json,
|
|
151
151
|
"template-file": { ...DELIVERY_ARGS["template-file"], description: "The template, from a path or - for stdin." },
|
|
152
|
-
source: { type: "string", description: `The webhook's source, which decides the variables: ${SOURCES.join(", ")} (default
|
|
152
|
+
source: { type: "string", description: `The webhook's source, which decides the variables: ${SOURCES.join(", ")} (default campaign).` }
|
|
153
153
|
},
|
|
154
154
|
run: async ({ args }) => runLint(args)
|
|
155
155
|
});
|
|
@@ -158,7 +158,7 @@ var webhookVariablesCommand = defineCommand({
|
|
|
158
158
|
name: "variables",
|
|
159
159
|
description: "The {{variables}} a body template may use for a source, with their types and an example.",
|
|
160
160
|
risk: "read",
|
|
161
|
-
examples: ["curviate webhook variables --source
|
|
161
|
+
examples: ["curviate webhook variables --source campaign"]
|
|
162
162
|
},
|
|
163
163
|
args: { ...readOnly(READ_SINGLE_FLAGS), source: { type: "string", description: `${SOURCES.join(", ")}.` } },
|
|
164
164
|
run: online(runVariables)
|
|
@@ -259,7 +259,7 @@ function resolveOutputOpts(flags) {
|
|
|
259
259
|
async function handleError(err, outOpts, out) {
|
|
260
260
|
const { CurviateError } = await import("@curviate/sdk");
|
|
261
261
|
if (err instanceof CurviateError) {
|
|
262
|
-
const { getExitCode } = await import("./exit-codes-
|
|
262
|
+
const { getExitCode } = await import("./exit-codes-ZSOLAXQO.js");
|
|
263
263
|
renderError(err, outOpts, out);
|
|
264
264
|
process.exit(getExitCode(err));
|
|
265
265
|
}
|
|
@@ -268,7 +268,7 @@ async function handleError(err, outOpts, out) {
|
|
|
268
268
|
}
|
|
269
269
|
async function runWebhookCreate(client, flags, out) {
|
|
270
270
|
if (!flags.source) {
|
|
271
|
-
out.stderr.write("error: --source is required (messaging | user | account_status | post |
|
|
271
|
+
out.stderr.write("error: --source is required (messaging | user | account_status | post | campaign).\n");
|
|
272
272
|
process.exit(2);
|
|
273
273
|
}
|
|
274
274
|
if (!flags["request-url"]) {
|
|
@@ -279,7 +279,7 @@ async function runWebhookCreate(client, flags, out) {
|
|
|
279
279
|
source: flags.source,
|
|
280
280
|
request_url: flags["request-url"]
|
|
281
281
|
};
|
|
282
|
-
for (const [flag, key, omitted] of [["account-ids", "account_ids", "omit the flag to cover every account you can operate"], ["
|
|
282
|
+
for (const [flag, key, omitted] of [["account-ids", "account_ids", "omit the flag to cover every account you can operate"], ["campaign-ids", "campaign_ids", "omit the flag for every Campaign"]]) {
|
|
283
283
|
if (flags[flag] === void 0) continue;
|
|
284
284
|
const ids = flags[flag].split(",").map((s) => s.trim()).filter(Boolean);
|
|
285
285
|
if (ids.length === 0) {
|
|
@@ -477,7 +477,7 @@ var webhookCreateCommand = defineCommand2({
|
|
|
477
477
|
errors: { WEBHOOK_TEMPLATE_INVALID: "the body template is invalid: `curviate webhook lint` names every finding." },
|
|
478
478
|
examples: [
|
|
479
479
|
"curviate webhook create --source messaging --request-url https://example.com/hooks/curviate --account-ids acc_YOUR_ACCOUNT_ID",
|
|
480
|
-
"curviate webhook create --source
|
|
480
|
+
"curviate webhook create --source campaign --request-url https://example.com/hooks/curviate --campaign-ids mot_YOUR_CAMPAIGN_ID",
|
|
481
481
|
"curviate webhook create --source account_status --request-url https://example.com/hooks/curviate --name status"
|
|
482
482
|
]
|
|
483
483
|
},
|
|
@@ -486,12 +486,12 @@ var webhookCreateCommand = defineCommand2({
|
|
|
486
486
|
...DELIVERY_ARGS,
|
|
487
487
|
source: {
|
|
488
488
|
type: "string",
|
|
489
|
-
description: "Event source: messaging | user | account_status | post (scheduled-post results: post.published, post.publish_failed) |
|
|
489
|
+
description: "Event source: messaging | user | account_status | post (scheduled-post results: post.published, post.publish_failed) | campaign (campaign.status_changed, enrollment.started, enrollment.accepted, enrollment.replied, enrollment.skipped, enrollment.finished, step.failed, campaign.custom_event; opt-in only, named in --events: step.executed, enrollment.seen, enrollment.reassigned).",
|
|
490
490
|
required: true
|
|
491
491
|
},
|
|
492
492
|
"request-url": { type: "string", description: "HTTPS URL to receive webhook deliveries.", required: true },
|
|
493
493
|
"account-ids": { type: "string", description: "Comma-separated account ids to target. Omit to cover every account you can operate, now and later." },
|
|
494
|
-
"
|
|
494
|
+
"campaign-ids": { type: "string", description: "Comma-separated Campaign ids (mot_...): only events of these Campaigns are delivered, and events that carry no Campaign are not. Omit for no filter." },
|
|
495
495
|
name: { type: "string", description: "Human-readable name (up to 100 characters)." },
|
|
496
496
|
enabled: { type: "boolean", description: "Create as enabled (default: true).", default: true },
|
|
497
497
|
events: { type: "string", description: "Comma-separated event names to subscribe to." },
|
|
@@ -544,7 +544,7 @@ var webhookListCommand = defineCommand2({
|
|
|
544
544
|
var webhookEventsCommand = defineCommand2({
|
|
545
545
|
meta: {
|
|
546
546
|
name: "events",
|
|
547
|
-
description: "List the canonical webhook event catalogue. `chat.updated` always carries `chat_id`, plus `unread` and `origin` (unibox, api or linkedin) when the stored read state changed; a send from the Unibox or the API marks the chat read and reports it. Your own-message events (`message.read`, `message.reaction`, `message.edited`, `message.deleted`) carry `origin` (
|
|
547
|
+
description: "List the canonical webhook event catalogue. `chat.updated` always carries `chat_id`, plus `unread` and `origin` (unibox, api or linkedin) when the stored read state changed; a send from the Unibox or the API marks the chat read and reports it. Your own-message events (`message.read`, `message.reaction`, `message.edited`, `message.deleted`) carry `origin` (campaign, unibox, api or linkedin); `message.received` never does.",
|
|
548
548
|
risk: "read",
|
|
549
549
|
examples: [
|
|
550
550
|
"curviate webhook events"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@curviate/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.55.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Official command-line interface for the Curviate API.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"clean": "rm -rf dist *.tsbuildinfo"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@curviate/sdk": "0.
|
|
50
|
+
"@curviate/sdk": "0.51.0",
|
|
51
51
|
"citty": "^0.1.6",
|
|
52
52
|
"open": "^10.1.0"
|
|
53
53
|
},
|
package/dist/core-IOGPY6HS.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
DESCRIPTIONS,
|
|
4
|
-
lazy
|
|
5
|
-
} from "./chunk-AQVE6HO5.js";
|
|
6
|
-
|
|
7
|
-
// src/commands/core.ts
|
|
8
|
-
import { defineCommand } from "citty";
|
|
9
|
-
var coreCommand = defineCommand({
|
|
10
|
-
meta: {
|
|
11
|
-
name: "core",
|
|
12
|
-
description: DESCRIPTIONS.core,
|
|
13
|
-
rules: {
|
|
14
|
-
notes: [
|
|
15
|
-
"Writes reach LinkedIn immediately and are seen by the people they touch.",
|
|
16
|
-
"A retry after a timeout can repeat a write: requests carry no idempotency key. Read the current state before retrying.",
|
|
17
|
-
"Budget rows, ceilings and what is left: `curviate account get <account_id>`."
|
|
18
|
-
]
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
subCommands: {
|
|
22
|
-
profile: lazy("profile", () => import("./profile-ZDP23SNN.js").then((m) => m.profileCommand)),
|
|
23
|
-
company: lazy("company", () => import("./company-65ILSE2U.js").then((m) => m.companyCommand)),
|
|
24
|
-
job: lazy("job", () => import("./job-KBILRJJO.js").then((m) => m.jobCommand)),
|
|
25
|
-
connect: lazy("connect", () => import("./connect-URFFJVYY.js").then((m) => m.connectCommand)),
|
|
26
|
-
search: lazy("search", () => import("./search-5HPVIIUJ.js").then((m) => m.searchCommand)),
|
|
27
|
-
inbox: lazy("inbox", () => import("./inbox-QQ6AQDVB.js").then((m) => m.inboxCommand)),
|
|
28
|
-
inboxes: lazy("inboxes", () => import("./inboxes-352YK6UB.js").then((m) => m.inboxesCommand)),
|
|
29
|
-
message: lazy("message", () => import("./message-ZB2IGJIQ.js").then((m) => m.messageCommand)),
|
|
30
|
-
post: lazy("post", () => import("./post-O5DYXSHK.js").then((m) => m.postCommand)),
|
|
31
|
-
comment: lazy("comment", () => import("./comment-UUA7B5YC.js").then((m) => m.commentCommand)),
|
|
32
|
-
"sales-nav": lazy("sales-nav", () => import("./sales-nav-JFAYF6DM.js").then((m) => m.salesNavCommand)),
|
|
33
|
-
recruiter: lazy("recruiter", () => import("./recruiter-QENVOZFV.js").then((m) => m.recruiterCommand)),
|
|
34
|
-
group: lazy("group", () => import("./group-KKTBXE42.js").then((m) => m.groupCommand)),
|
|
35
|
-
feed: lazy("feed", () => import("./feed-GESAX65K.js").then((m) => m.feedCommand)),
|
|
36
|
-
notification: lazy("coreNotification", () => import("./notification-B3MRXH3A.js").then((m) => m.notificationCommand)),
|
|
37
|
-
draft: lazy("draft", () => import("./draft-6KY4F5AE.js").then((m) => m.draftCommand))
|
|
38
|
-
},
|
|
39
|
-
async run() {
|
|
40
|
-
const { showHelp } = await import("./examples-KAMXHRLE.js");
|
|
41
|
-
await showHelp(coreCommand, ["curviate", "core"]);
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
export {
|
|
45
|
-
coreCommand
|
|
46
|
-
};
|