Skip to content

Commit 6ef9448

Browse files
authored
Merge branch 'main' into feat/update-quota-error-message
2 parents b1e562e + b7654e6 commit 6ef9448

File tree

26 files changed

+5748
-2088
lines changed

26 files changed

+5748
-2088
lines changed

packages/clients/CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,34 @@
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.67.0](https://github.com/scaleway/scaleway-sdk-js/compare/@scaleway/[email protected]...@scaleway/[email protected]) (2025-02-24)
7+
8+
### Features
9+
10+
- **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))
11+
- **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))
12+
- **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))
13+
- **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))
14+
- **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))
15+
- **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))
16+
17+
### Bug Fixes
18+
19+
- **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))
20+
21+
## [2.66.0](https://github.com/scaleway/scaleway-sdk-js/compare/@scaleway/[email protected]...@scaleway/[email protected]) (2025-02-17)
22+
23+
### Features
24+
25+
- **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))
26+
- **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))
27+
- **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))
28+
29+
### Bug Fixes
30+
31+
- 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))
32+
- **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))
33+
634
## [2.65.0](https://github.com/scaleway/scaleway-sdk-js/compare/@scaleway/[email protected]...@scaleway/[email protected]) (2025-02-10)
735

836
### 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.67.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/types.gen.ts

Lines changed: 6 additions & 0 deletions
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+
| 'iamx_user'
17+
| 'iamx_application'
18+
| 'iamx_group'
19+
| 'iamx_policy'
20+
| 'iamx_api_key'
21+
| 'iamx_ssh_key'
1622

1723
export interface KeyManagerKeyInfo {}
1824

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ export class API extends ParentAPI {
243243
request.pageSize ?? this.client.settings.defaultPageSize,
244244
],
245245
['project_id', request.projectId],
246+
['tags', request.tags],
246247
['volume_id', request.volumeId],
247248
),
248249
},

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,11 @@ export type ListSnapshotsRequest = {
321321
volumeId?: string
322322
/** Filter snapshots by their names. */
323323
name?: string
324+
/**
325+
* Filter by tags. Only snapshots with one or more matching tags will be
326+
* returned.
327+
*/
328+
tags?: string[]
324329
}
325330

326331
export interface ListSnapshotsResponse {

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

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ import {
3030
unmarshalGrafana,
3131
unmarshalGrafanaProductDashboard,
3232
unmarshalGrafanaUser,
33+
unmarshalListAlertsResponse,
3334
unmarshalListContactPointsResponse,
3435
unmarshalListDataSourcesResponse,
3536
unmarshalListGrafanaProductDashboardsResponse,
3637
unmarshalListGrafanaUsersResponse,
37-
unmarshalListManagedAlertsResponse,
3838
unmarshalListPlansResponse,
3939
unmarshalListTokensResponse,
4040
unmarshalPlan,
@@ -60,11 +60,11 @@ import type {
6060
Grafana,
6161
GrafanaProductDashboard,
6262
GrafanaUser,
63+
ListAlertsResponse,
6364
ListContactPointsResponse,
6465
ListDataSourcesResponse,
6566
ListGrafanaProductDashboardsResponse,
6667
ListGrafanaUsersResponse,
67-
ListManagedAlertsResponse,
6868
ListPlansResponse,
6969
ListTokensResponse,
7070
Plan,
@@ -83,9 +83,9 @@ import type {
8383
RegionalApiGetDataSourceRequest,
8484
RegionalApiGetTokenRequest,
8585
RegionalApiGetUsageOverviewRequest,
86+
RegionalApiListAlertsRequest,
8687
RegionalApiListContactPointsRequest,
8788
RegionalApiListDataSourcesRequest,
88-
RegionalApiListManagedAlertsRequest,
8989
RegionalApiListTokensRequest,
9090
RegionalApiTriggerTestAlertRequest,
9191
RegionalApiUpdateContactPointRequest,
@@ -835,39 +835,31 @@ export class RegionalAPI extends ParentAPI {
835835
path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/alert-manager/contact-points/delete`,
836836
})
837837

838-
protected pageOfListManagedAlerts = (
839-
request: Readonly<RegionalApiListManagedAlertsRequest> = {},
840-
) =>
841-
this.client.fetch<ListManagedAlertsResponse>(
838+
/**
839+
* List alerts. List preconfigured and/or custom alerts for the specified
840+
* Project.
841+
*
842+
* @param request - The request {@link RegionalApiListAlertsRequest}
843+
* @returns A Promise of ListAlertsResponse
844+
*/
845+
listAlerts = (request: Readonly<RegionalApiListAlertsRequest> = {}) =>
846+
this.client.fetch<ListAlertsResponse>(
842847
{
843848
method: 'GET',
844-
path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/managed-alerts`,
849+
path: `/cockpit/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/alerts`,
845850
urlParams: urlParams(
846-
['order_by', request.orderBy],
847-
['page', request.page],
848-
[
849-
'page_size',
850-
request.pageSize ?? this.client.settings.defaultPageSize,
851-
],
851+
['is_enabled', request.isEnabled],
852+
['is_preconfigured', request.isPreconfigured],
852853
[
853854
'project_id',
854855
request.projectId ?? this.client.settings.defaultProjectId,
855856
],
857+
['state', request.state],
856858
),
857859
},
858-
unmarshalListManagedAlertsResponse,
860+
unmarshalListAlertsResponse,
859861
)
860862

861-
/**
862-
* List managed alerts. List all managed alerts for the specified Project.
863-
*
864-
* @param request - The request {@link RegionalApiListManagedAlertsRequest}
865-
* @returns A Promise of ListManagedAlertsResponse
866-
*/
867-
listManagedAlerts = (
868-
request: Readonly<RegionalApiListManagedAlertsRequest> = {},
869-
) => enrichForPagination('alerts', this.pageOfListManagedAlerts, request)
870-
871863
/**
872864
* Enable managed alerts. Enable the sending of managed alerts for the
873865
* specified Project. Managed alerts are predefined alerts that apply to

packages/clients/src/api/cockpit/v1/index.gen.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export { GlobalAPI, RegionalAPI } from './api.gen'
44
export type {
55
Alert,
66
AlertManager,
7+
AlertState,
78
ContactPoint,
89
ContactPointEmail,
910
DataSource,
@@ -26,14 +27,13 @@ export type {
2627
GrafanaProductDashboard,
2728
GrafanaUser,
2829
GrafanaUserRole,
30+
ListAlertsResponse,
2931
ListContactPointsResponse,
3032
ListDataSourcesRequestOrderBy,
3133
ListDataSourcesResponse,
3234
ListGrafanaProductDashboardsResponse,
3335
ListGrafanaUsersRequestOrderBy,
3436
ListGrafanaUsersResponse,
35-
ListManagedAlertsRequestOrderBy,
36-
ListManagedAlertsResponse,
3737
ListPlansRequestOrderBy,
3838
ListPlansResponse,
3939
ListTokensRequestOrderBy,
@@ -55,9 +55,9 @@ export type {
5555
RegionalApiGetDataSourceRequest,
5656
RegionalApiGetTokenRequest,
5757
RegionalApiGetUsageOverviewRequest,
58+
RegionalApiListAlertsRequest,
5859
RegionalApiListContactPointsRequest,
5960
RegionalApiListDataSourcesRequest,
60-
RegionalApiListManagedAlertsRequest,
6161
RegionalApiListTokensRequest,
6262
RegionalApiTriggerTestAlertRequest,
6363
RegionalApiUpdateContactPointRequest,

0 commit comments

Comments
 (0)