@curviate/cli 0.51.0 → 0.52.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.
Files changed (54) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/{account-74N7HFFI.js → account-2IHGWLU7.js} +5 -5
  3. package/dist/{analytics-CZ372NIV.js → analytics-SBHNCE24.js} +5 -5
  4. package/dist/{beta-consent-6EY7JWUB.js → beta-consent-QJBRBON3.js} +3 -3
  5. package/dist/{billing-LJGAAL4W.js → billing-KL6GL5PF.js} +4 -4
  6. package/dist/{contact-import-PAMRJ6MU.js → chunk-44COK554.js} +75 -20
  7. package/dist/{chunk-AUHGVZCD.js → chunk-6BDA6B32.js} +4 -4
  8. package/dist/{chunk-FBBZVIFJ.js → chunk-AQVE6HO5.js} +1 -1
  9. package/dist/{chunk-3OYS3NWV.js → chunk-GXEHHSM7.js} +1 -1
  10. package/dist/{chunk-7AR2OA67.js → chunk-JGPR6AGO.js} +10 -10
  11. package/dist/{chunk-A6UJU6ZW.js → chunk-OQKN3U74.js} +4 -4
  12. package/dist/{chunk-BKQZDNXH.js → chunk-OUY3GVWJ.js} +1 -1
  13. package/dist/{chunk-DAFE2MTF.js → chunk-QA777QEJ.js} +1 -1
  14. package/dist/{chunk-ERHJZL7A.js → chunk-SIOEKNCN.js} +3 -3
  15. package/dist/{chunk-3RRINPLF.js → chunk-UA4DEQ3K.js} +28 -2
  16. package/dist/{chunk-7OUGD5DH.js → chunk-UXFLLYFY.js} +1 -1
  17. package/dist/cli.js +22 -22
  18. package/dist/{comment-OWNTXKTR.js → comment-ABRBF7J4.js} +5 -5
  19. package/dist/{company-F5Z5Q3YA.js → company-WQPWHAZJ.js} +5 -5
  20. package/dist/{config-GIU3SIIY.js → config-RFXNYRRC.js} +2 -2
  21. package/dist/{connect-BZY5AA3I.js → connect-R7A6RJJJ.js} +4 -4
  22. package/dist/{contact-EXEJDG7S.js → contact-FHR4RAXL.js} +7 -7
  23. package/dist/{contact-groups-RQZQCFHI.js → contact-groups-AAJT4TZ6.js} +7 -7
  24. package/dist/contact-import-3KASFYC5.js +35 -0
  25. package/dist/{core-F3RQLZFP.js → core-GANWZKQZ.js} +17 -17
  26. package/dist/do-not-contact-QMFIJOAA.js +360 -0
  27. package/dist/{doctor-BLUHL4YW.js → doctor-4TNHUBYZ.js} +3 -3
  28. package/dist/{draft-5ULT2UFJ.js → draft-F56TKIQ3.js} +5 -5
  29. package/dist/{enrollment-WF5DDULC.js → enrollment-WCG5MX65.js} +4 -4
  30. package/dist/{export-CF7IAMYC.js → export-UVUY3IMF.js} +3 -3
  31. package/dist/{feed-PR43TIM3.js → feed-6NN2YWOQ.js} +4 -4
  32. package/dist/{group-W5QAQJBZ.js → group-BXL4QDZL.js} +4 -4
  33. package/dist/{inbox-NO3RDC4U.js → inbox-GOO5UA3J.js} +4 -4
  34. package/dist/{inboxes-PN26B6SL.js → inboxes-GGN7SULO.js} +4 -4
  35. package/dist/{incoming-DYYCNX46.js → incoming-AZPAGR3L.js} +4 -4
  36. package/dist/{job-V67373SG.js → job-R5TGUKTB.js} +4 -4
  37. package/dist/{login-K3IGFVZY.js → login-LZH3HY2J.js} +2 -2
  38. package/dist/{message-AIVMYHV5.js → message-YY2BB47Z.js} +5 -5
  39. package/dist/{motion-UXH422PR.js → motion-2RCKZSK5.js} +5 -5
  40. package/dist/{network-376YFM33.js → network-5VDLBVU7.js} +4 -4
  41. package/dist/{notification-BAKHCJTV.js → notification-DVHDC2IA.js} +4 -4
  42. package/dist/{notifications-7HJSOQEK.js → notifications-GZKDD7SV.js} +4 -4
  43. package/dist/{post-RBHNLWAM.js → post-JKXMJZXS.js} +5 -5
  44. package/dist/{profile-RDNIILT7.js → profile-CYFEDUEC.js} +5 -5
  45. package/dist/{recruiter-HX45CHBT.js → recruiter-MRJDGK6O.js} +4 -4
  46. package/dist/{sales-nav-SIMRRJV7.js → sales-nav-5ABDKON4.js} +4 -4
  47. package/dist/{search-ARMOCEYV.js → search-JDNUGHRX.js} +4 -4
  48. package/dist/{setup-DVFWTM6J.js → setup-EXPWIHTM.js} +3 -3
  49. package/dist/{team-X6EMJ3EH.js → team-5XD2O5UO.js} +4 -4
  50. package/dist/{tier-4VDJ3OEO.js → tier-CNDUZKXE.js} +4 -4
  51. package/dist/{unibox-XGOS5YIJ.js → unibox-MAAEROM5.js} +4 -4
  52. package/dist/{webhook-3QYAOV7E.js → webhook-XVTE3ZVM.js} +4 -4
  53. package/package.json +2 -2
  54. package/dist/do-not-contact-UWJRNFHH.js +0 -200
