@scaleway/sdk 2.1.0 → 2.3.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/block/v1alpha1/marshalling.gen.js +1 -0
- package/dist/api/cockpit/v1beta1/api.gen.js +49 -70
- package/dist/api/cockpit/v1beta1/marshalling.gen.js +3 -4
- package/dist/api/container/v1beta1/api.gen.js +2 -0
- package/dist/api/function/v1beta1/api.gen.js +2 -0
- package/dist/api/instance/v1/api.gen.js +27 -1
- package/dist/api/instance/v1/marshalling.gen.js +132 -108
- package/dist/api/ipfs/v1alpha1/api.gen.js +15 -0
- package/dist/api/secret/v1alpha1/api.gen.js +21 -0
- package/dist/api/vpcgw/v1/api.gen.js +1 -1
- package/dist/api/webhosting/v1alpha1/api.gen.js +33 -3
- package/dist/api/webhosting/v1alpha1/marshalling.gen.js +22 -1
- package/dist/api/webhosting/v1alpha1/validation-rules.gen.js +10 -1
- package/dist/index.cjs +250 -128
- package/dist/index.d.ts +280 -115
- package/dist/scw/constants.js +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -497,7 +497,7 @@ const assertValidSettings = obj => {
|
|
|
497
497
|
}
|
|
498
498
|
};
|
|
499
499
|
|
|
500
|
-
const version = 'v2.
|
|
500
|
+
const version = 'v2.2.0';
|
|
501
501
|
const userAgent = `scaleway-sdk-js/${version}`;
|
|
502
502
|
|
|
503
503
|
const isBrowser = () =>
|
|
@@ -3852,6 +3852,7 @@ const unmarshalVolume$4 = data => {
|
|
|
3852
3852
|
return {
|
|
3853
3853
|
createdAt: unmarshalDate(data.created_at),
|
|
3854
3854
|
id: data.id,
|
|
3855
|
+
lastDetachedAt: unmarshalDate(data.last_detached_at),
|
|
3855
3856
|
name: data.name,
|
|
3856
3857
|
parentSnapshotId: data.parent_snapshot_id,
|
|
3857
3858
|
projectId: data.project_id,
|
|
@@ -4300,6 +4301,7 @@ const unmarshalDatasource = data => {
|
|
|
4300
4301
|
}
|
|
4301
4302
|
return {
|
|
4302
4303
|
id: data.id,
|
|
4304
|
+
isManagedByScaleway: data.is_managed_by_scaleway,
|
|
4303
4305
|
name: data.name,
|
|
4304
4306
|
projectId: data.project_id,
|
|
4305
4307
|
type: data.type,
|
|
@@ -4488,6 +4490,7 @@ const marshalCreateContactPointRequest = (request, defaults) => ({
|
|
|
4488
4490
|
project_id: request.projectId ?? defaults.defaultProjectId
|
|
4489
4491
|
});
|
|
4490
4492
|
const marshalCreateDatasourceRequest = (request, defaults) => ({
|
|
4493
|
+
is_default: request.isDefault,
|
|
4491
4494
|
name: request.name,
|
|
4492
4495
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
4493
4496
|
type: request.type
|
|
@@ -4529,9 +4532,6 @@ const marshalDisableManagedAlertsRequest = (request, defaults) => ({
|
|
|
4529
4532
|
const marshalEnableManagedAlertsRequest = (request, defaults) => ({
|
|
4530
4533
|
project_id: request.projectId ?? defaults.defaultProjectId
|
|
4531
4534
|
});
|
|
4532
|
-
const marshalResetCockpitGrafanaRequest = (request, defaults) => ({
|
|
4533
|
-
project_id: request.projectId ?? defaults.defaultProjectId
|
|
4534
|
-
});
|
|
4535
4535
|
const marshalResetGrafanaUserPasswordRequest = (request, defaults) => ({
|
|
4536
4536
|
project_id: request.projectId ?? defaults.defaultProjectId
|
|
4537
4537
|
});
|
|
@@ -4616,19 +4616,6 @@ let API$q = class API extends API$w {
|
|
|
4616
4616
|
path: `/cockpit/v1beta1/deactivate`
|
|
4617
4617
|
}, unmarshalCockpit);
|
|
4618
4618
|
|
|
4619
|
-
/**
|
|
4620
|
-
* Reset your Cockpit's Grafana associated with the specified Project ID.
|
|
4621
|
-
*
|
|
4622
|
-
* @param request - The request {@link ResetCockpitGrafanaRequest}
|
|
4623
|
-
* @returns A Promise of Cockpit
|
|
4624
|
-
*/
|
|
4625
|
-
resetCockpitGrafana = (request = {}) => this.client.fetch({
|
|
4626
|
-
body: JSON.stringify(marshalResetCockpitGrafanaRequest(request, this.client.settings)),
|
|
4627
|
-
headers: jsonContentHeaders$p,
|
|
4628
|
-
method: 'POST',
|
|
4629
|
-
path: `/cockpit/v1beta1/reset-grafana`
|
|
4630
|
-
}, unmarshalCockpit);
|
|
4631
|
-
|
|
4632
4619
|
/**
|
|
4633
4620
|
* Create a datasource for the specified Project ID and the given type.
|
|
4634
4621
|
*
|
|
@@ -4644,7 +4631,7 @@ let API$q = class API extends API$w {
|
|
|
4644
4631
|
pageOfListDatasources = (request = {}) => this.client.fetch({
|
|
4645
4632
|
method: 'GET',
|
|
4646
4633
|
path: `/cockpit/v1beta1/datasources`,
|
|
4647
|
-
urlParams: urlParams(['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId ?? this.client.settings.defaultProjectId], ['types', request.types])
|
|
4634
|
+
urlParams: urlParams(['is_managed_by_scaleway', request.isManagedByScaleway], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId ?? this.client.settings.defaultProjectId], ['types', request.types])
|
|
4648
4635
|
}, unmarshalListDatasourcesResponse);
|
|
4649
4636
|
|
|
4650
4637
|
/**
|
|
@@ -5587,6 +5574,8 @@ let API$p = class API extends API$w {
|
|
|
5587
5574
|
}, unmarshalDomain$3);
|
|
5588
5575
|
|
|
5589
5576
|
/**
|
|
5577
|
+
* Create a JWT token. Deprecated in favor of CreateToken.
|
|
5578
|
+
*
|
|
5590
5579
|
* @deprecated
|
|
5591
5580
|
* @param request - The request {@link IssueJWTRequest}
|
|
5592
5581
|
* @returns A Promise of Token
|
|
@@ -10327,6 +10316,8 @@ let API$l = class API extends API$w {
|
|
|
10327
10316
|
}, unmarshalDomain$1);
|
|
10328
10317
|
|
|
10329
10318
|
/**
|
|
10319
|
+
* Create a JWT token. Deprecated in favor of CreateToken.
|
|
10320
|
+
*
|
|
10330
10321
|
* @deprecated
|
|
10331
10322
|
* @param request - The request {@link IssueJWTRequest}
|
|
10332
10323
|
* @returns A Promise of Token
|
|
@@ -11950,40 +11941,6 @@ const unmarshalImage$3 = data => {
|
|
|
11950
11941
|
zone: data.zone
|
|
11951
11942
|
};
|
|
11952
11943
|
};
|
|
11953
|
-
const unmarshalCreateImageResponse = data => {
|
|
11954
|
-
if (!isJSONObject(data)) {
|
|
11955
|
-
throw new TypeError(`Unmarshalling the type 'CreateImageResponse' failed as data isn't a dictionary.`);
|
|
11956
|
-
}
|
|
11957
|
-
return {
|
|
11958
|
-
image: data.image ? unmarshalImage$3(data.image) : undefined
|
|
11959
|
-
};
|
|
11960
|
-
};
|
|
11961
|
-
const unmarshalIp$1 = data => {
|
|
11962
|
-
if (!isJSONObject(data)) {
|
|
11963
|
-
throw new TypeError(`Unmarshalling the type 'Ip' failed as data isn't a dictionary.`);
|
|
11964
|
-
}
|
|
11965
|
-
return {
|
|
11966
|
-
address: data.address,
|
|
11967
|
-
id: data.id,
|
|
11968
|
-
organization: data.organization,
|
|
11969
|
-
prefix: data.prefix,
|
|
11970
|
-
project: data.project,
|
|
11971
|
-
reverse: data.reverse,
|
|
11972
|
-
server: data.server ? unmarshalServerSummary(data.server) : undefined,
|
|
11973
|
-
state: data.state,
|
|
11974
|
-
tags: data.tags,
|
|
11975
|
-
type: data.type,
|
|
11976
|
-
zone: data.zone
|
|
11977
|
-
};
|
|
11978
|
-
};
|
|
11979
|
-
const unmarshalCreateIpResponse = data => {
|
|
11980
|
-
if (!isJSONObject(data)) {
|
|
11981
|
-
throw new TypeError(`Unmarshalling the type 'CreateIpResponse' failed as data isn't a dictionary.`);
|
|
11982
|
-
}
|
|
11983
|
-
return {
|
|
11984
|
-
ip: data.ip ? unmarshalIp$1(data.ip) : undefined
|
|
11985
|
-
};
|
|
11986
|
-
};
|
|
11987
11944
|
const unmarshalPlacementGroup = data => {
|
|
11988
11945
|
if (!isJSONObject(data)) {
|
|
11989
11946
|
throw new TypeError(`Unmarshalling the type 'PlacementGroup' failed as data isn't a dictionary.`);
|
|
@@ -12000,79 +11957,6 @@ const unmarshalPlacementGroup = data => {
|
|
|
12000
11957
|
zone: data.zone
|
|
12001
11958
|
};
|
|
12002
11959
|
};
|
|
12003
|
-
const unmarshalCreatePlacementGroupResponse = data => {
|
|
12004
|
-
if (!isJSONObject(data)) {
|
|
12005
|
-
throw new TypeError(`Unmarshalling the type 'CreatePlacementGroupResponse' failed as data isn't a dictionary.`);
|
|
12006
|
-
}
|
|
12007
|
-
return {
|
|
12008
|
-
placementGroup: data.placement_group ? unmarshalPlacementGroup(data.placement_group) : undefined
|
|
12009
|
-
};
|
|
12010
|
-
};
|
|
12011
|
-
const unmarshalCreatePrivateNICResponse = data => {
|
|
12012
|
-
if (!isJSONObject(data)) {
|
|
12013
|
-
throw new TypeError(`Unmarshalling the type 'CreatePrivateNICResponse' failed as data isn't a dictionary.`);
|
|
12014
|
-
}
|
|
12015
|
-
return {
|
|
12016
|
-
privateNic: data.private_nic ? unmarshalPrivateNIC(data.private_nic) : undefined
|
|
12017
|
-
};
|
|
12018
|
-
};
|
|
12019
|
-
const unmarshalSecurityGroup = data => {
|
|
12020
|
-
if (!isJSONObject(data)) {
|
|
12021
|
-
throw new TypeError(`Unmarshalling the type 'SecurityGroup' failed as data isn't a dictionary.`);
|
|
12022
|
-
}
|
|
12023
|
-
return {
|
|
12024
|
-
creationDate: unmarshalDate(data.creation_date),
|
|
12025
|
-
description: data.description,
|
|
12026
|
-
enableDefaultSecurity: data.enable_default_security,
|
|
12027
|
-
id: data.id,
|
|
12028
|
-
inboundDefaultPolicy: data.inbound_default_policy,
|
|
12029
|
-
modificationDate: unmarshalDate(data.modification_date),
|
|
12030
|
-
name: data.name,
|
|
12031
|
-
organization: data.organization,
|
|
12032
|
-
organizationDefault: data.organization_default,
|
|
12033
|
-
outboundDefaultPolicy: data.outbound_default_policy,
|
|
12034
|
-
project: data.project,
|
|
12035
|
-
projectDefault: data.project_default,
|
|
12036
|
-
servers: unmarshalArrayOfObject(data.servers, unmarshalServerSummary),
|
|
12037
|
-
state: data.state,
|
|
12038
|
-
stateful: data.stateful,
|
|
12039
|
-
tags: data.tags,
|
|
12040
|
-
zone: data.zone
|
|
12041
|
-
};
|
|
12042
|
-
};
|
|
12043
|
-
const unmarshalCreateSecurityGroupResponse = data => {
|
|
12044
|
-
if (!isJSONObject(data)) {
|
|
12045
|
-
throw new TypeError(`Unmarshalling the type 'CreateSecurityGroupResponse' failed as data isn't a dictionary.`);
|
|
12046
|
-
}
|
|
12047
|
-
return {
|
|
12048
|
-
securityGroup: data.security_group ? unmarshalSecurityGroup(data.security_group) : undefined
|
|
12049
|
-
};
|
|
12050
|
-
};
|
|
12051
|
-
const unmarshalSecurityGroupRule = data => {
|
|
12052
|
-
if (!isJSONObject(data)) {
|
|
12053
|
-
throw new TypeError(`Unmarshalling the type 'SecurityGroupRule' failed as data isn't a dictionary.`);
|
|
12054
|
-
}
|
|
12055
|
-
return {
|
|
12056
|
-
action: data.action,
|
|
12057
|
-
destPortFrom: data.dest_port_from,
|
|
12058
|
-
destPortTo: data.dest_port_to,
|
|
12059
|
-
direction: data.direction,
|
|
12060
|
-
editable: data.editable,
|
|
12061
|
-
id: data.id,
|
|
12062
|
-
ipRange: data.ip_range,
|
|
12063
|
-
position: data.position,
|
|
12064
|
-
protocol: data.protocol,
|
|
12065
|
-
zone: data.zone
|
|
12066
|
-
};
|
|
12067
|
-
};
|
|
12068
|
-
const unmarshalCreateSecurityGroupRuleResponse = data => {
|
|
12069
|
-
if (!isJSONObject(data)) {
|
|
12070
|
-
throw new TypeError(`Unmarshalling the type 'CreateSecurityGroupRuleResponse' failed as data isn't a dictionary.`);
|
|
12071
|
-
}
|
|
12072
|
-
return {
|
|
12073
|
-
rule: data.rule ? unmarshalSecurityGroupRule(data.rule) : undefined
|
|
12074
|
-
};
|
|
12075
|
-
};
|
|
12076
11960
|
const unmarshalSecurityGroupSummary = data => {
|
|
12077
11961
|
if (!isJSONObject(data)) {
|
|
12078
11962
|
throw new TypeError(`Unmarshalling the type 'SecurityGroupSummary' failed as data isn't a dictionary.`);
|
|
@@ -12187,6 +12071,121 @@ const unmarshalServer = data => {
|
|
|
12187
12071
|
zone: data.zone
|
|
12188
12072
|
};
|
|
12189
12073
|
};
|
|
12074
|
+
const unmarshalAttachServerVolumeResponse = data => {
|
|
12075
|
+
if (!isJSONObject(data)) {
|
|
12076
|
+
throw new TypeError(`Unmarshalling the type 'AttachServerVolumeResponse' failed as data isn't a dictionary.`);
|
|
12077
|
+
}
|
|
12078
|
+
return {
|
|
12079
|
+
server: data.server ? unmarshalServer(data.server) : undefined
|
|
12080
|
+
};
|
|
12081
|
+
};
|
|
12082
|
+
const unmarshalCreateImageResponse = data => {
|
|
12083
|
+
if (!isJSONObject(data)) {
|
|
12084
|
+
throw new TypeError(`Unmarshalling the type 'CreateImageResponse' failed as data isn't a dictionary.`);
|
|
12085
|
+
}
|
|
12086
|
+
return {
|
|
12087
|
+
image: data.image ? unmarshalImage$3(data.image) : undefined
|
|
12088
|
+
};
|
|
12089
|
+
};
|
|
12090
|
+
const unmarshalIp$1 = data => {
|
|
12091
|
+
if (!isJSONObject(data)) {
|
|
12092
|
+
throw new TypeError(`Unmarshalling the type 'Ip' failed as data isn't a dictionary.`);
|
|
12093
|
+
}
|
|
12094
|
+
return {
|
|
12095
|
+
address: data.address,
|
|
12096
|
+
id: data.id,
|
|
12097
|
+
organization: data.organization,
|
|
12098
|
+
prefix: data.prefix,
|
|
12099
|
+
project: data.project,
|
|
12100
|
+
reverse: data.reverse,
|
|
12101
|
+
server: data.server ? unmarshalServerSummary(data.server) : undefined,
|
|
12102
|
+
state: data.state,
|
|
12103
|
+
tags: data.tags,
|
|
12104
|
+
type: data.type,
|
|
12105
|
+
zone: data.zone
|
|
12106
|
+
};
|
|
12107
|
+
};
|
|
12108
|
+
const unmarshalCreateIpResponse = data => {
|
|
12109
|
+
if (!isJSONObject(data)) {
|
|
12110
|
+
throw new TypeError(`Unmarshalling the type 'CreateIpResponse' failed as data isn't a dictionary.`);
|
|
12111
|
+
}
|
|
12112
|
+
return {
|
|
12113
|
+
ip: data.ip ? unmarshalIp$1(data.ip) : undefined
|
|
12114
|
+
};
|
|
12115
|
+
};
|
|
12116
|
+
const unmarshalCreatePlacementGroupResponse = data => {
|
|
12117
|
+
if (!isJSONObject(data)) {
|
|
12118
|
+
throw new TypeError(`Unmarshalling the type 'CreatePlacementGroupResponse' failed as data isn't a dictionary.`);
|
|
12119
|
+
}
|
|
12120
|
+
return {
|
|
12121
|
+
placementGroup: data.placement_group ? unmarshalPlacementGroup(data.placement_group) : undefined
|
|
12122
|
+
};
|
|
12123
|
+
};
|
|
12124
|
+
const unmarshalCreatePrivateNICResponse = data => {
|
|
12125
|
+
if (!isJSONObject(data)) {
|
|
12126
|
+
throw new TypeError(`Unmarshalling the type 'CreatePrivateNICResponse' failed as data isn't a dictionary.`);
|
|
12127
|
+
}
|
|
12128
|
+
return {
|
|
12129
|
+
privateNic: data.private_nic ? unmarshalPrivateNIC(data.private_nic) : undefined
|
|
12130
|
+
};
|
|
12131
|
+
};
|
|
12132
|
+
const unmarshalSecurityGroup = data => {
|
|
12133
|
+
if (!isJSONObject(data)) {
|
|
12134
|
+
throw new TypeError(`Unmarshalling the type 'SecurityGroup' failed as data isn't a dictionary.`);
|
|
12135
|
+
}
|
|
12136
|
+
return {
|
|
12137
|
+
creationDate: unmarshalDate(data.creation_date),
|
|
12138
|
+
description: data.description,
|
|
12139
|
+
enableDefaultSecurity: data.enable_default_security,
|
|
12140
|
+
id: data.id,
|
|
12141
|
+
inboundDefaultPolicy: data.inbound_default_policy,
|
|
12142
|
+
modificationDate: unmarshalDate(data.modification_date),
|
|
12143
|
+
name: data.name,
|
|
12144
|
+
organization: data.organization,
|
|
12145
|
+
organizationDefault: data.organization_default,
|
|
12146
|
+
outboundDefaultPolicy: data.outbound_default_policy,
|
|
12147
|
+
project: data.project,
|
|
12148
|
+
projectDefault: data.project_default,
|
|
12149
|
+
servers: unmarshalArrayOfObject(data.servers, unmarshalServerSummary),
|
|
12150
|
+
state: data.state,
|
|
12151
|
+
stateful: data.stateful,
|
|
12152
|
+
tags: data.tags,
|
|
12153
|
+
zone: data.zone
|
|
12154
|
+
};
|
|
12155
|
+
};
|
|
12156
|
+
const unmarshalCreateSecurityGroupResponse = data => {
|
|
12157
|
+
if (!isJSONObject(data)) {
|
|
12158
|
+
throw new TypeError(`Unmarshalling the type 'CreateSecurityGroupResponse' failed as data isn't a dictionary.`);
|
|
12159
|
+
}
|
|
12160
|
+
return {
|
|
12161
|
+
securityGroup: data.security_group ? unmarshalSecurityGroup(data.security_group) : undefined
|
|
12162
|
+
};
|
|
12163
|
+
};
|
|
12164
|
+
const unmarshalSecurityGroupRule = data => {
|
|
12165
|
+
if (!isJSONObject(data)) {
|
|
12166
|
+
throw new TypeError(`Unmarshalling the type 'SecurityGroupRule' failed as data isn't a dictionary.`);
|
|
12167
|
+
}
|
|
12168
|
+
return {
|
|
12169
|
+
action: data.action,
|
|
12170
|
+
destPortFrom: data.dest_port_from,
|
|
12171
|
+
destPortTo: data.dest_port_to,
|
|
12172
|
+
direction: data.direction,
|
|
12173
|
+
editable: data.editable,
|
|
12174
|
+
id: data.id,
|
|
12175
|
+
ipRange: data.ip_range,
|
|
12176
|
+
position: data.position,
|
|
12177
|
+
protocol: data.protocol,
|
|
12178
|
+
zone: data.zone
|
|
12179
|
+
};
|
|
12180
|
+
};
|
|
12181
|
+
const unmarshalCreateSecurityGroupRuleResponse = data => {
|
|
12182
|
+
if (!isJSONObject(data)) {
|
|
12183
|
+
throw new TypeError(`Unmarshalling the type 'CreateSecurityGroupRuleResponse' failed as data isn't a dictionary.`);
|
|
12184
|
+
}
|
|
12185
|
+
return {
|
|
12186
|
+
rule: data.rule ? unmarshalSecurityGroupRule(data.rule) : undefined
|
|
12187
|
+
};
|
|
12188
|
+
};
|
|
12190
12189
|
const unmarshalCreateServerResponse = data => {
|
|
12191
12190
|
if (!isJSONObject(data)) {
|
|
12192
12191
|
throw new TypeError(`Unmarshalling the type 'CreateServerResponse' failed as data isn't a dictionary.`);
|
|
@@ -12257,6 +12256,14 @@ const unmarshalCreateVolumeResponse = data => {
|
|
|
12257
12256
|
volume: data.volume ? unmarshalVolume$2(data.volume) : undefined
|
|
12258
12257
|
};
|
|
12259
12258
|
};
|
|
12259
|
+
const unmarshalDetachServerVolumeResponse = data => {
|
|
12260
|
+
if (!isJSONObject(data)) {
|
|
12261
|
+
throw new TypeError(`Unmarshalling the type 'DetachServerVolumeResponse' failed as data isn't a dictionary.`);
|
|
12262
|
+
}
|
|
12263
|
+
return {
|
|
12264
|
+
server: data.server ? unmarshalServer(data.server) : undefined
|
|
12265
|
+
};
|
|
12266
|
+
};
|
|
12260
12267
|
const unmarshalExportSnapshotResponse = data => {
|
|
12261
12268
|
if (!isJSONObject(data)) {
|
|
12262
12269
|
throw new TypeError(`Unmarshalling the type 'ExportSnapshotResponse' failed as data isn't a dictionary.`);
|
|
@@ -12759,6 +12766,11 @@ const marshalApplyBlockMigrationRequest = (request, defaults) => ({
|
|
|
12759
12766
|
value: request.snapshotId
|
|
12760
12767
|
}])
|
|
12761
12768
|
});
|
|
12769
|
+
const marshalAttachServerVolumeRequest = (request, defaults) => ({
|
|
12770
|
+
boot: request.boot,
|
|
12771
|
+
volume_id: request.volumeId,
|
|
12772
|
+
volume_type: request.volumeType
|
|
12773
|
+
});
|
|
12762
12774
|
const marshalVolumeTemplate = (request, defaults) => ({
|
|
12763
12775
|
id: request.id,
|
|
12764
12776
|
name: request.name,
|
|
@@ -12942,6 +12954,9 @@ const marshalCreateVolumeRequest$1 = (request, defaults) => ({
|
|
|
12942
12954
|
value: request.baseSnapshot
|
|
12943
12955
|
}])
|
|
12944
12956
|
});
|
|
12957
|
+
const marshalDetachServerVolumeRequest = (request, defaults) => ({
|
|
12958
|
+
volume_id: request.volumeId
|
|
12959
|
+
});
|
|
12945
12960
|
const marshalExportSnapshotRequest = (request, defaults) => ({
|
|
12946
12961
|
bucket: request.bucket,
|
|
12947
12962
|
key: request.key
|
|
@@ -13402,6 +13417,32 @@ let API$j = class API extends API$w {
|
|
|
13402
13417
|
method: 'DELETE',
|
|
13403
13418
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/user_data/${validatePathParam('key', request.key)}`
|
|
13404
13419
|
});
|
|
13420
|
+
|
|
13421
|
+
/**
|
|
13422
|
+
* Attach a volume to a server.
|
|
13423
|
+
*
|
|
13424
|
+
* @param request - The request {@link AttachServerVolumeRequest}
|
|
13425
|
+
* @returns A Promise of AttachServerVolumeResponse
|
|
13426
|
+
*/
|
|
13427
|
+
attachServerVolume = request => this.client.fetch({
|
|
13428
|
+
body: JSON.stringify(marshalAttachServerVolumeRequest(request, this.client.settings)),
|
|
13429
|
+
headers: jsonContentHeaders$i,
|
|
13430
|
+
method: 'POST',
|
|
13431
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/attach-volume`
|
|
13432
|
+
}, unmarshalAttachServerVolumeResponse);
|
|
13433
|
+
|
|
13434
|
+
/**
|
|
13435
|
+
* Detach a volume from a server.
|
|
13436
|
+
*
|
|
13437
|
+
* @param request - The request {@link DetachServerVolumeRequest}
|
|
13438
|
+
* @returns A Promise of DetachServerVolumeResponse
|
|
13439
|
+
*/
|
|
13440
|
+
detachServerVolume = request => this.client.fetch({
|
|
13441
|
+
body: JSON.stringify(marshalDetachServerVolumeRequest(request, this.client.settings)),
|
|
13442
|
+
headers: jsonContentHeaders$i,
|
|
13443
|
+
method: 'POST',
|
|
13444
|
+
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/detach-volume`
|
|
13445
|
+
}, unmarshalDetachServerVolumeResponse);
|
|
13405
13446
|
pageOfListImages = (request = {}) => this.client.fetch({
|
|
13406
13447
|
method: 'GET',
|
|
13407
13448
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/images`,
|
|
@@ -15946,6 +15987,21 @@ let API$g = class API extends API$w {
|
|
|
15946
15987
|
method: 'POST',
|
|
15947
15988
|
path: `/ipfs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/pins/create-by-cid`
|
|
15948
15989
|
}, unmarshalPin);
|
|
15990
|
+
|
|
15991
|
+
/**
|
|
15992
|
+
* Replace pin by CID. Deletes the given resource ID and pins the new CID in
|
|
15993
|
+
* its place. Will fetch and store the content pointed by the provided CID.
|
|
15994
|
+
* The content must be available on the public IPFS network. The content (IPFS
|
|
15995
|
+
* blocks) is hosted by the pinning service until the pin is deleted. While
|
|
15996
|
+
* the content is available any other IPFS peer can fetch and host your
|
|
15997
|
+
* content. For this reason, we recommend that you pin either public or
|
|
15998
|
+
* encrypted content. Several different pin requests can target the same CID.
|
|
15999
|
+
* A pin is defined by its ID (UUID), its status (queued, pinning, pinned or
|
|
16000
|
+
* failed) and target CID.
|
|
16001
|
+
*
|
|
16002
|
+
* @param request - The request {@link ReplacePinRequest}
|
|
16003
|
+
* @returns A Promise of ReplacePinResponse
|
|
16004
|
+
*/
|
|
15949
16005
|
replacePin = request => this.client.fetch({
|
|
15950
16006
|
body: JSON.stringify(marshalReplacePinRequest(request, this.client.settings)),
|
|
15951
16007
|
headers: jsonContentHeaders$f,
|
|
@@ -24318,6 +24374,13 @@ let API$6 = class API extends API$w {
|
|
|
24318
24374
|
* metadata of a secret's given version specified by the `region`,
|
|
24319
24375
|
* `secret_name`, `revision` and `project_id` parameters.
|
|
24320
24376
|
*
|
|
24377
|
+
* This method is deprecated.
|
|
24378
|
+
*
|
|
24379
|
+
* Scaleway recommends that you use the `ListSecrets` request with the `name`
|
|
24380
|
+
* filter to specify the secret version desired, then use the
|
|
24381
|
+
* `GetSecretVersion` request.
|
|
24382
|
+
*
|
|
24383
|
+
* @deprecated
|
|
24321
24384
|
* @param request - The request {@link GetSecretVersionByNameRequest}
|
|
24322
24385
|
* @returns A Promise of SecretVersion
|
|
24323
24386
|
*/
|
|
@@ -24366,6 +24429,13 @@ let API$6 = class API extends API$w {
|
|
|
24366
24429
|
* given secret's versions specified by the `secret_name`,`region` and
|
|
24367
24430
|
* `project_id` parameters.
|
|
24368
24431
|
*
|
|
24432
|
+
* This method is deprecated.
|
|
24433
|
+
*
|
|
24434
|
+
* Scaleway recommends that you use the `ListSecrets` request with the `name`
|
|
24435
|
+
* filter to specify the secret version desired, then use the
|
|
24436
|
+
* `ListSecretVersions` request.
|
|
24437
|
+
*
|
|
24438
|
+
* @deprecated
|
|
24369
24439
|
* @param request - The request {@link ListSecretVersionsByNameRequest}
|
|
24370
24440
|
* @returns A Promise of ListSecretVersionsResponse
|
|
24371
24441
|
*/
|
|
@@ -24417,6 +24487,13 @@ let API$6 = class API extends API$w {
|
|
|
24417
24487
|
* a secret's version specified by the `region`, `secret_name`, `revision` and
|
|
24418
24488
|
* `project_id` parameters.
|
|
24419
24489
|
*
|
|
24490
|
+
* This method is deprecated.
|
|
24491
|
+
*
|
|
24492
|
+
* Scaleway recommends that you use the `ListSecrets` request with the `name`
|
|
24493
|
+
* filter to specify the secret version desired, then use the
|
|
24494
|
+
* `AccessSecretVersion` request.
|
|
24495
|
+
*
|
|
24496
|
+
* @deprecated
|
|
24420
24497
|
* @param request - The request {@link AccessSecretVersionByNameRequest}
|
|
24421
24498
|
* @returns A Promise of AccessSecretVersionResponse
|
|
24422
24499
|
*/
|
|
@@ -25949,7 +26026,7 @@ const jsonContentHeaders$1 = {
|
|
|
25949
26026
|
/** Public Gateways API. */
|
|
25950
26027
|
let API$1 = class API extends API$w {
|
|
25951
26028
|
/** Lists the available zones of the API. */
|
|
25952
|
-
static LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1', 'nl-ams-2', 'nl-ams-3', 'pl-waw-1', 'pl-waw-2'];
|
|
26029
|
+
static LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1', 'nl-ams-2', 'nl-ams-3', 'pl-waw-1', 'pl-waw-2', 'pl-waw-3'];
|
|
25953
26030
|
pageOfListGateways = (request = {}) => this.client.fetch({
|
|
25954
26031
|
method: 'GET',
|
|
25955
26032
|
path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/gateways`,
|
|
@@ -26535,6 +26612,7 @@ const unmarshalHosting = data => {
|
|
|
26535
26612
|
throw new TypeError(`Unmarshalling the type 'Hosting' failed as data isn't a dictionary.`);
|
|
26536
26613
|
}
|
|
26537
26614
|
return {
|
|
26615
|
+
controlPanelName: data.control_panel_name,
|
|
26538
26616
|
cpanelUrls: data.cpanel_urls ? unmarshalHostingCpanelUrls(data.cpanel_urls) : undefined,
|
|
26539
26617
|
createdAt: unmarshalDate(data.created_at),
|
|
26540
26618
|
dnsStatus: data.dns_status,
|
|
@@ -26588,6 +26666,25 @@ const unmarshalDnsRecords = data => {
|
|
|
26588
26666
|
status: data.status
|
|
26589
26667
|
};
|
|
26590
26668
|
};
|
|
26669
|
+
const unmarshalControlPanel = data => {
|
|
26670
|
+
if (!isJSONObject(data)) {
|
|
26671
|
+
throw new TypeError(`Unmarshalling the type 'ControlPanel' failed as data isn't a dictionary.`);
|
|
26672
|
+
}
|
|
26673
|
+
return {
|
|
26674
|
+
available: data.available,
|
|
26675
|
+
logoUrl: data.logo_url,
|
|
26676
|
+
name: data.name
|
|
26677
|
+
};
|
|
26678
|
+
};
|
|
26679
|
+
const unmarshalListControlPanelsResponse = data => {
|
|
26680
|
+
if (!isJSONObject(data)) {
|
|
26681
|
+
throw new TypeError(`Unmarshalling the type 'ListControlPanelsResponse' failed as data isn't a dictionary.`);
|
|
26682
|
+
}
|
|
26683
|
+
return {
|
|
26684
|
+
controlPanels: unmarshalArrayOfObject(data.control_panels, unmarshalControlPanel),
|
|
26685
|
+
totalCount: data.total_count
|
|
26686
|
+
};
|
|
26687
|
+
};
|
|
26591
26688
|
const unmarshalListHostingsResponse = data => {
|
|
26592
26689
|
if (!isJSONObject(data)) {
|
|
26593
26690
|
throw new TypeError(`Unmarshalling the type 'ListHostingsResponse' failed as data isn't a dictionary.`);
|
|
@@ -26621,6 +26718,7 @@ const unmarshalOffer = data => {
|
|
|
26621
26718
|
return {
|
|
26622
26719
|
available: data.available,
|
|
26623
26720
|
billingOperationPath: data.billing_operation_path,
|
|
26721
|
+
controlPanelName: data.control_panel_name,
|
|
26624
26722
|
endOfLife: data.end_of_life,
|
|
26625
26723
|
id: data.id,
|
|
26626
26724
|
price: data.price ? unmarshalMoney(data.price) : undefined,
|
|
@@ -26660,7 +26758,7 @@ const jsonContentHeaders = {
|
|
|
26660
26758
|
/** Web Hosting API. */
|
|
26661
26759
|
class API extends API$w {
|
|
26662
26760
|
/** Lists the available regions of the API. */
|
|
26663
|
-
static LOCALITIES = ['fr-par'];
|
|
26761
|
+
static LOCALITIES = ['fr-par', 'nl-ams'];
|
|
26664
26762
|
|
|
26665
26763
|
/**
|
|
26666
26764
|
* Order a Web Hosting plan. Order a Web Hosting plan, specifying the offer
|
|
@@ -26678,7 +26776,7 @@ class API extends API$w {
|
|
|
26678
26776
|
pageOfListHostings = (request = {}) => this.client.fetch({
|
|
26679
26777
|
method: 'GET',
|
|
26680
26778
|
path: `/webhosting/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/hostings`,
|
|
26681
|
-
urlParams: urlParams(['domain', request.domain], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId], ['statuses', request.statuses], ['tags', request.tags])
|
|
26779
|
+
urlParams: urlParams(['control_panels', request.controlPanels], ['domain', request.domain], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId], ['statuses', request.statuses], ['tags', request.tags])
|
|
26682
26780
|
}, unmarshalListHostingsResponse);
|
|
26683
26781
|
|
|
26684
26782
|
/**
|
|
@@ -26783,11 +26881,34 @@ class API extends API$w {
|
|
|
26783
26881
|
path: `/webhosting/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/offers`,
|
|
26784
26882
|
urlParams: urlParams(['hosting_id', request.hostingId], ['only_options', request.onlyOptions], ['order_by', request.orderBy], ['without_options', request.withoutOptions])
|
|
26785
26883
|
}, unmarshalListOffersResponse);
|
|
26884
|
+
pageOfListControlPanels = (request = {}) => this.client.fetch({
|
|
26885
|
+
method: 'GET',
|
|
26886
|
+
path: `/webhosting/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/control-panels`,
|
|
26887
|
+
urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
26888
|
+
}, unmarshalListControlPanelsResponse);
|
|
26889
|
+
|
|
26890
|
+
/**
|
|
26891
|
+
* List all control panels type. List the control panels type: cpanel or
|
|
26892
|
+
* plesk.
|
|
26893
|
+
*
|
|
26894
|
+
* @param request - The request {@link ListControlPanelsRequest}
|
|
26895
|
+
* @returns A Promise of ListControlPanelsResponse
|
|
26896
|
+
*/
|
|
26897
|
+
listControlPanels = (request = {}) => enrichForPagination('controlPanels', this.pageOfListControlPanels, request);
|
|
26786
26898
|
}
|
|
26787
26899
|
|
|
26788
26900
|
// This file was automatically generated. DO NOT EDIT.
|
|
26789
26901
|
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
26790
26902
|
|
|
26903
|
+
const ListControlPanelsRequest = {
|
|
26904
|
+
page: {
|
|
26905
|
+
greaterThan: 0
|
|
26906
|
+
},
|
|
26907
|
+
pageSize: {
|
|
26908
|
+
greaterThan: 0,
|
|
26909
|
+
lessThanOrEqual: 100
|
|
26910
|
+
}
|
|
26911
|
+
};
|
|
26791
26912
|
const ListHostingsRequest = {
|
|
26792
26913
|
page: {
|
|
26793
26914
|
greaterThan: 0
|
|
@@ -26800,6 +26921,7 @@ const ListHostingsRequest = {
|
|
|
26800
26921
|
|
|
26801
26922
|
var validationRules_gen = /*#__PURE__*/Object.freeze({
|
|
26802
26923
|
__proto__: null,
|
|
26924
|
+
ListControlPanelsRequest: ListControlPanelsRequest,
|
|
26803
26925
|
ListHostingsRequest: ListHostingsRequest
|
|
26804
26926
|
});
|
|
26805
26927
|
|