@curviate/cli 0.54.0 → 0.56.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 +57 -0
- package/README.md +35 -17
- package/dist/{account-DW5N5MJ6.js → account-ZF5NEMID.js} +132 -125
- package/dist/{analytics-T2K3OWVQ.js → analytics-M7JWS67A.js} +5 -5
- package/dist/{beta-consent-O736ONE7.js → beta-consent-4Q2LZZQC.js} +4 -4
- package/dist/{billing-NTBL32EX.js → billing-LYPSX5SR.js} +78 -6
- package/dist/{chunk-N76WNJ5T.js → chunk-7PLTQHNO.js} +1 -1
- package/dist/{chunk-N4IYTFIY.js → chunk-AMTKGO37.js} +1 -1
- package/dist/{chunk-ACKKHLUH.js → chunk-CRO7PJ4I.js} +2 -2
- package/dist/chunk-DENWYJK2.js +94 -0
- package/dist/{chunk-FBLCSVIU.js → chunk-EI64VFBE.js} +47 -47
- package/dist/{chunk-ENBIMEKS.js → chunk-IB6ARI3R.js} +1 -1
- package/dist/{chunk-Q57PZJLX.js → chunk-J4SFOFMT.js} +90 -88
- package/dist/{chunk-FUX3BRYP.js → chunk-JXDEV33Z.js} +1 -1
- package/dist/{chunk-5B4T6BMN.js → chunk-L3RJU7C3.js} +44 -44
- package/dist/{chunk-KXJJFHSD.js → chunk-MIOEYSBQ.js} +1 -1
- package/dist/{chunk-R4HS2MWM.js → chunk-MWVTFTWV.js} +15 -13
- package/dist/{chunk-QW5K5DTC.js → chunk-RDKTHFQ6.js} +25 -6
- package/dist/{chunk-62YAYAUI.js → chunk-RKNW4UX4.js} +51 -9
- package/dist/{chunk-V3HHYTBY.js → chunk-UOWOKEB2.js} +1 -1
- package/dist/{chunk-HOMRAZ6S.js → chunk-UWRWZG4N.js} +2 -2
- package/dist/{chunk-A3UNS44U.js → chunk-VEMK4MJM.js} +10 -10
- package/dist/{chunk-UFHT2KZG.js → chunk-XP6S6E55.js} +2 -2
- package/dist/cli.js +33 -25
- package/dist/{comment-ATVJOTWV.js → comment-D6RSZTVK.js} +8 -8
- package/dist/{company-BRKFROPE.js → company-3Z6PXGTW.js} +11 -11
- package/dist/{config-E223SS5K.js → config-VY5MCJMN.js} +2 -2
- package/dist/{connect-XVDQ5FTT.js → connect-G2RTLV7G.js} +15 -15
- package/dist/{contact-4HOUOVD7.js → contact-QSLJCBDE.js} +8 -8
- package/dist/{contact-groups-ENA3VGGL.js → contact-groups-OITAD73K.js} +85 -85
- package/dist/{contact-import-4EKVDFPV.js → contact-import-LT7BKESC.js} +10 -10
- package/dist/core-RFTNNB6P.js +46 -0
- package/dist/{do-not-contact-S2WGHSQL.js → do-not-contact-ZA7KS5WD.js} +59 -33
- package/dist/{doctor-OFIUGRUG.js → doctor-JQT3DO6G.js} +4 -4
- package/dist/{document-MDE2WJYX.js → document-H65EXU4L.js} +1 -1
- package/dist/domain-7EX4E34B.js +70 -0
- package/dist/{draft-DD3DTXBM.js → draft-7U6H4BPF.js} +4 -4
- package/dist/{enrollment-ESCHKQ5X.js → enrollment-AZ6XGVVL.js} +40 -38
- package/dist/{examples-KAMXHRLE.js → examples-IGQJCSNL.js} +2 -2
- package/dist/{exit-codes-CYQHN4NE.js → exit-codes-ZSOLAXQO.js} +1 -1
- package/dist/{export-GUAGB7TF.js → export-OYMQXL62.js} +5 -5
- package/dist/{feed-ZC4FY4BA.js → feed-M5D4SJW7.js} +6 -6
- package/dist/{group-42ZE7K3K.js → group-UTC3YBKE.js} +6 -6
- package/dist/{inbox-2YS7CTXH.js → inbox-VSGNHSLG.js} +9 -9
- package/dist/{inboxes-5RB3BGCQ.js → inboxes-23C2MJK4.js} +6 -6
- package/dist/{incoming-ATZN6JJA.js → incoming-QVPP32K7.js} +13 -13
- package/dist/{job-WD3Z3P3Q.js → job-ZHVFFRWE.js} +10 -10
- package/dist/{login-JQ57YHEJ.js → login-6OTNXEJZ.js} +4 -4
- package/dist/mailbox-HD2UXZCA.js +405 -0
- package/dist/{message-WGS2IIDC.js → message-PIV77W47.js} +7 -7
- package/dist/{motion-BRVBJJJP.js → motion-AHYF34DP.js} +224 -149
- package/dist/{network-CODIWCJQ.js → network-RJHJFZEY.js} +5 -5
- package/dist/{notification-RLVF4NLJ.js → notification-XGR4NT3S.js} +6 -6
- package/dist/{notifications-HGEHM5KW.js → notifications-BHRWSHPR.js} +6 -6
- package/dist/{post-3GH2IPO6.js → post-Z7AVDDKA.js} +8 -8
- package/dist/{profile-6RFJQMIB.js → profile-YZNBX2RP.js} +15 -15
- package/dist/{recruiter-GK3UNS62.js → recruiter-EXM4P7X7.js} +17 -17
- package/dist/{sales-nav-SLS3ABF4.js → sales-nav-CKDSEXV2.js} +15 -15
- package/dist/{search-45WRT5T3.js → search-B7FB6674.js} +17 -17
- package/dist/{setup-5QZOM2Q2.js → setup-VZVPLJ4V.js} +5 -5
- package/dist/{team-WM3RKOQ2.js → team-PYABBUHO.js} +6 -6
- package/dist/{tier-5AMLO5KE.js → tier-PRK4WQKR.js} +4 -4
- package/dist/{unibox-TTCF7YVO.js → unibox-ZNKX2EKL.js} +34 -34
- package/dist/{webhook-UCCCSKDO.js → webhook-V74EV4E2.js} +18 -18
- package/package.json +2 -2
- package/dist/core-6VDDV2NM.js +0 -46
|
@@ -8,18 +8,18 @@ import {
|
|
|
8
8
|
online,
|
|
9
9
|
preview,
|
|
10
10
|
readFilter
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-J4SFOFMT.js";
|
|
12
|
+
import "./chunk-CRO7PJ4I.js";
|
|
13
13
|
import "./chunk-GOICALYQ.js";
|
|
14
14
|
import {
|
|
15
15
|
sendInChunks
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-XP6S6E55.js";
|
|
17
17
|
import {
|
|
18
18
|
fail,
|
|
19
19
|
listFlag,
|
|
20
20
|
outputOpts,
|
|
21
21
|
usage
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-UWRWZG4N.js";
|
|
23
23
|
import "./chunk-TCUYH5GO.js";
|
|
24
24
|
import {
|
|
25
25
|
intFlag
|
|
@@ -32,21 +32,21 @@ import {
|
|
|
32
32
|
readablePage,
|
|
33
33
|
rejectPaginationModifiersWithoutAll,
|
|
34
34
|
streamAll
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-MIOEYSBQ.js";
|
|
36
36
|
import {
|
|
37
37
|
renderSuccess,
|
|
38
38
|
writeNdjsonItem
|
|
39
39
|
} from "./chunk-QM57YDJE.js";
|
|
40
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-7PLTQHNO.js";
|
|
41
41
|
import {
|
|
42
42
|
GLOBAL_FLAGS,
|
|
43
43
|
READ_SINGLE_FLAGS,
|
|
44
44
|
WRITE_SINGLE_FLAGS,
|
|
45
45
|
readOnly
|
|
46
46
|
} from "./chunk-QLKGOIWS.js";
|
|
47
|
-
import "./chunk-
|
|
47
|
+
import "./chunk-MWVTFTWV.js";
|
|
48
48
|
import "./chunk-ZYURL5VK.js";
|
|
49
|
-
import "./chunk-
|
|
49
|
+
import "./chunk-RDKTHFQ6.js";
|
|
50
50
|
|
|
51
51
|
// src/commands/contact-groups.ts
|
|
52
52
|
import { defineCommand } from "citty";
|
|
@@ -78,45 +78,45 @@ var named = (what, v) => {
|
|
|
78
78
|
async function bulkUpdate(c, f, skip, change) {
|
|
79
79
|
const ids = contactIds(f, skip);
|
|
80
80
|
const filtered = hasFilter(f);
|
|
81
|
-
if (filtered && ids.length) usage("name the
|
|
82
|
-
if (!filtered && !ids.length) usage("name the
|
|
81
|
+
if (filtered && ids.length) usage("name the Leads either by id or with filter flags, not both.");
|
|
82
|
+
if (!filtered && !ids.length) usage("name the Leads: one or more Lead ids (con_...), --ids, or filter flags such as --list or --tag.");
|
|
83
83
|
try {
|
|
84
84
|
if (filtered) {
|
|
85
85
|
const body = { filter: await readFilter(c, f, "body"), ...change };
|
|
86
|
-
if (f.preview) return preview("
|
|
87
|
-
return show(await c.
|
|
86
|
+
if (f.preview) return preview("leads.updateMany", {}, body);
|
|
87
|
+
return show(await c.leads.updateMany(body), f);
|
|
88
88
|
}
|
|
89
|
-
if (f.preview) return preview("
|
|
90
|
-
show(mergeChunks(await sendInChunks(ids, BULK_MAX_IDS, (chunk) => c.
|
|
89
|
+
if (f.preview) return preview("leads.updateMany", {}, { lead_ids: ids.slice(0, BULK_MAX_IDS), ...change });
|
|
90
|
+
show(mergeChunks(await sendInChunks(ids, BULK_MAX_IDS, (chunk) => c.leads.updateMany({ lead_ids: chunk, ...change }), f)), f);
|
|
91
91
|
} catch (err) {
|
|
92
92
|
await fail(err, f);
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
-
var ID = { type: "positional", description: "
|
|
95
|
+
var ID = { type: "positional", description: "Lead list id (cl_...)." };
|
|
96
96
|
var IDS = {
|
|
97
|
-
id: { type: "positional", required: false, variadic: true, description: "
|
|
98
|
-
ids: { type: "string", description: `
|
|
97
|
+
id: { type: "positional", required: false, variadic: true, description: "Lead id (con_...); several may follow." },
|
|
98
|
+
ids: { type: "string", description: `Lead ids (con_...); repeatable, or a comma list. Sent in requests of up to ${BULK_MAX_IDS} ids, in order; a failed request stops the run and reports what was sent.` }
|
|
99
99
|
};
|
|
100
|
-
var SEE_LISTS = ["curviate
|
|
101
|
-
var BULK_ERRORS = { INSUFFICIENT_ROLE: "your role cannot change
|
|
102
|
-
var BULK_OUTPUT = ["`updated`, `unchanged`, `not_found` (ids that did not exist) and `refused` (a
|
|
103
|
-
var BULK_RADIUS = `By id: up to ${BULK_MAX_IDS}
|
|
100
|
+
var SEE_LISTS = ["curviate lead lists get", "curviate lead list"];
|
|
101
|
+
var BULK_ERRORS = { INSUFFICIENT_ROLE: "your role cannot change Leads here.", LEAD_LIMIT_REACHED: "a Tag or list-membership cap would be exceeded (the Lead is under `refused`)." };
|
|
102
|
+
var BULK_OUTPUT = ["`updated`, `unchanged`, `not_found` (ids that did not exist) and `refused` (a Lead over a cap, with the reason). Counts are summed over every request."];
|
|
103
|
+
var BULK_RADIUS = `By id: up to ${BULK_MAX_IDS} Leads per request. By filter: every Lead the filter matches; count it first with \`curviate lead list <same filters> --total --limit 1\`.`;
|
|
104
104
|
var listsList = defineCommand({
|
|
105
105
|
meta: {
|
|
106
106
|
name: "list",
|
|
107
|
-
description: "List your Team's
|
|
107
|
+
description: "List your Team's Lead lists, with how many Leads each holds.",
|
|
108
108
|
risk: "read",
|
|
109
|
-
examples: ["curviate
|
|
109
|
+
examples: ["curviate lead lists list", "curviate lead lists list --query warm"]
|
|
110
110
|
},
|
|
111
111
|
args: { ...readOnly(GLOBAL_FLAGS), query: { type: "string", description: "Only lists whose name matches this text." } },
|
|
112
|
-
run: online((c, f) => page(f, f.query !== void 0 ? { q: named("--query", f.query) } : {}, (p) => c.
|
|
112
|
+
run: online((c, f) => page(f, f.query !== void 0 ? { q: named("--query", f.query) } : {}, (p) => c.leadLists.list(p)))
|
|
113
113
|
});
|
|
114
114
|
var listsGet = defineCommand({
|
|
115
|
-
meta: { name: "get", description: "One
|
|
115
|
+
meta: { name: "get", description: "One Lead list: its name, description and Lead count.", risk: "read", examples: ["curviate lead lists get cl_YOUR_LIST_ID"] },
|
|
116
116
|
args: { ...readOnly(READ_SINGLE_FLAGS), id: ID },
|
|
117
117
|
run: online(async (c, f) => {
|
|
118
118
|
try {
|
|
119
|
-
show(readableObject(await c.
|
|
119
|
+
show(readableObject(await c.leadLists.get(String(f.id ?? ""))), f);
|
|
120
120
|
} catch (err) {
|
|
121
121
|
await fail(err, f);
|
|
122
122
|
}
|
|
@@ -125,17 +125,17 @@ var listsGet = defineCommand({
|
|
|
125
125
|
var listsCreate = defineCommand({
|
|
126
126
|
meta: {
|
|
127
127
|
name: "create",
|
|
128
|
-
description: "Create an empty
|
|
128
|
+
description: "Create an empty Lead list. Fill it with `curviate lead lists add`, `curviate lead import --list`, or build it from other lists with `curviate lead lists combine`. Needs Automate.",
|
|
129
129
|
risk: "write",
|
|
130
130
|
rules: {
|
|
131
|
-
changes: "A new, empty
|
|
131
|
+
changes: "A new, empty Lead list.",
|
|
132
132
|
visible_to: "Your Team.",
|
|
133
133
|
budget_rows: [],
|
|
134
134
|
retry: "Not safe: a list name is unique, so a repeat answers NAME_TAKEN.",
|
|
135
|
-
undo: "`curviate
|
|
135
|
+
undo: "`curviate lead lists delete <id>`."
|
|
136
136
|
},
|
|
137
137
|
errors: { NAME_TAKEN: "a list of that name exists (409)." },
|
|
138
|
-
examples: ['curviate
|
|
138
|
+
examples: ['curviate lead lists create "Q4 prospects" --description "From the conference"']
|
|
139
139
|
},
|
|
140
140
|
args: {
|
|
141
141
|
...WRITE_SINGLE_FLAGS,
|
|
@@ -145,9 +145,9 @@ var listsCreate = defineCommand({
|
|
|
145
145
|
run: online(async (c, f) => {
|
|
146
146
|
const body = { name: named("the list name", f.name) };
|
|
147
147
|
if (f.description !== void 0) body["description"] = f.description;
|
|
148
|
-
if (f.preview) return preview("
|
|
148
|
+
if (f.preview) return preview("leadLists.create", {}, body);
|
|
149
149
|
try {
|
|
150
|
-
show(readableObject(await c.
|
|
150
|
+
show(readableObject(await c.leadLists.create(body)), f);
|
|
151
151
|
} catch (err) {
|
|
152
152
|
await fail(err, f);
|
|
153
153
|
}
|
|
@@ -156,20 +156,20 @@ var listsCreate = defineCommand({
|
|
|
156
156
|
var listsCombine = defineCommand({
|
|
157
157
|
meta: {
|
|
158
158
|
name: "combine",
|
|
159
|
-
description: "Create a new
|
|
159
|
+
description: "Create a new Lead list from other lists: the Leads in any of them (--list a --list b), in all of them (--list-match all), minus those in some others (--not-list). Any other filter flag narrows it too. The new list holds the Leads that match now; it does not follow later changes to the source lists. Needs Automate.",
|
|
160
160
|
risk: "write",
|
|
161
161
|
rules: {
|
|
162
|
-
changes: "A new
|
|
162
|
+
changes: "A new Lead list holding every Lead the filter matches at this moment. The source lists are unchanged.",
|
|
163
163
|
visible_to: "Your Team.",
|
|
164
164
|
budget_rows: [],
|
|
165
165
|
retry: "Not safe: a list name is unique, so a repeat answers NAME_TAKEN.",
|
|
166
|
-
undo: "`curviate
|
|
166
|
+
undo: "`curviate lead lists delete <id>`; the Leads stay."
|
|
167
167
|
},
|
|
168
|
-
errors: { NAME_TAKEN: "a list of that name exists (409).",
|
|
168
|
+
errors: { NAME_TAKEN: "a list of that name exists (409).", LEAD_LIMIT_REACHED: "the Team is at a list-membership cap." },
|
|
169
169
|
seeAlso: SEE_LISTS,
|
|
170
170
|
examples: [
|
|
171
|
-
'curviate
|
|
172
|
-
'curviate
|
|
171
|
+
'curviate lead lists combine "Hot or warm" --list cl_HOT --list cl_WARM',
|
|
172
|
+
'curviate lead lists combine "Hot and replied" --list cl_HOT --list cl_REPLIED --list-match all --not-list cl_DNC'
|
|
173
173
|
]
|
|
174
174
|
},
|
|
175
175
|
args: {
|
|
@@ -182,9 +182,9 @@ var listsCombine = defineCommand({
|
|
|
182
182
|
if (listFlag("list", f.list).length === 0) usage("--list is required: the source list or lists (cl_...), repeatable.");
|
|
183
183
|
const body = { name: named("the list name", f.name), from: await readFilter(c, f, "body") };
|
|
184
184
|
if (f.description !== void 0) body["description"] = f.description;
|
|
185
|
-
if (f.preview) return preview("
|
|
185
|
+
if (f.preview) return preview("leadLists.create", {}, body);
|
|
186
186
|
try {
|
|
187
|
-
show(readableObject(await c.
|
|
187
|
+
show(readableObject(await c.leadLists.create(body)), f);
|
|
188
188
|
} catch (err) {
|
|
189
189
|
await fail(err, f);
|
|
190
190
|
}
|
|
@@ -193,7 +193,7 @@ var listsCombine = defineCommand({
|
|
|
193
193
|
var listsUpdate = defineCommand({
|
|
194
194
|
meta: {
|
|
195
195
|
name: "update",
|
|
196
|
-
description: 'Rename a
|
|
196
|
+
description: 'Rename a Lead list or change its description (--description "" clears it). Needs Automate.',
|
|
197
197
|
risk: "write",
|
|
198
198
|
rules: {
|
|
199
199
|
changes: "The list's name or description.",
|
|
@@ -203,7 +203,7 @@ var listsUpdate = defineCommand({
|
|
|
203
203
|
undo: "Update again with the old values."
|
|
204
204
|
},
|
|
205
205
|
errors: { NAME_TAKEN: "a list of that name exists (409)." },
|
|
206
|
-
examples: ['curviate
|
|
206
|
+
examples: ['curviate lead lists update cl_YOUR_LIST_ID --name "Q4 prospects"']
|
|
207
207
|
},
|
|
208
208
|
args: {
|
|
209
209
|
...WRITE_SINGLE_FLAGS,
|
|
@@ -217,9 +217,9 @@ var listsUpdate = defineCommand({
|
|
|
217
217
|
if (name !== void 0) body["name"] = named("--name", name);
|
|
218
218
|
if (description !== void 0) body["description"] = description === "" ? null : description;
|
|
219
219
|
if (Object.keys(body).length === 0) usage("name what to change: --name or --description.");
|
|
220
|
-
if (f.preview) return preview("
|
|
220
|
+
if (f.preview) return preview("leadLists.update", { id: f.id }, body);
|
|
221
221
|
try {
|
|
222
|
-
show(readableObject(await c.
|
|
222
|
+
show(readableObject(await c.leadLists.update(String(f.id ?? ""), body)), f);
|
|
223
223
|
} catch (err) {
|
|
224
224
|
await fail(err, f);
|
|
225
225
|
}
|
|
@@ -228,25 +228,25 @@ var listsUpdate = defineCommand({
|
|
|
228
228
|
var listsDelete = defineCommand({
|
|
229
229
|
meta: {
|
|
230
230
|
name: "delete",
|
|
231
|
-
description: "Delete a
|
|
231
|
+
description: "Delete a Lead list. Its Leads stay; a Campaign that enrolls from it needs another list. Any role may.",
|
|
232
232
|
risk: "high",
|
|
233
233
|
rules: {
|
|
234
|
-
changes: "The list and its memberships are deleted; the
|
|
234
|
+
changes: "The list and its memberships are deleted; the Leads are not.",
|
|
235
235
|
visible_to: "Your Team.",
|
|
236
236
|
budget_rows: [],
|
|
237
237
|
retry: "Safe: a second call answers RESOURCE_NOT_FOUND.",
|
|
238
|
-
undo: "Cannot be undone for the list itself: create it again and add the
|
|
239
|
-
blast_radius: "One list and its membership; no
|
|
238
|
+
undo: "Cannot be undone for the list itself: create it again and add the Leads.",
|
|
239
|
+
blast_radius: "One list and its membership; no Lead is deleted."
|
|
240
240
|
},
|
|
241
|
-
errors: { RESOURCE_IN_USE: "a
|
|
241
|
+
errors: { RESOURCE_IN_USE: "a Campaign still uses the list (409)." },
|
|
242
242
|
seeAlso: SEE_LISTS,
|
|
243
|
-
examples: ["curviate
|
|
243
|
+
examples: ["curviate lead lists delete cl_YOUR_LIST_ID"]
|
|
244
244
|
},
|
|
245
245
|
args: { ...WRITE_SINGLE_FLAGS, id: ID },
|
|
246
246
|
run: online(async (c, f) => {
|
|
247
|
-
if (f.preview) return preview("
|
|
247
|
+
if (f.preview) return preview("leadLists.delete", { id: f.id });
|
|
248
248
|
try {
|
|
249
|
-
await c.
|
|
249
|
+
await c.leadLists.delete(String(f.id ?? ""));
|
|
250
250
|
show({}, f);
|
|
251
251
|
} catch (err) {
|
|
252
252
|
await fail(err, f);
|
|
@@ -256,31 +256,31 @@ var listsDelete = defineCommand({
|
|
|
256
256
|
var membership = (verb) => defineCommand({
|
|
257
257
|
meta: {
|
|
258
258
|
name: verb,
|
|
259
|
-
description: `${verb === "add" ? "Add
|
|
259
|
+
description: `${verb === "add" ? "Add Leads to" : "Remove Leads from"} a Lead list. Name the Leads by id, or with filter flags (the same as \`curviate lead list\`) to act on every match. Count a filter first: \`curviate lead list <same filters> --total --limit 1\`. The list being changed is the positional id; to filter by another list use --from-list (\`lead list\` calls it --list). Needs Automate.`,
|
|
260
260
|
risk: "high",
|
|
261
261
|
rules: {
|
|
262
|
-
changes: verb === "add" ? "The
|
|
263
|
-
visible_to: "Your Team; a
|
|
262
|
+
changes: verb === "add" ? "The Leads join the list." : "The Leads leave the list; they are not deleted.",
|
|
263
|
+
visible_to: "Your Team; a Campaign enrolling from the list sees the change.",
|
|
264
264
|
budget_rows: [],
|
|
265
|
-
retry: "Safe: a
|
|
266
|
-
undo: verb === "add" ? "`curviate
|
|
265
|
+
retry: "Safe: a Lead already in (or out) is `unchanged`.",
|
|
266
|
+
undo: verb === "add" ? "`curviate lead lists remove` with the same Leads." : "`curviate lead lists add` with the same Leads.",
|
|
267
267
|
blast_radius: BULK_RADIUS
|
|
268
268
|
},
|
|
269
269
|
errors: BULK_ERRORS,
|
|
270
270
|
output: BULK_OUTPUT,
|
|
271
271
|
seeAlso: SEE_LISTS,
|
|
272
272
|
examples: [
|
|
273
|
-
`curviate
|
|
274
|
-
`curviate
|
|
275
|
-
`curviate
|
|
273
|
+
`curviate lead lists ${verb} cl_YOUR_LIST_ID con_A con_B`,
|
|
274
|
+
`curviate lead lists ${verb} cl_YOUR_LIST_ID --tag hot --no-email`,
|
|
275
|
+
`curviate lead lists ${verb} cl_YOUR_LIST_ID --from-list cl_SOURCE_LIST_ID --connected`
|
|
276
276
|
]
|
|
277
277
|
},
|
|
278
278
|
args: {
|
|
279
279
|
...WRITE_SINGLE_FLAGS,
|
|
280
|
-
listId: { type: "positional", description: "
|
|
280
|
+
listId: { type: "positional", description: "Lead list id (cl_...)." },
|
|
281
281
|
...IDS,
|
|
282
282
|
...Object.fromEntries(Object.entries(FILTER_ARGS).filter(([k]) => k !== "list")),
|
|
283
|
-
"from-list": { type: "string", description: "Filter: only
|
|
283
|
+
"from-list": { type: "string", description: "Filter: only Leads in this Lead list (cl_...); repeatable, or a comma list." }
|
|
284
284
|
},
|
|
285
285
|
run: online(async (c, f) => {
|
|
286
286
|
const listId = named("the list id", (f._ ?? [])[0]);
|
|
@@ -290,33 +290,33 @@ var membership = (verb) => defineCommand({
|
|
|
290
290
|
})
|
|
291
291
|
});
|
|
292
292
|
var contactListsCommand = defineCommand({
|
|
293
|
-
meta: { name: "lists", description: "
|
|
293
|
+
meta: { name: "lists", description: "Lead lists: named sets of Leads a Campaign enrolls from." },
|
|
294
294
|
subCommands: { list: listsList, get: listsGet, create: listsCreate, combine: listsCombine, update: listsUpdate, delete: listsDelete, add: membership("add"), remove: membership("remove") },
|
|
295
295
|
async run() {
|
|
296
|
-
const { showHelp } = await import("./examples-
|
|
297
|
-
await showHelp(contactListsCommand, ["curviate", "
|
|
296
|
+
const { showHelp } = await import("./examples-IGQJCSNL.js");
|
|
297
|
+
await showHelp(contactListsCommand, ["curviate", "lead", "lists"]);
|
|
298
298
|
}
|
|
299
299
|
});
|
|
300
|
-
var TAG_ID = { type: "positional", description: "Tag id, from `curviate
|
|
300
|
+
var TAG_ID = { type: "positional", description: "Tag id, from `curviate lead tags list`." };
|
|
301
301
|
var tagsList = defineCommand({
|
|
302
|
-
meta: { name: "list", description: "List your Team's Tags with how many
|
|
302
|
+
meta: { name: "list", description: "List your Team's Tags with how many Leads carry each.", risk: "read", examples: ["curviate lead tags list"] },
|
|
303
303
|
args: { ...readOnly(GLOBAL_FLAGS) },
|
|
304
304
|
run: online((c, f) => page(f, {}, (p) => c.tags.list(p)))
|
|
305
305
|
});
|
|
306
306
|
var tagsUpdate = defineCommand({
|
|
307
307
|
meta: {
|
|
308
308
|
name: "update",
|
|
309
|
-
description: "Rename a Tag on every
|
|
309
|
+
description: "Rename a Tag on every Lead that carries it. A name another Tag has is refused. Needs Automate.",
|
|
310
310
|
risk: "write",
|
|
311
311
|
rules: {
|
|
312
|
-
changes: "The Tag's name, on all its
|
|
312
|
+
changes: "The Tag's name, on all its Leads.",
|
|
313
313
|
visible_to: "Your Team.",
|
|
314
314
|
budget_rows: [],
|
|
315
315
|
retry: "Safe: the same call leaves the same name.",
|
|
316
316
|
undo: "Rename it back."
|
|
317
317
|
},
|
|
318
318
|
errors: { NAME_TAKEN: "a Tag of that name exists (409)." },
|
|
319
|
-
examples: ["curviate
|
|
319
|
+
examples: ["curviate lead tags update TAG_ID --name warm-lead"]
|
|
320
320
|
},
|
|
321
321
|
args: { ...WRITE_SINGLE_FLAGS, id: TAG_ID, name: { type: "string", required: true, description: "The new name (up to 64 characters)." } },
|
|
322
322
|
run: online(async (c, f) => {
|
|
@@ -332,19 +332,19 @@ var tagsUpdate = defineCommand({
|
|
|
332
332
|
var tagsDelete = defineCommand({
|
|
333
333
|
meta: {
|
|
334
334
|
name: "delete",
|
|
335
|
-
description: "Delete a Tag and take it off every
|
|
335
|
+
description: "Delete a Tag and take it off every Lead that carries it. Owners and Managers only.",
|
|
336
336
|
risk: "high",
|
|
337
337
|
rules: {
|
|
338
|
-
changes: "The Tag is removed from every
|
|
338
|
+
changes: "The Tag is removed from every Lead; the Leads stay.",
|
|
339
339
|
visible_to: "Your Team.",
|
|
340
340
|
budget_rows: [],
|
|
341
341
|
retry: "Safe: a second call answers RESOURCE_NOT_FOUND.",
|
|
342
|
-
undo: "Cannot be undone: tag the
|
|
343
|
-
blast_radius: "One Tag, on every
|
|
342
|
+
undo: "Cannot be undone: tag the Leads again.",
|
|
343
|
+
blast_radius: "One Tag, on every Lead that carries it (its `lead_count`)."
|
|
344
344
|
},
|
|
345
345
|
errors: { INSUFFICIENT_ROLE: "deleting Tags is for Owners and Managers." },
|
|
346
|
-
seeAlso: ["curviate
|
|
347
|
-
examples: ["curviate
|
|
346
|
+
seeAlso: ["curviate lead tags list"],
|
|
347
|
+
examples: ["curviate lead tags delete TAG_ID"]
|
|
348
348
|
},
|
|
349
349
|
args: { ...WRITE_SINGLE_FLAGS, id: TAG_ID },
|
|
350
350
|
run: online(async (c, f) => {
|
|
@@ -360,20 +360,20 @@ var tagsDelete = defineCommand({
|
|
|
360
360
|
var tagging = (verb) => defineCommand({
|
|
361
361
|
meta: {
|
|
362
362
|
name: verb,
|
|
363
|
-
description: `${verb === "add" ? "Put a Tag on" : "Take a Tag off"}
|
|
363
|
+
description: `${verb === "add" ? "Put a Tag on" : "Take a Tag off"} Leads, named by id or with filter flags (the same as \`curviate lead list\`) to act on every match. Count a filter first: \`curviate lead list <same filters> --total --limit 1\`. Needs Automate.`,
|
|
364
364
|
risk: "high",
|
|
365
365
|
rules: {
|
|
366
|
-
changes: verb === "add" ? "The Tag is put on the
|
|
366
|
+
changes: verb === "add" ? "The Tag is put on the Leads (created if new)." : "The Tag is taken off the Leads.",
|
|
367
367
|
visible_to: "Your Team.",
|
|
368
368
|
budget_rows: [],
|
|
369
|
-
retry: "Safe: a
|
|
370
|
-
undo: verb === "add" ? "`curviate
|
|
369
|
+
retry: "Safe: a Lead already tagged (or not) is `unchanged`.",
|
|
370
|
+
undo: verb === "add" ? "`curviate lead tags remove` with the same Leads." : "`curviate lead tags add` with the same Leads.",
|
|
371
371
|
blast_radius: BULK_RADIUS
|
|
372
372
|
},
|
|
373
373
|
errors: BULK_ERRORS,
|
|
374
374
|
output: BULK_OUTPUT,
|
|
375
|
-
seeAlso: ["curviate
|
|
376
|
-
examples: [`curviate
|
|
375
|
+
seeAlso: ["curviate lead tags list", "curviate lead list"],
|
|
376
|
+
examples: [`curviate lead tags ${verb} hot con_A con_B`, `curviate lead tags ${verb} hot --list cl_YOUR_LIST_ID`]
|
|
377
377
|
},
|
|
378
378
|
args: {
|
|
379
379
|
...WRITE_SINGLE_FLAGS,
|
|
@@ -387,11 +387,11 @@ var tagging = (verb) => defineCommand({
|
|
|
387
387
|
})
|
|
388
388
|
});
|
|
389
389
|
var contactTagsCommand = defineCommand({
|
|
390
|
-
meta: { name: "tags", description: "Tags: labels on
|
|
390
|
+
meta: { name: "tags", description: "Tags: labels on Leads." },
|
|
391
391
|
subCommands: { list: tagsList, update: tagsUpdate, delete: tagsDelete, add: tagging("add"), remove: tagging("remove") },
|
|
392
392
|
async run() {
|
|
393
|
-
const { showHelp } = await import("./examples-
|
|
394
|
-
await showHelp(contactTagsCommand, ["curviate", "
|
|
393
|
+
const { showHelp } = await import("./examples-IGQJCSNL.js");
|
|
394
|
+
await showHelp(contactTagsCommand, ["curviate", "lead", "tags"]);
|
|
395
395
|
}
|
|
396
396
|
});
|
|
397
397
|
export {
|
|
@@ -7,23 +7,23 @@ import {
|
|
|
7
7
|
contactImportCommand,
|
|
8
8
|
contactImportsCommand,
|
|
9
9
|
csvRecords
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-L3RJU7C3.js";
|
|
11
|
+
import "./chunk-J4SFOFMT.js";
|
|
12
|
+
import "./chunk-CRO7PJ4I.js";
|
|
13
13
|
import "./chunk-GOICALYQ.js";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-XP6S6E55.js";
|
|
15
|
+
import "./chunk-UWRWZG4N.js";
|
|
16
16
|
import "./chunk-TCUYH5GO.js";
|
|
17
17
|
import "./chunk-NNV2OYEF.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-MIOEYSBQ.js";
|
|
19
19
|
import "./chunk-QM57YDJE.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-7PLTQHNO.js";
|
|
21
21
|
import "./chunk-QLKGOIWS.js";
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-MWVTFTWV.js";
|
|
23
|
+
import "./chunk-RKNW4UX4.js";
|
|
24
24
|
import "./chunk-FDJMAF7D.js";
|
|
25
25
|
import "./chunk-ZYURL5VK.js";
|
|
26
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-RDKTHFQ6.js";
|
|
27
27
|
export {
|
|
28
28
|
IMPORT_MAX_BODY_BYTES,
|
|
29
29
|
IMPORT_MAX_ROWS,
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
DESCRIPTIONS,
|
|
4
|
+
lazy
|
|
5
|
+
} from "./chunk-MWVTFTWV.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-YZNBX2RP.js").then((m) => m.profileCommand)),
|
|
23
|
+
company: lazy("company", () => import("./company-3Z6PXGTW.js").then((m) => m.companyCommand)),
|
|
24
|
+
job: lazy("job", () => import("./job-ZHVFFRWE.js").then((m) => m.jobCommand)),
|
|
25
|
+
connect: lazy("connect", () => import("./connect-G2RTLV7G.js").then((m) => m.connectCommand)),
|
|
26
|
+
search: lazy("search", () => import("./search-B7FB6674.js").then((m) => m.searchCommand)),
|
|
27
|
+
inbox: lazy("inbox", () => import("./inbox-VSGNHSLG.js").then((m) => m.inboxCommand)),
|
|
28
|
+
inboxes: lazy("inboxes", () => import("./inboxes-23C2MJK4.js").then((m) => m.inboxesCommand)),
|
|
29
|
+
message: lazy("message", () => import("./message-PIV77W47.js").then((m) => m.messageCommand)),
|
|
30
|
+
post: lazy("post", () => import("./post-Z7AVDDKA.js").then((m) => m.postCommand)),
|
|
31
|
+
comment: lazy("comment", () => import("./comment-D6RSZTVK.js").then((m) => m.commentCommand)),
|
|
32
|
+
"sales-nav": lazy("sales-nav", () => import("./sales-nav-CKDSEXV2.js").then((m) => m.salesNavCommand)),
|
|
33
|
+
recruiter: lazy("recruiter", () => import("./recruiter-EXM4P7X7.js").then((m) => m.recruiterCommand)),
|
|
34
|
+
group: lazy("group", () => import("./group-UTC3YBKE.js").then((m) => m.groupCommand)),
|
|
35
|
+
feed: lazy("feed", () => import("./feed-M5D4SJW7.js").then((m) => m.feedCommand)),
|
|
36
|
+
notification: lazy("coreNotification", () => import("./notification-XGR4NT3S.js").then((m) => m.notificationCommand)),
|
|
37
|
+
draft: lazy("draft", () => import("./draft-7U6H4BPF.js").then((m) => m.draftCommand))
|
|
38
|
+
},
|
|
39
|
+
async run() {
|
|
40
|
+
const { showHelp } = await import("./examples-IGQJCSNL.js");
|
|
41
|
+
await showHelp(coreCommand, ["curviate", "core"]);
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
export {
|
|
45
|
+
coreCommand
|
|
46
|
+
};
|