@scaleway/sdk 1.26.0 → 1.27.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.
@@ -18,7 +18,7 @@ const jsonContentHeaders = {
18
18
  */
19
19
  class API extends API$1 {
20
20
  /** Lists the available zones of the API. */
21
- static LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1'];
21
+ static LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1', 'nl-ams-2'];
22
22
  pageOfListServers = (() => {
23
23
  var _this = this;
24
24
  return function (request) {
@@ -413,6 +413,7 @@ const unmarshalServerType = data => {
413
413
  network: data.network ? unmarshalServerTypeNetwork(data.network) : undefined,
414
414
  perVolumeConstraint: data.per_volume_constraint ? unmarshalServerTypeVolumeConstraintsByType(data.per_volume_constraint) : undefined,
415
415
  ram: data.ram,
416
+ scratchStorageMaxSize: data.scratch_storage_max_size,
416
417
  volumesConstraint: data.volumes_constraint ? unmarshalServerTypeVolumeConstraintSizes(data.volumes_constraint) : undefined
417
418
  };
418
419
  };
@@ -2,8 +2,8 @@ import { waitForResource } from '../../../internal/async/interval-retrier.js';
2
2
  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
- import { PIN_TRANSIENT_STATUSES } from './content.gen.js';
6
- import { marshalCreateVolumeRequest, unmarshalVolume, unmarshalListVolumesResponse, marshalUpdateVolumeRequest, marshalCreatePinByURLRequest, unmarshalPin, marshalCreatePinByCIDRequest, marshalReplacePinRequest, unmarshalReplacePinResponse, unmarshalListPinsResponse } from './marshalling.gen.js';
5
+ import { PIN_TRANSIENT_STATUSES, NAME_TRANSIENT_STATUSES } from './content.gen.js';
6
+ import { marshalCreateVolumeRequest, unmarshalVolume, unmarshalListVolumesResponse, marshalUpdateVolumeRequest, marshalCreatePinByURLRequest, unmarshalPin, marshalCreatePinByCIDRequest, marshalReplacePinRequest, unmarshalReplacePinResponse, unmarshalListPinsResponse, marshalCreateNameRequest, unmarshalName, unmarshalListNamesResponse, marshalUpdateNameRequest } 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.
@@ -192,6 +192,57 @@ class API extends API$1 {
192
192
  path: `/ipfs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/pins/${validatePathParam('pinId', request.pinId)}`,
193
193
  urlParams: urlParams(['volume_id', request.volumeId])
194
194
  });
195
+ createName = request => this.client.fetch({
196
+ body: JSON.stringify(marshalCreateNameRequest(request, this.client.settings)),
197
+ headers: jsonContentHeaders,
198
+ method: 'POST',
199
+ path: `/ipfs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/names`
200
+ }, unmarshalName);
201
+ getName = request => this.client.fetch({
202
+ method: 'GET',
203
+ path: `/ipfs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/names/${validatePathParam('nameId', request.nameId)}`
204
+ }, unmarshalName);
205
+
206
+ /**
207
+ * Waits for {@link Name} to be in a final state.
208
+ *
209
+ * @param request - The request {@link GetNameRequest}
210
+ * @param options - The waiting options
211
+ * @returns A Promise of Name
212
+ */
213
+ waitForName = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!NAME_TRANSIENT_STATUSES.includes(res.status))), this.getName, request, options);
214
+ deleteName = request => this.client.fetch({
215
+ method: 'DELETE',
216
+ path: `/ipfs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/names/${validatePathParam('nameId', request.nameId)}`
217
+ });
218
+ pageOfListNames = (() => {
219
+ var _this3 = this;
220
+ return function (request) {
221
+ if (request === void 0) {
222
+ request = {};
223
+ }
224
+ return _this3.client.fetch({
225
+ method: 'GET',
226
+ path: `/ipfs/v1alpha1/regions/${validatePathParam('region', request.region ?? _this3.client.settings.defaultRegion)}/names`,
227
+ urlParams: urlParams(['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this3.client.settings.defaultPageSize], ['project_id', request.projectId])
228
+ }, unmarshalListNamesResponse);
229
+ };
230
+ })();
231
+ listNames = (() => {
232
+ var _this4 = this;
233
+ return function (request) {
234
+ if (request === void 0) {
235
+ request = {};
236
+ }
237
+ return enrichForPagination('names', _this4.pageOfListNames, request);
238
+ };
239
+ })();
240
+ updateName = request => this.client.fetch({
241
+ body: JSON.stringify(marshalUpdateNameRequest(request, this.client.settings)),
242
+ headers: jsonContentHeaders,
243
+ method: 'PATCH',
244
+ path: `/ipfs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/names/${validatePathParam('nameId', request.nameId)}`
245
+ }, unmarshalName);
195
246
  }
196
247
 
197
248
  export { API };
@@ -1,7 +1,10 @@
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
+ /** Lists transient statutes of the enum {@link NameStatus}. */
5
+ const NAME_TRANSIENT_STATUSES = ['queued', 'publishing'];
6
+
4
7
  /** Lists transient statutes of the enum {@link PinStatus}. */
5
8
  const PIN_TRANSIENT_STATUSES = ['queued', 'pinning'];
6
9
 
7
- export { PIN_TRANSIENT_STATUSES };
10
+ export { NAME_TRANSIENT_STATUSES, PIN_TRANSIENT_STATUSES };
@@ -1,5 +1,5 @@
1
1
  export { API } from './api.gen.js';
2
- export { PIN_TRANSIENT_STATUSES } from './content.gen.js';
2
+ export { NAME_TRANSIENT_STATUSES, PIN_TRANSIENT_STATUSES } from './content.gen.js';
3
3
 
4
4
  // This file was automatically generated. DO NOT EDIT.
5
5
  // If you have any remark or suggestion do not hesitate to open an issue.
@@ -34,6 +34,22 @@ const unmarshalPinInfo = data => {
34
34
  url: data.url
35
35
  };
36
36
  };
