Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages_generated/cockpit/src/v1/api.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,7 @@ If you need to receive alerts for other receivers, you can create additional con
method: 'GET',
path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/alerts`,
urlParams: urlParams(
['data_source_id', request.dataSourceId],
['is_enabled', request.isEnabled],
['is_preconfigured', request.isPreconfigured],
[
Expand Down
1 change: 1 addition & 0 deletions packages_generated/cockpit/src/v1/marshalling.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ const unmarshalAlert = (data: unknown): Alert => {

return {
annotations: data.annotations,
dataSourceId: data.data_source_id,
duration: data.duration,
enabled: data.enabled,
name: data.name,
Expand Down
8 changes: 8 additions & 0 deletions packages_generated/cockpit/src/v1/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ export interface Alert {
* Contains additional data for preconfigured alerts, such as the rule ID, display name, and description. Only present if the alert is preconfigured.
*/
preconfiguredData?: PreconfiguredAlertData
/**
* ID of the data source containing the alert rule.
*/
dataSourceId: string
}

/**
Expand Down Expand Up @@ -964,6 +968,10 @@ export type RegionalApiListAlertsRequest = {
* Valid values to filter on are `inactive`, `pending` and `firing`. If omitted, no filtering is applied on alert states. Other filters may still apply.
*/
state?: AlertState
/**
* If omitted, only alerts from the default scaleway data source will be listed.
*/
dataSourceId?: string
}

/**
Expand Down
Loading