@curviate/cli 0.49.0 → 0.50.0-next.1

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 (70) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +12 -5
  3. package/dist/{account-2BH2Q6VG.js → account-U7UJIE3H.js} +784 -116
  4. package/dist/analytics-MZU2WKON.js +27 -0
  5. package/dist/beta-consent-67IDUV3K.js +81 -0
  6. package/dist/billing-QAW75YE7.js +124 -0
  7. package/dist/{chunk-RXWODUWA.js → chunk-2W4RN5ON.js} +18 -2
  8. package/dist/{chunk-MGB6FE4A.js → chunk-3Z6PXS6N.js} +6 -6
  9. package/dist/chunk-5S3MJVI5.js +22 -0
  10. package/dist/{chunk-V7FJWTZW.js → chunk-6LBOGIVE.js} +4 -4
  11. package/dist/{chunk-Z7OQSWBD.js → chunk-6PLDAEMO.js} +85 -10
  12. package/dist/chunk-73DJ3KNE.js +54 -0
  13. package/dist/{chunk-3RCW7URJ.js → chunk-A57ZILRU.js} +1 -1
  14. package/dist/chunk-AVI7J47S.js +52 -0
  15. package/dist/{chunk-JYKYD57J.js → chunk-CKVCBGQX.js} +1 -1
  16. package/dist/chunk-EIA66ESN.js +339 -0
  17. package/dist/{chunk-YLSJ4HKU.js → chunk-ENBIMEKS.js} +26 -1
  18. package/dist/{chunk-LCGXJGPB.js → chunk-GHMRPX5H.js} +7 -1
  19. package/dist/chunk-GOICALYQ.js +28 -0
  20. package/dist/{chunk-PQWDDSV7.js → chunk-L7JH3W56.js} +1 -1
  21. package/dist/chunk-LCPPXOPN.js +528 -0
  22. package/dist/chunk-LRMPS4UQ.js +144 -0
  23. package/dist/{chunk-5ZGTU4VD.js → chunk-LULN3II2.js} +78 -5
  24. package/dist/chunk-PPGKQJKU.js +38 -0
  25. package/dist/chunk-Q3ZPRFUX.js +20 -0
  26. package/dist/{chunk-SA2QHAXG.js → chunk-QM57YDJE.js} +13 -201
  27. package/dist/{chunk-Y7MZZRYR.js → chunk-RYWWSZUH.js} +14 -2
  28. package/dist/{chunk-TEAWYLPO.js → chunk-TYNVJDYK.js} +49 -18
  29. package/dist/cli.js +34 -18
  30. package/dist/{comment-MRDPDA33.js → comment-6NRZILAS.js} +90 -11
  31. package/dist/{company-2AEHSGHA.js → company-VXE7IEPT.js} +65 -15
  32. package/dist/{config-NRBKHXES.js → config-3WP7OD35.js} +53 -4
  33. package/dist/{connect-4XEBV5V3.js → connect-FBK6UWZP.js} +63 -18
  34. package/dist/contact-HFPZ3KGL.js +32 -0
  35. package/dist/contact-groups-AI4MLGQS.js +399 -0
  36. package/dist/contact-import-54Y7EMU2.js +336 -0
  37. package/dist/core-RLMWMQEI.js +46 -0
  38. package/dist/do-not-contact-LQ5V6SPE.js +200 -0
  39. package/dist/{doctor-BZ4DA7DV.js → doctor-KKRL7TEF.js} +65 -11
  40. package/dist/{document-RKHRWXNT.js → document-GFRWPQFV.js} +1 -1
  41. package/dist/{draft-C5N6EOO5.js → draft-VSWZOCDR.js} +60 -14
  42. package/dist/{enrollment-BNQOUKI7.js → enrollment-OACCSBM5.js} +31 -19
  43. package/dist/{examples-NIMSIXMV.js → examples-JJB4DZKK.js} +2 -2
  44. package/dist/{exit-codes-TLMKTLRI.js → exit-codes-7DBETBDT.js} +1 -1
  45. package/dist/export-AQHAFVAB.js +96 -0
  46. package/dist/{feed-DFUU7SUJ.js → feed-HY4HT75U.js} +13 -10
  47. package/dist/{group-CSD2OWOZ.js → group-A3SMBFU5.js} +18 -10
  48. package/dist/{inbox-SNSPWI7J.js → inbox-YHUO2RPI.js} +31 -12
  49. package/dist/{inboxes-RIRHPS4H.js → inboxes-GKLMHPDR.js} +14 -10
  50. package/dist/incoming-NHROOOIZ.js +218 -0
  51. package/dist/{job-6PNXXZNF.js → job-QBW3PGWL.js} +65 -13
  52. package/dist/{login-Y7JBAHCW.js → login-GWIYHKYO.js} +13 -4
  53. package/dist/{message-2IK4MBBG.js → message-BFLN2VHS.js} +9 -7
  54. package/dist/{motion-7ATUXO6R.js → motion-LTWU2GPC.js} +39 -117
  55. package/dist/network-CNSBX2SR.js +235 -0
  56. package/dist/{notification-VYK5NDEB.js → notification-DCCFJPXU.js} +38 -11
  57. package/dist/notifications-AQBXBK4K.js +231 -0
  58. package/dist/{post-AN6T2OJF.js → post-PINZHSPS.js} +92 -12
  59. package/dist/{profile-UQY64642.js → profile-MJQJSNYR.js} +76 -20
  60. package/dist/{recruiter-OY4RN5HH.js → recruiter-X6GX4A2G.js} +133 -22
  61. package/dist/{sales-nav-KLODLYMW.js → sales-nav-44GYWDYE.js} +74 -19
  62. package/dist/{search-NWP5S6CF.js → search-SULIN6TB.js} +55 -23
  63. package/dist/{setup-YPPFLH2N.js → setup-ZQRHMRMB.js} +69 -17
  64. package/dist/team-TM6LRUY5.js +450 -0
  65. package/dist/tier-Z3U6AT7H.js +61 -0
  66. package/dist/unibox-BIMI2KY5.js +402 -0
  67. package/dist/{webhook-OHKBL3YS.js → webhook-EHXRTHBG.js} +257 -27
  68. package/package.json +2 -2
  69. package/dist/chunk-D2S5OCYU.js +0 -38
  70. package/dist/core-RGU2SCBN.js +0 -46