@@ -0,0 +1,360 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ chunkRows,
4
+ csvRecords
5
+ } from "./chunk-44COK554.js";
6
+ import "./chunk-JGPR6AGO.js";
7
+ import "./chunk-UXFLLYFY.js";
8
+ import {
9
+ writeAtomic
10
+ } from "./chunk-GOICALYQ.js";
11
+ import {
12
+ sendChunked
13
+ } from "./chunk-SIOEKNCN.js";
14
+ import {
15
+ fail,
16
+ outputOpts,
17
+ rootClient,
18
+ usage
19
+ } from "./chunk-OUY3GVWJ.js";
20
+ import {
21
+ buildPreviewOutput
22
+ } from "./chunk-TCUYH5GO.js";
23
+ import {
24
+ intFlag
25
+ } from "./chunk-NNV2OYEF.js";
26
+ import {
27
+ pageDelayFromFlags,
28
+ readCursorFlag,
29
+ readMaxPagesFlag,
30
+ readableObject,
31
+ readablePage,
32
+ rejectPaginationModifiersWithoutAll,
33
+ streamAll
34
+ } from "./chunk-QA777QEJ.js";
35
+ import {
36
+ renderSuccess,
37
+ writeNdjsonItem
38
+ } from "./chunk-QM57YDJE.js";
39
+ import {
40
+ downloadBinary
41
+ } from "./chunk-UA4DEQ3K.js";
42
+ import {
43
+ GLOBAL_FLAGS,
44
+ READ_SINGLE_FLAGS,
45
+ WRITE_SINGLE_FLAGS,
46
+ readOnly
47
+ } from "./chunk-RYWWSZUH.js";
48
+ import {
49
+ DESCRIPTIONS
50
+ } from "./chunk-AQVE6HO5.js";
51
+ import {
52
+ readFileFlag
53
+ } from "./chunk-PHKICMO7.js";
54
+ import "./chunk-FDJMAF7D.js";
55
+ import {
56
+ isStdinToken
57
+ } from "./chunk-ZYURL5VK.js";
58
+ import "./chunk-QW5K5DTC.js";
59
+
60
+ // src/commands/do-not-contact.ts
61
+ import { defineCommand } from "citty";
62
+ var REASONS = ["asked_to_stop", "existing_customer", "competitor", "partner", "employee", "other"];
63
+ var online = (fn) => async ({ args }) => {
64
+ const f = args;
65
+ await fn(await rootClient(f), f);
66
+ };
67
+ var preview = (method, args, body = {}) => void process.stdout.write(JSON.stringify(buildPreviewOutput({ method, args, body })) + "\n");
68
+ var reason = (f, requiredFlag) => {
69
+ if (f.reason === void 0) return requiredFlag ? usage(`--reason is required: one of ${REASONS.join(", ")}.`) : void 0;
70
+ if (!REASONS.includes(f.reason)) usage(`--reason takes one of ${REASONS.join(", ")}.`);
71
+ return f.reason;
72
+ };
73
+ async function runList(c, f) {
74
+ rejectPaginationModifiersWithoutAll(f, process);
75
+ const params = {};
76
+ if (f.query !== void 0) {
77
+ if (f.query.trim() === "") usage("--query was given an empty value.");
78
+ params["q"] = f.query;
79
+ }
80
+ if (f.limit !== void 0) params["limit"] = intFlag("limit", f.limit, 1, 100);
81
+ const cursor = readCursorFlag(f, process);
82
+ if (cursor) params["cursor"] = cursor;
83
+ try {
84
+ if (f.all) {
85
+ const page = (p) => c.doNotContact.list(p);
86
+ for await (const item of streamAll(page, params, { maxPages: readMaxPagesFlag(f, process), out: process, pageDelayMs: pageDelayFromFlags(f) })) writeNdjsonItem(process, item, f.fields);
87
+ } else {
88
+ renderSuccess(readablePage(await c.doNotContact.list(params)), outputOpts(f), process);
89
+ }
90
+ } catch (err) {
91
+ await fail(err, f);
92
+ }
93
+ }
94
+ async function runGet(c, f) {
95
+ try {
96
+ renderSuccess(readableObject(await c.doNotContact.get(String(f.id ?? ""))), outputOpts(f), process);
97
+ } catch (err) {
98
+ await fail(err, f);
99
+ }
100
+ }
101
+ async function runAdd(c, f) {
102
+ if (f.contact === void 0 === (f["linkedin-url"] === void 0)) usage("name the person with exactly one of --contact (con_...) or --linkedin-url.");
103
+ for (const [flag, v] of [["contact", f.contact], ["linkedin-url", f["linkedin-url"]]]) if (v !== void 0 && v.trim() === "") usage(`--${flag} was given an empty value.`);
104
+ const body = f.contact !== void 0 ? { contact_id: f.contact } : { linkedin_url: f["linkedin-url"] };
105
+ const why = reason(f, false);
106
+ if (why) body["reason"] = why;
107
+ if (f.preview) return preview("doNotContact.add", {}, body);
108
+ try {
109
+ renderSuccess(readableObject(await c.doNotContact.add(body)), outputOpts(f), process);
110
+ } catch (err) {
111
+ await fail(err, f);
112
+ }
113
+ }
114
+ async function runUpdate(c, f) {
115
+ const body = { reason: reason(f, true) };
116
+ if (f.preview) return preview("doNotContact.update", { id: f.id }, body);
117
+ try {
118
+ renderSuccess(readableObject(await c.doNotContact.update(String(f.id ?? ""), body)), outputOpts(f), process);
119
+ } catch (err) {
120
+ await fail(err, f);
121
+ }
122
+ }
123
+ async function runRemove(c, f) {
124
+ if (f.preview) return preview("doNotContact.remove", { id: f.id });
125
+ try {
126
+ await c.doNotContact.remove(String(f.id ?? ""));
127
+ renderSuccess({}, outputOpts(f), process);
128
+ } catch (err) {
129
+ await fail(err, f);
130
+ }
131
+ }
132
+ var FORMATS = ["csv", "json", "ndjson"];
133
+ var EXT = { ".csv": "csv", ".json": "json", ".ndjson": "ndjson", ".jsonl": "ndjson" };
134
+ var IMPORT_MAX_ROWS = 1e4;
135
+ async function runExport(c, f) {
136
+ if (f.json) usage("export takes no --json: its data is the file. Use --format json for JSON.");
137
+ const format = f.format ?? "ndjson";
138
+ if (!FORMATS.includes(format)) usage(`--format takes one of ${FORMATS.join(", ")}.`);
139
+ const params = { format };
140
+ if (f.preview) return preview("doNotContact.export", {}, params);
141
+ let bytes;
142
+ try {
143
+ const got = await downloadBinary(() => c.doNotContact.export(params));
144
+ bytes = got instanceof ArrayBuffer ? Buffer.from(got) : Buffer.from(JSON.stringify(got) + "\n");
145
+ } catch (err) {
146
+ return fail(err, f);
147
+ }
148
+ if (f.output === void 0 || f.output === "-") process.stdout.write(bytes);
149
+ else {
150
+ try {
151
+ writeAtomic(f.output, bytes);
152
+ } catch (err) {
153
+ usage(`--output: cannot write ${f.output}: ${err.code ?? "write error"}.`);
154
+ }
155
+ }
156
+ const lines = bytes.toString("utf8").split("\n").filter((l) => l !== "").length;
157
+ process.stderr.write(`Exported ${format === "json" ? "" : `${format === "csv" ? Math.max(0, lines - 1) : lines} `}entries as ${format}${f.output && f.output !== "-" ? ` to ${f.output}` : ""}.
158
+ `);
159
+ }
160
+ var COUNTS = ["created", "unchanged", "skipped"];
161
+ async function runImport(c, f) {
162
+ const file = f.file;
163
+ if (file === void 0 || file.trim() === "") usage("--file is required: a CSV, JSON or NDJSON file, or - for stdin.");
164
+ const dash = isStdinToken(file);
165
+ let format = f.format;
166
+ if (format === void 0) {
167
+ format = dash ? void 0 : EXT[(/\.[^./\\]+$/.exec(file.toLowerCase()) ?? [""])[0]];
168
+ if (format === void 0) usage(dash ? "--format is required with --file -: csv, json or ndjson." : "--format could not be told from the file name: pass csv, json or ndjson.");
169
+ }
170
+ if (!FORMATS.includes(format)) usage(`--format takes one of ${FORMATS.join(", ")}.`);
171
+ const text = await readFileFlag("file", file, { allowBom: true, maxBytes: 64 * 1024 * 1024, others: f });
172
+ let header;
173
+ let rows;
174
+ if (format === "csv") {
175
+ const [head, ...rest] = csvRecords(text);
176
+ if (head === void 0) usage("--file: the CSV has no header row.");
177
+ if (rest.length === 0) usage("--file: the CSV has a header and no rows to import.");
178
+ header = head;
179
+ rows = rest;
180
+ } else if (format === "json") {
181
+ let doc;
182
+ try {
183
+ doc = JSON.parse(text);
184
+ } catch {
185
+ usage("--file: not valid JSON.");
186
+ }
187
+ if (!Array.isArray(doc)) usage("--file: a JSON import is an array of objects, one per person.");
188
+ rows = doc;
189
+ } else {
190
+ rows = text.split("\n").flatMap((line, i) => line.trim() === "" ? [] : [(() => {
191
+ try {
192
+ return JSON.parse(line);
193
+ } catch {
194
+ return usage(`--file: line ${i + 1} is not valid JSON.`);
195
+ }
196
+ })()]);
197
+ }
198
+ if (rows.length === 0) usage("--file: no rows to import.");
199
+ const bad = header === void 0 ? rows.findIndex((o) => o === null || typeof o !== "object" || Array.isArray(o)) : -1;
200
+ if (bad >= 0) usage(`--file: row ${bad + 1} is not an object.`);
201
+ const chunks = chunkRows(rows, (r) => Buffer.byteLength(typeof r === "string" ? r : JSON.stringify(r)) + 1, IMPORT_MAX_ROWS);
202
+ const bodyOf = (part) => header !== void 0 ? { csv: [header, ...part].join("\n") } : { rows: part };
203
+ if (f.preview) return preview("doNotContact.import", chunks.length > 1 ? { requests: chunks.length, rows: rows.length } : {}, bodyOf(chunks[0]));
204
+ const done = [];
205
+ const offsets = [];
206
+ let at = 0;
207
+ await sendChunked(
208
+ chunks,
209
+ async (part) => {
210
+ const got = readableObject(await c.doNotContact.import(bodyOf(part)));
211
+ offsets.push(at);
212
+ at += part.length;
213
+ done.push(got);
214
+ return got;
215
+ },
216
+ f,
217
+ "rows"
218
+ );
219
+ const counts = Object.fromEntries(COUNTS.map((k) => [k, done.reduce((n, i) => n + (i.counts?.[k] ?? 0), 0)]));
220
+ const skipped = done.flatMap(
221
+ (imp, k) => (imp.report ?? []).filter((r) => r.outcome === "skipped").map((r) => ({ row: offsets[k] + r.row, reason: r.skip_reason ?? null, field: r.field ?? null }))
222
+ );
223
+ renderSuccess({ total_rows: rows.length, counts, skipped }, outputOpts(f), process);
224
+ }
225
+ var ID = { type: "positional", description: "Entry id (dnc_...), from `curviate do-not-contact list`." };
226
+ var REASON_ARG = { type: "string", description: `Why: ${REASONS.join(" | ")}.` };
227
+ var listCmd = defineCommand({
228
+ meta: {
229
+ name: "list",
230
+ description: "List your Team's do-not-contact list, newest first. No Motion contacts a person on it and writes toward them are refused (exit 10); a reply in a conversation they wrote in stays allowed. An entry whose Contact was deleted still applies.",
231
+ risk: "read",
232
+ examples: ["curviate do-not-contact list", "curviate do-not-contact list --query jane"]
233
+ },
234
+ args: { ...readOnly(GLOBAL_FLAGS), query: { type: "string", description: "Only entries whose Contact name matches this text." } },
235
+ run: online(runList)
236
+ });
237
+ var getCmd = defineCommand({
238
+ meta: { name: "get", description: "One do-not-contact entry: the person, the reason, and who added it.", risk: "read", examples: ["curviate do-not-contact get dnc_YOUR_ENTRY_ID"] },
239
+ args: { ...readOnly(READ_SINGLE_FLAGS), id: ID },
240
+ run: online(runGet)
241
+ });
242
+ var addCmd = defineCommand({
243
+ meta: {
244
+ name: "add",
245
+ description: "Put one person on the list, by Contact id or LinkedIn URL (a URL of someone who is not a Contact yet creates the Contact from stored data). No Motion contacts them afterwards and writes toward them are refused. One person per call; for many, `do-not-contact import`. Any member may add. Needs Automate.",
246
+ risk: "write",
247
+ rules: {
248
+ changes: "The person joins the list; Motions skip them and writes toward them are refused.",
249
+ visible_to: "Your Team.",
250
+ budget_rows: [],
251
+ retry: "Safe: a person already on the list answers with their existing entry.",
252
+ undo: "`curviate do-not-contact remove <id>` (Owners and Managers)."
253
+ },
254
+ errors: { TIER_REQUIRED: "your plan does not include Do-not-contact writes (Automate).", RESOURCE_NOT_FOUND: "no Contact has this id." },
255
+ seeAlso: ["curviate do-not-contact list", "curviate do-not-contact import"],
256
+ examples: ["curviate do-not-contact add --contact con_YOUR_CONTACT_ID --reason asked_to_stop", "curviate do-not-contact add --linkedin-url https://www.linkedin.com/in/jane-doe"]
257
+ },
258
+ args: {
259
+ ...WRITE_SINGLE_FLAGS,
260
+ contact: { type: "string", description: "The Contact (con_...). Not with --linkedin-url." },
261
+ "linkedin-url": { type: "string", description: "The person's LinkedIn profile URL, in any spelling. Not with --contact." },
262
+ reason: REASON_ARG
263
+ },
264
+ run: online(runAdd)
265
+ });
266
+ var updateCmd = defineCommand({
267
+ meta: {
268
+ name: "update",
269
+ description: "Change the reason on an entry. Needs Automate.",
270
+ risk: "write",
271
+ rules: {
272
+ changes: "The entry's reason.",
273
+ visible_to: "Your Team.",
274
+ budget_rows: [],
275
+ retry: "Safe: the same call leaves the same reason.",
276
+ undo: "Update again with the old reason."
277
+ },
278
+ errors: { TIER_REQUIRED: "your plan does not include Do-not-contact writes (Automate).", RESOURCE_NOT_FOUND: "no such entry." },
279
+ examples: ["curviate do-not-contact update dnc_YOUR_ENTRY_ID --reason existing_customer"]
280
+ },
281
+ args: { ...WRITE_SINGLE_FLAGS, id: ID, reason: { ...REASON_ARG, required: true } },
282
+ run: online(runUpdate)
283
+ });
284
+ var removeCmd = defineCommand({
285
+ meta: {
286
+ name: "remove",
287
+ description: "Take a person off the list: Motions and writes may reach them again. Owners and Managers only.",
288
+ risk: "high",
289
+ rules: {
290
+ changes: "The entry is deleted; Motions may enroll the person and writes toward them are allowed again.",
291
+ visible_to: "The person, if a Motion or write then reaches them on LinkedIn.",
292
+ budget_rows: [],
293
+ retry: "Safe: a second call answers RESOURCE_NOT_FOUND.",
294
+ undo: "`curviate do-not-contact add` again.",
295
+ blast_radius: "One person."
296
+ },
297
+ errors: { INSUFFICIENT_ROLE: "removing is for Owners and Managers.", RESOURCE_NOT_FOUND: "no such entry (already removed)." },
298
+ seeAlso: ["curviate do-not-contact list", "curviate do-not-contact add"],
299
+ examples: ["curviate do-not-contact remove dnc_YOUR_ENTRY_ID"]
300
+ },
301
+ args: { ...WRITE_SINGLE_FLAGS, id: ID },
302
+ run: online(runRemove)
303
+ });
304
+ var exportCmd = defineCommand({
305
+ meta: {
306
+ name: "export",
307
+ description: "Download your Team's whole do-not-contact list as csv, json or ndjson (default): LinkedIn URL (empty once the Contact was deleted), reason, who added it, when. The file imports as it is. The data goes to stdout or --output and nothing else does; the count goes to stderr. --output is written whole or not at all, with mode 0600. Owners and Managers only.",
308
+ risk: "read",
309
+ output: ["The data only. No --json: use --format json."],
310
+ errors: { INSUFFICIENT_ROLE: "exporting is for Owners and Managers." },
311
+ seeAlso: ["curviate do-not-contact import"],
312
+ examples: ["curviate do-not-contact export --format csv --output do-not-contact.csv", "curviate do-not-contact export --format json"]
313
+ },
314
+ args: {
315
+ "api-key": GLOBAL_FLAGS["api-key"],
316
+ profile: GLOBAL_FLAGS.profile,
317
+ team: GLOBAL_FLAGS.team,
318
+ "base-url": GLOBAL_FLAGS["base-url"],
319
+ timeout: GLOBAL_FLAGS.timeout,
320
+ json: { type: "boolean", description: "Not accepted: an export's data is the file. Use --format json." },
321
+ format: { type: "string", description: "csv | json | ndjson (default ndjson)." },
322
+ output: { type: "string", alias: "o", description: "Write to this path (0600, replaced whole on success) or - for stdout (default)." }
323
+ },
324
+ run: online(runExport)
325
+ });
326
+ var importCmd = defineCommand({
327
+ meta: {
328
+ name: "import",
329
+ description: "Put the people of a CSV, JSON or NDJSON file on the list: a linkedin_url per row and an optional reason (a do-not-contact export works as it is). Each row works as `add`: someone who is not a Contact yet becomes one from stored data, and a person already listed is reported unchanged and keeps their reason. A bad URL or reason skips its row and the server says why. A file over 10,000 rows is sent in several requests. Any member may import. Needs Automate.",
330
+ risk: "write",
331
+ rules: {
332
+ changes: "The people join the list; Motions skip them and writes toward them are refused. Nothing is sent to LinkedIn or to the people.",
333
+ visible_to: "Your Team.",
334
+ budget_rows: [],
335
+ retry: "Safe to repeat: a person already listed is reported unchanged. A run stopped part way: run it again.",
336
+ undo: "`curviate do-not-contact remove <id>` per person (Owners and Managers)."
337
+ },
338
+ errors: { TIER_REQUIRED: "your plan does not include Do-not-contact writes (Automate).", CONTACT_LIMIT_REACHED: "the Team is at its Contact cap; rows that would add a Contact past it are skipped." },
339
+ output: ["One report: `total_rows`, summed `counts` (created, unchanged, skipped) and `skipped` rows with their number in the file, a reason and the field."],
340
+ seeAlso: ["curviate do-not-contact export", "curviate do-not-contact list"],
341
+ examples: ["curviate do-not-contact import --file do-not-contact.csv", "curviate do-not-contact import --file - --format ndjson"]
342
+ },
343
+ args: {
344
+ ...WRITE_SINGLE_FLAGS,
345
+ file: { type: "string", stdinArg: true, required: true, description: "The file: a path, or - to read it from stdin (then --format is required)." },
346
+ format: { type: "string", description: "csv | json | ndjson. Default: from the file extension (.csv, .json, .ndjson)." }
347
+ },
348
+ run: online(runImport)
349
+ });
350
+ var doNotContactCommand = defineCommand({
351
+ meta: { name: "do-not-contact", description: DESCRIPTIONS["do-not-contact"] },
352
+ subCommands: { list: listCmd, get: getCmd, add: addCmd, update: updateCmd, remove: removeCmd, export: exportCmd, import: importCmd },
353
+ async run() {
354
+ const { showHelp } = await import("./examples-ICAGL2S5.js");
355
+ await showHelp(doNotContactCommand, ["curviate", "do-not-contact"]);
356
+ }
357
+ });
358
+ export {
359
+ doNotContactCommand
360
+ };
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  readablePage
4
- } from "./chunk-DAFE2MTF.js";
4
+ } from "./chunk-QA777QEJ.js";
5
5
  import "./chunk-QM57YDJE.js";
