Skip to content

Commit 5883526

Browse files
authored
Merge branch 'main' into v1.6449.0
2 parents 1284efd + ef95d12 commit 5883526

27 files changed

+1149
-873
lines changed

package.json

+11-11
Original file line numberDiff line numberDiff line change
@@ -62,30 +62,30 @@
6262
"@scaleway/eslint-config-react": "4.0.9",
6363
"@scaleway/random-name": "5.1.1",
6464
"@typescript-eslint/eslint-plugin": "latest",
65-
"@vitest/coverage-istanbul": "3.1.1",
66-
"@vitest/coverage-v8": "3.1.1",
67-
"@vitest/ui": "3.1.1",
65+
"@vitest/coverage-istanbul": "3.1.2",
66+
"@vitest/coverage-v8": "3.1.2",
67+
"@vitest/ui": "3.1.2",
6868
"babel-plugin-annotate-pure-calls": "0.5.0",
6969
"browserslist": "4.24.4",
7070
"cross-env": "7.0.3",
7171
"cross-fetch": "4.1.0",
7272
"cz-conventional-changelog": "3.3.0",
73-
"esbuild-plugin-browserslist": "0.15.0",
73+
"esbuild-plugin-browserslist": "1.0.0",
7474
"eslint": "9.19.0",
7575
"eslint-plugin-tsdoc": "0.4.0",
7676
"husky": "9.1.7",
7777
"jsdom": "25.0.1",
78-
"lerna": "8.1.9",
79-
"lint-staged": "15.4.3",
80-
"prettier": "3.4.2",
81-
"react": "^19.0.0",
78+
"lerna": "8.2.2",
79+
"lint-staged": "15.5.1",
80+
"prettier": "3.5.3",
81+
"react": "^19.1.0",
8282
"read-pkg": "9.0.1",
8383
"tsc-alias": "^1.8.10",
84-
"turbo": "2.5.0",
84+
"turbo": "2.5.1",
8585
"typedoc": "0.27.6",
8686
"typescript": "5.8.3",
87-
"vite": "6.2.6",
88-
"vitest": "3.1.1"
87+
"vite": "6.3.3",
88+
"vitest": "3.1.2"
8989
},
9090
"packageManager": "[email protected]"
9191
}

packages/sdk/CHANGELOG.md

