@elvatis_com/openclaw-ispconfig 0.1.3 → 0.3.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/README.md +153 -38
- package/dist/index.d.ts +54 -43
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +90 -1
- package/dist/index.js.map +1 -1
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +437 -13
- package/dist/tools.js.map +1 -1
- package/dist/types.d.ts +5 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +49 -0
- package/dist/validate.js.map +1 -1
- package/openclaw.plugin.json +76 -49
- package/package.json +1 -1
package/dist/tools.js
CHANGED
|
@@ -6,13 +6,21 @@ const errors_1 = require("./errors");
|
|
|
6
6
|
const guards_1 = require("./guards");
|
|
7
7
|
const validate_1 = require("./validate");
|
|
8
8
|
const KNOWN_METHODS = [
|
|
9
|
-
"server_get_all", "server_get", "client_get_all", "client_get", "client_add", "
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
9
|
+
"server_get_all", "server_get", "client_get_all", "client_get", "client_add", "client_update", "client_delete",
|
|
10
|
+
"sites_web_domain_get", "sites_web_domain_add", "sites_web_domain_update", "sites_web_domain_delete",
|
|
11
|
+
"dns_zone_get_by_user", "dns_zone_add", "dns_zone_delete", "dns_rr_get_all_by_zone",
|
|
12
|
+
"dns_a_add", "dns_aaaa_add", "dns_mx_add", "dns_txt_add", "dns_cname_add",
|
|
13
|
+
"dns_a_delete", "dns_aaaa_delete", "dns_mx_delete", "dns_txt_delete", "dns_cname_delete",
|
|
14
|
+
"dns_a_update", "dns_aaaa_update", "dns_mx_update", "dns_txt_update", "dns_cname_update",
|
|
15
|
+
"mail_domain_get", "mail_domain_add", "mail_domain_delete",
|
|
16
|
+
"mail_user_get", "mail_user_add", "mail_user_delete",
|
|
17
|
+
"mail_alias_get", "mail_alias_add", "mail_alias_delete",
|
|
18
|
+
"mail_forward_get", "mail_forward_add", "mail_forward_delete",
|
|
19
|
+
"sites_database_get_all_by_user", "sites_database_add", "sites_database_delete",
|
|
20
|
+
"sites_database_user_add", "sites_database_user_delete",
|
|
21
|
+
"sites_shell_user_add", "sites_shell_user_delete",
|
|
22
|
+
"sites_ftp_user_add", "sites_ftp_user_delete",
|
|
23
|
+
"sites_cron_get", "sites_cron_add", "sites_cron_delete", "sites_cron_update",
|
|
16
24
|
];
|
|
17
25
|
function toNumber(value, fallback) {
|
|
18
26
|
const n = Number(value);
|
|
@@ -25,13 +33,12 @@ function toNumber(value, fallback) {
|
|
|
25
33
|
return fallback;
|
|
26
34
|
}
|
|
27
35
|
function dnsMethodForType(type, action) {
|
|
28
|
-
const suffix = action === "add" ? "add" : "delete";
|
|
29
36
|
switch (type.toUpperCase()) {
|
|
30
|
-
case "A": return `dns_a_${
|
|
31
|
-
case "AAAA": return `dns_aaaa_${
|
|
32
|
-
case "MX": return `dns_mx_${
|
|
33
|
-
case "TXT": return `dns_txt_${
|
|
34
|
-
case "CNAME": return `dns_cname_${
|
|
37
|
+
case "A": return `dns_a_${action}`;
|
|
38
|
+
case "AAAA": return `dns_aaaa_${action}`;
|
|
39
|
+
case "MX": return `dns_mx_${action}`;
|
|
40
|
+
case "TXT": return `dns_txt_${action}`;
|
|
41
|
+
case "CNAME": return `dns_cname_${action}`;
|
|
35
42
|
default: throw new Error(`Unsupported DNS record type: ${type}`);
|
|
36
43
|
}
|
|
37
44
|
}
|
|
@@ -69,6 +76,7 @@ function createTools() {
|
|
|
69
76
|
{
|
|
70
77
|
name: "isp_methods_list",
|
|
71
78
|
description: "Discover available ISPConfig API methods (dynamic via get_function_list, falls back to probing known methods)",
|
|
79
|
+
parameters: { type: "object", properties: {} },
|
|
72
80
|
run: async (_params, context) => withClient(context, "isp_methods_list", async (client) => {
|
|
73
81
|
// Try dynamic discovery first (ISPConfig 3.2+)
|
|
74
82
|
try {
|
|
@@ -115,6 +123,7 @@ function createTools() {
|
|
|
115
123
|
{
|
|
116
124
|
name: "isp_system_info",
|
|
117
125
|
description: "Get ISPConfig server list and server details",
|
|
126
|
+
parameters: { type: "object", properties: {} },
|
|
118
127
|
run: async (_params, context) => withClient(context, "isp_system_info", async (client) => {
|
|
119
128
|
const servers = await client.call("server_get_all", {});
|
|
120
129
|
const details = [];
|
|
@@ -130,6 +139,19 @@ function createTools() {
|
|
|
130
139
|
{
|
|
131
140
|
name: "isp_provision_site",
|
|
132
141
|
description: "Provision client, site, DNS, mail and database in one workflow",
|
|
142
|
+
parameters: {
|
|
143
|
+
type: "object",
|
|
144
|
+
properties: {
|
|
145
|
+
domain: { type: "string", description: "Domain name to provision" },
|
|
146
|
+
clientName: { type: "string", description: "Client company/contact name" },
|
|
147
|
+
clientEmail: { type: "string", description: "Client email address" },
|
|
148
|
+
serverIp: { type: "string", description: "Server IP address for DNS A record" },
|
|
149
|
+
createMail: { type: "boolean", description: "Whether to create mail domain and users (default: true)" },
|
|
150
|
+
createDb: { type: "boolean", description: "Whether to create a database and user (default: true)" },
|
|
151
|
+
serverId: { type: "number", description: "ISPConfig server ID (default: 1)" },
|
|
152
|
+
},
|
|
153
|
+
required: ["domain", "clientName", "clientEmail"],
|
|
154
|
+
},
|
|
133
155
|
run: async (params, context) => withClient(context, "isp_provision_site", async (client) => {
|
|
134
156
|
const domain = String(params.domain ?? "").trim();
|
|
135
157
|
const clientName = String(params.clientName ?? "").trim();
|
|
@@ -212,6 +234,7 @@ function createTools() {
|
|
|
212
234
|
{
|
|
213
235
|
name: "isp_client_list",
|
|
214
236
|
description: "List clients with details",
|
|
237
|
+
parameters: { type: "object", properties: {} },
|
|
215
238
|
run: async (_params, context) => withClient(context, "isp_client_list", async (client) => {
|
|
216
239
|
const clients = await client.call("client_get_all", {});
|
|
217
240
|
const details = [];
|
|
@@ -226,16 +249,32 @@ function createTools() {
|
|
|
226
249
|
{
|
|
227
250
|
name: "isp_client_add",
|
|
228
251
|
description: "Create a new ISPConfig client",
|
|
252
|
+
parameters: {
|
|
253
|
+
type: "object",
|
|
254
|
+
properties: {
|
|
255
|
+
company_name: { type: "string", description: "Client company name" },
|
|
256
|
+
contact_name: { type: "string", description: "Contact person name" },
|
|
257
|
+
email: { type: "string", description: "Client email address" },
|
|
258
|
+
},
|
|
259
|
+
},
|
|
229
260
|
run: async (params, context) => withClient(context, "isp_client_add", (client) => client.call("client_add", { reseller_id: 0, params })),
|
|
230
261
|
},
|
|
231
262
|
{
|
|
232
263
|
name: "isp_client_get",
|
|
233
264
|
description: "Get client details by client_id",
|
|
265
|
+
parameters: {
|
|
266
|
+
type: "object",
|
|
267
|
+
properties: {
|
|
268
|
+
client_id: { type: "number", description: "Client ID" },
|
|
269
|
+
},
|
|
270
|
+
required: ["client_id"],
|
|
271
|
+
},
|
|
234
272
|
run: async (params, context) => withClient(context, "isp_client_get", (client) => client.call("client_get", { client_id: toNumber(params.client_id ?? params.clientId) })),
|
|
235
273
|
},
|
|
236
274
|
{
|
|
237
275
|
name: "isp_sites_list",
|
|
238
276
|
description: "List web sites with optional filters",
|
|
277
|
+
parameters: { type: "object", properties: {} },
|
|
239
278
|
run: async (params, context) => withClient(context, "isp_sites_list", async (client) => {
|
|
240
279
|
if (Object.keys(params).length > 0) {
|
|
241
280
|
return client.call("sites_web_domain_get", params);
|
|
@@ -246,16 +285,33 @@ function createTools() {
|
|
|
246
285
|
{
|
|
247
286
|
name: "isp_site_get",
|
|
248
287
|
description: "Get one site by primary_id",
|
|
288
|
+
parameters: {
|
|
289
|
+
type: "object",
|
|
290
|
+
properties: {
|
|
291
|
+
primary_id: { type: "number", description: "Site ID" },
|
|
292
|
+
domain_id: { type: "number", description: "Alias for primary_id" },
|
|
293
|
+
site_id: { type: "number", description: "Alias for primary_id" },
|
|
294
|
+
},
|
|
295
|
+
},
|
|
249
296
|
run: async (params, context) => withClient(context, "isp_site_get", (client) => client.call("sites_web_domain_get", { primary_id: toNumber(params.primary_id ?? params.domain_id ?? params.site_id) })),
|
|
250
297
|
},
|
|
251
298
|
{
|
|
252
299
|
name: "isp_site_add",
|
|
253
300
|
description: "Create web site",
|
|
301
|
+
parameters: {
|
|
302
|
+
type: "object",
|
|
303
|
+
properties: {
|
|
304
|
+
client_id: { type: "number", description: "Client ID" },
|
|
305
|
+
params: { type: "object", description: "Site parameters" },
|
|
306
|
+
},
|
|
307
|
+
required: ["client_id", "params"],
|
|
308
|
+
},
|
|
254
309
|
run: async (params, context) => withClient(context, "isp_site_add", (client) => client.call("sites_web_domain_add", params)),
|
|
255
310
|
},
|
|
256
311
|
{
|
|
257
312
|
name: "isp_domains_list",
|
|
258
313
|
description: "List all web domains",
|
|
314
|
+
parameters: { type: "object", properties: {} },
|
|
259
315
|
run: async (_params, context) => withClient(context, "isp_domains_list", async (client) => {
|
|
260
316
|
const sites = await fetchSites(client);
|
|
261
317
|
return sites.map((s) => ({ domain_id: s.domain_id, domain: s.domain, active: s.active }));
|
|
@@ -264,26 +320,59 @@ function createTools() {
|
|
|
264
320
|
{
|
|
265
321
|
name: "isp_domain_add",
|
|
266
322
|
description: "Alias for isp_site_add",
|
|
323
|
+
parameters: {
|
|
324
|
+
type: "object",
|
|
325
|
+
properties: {
|
|
326
|
+
client_id: { type: "number", description: "Client ID" },
|
|
327
|
+
params: { type: "object", description: "Domain/site parameters" },
|
|
328
|
+
},
|
|
329
|
+
required: ["client_id", "params"],
|
|
330
|
+
},
|
|
267
331
|
run: async (params, context) => withClient(context, "isp_domain_add", (client) => client.call("sites_web_domain_add", params)),
|
|
268
332
|
},
|
|
269
333
|
{
|
|
270
334
|
name: "isp_dns_zone_list",
|
|
271
335
|
description: "List DNS zones by user",
|
|
336
|
+
parameters: { type: "object", properties: {} },
|
|
272
337
|
run: async (params, context) => withClient(context, "isp_dns_zone_list", (client) => client.call("dns_zone_get_by_user", params)),
|
|
273
338
|
},
|
|
274
339
|
{
|
|
275
340
|
name: "isp_dns_zone_add",
|
|
276
341
|
description: "Create DNS zone",
|
|
342
|
+
parameters: {
|
|
343
|
+
type: "object",
|
|
344
|
+
properties: {
|
|
345
|
+
client_id: { type: "number", description: "Client ID" },
|
|
346
|
+
params: { type: "object", description: "DNS zone parameters" },
|
|
347
|
+
},
|
|
348
|
+
required: ["client_id", "params"],
|
|
349
|
+
},
|
|
277
350
|
run: async (params, context) => withClient(context, "isp_dns_zone_add", (client) => client.call("dns_zone_add", params)),
|
|
278
351
|
},
|
|
279
352
|
{
|
|
280
353
|
name: "isp_dns_record_list",
|
|
281
354
|
description: "List DNS records by zone_id",
|
|
355
|
+
parameters: {
|
|
356
|
+
type: "object",
|
|
357
|
+
properties: {
|
|
358
|
+
zone_id: { type: "number", description: "DNS zone ID" },
|
|
359
|
+
},
|
|
360
|
+
required: ["zone_id"],
|
|
361
|
+
},
|
|
282
362
|
run: async (params, context) => withClient(context, "isp_dns_record_list", (client) => client.call("dns_rr_get_all_by_zone", { zone_id: toNumber(params.zone_id ?? params.zoneId) })),
|
|
283
363
|
},
|
|
284
364
|
{
|
|
285
365
|
name: "isp_dns_record_add",
|
|
286
366
|
description: "Add DNS record using type-specific method",
|
|
367
|
+
parameters: {
|
|
368
|
+
type: "object",
|
|
369
|
+
properties: {
|
|
370
|
+
type: { type: "string", enum: ["A", "AAAA", "MX", "TXT", "CNAME"], description: "DNS record type" },
|
|
371
|
+
client_id: { type: "number", description: "Client ID" },
|
|
372
|
+
params: { type: "object", description: "DNS record parameters" },
|
|
373
|
+
},
|
|
374
|
+
required: ["type"],
|
|
375
|
+
},
|
|
287
376
|
run: async (params, context) => withClient(context, "isp_dns_record_add", (client) => {
|
|
288
377
|
const method = dnsMethodForType(String(params.type ?? ""), "add");
|
|
289
378
|
return client.call(method, params);
|
|
@@ -292,6 +381,15 @@ function createTools() {
|
|
|
292
381
|
{
|
|
293
382
|
name: "isp_dns_record_delete",
|
|
294
383
|
description: "Delete DNS record using type-specific method",
|
|
384
|
+
parameters: {
|
|
385
|
+
type: "object",
|
|
386
|
+
properties: {
|
|
387
|
+
type: { type: "string", enum: ["A", "AAAA", "MX", "TXT", "CNAME"], description: "DNS record type" },
|
|
388
|
+
primary_id: { type: "number", description: "DNS record primary ID to delete" },
|
|
389
|
+
client_id: { type: "number", description: "Client ID" },
|
|
390
|
+
},
|
|
391
|
+
required: ["type"],
|
|
392
|
+
},
|
|
295
393
|
run: async (params, context) => withClient(context, "isp_dns_record_delete", (client) => {
|
|
296
394
|
const method = dnsMethodForType(String(params.type ?? ""), "delete");
|
|
297
395
|
return client.call(method, params);
|
|
@@ -300,46 +398,89 @@ function createTools() {
|
|
|
300
398
|
{
|
|
301
399
|
name: "isp_mail_domain_list",
|
|
302
400
|
description: "List mail domains",
|
|
401
|
+
parameters: { type: "object", properties: {} },
|
|
303
402
|
run: async (params, context) => withClient(context, "isp_mail_domain_list", (client) => client.call("mail_domain_get", params)),
|
|
304
403
|
},
|
|
305
404
|
{
|
|
306
405
|
name: "isp_mail_domain_add",
|
|
307
406
|
description: "Create mail domain",
|
|
407
|
+
parameters: {
|
|
408
|
+
type: "object",
|
|
409
|
+
properties: {
|
|
410
|
+
client_id: { type: "number", description: "Client ID" },
|
|
411
|
+
params: { type: "object", description: "Mail domain parameters" },
|
|
412
|
+
},
|
|
413
|
+
required: ["client_id", "params"],
|
|
414
|
+
},
|
|
308
415
|
run: async (params, context) => withClient(context, "isp_mail_domain_add", (client) => client.call("mail_domain_add", params)),
|
|
309
416
|
},
|
|
310
417
|
{
|
|
311
418
|
name: "isp_mail_user_list",
|
|
312
419
|
description: "List mail users",
|
|
420
|
+
parameters: { type: "object", properties: {} },
|
|
313
421
|
run: async (params, context) => withClient(context, "isp_mail_user_list", (client) => client.call("mail_user_get", params)),
|
|
314
422
|
},
|
|
315
423
|
{
|
|
316
424
|
name: "isp_mail_user_add",
|
|
317
425
|
description: "Create mail user",
|
|
426
|
+
parameters: {
|
|
427
|
+
type: "object",
|
|
428
|
+
properties: {
|
|
429
|
+
client_id: { type: "number", description: "Client ID" },
|
|
430
|
+
params: { type: "object", description: "Mail user parameters" },
|
|
431
|
+
},
|
|
432
|
+
required: ["client_id", "params"],
|
|
433
|
+
},
|
|
318
434
|
run: async (params, context) => withClient(context, "isp_mail_user_add", (client) => client.call("mail_user_add", params)),
|
|
319
435
|
},
|
|
320
436
|
{
|
|
321
437
|
name: "isp_mail_user_delete",
|
|
322
438
|
description: "Delete mail user",
|
|
439
|
+
parameters: {
|
|
440
|
+
type: "object",
|
|
441
|
+
properties: {
|
|
442
|
+
primary_id: { type: "number", description: "Mail user ID to delete" },
|
|
443
|
+
},
|
|
444
|
+
required: ["primary_id"],
|
|
445
|
+
},
|
|
323
446
|
run: async (params, context) => withClient(context, "isp_mail_user_delete", (client) => client.call("mail_user_delete", params)),
|
|
324
447
|
},
|
|
325
448
|
{
|
|
326
449
|
name: "isp_db_list",
|
|
327
450
|
description: "List databases by user",
|
|
451
|
+
parameters: { type: "object", properties: {} },
|
|
328
452
|
run: async (params, context) => withClient(context, "isp_db_list", (client) => client.call("sites_database_get_all_by_user", params)),
|
|
329
453
|
},
|
|
330
454
|
{
|
|
331
455
|
name: "isp_db_add",
|
|
332
456
|
description: "Create database",
|
|
457
|
+
parameters: {
|
|
458
|
+
type: "object",
|
|
459
|
+
properties: {
|
|
460
|
+
client_id: { type: "number", description: "Client ID" },
|
|
461
|
+
params: { type: "object", description: "Database parameters" },
|
|
462
|
+
},
|
|
463
|
+
required: ["client_id", "params"],
|
|
464
|
+
},
|
|
333
465
|
run: async (params, context) => withClient(context, "isp_db_add", (client) => client.call("sites_database_add", params)),
|
|
334
466
|
},
|
|
335
467
|
{
|
|
336
468
|
name: "isp_db_user_add",
|
|
337
469
|
description: "Create database user",
|
|
470
|
+
parameters: {
|
|
471
|
+
type: "object",
|
|
472
|
+
properties: {
|
|
473
|
+
client_id: { type: "number", description: "Client ID" },
|
|
474
|
+
params: { type: "object", description: "Database user parameters" },
|
|
475
|
+
},
|
|
476
|
+
required: ["client_id", "params"],
|
|
477
|
+
},
|
|
338
478
|
run: async (params, context) => withClient(context, "isp_db_user_add", (client) => client.call("sites_database_user_add", params)),
|
|
339
479
|
},
|
|
340
480
|
{
|
|
341
481
|
name: "isp_ssl_status",
|
|
342
482
|
description: "Check SSL and Let's Encrypt status for sites",
|
|
483
|
+
parameters: { type: "object", properties: {} },
|
|
343
484
|
run: async (_params, context) => withClient(context, "isp_ssl_status", async (client) => {
|
|
344
485
|
const sites = await fetchSites(client);
|
|
345
486
|
const status = (sites ?? []).map((site) => ({
|
|
@@ -354,6 +495,13 @@ function createTools() {
|
|
|
354
495
|
{
|
|
355
496
|
name: "isp_quota_check",
|
|
356
497
|
description: "Check quota values for a client",
|
|
498
|
+
parameters: {
|
|
499
|
+
type: "object",
|
|
500
|
+
properties: {
|
|
501
|
+
client_id: { type: "number", description: "Client ID" },
|
|
502
|
+
},
|
|
503
|
+
required: ["client_id"],
|
|
504
|
+
},
|
|
357
505
|
run: async (params, context) => withClient(context, "isp_quota_check", async (client) => {
|
|
358
506
|
const details = await client.call("client_get", { client_id: toNumber(params.client_id ?? params.clientId) });
|
|
359
507
|
return {
|
|
@@ -367,6 +515,7 @@ function createTools() {
|
|
|
367
515
|
{
|
|
368
516
|
name: "isp_backup_list",
|
|
369
517
|
description: "Backup list if API supports backup methods",
|
|
518
|
+
parameters: { type: "object", properties: {} },
|
|
370
519
|
run: async (_params, context) => withClient(context, "isp_backup_list", async () => ({
|
|
371
520
|
skipped: true,
|
|
372
521
|
reason: "No backup list method discovered in ISPConfig API",
|
|
@@ -375,23 +524,298 @@ function createTools() {
|
|
|
375
524
|
{
|
|
376
525
|
name: "isp_shell_user_add",
|
|
377
526
|
description: "Create shell user",
|
|
527
|
+
parameters: {
|
|
528
|
+
type: "object",
|
|
529
|
+
properties: {
|
|
530
|
+
client_id: { type: "number", description: "Client ID" },
|
|
531
|
+
params: { type: "object", description: "Shell user parameters" },
|
|
532
|
+
},
|
|
533
|
+
required: ["client_id", "params"],
|
|
534
|
+
},
|
|
378
535
|
run: async (params, context) => withClient(context, "isp_shell_user_add", (client) => client.call("sites_shell_user_add", params)),
|
|
379
536
|
},
|
|
380
537
|
{
|
|
381
538
|
name: "isp_ftp_user_add",
|
|
382
539
|
description: "Create FTP user",
|
|
540
|
+
parameters: {
|
|
541
|
+
type: "object",
|
|
542
|
+
properties: {
|
|
543
|
+
client_id: { type: "number", description: "Client ID" },
|
|
544
|
+
params: { type: "object", description: "FTP user parameters" },
|
|
545
|
+
},
|
|
546
|
+
required: ["client_id", "params"],
|
|
547
|
+
},
|
|
383
548
|
run: async (params, context) => withClient(context, "isp_ftp_user_add", (client) => client.call("sites_ftp_user_add", params)),
|
|
384
549
|
},
|
|
385
550
|
{
|
|
386
551
|
name: "isp_cron_list",
|
|
387
552
|
description: "List cron jobs",
|
|
553
|
+
parameters: { type: "object", properties: {} },
|
|
388
554
|
run: async (params, context) => withClient(context, "isp_cron_list", (client) => client.call("sites_cron_get", params)),
|
|
389
555
|
},
|
|
390
556
|
{
|
|
391
557
|
name: "isp_cron_add",
|
|
392
558
|
description: "Create cron job",
|
|
559
|
+
parameters: {
|
|
560
|
+
type: "object",
|
|
561
|
+
properties: {
|
|
562
|
+
client_id: { type: "number", description: "Client ID" },
|
|
563
|
+
params: { type: "object", description: "Cron job parameters" },
|
|
564
|
+
},
|
|
565
|
+
required: ["client_id", "params"],
|
|
566
|
+
},
|
|
393
567
|
run: async (params, context) => withClient(context, "isp_cron_add", (client) => client.call("sites_cron_add", params)),
|
|
394
568
|
},
|
|
569
|
+
// -------------------------------------------------------------------------
|
|
570
|
+
// New in v0.3.0 - Client management
|
|
571
|
+
// -------------------------------------------------------------------------
|
|
572
|
+
{
|
|
573
|
+
name: "isp_client_update",
|
|
574
|
+
description: "Update an existing ISPConfig client",
|
|
575
|
+
parameters: {
|
|
576
|
+
type: "object",
|
|
577
|
+
properties: {
|
|
578
|
+
client_id: { type: "number", description: "Client ID" },
|
|
579
|
+
params: { type: "object", description: "Fields to update" },
|
|
580
|
+
},
|
|
581
|
+
required: ["client_id", "params"],
|
|
582
|
+
},
|
|
583
|
+
run: async (params, context) => withClient(context, "isp_client_update", (client) => client.call("client_update", params)),
|
|
584
|
+
},
|
|
585
|
+
{
|
|
586
|
+
name: "isp_client_delete",
|
|
587
|
+
description: "Delete an ISPConfig client",
|
|
588
|
+
parameters: {
|
|
589
|
+
type: "object",
|
|
590
|
+
properties: {
|
|
591
|
+
client_id: { type: "number", description: "Client ID to delete" },
|
|
592
|
+
},
|
|
593
|
+
required: ["client_id"],
|
|
594
|
+
},
|
|
595
|
+
run: async (params, context) => withClient(context, "isp_client_delete", (client) => client.call("client_delete", params)),
|
|
596
|
+
},
|
|
597
|
+
// -------------------------------------------------------------------------
|
|
598
|
+
// New in v0.3.0 - Website/Domain management
|
|
599
|
+
// -------------------------------------------------------------------------
|
|
600
|
+
{
|
|
601
|
+
name: "isp_site_update",
|
|
602
|
+
description: "Update web site configuration",
|
|
603
|
+
parameters: {
|
|
604
|
+
type: "object",
|
|
605
|
+
properties: {
|
|
606
|
+
client_id: { type: "number", description: "Client ID" },
|
|
607
|
+
primary_id: { type: "number", description: "Site ID to update" },
|
|
608
|
+
params: { type: "object", description: "Fields to update" },
|
|
609
|
+
},
|
|
610
|
+
required: ["client_id", "primary_id", "params"],
|
|
611
|
+
},
|
|
612
|
+
run: async (params, context) => withClient(context, "isp_site_update", (client) => client.call("sites_web_domain_update", params)),
|
|
613
|
+
},
|
|
614
|
+
{
|
|
615
|
+
name: "isp_site_delete",
|
|
616
|
+
description: "Delete a web site",
|
|
617
|
+
parameters: {
|
|
618
|
+
type: "object",
|
|
619
|
+
properties: {
|
|
620
|
+
primary_id: { type: "number", description: "Site ID to delete" },
|
|
621
|
+
},
|
|
622
|
+
required: ["primary_id"],
|
|
623
|
+
},
|
|
624
|
+
run: async (params, context) => withClient(context, "isp_site_delete", (client) => client.call("sites_web_domain_delete", params)),
|
|
625
|
+
},
|
|
626
|
+
// -------------------------------------------------------------------------
|
|
627
|
+
// New in v0.3.0 - Mail
|
|
628
|
+
// -------------------------------------------------------------------------
|
|
629
|
+
{
|
|
630
|
+
name: "isp_mail_domain_delete",
|
|
631
|
+
description: "Delete a mail domain",
|
|
632
|
+
parameters: {
|
|
633
|
+
type: "object",
|
|
634
|
+
properties: {
|
|
635
|
+
primary_id: { type: "number", description: "Mail domain ID to delete" },
|
|
636
|
+
},
|
|
637
|
+
required: ["primary_id"],
|
|
638
|
+
},
|
|
639
|
+
run: async (params, context) => withClient(context, "isp_mail_domain_delete", (client) => client.call("mail_domain_delete", params)),
|
|
640
|
+
},
|
|
641
|
+
{
|
|
642
|
+
name: "isp_mail_alias_list",
|
|
643
|
+
description: "List mail aliases",
|
|
644
|
+
parameters: { type: "object", properties: {} },
|
|
645
|
+
run: async (params, context) => withClient(context, "isp_mail_alias_list", (client) => client.call("mail_alias_get", params)),
|
|
646
|
+
},
|
|
647
|
+
{
|
|
648
|
+
name: "isp_mail_alias_add",
|
|
649
|
+
description: "Create a mail alias",
|
|
650
|
+
parameters: {
|
|
651
|
+
type: "object",
|
|
652
|
+
properties: {
|
|
653
|
+
client_id: { type: "number", description: "Client ID" },
|
|
654
|
+
params: { type: "object", description: "Mail alias parameters" },
|
|
655
|
+
},
|
|
656
|
+
required: ["client_id", "params"],
|
|
657
|
+
},
|
|
658
|
+
run: async (params, context) => withClient(context, "isp_mail_alias_add", (client) => client.call("mail_alias_add", params)),
|
|
659
|
+
},
|
|
660
|
+
{
|
|
661
|
+
name: "isp_mail_alias_delete",
|
|
662
|
+
description: "Delete a mail alias",
|
|
663
|
+
parameters: {
|
|
664
|
+
type: "object",
|
|
665
|
+
properties: {
|
|
666
|
+
primary_id: { type: "number", description: "Mail alias ID to delete" },
|
|
667
|
+
},
|
|
668
|
+
required: ["primary_id"],
|
|
669
|
+
},
|
|
670
|
+
run: async (params, context) => withClient(context, "isp_mail_alias_delete", (client) => client.call("mail_alias_delete", params)),
|
|
671
|
+
},
|
|
672
|
+
{
|
|
673
|
+
name: "isp_mail_forward_list",
|
|
674
|
+
description: "List mail forwards",
|
|
675
|
+
parameters: { type: "object", properties: {} },
|
|
676
|
+
run: async (params, context) => withClient(context, "isp_mail_forward_list", (client) => client.call("mail_forward_get", params)),
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
name: "isp_mail_forward_add",
|
|
680
|
+
description: "Create a mail forward",
|
|
681
|
+
parameters: {
|
|
682
|
+
type: "object",
|
|
683
|
+
properties: {
|
|
684
|
+
client_id: { type: "number", description: "Client ID" },
|
|
685
|
+
params: { type: "object", description: "Mail forward parameters" },
|
|
686
|
+
},
|
|
687
|
+
required: ["client_id", "params"],
|
|
688
|
+
},
|
|
689
|
+
run: async (params, context) => withClient(context, "isp_mail_forward_add", (client) => client.call("mail_forward_add", params)),
|
|
690
|
+
},
|
|
691
|
+
{
|
|
692
|
+
name: "isp_mail_forward_delete",
|
|
693
|
+
description: "Delete a mail forward",
|
|
694
|
+
parameters: {
|
|
695
|
+
type: "object",
|
|
696
|
+
properties: {
|
|
697
|
+
primary_id: { type: "number", description: "Mail forward ID to delete" },
|
|
698
|
+
},
|
|
699
|
+
required: ["primary_id"],
|
|
700
|
+
},
|
|
701
|
+
run: async (params, context) => withClient(context, "isp_mail_forward_delete", (client) => client.call("mail_forward_delete", params)),
|
|
702
|
+
},
|
|
703
|
+
// -------------------------------------------------------------------------
|
|
704
|
+
// New in v0.3.0 - DNS
|
|
705
|
+
// -------------------------------------------------------------------------
|
|
706
|
+
{
|
|
707
|
+
name: "isp_dns_zone_delete",
|
|
708
|
+
description: "Delete a DNS zone",
|
|
709
|
+
parameters: {
|
|
710
|
+
type: "object",
|
|
711
|
+
properties: {
|
|
712
|
+
primary_id: { type: "number", description: "DNS zone ID to delete" },
|
|
713
|
+
},
|
|
714
|
+
required: ["primary_id"],
|
|
715
|
+
},
|
|
716
|
+
run: async (params, context) => withClient(context, "isp_dns_zone_delete", (client) => client.call("dns_zone_delete", params)),
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
name: "isp_dns_record_update",
|
|
720
|
+
description: "Update a DNS record using type-specific method",
|
|
721
|
+
parameters: {
|
|
722
|
+
type: "object",
|
|
723
|
+
properties: {
|
|
724
|
+
type: { type: "string", enum: ["A", "AAAA", "MX", "TXT", "CNAME"], description: "DNS record type" },
|
|
725
|
+
client_id: { type: "number", description: "Client ID" },
|
|
726
|
+
primary_id: { type: "number", description: "DNS record ID to update" },
|
|
727
|
+
params: { type: "object", description: "Fields to update" },
|
|
728
|
+
},
|
|
729
|
+
required: ["type", "primary_id"],
|
|
730
|
+
},
|
|
731
|
+
run: async (params, context) => withClient(context, "isp_dns_record_update", (client) => {
|
|
732
|
+
const method = dnsMethodForType(String(params.type ?? ""), "update");
|
|
733
|
+
return client.call(method, params);
|
|
734
|
+
}),
|
|
735
|
+
},
|
|
736
|
+
// -------------------------------------------------------------------------
|
|
737
|
+
// New in v0.3.0 - Databases
|
|
738
|
+
// -------------------------------------------------------------------------
|
|
739
|
+
{
|
|
740
|
+
name: "isp_db_delete",
|
|
741
|
+
description: "Delete a database",
|
|
742
|
+
parameters: {
|
|
743
|
+
type: "object",
|
|
744
|
+
properties: {
|
|
745
|
+
primary_id: { type: "number", description: "Database ID to delete" },
|
|
746
|
+
},
|
|
747
|
+
required: ["primary_id"],
|
|
748
|
+
},
|
|
749
|
+
run: async (params, context) => withClient(context, "isp_db_delete", (client) => client.call("sites_database_delete", params)),
|
|
750
|
+
},
|
|
751
|
+
{
|
|
752
|
+
name: "isp_db_user_delete",
|
|
753
|
+
description: "Delete a database user",
|
|
754
|
+
parameters: {
|
|
755
|
+
type: "object",
|
|
756
|
+
properties: {
|
|
757
|
+
primary_id: { type: "number", description: "Database user ID to delete" },
|
|
758
|
+
},
|
|
759
|
+
required: ["primary_id"],
|
|
760
|
+
},
|
|
761
|
+
run: async (params, context) => withClient(context, "isp_db_user_delete", (client) => client.call("sites_database_user_delete", params)),
|
|
762
|
+
},
|
|
763
|
+
// -------------------------------------------------------------------------
|
|
764
|
+
// New in v0.3.0 - FTP / Shell
|
|
765
|
+
// -------------------------------------------------------------------------
|
|
766
|
+
{
|
|
767
|
+
name: "isp_ftp_user_delete",
|
|
768
|
+
description: "Delete an FTP user",
|
|
769
|
+
parameters: {
|
|
770
|
+
type: "object",
|
|
771
|
+
properties: {
|
|
772
|
+
primary_id: { type: "number", description: "FTP user ID to delete" },
|
|
773
|
+
},
|
|
774
|
+
required: ["primary_id"],
|
|
775
|
+
},
|
|
776
|
+
run: async (params, context) => withClient(context, "isp_ftp_user_delete", (client) => client.call("sites_ftp_user_delete", params)),
|
|
777
|
+
},
|
|
778
|
+
{
|
|
779
|
+
name: "isp_shell_user_delete",
|
|
780
|
+
description: "Delete a shell user",
|
|
781
|
+
parameters: {
|
|
782
|
+
type: "object",
|
|
783
|
+
properties: {
|
|
784
|
+
primary_id: { type: "number", description: "Shell user ID to delete" },
|
|
785
|
+
},
|
|
786
|
+
required: ["primary_id"],
|
|
787
|
+
},
|
|
788
|
+
run: async (params, context) => withClient(context, "isp_shell_user_delete", (client) => client.call("sites_shell_user_delete", params)),
|
|
789
|
+
},
|
|
790
|
+
// -------------------------------------------------------------------------
|
|
791
|
+
// New in v0.3.0 - Cron
|
|
792
|
+
// -------------------------------------------------------------------------
|
|
793
|
+
{
|
|
794
|
+
name: "isp_cron_delete",
|
|
795
|
+
description: "Delete a cron job",
|
|
796
|
+
parameters: {
|
|
797
|
+
type: "object",
|
|
798
|
+
properties: {
|
|
799
|
+
primary_id: { type: "number", description: "Cron job ID to delete" },
|
|
800
|
+
},
|
|
801
|
+
required: ["primary_id"],
|
|
802
|
+
},
|
|
803
|
+
run: async (params, context) => withClient(context, "isp_cron_delete", (client) => client.call("sites_cron_delete", params)),
|
|
804
|
+
},
|
|
805
|
+
{
|
|
806
|
+
name: "isp_cron_update",
|
|
807
|
+
description: "Update an existing cron job",
|
|
808
|
+
parameters: {
|
|
809
|
+
type: "object",
|
|
810
|
+
properties: {
|
|
811
|
+
client_id: { type: "number", description: "Client ID" },
|
|
812
|
+
primary_id: { type: "number", description: "Cron job ID to update" },
|
|
813
|
+
params: { type: "object", description: "Fields to update" },
|
|
814
|
+
},
|
|
815
|
+
required: ["client_id", "primary_id", "params"],
|
|
816
|
+
},
|
|
817
|
+
run: async (params, context) => withClient(context, "isp_cron_update", (client) => client.call("sites_cron_update", params)),
|
|
818
|
+
},
|
|
395
819
|
];
|
|
396
820
|
return raw.map((tool) => ({
|
|
397
821
|
...tool,
|