6
6
  import {
7
7
  createClient,
@@ -10,13 +10,13 @@ import {
10
10
  readConfigFile,
11
11
  resolveEffectiveConfig,
12
12
  withoutUserinfo
13
- } from "./chunk-3RRINPLF.js";
13
+ } from "./chunk-UA4DEQ3K.js";
14
14
  import {
15
15
  GLOBAL_FLAGS
16
16
  } from "./chunk-RYWWSZUH.js";
17
17
  import {
18
18
  DESCRIPTIONS
19
- } from "./chunk-FBBZVIFJ.js";
19
+ } from "./chunk-AQVE6HO5.js";
20
20
  import "./chunk-ZYURL5VK.js";
21
21
  import {
22
22
  getExitCode
@@ -20,7 +20,7 @@ import {
20
20
  readablePage,
21
21
  rejectPaginationModifiersWithoutAll,
22
22
  streamAll
23
- } from "./chunk-DAFE2MTF.js";
23
+ } from "./chunk-QA777QEJ.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-3RRINPLF.js";
33
+ } from "./chunk-UA4DEQ3K.js";
34
34
  import {
35
35
  GLOBAL_FLAGS,
36
36
  READ_SINGLE_FLAGS,
@@ -39,7 +39,7 @@ import {
39
39
  } from "./chunk-RYWWSZUH.js";
40
40
  import {
41
41
  DESCRIPTIONS
42
- } from "./chunk-FBBZVIFJ.js";
42
+ } from "./chunk-AQVE6HO5.js";
43
43
  import {
44
44
  resolveTextOrStdin
45
45
  } from "./chunk-ZYURL5VK.js";