37
+ const unmarshalName = data => {
38
+ if (!isJSONObject(data)) {
39
+ throw new TypeError(`Unmarshalling the type 'Name' failed as data isn't a dictionary.`);
40
+ }
41
+ return {
42
+ cid: data.cid,
43
+ createdAt: unmarshalDate(data.created_at),
44
+ key: data.key,
45
+ name: data.name,
46
+ nameId: data.name_id,
47
+ projectId: data.project_id,
48
+ status: data.status,
49
+ tags: data.tags,
50
+ updatedAt: unmarshalDate(data.updated_at)
51
+ };
52
+ };
37
53
  const unmarshalPin = data => {
38
54
  if (!isJSONObject(data)) {
39
55
  throw new TypeError(`Unmarshalling the type 'Pin' failed as data isn't a dictionary.`);
@@ -63,6 +79,15 @@ const unmarshalVolume = data => {
63
79
  updatedAt: unmarshalDate(data.updated_at)
64
80
  };
65
81
  };
82
+ const unmarshalListNamesResponse = data => {
83
+ if (!isJSONObject(data)) {
84
+ throw new TypeError(`Unmarshalling the type 'ListNamesResponse' failed as data isn't a dictionary.`);
85
+ }
86
+ return {
87
+ names: unmarshalArrayOfObject(data.names, unmarshalName),
88
+ totalCount: data.total_count
89
+ };
90
+ };
66
91
  const unmarshalListPinsResponse = data => {
67
92
  if (!isJSONObject(data)) {
68
93
  throw new TypeError(`Unmarshalling the type 'ListPinsResponse' failed as data isn't a dictionary.`);
@@ -93,6 +118,11 @@ const marshalPinOptions = (request, defaults) => ({
93
118
  replication_count: request.replicationCount,
94
119
  required_zones: request.requiredZones
95
120
  });
121
+ const marshalCreateNameRequest = (request, defaults) => ({
122
+ cid: request.cid,
123
+ name: request.name,
124
+ project_id: request.projectId ?? defaults.defaultProjectId
125
+ });
96
126
  const marshalCreatePinByCIDRequest = (request, defaults) => ({
97
127
  cid: request.cid,
98
128
  name: request.name,
@@ -117,9 +147,14 @@ const marshalReplacePinRequest = (request, defaults) => ({
117
147
  pin_options: request.pinOptions ? marshalPinOptions(request.pinOptions) : undefined,
118
148
  volume_id: request.volumeId
119
149
  });
150
+ const marshalUpdateNameRequest = (request, defaults) => ({
151
+ cid: request.cid,
152
+ name: request.name,
153
+ tags: request.tags
154
+ });
120
155
  const marshalUpdateVolumeRequest = (request, defaults) => ({
121
156
  name: request.name,
122
157
  tags: request.tags
123
158
  });
124
159
 
125
- export { marshalCreatePinByCIDRequest, marshalCreatePinByURLRequest, marshalCreateVolumeRequest, marshalReplacePinRequest, marshalUpdateVolumeRequest, unmarshalListPinsResponse, unmarshalListVolumesResponse, unmarshalPin, unmarshalReplacePinResponse, unmarshalVolume };
160
+ export { marshalCreateNameRequest, marshalCreatePinByCIDRequest, marshalCreatePinByURLRequest, marshalCreateVolumeRequest, marshalReplacePinRequest, marshalUpdateNameRequest, marshalUpdateVolumeRequest, unmarshalListNamesResponse, unmarshalListPinsResponse, unmarshalListVolumesResponse, unmarshalName, unmarshalPin, unmarshalReplacePinResponse, unmarshalVolume };
@@ -123,6 +123,9 @@ class API extends API$1 {
123
123
 
124
124
  /**
125
125
  * Change the Cluster type. Change the type of a specific Kubernetes cluster.
126
+ * To see the possible values you can enter for the `type` field, [list
127
+ * available cluster
128
+ * types](#path-clusters-list-available-cluster-types-for-a-cluster).
126
129
  *
127
130
  * @param request - The request {@link SetClusterTypeRequest}
128
131
  * @returns A Promise of Cluster
@@ -63,7 +63,8 @@ class API extends API$1 {
63
63
  *
64
64
  * GetSecretByName usage is now deprecated.
65
65
  *
66
- * Scaleway recommends you to use ListSecrets with the `name` filter.
66
+ * Scaleway recommends that you use the `ListSecrets` request with the `name`
67
+ * filter.
67
68
  *
68
69
  * @deprecated
69
70
  * @param request - The request {@link GetSecretByNameRequest}
@@ -162,7 +163,7 @@ class API extends API$1 {
162
163
  });
163
164
 
164
165
  /**
165
- * Delete a given folder specified by the and `folder_id` parameter.
166
+ * Delete a given folder specified by the `region` and `folder_id` parameters.
166
167
  *
167
168
  * @param request - The request {@link DeleteFolderRequest}
168
169
  */
package/dist/index.cjs CHANGED
@@ -497,7 +497,7 @@ const assertValidSettings = obj => {
497
497
  }
498
498
  };
499
499
 
500
- const version = 'v1.25.0';
500
+ const version = 'v1.26.0';
501
501
  const userAgent = `scaleway-sdk-js/${version}`;
502
502
 
503
503
  const isBrowser = () => typeof window !== 'undefined' && typeof window.document !== 'undefined';
@@ -3069,7 +3069,7 @@ const jsonContentHeaders$m = {
3069
3069
  */
3070
3070
  let API$p = class API extends API$s {
3071
3071
  /** Lists the available zones of the API. */
3072
- static LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1'];
3072
+ static LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1', 'nl-ams-2'];
3073
3073
  pageOfListServers = (request = {}) => this.client.fetch({
3074
3074
  method: 'GET',
3075
3075
  path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers`,
@@ -9955,6 +9955,7 @@ const unmarshalServerType = data => {
9955
9955
  network: data.network ? unmarshalServerTypeNetwork(data.network) : undefined,
9956
9956
  perVolumeConstraint: data.per_volume_constraint ? unmarshalServerTypeVolumeConstraintsByType(data.per_volume_constraint) : undefined,
9957
9957
  ram: data.ram,
9958
+ scratchStorageMaxSize: data.scratch_storage_max_size,
9958
9959
  volumesConstraint: data.volumes_constraint ? unmarshalServerTypeVolumeConstraintSizes(data.volumes_constraint) : undefined
9959
9960
  };
9960
9961
  };
@@ -13080,6 +13081,9 @@ var index$g = /*#__PURE__*/Object.freeze({
13080
13081
  // This file was automatically generated. DO NOT EDIT.
13081
13082
  // If you have any remark or suggestion do not hesitate to open an issue.
13082
13083
 
13084
+ /** Lists transient statutes of the enum {@link NameStatus}. */
13085
+ const NAME_TRANSIENT_STATUSES = ['queued', 'publishing'];
13086
+
13083
13087
  /** Lists transient statutes of the enum {@link PinStatus}. */
13084
13088
  const PIN_TRANSIENT_STATUSES = ['queued', 'pinning'];
13085
13089
 
@@ -13116,6 +13120,22 @@ const unmarshalPinInfo = data => {
13116
13120
  url: data.url
13117
13121
  };
13118
13122
  };
13123
+ const unmarshalName = data => {
13124
+ if (!isJSONObject(data)) {
13125
+ throw new TypeError(`Unmarshalling the type 'Name' failed as data isn't a dictionary.`);
13126
+ }
13127
+ return {
13128
+ cid: data.cid,
13129
+ createdAt: unmarshalDate(data.created_at),
13130
+ key: data.key,
13131
+ name: data.name,
13132
+ nameId: data.name_id,
13133
+ projectId: data.project_id,
13134
+ status: data.status,
13135
+ tags: data.tags,
13136
+ updatedAt: unmarshalDate(data.updated_at)
13137
+ };
13138
+ };
13119
13139
  const unmarshalPin = data => {
13120
13140
  if (!isJSONObject(data)) {
13121
13141
  throw new TypeError(`Unmarshalling the type 'Pin' failed as data isn't a dictionary.`);
@@ -13145,6 +13165,15 @@ const unmarshalVolume$1 = data => {
13145
13165
  updatedAt: unmarshalDate(data.updated_at)
13146
13166
  };
13147
13167
  };
13168
+ const unmarshalListNamesResponse = data => {
13169
+ if (!isJSONObject(data)) {
13170
+ throw new TypeError(`Unmarshalling the type 'ListNamesResponse' failed as data isn't a dictionary.`);
13171
+ }
13172
+ return {
13173
+ names: unmarshalArrayOfObject(data.names, unmarshalName),
13174
+ totalCount: data.total_count
13175
+ };
13176
+ };
13148
13177
  const unmarshalListPinsResponse = data => {
13149
13178
  if (!isJSONObject(data)) {
13150
13179
  throw new TypeError(`Unmarshalling the type 'ListPinsResponse' failed as data isn't a dictionary.`);
@@ -13175,6 +13204,11 @@ const marshalPinOptions = (request, defaults) => ({
13175
13204
  replication_count: request.replicationCount,
13176
13205
  required_zones: request.requiredZones
13177
13206
  });
13207
+ const marshalCreateNameRequest = (request, defaults) => ({
13208
+ cid: request.cid,
13209
+ name: request.name,
13210
+ project_id: request.projectId ?? defaults.defaultProjectId
13211
+ });
13178
13212
  const marshalCreatePinByCIDRequest = (request, defaults) => ({
13179
13213
  cid: request.cid,
13180
13214
  name: request.name,
@@ -13199,6 +13233,11 @@ const marshalReplacePinRequest = (request, defaults) => ({
13199
13233
  pin_options: request.pinOptions ? marshalPinOptions(request.pinOptions) : undefined,
13200
13234
  volume_id: request.volumeId
13201
13235
  });
13236
+ const marshalUpdateNameRequest = (request, defaults) => ({
13237
+ cid: request.cid,
13238
+ name: request.name,
13239
+ tags: request.tags
13240
+ });
13202
13241
  const marshalUpdateVolumeRequest = (request, defaults) => ({
13203
13242
  name: request.name,
13204
13243
  tags: request.tags
@@ -13375,6 +13414,41 @@ let API$f = class API extends API$s {
13375
13414
  path: `/ipfs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/pins/${validatePathParam('pinId', request.pinId)}`,
13376
13415
  urlParams: urlParams(['volume_id', request.volumeId])
13377
13416
  });
13417
+ createName = request => this.client.fetch({
13418
+ body: JSON.stringify(marshalCreateNameRequest(request, this.client.settings)),
13419
+ headers: jsonContentHeaders$d,
13420
+ method: 'POST',
13421
+ path: `/ipfs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/names`
13422
+ }, unmarshalName);
13423
+ getName = request => this.client.fetch({
13424
+ method: 'GET',
13425
+ path: `/ipfs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/names/${validatePathParam('nameId', request.nameId)}`
13426
+ }, unmarshalName);
13427
+
13428
+ /**
13429
+ * Waits for {@link Name} to be in a final state.
13430
+ *
13431
+ * @param request - The request {@link GetNameRequest}
13432
+ * @param options - The waiting options
13433
+ * @returns A Promise of Name
13434
+ */
13435
+ waitForName = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!NAME_TRANSIENT_STATUSES.includes(res.status))), this.getName, request, options);
13436
+ deleteName = request => this.client.fetch({
13437
+ method: 'DELETE',
13438
+ path: `/ipfs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/names/${validatePathParam('nameId', request.nameId)}`
13439
+ });
13440
+ pageOfListNames = (request = {}) => this.client.fetch({
13441
+ method: 'GET',
13442
+ path: `/ipfs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/names`,
13443
+ urlParams: urlParams(['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId])
13444
+ }, unmarshalListNamesResponse);
13445
+ listNames = (request = {}) => enrichForPagination('names', this.pageOfListNames, request);
13446
+ updateName = request => this.client.fetch({
13447
+ body: JSON.stringify(marshalUpdateNameRequest(request, this.client.settings)),
13448
+ headers: jsonContentHeaders$d,
13449
+ method: 'PATCH',
13450
+ path: `/ipfs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/names/${validatePathParam('nameId', request.nameId)}`
13451
+ }, unmarshalName);
13378
13452
  };
13379
13453
 
13380
13454
  // This file was automatically generated. DO NOT EDIT.
@@ -13383,6 +13457,7 @@ let API$f = class API extends API$s {
13383
13457
  var index_gen$d = /*#__PURE__*/Object.freeze({
13384
13458
  __proto__: null,
13385
13459
  API: API$f,
13460
+ NAME_TRANSIENT_STATUSES: NAME_TRANSIENT_STATUSES,
13386
13461
  PIN_TRANSIENT_STATUSES: PIN_TRANSIENT_STATUSES
13387
13462
  });
13388
13463
 
@@ -13918,6 +13993,9 @@ let API$e = class API extends API$s {
13918
13993
 
13919
13994
  /**
13920
13995
  * Change the Cluster type. Change the type of a specific Kubernetes cluster.
13996
+ * To see the possible values you can enter for the `type` field, [list
13997
+ * available cluster
13998
+ * types](#path-clusters-list-available-cluster-types-for-a-cluster).
13921
13999
  *
13922
14000
  * @param request - The request {@link SetClusterTypeRequest}
13923
14001
  * @returns A Promise of Cluster
@@ -20495,7 +20573,8 @@ let API$6 = class API extends API$s {
20495
20573
  *
20496
20574
  * GetSecretByName usage is now deprecated.
20497
20575
  *
20498
- * Scaleway recommends you to use ListSecrets with the `name` filter.
20576
+ * Scaleway recommends that you use the `ListSecrets` request with the `name`
20577
+ * filter.
20499
20578
  *
20500
20579
  * @deprecated
20501
20580
  * @param request - The request {@link GetSecretByNameRequest}
@@ -20562,7 +20641,7 @@ let API$6 = class API extends API$s {
20562
20641
  });
20563
20642
 
20564
20643
  /**
20565
- * Delete a given folder specified by the and `folder_id` parameter.
20644
+ * Delete a given folder specified by the `region` and `folder_id` parameters.
20566
20645
  *
20567
20646
  * @param request - The request {@link DeleteFolderRequest}
20568
20647
  */
package/dist/index.d.ts CHANGED
@@ -9424,7 +9424,7 @@ type SecurityGroupRuleAction = 'accept' | 'drop';
9424
9424
  type SecurityGroupRuleDirection = 'inbound' | 'outbound';
9425
9425
  type SecurityGroupRuleProtocol = 'TCP' | 'UDP' | 'ICMP' | 'ANY';
9426
9426
  type SecurityGroupState = 'available' | 'syncing' | 'syncing_error';
9427
- type ServerAction = 'poweron' | 'backup' | 'stop_in_place' | 'poweroff' | 'terminate' | 'reboot';
9427
+ type ServerAction = 'poweron' | 'backup' | 'stop_in_place' | 'poweroff' | 'terminate' | 'reboot' | 'enable_routed_ip';
9428
9428
  type ServerIpIpFamily = 'inet' | 'inet6';
9429
9429
  type ServerIpProvisioningMode = 'manual' | 'dhcp' | 'slaac';
9430
9430
  type ServerState = 'running' | 'stopped' | 'stopped in place' | 'starting' | 'stopping' | 'locked';
@@ -9435,7 +9435,7 @@ type TaskStatus = 'pending' | 'started' | 'success' | 'failure' | 'retry';
9435
9435
  type VolumeServerState = 'available' | 'snapshotting' | 'error' | 'fetching' | 'resizing' | 'saving' | 'hotsyncing';
9436
9436
  type VolumeServerVolumeType = 'l_ssd' | 'b_ssd';
9437
9437
  type VolumeState = 'available' | 'snapshotting' | 'error' | 'fetching' | 'resizing' | 'saving' | 'hotsyncing';
9438
- type VolumeVolumeType = 'l_ssd' | 'b_ssd' | 'unified';
9438
+ type VolumeVolumeType = 'l_ssd' | 'b_ssd' | 'unified' | 'scratch';
9439
9439
  /** Bootscript. */
9440
9440
  interface Bootscript {
9441
9441
  /** Bootscript arguments. */
@@ -9941,6 +9941,8 @@ interface ServerType {
9941
9941
  network?: ServerTypeNetwork;
9942
9942
  /** Capabilities. */
9943
9943
  capabilities?: ServerTypeCapabilities;
9944
+ /** Maximum available scratch storage. */
9945
+ scratchStorageMaxSize?: number;
9944
9946
  }
9945
9947
  /** Server type. capabilities. */
9946
9948
  interface ServerTypeCapabilities {
@@ -13441,10 +13443,16 @@ declare namespace index$g {
13441
13443
  export { index_gen$e as v1 };
13442
13444
  }
13443
13445
 
13446
+ type ListNamesRequestOrderBy = 'created_at_asc' | 'created_at_desc';
13444
13447
  type ListPinsRequestOrderBy = 'created_at_asc' | 'created_at_desc';
13445
13448
  type ListVolumesRequestOrderBy = 'created_at_asc' | 'created_at_desc';
13449
+ type NameStatus = 'unknown_status' | 'queued' | 'publishing' | 'failed' | 'published';
13446
13450
  type PinDetails = 'unknown_details' | 'pinning_looking_for_provider' | 'pinning_in_progress' | 'pinning_blocks_fetched' | 'pinning_fetching_url_data' | 'pinned_ok' | 'unpinned_ok' | 'unpinning_in_progress' | 'failed_contains_banned_cid' | 'failed_pinning' | 'failed_pinning_no_provider' | 'failed_pinning_bad_cid_format' | 'failed_pinning_timeout' | 'failed_pinning_too_big_content' | 'failed_pinning_unreachable_url' | 'failed_pinning_bad_url_format' | 'failed_pinning_no_url_content_length' | 'failed_pinning_bad_url_status_code' | 'failed_unpinning' | 'checking_coherence' | 'rescheduled';
13447
13451
  type PinStatus = 'unknown_status' | 'queued' | 'pinning' | 'failed' | 'pinned';
13452
+ interface ListNamesResponse {
13453
+ names: Name[];
13454
+ totalCount: number;
13455
+ }
13448
13456
  interface ListPinsResponse {
13449
13457
  totalCount: number;
13450
13458
  pins: Pin[];
@@ -13453,6 +13461,17 @@ interface ListVolumesResponse {
13453
13461
  volumes: Volume$1[];
13454
13462
  totalCount: number;
13455
13463
  }
13464
+ interface Name {
13465
+ nameId: string;
13466
+ projectId: string;
13467
+ createdAt?: Date;
13468
+ updatedAt?: Date;
13469
+ tags: string[];
13470
+ name: string;
13471
+ key: string;
13472
+ cid: string;
13473
+ status: NameStatus;
13474
+ }
13456
13475
  interface Pin {
13457
13476
  pinId: string;
13458
13477
  status: PinStatus;
@@ -13609,6 +13628,55 @@ type DeletePinRequest = {
13609
13628
  pinId: string;
13610
13629
  volumeId: string;
13611
13630
  };
13631
+ type CreateNameRequest = {
13632
+ /**
13633
+ * Region to target. If none is passed will use default region from the
13634
+ * config.
13635
+ */
13636
+ region?: Region;
13637
+ projectId?: string;
13638
+ name: string;
13639
+ cid: string;
13640
+ };
13641
+ type GetNameRequest = {
13642
+ /**
13643
+ * Region to target. If none is passed will use default region from the
13644
+ * config.
13645
+ */
13646
+ region?: Region;
13647
+ nameId: string;
13648
+ };
13649
+ type DeleteNameRequest = {
13650
+ /**
13651
+ * Region to target. If none is passed will use default region from the
13652
+ * config.
13653
+ */
13654
+ region?: Region;
13655
+ nameId: string;
13656
+ };
13657
+ type ListNamesRequest = {
13658
+ /**
13659
+ * Region to target. If none is passed will use default region from the
13660
+ * config.
13661
+ */
13662
+ region?: Region;
13663
+ page?: number;
13664
+ pageSize?: number;
13665
+ orderBy?: ListNamesRequestOrderBy;
13666
+ projectId?: string;
13667
+ organizationId?: string;
13668
+ };
13669
+ type UpdateNameRequest = {
13670
+ /**
13671
+ * Region to target. If none is passed will use default region from the
13672
+ * config.
13673
+ */
13674
+ region?: Region;
13675
+ nameId: string;
13676
+ name?: string;
13677
+ tags?: string[];
13678
+ cid?: string;
13679
+ };
13612
13680
 
13613
13681
  /** IPFS Pinning service API. */
13614
13682
  declare class API$f extends API$s {
@@ -13723,24 +13791,52 @@ declare class API$f extends API$s {
13723
13791
  * @param request - The request {@link DeletePinRequest}
13724
13792
  */
13725
13793
  deletePin: (request: Readonly<DeletePinRequest>) => Promise<void>;
13794
+ createName: (request: Readonly<CreateNameRequest>) => Promise<Name>;
13795
+ getName: (request: Readonly<GetNameRequest>) => Promise<Name>;
13796
+ /**
13797
+ * Waits for {@link Name} to be in a final state.
13798
+ *
13799
+ * @param request - The request {@link GetNameRequest}
13800
+ * @param options - The waiting options
13801
+ * @returns A Promise of Name
13802
+ */
13803
+ waitForName: (request: Readonly<GetNameRequest>, options?: Readonly<WaitForOptions<Name>>) => Promise<Name>;
13804
+ deleteName: (request: Readonly<DeleteNameRequest>) => Promise<void>;
13805
+ protected pageOfListNames: (request?: Readonly<ListNamesRequest>) => Promise<ListNamesResponse>;
13806
+ listNames: (request?: Readonly<ListNamesRequest>) => Promise<ListNamesResponse> & {
13807
+ all: () => Promise<Name[]>;
13808
+ [Symbol.asyncIterator]: () => AsyncGenerator<Name[], void, void>;
13809
+ };
13810
+ updateName: (request: Readonly<UpdateNameRequest>) => Promise<Name>;
13726
13811
  }
13727
13812
 
13813
+ /** Lists transient statutes of the enum {@link NameStatus}. */
13814
+ declare const NAME_TRANSIENT_STATUSES: NameStatus[];
13728
13815
  /** Lists transient statutes of the enum {@link PinStatus}. */
13729
13816
  declare const PIN_TRANSIENT_STATUSES: PinStatus[];
13730
13817
 
13818
+ type index_gen$d_CreateNameRequest = CreateNameRequest;
13731
13819
  type index_gen$d_CreatePinByCIDRequest = CreatePinByCIDRequest;
13732
13820
  type index_gen$d_CreatePinByURLRequest = CreatePinByURLRequest;
13733
13821
  type index_gen$d_CreateVolumeRequest = CreateVolumeRequest;
13822
+ type index_gen$d_DeleteNameRequest = DeleteNameRequest;
13734
13823
  type index_gen$d_DeletePinRequest = DeletePinRequest;
13735
13824
  type index_gen$d_DeleteVolumeRequest = DeleteVolumeRequest;
13825
+ type index_gen$d_GetNameRequest = GetNameRequest;
13736
13826
  type index_gen$d_GetPinRequest = GetPinRequest;
13737
13827
  type index_gen$d_GetVolumeRequest = GetVolumeRequest;
13828
+ type index_gen$d_ListNamesRequest = ListNamesRequest;
13829
+ type index_gen$d_ListNamesRequestOrderBy = ListNamesRequestOrderBy;
13830
+ type index_gen$d_ListNamesResponse = ListNamesResponse;
13738
13831
  type index_gen$d_ListPinsRequest = ListPinsRequest;
13739
13832
  type index_gen$d_ListPinsRequestOrderBy = ListPinsRequestOrderBy;
13740
13833
  type index_gen$d_ListPinsResponse = ListPinsResponse;
13741
13834
  type index_gen$d_ListVolumesRequest = ListVolumesRequest;
13742
13835
  type index_gen$d_ListVolumesRequestOrderBy = ListVolumesRequestOrderBy;
13743
13836
  type index_gen$d_ListVolumesResponse = ListVolumesResponse;
13837
+ declare const index_gen$d_NAME_TRANSIENT_STATUSES: typeof NAME_TRANSIENT_STATUSES;
13838
+ type index_gen$d_Name = Name;
13839
+ type index_gen$d_NameStatus = NameStatus;
13744
13840
  declare const index_gen$d_PIN_TRANSIENT_STATUSES: typeof PIN_TRANSIENT_STATUSES;
13745
13841
  type index_gen$d_Pin = Pin;
13746
13842
  type index_gen$d_PinCID = PinCID;
@@ -13751,9 +13847,10 @@ type index_gen$d_PinOptions = PinOptions;
13751
13847
  type index_gen$d_PinStatus = PinStatus;
13752
13848
  type index_gen$d_ReplacePinRequest = ReplacePinRequest;
13753
13849
  type index_gen$d_ReplacePinResponse = ReplacePinResponse;
13850
+ type index_gen$d_UpdateNameRequest = UpdateNameRequest;
13754
13851
  type index_gen$d_UpdateVolumeRequest = UpdateVolumeRequest;
13755
13852
  declare namespace index_gen$d {
13756
- export { API$f as API, type index_gen$d_CreatePinByCIDRequest as CreatePinByCIDRequest, type index_gen$d_CreatePinByURLRequest as CreatePinByURLRequest, type index_gen$d_CreateVolumeRequest as CreateVolumeRequest, type index_gen$d_DeletePinRequest as DeletePinRequest, type index_gen$d_DeleteVolumeRequest as DeleteVolumeRequest, type index_gen$d_GetPinRequest as GetPinRequest, type index_gen$d_GetVolumeRequest as GetVolumeRequest, type index_gen$d_ListPinsRequest as ListPinsRequest, type index_gen$d_ListPinsRequestOrderBy as ListPinsRequestOrderBy, type index_gen$d_ListPinsResponse as ListPinsResponse, type index_gen$d_ListVolumesRequest as ListVolumesRequest, type index_gen$d_ListVolumesRequestOrderBy as ListVolumesRequestOrderBy, type index_gen$d_ListVolumesResponse as ListVolumesResponse, index_gen$d_PIN_TRANSIENT_STATUSES as PIN_TRANSIENT_STATUSES, type index_gen$d_Pin as Pin, type index_gen$d_PinCID as PinCID, type index_gen$d_PinCIDMeta as PinCIDMeta, type index_gen$d_PinDetails as PinDetails, type index_gen$d_PinInfo as PinInfo, type index_gen$d_PinOptions as PinOptions, type index_gen$d_PinStatus as PinStatus, type index_gen$d_ReplacePinRequest as ReplacePinRequest, type index_gen$d_ReplacePinResponse as ReplacePinResponse, type index_gen$d_UpdateVolumeRequest as UpdateVolumeRequest, type Volume$1 as Volume };
13853
+ export { API$f as API, type index_gen$d_CreateNameRequest as CreateNameRequest, type index_gen$d_CreatePinByCIDRequest as CreatePinByCIDRequest, type index_gen$d_CreatePinByURLRequest as CreatePinByURLRequest, type index_gen$d_CreateVolumeRequest as CreateVolumeRequest, type index_gen$d_DeleteNameRequest as DeleteNameRequest, type index_gen$d_DeletePinRequest as DeletePinRequest, type index_gen$d_DeleteVolumeRequest as DeleteVolumeRequest, type index_gen$d_GetNameRequest as GetNameRequest, type index_gen$d_GetPinRequest as GetPinRequest, type index_gen$d_GetVolumeRequest as GetVolumeRequest, type index_gen$d_ListNamesRequest as ListNamesRequest, type index_gen$d_ListNamesRequestOrderBy as ListNamesRequestOrderBy, type index_gen$d_ListNamesResponse as ListNamesResponse, type index_gen$d_ListPinsRequest as ListPinsRequest, type index_gen$d_ListPinsRequestOrderBy as ListPinsRequestOrderBy, type index_gen$d_ListPinsResponse as ListPinsResponse, type index_gen$d_ListVolumesRequest as ListVolumesRequest, type index_gen$d_ListVolumesRequestOrderBy as ListVolumesRequestOrderBy, type index_gen$d_ListVolumesResponse as ListVolumesResponse, index_gen$d_NAME_TRANSIENT_STATUSES as NAME_TRANSIENT_STATUSES, type index_gen$d_Name as Name, type index_gen$d_NameStatus as NameStatus, index_gen$d_PIN_TRANSIENT_STATUSES as PIN_TRANSIENT_STATUSES, type index_gen$d_Pin as Pin, type index_gen$d_PinCID as PinCID, type index_gen$d_PinCIDMeta as PinCIDMeta, type index_gen$d_PinDetails as PinDetails, type index_gen$d_PinInfo as PinInfo, type index_gen$d_PinOptions as PinOptions, type index_gen$d_PinStatus as PinStatus, type index_gen$d_ReplacePinRequest as ReplacePinRequest, type index_gen$d_ReplacePinResponse as ReplacePinResponse, type index_gen$d_UpdateNameRequest as UpdateNameRequest, type index_gen$d_UpdateVolumeRequest as UpdateVolumeRequest, type Volume$1 as Volume };
13757
13854
  }
13758
13855
 
13759
13856
  declare namespace index$f {
@@ -14941,6 +15038,9 @@ declare class API$e extends API$s {
14941
15038
  upgradeCluster: (request: Readonly<UpgradeClusterRequest>) => Promise<Cluster$1>;
14942
15039
  /**
14943
15040
  * Change the Cluster type. Change the type of a specific Kubernetes cluster.
15041
+ * To see the possible values you can enter for the `type` field, [list
15042
+ * available cluster
15043
+ * types](#path-clusters-list-available-cluster-types-for-a-cluster).
14944
15044
  *
14945
15045
  * @param request - The request {@link SetClusterTypeRequest}
14946
15046
  * @returns A Promise of Cluster
@@ -24101,7 +24201,8 @@ declare class API$6 extends API$s {
24101
24201
  *
24102
24202
  * GetSecretByName usage is now deprecated.
24103
24203
  *
24104
- * Scaleway recommends you to use ListSecrets with the `name` filter.
24204
+ * Scaleway recommends that you use the `ListSecrets` request with the `name`
24205
+ * filter.
24105
24206
  *
24106
24207
  * @deprecated
24107
24208
  * @param request - The request {@link GetSecretByNameRequest}
@@ -24149,7 +24250,7 @@ declare class API$6 extends API$s {
24149
24250
  */
24150
24251
  deleteSecret: (request: Readonly<DeleteSecretRequest>) => Promise<void>;
24151
24252
  /**
24152
- * Delete a given folder specified by the and `folder_id` parameter.
24253
+ * Delete a given folder specified by the `region` and `folder_id` parameters.
24153
24254
  *
24154
24255
  * @param request - The request {@link DeleteFolderRequest}
24155
24256
  */
@@ -1,4 +1,4 @@
1
- const version = 'v1.25.0';
1
+ const version = 'v1.26.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.26.0",
3
+ "version": "1.27.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": "036079daf9b5b43f5e84e6679c3762b75b2e0d16"
38
+ "gitHead": "7ab7db70d5487dcd92cb758b90d242e0a3b25ebf"
39
39
  }