@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
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-UEAX6KUB.js";
5
5
  import {
6
6
  requireAccount
7
- } from "./chunk-V7FJWTZW.js";
7
+ } from "./chunk-6LBOGIVE.js";
8
8
  import {
9
9
  pageDelayFromFlags,
10
10
  readCursorFlag,
@@ -12,26 +12,28 @@ import {
12
12
  readableObject,
13
13
  readablePage,
14
14
  rejectPaginationModifiersWithoutAll,
15
+ streamAll
16
+ } from "./chunk-LRMPS4UQ.js";
17
+ import {
15
18
  renderError,
16
19
  renderSuccess,
17
20
  renderUnexpectedError,
18
- resolveEffectiveConfig,
19
- streamAll,
20
21
  writeNdjsonItem
21
- } from "./chunk-SA2QHAXG.js";
22
- import "./chunk-RXWODUWA.js";
22
+ } from "./chunk-QM57YDJE.js";
23
23
  import {
24
- createClient
25
- } from "./chunk-5ZGTU4VD.js";
24
+ createClient,
25
+ resolveEffectiveConfig
26
+ } from "./chunk-LULN3II2.js";
26
27
  import {
27
28
  GLOBAL_FLAGS,
28
29
  READ_SINGLE_FLAGS,
29
30
  readOnly
30
- } from "./chunk-Y7MZZRYR.js";
31
+ } from "./chunk-RYWWSZUH.js";
31
32
  import {
32
33
  DESCRIPTIONS
33
- } from "./chunk-D2S5OCYU.js";
34
+ } from "./chunk-73DJ3KNE.js";
34
35
  import "./chunk-ZYURL5VK.js";
36
+ import "./chunk-2W4RN5ON.js";
35
37
 
36
38
  // src/commands/group.ts
37
39
  import { defineCommand } from "citty";
