Skip to content

Commit b5f652a

Browse files
committed
feat: Alerts Listing
1 parent ec590e8 commit b5f652a

File tree

6 files changed

+1358
-28
lines changed

6 files changed

+1358
-28
lines changed

scripts/filter.ts

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ function filterOpenapi(openapi: OpenAPIV3_1.Document): OpenAPIV3_1.Document {
4040
"createProjectIpAccessList",
4141
"deleteProjectIpAccessList",
4242
"listOrganizationProjects",
43+
"listAlerts",
4344
];
4445

4546
const filteredPaths = {};

src/common/atlas/apiClient.ts

+8
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,14 @@ export class ApiClient {
206206
}
207207
}
208208

209+
async listAlerts(options: FetchOptions<operations["listAlerts"]>) {
210+
const { data, error, response } = await this.client.GET("/api/atlas/v2/groups/{groupId}/alerts", options);
211+
if (error) {
212+
throw ApiClientError.fromError(response, error);
213+
}
214+
return data;
215+
}
216+
209217
async listClusters(options: FetchOptions<operations["listClusters"]>) {
210218
const { data, error, response } = await this.client.GET("/api/atlas/v2/groups/{groupId}/clusters", options);
211219
if (error) {

0 commit comments

Comments
 (0)