@scaleway/sdk 1.14.0 → 1.16.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 +803 -677
- package/dist/api/instance/v1/api.utils.js +337 -325
- package/dist/api/instance/v1/content.gen.js +4 -1
- package/dist/api/instance/v1/index.js +1 -1
- package/dist/api/instance/v1/marshalling.gen.js +27 -4
- 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/redis/v1/marshalling.gen.js +1 -0
- package/dist/api/registry/v1/api.gen.js +211 -189
- package/dist/api/secret/v1alpha1/api.gen.js +295 -246
- package/dist/api/secret/v1alpha1/marshalling.gen.js +10 -1
- 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/api/webhosting/v1alpha1/content.gen.js +1 -1
- package/dist/index.cjs +924 -453
- package/dist/index.d.ts +2152 -1558
- 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
|
@@ -13,11 +13,11 @@ const jsonContentHeaders = {
|
|
|
13
13
|
|
|
14
14
|
/** Container Registry API. */
|
|
15
15
|
class API extends API$1 {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
_this = this;
|
|
20
|
-
|
|
16
|
+
/** Lists the available regions of the API. */
|
|
17
|
+
static LOCALITIES = ['fr-par', 'nl-ams', 'pl-waw'];
|
|
18
|
+
pageOfListNamespaces = (() => {
|
|
19
|
+
var _this = this;
|
|
20
|
+
return function (request) {
|
|
21
21
|
if (request === void 0) {
|
|
22
22
|
request = {};
|
|
23
23
|
}
|
|
@@ -27,204 +27,226 @@ class API extends API$1 {
|
|
|
27
27
|
urlParams: urlParams(['name', request.name], ['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])
|
|
28
28
|
}, unmarshalListNamespacesResponse);
|
|
29
29
|
};
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
30
|
+
})();
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* List namespaces. List all namespaces in a specified region. By default, the
|
|
34
|
+
* namespaces listed are ordered by creation date in ascending order. This can
|
|
35
|
+
* be modified via the order_by field. You can also define additional
|
|
36
|
+
* parameters for your query, such as the `instance_id` and `project_id`
|
|
37
|
+
* parameters.
|
|
38
|
+
*
|
|
39
|
+
* @param request - The request {@link ListNamespacesRequest}
|
|
40
|
+
* @returns A Promise of ListNamespacesResponse
|
|
41
|
+
*/
|
|
42
|
+
listNamespaces = (() => {
|
|
43
|
+
var _this2 = this;
|
|
44
|
+
return function (request) {
|
|
41
45
|
if (request === void 0) {
|
|
42
46
|
request = {};
|
|
43
47
|
}
|
|
44
|
-
return enrichForPagination('namespaces',
|
|
48
|
+
return enrichForPagination('namespaces', _this2.pageOfListNamespaces, request);
|
|
45
49
|
};
|
|
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
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
50
|
+
})();
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Get a namespace. Retrieve information about a given namespace, specified by
|
|
54
|
+
* its `namespace_id` and region. Full details about the namespace, such as
|
|
55
|
+
* `description`, `project_id`, `status`, `endpoint`, `is_public`, `size`, and
|
|
56
|
+
* `image_count` are returned in the response.
|
|
57
|
+
*
|
|
58
|
+
* @param request - The request {@link GetNamespaceRequest}
|
|
59
|
+
* @returns A Promise of Namespace
|
|
60
|
+
*/
|
|
61
|
+
getNamespace = request => this.client.fetch({
|
|
62
|
+
method: 'GET',
|
|
63
|
+
path: `/registry/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam('namespaceId', request.namespaceId)}`
|
|
64
|
+
}, unmarshalNamespace);
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Waits for {@link Namespace} to be in a final state.
|
|
68
|
+
*
|
|
69
|
+
* @param request - The request {@link GetNamespaceRequest}
|
|
70
|
+
* @param options - The waiting options
|
|
71
|
+
* @returns A Promise of Namespace
|
|
72
|
+
*/
|
|
73
|
+
waitForNamespace = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!NAMESPACE_TRANSIENT_STATUSES.includes(res.status))), this.getNamespace, request, options);
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Create a namespace. Create a new Container Registry namespace. You must
|
|
77
|
+
* specify the namespace name and region in which you want it to be created.
|
|
78
|
+
* Optionally, you can specify the `project_id` and `is_public` in the request
|
|
79
|
+
* payload.
|
|
80
|
+
*
|
|
81
|
+
* @param request - The request {@link CreateNamespaceRequest}
|
|
82
|
+
* @returns A Promise of Namespace
|
|
83
|
+
*/
|
|
84
|
+
createNamespace = request => this.client.fetch({
|
|
85
|
+
body: JSON.stringify(marshalCreateNamespaceRequest(request, this.client.settings)),
|
|
86
|
+
headers: jsonContentHeaders,
|
|
87
|
+
method: 'POST',
|
|
88
|
+
path: `/registry/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces`
|
|
89
|
+
}, unmarshalNamespace);
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Update a namespace. Update the parameters of a given namespace, specified
|
|
93
|
+
* by its `namespace_id` and `region`. You can update the `description` and
|
|
94
|
+
* `is_public` parameters.
|
|
95
|
+
*
|
|
96
|
+
* @param request - The request {@link UpdateNamespaceRequest}
|
|
97
|
+
* @returns A Promise of Namespace
|
|
98
|
+
*/
|
|
99
|
+
updateNamespace = request => this.client.fetch({
|
|
100
|
+
body: JSON.stringify(marshalUpdateNamespaceRequest(request, this.client.settings)),
|
|
101
|
+
headers: jsonContentHeaders,
|
|
102
|
+
method: 'PATCH',
|
|
103
|
+
path: `/registry/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam('namespaceId', request.namespaceId)}`
|
|
104
|
+
}, unmarshalNamespace);
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Delete a namespace. Delete a given namespace. You must specify, in the
|
|
108
|
+
* endpoint, the `region` and `namespace_id` parameters of the namespace you
|
|
109
|
+
* want to delete.
|
|
110
|
+
*
|
|
111
|
+
* @param request - The request {@link DeleteNamespaceRequest}
|
|
112
|
+
* @returns A Promise of Namespace
|
|
113
|
+
*/
|
|
114
|
+
deleteNamespace = request => this.client.fetch({
|
|
115
|
+
method: 'DELETE',
|
|
116
|
+
path: `/registry/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam('namespaceId', request.namespaceId)}`
|
|
117
|
+
}, unmarshalNamespace);
|
|
118
|
+
pageOfListImages = (() => {
|
|
119
|
+
var _this3 = this;
|
|
120
|
+
return function (request) {
|
|
109
121
|
if (request === void 0) {
|
|
110
122
|
request = {};
|
|
111
123
|
}
|
|
112
|
-
return
|
|
124
|
+
return _this3.client.fetch({
|
|
113
125
|
method: 'GET',
|
|
114
|
-
path: `/registry/v1/regions/${validatePathParam('region', request.region ??
|
|
115
|
-
urlParams: urlParams(['name', request.name], ['namespace_id', request.namespaceId], ['order_by', request.orderBy ?? 'created_at_asc'], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ??
|
|
126
|
+
path: `/registry/v1/regions/${validatePathParam('region', request.region ?? _this3.client.settings.defaultRegion)}/images`,
|
|
127
|
+
urlParams: urlParams(['name', request.name], ['namespace_id', request.namespaceId], ['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])
|
|
116
128
|
}, unmarshalListImagesResponse);
|
|
117
129
|
};
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
130
|
+
})();
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* List images. List all images in a specified region. By default, the images
|
|
134
|
+
* listed are ordered by creation date in ascending order. This can be
|
|
135
|
+
* modified via the order_by field. You can also define additional parameters
|
|
136
|
+
* for your query, such as the `namespace_id` and `project_id` parameters.
|
|
137
|
+
*
|
|
138
|
+
* @param request - The request {@link ListImagesRequest}
|
|
139
|
+
* @returns A Promise of ListImagesResponse
|
|
140
|
+
*/
|
|
141
|
+
listImages = (() => {
|
|
142
|
+
var _this4 = this;
|
|
143
|
+
return function (request) {
|
|
128
144
|
if (request === void 0) {
|
|
129
145
|
request = {};
|
|
130
146
|
}
|
|
131
|
-
return enrichForPagination('images',
|
|
147
|
+
return enrichForPagination('images', _this4.pageOfListImages, request);
|
|
132
148
|
};
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
149
|
+
})();
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Get an image. Retrieve information about a given container image, specified
|
|
153
|
+
* by its `image_id` and region. Full details about the image, such as `name`,
|
|
154
|
+
* `namespace_id`, `status`, `visibility`, and `size` are returned in the
|
|
155
|
+
* response.
|
|
156
|
+
*
|
|
157
|
+
* @param request - The request {@link GetImageRequest}
|
|
158
|
+
* @returns A Promise of Image
|
|
159
|
+
*/
|
|
160
|
+
getImage = request => this.client.fetch({
|
|
161
|
+
method: 'GET',
|
|
162
|
+
path: `/registry/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/images/${validatePathParam('imageId', request.imageId)}`
|
|
163
|
+
}, unmarshalImage);
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Waits for {@link Image} to be in a final state.
|
|
167
|
+
*
|
|
168
|
+
* @param request - The request {@link GetImageRequest}
|
|
169
|
+
* @param options - The waiting options
|
|
170
|
+
* @returns A Promise of Image
|
|
171
|
+
*/
|
|
172
|
+
waitForImage = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!IMAGE_TRANSIENT_STATUSES.includes(res.status))), this.getImage, request, options);
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Update an image. Update the parameters of a given image, specified by its
|
|
176
|
+
* `image_id` and `region`. You can update the `visibility` parameter.
|
|
177
|
+
*
|
|
178
|
+
* @param request - The request {@link UpdateImageRequest}
|
|
179
|
+
* @returns A Promise of Image
|
|
180
|
+
*/
|
|
181
|
+
updateImage = request => this.client.fetch({
|
|
182
|
+
body: JSON.stringify(marshalUpdateImageRequest(request, this.client.settings)),
|
|
183
|
+
headers: jsonContentHeaders,
|
|
184
|
+
method: 'PATCH',
|
|
185
|
+
path: `/registry/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/images/${validatePathParam('imageId', request.imageId)}`
|
|
186
|
+
}, unmarshalImage);
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Delete an image. Delete a given image. You must specify, in the endpoint,
|
|
190
|
+
* the `region` and `image_id` parameters of the image you want to delete.
|
|
191
|
+
*
|
|
192
|
+
* @param request - The request {@link DeleteImageRequest}
|
|
193
|
+
* @returns A Promise of Image
|
|
194
|
+
*/
|
|
195
|
+
deleteImage = request => this.client.fetch({
|
|
196
|
+
method: 'DELETE',
|
|
197
|
+
path: `/registry/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/images/${validatePathParam('imageId', request.imageId)}`
|
|
198
|
+
}, unmarshalImage);
|
|
199
|
+
pageOfListTags = request => this.client.fetch({
|
|
200
|
+
method: 'GET',
|
|
201
|
+
path: `/registry/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/images/${validatePathParam('imageId', request.imageId)}/tags`,
|
|
202
|
+
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy ?? 'created_at_asc'], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
203
|
+
}, unmarshalListTagsResponse);
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* List tags. List all tags for a given image, specified by region. By
|
|
207
|
+
* default, the tags listed are ordered by creation date in ascending order.
|
|
208
|
+
* This can be modified via the order_by field. You can also define additional
|
|
209
|
+
* parameters for your query, such as the `name`.
|
|
210
|
+
*
|
|
211
|
+
* @param request - The request {@link ListTagsRequest}
|
|
212
|
+
* @returns A Promise of ListTagsResponse
|
|
213
|
+
*/
|
|
214
|
+
listTags = request => enrichForPagination('tags', this.pageOfListTags, request);
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Get a tag. Retrieve information about a given image tag, specified by its
|
|
218
|
+
* `tag_id` and region. Full details about the tag, such as `name`,
|
|
219
|
+
* `image_id`, `status`, and `digest` are returned in the response.
|
|
220
|
+
*
|
|
221
|
+
* @param request - The request {@link GetTagRequest}
|
|
222
|
+
* @returns A Promise of Tag
|
|
223
|
+
*/
|
|
224
|
+
getTag = request => this.client.fetch({
|
|
225
|
+
method: 'GET',
|
|
226
|
+
path: `/registry/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/tags/${validatePathParam('tagId', request.tagId)}`
|
|
227
|
+
}, unmarshalTag);
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Waits for {@link Tag} to be in a final state.
|
|
231
|
+
*
|
|
232
|
+
* @param request - The request {@link GetTagRequest}
|
|
233
|
+
* @param options - The waiting options
|
|
234
|
+
* @returns A Promise of Tag
|
|
235
|
+
*/
|
|
236
|
+
waitForTag = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!TAG_TRANSIENT_STATUSES.includes(res.status))), this.getTag, request, options);
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Delete a tag. Delete a given image tag. You must specify, in the endpoint,
|
|
240
|
+
* the `region` and `tag_id` parameters of the tag you want to delete.
|
|
241
|
+
*
|
|
242
|
+
* @param request - The request {@link DeleteTagRequest}
|
|
243
|
+
* @returns A Promise of Tag
|
|
244
|
+
*/
|
|
245
|
+
deleteTag = request => this.client.fetch({
|
|
246
|
+
method: 'DELETE',
|
|
247
|
+
path: `/registry/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/tags/${validatePathParam('tagId', request.tagId)}`,
|
|
248
|
+
urlParams: urlParams(['force', request.force])
|
|
249
|
+
}, unmarshalTag);
|
|
226
250
|
}
|
|
227
|
-
/** Lists the available regions of the API. */
|
|
228
|
-
API.LOCALITIES = ['fr-par', 'nl-ams', 'pl-waw'];
|
|
229
251
|
|
|
230
252
|
export { API };
|