@@ -1,7 +1,11 @@
1
1
  #!/usr/bin/env node
2
+ import {
3
+ AS_ACCOUNT,
4
+ TARGET
5
+ } from "./chunk-Q3ZPRFUX.js";
2
6
  import {
3
7
  requireAccount
4
- } from "./chunk-V7FJWTZW.js";
8
+ } from "./chunk-6LBOGIVE.js";
5
9
  import {
6
10
  buildPreviewOutput
7
11
  } from "./chunk-TCUYH5GO.js";
@@ -11,26 +15,28 @@ import {
11
15
  readMaxPagesFlag,
12
16
  readablePage,
13
17
  rejectPaginationModifiersWithoutAll,
18
+ streamAll
19
+ } from "./chunk-LRMPS4UQ.js";
20
+ import {
14
21
  renderError,
15
22
  renderSuccess,
16
23
  renderUnexpectedError,
17
- resolveEffectiveConfig,
18
- streamAll,
19
24
  writeNdjsonItem
20
- } from "./chunk-SA2QHAXG.js";
21
- import "./chunk-RXWODUWA.js";
25
+ } from "./chunk-QM57YDJE.js";
22
26
  import {
23
- createClient
24
- } from "./chunk-5ZGTU4VD.js";
27
+ createClient,
28
+ resolveEffectiveConfig
29
+ } from "./chunk-LULN3II2.js";
25
30
  import {
26
31
  GLOBAL_FLAGS,
27
32
  WRITE_SINGLE_FLAGS,
28
33
  readOnly
29
- } from "./chunk-Y7MZZRYR.js";
34
+ } from "./chunk-RYWWSZUH.js";
30
35
  import {
31
36
  DESCRIPTIONS
32
- } from "./chunk-D2S5OCYU.js";
37
+ } from "./chunk-73DJ3KNE.js";
33
38
  import "./chunk-ZYURL5VK.js";
39
+ import "./chunk-2W4RN5ON.js";
34
40
 
35
41
  // src/commands/notification.ts
36
42
  import { defineCommand } from "citty";