+4
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.75.2](https://github.com/scaleway/scaleway-sdk-js/compare/@scaleway/[email protected]...@scaleway/[email protected]) (2025-04-25)
7+
8+
**Note:** Version bump only for package @scaleway/sdk
9+
610
## [2.75.1](https://github.com/scaleway/scaleway-sdk-js/compare/@scaleway/[email protected]...@scaleway/[email protected]) (2025-04-24)
711

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

packages/sdk/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@scaleway/sdk",
3-
"version": "2.75.1",
3+
"version": "2.75.2",
44
"description": "Scaleway SDK TS.",
55
"types": "dist/index.d.ts",
66
"files": [

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

+32-20
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ import {
2828
unmarshalAlertManager,
2929
unmarshalContactPoint,
3030
unmarshalDataSource,
31+
unmarshalDisableAlertRulesResponse,
32+
unmarshalEnableAlertRulesResponse,
3133
unmarshalGetConfigResponse,
3234
unmarshalGrafana,
3335
unmarshalGrafanaProductDashboard,
@@ -47,6 +49,8 @@ import type {
4749
AlertManager,
4850
ContactPoint,
4951
DataSource,
52+
DisableAlertRulesResponse,
53+
EnableAlertRulesResponse,
5054
GetConfigResponse,
5155
GlobalApiCreateGrafanaUserRequest,
5256
GlobalApiDeleteGrafanaUserRequest,
@@ -861,41 +865,49 @@ If you need to receive alerts for other receivers, you can create additional con
861865
* Enable preconfigured alert rules. Enable alert rules from the list of available preconfigured rules.. Enable preconfigured alert rules. Enable alert rules from the list of available preconfigured rules.
862866
*
863867
* @param request - The request {@link RegionalApiEnableAlertRulesRequest}
868+
* @returns A Promise of EnableAlertRulesResponse
864869
*/
865870
enableAlertRules = (
866871
request: Readonly<RegionalApiEnableAlertRulesRequest> = {},
867872
) =>
868-
this.client.fetch<void>({
869-
body: JSON.stringify(
870-
marshalRegionalApiEnableAlertRulesRequest(
871-
request,
872-
this.client.settings,
873+
this.client.fetch<EnableAlertRulesResponse>(
874+
{
875+
body: JSON.stringify(
876+
marshalRegionalApiEnableAlertRulesRequest(
877+
request,
878+
this.client.settings,
879+
),
873880
),
874-
),
875-
headers: jsonContentHeaders,
876-
method: 'POST',
877-
path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/alert-manager/enable-alert-rules`,
878-
})
881+
headers: jsonContentHeaders,
882+
method: 'POST',
883+
path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/alert-manager/enable-alert-rules`,
884+
},
885+
unmarshalEnableAlertRulesResponse,
886+
)
879887

880888
/**
881889
* Disable preconfigured alert rules. Disable alert rules from the list of available preconfigured rules.. Disable preconfigured alert rules. Disable alert rules from the list of available preconfigured rules.
882890
*
883891
* @param request - The request {@link RegionalApiDisableAlertRulesRequest}
892+
* @returns A Promise of DisableAlertRulesResponse
884893
*/
885894
disableAlertRules = (
886895
request: Readonly<RegionalApiDisableAlertRulesRequest> = {},
887896
) =>
888-
this.client.fetch<void>({
889-
body: JSON.stringify(
890-
marshalRegionalApiDisableAlertRulesRequest(
891-
request,
892-
this.client.settings,
897+
this.client.fetch<DisableAlertRulesResponse>(
898+
{
899+
body: JSON.stringify(
900+
marshalRegionalApiDisableAlertRulesRequest(
901+
request,
902+
this.client.settings,
903+
),
893904
),
894-
),
895-
headers: jsonContentHeaders,
896-
method: 'POST',
897-
path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/alert-manager/disable-alert-rules`,
898-
})
905+
headers: jsonContentHeaders,
906+
method: 'POST',
907+
path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/alert-manager/disable-alert-rules`,
908+
},
909+
unmarshalDisableAlertRulesResponse,
910+
)
899911

900912
/**
901913
* Trigger a test alert. Send a test alert to the Alert manager to make sure your contact points get notified.

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

+30
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import type {
1313
ContactPoint,
1414
ContactPointEmail,
1515
DataSource,
16+
DisableAlertRulesResponse,
17+
EnableAlertRulesResponse,
1618
GetConfigResponse,
1719
GetConfigResponseRetention,
1820
GlobalApiCreateGrafanaUserRequest,
@@ -183,6 +185,34 @@ export const unmarshalAlertManager = (data: unknown): AlertManager => {
183185
} as AlertManager
184186
}
185187

188+
export const unmarshalDisableAlertRulesResponse = (
189+
data: unknown,
190+
): DisableAlertRulesResponse => {
191+
if (!isJSONObject(data)) {
192+
throw new TypeError(
193+
`Unmarshalling the type 'DisableAlertRulesResponse' failed as data isn't a dictionary.`,
194+
)
195+
}
196+
197+
return {
198+
disabledRuleIds: data.disabled_rule_ids,
199+
} as DisableAlertRulesResponse
200+
}
201+
202+
export const unmarshalEnableAlertRulesResponse = (
203+
data: unknown,
204+
): EnableAlertRulesResponse => {
205+
if (!isJSONObject(data)) {
206+
throw new TypeError(
207+
`Unmarshalling the type 'EnableAlertRulesResponse' failed as data isn't a dictionary.`,
208+
)
209+
}
210+
211+
return {
212+
enabledRuleIds: data.enabled_rule_ids,
213+
} as EnableAlertRulesResponse
214+
}
215+
186216
const unmarshalGetConfigResponseRetention = (
187217
data: unknown,
188218
): GetConfigResponseRetention => {

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

+8
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,14 @@ export interface AlertManager {
372372
region: ScwRegion
373373
}
374374

375+
export interface DisableAlertRulesResponse {
376+
disabledRuleIds: string[]
377+
}
378+
379+
export interface EnableAlertRulesResponse {
380+
enabledRuleIds: string[]
381+
}
382+
375383
/**
376384
* Cockpit configuration.
377385
*/

packages_generated/cockpit/src/v1/validation-rules.gen.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export const RegionalApiCreateDataSourceRequest = {
1010
retentionDays: {
1111
greaterThanOrEqual: 1,
1212
ignoreEmpty: true,
13-
lessThanOrEqual: 365,
13+
lessThanOrEqual: 1825,
1414
},
1515
}
1616

@@ -62,6 +62,6 @@ export const RegionalApiUpdateDataSourceRequest = {
6262
retentionDays: {
6363
greaterThanOrEqual: 1,
6464
ignoreEmpty: true,
65-
lessThanOrEqual: 365,
65+
lessThanOrEqual: 1825,
6666
},
6767
}

packages_generated/domain/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@
4040
"@scaleway/sdk-std": "workspace:*"
4141
},
4242
"peerDependencies": {
43-
"@scaleway/sdk-client": "^1.2.0"
43+
"@scaleway/sdk-client": "workspace:^"
4444
},
4545
"devDependencies": {
46-
"@scaleway/sdk-client": "^1.2.0"
46+
"@scaleway/sdk-client": "workspace:^"
4747
},
4848
"bundledDependencies": [
4949
"@scaleway/random-name"
5050
]
51-
}
51+
}
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Change Log
2+
3+
All notable changes to this project will be documented in this file.
4+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5+
6+
## 1.0.1 (2025-04-25)
7+
8+
### Bug Fixes
9+
10+
- **instance:** activate attach/detach filesystems in the sdk ([#2035](https://github.com/scaleway/scaleway-sdk-js/issues/2035)) ([d0db4ba](https://github.com/scaleway/scaleway-sdk-js/commit/d0db4ba0126c72e4e01983fddbec9b0b292061a1))

packages_generated/instance/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@scaleway/sdk-instance",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "Scaleway SDK instance",
55
"types": "dist/index.d.ts",
66
"files": [
@@ -48,4 +48,4 @@
4848
"bundledDependencies": [
4949
"@scaleway/random-name"
5050
]
51-
}
51+
}

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

+46
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
import type { Zone as ScwZone } from '@scaleway/sdk-client'
1010
import {
1111
marshalApplyBlockMigrationRequest,
12+
marshalAttachServerFileSystemRequest,
1213
marshalAttachServerVolumeRequest,
1314
marshalCheckBlockMigrationOrganizationQuotasRequest,
1415
marshalCreateImageRequest,
@@ -20,6 +21,7 @@ import {
2021
marshalCreateServerRequest,
2122
marshalCreateSnapshotRequest,
2223
marshalCreateVolumeRequest,
24+
marshalDetachServerFileSystemRequest,
2325
marshalDetachServerVolumeRequest,
2426
marshalExportSnapshotRequest,
2527
marshalPlanBlockMigrationRequest,
@@ -42,6 +44,7 @@ import {
4244
marshalUpdateServerRequest,
4345
marshalUpdateSnapshotRequest,
4446
marshalUpdateVolumeRequest,
47+
unmarshalAttachServerFileSystemResponse,
4548
unmarshalAttachServerVolumeResponse,
4649
unmarshalCreateImageResponse,
4750
unmarshalCreateIpResponse,
@@ -52,6 +55,7 @@ import {
5255
unmarshalCreateServerResponse,
5356
unmarshalCreateSnapshotResponse,
5457
unmarshalCreateVolumeResponse,
58+
unmarshalDetachServerFileSystemResponse,
5559
unmarshalDetachServerVolumeResponse,
5660
unmarshalExportSnapshotResponse,
5761
unmarshalGetDashboardResponse,
@@ -103,6 +107,8 @@ import {
103107
} from './marshalling.gen'
104108
import type {
105109
ApplyBlockMigrationRequest,
110+
AttachServerFileSystemRequest,
111+
AttachServerFileSystemResponse,
106112
AttachServerVolumeRequest,
107113
AttachServerVolumeResponse,
108114
CheckBlockMigrationOrganizationQuotasRequest,
@@ -134,6 +140,8 @@ import type {
134140
DeleteServerUserDataRequest,
135141
DeleteSnapshotRequest,
136142
DeleteVolumeRequest,
143+
DetachServerFileSystemRequest,
144+
DetachServerFileSystemResponse,
137145
DetachServerVolumeRequest,
138146
DetachServerVolumeResponse,
139147
ExportSnapshotRequest,
@@ -556,6 +564,44 @@ If the specified Instance offer is flagged as end of service, the best compatibl
556564
unmarshalDetachServerVolumeResponse,
557565
)
558566

567+
/**
568+
* Attach a filesystem volume to an Instance.
569+
*
570+
* @param request - The request {@link AttachServerFileSystemRequest}
571+
* @returns A Promise of AttachServerFileSystemResponse
572+
*/
573+
attachServerFileSystem = (request: Readonly<AttachServerFileSystemRequest>) =>
574+
this.client.fetch<AttachServerFileSystemResponse>(
575+
{
576+
body: JSON.stringify(
577+
marshalAttachServerFileSystemRequest(request, this.client.settings),
578+
),
579+
headers: jsonContentHeaders,
580+
method: 'POST',
581+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/attach-filesystem`,
582+
},
583+
unmarshalAttachServerFileSystemResponse,
584+
)
585+
586+
/**
587+
* Detach a filesystem volume to an Instance.
588+
*
589+
* @param request - The request {@link DetachServerFileSystemRequest}
590+
* @returns A Promise of DetachServerFileSystemResponse
591+
*/
592+
detachServerFileSystem = (request: Readonly<DetachServerFileSystemRequest>) =>
593+
this.client.fetch<DetachServerFileSystemResponse>(
594+
{
595+
body: JSON.stringify(
596+
marshalDetachServerFileSystemRequest(request, this.client.settings),
597+
),
598+
headers: jsonContentHeaders,
599+
method: 'POST',
600+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/detach-filesystem`,
601+
},
602+
unmarshalDetachServerFileSystemResponse,
603+
)
604+
559605
protected pageOfListImages = (request: Readonly<ListImagesRequest> = {}) =>
560606
this.client.fetch<ListImagesResponse>(
561607
{

0 commit comments

Comments
 (0)