Skip to content

Commit ed131ad

Browse files
authored
feat: Alerts Listing (#230)
1 parent 56209ed commit ed131ad

File tree

6 files changed

+1340
-28
lines changed

6 files changed

+1340
-28
lines changed

scripts/filter.ts

Lines changed: 1 addition & 0 deletions
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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,14 @@ export class ApiClient {
247247
}
248248
}
249249

250+
async listAlerts(options: FetchOptions<operations["listAlerts"]>) {
251+
const { data, error, response } = await this.client.GET("/api/atlas/v2/groups/{groupId}/alerts", options);
252+
if (error) {
253+
throw ApiClientError.fromError(response, error);
254+
}
255+
return data;
256+
}
257+
250258
async listClusters(options: FetchOptions<operations["listClusters"]>) {
251259
const { data, error, response } = await this.client.GET("/api/atlas/v2/groups/{groupId}/clusters", options);
252260
if (error) {

0 commit comments

Comments
 (0)