@scaleway/sdk-cockpit 1.1.2 → 1.2.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.
@@ -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
  [
@@ -105,9 +105,9 @@ export declare class GlobalAPI extends ParentAPI {
105
105
  getCurrentPlan: (request?: Readonly<GlobalApiGetCurrentPlanRequest>) => Promise<Plan>;
106
106
  }
107
107
  /**
108
- * Cockpit Regional API.
108
+ * Cockpit API.
109
109
 
110
- The Cockpit Regional API allows you to create data sources and 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.
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. */
@@ -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
  [
@@ -193,6 +193,7 @@ const unmarshalAlert = (data) => {
193
193
  }
194
194
  return {
195
195
  annotations: data.annotations,
196
+ dataSourceId: data.data_source_id,
196
197
  duration: data.duration,
197
198
  enabled: data.enabled,
198
199
  name: data.name,
@@ -191,6 +191,7 @@ const unmarshalAlert = (data) => {
191
191
  }
192
192
  return {
193
193
  annotations: data.annotations,
194
+ dataSourceId: data.data_source_id,
194
195
  duration: data.duration,
195
196
  enabled: data.enabled,
196
197
  name: data.name,
@@ -75,6 +75,10 @@ export interface Alert {
75
75
  * Contains additional data for preconfigured alerts, such as the rule ID, display name, and description. Only present if the alert is preconfigured.
76
76
  */
77
77
  preconfiguredData?: PreconfiguredAlertData;
78
+ /**
79
+ * ID of the data source containing the alert rule.
80
+ */
81
+ dataSourceId: string;
78
82
  }
79
83
  /**
80
84
  * Contact point.
@@ -875,6 +879,10 @@ export type RegionalApiListAlertsRequest = {
875
879
  * 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
880
  */
877
881
  state?: AlertState;
882
+ /**
883
+ * If omitted, only alerts from the default scaleway data source will be listed.
884
+ */
885
+ dataSourceId?: string;
878
886
  };
879
887
  /**
880
888
  * List contact points.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-cockpit",
3
- "version": "1.1.2",
3
+ "version": "1.2.0",
4
4
  "description": "Scaleway SDK cockpit",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [
@@ -26,21 +26,18 @@
26
26
  "directory": "packages_generated/cockpit"
27
27
  },
28
28
  "engines": {
29
- "node": ">=20.18.3"
29
+ "node": ">=20.19.1"
30
30
  },
31
31
  "dependencies": {
32
32
  "@scaleway/random-name": "5.1.1",
33
- "@scaleway/sdk-std": "1.0.1"
33
+ "@scaleway/sdk-std": "1.0.3"
34
34
  },
35
35
  "peerDependencies": {
36
- "@scaleway/sdk-client": "^1.2.1"
36
+ "@scaleway/sdk-client": "^1.2.2"
37
37
  },
38
38
  "devDependencies": {
39
- "@scaleway/sdk-client": "^1.2.1"
39
+ "@scaleway/sdk-client": "^1.2.2"
40
40
  },
41
- "bundledDependencies": [
42
- "@scaleway/random-name"
43
- ],
44
41
  "scripts": {
45
42
  "package:check": "pnpm publint",
46
43
  "typecheck": "tsc --noEmit",