Skip to content

Commit 58dc5bd

Browse files
authored
add create project tool (#82)
1 parent 99039bb commit 58dc5bd

File tree

7 files changed

+789
-2511
lines changed

7 files changed

+789
-2511
lines changed

package-lock.json

Lines changed: 15 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@
5353
"ts-jest": "^29.3.1",
5454
"tsx": "^4.19.3",
5555
"typescript": "^5.8.2",
56-
"typescript-eslint": "^8.29.1"
56+
"typescript-eslint": "^8.29.1",
57+
"yaml": "^2.7.1"
5758
},
5859
"dependencies": {
5960
"@modelcontextprotocol/sdk": "^1.8.0",

scripts/filter.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ async function readStdin() {
1919
function filterOpenapi(openapi: OpenAPIV3_1.Document): OpenAPIV3_1.Document {
2020
const allowedOperations = [
2121
"listProjects",
22+
"listOrganizations",
2223
"getProject",
2324
"createProject",
2425
"listClusters",

src/common/atlas/apiClient.ts

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ export class ApiClient {
117117
}
118118

119119
// DO NOT EDIT. This is auto-generated code.
120-
async listClustersForAllProjects(options?: FetchOptions<operations["listClustersForAllProjects"]>) {
121-
const { data } = await this.client.GET("/api/atlas/v2/clusters", options);
120+
async listOrganizations(options?: FetchOptions<operations["listOrganizations"]>) {
121+
const { data } = await this.client.GET("/api/atlas/v2/orgs", options);
122122
return data;
123123
}
124124

@@ -132,18 +132,13 @@ export class ApiClient {
132132
return data;
133133
}
134134

135-
async getProject(options: FetchOptions<operations["getProject"]>) {
136-
const { data } = await this.client.GET("/api/atlas/v2/groups/{groupId}", options);
137-
return data;
138-
}
139-
140-
async listProjectIpAccessLists(options: FetchOptions<operations["listProjectIpAccessLists"]>) {
141-
const { data } = await this.client.GET("/api/atlas/v2/groups/{groupId}/accessList", options);
135+
async listClustersForAllProjects(options?: FetchOptions<operations["listClustersForAllProjects"]>) {
136+
const { data } = await this.client.GET("/api/atlas/v2/clusters", options);
142137
return data;
143138
}
144139

145-
async createProjectIpAccessList(options: FetchOptions<operations["createProjectIpAccessList"]>) {
146-
const { data } = await this.client.POST("/api/atlas/v2/groups/{groupId}/accessList", options);
140+
async getProject(options: FetchOptions<operations["getProject"]>) {
141+
const { data } = await this.client.GET("/api/atlas/v2/groups/{groupId}", options);
147142
return data;
148143
}
149144

@@ -157,8 +152,13 @@ export class ApiClient {
157152
return data;
158153
}
159154

160-
async getCluster(options: FetchOptions<operations["getCluster"]>) {
161-
const { data } = await this.client.GET("/api/atlas/v2/groups/{groupId}/clusters/{clusterName}", options);
155+
async listProjectIpAccessLists(options: FetchOptions<operations["listProjectIpAccessLists"]>) {
156+
const { data } = await this.client.GET("/api/atlas/v2/groups/{groupId}/accessList", options);
157+
return data;
158+
}
159+
160+
async createProjectIpAccessList(options: FetchOptions<operations["createProjectIpAccessList"]>) {
161+
const { data } = await this.client.POST("/api/atlas/v2/groups/{groupId}/accessList", options);
162162
return data;
163163
}
164164

@@ -171,5 +171,10 @@ export class ApiClient {
171171
const { data } = await this.client.POST("/api/atlas/v2/groups/{groupId}/databaseUsers", options);
172172
return data;
173173
}
174+
175+
async getCluster(options: FetchOptions<operations["getCluster"]>) {
176+
const { data } = await this.client.GET("/api/atlas/v2/groups/{groupId}/clusters/{clusterName}", options);
177+
return data;
178+
}
174179
// DO NOT EDIT. This is auto-generated code.
175180
}

0 commit comments

Comments
 (0)