Skip to content

Commit 0d8a00e

Browse files
authored
Merge branch 'main' into v1.6723.0
2 parents 16825a6 + 04b7ed8 commit 0d8a00e

File tree

19 files changed

+152
-8
lines changed

19 files changed

+152
-8
lines changed

packages/sdk/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [2.76.7](https://github.com/scaleway/scaleway-sdk-js/compare/@scaleway/[email protected]...@scaleway/[email protected]) (2025-06-30)
7+
8+
**Note:** Version bump only for package @scaleway/sdk
9+
610
## [2.76.6](https://github.com/scaleway/scaleway-sdk-js/compare/@scaleway/[email protected]...@scaleway/[email protected]) (2025-06-23)
711

812
**Note:** Version bump only for package @scaleway/sdk

packages/sdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@scaleway/sdk",
3-
"version": "2.76.6",
3+
"version": "2.76.7",
44
"description": "Scaleway SDK TS.",
55
"license": "Apache-2.0",
66
"files": [

packages_generated/audit_trail/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# 1.3.0 (2025-06-30)
7+
8+
### Features
9+
10+
- **audit_trail:** add instance server resource type ([#2213](https://github.com/scaleway/scaleway-sdk-js/issues/2213)) ([ecb4983](https://github.com/scaleway/scaleway-sdk-js/commit/ecb4983fd015a05fb9a834f34bcb4c0facfbac87))
11+
612
# 1.2.0 (2025-06-18)
713

814
### Bug Fixes

packages_generated/audit_trail/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@scaleway/sdk-audit-trail",
3-
"version": "1.2.0",
3+
"version": "1.3.0",
44
"description": "Scaleway SDK audit-trail",
55
"license": "Apache-2.0",
66
"files": [

packages_generated/cockpit/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# 1.4.0 (2025-06-30)
7+
8+
### Features
9+
10+
- **cockpit:** add getRulesCount endpoint ([#2219](https://github.com/scaleway/scaleway-sdk-js/issues/2219)) ([06dcd76](https://github.com/scaleway/scaleway-sdk-js/commit/06dcd76aff6034d297e5268ca376078fcc9d466a))
11+
612
## [1.3.2](https://github.com/scaleway/scaleway-sdk-js/compare/@scaleway/[email protected]...@scaleway/[email protected]) (2025-06-18)
713

814
### Bug Fixes

packages_generated/cockpit/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@scaleway/sdk-cockpit",
3-
"version": "1.3.2",
3+
"version": "1.4.0",
44
"description": "Scaleway SDK cockpit",
55
"license": "Apache-2.0",
66
"files": [

packages_generated/cockpit/src/v1/api.gen.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import {
3232
unmarshalDisableAlertRulesResponse,
3333
unmarshalEnableAlertRulesResponse,
3434
unmarshalGetConfigResponse,
35+
unmarshalGetRulesCountResponse,
3536
unmarshalGrafana,
3637
unmarshalGrafanaProductDashboard,
3738
unmarshalGrafanaUser,
@@ -53,6 +54,7 @@ import type {
5354
DisableAlertRulesResponse,
5455
EnableAlertRulesResponse,
5556
GetConfigResponse,
57+
GetRulesCountResponse,
5658
GlobalApiCreateGrafanaUserRequest,
5759
GlobalApiDeleteGrafanaUserRequest,
5860
GlobalApiGetCurrentPlanRequest,
@@ -90,6 +92,7 @@ import type {
9092
RegionalApiGetAlertManagerRequest,
9193
RegionalApiGetConfigRequest,
9294
RegionalApiGetDataSourceRequest,
95+
RegionalApiGetRulesCountRequest,
9396
RegionalApiGetTokenRequest,
9497
RegionalApiGetUsageOverviewRequest,
9598
RegionalApiListAlertsRequest,
@@ -690,6 +693,25 @@ The output returned displays a URL to access the Alert manager, and whether the
690693
unmarshalAlertManager,
691694
)
692695

696+
/**
697+
* Get a detailed count of enabled rules in the specified Project. Includes preconfigured and custom alerting and recording rules.. Get a detailed count of enabled rules in the specified Project. Includes preconfigured and custom alerting and recording rules.
698+
*
699+
* @param request - The request {@link RegionalApiGetRulesCountRequest}
700+
* @returns A Promise of GetRulesCountResponse
701+
*/
702+
getRulesCount = (request: Readonly<RegionalApiGetRulesCountRequest> = {}) =>
703+
this.client.fetch<GetRulesCountResponse>(
704+
{
705+
method: 'GET',
706+
path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/rules/count`,
707+
urlParams: urlParams([
708+
'project_id',
709+
request.projectId ?? this.client.settings.defaultProjectId,
710+
]),
711+
},
712+
unmarshalGetRulesCountResponse,
713+
)
714+
693715
/**
694716
* Create a contact point. Contact points are email addresses associated with the default receiver, that the Alert manager sends alerts to.
695717
The source of the alerts are data sources within the same Project and region as the Alert manager.

packages_generated/cockpit/src/v1/marshalling.gen.ts

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import type {
1717
EnableAlertRulesResponse,
1818
GetConfigResponse,
1919
GetConfigResponseRetention,
20+
GetRulesCountResponse,
2021
GlobalApiCreateGrafanaUserRequest,
2122
GlobalApiResetGrafanaUserPasswordRequest,
2223
GlobalApiSelectPlanRequest,
@@ -46,6 +47,7 @@ import type {
4647
RegionalApiTriggerTestAlertRequest,
4748
RegionalApiUpdateContactPointRequest,
4849
RegionalApiUpdateDataSourceRequest,
50+
RulesCount,
4951
Token,
5052
Usage,
5153
UsageOverview,
@@ -257,6 +259,39 @@ export const unmarshalGetConfigResponse = (
257259
} as GetConfigResponse
258260
}
259261

262+
const unmarshalRulesCount = (data: unknown): RulesCount => {
263+
if (!isJSONObject(data)) {
264+
throw new TypeError(
265+
`Unmarshalling the type 'RulesCount' failed as data isn't a dictionary.`,
266+
)
267+
}
268+
269+
return {
270+
dataSourceId: data.data_source_id,
271+
dataSourceName: data.data_source_name,
272+
rulesCount: data.rules_count,
273+
} as RulesCount
274+
}
275+
276+
export const unmarshalGetRulesCountResponse = (
277+
data: unknown,
278+
): GetRulesCountResponse => {
279+
if (!isJSONObject(data)) {
280+
throw new TypeError(
281+
`Unmarshalling the type 'GetRulesCountResponse' failed as data isn't a dictionary.`,
282+
)
283+
}
284+
285+
return {
286+
customRulesCount: data.custom_rules_count,
287+
preconfiguredRulesCount: data.preconfigured_rules_count,
288+
rulesCountByDatasource: unmarshalArrayOfObject(
289+
data.rules_count_by_datasource,
290+
unmarshalRulesCount,
291+
),
292+
} as GetRulesCountResponse
293+
}
294+
260295
export const unmarshalGrafana = (data: unknown): Grafana => {
261296
if (!isJSONObject(data)) {
262297
throw new TypeError(

packages_generated/cockpit/src/v1/types.gen.ts

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,21 @@ export interface GetConfigResponseRetention {
8484
defaultDays: number
8585
}
8686

87+
export interface RulesCount {
88+
/**
89+
* ID of the data source.
90+
*/
91+
dataSourceId: string
92+
/**
93+
* Name of the data source.
94+
*/
95+
dataSourceName: string
96+
/**
97+
* Total count of rules associated with this data source.
98+
*/
99+
rulesCount: number
100+
}
101+
87102
/**
88103
* Structure representing an alert.
89104
*/
@@ -430,6 +445,21 @@ export interface GetConfigResponse {
430445
productLogsRetention?: GetConfigResponseRetention
431446
}
432447

448+
export interface GetRulesCountResponse {
449+
/**
450+
* Total count of rules grouped by data source.
451+
*/
452+
rulesCountByDatasource: RulesCount[]
453+
/**
454+
* Total count of preconfigured rules.
455+
*/
456+
preconfiguredRulesCount: number
457+
/**
458+
* Total count of custom rules.
459+
*/
460+
customRulesCount: number
461+
}
462+
433463
/**
434464
* Create a Grafana user.
435465
*/
@@ -953,6 +983,17 @@ export type RegionalApiGetDataSourceRequest = {
953983
dataSourceId: string
954984
}
955985

986+
export type RegionalApiGetRulesCountRequest = {
987+
/**
988+
* Region to target. If none is passed will use default region from the config.
989+
*/
990+
region?: ScwRegion
991+
/**
992+
* ID of the Project to retrieve the rule count for.
993+
*/
994+
projectId?: string
995+
}
996+
956997
/**
957998
* Get a token.
958999
*/

packages_generated/edge_services/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# 1.1.0 (2025-06-30)
7+
8+
### Features
9+
10+
- **edge_services:** add include_cookies to cache-stage ([#2211](https://github.com/scaleway/scaleway-sdk-js/issues/2211)) ([d390ad5](https://github.com/scaleway/scaleway-sdk-js/commit/d390ad55e606a4b376bb0327bb983be667a9ef64))
11+
612
## 1.0.5 (2025-06-18)
713

814
**Note:** Version bump only for package @scaleway/sdk-edge-services

0 commit comments

Comments
 (0)