@scaleway/sdk 1.14.0 → 1.15.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/account/v2/api.gen.js +77 -60
- package/dist/api/applesilicon/v1alpha1/api.gen.js +174 -152
- package/dist/api/baremetal/v1/api.gen.js +434 -378
- package/dist/api/baremetal/v1/api.utils.js +19 -22
- package/dist/api/billing/v2alpha1/api.gen.js +21 -17
- package/dist/api/cockpit/v1beta1/api.gen.js +308 -232
- package/dist/api/container/v1beta1/api.gen.js +384 -337
- package/dist/api/domain/v2beta1/api.gen.js +754 -668
- package/dist/api/flexibleip/v1alpha1/api.gen.js +164 -151
- package/dist/api/function/v1beta1/api.gen.js +467 -407
- package/dist/api/iam/v1alpha1/api.gen.js +641 -557
- package/dist/api/instance/v1/api.gen.js +802 -677
- package/dist/api/instance/v1/api.utils.js +337 -325
- package/dist/api/instance/v1/marshalling.gen.js +2 -1
- package/dist/api/iot/v1/api.gen.js +508 -452
- package/dist/api/ipfs/index.js +2 -0
- package/dist/api/ipfs/v1alpha1/api.gen.js +197 -0
- package/dist/api/ipfs/v1alpha1/content.gen.js +7 -0
- package/dist/api/ipfs/v1alpha1/index.gen.js +5 -0
- package/dist/api/ipfs/v1alpha1/marshalling.gen.js +125 -0
- package/dist/api/k8s/v1/api.gen.js +403 -342
- package/dist/api/k8s/v1/api.utils.js +7 -10
- package/dist/api/k8s/v1/marshalling.gen.js +19 -1
- package/dist/api/k8s/v1/validation-rules.gen.js +10 -1
- package/dist/api/lb/v1/api.gen.js +1501 -1363
- package/dist/api/lb/v1/api.utils.js +71 -75
- package/dist/api/lb/v1/marshalling.gen.js +6 -0
- package/dist/api/marketplace/v1/api.gen.js +35 -32
- package/dist/api/marketplace/v2/api.gen.js +117 -102
- package/dist/api/mnq/v1alpha1/api.gen.js +154 -137
- package/dist/api/rdb/v1/api.gen.js +897 -819
- package/dist/api/redis/v1/api.gen.js +358 -333
- package/dist/api/registry/v1/api.gen.js +211 -189
- package/dist/api/secret/v1alpha1/api.gen.js +265 -245
- package/dist/api/tem/v1alpha1/api.gen.js +182 -147
- package/dist/api/tem/v1alpha1/marshalling.gen.js +32 -1
- package/dist/api/test/v1/api.gen.js +116 -104
- package/dist/api/vpc/v1/api.gen.js +74 -65
- package/dist/api/vpc/v2/api.gen.js +200 -178
- package/dist/api/vpc/v2/marshalling.gen.js +1 -0
- package/dist/api/vpcgw/v1/api.gen.js +575 -501
- package/dist/api/webhosting/v1alpha1/api.gen.js +127 -117
- package/dist/index.cjs +732 -311
- package/dist/index.d.ts +2040 -1540
- package/dist/index.js +28 -26
- package/dist/internal/logger/console-logger.js +4 -5
- package/dist/scw/constants.js +1 -1
- package/dist/scw/errors/scw-error.js +2 -2
- package/package.json +2 -2
|
@@ -3,83 +3,79 @@ import { API, ZonedAPI } from './api.gen.js';
|
|
|
3
3
|
import { PRIVATE_NETWORK_TRANSIENT_STATUSES, LB_TRANSIENT_STATUSES, INSTANCE_TRANSIENT_STATUSES } from './content.gen.js';
|
|
4
4
|
|
|
5
5
|
class LbV1UtilsAPI extends API {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}, createExponentialBackoffStrategy(options?.minDelay ?? 1, options?.maxDelay ?? 30), options?.timeout);
|
|
42
|
-
}
|
|
6
|
+
/**
|
|
7
|
+
* Waits for all private networks of a load balancer to be in a final state.
|
|
8
|
+
*
|
|
9
|
+
* @param request - The request {@link WaitForLbPrivateNetworksRequest}
|
|
10
|
+
* @param options - The waiting options
|
|
11
|
+
* @returns A Promise of ListLbPrivateNetworksResponse
|
|
12
|
+
*/
|
|
13
|
+
waitForLbPrivateNetworks = (request, options) => tryAtIntervals(async () => {
|
|
14
|
+
const value = await this.listLbPrivateNetworks({
|
|
15
|
+
lbId: request.lbId,
|
|
16
|
+
region: request.region
|
|
17
|
+
}).all().then(list => ({
|
|
18
|
+
privateNetwork: list,
|
|
19
|
+
totalCount: list.length
|
|
20
|
+
}));
|
|
21
|
+
return {
|
|
22
|
+
done: value.privateNetwork.find(elt => PRIVATE_NETWORK_TRANSIENT_STATUSES.includes(elt.status)) === undefined,
|
|
23
|
+
value
|
|
24
|
+
};
|
|
25
|
+
}, createExponentialBackoffStrategy(options?.minDelay ?? 1, options?.maxDelay ?? 30), options?.timeout);
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Waits for all instances of a load balancer to be in a final state.
|
|
29
|
+
*
|
|
30
|
+
* @param request - The request {@link GetLbRequest}
|
|
31
|
+
* @param options - The waiting options
|
|
32
|
+
* @returns A Promise of Lb
|
|
33
|
+
*/
|
|
34
|
+
waitForLbInstances = (request, options) => tryAtIntervals(async () => {
|
|
35
|
+
const value = await this.getLb(request);
|
|
36
|
+
return {
|
|
37
|
+
done: !LB_TRANSIENT_STATUSES.includes(value.status) && value.instances.find(elt => INSTANCE_TRANSIENT_STATUSES.includes(elt.status)) === undefined,
|
|
38
|
+
value
|
|
39
|
+
};
|
|
40
|
+
}, createExponentialBackoffStrategy(options?.minDelay ?? 1, options?.maxDelay ?? 30), options?.timeout);
|
|
43
41
|
}
|
|
44
42
|
class LbZonedV1UtilsAPI extends ZonedAPI {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}, createExponentialBackoffStrategy(options?.minDelay ?? 1, options?.maxDelay ?? 30), options?.timeout);
|
|
82
|
-
}
|
|
43
|
+
/**
|
|
44
|
+
* Waits for all private networks of a (zoned) load balancer to be in a final
|
|
45
|
+
* state.
|
|
46
|
+
*
|
|
47
|
+
* @param request - The request {@link ZonedWaitForLbPrivateNetworksRequest}
|
|
48
|
+
* @param options - The waiting options
|
|
49
|
+
* @returns A Promise of ListLbPrivateNetworksResponse
|
|
50
|
+
*/
|
|
51
|
+
waitForLbPrivateNetworks = (request, options) => tryAtIntervals(async () => {
|
|
52
|
+
const value = await this.listLbPrivateNetworks({
|
|
53
|
+
lbId: request.lbId,
|
|
54
|
+
zone: request.zone
|
|
55
|
+
}).all().then(list => ({
|
|
56
|
+
privateNetwork: list,
|
|
57
|
+
totalCount: list.length
|
|
58
|
+
}));
|
|
59
|
+
return {
|
|
60
|
+
done: value.privateNetwork.find(elt => PRIVATE_NETWORK_TRANSIENT_STATUSES.includes(elt.status)) === undefined,
|
|
61
|
+
value
|
|
62
|
+
};
|
|
63
|
+
}, createExponentialBackoffStrategy(options?.minDelay ?? 1, options?.maxDelay ?? 30), options?.timeout);
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Waits for all instances of a (zoned) load balancer to be in a final state.
|
|
67
|
+
*
|
|
68
|
+
* @param request - The request {@link GetLbRequest}
|
|
69
|
+
* @param options - The waiting options
|
|
70
|
+
* @returns A Promise of Lb
|
|
71
|
+
*/
|
|
72
|
+
waitForLbInstances = (request, options) => tryAtIntervals(async () => {
|
|
73
|
+
const value = await this.getLb(request);
|
|
74
|
+
return {
|
|
75
|
+
done: !LB_TRANSIENT_STATUSES.includes(value.status) && value.instances.find(elt => INSTANCE_TRANSIENT_STATUSES.includes(elt.status)) === undefined,
|
|
76
|
+
value
|
|
77
|
+
};
|
|
78
|
+
}, createExponentialBackoffStrategy(options?.minDelay ?? 1, options?.maxDelay ?? 30), options?.timeout);
|
|
83
79
|
}
|
|
84
80
|
|
|
85
81
|
export { LbV1UtilsAPI, LbZonedV1UtilsAPI };
|
|
@@ -646,6 +646,7 @@ const marshalCreateFrontendRequest = (request, defaults) => ({
|
|
|
646
646
|
timeout_client: request.timeoutClient
|
|
647
647
|
});
|
|
648
648
|
const marshalCreateIpRequest = (request, defaults) => ({
|
|
649
|
+
is_ipv6: request.isIpv6,
|
|
649
650
|
reverse: request.reverse,
|
|
650
651
|
...resolveOneOf([{
|
|
651
652
|
default: defaults.defaultProjectId,
|
|
@@ -658,8 +659,10 @@ const marshalCreateIpRequest = (request, defaults) => ({
|
|
|
658
659
|
}])
|
|
659
660
|
});
|
|
660
661
|
const marshalCreateLbRequest = (request, defaults) => ({
|
|
662
|
+
assign_flexible_ip: request.assignFlexibleIp,
|
|
661
663
|
description: request.description,
|
|
662
664
|
ip_id: request.ipId,
|
|
665
|
+
ip_ids: request.ipIds,
|
|
663
666
|
name: request.name || randomName('lb'),
|
|
664
667
|
ssl_compatibility_level: request.sslCompatibilityLevel ?? 'ssl_compatibility_level_unknown',
|
|
665
668
|
tags: request.tags,
|
|
@@ -868,6 +871,7 @@ const marshalZonedApiCreateFrontendRequest = (request, defaults) => ({
|
|
|
868
871
|
timeout_client: request.timeoutClient
|
|
869
872
|
});
|
|
870
873
|
const marshalZonedApiCreateIpRequest = (request, defaults) => ({
|
|
874
|
+
is_ipv6: request.isIpv6,
|
|
871
875
|
reverse: request.reverse,
|
|
872
876
|
...resolveOneOf([{
|
|
873
877
|
default: defaults.defaultProjectId,
|
|
@@ -880,8 +884,10 @@ const marshalZonedApiCreateIpRequest = (request, defaults) => ({
|
|
|
880
884
|
}])
|
|
881
885
|
});
|
|
882
886
|
const marshalZonedApiCreateLbRequest = (request, defaults) => ({
|
|
887
|
+
assign_flexible_ip: request.assignFlexibleIp,
|
|
883
888
|
description: request.description,
|
|
884
889
|
ip_id: request.ipId,
|
|
890
|
+
ip_ids: request.ipIds,
|
|
885
891
|
name: request.name || randomName('lb'),
|
|
886
892
|
ssl_compatibility_level: request.sslCompatibilityLevel ?? 'ssl_compatibility_level_unknown',
|
|
887
893
|
tags: request.tags,
|
|
@@ -7,11 +7,9 @@ import { unmarshalListImagesResponse, unmarshalGetImageResponse, unmarshalListVe
|
|
|
7
7
|
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
8
8
|
/** Marketplace API. */
|
|
9
9
|
class API extends API$1 {
|
|
10
|
-
|
|
11
|
-
var _this;
|
|
12
|
-
|
|
13
|
-
_this = this;
|
|
14
|
-
this.pageOfListImages = function (request) {
|
|
10
|
+
pageOfListImages = (() => {
|
|
11
|
+
var _this = this;
|
|
12
|
+
return function (request) {
|
|
15
13
|
if (request === void 0) {
|
|
16
14
|
request = {};
|
|
17
15
|
}
|
|
@@ -21,37 +19,42 @@ class API extends API$1 {
|
|
|
21
19
|
urlParams: urlParams(['page', request.page], ['per_page', request.perPage ?? _this.client.settings.defaultPageSize])
|
|
22
20
|
}, unmarshalListImagesResponse);
|
|
23
21
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
22
|
+
})();
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* List marketplace images.
|
|
26
|
+
*
|
|
27
|
+
* @param request - The request {@link ListImagesRequest}
|
|
28
|
+
* @returns A Promise of ListImagesResponse
|
|
29
|
+
*/
|
|
30
|
+
listImages = (() => {
|
|
31
|
+
var _this2 = this;
|
|
32
|
+
return function (request) {
|
|
31
33
|
if (request === void 0) {
|
|
32
34
|
request = {};
|
|
33
35
|
}
|
|
34
|
-
return enrichForPagination('images',
|
|
36
|
+
return enrichForPagination('images', _this2.pageOfListImages, request);
|
|
35
37
|
};
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
38
|
+
})();
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Get a specific marketplace image.
|
|
42
|
+
*
|
|
43
|
+
* @param request - The request {@link GetImageRequest}
|
|
44
|
+
* @returns A Promise of GetImageResponse
|
|
45
|
+
*/
|
|
46
|
+
getImage = request => this.client.fetch({
|
|
47
|
+
method: 'GET',
|
|
48
|
+
path: `/marketplace/v1/images/${validatePathParam('imageId', request.imageId)}`
|
|
49
|
+
}, unmarshalGetImageResponse);
|
|
50
|
+
listVersions = request => this.client.fetch({
|
|
51
|
+
method: 'GET',
|
|
52
|
+
path: `/marketplace/v1/images/${validatePathParam('imageId', request.imageId)}/versions`
|
|
53
|
+
}, unmarshalListVersionsResponse);
|
|
54
|
+
getVersion = request => this.client.fetch({
|
|
55
|
+
method: 'GET',
|
|
56
|
+
path: `/marketplace/v1/images/${validatePathParam('imageId', request.imageId)}/versions/${validatePathParam('versionId', request.versionId)}`
|
|
57
|
+
}, unmarshalGetVersionResponse);
|
|
55
58
|
}
|
|
56
59
|
|
|
57
60
|
export { API };
|
|
@@ -7,60 +7,62 @@ import { unmarshalListImagesResponse, unmarshalImage, unmarshalListVersionsRespo
|
|
|
7
7
|
// If you have any remark or suggestion do not hesitate to open an issue.
|
|
8
8
|
/** Marketplace API. */
|
|
9
9
|
class API extends API$1 {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
10
|
+
pageOfListImages = request => this.client.fetch({
|
|
11
|
+
method: 'GET',
|
|
12
|
+
path: `/marketplace/v2/images`,
|
|
13
|
+
urlParams: urlParams(['arch', request.arch], ['category', request.category], ['include_eol', request.includeEol], ['order_by', request.orderBy ?? 'name_asc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
14
|
+
}, unmarshalListImagesResponse);
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* List marketplace images. List all available images on the marketplace,
|
|
18
|
+
* their UUID, CPU architecture and description.
|
|
19
|
+
*
|
|
20
|
+
* @param request - The request {@link ListImagesRequest}
|
|
21
|
+
* @returns A Promise of ListImagesResponse
|
|
22
|
+
*/
|
|
23
|
+
listImages = request => enrichForPagination('images', this.pageOfListImages, request);
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Get a specific marketplace image. Get detailed information about a
|
|
27
|
+
* marketplace image, specified by its `image_id` (UUID format).
|
|
28
|
+
*
|
|
29
|
+
* @param request - The request {@link GetImageRequest}
|
|
30
|
+
* @returns A Promise of Image
|
|
31
|
+
*/
|
|
32
|
+
getImage = request => this.client.fetch({
|
|
33
|
+
method: 'GET',
|
|
34
|
+
path: `/marketplace/v2/images/${validatePathParam('imageId', request.imageId)}`
|
|
35
|
+
}, unmarshalImage);
|
|
36
|
+
pageOfListVersions = request => this.client.fetch({
|
|
37
|
+
method: 'GET',
|
|
38
|
+
path: `/marketplace/v2/versions`,
|
|
39
|
+
urlParams: urlParams(['image_id', request.imageId], ['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
40
|
+
}, unmarshalListVersionsResponse);
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* List versions of an Image. Get a list of all available version of an image,
|
|
44
|
+
* specified by its `image_id` (UUID format).
|
|
45
|
+
*
|
|
46
|
+
* @param request - The request {@link ListVersionsRequest}
|
|
47
|
+
* @returns A Promise of ListVersionsResponse
|
|
48
|
+
*/
|
|
49
|
+
listVersions = request => enrichForPagination('versions', this.pageOfListVersions, request);
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Get a specific image version. Get information such as the name, creation
|
|
53
|
+
* date, last update and published date for an image version specified by its
|
|
54
|
+
* `version_id` (UUID format).
|
|
55
|
+
*
|
|
56
|
+
* @param request - The request {@link GetVersionRequest}
|
|
57
|
+
* @returns A Promise of Version
|
|
58
|
+
*/
|
|
59
|
+
getVersion = request => this.client.fetch({
|
|
60
|
+
method: 'GET',
|
|
61
|
+
path: `/marketplace/v2/versions/${validatePathParam('versionId', request.versionId)}`
|
|
62
|
+
}, unmarshalVersion);
|
|
63
|
+
pageOfListLocalImages = (() => {
|
|
64
|
+
var _this = this;
|
|
65
|
+
return function (request) {
|
|
64
66
|
if (request === void 0) {
|
|
65
67
|
request = {};
|
|
66
68
|
}
|
|
@@ -79,69 +81,82 @@ class API extends API$1 {
|
|
|
79
81
|
}])))
|
|
80
82
|
}, unmarshalListLocalImagesResponse);
|
|
81
83
|
};
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
84
|
+
})();
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* List local images from a specific image or version. List information about
|
|
88
|
+
* local images in a specific Availability Zone, specified by its `image_id`
|
|
89
|
+
* (UUID format), `version_id` (UUID format) or `image_label`. Only one of
|
|
90
|
+
* these three parameters may be set.
|
|
91
|
+
*
|
|
92
|
+
* @param request - The request {@link ListLocalImagesRequest}
|
|
93
|
+
* @returns A Promise of ListLocalImagesResponse
|
|
94
|
+
*/
|
|
95
|
+
listLocalImages = (() => {
|
|
96
|
+
var _this2 = this;
|
|
97
|
+
return function (request) {
|
|
92
98
|
if (request === void 0) {
|
|
93
99
|
request = {};
|
|
94
100
|
}
|
|
95
|
-
return enrichForPagination('localImages',
|
|
101
|
+
return enrichForPagination('localImages', _this2.pageOfListLocalImages, request);
|
|
96
102
|
};
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
103
|
+
})();
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Get a specific local image by ID. Get detailed information about a local
|
|
107
|
+
* image, including compatible commercial types, supported architecture,
|
|
108
|
+
* labels and the Availability Zone of the image, specified by its
|
|
109
|
+
* `local_image_id` (UUID format).
|
|
110
|
+
*
|
|
111
|
+
* @param request - The request {@link GetLocalImageRequest}
|
|
112
|
+
* @returns A Promise of LocalImage
|
|
113
|
+
*/
|
|
114
|
+
getLocalImage = request => this.client.fetch({
|
|
115
|
+
method: 'GET',
|
|
116
|
+
path: `/marketplace/v2/local-images/${validatePathParam('localImageId', request.localImageId)}`
|
|
117
|
+
}, unmarshalLocalImage);
|
|
118
|
+
pageOfListCategories = (() => {
|
|
119
|
+
var _this3 = this;
|
|
120
|
+
return function (request) {
|
|
111
121
|
if (request === void 0) {
|
|
112
122
|
request = {};
|
|
113
123
|
}
|
|
114
|
-
return
|
|
124
|
+
return _this3.client.fetch({
|
|
115
125
|
method: 'GET',
|
|
116
126
|
path: `/marketplace/v2/categories`,
|
|
117
|
-
urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ??
|
|
127
|
+
urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? _this3.client.settings.defaultPageSize])
|
|
118
128
|
}, unmarshalListCategoriesResponse);
|
|
119
129
|
};
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
130
|
+
})();
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* List existing image categories. Get a list of all existing categories. The
|
|
134
|
+
* output can be paginated.
|
|
135
|
+
*
|
|
136
|
+
* @param request - The request {@link ListCategoriesRequest}
|
|
137
|
+
* @returns A Promise of ListCategoriesResponse
|
|
138
|
+
*/
|
|
139
|
+
listCategories = (() => {
|
|
140
|
+
var _this4 = this;
|
|
141
|
+
return function (request) {
|
|
128
142
|
if (request === void 0) {
|
|
129
143
|
request = {};
|
|
130
144
|
}
|
|
131
|
-
return enrichForPagination('categories',
|
|
145
|
+
return enrichForPagination('categories', _this4.pageOfListCategories, request);
|
|
132
146
|
};
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
147
|
+
})();
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Get a specific category. Get information about a specific category of the
|
|
151
|
+
* marketplace catalog, specified by its `category_id` (UUID format).
|
|
152
|
+
*
|
|
153
|
+
* @param request - The request {@link GetCategoryRequest}
|
|
154
|
+
* @returns A Promise of Category
|
|
155
|
+
*/
|
|
156
|
+
getCategory = request => this.client.fetch({
|
|
157
|
+
method: 'GET',
|
|
158
|
+
path: `/marketplace/v2/categories/${validatePathParam('categoryId', request.categoryId)}`
|
|
159
|
+
}, unmarshalCategory);
|
|
145
160
|
}
|
|
146
161
|
|
|
147
162
|
export { API };
|