@@ -458,13 +458,13 @@ var draftDeleteCommand = defineCommand({
458
458
  var draftPublishCommand = defineCommand({
459
459
  meta: {
460
460
  name: "publish",
461
- description: "Publish a Draft now, under the same rules and safety limits as `curviate core post create`. Success deletes the Draft and prints the post id; a known failure leaves the Draft unchanged. If the error says the outcome is unknown, the post may be live: check the account's posts before retrying. Needs Automate.",
461
+ description: "Publish a Draft now, under the same rules and safety limits as `curviate core post create`. Success deletes the Draft and prints the post id; a known failure keeps the content and cancels any pending scheduled publish or retry (a time still ahead stays scheduled, one already passed is cleared). If the error says the outcome is unknown, the Draft fails `outcome_unknown` and the post may be live: check the account's posts before retrying. Needs Automate.",
462
462
  risk: "write",
463
463
  rules: {
464
464
  changes: "Publishes the Draft as a post now and deletes the Draft.",
465
465
  visible_to: "Everyone who can see your posts on LinkedIn.",
466
466
  budget_rows: ["posts"],
467
- retry: "A known failure leaves the Draft unchanged and is safe to retry. If the error says the outcome is unknown, read `curviate core post user-posts me` first.",
467
+ retry: "A known failure keeps the content, cancels any pending scheduled publish or retry (a time still ahead stays scheduled, one already passed is cleared) and is safe to retry. If the error says the outcome is unknown, read `curviate core post user-posts me` first.",
468
468
  undo: "`curviate core post delete <post_id>`."
469
469
  },
470
470
  errors: { ...AS_ACCOUNT, ...BUDGET, TIER_REQUIRED: "your plan does not include Drafts (Automate).", DRAFT_NOT_PUBLISHABLE: "the Draft lacks what a post needs.", DRAFT_PUBLISHING: "the Draft is already being published." },
@@ -5,7 +5,7 @@ import {
5
5
  outputOpts,
6
6
  rootClient,
7
7
  usage
8
- } from "./chunk-BKQZDNXH.js";
8
+ } from "./chunk-OUY3GVWJ.js";
9
9
  import {
10
10
  buildPreviewOutput
11
11
  } from "./chunk-TCUYH5GO.js";
@@ -20,12 +20,12 @@ import {
20
20
  readablePage,
21
21
  rejectPaginationModifiersWithoutAll,
22
22
  streamAll
23
- } from "./chunk-DAFE2MTF.js";
23
+ } from "./chunk-QA777QEJ.js";
24
24
  import {
25
25
  renderSuccess,
26
26
  writeNdjsonItem
27
27
  } from "./chunk-QM57YDJE.js";
28
- import "./chunk-3RRINPLF.js";
28
+ import "./chunk-UA4DEQ3K.js";
29
29
  import {
30
30
  GLOBAL_FLAGS,
31
31
  READ_SINGLE_FLAGS,
@@ -34,7 +34,7 @@ import {
34
34
  } from "./chunk-RYWWSZUH.js";
35
35
  import {
36
36
  DESCRIPTIONS
37
- } from "./chunk-FBBZVIFJ.js";
37
+ } from "./chunk-AQVE6HO5.js";
38
38
  import "./chunk-ZYURL5VK.js";
39
39
 
40
40
  // src/commands/enrollment.ts
@@ -7,13 +7,13 @@ import {
7
7
  outputOpts,
8
8
  rootClient,
9
9
  usage
10
- } from "./chunk-BKQZDNXH.js";
10
+ } from "./chunk-OUY3GVWJ.js";
11
11
  import {
12
12
  renderSuccess
13
13
  } from "./chunk-QM57YDJE.js";
14
14
  import {
15
15
  downloadBinary
16
- } from "./chunk-3RRINPLF.js";
16
+ } from "./chunk-UA4DEQ3K.js";
17
17
  import {
18
18
  GLOBAL_FLAGS,
19
19
  READ_SINGLE_FLAGS,
@@ -21,7 +21,7 @@ import {
21
21
  } from "./chunk-RYWWSZUH.js";
22
22
  import {
23
23
  DESCRIPTIONS
24
- } from "./chunk-FBBZVIFJ.js";
24
+ } from "./chunk-AQVE6HO5.js";
25
25
  import "./chunk-ZYURL5VK.js";
26
26
 
27
27
  // src/commands/export.ts
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  requireAccount
4
- } from "./chunk-7OUGD5DH.js";
4
+ } from "./chunk-UXFLLYFY.js";
5
5
  import {
6
6
  pageDelayFromFlags,
7
7
  readCursorFlag,
@@ -9,7 +9,7 @@ import {
9
9
  readablePage,
10
10
  rejectPaginationModifiersWithoutAll,
11
11
  streamAll
12
- } from "./chunk-DAFE2MTF.js";
12
+ } from "./chunk-QA777QEJ.js";
13
13
  import {
14
14
  renderError,
15
15
  renderSuccess,
@@ -19,14 +19,14 @@ import {
19
19
  import {
20
20
  createClient,
21
21
  resolveEffectiveConfig
22
- } from "./chunk-3RRINPLF.js";
22
+ } from "./chunk-UA4DEQ3K.js";
23
23
  import {
24
24
  GLOBAL_FLAGS,
25
25
  readOnly
26
26
  } from "./chunk-RYWWSZUH.js";
27
27
  import {
28
28
  DESCRIPTIONS
29
- } from "./chunk-FBBZVIFJ.js";
29
+ } from "./chunk-AQVE6HO5.js";
30
30
  import "./chunk-ZYURL5VK.js";
