@scaleway/sdk 2.42.0 → 2.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.cjs +3 -1
- package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +3 -1
- package/dist/api/applesilicon/v1alpha1/types.gen.d.ts +9 -1
- package/dist/api/billing/v2beta1/api.gen.d.ts +4 -28
- package/dist/api/block/v1alpha1/api.gen.cjs +5 -3
- package/dist/api/block/v1alpha1/api.gen.d.ts +4 -3
- package/dist/api/block/v1alpha1/api.gen.js +5 -3
- package/dist/api/container/v1beta1/marshalling.gen.cjs +3 -0
- package/dist/api/container/v1beta1/marshalling.gen.js +3 -0
- package/dist/api/container/v1beta1/types.gen.d.ts +6 -0
- package/dist/api/iam/v1alpha1/marshalling.gen.cjs +2 -0
- package/dist/api/iam/v1alpha1/marshalling.gen.js +2 -0
- package/dist/api/iam/v1alpha1/types.gen.d.ts +4 -0
- package/dist/api/iam/v1alpha1/validation-rules.gen.cjs +6 -0
- package/dist/api/iam/v1alpha1/validation-rules.gen.d.ts +5 -0
- package/dist/api/iam/v1alpha1/validation-rules.gen.js +6 -0
- package/dist/api/k8s/v1/api.gen.cjs +32 -0
- package/dist/api/k8s/v1/api.gen.d.ts +19 -1
- package/dist/api/k8s/v1/api.gen.js +33 -1
- package/dist/api/k8s/v1/index.gen.d.ts +1 -1
- package/dist/api/k8s/v1/marshalling.gen.cjs +53 -0
- package/dist/api/k8s/v1/marshalling.gen.d.ts +3 -1
- package/dist/api/k8s/v1/marshalling.gen.js +53 -0
- package/dist/api/k8s/v1/types.gen.d.ts +48 -0
- package/dist/api/key_manager/v1alpha1/types.gen.d.ts +7 -7
- package/dist/api/secret/v1beta1/marshalling.gen.cjs +1 -0
- package/dist/api/secret/v1beta1/marshalling.gen.js +1 -0
- package/dist/api/secret/v1beta1/types.gen.d.ts +2 -0
- package/dist/api/serverless_sqldb/v1alpha1/marshalling.gen.cjs +1 -0
- package/dist/api/serverless_sqldb/v1alpha1/marshalling.gen.js +1 -0
- package/dist/api/serverless_sqldb/v1alpha1/types.gen.d.ts +3 -1
- package/dist/api/tem/v1alpha1/marshalling.gen.cjs +2 -0
- package/dist/api/tem/v1alpha1/marshalling.gen.js +2 -0
- package/dist/api/tem/v1alpha1/types.gen.d.ts +4 -0
- package/dist/api/vpcgw/v1/api.gen.cjs +8 -5
- package/dist/api/vpcgw/v1/api.gen.d.ts +5 -4
- package/dist/api/vpcgw/v1/api.gen.js +9 -6
- package/dist/api/vpcgw/v1/marshalling.gen.cjs +4 -0
- package/dist/api/vpcgw/v1/marshalling.gen.d.ts +2 -1
- package/dist/api/vpcgw/v1/marshalling.gen.js +4 -0
- package/dist/api/vpcgw/v1/types.gen.d.ts +2 -0
- package/dist/api/webhosting/v1alpha1/api.gen.cjs +91 -0
- package/dist/api/webhosting/v1alpha1/api.gen.d.ts +47 -1
- package/dist/api/webhosting/v1alpha1/api.gen.js +93 -2
- package/dist/api/webhosting/v1alpha1/index.gen.cjs +1 -0
- package/dist/api/webhosting/v1alpha1/index.gen.d.ts +2 -2
- package/dist/api/webhosting/v1alpha1/index.gen.js +2 -1
- package/dist/api/webhosting/v1alpha1/marshalling.gen.cjs +48 -0
- package/dist/api/webhosting/v1alpha1/marshalling.gen.d.ts +5 -1
- package/dist/api/webhosting/v1alpha1/marshalling.gen.js +48 -0
- package/dist/api/webhosting/v1alpha1/types.gen.d.ts +84 -0
- package/dist/api/webhosting/v1alpha1/validation-rules.gen.cjs +10 -0
- package/dist/api/webhosting/v1alpha1/validation-rules.gen.d.ts +9 -0
- package/dist/api/webhosting/v1alpha1/validation-rules.gen.js +10 -0
- package/dist/helpers/marshalling.d.ts +1 -4
- package/dist/scw/constants.cjs +1 -1
- package/dist/scw/constants.d.ts +2 -2
- package/dist/scw/constants.js +1 -1
- package/dist/scw/fetch/resource-paginator.d.ts +3 -3
- package/dist/scw/fetch/response-parser.d.ts +1 -1
- package/package.json +2 -2
|
@@ -145,6 +145,7 @@ const unmarshalCluster = (data) => {
|
|
|
145
145
|
projectId: data.project_id,
|
|
146
146
|
region: data.region,
|
|
147
147
|
routedIpEnabled: data.routed_ip_enabled,
|
|
148
|
+
sbsCsiEnabled: data.sbs_csi_enabled,
|
|
148
149
|
status: data.status,
|
|
149
150
|
tags: data.tags,
|
|
150
151
|
type: data.type,
|
|
@@ -212,6 +213,17 @@ const unmarshalExternalNode = (data) => {
|
|
|
212
213
|
runcVersion: data.runc_version
|
|
213
214
|
};
|
|
214
215
|
};
|
|
216
|
+
const unmarshalExternalNodeAuth = (data) => {
|
|
217
|
+
if (!isJSONObject(data)) {
|
|
218
|
+
throw new TypeError(
|
|
219
|
+
`Unmarshalling the type 'ExternalNodeAuth' failed as data isn't a dictionary.`
|
|
220
|
+
);
|
|
221
|
+
}
|
|
222
|
+
return {
|
|
223
|
+
apiUrl: data.api_url,
|
|
224
|
+
nodeToken: data.node_token
|
|
225
|
+
};
|
|
226
|
+
};
|
|
215
227
|
const unmarshalClusterType = (data) => {
|
|
216
228
|
if (!isJSONObject(data)) {
|
|
217
229
|
throw new TypeError(
|
|
@@ -223,6 +235,7 @@ const unmarshalClusterType = (data) => {
|
|
|
223
235
|
availability: data.availability,
|
|
224
236
|
commitmentDelay: data.commitment_delay,
|
|
225
237
|
dedicated: data.dedicated,
|
|
238
|
+
maxEtcdSize: data.max_etcd_size,
|
|
226
239
|
maxNodes: data.max_nodes,
|
|
227
240
|
memory: data.memory,
|
|
228
241
|
name: data.name,
|
|
@@ -311,6 +324,44 @@ const unmarshalListVersionsResponse = (data) => {
|
|
|
311
324
|
versions: unmarshalArrayOfObject(data.versions, unmarshalVersion)
|
|
312
325
|
};
|
|
313
326
|
};
|
|
327
|
+
const unmarshalNodeMetadataCoreV1Taint = (data) => {
|
|
328
|
+
if (!isJSONObject(data)) {
|
|
329
|
+
throw new TypeError(
|
|
330
|
+
`Unmarshalling the type 'NodeMetadataCoreV1Taint' failed as data isn't a dictionary.`
|
|
331
|
+
);
|
|
332
|
+
}
|
|
333
|
+
return {
|
|
334
|
+
effect: data.effect,
|
|
335
|
+
key: data.key,
|
|
336
|
+
value: data.value
|
|
337
|
+
};
|
|
338
|
+
};
|
|
339
|
+
const unmarshalNodeMetadata = (data) => {
|
|
340
|
+
if (!isJSONObject(data)) {
|
|
341
|
+
throw new TypeError(
|
|
342
|
+
`Unmarshalling the type 'NodeMetadata' failed as data isn't a dictionary.`
|
|
343
|
+
);
|
|
344
|
+
}
|
|
345
|
+
return {
|
|
346
|
+
clusterCa: data.cluster_ca,
|
|
347
|
+
clusterUrl: data.cluster_url,
|
|
348
|
+
credentialProviderConfig: data.credential_provider_config,
|
|
349
|
+
externalIp: data.external_ip,
|
|
350
|
+
fullIsolation: data.full_isolation,
|
|
351
|
+
hasGpu: data.has_gpu,
|
|
352
|
+
id: data.id,
|
|
353
|
+
kapsuleIfaceMac: data.kapsule_iface_mac,
|
|
354
|
+
kubeletConfig: data.kubelet_config,
|
|
355
|
+
name: data.name,
|
|
356
|
+
nodeLabels: data.node_labels,
|
|
357
|
+
nodeTaints: unmarshalArrayOfObject(
|
|
358
|
+
data.node_taints,
|
|
359
|
+
unmarshalNodeMetadataCoreV1Taint
|
|
360
|
+
),
|
|
361
|
+
poolVersion: data.pool_version,
|
|
362
|
+
privateNetworkMode: data.private_network_mode
|
|
363
|
+
};
|
|
364
|
+
};
|
|
314
365
|
const marshalMaintenanceWindow = (request, defaults) => ({
|
|
315
366
|
day: request.day,
|
|
316
367
|
start_hour: request.startHour
|
|
@@ -494,6 +545,7 @@ export {
|
|
|
494
545
|
marshalUpgradePoolRequest,
|
|
495
546
|
unmarshalCluster,
|
|
496
547
|
unmarshalExternalNode,
|
|
548
|
+
unmarshalExternalNodeAuth,
|
|
497
549
|
unmarshalListClusterAvailableTypesResponse,
|
|
498
550
|
unmarshalListClusterAvailableVersionsResponse,
|
|
499
551
|
unmarshalListClusterTypesResponse,
|
|
@@ -502,6 +554,7 @@ export {
|
|
|
502
554
|
unmarshalListPoolsResponse,
|
|
503
555
|
unmarshalListVersionsResponse,
|
|
504
556
|
unmarshalNode,
|
|
557
|
+
unmarshalNodeMetadata,
|
|
505
558
|
unmarshalPool,
|
|
506
559
|
unmarshalVersion
|
|
507
560
|
};
|
|
@@ -364,6 +364,8 @@ export interface ClusterType {
|
|
|
364
364
|
* note that audit logs are sent to Cockpit.
|
|
365
365
|
*/
|
|
366
366
|
auditLogsSupported: boolean;
|
|
367
|
+
/** Maximum amount of data that can be stored in etcd for the offer. */
|
|
368
|
+
maxEtcdSize: number;
|
|
367
369
|
}
|
|
368
370
|
export interface Version {
|
|
369
371
|
/** Name of the Kubernetes version. */
|
|
@@ -443,6 +445,11 @@ export interface Cluster {
|
|
|
443
445
|
* cluster.
|
|
444
446
|
*/
|
|
445
447
|
routedIpEnabled?: boolean;
|
|
448
|
+
/**
|
|
449
|
+
* @deprecated Defines whether the SBS-enabled CSI starting from v0.3 is
|
|
450
|
+
* installed on the cluster.
|
|
451
|
+
*/
|
|
452
|
+
sbsCsiEnabled?: boolean;
|
|
446
453
|
}
|
|
447
454
|
export interface Node {
|
|
448
455
|
/** Node ID. */
|
|
@@ -479,6 +486,11 @@ export interface Node {
|
|
|
479
486
|
/** Date on which the node was last updated. */
|
|
480
487
|
updatedAt?: Date;
|
|
481
488
|
}
|
|
489
|
+
export interface NodeMetadataCoreV1Taint {
|
|
490
|
+
key: string;
|
|
491
|
+
value: string;
|
|
492
|
+
effect: string;
|
|
493
|
+
}
|
|
482
494
|
export interface UpdateClusterRequestAutoUpgrade {
|
|
483
495
|
/** Defines whether auto upgrade is enabled for the cluster. */
|
|
484
496
|
enable?: boolean;
|
|
@@ -566,6 +578,15 @@ export interface UpdatePoolRequestUpgradePolicy {
|
|
|
566
578
|
maxUnavailable?: number;
|
|
567
579
|
maxSurge?: number;
|
|
568
580
|
}
|
|
581
|
+
export type AuthExternalNodeRequest = {
|
|
582
|
+
/**
|
|
583
|
+
* Region to target. If none is passed will use default region from the
|
|
584
|
+
* config.
|
|
585
|
+
*/
|
|
586
|
+
region?: Region;
|
|
587
|
+
/** Pool the node will be attached to. */
|
|
588
|
+
poolId: string;
|
|
589
|
+
};
|
|
569
590
|
export type CreateClusterRequest = {
|
|
570
591
|
/**
|
|
571
592
|
* Region to target. If none is passed will use default region from the
|
|
@@ -768,6 +789,10 @@ export interface ExternalNode {
|
|
|
768
789
|
nodeLabels: Record<string, string>;
|
|
769
790
|
nodeTaints: ExternalNodeCoreV1Taint[];
|
|
770
791
|
}
|
|
792
|
+
export interface ExternalNodeAuth {
|
|
793
|
+
nodeToken: string;
|
|
794
|
+
apiUrl: string;
|
|
795
|
+
}
|
|
771
796
|
export type GetClusterKubeConfigRequest = {
|
|
772
797
|
/**
|
|
773
798
|
* Region to target. If none is passed will use default region from the
|
|
@@ -788,6 +813,13 @@ export type GetClusterRequest = {
|
|
|
788
813
|
/** ID of the requested cluster. */
|
|
789
814
|
clusterId: string;
|
|
790
815
|
};
|
|
816
|
+
export type GetNodeMetadataRequest = {
|
|
817
|
+
/**
|
|
818
|
+
* Region to target. If none is passed will use default region from the
|
|
819
|
+
* config.
|
|
820
|
+
*/
|
|
821
|
+
region?: Region;
|
|
822
|
+
};
|
|
791
823
|
export type GetNodeRequest = {
|
|
792
824
|
/**
|
|
793
825
|
* Region to target. If none is passed will use default region from the
|
|
@@ -974,6 +1006,22 @@ export type MigrateClusterToRoutedIPsRequest = {
|
|
|
974
1006
|
region?: Region;
|
|
975
1007
|
clusterId: string;
|
|
976
1008
|
};
|
|
1009
|
+
export interface NodeMetadata {
|
|
1010
|
+
id: string;
|
|
1011
|
+
name: string;
|
|
1012
|
+
clusterUrl: string;
|
|
1013
|
+
clusterCa: string;
|
|
1014
|
+
credentialProviderConfig: string;
|
|
1015
|
+
poolVersion: string;
|
|
1016
|
+
kubeletConfig: string;
|
|
1017
|
+
nodeLabels: Record<string, string>;
|
|
1018
|
+
nodeTaints: NodeMetadataCoreV1Taint[];
|
|
1019
|
+
privateNetworkMode: string;
|
|
1020
|
+
kapsuleIfaceMac: string;
|
|
1021
|
+
fullIsolation: boolean;
|
|
1022
|
+
hasGpu: boolean;
|
|
1023
|
+
externalIp: string;
|
|
1024
|
+
}
|
|
977
1025
|
export type RebootNodeRequest = {
|
|
978
1026
|
/**
|
|
979
1027
|
* Region to target. If none is passed will use default region from the
|
|
@@ -14,7 +14,8 @@ export interface KeyRotationPolicy {
|
|
|
14
14
|
}
|
|
15
15
|
export interface KeyUsage {
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* See the `Key.Algorithm.SymmetricEncryption` enum for a description of
|
|
18
|
+
* values.
|
|
18
19
|
*
|
|
19
20
|
* One-of ('usage'): at most one of 'symmetricEncryption' could be set.
|
|
20
21
|
*/
|
|
@@ -33,11 +34,7 @@ export interface Key {
|
|
|
33
34
|
* AES-256-GCM.
|
|
34
35
|
*/
|
|
35
36
|
usage?: KeyUsage;
|
|
36
|
-
/**
|
|
37
|
-
* Current state of the key. Values include: `unknown_state`: key is in an
|
|
38
|
-
* unknown state. `enabled`: key can be used for cryptographic operations.
|
|
39
|
-
* `disabled`: key cannot be used for cryptographic operations.
|
|
40
|
-
*/
|
|
37
|
+
/** See the `Key.State` enum for a description of values. */
|
|
41
38
|
state: KeyState;
|
|
42
39
|
/** The rotation count tracks the amount of times that the key was rotated. */
|
|
43
40
|
rotationCount: number;
|
|
@@ -184,7 +181,10 @@ export type GenerateDataKeyRequest = {
|
|
|
184
181
|
region?: Region;
|
|
185
182
|
/** ID of the key. */
|
|
186
183
|
keyId: string;
|
|
187
|
-
/**
|
|
184
|
+
/**
|
|
185
|
+
* See the `DataKey.Algorithm.SymmetricEncryption` enum for a description of
|
|
186
|
+
* values.
|
|
187
|
+
*/
|
|
188
188
|
algorithm?: DataKeyAlgorithmSymmetricEncryption;
|
|
189
189
|
/**
|
|
190
190
|
* Default value is `false`, meaning that the plaintext is returned. Set it to
|
|
@@ -113,6 +113,8 @@ export interface Secret {
|
|
|
113
113
|
* default, the policy is applied to all the secret's versions.
|
|
114
114
|
*/
|
|
115
115
|
ephemeralPolicy?: EphemeralPolicy;
|
|
116
|
+
/** List of Scaleway resources that can access and manage the secret. */
|
|
117
|
+
usedBy: Product[];
|
|
116
118
|
/** Region of the secret. */
|
|
117
119
|
region: Region;
|
|
118
120
|
}
|
|
@@ -12,6 +12,7 @@ const unmarshalDatabaseBackup = (data) => {
|
|
|
12
12
|
return {
|
|
13
13
|
createdAt: marshalling.unmarshalDate(data.created_at),
|
|
14
14
|
databaseId: data.database_id,
|
|
15
|
+
dbSize: data.db_size,
|
|
15
16
|
downloadUrl: data.download_url,
|
|
16
17
|
downloadUrlExpiresAt: marshalling.unmarshalDate(data.download_url_expires_at),
|
|
17
18
|
expiresAt: marshalling.unmarshalDate(data.expires_at),
|
|
@@ -10,6 +10,7 @@ const unmarshalDatabaseBackup = (data) => {
|
|
|
10
10
|
return {
|
|
11
11
|
createdAt: unmarshalDate(data.created_at),
|
|
12
12
|
databaseId: data.database_id,
|
|
13
|
+
dbSize: data.db_size,
|
|
13
14
|
downloadUrl: data.download_url,
|
|
14
15
|
downloadUrlExpiresAt: unmarshalDate(data.download_url_expires_at),
|
|
15
16
|
expiresAt: unmarshalDate(data.expires_at),
|
|
@@ -21,8 +21,10 @@ export interface DatabaseBackup {
|
|
|
21
21
|
createdAt?: Date;
|
|
22
22
|
/** Expiration date. */
|
|
23
23
|
expiresAt?: Date;
|
|
24
|
-
/** Size of the database backup. */
|
|
24
|
+
/** Size (in bytes) of the database backup file. */
|
|
25
25
|
size?: number;
|
|
26
|
+
/** Size (in bytes) of the database when backup has been done. */
|
|
27
|
+
dbSize?: number;
|
|
26
28
|
/** Download URL of the exported database backup. */
|
|
27
29
|
downloadUrl?: string;
|
|
28
30
|
/** Expiration date of the download URL. */
|
|
@@ -95,6 +95,7 @@ const unmarshalDomain = (data) => {
|
|
|
95
95
|
);
|
|
96
96
|
}
|
|
97
97
|
return {
|
|
98
|
+
autoconfig: data.autoconfig,
|
|
98
99
|
createdAt: marshalling.unmarshalDate(data.created_at),
|
|
99
100
|
dkimConfig: data.dkim_config,
|
|
100
101
|
id: data.id,
|
|
@@ -275,6 +276,7 @@ const unmarshalStatistics = (data) => {
|
|
|
275
276
|
};
|
|
276
277
|
const marshalCreateDomainRequest = (request, defaults) => ({
|
|
277
278
|
accept_tos: request.acceptTos,
|
|
279
|
+
autoconfig: request.autoconfig,
|
|
278
280
|
domain_name: request.domainName,
|
|
279
281
|
project_id: request.projectId ?? defaults.defaultProjectId
|
|
280
282
|
});
|
|
@@ -93,6 +93,7 @@ const unmarshalDomain = (data) => {
|
|
|
93
93
|
);
|
|
94
94
|
}
|
|
95
95
|
return {
|
|
96
|
+
autoconfig: data.autoconfig,
|
|
96
97
|
createdAt: unmarshalDate(data.created_at),
|
|
97
98
|
dkimConfig: data.dkim_config,
|
|
98
99
|
id: data.id,
|
|
@@ -273,6 +274,7 @@ const unmarshalStatistics = (data) => {
|
|
|
273
274
|
};
|
|
274
275
|
const marshalCreateDomainRequest = (request, defaults) => ({
|
|
275
276
|
accept_tos: request.acceptTos,
|
|
277
|
+
autoconfig: request.autoconfig,
|
|
276
278
|
domain_name: request.domainName,
|
|
277
279
|
project_id: request.projectId ?? defaults.defaultProjectId
|
|
278
280
|
});
|
|
@@ -171,6 +171,8 @@ export interface Domain {
|
|
|
171
171
|
reputation?: DomainReputation;
|
|
172
172
|
/** List of records to configure to validate a domain. */
|
|
173
173
|
records?: DomainRecords;
|
|
174
|
+
/** Status of auto-configuration for the domain's DNS zone. */
|
|
175
|
+
autoconfig: boolean;
|
|
174
176
|
/**
|
|
175
177
|
* Region to target. If none is passed will use default region from the
|
|
176
178
|
* config.
|
|
@@ -251,6 +253,8 @@ export type CreateDomainRequest = {
|
|
|
251
253
|
domainName: string;
|
|
252
254
|
/** Accept Scaleway's Terms of Service. */
|
|
253
255
|
acceptTos: boolean;
|
|
256
|
+
/** Activate auto-configuration of the domain's DNS zone. */
|
|
257
|
+
autoconfig: boolean;
|
|
254
258
|
};
|
|
255
259
|
export type CreateEmailRequest = {
|
|
256
260
|
/**
|
|
@@ -131,17 +131,20 @@ class API extends api.API {
|
|
|
131
131
|
urlParams: marshalling.urlParams(["cleanup_dhcp", request.cleanupDhcp])
|
|
132
132
|
});
|
|
133
133
|
/**
|
|
134
|
-
* Upgrade a Public Gateway to the latest version
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
134
|
+
* Upgrade a Public Gateway to the latest version and/or to a different
|
|
135
|
+
* commercial offer type. Upgrade a given Public Gateway to the newest
|
|
136
|
+
* software version or to a different commercial offer type. This applies the
|
|
137
|
+
* latest bugfixes and features to your Public Gateway. Note that gateway
|
|
138
|
+
* service will be interrupted during the update.
|
|
138
139
|
*
|
|
139
140
|
* @param request - The request {@link UpgradeGatewayRequest}
|
|
140
141
|
* @returns A Promise of Gateway
|
|
141
142
|
*/
|
|
142
143
|
upgradeGateway = (request) => this.client.fetch(
|
|
143
144
|
{
|
|
144
|
-
body:
|
|
145
|
+
body: JSON.stringify(
|
|
146
|
+
marshalling_gen.marshalUpgradeGatewayRequest(request, this.client.settings)
|
|
147
|
+
),
|
|
145
148
|
headers: jsonContentHeaders,
|
|
146
149
|
method: "POST",
|
|
147
150
|
path: `/vpc-gw/v1/zones/${marshalling.validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways/${marshalling.validatePathParam("gatewayId", request.gatewayId)}/upgrade`
|
|
@@ -65,10 +65,11 @@ export declare class API extends ParentAPI {
|
|
|
65
65
|
*/
|
|
66
66
|
deleteGateway: (request: Readonly<DeleteGatewayRequest>) => Promise<void>;
|
|
67
67
|
/**
|
|
68
|
-
* Upgrade a Public Gateway to the latest version
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
68
|
+
* Upgrade a Public Gateway to the latest version and/or to a different
|
|
69
|
+
* commercial offer type. Upgrade a given Public Gateway to the newest
|
|
70
|
+
* software version or to a different commercial offer type. This applies the
|
|
71
|
+
* latest bugfixes and features to your Public Gateway. Note that gateway
|
|
72
|
+
* service will be interrupted during the update.
|
|
72
73
|
*
|
|
73
74
|
* @param request - The request {@link UpgradeGatewayRequest}
|
|
74
75
|
* @returns A Promise of Gateway
|
|
@@ -4,7 +4,7 @@ import { validatePathParam, urlParams } from "../../../helpers/marshalling.js";
|
|
|
4
4
|
import "../../../vendor/base64/index.js";
|
|
5
5
|
import { enrichForPagination } from "../../../scw/fetch/resource-paginator.js";
|
|
6
6
|
import { GATEWAY_TRANSIENT_STATUSES, GATEWAY_NETWORK_TRANSIENT_STATUSES } from "./content.gen.js";
|
|
7
|
-
import { unmarshalListGatewaysResponse, unmarshalGateway, marshalCreateGatewayRequest, marshalUpdateGatewayRequest, unmarshalListGatewayNetworksResponse, unmarshalGatewayNetwork, marshalCreateGatewayNetworkRequest, marshalUpdateGatewayNetworkRequest, unmarshalListDHCPsResponse, unmarshalDHCP, marshalCreateDHCPRequest, marshalUpdateDHCPRequest, unmarshalListDHCPEntriesResponse, unmarshalDHCPEntry, marshalCreateDHCPEntryRequest, marshalUpdateDHCPEntryRequest, marshalSetDHCPEntriesRequest, unmarshalSetDHCPEntriesResponse, unmarshalListPATRulesResponse, unmarshalPATRule, marshalCreatePATRuleRequest, marshalUpdatePATRuleRequest, marshalSetPATRulesRequest, unmarshalSetPATRulesResponse, unmarshalListGatewayTypesResponse, unmarshalListIPsResponse, unmarshalIP, marshalCreateIPRequest, marshalUpdateIPRequest } from "./marshalling.gen.js";
|
|
7
|
+
import { unmarshalListGatewaysResponse, unmarshalGateway, marshalCreateGatewayRequest, marshalUpdateGatewayRequest, marshalUpgradeGatewayRequest, unmarshalListGatewayNetworksResponse, unmarshalGatewayNetwork, marshalCreateGatewayNetworkRequest, marshalUpdateGatewayNetworkRequest, unmarshalListDHCPsResponse, unmarshalDHCP, marshalCreateDHCPRequest, marshalUpdateDHCPRequest, unmarshalListDHCPEntriesResponse, unmarshalDHCPEntry, marshalCreateDHCPEntryRequest, marshalUpdateDHCPEntryRequest, marshalSetDHCPEntriesRequest, unmarshalSetDHCPEntriesResponse, unmarshalListPATRulesResponse, unmarshalPATRule, marshalCreatePATRuleRequest, marshalUpdatePATRuleRequest, marshalSetPATRulesRequest, unmarshalSetPATRulesResponse, unmarshalListGatewayTypesResponse, unmarshalListIPsResponse, unmarshalIP, marshalCreateIPRequest, marshalUpdateIPRequest } from "./marshalling.gen.js";
|
|
8
8
|
const jsonContentHeaders = {
|
|
9
9
|
"Content-Type": "application/json; charset=utf-8"
|
|
10
10
|
};
|
|
@@ -129,17 +129,20 @@ class API extends API$1 {
|
|
|
129
129
|
urlParams: urlParams(["cleanup_dhcp", request.cleanupDhcp])
|
|
130
130
|
});
|
|
131
131
|
/**
|
|
132
|
-
* Upgrade a Public Gateway to the latest version
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
132
|
+
* Upgrade a Public Gateway to the latest version and/or to a different
|
|
133
|
+
* commercial offer type. Upgrade a given Public Gateway to the newest
|
|
134
|
+
* software version or to a different commercial offer type. This applies the
|
|
135
|
+
* latest bugfixes and features to your Public Gateway. Note that gateway
|
|
136
|
+
* service will be interrupted during the update.
|
|
136
137
|
*
|
|
137
138
|
* @param request - The request {@link UpgradeGatewayRequest}
|
|
138
139
|
* @returns A Promise of Gateway
|
|
139
140
|
*/
|
|
140
141
|
upgradeGateway = (request) => this.client.fetch(
|
|
141
142
|
{
|
|
142
|
-
body:
|
|
143
|
+
body: JSON.stringify(
|
|
144
|
+
marshalUpgradeGatewayRequest(request, this.client.settings)
|
|
145
|
+
),
|
|
143
146
|
headers: jsonContentHeaders,
|
|
144
147
|
method: "POST",
|
|
145
148
|
path: `/vpc-gw/v1/zones/${validatePathParam("zone", request.zone ?? this.client.settings.defaultZone)}/gateways/${validatePathParam("gatewayId", request.gatewayId)}/upgrade`
|
|
@@ -407,6 +407,9 @@ const marshalUpdatePATRuleRequest = (request, defaults) => ({
|
|
|
407
407
|
protocol: request.protocol,
|
|
408
408
|
public_port: request.publicPort
|
|
409
409
|
});
|
|
410
|
+
const marshalUpgradeGatewayRequest = (request, defaults) => ({
|
|
411
|
+
type: request.type
|
|
412
|
+
});
|
|
410
413
|
exports.marshalCreateDHCPEntryRequest = marshalCreateDHCPEntryRequest;
|
|
411
414
|
exports.marshalCreateDHCPRequest = marshalCreateDHCPRequest;
|
|
412
415
|
exports.marshalCreateGatewayNetworkRequest = marshalCreateGatewayNetworkRequest;
|
|
@@ -421,6 +424,7 @@ exports.marshalUpdateGatewayNetworkRequest = marshalUpdateGatewayNetworkRequest;
|
|
|
421
424
|
exports.marshalUpdateGatewayRequest = marshalUpdateGatewayRequest;
|
|
422
425
|
exports.marshalUpdateIPRequest = marshalUpdateIPRequest;
|
|
423
426
|
exports.marshalUpdatePATRuleRequest = marshalUpdatePATRuleRequest;
|
|
427
|
+
exports.marshalUpgradeGatewayRequest = marshalUpgradeGatewayRequest;
|
|
424
428
|
exports.unmarshalDHCP = unmarshalDHCP;
|
|
425
429
|
exports.unmarshalDHCPEntry = unmarshalDHCPEntry;
|
|
426
430
|
exports.unmarshalGateway = unmarshalGateway;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DefaultValues } from '../../../bridge';
|
|
2
|
-
import type { CreateDHCPEntryRequest, CreateDHCPRequest, CreateGatewayNetworkRequest, CreateGatewayRequest, CreateIPRequest, CreatePATRuleRequest, DHCP, DHCPEntry, Gateway, GatewayNetwork, IP, ListDHCPEntriesResponse, ListDHCPsResponse, ListGatewayNetworksResponse, ListGatewayTypesResponse, ListGatewaysResponse, ListIPsResponse, ListPATRulesResponse, PATRule, SetDHCPEntriesRequest, SetDHCPEntriesResponse, SetPATRulesRequest, SetPATRulesResponse, UpdateDHCPEntryRequest, UpdateDHCPRequest, UpdateGatewayNetworkRequest, UpdateGatewayRequest, UpdateIPRequest, UpdatePATRuleRequest } from './types.gen';
|
|
2
|
+
import type { CreateDHCPEntryRequest, CreateDHCPRequest, CreateGatewayNetworkRequest, CreateGatewayRequest, CreateIPRequest, CreatePATRuleRequest, DHCP, DHCPEntry, Gateway, GatewayNetwork, IP, ListDHCPEntriesResponse, ListDHCPsResponse, ListGatewayNetworksResponse, ListGatewayTypesResponse, ListGatewaysResponse, ListIPsResponse, ListPATRulesResponse, PATRule, SetDHCPEntriesRequest, SetDHCPEntriesResponse, SetPATRulesRequest, SetPATRulesResponse, UpdateDHCPEntryRequest, UpdateDHCPRequest, UpdateGatewayNetworkRequest, UpdateGatewayRequest, UpdateIPRequest, UpdatePATRuleRequest, UpgradeGatewayRequest } from './types.gen';
|
|
3
3
|
export declare const unmarshalDHCP: (data: unknown) => DHCP;
|
|
4
4
|
export declare const unmarshalGatewayNetwork: (data: unknown) => GatewayNetwork;
|
|
5
5
|
export declare const unmarshalIP: (data: unknown) => IP;
|
|
@@ -29,3 +29,4 @@ export declare const marshalUpdateGatewayNetworkRequest: (request: UpdateGateway
|
|
|
29
29
|
export declare const marshalUpdateGatewayRequest: (request: UpdateGatewayRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
30
30
|
export declare const marshalUpdateIPRequest: (request: UpdateIPRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
31
31
|
export declare const marshalUpdatePATRuleRequest: (request: UpdatePATRuleRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
32
|
+
export declare const marshalUpgradeGatewayRequest: (request: UpgradeGatewayRequest, defaults: DefaultValues) => Record<string, unknown>;
|
|
@@ -405,6 +405,9 @@ const marshalUpdatePATRuleRequest = (request, defaults) => ({
|
|
|
405
405
|
protocol: request.protocol,
|
|
406
406
|
public_port: request.publicPort
|
|
407
407
|
});
|
|
408
|
+
const marshalUpgradeGatewayRequest = (request, defaults) => ({
|
|
409
|
+
type: request.type
|
|
410
|
+
});
|
|
408
411
|
export {
|
|
409
412
|
marshalCreateDHCPEntryRequest,
|
|
410
413
|
marshalCreateDHCPRequest,
|
|
@@ -420,6 +423,7 @@ export {
|
|
|
420
423
|
marshalUpdateGatewayRequest,
|
|
421
424
|
marshalUpdateIPRequest,
|
|
422
425
|
marshalUpdatePATRuleRequest,
|
|
426
|
+
marshalUpgradeGatewayRequest,
|
|
423
427
|
unmarshalDHCP,
|
|
424
428
|
unmarshalDHCPEntry,
|
|
425
429
|
unmarshalGateway,
|
|
@@ -241,4 +241,95 @@ class API extends api.API {
|
|
|
241
241
|
marshalling_gen.unmarshalResetHostingPasswordResponse
|
|
242
242
|
);
|
|
243
243
|
}
|
|
244
|
+
class ClassicMailAPI extends api.API {
|
|
245
|
+
/** Lists the available regions of the API. */
|
|
246
|
+
static LOCALITIES = ["fr-par", "nl-ams", "pl-waw"];
|
|
247
|
+
/**
|
|
248
|
+
* Create a new mailbox within your hosting plan.. Create a new mailbox within
|
|
249
|
+
* your hosting plan.
|
|
250
|
+
*
|
|
251
|
+
* @param request - The request {@link ClassicMailApiCreateMailboxRequest}
|
|
252
|
+
* @returns A Promise of Mailbox
|
|
253
|
+
*/
|
|
254
|
+
createMailbox = (request) => this.client.fetch(
|
|
255
|
+
{
|
|
256
|
+
body: JSON.stringify(
|
|
257
|
+
marshalling_gen.marshalClassicMailApiCreateMailboxRequest(
|
|
258
|
+
request,
|
|
259
|
+
this.client.settings
|
|
260
|
+
)
|
|
261
|
+
),
|
|
262
|
+
headers: jsonContentHeaders,
|
|
263
|
+
method: "POST",
|
|
264
|
+
path: `/webhosting/v1alpha1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/classic-hostings/${marshalling.validatePathParam("onlineId", request.onlineId)}/mailboxes`
|
|
265
|
+
},
|
|
266
|
+
marshalling_gen.unmarshalMailbox
|
|
267
|
+
);
|
|
268
|
+
/**
|
|
269
|
+
* Get a mailbox by id within your hosting plan.. Get a mailbox by id within
|
|
270
|
+
* your hosting plan.
|
|
271
|
+
*
|
|
272
|
+
* @param request - The request {@link ClassicMailApiGetMailboxRequest}
|
|
273
|
+
* @returns A Promise of Mailbox
|
|
274
|
+
*/
|
|
275
|
+
getMailbox = (request) => this.client.fetch(
|
|
276
|
+
{
|
|
277
|
+
method: "GET",
|
|
278
|
+
path: `/webhosting/v1alpha1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/classic-hostings/${marshalling.validatePathParam("onlineId", request.onlineId)}/mailboxes/${marshalling.validatePathParam("mailboxId", request.mailboxId)}`
|
|
279
|
+
},
|
|
280
|
+
marshalling_gen.unmarshalMailbox
|
|
281
|
+
);
|
|
282
|
+
pageOfListMailboxes = (request) => this.client.fetch(
|
|
283
|
+
{
|
|
284
|
+
method: "GET",
|
|
285
|
+
path: `/webhosting/v1alpha1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/classic-hostings/${marshalling.validatePathParam("onlineId", request.onlineId)}/mailboxes`,
|
|
286
|
+
urlParams: marshalling.urlParams(
|
|
287
|
+
["domain", request.domain],
|
|
288
|
+
["page", request.page],
|
|
289
|
+
[
|
|
290
|
+
"page_size",
|
|
291
|
+
request.pageSize ?? this.client.settings.defaultPageSize
|
|
292
|
+
]
|
|
293
|
+
)
|
|
294
|
+
},
|
|
295
|
+
marshalling_gen.unmarshalListMailboxesResponse
|
|
296
|
+
);
|
|
297
|
+
/**
|
|
298
|
+
* List all mailboxes within your hosting plan.. List all mailboxes within
|
|
299
|
+
* your hosting plan.
|
|
300
|
+
*
|
|
301
|
+
* @param request - The request {@link ClassicMailApiListMailboxesRequest}
|
|
302
|
+
* @returns A Promise of ListMailboxesResponse
|
|
303
|
+
*/
|
|
304
|
+
listMailboxes = (request) => resourcePaginator.enrichForPagination("mailboxes", this.pageOfListMailboxes, request);
|
|
305
|
+
deleteMailbox = (request) => this.client.fetch(
|
|
306
|
+
{
|
|
307
|
+
method: "DELETE",
|
|
308
|
+
path: `/webhosting/v1alpha1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/classic-hostings/${marshalling.validatePathParam("onlineId", request.onlineId)}/mailboxes/${marshalling.validatePathParam("mailboxId", request.mailboxId)}`
|
|
309
|
+
},
|
|
310
|
+
marshalling_gen.unmarshalMailbox
|
|
311
|
+
);
|
|
312
|
+
/**
|
|
313
|
+
* Update the mailbox within your hosting plan.. Update the mailbox within
|
|
314
|
+
* your hosting plan.
|
|
315
|
+
*
|
|
316
|
+
* @param request - The request {@link ClassicMailApiUpdateMailboxRequest}
|
|
317
|
+
* @returns A Promise of Mailbox
|
|
318
|
+
*/
|
|
319
|
+
updateMailbox = (request) => this.client.fetch(
|
|
320
|
+
{
|
|
321
|
+
body: JSON.stringify(
|
|
322
|
+
marshalling_gen.marshalClassicMailApiUpdateMailboxRequest(
|
|
323
|
+
request,
|
|
324
|
+
this.client.settings
|
|
325
|
+
)
|
|
326
|
+
),
|
|
327
|
+
headers: jsonContentHeaders,
|
|
328
|
+
method: "PATCH",
|
|
329
|
+
path: `/webhosting/v1alpha1/regions/${marshalling.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/classic-hostings/${marshalling.validatePathParam("onlineId", request.onlineId)}/mailboxes/${marshalling.validatePathParam("mailboxId", request.mailboxId)}`
|
|
330
|
+
},
|
|
331
|
+
marshalling_gen.unmarshalMailbox
|
|
332
|
+
);
|
|
333
|
+
}
|
|
244
334
|
exports.API = API;
|
|
335
|
+
exports.ClassicMailAPI = ClassicMailAPI;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { API as ParentAPI } from '../../../bridge';
|
|
2
2
|
import type { Region, WaitForOptions } from '../../../bridge';
|
|
3
|
-
import type { CheckUserOwnsDomainRequest, CheckUserOwnsDomainResponse, CreateHostingRequest, CreateSessionRequest, DeleteHostingRequest, DnsRecords, GetDomainDnsRecordsRequest, GetHostingRequest, Hosting, ListControlPanelsRequest, ListControlPanelsResponse, ListHostingsRequest, ListHostingsResponse, ListOffersRequest, ListOffersResponse, ResetHostingPasswordRequest, ResetHostingPasswordResponse, RestoreHostingRequest, Session, UpdateHostingRequest } from './types.gen';
|
|
3
|
+
import type { CheckUserOwnsDomainRequest, CheckUserOwnsDomainResponse, ClassicMailApiCreateMailboxRequest, ClassicMailApiDeleteMailboxRequest, ClassicMailApiGetMailboxRequest, ClassicMailApiListMailboxesRequest, ClassicMailApiUpdateMailboxRequest, CreateHostingRequest, CreateSessionRequest, DeleteHostingRequest, DnsRecords, GetDomainDnsRecordsRequest, GetHostingRequest, Hosting, ListControlPanelsRequest, ListControlPanelsResponse, ListHostingsRequest, ListHostingsResponse, ListMailboxesResponse, ListOffersRequest, ListOffersResponse, Mailbox, ResetHostingPasswordRequest, ResetHostingPasswordResponse, RestoreHostingRequest, Session, UpdateHostingRequest } from './types.gen';
|
|
4
4
|
/**
|
|
5
5
|
* Web Hosting API.
|
|
6
6
|
*
|
|
@@ -120,3 +120,49 @@ export declare class API extends ParentAPI {
|
|
|
120
120
|
createSession: (request: Readonly<CreateSessionRequest>) => Promise<Session>;
|
|
121
121
|
resetHostingPassword: (request: Readonly<ResetHostingPasswordRequest>) => Promise<ResetHostingPasswordResponse>;
|
|
122
122
|
}
|
|
123
|
+
/**
|
|
124
|
+
* Web Hosting Classic Mailbox API.
|
|
125
|
+
*
|
|
126
|
+
* This API allows you to manage your mailboxes for your Web Hosting services.
|
|
127
|
+
*/
|
|
128
|
+
export declare class ClassicMailAPI extends ParentAPI {
|
|
129
|
+
/** Lists the available regions of the API. */
|
|
130
|
+
static readonly LOCALITIES: Region[];
|
|
131
|
+
/**
|
|
132
|
+
* Create a new mailbox within your hosting plan.. Create a new mailbox within
|
|
133
|
+
* your hosting plan.
|
|
134
|
+
*
|
|
135
|
+
* @param request - The request {@link ClassicMailApiCreateMailboxRequest}
|
|
136
|
+
* @returns A Promise of Mailbox
|
|
137
|
+
*/
|
|
138
|
+
createMailbox: (request: Readonly<ClassicMailApiCreateMailboxRequest>) => Promise<Mailbox>;
|
|
139
|
+
/**
|
|
140
|
+
* Get a mailbox by id within your hosting plan.. Get a mailbox by id within
|
|
141
|
+
* your hosting plan.
|
|
142
|
+
*
|
|
143
|
+
* @param request - The request {@link ClassicMailApiGetMailboxRequest}
|
|
144
|
+
* @returns A Promise of Mailbox
|
|
145
|
+
*/
|
|
146
|
+
getMailbox: (request: Readonly<ClassicMailApiGetMailboxRequest>) => Promise<Mailbox>;
|
|
147
|
+
protected pageOfListMailboxes: (request: Readonly<ClassicMailApiListMailboxesRequest>) => Promise<ListMailboxesResponse>;
|
|
148
|
+
/**
|
|
149
|
+
* List all mailboxes within your hosting plan.. List all mailboxes within
|
|
150
|
+
* your hosting plan.
|
|
151
|
+
*
|
|
152
|
+
* @param request - The request {@link ClassicMailApiListMailboxesRequest}
|
|
153
|
+
* @returns A Promise of ListMailboxesResponse
|
|
154
|
+
*/
|
|
155
|
+
listMailboxes: (request: Readonly<ClassicMailApiListMailboxesRequest>) => Promise<ListMailboxesResponse> & {
|
|
156
|
+
all: () => Promise<Mailbox[]>;
|
|
157
|
+
[Symbol.asyncIterator]: () => AsyncGenerator<Mailbox[], void, void>;
|
|
158
|
+
};
|
|
159
|
+
deleteMailbox: (request: Readonly<ClassicMailApiDeleteMailboxRequest>) => Promise<Mailbox>;
|
|
160
|
+
/**
|
|
161
|
+
* Update the mailbox within your hosting plan.. Update the mailbox within
|
|
162
|
+
* your hosting plan.
|
|
163
|
+
*
|
|
164
|
+
* @param request - The request {@link ClassicMailApiUpdateMailboxRequest}
|
|
165
|
+
* @returns A Promise of Mailbox
|
|
166
|
+
*/
|
|
167
|
+
updateMailbox: (request: Readonly<ClassicMailApiUpdateMailboxRequest>) => Promise<Mailbox>;
|
|
168
|
+
}
|