@itznexus/itznexus-cli 0.0.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/dist/commands/auth.d.ts +2 -0
- package/dist/commands/auth.js +119 -0
- package/dist/commands/auth.js.map +1 -0
- package/dist/commands/company.d.ts +2 -0
- package/dist/commands/company.js +193 -0
- package/dist/commands/company.js.map +1 -0
- package/dist/commands/contact.d.ts +2 -0
- package/dist/commands/contact.js +142 -0
- package/dist/commands/contact.js.map +1 -0
- package/dist/commands/conversation.d.ts +2 -0
- package/dist/commands/conversation.js +217 -0
- package/dist/commands/conversation.js.map +1 -0
- package/dist/commands/health.d.ts +2 -0
- package/dist/commands/health.js +27 -0
- package/dist/commands/health.js.map +1 -0
- package/dist/commands/interaction.d.ts +2 -0
- package/dist/commands/interaction.js +214 -0
- package/dist/commands/interaction.js.map +1 -0
- package/dist/commands/lead.d.ts +2 -0
- package/dist/commands/lead.js +299 -0
- package/dist/commands/lead.js.map +1 -0
- package/dist/commands/organization.d.ts +2 -0
- package/dist/commands/organization.js +211 -0
- package/dist/commands/organization.js.map +1 -0
- package/dist/commands/person.d.ts +2 -0
- package/dist/commands/person.js +268 -0
- package/dist/commands/person.js.map +1 -0
- package/dist/commands/pipeline.d.ts +2 -0
- package/dist/commands/pipeline.js +33 -0
- package/dist/commands/pipeline.js.map +1 -0
- package/dist/commands/project.d.ts +2 -0
- package/dist/commands/project.js +180 -0
- package/dist/commands/project.js.map +1 -0
- package/dist/commands/schema.d.ts +23 -0
- package/dist/commands/schema.js +48 -0
- package/dist/commands/schema.js.map +1 -0
- package/dist/commands/sprint.d.ts +2 -0
- package/dist/commands/sprint.js +190 -0
- package/dist/commands/sprint.js.map +1 -0
- package/dist/commands/task.d.ts +2 -0
- package/dist/commands/task.js +216 -0
- package/dist/commands/task.js.map +1 -0
- package/dist/commands/user.d.ts +2 -0
- package/dist/commands/user.js +58 -0
- package/dist/commands/user.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +40 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/api.d.ts +10 -0
- package/dist/lib/api.js +36 -0
- package/dist/lib/api.js.map +1 -0
- package/dist/lib/auto-update.d.ts +6 -0
- package/dist/lib/auto-update.js +96 -0
- package/dist/lib/auto-update.js.map +1 -0
- package/dist/lib/config.d.ts +7 -0
- package/dist/lib/config.js +28 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/format.d.ts +23 -0
- package/dist/lib/format.js +59 -0
- package/dist/lib/format.js.map +1 -0
- package/dist/skills/claude-code/itznexus-auth.md +61 -0
- package/dist/skills/claude-code/itznexus-company.md +143 -0
- package/dist/skills/claude-code/itznexus-contact.md +109 -0
- package/dist/skills/claude-code/itznexus-conversation.md +146 -0
- package/dist/skills/claude-code/itznexus-lead.md +146 -0
- package/dist/skills/claude-code/itznexus-project.md +115 -0
- package/dist/skills/claude-code/itznexus-sprint.md +126 -0
- package/dist/skills/claude-code/itznexus-task.md +159 -0
- package/dist/skills/claude-code/itznexus-user.md +66 -0
- package/dist/skills/openclaw-tools.json +1404 -0
- package/package.json +50 -0
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import chalk from "chalk";
|
|
3
|
+
import { api } from "../lib/api.js";
|
|
4
|
+
import { printList, printDetail, handleError } from "../lib/format.js";
|
|
5
|
+
// --- list ---
|
|
6
|
+
const listCommand = new Command("list")
|
|
7
|
+
.description("List all leads")
|
|
8
|
+
.option("--status <status>", "Filter by status")
|
|
9
|
+
.option("--source-channel <channel>", "Filter by source channel")
|
|
10
|
+
.option("--source-channel-id <id>", "Filter by source channel ID")
|
|
11
|
+
.option("--archived", "Show archived leads")
|
|
12
|
+
.option("--search <query>", "Search by title")
|
|
13
|
+
.option("--json", "Output as JSON")
|
|
14
|
+
.action(async (opts) => {
|
|
15
|
+
try {
|
|
16
|
+
const params = new URLSearchParams();
|
|
17
|
+
if (opts.status)
|
|
18
|
+
params.set("status", opts.status);
|
|
19
|
+
if (opts.sourceChannel)
|
|
20
|
+
params.set("sourceChannel", opts.sourceChannel);
|
|
21
|
+
if (opts.sourceChannelId)
|
|
22
|
+
params.set("sourceChannelId", opts.sourceChannelId);
|
|
23
|
+
if (opts.archived)
|
|
24
|
+
params.set("archived", "true");
|
|
25
|
+
if (opts.search)
|
|
26
|
+
params.set("search", opts.search);
|
|
27
|
+
const qs = params.toString();
|
|
28
|
+
const data = await api.get(`/leads${qs ? `?${qs}` : ""}`);
|
|
29
|
+
printList(data, [
|
|
30
|
+
{ key: "title", label: "Title", width: 35 },
|
|
31
|
+
{ key: "status", label: "Status", width: 18 },
|
|
32
|
+
{ key: "sourceChannel", label: "Source", width: 12 },
|
|
33
|
+
{ key: "personName", label: "Person", width: 20 },
|
|
34
|
+
{ key: "createdAt", label: "Created", width: 24 },
|
|
35
|
+
], opts);
|
|
36
|
+
}
|
|
37
|
+
catch (err) {
|
|
38
|
+
handleError(err);
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
// --- get ---
|
|
42
|
+
const getCommand = new Command("get")
|
|
43
|
+
.description("Get lead details")
|
|
44
|
+
.argument("<id>", "Lead ID")
|
|
45
|
+
.option("--json", "Output as JSON")
|
|
46
|
+
.action(async (id, opts) => {
|
|
47
|
+
try {
|
|
48
|
+
const data = await api.get(`/leads/${id}`);
|
|
49
|
+
if (opts.json) {
|
|
50
|
+
console.log(JSON.stringify(data, null, 2));
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
console.log(chalk.bold(data.title));
|
|
54
|
+
printDetail(data, [
|
|
55
|
+
{ key: "id", label: "ID" },
|
|
56
|
+
{ key: "status", label: "Status" },
|
|
57
|
+
{ key: "archived", label: "Archived" },
|
|
58
|
+
{ key: "sourceChannel", label: "Source Channel" },
|
|
59
|
+
{ key: "sourceChannelId", label: "Source Channel ID" },
|
|
60
|
+
{ key: "sourceOrigin", label: "Source Origin" },
|
|
61
|
+
{ key: "personName", label: "Person" },
|
|
62
|
+
{ key: "organizationName", label: "Organization" },
|
|
63
|
+
{ key: "notes", label: "Notes" },
|
|
64
|
+
{ key: "createdAt", label: "Created" },
|
|
65
|
+
{ key: "updatedAt", label: "Updated" },
|
|
66
|
+
], opts);
|
|
67
|
+
if (data.metadata) {
|
|
68
|
+
console.log(chalk.dim(`\n Metadata: ${JSON.stringify(data.metadata)}`));
|
|
69
|
+
}
|
|
70
|
+
if (data.auditLogs.length > 0) {
|
|
71
|
+
console.log(chalk.dim(`\n Recent Audit Logs (${data.auditLogs.length}):`));
|
|
72
|
+
for (const log of data.auditLogs) {
|
|
73
|
+
const date = new Date(log.createdAt).toLocaleString();
|
|
74
|
+
console.log(` ${log.action} ${chalk.dim(date)}`);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
catch (err) {
|
|
79
|
+
handleError(err);
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
// --- create ---
|
|
83
|
+
const createCommand = new Command("create")
|
|
84
|
+
.description("Create a new lead")
|
|
85
|
+
.requiredOption("--title <title>", "Lead title")
|
|
86
|
+
.option("--source-channel <channel>", "Source channel")
|
|
87
|
+
.option("--source-channel-id <id>", "Source channel ID")
|
|
88
|
+
.option("--person <personId>", "Person ID")
|
|
89
|
+
.option("--organization <organizationId>", "Organization ID")
|
|
90
|
+
.option("--notes <text>", "Notes")
|
|
91
|
+
.option("--metadata <json>", "Metadata (JSON string)")
|
|
92
|
+
.option("--json", "Output as JSON")
|
|
93
|
+
.action(async (opts) => {
|
|
94
|
+
try {
|
|
95
|
+
const payload = {
|
|
96
|
+
title: opts.title,
|
|
97
|
+
};
|
|
98
|
+
if (opts.sourceChannel !== undefined)
|
|
99
|
+
payload.sourceChannel = opts.sourceChannel;
|
|
100
|
+
if (opts.sourceChannelId !== undefined)
|
|
101
|
+
payload.sourceChannelId = opts.sourceChannelId;
|
|
102
|
+
if (opts.person !== undefined)
|
|
103
|
+
payload.personId = opts.person;
|
|
104
|
+
if (opts.organization !== undefined)
|
|
105
|
+
payload.organizationId = opts.organization;
|
|
106
|
+
if (opts.notes !== undefined)
|
|
107
|
+
payload.notes = opts.notes;
|
|
108
|
+
if (opts.metadata !== undefined)
|
|
109
|
+
payload.metadata = JSON.parse(opts.metadata);
|
|
110
|
+
const data = await api.post("/leads", payload);
|
|
111
|
+
if (opts.json) {
|
|
112
|
+
console.log(JSON.stringify(data, null, 2));
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
console.log(chalk.green("\u2713"), `Lead created: ${chalk.bold(data.title)} (${data.id})`);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
catch (err) {
|
|
119
|
+
handleError(err);
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
// --- update ---
|
|
123
|
+
const updateCommand = new Command("update")
|
|
124
|
+
.description("Update a lead")
|
|
125
|
+
.argument("<id>", "Lead ID")
|
|
126
|
+
.option("--title <title>", "Lead title")
|
|
127
|
+
.option("--source-channel <channel>", "Source channel")
|
|
128
|
+
.option("--source-channel-id <id>", "Source channel ID")
|
|
129
|
+
.option("--person <personId>", "Person ID")
|
|
130
|
+
.option("--organization <organizationId>", "Organization ID")
|
|
131
|
+
.option("--notes <text>", "Notes")
|
|
132
|
+
.option("--json", "Output as JSON")
|
|
133
|
+
.action(async (id, opts) => {
|
|
134
|
+
try {
|
|
135
|
+
const payload = {};
|
|
136
|
+
if (opts.title !== undefined)
|
|
137
|
+
payload.title = opts.title;
|
|
138
|
+
if (opts.sourceChannel !== undefined)
|
|
139
|
+
payload.sourceChannel = opts.sourceChannel;
|
|
140
|
+
if (opts.sourceChannelId !== undefined)
|
|
141
|
+
payload.sourceChannelId = opts.sourceChannelId;
|
|
142
|
+
if (opts.person !== undefined)
|
|
143
|
+
payload.personId = opts.person;
|
|
144
|
+
if (opts.organization !== undefined)
|
|
145
|
+
payload.organizationId = opts.organization;
|
|
146
|
+
if (opts.notes !== undefined)
|
|
147
|
+
payload.notes = opts.notes;
|
|
148
|
+
const data = await api.post(`/leads/${id}`, payload);
|
|
149
|
+
if (opts.json) {
|
|
150
|
+
console.log(JSON.stringify(data, null, 2));
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
console.log(chalk.green("\u2713"), `Lead updated: ${chalk.bold(data.title)}`);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
catch (err) {
|
|
157
|
+
handleError(err);
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
// --- status ---
|
|
161
|
+
const statusCommand = new Command("status")
|
|
162
|
+
.description("Update lead status")
|
|
163
|
+
.argument("<id>", "Lead ID")
|
|
164
|
+
.argument("<status>", "New status")
|
|
165
|
+
.option("--json", "Output as JSON")
|
|
166
|
+
.action(async (id, status, opts) => {
|
|
167
|
+
try {
|
|
168
|
+
const data = await api.post(`/leads/${id}/status`, { status });
|
|
169
|
+
if (opts.json) {
|
|
170
|
+
console.log(JSON.stringify(data, null, 2));
|
|
171
|
+
}
|
|
172
|
+
else {
|
|
173
|
+
console.log(chalk.green("\u2713"), `Lead status updated to ${chalk.bold(status)}`);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
catch (err) {
|
|
177
|
+
handleError(err);
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
// --- archive ---
|
|
181
|
+
const archiveCommand = new Command("archive")
|
|
182
|
+
.description("Archive a lead")
|
|
183
|
+
.argument("<id>", "Lead ID")
|
|
184
|
+
.option("--json", "Output as JSON")
|
|
185
|
+
.action(async (id, opts) => {
|
|
186
|
+
try {
|
|
187
|
+
const data = await api.post(`/leads/${id}/archived`, {
|
|
188
|
+
archived: true,
|
|
189
|
+
});
|
|
190
|
+
if (opts.json) {
|
|
191
|
+
console.log(JSON.stringify(data, null, 2));
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
console.log(chalk.green("\u2713"), "Lead archived");
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
catch (err) {
|
|
198
|
+
handleError(err);
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
// --- unarchive ---
|
|
202
|
+
const unarchiveCommand = new Command("unarchive")
|
|
203
|
+
.description("Unarchive a lead")
|
|
204
|
+
.argument("<id>", "Lead ID")
|
|
205
|
+
.option("--json", "Output as JSON")
|
|
206
|
+
.action(async (id, opts) => {
|
|
207
|
+
try {
|
|
208
|
+
const data = await api.post(`/leads/${id}/archived`, {
|
|
209
|
+
archived: false,
|
|
210
|
+
});
|
|
211
|
+
if (opts.json) {
|
|
212
|
+
console.log(JSON.stringify(data, null, 2));
|
|
213
|
+
}
|
|
214
|
+
else {
|
|
215
|
+
console.log(chalk.green("\u2713"), "Lead unarchived");
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
catch (err) {
|
|
219
|
+
handleError(err);
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
// --- notes ---
|
|
223
|
+
const notesCommand = new Command("notes")
|
|
224
|
+
.description("Update lead notes")
|
|
225
|
+
.argument("<id>", "Lead ID")
|
|
226
|
+
.argument("<notes>", "Notes (empty string to clear)")
|
|
227
|
+
.option("--json", "Output as JSON")
|
|
228
|
+
.action(async (id, notes, opts) => {
|
|
229
|
+
try {
|
|
230
|
+
const data = await api.post(`/leads/${id}/notes`, {
|
|
231
|
+
notes: notes === "" ? null : notes,
|
|
232
|
+
});
|
|
233
|
+
if (opts.json) {
|
|
234
|
+
console.log(JSON.stringify(data, null, 2));
|
|
235
|
+
}
|
|
236
|
+
else {
|
|
237
|
+
console.log(chalk.green("\u2713"), "Lead notes updated");
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
catch (err) {
|
|
241
|
+
handleError(err);
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
// --- metadata ---
|
|
245
|
+
const metadataCommand = new Command("metadata")
|
|
246
|
+
.description("Update lead metadata")
|
|
247
|
+
.argument("<id>", "Lead ID")
|
|
248
|
+
.argument("<json>", 'Metadata JSON string ("null" to clear)')
|
|
249
|
+
.option("--json", "Output as JSON")
|
|
250
|
+
.action(async (id, jsonStr, opts) => {
|
|
251
|
+
try {
|
|
252
|
+
const metadata = jsonStr === "null" ? null : JSON.parse(jsonStr);
|
|
253
|
+
const data = await api.post(`/leads/${id}/metadata`, {
|
|
254
|
+
metadata,
|
|
255
|
+
});
|
|
256
|
+
if (opts.json) {
|
|
257
|
+
console.log(JSON.stringify(data, null, 2));
|
|
258
|
+
}
|
|
259
|
+
else {
|
|
260
|
+
console.log(chalk.green("\u2713"), "Lead metadata updated");
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
catch (err) {
|
|
264
|
+
handleError(err);
|
|
265
|
+
}
|
|
266
|
+
});
|
|
267
|
+
// --- delete ---
|
|
268
|
+
const deleteCommand = new Command("delete")
|
|
269
|
+
.description("Delete a lead")
|
|
270
|
+
.argument("<id>", "Lead ID")
|
|
271
|
+
.option("--json", "Output as JSON")
|
|
272
|
+
.action(async (id, opts) => {
|
|
273
|
+
try {
|
|
274
|
+
await api.delete(`/leads/${id}`);
|
|
275
|
+
if (opts.json) {
|
|
276
|
+
console.log(JSON.stringify({ deleted: true, id }));
|
|
277
|
+
}
|
|
278
|
+
else {
|
|
279
|
+
console.log(chalk.green("\u2713"), "Lead deleted");
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
catch (err) {
|
|
283
|
+
handleError(err);
|
|
284
|
+
}
|
|
285
|
+
});
|
|
286
|
+
// --- parent ---
|
|
287
|
+
export const leadCommand = new Command("lead")
|
|
288
|
+
.description("Manage leads")
|
|
289
|
+
.addCommand(listCommand)
|
|
290
|
+
.addCommand(getCommand)
|
|
291
|
+
.addCommand(createCommand)
|
|
292
|
+
.addCommand(updateCommand)
|
|
293
|
+
.addCommand(statusCommand)
|
|
294
|
+
.addCommand(archiveCommand)
|
|
295
|
+
.addCommand(unarchiveCommand)
|
|
296
|
+
.addCommand(notesCommand)
|
|
297
|
+
.addCommand(metadataCommand)
|
|
298
|
+
.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,EAAE,EAAE,CAAC,CAAC;QAEjC,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;QACrD,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAC,CAAC;QACrD,CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,WAAW,CAAC,GAAG,CAAC,CAAC;IACnB,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,iBAAiB;AAEjB,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC;KAC3C,WAAW,CAAC,cAAc,CAAC;KAC3B,UAAU,CAAC,WAAW,CAAC;KACvB,UAAU,CAAC,UAAU,CAAC;KACtB,UAAU,CAAC,aAAa,CAAC;KACzB,UAAU,CAAC,aAAa,CAAC;KACzB,UAAU,CAAC,aAAa,CAAC;KACzB,UAAU,CAAC,cAAc,CAAC;KAC1B,UAAU,CAAC,gBAAgB,CAAC;KAC5B,UAAU,CAAC,YAAY,CAAC;KACxB,UAAU,CAAC,eAAe,CAAC;KAC3B,UAAU,CAAC,aAAa,CAAC,CAAC"}
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import chalk from "chalk";
|
|
3
|
+
import { api } from "../lib/api.js";
|
|
4
|
+
import { printList, printDetail, handleError } from "../lib/format.js";
|
|
5
|
+
// --- list ---
|
|
6
|
+
const listCommand = new Command("list")
|
|
7
|
+
.description("List all organizations")
|
|
8
|
+
.option("--search <query>", "Search by name")
|
|
9
|
+
.option("--json", "Output as JSON")
|
|
10
|
+
.action(async (opts) => {
|
|
11
|
+
try {
|
|
12
|
+
const params = new URLSearchParams();
|
|
13
|
+
if (opts.search)
|
|
14
|
+
params.set("search", opts.search);
|
|
15
|
+
const qs = params.toString();
|
|
16
|
+
const data = await api.get(`/organizations${qs ? `?${qs}` : ""}`);
|
|
17
|
+
printList(data, [
|
|
18
|
+
{ key: "name", label: "Name", width: 30 },
|
|
19
|
+
{ key: "address", label: "Address", width: 25 },
|
|
20
|
+
{ key: "website", label: "Website", width: 25 },
|
|
21
|
+
{ key: "personCount", label: "Persons", width: 10 },
|
|
22
|
+
{ key: "createdAt", label: "Created", width: 24 },
|
|
23
|
+
], opts);
|
|
24
|
+
}
|
|
25
|
+
catch (err) {
|
|
26
|
+
handleError(err);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
// --- get ---
|
|
30
|
+
const getCommand = new Command("get")
|
|
31
|
+
.description("Get organization details")
|
|
32
|
+
.argument("<id>", "Organization ID")
|
|
33
|
+
.option("--json", "Output as JSON")
|
|
34
|
+
.action(async (id, opts) => {
|
|
35
|
+
try {
|
|
36
|
+
const data = await api.get(`/organizations/${id}`);
|
|
37
|
+
if (opts.json) {
|
|
38
|
+
console.log(JSON.stringify(data, null, 2));
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
console.log(chalk.bold(data.name));
|
|
42
|
+
printDetail(data, [
|
|
43
|
+
{ key: "id", label: "ID" },
|
|
44
|
+
{ key: "address", label: "Address" },
|
|
45
|
+
{ key: "website", label: "Website" },
|
|
46
|
+
{ key: "notes", label: "Notes" },
|
|
47
|
+
{ key: "createdAt", label: "Created" },
|
|
48
|
+
{ key: "updatedAt", label: "Updated" },
|
|
49
|
+
], opts);
|
|
50
|
+
if (data.persons.length > 0) {
|
|
51
|
+
console.log(chalk.dim(`\n Persons (${data.persons.length}):`));
|
|
52
|
+
for (const p of data.persons) {
|
|
53
|
+
const role = p.role ? chalk.dim(` (${p.role})`) : "";
|
|
54
|
+
console.log(` ${p.name}${role}`);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
catch (err) {
|
|
59
|
+
handleError(err);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
// --- create ---
|
|
63
|
+
const createCommand = new Command("create")
|
|
64
|
+
.description("Create a new organization")
|
|
65
|
+
.requiredOption("--name <name>", "Organization name")
|
|
66
|
+
.option("--address <address>", "Address")
|
|
67
|
+
.option("--website <url>", "Website URL")
|
|
68
|
+
.option("--notes <notes>", "Notes (markdown)")
|
|
69
|
+
.option("--json", "Output as JSON")
|
|
70
|
+
.action(async (opts) => {
|
|
71
|
+
try {
|
|
72
|
+
const data = await api.post("/organizations", {
|
|
73
|
+
name: opts.name,
|
|
74
|
+
address: opts.address,
|
|
75
|
+
website: opts.website,
|
|
76
|
+
notes: opts.notes,
|
|
77
|
+
});
|
|
78
|
+
if (opts.json) {
|
|
79
|
+
console.log(JSON.stringify(data, null, 2));
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
console.log(chalk.green("✓"), `Organization created: ${chalk.bold(data.name)} (${data.id})`);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
catch (err) {
|
|
86
|
+
handleError(err);
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
// --- update ---
|
|
90
|
+
const updateCommand = new Command("update")
|
|
91
|
+
.description("Update an organization")
|
|
92
|
+
.argument("<id>", "Organization ID")
|
|
93
|
+
.option("--name <name>", "Organization name")
|
|
94
|
+
.option("--address <address>", "Address")
|
|
95
|
+
.option("--website <url>", "Website URL")
|
|
96
|
+
.option("--notes <notes>", "Notes (markdown)")
|
|
97
|
+
.option("--json", "Output as JSON")
|
|
98
|
+
.action(async (id, opts) => {
|
|
99
|
+
try {
|
|
100
|
+
const { json: _, ...fields } = opts;
|
|
101
|
+
void _;
|
|
102
|
+
const payload = Object.fromEntries(Object.entries(fields).filter(([, v]) => v !== undefined));
|
|
103
|
+
const data = await api.post(`/organizations/${id}`, payload);
|
|
104
|
+
if (opts.json) {
|
|
105
|
+
console.log(JSON.stringify(data, null, 2));
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
console.log(chalk.green("✓"), `Organization updated: ${chalk.bold(data.name)}`);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
catch (err) {
|
|
112
|
+
handleError(err);
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
// --- notes ---
|
|
116
|
+
const notesCommand = new Command("notes")
|
|
117
|
+
.description("Update organization notes")
|
|
118
|
+
.argument("<id>", "Organization ID")
|
|
119
|
+
.option("--notes <notes>", "Notes (markdown), omit to clear")
|
|
120
|
+
.option("--json", "Output as JSON")
|
|
121
|
+
.action(async (id, opts) => {
|
|
122
|
+
try {
|
|
123
|
+
const data = await api.post(`/organizations/${id}/notes`, {
|
|
124
|
+
notes: opts.notes ?? null,
|
|
125
|
+
});
|
|
126
|
+
if (opts.json) {
|
|
127
|
+
console.log(JSON.stringify(data, null, 2));
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
console.log(chalk.green("✓"), opts.notes ? "Notes updated" : "Notes cleared");
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
catch (err) {
|
|
134
|
+
handleError(err);
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
// --- delete ---
|
|
138
|
+
const deleteCommand = new Command("delete")
|
|
139
|
+
.description("Delete an organization")
|
|
140
|
+
.argument("<id>", "Organization ID")
|
|
141
|
+
.option("--json", "Output as JSON")
|
|
142
|
+
.action(async (id, opts) => {
|
|
143
|
+
try {
|
|
144
|
+
await api.delete(`/organizations/${id}`);
|
|
145
|
+
if (opts.json) {
|
|
146
|
+
console.log(JSON.stringify({ deleted: true, id }));
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
console.log(chalk.green("✓"), "Organization deleted");
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
catch (err) {
|
|
153
|
+
handleError(err);
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
// --- link-person ---
|
|
157
|
+
const linkPersonCommand = new Command("link-person")
|
|
158
|
+
.description("Link a person to this organization")
|
|
159
|
+
.argument("<id>", "Organization ID")
|
|
160
|
+
.requiredOption("--person <personId>", "Person ID to link")
|
|
161
|
+
.option("--role <role>", "Role at this organization (e.g. CTO)")
|
|
162
|
+
.option("--json", "Output as JSON")
|
|
163
|
+
.action(async (id, opts) => {
|
|
164
|
+
try {
|
|
165
|
+
const data = await api.post(`/organizations/${id}/persons`, {
|
|
166
|
+
personId: opts.person,
|
|
167
|
+
role: opts.role,
|
|
168
|
+
});
|
|
169
|
+
if (opts.json) {
|
|
170
|
+
console.log(JSON.stringify(data, null, 2));
|
|
171
|
+
}
|
|
172
|
+
else {
|
|
173
|
+
console.log(chalk.green("✓"), "Person linked to organization");
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
catch (err) {
|
|
177
|
+
handleError(err);
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
// --- unlink-person ---
|
|
181
|
+
const unlinkPersonCommand = new Command("unlink-person")
|
|
182
|
+
.description("Unlink a person from this organization")
|
|
183
|
+
.argument("<id>", "Organization ID")
|
|
184
|
+
.requiredOption("--person <personId>", "Person ID to unlink")
|
|
185
|
+
.option("--json", "Output as JSON")
|
|
186
|
+
.action(async (id, opts) => {
|
|
187
|
+
try {
|
|
188
|
+
await api.delete(`/organizations/${id}/persons/${opts.person}`);
|
|
189
|
+
if (opts.json) {
|
|
190
|
+
console.log(JSON.stringify({ unlinked: true }));
|
|
191
|
+
}
|
|
192
|
+
else {
|
|
193
|
+
console.log(chalk.green("✓"), "Person unlinked from organization");
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
catch (err) {
|
|
197
|
+
handleError(err);
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
// --- parent ---
|
|
201
|
+
export const organizationCommand = new Command("organization")
|
|
202
|
+
.description("Manage organizations")
|
|
203
|
+
.addCommand(listCommand)
|
|
204
|
+
.addCommand(getCommand)
|
|
205
|
+
.addCommand(createCommand)
|
|
206
|
+
.addCommand(updateCommand)
|
|
207
|
+
.addCommand(notesCommand)
|
|
208
|
+
.addCommand(deleteCommand)
|
|
209
|
+
.addCommand(linkPersonCommand)
|
|
210
|
+
.addCommand(unlinkPersonCommand);
|
|
211
|
+
//# sourceMappingURL=organization.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organization.js","sourceRoot":"","sources":["../../src/commands/organization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAkBvE,eAAe;AAEf,MAAM,WAAW,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC;KACpC,WAAW,CAAC,wBAAwB,CAAC;KACrC,MAAM,CAAC,kBAAkB,EAAE,gBAAgB,CAAC;KAC5C,MAAM,CAAC,QAAQ,EAAE,gBAAgB,CAAC;KAClC,MAAM,CAAC,KAAK,EAAE,IAAyC,EAAE,EAAE;IAC1D,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;QACrC,IAAI,IAAI,CAAC,MAAM;YAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QAEnD,MAAM,EAAE,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC;QAC7B,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,GAAG,CACxB,iBAAiB,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CACtC,CAAC;QAEF,SAAS,CACP,IAA4C,EAC5C;YACE,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE;YACzC,EAAE,GAAG,EAAE,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