31
31
  import "./chunk-QW5K5DTC.js";
32
32
 
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-UEAX6KUB.js";
5
5
  import {
6
6
  requireAccount
7
- } from "./chunk-7OUGD5DH.js";
7
+ } from "./chunk-UXFLLYFY.js";
8
8
  import {
9
9
  pageDelayFromFlags,
10
10
  readCursorFlag,
@@ -13,7 +13,7 @@ import {
13
13
  readablePage,
14
14
  rejectPaginationModifiersWithoutAll,
15
15
  streamAll
16
- } from "./chunk-DAFE2MTF.js";
16
+ } from "./chunk-QA777QEJ.js";
17
17
  import {
18
18
  renderError,
19
19
  renderSuccess,
@@ -23,7 +23,7 @@ import {
23
23
  import {
24
24
  createClient,
25
25
  resolveEffectiveConfig
26
- } from "./chunk-3RRINPLF.js";
26
+ } from "./chunk-UA4DEQ3K.js";
27
27
  import {
28
28
  GLOBAL_FLAGS,
29
29
  READ_SINGLE_FLAGS,
@@ -31,7 +31,7 @@ import {
31
31
  } from "./chunk-RYWWSZUH.js";
32
32
  import {
33
33
  DESCRIPTIONS
34
- } from "./chunk-FBBZVIFJ.js";
34
+ } from "./chunk-AQVE6HO5.js";
35
35
  import "./chunk-ZYURL5VK.js";
36
36
  import "./chunk-QW5K5DTC.js";
37
37
 
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk-UEAX6KUB.js";
13
13
  import {
14
14
  requireAccount
15
- } from "./chunk-7OUGD5DH.js";
15
+ } from "./chunk-UXFLLYFY.js";
16
16
  import {
17
17
  buildPreviewOutput
18
18
  } from "./chunk-TCUYH5GO.js";
