@scaleway/sdk 2.20.0 → 2.21.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/api.gen.js +1 -19
- package/dist/api/container/v1beta1/marshalling.gen.js +1 -23
- package/dist/api/domain/v2beta1/marshalling.gen.js +3 -0
- package/dist/api/function/v1beta1/api.gen.js +1 -19
- package/dist/api/function/v1beta1/marshalling.gen.js +1 -23
- package/dist/api/marketplace/index.js +2 -4
- package/dist/api/tem/v1alpha1/marshalling.gen.js +18 -0
- package/dist/index.cjs +134 -303
- package/dist/index.d.ts +707 -873
- package/dist/scw/constants.js +1 -1
- package/package.json +2 -2
- package/dist/api/marketplace/v1/api.gen.js +0 -36
- package/dist/api/marketplace/v1/index.gen.js +0 -4
- package/dist/api/marketplace/v1/marshalling.gen.js +0 -75
package/dist/scw/constants.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.21.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": "21c75aaf5f13e33d23e0e3be9fa1048396dbdf2a"
|
|
39
39
|
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { API as API$1 } from '../../../scw/api.js';
|
|
2
|
-
import { urlParams, validatePathParam } from '../../../helpers/marshalling.js';
|
|
3
|
-
import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
|
|
4
|
-
import { unmarshalListImagesResponse, unmarshalGetImageResponse } from './marshalling.gen.js';
|
|
5
|
-
|
|
6
|
-
// This file was automatically generated. DO NOT EDIT.
|
|
7
|
-
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
8
|
-
/** Marketplace API. */
|
|
9
|
-
class API extends API$1 {
|
|
10
|
-
pageOfListImages = (request = {}) => this.client.fetch({
|
|
11
|
-
method: 'GET',
|
|
12
|
-
path: `/marketplace/v1/images`,
|
|
13
|
-
urlParams: urlParams(['page', request.page], ['per_page', request.perPage ?? this.client.settings.defaultPageSize])
|
|
14
|
-
}, unmarshalListImagesResponse);
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* List marketplace images.
|
|
18
|
-
*
|
|
19
|
-
* @param request - The request {@link ListImagesRequest}
|
|
20
|
-
* @returns A Promise of ListImagesResponse
|
|
21
|
-
*/
|
|
22
|
-
listImages = (request = {}) => enrichForPagination('images', this.pageOfListImages, request);
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Get a specific marketplace image.
|
|
26
|
-
*
|
|
27
|
-
* @param request - The request {@link GetImageRequest}
|
|
28
|
-
* @returns A Promise of GetImageResponse
|
|
29
|
-
*/
|
|
30
|
-
getImage = request => this.client.fetch({
|
|
31
|
-
method: 'GET',
|
|
32
|
-
path: `/marketplace/v1/images/${validatePathParam('imageId', request.imageId)}`
|
|
33
|
-
}, unmarshalGetImageResponse);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export { API };
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { isJSONObject } from '../../../helpers/json.js';
|
|
2
|
-
import { unmarshalArrayOfObject, unmarshalDate } from '../../../helpers/marshalling.js';
|
|
3
|
-
|
|
4
|
-
// This file was automatically generated. DO NOT EDIT.
|
|
5
|
-
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
6
|
-
const unmarshalLocalImage = data => {
|
|
7
|
-
if (!isJSONObject(data)) {
|
|
8
|
-
throw new TypeError(`Unmarshalling the type 'LocalImage' failed as data isn't a dictionary.`);
|
|
9
|
-
}
|
|
10
|
-
return {
|
|
11
|
-
arch: data.arch,
|
|
12
|
-
compatibleCommercialTypes: data.compatible_commercial_types,
|
|
13
|
-
id: data.id,
|
|
14
|
-
zone: data.zone
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
const unmarshalOrganization = data => {
|
|
18
|
-
if (!isJSONObject(data)) {
|
|
19
|
-
throw new TypeError(`Unmarshalling the type 'Organization' failed as data isn't a dictionary.`);
|
|
20
|
-
}
|
|
21
|
-
return {
|
|
22
|
-
id: data.id,
|
|
23
|
-
name: data.name
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
const unmarshalVersion = data => {
|
|
27
|
-
if (!isJSONObject(data)) {
|
|
28
|
-
throw new TypeError(`Unmarshalling the type 'Version' failed as data isn't a dictionary.`);
|
|
29
|
-
}
|
|
30
|
-
return {
|
|
31
|
-
creationDate: unmarshalDate(data.creation_date),
|
|
32
|
-
id: data.id,
|
|
33
|
-
localImages: unmarshalArrayOfObject(data.local_images, unmarshalLocalImage),
|
|
34
|
-
modificationDate: unmarshalDate(data.modification_date),
|
|
35
|
-
name: data.name
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
const unmarshalImage = data => {
|
|
39
|
-
if (!isJSONObject(data)) {
|
|
40
|
-
throw new TypeError(`Unmarshalling the type 'Image' failed as data isn't a dictionary.`);
|
|
41
|
-
}
|
|
42
|
-
return {
|
|
43
|
-
categories: data.categories,
|
|
44
|
-
creationDate: unmarshalDate(data.creation_date),
|
|
45
|
-
currentPublicVersion: data.current_public_version,
|
|
46
|
-
description: data.description,
|
|
47
|
-
id: data.id,
|
|
48
|
-
label: data.label,
|
|
49
|
-
logo: data.logo,
|
|
50
|
-
modificationDate: unmarshalDate(data.modification_date),
|
|
51
|
-
name: data.name,
|
|
52
|
-
organization: data.organization ? unmarshalOrganization(data.organization) : undefined,
|
|
53
|
-
validUntil: unmarshalDate(data.valid_until),
|
|
54
|
-
versions: unmarshalArrayOfObject(data.versions, unmarshalVersion)
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
const unmarshalGetImageResponse = data => {
|
|
58
|
-
if (!isJSONObject(data)) {
|
|
59
|
-
throw new TypeError(`Unmarshalling the type 'GetImageResponse' failed as data isn't a dictionary.`);
|
|
60
|
-
}
|
|
61
|
-
return {
|
|
62
|
-
image: data.image ? unmarshalImage(data.image) : undefined
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
const unmarshalListImagesResponse = data => {
|
|
66
|
-
if (!isJSONObject(data)) {
|
|
67
|
-
throw new TypeError(`Unmarshalling the type 'ListImagesResponse' failed as data isn't a dictionary.`);
|
|
68
|
-
}
|
|
69
|
-
return {
|
|
70
|
-
images: unmarshalArrayOfObject(data.images, unmarshalImage),
|
|
71
|
-
totalCount: data.total_count
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
export { unmarshalGetImageResponse, unmarshalListImagesResponse };
|