Skip to content

Commit 80036b1

Browse files
authored
Merge branch 'main' into feat/update-quota-error-message
2 parents 574d9a0 + 225c182 commit 80036b1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+11148
-3599
lines changed

.github/CODEOWNERS

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,34 @@
22
# the repo. Unless a later match takes precedence,
33
* @remyleone
44

5-
/packages/clients/src/api/account/ @tbellavia
6-
/packages/clients/src/api/applesilicon/ @Laure-di
7-
/packages/clients/src/api/baremetal/ @Laure-di
8-
/packages/clients/src/api/billing/ @tbellavia
9-
/packages/clients/src/api/block/ @Codelax
10-
/packages/clients/src/api/cockpit/ @jremy42
11-
/packages/clients/src/api/container/ @Codelax
12-
/packages/clients/src/api/dedibox/ @Laure-di
13-
/packages/clients/src/api/domain/ @yfodil
14-
/packages/clients/src/api/flexibleip/ @yfodil
15-
/packages/clients/src/api/function/ @Codelax
16-
/packages/clients/src/api/iam/ @tbellavia
17-
/packages/clients/src/api/instance/ @Codelax
18-
/packages/clients/src/api/inference/ @Laure-di
19-
/packages/clients/src/api/iot/ @jremy42
20-
/packages/clients/src/api/ipam/ @yfodil
21-
/packages/clients/src/api/jobs/ @Codelax
22-
/packages/clients/src/api/k8s/ @Codelax
23-
/packages/clients/src/api/key_manager/ @tbellavia
24-
/packages/clients/src/api/lb/ @yfodil
25-
/packages/clients/src/api/marketplace/ @Codelax
26-
/packages/clients/src/api/mnq/ @jremy42
27-
/packages/clients/src/api/rdb/ @jremy42
28-
/packages/clients/src/api/redis/ @jremy42
29-
/packages/clients/src/api/registry/ @Codelax
30-
/packages/clients/src/api/secret/ @tbellavia
31-
/packages/clients/src/api/serverless_sqldb/ @jremy42
32-
/packages/clients/src/api/tem/ @jremy42
33-
/packages/clients/src/api/vpc/ @yfodil
34-
/packages/clients/src/api/vpcgw/ @yfodil
35-
/packages/clients/src/api/webhosting/ @jremy42
5+
/packages/clients/src/api/account/ @scaleway/devtools-core
6+
/packages/clients/src/api/applesilicon/ @scaleway/devtools-compute-foundation
7+
/packages/clients/src/api/baremetal/ @scaleway/devtools-compute-foundation
8+
/packages/clients/src/api/billing/ @scaleway/devtools-core
9+
/packages/clients/src/api/block/ @scaleway/devtools-storage
10+
/packages/clients/src/api/cockpit/ @scaleway/devtools-dms
11+
/packages/clients/src/api/container/ @scaleway/devtools-compute
12+
/packages/clients/src/api/dedibox/ @scaleway/devtools-compute-foundation
13+
/packages/clients/src/api/domain/ @scaleway/devtools-dms
14+
/packages/clients/src/api/flexibleip/ @scaleway/devtools-network
15+
/packages/clients/src/api/function/ @scaleway/devtools-compute
16+
/packages/clients/src/api/iam/ @scaleway/devtools-core
17+
/packages/clients/src/api/instance/ @scaleway/devtools-compute
18+
/packages/clients/src/api/inference/ @scaleway/devtools-ai
19+
/packages/clients/src/api/iot/ @scaleway/devtools-dms
20+
/packages/clients/src/api/ipam/ @scaleway/devtools-network
21+
/packages/clients/src/api/jobs/ @scaleway/devtools-compute
22+
/packages/clients/src/api/k8s/ @scaleway/devtools-compute
23+
/packages/clients/src/api/key_manager/ @scaleway/devtools-core
24+
/packages/clients/src/api/lb/ @scaleway/devtools-network
25+
/packages/clients/src/api/marketplace/ @scaleway/devtools-compute
26+
/packages/clients/src/api/mnq/ @scaleway/devtools-dms
27+
/packages/clients/src/api/rdb/ @scaleway/devtools-dms
28+
/packages/clients/src/api/redis/ @scaleway/devtools-dms
29+
/packages/clients/src/api/registry/ @scaleway/devtools-compute
30+
/packages/clients/src/api/secret/ @scaleway/devtools-core
31+
/packages/clients/src/api/serverless_sqldb/ @scaleway/devtools-dms
32+
/packages/clients/src/api/tem/ @scaleway/devtools-dms
33+
/packages/clients/src/api/vpc/ @scaleway/devtools-network
34+
/packages/clients/src/api/vpcgw/ @scaleway/devtools-network
35+
/packages/clients/src/api/webhosting/ @scaleway/devtools-dms

