@mks2508/coolify-mks-cli-mcp 0.5.0 → 0.6.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/cli/coolify-state.d.ts +51 -0
- package/dist/cli/coolify-state.d.ts.map +1 -0
- package/dist/cli/index.js +2862 -631
- package/dist/coolify/config.d.ts +1 -1
- package/dist/coolify/config.d.ts.map +1 -1
- package/dist/coolify/index.d.ts +626 -12
- package/dist/coolify/index.d.ts.map +1 -1
- package/dist/coolify/types.d.ts +87 -3
- package/dist/coolify/types.d.ts.map +1 -1
- package/dist/dist-C4hIkHif.js +66 -0
- package/dist/dist-C4hIkHif.js.map +1 -0
- package/dist/dist-DEPvJhbP.js +3 -0
- package/dist/index.cjs +8511 -28542
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +32 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8470 -28506
- package/dist/index.js.map +1 -1
- package/dist/network.d.ts +75 -0
- package/dist/network.d.ts.map +1 -0
- package/dist/sdk.d.ts +356 -0
- package/dist/sdk.d.ts.map +1 -0
- package/dist/server/index.d.ts +9 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/sse.js +3 -1
- package/dist/server/stdio.d.ts +0 -2
- package/dist/server/stdio.d.ts.map +1 -1
- package/dist/server/stdio.js +3307 -1618
- package/dist/tools/definitions.d.ts +1 -1
- package/dist/tools/definitions.d.ts.map +1 -1
- package/dist/tools/handlers.d.ts +6 -7
- package/dist/tools/handlers.d.ts.map +1 -1
- package/dist/tools/index.d.ts +8 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/trace.d.ts +71 -0
- package/dist/trace.d.ts.map +1 -0
- package/dist/utils/format.d.ts +1 -1
- package/dist/utils/format.d.ts.map +1 -1
- package/package.json +13 -7
- package/src/cli/actions.ts +162 -0
- package/src/cli/commands/active-deployments.ts +24 -0
- package/src/cli/commands/build-logs.ts +25 -22
- package/src/cli/commands/cancel-deploy.ts +35 -0
- package/src/cli/commands/config.ts +53 -47
- package/src/cli/commands/create.ts +74 -53
- package/src/cli/commands/databases.ts +63 -0
- package/src/cli/commands/db.ts +68 -0
- package/src/cli/commands/delete.ts +41 -29
- package/src/cli/commands/deploy.ts +42 -21
- package/src/cli/commands/deployments.ts +41 -31
- package/src/cli/commands/destinations.ts +19 -27
- package/src/cli/commands/diagnose.ts +139 -0
- package/src/cli/commands/env.ts +66 -41
- package/src/cli/commands/environments.ts +36 -32
- package/src/cli/commands/exec.ts +39 -0
- package/src/cli/commands/keys.ts +46 -0
- package/src/cli/commands/list.ts +29 -27
- package/src/cli/commands/logs.ts +33 -18
- package/src/cli/commands/network.ts +145 -0
- package/src/cli/commands/projects.ts +51 -39
- package/src/cli/commands/restart.ts +34 -18
- package/src/cli/commands/server-resources.ts +71 -0
- package/src/cli/commands/servers.ts +23 -23
- package/src/cli/commands/service-logs.ts +24 -16
- package/src/cli/commands/services.ts +63 -0
- package/src/cli/commands/show.ts +72 -41
- package/src/cli/commands/start.ts +34 -18
- package/src/cli/commands/stop.ts +34 -18
- package/src/cli/commands/svc.ts +68 -0
- package/src/cli/commands/teams.ts +60 -0
- package/src/cli/commands/update.ts +73 -49
- package/src/cli/commands/version.ts +37 -0
- package/src/cli/coolify-state.ts +88 -0
- package/src/cli/index.ts +383 -151
- package/src/coolify/config.ts +29 -27
- package/src/coolify/index.ts +1829 -123
- package/src/coolify/types.ts +217 -124
- package/src/index.ts +82 -868
- package/src/network.ts +298 -0
- package/src/sdk.ts +597 -0
- package/src/server/index.ts +13 -0
- package/src/server/sse.ts +33 -25
- package/src/server/stdio.ts +24 -27
- package/src/tools/definitions.ts +893 -264
- package/src/tools/handlers.ts +556 -748
- package/src/tools/index.ts +8 -0
- package/src/trace.ts +116 -0
- package/src/utils/format.ts +36 -33
package/dist/coolify/index.d.ts
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @module
|
|
7
7
|
*/
|
|
8
|
-
import { type Result } from
|
|
9
|
-
import { type ICoolifyAppOptions, type ICoolifyAppResult, type ICoolifyApplication, type ICoolifyDeleteResult, type ICoolifyDeployment, type ICoolifyDeployOptions, type ICoolifyDeployResult, type ICoolifyDestination, type ICoolifyEnvironment, type ICoolifyLogs, type ICoolifyLogsOptions, type ICoolifyProject, type ICoolifyServer, type ICoolifyTeam, type ICoolifyUpdateOptions, type IProgressCallback } from
|
|
8
|
+
import { type Result } from "@mks2508/no-throw";
|
|
9
|
+
import { type ICoolifyAppOptions, type ICoolifyAppResult, type ICoolifyApplication, type ICoolifyDatabase, type ICoolifyDatabaseBackup, type ICoolifyDeleteResult, type ICoolifyDeployment, type ICoolifyDeployOptions, type ICoolifyDeployResult, type ICoolifyDestination, type ICoolifyEnvironment, type ICoolifyLogs, type ICoolifyLogsOptions, type ICoolifyPrivateKey, type ICoolifyProject, type ICoolifyServer, type ICoolifyServerDomain, type ICoolifyServerResource, type ICoolifyService as ICoolifyServiceType, type ICoolifyTeam, type ICoolifyUpdateOptions, type ICoolifyVersion, type IProgressCallback } from "./types.js";
|
|
10
10
|
/**
|
|
11
11
|
* Environment variable from Coolify API.
|
|
12
12
|
*/
|
|
@@ -110,7 +110,7 @@ export declare class CoolifyService {
|
|
|
110
110
|
* @param isBuildTime - Whether the variable is available at build time (only for new vars)
|
|
111
111
|
* @returns Result indicating success or error
|
|
112
112
|
*/
|
|
113
|
-
setEnvironmentVariable(appUuid: string, key: string, value: string,
|
|
113
|
+
setEnvironmentVariable(appUuid: string, key: string, value: string, _isBuildTime?: boolean): Promise<Result<void, Error>>;
|
|
114
114
|
/**
|
|
115
115
|
* Deletes an environment variable from an application.
|
|
116
116
|
*
|
|
@@ -129,9 +129,11 @@ export declare class CoolifyService {
|
|
|
129
129
|
/**
|
|
130
130
|
* Lists available servers in Coolify.
|
|
131
131
|
*
|
|
132
|
+
* @param page - Optional page number for pagination
|
|
133
|
+
* @param perPage - Optional number of items per page
|
|
132
134
|
* @returns Result with servers or error
|
|
133
135
|
*/
|
|
134
|
-
listServers(): Promise<Result<ICoolifyServer[], Error>>;
|
|
136
|
+
listServers(page?: number, perPage?: number): Promise<Result<ICoolifyServer[], Error>>;
|
|
135
137
|
/**
|
|
136
138
|
* Gets details of a specific server.
|
|
137
139
|
*
|
|
@@ -142,9 +144,11 @@ export declare class CoolifyService {
|
|
|
142
144
|
/**
|
|
143
145
|
* Lists all GitHub Apps configured in Coolify.
|
|
144
146
|
*
|
|
147
|
+
* @param page - Optional page number for pagination
|
|
148
|
+
* @param perPage - Optional number of items per page
|
|
145
149
|
* @returns Result with GitHub Apps list or error
|
|
146
150
|
*/
|
|
147
|
-
listGithubApps(): Promise<Result<Array<{
|
|
151
|
+
listGithubApps(page?: number, perPage?: number): Promise<Result<Array<{
|
|
148
152
|
id: number;
|
|
149
153
|
uuid: string;
|
|
150
154
|
name: string;
|
|
@@ -153,9 +157,11 @@ export declare class CoolifyService {
|
|
|
153
157
|
/**
|
|
154
158
|
* Lists all projects.
|
|
155
159
|
*
|
|
160
|
+
* @param page - Optional page number for pagination
|
|
161
|
+
* @param perPage - Optional number of items per page
|
|
156
162
|
* @returns Result with projects list or error
|
|
157
163
|
*/
|
|
158
|
-
listProjects(): Promise<Result<ICoolifyProject[], Error>>;
|
|
164
|
+
listProjects(page?: number, perPage?: number): Promise<Result<ICoolifyProject[], Error>>;
|
|
159
165
|
/**
|
|
160
166
|
* Creates a new project.
|
|
161
167
|
*
|
|
@@ -174,9 +180,11 @@ export declare class CoolifyService {
|
|
|
174
180
|
/**
|
|
175
181
|
* Lists all teams.
|
|
176
182
|
*
|
|
183
|
+
* @param page - Optional page number for pagination
|
|
184
|
+
* @param perPage - Optional number of items per page
|
|
177
185
|
* @returns Result with teams list or error
|
|
178
186
|
*/
|
|
179
|
-
listTeams(): Promise<Result<ICoolifyTeam[], Error>>;
|
|
187
|
+
listTeams(page?: number, perPage?: number): Promise<Result<ICoolifyTeam[], Error>>;
|
|
180
188
|
/**
|
|
181
189
|
* Gets available destinations for a server.
|
|
182
190
|
*
|
|
@@ -189,16 +197,24 @@ export declare class CoolifyService {
|
|
|
189
197
|
*
|
|
190
198
|
* @param teamId - Optional team ID to filter by
|
|
191
199
|
* @param projectId - Optional project ID to filter by
|
|
200
|
+
* @param page - Optional page number for pagination
|
|
201
|
+
* @param perPage - Optional number of items per page
|
|
192
202
|
* @returns Result with applications list or error
|
|
193
203
|
*/
|
|
194
|
-
listApplications(teamId?: string, projectId?: string): Promise<Result<ICoolifyApplication[], Error>>;
|
|
204
|
+
listApplications(teamId?: string, projectId?: string, page?: number, perPage?: number): Promise<Result<ICoolifyApplication[], Error>>;
|
|
195
205
|
/**
|
|
196
206
|
* Deletes an application.
|
|
197
207
|
*
|
|
198
208
|
* @param appUuid - Application UUID
|
|
209
|
+
* @param options - Delete options for cascade deletion
|
|
199
210
|
* @returns Result indicating success or error
|
|
200
211
|
*/
|
|
201
|
-
deleteApplication(appUuid: string
|
|
212
|
+
deleteApplication(appUuid: string, options?: {
|
|
213
|
+
deleteConfigurations?: boolean;
|
|
214
|
+
deleteVolumes?: boolean;
|
|
215
|
+
dockerCleanup?: boolean;
|
|
216
|
+
deleteConnectedNetworks?: boolean;
|
|
217
|
+
}): Promise<Result<ICoolifyDeleteResult, Error>>;
|
|
202
218
|
/**
|
|
203
219
|
* Updates an application configuration.
|
|
204
220
|
*
|
|
@@ -215,6 +231,31 @@ export declare class CoolifyService {
|
|
|
215
231
|
* @returns Result with logs or error
|
|
216
232
|
*/
|
|
217
233
|
getApplicationLogs(appUuid: string, options?: ICoolifyLogsOptions): Promise<Result<ICoolifyLogs, Error>>;
|
|
234
|
+
/**
|
|
235
|
+
* Executes a command on an application's running container.
|
|
236
|
+
*
|
|
237
|
+
* @param appUuid - Application UUID
|
|
238
|
+
* @param command - Shell command to execute
|
|
239
|
+
* @returns Result with command output or error
|
|
240
|
+
*/
|
|
241
|
+
executeCommand(appUuid: string, command: string): Promise<Result<{
|
|
242
|
+
message?: string;
|
|
243
|
+
response?: string;
|
|
244
|
+
}, Error>>;
|
|
245
|
+
/**
|
|
246
|
+
* Bulk updates environment variables for an application.
|
|
247
|
+
*
|
|
248
|
+
* @param appUuid - Application UUID
|
|
249
|
+
* @param envVars - Array of { key, value, is_preview? } objects
|
|
250
|
+
* @returns Result indicating success or error
|
|
251
|
+
*/
|
|
252
|
+
bulkUpdateEnvironmentVariables(appUuid: string, envVars: Array<{
|
|
253
|
+
key: string;
|
|
254
|
+
value: string;
|
|
255
|
+
is_preview?: boolean;
|
|
256
|
+
}>): Promise<Result<{
|
|
257
|
+
message: string;
|
|
258
|
+
}, Error>>;
|
|
218
259
|
/**
|
|
219
260
|
* Gets deployment history for an application.
|
|
220
261
|
*
|
|
@@ -224,13 +265,19 @@ export declare class CoolifyService {
|
|
|
224
265
|
getApplicationDeploymentHistory(appUuid: string): Promise<Result<ICoolifyDeployment[], Error>>;
|
|
225
266
|
/**
|
|
226
267
|
* Starts a stopped application.
|
|
268
|
+
* Note: Coolify API uses GET for application start/stop/restart.
|
|
227
269
|
*
|
|
228
270
|
* @param appUuid - Application UUID
|
|
271
|
+
* @param options - Optional start options (force, instant_deploy)
|
|
229
272
|
* @returns Result with application status or error
|
|
230
273
|
*/
|
|
231
|
-
startApplication(appUuid: string
|
|
274
|
+
startApplication(appUuid: string, options?: {
|
|
275
|
+
force?: boolean;
|
|
276
|
+
instantDeploy?: boolean;
|
|
277
|
+
}): Promise<Result<ICoolifyApplication, Error>>;
|
|
232
278
|
/**
|
|
233
279
|
* Stops a running application.
|
|
280
|
+
* Note: Coolify API uses GET for application start/stop/restart.
|
|
234
281
|
*
|
|
235
282
|
* @param appUuid - Application UUID
|
|
236
283
|
* @returns Result with application status or error
|
|
@@ -238,17 +285,422 @@ export declare class CoolifyService {
|
|
|
238
285
|
stopApplication(appUuid: string): Promise<Result<ICoolifyApplication, Error>>;
|
|
239
286
|
/**
|
|
240
287
|
* Restarts an application.
|
|
288
|
+
* Note: Coolify API uses GET for application start/stop/restart.
|
|
241
289
|
*
|
|
242
290
|
* @param appUuid - Application UUID
|
|
243
291
|
* @returns Result with application status or error
|
|
244
292
|
*/
|
|
245
293
|
restartApplication(appUuid: string): Promise<Result<ICoolifyApplication, Error>>;
|
|
294
|
+
/**
|
|
295
|
+
* Gets the Coolify server version.
|
|
296
|
+
*
|
|
297
|
+
* @returns Result with version info or error
|
|
298
|
+
*/
|
|
299
|
+
getVersion(): Promise<Result<ICoolifyVersion, Error>>;
|
|
300
|
+
/**
|
|
301
|
+
* Lists all databases.
|
|
302
|
+
*
|
|
303
|
+
* @param page - Optional page number
|
|
304
|
+
* @param perPage - Optional items per page
|
|
305
|
+
* @returns Result with databases list or error
|
|
306
|
+
*/
|
|
307
|
+
listDatabases(page?: number, perPage?: number): Promise<Result<ICoolifyDatabase[], Error>>;
|
|
308
|
+
/**
|
|
309
|
+
* Gets details of a specific database.
|
|
310
|
+
*
|
|
311
|
+
* @param uuid - Database UUID
|
|
312
|
+
* @returns Result with database details or error
|
|
313
|
+
*/
|
|
314
|
+
getDatabase(uuid: string): Promise<Result<ICoolifyDatabase, Error>>;
|
|
315
|
+
/**
|
|
316
|
+
* Creates a database of the specified type.
|
|
317
|
+
*
|
|
318
|
+
* @param dbType - Database type (postgresql, mysql, mariadb, mongodb, redis, keydb, clickhouse, dragonfly)
|
|
319
|
+
* @param data - Database creation data
|
|
320
|
+
* @returns Result with created database UUID or error
|
|
321
|
+
*/
|
|
322
|
+
createDatabase(dbType: string, data: Record<string, unknown>): Promise<Result<{
|
|
323
|
+
uuid: string;
|
|
324
|
+
}, Error>>;
|
|
325
|
+
/**
|
|
326
|
+
* Updates a database configuration.
|
|
327
|
+
*
|
|
328
|
+
* @param uuid - Database UUID
|
|
329
|
+
* @param data - Update data
|
|
330
|
+
* @returns Result with updated database or error
|
|
331
|
+
*/
|
|
332
|
+
updateDatabase(uuid: string, data: Record<string, unknown>): Promise<Result<ICoolifyDatabase, Error>>;
|
|
333
|
+
/**
|
|
334
|
+
* Deletes a database.
|
|
335
|
+
*
|
|
336
|
+
* @param uuid - Database UUID
|
|
337
|
+
* @param options - Delete options for cascade deletion
|
|
338
|
+
* @returns Result indicating success or error
|
|
339
|
+
*/
|
|
340
|
+
deleteDatabase(uuid: string, options?: {
|
|
341
|
+
deleteConfigurations?: boolean;
|
|
342
|
+
deleteVolumes?: boolean;
|
|
343
|
+
dockerCleanup?: boolean;
|
|
344
|
+
deleteConnectedNetworks?: boolean;
|
|
345
|
+
}): Promise<Result<ICoolifyDeleteResult, Error>>;
|
|
346
|
+
/**
|
|
347
|
+
* Starts a database.
|
|
348
|
+
*
|
|
349
|
+
* @param uuid - Database UUID
|
|
350
|
+
* @returns Result indicating success or error
|
|
351
|
+
*/
|
|
352
|
+
startDatabase(uuid: string): Promise<Result<{
|
|
353
|
+
message: string;
|
|
354
|
+
}, Error>>;
|
|
355
|
+
/**
|
|
356
|
+
* Stops a database.
|
|
357
|
+
*
|
|
358
|
+
* @param uuid - Database UUID
|
|
359
|
+
* @returns Result indicating success or error
|
|
360
|
+
*/
|
|
361
|
+
stopDatabase(uuid: string): Promise<Result<{
|
|
362
|
+
message: string;
|
|
363
|
+
}, Error>>;
|
|
364
|
+
/**
|
|
365
|
+
* Restarts a database.
|
|
366
|
+
*
|
|
367
|
+
* @param uuid - Database UUID
|
|
368
|
+
* @returns Result indicating success or error
|
|
369
|
+
*/
|
|
370
|
+
restartDatabase(uuid: string): Promise<Result<{
|
|
371
|
+
message: string;
|
|
372
|
+
}, Error>>;
|
|
373
|
+
/**
|
|
374
|
+
* Lists backups for a database.
|
|
375
|
+
*
|
|
376
|
+
* @param databaseUuid - Database UUID
|
|
377
|
+
* @returns Result with backups list or error
|
|
378
|
+
*/
|
|
379
|
+
listDatabaseBackups(databaseUuid: string): Promise<Result<ICoolifyDatabaseBackup[], Error>>;
|
|
380
|
+
/**
|
|
381
|
+
* Gets a specific database backup.
|
|
382
|
+
*
|
|
383
|
+
* @param databaseUuid - Database UUID
|
|
384
|
+
* @param backupUuid - Backup UUID
|
|
385
|
+
* @returns Result with backup details or error
|
|
386
|
+
*/
|
|
387
|
+
getDatabaseBackup(databaseUuid: string, backupUuid: string): Promise<Result<ICoolifyDatabaseBackup, Error>>;
|
|
388
|
+
/**
|
|
389
|
+
* Creates a database backup.
|
|
390
|
+
*
|
|
391
|
+
* @param databaseUuid - Database UUID
|
|
392
|
+
* @param data - Backup creation data
|
|
393
|
+
* @returns Result with created backup or error
|
|
394
|
+
*/
|
|
395
|
+
createDatabaseBackup(databaseUuid: string, data: Record<string, unknown>): Promise<Result<ICoolifyDatabaseBackup, Error>>;
|
|
396
|
+
/**
|
|
397
|
+
* Updates a database backup.
|
|
398
|
+
*
|
|
399
|
+
* @param databaseUuid - Database UUID
|
|
400
|
+
* @param backupUuid - Backup UUID
|
|
401
|
+
* @param data - Update data
|
|
402
|
+
* @returns Result indicating success or error
|
|
403
|
+
*/
|
|
404
|
+
updateDatabaseBackup(databaseUuid: string, backupUuid: string, data: Record<string, unknown>): Promise<Result<{
|
|
405
|
+
message: string;
|
|
406
|
+
}, Error>>;
|
|
407
|
+
/**
|
|
408
|
+
* Deletes a database backup.
|
|
409
|
+
*
|
|
410
|
+
* @param databaseUuid - Database UUID
|
|
411
|
+
* @param backupUuid - Backup UUID
|
|
412
|
+
* @returns Result indicating success or error
|
|
413
|
+
*/
|
|
414
|
+
deleteDatabaseBackup(databaseUuid: string, backupUuid: string): Promise<Result<{
|
|
415
|
+
message: string;
|
|
416
|
+
}, Error>>;
|
|
417
|
+
/**
|
|
418
|
+
* Lists all services.
|
|
419
|
+
*
|
|
420
|
+
* @param page - Optional page number
|
|
421
|
+
* @param perPage - Optional items per page
|
|
422
|
+
* @returns Result with services list or error
|
|
423
|
+
*/
|
|
424
|
+
listServices(page?: number, perPage?: number): Promise<Result<ICoolifyServiceType[], Error>>;
|
|
425
|
+
/**
|
|
426
|
+
* Gets details of a specific service.
|
|
427
|
+
*
|
|
428
|
+
* @param uuid - Service UUID
|
|
429
|
+
* @returns Result with service details or error
|
|
430
|
+
*/
|
|
431
|
+
getService(uuid: string): Promise<Result<ICoolifyServiceType, Error>>;
|
|
432
|
+
/**
|
|
433
|
+
* Creates a new service.
|
|
434
|
+
*
|
|
435
|
+
* @param data - Service creation data
|
|
436
|
+
* @returns Result with created service or error
|
|
437
|
+
*/
|
|
438
|
+
createService(data: Record<string, unknown>): Promise<Result<{
|
|
439
|
+
uuid: string;
|
|
440
|
+
}, Error>>;
|
|
441
|
+
/**
|
|
442
|
+
* Updates a service configuration.
|
|
443
|
+
*
|
|
444
|
+
* @param uuid - Service UUID
|
|
445
|
+
* @param data - Update data
|
|
446
|
+
* @returns Result with updated service or error
|
|
447
|
+
*/
|
|
448
|
+
updateService(uuid: string, data: Record<string, unknown>): Promise<Result<ICoolifyServiceType, Error>>;
|
|
449
|
+
/**
|
|
450
|
+
* Deletes a service.
|
|
451
|
+
*
|
|
452
|
+
* @param uuid - Service UUID
|
|
453
|
+
* @param options - Delete options for cascade deletion
|
|
454
|
+
* @returns Result indicating success or error
|
|
455
|
+
*/
|
|
456
|
+
deleteService(uuid: string, options?: {
|
|
457
|
+
deleteConfigurations?: boolean;
|
|
458
|
+
deleteVolumes?: boolean;
|
|
459
|
+
dockerCleanup?: boolean;
|
|
460
|
+
deleteConnectedNetworks?: boolean;
|
|
461
|
+
}): Promise<Result<ICoolifyDeleteResult, Error>>;
|
|
462
|
+
/**
|
|
463
|
+
* Starts a service.
|
|
464
|
+
* Note: Coolify API uses GET for service start/stop/restart.
|
|
465
|
+
*
|
|
466
|
+
* @param uuid - Service UUID
|
|
467
|
+
* @returns Result indicating success or error
|
|
468
|
+
*/
|
|
469
|
+
startService(uuid: string): Promise<Result<{
|
|
470
|
+
message: string;
|
|
471
|
+
}, Error>>;
|
|
472
|
+
/**
|
|
473
|
+
* Stops a service.
|
|
474
|
+
* Note: Coolify API uses GET for service start/stop/restart.
|
|
475
|
+
*
|
|
476
|
+
* @param uuid - Service UUID
|
|
477
|
+
* @returns Result indicating success or error
|
|
478
|
+
*/
|
|
479
|
+
stopService(uuid: string): Promise<Result<{
|
|
480
|
+
message: string;
|
|
481
|
+
}, Error>>;
|
|
482
|
+
/**
|
|
483
|
+
* Restarts a service.
|
|
484
|
+
* Note: Coolify API uses GET for service start/stop/restart.
|
|
485
|
+
*
|
|
486
|
+
* @param uuid - Service UUID
|
|
487
|
+
* @returns Result indicating success or error
|
|
488
|
+
*/
|
|
489
|
+
restartService(uuid: string): Promise<Result<{
|
|
490
|
+
message: string;
|
|
491
|
+
}, Error>>;
|
|
492
|
+
/**
|
|
493
|
+
* Lists environment variables for a service.
|
|
494
|
+
*
|
|
495
|
+
* @param uuid - Service UUID
|
|
496
|
+
* @returns Result with env vars list or error
|
|
497
|
+
*/
|
|
498
|
+
listServiceEnvVars(uuid: string): Promise<Result<ICoolifyEnvVar[], Error>>;
|
|
499
|
+
/**
|
|
500
|
+
* Creates an environment variable for a service.
|
|
501
|
+
*
|
|
502
|
+
* @param uuid - Service UUID
|
|
503
|
+
* @param data - Env var data (key, value, is_preview)
|
|
504
|
+
* @returns Result with created env var UUID or error
|
|
505
|
+
*/
|
|
506
|
+
createServiceEnvVar(uuid: string, data: {
|
|
507
|
+
key: string;
|
|
508
|
+
value: string;
|
|
509
|
+
is_preview?: boolean;
|
|
510
|
+
}): Promise<Result<{
|
|
511
|
+
uuid: string;
|
|
512
|
+
}, Error>>;
|
|
513
|
+
/**
|
|
514
|
+
* Gets resources deployed on a server.
|
|
515
|
+
*
|
|
516
|
+
* @param serverUuid - Server UUID
|
|
517
|
+
* @returns Result with server resources or error
|
|
518
|
+
*/
|
|
519
|
+
getServerResources(serverUuid: string): Promise<Result<ICoolifyServerResource[], Error>>;
|
|
520
|
+
/**
|
|
521
|
+
* Gets domains configured on a server.
|
|
522
|
+
*
|
|
523
|
+
* @param serverUuid - Server UUID
|
|
524
|
+
* @returns Result with server domains or error
|
|
525
|
+
*/
|
|
526
|
+
getServerDomains(serverUuid: string): Promise<Result<ICoolifyServerDomain[], Error>>;
|
|
527
|
+
/**
|
|
528
|
+
* Validates a server connection.
|
|
529
|
+
*
|
|
530
|
+
* @param serverUuid - Server UUID
|
|
531
|
+
* @returns Result with validation status or error
|
|
532
|
+
*/
|
|
533
|
+
validateServer(serverUuid: string): Promise<Result<{
|
|
534
|
+
message: string;
|
|
535
|
+
}, Error>>;
|
|
536
|
+
/**
|
|
537
|
+
* Creates a new server.
|
|
538
|
+
*
|
|
539
|
+
* @param data - Server creation data
|
|
540
|
+
* @returns Result with created server UUID or error
|
|
541
|
+
*/
|
|
542
|
+
createServer(data: Record<string, unknown>): Promise<Result<{
|
|
543
|
+
uuid: string;
|
|
544
|
+
}, Error>>;
|
|
545
|
+
/**
|
|
546
|
+
* Deletes a server.
|
|
547
|
+
*
|
|
548
|
+
* @param serverUuid - Server UUID
|
|
549
|
+
* @returns Result indicating success or error
|
|
550
|
+
*/
|
|
551
|
+
deleteServer(serverUuid: string): Promise<Result<{
|
|
552
|
+
message: string;
|
|
553
|
+
}, Error>>;
|
|
554
|
+
/**
|
|
555
|
+
* Updates a project.
|
|
556
|
+
*
|
|
557
|
+
* @param uuid - Project UUID
|
|
558
|
+
* @param data - Update data (name, description)
|
|
559
|
+
* @returns Result with updated project or error
|
|
560
|
+
*/
|
|
561
|
+
updateProject(uuid: string, data: {
|
|
562
|
+
name?: string;
|
|
563
|
+
description?: string;
|
|
564
|
+
}): Promise<Result<ICoolifyProject, Error>>;
|
|
565
|
+
/**
|
|
566
|
+
* Deletes a project.
|
|
567
|
+
*
|
|
568
|
+
* @param uuid - Project UUID
|
|
569
|
+
* @returns Result indicating success or error
|
|
570
|
+
*/
|
|
571
|
+
deleteProject(uuid: string): Promise<Result<{
|
|
572
|
+
message: string;
|
|
573
|
+
}, Error>>;
|
|
574
|
+
/**
|
|
575
|
+
* Creates a new environment within a project.
|
|
576
|
+
*
|
|
577
|
+
* @param projectUuid - Project UUID
|
|
578
|
+
* @param data - Environment creation data (name, description)
|
|
579
|
+
* @returns Result with created environment UUID or error
|
|
580
|
+
*/
|
|
581
|
+
createProjectEnvironment(projectUuid: string, data: {
|
|
582
|
+
name: string;
|
|
583
|
+
description?: string;
|
|
584
|
+
}): Promise<Result<{
|
|
585
|
+
uuid: string;
|
|
586
|
+
}, Error>>;
|
|
587
|
+
/**
|
|
588
|
+
* Gets the current team.
|
|
589
|
+
*
|
|
590
|
+
* @returns Result with current team or error
|
|
591
|
+
*/
|
|
592
|
+
getCurrentTeam(): Promise<Result<ICoolifyTeam, Error>>;
|
|
593
|
+
/**
|
|
594
|
+
* Gets a specific team by ID.
|
|
595
|
+
*
|
|
596
|
+
* @param id - Team ID
|
|
597
|
+
* @returns Result with team details or error
|
|
598
|
+
*/
|
|
599
|
+
getTeam(id: number): Promise<Result<ICoolifyTeam, Error>>;
|
|
600
|
+
/**
|
|
601
|
+
* Gets members of a specific team.
|
|
602
|
+
*
|
|
603
|
+
* @param id - Team ID
|
|
604
|
+
* @returns Result with team members or error
|
|
605
|
+
*/
|
|
606
|
+
getTeamMembers(id: number): Promise<Result<Array<{
|
|
607
|
+
id: number;
|
|
608
|
+
name: string;
|
|
609
|
+
email: string;
|
|
610
|
+
}>, Error>>;
|
|
611
|
+
/**
|
|
612
|
+
* Cancels a deployment.
|
|
613
|
+
*
|
|
614
|
+
* @param deploymentUuid - Deployment UUID
|
|
615
|
+
* @returns Result indicating success or error
|
|
616
|
+
*/
|
|
617
|
+
cancelDeployment(deploymentUuid: string): Promise<Result<{
|
|
618
|
+
message: string;
|
|
619
|
+
}, Error>>;
|
|
620
|
+
/**
|
|
621
|
+
* Lists all private keys.
|
|
622
|
+
*
|
|
623
|
+
* @returns Result with private keys list or error
|
|
624
|
+
*/
|
|
625
|
+
listPrivateKeys(): Promise<Result<ICoolifyPrivateKey[], Error>>;
|
|
626
|
+
/**
|
|
627
|
+
* Gets a specific private key.
|
|
628
|
+
*
|
|
629
|
+
* @param uuid - Private key UUID
|
|
630
|
+
* @returns Result with private key details or error
|
|
631
|
+
*/
|
|
632
|
+
getPrivateKey(uuid: string): Promise<Result<ICoolifyPrivateKey, Error>>;
|
|
633
|
+
/**
|
|
634
|
+
* Creates a new private key.
|
|
635
|
+
*
|
|
636
|
+
* @param data - Key creation data (name, private_key, description)
|
|
637
|
+
* @returns Result with created key UUID or error
|
|
638
|
+
*/
|
|
639
|
+
createPrivateKey(data: {
|
|
640
|
+
name: string;
|
|
641
|
+
private_key: string;
|
|
642
|
+
description?: string;
|
|
643
|
+
}): Promise<Result<{
|
|
644
|
+
uuid: string;
|
|
645
|
+
}, Error>>;
|
|
646
|
+
/**
|
|
647
|
+
* Updates a private key.
|
|
648
|
+
*
|
|
649
|
+
* @param uuid - Private key UUID
|
|
650
|
+
* @param data - Update data
|
|
651
|
+
* @returns Result with updated key or error
|
|
652
|
+
*/
|
|
653
|
+
updatePrivateKey(uuid: string, data: {
|
|
654
|
+
name?: string;
|
|
655
|
+
private_key?: string;
|
|
656
|
+
description?: string;
|
|
657
|
+
}): Promise<Result<ICoolifyPrivateKey, Error>>;
|
|
658
|
+
/**
|
|
659
|
+
* Deletes a private key.
|
|
660
|
+
*
|
|
661
|
+
* @param uuid - Private key UUID
|
|
662
|
+
* @returns Result indicating success or error
|
|
663
|
+
*/
|
|
664
|
+
deletePrivateKey(uuid: string): Promise<Result<{
|
|
665
|
+
message: string;
|
|
666
|
+
}, Error>>;
|
|
667
|
+
/**
|
|
668
|
+
* Creates a GitHub App configuration.
|
|
669
|
+
*
|
|
670
|
+
* @param data - GitHub App creation data
|
|
671
|
+
* @returns Result with created app or error
|
|
672
|
+
*/
|
|
673
|
+
createGitHubApp(data: Record<string, unknown>): Promise<Result<{
|
|
674
|
+
id: number;
|
|
675
|
+
uuid: string;
|
|
676
|
+
}, Error>>;
|
|
677
|
+
/**
|
|
678
|
+
* Updates a GitHub App configuration.
|
|
679
|
+
*
|
|
680
|
+
* @param id - GitHub App ID
|
|
681
|
+
* @param data - Update data
|
|
682
|
+
* @returns Result with updated app or error
|
|
683
|
+
*/
|
|
684
|
+
updateGitHubApp(id: number, data: Record<string, unknown>): Promise<Result<{
|
|
685
|
+
message: string;
|
|
686
|
+
}, Error>>;
|
|
687
|
+
/**
|
|
688
|
+
* Deletes a GitHub App configuration.
|
|
689
|
+
*
|
|
690
|
+
* @param id - GitHub App ID
|
|
691
|
+
* @returns Result indicating success or error
|
|
692
|
+
*/
|
|
693
|
+
deleteGitHubApp(id: number): Promise<Result<{
|
|
694
|
+
message: string;
|
|
695
|
+
}, Error>>;
|
|
246
696
|
/**
|
|
247
697
|
* Lists all active and queued deployments.
|
|
248
698
|
*
|
|
699
|
+
* @param page - Optional page number for pagination
|
|
700
|
+
* @param perPage - Optional number of items per page
|
|
249
701
|
* @returns Result with deployments list or error
|
|
250
702
|
*/
|
|
251
|
-
listDeployments(): Promise<Result<ICoolifyDeployment[], Error>>;
|
|
703
|
+
listDeployments(page?: number, perPage?: number): Promise<Result<ICoolifyDeployment[], Error>>;
|
|
252
704
|
/**
|
|
253
705
|
* Gets detailed information about a specific deployment.
|
|
254
706
|
*
|
|
@@ -256,6 +708,17 @@ export declare class CoolifyService {
|
|
|
256
708
|
* @returns Result with deployment details or error
|
|
257
709
|
*/
|
|
258
710
|
getDeployment(deploymentUuid: string): Promise<Result<ICoolifyDeployment, Error>>;
|
|
711
|
+
/**
|
|
712
|
+
* Gets logs for a specific deployment.
|
|
713
|
+
*
|
|
714
|
+
* @param deploymentUuid - Deployment UUID
|
|
715
|
+
* @returns Result with deployment status and logs or error
|
|
716
|
+
*/
|
|
717
|
+
getDeploymentLogs(deploymentUuid: string): Promise<Result<{
|
|
718
|
+
status: string;
|
|
719
|
+
logs: string;
|
|
720
|
+
deployment_uuid: string;
|
|
721
|
+
}, Error>>;
|
|
259
722
|
/**
|
|
260
723
|
* Gets deployment history for a specific application.
|
|
261
724
|
*
|
|
@@ -265,6 +728,157 @@ export declare class CoolifyService {
|
|
|
265
728
|
* @returns Result with deployments list or error
|
|
266
729
|
*/
|
|
267
730
|
getApplicationDeployments(appUuid: string, skip?: number, take?: number): Promise<Result<ICoolifyDeployment[], Error>>;
|
|
731
|
+
/**
|
|
732
|
+
* Lists deployments for a specific application.
|
|
733
|
+
*
|
|
734
|
+
* Uses the /deployments/applications/{appUuid} endpoint which returns
|
|
735
|
+
* all deployments (active, queued, and completed) for a single application.
|
|
736
|
+
* This differs from listDeployments() which returns ALL deployments globally.
|
|
737
|
+
*
|
|
738
|
+
* @param appUuid - Application UUID
|
|
739
|
+
* @returns Result with deployments list or error
|
|
740
|
+
*/
|
|
741
|
+
listApplicationDeployments(appUuid: string): Promise<Result<ICoolifyDeployment[], Error>>;
|
|
742
|
+
/**
|
|
743
|
+
* Resolves an application by UUID, name, or domain (FQDN).
|
|
744
|
+
*
|
|
745
|
+
* @param query - UUID, name, or domain to search for
|
|
746
|
+
* @returns Result with application or error
|
|
747
|
+
*/
|
|
748
|
+
resolveApplication(query: string): Promise<Result<ICoolifyApplication, Error>>;
|
|
749
|
+
/**
|
|
750
|
+
* Resolves a server by UUID, name, or IP address.
|
|
751
|
+
*
|
|
752
|
+
* @param query - UUID, name, or IP to search for
|
|
753
|
+
* @returns Result with server or error
|
|
754
|
+
*/
|
|
755
|
+
resolveServer(query: string): Promise<Result<ICoolifyServer, Error>>;
|
|
756
|
+
/**
|
|
757
|
+
* Checks if a string looks like a UUID (Coolify or standard format).
|
|
758
|
+
*
|
|
759
|
+
* @param query - String to check
|
|
760
|
+
* @returns true if it looks like a UUID
|
|
761
|
+
*/
|
|
762
|
+
private isLikelyUuid;
|
|
763
|
+
/**
|
|
764
|
+
* Diagnoses an application by aggregating health, logs, deployments, and env vars.
|
|
765
|
+
*
|
|
766
|
+
* @param query - Application UUID, name, or domain
|
|
767
|
+
* @returns Result with diagnostic report or error
|
|
768
|
+
*/
|
|
769
|
+
diagnoseApplication(query: string): Promise<Result<{
|
|
770
|
+
application: ICoolifyApplication;
|
|
771
|
+
recentDeployments: ICoolifyDeployment[];
|
|
772
|
+
envVarCount: number;
|
|
773
|
+
recentLogs: string[];
|
|
774
|
+
issues: string[];
|
|
775
|
+
}, Error>>;
|
|
776
|
+
/**
|
|
777
|
+
* Diagnoses a server by aggregating health, resources, and domains.
|
|
778
|
+
*
|
|
779
|
+
* @param query - Server UUID, name, or IP
|
|
780
|
+
* @returns Result with diagnostic report or error
|
|
781
|
+
*/
|
|
782
|
+
diagnoseServer(query: string): Promise<Result<{
|
|
783
|
+
server: ICoolifyServer;
|
|
784
|
+
resources: ICoolifyServerResource[];
|
|
785
|
+
domains: ICoolifyServerDomain[];
|
|
786
|
+
issues: string[];
|
|
787
|
+
}, Error>>;
|
|
788
|
+
/**
|
|
789
|
+
* Scans all infrastructure for potential issues.
|
|
790
|
+
*
|
|
791
|
+
* @returns Result with issues report or error
|
|
792
|
+
*/
|
|
793
|
+
findInfrastructureIssues(): Promise<Result<{
|
|
794
|
+
totalServers: number;
|
|
795
|
+
totalApps: number;
|
|
796
|
+
totalDatabases: number;
|
|
797
|
+
totalServices: number;
|
|
798
|
+
issues: Array<{
|
|
799
|
+
type: string;
|
|
800
|
+
resource: string;
|
|
801
|
+
uuid: string;
|
|
802
|
+
message: string;
|
|
803
|
+
}>;
|
|
804
|
+
}, Error>>;
|
|
805
|
+
/**
|
|
806
|
+
* Restarts all applications in a project.
|
|
807
|
+
*
|
|
808
|
+
* @param projectUuid - Project UUID
|
|
809
|
+
* @returns Result with batch operation results
|
|
810
|
+
*/
|
|
811
|
+
restartProjectApps(projectUuid: string): Promise<Result<{
|
|
812
|
+
total: number;
|
|
813
|
+
succeeded: number;
|
|
814
|
+
failed: string[];
|
|
815
|
+
}, Error>>;
|
|
816
|
+
/**
|
|
817
|
+
* Redeploys all applications in a project.
|
|
818
|
+
*
|
|
819
|
+
* @param projectUuid - Project UUID
|
|
820
|
+
* @param force - Force rebuild
|
|
821
|
+
* @returns Result with batch operation results
|
|
822
|
+
*/
|
|
823
|
+
redeployProjectApps(projectUuid: string, force?: boolean): Promise<Result<{
|
|
824
|
+
total: number;
|
|
825
|
+
succeeded: number;
|
|
826
|
+
failed: string[];
|
|
827
|
+
}, Error>>;
|
|
828
|
+
/**
|
|
829
|
+
* Stops all running applications.
|
|
830
|
+
*
|
|
831
|
+
* @returns Result with batch operation results
|
|
832
|
+
*/
|
|
833
|
+
stopAllApps(): Promise<Result<{
|
|
834
|
+
total: number;
|
|
835
|
+
succeeded: number;
|
|
836
|
+
failed: string[];
|
|
837
|
+
}, Error>>;
|
|
838
|
+
/**
|
|
839
|
+
* Lists applications with minimal fields for token efficiency.
|
|
840
|
+
*
|
|
841
|
+
* @returns Result with application summaries or error
|
|
842
|
+
*/
|
|
843
|
+
listApplicationSummaries(): Promise<Result<Array<{
|
|
844
|
+
uuid: string;
|
|
845
|
+
name: string;
|
|
846
|
+
status: string;
|
|
847
|
+
fqdn: string | null;
|
|
848
|
+
}>, Error>>;
|
|
849
|
+
/**
|
|
850
|
+
* Lists servers with minimal fields for token efficiency.
|
|
851
|
+
*
|
|
852
|
+
* @returns Result with server summaries or error
|
|
853
|
+
*/
|
|
854
|
+
listServerSummaries(): Promise<Result<Array<{
|
|
855
|
+
uuid: string;
|
|
856
|
+
name: string;
|
|
857
|
+
ip: string;
|
|
858
|
+
is_reachable: boolean;
|
|
859
|
+
}>, Error>>;
|
|
860
|
+
/**
|
|
861
|
+
* Lists databases with minimal fields for token efficiency.
|
|
862
|
+
*
|
|
863
|
+
* @returns Result with database summaries or error
|
|
864
|
+
*/
|
|
865
|
+
listDatabaseSummaries(): Promise<Result<Array<{
|
|
866
|
+
uuid: string;
|
|
867
|
+
name: string;
|
|
868
|
+
type: string;
|
|
869
|
+
status: string;
|
|
870
|
+
}>, Error>>;
|
|
871
|
+
/**
|
|
872
|
+
* Lists services with minimal fields for token efficiency.
|
|
873
|
+
*
|
|
874
|
+
* @returns Result with service summaries or error
|
|
875
|
+
*/
|
|
876
|
+
listServiceSummaries(): Promise<Result<Array<{
|
|
877
|
+
uuid: string;
|
|
878
|
+
name: string;
|
|
879
|
+
type: string;
|
|
880
|
+
status: string;
|
|
881
|
+
}>, Error>>;
|
|
268
882
|
}
|
|
269
883
|
/**
|
|
270
884
|
* Gets the singleton CoolifyService instance.
|
|
@@ -272,5 +886,5 @@ export declare class CoolifyService {
|
|
|
272
886
|
* @returns The CoolifyService instance
|
|
273
887
|
*/
|
|
274
888
|
export declare function getCoolifyService(): CoolifyService;
|
|
275
|
-
export type { ICoolifyServer, ICoolifyDestination, ICoolifyProject, ICoolifyTeam, ICoolifyApplication, ICoolifyDeployment, ICoolifyAppOptions, ICoolifyAppResult, ICoolifyDeployOptions, ICoolifyDeployResult, ICoolifyDeleteResult, ICoolifyUpdateOptions, ICoolifyLogsOptions, ICoolifyLogs, IProgressCallback, } from
|
|
889
|
+
export type { ICoolifyServer, ICoolifyServerResource, ICoolifyServerDomain, ICoolifyDestination, ICoolifyProject, ICoolifyTeam, ICoolifyApplication, ICoolifyDatabase, ICoolifyDatabaseBackup, ICoolifyService as ICoolifyServiceType, ICoolifyPrivateKey, ICoolifyDeployment, ICoolifyVersion, ICoolifyAppOptions, ICoolifyAppResult, ICoolifyDeployOptions, ICoolifyDeployResult, ICoolifyDeleteResult, ICoolifyUpdateOptions, ICoolifyLogsOptions, ICoolifyLogs, IProgressCallback, } from "./types.js";
|
|
276
890
|
//# sourceMappingURL=index.d.ts.map
|