Skip to content

Commit a413c6e

Browse files
authored
Merge branch 'main' into v1.5719.0
2 parents cc19021 + 1966eef commit a413c6e

File tree

22 files changed

+437
-238
lines changed

22 files changed

+437
-238
lines changed

.github/workflows/check-pull-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
jobs:
88
check-title:
9-
runs-on: ubuntu-22.04
9+
runs-on: ubuntu-24.04
1010
steps:
1111
- uses: actions/[email protected]
1212
- uses: pnpm/[email protected]

.github/workflows/deploy-doc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ defaults:
2828
jobs:
2929
# Build job
3030
doc-build:
31-
runs-on: ubuntu-22.04
31+
runs-on: ubuntu-24.04
3232
steps:
3333
- name: Checkout
3434
uses: actions/checkout@v4

.github/workflows/deploy-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
deploy:
10-
runs-on: ubuntu-22.04
10+
runs-on: ubuntu-24.04
1111
if: github.ref == 'refs/heads/main'
1212
steps:
1313
- uses: actions/[email protected]

.github/workflows/run-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
jobs:
1111
typecheck:
12-
runs-on: ubuntu-22.04
12+
runs-on: ubuntu-24.04
1313
steps:
1414
- uses: actions/[email protected]
1515
- uses: pnpm/[email protected]
@@ -23,7 +23,7 @@ jobs:
2323
- run: pnpm run build
2424
- run: pnpm tsc --noEmit
2525
lint:
26-
runs-on: ubuntu-22.04
26+
runs-on: ubuntu-24.04
2727
steps:
2828
- uses: actions/[email protected]
2929
- uses: pnpm/[email protected]
@@ -37,7 +37,7 @@ jobs:
3737
- run: pnpm run build
3838
- run: pnpm run lint
3939
test:
40-
runs-on: ubuntu-22.04
40+
runs-on: ubuntu-24.04
4141
strategy:
4242
matrix:
4343
test-environment:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"cross-fetch": "4.0.0",
5858
"cz-conventional-changelog": "3.3.0",
5959
"esbuild-plugin-browserslist": "0.14.0",
60-
"eslint": "9.7.0",
60+
"eslint": "9.14.0",
6161
"eslint-plugin-tsdoc": "0.3.0",
6262
"husky": "9.1.6",
6363
"jsdom": "25.0.0",

