@vibescope/mcp-server 0.4.3 → 0.4.5
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/api-client/bodies-of-work.d.ts +125 -0
- package/dist/api-client/bodies-of-work.js +78 -0
- package/dist/api-client/chat.d.ts +26 -0
- package/dist/api-client/chat.js +20 -0
- package/dist/api-client/connectors.d.ts +104 -0
- package/dist/api-client/connectors.js +46 -0
- package/dist/api-client/deployment.d.ts +190 -0
- package/dist/api-client/deployment.js +113 -0
- package/dist/api-client/file-checkouts.d.ts +71 -0
- package/dist/api-client/file-checkouts.js +43 -0
- package/dist/api-client/git-issues.d.ts +55 -0
- package/dist/api-client/git-issues.js +34 -0
- package/dist/api-client/index.d.ts +619 -1
- package/dist/api-client/index.js +148 -0
- package/dist/api-client/organizations.d.ts +101 -0
- package/dist/api-client/organizations.js +86 -0
- package/dist/api-client/progress.d.ts +61 -0
- package/dist/api-client/progress.js +34 -0
- package/dist/api-client/requests.d.ts +28 -0
- package/dist/api-client/requests.js +28 -0
- package/dist/api-client/sprints.d.ts +153 -0
- package/dist/api-client/sprints.js +82 -0
- package/dist/api-client/subtasks.d.ts +37 -0
- package/dist/api-client/subtasks.js +23 -0
- package/dist/api-client.d.ts +22 -0
- package/dist/api-client.js +15 -0
- package/dist/handlers/blockers.js +4 -0
- package/dist/handlers/chat.d.ts +21 -0
- package/dist/handlers/chat.js +59 -0
- package/dist/handlers/deployment.d.ts +3 -0
- package/dist/handlers/deployment.js +23 -0
- package/dist/handlers/discovery.js +1 -0
- package/dist/handlers/index.d.ts +1 -0
- package/dist/handlers/index.js +3 -0
- package/dist/handlers/session.js +113 -0
- package/dist/handlers/tasks.js +7 -0
- package/dist/handlers/tool-docs.js +7 -0
- package/dist/tools/deployment.js +13 -0
- package/docs/TOOLS.md +17 -3
- package/package.json +1 -1
- package/src/api-client/bodies-of-work.ts +194 -0
- package/src/api-client/chat.ts +50 -0
- package/src/api-client/connectors.ts +152 -0
- package/src/api-client/deployment.ts +313 -0
- package/src/api-client/file-checkouts.ts +115 -0
- package/src/api-client/git-issues.ts +88 -0
- package/src/api-client/index.ts +179 -13
- package/src/api-client/organizations.ts +185 -0
- package/src/api-client/progress.ts +94 -0
- package/src/api-client/requests.ts +54 -0
- package/src/api-client/sprints.ts +227 -0
- package/src/api-client/subtasks.ts +57 -0
- package/src/api-client.test.ts +16 -19
- package/src/api-client.ts +34 -0
- package/src/handlers/__test-setup__.ts +4 -0
- package/src/handlers/blockers.ts +9 -0
- package/src/handlers/chat.test.ts +185 -0
- package/src/handlers/chat.ts +69 -0
- package/src/handlers/deployment.ts +29 -0
- package/src/handlers/discovery.ts +1 -0
- package/src/handlers/index.ts +3 -0
- package/src/handlers/session.ts +138 -0
- package/src/handlers/tasks.ts +12 -0
- package/src/handlers/tool-docs.ts +8 -0
- package/src/tools/deployment.ts +13 -0
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bodies of Work API Methods
|
|
3
|
+
*
|
|
4
|
+
* Methods for body-of-work management:
|
|
5
|
+
* - createBodyOfWork: Create a new body of work
|
|
6
|
+
* - getBodyOfWork: Get a single body of work with tasks
|
|
7
|
+
* - getBodiesOfWork: List bodies of work for a project
|
|
8
|
+
* - updateBodyOfWork: Update body of work settings
|
|
9
|
+
* - deleteBodyOfWork: Delete a body of work
|
|
10
|
+
* - addTaskToBodyOfWork: Add a task to a body of work
|
|
11
|
+
* - removeTaskFromBodyOfWork: Remove a task from its body of work
|
|
12
|
+
* - activateBodyOfWork: Activate a draft body of work
|
|
13
|
+
* - addTaskDependency: Add a dependency between tasks
|
|
14
|
+
* - removeTaskDependency: Remove a task dependency
|
|
15
|
+
* - getTaskDependencies: Get dependencies for a body of work or task
|
|
16
|
+
* - getNextBodyOfWorkTask: Get next available task from a body of work
|
|
17
|
+
*/
|
|
18
|
+
import type { ApiResponse, ProxyFn } from './types.js';
|
|
19
|
+
export interface BodiesOfWorkMethods {
|
|
20
|
+
createBodyOfWork(projectId: string, params: {
|
|
21
|
+
title: string;
|
|
22
|
+
description?: string;
|
|
23
|
+
auto_deploy_on_completion?: boolean;
|
|
24
|
+
deploy_environment?: string;
|
|
25
|
+
deploy_version_bump?: string;
|
|
26
|
+
deploy_trigger?: string;
|
|
27
|
+
}): Promise<ApiResponse<{
|
|
28
|
+
success: boolean;
|
|
29
|
+
body_of_work_id: string;
|
|
30
|
+
}>>;
|
|
31
|
+
getBodyOfWork(bodyOfWorkId: string): Promise<ApiResponse<{
|
|
32
|
+
body_of_work: {
|
|
33
|
+
id: string;
|
|
34
|
+
title: string;
|
|
35
|
+
description?: string;
|
|
36
|
+
status: string;
|
|
37
|
+
auto_deploy_on_completion: boolean;
|
|
38
|
+
};
|
|
39
|
+
tasks: {
|
|
40
|
+
pre: Array<{
|
|
41
|
+
id: string;
|
|
42
|
+
title: string;
|
|
43
|
+
status: string;
|
|
44
|
+
}>;
|
|
45
|
+
core: Array<{
|
|
46
|
+
id: string;
|
|
47
|
+
title: string;
|
|
48
|
+
status: string;
|
|
49
|
+
}>;
|
|
50
|
+
post: Array<{
|
|
51
|
+
id: string;
|
|
52
|
+
title: string;
|
|
53
|
+
status: string;
|
|
54
|
+
}>;
|
|
55
|
+
};
|
|
56
|
+
}>>;
|
|
57
|
+
getBodiesOfWork(projectId: string, params?: {
|
|
58
|
+
status?: string;
|
|
59
|
+
limit?: number;
|
|
60
|
+
offset?: number;
|
|
61
|
+
search_query?: string;
|
|
62
|
+
}): Promise<ApiResponse<{
|
|
63
|
+
bodies_of_work: Array<{
|
|
64
|
+
id: string;
|
|
65
|
+
title: string;
|
|
66
|
+
description?: string;
|
|
67
|
+
status: string;
|
|
68
|
+
task_counts: {
|
|
69
|
+
pre: number;
|
|
70
|
+
core: number;
|
|
71
|
+
post: number;
|
|
72
|
+
};
|
|
73
|
+
}>;
|
|
74
|
+
}>>;
|
|
75
|
+
updateBodyOfWork(bodyOfWorkId: string, updates: {
|
|
76
|
+
title?: string;
|
|
77
|
+
description?: string;
|
|
78
|
+
auto_deploy_on_completion?: boolean;
|
|
79
|
+
deploy_environment?: string;
|
|
80
|
+
deploy_version_bump?: string;
|
|
81
|
+
deploy_trigger?: string;
|
|
82
|
+
}): Promise<ApiResponse<{
|
|
83
|
+
success: boolean;
|
|
84
|
+
}>>;
|
|
85
|
+
deleteBodyOfWork(bodyOfWorkId: string): Promise<ApiResponse<{
|
|
86
|
+
success: boolean;
|
|
87
|
+
}>>;
|
|
88
|
+
addTaskToBodyOfWork(bodyOfWorkId: string, taskId: string, phase?: string, orderIndex?: number): Promise<ApiResponse<{
|
|
89
|
+
success: boolean;
|
|
90
|
+
}>>;
|
|
91
|
+
removeTaskFromBodyOfWork(taskId: string): Promise<ApiResponse<{
|
|
92
|
+
success: boolean;
|
|
93
|
+
}>>;
|
|
94
|
+
activateBodyOfWork(bodyOfWorkId: string): Promise<ApiResponse<{
|
|
95
|
+
success: boolean;
|
|
96
|
+
status: string;
|
|
97
|
+
}>>;
|
|
98
|
+
addTaskDependency(bodyOfWorkId: string, taskId: string, dependsOnTaskId: string): Promise<ApiResponse<{
|
|
99
|
+
success: boolean;
|
|
100
|
+
}>>;
|
|
101
|
+
removeTaskDependency(taskId: string, dependsOnTaskId: string): Promise<ApiResponse<{
|
|
102
|
+
success: boolean;
|
|
103
|
+
}>>;
|
|
104
|
+
getTaskDependencies(params: {
|
|
105
|
+
body_of_work_id?: string;
|
|
106
|
+
task_id?: string;
|
|
107
|
+
}): Promise<ApiResponse<{
|
|
108
|
+
dependencies: Array<{
|
|
109
|
+
id: string;
|
|
110
|
+
task_id: string;
|
|
111
|
+
depends_on_task_id: string;
|
|
112
|
+
created_at: string;
|
|
113
|
+
}>;
|
|
114
|
+
}>>;
|
|
115
|
+
getNextBodyOfWorkTask(bodyOfWorkId: string): Promise<ApiResponse<{
|
|
116
|
+
task?: {
|
|
117
|
+
id: string;
|
|
118
|
+
title: string;
|
|
119
|
+
priority: number;
|
|
120
|
+
phase: string;
|
|
121
|
+
} | null;
|
|
122
|
+
message?: string;
|
|
123
|
+
}>>;
|
|
124
|
+
}
|
|
125
|
+
export declare function createBodiesOfWorkMethods(proxy: ProxyFn): BodiesOfWorkMethods;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bodies of Work API Methods
|
|
3
|
+
*
|
|
4
|
+
* Methods for body-of-work management:
|
|
5
|
+
* - createBodyOfWork: Create a new body of work
|
|
6
|
+
* - getBodyOfWork: Get a single body of work with tasks
|
|
7
|
+
* - getBodiesOfWork: List bodies of work for a project
|
|
8
|
+
* - updateBodyOfWork: Update body of work settings
|
|
9
|
+
* - deleteBodyOfWork: Delete a body of work
|
|
10
|
+
* - addTaskToBodyOfWork: Add a task to a body of work
|
|
11
|
+
* - removeTaskFromBodyOfWork: Remove a task from its body of work
|
|
12
|
+
* - activateBodyOfWork: Activate a draft body of work
|
|
13
|
+
* - addTaskDependency: Add a dependency between tasks
|
|
14
|
+
* - removeTaskDependency: Remove a task dependency
|
|
15
|
+
* - getTaskDependencies: Get dependencies for a body of work or task
|
|
16
|
+
* - getNextBodyOfWorkTask: Get next available task from a body of work
|
|
17
|
+
*/
|
|
18
|
+
export function createBodiesOfWorkMethods(proxy) {
|
|
19
|
+
return {
|
|
20
|
+
async createBodyOfWork(projectId, params) {
|
|
21
|
+
return proxy('create_body_of_work', {
|
|
22
|
+
project_id: projectId,
|
|
23
|
+
...params
|
|
24
|
+
});
|
|
25
|
+
},
|
|
26
|
+
async getBodyOfWork(bodyOfWorkId) {
|
|
27
|
+
return proxy('get_body_of_work', { body_of_work_id: bodyOfWorkId });
|
|
28
|
+
},
|
|
29
|
+
async getBodiesOfWork(projectId, params) {
|
|
30
|
+
return proxy('get_bodies_of_work', {
|
|
31
|
+
project_id: projectId,
|
|
32
|
+
...params
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
async updateBodyOfWork(bodyOfWorkId, updates) {
|
|
36
|
+
return proxy('update_body_of_work', {
|
|
37
|
+
body_of_work_id: bodyOfWorkId,
|
|
38
|
+
...updates
|
|
39
|
+
});
|
|
40
|
+
},
|
|
41
|
+
async deleteBodyOfWork(bodyOfWorkId) {
|
|
42
|
+
return proxy('delete_body_of_work', { body_of_work_id: bodyOfWorkId });
|
|
43
|
+
},
|
|
44
|
+
async addTaskToBodyOfWork(bodyOfWorkId, taskId, phase, orderIndex) {
|
|
45
|
+
return proxy('add_task_to_body_of_work', {
|
|
46
|
+
body_of_work_id: bodyOfWorkId,
|
|
47
|
+
task_id: taskId,
|
|
48
|
+
phase,
|
|
49
|
+
order_index: orderIndex
|
|
50
|
+
});
|
|
51
|
+
},
|
|
52
|
+
async removeTaskFromBodyOfWork(taskId) {
|
|
53
|
+
return proxy('remove_task_from_body_of_work', { task_id: taskId });
|
|
54
|
+
},
|
|
55
|
+
async activateBodyOfWork(bodyOfWorkId) {
|
|
56
|
+
return proxy('activate_body_of_work', { body_of_work_id: bodyOfWorkId });
|
|
57
|
+
},
|
|
58
|
+
async addTaskDependency(bodyOfWorkId, taskId, dependsOnTaskId) {
|
|
59
|
+
return proxy('add_task_dependency', {
|
|
60
|
+
body_of_work_id: bodyOfWorkId,
|
|
61
|
+
task_id: taskId,
|
|
62
|
+
depends_on_task_id: dependsOnTaskId
|
|
63
|
+
});
|
|
64
|
+
},
|
|
65
|
+
async removeTaskDependency(taskId, dependsOnTaskId) {
|
|
66
|
+
return proxy('remove_task_dependency', {
|
|
67
|
+
task_id: taskId,
|
|
68
|
+
depends_on_task_id: dependsOnTaskId
|
|
69
|
+
});
|
|
70
|
+
},
|
|
71
|
+
async getTaskDependencies(params) {
|
|
72
|
+
return proxy('get_task_dependencies', params);
|
|
73
|
+
},
|
|
74
|
+
async getNextBodyOfWorkTask(bodyOfWorkId) {
|
|
75
|
+
return proxy('get_next_body_of_work_task', { body_of_work_id: bodyOfWorkId });
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chat API Methods
|
|
3
|
+
*
|
|
4
|
+
* Methods for project chat:
|
|
5
|
+
* - sendProjectMessage: Send a message to the project chat channel
|
|
6
|
+
* - getProjectMessages: Read recent messages from the project chat channel
|
|
7
|
+
*/
|
|
8
|
+
import type { ApiResponse, ProxyFn } from './types.js';
|
|
9
|
+
export interface ChatMethods {
|
|
10
|
+
sendProjectMessage(projectId: string, message: string, sessionId?: string): Promise<ApiResponse<{
|
|
11
|
+
success: boolean;
|
|
12
|
+
message_id: string;
|
|
13
|
+
sent_at: string;
|
|
14
|
+
}>>;
|
|
15
|
+
getProjectMessages(projectId: string, limit?: number): Promise<ApiResponse<{
|
|
16
|
+
messages: Array<{
|
|
17
|
+
id: string;
|
|
18
|
+
sender_type: string;
|
|
19
|
+
sender_name: string | null;
|
|
20
|
+
content: string;
|
|
21
|
+
created_at: string;
|
|
22
|
+
}>;
|
|
23
|
+
count: number;
|
|
24
|
+
}>>;
|
|
25
|
+
}
|
|
26
|
+
export declare function createChatMethods(proxy: ProxyFn): ChatMethods;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chat API Methods
|
|
3
|
+
*
|
|
4
|
+
* Methods for project chat:
|
|
5
|
+
* - sendProjectMessage: Send a message to the project chat channel
|
|
6
|
+
* - getProjectMessages: Read recent messages from the project chat channel
|
|
7
|
+
*/
|
|
8
|
+
export function createChatMethods(proxy) {
|
|
9
|
+
return {
|
|
10
|
+
async sendProjectMessage(projectId, message, sessionId) {
|
|
11
|
+
return proxy('send_project_message', { project_id: projectId, message }, sessionId ? { session_id: sessionId } : undefined);
|
|
12
|
+
},
|
|
13
|
+
async getProjectMessages(projectId, limit) {
|
|
14
|
+
return proxy('get_project_messages', {
|
|
15
|
+
project_id: projectId,
|
|
16
|
+
...(limit !== undefined && { limit }),
|
|
17
|
+
});
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Connectors API Methods
|
|
3
|
+
*
|
|
4
|
+
* Methods for external integrations (Slack, Discord, webhooks, etc.):
|
|
5
|
+
* - getConnectors: List connectors for a project
|
|
6
|
+
* - getConnector: Get a single connector
|
|
7
|
+
* - addConnector: Add a new connector
|
|
8
|
+
* - updateConnector: Update connector configuration
|
|
9
|
+
* - deleteConnector: Delete a connector
|
|
10
|
+
* - testConnector: Send a test event to a connector
|
|
11
|
+
* - getConnectorEvents: Get event history for a connector
|
|
12
|
+
*/
|
|
13
|
+
import type { ApiResponse, ProxyFn } from './types.js';
|
|
14
|
+
export interface ConnectorsMethods {
|
|
15
|
+
getConnectors(projectId: string, params?: {
|
|
16
|
+
type?: string;
|
|
17
|
+
status?: string;
|
|
18
|
+
limit?: number;
|
|
19
|
+
offset?: number;
|
|
20
|
+
}): Promise<ApiResponse<{
|
|
21
|
+
connectors: Array<{
|
|
22
|
+
id: string;
|
|
23
|
+
name: string;
|
|
24
|
+
type: string;
|
|
25
|
+
description?: string;
|
|
26
|
+
status: string;
|
|
27
|
+
events: Record<string, boolean>;
|
|
28
|
+
events_sent: number;
|
|
29
|
+
last_triggered_at?: string;
|
|
30
|
+
last_error?: string;
|
|
31
|
+
last_error_at?: string;
|
|
32
|
+
created_at: string;
|
|
33
|
+
}>;
|
|
34
|
+
total_count: number;
|
|
35
|
+
has_more: boolean;
|
|
36
|
+
}>>;
|
|
37
|
+
getConnector(connectorId: string): Promise<ApiResponse<{
|
|
38
|
+
connector: {
|
|
39
|
+
id: string;
|
|
40
|
+
name: string;
|
|
41
|
+
type: string;
|
|
42
|
+
description?: string;
|
|
43
|
+
config: Record<string, unknown>;
|
|
44
|
+
events: Record<string, boolean>;
|
|
45
|
+
status: string;
|
|
46
|
+
events_sent: number;
|
|
47
|
+
last_triggered_at?: string;
|
|
48
|
+
last_error?: string;
|
|
49
|
+
last_error_at?: string;
|
|
50
|
+
created_at: string;
|
|
51
|
+
};
|
|
52
|
+
}>>;
|
|
53
|
+
addConnector(projectId: string, params: {
|
|
54
|
+
name: string;
|
|
55
|
+
type: string;
|
|
56
|
+
description?: string;
|
|
57
|
+
config?: Record<string, unknown>;
|
|
58
|
+
events?: Record<string, boolean>;
|
|
59
|
+
}): Promise<ApiResponse<{
|
|
60
|
+
success: boolean;
|
|
61
|
+
connector_id: string;
|
|
62
|
+
}>>;
|
|
63
|
+
updateConnector(connectorId: string, updates: {
|
|
64
|
+
name?: string;
|
|
65
|
+
description?: string;
|
|
66
|
+
config?: Record<string, unknown>;
|
|
67
|
+
events?: Record<string, boolean>;
|
|
68
|
+
status?: string;
|
|
69
|
+
}): Promise<ApiResponse<{
|
|
70
|
+
success: boolean;
|
|
71
|
+
connector_id: string;
|
|
72
|
+
}>>;
|
|
73
|
+
deleteConnector(connectorId: string): Promise<ApiResponse<{
|
|
74
|
+
success: boolean;
|
|
75
|
+
}>>;
|
|
76
|
+
testConnector(connectorId: string): Promise<ApiResponse<{
|
|
77
|
+
success: boolean;
|
|
78
|
+
event_id: string;
|
|
79
|
+
status?: number;
|
|
80
|
+
error?: string;
|
|
81
|
+
}>>;
|
|
82
|
+
getConnectorEvents(params: {
|
|
83
|
+
connector_id?: string;
|
|
84
|
+
project_id?: string;
|
|
85
|
+
status?: string;
|
|
86
|
+
limit?: number;
|
|
87
|
+
offset?: number;
|
|
88
|
+
}): Promise<ApiResponse<{
|
|
89
|
+
events: Array<{
|
|
90
|
+
id: string;
|
|
91
|
+
connector_id: string;
|
|
92
|
+
event_type: string;
|
|
93
|
+
status: string;
|
|
94
|
+
response_status?: number;
|
|
95
|
+
error_message?: string;
|
|
96
|
+
attempts: number;
|
|
97
|
+
created_at: string;
|
|
98
|
+
sent_at?: string;
|
|
99
|
+
}>;
|
|
100
|
+
total_count: number;
|
|
101
|
+
has_more: boolean;
|
|
102
|
+
}>>;
|
|
103
|
+
}
|
|
104
|
+
export declare function createConnectorsMethods(proxy: ProxyFn): ConnectorsMethods;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Connectors API Methods
|
|
3
|
+
*
|
|
4
|
+
* Methods for external integrations (Slack, Discord, webhooks, etc.):
|
|
5
|
+
* - getConnectors: List connectors for a project
|
|
6
|
+
* - getConnector: Get a single connector
|
|
7
|
+
* - addConnector: Add a new connector
|
|
8
|
+
* - updateConnector: Update connector configuration
|
|
9
|
+
* - deleteConnector: Delete a connector
|
|
10
|
+
* - testConnector: Send a test event to a connector
|
|
11
|
+
* - getConnectorEvents: Get event history for a connector
|
|
12
|
+
*/
|
|
13
|
+
export function createConnectorsMethods(proxy) {
|
|
14
|
+
return {
|
|
15
|
+
async getConnectors(projectId, params) {
|
|
16
|
+
return proxy('get_connectors', {
|
|
17
|
+
project_id: projectId,
|
|
18
|
+
...params
|
|
19
|
+
});
|
|
20
|
+
},
|
|
21
|
+
async getConnector(connectorId) {
|
|
22
|
+
return proxy('get_connector', { connector_id: connectorId });
|
|
23
|
+
},
|
|
24
|
+
async addConnector(projectId, params) {
|
|
25
|
+
return proxy('add_connector', {
|
|
26
|
+
project_id: projectId,
|
|
27
|
+
...params
|
|
28
|
+
});
|
|
29
|
+
},
|
|
30
|
+
async updateConnector(connectorId, updates) {
|
|
31
|
+
return proxy('update_connector', {
|
|
32
|
+
connector_id: connectorId,
|
|
33
|
+
...updates
|
|
34
|
+
});
|
|
35
|
+
},
|
|
36
|
+
async deleteConnector(connectorId) {
|
|
37
|
+
return proxy('delete_connector', { connector_id: connectorId });
|
|
38
|
+
},
|
|
39
|
+
async testConnector(connectorId) {
|
|
40
|
+
return proxy('test_connector', { connector_id: connectorId });
|
|
41
|
+
},
|
|
42
|
+
async getConnectorEvents(params) {
|
|
43
|
+
return proxy('get_connector_events', params);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deployment API Methods
|
|
3
|
+
*
|
|
4
|
+
* Methods for deployment management:
|
|
5
|
+
* - requestDeployment: Request a new deployment
|
|
6
|
+
* - checkDeploymentStatus: Check active deployment status
|
|
7
|
+
* - claimDeploymentValidation: Claim a deployment for validation
|
|
8
|
+
* - reportValidation: Report build/test results
|
|
9
|
+
* - startDeployment: Start a ready deployment
|
|
10
|
+
* - completeDeployment: Mark deployment complete
|
|
11
|
+
* - cancelDeployment: Cancel active deployment
|
|
12
|
+
* - addDeploymentRequirement: Add a pre-deployment requirement
|
|
13
|
+
* - getDeploymentRequirements: Get pending requirements
|
|
14
|
+
* - getDeploymentRequirementsStats: Get requirement statistics
|
|
15
|
+
* - completeDeploymentRequirement: Mark a requirement as done
|
|
16
|
+
* - reorderDeploymentRequirements: Reorder requirements within a stage
|
|
17
|
+
* - scheduleDeployment: Schedule a deployment
|
|
18
|
+
* - getScheduledDeployments: Get scheduled deployments
|
|
19
|
+
* - updateScheduledDeployment: Update a scheduled deployment
|
|
20
|
+
* - deleteScheduledDeployment: Delete a scheduled deployment
|
|
21
|
+
* - triggerScheduledDeployment: Manually trigger a scheduled deployment
|
|
22
|
+
* - checkDueDeployments: Check for due scheduled deployments
|
|
23
|
+
*/
|
|
24
|
+
import type { ApiResponse, ProxyFn } from './types.js';
|
|
25
|
+
export interface DeploymentMethods {
|
|
26
|
+
requestDeployment(projectId: string, params?: {
|
|
27
|
+
environment?: string;
|
|
28
|
+
version_bump?: string;
|
|
29
|
+
git_ref?: string;
|
|
30
|
+
notes?: string;
|
|
31
|
+
}, sessionId?: string): Promise<ApiResponse<{
|
|
32
|
+
success: boolean;
|
|
33
|
+
deployment_id: string;
|
|
34
|
+
status: string;
|
|
35
|
+
}>>;
|
|
36
|
+
checkDeploymentStatus(projectId: string): Promise<ApiResponse<{
|
|
37
|
+
active_deployment: boolean;
|
|
38
|
+
deployment?: {
|
|
39
|
+
id: string;
|
|
40
|
+
status: string;
|
|
41
|
+
environment: string;
|
|
42
|
+
git_ref?: string;
|
|
43
|
+
created_at: string;
|
|
44
|
+
};
|
|
45
|
+
}>>;
|
|
46
|
+
claimDeploymentValidation(projectId: string, sessionId?: string): Promise<ApiResponse<{
|
|
47
|
+
success: boolean;
|
|
48
|
+
deployment_id: string;
|
|
49
|
+
message: string;
|
|
50
|
+
}>>;
|
|
51
|
+
reportValidation(projectId: string, params: {
|
|
52
|
+
build_passed: boolean;
|
|
53
|
+
tests_passed: boolean;
|
|
54
|
+
error_message?: string;
|
|
55
|
+
}): Promise<ApiResponse<{
|
|
56
|
+
success: boolean;
|
|
57
|
+
deployment_id: string;
|
|
58
|
+
status: string;
|
|
59
|
+
}>>;
|
|
60
|
+
startDeployment(projectId: string, sessionId?: string): Promise<ApiResponse<{
|
|
61
|
+
success: boolean;
|
|
62
|
+
deployment_id: string;
|
|
63
|
+
instructions: string;
|
|
64
|
+
}>>;
|
|
65
|
+
completeDeployment(projectId: string, params: {
|
|
66
|
+
success: boolean;
|
|
67
|
+
summary?: string;
|
|
68
|
+
}): Promise<ApiResponse<{
|
|
69
|
+
success: boolean;
|
|
70
|
+
deployment_id: string;
|
|
71
|
+
status: string;
|
|
72
|
+
}>>;
|
|
73
|
+
cancelDeployment(projectId: string, reason?: string): Promise<ApiResponse<{
|
|
74
|
+
success: boolean;
|
|
75
|
+
}>>;
|
|
76
|
+
addDeploymentRequirement(projectId: string, params: {
|
|
77
|
+
type: string;
|
|
78
|
+
title: string;
|
|
79
|
+
description?: string;
|
|
80
|
+
file_path?: string;
|
|
81
|
+
stage?: string;
|
|
82
|
+
blocking?: boolean;
|
|
83
|
+
recurring?: boolean;
|
|
84
|
+
}): Promise<ApiResponse<{
|
|
85
|
+
success: boolean;
|
|
86
|
+
requirement_id: string;
|
|
87
|
+
}>>;
|
|
88
|
+
getDeploymentRequirements(projectId: string, params?: {
|
|
89
|
+
status?: string;
|
|
90
|
+
stage?: string;
|
|
91
|
+
limit?: number;
|
|
92
|
+
offset?: number;
|
|
93
|
+
}): Promise<ApiResponse<{
|
|
94
|
+
requirements: Array<{
|
|
95
|
+
id: string;
|
|
96
|
+
type: string;
|
|
97
|
+
title: string;
|
|
98
|
+
description?: string;
|
|
99
|
+
status: string;
|
|
100
|
+
stage: string;
|
|
101
|
+
}>;
|
|
102
|
+
total_count: number;
|
|
103
|
+
has_more: boolean;
|
|
104
|
+
}>>;
|
|
105
|
+
getDeploymentRequirementsStats(projectId: string): Promise<ApiResponse<{
|
|
106
|
+
total: number;
|
|
107
|
+
by_status: Record<string, number>;
|
|
108
|
+
by_stage: Record<string, number>;
|
|
109
|
+
by_type: Record<string, number>;
|
|
110
|
+
}>>;
|
|
111
|
+
completeDeploymentRequirement(requirementId: string): Promise<ApiResponse<{
|
|
112
|
+
success: boolean;
|
|
113
|
+
}>>;
|
|
114
|
+
reorderDeploymentRequirements(projectId: string, params: {
|
|
115
|
+
stage: string;
|
|
116
|
+
requirement_ids: string[];
|
|
117
|
+
}): Promise<ApiResponse<{
|
|
118
|
+
success: boolean;
|
|
119
|
+
reordered: number;
|
|
120
|
+
}>>;
|
|
121
|
+
scheduleDeployment(projectId: string, params: {
|
|
122
|
+
scheduled_at: string;
|
|
123
|
+
schedule_type?: string;
|
|
124
|
+
environment?: string;
|
|
125
|
+
version_bump?: string;
|
|
126
|
+
auto_trigger?: boolean;
|
|
127
|
+
hours_interval?: number;
|
|
128
|
+
notes?: string;
|
|
129
|
+
git_ref?: string;
|
|
130
|
+
}): Promise<ApiResponse<{
|
|
131
|
+
success: boolean;
|
|
132
|
+
schedule_id: string;
|
|
133
|
+
}>>;
|
|
134
|
+
getScheduledDeployments(projectId: string, params?: {
|
|
135
|
+
includeDisabled?: boolean;
|
|
136
|
+
limit?: number;
|
|
137
|
+
offset?: number;
|
|
138
|
+
}): Promise<ApiResponse<{
|
|
139
|
+
schedules: Array<{
|
|
140
|
+
id: string;
|
|
141
|
+
scheduled_at: string;
|
|
142
|
+
schedule_type: string;
|
|
143
|
+
hours_interval: number;
|
|
144
|
+
environment: string;
|
|
145
|
+
version_bump: string;
|
|
146
|
+
auto_trigger: boolean;
|
|
147
|
+
enabled: boolean;
|
|
148
|
+
git_ref?: string;
|
|
149
|
+
notes?: string;
|
|
150
|
+
}>;
|
|
151
|
+
total_count: number;
|
|
152
|
+
has_more: boolean;
|
|
153
|
+
}>>;
|
|
154
|
+
updateScheduledDeployment(scheduleId: string, updates: {
|
|
155
|
+
scheduled_at?: string;
|
|
156
|
+
schedule_type?: string;
|
|
157
|
+
hours_interval?: number;
|
|
158
|
+
environment?: string;
|
|
159
|
+
version_bump?: string;
|
|
160
|
+
auto_trigger?: boolean;
|
|
161
|
+
enabled?: boolean;
|
|
162
|
+
git_ref?: string;
|
|
163
|
+
notes?: string;
|
|
164
|
+
}): Promise<ApiResponse<{
|
|
165
|
+
success: boolean;
|
|
166
|
+
schedule_id: string;
|
|
167
|
+
}>>;
|
|
168
|
+
deleteScheduledDeployment(scheduleId: string): Promise<ApiResponse<{
|
|
169
|
+
success: boolean;
|
|
170
|
+
}>>;
|
|
171
|
+
triggerScheduledDeployment(scheduleId: string, sessionId?: string): Promise<ApiResponse<{
|
|
172
|
+
success: boolean;
|
|
173
|
+
deployment_id?: string;
|
|
174
|
+
schedule_id: string;
|
|
175
|
+
schedule_type: string;
|
|
176
|
+
next_scheduled_at?: string;
|
|
177
|
+
message?: string;
|
|
178
|
+
}>>;
|
|
179
|
+
checkDueDeployments(projectId: string): Promise<ApiResponse<{
|
|
180
|
+
due_schedules: Array<{
|
|
181
|
+
id: string;
|
|
182
|
+
scheduled_at: string;
|
|
183
|
+
environment: string;
|
|
184
|
+
version_bump: string;
|
|
185
|
+
schedule_type: string;
|
|
186
|
+
}>;
|
|
187
|
+
count: number;
|
|
188
|
+
}>>;
|
|
189
|
+
}
|
|
190
|
+
export declare function createDeploymentMethods(proxy: ProxyFn): DeploymentMethods;
|