packages/clients/CHANGELOG.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,53 @@
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.68.0](https://github.com/scaleway/scaleway-sdk-js/compare/@scaleway/[email protected]...@scaleway/[email protected]) (2025-03-03)
7+
8+
### Features
9+
10+
- **audit_trail:** add organization_id field to ListProducts ([#1853](https://github.com/scaleway/scaleway-sdk-js/issues/1853)) ([1c5ada4](https://github.com/scaleway/scaleway-sdk-js/commit/1c5ada42e2fb6c391545063d2daa64211a83713c))
11+
- **audit_trail:** add support for `Event.resources` ([#1849](https://github.com/scaleway/scaleway-sdk-js/issues/1849)) ([63c10bd](https://github.com/scaleway/scaleway-sdk-js/commit/63c10bd50419f4ade54d7ed515e4f255ec257d6d))
12+
- **audit_trail:** migrate iamx to iam ([#1834](https://github.com/scaleway/scaleway-sdk-js/issues/1834)) ([e511673](https://github.com/scaleway/scaleway-sdk-js/commit/e511673335fe2d3f9d558a00019908f324472934))
13+
- **baremetal:** add support for `MigrateServerToMonthlyOfferRequest` ([#1836](https://github.com/scaleway/scaleway-sdk-js/issues/1836)) ([9f18271](https://github.com/scaleway/scaleway-sdk-js/commit/9f182712c3dce2e8c87fead349db2fed6483fe24))
14+
- **block:** add support for v1 ([#1855](https://github.com/scaleway/scaleway-sdk-js/issues/1855)) ([3b16b6f](https://github.com/scaleway/scaleway-sdk-js/commit/3b16b6fe00efed25fb73e7008f3f931871a9bc8f))
15+
- **block:** add tags filter in list snapshots ([#1832](https://github.com/scaleway/scaleway-sdk-js/issues/1832)) ([b7654e6](https://github.com/scaleway/scaleway-sdk-js/commit/b7654e65f1b59efab8bf1237393c6d6b757fe9da))
16+
- **edge_services:** add support for v1beta1 ([#1833](https://github.com/scaleway/scaleway-sdk-js/issues/1833)) ([0040898](https://github.com/scaleway/scaleway-sdk-js/commit/004089827181764ddb2db734bdd58df0c849d2c9))
17+
- **instance:** add compatible types endpoint and end_of_service flag in ServerType ([#1835](https://github.com/scaleway/scaleway-sdk-js/issues/1835)) ([f849b3e](https://github.com/scaleway/scaleway-sdk-js/commit/f849b3e8b195b70ee14a0b6ab528ce131c1c543b))
18+
- **lb:** add support for `matchSubdomains` ([#1864](https://github.com/scaleway/scaleway-sdk-js/issues/1864)) ([c8e36ae](https://github.com/scaleway/scaleway-sdk-js/commit/c8e36ae0c698cee55a64050148ef6d1248c2031b))
19+
- **mongodb:** implement roles permissions api ([#1857](https://github.com/scaleway/scaleway-sdk-js/issues/1857)) ([4c86fbd](https://github.com/scaleway/scaleway-sdk-js/commit/4c86fbd890c8d8612507da1e8a4e1ce6922b525d))
20+
21+
### Bug Fixes
22+
23+
- **webhosting:** add hosting status naming ([#1859](https://github.com/scaleway/scaleway-sdk-js/issues/1859)) ([be04eda](https://github.com/scaleway/scaleway-sdk-js/commit/be04edadb76ec6116138b85c691e91d97f0c2275))
24+
25+
## [2.67.0](https://github.com/scaleway/scaleway-sdk-js/compare/@scaleway/[email protected]...@scaleway/[email protected]) (2025-02-24)
26+
27+
### Features
28+
29+
- **audit_trail:** add IAM resources ([#1819](https://github.com/scaleway/scaleway-sdk-js/issues/1819)) ([c5e65f1](https://github.com/scaleway/scaleway-sdk-js/commit/c5e65f14b032c8ee62ad15b504345d381a4e2bc3))
30+
- **cockpit:** add support for `RegionalApiListAlertsRequest` ([#1806](https://github.com/scaleway/scaleway-sdk-js/issues/1806)) ([bb46893](https://github.com/scaleway/scaleway-sdk-js/commit/bb468930776ca2459f040040d05c292cffc2b5ef))
31+
- **lb:** add support for `connectionRateLimit` ([#1811](https://github.com/scaleway/scaleway-sdk-js/issues/1811)) ([4997495](https://github.com/scaleway/scaleway-sdk-js/commit/4997495752cc405cf91f5915b7b6232cc0f493aa))
32+
- **secret:** add support for `RestoreSecretRequest` and `RestoreSecretVersionRequest` ([#1826](https://github.com/scaleway/scaleway-sdk-js/issues/1826)) ([eaf54ab](https://github.com/scaleway/scaleway-sdk-js/commit/eaf54ab8b6463c8a464ec4ce82ccd46eb2813a74))
33+
- **vpc_gw:** add a call to migrate a V1 gateway to V2 ([#1827](https://github.com/scaleway/scaleway-sdk-js/issues/1827)) ([a8f5160](https://github.com/scaleway/scaleway-sdk-js/commit/a8f51604b5ac5572a20f7e71782f04dc3ee19a86))
34+
- **webhosting:** add domain selected dns configuration ([#1831](https://github.com/scaleway/scaleway-sdk-js/issues/1831)) ([5327dc1](https://github.com/scaleway/scaleway-sdk-js/commit/5327dc1e19a8055ac11cbb481de0e625854fb219))
35+
36+
### Bug Fixes
37+
38+
- **webhosting:** add hosting domain status ([#1829](https://github.com/scaleway/scaleway-sdk-js/issues/1829)) ([44184c2](https://github.com/scaleway/scaleway-sdk-js/commit/44184c28886d2dbdddec426ba5b4cf7951c6e5b2))
39+
40+
## [2.66.0](https://github.com/scaleway/scaleway-sdk-js/compare/@scaleway/[email protected]...@scaleway/[email protected]) (2025-02-17)
41+
42+
### Features
43+
44+
- **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))
45+
- **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))
46+
- **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))
47+
48+
### Bug Fixes
49+
50+
- 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))
51+
- **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))
52+
653
## [2.65.0](https://github.com/scaleway/scaleway-sdk-js/compare/@scaleway/[email protected]...@scaleway/[email protected]) (2025-02-10)
754

855
### 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.68.0",
44
"license": "Apache-2.0",
55
"description": "Scaleway SDK.",
66
"keywords": [

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
export { API, PrivateNetworkAPI } from './api.gen'
44
export * from './content.gen'
55
export type {
6+
Commitment,
7+
CommitmentType,
8+
CommitmentTypeValue,
69
ConnectivityDiagnostic,
710
ConnectivityDiagnosticActionType,
811
ConnectivityDiagnosticDiagnosticStatus,

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
}

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ export class API extends ParentAPI {
7272
{
7373
method: 'GET',
7474
path: `/audit-trail/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/products`,
75+
urlParams: urlParams([
76+
'organization_id',
77+
request.organizationId ?? this.client.settings.defaultOrganizationId,
78+
]),
7579
},
7680
unmarshalListProductsResponse,
7781
)

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ export const unmarshalEvent = (data: unknown): Event => {
179179
requestBody: data.request_body,
180180
requestId: data.request_id,
181181
resource: data.resource ? unmarshalResource(data.resource) : undefined,
182+
resources: unmarshalArrayOfObject(data.resources, unmarshalResource),
182183
serviceName: data.service_name,
183184
sourceIp: data.source_ip,
184185
statusCode: data.status_code,

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ export type ResourceType =
1313
| 'kube_node'
1414
| 'kube_acl'
1515
| 'keym_key'
16+
| 'iam_user'
17+
| 'iam_application'
18+
| 'iam_group'
19+
| 'iam_policy'
20+
| 'iam_api_key'
21+
| 'iam_ssh_key'
1622

1723
export interface KeyManagerKeyInfo {}
1824

@@ -121,8 +127,10 @@ export interface Event {
121127
serviceName: string
122128
/** API method called to trigger the event. */
123129
methodName: string
124-
/** Resource attached to the event. */
130+
/** @deprecated Resource attached to the event. */
125131
resource?: Resource
132+
/** Resources attached to the event. */
133+
resources: Resource[]
126134
/** Unique identifier of the request at the origin of the event. */
127135
requestId: string
128136
/** Request at the origin of the event. */
@@ -193,6 +201,8 @@ export type ListProductsRequest = {
193201
* config.
194202
*/
195203
region?: ScwRegion
204+
/** ID of the Organization containing the Audit Trail events. */
205+
organizationId?: string
196206
}
197207

198208
export interface ListProductsResponse {

packages/clients/src/api/baremetal/v1/api.gen.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ import type {
7070
ListServersResponse,
7171
ListSettingsRequest,
7272
ListSettingsResponse,
73+
MigrateServerToMonthlyOfferRequest,
7374
OS,
7475
Offer,
7576
Option,
@@ -517,6 +518,23 @@ export class API extends ParentAPI {
517518
unmarshalServer,
518519
)
519520

521+
/**
522+
* Migrate server offer. Migrate server with hourly offer to monthly offer.
523+
*
524+
* @param request - The request {@link MigrateServerToMonthlyOfferRequest}
525+
* @returns A Promise of Server
526+
*/
527+
migrateServerToMonthlyOffer = (
528+
request: Readonly<MigrateServerToMonthlyOfferRequest>,
529+
) =>
530+
this.client.fetch<Server>(
531+
{
532+
method: 'POST',
533+
path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/migrate-offer-monthly`,
534+
},
535+
unmarshalServer,
536+
)
537+
520538
protected pageOfListOffers = (request: Readonly<ListOffersRequest> = {}) =>
521539
this.client.fetch<ListOffersResponse>(
522540
{

0 commit comments

Comments
 (0)