@@ -58,7 +60,7 @@ function resolveOutputOpts(flags) {
58
60
  async function handleSdkError(err, outOpts, out) {
59
61
  const { CurviateError } = await import("@curviate/sdk");
60
62
  if (err instanceof CurviateError) {
61
- const { getExitCode } = await import("./exit-codes-TLMKTLRI.js");
63
+ const { getExitCode } = await import("./exit-codes-7DBETBDT.js");
62
64
  renderError(err, outOpts, out);
63
65
  process.exit(getExitCode(err));
64
66
  }
@@ -146,6 +148,7 @@ var groupListCommand = defineCommand({
146
148
  meta: {
147
149
  name: "list",
148
150
  description: "List the groups the connected account belongs to. Pass --target to enumerate another member's groups instead (a partial, interests-only read).",
151
+ risk: "read",
149
152
  examples: [
150
153
  "curviate core group list",
151
154
  "curviate core group list --target janesmith"
@@ -180,6 +183,7 @@ var groupGetCommand = defineCommand({
180
183
  meta: {
181
184
  name: "get",
182
185
  description: "Get one LinkedIn group's full detail: name, member count, description, admin contact, and write-feasibility gates.",
186
+ risk: "read",
183
187
  examples: [
184
188
  "curviate core group get 12345678"
185
189
  ]
@@ -210,6 +214,10 @@ var groupMembersCommand = defineCommand({
210
214
  meta: {
211
215
  name: "members",
212
216
  description: "List (or search by name) a group's members: id, profile URL, name, headline, and relationship signal. Requires the connected account be a member of the group.",
217
+ risk: "read",
218
+ rules: {
219
+ budget_rows: ["search"]
220
+ },
213
221
  examples: [
214
222
  "curviate core group members 12345678",
215
223
  "curviate core group members 12345678 --name sophie"
@@ -2,13 +2,17 @@
2
2
  import {
3
3
  RETRIEVAL_FLAGS,
4
4
  parseRetrievalFlags
5
- } from "./chunk-PQWDDSV7.js";
5
+ } from "./chunk-L7JH3W56.js";
6
+ import {
7
+ AS_ACCOUNT,
8
+ TARGET
9
+ } from "./chunk-Q3ZPRFUX.js";
6
10
  import {
7
11
  normalizeChatId
8
12
  } from "./chunk-UEAX6KUB.js";
9
13
  import {
10
14
  requireAccount
11
- } from "./chunk-V7FJWTZW.js";
15
+ } from "./chunk-6LBOGIVE.js";
12
16
  import {
13
17
  buildPreviewOutput
14
18
  } from "./chunk-TCUYH5GO.js";
@@ -19,27 +23,29 @@ import {
19
23
  readableObject,
20
24
  readablePage,
21
25
  rejectPaginationModifiersWithoutAll,
26
+ streamAll
27
+ } from "./chunk-LRMPS4UQ.js";
28
+ import {
22
29
  renderError,
23
30
  renderSuccess,
24
31
  renderUnexpectedError,
25
- resolveEffectiveConfig,
26
- streamAll,
27
32
  writeNdjsonItem
28
- } from "./chunk-SA2QHAXG.js";
29
- import "./chunk-RXWODUWA.js";
33
+ } from "./chunk-QM57YDJE.js";
30
34
  import {
31
- createClient
32
- } from "./chunk-5ZGTU4VD.js";
35
+ createClient,
36
+ resolveEffectiveConfig
37
+ } from "./chunk-LULN3II2.js";
33
38
  import {
34
39
  GLOBAL_FLAGS,
35
40
  READ_SINGLE_FLAGS,
36
41
  WRITE_SINGLE_FLAGS,
37
42
  readOnly
38
- } from "./chunk-Y7MZZRYR.js";
43
+ } from "./chunk-RYWWSZUH.js";
39
44
  import {
40
45
  DESCRIPTIONS
41
- } from "./chunk-D2S5OCYU.js";
46
+ } from "./chunk-73DJ3KNE.js";
42
47
  import "./chunk-ZYURL5VK.js";
48
+ import "./chunk-2W4RN5ON.js";
43
49
 
44
50
  // src/commands/inbox.ts
45
51
  import { defineCommand } from "citty";
@@ -101,7 +107,7 @@ function validateInboxFolder(raw, out) {
101
107
  async function handleSdkError(err, outOpts, out) {
102
108
  const { CurviateError } = await import("@curviate/sdk");
103
109
  if (err instanceof CurviateError) {
104
- const { getExitCode } = await import("./exit-codes-TLMKTLRI.js");
110
+ const { getExitCode } = await import("./exit-codes-7DBETBDT.js");
105
111
  renderError(err, outOpts, out);
106
112
  process.exit(getExitCode(err));
107
113
  }
@@ -278,6 +284,7 @@ var inboxListCommand = defineCommand({
278
284
  meta: {
279
285
  name: "list",
280
286
  description: "List inbox chats.",
287
+ risk: "read",
281
288
  examples: [
282
289
  "curviate core inbox list",
283
290
  "curviate core inbox list --unread",
@@ -319,6 +326,7 @@ var inboxGetCommand = defineCommand({
319
326
  meta: {
320
327
  name: "get",
321
328
  description: "Get details of a single chat.",
329
+ risk: "read",
322
330
  examples: [
323
331
  "curviate core inbox get 2-YTQ3ODU3Njgt"
324
332
  ]
@@ -351,6 +359,15 @@ var inboxMarkReadCommand = defineCommand({
351
359
  meta: {
352
360
  name: "mark-read",
353
361
  description: "Mark a chat as read.",
362
+ risk: "write",
363
+ rules: {
364
+ changes: "Marks the chat read on LinkedIn.",
365
+ visible_to: "The other participants, as a read receipt where LinkedIn shows it.",
366
+ budget_rows: [],
367
+ retry: "Safe: marking a read chat read changes nothing.",
368
+ undo: "Cannot be undone from the CLI: mark it unread on LinkedIn."
369
+ },
370
+ errors: { ...AS_ACCOUNT, ...TARGET },
354
371
  examples: [
355
372
  "curviate core inbox mark-read 2-YTQ3ODU3Njgt"
356
373
  ]
@@ -381,7 +398,8 @@ var inboxMarkReadCommand = defineCommand({
381
398
  var inboxMessagesCommand = defineCommand({
382
399
  meta: {
383
400
  name: "messages",
384
- description: "List messages in a chat. A very recent send/delete may take a few minutes to appear or clear here (LinkedIn-side indexing); `curviate core message get <chat_id> <message_id>` reflects it immediately. `--mode cache_only` is answered only for an unfiltered, uncursored first page of a chat whose whole message set fits in that one page (`--limit`, at most 25), and only after a walk of the chat reached its end: any unfiltered page fetched from LinkedIn (such as `--mode live` without `--all`) restarts that walk, and `--all` walks to the end and closes it. A read carrying `--before`, `--after` or `--cursor` is never served from the store.",
401
+ description: "List messages in a chat. A very recent send/delete may take a few minutes to appear or clear here (LinkedIn-side indexing); `curviate core message get <chat_id> <message_id>` reflects it immediately. `--mode cache_only` is answered only for an unfiltered, uncursored first page of a chat whose whole message set fits in that one page (`--limit`, at most 25 messages), and only after a walk of the chat reached its end: any unfiltered page fetched from LinkedIn (such as `--mode live` without `--all`) restarts that walk, and `--all` walks to the end and closes it. A read carrying `--before`, `--after` or `--cursor` is never served from the store.",
402
+ risk: "read",
385
403
  examples: [
386
404
  "curviate core inbox messages 2-YTQ3ODU3Njgt",
387
405
  "curviate core inbox messages 2-YTQ3ODU3Njgt --limit 20",
@@ -424,6 +442,7 @@ var inboxSearchCommand = defineCommand({
424
442
  meta: {
425
443
  name: "search",
426
444
  description: "Free-text search the account's own inbox (matches participant names and message content).",
445
+ risk: "read",
427
446
  examples: [
428
447
  "curviate core inbox search sophie"
429
448
  ]
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  requireAccount
4
- } from "./chunk-V7FJWTZW.js";
4
+ } from "./chunk-6LBOGIVE.js";
5
5
  import {
6
6
  pageDelayFromFlags,
7
7
  readCursorFlag,
@@ -9,26 +9,28 @@ import {
9
9
  readableObject,
10
10
  readablePage,
11
11
  rejectPaginationModifiersWithoutAll,
12
+ streamAll
13
+ } from "./chunk-LRMPS4UQ.js";
14
+ import {
12
15
  renderError,
13
16
  renderSuccess,
14
17
  renderUnexpectedError,
15
- resolveEffectiveConfig,
16
- streamAll,
17
18
  writeNdjsonItem
18
- } from "./chunk-SA2QHAXG.js";
19
- import "./chunk-RXWODUWA.js";
19
+ } from "./chunk-QM57YDJE.js";
20
20
  import {
21
- createClient
22
- } from "./chunk-5ZGTU4VD.js";
21
+ createClient,
22
+ resolveEffectiveConfig
23
+ } from "./chunk-LULN3II2.js";
23
24
  import {
24
25
  GLOBAL_FLAGS,
25
26
  READ_SINGLE_FLAGS,
26
27
  readOnly
27
- } from "./chunk-Y7MZZRYR.js";
28
+ } from "./chunk-RYWWSZUH.js";
28
29
  import {
29
30
  DESCRIPTIONS
30
- } from "./chunk-D2S5OCYU.js";
31
+ } from "./chunk-73DJ3KNE.js";
31
32
  import "./chunk-ZYURL5VK.js";
33
+ import "./chunk-2W4RN5ON.js";
32
34
 
33
35
  // src/commands/inboxes.ts
34
36
  import { defineCommand } from "citty";
@@ -55,7 +57,7 @@ function resolveOutputOpts(flags) {
55
57
  async function handleSdkError(err, outOpts, out) {
56
58
  const { CurviateError } = await import("@curviate/sdk");
57
59
  if (err instanceof CurviateError) {
58
- const { getExitCode } = await import("./exit-codes-TLMKTLRI.js");
60
+ const { getExitCode } = await import("./exit-codes-7DBETBDT.js");
59
61
  renderError(err, outOpts, out);
60
62
  process.exit(getExitCode(err));
61
63
  }
@@ -124,6 +126,7 @@ var inboxesListCommand = defineCommand({
124
126
  meta: {
125
127
  name: "list",
126
128
  description: "Discover the account's inboxes (personal + company pages).",
129
+ risk: "read",
127
130
  examples: [
128
131
  "curviate core inboxes list",
129
132
  "curviate core inboxes list --kind company"
@@ -164,6 +167,7 @@ var inboxesChatsCommand = defineCommand({
164
167
  meta: {
165
168
  name: "chats",
166
169
  description: "List an inbox's conversations. Each chat id is send-ready: reply with `curviate core message send <chat_id> \"<text>\"`. A company inbox's chat id (e.g. COMPANY_83734124_2-...) sends AS THE PAGE, no separate flag needed. Company inboxes are reply-only and cannot start a new conversation.",
170
+ risk: "read",
167
171
  examples: [
168
172
  "curviate core inboxes chats CLASSIC_PRIMARY",
169
173
  "curviate core inboxes chats COMPANY_1234567_PRIMARY --limit 10"
@@ -0,0 +1,218 @@
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
+ readablePage,
19
+ rejectPaginationModifiersWithoutAll,
20
+ streamAll
21
+ } from "./chunk-LRMPS4UQ.js";
22
+ import {
23
+ renderSuccess,
24
+ writeNdjsonItem
25
+ } from "./chunk-QM57YDJE.js";
26
+ import "./chunk-LULN3II2.js";
27
+ import {
28
+ GLOBAL_FLAGS,
29
+ READ_SINGLE_FLAGS,
30
+ WRITE_SINGLE_FLAGS,
31
+ readOnly
32
+ } from "./chunk-RYWWSZUH.js";
33
+ import {
34
+ DESCRIPTIONS
35
+ } from "./chunk-73DJ3KNE.js";
36
+ import "./chunk-ZYURL5VK.js";
37
+
38
+ // src/commands/incoming.ts
39
+ import { defineCommand } from "citty";
40
+ function body(f) {
41
+ const b = {};
42
+ const nul = (v) => v === "" ? null : v;
43
+ if (f["event-name"] !== void 0) b["event_name"] = nul(f["event-name"]);
44
+ if (f["event-name-field"] !== void 0) b["event_name_field"] = nul(f["event-name-field"]);
45
+ if (f.motion !== void 0) b["motion_id"] = nul(f.motion);
46
+ const match = {};
47
+ if (f["match-enrollment-id"] !== void 0) match["enrollment_id"] = nul(f["match-enrollment-id"]);
48
+ if (f["match-linkedin-url"] !== void 0) match["linkedin_url"] = nul(f["match-linkedin-url"]);
49
+ if (f["match-email"] !== void 0) match["email"] = nul(f["match-email"]);
50
+ if (Object.keys(match).length) b["match"] = match;
51
+ if (f["required-header"] !== void 0) {
52
+ const h = f["required-header"];
53
+ const i = h.indexOf(":");
54
+ b["required_header"] = h === "" ? null : i < 0 ? { name: h.trim() } : { name: h.slice(0, i).trim(), value: h.slice(i + 1).trim() };
55
+ }
56
+ if (f.enabled !== void 0) b["enabled"] = f.enabled;
57
+ return b;
58
+ }
59
+ var id = (f) => String(f.id ?? "");
60
+ var call = (method, fn, send = () => void 0) => async (c, f) => {
61
+ const b = send(f);
62
+ if (f.preview) return void process.stdout.write(JSON.stringify(buildPreviewOutput({ method, args: f.id === void 0 ? {} : { id: f.id }, body: b ?? {} })) + "\n");
63
+ try {
64
+ renderSuccess(await fn(c, f), outputOpts(f), process);
65
+ } catch (err) {
66
+ await fail(err, f);
67
+ }
68
+ };
69
+ async function runCreate(c, f) {
70
+ if (f["event-name"] === void 0 === (f["event-name-field"] === void 0)) usage("pass exactly one of --event-name or --event-name-field.");
71
+ await call("incomingEvents.create", (cl, fl) => cl.incomingEvents.create(body(fl)), body)(c, f);
72
+ }
73
+ async function runList(c, f) {
74
+ rejectPaginationModifiersWithoutAll(f, process);
75
+ const q = {};
76
+ if (f.event !== void 0) q["event"] = f.event;
77
+ if (f.limit !== void 0) q["limit"] = intFlag("limit", f.limit, 1, 100);
78
+ const cursor = readCursorFlag(f, process);
79
+ if (cursor) q["cursor"] = cursor;
80
+ try {
81
+ if (f.all) {
82
+ const page = (p) => c.incomingEvents.list(p);
83
+ for await (const item of streamAll(page, q, { maxPages: readMaxPagesFlag(f, process), out: process, pageDelayMs: pageDelayFromFlags(f) })) writeNdjsonItem(process, item, f.fields);
84
+ return;
85
+ }
86
+ renderSuccess(readablePage(await c.incomingEvents.list(q)), outputOpts(f), process);
87
+ } catch (err) {
88
+ await fail(err, f);
89
+ }
90
+ }
91
+ var online = (fn) => async ({ args }) => {
92
+ const f = args;
93
+ await fn(await rootClient(f), f);
94
+ };
95
+ var ID = { type: "positional", description: "Incoming event id (inc_...)." };
96
+ var EDITOR = { INSUFFICIENT_ROLE: "only its creator (or an Owner, when it has none) can change it." };
97
+ var FIELDS = {
98
+ "event-name": { type: "string", description: "The fixed event name every post carries (for example reply_received). Exactly one of this and --event-name-field on create." },
99
+ "event-name-field": { type: "string", description: "The path in the post the event name is read from (for example event_type)." },
100
+ motion: { type: "string", description: "Only this Motion's Enrollments move (mot_...); empty for any Motion's." },
101
+ "match-enrollment-id": { type: "string", description: "Path in the post to an Enrollment id (for example custom_variables.enrollment_id); empty removes it." },
102
+ "match-linkedin-url": { type: "string", description: "Path in the post to the person's LinkedIn URL; empty removes it." },
103
+ "match-email": { type: "string", description: "Path in the post to an email address the Contact already has (for example lead_email); empty removes it. Paths are tried in the order enrollment id, LinkedIn URL, email." },
104
+ "required-header": { type: "string", description: "NAME:VALUE every post must carry, else 401; NAME alone keeps the stored value; empty removes it." }
105
+ };
106
+ var createCmd = defineCommand({
107
+ meta: {
108
+ name: "create",
109
+ description: "Create an incoming event: a private URL, printed once, that any tool posts to. Treat the URL like a password. Needs Automate.",
110
+ risk: "write",
111
+ rules: {
112
+ changes: "Creates the URL; posts to it move the matching Enrollments waiting for the event.",
113
+ visible_to: "Your Team (the URL masked); whoever you give the URL to can post.",
114
+ budget_rows: [],
115
+ retry: "Each call creates another URL.",
116
+ undo: "`curviate incoming delete <id>`."
117
+ },
118
+ errors: { MOTION_NOT_FOUND: "no Motion with that id." },
119
+ examples: ["curviate incoming create --event-name reply_received --match-email lead_email"]
120
+ },
121
+ args: { ...WRITE_SINGLE_FLAGS, ...FIELDS },
122
+ run: online(runCreate)
123
+ });
124
+ var listCmd = defineCommand({
125
+ meta: {
126
+ name: "list",
127
+ description: "Your Team's incoming events, URLs masked, with the last arrival and the Motion steps waiting for each.",
128
+ risk: "read",
129
+ examples: ["curviate incoming list", "curviate incoming list --event reply_received"]
130
+ },
131
+ args: { ...readOnly(GLOBAL_FLAGS), event: { type: "string", description: "Only incoming events with this event name." } },
132
+ run: online(runList)
133
+ });
134
+ var getCmd = defineCommand({
135
+ meta: { name: "get", description: "One incoming event, URL masked: its match paths, captured sample shape, arrivals and where it is used.", risk: "read", examples: ["curviate incoming get inc_YOUR_INCOMING_ID"] },
136
+ args: { ...readOnly(READ_SINGLE_FLAGS), id: ID },
137
+ run: online(call("incomingEvents.get", (c, f) => c.incomingEvents.get(id(f))))
138
+ });
139
+ var updateCmd = defineCommand({
140
+ meta: {
141
+ name: "update",
142
+ description: "Change an incoming event's name, Motion, match paths, required header or turn it off; the URL stays.",
143
+ risk: "write",
144
+ rules: { changes: "Changes how later posts are read.", visible_to: "Your Team.", budget_rows: [], retry: "Safe to repeat: the same values again.", undo: "Update it back." },
145
+ errors: EDITOR,
146
+ examples: ["curviate incoming update inc_YOUR_INCOMING_ID --no-enabled"]
147
+ },
148
+ args: { ...WRITE_SINGLE_FLAGS, id: ID, ...FIELDS, enabled: { type: "boolean", description: "--enabled turns it on, --no-enabled off (posts answer 404)." } },
149
+ run: online(call("incomingEvents.update", (c, f) => c.incomingEvents.update(id(f), body(f)), body))
150
+ });
151
+ var deleteCmd = defineCommand({
152
+ meta: {
153
+ name: "delete",
154
+ description: "Delete an incoming event: its URL stops working at once, and Motion steps waiting for it wait until their timeout.",
155
+ risk: "high",
156
+ rules: {
157
+ changes: "Deletes the URL; later posts answer 404.",
158
+ visible_to: "The tools posting to it.",
159
+ budget_rows: [],
160
+ retry: "A second delete answers RESOURCE_NOT_FOUND.",
161
+ undo: "Cannot be undone; create a new one (a new URL).",
162
+ blast_radius: "One URL and every Enrollment that would have moved on it."
163
+ },
164
+ errors: EDITOR,
165
+ seeAlso: ["curviate incoming list"],
166
+ examples: ["curviate incoming delete inc_YOUR_INCOMING_ID"]
167
+ },
168
+ args: { ...WRITE_SINGLE_FLAGS, id: ID },
169
+ run: online(call("incomingEvents.delete", async (c, f) => await c.incomingEvents.delete(id(f)) ?? {}))
170
+ });
171
+ var rotateCmd = defineCommand({
172
+ meta: {
173
+ name: "rotate",
174
+ description: "Replace the URL's secret: the new URL is printed once and the old one stops working at once. Needs Automate.",
175
+ risk: "high",
176
+ rules: {
177
+ changes: "A new URL; posts to the old one answer 404.",
178
+ visible_to: "Every tool posting to the old URL, until you give it the new one.",
179
+ budget_rows: [],
180
+ retry: "Each call issues another URL.",
181
+ undo: "Cannot be undone.",
182
+ blast_radius: "One URL and every tool posting to it."
183
+ },
184
+ errors: EDITOR,
185
+ seeAlso: ["curviate incoming get"],
186
+ examples: ["curviate incoming rotate inc_YOUR_INCOMING_ID"]
187
+ },
188
+ args: { ...WRITE_SINGLE_FLAGS, id: ID },
189
+ run: online(call("incomingEvents.rotate", (c, f) => c.incomingEvents.rotate(id(f))))
190
+ });
191
+ var captureCmd = defineCommand({
192
+ meta: {
193
+ name: "capture",
194
+ description: "Capture the next post as the sample: its field paths (never its values' meaning) become the shape the match paths and Sequences are checked against. Needs Automate.",
195
+ risk: "write",
196
+ rules: { changes: "The next post's shape replaces the captured sample.", visible_to: "Your Team.", budget_rows: [], retry: "Safe to repeat: it waits for the next post.", undo: "Capture again." },
197
+ errors: EDITOR,
198
+ examples: ["curviate incoming capture inc_YOUR_INCOMING_ID"]
199
+ },
200
+ args: { ...WRITE_SINGLE_FLAGS, id: ID },
201
+ run: online(call("incomingEvents.capture", (c, f) => c.incomingEvents.capture(id(f))))
202
+ });
203
+ var arrivalsCmd = defineCommand({
204
+ meta: { name: "arrivals", description: "The latest posts to the URL: when, the event name, which Contact matched and how many Enrollments moved.", risk: "read", examples: ["curviate incoming arrivals inc_YOUR_INCOMING_ID"] },
205
+ args: { ...readOnly(READ_SINGLE_FLAGS), id: ID },
206
+ run: online(call("incomingEvents.arrivals", (c, f) => c.incomingEvents.arrivals(id(f))))
207
+ });
208
+ var incomingCommand = defineCommand({
209
+ meta: { name: "incoming", description: DESCRIPTIONS.incoming },
210
+ subCommands: { create: createCmd, list: listCmd, get: getCmd, update: updateCmd, delete: deleteCmd, rotate: rotateCmd, capture: captureCmd, arrivals: arrivalsCmd },
211
+ async run() {
212
+ const { showHelp } = await import("./examples-JJB4DZKK.js");
213
+ await showHelp(incomingCommand, ["curviate", "incoming"]);
214
+ }
215
+ });
216
+ export {
217
+ incomingCommand
218
+ };
@@ -3,15 +3,19 @@ import {
3
3
  BinaryOutputError,
4
4
  writeBinaryOutput
5
5
  } from "./chunk-UWO2D4HW.js";
6
+ import {
7
+ AS_ACCOUNT,
8
+ TARGET
9
+ } from "./chunk-Q3ZPRFUX.js";
6
10
  import {
7
11
  resolveJobIdentifier
8
12
  } from "./chunk-UEAX6KUB.js";
9
- import {
10
- requireAccount
11
- } from "./chunk-V7FJWTZW.js";
12
13
  import {
13
14
  slimJob
14
- } from "./chunk-LCGXJGPB.js";
15
+ } from "./chunk-GHMRPX5H.js";
16
+ import {
17
+ requireAccount
18
+ } from "./chunk-6LBOGIVE.js";
15
19
  import {
16
20
  buildPreviewOutput
17
21
  } from "./chunk-TCUYH5GO.js";
@@ -24,28 +28,30 @@ import {
24
28
  readableObject,
25
29
  readablePage,
26
30
  rejectPaginationModifiersWithoutAll,
31
+ streamAll
32
+ } from "./chunk-LRMPS4UQ.js";
33
+ import {
27
34
  renderError,
28
35
  renderSuccess,
29
36
  renderUnexpectedError,
30
- resolveEffectiveConfig,
31
- streamAll,
32
37
  writeNdjsonItem
33
- } from "./chunk-SA2QHAXG.js";
34
- import "./chunk-RXWODUWA.js";
38
+ } from "./chunk-QM57YDJE.js";
35
39
  import {
36
40
  createClient,
37
- downloadBinary
38
- } from "./chunk-5ZGTU4VD.js";
41
+ downloadBinary,
42
+ resolveEffectiveConfig
43
+ } from "./chunk-LULN3II2.js";
39
44
  import {
40
45
  GLOBAL_FLAGS,
41
46
  READ_SINGLE_FLAGS,
42
47
  WRITE_SINGLE_FLAGS,
43
48
  readOnly
44
- } from "./chunk-Y7MZZRYR.js";
49
+ } from "./chunk-RYWWSZUH.js";
45
50
  import {
46
51
  DESCRIPTIONS
47
- } from "./chunk-D2S5OCYU.js";
52
+ } from "./chunk-73DJ3KNE.js";
48
53
  import "./chunk-ZYURL5VK.js";
54
+ import "./chunk-2W4RN5ON.js";
49
55
 
50
56
  // src/commands/job.ts
51
57
  import { defineCommand } from "citty";
@@ -101,7 +107,7 @@ function requireEnum(value, allowed, flag, out) {
101
107
  async function handleSdkError(err, outOpts, out) {
102
108
  const { CurviateError } = await import("@curviate/sdk");
103
109
  if (err instanceof CurviateError) {
104
- const { getExitCode } = await import("./exit-codes-TLMKTLRI.js");
110
+ const { getExitCode } = await import("./exit-codes-7DBETBDT.js");
105
111
  renderError(err, outOpts, out);
106
112
  process.exit(getExitCode(err));
107
113
  }
@@ -494,6 +500,7 @@ var jobGetCommand = defineCommand({
494
500
  meta: {
495
501
  name: "get",
496
502
  description: "Retrieve one public LinkedIn job posting's full detail.",
503
+ risk: "read",
497
504
  examples: [
498
505
  "curviate core job get 4100000000",
499
506
  "curviate core job get https://www.linkedin.com/jobs/view/4100000000"
@@ -511,6 +518,7 @@ var jobListCommand = defineCommand({
511
518
  meta: {
512
519
  name: "list",
513
520
  description: "List your own classic job postings by state.",
521
+ risk: "read",
514
522
  examples: [
515
523
  "curviate core job list --state OPEN",
516
524
  "curviate core job list --state DRAFT --all"
@@ -531,6 +539,15 @@ var jobCreateCommand = defineCommand({
531
539
  meta: {
532
540
  name: "create",
533
541
  description: "Create a classic job-posting draft (never publishes, never spends).",
542
+ risk: "write",
543
+ rules: {
544
+ changes: "Creates a classic job-posting draft; nothing is published and nothing is spent.",
545
+ visible_to: "Only you, until you publish it.",
546
+ budget_rows: [],
547
+ retry: "Not safe: each call creates another draft.",
548
+ undo: "The CLI cannot delete a draft: remove it on LinkedIn."
549
+ },
550
+ errors: { ...AS_ACCOUNT },
534
551
  examples: [
535
552
  'curviate core job create --job-title "Staff Engineer" --company "Acme" --workplace-type REMOTE --location 106967730 --employment-status FULL_TIME --apply-method external --website-url https://acme.example/jobs/1 --description "$(cat description.txt)"'
536
553
  ],
@@ -559,6 +576,15 @@ var jobUpdateCommand = defineCommand({
559
576
  meta: {
560
577
  name: "update",
561
578
  description: "Apply a partial update to a job posting you own.",
579
+ risk: "write",
580
+ rules: {
581
+ changes: "Changes the fields you pass on a job posting you own.",
582
+ visible_to: "Only you while it is a draft; anyone who can see the posting once it is published.",
583
+ budget_rows: [],
584
+ retry: "Safe: the same values written again leave the posting the same.",
585
+ undo: "Run it again with the previous values."
586
+ },
587
+ errors: { ...AS_ACCOUNT, ...TARGET },
562
588
  examples: [
563
589
  "curviate core job update 4100000000 --workplace-type HYBRID",
564
590
  'curviate core job update 4100000000 --description "$(cat description.txt)"'
@@ -580,6 +606,7 @@ var jobBudgetCommand = defineCommand({
580
606
  meta: {
581
607
  name: "budget",
582
608
  description: "Price a publish before committing any money.",
609
+ risk: "read",
583
610
  examples: [
584
611
  "curviate core job budget 4100000000"
585
612
  ]
@@ -596,6 +623,17 @@ var jobPublishCommand = defineCommand({
596
623
  meta: {
597
624
  name: "publish",
598
625
  description: "Publish a draft. PROMOTED/PROMOTED_PLUS spend real money and require --budget-amount, --budget-currency, and --budget-scope.",
626
+ risk: "high",
627
+ rules: {
628
+ changes: "Publishes the draft on LinkedIn; PROMOTED and PROMOTED_PLUS also spend the budget you pass.",
629
+ visible_to: "Anyone on LinkedIn who can see job postings.",
630
+ budget_rows: [],
631
+ retry: "Not safe for a promoted posting: a repeat can spend again. Read `curviate core job budget <job_id>` and the posting first.",
632
+ undo: "`curviate core job close <job_id>` stops applications; money spent is not returned by the CLI.",
633
+ blast_radius: "One job posting; with PROMOTED or PROMOTED_PLUS, the --budget-amount in --budget-currency."
634
+ },
635
+ errors: { ...AS_ACCOUNT, ...TARGET },
636
+ seeAlso: ["curviate core job budget", "curviate core job close"],
599
637
  examples: [
600
638
  "curviate core job publish 4100000000 --mode FREE"
601
639
  ],
@@ -619,6 +657,17 @@ var jobCloseCommand = defineCommand({
619
657
  meta: {
620
658
  name: "close",
621
659
  description: "Stop a posting from accepting applications (irreversible once LISTED).",
660
+ risk: "high",
661
+ rules: {
662
+ changes: "Stops the posting from accepting applications.",
663
+ visible_to: "Anyone viewing the posting: it no longer takes applications.",
664
+ budget_rows: [],
665
+ retry: "Read `curviate core job get <job_id>` first: a closed posting has nothing left to close.",
666
+ undo: "Cannot be undone once the posting is listed.",
667
+ blast_radius: "One job posting."
668
+ },
669
+ errors: { ...AS_ACCOUNT, ...TARGET },
670
+ seeAlso: ["curviate core job get", "curviate core job applicants"],
622
671
  examples: [
623
672
  "curviate core job close 4100000000"
624
673
  ]
@@ -635,6 +684,7 @@ var jobApplicantsCommand = defineCommand({
635
684
  meta: {
636
685
  name: "applicants",
637
686
  description: "List applicants to a posting you own (POST-as-search).",
687
+ risk: "read",
638
688
  examples: [
639
689
  "curviate core job applicants 4100000000",
640
690
  "curviate core job applicants 4100000000 --ratings GOOD_FIT,MAYBE"
@@ -653,6 +703,7 @@ var jobApplicantGetCommand = defineCommand({
653
703
  meta: {
654
704
  name: "get",
655
705
  description: "Get one applicant's full detail, including contact info.",
706
+ risk: "read",
656
707
  examples: [
657
708
  "curviate core job applicant get 4100000000 APPLICANT_ID"
658
709
  ]
@@ -670,6 +721,7 @@ var jobApplicantResumeCommand = defineCommand({
670
721
  meta: {
671
722
  name: "resume",
672
723
  description: "Download an applicant's r\xE9sum\xE9 (binary).",
724
+ risk: "read",
673
725
  examples: [
674
726
  "curviate core job applicant resume 4100000000 APPLICANT_ID -o resume.pdf"
675
727
  ]