@@ -24,7 +24,7 @@ import {
24
24
  readablePage,
25
25
  rejectPaginationModifiersWithoutAll,
26
26
  streamAll
27
- } from "./chunk-DAFE2MTF.js";
27
+ } from "./chunk-QA777QEJ.js";
28
28
  import {
29
29
  renderError,
30
30
  renderSuccess,
@@ -34,7 +34,7 @@ import {
34
34
  import {
35
35
  createClient,
36
36
  resolveEffectiveConfig
37
- } from "./chunk-3RRINPLF.js";
37
+ } from "./chunk-UA4DEQ3K.js";
38
38
  import {
39
39
  GLOBAL_FLAGS,
40
40
  READ_SINGLE_FLAGS,
@@ -43,7 +43,7 @@ import {
43
43
  } from "./chunk-RYWWSZUH.js";
44
44
  import {
45
45
  DESCRIPTIONS
46
- } from "./chunk-FBBZVIFJ.js";
46
+ } from "./chunk-AQVE6HO5.js";
47
47
  import "./chunk-ZYURL5VK.js";
48
48
  import "./chunk-QW5K5DTC.js";
49
49
 
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  requireAccount
4
- } from "./chunk-7OUGD5DH.js";
4
+ } from "./chunk-UXFLLYFY.js";
5
5
  import {
6
6
  pageDelayFromFlags,
7
7
  readCursorFlag,
@@ -10,7 +10,7 @@ import {
10
10
  readablePage,
11
11
  rejectPaginationModifiersWithoutAll,
12
12
  streamAll
13
- } from "./chunk-DAFE2MTF.js";
13
+ } from "./chunk-QA777QEJ.js";
14
14
  import {
15
15
  renderError,
16
16
  renderSuccess,
@@ -20,7 +20,7 @@ import {
20
20
  import {
21
21
  createClient,
22
22
  resolveEffectiveConfig
23
- } from "./chunk-3RRINPLF.js";
23
+ } from "./chunk-UA4DEQ3K.js";
24
24
  import {
25
25
  GLOBAL_FLAGS,
26
26
  READ_SINGLE_FLAGS,
@@ -28,7 +28,7 @@ import {
28
28
  } from "./chunk-RYWWSZUH.js";
29
29
  import {
30
30
  DESCRIPTIONS
31
- } from "./chunk-FBBZVIFJ.js";
31
+ } from "./chunk-AQVE6HO5.js";
32
32
  import "./chunk-ZYURL5VK.js";
33
33
  import "./chunk-QW5K5DTC.js";
34
34
 
@@ -4,7 +4,7 @@ import {
4
4
  outputOpts,
5
5
  rootClient,
6
6
  usage
7
- } from "./chunk-BKQZDNXH.js";
7
+ } from "./chunk-OUY3GVWJ.js";
8
8
  import {
9
9
  buildPreviewOutput
10
10
  } from "./chunk-TCUYH5GO.js";
@@ -18,12 +18,12 @@ import {
18
18
  readablePage,
19
19
  rejectPaginationModifiersWithoutAll,
20
20
  streamAll
21
- } from "./chunk-DAFE2MTF.js";
21
+ } from "./chunk-QA777QEJ.js";
22
22
  import {
23
23
  renderSuccess,
24
24
  writeNdjsonItem
25
25
  } from "./chunk-QM57YDJE.js";
26
- import "./chunk-3RRINPLF.js";
26
+ import "./chunk-UA4DEQ3K.js";
27
27
  import {
28
28
  GLOBAL_FLAGS,
29
29
  READ_SINGLE_FLAGS,
@@ -32,7 +32,7 @@ import {
32
32
  } from "./chunk-RYWWSZUH.js";
33
33
  import {
34
34
  DESCRIPTIONS
35
- } from "./chunk-FBBZVIFJ.js";
35
+ } from "./chunk-AQVE6HO5.js";
36
36
  import "./chunk-ZYURL5VK.js";
37
37
 
38
38
  // src/commands/incoming.ts