@scaleway/sdk 1.33.0 → 1.34.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.
@@ -11,6 +11,14 @@ import { unmarshalGetConsumptionResponse, unmarshalListInvoicesResponse } from '
11
11
  * This API allows you to query your consumption. Billing API.
12
12
  */
13
13
  class API extends API$1 {
14
+ /**
15
+ * Get current month's consumption. The consumption reflects the amount of
16
+ * money you have spent for the products you have used. The consumption value
17
+ * is monetary and is not computed in real time.
18
+ *
19
+ * @param request - The request {@link GetConsumptionRequest}
20
+ * @returns A Promise of GetConsumptionResponse
21
+ */
14
22
  getConsumption = (() => {
15
23
  var _this = this;
16
24
  return function (request) {
@@ -37,6 +45,14 @@ class API extends API$1 {
37
45
  }, unmarshalListInvoicesResponse);
38
46
  };
39
47
  })();
48
+
49
+ /**
50
+ * List invoices. List all your invoices, filtering by `start_date` and
51
+ * `invoice_type`. Each invoice has its own ID.
52
+ *
53
+ * @param request - The request {@link ListInvoicesRequest}
54
+ * @returns A Promise of ListInvoicesResponse
55
+ */
40
56
  listInvoices = (() => {
41
57
  var _this3 = this;
42
58
  return function (request) {
@@ -46,6 +62,13 @@ class API extends API$1 {
46
62
  return enrichForPagination('invoices', _this3.pageOfListInvoices, request);
47
63
  };
48
64
  })();
65
+
66
+ /**
67
+ * Download an invoice. Download a specific invoice, specified by its ID.
68
+ *
69
+ * @param request - The request {@link DownloadInvoiceRequest}
70
+ * @returns A Promise of Blob
71
+ */
49
72
  downloadInvoice = request => this.client.fetch({
50
73
  method: 'GET',
51
74
  path: `/billing/v2alpha1/invoices/${validatePathParam('invoiceId', request.invoiceId)}/download`,
@@ -83,7 +83,7 @@ class API extends API$1 {
83
83
  return _this4.client.fetch({
84
84
  method: 'GET',
85
85
  path: `/instance/v1/zones/${validatePathParam('zone', request.zone ?? _this4.client.settings.defaultZone)}/servers`,
86
- urlParams: urlParams(['commercial_type', request.commercialType], ['name', request.name], ['order', request.order], ['organization', request.organization], ['page', request.page], ['per_page', request.perPage ?? _this4.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])
86
+ urlParams: urlParams(['commercial_type', request.commercialType], ['name', request.name], ['order', request.order], ['organization', request.organization], ['page', request.page], ['per_page', request.perPage ?? _this4.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])
87
87
  }, unmarshalListServersResponse);
88
88
  };
89
89
  })();
@@ -767,7 +767,7 @@ class API extends API$1 {
767
767
  */
768
768
  class ZonedAPI extends API$1 {
769
769
  /** Lists the available zones of the API. */
770
- static LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1', 'nl-ams-2', 'nl-ams-3', 'pl-waw-1', 'pl-waw-2'];
770
+ 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'];
771
771
  pageOfListLbs = (() => {
772
772
  var _this10 = this;
773
773
  return function (request) {
package/dist/index.cjs CHANGED
@@ -497,7 +497,7 @@ const assertValidSettings = obj => {
497
497
  }
498
498
  };
499
499
 
500
- const version = 'v1.32.1';
500
+ const version = 'v1.33.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`,
@@ -12923,7 +12946,7 @@ let API$h = class API extends API$u {
12923
12946
  pageOfListServers = (request = {}) => this.client.fetch({
12924
12947
  method: 'GET',
12925
12948
  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])
12949
+ 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
12950
  }, unmarshalListServersResponse);
12928
12951
 
12929
12952
  /**
@@ -18109,7 +18132,7 @@ let API$d = class API extends API$u {
18109
18132
  */
18110
18133
  class ZonedAPI extends API$u {
18111
18134
  /** 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'];
18135
+ 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
18136
  pageOfListLbs = (request = {}) => this.client.fetch({
18114
18137
  method: 'GET',
18115
18138
  path: `/lb/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/lbs`,
package/dist/index.d.ts CHANGED
@@ -2953,12 +2953,33 @@ type DownloadInvoiceRequest = {
2953
2953
  * This API allows you to query your consumption. Billing API.
2954
2954
  */
2955
2955
  declare class API$q extends API$u {
2956
+ /**
2957
+ * Get current month's consumption. The consumption reflects the amount of
2958
+ * money you have spent for the products you have used. The consumption value
2959
+ * is monetary and is not computed in real time.
2960
+ *
2961
+ * @param request - The request {@link GetConsumptionRequest}
2962
+ * @returns A Promise of GetConsumptionResponse
2963
+ */
2956
2964
  getConsumption: (request?: Readonly<GetConsumptionRequest>) => Promise<GetConsumptionResponse>;
2957
2965
  protected pageOfListInvoices: (request?: Readonly<ListInvoicesRequest>) => Promise<ListInvoicesResponse>;
2966
+ /**
2967
+ * List invoices. List all your invoices, filtering by `start_date` and
2968
+ * `invoice_type`. Each invoice has its own ID.
2969
+ *
2970
+ * @param request - The request {@link ListInvoicesRequest}
2971
+ * @returns A Promise of ListInvoicesResponse
2972
+ */
2958
2973
  listInvoices: (request?: Readonly<ListInvoicesRequest>) => Promise<ListInvoicesResponse> & {
2959
2974
  all: () => Promise<Invoice[]>;
2960
2975
  [Symbol.asyncIterator]: () => AsyncGenerator<Invoice[], void, void>;
2961
2976
  };
2977
+ /**
2978
+ * Download an invoice. Download a specific invoice, specified by its ID.
2979
+ *
2980
+ * @param request - The request {@link DownloadInvoiceRequest}
2981
+ * @returns A Promise of Blob
2982
+ */
2962
2983
  downloadInvoice: (request: Readonly<DownloadInvoiceRequest>) => Promise<Blob>;
2963
2984
  }
2964
2985
 
@@ -12713,6 +12734,8 @@ type ListServersRequest = {
12713
12734
  privateNetworks?: string[];
12714
12735
  /** List Instances associated with the given private NIC MAC address. */
12715
12736
  privateNicMacAddress?: string;
12737
+ /** List Instances from these server ids (use commas to separate them). */
12738
+ servers?: string[];
12716
12739
  };
12717
12740
  type DeleteServerRequest = {
12718
12741
  /** Zone to target. If none is passed will use default zone from the config. */
@@ -16023,7 +16046,9 @@ type CreateVolumeRequest = {
16023
16046
  * config.
16024
16047
  */
16025
16048
  region?: Region;
16049
+ /** Project ID. */
16026
16050
  projectId?: string;
16051
+ /** Volume name. */
16027
16052
  name: string;
16028
16053
  };
16029
16054
  type GetVolumeRequest = {
@@ -16032,6 +16057,7 @@ type GetVolumeRequest = {
16032
16057
  * config.
16033
16058
  */
16034
16059
  region?: Region;
16060
+ /** Volume ID. */
16035
16061
  volumeId: string;
16036
16062
  };
16037
16063
  type ListVolumesRequest = {
@@ -16040,10 +16066,14 @@ type ListVolumesRequest = {
16040
16066
  * config.
16041
16067
  */
16042
16068
  region?: Region;
16069
+ /** Project ID, only volumes belonging to this project will be listed. */
16043
16070
  projectId?: string;
16071
+ /** Sort the order of the returned volumes. */
16072
+ orderBy?: ListVolumesRequestOrderBy;
16073
+ /** Page number. */
16044
16074
  page?: number;
16075
+ /** Maximum number of volumes to return per page. */
16045
16076
  pageSize?: number;
16046
- orderBy?: ListVolumesRequestOrderBy;
16047
16077
  };
16048
16078
  type UpdateVolumeRequest = {
16049
16079
  /**
@@ -16051,8 +16081,11 @@ type UpdateVolumeRequest = {
16051
16081
  * config.
16052
16082
  */
16053
16083
  region?: Region;
16084
+ /** Volume ID. */
16054
16085
  volumeId: string;
16086
+ /** Volume name. */
16055
16087
  name?: string;
16088
+ /** Tags of the volume. */
16056
16089
  tags?: string[];
16057
16090
  };
16058
16091
  type DeleteVolumeRequest = {
@@ -16061,6 +16094,7 @@ type DeleteVolumeRequest = {
16061
16094
  * config.
16062
16095
  */
16063
16096
  region?: Region;
16097
+ /** Volume ID. */
16064
16098
  volumeId: string;
16065
16099
  };
16066
16100
  type CreatePinByURLRequest = {
@@ -16069,9 +16103,13 @@ type CreatePinByURLRequest = {
16069
16103
  * config.
16070
16104
  */
16071
16105
  region?: Region;
16106
+ /** Volume ID on which you want to pin your content. */
16072
16107
  volumeId: string;
16108
+ /** URL containing the content you want to pin. */
16073
16109
  url: string;
16110
+ /** Pin name. */
16074
16111
  name?: string;
16112
+ /** Pin options. */
16075
16113
  pinOptions?: PinOptions;
16076
16114
  };
16077
16115
  type CreatePinByCIDRequest = {
@@ -16080,10 +16118,15 @@ type CreatePinByCIDRequest = {
16080
16118
  * config.
16081
16119
  */
16082
16120
  region?: Region;
16121
+ /** Volume ID on which you want to pin your content. */
16083
16122
  volumeId: string;
16123
+ /** CID containing the content you want to pin. */
16084
16124
  cid: string;
16085
- name?: string;
16125
+ /** Node containing the content you want to pin. */
16086
16126
  origins?: string[];
16127
+ /** Pin name. */
16128
+ name?: string;
16129
+ /** Pin options. */
16087
16130
  pinOptions?: PinOptions;
16088
16131
  };
16089
16132
  type ReplacePinRequest = {
@@ -16092,11 +16135,17 @@ type ReplacePinRequest = {
16092
16135
  * config.
16093
16136
  */
16094
16137
  region?: Region;
16138
+ /** Pin ID whose information you wish to replace. */
16095
16139
  pinId: string;
16140
+ /** Volume ID. */
16096
16141
  volumeId: string;
16142
+ /** New CID you want to pin in place of the old one. */
16097
16143
  cid: string;
16144
+ /** New name to replace. */
16098
16145
  name?: string;
16146
+ /** Node containing the content you want to pin. */
16099
16147
  origins?: string[];
16148
+ /** Pin options. */
16100
16149
  pinOptions?: PinOptions;
16101
16150
  };
16102
16151
  type GetPinRequest = {
@@ -16105,7 +16154,9 @@ type GetPinRequest = {
16105
16154
  * config.
16106
16155
  */
16107
16156
  region?: Region;
16157
+ /** Pin ID of which you want to obtain information. */
16108
16158
  pinId: string;
16159
+ /** Volume ID. */
16109
16160
  volumeId: string;
16110
16161
  };
16111
16162
  type ListPinsRequest = {
@@ -16114,12 +16165,19 @@ type ListPinsRequest = {
16114
16165
  * config.
16115
16166
  */
16116
16167
  region?: Region;
16168
+ /** Volume ID of which you want to list the pins. */
16117
16169
  volumeId: string;
16170
+ /** Project ID. */
16118
16171
  projectId?: string;
16172
+ /** Organization ID. */
16119
16173
  organizationId?: string;
16174
+ /** Sort order of the returned Volume. */
16175
+ orderBy?: ListPinsRequestOrderBy;
16176
+ /** Page number. */
16120
16177
  page?: number;
16178
+ /** Maximum number of volumes to return per page. */
16121
16179
  pageSize?: number;
16122
- orderBy?: ListPinsRequestOrderBy;
16180
+ /** List pins by status. */
16123
16181
  status?: PinStatus;
16124
16182
  };
16125
16183
  type DeletePinRequest = {
@@ -16128,7 +16186,9 @@ type DeletePinRequest = {
16128
16186
  * config.
16129
16187
  */
16130
16188
  region?: Region;
16189
+ /** Pin ID you want to remove from the volume. */
16131
16190
  pinId: string;
16191
+ /** Volume ID. */
16132
16192
  volumeId: string;
16133
16193
  };
16134
16194
 
@@ -1,4 +1,4 @@
1
- const version = 'v1.32.1';
1
+ const version = 'v1.33.0';
2
2
  const userAgent = `scaleway-sdk-js/${version}`;
3
3
 
4
4
  export { userAgent, version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk",
3
- "version": "1.33.0",
3
+ "version": "1.34.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Scaleway SDK.",
6
6
  "keywords": [
@@ -35,5 +35,5 @@
35
35
  "bundledDependencies": [
36
36
  "@scaleway/random-name"
37
37
  ],
38
- "gitHead": "b0fca268066e3e1db0723b86450b2d3610c54178"
38
+ "gitHead": "7ef3bc7a9f525abd386d98da73c1a409ca968365"
39
39
  }