@scaleway/sdk 2.1.0 → 2.2.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.
@@ -160,7 +160,7 @@ class API extends API$1 {
160
160
  return _this7.client.fetch({
161
161
  method: 'GET',
162
162
  path: `/cockpit/v1beta1/datasources`,
163
- urlParams: urlParams(['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this7.client.settings.defaultPageSize], ['project_id', request.projectId ?? _this7.client.settings.defaultProjectId], ['types', request.types])
163
+ urlParams: urlParams(['is_managed_by_scaleway', request.isManagedByScaleway], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this7.client.settings.defaultPageSize], ['project_id', request.projectId ?? _this7.client.settings.defaultProjectId], ['types', request.types])
164
164
  }, unmarshalListDatasourcesResponse);
165
165
  };
166
166
  })();
@@ -27,6 +27,7 @@ const unmarshalDatasource = data => {
27
27
  }
28
28
  return {
29
29
  id: data.id,
30
+ isManagedByScaleway: data.is_managed_by_scaleway,
30
31
  name: data.name,
31
32
  projectId: data.project_id,
32
33
  type: data.type,
@@ -215,6 +216,7 @@ const marshalCreateContactPointRequest = (request, defaults) => ({
215
216
  project_id: request.projectId ?? defaults.defaultProjectId
216
217
  });
217
218
  const marshalCreateDatasourceRequest = (request, defaults) => ({
219
+ is_default: request.isDefault,
218
220
  name: request.name,
219
221
  project_id: request.projectId ?? defaults.defaultProjectId,
220
222
  type: request.type
@@ -342,6 +342,8 @@ class API extends API$1 {
342
342
  }, unmarshalDomain);
343
343
 
344
344
  /**
345
+ * Create a JWT token. Deprecated in favor of CreateToken.
346
+ *
345
347
  * @deprecated
346
348
  * @param request - The request {@link IssueJWTRequest}
347
349
  * @returns A Promise of Token
@@ -390,6 +390,8 @@ class API extends API$1 {
390
390
  }, unmarshalDomain);
391
391
 
392
392
  /**
393
+ * Create a JWT token. Deprecated in favor of CreateToken.
394
+ *
393
395
  * @deprecated
394
396
  * @param request - The request {@link IssueJWTRequest}
395
397
  * @returns A Promise of Token
@@ -137,6 +137,21 @@ class API extends API$1 {
137
137
  method: 'POST',
138
138
  path: `/ipfs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/pins/create-by-cid`
139
139
  }, unmarshalPin);
140
+
141
+ /**
142
+ * Replace pin by CID. Deletes the given resource ID and pins the new CID in
143
+ * its place. Will fetch and store the content pointed by the provided CID.
144
+ * The content must be available on the public IPFS network. The content (IPFS
145
+ * blocks) is hosted by the pinning service until the pin is deleted. While
146
+ * the content is available any other IPFS peer can fetch and host your
147
+ * content. For this reason, we recommend that you pin either public or
148
+ * encrypted content. Several different pin requests can target the same CID.
149
+ * A pin is defined by its ID (UUID), its status (queued, pinning, pinned or
150
+ * failed) and target CID.
151
+ *
152
+ * @param request - The request {@link ReplacePinRequest}
153
+ * @returns A Promise of ReplacePinResponse
154
+ */
140
155
  replacePin = request => this.client.fetch({
141
156
  body: JSON.stringify(marshalReplacePinRequest(request, this.client.settings)),
142
157
  headers: jsonContentHeaders,
@@ -14,7 +14,7 @@ const jsonContentHeaders = {
14
14
  /** Public Gateways API. */
15
15
  class API extends API$1 {
16
16
  /** Lists the available zones of the API. */
17
- static LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1', 'nl-ams-2', 'nl-ams-3', 'pl-waw-1', 'pl-waw-2'];
17
+ 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'];
18
18
  pageOfListGateways = (() => {
19
19
  var _this = this;
20
20
  return function (request) {
@@ -3,7 +3,7 @@ import { API as API$1 } from '../../../scw/api.js';
3
3
  import { validatePathParam, urlParams } from '../../../helpers/marshalling.js';
4
4
  import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
5
5
  import { HOSTING_TRANSIENT_STATUSES } from './content.gen.js';
6
- import { marshalCreateHostingRequest, unmarshalHosting, unmarshalListHostingsResponse, marshalUpdateHostingRequest, unmarshalDnsRecords, unmarshalListOffersResponse } from './marshalling.gen.js';
6
+ import { marshalCreateHostingRequest, unmarshalHosting, unmarshalListHostingsResponse, marshalUpdateHostingRequest, unmarshalDnsRecords, unmarshalListOffersResponse, unmarshalListControlPanelsResponse } from './marshalling.gen.js';
7
7
 
8
8
  // This file was automatically generated. DO NOT EDIT.
9
9
  // If you have any remark or suggestion do not hesitate to open an issue.
@@ -14,7 +14,7 @@ const jsonContentHeaders = {
14
14
  /** Web Hosting API. */
15
15
  class API extends API$1 {
16
16
  /** Lists the available regions of the API. */
17
- static LOCALITIES = ['fr-par'];
17
+ static LOCALITIES = ['fr-par', 'nl-ams'];
18
18
 
19
19
  /**
20
20
  * Order a Web Hosting plan. Order a Web Hosting plan, specifying the offer
@@ -38,7 +38,7 @@ class API extends API$1 {
38
38
  return _this.client.fetch({
39
39
  method: 'GET',
40
40
  path: `/webhosting/v1alpha1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/hostings`,
41
- 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])
41
+ 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])
42
42
  }, unmarshalListHostingsResponse);
43
43
  };
44
44
  })();
@@ -153,6 +153,36 @@ class API extends API$1 {
153
153
  path: `/webhosting/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/offers`,
154
154
  urlParams: urlParams(['hosting_id', request.hostingId], ['only_options', request.onlyOptions], ['order_by', request.orderBy], ['without_options', request.withoutOptions])
155
155
  }, unmarshalListOffersResponse);
156
+ pageOfListControlPanels = (() => {
157
+ var _this3 = this;
158
+ return function (request) {
159
+ if (request === void 0) {
160
+ request = {};
161
+ }
162
+ return _this3.client.fetch({
163
+ method: 'GET',
164
+ path: `/webhosting/v1alpha1/regions/${validatePathParam('region', request.region ?? _this3.client.settings.defaultRegion)}/control-panels`,
165
+ urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? _this3.client.settings.defaultPageSize])
166
+ }, unmarshalListControlPanelsResponse);
167
+ };
168
+ })();
169
+
170
+ /**
171
+ * List all control panels type. List the control panels type: cpanel or
172
+ * plesk.
173
+ *
174
+ * @param request - The request {@link ListControlPanelsRequest}
175
+ * @returns A Promise of ListControlPanelsResponse
176
+ */
177
+ listControlPanels = (() => {
178
+ var _this4 = this;
179
+ return function (request) {
180
+ if (request === void 0) {
181
+ request = {};
182
+ }
183
+ return enrichForPagination('controlPanels', _this4.pageOfListControlPanels, request);
184
+ };
185
+ })();
156
186
  }
157
187
 
158
188
  export { API };
@@ -27,6 +27,7 @@ const unmarshalHosting = data => {
27
27
  throw new TypeError(`Unmarshalling the type 'Hosting' failed as data isn't a dictionary.`);
28
28
  }
29
29
  return {
30
+ controlPanelName: data.control_panel_name,
30
31
  cpanelUrls: data.cpanel_urls ? unmarshalHostingCpanelUrls(data.cpanel_urls) : undefined,
31
32
  createdAt: unmarshalDate(data.created_at),
32
33
  dnsStatus: data.dns_status,
@@ -80,6 +81,25 @@ const unmarshalDnsRecords = data => {
80
81
  status: data.status
81
82
  };
82
83
  };
84
+ const unmarshalControlPanel = data => {
85
+ if (!isJSONObject(data)) {
86
+ throw new TypeError(`Unmarshalling the type 'ControlPanel' failed as data isn't a dictionary.`);
87
+ }
88
+ return {
89
+ available: data.available,
90
+ logoUrl: data.logo_url,
91
+ name: data.name
92
+ };
93
+ };
94
+ const unmarshalListControlPanelsResponse = data => {
95
+ if (!isJSONObject(data)) {
96
+ throw new TypeError(`Unmarshalling the type 'ListControlPanelsResponse' failed as data isn't a dictionary.`);
97
+ }
98
+ return {
99
+ controlPanels: unmarshalArrayOfObject(data.control_panels, unmarshalControlPanel),
100
+ totalCount: data.total_count
101
+ };
102
+ };
83
103
  const unmarshalListHostingsResponse = data => {
84
104
  if (!isJSONObject(data)) {
85
105
  throw new TypeError(`Unmarshalling the type 'ListHostingsResponse' failed as data isn't a dictionary.`);
@@ -113,6 +133,7 @@ const unmarshalOffer = data => {
113
133
  return {
114
134
  available: data.available,
115
135
  billingOperationPath: data.billing_operation_path,
136
+ controlPanelName: data.control_panel_name,
116
137
  endOfLife: data.end_of_life,
117
138
  id: data.id,
118
139
  price: data.price ? unmarshalMoney(data.price) : undefined,
@@ -143,4 +164,4 @@ const marshalUpdateHostingRequest = (request, defaults) => ({
143
164
  tags: request.tags
144
165
  });
145
166
 
146
- export { marshalCreateHostingRequest, marshalUpdateHostingRequest, unmarshalDnsRecords, unmarshalHosting, unmarshalListHostingsResponse, unmarshalListOffersResponse };
167
+ export { marshalCreateHostingRequest, marshalUpdateHostingRequest, unmarshalDnsRecords, unmarshalHosting, unmarshalListControlPanelsResponse, unmarshalListHostingsResponse, unmarshalListOffersResponse };
@@ -1,6 +1,15 @@
1
1
  // This file was automatically generated. DO NOT EDIT.
2
2
  // If you have any remark or suggestion do not hesitate to open an issue.
3
3
 
4
+ const ListControlPanelsRequest = {
5
+ page: {
6
+ greaterThan: 0
7
+ },
8
+ pageSize: {
9
+ greaterThan: 0,
10
+ lessThanOrEqual: 100
11
+ }
12
+ };
4
13
  const ListHostingsRequest = {
5
14
  page: {
6
15
  greaterThan: 0
@@ -11,4 +20,4 @@ const ListHostingsRequest = {
11
20
  }
12
21
  };
13
22
 
14
- export { ListHostingsRequest };
23
+ export { ListControlPanelsRequest, ListHostingsRequest };
package/dist/index.cjs CHANGED
@@ -497,7 +497,7 @@ const assertValidSettings = obj => {
497
497
  }
498
498
  };
499
499
 
500
- const version = 'v2.0.0';
500
+ const version = 'v2.1.0';
501
501
  const userAgent = `scaleway-sdk-js/${version}`;
502
502
 
503
503
  const isBrowser = () =>
@@ -4300,6 +4300,7 @@ const unmarshalDatasource = data => {
4300
4300
  }
4301
4301
  return {
4302
4302
  id: data.id,
4303
+ isManagedByScaleway: data.is_managed_by_scaleway,
4303
4304
  name: data.name,
4304
4305
  projectId: data.project_id,
4305
4306
  type: data.type,
@@ -4488,6 +4489,7 @@ const marshalCreateContactPointRequest = (request, defaults) => ({
4488
4489
  project_id: request.projectId ?? defaults.defaultProjectId
4489
4490
  });
4490
4491
  const marshalCreateDatasourceRequest = (request, defaults) => ({
4492
+ is_default: request.isDefault,
4491
4493
  name: request.name,
4492
4494
  project_id: request.projectId ?? defaults.defaultProjectId,
4493
4495
  type: request.type
@@ -4644,7 +4646,7 @@ let API$q = class API extends API$w {
4644
4646
  pageOfListDatasources = (request = {}) => this.client.fetch({
4645
4647
  method: 'GET',
4646
4648
  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])
4649
+ 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
4650
  }, unmarshalListDatasourcesResponse);
4649
4651
 
4650
4652
  /**
@@ -5587,6 +5589,8 @@ let API$p = class API extends API$w {
5587
5589
  }, unmarshalDomain$3);
5588
5590
 
5589
5591
  /**
5592
+ * Create a JWT token. Deprecated in favor of CreateToken.
5593
+ *
5590
5594
  * @deprecated
5591
5595
  * @param request - The request {@link IssueJWTRequest}
5592
5596
  * @returns A Promise of Token
@@ -10327,6 +10331,8 @@ let API$l = class API extends API$w {
10327
10331
  }, unmarshalDomain$1);
10328
10332
 
10329
10333
  /**
10334
+ * Create a JWT token. Deprecated in favor of CreateToken.
10335
+ *
10330
10336
  * @deprecated
10331
10337
  * @param request - The request {@link IssueJWTRequest}
10332
10338
  * @returns A Promise of Token
@@ -15946,6 +15952,21 @@ let API$g = class API extends API$w {
15946
15952
  method: 'POST',
15947
15953
  path: `/ipfs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/pins/create-by-cid`
15948
15954
  }, unmarshalPin);
15955
+
15956
+ /**
15957
+ * Replace pin by CID. Deletes the given resource ID and pins the new CID in
15958
+ * its place. Will fetch and store the content pointed by the provided CID.
15959
+ * The content must be available on the public IPFS network. The content (IPFS
15960
+ * blocks) is hosted by the pinning service until the pin is deleted. While
15961
+ * the content is available any other IPFS peer can fetch and host your
15962
+ * content. For this reason, we recommend that you pin either public or
15963
+ * encrypted content. Several different pin requests can target the same CID.
15964
+ * A pin is defined by its ID (UUID), its status (queued, pinning, pinned or
15965
+ * failed) and target CID.
15966
+ *
15967
+ * @param request - The request {@link ReplacePinRequest}
15968
+ * @returns A Promise of ReplacePinResponse
15969
+ */
15949
15970
  replacePin = request => this.client.fetch({
15950
15971
  body: JSON.stringify(marshalReplacePinRequest(request, this.client.settings)),
15951
15972
  headers: jsonContentHeaders$f,
@@ -25949,7 +25970,7 @@ const jsonContentHeaders$1 = {
25949
25970
  /** Public Gateways API. */
25950
25971
  let API$1 = class API extends API$w {
25951
25972
  /** 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'];
25973
+ 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
25974
  pageOfListGateways = (request = {}) => this.client.fetch({
25954
25975
  method: 'GET',
25955
25976
  path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/gateways`,
@@ -26535,6 +26556,7 @@ const unmarshalHosting = data => {
26535
26556
  throw new TypeError(`Unmarshalling the type 'Hosting' failed as data isn't a dictionary.`);
26536
26557
  }
26537
26558
  return {
26559
+ controlPanelName: data.control_panel_name,
26538
26560
  cpanelUrls: data.cpanel_urls ? unmarshalHostingCpanelUrls(data.cpanel_urls) : undefined,
26539
26561
  createdAt: unmarshalDate(data.created_at),
26540
26562
  dnsStatus: data.dns_status,
@@ -26588,6 +26610,25 @@ const unmarshalDnsRecords = data => {
26588
26610
  status: data.status
26589
26611
  };
26590
26612
  };
26613
+ const unmarshalControlPanel = data => {
26614
+ if (!isJSONObject(data)) {
26615
+ throw new TypeError(`Unmarshalling the type 'ControlPanel' failed as data isn't a dictionary.`);
26616
+ }
26617
+ return {
26618
+ available: data.available,
26619
+ logoUrl: data.logo_url,
26620
+ name: data.name
26621
+ };
26622
+ };
26623
+ const unmarshalListControlPanelsResponse = data => {
26624
+ if (!isJSONObject(data)) {
26625
+ throw new TypeError(`Unmarshalling the type 'ListControlPanelsResponse' failed as data isn't a dictionary.`);
26626
+ }
26627
+ return {
26628
+ controlPanels: unmarshalArrayOfObject(data.control_panels, unmarshalControlPanel),
26629
+ totalCount: data.total_count
26630
+ };
26631
+ };
26591
26632
  const unmarshalListHostingsResponse = data => {
26592
26633
  if (!isJSONObject(data)) {
26593
26634
  throw new TypeError(`Unmarshalling the type 'ListHostingsResponse' failed as data isn't a dictionary.`);
@@ -26621,6 +26662,7 @@ const unmarshalOffer = data => {
26621
26662
  return {
26622
26663
  available: data.available,
26623
26664
  billingOperationPath: data.billing_operation_path,
26665
+ controlPanelName: data.control_panel_name,
26624
26666
  endOfLife: data.end_of_life,
26625
26667
  id: data.id,
26626
26668
  price: data.price ? unmarshalMoney(data.price) : undefined,
@@ -26660,7 +26702,7 @@ const jsonContentHeaders = {
26660
26702
  /** Web Hosting API. */
26661
26703
  class API extends API$w {
26662
26704
  /** Lists the available regions of the API. */
26663
- static LOCALITIES = ['fr-par'];
26705
+ static LOCALITIES = ['fr-par', 'nl-ams'];
26664
26706
 
26665
26707
  /**
26666
26708
  * Order a Web Hosting plan. Order a Web Hosting plan, specifying the offer
@@ -26678,7 +26720,7 @@ class API extends API$w {
26678
26720
  pageOfListHostings = (request = {}) => this.client.fetch({
26679
26721
  method: 'GET',
26680
26722
  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])
26723
+ 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
26724
  }, unmarshalListHostingsResponse);
26683
26725
 
26684
26726
  /**
@@ -26783,11 +26825,34 @@ class API extends API$w {
26783
26825
  path: `/webhosting/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/offers`,
26784
26826
  urlParams: urlParams(['hosting_id', request.hostingId], ['only_options', request.onlyOptions], ['order_by', request.orderBy], ['without_options', request.withoutOptions])
26785
26827
  }, unmarshalListOffersResponse);
26828
+ pageOfListControlPanels = (request = {}) => this.client.fetch({
26829
+ method: 'GET',
26830
+ path: `/webhosting/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/control-panels`,
26831
+ urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
26832
+ }, unmarshalListControlPanelsResponse);
26833
+
26834
+ /**
26835
+ * List all control panels type. List the control panels type: cpanel or
26836
+ * plesk.
26837
+ *
26838
+ * @param request - The request {@link ListControlPanelsRequest}
26839
+ * @returns A Promise of ListControlPanelsResponse
26840
+ */
26841
+ listControlPanels = (request = {}) => enrichForPagination('controlPanels', this.pageOfListControlPanels, request);
26786
26842
  }
26787
26843
 
26788
26844
  // This file was automatically generated. DO NOT EDIT.
26789
26845
  // If you have any remark or suggestion do not hesitate to open an issue.
26790
26846
 
26847
+ const ListControlPanelsRequest = {
26848
+ page: {
26849
+ greaterThan: 0
26850
+ },
26851
+ pageSize: {
26852
+ greaterThan: 0,
26853
+ lessThanOrEqual: 100
26854
+ }
26855
+ };
26791
26856
  const ListHostingsRequest = {
26792
26857
  page: {
26793
26858
  greaterThan: 0
@@ -26800,6 +26865,7 @@ const ListHostingsRequest = {
26800
26865
 
26801
26866
  var validationRules_gen = /*#__PURE__*/Object.freeze({
26802
26867
  __proto__: null,
26868
+ ListControlPanelsRequest: ListControlPanelsRequest,
26803
26869
  ListHostingsRequest: ListHostingsRequest
26804
26870
  });
26805
26871
 
package/dist/index.d.ts CHANGED
@@ -3660,6 +3660,11 @@ interface Datasource {
3660
3660
  url: string;
3661
3661
  /** Datasource type. */
3662
3662
  type: DatasourceType;
3663
+ /**
3664
+ * Specifies that the datasource receives data from Scaleway products and is
3665
+ * managed by Scaleway.
3666
+ */
3667
+ isManagedByScaleway: boolean;
3663
3668
  }
3664
3669
  /** Grafana dashboard. */
3665
3670
  interface GrafanaProductDashboard {
@@ -3742,6 +3747,8 @@ type CreateDatasourceRequest = {
3742
3747
  name: string;
3743
3748
  /** Datasource type. */
3744
3749
  type?: DatasourceType;
3750
+ /** Specifies that the returned output is the default datasource per type. */
3751
+ isDefault: boolean;
3745
3752
  };
3746
3753
  /** Request to create a Grafana user. */
3747
3754
  type CreateGrafanaUserRequest = {
@@ -3852,6 +3859,8 @@ type ListDatasourcesRequest = {
3852
3859
  projectId?: string;
3853
3860
  /** Filter by datasource types. */
3854
3861
  types?: DatasourceType[];
3862
+ /** Filter by managed datasources. */
3863
+ isManagedByScaleway?: boolean;
3855
3864
  };
3856
3865
  interface ListDatasourcesResponse {
3857
3866
  /** Count of all datasources corresponding to the request. */
@@ -5255,6 +5264,8 @@ declare class API$p extends API$w {
5255
5264
  */
5256
5265
  deleteDomain: (request: Readonly<DeleteDomainRequest$1>) => Promise<Domain$3>;
5257
5266
  /**
5267
+ * Create a JWT token. Deprecated in favor of CreateToken.
5268
+ *
5258
5269
  * @deprecated
5259
5270
  * @param request - The request {@link IssueJWTRequest}
5260
5271
  * @returns A Promise of Token
@@ -10384,6 +10395,8 @@ declare class API$l extends API$w {
10384
10395
  */
10385
10396
  deleteDomain: (request: Readonly<DeleteDomainRequest>) => Promise<Domain$1>;
10386
10397
  /**
10398
+ * Create a JWT token. Deprecated in favor of CreateToken.
10399
+ *
10387
10400
  * @deprecated
10388
10401
  * @param request - The request {@link IssueJWTRequest}
10389
10402
  * @returns A Promise of Token
@@ -16901,6 +16914,20 @@ declare class API$g extends API$w {
16901
16914
  * @returns A Promise of Pin
16902
16915
  */
16903
16916
  createPinByCID: (request: Readonly<CreatePinByCIDRequest>) => Promise<Pin>;
16917
+ /**
16918
+ * Replace pin by CID. Deletes the given resource ID and pins the new CID in
16919
+ * its place. Will fetch and store the content pointed by the provided CID.
16920
+ * The content must be available on the public IPFS network. The content (IPFS
16921
+ * blocks) is hosted by the pinning service until the pin is deleted. While
16922
+ * the content is available any other IPFS peer can fetch and host your
16923
+ * content. For this reason, we recommend that you pin either public or
16924
+ * encrypted content. Several different pin requests can target the same CID.
16925
+ * A pin is defined by its ID (UUID), its status (queued, pinning, pinned or
16926
+ * failed) and target CID.
16927
+ *
16928
+ * @param request - The request {@link ReplacePinRequest}
16929
+ * @returns A Promise of ReplacePinResponse
16930
+ */
16904
16931
  replacePin: (request: Readonly<ReplacePinRequest>) => Promise<ReplacePinResponse>;
16905
16932
  /**
16906
16933
  * Get pin information. Retrieve information about the provided **pin ID**,
@@ -31457,6 +31484,14 @@ interface Nameserver {
31457
31484
  /** Defines whether the nameserver is the default one. */
31458
31485
  isDefault: boolean;
31459
31486
  }
31487
+ interface ControlPanel {
31488
+ /** Control panel name. */
31489
+ name: string;
31490
+ /** Define if the control panel type is available to order. */
31491
+ available: boolean;
31492
+ /** URL of this control panel's logo. */
31493
+ logoUrl: string;
31494
+ }
31460
31495
  interface Hosting {
31461
31496
  /** ID of the Web Hosting plan. */
31462
31497
  id: string;
@@ -31492,6 +31527,8 @@ interface Hosting {
31492
31527
  username: string;
31493
31528
  /** Indicates if the hosting offer has reached its end of life. */
31494
31529
  offerEndOfLife: boolean;
31530
+ /** Name of the control panel. */
31531
+ controlPanelName: string;
31495
31532
  /** Region where the Web Hosting plan is hosted. */
31496
31533
  region: Region;
31497
31534
  }
@@ -31513,6 +31550,8 @@ interface Offer {
31513
31550
  quotaWarnings: OfferQuotaWarning[];
31514
31551
  /** Indicates if the offer has reached its end of life. */
31515
31552
  endOfLife: boolean;
31553
+ /** Name of the control panel. */
31554
+ controlPanelName: string;
31516
31555
  }
31517
31556
  type CreateHostingRequest = {
31518
31557
  /**
@@ -31571,6 +31610,29 @@ type GetHostingRequest = {
31571
31610
  /** Hosting ID. */
31572
31611
  hostingId: string;
31573
31612
  };
31613
+ type ListControlPanelsRequest$1 = {
31614
+ /**
31615
+ * Region to target. If none is passed will use default region from the
31616
+ * config.
31617
+ */
31618
+ region?: Region;
31619
+ /**
31620
+ * Page number to return, from the paginated results (must be a positive
31621
+ * integer).
31622
+ */
31623
+ page?: number;
31624
+ /**
31625
+ * Number of control panels to return (must be a positive integer lower or
31626
+ * equal to 100).
31627
+ */
31628
+ pageSize?: number;
31629
+ };
31630
+ interface ListControlPanelsResponse {
31631
+ /** Number of control panels returned. */
31632
+ totalCount: number;
31633
+ /** List of control panels. */
31634
+ controlPanels: ControlPanel[];
31635
+ }
31574
31636
  type ListHostingsRequest$1 = {
31575
31637
  /**
31576
31638
  * Region to target. If none is passed will use default region from the
@@ -31614,6 +31676,11 @@ type ListHostingsRequest$1 = {
31614
31676
  * Organization will be returned.
31615
31677
  */
31616
31678
  organizationId?: string;
31679
+ /**
31680
+ * Name of the control panel to filter for, only Web Hosting plans from this
31681
+ * control panel will be returned.
31682
+ */
31683
+ controlPanels?: string[];
31617
31684
  };
31618
31685
  interface ListHostingsResponse {
31619
31686
  /** Number of Web Hosting plans returned. */
@@ -31764,11 +31831,32 @@ declare class API extends API$w {
31764
31831
  * @returns A Promise of ListOffersResponse
31765
31832
  */
31766
31833
  listOffers: (request: Readonly<ListOffersRequest>) => Promise<ListOffersResponse>;
31834
+ protected pageOfListControlPanels: (request?: Readonly<ListControlPanelsRequest$1>) => Promise<ListControlPanelsResponse>;
31835
+ /**
31836
+ * List all control panels type. List the control panels type: cpanel or
31837
+ * plesk.
31838
+ *
31839
+ * @param request - The request {@link ListControlPanelsRequest}
31840
+ * @returns A Promise of ListControlPanelsResponse
31841
+ */
31842
+ listControlPanels: (request?: Readonly<ListControlPanelsRequest$1>) => Promise<ListControlPanelsResponse> & {
31843
+ all: () => Promise<ControlPanel[]>;
31844
+ [Symbol.asyncIterator]: () => AsyncGenerator<ControlPanel[], void, void>;
31845
+ };
31767
31846
  }
31768
31847
 
31769
31848
  /** Lists transient statutes of the enum {@link HostingStatus}. */
31770
31849
  declare const HOSTING_TRANSIENT_STATUSES: HostingStatus[];
31771
31850
 
31851
+ declare const ListControlPanelsRequest: {
31852
+ page: {
31853
+ greaterThan: number;
31854
+ };
31855
+ pageSize: {
31856
+ greaterThan: number;
31857
+ lessThanOrEqual: number;
31858
+ };
31859
+ };
31772
31860
  declare const ListHostingsRequest: {
31773
31861
  page: {
31774
31862
  greaterThan: number;
@@ -31779,13 +31867,15 @@ declare const ListHostingsRequest: {
31779
31867
  };
31780
31868
  };
31781
31869
 
31870
+ declare const validationRules_gen_ListControlPanelsRequest: typeof ListControlPanelsRequest;
31782
31871
  declare const validationRules_gen_ListHostingsRequest: typeof ListHostingsRequest;
31783
31872
  declare namespace validationRules_gen {
31784
- export { validationRules_gen_ListHostingsRequest as ListHostingsRequest };
31873
+ export { validationRules_gen_ListControlPanelsRequest as ListControlPanelsRequest, validationRules_gen_ListHostingsRequest as ListHostingsRequest };
31785
31874
  }
31786
31875
 
31787
31876
  type index_gen_API = API;
31788
31877
  declare const index_gen_API: typeof API;
31878
+ type index_gen_ControlPanel = ControlPanel;
31789
31879
  type index_gen_CreateHostingRequest = CreateHostingRequest;
31790
31880
  type index_gen_DeleteHostingRequest = DeleteHostingRequest;
31791
31881
  type index_gen_DnsRecord = DnsRecord;
@@ -31801,6 +31891,7 @@ type index_gen_HostingCpanelUrls = HostingCpanelUrls;
31801
31891
  type index_gen_HostingDnsStatus = HostingDnsStatus;
31802
31892
  type index_gen_HostingOption = HostingOption;
31803
31893
  type index_gen_HostingStatus = HostingStatus;
31894
+ type index_gen_ListControlPanelsResponse = ListControlPanelsResponse;
31804
31895
  type index_gen_ListHostingsRequestOrderBy = ListHostingsRequestOrderBy;
31805
31896
  type index_gen_ListHostingsResponse = ListHostingsResponse;
31806
31897
  type index_gen_ListOffersRequest = ListOffersRequest;
@@ -31814,7 +31905,7 @@ type index_gen_OfferQuotaWarning = OfferQuotaWarning;
31814
31905
  type index_gen_RestoreHostingRequest = RestoreHostingRequest;
31815
31906
  type index_gen_UpdateHostingRequest = UpdateHostingRequest;
31816
31907
  declare namespace index_gen {
31817
- export { index_gen_API as API, type index_gen_CreateHostingRequest as CreateHostingRequest, type index_gen_DeleteHostingRequest as DeleteHostingRequest, type index_gen_DnsRecord as DnsRecord, type index_gen_DnsRecordStatus as DnsRecordStatus, type index_gen_DnsRecordType as DnsRecordType, type index_gen_DnsRecords as DnsRecords, type index_gen_DnsRecordsStatus as DnsRecordsStatus, type index_gen_GetDomainDnsRecordsRequest as GetDomainDnsRecordsRequest, type index_gen_GetHostingRequest as GetHostingRequest, index_gen_HOSTING_TRANSIENT_STATUSES as HOSTING_TRANSIENT_STATUSES, type index_gen_Hosting as Hosting, type index_gen_HostingCpanelUrls as HostingCpanelUrls, type index_gen_HostingDnsStatus as HostingDnsStatus, type index_gen_HostingOption as HostingOption, type index_gen_HostingStatus as HostingStatus, type ListHostingsRequest$1 as ListHostingsRequest, type index_gen_ListHostingsRequestOrderBy as ListHostingsRequestOrderBy, type index_gen_ListHostingsResponse as ListHostingsResponse, type index_gen_ListOffersRequest as ListOffersRequest, type index_gen_ListOffersRequestOrderBy as ListOffersRequestOrderBy, type index_gen_ListOffersResponse as ListOffersResponse, type index_gen_Nameserver as Nameserver, type index_gen_NameserverStatus as NameserverStatus, type index_gen_Offer as Offer, type index_gen_OfferProduct as OfferProduct, type index_gen_OfferQuotaWarning as OfferQuotaWarning, type index_gen_RestoreHostingRequest as RestoreHostingRequest, type index_gen_UpdateHostingRequest as UpdateHostingRequest, validationRules_gen as ValidationRules };
31908
+ export { index_gen_API as API, type index_gen_ControlPanel as ControlPanel, type index_gen_CreateHostingRequest as CreateHostingRequest, type index_gen_DeleteHostingRequest as DeleteHostingRequest, type index_gen_DnsRecord as DnsRecord, type index_gen_DnsRecordStatus as DnsRecordStatus, type index_gen_DnsRecordType as DnsRecordType, type index_gen_DnsRecords as DnsRecords, type index_gen_DnsRecordsStatus as DnsRecordsStatus, type index_gen_GetDomainDnsRecordsRequest as GetDomainDnsRecordsRequest, type index_gen_GetHostingRequest as GetHostingRequest, index_gen_HOSTING_TRANSIENT_STATUSES as HOSTING_TRANSIENT_STATUSES, type index_gen_Hosting as Hosting, type index_gen_HostingCpanelUrls as HostingCpanelUrls, type index_gen_HostingDnsStatus as HostingDnsStatus, type index_gen_HostingOption as HostingOption, type index_gen_HostingStatus as HostingStatus, type ListControlPanelsRequest$1 as ListControlPanelsRequest, type index_gen_ListControlPanelsResponse as ListControlPanelsResponse, type ListHostingsRequest$1 as ListHostingsRequest, type index_gen_ListHostingsRequestOrderBy as ListHostingsRequestOrderBy, type index_gen_ListHostingsResponse as ListHostingsResponse, type index_gen_ListOffersRequest as ListOffersRequest, type index_gen_ListOffersRequestOrderBy as ListOffersRequestOrderBy, type index_gen_ListOffersResponse as ListOffersResponse, type index_gen_Nameserver as Nameserver, type index_gen_NameserverStatus as NameserverStatus, type index_gen_Offer as Offer, type index_gen_OfferProduct as OfferProduct, type index_gen_OfferQuotaWarning as OfferQuotaWarning, type index_gen_RestoreHostingRequest as RestoreHostingRequest, type index_gen_UpdateHostingRequest as UpdateHostingRequest, validationRules_gen as ValidationRules };
31818
31909
  }
31819
31910
 
31820
31911
  declare namespace index {
@@ -1,4 +1,4 @@
1
- const version = 'v2.0.0';
1
+ const version = 'v2.1.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": "2.1.0",
3
+ "version": "2.2.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": "cd1363ed14b825f88eb53313566fc9d95da28db2"
38
+ "gitHead": "a4120dd20868d94af0fd5cf4ad8d016d18470a65"
39
39
  }