@scaleway/sdk 1.33.0 → 1.35.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/billing/v2alpha1/api.gen.js +23 -0
- package/dist/api/block/v1alpha1/api.gen.js +14 -15
- package/dist/api/cockpit/v1beta1/api.gen.js +68 -39
- package/dist/api/cockpit/v1beta1/marshalling.gen.js +22 -13
- package/dist/api/container/v1beta1/marshalling.gen.js +1 -0
- package/dist/api/function/v1beta1/marshalling.gen.js +1 -0
- package/dist/api/instance/v1/api.gen.js +1 -1
- package/dist/api/k8s/v1/marshalling.gen.js +3 -0
- package/dist/api/lb/v1/api.gen.js +1 -1
- package/dist/index.cjs +79 -30
- package/dist/index.d.ts +182 -67
- 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 = 'v1.
|
|
500
|
+
const version = 'v1.34.0';
|
|
501
501
|
const userAgent = `scaleway-sdk-js/${version}`;
|
|
502
502
|
|
|
503
503
|
const isBrowser = () =>
|
|
@@ -3694,6 +3694,14 @@ const unmarshalListInvoicesResponse = data => {
|
|
|
3694
3694
|
* This API allows you to query your consumption. Billing API.
|
|
3695
3695
|
*/
|
|
3696
3696
|
let API$q = class API extends API$u {
|
|
3697
|
+
/**
|
|
3698
|
+
* Get current month's consumption. The consumption reflects the amount of
|
|
3699
|
+
* money you have spent for the products you have used. The consumption value
|
|
3700
|
+
* is monetary and is not computed in real time.
|
|
3701
|
+
*
|
|
3702
|
+
* @param request - The request {@link GetConsumptionRequest}
|
|
3703
|
+
* @returns A Promise of GetConsumptionResponse
|
|
3704
|
+
*/
|
|
3697
3705
|
getConsumption = (request = {}) => this.client.fetch({
|
|
3698
3706
|
method: 'GET',
|
|
3699
3707
|
path: `/billing/v2alpha1/consumption`,
|
|
@@ -3704,7 +3712,22 @@ let API$q = class API extends API$u {
|
|
|
3704
3712
|
path: `/billing/v2alpha1/invoices`,
|
|
3705
3713
|
urlParams: urlParams(['invoice_type', request.invoiceType ?? 'unknown_type'], ['order_by', request.orderBy ?? 'invoice_number_desc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['started_after', request.startedAfter], ['started_before', request.startedBefore])
|
|
3706
3714
|
}, unmarshalListInvoicesResponse);
|
|
3715
|
+
|
|
3716
|
+
/**
|
|
3717
|
+
* List invoices. List all your invoices, filtering by `start_date` and
|
|
3718
|
+
* `invoice_type`. Each invoice has its own ID.
|
|
3719
|
+
*
|
|
3720
|
+
* @param request - The request {@link ListInvoicesRequest}
|
|
3721
|
+
* @returns A Promise of ListInvoicesResponse
|
|
3722
|
+
*/
|
|
3707
3723
|
listInvoices = (request = {}) => enrichForPagination('invoices', this.pageOfListInvoices, request);
|
|
3724
|
+
|
|
3725
|
+
/**
|
|
3726
|
+
* Download an invoice. Download a specific invoice, specified by its ID.
|
|
3727
|
+
*
|
|
3728
|
+
* @param request - The request {@link DownloadInvoiceRequest}
|
|
3729
|
+
* @returns A Promise of Blob
|
|
3730
|
+
*/
|
|
3708
3731
|
downloadInvoice = request => this.client.fetch({
|
|
3709
3732
|
method: 'GET',
|
|
3710
3733
|
path: `/billing/v2alpha1/invoices/${validatePathParam('invoiceId', request.invoiceId)}/download`,
|
|
@@ -3915,10 +3938,10 @@ const jsonContentHeaders$n = {
|
|
|
3915
3938
|
};
|
|
3916
3939
|
|
|
3917
3940
|
/**
|
|
3918
|
-
* Scaleway Block Storage
|
|
3941
|
+
* Scaleway Block Storage API.
|
|
3919
3942
|
*
|
|
3920
3943
|
* This API allows you to use and manage your Block Storage volumes. Scaleway
|
|
3921
|
-
* Block Storage
|
|
3944
|
+
* Block Storage API.
|
|
3922
3945
|
*/
|
|
3923
3946
|
let API$p = class API extends API$u {
|
|
3924
3947
|
/** Lists the available zones of the API. */
|
|
@@ -3945,8 +3968,8 @@ let API$p = class API extends API$u {
|
|
|
3945
3968
|
|
|
3946
3969
|
/**
|
|
3947
3970
|
* List volumes. List all existing volumes in a specified zone. By default,
|
|
3948
|
-
* the
|
|
3949
|
-
* be modified via the `order_by` field.
|
|
3971
|
+
* the volumes listed are ordered by creation date in ascending order. This
|
|
3972
|
+
* can be modified via the `order_by` field.
|
|
3950
3973
|
*
|
|
3951
3974
|
* @param request - The request {@link ListVolumesRequest}
|
|
3952
3975
|
* @returns A Promise of ListVolumesResponse
|
|
@@ -3954,13 +3977,12 @@ let API$p = class API extends API$u {
|
|
|
3954
3977
|
listVolumes = (request = {}) => enrichForPagination('volumes', this.pageOfListVolumes, request);
|
|
3955
3978
|
|
|
3956
3979
|
/**
|
|
3957
|
-
* Create a
|
|
3958
|
-
*
|
|
3980
|
+
* Create a volume. To create a new volume from scratch, you must specify
|
|
3981
|
+
* `from_empty` and the `size`. To create a volume from an existing snapshot,
|
|
3982
|
+
* specify `from_snapshot` and the `snapshot_id` in the request payload
|
|
3959
3983
|
* instead, size is optional and can be specified if you need to extend the
|
|
3960
|
-
* original size.
|
|
3961
|
-
*
|
|
3962
|
-
* can specify the desired performance of the volume by setting `requirements`
|
|
3963
|
-
* accordingly.
|
|
3984
|
+
* original size. The volume will take on the same volume class and underlying
|
|
3985
|
+
* IOPS limitations as the original snapshot.
|
|
3964
3986
|
*
|
|
3965
3987
|
* @param request - The request {@link CreateVolumeRequest}
|
|
3966
3988
|
* @returns A Promise of Volume
|
|
@@ -4005,10 +4027,10 @@ let API$p = class API extends API$u {
|
|
|
4005
4027
|
});
|
|
4006
4028
|
|
|
4007
4029
|
/**
|
|
4008
|
-
* Update a volume. Update technical details
|
|
4009
|
-
* tags, or its new size and `volume_type` (within the same Block
|
|
4010
|
-
* class). You can only resize a volume to a larger size. It is
|
|
4011
|
-
*
|
|
4030
|
+
* Update a volume. Update the technical details of a volume, such as its
|
|
4031
|
+
* name, tags, or its new size and `volume_type` (within the same Block
|
|
4032
|
+
* Storage class). You can only resize a volume to a larger size. It is
|
|
4033
|
+
* currently not possible to change your Block Storage Class.
|
|
4012
4034
|
*
|
|
4013
4035
|
* @param request - The request {@link UpdateVolumeRequest}
|
|
4014
4036
|
* @returns A Promise of Volume
|
|
@@ -4084,7 +4106,7 @@ let API$p = class API extends API$u {
|
|
|
4084
4106
|
});
|
|
4085
4107
|
|
|
4086
4108
|
/**
|
|
4087
|
-
* Update a snapshot. Update name or tags of the snapshot.
|
|
4109
|
+
* Update a snapshot. Update the name or tags of the snapshot.
|
|
4088
4110
|
*
|
|
4089
4111
|
* @param request - The request {@link UpdateSnapshotRequest}
|
|
4090
4112
|
* @returns A Promise of Snapshot
|
|
@@ -4215,6 +4237,18 @@ const unmarshalContactPoint = data => {
|
|
|
4215
4237
|
email: data.email ? unmarshalContactPointEmail(data.email) : undefined
|
|
4216
4238
|
};
|
|
4217
4239
|
};
|
|
4240
|
+
const unmarshalDatasource = data => {
|
|
4241
|
+
if (!isJSONObject(data)) {
|
|
4242
|
+
throw new TypeError(`Unmarshalling the type 'Datasource' failed as data isn't a dictionary.`);
|
|
4243
|
+
}
|
|
4244
|
+
return {
|
|
4245
|
+
id: data.id,
|
|
4246
|
+
name: data.name,
|
|
4247
|
+
projectId: data.project_id,
|
|
4248
|
+
type: data.type,
|
|
4249
|
+
url: data.url
|
|
4250
|
+
};
|
|
4251
|
+
};
|
|
4218
4252
|
const unmarshalGrafanaUser = data => {
|
|
4219
4253
|
if (!isJSONObject(data)) {
|
|
4220
4254
|
throw new TypeError(`Unmarshalling the type 'GrafanaUser' failed as data isn't a dictionary.`);
|
|
@@ -4276,18 +4310,6 @@ const unmarshalCockpitMetrics = data => {
|
|
|
4276
4310
|
timeseries: unmarshalArrayOfObject(data.timeseries, unmarshalTimeSeries)
|
|
4277
4311
|
};
|
|
4278
4312
|
};
|
|
4279
|
-
const unmarshalDatasource = data => {
|
|
4280
|
-
if (!isJSONObject(data)) {
|
|
4281
|
-
throw new TypeError(`Unmarshalling the type 'Datasource' failed as data isn't a dictionary.`);
|
|
4282
|
-
}
|
|
4283
|
-
return {
|
|
4284
|
-
id: data.id,
|
|
4285
|
-
name: data.name,
|
|
4286
|
-
projectId: data.project_id,
|
|
4287
|
-
type: data.type,
|
|
4288
|
-
url: data.url
|
|
4289
|
-
};
|
|
4290
|
-
};
|
|
4291
4313
|
const unmarshalListContactPointsResponse = data => {
|
|
4292
4314
|
if (!isJSONObject(data)) {
|
|
4293
4315
|
throw new TypeError(`Unmarshalling the type 'ListContactPointsResponse' failed as data isn't a dictionary.`);
|
|
@@ -4299,6 +4321,15 @@ const unmarshalListContactPointsResponse = data => {
|
|
|
4299
4321
|
totalCount: data.total_count
|
|
4300
4322
|
};
|
|
4301
4323
|
};
|
|
4324
|
+
const unmarshalListDatasourcesResponse = data => {
|
|
4325
|
+
if (!isJSONObject(data)) {
|
|
4326
|
+
throw new TypeError(`Unmarshalling the type 'ListDatasourcesResponse' failed as data isn't a dictionary.`);
|
|
4327
|
+
}
|
|
4328
|
+
return {
|
|
4329
|
+
datasources: unmarshalArrayOfObject(data.datasources, unmarshalDatasource),
|
|
4330
|
+
totalCount: data.total_count
|
|
4331
|
+
};
|
|
4332
|
+
};
|
|
4302
4333
|
const unmarshalListGrafanaUsersResponse = data => {
|
|
4303
4334
|
if (!isJSONObject(data)) {
|
|
4304
4335
|
throw new TypeError(`Unmarshalling the type 'ListGrafanaUsersResponse' failed as data isn't a dictionary.`);
|
|
@@ -4502,6 +4533,19 @@ let API$o = class API extends API$u {
|
|
|
4502
4533
|
method: 'POST',
|
|
4503
4534
|
path: `/cockpit/v1beta1/datasources`
|
|
4504
4535
|
}, unmarshalDatasource);
|
|
4536
|
+
pageOfListDatasources = (request = {}) => this.client.fetch({
|
|
4537
|
+
method: 'GET',
|
|
4538
|
+
path: `/cockpit/v1beta1/datasources`,
|
|
4539
|
+
urlParams: urlParams(['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId ?? this.client.settings.defaultProjectId], ['types', request.types])
|
|
4540
|
+
}, unmarshalListDatasourcesResponse);
|
|
4541
|
+
|
|
4542
|
+
/**
|
|
4543
|
+
* Get a list of datasources for the specified Project ID.
|
|
4544
|
+
*
|
|
4545
|
+
* @param request - The request {@link ListDatasourcesRequest}
|
|
4546
|
+
* @returns A Promise of ListDatasourcesResponse
|
|
4547
|
+
*/
|
|
4548
|
+
listDatasources = (request = {}) => enrichForPagination('datasources', this.pageOfListDatasources, request);
|
|
4505
4549
|
|
|
4506
4550
|
/**
|
|
4507
4551
|
* Create a token associated with the specified Project ID.
|
|
@@ -4972,6 +5016,7 @@ const unmarshalListTriggersResponse$1 = data => {
|
|
|
4972
5016
|
};
|
|
4973
5017
|
const marshalCreateTriggerRequestMnqNatsClientConfig$1 = (request, defaults) => ({
|
|
4974
5018
|
mnq_namespace_id: request.mnqNamespaceId,
|
|
5019
|
+
mnq_nats_account_id: request.mnqNatsAccountId,
|
|
4975
5020
|
mnq_project_id: request.mnqProjectId,
|
|
4976
5021
|
mnq_region: request.mnqRegion,
|
|
4977
5022
|
subject: request.subject
|
|
@@ -9625,6 +9670,7 @@ const unmarshalUploadURL = data => {
|
|
|
9625
9670
|
};
|
|
9626
9671
|
const marshalCreateTriggerRequestMnqNatsClientConfig = (request, defaults) => ({
|
|
9627
9672
|
mnq_namespace_id: request.mnqNamespaceId,
|
|
9673
|
+
mnq_nats_account_id: request.mnqNatsAccountId,
|
|
9628
9674
|
mnq_project_id: request.mnqProjectId,
|
|
9629
9675
|
mnq_region: request.mnqRegion,
|
|
9630
9676
|
subject: request.subject
|
|
@@ -12923,7 +12969,7 @@ let API$h = class API extends API$u {
|
|
|
12923
12969
|
pageOfListServers = (request = {}) => this.client.fetch({
|
|
12924
12970
|
method: 'GET',
|
|
12925
12971
|
path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers`,
|
|
12926
|
-
urlParams: urlParams(['commercial_type', request.commercialType], ['name', request.name], ['order', request.order], ['organization', request.organization], ['page', request.page], ['per_page', request.perPage ?? this.client.settings.defaultPageSize], ['private_ip', request.privateIp], ['private_network', request.privateNetwork], ['private_networks', request.privateNetworks && request.privateNetworks.length > 0 ? request.privateNetworks.join(',') : undefined], ['private_nic_mac_address', request.privateNicMacAddress], ['project', request.project], ['state', request.state], ['tags', request.tags && request.tags.length > 0 ? request.tags.join(',') : undefined], ['without_ip', request.withoutIp])
|
|
12972
|
+
urlParams: urlParams(['commercial_type', request.commercialType], ['name', request.name], ['order', request.order], ['organization', request.organization], ['page', request.page], ['per_page', request.perPage ?? this.client.settings.defaultPageSize], ['private_ip', request.privateIp], ['private_network', request.privateNetwork], ['private_networks', request.privateNetworks && request.privateNetworks.length > 0 ? request.privateNetworks.join(',') : undefined], ['private_nic_mac_address', request.privateNicMacAddress], ['project', request.project], ['servers', request.servers && request.servers.length > 0 ? request.servers.join(',') : undefined], ['state', request.state], ['tags', request.tags && request.tags.length > 0 ? request.tags.join(',') : undefined], ['without_ip', request.withoutIp])
|
|
12927
12973
|
}, unmarshalListServersResponse);
|
|
12928
12974
|
|
|
12929
12975
|
/**
|
|
@@ -15556,6 +15602,7 @@ const unmarshalPool = data => {
|
|
|
15556
15602
|
name: data.name,
|
|
15557
15603
|
nodeType: data.node_type,
|
|
15558
15604
|
placementGroupId: data.placement_group_id,
|
|
15605
|
+
publicIpDisabled: data.public_ip_disabled,
|
|
15559
15606
|
region: data.region,
|
|
15560
15607
|
rootVolumeSize: data.root_volume_size,
|
|
15561
15608
|
rootVolumeType: data.root_volume_type,
|
|
@@ -15703,6 +15750,7 @@ const marshalCreateClusterRequestPoolConfig = (request, defaults) => ({
|
|
|
15703
15750
|
name: request.name,
|
|
15704
15751
|
node_type: request.nodeType,
|
|
15705
15752
|
placement_group_id: request.placementGroupId,
|
|
15753
|
+
public_ip_disabled: request.publicIpDisabled,
|
|
15706
15754
|
root_volume_size: request.rootVolumeSize,
|
|
15707
15755
|
root_volume_type: request.rootVolumeType,
|
|
15708
15756
|
size: request.size,
|
|
@@ -15780,6 +15828,7 @@ const marshalCreatePoolRequest = (request, defaults) => ({
|
|
|
15780
15828
|
name: request.name || randomName('pool'),
|
|
15781
15829
|
node_type: request.nodeType,
|
|
15782
15830
|
placement_group_id: request.placementGroupId,
|
|
15831
|
+
public_ip_disabled: request.publicIpDisabled,
|
|
15783
15832
|
root_volume_size: request.rootVolumeSize,
|
|
15784
15833
|
root_volume_type: request.rootVolumeType ?? 'default_volume_type',
|
|
15785
15834
|
size: request.size,
|
|
@@ -18109,7 +18158,7 @@ let API$d = class API extends API$u {
|
|
|
18109
18158
|
*/
|
|
18110
18159
|
class ZonedAPI extends API$u {
|
|
18111
18160
|
/** Lists the available zones of the API. */
|
|
18112
|
-
static LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1', 'nl-ams-2', 'nl-ams-3', 'pl-waw-1', 'pl-waw-2'];
|
|
18161
|
+
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'];
|
|
18113
18162
|
pageOfListLbs = (request = {}) => this.client.fetch({
|
|
18114
18163
|
method: 'GET',
|
|
18115
18164
|
path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/lbs`,
|