@@ -51,7 +57,7 @@ function resolveOutputOpts(flags) {
51
57
  async function handleSdkError(err, outOpts, out) {
52
58
  const { CurviateError } = await import("@curviate/sdk");
53
59
  if (err instanceof CurviateError) {
54
- const { getExitCode } = await import("./exit-codes-TLMKTLRI.js");
60
+ const { getExitCode } = await import("./exit-codes-7DBETBDT.js");
55
61
  renderError(err, outOpts, out);
56
62
  process.exit(getExitCode(err));
57
63
  }
@@ -126,7 +132,8 @@ async function runNotificationShowLess(client, flags, out) {
126
132
  var notificationListCommand = defineCommand({
127
133
  meta: {
128
134
  name: "list",
129
- description: "List the connected account's notification cards, newest first, plus the unread badge and a poll watermark.",
135
+ description: "List the connected account's LinkedIn notification cards, newest first, plus the unread badge and a poll watermark. Curviate's own Notifications are `curviate notification list`.",
136
+ risk: "read",
130
137
  examples: [
131
138
  "curviate core notification list",
132
139
  "curviate core notification list --filter mentions"
@@ -161,6 +168,17 @@ var notificationDeleteCommand = defineCommand({
161
168
  meta: {
162
169
  name: "delete",
163
170
  description: "Delete one of your notification cards by its card urn. Self-action, safe to repeat, cannot be undone. An injected card (injected: true) has no card urn and cannot be deleted. LinkedIn may bring editorial and promotional cards back after a delete; `curviate core notification show-less` is the reliable way to suppress those.",
171
+ risk: "high",
172
+ rules: {
173
+ changes: "Deletes one notification card from your LinkedIn account.",
174
+ visible_to: "Only you.",
175
+ budget_rows: [],
176
+ retry: "Safe: repeating it changes nothing.",
177
+ undo: "Cannot be undone; LinkedIn may bring editorial and promotional cards back.",
178
+ blast_radius: "One notification card."
179
+ },
180
+ errors: { ...AS_ACCOUNT, ...TARGET },
181
+ seeAlso: ["curviate core notification list"],
164
182
  examples: [
165
183
  'curviate core notification delete "urn:li:fsd_notificationCard:(urn:li:fsd_notification:9999,ALL)"'
166
184
  ]
@@ -191,6 +209,15 @@ var notificationShowLessCommand = defineCommand({
191
209
  meta: {
192
210
  name: "show-less",
193
211
  description: "Apply 'show less like this' to the source of one of your notification cards. For network-activity cards this removes the card, same as delete. Self-action, safe to repeat, cannot be undone.",
212
+ risk: "write",
213
+ rules: {
214
+ changes: "Tells LinkedIn to show less from the source of one notification card.",
215
+ visible_to: "Only you.",
216
+ budget_rows: [],
217
+ retry: "Safe: repeating it changes nothing.",
218
+ undo: "Cannot be undone."
219
+ },
220
+ errors: { ...AS_ACCOUNT, ...TARGET },
194
221
  examples: [
195
222
  'curviate core notification show-less "urn:li:fsd_notificationCard:(urn:li:fsd_notification:9999,ALL)"'
196
223
  ]
@@ -0,0 +1,231 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ fail,
4
+ outputOpts,
5
+ rootClient,
6
+ usage
7
+ } from "./chunk-3Z6PXS6N.js";
8
+ import {
9
+ buildPreviewOutput
10
+ } from "./chunk-TCUYH5GO.js";
11
+ import {
12
+ intFlag
13
+ } from "./chunk-NNV2OYEF.js";
14
+ import {
15
+ pageDelayFromFlags,
16
+ readCursorFlag,
17
+ readMaxPagesFlag,
18
+ readableObject,
19
+ readablePage,
20
+ rejectPaginationModifiersWithoutAll,
21
+ streamAll
22
+ } from "./chunk-LRMPS4UQ.js";
23
+ import {
24
+ renderSuccess,
25
+ writeNdjsonItem
26
+ } from "./chunk-QM57YDJE.js";
27
+ import "./chunk-LULN3II2.js";
28
+ import {
29
+ GLOBAL_FLAGS,
30
+ READ_SINGLE_FLAGS,
31
+ WRITE_SINGLE_FLAGS,
32
+ readOnly
33
+ } from "./chunk-RYWWSZUH.js";
34
+ import {
35
+ DESCRIPTIONS
36
+ } from "./chunk-73DJ3KNE.js";
37
+ import "./chunk-ZYURL5VK.js";
38
+
39
+ // src/commands/notifications.ts
40
+ import { defineCommand } from "citty";
41
+ var online = (fn) => async ({ args }) => {
42
+ const f = args;
43
+ await fn(await rootClient(f), f);
44
+ };
45
+ function preview(method, args, body) {
46
+ process.stdout.write(JSON.stringify(buildPreviewOutput({ method, args, body })) + "\n");
47
+ }
48
+ function ids(f) {
49
+ const all = (f._ && f._.length > 0 ? f._ : f.id !== void 0 ? [f.id] : []).map(String);
50
+ if (all.length === 0 || all.some((v) => v.trim() === "")) usage("pass one or more notification ids (from `curviate notification list`).");
51
+ return all;
52
+ }
53
+ async function runList(c, f) {
54
+ rejectPaginationModifiersWithoutAll(f, process);
55
+ if (f.unread === true && f.archived === true) usage("--unread and --archived cannot be combined: an item is archived or unread, not both. Pass one.");
56
+ const params = { filter: f.unread === true ? "unread" : f.archived === true ? "archived" : "all" };
57
+ if (f.limit !== void 0) params["limit"] = intFlag("limit", f.limit, 1, 100);
58
+ const cursor = readCursorFlag(f, process);
59
+ if (cursor) params["cursor"] = cursor;
60
+ const keep = (item) => f.unread !== false || item.read === true;
61
+ const opts = outputOpts(f);
62
+ try {
63
+ if (f.all) {
64
+ const page = (p) => c.notifications.list(p);
65
+ for await (const item of streamAll(page, params, { maxPages: readMaxPagesFlag(f, process), out: process, pageDelayMs: pageDelayFromFlags(f) })) {
66
+ if (keep(item)) writeNdjsonItem(process, item, f.fields);
67
+ }
68
+ return;
69
+ }
70
+ const result = readablePage(await c.notifications.list(params));
71
+ renderSuccess({ ...result, items: result.items.filter(keep) }, opts, process);
72
+ } catch (err) {
73
+ await fail(err, f);
74
+ }
75
+ }
76
+ async function runCount(c, f) {
77
+ try {
78
+ renderSuccess(readableObject(await c.notifications.unreadCount()), outputOpts(f), process);
79
+ } catch (err) {
80
+ await fail(err, f);
81
+ }
82
+ }
83
+ var update = (body) => async (c, f) => {
84
+ const all = ids(f);
85
+ if (f.preview) return preview("notifications.update", { ids: all }, body);
86
+ const { CurviateError } = await import("@curviate/sdk");
87
+ const updated = [];
88
+ const notFound = [];
89
+ let notFoundError;
90
+ for (const id of all) {
91
+ try {
92
+ updated.push(readableObject(await c.notifications.update(id, body)));
93
+ } catch (err) {
94
+ if (err instanceof CurviateError && err.code === "RESOURCE_NOT_FOUND") {
95
+ notFound.push(id);
96
+ notFoundError ?? (notFoundError = err);
97
+ } else {
98
+ return fail(err, f);
99
+ }
100
+ }
101
+ }
102
+ renderSuccess({ updated, not_found: notFound }, outputOpts(f), process);
103
+ if (notFoundError) {
104
+ process.stderr.write(`error: ${notFound.length} of ${all.length} notifications were not found (not yours, or already gone): ${notFound.join(", ")}. The others were applied.
105
+ `);
106
+ const { getExitCode } = await import("./exit-codes-7DBETBDT.js");
107
+ process.exit(getExitCode(notFoundError));
108
+ }
109
+ };
110
+ var ISO_WITH_OFFSET = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}(\.\d+)?)?(Z|[+-]\d{2}:\d{2})$/;
111
+ async function runReadAll(c, f) {
112
+ if (f.to !== void 0 && !ISO_WITH_OFFSET.test(f.to)) usage("--to takes an ISO 8601 instant with an offset, e.g. 2026-10-08T10:00:00Z.");
113
+ const body = f.to === void 0 ? {} : { before: f.to };
114
+ if (f.preview) return preview("notifications.markAllRead", {}, body);
115
+ try {
116
+ renderSuccess(readableObject(await c.notifications.markAllRead(body)), outputOpts(f), process);
117
+ } catch (err) {
118
+ await fail(err, f);
119
+ }
120
+ }
121
+ var ID = { type: "positional", variadic: true, description: "Notification id (ntf_...), from `curviate notification list`. Several may follow." };
122
+ var IDS_OUTPUT = ["`updated` (the notifications as they now stand) and `not_found` (ids that are not yours). Exit 4 when any was not found; the others were still applied."];
123
+ var SEE = ["curviate notification list", "curviate core notification"];
124
+ var listCmd = defineCommand({
125
+ meta: {
126
+ name: "list",
127
+ description: "List your Curviate Notifications, newest first, with the unread count. Curviate's own, per Team; LinkedIn's notification cards are `curviate core notification list`. --unread lists unread ones, --archived archived ones, neither all (archived kept apart); --no-unread keeps only read ones. Kept for a limited time.",
128
+ risk: "read",
129
+ output: ["`items`, a `cursor` for the next page, and `unread_count`, the Team-wide unread badge, not a count of the items shown."],
130
+ examples: ["curviate notification list", "curviate notification list --unread", "curviate notification list --archived --limit 50"]
131
+ },
132
+ args: {
133
+ ...readOnly(GLOBAL_FLAGS),
134
+ unread: { type: "boolean", description: "Only unread notifications (--no-unread: only read ones). Not with --archived." },
135
+ archived: { type: "boolean", description: "Only archived notifications (--no-archived: not archived, which is also the default)." }
136
+ },
137
+ run: online(runList)
138
+ });
139
+ var countCmd = defineCommand({
140
+ meta: {
141
+ name: "count",
142
+ description: "Your unread Curviate Notifications: the number only. Check it at the start of a session.",
143
+ risk: "read",
144
+ examples: ["curviate notification count"]
145
+ },
146
+ args: { ...readOnly(READ_SINGLE_FLAGS) },
147
+ run: online(runCount)
148
+ });
149
+ var markRules = (changes, undo) => ({
150
+ changes,
151
+ visible_to: "Only you; no one else's notifications change.",
152
+ budget_rows: [],
153
+ retry: "Safe: setting a flag that is already set changes nothing.",
154
+ undo
155
+ });
156
+ var readCmd = defineCommand({
157
+ meta: {
158
+ name: "read",
159
+ description: "Mark one or more of your notifications read. Each id is its own request; one that is not yours is reported and the rest still apply.",
160
+ risk: "write",
161
+ rules: markRules("The notifications are marked read.", "Cannot be undone: a notification cannot be marked unread."),
162
+ errors: { RESOURCE_NOT_FOUND: "an id is not one of your notifications (reported, exit 4, the others still apply)." },
163
+ output: IDS_OUTPUT,
164
+ examples: ["curviate notification read ntf_YOUR_NOTIFICATION_ID", "curviate notification read ntf_A ntf_B"]
165
+ },
166
+ args: { ...WRITE_SINGLE_FLAGS, id: ID },
167
+ run: online(update({ read: true }))
168
+ });
169
+ var archiveCmd = defineCommand({
170
+ meta: {
171
+ name: "archive",
172
+ description: "Archive one or more of your notifications: marked read and moved out of `curviate notification list` into `curviate notification list --archived`. A notification that is not yours is reported and the rest still apply.",
173
+ risk: "write",
174
+ rules: markRules("The notifications are archived (and marked read).", "`curviate notification unarchive <id>`; the read mark stays."),
175
+ errors: { RESOURCE_NOT_FOUND: "an id is not one of your notifications (reported, exit 4, the others still apply)." },
176
+ output: IDS_OUTPUT,
177
+ seeAlso: ["curviate notification unarchive"],
178
+ examples: ["curviate notification archive ntf_YOUR_NOTIFICATION_ID", "curviate notification archive ntf_A ntf_B"]
179
+ },
180
+ args: { ...WRITE_SINGLE_FLAGS, id: ID },
181
+ run: online(update({ archived: true }))
182
+ });
183
+ var unarchiveCmd = defineCommand({
184
+ meta: {
185
+ name: "unarchive",
186
+ description: "Move one or more archived notifications back into your list; they stay read.",
187
+ risk: "write",
188
+ rules: markRules("The notifications are unarchived.", "`curviate notification archive <id>`."),
189
+ errors: { RESOURCE_NOT_FOUND: "an id is not one of your notifications (reported, exit 4, the others still apply)." },
190
+ output: IDS_OUTPUT,
191
+ seeAlso: ["curviate notification archive"],
192
+ examples: ["curviate notification unarchive ntf_YOUR_NOTIFICATION_ID"]
193
+ },
194
+ args: { ...WRITE_SINGLE_FLAGS, id: ID },
195
+ run: online(update({ archived: false }))
196
+ });
197
+ var readAllCmd = defineCommand({
198
+ meta: {
199
+ name: "read-all",
200
+ description: "Mark all your unread notifications read, up to a moment: --to, an ISO 8601 instant with an offset (default: now). One that arrives after it stays unread; a future --to acts as now.",
201
+ risk: "high",
202
+ rules: {
203
+ changes: "Every unread notification of yours created at or before the instant is marked read.",
204
+ visible_to: "Only you.",
205
+ budget_rows: [],
206
+ retry: "Safe: a second call marks only what arrived since.",
207
+ undo: "Cannot be undone: a notification cannot be marked unread.",
208
+ blast_radius: "All of your unread notifications in this Team up to the instant: `marked` in the answer says how many."
209
+ },
210
+ errors: { INVALID_REQUEST: "--to is not an ISO 8601 instant with an offset." },
211
+ output: ["`before` (the instant used, UTC), `marked`, and the `unread_count` that remains."],
212
+ seeAlso: SEE,
213
+ examples: ["curviate notification read-all", "curviate notification read-all --to 2026-10-08T10:00:00Z"]
214
+ },
215
+ args: {
216
+ ...WRITE_SINGLE_FLAGS,
217
+ to: { type: "string", description: "Mark read what was created up to this instant (ISO 8601 with offset). Default: now." }
218
+ },
219
+ run: online(runReadAll)
220
+ });
221
+ var notificationsCommand = defineCommand({
222
+ meta: { name: "notification", description: DESCRIPTIONS.notification },
223
+ subCommands: { list: listCmd, count: countCmd, read: readCmd, "read-all": readAllCmd, archive: archiveCmd, unarchive: unarchiveCmd },
224
+ async run() {
225
+ const { showHelp } = await import("./examples-JJB4DZKK.js");
226
+ await showHelp(notificationsCommand, ["curviate", "notification"]);
227
+ }
228
+ });
229
+ export {
230
+ notificationsCommand
231
+ };
@@ -1,16 +1,21 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  resolveMemberOrMeProviderId
4
- } from "./chunk-JYKYD57J.js";
4
+ } from "./chunk-CKVCBGQX.js";
5
5
  import {
6
6
  AttachError,
7
7
  readAttachment,
8
8
  toAttachmentPayload
9
9
  } from "./chunk-5I6JJJIV.js";
10
+ import {
11
+ AS_ACCOUNT,
12
+ BUDGET,
13
+ TARGET
14
+ } from "./chunk-Q3ZPRFUX.js";
10
15
  import "./chunk-UEAX6KUB.js";
11
16
  import {
12
17
  requireAccount
13
- } from "./chunk-V7FJWTZW.js";
18
+ } from "./chunk-6LBOGIVE.js";
14
19
  import {
15
20
  buildPreviewOutput
16
21
  } from "./chunk-TCUYH5GO.js";
@@ -21,30 +26,32 @@ import {
21
26
  readableObject,
22
27
  readablePage,
23
28
  rejectPaginationModifiersWithoutAll,
29
+ streamAll
30
+ } from "./chunk-LRMPS4UQ.js";
31
+ import {
24
32
  renderError,
25
33
  renderSuccess,
26
34
  renderUnexpectedError,
27
- resolveEffectiveConfig,
28
- streamAll,
29
35
  writeNdjsonItem
30
- } from "./chunk-SA2QHAXG.js";
31
- import "./chunk-RXWODUWA.js";
36
+ } from "./chunk-QM57YDJE.js";
32
37
  import {
33
- createClient
34
- } from "./chunk-5ZGTU4VD.js";
38
+ createClient,
39
+ resolveEffectiveConfig
40
+ } from "./chunk-LULN3II2.js";
35
41
  import {
36
42
  GLOBAL_FLAGS,
37
43
  READ_SINGLE_FLAGS,
38
44
  WRITE_FLAGS,
39
45
  WRITE_SINGLE_FLAGS,
40
46
  readOnly
41
- } from "./chunk-Y7MZZRYR.js";
47
+ } from "./chunk-RYWWSZUH.js";
42
48
  import {
43
49
  DESCRIPTIONS
44
- } from "./chunk-D2S5OCYU.js";
50
+ } from "./chunk-73DJ3KNE.js";
45
51
  import {
46
52
  resolveTextOrStdin
47
53
  } from "./chunk-ZYURL5VK.js";
54
+ import "./chunk-2W4RN5ON.js";
48
55
 
49
56
  // src/commands/post.ts
50
57
  import { defineCommand } from "citty";
@@ -82,7 +89,7 @@ function normalizeAttachPaths(attach) {
82
89
  async function handleSdkError(err, outOpts, out) {
83
90
  const { CurviateError } = await import("@curviate/sdk");
84
91
  if (err instanceof CurviateError) {
85
- const { getExitCode } = await import("./exit-codes-TLMKTLRI.js");
92
+ const { getExitCode } = await import("./exit-codes-7DBETBDT.js");
86
93
  renderError(err, outOpts, out);
87
94
  process.exit(getExitCode(err));
88
95
  }
@@ -392,6 +399,10 @@ var postGetCommand = defineCommand({
392
399
  meta: {
393
400
  name: "get",
394
401
  description: "Get a post by id.",
402
+ risk: "read",
403
+ rules: {
404
+ budget_rows: ["content_poll", "profile_views"]
405
+ },
395
406
  examples: [
396
407
  "curviate core post get 7290000000000000000",
397
408
  "curviate core post get urn:li:activity:7290000000000000000"
@@ -426,6 +437,15 @@ var postCreateCommand = defineCommand({
426
437
  meta: {
427
438
  name: "create",
428
439
  description: "Create a new post.",
440
+ risk: "write",
441
+ rules: {
442
+ changes: "Publishes a post from your Account.",
443
+ visible_to: "Everyone who can see your posts on LinkedIn.",
444
+ budget_rows: ["posts"],
445
+ retry: "Not safe: requests carry no idempotency key, so a retry after a timeout can repeat it. Read `curviate core post user-posts me` first.",
446
+ undo: "`curviate core post delete <post_id>`."
447
+ },
448
+ errors: { ...AS_ACCOUNT, ...BUDGET },
429
449
  examples: [
430
450
  'curviate core post create "We just shipped webhooks for inbox events."',
431
451
  'curviate core post create "Our latest product update." --attach screenshot.png'
@@ -462,6 +482,15 @@ var postReactCommand = defineCommand({
462
482
  meta: {
463
483
  name: "react",
464
484
  description: "React to a post.",
485
+ risk: "write",
486
+ rules: {
487
+ changes: "Adds your reaction to the post.",
488
+ visible_to: "The post's author and anyone who can see its reactions.",
489
+ budget_rows: ["post_likes"],
490
+ retry: "Reacting again replaces your reaction; it never adds a second.",
491
+ undo: "`curviate core post unreact <post_id>`."
492
+ },
493
+ errors: { ...AS_ACCOUNT, ...BUDGET, ...TARGET },
465
494
  examples: [
466
495
  "curviate core post react 7290000000000000000 like",
467
496
  "curviate core post react 7290000000000000000 celebrate --as-organization 1234567"
@@ -511,6 +540,10 @@ var postReactionsCommand = defineCommand({
511
540
  meta: {
512
541
  name: "reactions",
513
542
  description: "List reactions on a post.",
543
+ risk: "read",
544
+ rules: {
545
+ budget_rows: ["content_poll", "profile_views"]
546
+ },
514
547
  examples: [
515
548
  "curviate core post reactions 7290000000000000000",
516
549
  "curviate core post reactions 7290000000000000000 --all"
@@ -561,6 +594,17 @@ var postDeleteCommand = defineCommand({
561
594
  meta: {
562
595
  name: "delete",
563
596
  description: "Delete a post you own.",
597
+ risk: "high",
598
+ rules: {
599
+ changes: "Deletes one of your posts.",
600
+ visible_to: "Everyone: the post disappears from LinkedIn.",
601
+ budget_rows: [],
602
+ retry: "Safe: a deleted post is gone, so a repeat has nothing to delete.",
603
+ undo: "Cannot be undone.",
604
+ blast_radius: "One post, with its comments and reactions."
605
+ },
606
+ errors: { ...AS_ACCOUNT, ...TARGET },
607
+ seeAlso: ["curviate core post user-posts"],
564
608
  examples: [
565
609
  "curviate core post delete 7290000000000000000"
566
610
  ]
@@ -577,6 +621,15 @@ var postUnreactCommand = defineCommand({
577
621
  meta: {
578
622
  name: "unreact",
579
623
  description: "Remove your reaction from a post.",
624
+ risk: "write",
625
+ rules: {
626
+ changes: "Removes your reaction from the post.",
627
+ visible_to: "The post's author and anyone who can see its reactions.",
628
+ budget_rows: [],
629
+ retry: "A second call answers REACTION_NOT_FOUND and changes nothing.",
630
+ undo: "`curviate core post react <post_id>`."
631
+ },
632
+ errors: { ...AS_ACCOUNT, ...TARGET, REACTION_NOT_FOUND: "you have no reaction on the post." },
580
633
  examples: [
581
634
  "curviate core post unreact 7290000000000000000 like"
582
635
  ]
@@ -593,7 +646,8 @@ var postUnreactCommand = defineCommand({
593
646
  var postSavedCommand = defineCommand({
594
647
  meta: {
595
648
  name: "saved",
596
- description: "List your own saved posts (a private bookmark list, newest-saved-first). Each item is a preview (snippet capped at 140 chars).",
649
+ description: "List your own saved posts (a private bookmark list, newest-saved-first). Each item is a preview, not the full post body.",
650
+ risk: "read",
597
651
  examples: [
598
652
  "curviate core post saved"
599
653
  ]
@@ -607,6 +661,15 @@ var postSaveCommand = defineCommand({
607
661
  meta: {
608
662
  name: "save",
609
663
  description: "Save a post to your private bookmark list. Never notifies the author, never visible to third parties. Saving a saved post changes nothing.",
664
+ risk: "write",
665
+ rules: {
666
+ changes: "Adds the post to your private saved list.",
667
+ visible_to: "Only you.",
668
+ budget_rows: [],
669
+ retry: "Safe: saving a saved post changes nothing.",
670
+ undo: "`curviate core post unsave <post_id>`."
671
+ },
672
+ errors: { ...AS_ACCOUNT, ...TARGET },
610
673
  examples: [
611
674
  "curviate core post save 7290000000000000000"
612
675
  ]
@@ -623,6 +686,15 @@ var postUnsaveCommand = defineCommand({
623
686
  meta: {
624
687
  name: "unsave",
625
688
  description: "Remove a post from your saved-posts bookmark list. Unsaving a post that is not saved changes nothing.",
689
+ risk: "write",
690
+ rules: {
691
+ changes: "Removes the post from your private saved list.",
692
+ visible_to: "Only you.",
693
+ budget_rows: [],
694
+ retry: "Safe: unsaving a post that is not saved changes nothing.",
695
+ undo: "`curviate core post save <post_id>`."
696
+ },
697
+ errors: { ...AS_ACCOUNT, ...TARGET },
626
698
  examples: [
627
699
  "curviate core post unsave 7290000000000000000"
628
700
  ]
@@ -639,6 +711,10 @@ var postUserPostsCommand = defineCommand({
639
711
  meta: {
640
712
  name: "user-posts",
641
713
  description: "List a member's own posts (accepts 'me'). A very recent create/delete may take a few minutes to appear or clear here (LinkedIn-side indexing); `curviate core post get <post_id>` reflects it immediately.",
714
+ risk: "read",
715
+ rules: {
716
+ budget_rows: ["content_poll", "profile_views"]
717
+ },
642
718
  examples: [
643
719
  "curviate core post user-posts me",
644
720
  "curviate core post user-posts janesmith --limit 10"
@@ -656,6 +732,10 @@ var postUserReactionsCommand = defineCommand({
656
732
  meta: {
657
733
  name: "user-reactions",
658
734
  description: "List a member's own reactions (accepts 'me'). Items carry no time of the reaction: `parent_post.created_at` is when the post was created, not when it was reacted to, so the listing cannot be filtered by date; without `--all`, `--limit` caps the read at one page.",
735
+ risk: "read",
736
+ rules: {
737
+ budget_rows: ["content_poll", "profile_views"]
738
+ },
659
739
  examples: [
660
740
  "curviate core post user-reactions me",
661
741
  "curviate core post user-reactions me --all"