Skip to content

Commit b156941

Browse files
authored
Merge branch 'main' into v1.6111.0
2 parents 8d0bf70 + 2fa209a commit b156941

File tree

6 files changed

+5468
-1963
lines changed

6 files changed

+5468
-1963
lines changed

packages/clients/CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,19 @@
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.66.0](https://github.com/scaleway/scaleway-sdk-js/compare/@scaleway/[email protected]...@scaleway/[email protected]) (2025-02-17)
7+
8+
### Features
9+
10+
- **apple_silicon:** introduce monthly commitment handling ([#1803](https://github.com/scaleway/scaleway-sdk-js/issues/1803)) ([0972b37](https://github.com/scaleway/scaleway-sdk-js/commit/0972b37b4592b0112e6f800426b8129a85192d76))
11+
- **audit_trail:** add key manager to resource api ([#1786](https://github.com/scaleway/scaleway-sdk-js/issues/1786)) ([b985b98](https://github.com/scaleway/scaleway-sdk-js/commit/b985b981e60650c72ed4b8faf2422e3cf4063f08))
12+
- **edge_services:** add WAF billing ([#1800](https://github.com/scaleway/scaleway-sdk-js/issues/1800)) ([84a9ec5](https://github.com/scaleway/scaleway-sdk-js/commit/84a9ec517b24259cf6beef3277790a4764750bbb))
13+
14+
### Bug Fixes
15+
16+
- add prefix to Zone and Region import ([#1802](https://github.com/scaleway/scaleway-sdk-js/issues/1802)) ([ce59650](https://github.com/scaleway/scaleway-sdk-js/commit/ce596501b569b3387a76e12e7d00a90d94ca803e))
17+
- **types:** unknown property accessKey in createClient ([#1781](https://github.com/scaleway/scaleway-sdk-js/issues/1781)) ([865b8c7](https://github.com/scaleway/scaleway-sdk-js/commit/865b8c7b6854314ebc209b5bba6ea836cb792b73))
18+
619
## [2.65.0](https://github.com/scaleway/scaleway-sdk-js/compare/@scaleway/[email protected]...@scaleway/[email protected]) (2025-02-10)
720

821
### 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.65.0",
3+
"version": "2.66.0",
44
"license": "Apache-2.0",
55
"description": "Scaleway SDK.",
66
"keywords": [

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

Lines changed: 30 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+
Commitment,
12+
CommitmentTypeValue,
1113
ConnectivityDiagnostic,
1214
ConnectivityDiagnosticServerHealth,
1315
CreateServerRequest,
@@ -161,6 +163,19 @@ export const unmarshalServerType = (data: unknown): ServerType => {
161163
} as ServerType
162164
}
163165

166+
const unmarshalCommitment = (data: unknown): Commitment => {
167+
if (!isJSONObject(data)) {
168+
throw new TypeError(
169+
`Unmarshalling the type 'Commitment' failed as data isn't a dictionary.`,
170+
)
171+
}
172+
173+
return {
174+
cancelled: data.cancelled,
175+
type: data.type,
176+
} as Commitment
177+
}
178+
164179
export const unmarshalServer = (data: unknown): Server => {
165180
if (!isJSONObject(data)) {
166181
throw new TypeError(
@@ -169,6 +184,9 @@ export const unmarshalServer = (data: unknown): Server => {
169184
}
170185

171186
return {
187+
commitment: data.commitment
188+
? unmarshalCommitment(data.commitment)
189+
: undefined,
172190
createdAt: unmarshalDate(data.created_at),
173191
deletableAt: unmarshalDate(data.deletable_at),
174192
deletionScheduled: data.deletion_scheduled,
@@ -326,6 +344,7 @@ export const marshalCreateServerRequest = (
326344
request: CreateServerRequest,
327345
defaults: DefaultValues,
328346
): Record<string, unknown> => ({
347+
commitment_type: request.commitmentType,
329348
enable_vpc: request.enableVpc,
330349
name: request.name || randomName('as'),
331350
os_id: request.osId,
@@ -362,10 +381,21 @@ export const marshalStartConnectivityDiagnosticRequest = (
362381
server_id: request.serverId,
363382
})
364383

384+
const marshalCommitmentTypeValue = (
385+
request: CommitmentTypeValue,
386+
defaults: DefaultValues,
387+
): Record<string, unknown> => ({
388+
commitment_type: request.commitmentType,
389+
})
390+
365391
export const marshalUpdateServerRequest = (
366392
request: UpdateServerRequest,
367393
defaults: DefaultValues,
368394
): Record<string, unknown> => ({
395+
commitment_type:
396+
request.commitmentType !== undefined
397+
? marshalCommitmentTypeValue(request.commitmentType, defaults)
398+
: undefined,
369399
enable_vpc: request.enableVpc,
370400
name: request.name,
371401
schedule_deletion: request.scheduleDeletion,

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

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

5+
export type CommitmentType = 'duration_24h' | 'renewed_monthly' | 'none'
6+
57
export type ConnectivityDiagnosticActionType =
68
| 'reboot_server'
79
| 'reinstall_server'
@@ -98,6 +100,11 @@ export interface ServerTypeNetwork {
98100
publicBandwidthBps: number
99101
}
100102

103+
export interface Commitment {
104+
type: CommitmentType
105+
cancelled: boolean
106+
}
107+
101108
export interface ConnectivityDiagnosticServerHealth {
102109
lastCheckinDate?: Date
103110
isServerAlive: boolean
@@ -204,6 +211,12 @@ export interface Server {
204211
* server.
205212
*/
206213
vpcStatus: ServerPrivateNetworkStatus
214+
/** Commitment scheme applied to this server. */
215+
commitment?: Commitment
216+
}
217+
218+
export interface CommitmentTypeValue {
219+
commitmentType: CommitmentType
207220
}
208221

209222
export interface ConnectivityDiagnostic {
@@ -235,6 +248,12 @@ export type CreateServerRequest = {
235248
* configured through the Apple Silicon - Private Networks API.
236249
*/
237250
enableVpc: boolean
251+
/**
252+
* Activate commitment for this server. If not specified, there is a 24h
253+
* commitment due to Apple licensing. It can be updated with the Update Server
254+
* request. Available commitment depends on server type.
255+
*/
256+
commitmentType?: CommitmentType
238257
}
239258

240259
export type DeleteServerRequest = {
@@ -444,4 +463,9 @@ export type UpdateServerRequest = {
444463
scheduleDeletion?: boolean
445464
/** Activate or deactivate Private Network support for this server. */
446465
enableVpc?: boolean
466+
/**
467+
* Change commitment. Use 'none' to automatically cancel a renewing
468+
* commitment.
469+
*/
470+
commitmentType?: CommitmentTypeValue
447471
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export const version = 'v2.65.0'
1+
export const version = 'v2.66.0'
22

33
export const userAgent = `scaleway-sdk-js/${version}`

0 commit comments

Comments
 (0)