Skip to content

Commit e208fef

Browse files
authored
Merge branch 'main' into chore/add_formatting
2 parents 996243e + 17935b3 commit e208fef

File tree

89 files changed

+884
-601
lines changed

Some content is hidden

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

89 files changed

+884
-601
lines changed

examples/nodejs-minimal/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
},
1111
"dependencies": {
1212
"@scaleway/configuration-loader": "^1.0",
13-
"@scaleway/sdk": "^2.0"
13+
"@scaleway/sdk": "^2.0",
14+
"@scaleway/sdk-client": "^2.0"
1415
},
1516
"devDependencies": {
1617
"@types/node": "20.17.46",

examples/nodejs-minimal/src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
// Correct imports for Scaleway SDK v2.27.0+
12
import * as http from 'http'
23
import { loadProfileFromConfigurationFile } from '@scaleway/configuration-loader'
3-
import { Registry, createClient } from '@scaleway/sdk'
4+
import { Registry } from '@scaleway/sdk'
5+
import { createClient } from '@scaleway/sdk-client'
46

57
const hostname = '127.0.0.1'
68
const port = 3000

examples/nodejs-minimal/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"compilerOptions": {
3-
"module": "ESNext",
4-
"moduleResolution": "Bundler",
3+
"module": "NodeNext",
4+
"moduleResolution": "NodeNext",
55
"target": "ES2022",
66
"outDir": "./dist",
77
"strict": true,

packages_generated/account/src/v3/api.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// This file was automatically generated. DO NOT EDIT.
22
// If you have any remark or suggestion do not hesitate to open an issue.
33
import {
4-
API as ParentAPI,
54
enrichForPagination,
5+
API as ParentAPI,
66
urlParams,
77
validatePathParam,
88
} from '@scaleway/sdk-client'

packages_generated/account/src/v3/marshalling.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// This file was automatically generated. DO NOT EDIT.
22
// If you have any remark or suggestion do not hesitate to open an issue.
33
import randomName from '@scaleway/random-name'
4+
import type { DefaultValues } from '@scaleway/sdk-client'
45
import {
56
isJSONObject,
67
resolveOneOf,
78
unmarshalArrayOfObject,
89
unmarshalDate,
910
} from '@scaleway/sdk-client'
10-
import type { DefaultValues } from '@scaleway/sdk-client'
1111
import type {
1212
CheckContractSignatureResponse,
1313
Contract,

packages_generated/applesilicon/src/v1alpha1/api.gen.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
// This file was automatically generated. DO NOT EDIT.
22
// If you have any remark or suggestion do not hesitate to open an issue.
3+
4+
import type { ApiLocality, WaitForOptions } from '@scaleway/sdk-client'
35
import {
4-
API as ParentAPI,
56
enrichForPagination,
7+
API as ParentAPI,
68
toApiLocality,
79
urlParams,
810
validatePathParam,
911
waitForResource,
1012
} from '@scaleway/sdk-client'
11-
import type { ApiLocality, WaitForOptions } from '@scaleway/sdk-client'
1213
import {
1314
SERVER_PRIVATE_NETWORK_SERVER_TRANSIENT_STATUSES as SERVER_PRIVATE_NETWORK_SERVER_TRANSIENT_STATUSES_APPLESILICON,
1415
SERVER_TRANSIENT_STATUSES as SERVER_TRANSIENT_STATUSES_APPLESILICON,
@@ -25,8 +26,8 @@ import {
2526
unmarshalConnectivityDiagnostic,
2627
unmarshalListOSResponse,
2728
unmarshalListServerPrivateNetworksResponse,
28-
unmarshalListServerTypesResponse,
2929
unmarshalListServersResponse,
30+
unmarshalListServerTypesResponse,
3031
unmarshalOS,
3132
unmarshalServer,
3233
unmarshalServerPrivateNetwork,
@@ -47,10 +48,10 @@ import type {
4748
ListOSRequest,
4849
ListOSResponse,
4950
ListServerPrivateNetworksResponse,
50-
ListServerTypesRequest,
51-
ListServerTypesResponse,
5251
ListServersRequest,
5352
ListServersResponse,
53+
ListServerTypesRequest,
54+
ListServerTypesResponse,
5455
OS,
5556
PrivateNetworkApiAddServerPrivateNetworkRequest,
5657
PrivateNetworkApiDeleteServerPrivateNetworkRequest,

packages_generated/applesilicon/src/v1alpha1/marshalling.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// This file was automatically generated. DO NOT EDIT.
22
// If you have any remark or suggestion do not hesitate to open an issue.
33
import randomName from '@scaleway/random-name'
4+
import type { DefaultValues } from '@scaleway/sdk-client'
45
import {
56
isJSONObject,
67
unmarshalArrayOfObject,
78
unmarshalDate,
89
} from '@scaleway/sdk-client'
9-
import type { DefaultValues } from '@scaleway/sdk-client'
1010
import type {
1111
BatchCreateServersRequest,
1212
BatchCreateServersRequestBatchInnerCreateServerRequest,
@@ -18,8 +18,8 @@ import type {
1818
CreateServerRequest,
1919
ListOSResponse,
2020
ListServerPrivateNetworksResponse,
21-
ListServerTypesResponse,
2221
ListServersResponse,
22+
ListServerTypesResponse,
2323
OS,
2424
PrivateNetworkApiAddServerPrivateNetworkRequest,
2525
PrivateNetworkApiSetServerPrivateNetworksRequest,

packages_generated/audit_trail/src/v1alpha1/api.gen.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
// This file was automatically generated. DO NOT EDIT.
22
// If you have any remark or suggestion do not hesitate to open an issue.
3+
4+
import type { ApiLocality } from '@scaleway/sdk-client'
35
import {
46
API as ParentAPI,
57
toApiLocality,
68
urlParams,
79
validatePathParam,
810
} from '@scaleway/sdk-client'
9-
import type { ApiLocality } from '@scaleway/sdk-client'
1011
import {
1112
unmarshalListEventsResponse,
1213
unmarshalListProductsResponse,

packages_generated/audit_trail/src/v1alpha1/index.gen.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ export { API } from './api.gen'
44
export * from './marshalling.gen'
55
export type {
66
AccountOrganizationInfo,
7+
AccountProjectInfo,
78
AccountUserInfo,
89
AppleSiliconServerInfo,
10+
BaremetalServerInfo,
11+
BaremetalSettingInfo,
912
Event,
1013
EventPrincipal,
1114
InstanceServerInfo,

packages_generated/audit_trail/src/v1alpha1/marshalling.gen.ts

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@ import {
77
} from '@scaleway/sdk-client'
88
import type {
99
AccountOrganizationInfo,
10+
AccountProjectInfo,
1011
AccountUserInfo,
1112
AppleSiliconServerInfo,
13+
BaremetalServerInfo,
14+
BaremetalSettingInfo,
1215
Event,
1316
EventPrincipal,
1417
InstanceServerInfo,
@@ -38,6 +41,18 @@ const unmarshalAccountOrganizationInfo = (
3841
return {} as AccountOrganizationInfo
3942
}
4043

44+
const unmarshalAccountProjectInfo = (data: unknown): AccountProjectInfo => {
45+
if (!isJSONObject(data)) {
46+
throw new TypeError(
47+
`Unmarshalling the type 'AccountProjectInfo' failed as data isn't a dictionary.`,
48+
)
49+
}
50+
51+
return {
52+
description: data.description,
53+
} as AccountProjectInfo
54+
}
55+
4156
const unmarshalAccountUserInfo = (data: unknown): AccountUserInfo => {
4257
if (!isJSONObject(data)) {
4358
throw new TypeError(
@@ -66,6 +81,31 @@ const unmarshalAppleSiliconServerInfo = (
6681
} as AppleSiliconServerInfo
6782
}
6883

84+
const unmarshalBaremetalServerInfo = (data: unknown): BaremetalServerInfo => {
85+
if (!isJSONObject(data)) {
86+
throw new TypeError(
87+
`Unmarshalling the type 'BaremetalServerInfo' failed as data isn't a dictionary.`,
88+
)
89+
}
90+
91+
return {
92+
description: data.description,
93+
tags: data.tags,
94+
} as BaremetalServerInfo
95+
}
96+
97+
const unmarshalBaremetalSettingInfo = (data: unknown): BaremetalSettingInfo => {
98+
if (!isJSONObject(data)) {
99+
throw new TypeError(
100+
`Unmarshalling the type 'BaremetalSettingInfo' failed as data isn't a dictionary.`,
101+
)
102+
}
103+
104+
return {
105+
type: data.type,
106+
} as BaremetalSettingInfo
107+
}
108+
69109
const unmarshalInstanceServerInfo = (data: unknown): InstanceServerInfo => {
70110
if (!isJSONObject(data)) {
71111
throw new TypeError(
@@ -188,12 +228,21 @@ export const unmarshalResource = (data: unknown): Resource => {
188228
accountOrganizationInfo: data.account_organization_info
189229
? unmarshalAccountOrganizationInfo(data.account_organization_info)
190230
: undefined,
231+
accountProjectInfo: data.account_project_info
232+
? unmarshalAccountProjectInfo(data.account_project_info)
233+
: undefined,
191234
accountUserInfo: data.account_user_info
192235
? unmarshalAccountUserInfo(data.account_user_info)
193236
: undefined,
194237
appleSiliconServerInfo: data.apple_silicon_server_info
195238
? unmarshalAppleSiliconServerInfo(data.apple_silicon_server_info)
196239
: undefined,
240+
baremetalServerInfo: data.baremetal_server_info
241+
? unmarshalBaremetalServerInfo(data.baremetal_server_info)
242+
: undefined,
243+
baremetalSettingInfo: data.baremetal_setting_info
244+
? unmarshalBaremetalSettingInfo(data.baremetal_setting_info)
245+
: undefined,
197246
createdAt: unmarshalDate(data.created_at),
198247
deletedAt: unmarshalDate(data.deleted_at),
199248
id: data.id,

0 commit comments

Comments
 (0)