packages/clients/CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,22 @@
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.54.0](https://github.com/scaleway/scaleway-sdk-js/compare/@scaleway/[email protected]...@scaleway/[email protected]) (2024-11-11)
7+
8+
### Features
9+
10+
- **apple_silicon:** add vnc diagnostic api definition ([#1566](https://github.com/scaleway/scaleway-sdk-js/issues/1566)) ([bd5e31a](https://github.com/scaleway/scaleway-sdk-js/commit/bd5e31a7f11a9fa357689098c9262c29f551207a))
11+
- **block:** add tags in ListVolumesRequest ([#1562](https://github.com/scaleway/scaleway-sdk-js/issues/1562)) ([f1fd071](https://github.com/scaleway/scaleway-sdk-js/commit/f1fd07110091712f191844e18aa69ba58521126d))
12+
- **cockpit:** add retention setup in datasource ([#1557](https://github.com/scaleway/scaleway-sdk-js/issues/1557)) ([24e27b4](https://github.com/scaleway/scaleway-sdk-js/commit/24e27b4db959286f9e34d55bd54a162a1ed3c443))
13+
- **ipam:** add new mgdb_instance resource ([#1564](https://github.com/scaleway/scaleway-sdk-js/issues/1564)) ([8b32902](https://github.com/scaleway/scaleway-sdk-js/commit/8b329024defa500d44a78115c6e5cce0d1fbd19a))
14+
- **serverless_jobs:** enable secrets ([#1558](https://github.com/scaleway/scaleway-sdk-js/issues/1558)) ([c7ba13c](https://github.com/scaleway/scaleway-sdk-js/commit/c7ba13c0c1d04607c48cddcd90dc035b6bd0e960))
15+
- **serverless:** add timestamps to function/container namespace ([#1560](https://github.com/scaleway/scaleway-sdk-js/issues/1560)) ([12d9c64](https://github.com/scaleway/scaleway-sdk-js/commit/12d9c64ba9d94c55136df4afff02554f33657db7))
16+
17+
### Bug Fixes
18+
19+
- do not default to config variable for optional fields ([#1556](https://github.com/scaleway/scaleway-sdk-js/issues/1556)) ([490f9d6](https://github.com/scaleway/scaleway-sdk-js/commit/490f9d601863e2ab5f36bec16bd1651b1250065e))
20+
- **k8s:** change node metadata path to avoid collision with nodes path ([#1563](https://github.com/scaleway/scaleway-sdk-js/issues/1563)) ([64dcb36](https://github.com/scaleway/scaleway-sdk-js/commit/64dcb36f721d03ee8fde328398e29ffbddd6f42f))
21+
622
## [2.53.0](https://github.com/scaleway/scaleway-sdk-js/compare/@scaleway/[email protected]...@scaleway/[email protected]) (2024-11-04)
723

824
### Features

packages/clients/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.53.0",
3+
"version": "2.54.0",
44
"license": "Apache-2.0",
55
"description": "Scaleway SDK.",
66
"keywords": [

packages/clients/src/api/applesilicon/v1alpha1/api.gen.ts

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,22 @@ import { SERVER_TRANSIENT_STATUSES } from './content.gen'
1212
import {
1313
marshalCreateServerRequest,
1414
marshalReinstallServerRequest,
15+
marshalStartConnectivityDiagnosticRequest,
1516
marshalUpdateServerRequest,
17+
unmarshalConnectivityDiagnostic,
1618
unmarshalListOSResponse,
1719
unmarshalListServerTypesResponse,
1820
unmarshalListServersResponse,
1921
unmarshalOS,
2022
unmarshalServer,
2123
unmarshalServerType,
24+
unmarshalStartConnectivityDiagnosticResponse,
2225
} from './marshalling.gen'
2326
import type {
27+
ConnectivityDiagnostic,
2428
CreateServerRequest,
2529
DeleteServerRequest,
30+
GetConnectivityDiagnosticRequest,
2631
GetOSRequest,
2732
GetServerRequest,
2833
GetServerTypeRequest,
@@ -37,6 +42,8 @@ import type {
3742
ReinstallServerRequest,
3843
Server,
3944
ServerType,
45+
StartConnectivityDiagnosticRequest,
46+
StartConnectivityDiagnosticResponse,
4047
UpdateServerRequest,
4148
} from './types.gen'
4249

@@ -291,4 +298,33 @@ export class API extends ParentAPI {
291298
},
292299
unmarshalServer,
293300
)
301+
302+
startConnectivityDiagnostic = (
303+
request: Readonly<StartConnectivityDiagnosticRequest>,
304+
) =>
305+
this.client.fetch<StartConnectivityDiagnosticResponse>(
306+
{
307+
body: JSON.stringify(
308+
marshalStartConnectivityDiagnosticRequest(
309+
request,
310+
this.client.settings,
311+
),
312+
),
313+
headers: jsonContentHeaders,
314+
method: 'POST',
315+
path: `/apple-silicon/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/connectivity-diagnostics`,
316+
},
317+
unmarshalStartConnectivityDiagnosticResponse,
318+
)
319+
320+
getConnectivityDiagnostic = (
321+
request: Readonly<GetConnectivityDiagnosticRequest>,
322+
) =>
323+
this.client.fetch<ConnectivityDiagnostic>(
324+
{
325+
method: 'GET',
326+
path: `/apple-silicon/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/connectivity-diagnostics/${validatePathParam('diagnosticId', request.diagnosticId)}`,
327+
},
328+
unmarshalConnectivityDiagnostic,
329+
)
294330
}

packages/clients/src/api/applesilicon/v1alpha1/marshalling.gen.ts

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import {
88
} from '../../../bridge'
99
import type { DefaultValues } from '../../../bridge'
1010
import type {
11+
ConnectivityDiagnostic,
12+
ConnectivityDiagnosticServerHealth,
1113
CreateServerRequest,
1214
ListOSResponse,
1315
ListServerTypesResponse,
@@ -21,6 +23,8 @@ import type {
2123
ServerTypeGPU,
2224
ServerTypeMemory,
2325
ServerTypeNetwork,
26+
StartConnectivityDiagnosticRequest,
27+
StartConnectivityDiagnosticResponse,
2428
UpdateServerRequest,
2529
} from './types.gen'
2630

@@ -159,6 +163,46 @@ export const unmarshalServer = (data: unknown): Server => {
159163
} as Server
160164
}
161165

166+
const unmarshalConnectivityDiagnosticServerHealth = (
167+
data: unknown,
168+
): ConnectivityDiagnosticServerHealth => {
169+
if (!isJSONObject(data)) {
170+
throw new TypeError(
171+
`Unmarshalling the type 'ConnectivityDiagnosticServerHealth' failed as data isn't a dictionary.`,
172+
)
173+
}
174+
175+
return {
176+
isAgentAlive: data.is_agent_alive,
177+
isMdmAlive: data.is_mdm_alive,
178+
isServerAlive: data.is_server_alive,
179+
isSshPortUp: data.is_ssh_port_up,
180+
isVncPortUp: data.is_vnc_port_up,
181+
lastCheckinDate: unmarshalDate(data.last_checkin_date),
182+
} as ConnectivityDiagnosticServerHealth
183+
}
184+
185+
export const unmarshalConnectivityDiagnostic = (
186+
data: unknown,
187+
): ConnectivityDiagnostic => {
188+
if (!isJSONObject(data)) {
189+
throw new TypeError(
190+
`Unmarshalling the type 'ConnectivityDiagnostic' failed as data isn't a dictionary.`,
191+
)
192+
}
193+
194+
return {
195+
errorMessage: data.error_message,
196+
healthDetails: data.health_details
197+
? unmarshalConnectivityDiagnosticServerHealth(data.health_details)
198+
: undefined,
199+
id: data.id,
200+
isHealthy: data.is_healthy,
201+
status: data.status,
202+
supportedActions: data.supported_actions,
203+
} as ConnectivityDiagnostic
204+
}
205+
162206
export const unmarshalListOSResponse = (data: unknown): ListOSResponse => {
163207
if (!isJSONObject(data)) {
164208
throw new TypeError(
@@ -201,6 +245,20 @@ export const unmarshalListServersResponse = (
201245
} as ListServersResponse
202246
}
203247

248+
export const unmarshalStartConnectivityDiagnosticResponse = (
249+
data: unknown,
250+
): StartConnectivityDiagnosticResponse => {
251+
if (!isJSONObject(data)) {
252+
throw new TypeError(
253+
`Unmarshalling the type 'StartConnectivityDiagnosticResponse' failed as data isn't a dictionary.`,
254+
)
255+
}
256+
257+
return {
258+
diagnosticId: data.diagnostic_id,
259+
} as StartConnectivityDiagnosticResponse
260+
}
261+
204262
export const marshalCreateServerRequest = (
205263
request: CreateServerRequest,
206264
defaults: DefaultValues,
@@ -218,6 +276,13 @@ export const marshalReinstallServerRequest = (
218276
os_id: request.osId,
219277
})
220278

279+
export const marshalStartConnectivityDiagnosticRequest = (
280+
request: StartConnectivityDiagnosticRequest,
281+
defaults: DefaultValues,
282+
): Record<string, unknown> => ({
283+
server_id: request.serverId,
284+
})
285+
221286
export const marshalUpdateServerRequest = (
222287
request: UpdateServerRequest,
223288
defaults: DefaultValues,

packages/clients/src/api/applesilicon/v1alpha1/types.gen.ts

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22
// If you have any remark or suggestion do not hesitate to open an issue.
33
import type { Zone } from '../../../bridge'
44

5+
export type ConnectivityDiagnosticActionType =
6+
| 'reboot_server'
7+
| 'reinstall_server'
8+
9+
export type ConnectivityDiagnosticDiagnosticStatus =
10+
| 'unknown_status'
11+
| 'processing'
12+
| 'error'
13+
| 'completed'
14+
515
export type ListServersRequestOrderBy = 'created_at_asc' | 'created_at_desc'
616

717
export type ServerStatus =
@@ -67,6 +77,15 @@ export interface ServerTypeNetwork {
6777
publicBandwidthBps: number
6878
}
6979

80+
export interface ConnectivityDiagnosticServerHealth {
81+
lastCheckinDate?: Date
82+
isServerAlive: boolean
83+
isAgentAlive: boolean
84+
isMdmAlive: boolean
85+
isSshPortUp: boolean
86+
isVncPortUp: boolean
87+
}
88+
7089
export interface ServerType {
7190
/** CPU description. */
7291
cpu?: ServerTypeCPU
@@ -140,6 +159,15 @@ export interface Server {
140159
delivered: boolean
141160
}
142161

162+
export interface ConnectivityDiagnostic {
163+
id: string
164+
status: ConnectivityDiagnosticDiagnosticStatus
165+
isHealthy: boolean
166+
healthDetails?: ConnectivityDiagnosticServerHealth
167+
supportedActions: ConnectivityDiagnosticActionType[]
168+
errorMessage: string
169+
}
170+
143171
export type CreateServerRequest = {
144172
/** Zone to target. If none is passed will use default zone from the config. */
145173
zone?: Zone
@@ -164,6 +192,12 @@ export type DeleteServerRequest = {
164192
serverId: string
165193
}
166194

195+
export type GetConnectivityDiagnosticRequest = {
196+
/** Zone to target. If none is passed will use default zone from the config. */
197+
zone?: Zone
198+
diagnosticId: string
199+
}
200+
167201
export type GetOSRequest = {
168202
/** Zone to target. If none is passed will use default zone from the config. */
169203
zone?: Zone
@@ -265,6 +299,16 @@ export type ReinstallServerRequest = {
265299
osId?: string
266300
}
267301

302+
export type StartConnectivityDiagnosticRequest = {
303+
/** Zone to target. If none is passed will use default zone from the config. */
304+
zone?: Zone
305+
serverId: string
306+
}
307+
308+
export interface StartConnectivityDiagnosticResponse {
309+
diagnosticId: string
310+
}
311+
268312
export type UpdateServerRequest = {
269313
/** Zone to target. If none is passed will use default zone from the config. */
270314
zone?: Zone

0 commit comments

Comments
 (0)