@scaleway/sdk-cockpit 1.1.4 → 1.3.0
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/v1/api.gen.cjs
CHANGED
|
@@ -580,6 +580,7 @@ class RegionalAPI extends sdkClient.API {
|
|
|
580
580
|
method: "GET",
|
|
581
581
|
path: `/cockpit/v1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/alerts`,
|
|
582
582
|
urlParams: sdkClient.urlParams(
|
|
583
|
+
["data_source_id", request.dataSourceId],
|
|
583
584
|
["is_enabled", request.isEnabled],
|
|
584
585
|
["is_preconfigured", request.isPreconfigured],
|
|
585
586
|
[
|
package/dist/v1/api.gen.d.ts
CHANGED
|
@@ -105,9 +105,9 @@ export declare class GlobalAPI extends ParentAPI {
|
|
|
105
105
|
getCurrentPlan: (request?: Readonly<GlobalApiGetCurrentPlanRequest>) => Promise<Plan>;
|
|
106
106
|
}
|
|
107
107
|
/**
|
|
108
|
-
* Cockpit
|
|
108
|
+
* Cockpit API.
|
|
109
109
|
|
|
110
|
-
The Cockpit
|
|
110
|
+
The Cockpit API allows you to create data sources and Cockpit tokens to store and query data types such as metrics, logs, and traces. You can also push your data into Cockpit, and send alerts to your contact points when your resources may require your attention, using the regional Alert manager.
|
|
111
111
|
*/
|
|
112
112
|
export declare class RegionalAPI extends ParentAPI {
|
|
113
113
|
/** Lists the available regions of the API. */
|
package/dist/v1/api.gen.js
CHANGED
|
@@ -578,6 +578,7 @@ class RegionalAPI extends API {
|
|
|
578
578
|
method: "GET",
|
|
579
579
|
path: `/cockpit/v1/regions/${validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/alerts`,
|
|
580
580
|
urlParams: urlParams(
|
|
581
|
+
["data_source_id", request.dataSourceId],
|
|
581
582
|
["is_enabled", request.isEnabled],
|
|
582
583
|
["is_preconfigured", request.isPreconfigured],
|
|
583
584
|
[
|
|
@@ -182,7 +182,9 @@ const unmarshalPreconfiguredAlertData = (data) => {
|
|
|
182
182
|
return {
|
|
183
183
|
displayDescription: data.display_description,
|
|
184
184
|
displayName: data.display_name,
|
|
185
|
-
preconfiguredRuleId: data.preconfigured_rule_id
|
|
185
|
+
preconfiguredRuleId: data.preconfigured_rule_id,
|
|
186
|
+
productFamily: data.product_family,
|
|
187
|
+
productName: data.product_name
|
|
186
188
|
};
|
|
187
189
|
};
|
|
188
190
|
const unmarshalAlert = (data) => {
|
|
@@ -193,6 +195,7 @@ const unmarshalAlert = (data) => {
|
|
|
193
195
|
}
|
|
194
196
|
return {
|
|
195
197
|
annotations: data.annotations,
|
|
198
|
+
dataSourceId: data.data_source_id,
|
|
196
199
|
duration: data.duration,
|
|
197
200
|
enabled: data.enabled,
|
|
198
201
|
name: data.name,
|
|
@@ -180,7 +180,9 @@ const unmarshalPreconfiguredAlertData = (data) => {
|
|
|
180
180
|
return {
|
|
181
181
|
displayDescription: data.display_description,
|
|
182
182
|
displayName: data.display_name,
|
|
183
|
-
preconfiguredRuleId: data.preconfigured_rule_id
|
|
183
|
+
preconfiguredRuleId: data.preconfigured_rule_id,
|
|
184
|
+
productFamily: data.product_family,
|
|
185
|
+
productName: data.product_name
|
|
184
186
|
};
|
|
185
187
|
};
|
|
186
188
|
const unmarshalAlert = (data) => {
|
|
@@ -191,6 +193,7 @@ const unmarshalAlert = (data) => {
|
|
|
191
193
|
}
|
|
192
194
|
return {
|
|
193
195
|
annotations: data.annotations,
|
|
196
|
+
dataSourceId: data.data_source_id,
|
|
194
197
|
duration: data.duration,
|
|
195
198
|
enabled: data.enabled,
|
|
196
199
|
name: data.name,
|
package/dist/v1/types.gen.d.ts
CHANGED
|
@@ -26,6 +26,14 @@ export interface PreconfiguredAlertData {
|
|
|
26
26
|
* Human readable description of the alert.
|
|
27
27
|
*/
|
|
28
28
|
displayDescription: string;
|
|
29
|
+
/**
|
|
30
|
+
* Product associated with the alert.
|
|
31
|
+
*/
|
|
32
|
+
productName: string;
|
|
33
|
+
/**
|
|
34
|
+
* Family of the product associated with the alert.
|
|
35
|
+
*/
|
|
36
|
+
productFamily: string;
|
|
29
37
|
}
|
|
30
38
|
export interface ContactPointEmail {
|
|
31
39
|
to: string;
|
|
@@ -75,6 +83,10 @@ export interface Alert {
|
|
|
75
83
|
* Contains additional data for preconfigured alerts, such as the rule ID, display name, and description. Only present if the alert is preconfigured.
|
|
76
84
|
*/
|
|
77
85
|
preconfiguredData?: PreconfiguredAlertData;
|
|
86
|
+
/**
|
|
87
|
+
* ID of the data source containing the alert rule.
|
|
88
|
+
*/
|
|
89
|
+
dataSourceId: string;
|
|
78
90
|
}
|
|
79
91
|
/**
|
|
80
92
|
* Contact point.
|
|
@@ -875,6 +887,10 @@ export type RegionalApiListAlertsRequest = {
|
|
|
875
887
|
* Valid values to filter on are `inactive`, `pending` and `firing`. If omitted, no filtering is applied on alert states. Other filters may still apply.
|
|
876
888
|
*/
|
|
877
889
|
state?: AlertState;
|
|
890
|
+
/**
|
|
891
|
+
* If omitted, only alerts from the default scaleway data source will be listed.
|
|
892
|
+
*/
|
|
893
|
+
dataSourceId?: string;
|
|
878
894
|
};
|
|
879
895
|
/**
|
|
880
896
|
* List contact points.
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk-cockpit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Scaleway SDK cockpit",
|
|
5
|
-
"
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
8
8
|
],
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@scaleway/random-name": "5.1.1",
|
|
33
|
-
"@scaleway/sdk-std": "1.0.
|
|
33
|
+
"@scaleway/sdk-std": "1.0.4"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@scaleway/sdk-client": "^1.2.
|
|
36
|
+
"@scaleway/sdk-client": "^1.2.3"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@scaleway/sdk-client": "^1.2.
|
|
39
|
+
"@scaleway/sdk-client": "^1.2.3"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"package:check": "pnpm publint",
|