@scaleway/sdk 1.36.0 → 1.37.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/container/v1beta1/marshalling.gen.js +1 -0
- package/dist/api/function/v1beta1/marshalling.gen.js +1 -0
- package/dist/api/ipfs/v1alpha1/api.gen.js +120 -3
- package/dist/api/ipfs/v1alpha1/content.gen.js +4 -1
- package/dist/api/ipfs/v1alpha1/index.gen.js +2 -2
- package/dist/api/ipfs/v1alpha1/marshalling.gen.js +56 -1
- package/dist/api/mnq/v1beta1/validation-rules.gen.js +5 -5
- package/dist/index.cjs +169 -6
- package/dist/index.d.ts +216 -9
- package/dist/scw/constants.js +1 -1
- package/package.json +2 -2
|
@@ -20,6 +20,7 @@ const unmarshalTriggerMnqNatsClientConfig = data => {
|
|
|
20
20
|
return {
|
|
21
21
|
mnqCredentialId: data.mnq_credential_id,
|
|
22
22
|
mnqNamespaceId: data.mnq_namespace_id,
|
|
23
|
+
mnqNatsAccountId: data.mnq_nats_account_id,
|
|
23
24
|
mnqProjectId: data.mnq_project_id,
|
|
24
25
|
mnqRegion: data.mnq_region,
|
|
25
26
|
subject: data.subject
|
|
@@ -20,6 +20,7 @@ const unmarshalTriggerMnqNatsClientConfig = data => {
|
|
|
20
20
|
return {
|
|
21
21
|
mnqCredentialId: data.mnq_credential_id,
|
|
22
22
|
mnqNamespaceId: data.mnq_namespace_id,
|
|
23
|
+
mnqNatsAccountId: data.mnq_nats_account_id,
|
|
23
24
|
mnqProjectId: data.mnq_project_id,
|
|
24
25
|
mnqRegion: data.mnq_region,
|
|
25
26
|
subject: data.subject
|
|
@@ -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, marshalIpnsApiCreateNameRequest, unmarshalName, unmarshalListNamesResponse, marshalIpnsApiUpdateNameRequest, unmarshalExportKeyNameResponse, marshalIpnsApiImportKeyNameRequest } 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.
|
|
@@ -194,4 +194,121 @@ class API extends API$1 {
|
|
|
194
194
|
});
|
|
195
195
|
}
|
|
196
196
|
|
|
197
|
-
|
|
197
|
+
/** IPFS Naming service API. */
|
|
198
|
+
class IpnsAPI extends API$1 {
|
|
199
|
+
/** Lists the available regions of the API. */
|
|
200
|
+
static LOCALITIES = ['fr-par', 'nl-ams', 'pl-waw'];
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Create a new name. You can use the `ipns key` command to list and generate
|
|
204
|
+
* more names and their respective keys.
|
|
205
|
+
*
|
|
206
|
+
* @param request - The request {@link IpnsApiCreateNameRequest}
|
|
207
|
+
* @returns A Promise of Name
|
|
208
|
+
*/
|
|
209
|
+
createName = request => this.client.fetch({
|
|
210
|
+
body: JSON.stringify(marshalIpnsApiCreateNameRequest(request, this.client.settings)),
|
|
211
|
+
headers: jsonContentHeaders,
|
|
212
|
+
method: 'POST',
|
|
213
|
+
path: `/ipfs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/names`
|
|
214
|
+
}, unmarshalName);
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Get information about a name. Retrieve information about a specific name.
|
|
218
|
+
*
|
|
219
|
+
* @param request - The request {@link IpnsApiGetNameRequest}
|
|
220
|
+
* @returns A Promise of Name
|
|
221
|
+
*/
|
|
222
|
+
getName = request => this.client.fetch({
|
|
223
|
+
method: 'GET',
|
|
224
|
+
path: `/ipfs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/names/${validatePathParam('nameId', request.nameId)}`
|
|
225
|
+
}, unmarshalName);
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Waits for {@link Name} to be in a final state.
|
|
229
|
+
*
|
|
230
|
+
* @param request - The request {@link GetNameRequest}
|
|
231
|
+
* @param options - The waiting options
|
|
232
|
+
* @returns A Promise of Name
|
|
233
|
+
*/
|
|
234
|
+
waitForName = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!NAME_TRANSIENT_STATUSES.includes(res.status))), this.getName, request, options);
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Delete an existing name. Delete a name by its ID.
|
|
238
|
+
*
|
|
239
|
+
* @param request - The request {@link IpnsApiDeleteNameRequest}
|
|
240
|
+
*/
|
|
241
|
+
deleteName = request => this.client.fetch({
|
|
242
|
+
method: 'DELETE',
|
|
243
|
+
path: `/ipfs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/names/${validatePathParam('nameId', request.nameId)}`
|
|
244
|
+
});
|
|
245
|
+
pageOfListNames = (() => {
|
|
246
|
+
var _this3 = this;
|
|
247
|
+
return function (request) {
|
|
248
|
+
if (request === void 0) {
|
|
249
|
+
request = {};
|
|
250
|
+
}
|
|
251
|
+
return _this3.client.fetch({
|
|
252
|
+
method: 'GET',
|
|
253
|
+
path: `/ipfs/v1alpha1/regions/${validatePathParam('region', request.region ?? _this3.client.settings.defaultRegion)}/names`,
|
|
254
|
+
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])
|
|
255
|
+
}, unmarshalListNamesResponse);
|
|
256
|
+
};
|
|
257
|
+
})();
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* List all names by a Project ID. Retrieve information about all names from a
|
|
261
|
+
* Project ID.
|
|
262
|
+
*
|
|
263
|
+
* @param request - The request {@link IpnsApiListNamesRequest}
|
|
264
|
+
* @returns A Promise of ListNamesResponse
|
|
265
|
+
*/
|
|
266
|
+
listNames = (() => {
|
|
267
|
+
var _this4 = this;
|
|
268
|
+
return function (request) {
|
|
269
|
+
if (request === void 0) {
|
|
270
|
+
request = {};
|
|
271
|
+
}
|
|
272
|
+
return enrichForPagination('names', _this4.pageOfListNames, request);
|
|
273
|
+
};
|
|
274
|
+
})();
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Update name information. Update name information (CID, tag, name...).
|
|
278
|
+
*
|
|
279
|
+
* @param request - The request {@link IpnsApiUpdateNameRequest}
|
|
280
|
+
* @returns A Promise of Name
|
|
281
|
+
*/
|
|
282
|
+
updateName = request => this.client.fetch({
|
|
283
|
+
body: JSON.stringify(marshalIpnsApiUpdateNameRequest(request, this.client.settings)),
|
|
284
|
+
headers: jsonContentHeaders,
|
|
285
|
+
method: 'PATCH',
|
|
286
|
+
path: `/ipfs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/names/${validatePathParam('nameId', request.nameId)}`
|
|
287
|
+
}, unmarshalName);
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* Export your private key. Export a private key by its ID.
|
|
291
|
+
*
|
|
292
|
+
* @param request - The request {@link IpnsApiExportKeyNameRequest}
|
|
293
|
+
* @returns A Promise of ExportKeyNameResponse
|
|
294
|
+
*/
|
|
295
|
+
exportKeyName = request => this.client.fetch({
|
|
296
|
+
method: 'GET',
|
|
297
|
+
path: `/ipfs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/names/${validatePathParam('nameId', request.nameId)}/export-key`
|
|
298
|
+
}, unmarshalExportKeyNameResponse);
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Import your private key. Import a private key.
|
|
302
|
+
*
|
|
303
|
+
* @param request - The request {@link IpnsApiImportKeyNameRequest}
|
|
304
|
+
* @returns A Promise of Name
|
|
305
|
+
*/
|
|
306
|
+
importKeyName = request => this.client.fetch({
|
|
307
|
+
body: JSON.stringify(marshalIpnsApiImportKeyNameRequest(request, this.client.settings)),
|
|
308
|
+
headers: jsonContentHeaders,
|
|
309
|
+
method: 'POST',
|
|
310
|
+
path: `/ipfs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/names/import-key`
|
|
311
|
+
}, unmarshalName);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
export { API, IpnsAPI };
|
|
@@ -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
|
-
export { API } from './api.gen.js';
|
|
2
|
-
export { PIN_TRANSIENT_STATUSES } from './content.gen.js';
|
|
1
|
+
export { API, IpnsAPI } from './api.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,23 @@ 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
|
+
createdAt: unmarshalDate(data.created_at),
|
|
43
|
+
key: data.key,
|
|
44
|
+
name: data.name,
|
|
45
|
+
nameId: data.name_id,
|
|
46
|
+
projectId: data.project_id,
|
|
47
|
+
region: data.region,
|
|
48
|
+
status: data.status,
|
|
49
|
+
tags: data.tags,
|
|
50
|
+
updatedAt: unmarshalDate(data.updated_at),
|
|
51
|
+
value: data.value
|
|
52
|
+
};
|
|
53
|
+
};
|
|
37
54
|
const unmarshalPin = data => {
|
|
38
55
|
if (!isJSONObject(data)) {
|
|
39
56
|
throw new TypeError(`Unmarshalling the type 'Pin' failed as data isn't a dictionary.`);
|
|
@@ -63,6 +80,28 @@ const unmarshalVolume = data => {
|
|
|
63
80
|
updatedAt: unmarshalDate(data.updated_at)
|
|
64
81
|
};
|
|
65
82
|
};
|
|
83
|
+
const unmarshalExportKeyNameResponse = data => {
|
|
84
|
+
if (!isJSONObject(data)) {
|
|
85
|
+
throw new TypeError(`Unmarshalling the type 'ExportKeyNameResponse' failed as data isn't a dictionary.`);
|
|
86
|
+
}
|
|
87
|
+
return {
|
|
88
|
+
createdAt: unmarshalDate(data.created_at),
|
|
89
|
+
nameId: data.name_id,
|
|
90
|
+
privateKey: data.private_key,
|
|
91
|
+
projectId: data.project_id,
|
|
92
|
+
publicKey: data.public_key,
|
|
93
|
+
updatedAt: unmarshalDate(data.updated_at)
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
const unmarshalListNamesResponse = data => {
|
|
97
|
+
if (!isJSONObject(data)) {
|
|
98
|
+
throw new TypeError(`Unmarshalling the type 'ListNamesResponse' failed as data isn't a dictionary.`);
|
|
99
|
+
}
|
|
100
|
+
return {
|
|
101
|
+
names: unmarshalArrayOfObject(data.names, unmarshalName),
|
|
102
|
+
totalCount: data.total_count
|
|
103
|
+
};
|
|
104
|
+
};
|
|
66
105
|
const unmarshalListPinsResponse = data => {
|
|
67
106
|
if (!isJSONObject(data)) {
|
|
68
107
|
throw new TypeError(`Unmarshalling the type 'ListPinsResponse' failed as data isn't a dictionary.`);
|
|
@@ -110,6 +149,22 @@ const marshalCreateVolumeRequest = (request, defaults) => ({
|
|
|
110
149
|
name: request.name,
|
|
111
150
|
project_id: request.projectId ?? defaults.defaultProjectId
|
|
112
151
|
});
|
|
152
|
+
const marshalIpnsApiCreateNameRequest = (request, defaults) => ({
|
|
153
|
+
name: request.name,
|
|
154
|
+
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
155
|
+
value: request.value
|
|
156
|
+
});
|
|
157
|
+
const marshalIpnsApiImportKeyNameRequest = (request, defaults) => ({
|
|
158
|
+
name: request.name,
|
|
159
|
+
private_key: request.privateKey,
|
|
160
|
+
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
161
|
+
value: request.value
|
|
162
|
+
});
|
|
163
|
+
const marshalIpnsApiUpdateNameRequest = (request, defaults) => ({
|
|
164
|
+
name: request.name,
|
|
165
|
+
tags: request.tags,
|
|
166
|
+
value: request.value
|
|
167
|
+
});
|
|
113
168
|
const marshalReplacePinRequest = (request, defaults) => ({
|
|
114
169
|
cid: request.cid,
|
|
115
170
|
name: request.name,
|
|
@@ -122,4 +177,4 @@ const marshalUpdateVolumeRequest = (request, defaults) => ({
|
|
|
122
177
|
tags: request.tags
|
|
123
178
|
});
|
|
124
179
|
|
|
125
|
-
export { marshalCreatePinByCIDRequest, marshalCreatePinByURLRequest, marshalCreateVolumeRequest, marshalReplacePinRequest, marshalUpdateVolumeRequest, unmarshalListPinsResponse, unmarshalListVolumesResponse, unmarshalPin, unmarshalReplacePinResponse, unmarshalVolume };
|
|
180
|
+
export { marshalCreatePinByCIDRequest, marshalCreatePinByURLRequest, marshalCreateVolumeRequest, marshalIpnsApiCreateNameRequest, marshalIpnsApiImportKeyNameRequest, marshalIpnsApiUpdateNameRequest, marshalReplacePinRequest, marshalUpdateVolumeRequest, unmarshalExportKeyNameResponse, unmarshalListNamesResponse, unmarshalListPinsResponse, unmarshalListVolumesResponse, unmarshalName, unmarshalPin, unmarshalReplacePinResponse, unmarshalVolume };
|
|
@@ -9,7 +9,7 @@ const NatsApiCreateNatsAccountRequest = {
|
|
|
9
9
|
};
|
|
10
10
|
const NatsApiCreateNatsCredentialsRequest = {
|
|
11
11
|
name: {
|
|
12
|
-
maxLength:
|
|
12
|
+
maxLength: 500,
|
|
13
13
|
minLength: 1
|
|
14
14
|
}
|
|
15
15
|
};
|
|
@@ -21,25 +21,25 @@ const NatsApiUpdateNatsAccountRequest = {
|
|
|
21
21
|
};
|
|
22
22
|
const SnsApiCreateSnsCredentialsRequest = {
|
|
23
23
|
name: {
|
|
24
|
-
maxLength:
|
|
24
|
+
maxLength: 500,
|
|
25
25
|
minLength: 1
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
const SnsApiUpdateSnsCredentialsRequest = {
|
|
29
29
|
name: {
|
|
30
|
-
maxLength:
|
|
30
|
+
maxLength: 500,
|
|
31
31
|
minLength: 1
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
34
|
const SqsApiCreateSqsCredentialsRequest = {
|
|
35
35
|
name: {
|
|
36
|
-
maxLength:
|
|
36
|
+
maxLength: 500,
|
|
37
37
|
minLength: 1
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
40
|
const SqsApiUpdateSqsCredentialsRequest = {
|
|
41
41
|
name: {
|
|
42
|
-
maxLength:
|
|
42
|
+
maxLength: 500,
|
|
43
43
|
minLength: 1
|
|
44
44
|
}
|
|
45
45
|
};
|
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.36.0';
|
|
501
501
|
const userAgent = `scaleway-sdk-js/${version}`;
|
|
502
502
|
|
|
503
503
|
const isBrowser = () =>
|
|
@@ -4871,6 +4871,7 @@ const unmarshalTriggerMnqNatsClientConfig$1 = data => {
|
|
|
4871
4871
|
return {
|
|
4872
4872
|
mnqCredentialId: data.mnq_credential_id,
|
|
4873
4873
|
mnqNamespaceId: data.mnq_namespace_id,
|
|
4874
|
+
mnqNatsAccountId: data.mnq_nats_account_id,
|
|
4874
4875
|
mnqProjectId: data.mnq_project_id,
|
|
4875
4876
|
mnqRegion: data.mnq_region,
|
|
4876
4877
|
subject: data.subject
|
|
@@ -9481,6 +9482,7 @@ const unmarshalTriggerMnqNatsClientConfig = data => {
|
|
|
9481
9482
|
return {
|
|
9482
9483
|
mnqCredentialId: data.mnq_credential_id,
|
|
9483
9484
|
mnqNamespaceId: data.mnq_namespace_id,
|
|
9485
|
+
mnqNatsAccountId: data.mnq_nats_account_id,
|
|
9484
9486
|
mnqProjectId: data.mnq_project_id,
|
|
9485
9487
|
mnqRegion: data.mnq_region,
|
|
9486
9488
|
subject: data.subject
|
|
@@ -15202,6 +15204,9 @@ var index$g = /*#__PURE__*/Object.freeze({
|
|
|
15202
15204
|
// This file was automatically generated. DO NOT EDIT.
|
|
15203
15205
|
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
15204
15206
|
|
|
15207
|
+
/** Lists transient statutes of the enum {@link NameStatus}. */
|
|
15208
|
+
const NAME_TRANSIENT_STATUSES = ['queued', 'publishing'];
|
|
15209
|
+
|
|
15205
15210
|
/** Lists transient statutes of the enum {@link PinStatus}. */
|
|
15206
15211
|
const PIN_TRANSIENT_STATUSES = ['queued', 'pinning'];
|
|
15207
15212
|
|
|
@@ -15238,6 +15243,23 @@ const unmarshalPinInfo = data => {
|
|
|
15238
15243
|
url: data.url
|
|
15239
15244
|
};
|
|
15240
15245
|
};
|
|
15246
|
+
const unmarshalName = data => {
|
|
15247
|
+
if (!isJSONObject(data)) {
|
|
15248
|
+
throw new TypeError(`Unmarshalling the type 'Name' failed as data isn't a dictionary.`);
|
|
15249
|
+
}
|
|
15250
|
+
return {
|
|
15251
|
+
createdAt: unmarshalDate(data.created_at),
|
|
15252
|
+
key: data.key,
|
|
15253
|
+
name: data.name,
|
|
15254
|
+
nameId: data.name_id,
|
|
15255
|
+
projectId: data.project_id,
|
|
15256
|
+
region: data.region,
|
|
15257
|
+
status: data.status,
|
|
15258
|
+
tags: data.tags,
|
|
15259
|
+
updatedAt: unmarshalDate(data.updated_at),
|
|
15260
|
+
value: data.value
|
|
15261
|
+
};
|
|
15262
|
+
};
|
|
15241
15263
|
const unmarshalPin = data => {
|
|
15242
15264
|
if (!isJSONObject(data)) {
|
|
15243
15265
|
throw new TypeError(`Unmarshalling the type 'Pin' failed as data isn't a dictionary.`);
|
|
@@ -15267,6 +15289,28 @@ const unmarshalVolume$1 = data => {
|
|
|
15267
15289
|
updatedAt: unmarshalDate(data.updated_at)
|
|
15268
15290
|
};
|
|
15269
15291
|
};
|
|
15292
|
+
const unmarshalExportKeyNameResponse = data => {
|
|
15293
|
+
if (!isJSONObject(data)) {
|
|
15294
|
+
throw new TypeError(`Unmarshalling the type 'ExportKeyNameResponse' failed as data isn't a dictionary.`);
|
|
15295
|
+
}
|
|
15296
|
+
return {
|
|
15297
|
+
createdAt: unmarshalDate(data.created_at),
|
|
15298
|
+
nameId: data.name_id,
|
|
15299
|
+
privateKey: data.private_key,
|
|
15300
|
+
projectId: data.project_id,
|
|
15301
|
+
publicKey: data.public_key,
|
|
15302
|
+
updatedAt: unmarshalDate(data.updated_at)
|
|
15303
|
+
};
|
|
15304
|
+
};
|
|
15305
|
+
const unmarshalListNamesResponse = data => {
|
|
15306
|
+
if (!isJSONObject(data)) {
|
|
15307
|
+
throw new TypeError(`Unmarshalling the type 'ListNamesResponse' failed as data isn't a dictionary.`);
|
|
15308
|
+
}
|
|
15309
|
+
return {
|
|
15310
|
+
names: unmarshalArrayOfObject(data.names, unmarshalName),
|
|
15311
|
+
totalCount: data.total_count
|
|
15312
|
+
};
|
|
15313
|
+
};
|
|
15270
15314
|
const unmarshalListPinsResponse = data => {
|
|
15271
15315
|
if (!isJSONObject(data)) {
|
|
15272
15316
|
throw new TypeError(`Unmarshalling the type 'ListPinsResponse' failed as data isn't a dictionary.`);
|
|
@@ -15314,6 +15358,22 @@ const marshalCreateVolumeRequest = (request, defaults) => ({
|
|
|
15314
15358
|
name: request.name,
|
|
15315
15359
|
project_id: request.projectId ?? defaults.defaultProjectId
|
|
15316
15360
|
});
|
|
15361
|
+
const marshalIpnsApiCreateNameRequest = (request, defaults) => ({
|
|
15362
|
+
name: request.name,
|
|
15363
|
+
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
15364
|
+
value: request.value
|
|
15365
|
+
});
|
|
15366
|
+
const marshalIpnsApiImportKeyNameRequest = (request, defaults) => ({
|
|
15367
|
+
name: request.name,
|
|
15368
|
+
private_key: request.privateKey,
|
|
15369
|
+
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
15370
|
+
value: request.value
|
|
15371
|
+
});
|
|
15372
|
+
const marshalIpnsApiUpdateNameRequest = (request, defaults) => ({
|
|
15373
|
+
name: request.name,
|
|
15374
|
+
tags: request.tags,
|
|
15375
|
+
value: request.value
|
|
15376
|
+
});
|
|
15317
15377
|
const marshalReplacePinRequest = (request, defaults) => ({
|
|
15318
15378
|
cid: request.cid,
|
|
15319
15379
|
name: request.name,
|
|
@@ -15499,12 +15559,115 @@ let API$f = class API extends API$u {
|
|
|
15499
15559
|
});
|
|
15500
15560
|
};
|
|
15501
15561
|
|
|
15562
|
+
/** IPFS Naming service API. */
|
|
15563
|
+
class IpnsAPI extends API$u {
|
|
15564
|
+
/** Lists the available regions of the API. */
|
|
15565
|
+
static LOCALITIES = ['fr-par', 'nl-ams', 'pl-waw'];
|
|
15566
|
+
|
|
15567
|
+
/**
|
|
15568
|
+
* Create a new name. You can use the `ipns key` command to list and generate
|
|
15569
|
+
* more names and their respective keys.
|
|
15570
|
+
*
|
|
15571
|
+
* @param request - The request {@link IpnsApiCreateNameRequest}
|
|
15572
|
+
* @returns A Promise of Name
|
|
15573
|
+
*/
|
|
15574
|
+
createName = request => this.client.fetch({
|
|
15575
|
+
body: JSON.stringify(marshalIpnsApiCreateNameRequest(request, this.client.settings)),
|
|
15576
|
+
headers: jsonContentHeaders$e,
|
|
15577
|
+
method: 'POST',
|
|
15578
|
+
path: `/ipfs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/names`
|
|
15579
|
+
}, unmarshalName);
|
|
15580
|
+
|
|
15581
|
+
/**
|
|
15582
|
+
* Get information about a name. Retrieve information about a specific name.
|
|
15583
|
+
*
|
|
15584
|
+
* @param request - The request {@link IpnsApiGetNameRequest}
|
|
15585
|
+
* @returns A Promise of Name
|
|
15586
|
+
*/
|
|
15587
|
+
getName = request => this.client.fetch({
|
|
15588
|
+
method: 'GET',
|
|
15589
|
+
path: `/ipfs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/names/${validatePathParam('nameId', request.nameId)}`
|
|
15590
|
+
}, unmarshalName);
|
|
15591
|
+
|
|
15592
|
+
/**
|
|
15593
|
+
* Waits for {@link Name} to be in a final state.
|
|
15594
|
+
*
|
|
15595
|
+
* @param request - The request {@link GetNameRequest}
|
|
15596
|
+
* @param options - The waiting options
|
|
15597
|
+
* @returns A Promise of Name
|
|
15598
|
+
*/
|
|
15599
|
+
waitForName = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!NAME_TRANSIENT_STATUSES.includes(res.status))), this.getName, request, options);
|
|
15600
|
+
|
|
15601
|
+
/**
|
|
15602
|
+
* Delete an existing name. Delete a name by its ID.
|
|
15603
|
+
*
|
|
15604
|
+
* @param request - The request {@link IpnsApiDeleteNameRequest}
|
|
15605
|
+
*/
|
|
15606
|
+
deleteName = request => this.client.fetch({
|
|
15607
|
+
method: 'DELETE',
|
|
15608
|
+
path: `/ipfs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/names/${validatePathParam('nameId', request.nameId)}`
|
|
15609
|
+
});
|
|
15610
|
+
pageOfListNames = (request = {}) => this.client.fetch({
|
|
15611
|
+
method: 'GET',
|
|
15612
|
+
path: `/ipfs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/names`,
|
|
15613
|
+
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])
|
|
15614
|
+
}, unmarshalListNamesResponse);
|
|
15615
|
+
|
|
15616
|
+
/**
|
|
15617
|
+
* List all names by a Project ID. Retrieve information about all names from a
|
|
15618
|
+
* Project ID.
|
|
15619
|
+
*
|
|
15620
|
+
* @param request - The request {@link IpnsApiListNamesRequest}
|
|
15621
|
+
* @returns A Promise of ListNamesResponse
|
|
15622
|
+
*/
|
|
15623
|
+
listNames = (request = {}) => enrichForPagination('names', this.pageOfListNames, request);
|
|
15624
|
+
|
|
15625
|
+
/**
|
|
15626
|
+
* Update name information. Update name information (CID, tag, name...).
|
|
15627
|
+
*
|
|
15628
|
+
* @param request - The request {@link IpnsApiUpdateNameRequest}
|
|
15629
|
+
* @returns A Promise of Name
|
|
15630
|
+
*/
|
|
15631
|
+
updateName = request => this.client.fetch({
|
|
15632
|
+
body: JSON.stringify(marshalIpnsApiUpdateNameRequest(request, this.client.settings)),
|
|
15633
|
+
headers: jsonContentHeaders$e,
|
|
15634
|
+
method: 'PATCH',
|
|
15635
|
+
path: `/ipfs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/names/${validatePathParam('nameId', request.nameId)}`
|
|
15636
|
+
}, unmarshalName);
|
|
15637
|
+
|
|
15638
|
+
/**
|
|
15639
|
+
* Export your private key. Export a private key by its ID.
|
|
15640
|
+
*
|
|
15641
|
+
* @param request - The request {@link IpnsApiExportKeyNameRequest}
|
|
15642
|
+
* @returns A Promise of ExportKeyNameResponse
|
|
15643
|
+
*/
|
|
15644
|
+
exportKeyName = request => this.client.fetch({
|
|
15645
|
+
method: 'GET',
|
|
15646
|
+
path: `/ipfs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/names/${validatePathParam('nameId', request.nameId)}/export-key`
|
|
15647
|
+
}, unmarshalExportKeyNameResponse);
|
|
15648
|
+
|
|
15649
|
+
/**
|
|
15650
|
+
* Import your private key. Import a private key.
|
|
15651
|
+
*
|
|
15652
|
+
* @param request - The request {@link IpnsApiImportKeyNameRequest}
|
|
15653
|
+
* @returns A Promise of Name
|
|
15654
|
+
*/
|
|
15655
|
+
importKeyName = request => this.client.fetch({
|
|
15656
|
+
body: JSON.stringify(marshalIpnsApiImportKeyNameRequest(request, this.client.settings)),
|
|
15657
|
+
headers: jsonContentHeaders$e,
|
|
15658
|
+
method: 'POST',
|
|
15659
|
+
path: `/ipfs/v1alpha1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/names/import-key`
|
|
15660
|
+
}, unmarshalName);
|
|
15661
|
+
}
|
|
15662
|
+
|
|
15502
15663
|
// This file was automatically generated. DO NOT EDIT.
|
|
15503
15664
|
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
15504
15665
|
|
|
15505
15666
|
var index_gen$e = /*#__PURE__*/Object.freeze({
|
|
15506
15667
|
__proto__: null,
|
|
15507
15668
|
API: API$f,
|
|
15669
|
+
IpnsAPI: IpnsAPI,
|
|
15670
|
+
NAME_TRANSIENT_STATUSES: NAME_TRANSIENT_STATUSES,
|
|
15508
15671
|
PIN_TRANSIENT_STATUSES: PIN_TRANSIENT_STATUSES
|
|
15509
15672
|
});
|
|
15510
15673
|
|
|
@@ -20372,7 +20535,7 @@ const NatsApiCreateNatsAccountRequest = {
|
|
|
20372
20535
|
};
|
|
20373
20536
|
const NatsApiCreateNatsCredentialsRequest = {
|
|
20374
20537
|
name: {
|
|
20375
|
-
maxLength:
|
|
20538
|
+
maxLength: 500,
|
|
20376
20539
|
minLength: 1
|
|
20377
20540
|
}
|
|
20378
20541
|
};
|
|
@@ -20384,25 +20547,25 @@ const NatsApiUpdateNatsAccountRequest = {
|
|
|
20384
20547
|
};
|
|
20385
20548
|
const SnsApiCreateSnsCredentialsRequest = {
|
|
20386
20549
|
name: {
|
|
20387
|
-
maxLength:
|
|
20550
|
+
maxLength: 500,
|
|
20388
20551
|
minLength: 1
|
|
20389
20552
|
}
|
|
20390
20553
|
};
|
|
20391
20554
|
const SnsApiUpdateSnsCredentialsRequest = {
|
|
20392
20555
|
name: {
|
|
20393
|
-
maxLength:
|
|
20556
|
+
maxLength: 500,
|
|
20394
20557
|
minLength: 1
|
|
20395
20558
|
}
|
|
20396
20559
|
};
|
|
20397
20560
|
const SqsApiCreateSqsCredentialsRequest = {
|
|
20398
20561
|
name: {
|
|
20399
|
-
maxLength:
|
|
20562
|
+
maxLength: 500,
|
|
20400
20563
|
minLength: 1
|
|
20401
20564
|
}
|
|
20402
20565
|
};
|
|
20403
20566
|
const SqsApiUpdateSqsCredentialsRequest = {
|
|
20404
20567
|
name: {
|
|
20405
|
-
maxLength:
|
|
20568
|
+
maxLength: 500,
|
|
20406
20569
|
minLength: 1
|
|
20407
20570
|
}
|
|
20408
20571
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -4269,14 +4269,16 @@ interface Container {
|
|
|
4269
4269
|
region: Region;
|
|
4270
4270
|
}
|
|
4271
4271
|
interface CreateTriggerRequestMnqNatsClientConfig$1 {
|
|
4272
|
-
|
|
4272
|
+
/** @deprecated */
|
|
4273
|
+
mnqNamespaceId?: string;
|
|
4273
4274
|
subject: string;
|
|
4274
4275
|
mnqProjectId: string;
|
|
4275
4276
|
mnqRegion: string;
|
|
4276
4277
|
mnqNatsAccountId: string;
|
|
4277
4278
|
}
|
|
4278
4279
|
interface CreateTriggerRequestMnqSqsClientConfig$1 {
|
|
4279
|
-
|
|
4280
|
+
/** @deprecated */
|
|
4281
|
+
mnqNamespaceId?: string;
|
|
4280
4282
|
queue: string;
|
|
4281
4283
|
mnqProjectId: string;
|
|
4282
4284
|
mnqRegion: string;
|
|
@@ -4457,14 +4459,17 @@ interface Trigger$1 {
|
|
|
4457
4459
|
scwNatsConfig?: TriggerMnqNatsClientConfig$1;
|
|
4458
4460
|
}
|
|
4459
4461
|
interface TriggerMnqNatsClientConfig$1 {
|
|
4460
|
-
|
|
4462
|
+
/** @deprecated */
|
|
4463
|
+
mnqNamespaceId?: string;
|
|
4461
4464
|
subject: string;
|
|
4462
4465
|
mnqProjectId: string;
|
|
4463
4466
|
mnqRegion: string;
|
|
4464
4467
|
mnqCredentialId?: string;
|
|
4468
|
+
mnqNatsAccountId: string;
|
|
4465
4469
|
}
|
|
4466
4470
|
interface TriggerMnqSqsClientConfig$1 {
|
|
4467
|
-
|
|
4471
|
+
/** @deprecated */
|
|
4472
|
+
mnqNamespaceId?: string;
|
|
4468
4473
|
queue: string;
|
|
4469
4474
|
mnqProjectId: string;
|
|
4470
4475
|
mnqRegion: string;
|
|
@@ -9269,14 +9274,16 @@ type TokenStatus = 'unknown' | 'ready' | 'deleting' | 'error' | 'creating';
|
|
|
9269
9274
|
type TriggerInputType = 'unknown_input_type' | 'sqs' | 'scw_sqs' | 'nats' | 'scw_nats';
|
|
9270
9275
|
type TriggerStatus = 'unknown_status' | 'ready' | 'deleting' | 'error' | 'creating' | 'pending';
|
|
9271
9276
|
interface CreateTriggerRequestMnqNatsClientConfig {
|
|
9272
|
-
|
|
9277
|
+
/** @deprecated */
|
|
9278
|
+
mnqNamespaceId?: string;
|
|
9273
9279
|
subject: string;
|
|
9274
9280
|
mnqProjectId: string;
|
|
9275
9281
|
mnqRegion: string;
|
|
9276
9282
|
mnqNatsAccountId: string;
|
|
9277
9283
|
}
|
|
9278
9284
|
interface CreateTriggerRequestMnqSqsClientConfig {
|
|
9279
|
-
|
|
9285
|
+
/** @deprecated */
|
|
9286
|
+
mnqNamespaceId?: string;
|
|
9280
9287
|
queue: string;
|
|
9281
9288
|
mnqProjectId: string;
|
|
9282
9289
|
mnqRegion: string;
|
|
@@ -9534,14 +9541,17 @@ interface Trigger {
|
|
|
9534
9541
|
scwNatsConfig?: TriggerMnqNatsClientConfig;
|
|
9535
9542
|
}
|
|
9536
9543
|
interface TriggerMnqNatsClientConfig {
|
|
9537
|
-
|
|
9544
|
+
/** @deprecated */
|
|
9545
|
+
mnqNamespaceId?: string;
|
|
9538
9546
|
subject: string;
|
|
9539
9547
|
mnqProjectId: string;
|
|
9540
9548
|
mnqRegion: string;
|
|
9541
9549
|
mnqCredentialId?: string;
|
|
9550
|
+
mnqNatsAccountId: string;
|
|
9542
9551
|
}
|
|
9543
9552
|
interface TriggerMnqSqsClientConfig {
|
|
9544
|
-
|
|
9553
|
+
/** @deprecated */
|
|
9554
|
+
mnqNamespaceId?: string;
|
|
9545
9555
|
queue: string;
|
|
9546
9556
|
mnqProjectId: string;
|
|
9547
9557
|
mnqRegion: string;
|
|
@@ -16103,10 +16113,24 @@ declare namespace index$g {
|
|
|
16103
16113
|
export { index_gen$f as v1 };
|
|
16104
16114
|
}
|
|
16105
16115
|
|
|
16116
|
+
type ListNamesRequestOrderBy = 'created_at_asc' | 'created_at_desc';
|
|
16106
16117
|
type ListPinsRequestOrderBy = 'created_at_asc' | 'created_at_desc';
|
|
16107
16118
|
type ListVolumesRequestOrderBy = 'created_at_asc' | 'created_at_desc';
|
|
16119
|
+
type NameStatus = 'unknown_status' | 'queued' | 'publishing' | 'failed' | 'published';
|
|
16108
16120
|
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';
|
|
16109
16121
|
type PinStatus = 'unknown_status' | 'queued' | 'pinning' | 'failed' | 'pinned';
|
|
16122
|
+
interface ExportKeyNameResponse {
|
|
16123
|
+
nameId: string;
|
|
16124
|
+
projectId: string;
|
|
16125
|
+
createdAt?: Date;
|
|
16126
|
+
updatedAt?: Date;
|
|
16127
|
+
publicKey: string;
|
|
16128
|
+
privateKey: string;
|
|
16129
|
+
}
|
|
16130
|
+
interface ListNamesResponse {
|
|
16131
|
+
names: Name[];
|
|
16132
|
+
totalCount: number;
|
|
16133
|
+
}
|
|
16110
16134
|
interface ListPinsResponse {
|
|
16111
16135
|
totalCount: number;
|
|
16112
16136
|
pins: Pin[];
|
|
@@ -16115,6 +16139,18 @@ interface ListVolumesResponse {
|
|
|
16115
16139
|
volumes: Volume$1[];
|
|
16116
16140
|
totalCount: number;
|
|
16117
16141
|
}
|
|
16142
|
+
interface Name {
|
|
16143
|
+
nameId: string;
|
|
16144
|
+
projectId: string;
|
|
16145
|
+
createdAt?: Date;
|
|
16146
|
+
updatedAt?: Date;
|
|
16147
|
+
tags: string[];
|
|
16148
|
+
name: string;
|
|
16149
|
+
key: string;
|
|
16150
|
+
status: NameStatus;
|
|
16151
|
+
value: string;
|
|
16152
|
+
region: Region;
|
|
16153
|
+
}
|
|
16118
16154
|
interface Pin {
|
|
16119
16155
|
pinId: string;
|
|
16120
16156
|
status: PinStatus;
|
|
@@ -16308,6 +16344,93 @@ type DeletePinRequest = {
|
|
|
16308
16344
|
/** Volume ID. */
|
|
16309
16345
|
volumeId: string;
|
|
16310
16346
|
};
|
|
16347
|
+
type IpnsApiCreateNameRequest = {
|
|
16348
|
+
/**
|
|
16349
|
+
* Region to target. If none is passed will use default region from the
|
|
16350
|
+
* config.
|
|
16351
|
+
*/
|
|
16352
|
+
region?: Region;
|
|
16353
|
+
/** Project ID. */
|
|
16354
|
+
projectId?: string;
|
|
16355
|
+
/** Name for your records. */
|
|
16356
|
+
name: string;
|
|
16357
|
+
/** Value you want to associate with your records, CID or IPNS key. */
|
|
16358
|
+
value: string;
|
|
16359
|
+
};
|
|
16360
|
+
type IpnsApiGetNameRequest = {
|
|
16361
|
+
/**
|
|
16362
|
+
* Region to target. If none is passed will use default region from the
|
|
16363
|
+
* config.
|
|
16364
|
+
*/
|
|
16365
|
+
region?: Region;
|
|
16366
|
+
/** Name ID whose information you want to retrieve. */
|
|
16367
|
+
nameId: string;
|
|
16368
|
+
};
|
|
16369
|
+
type IpnsApiDeleteNameRequest = {
|
|
16370
|
+
/**
|
|
16371
|
+
* Region to target. If none is passed will use default region from the
|
|
16372
|
+
* config.
|
|
16373
|
+
*/
|
|
16374
|
+
region?: Region;
|
|
16375
|
+
/** Name ID you wish to delete. */
|
|
16376
|
+
nameId: string;
|
|
16377
|
+
};
|
|
16378
|
+
type IpnsApiListNamesRequest = {
|
|
16379
|
+
/**
|
|
16380
|
+
* Region to target. If none is passed will use default region from the
|
|
16381
|
+
* config.
|
|
16382
|
+
*/
|
|
16383
|
+
region?: Region;
|
|
16384
|
+
/** Project ID. */
|
|
16385
|
+
projectId?: string;
|
|
16386
|
+
/** Organization ID. */
|
|
16387
|
+
organizationId?: string;
|
|
16388
|
+
/** Sort the order of the returned names. */
|
|
16389
|
+
orderBy?: ListNamesRequestOrderBy;
|
|
16390
|
+
/** Page number. */
|
|
16391
|
+
page?: number;
|
|
16392
|
+
/** Maximum number of names to return per page. */
|
|
16393
|
+
pageSize?: number;
|
|
16394
|
+
};
|
|
16395
|
+
type IpnsApiUpdateNameRequest = {
|
|
16396
|
+
/**
|
|
16397
|
+
* Region to target. If none is passed will use default region from the
|
|
16398
|
+
* config.
|
|
16399
|
+
*/
|
|
16400
|
+
region?: Region;
|
|
16401
|
+
/** Name ID you wish to update. */
|
|
16402
|
+
nameId: string;
|
|
16403
|
+
/** New name you want to associate with your record. */
|
|
16404
|
+
name?: string;
|
|
16405
|
+
/** New tags you want to associate with your record. */
|
|
16406
|
+
tags?: string[];
|
|
16407
|
+
/** Value you want to associate with your records, CID or IPNS key. */
|
|
16408
|
+
value?: string;
|
|
16409
|
+
};
|
|
16410
|
+
type IpnsApiExportKeyNameRequest = {
|
|
16411
|
+
/**
|
|
16412
|
+
* Region to target. If none is passed will use default region from the
|
|
16413
|
+
* config.
|
|
16414
|
+
*/
|
|
16415
|
+
region?: Region;
|
|
16416
|
+
/** Name ID whose keys you want to export. */
|
|
16417
|
+
nameId: string;
|
|
16418
|
+
};
|
|
16419
|
+
type IpnsApiImportKeyNameRequest = {
|
|
16420
|
+
/**
|
|
16421
|
+
* Region to target. If none is passed will use default region from the
|
|
16422
|
+
* config.
|
|
16423
|
+
*/
|
|
16424
|
+
region?: Region;
|
|
16425
|
+
/** Project ID. */
|
|
16426
|
+
projectId?: string;
|
|
16427
|
+
/** Name for your records. */
|
|
16428
|
+
name: string;
|
|
16429
|
+
/** Base64 private key. */
|
|
16430
|
+
privateKey: string;
|
|
16431
|
+
/** Value you want to associate with your records, CID or IPNS key. */
|
|
16432
|
+
value: string;
|
|
16433
|
+
};
|
|
16311
16434
|
|
|
16312
16435
|
/** IPFS Pinning service API. */
|
|
16313
16436
|
declare class API$f extends API$u {
|
|
@@ -16423,7 +16546,76 @@ declare class API$f extends API$u {
|
|
|
16423
16546
|
*/
|
|
16424
16547
|
deletePin: (request: Readonly<DeletePinRequest>) => Promise<void>;
|
|
16425
16548
|
}
|
|
16549
|
+
/** IPFS Naming service API. */
|
|
16550
|
+
declare class IpnsAPI extends API$u {
|
|
16551
|
+
/** Lists the available regions of the API. */
|
|
16552
|
+
static readonly LOCALITIES: Region[];
|
|
16553
|
+
/**
|
|
16554
|
+
* Create a new name. You can use the `ipns key` command to list and generate
|
|
16555
|
+
* more names and their respective keys.
|
|
16556
|
+
*
|
|
16557
|
+
* @param request - The request {@link IpnsApiCreateNameRequest}
|
|
16558
|
+
* @returns A Promise of Name
|
|
16559
|
+
*/
|
|
16560
|
+
createName: (request: Readonly<IpnsApiCreateNameRequest>) => Promise<Name>;
|
|
16561
|
+
/**
|
|
16562
|
+
* Get information about a name. Retrieve information about a specific name.
|
|
16563
|
+
*
|
|
16564
|
+
* @param request - The request {@link IpnsApiGetNameRequest}
|
|
16565
|
+
* @returns A Promise of Name
|
|
16566
|
+
*/
|
|
16567
|
+
getName: (request: Readonly<IpnsApiGetNameRequest>) => Promise<Name>;
|
|
16568
|
+
/**
|
|
16569
|
+
* Waits for {@link Name} to be in a final state.
|
|
16570
|
+
*
|
|
16571
|
+
* @param request - The request {@link GetNameRequest}
|
|
16572
|
+
* @param options - The waiting options
|
|
16573
|
+
* @returns A Promise of Name
|
|
16574
|
+
*/
|
|
16575
|
+
waitForName: (request: Readonly<IpnsApiGetNameRequest>, options?: Readonly<WaitForOptions<Name>>) => Promise<Name>;
|
|
16576
|
+
/**
|
|
16577
|
+
* Delete an existing name. Delete a name by its ID.
|
|
16578
|
+
*
|
|
16579
|
+
* @param request - The request {@link IpnsApiDeleteNameRequest}
|
|
16580
|
+
*/
|
|
16581
|
+
deleteName: (request: Readonly<IpnsApiDeleteNameRequest>) => Promise<void>;
|
|
16582
|
+
protected pageOfListNames: (request?: Readonly<IpnsApiListNamesRequest>) => Promise<ListNamesResponse>;
|
|
16583
|
+
/**
|
|
16584
|
+
* List all names by a Project ID. Retrieve information about all names from a
|
|
16585
|
+
* Project ID.
|
|
16586
|
+
*
|
|
16587
|
+
* @param request - The request {@link IpnsApiListNamesRequest}
|
|
16588
|
+
* @returns A Promise of ListNamesResponse
|
|
16589
|
+
*/
|
|
16590
|
+
listNames: (request?: Readonly<IpnsApiListNamesRequest>) => Promise<ListNamesResponse> & {
|
|
16591
|
+
all: () => Promise<Name[]>;
|
|
16592
|
+
[Symbol.asyncIterator]: () => AsyncGenerator<Name[], void, void>;
|
|
16593
|
+
};
|
|
16594
|
+
/**
|
|
16595
|
+
* Update name information. Update name information (CID, tag, name...).
|
|
16596
|
+
*
|
|
16597
|
+
* @param request - The request {@link IpnsApiUpdateNameRequest}
|
|
16598
|
+
* @returns A Promise of Name
|
|
16599
|
+
*/
|
|
16600
|
+
updateName: (request: Readonly<IpnsApiUpdateNameRequest>) => Promise<Name>;
|
|
16601
|
+
/**
|
|
16602
|
+
* Export your private key. Export a private key by its ID.
|
|
16603
|
+
*
|
|
16604
|
+
* @param request - The request {@link IpnsApiExportKeyNameRequest}
|
|
16605
|
+
* @returns A Promise of ExportKeyNameResponse
|
|
16606
|
+
*/
|
|
16607
|
+
exportKeyName: (request: Readonly<IpnsApiExportKeyNameRequest>) => Promise<ExportKeyNameResponse>;
|
|
16608
|
+
/**
|
|
16609
|
+
* Import your private key. Import a private key.
|
|
16610
|
+
*
|
|
16611
|
+
* @param request - The request {@link IpnsApiImportKeyNameRequest}
|
|
16612
|
+
* @returns A Promise of Name
|
|
16613
|
+
*/
|
|
16614
|
+
importKeyName: (request: Readonly<IpnsApiImportKeyNameRequest>) => Promise<Name>;
|
|
16615
|
+
}
|
|
16426
16616
|
|
|
16617
|
+
/** Lists transient statutes of the enum {@link NameStatus}. */
|
|
16618
|
+
declare const NAME_TRANSIENT_STATUSES: NameStatus[];
|
|
16427
16619
|
/** Lists transient statutes of the enum {@link PinStatus}. */
|
|
16428
16620
|
declare const PIN_TRANSIENT_STATUSES: PinStatus[];
|
|
16429
16621
|
|
|
@@ -16432,14 +16624,29 @@ type index_gen$e_CreatePinByURLRequest = CreatePinByURLRequest;
|
|
|
16432
16624
|
type index_gen$e_CreateVolumeRequest = CreateVolumeRequest;
|
|
16433
16625
|
type index_gen$e_DeletePinRequest = DeletePinRequest;
|
|
16434
16626
|
type index_gen$e_DeleteVolumeRequest = DeleteVolumeRequest;
|
|
16627
|
+
type index_gen$e_ExportKeyNameResponse = ExportKeyNameResponse;
|
|
16435
16628
|
type index_gen$e_GetPinRequest = GetPinRequest;
|
|
16436
16629
|
type index_gen$e_GetVolumeRequest = GetVolumeRequest;
|
|
16630
|
+
type index_gen$e_IpnsAPI = IpnsAPI;
|
|
16631
|
+
declare const index_gen$e_IpnsAPI: typeof IpnsAPI;
|
|
16632
|
+
type index_gen$e_IpnsApiCreateNameRequest = IpnsApiCreateNameRequest;
|
|
16633
|
+
type index_gen$e_IpnsApiDeleteNameRequest = IpnsApiDeleteNameRequest;
|
|
16634
|
+
type index_gen$e_IpnsApiExportKeyNameRequest = IpnsApiExportKeyNameRequest;
|
|
16635
|
+
type index_gen$e_IpnsApiGetNameRequest = IpnsApiGetNameRequest;
|
|
16636
|
+
type index_gen$e_IpnsApiImportKeyNameRequest = IpnsApiImportKeyNameRequest;
|
|
16637
|
+
type index_gen$e_IpnsApiListNamesRequest = IpnsApiListNamesRequest;
|
|
16638
|
+
type index_gen$e_IpnsApiUpdateNameRequest = IpnsApiUpdateNameRequest;
|
|
16639
|
+
type index_gen$e_ListNamesRequestOrderBy = ListNamesRequestOrderBy;
|
|
16640
|
+
type index_gen$e_ListNamesResponse = ListNamesResponse;
|
|
16437
16641
|
type index_gen$e_ListPinsRequest = ListPinsRequest;
|
|
16438
16642
|
type index_gen$e_ListPinsRequestOrderBy = ListPinsRequestOrderBy;
|
|
16439
16643
|
type index_gen$e_ListPinsResponse = ListPinsResponse;
|
|
16440
16644
|
type index_gen$e_ListVolumesRequest = ListVolumesRequest;
|
|
16441
16645
|
type index_gen$e_ListVolumesRequestOrderBy = ListVolumesRequestOrderBy;
|
|
16442
16646
|
type index_gen$e_ListVolumesResponse = ListVolumesResponse;
|
|
16647
|
+
declare const index_gen$e_NAME_TRANSIENT_STATUSES: typeof NAME_TRANSIENT_STATUSES;
|
|
16648
|
+
type index_gen$e_Name = Name;
|
|
16649
|
+
type index_gen$e_NameStatus = NameStatus;
|
|
16443
16650
|
declare const index_gen$e_PIN_TRANSIENT_STATUSES: typeof PIN_TRANSIENT_STATUSES;
|
|
16444
16651
|
type index_gen$e_Pin = Pin;
|
|
16445
16652
|
type index_gen$e_PinCID = PinCID;
|
|
@@ -16452,7 +16659,7 @@ type index_gen$e_ReplacePinRequest = ReplacePinRequest;
|
|
|
16452
16659
|
type index_gen$e_ReplacePinResponse = ReplacePinResponse;
|
|
16453
16660
|
type index_gen$e_UpdateVolumeRequest = UpdateVolumeRequest;
|
|
16454
16661
|
declare namespace index_gen$e {
|
|
16455
|
-
export { API$f as API, type index_gen$e_CreatePinByCIDRequest as CreatePinByCIDRequest, type index_gen$e_CreatePinByURLRequest as CreatePinByURLRequest, type index_gen$e_CreateVolumeRequest as CreateVolumeRequest, type index_gen$e_DeletePinRequest as DeletePinRequest, type index_gen$e_DeleteVolumeRequest as DeleteVolumeRequest, type index_gen$e_GetPinRequest as GetPinRequest, type index_gen$e_GetVolumeRequest as GetVolumeRequest, type index_gen$e_ListPinsRequest as ListPinsRequest, type index_gen$e_ListPinsRequestOrderBy as ListPinsRequestOrderBy, type index_gen$e_ListPinsResponse as ListPinsResponse, type index_gen$e_ListVolumesRequest as ListVolumesRequest, type index_gen$e_ListVolumesRequestOrderBy as ListVolumesRequestOrderBy, type index_gen$e_ListVolumesResponse as ListVolumesResponse, index_gen$e_PIN_TRANSIENT_STATUSES as PIN_TRANSIENT_STATUSES, type index_gen$e_Pin as Pin, type index_gen$e_PinCID as PinCID, type index_gen$e_PinCIDMeta as PinCIDMeta, type index_gen$e_PinDetails as PinDetails, type index_gen$e_PinInfo as PinInfo, type index_gen$e_PinOptions as PinOptions, type index_gen$e_PinStatus as PinStatus, type index_gen$e_ReplacePinRequest as ReplacePinRequest, type index_gen$e_ReplacePinResponse as ReplacePinResponse, type index_gen$e_UpdateVolumeRequest as UpdateVolumeRequest, type Volume$1 as Volume };
|
|
16662
|
+
export { API$f as API, type index_gen$e_CreatePinByCIDRequest as CreatePinByCIDRequest, type index_gen$e_CreatePinByURLRequest as CreatePinByURLRequest, type index_gen$e_CreateVolumeRequest as CreateVolumeRequest, type index_gen$e_DeletePinRequest as DeletePinRequest, type index_gen$e_DeleteVolumeRequest as DeleteVolumeRequest, type index_gen$e_ExportKeyNameResponse as ExportKeyNameResponse, type index_gen$e_GetPinRequest as GetPinRequest, type index_gen$e_GetVolumeRequest as GetVolumeRequest, index_gen$e_IpnsAPI as IpnsAPI, type index_gen$e_IpnsApiCreateNameRequest as IpnsApiCreateNameRequest, type index_gen$e_IpnsApiDeleteNameRequest as IpnsApiDeleteNameRequest, type index_gen$e_IpnsApiExportKeyNameRequest as IpnsApiExportKeyNameRequest, type index_gen$e_IpnsApiGetNameRequest as IpnsApiGetNameRequest, type index_gen$e_IpnsApiImportKeyNameRequest as IpnsApiImportKeyNameRequest, type index_gen$e_IpnsApiListNamesRequest as IpnsApiListNamesRequest, type index_gen$e_IpnsApiUpdateNameRequest as IpnsApiUpdateNameRequest, type index_gen$e_ListNamesRequestOrderBy as ListNamesRequestOrderBy, type index_gen$e_ListNamesResponse as ListNamesResponse, type index_gen$e_ListPinsRequest as ListPinsRequest, type index_gen$e_ListPinsRequestOrderBy as ListPinsRequestOrderBy, type index_gen$e_ListPinsResponse as ListPinsResponse, type index_gen$e_ListVolumesRequest as ListVolumesRequest, type index_gen$e_ListVolumesRequestOrderBy as ListVolumesRequestOrderBy, type index_gen$e_ListVolumesResponse as ListVolumesResponse, index_gen$e_NAME_TRANSIENT_STATUSES as NAME_TRANSIENT_STATUSES, type index_gen$e_Name as Name, type index_gen$e_NameStatus as NameStatus, index_gen$e_PIN_TRANSIENT_STATUSES as PIN_TRANSIENT_STATUSES, type index_gen$e_Pin as Pin, type index_gen$e_PinCID as PinCID, type index_gen$e_PinCIDMeta as PinCIDMeta, type index_gen$e_PinDetails as PinDetails, type index_gen$e_PinInfo as PinInfo, type index_gen$e_PinOptions as PinOptions, type index_gen$e_PinStatus as PinStatus, type index_gen$e_ReplacePinRequest as ReplacePinRequest, type index_gen$e_ReplacePinResponse as ReplacePinResponse, type index_gen$e_UpdateVolumeRequest as UpdateVolumeRequest, type Volume$1 as Volume };
|
|
16456
16663
|
}
|
|
16457
16664
|
|
|
16458
16665
|
declare namespace index$f {
|
package/dist/scw/constants.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.37.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": "
|
|
38
|
+
"gitHead": "75461bb17b20476aa54a3946ca8db8f48d3e454d"
|
|
39
39
|
}
|