@curviate/cli 0.48.0 → 0.50.0-next.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 +72 -0
- package/README.md +47 -6
- package/dist/{account-WKQHMM7P.js → account-KGCGUYKF.js} +668 -116
- package/dist/analytics-HRAD4ABO.js +27 -0
- package/dist/beta-consent-364JI6IL.js +81 -0
- package/dist/billing-3SSVRS2Y.js +124 -0
- package/dist/{chunk-Q63IIPL2.js → chunk-25MO7BYN.js} +4 -4
- package/dist/{chunk-76SWLAZ6.js → chunk-2W4RN5ON.js} +59 -1
- package/dist/chunk-5S3MJVI5.js +22 -0
- package/dist/chunk-67S4JHZZ.js +339 -0
- package/dist/chunk-73DJ3KNE.js +54 -0
- package/dist/chunk-CQGDMARG.js +525 -0
- package/dist/{chunk-Y7K4UBFC.js → chunk-DOHBOYXN.js} +1 -1
- package/dist/{chunk-TSOIZBBU.js → chunk-DSGKYZDK.js} +1 -1
- package/dist/{chunk-YLSJ4HKU.js → chunk-ENBIMEKS.js} +26 -1
- package/dist/{chunk-LCGXJGPB.js → chunk-GHMRPX5H.js} +7 -1
- package/dist/chunk-GOICALYQ.js +28 -0
- package/dist/chunk-L4CIJT6F.js +144 -0
- package/dist/{chunk-PQWDDSV7.js → chunk-L7JH3W56.js} +1 -1
- package/dist/{chunk-YFXLXION.js → chunk-OE6YFYUM.js} +85 -10
- package/dist/chunk-PPGKQJKU.js +38 -0
- package/dist/{chunk-MKGVNDMJ.js → chunk-QM57YDJE.js} +13 -201
- package/dist/{chunk-CVMSQ3OF.js → chunk-RYWWSZUH.js} +17 -3
- package/dist/chunk-T6GBS5SS.js +58 -0
- package/dist/{chunk-AYKKXGTR.js → chunk-TE3WBPW6.js} +392 -14
- package/dist/chunk-UL53T4O6.js +52 -0
- package/dist/chunk-UWQPX4AE.js +20 -0
- package/dist/{chunk-OHXYFICP.js → chunk-YXVF5UST.js} +77 -4
- package/dist/cli.js +35 -17
- package/dist/{comment-7IQ6ZOJF.js → comment-5JKGNYOY.js} +90 -11
- package/dist/{company-RD7RDGSA.js → company-TXST2VXW.js} +65 -15
- package/dist/{config-EYBNYRGK.js → config-TVIQUVNK.js} +53 -4
- package/dist/{connect-HVXT67A6.js → connect-RBL6U4KV.js} +63 -18
- package/dist/contact-YAHC5QFX.js +32 -0
- package/dist/contact-groups-DKOIBC57.js +399 -0
- package/dist/contact-import-ITSJQV7K.js +336 -0
- package/dist/core-PWMJPPRG.js +46 -0
- package/dist/do-not-contact-WDYIBWYA.js +200 -0
- package/dist/{doctor-HUXQERLQ.js → doctor-F7JLPTED.js} +65 -11
- package/dist/{document-AUUCGST2.js → document-BHYAUJ6F.js} +1 -1
- package/dist/{draft-DFO22K6Q.js → draft-TDJJUXLH.js} +60 -14
- package/dist/enrollment-Q6UOKHPY.js +484 -0
- package/dist/{examples-64YT5V5K.js → examples-DQSVIIXZ.js} +2 -2
- package/dist/{exit-codes-AW6KHDDN.js → exit-codes-7DBETBDT.js} +1 -1
- package/dist/export-HIJSCJS6.js +96 -0
- package/dist/{feed-JWP6ANPI.js → feed-W56ZTA4Z.js} +13 -10
- package/dist/{group-SIQFJEZV.js → group-AUALYK5H.js} +18 -10
- package/dist/{inbox-MMIMCA5O.js → inbox-HLZR2ZPV.js} +31 -12
- package/dist/{inboxes-RND3D4C7.js → inboxes-IZTRD6FE.js} +14 -10
- package/dist/incoming-ULB2RNV4.js +218 -0
- package/dist/{job-ACFKBLFK.js → job-55IKS6LP.js} +65 -13
- package/dist/{login-ZOB5KVKQ.js → login-DPZ6CXNO.js} +13 -4
- package/dist/{message-OFK6UVXR.js → message-J44YKRDS.js} +9 -7
- package/dist/motion-SQI5F2EK.js +868 -0
- package/dist/network-K4QD7APQ.js +235 -0
- package/dist/{notification-KKGAZU7M.js → notification-SEDXZHXO.js} +38 -11
- package/dist/notifications-HGIBRUNQ.js +231 -0
- package/dist/{post-A5SBCFB2.js → post-L467SKIG.js} +92 -12
- package/dist/{profile-4SOOQZ4K.js → profile-A2N6RMR2.js} +79 -23
- package/dist/{recruiter-YN73STDP.js → recruiter-AR75RHBO.js} +132 -21
- package/dist/{sales-nav-JXF5RY2K.js → sales-nav-C2AYFXPV.js} +73 -18
- package/dist/{search-JAL242A2.js → search-Z4DZIG4X.js} +55 -23
- package/dist/{setup-WICWH4JG.js → setup-45BEVX6B.js} +69 -17
- package/dist/team-6QWY4IFP.js +450 -0
- package/dist/tier-2HS3BXDF.js +61 -0
- package/dist/unibox-DHUKG65Z.js +402 -0
- package/dist/{webhook-UGKVYWBC.js → webhook-Q53WUAI2.js} +273 -45
- package/package.json +2 -2
- package/dist/chunk-GQKC6E5K.js +0 -36
- package/dist/core-6XYGUNAY.js +0 -46
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
|
-
readablePage
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
getExitCode
|
|
8
|
-
} from "./chunk-76SWLAZ6.js";
|
|
3
|
+
readablePage
|
|
4
|
+
} from "./chunk-L4CIJT6F.js";
|
|
5
|
+
import "./chunk-QM57YDJE.js";
|
|
9
6
|
import {
|
|
10
7
|
createClient,
|
|
11
8
|
getConfigPath,
|
|
12
9
|
isPlainObject,
|
|
13
10
|
readConfigFile,
|
|
11
|
+
resolveEffectiveConfig,
|
|
14
12
|
withoutUserinfo
|
|
15
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-YXVF5UST.js";
|
|
16
14
|
import {
|
|
17
15
|
GLOBAL_FLAGS
|
|
18
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-RYWWSZUH.js";
|
|
19
17
|
import {
|
|
20
18
|
DESCRIPTIONS
|
|
21
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-73DJ3KNE.js";
|
|
22
20
|
import "./chunk-ZYURL5VK.js";
|
|
21
|
+
import {
|
|
22
|
+
getExitCode
|
|
23
|
+
} from "./chunk-2W4RN5ON.js";
|
|
23
24
|
|
|
24
25
|
// src/commands/doctor.ts
|
|
25
26
|
import { defineCommand } from "citty";
|
|
@@ -41,12 +42,21 @@ function defaultVersion() {
|
|
|
41
42
|
async function defaultListAccounts(apiKey, baseUrl, timeout) {
|
|
42
43
|
return createClient({ apiKey, baseUrl, timeout }).accounts.list();
|
|
43
44
|
}
|
|
45
|
+
async function defaultListTeams(apiKey, baseUrl, timeout) {
|
|
46
|
+
return createClient({ apiKey, baseUrl, timeout, team: null }).teams.list({ limit: 100 });
|
|
47
|
+
}
|
|
48
|
+
var ALL_TEAMS_KEY_PREFIX = "cvt_all_";
|
|
49
|
+
function teamRows(payload) {
|
|
50
|
+
const items = isPlainObject(payload) ? payload["items"] : void 0;
|
|
51
|
+
return Array.isArray(items) ? items.filter((t) => isPlainObject(t) && typeof t["team_id"] === "string") : [];
|
|
52
|
+
}
|
|
44
53
|
function resolveDoctorIO(io = {}) {
|
|
45
54
|
return {
|
|
46
55
|
stdout: io.stdout ?? { write: (s) => void process.stdout.write(s) },
|
|
47
56
|
stderr: io.stderr ?? { write: (s) => void process.stderr.write(s) },
|
|
48
57
|
isOutputTTY: io.isOutputTTY ?? (process.stdout.isTTY ?? false),
|
|
49
58
|
listAccounts: io.listAccounts ?? defaultListAccounts,
|
|
59
|
+
listTeams: io.listTeams ?? defaultListTeams,
|
|
50
60
|
version: io.version ?? defaultVersion
|
|
51
61
|
};
|
|
52
62
|
}
|
|
@@ -87,7 +97,17 @@ async function runDoctor(args, io) {
|
|
|
87
97
|
let reachable = false;
|
|
88
98
|
let valid = false;
|
|
89
99
|
let accounts = [];
|
|
90
|
-
|
|
100
|
+
const keyScope = credentialResolved ? effective.apiKey.startsWith(ALL_TEAMS_KEY_PREFIX) ? "all_teams" : "team" : null;
|
|
101
|
+
const named = effective.team;
|
|
102
|
+
let team = named === void 0 ? null : { team_id: named, name: null, source: effective.teamSource };
|
|
103
|
+
if (keyScope === "all_teams" && named === void 0) {
|
|
104
|
+
checks.push({
|
|
105
|
+
name: "team",
|
|
106
|
+
ok: false,
|
|
107
|
+
detail: "a key for all your Teams needs a Team: pass --team, set CURVIATE_TEAM, or run `curviate team switch <team_id>` (`curviate team list` shows them)",
|
|
108
|
+
exit: 2
|
|
109
|
+
});
|
|
110
|
+
} else if (credentialResolved) {
|
|
91
111
|
try {
|
|
92
112
|
const payload = await io.listAccounts(
|
|
93
113
|
effective.apiKey,
|
|
@@ -111,6 +131,7 @@ async function runDoctor(args, io) {
|
|
|
111
131
|
detail: `${accounts.length} connected`,
|
|
112
132
|
exit: 8
|
|
113
133
|
});
|
|
134
|
+
team = await checkTeam(io, effective.apiKey, effective.baseUrl, effective.timeout, keyScope, team, checks);
|
|
114
135
|
} catch (err) {
|
|
115
136
|
const error = err;
|
|
116
137
|
const code = typeof error.code === "string" ? error.code : void 0;
|
|
@@ -133,6 +154,7 @@ async function runDoctor(args, io) {
|
|
|
133
154
|
detail: responded ? code === "PLATFORM_ERROR" ? `not verified: ${error.message ?? code}` : code ? `rejected: ${code}` : error.message ?? "the call did not succeed" : transportFault ? `not checked: ${shownBaseUrl} could not be reached` : error.message ?? "the request was refused before it was sent",
|
|
134
155
|
exit: responded ? codeExit : transportFault ? 3 : codeExit
|
|
135
156
|
});
|
|
157
|
+
if (code === "TEAM_ACCESS_DENIED") team = await checkTeam(io, effective.apiKey, effective.baseUrl, effective.timeout, keyScope, team, checks);
|
|
136
158
|
}
|
|
137
159
|
}
|
|
138
160
|
const tenant = effective.tenant ?? null;
|
|
@@ -145,15 +167,42 @@ async function runDoctor(args, io) {
|
|
|
145
167
|
credential_source: effective.apiKeySource,
|
|
146
168
|
credential_resolved: credentialResolved,
|
|
147
169
|
tenant,
|
|
170
|
+
key_scope: keyScope,
|
|
171
|
+
team,
|
|
148
172
|
api_reachable: reachable,
|
|
149
173
|
credential_valid: valid,
|
|
150
174
|
accounts,
|
|
175
|
+
// doctor's own count: every Account the list returns, whatever its status, so one needing a reconnect is not zero.
|
|
176
|
+
...valid && accounts.length === 0 ? { next_step: "curviate account connect-request create" } : {},
|
|
151
177
|
checks: checks.map(({ name, ok, detail }) => ({ name, ok, detail })),
|
|
152
178
|
ok: firstFailure === void 0,
|
|
153
179
|
exit: firstFailure?.exit ?? 0
|
|
154
180
|
};
|
|
155
181
|
return report;
|
|
156
182
|
}
|
|
183
|
+
async function checkTeam(io, apiKey, baseUrl, timeout, scope, team, checks) {
|
|
184
|
+
let rows;
|
|
185
|
+
try {
|
|
186
|
+
rows = teamRows(await io.listTeams(apiKey, baseUrl, timeout));
|
|
187
|
+
} catch {
|
|
188
|
+
return team;
|
|
189
|
+
}
|
|
190
|
+
if (team === null) {
|
|
191
|
+
const own = rows.find((t) => t.is_current);
|
|
192
|
+
return own ? { team_id: own.team_id, name: own.name, source: "key" } : null;
|
|
193
|
+
}
|
|
194
|
+
const row = rows.find((t) => t.team_id === team.team_id);
|
|
195
|
+
const ok = row !== void 0 && (scope === "all_teams" || row.is_current);
|
|
196
|
+
checks.push({
|
|
197
|
+
name: "team",
|
|
198
|
+
ok,
|
|
199
|
+
detail: ok ? `${row?.name ?? team.team_id} (from ${team.source})` : row === void 0 ? `${team.team_id} (from ${team.source}) is not one of your Teams: run \`curviate team list\`, then \`curviate team switch <team_id>\`` : `${team.team_id} (from ${team.source}) is not this key's Team: a Team key acts only in its own Team. Remove the Team, or run \`curviate setup --team ${team.team_id}\``,
|
|
200
|
+
// TEAM_ACCESS_DENIED's class: the credential does not reach that Team.
|
|
201
|
+
exit: 3
|
|
202
|
+
});
|
|
203
|
+
return { ...team, name: row?.name ?? null };
|
|
204
|
+
}
|
|
205
|
+
var NO_ACCOUNT = "No Account connected: ask your user to connect one in the dashboard, or create a Connect request.";
|
|
157
206
|
function renderHuman(report, io) {
|
|
158
207
|
const lines = [
|
|
159
208
|
`version ${report.version}`,
|
|
@@ -161,7 +210,9 @@ function renderHuman(report, io) {
|
|
|
161
210
|
`profile ${report.profile}`,
|
|
162
211
|
`base url ${report.base_url}`,
|
|
163
212
|
`credential ${report.credential_resolved ? `resolved from ${report.credential_source}` : "not found"}`,
|
|
164
|
-
`workspace ${report.tenant ?? "unknown (only a key `curviate setup` wrote carries it)"}
|
|
213
|
+
`workspace ${report.tenant ?? "unknown (only a key `curviate setup` wrote carries it)"}`,
|
|
214
|
+
`key scope ${report.key_scope === "all_teams" ? "all your Teams" : report.key_scope === "team" ? "one Team" : "unknown"}`,
|
|
215
|
+
`team ${report.team ? `${report.team.name ?? report.team.team_id} (${report.team.team_id}, from ${report.team.source})` : "none"}`
|
|
165
216
|
];
|
|
166
217
|
for (const check of report.checks) {
|
|
167
218
|
lines.push(`${check.ok ? "PASS" : "FAIL"} ${check.name}: ${check.detail}`);
|
|
@@ -169,12 +220,14 @@ function renderHuman(report, io) {
|
|
|
169
220
|
for (const account of report.accounts) {
|
|
170
221
|
lines.push(`account ${account.account_id} ${account.status}`);
|
|
171
222
|
}
|
|
223
|
+
if (report.next_step) lines.push(NO_ACCOUNT);
|
|
172
224
|
io.stdout.write(lines.join("\n") + "\n");
|
|
173
225
|
}
|
|
174
226
|
var doctorCommand = defineCommand({
|
|
175
227
|
meta: {
|
|
176
228
|
name: "doctor",
|
|
177
229
|
description: DESCRIPTIONS.doctor,
|
|
230
|
+
risk: "read",
|
|
178
231
|
examples: [
|
|
179
232
|
"curviate doctor",
|
|
180
233
|
"curviate doctor --json"
|
|
@@ -185,6 +238,7 @@ var doctorCommand = defineCommand({
|
|
|
185
238
|
"api-key": GLOBAL_FLAGS["api-key"],
|
|
186
239
|
"base-url": GLOBAL_FLAGS["base-url"],
|
|
187
240
|
timeout: GLOBAL_FLAGS.timeout,
|
|
241
|
+
team: GLOBAL_FLAGS.team,
|
|
188
242
|
json: GLOBAL_FLAGS.json
|
|
189
243
|
},
|
|
190
244
|
async run({ args }) {
|
|
@@ -5,6 +5,10 @@ import {
|
|
|
5
5
|
readAttachment,
|
|
6
6
|
toAttachmentPayload
|
|
7
7
|
} from "./chunk-5I6JJJIV.js";
|
|
8
|
+
import {
|
|
9
|
+
AS_ACCOUNT,
|
|
10
|
+
BUDGET
|
|
11
|
+
} from "./chunk-UWQPX4AE.js";
|
|
8
12
|
import {
|
|
9
13
|
buildPreviewOutput
|
|
10
14
|
} from "./chunk-TCUYH5GO.js";
|
|
@@ -15,25 +19,27 @@ import {
|
|
|
15
19
|
readableObject,
|
|
16
20
|
readablePage,
|
|
17
21
|
rejectPaginationModifiersWithoutAll,
|
|
22
|
+
streamAll
|
|
23
|
+
} from "./chunk-L4CIJT6F.js";
|
|
24
|
+
import {
|
|
18
25
|
renderError,
|
|
19
26
|
renderSuccess,
|
|
20
27
|
renderUnexpectedError,
|
|
21
|
-
resolveEffectiveConfig,
|
|
22
|
-
streamAll,
|
|
23
28
|
writeNdjsonItem
|
|
24
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-QM57YDJE.js";
|
|
25
30
|
import {
|
|
26
|
-
createClient
|
|
27
|
-
|
|
31
|
+
createClient,
|
|
32
|
+
resolveEffectiveConfig
|
|
33
|
+
} from "./chunk-YXVF5UST.js";
|
|
28
34
|
import {
|
|
29
35
|
GLOBAL_FLAGS,
|
|
30
36
|
READ_SINGLE_FLAGS,
|
|
31
37
|
WRITE_SINGLE_FLAGS,
|
|
32
38
|
readOnly
|
|
33
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-RYWWSZUH.js";
|
|
34
40
|
import {
|
|
35
41
|
DESCRIPTIONS
|
|
36
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-73DJ3KNE.js";
|
|
37
43
|
import {
|
|
38
44
|
resolveTextOrStdin
|
|
39
45
|
} from "./chunk-ZYURL5VK.js";
|
|
@@ -67,7 +73,7 @@ function rejectAllOnNonPaginated(all, out) {
|
|
|
67
73
|
async function handleError(err, outOpts, out) {
|
|
68
74
|
const { CurviateError } = await import("@curviate/sdk");
|
|
69
75
|
if (err instanceof CurviateError) {
|
|
70
|
-
const { getExitCode } = await import("./exit-codes-
|
|
76
|
+
const { getExitCode } = await import("./exit-codes-7DBETBDT.js");
|
|
71
77
|
renderError(err, outOpts, out);
|
|
72
78
|
process.exit(getExitCode(err));
|
|
73
79
|
}
|
|
@@ -322,12 +328,13 @@ async function withClient(flags, fn) {
|
|
|
322
328
|
await fn(client, flags, buildOutputStreams());
|
|
323
329
|
}
|
|
324
330
|
var ACCOUNT_DESC = "Account the Draft publishes as (acc_...). Never defaulted: omit it for a Draft with no account yet.";
|
|
325
|
-
var SCHEDULE_DESC = "Publish at this time: ISO 8601 with an offset (e.g. 2026-10-12T09:00:00+02:00), passed through unchanged.
|
|
326
|
-
var ATTACH_DESC = "File to attach, repeatable; keeps the order given.
|
|
331
|
+
var SCHEDULE_DESC = "Publish at this time: ISO 8601 with an offset (e.g. 2026-10-12T09:00:00+02:00), passed through unchanged. A time in the future, not too close to another scheduled Draft on the same account (SCHEDULE_CONFLICT). Needs an account and text.";
|
|
332
|
+
var ATTACH_DESC = "File to attach, repeatable; keeps the order given. Several images (JPEG, PNG, GIF, WEBP), or one MP4 video, or one PDF, never mixed. A file over its size limit is refused.";
|
|
327
333
|
var draftListCommand = defineCommand({
|
|
328
334
|
meta: {
|
|
329
335
|
name: "list",
|
|
330
336
|
description: "List Drafts, newest first. With --status published it lists publish records instead (post id, account, time; never Drafts).",
|
|
337
|
+
risk: "read",
|
|
331
338
|
examples: [
|
|
332
339
|
"curviate core draft list",
|
|
333
340
|
"curviate core draft list --status scheduled --account acc_YOUR_ACCOUNT_ID --order asc",
|
|
@@ -349,7 +356,8 @@ var draftListCommand = defineCommand({
|
|
|
349
356
|
var draftGetCommand = defineCommand({
|
|
350
357
|
meta: {
|
|
351
358
|
name: "get",
|
|
352
|
-
description: "Get one Draft, with a fresh signed link
|
|
359
|
+
description: "Get one Draft, with a fresh signed link for each attachment. The links expire: fetch the Draft again for new ones.",
|
|
360
|
+
risk: "read",
|
|
353
361
|
examples: ["curviate core draft get drf_YOUR_DRAFT_ID"]
|
|
354
362
|
},
|
|
355
363
|
args: {
|
|
@@ -363,7 +371,16 @@ var draftGetCommand = defineCommand({
|
|
|
363
371
|
var draftCreateCommand = defineCommand({
|
|
364
372
|
meta: {
|
|
365
373
|
name: "create",
|
|
366
|
-
description: "Store a Draft. Every part is optional. With --schedule-at (and an account and text) Curviate publishes it at that time.
|
|
374
|
+
description: "Store a Draft. Every part is optional. With --schedule-at (and an account and text) Curviate publishes it at that time. Each account, and the no-account bucket, has a Draft limit and a media quota (DRAFT_LIMIT_REACHED, MEDIA_QUOTA_EXCEEDED). A retry creates a second Draft. Needs Automate.",
|
|
375
|
+
risk: "write",
|
|
376
|
+
rules: {
|
|
377
|
+
changes: "Stores a Draft; with --schedule-at, an account and text, Curviate publishes it at that time.",
|
|
378
|
+
visible_to: "You and your Team; nothing reaches LinkedIn until it is published.",
|
|
379
|
+
budget_rows: [],
|
|
380
|
+
retry: "Not safe: each call creates another Draft.",
|
|
381
|
+
undo: "`curviate core draft delete <draft_id>`."
|
|
382
|
+
},
|
|
383
|
+
errors: { TIER_REQUIRED: "your plan does not include Drafts (Automate).", DRAFT_LIMIT_REACHED: "the bucket already holds as many Drafts as it may.", MEDIA_QUOTA_EXCEEDED: "the media quota is used.", SCHEDULE_CONFLICT: "another Draft is scheduled too close to this time." },
|
|
367
384
|
examples: [
|
|
368
385
|
'curviate core draft create "Three things we learned shipping our first agent integration."',
|
|
369
386
|
'curviate core draft create "Launch day." --account acc_YOUR_ACCOUNT_ID --schedule-at 2026-10-12T09:00:00+02:00',
|
|
@@ -384,7 +401,16 @@ var draftCreateCommand = defineCommand({
|
|
|
384
401
|
var draftUpdateCommand = defineCommand({
|
|
385
402
|
meta: {
|
|
386
403
|
name: "update",
|
|
387
|
-
description: "Change a Draft: only the parts you pass change. --attach appends files; --schedule-at schedules or reschedules, --unschedule cancels. Any update to a failed Draft clears its failure. A Draft being published answers DRAFT_PUBLISHING: read it again in a few seconds.",
|
|
404
|
+
description: "Change a Draft: only the parts you pass change. --attach appends files; --schedule-at schedules or reschedules, --unschedule cancels. Any update to a failed Draft clears its failure. A Draft being published answers DRAFT_PUBLISHING: read it again in a few seconds. Needs Automate.",
|
|
405
|
+
risk: "write",
|
|
406
|
+
rules: {
|
|
407
|
+
changes: "Changes the parts of the Draft you pass; --schedule-at schedules or reschedules it, --unschedule cancels.",
|
|
408
|
+
visible_to: "You and your Team; nothing reaches LinkedIn until it is published.",
|
|
409
|
+
budget_rows: [],
|
|
410
|
+
retry: "Safe for the text and schedule: the same values written again leave the Draft the same. --attach appends the files again.",
|
|
411
|
+
undo: "Run it again with the previous values."
|
|
412
|
+
},
|
|
413
|
+
errors: { TIER_REQUIRED: "your plan does not include Drafts (Automate).", DRAFT_PUBLISHING: "the Draft is being published: read it again in a few seconds.", MEDIA_QUOTA_EXCEEDED: "the media quota is used.", SCHEDULE_CONFLICT: "another Draft is scheduled too close to this time." },
|
|
388
414
|
examples: [
|
|
389
415
|
'curviate core draft update drf_YOUR_DRAFT_ID --text "New wording."',
|
|
390
416
|
"curviate core draft update drf_YOUR_DRAFT_ID --schedule-at 2026-10-12T09:00:00+02:00",
|
|
@@ -408,6 +434,17 @@ var draftDeleteCommand = defineCommand({
|
|
|
408
434
|
meta: {
|
|
409
435
|
name: "delete",
|
|
410
436
|
description: "Delete a Draft and its stored media.",
|
|
437
|
+
risk: "high",
|
|
438
|
+
rules: {
|
|
439
|
+
changes: "Deletes the Draft and its stored media.",
|
|
440
|
+
visible_to: "You and your Team.",
|
|
441
|
+
budget_rows: [],
|
|
442
|
+
retry: "Safe: a deleted Draft is gone, so a repeat has nothing to delete.",
|
|
443
|
+
undo: "Cannot be undone.",
|
|
444
|
+
blast_radius: "One Draft, with its stored media."
|
|
445
|
+
},
|
|
446
|
+
errors: { RESOURCE_NOT_FOUND: "no such Draft." },
|
|
447
|
+
seeAlso: ["curviate core draft list"],
|
|
411
448
|
examples: ["curviate core draft delete drf_YOUR_DRAFT_ID"]
|
|
412
449
|
},
|
|
413
450
|
args: {
|
|
@@ -421,7 +458,16 @@ var draftDeleteCommand = defineCommand({
|
|
|
421
458
|
var draftPublishCommand = defineCommand({
|
|
422
459
|
meta: {
|
|
423
460
|
name: "publish",
|
|
424
|
-
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.",
|
|
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.",
|
|
462
|
+
risk: "write",
|
|
463
|
+
rules: {
|
|
464
|
+
changes: "Publishes the Draft as a post now and deletes the Draft.",
|
|
465
|
+
visible_to: "Everyone who can see your posts on LinkedIn.",
|
|
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.",
|
|
468
|
+
undo: "`curviate core post delete <post_id>`."
|
|
469
|
+
},
|
|
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." },
|
|
425
471
|
examples: ["curviate core draft publish drf_YOUR_DRAFT_ID"]
|
|
426
472
|
},
|
|
427
473
|
args: {
|