@scaleway/sdk-registry 1.0.1

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/LICENSE ADDED
@@ -0,0 +1,191 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ https://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ Copyright 2019 Scaleway.
180
+
181
+ Licensed under the Apache License, Version 2.0 (the "License");
182
+ you may not use this file except in compliance with the License.
183
+ You may obtain a copy of the License at
184
+
185
+ https://www.apache.org/licenses/LICENSE-2.0
186
+
187
+ Unless required by applicable law or agreed to in writing, software
188
+ distributed under the License is distributed on an "AS IS" BASIS,
189
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
190
+ See the License for the specific language governing permissions and
191
+ limitations under the License.
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const index_gen = require("./v1/index.gen.cjs");
4
+ exports.Registryv1 = index_gen;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * This file is automatically generated
3
+ * PLEASE DO NOT EDIT HERE
4
+ */
5
+ export * as Registryv1 from './v1/index.gen';
@@ -0,0 +1,4 @@
1
+ import * as index_gen from "./v1/index.gen.js";
2
+ export {
3
+ index_gen as Registryv1
4
+ };
@@ -0,0 +1,266 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const sdkClient = require("@scaleway/sdk-client");
4
+ const content_gen = require("./content.gen.cjs");
5
+ const marshalling_gen = require("./marshalling.gen.cjs");
6
+ const jsonContentHeaders = {
7
+ "Content-Type": "application/json; charset=utf-8"
8
+ };
9
+ class API extends sdkClient.API {
10
+ /** Lists the available regions of the API. */
11
+ static LOCALITIES = [
12
+ "fr-par",
13
+ "nl-ams",
14
+ "pl-waw"
15
+ ];
16
+ pageOfListNamespaces = (request = {}) => this.client.fetch(
17
+ {
18
+ method: "GET",
19
+ path: `/registry/v1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/namespaces`,
20
+ urlParams: sdkClient.urlParams(
21
+ ["name", request.name],
22
+ ["order_by", request.orderBy],
23
+ ["organization_id", request.organizationId],
24
+ ["page", request.page],
25
+ [
26
+ "page_size",
27
+ request.pageSize ?? this.client.settings.defaultPageSize
28
+ ],
29
+ ["project_id", request.projectId]
30
+ )
31
+ },
32
+ marshalling_gen.unmarshalListNamespacesResponse
33
+ );
34
+ /**
35
+ * List namespaces. List all namespaces in a specified region. By default, the namespaces listed are ordered by creation date in ascending order. This can be modified via the order_by field. You can also define additional parameters for your query, such as the `instance_id` and `project_id` parameters.
36
+ *
37
+ * @param request - The request {@link ListNamespacesRequest}
38
+ * @returns A Promise of ListNamespacesResponse
39
+ */
40
+ listNamespaces = (request = {}) => sdkClient.enrichForPagination("namespaces", this.pageOfListNamespaces, request);
41
+ /**
42
+ * Get a namespace. Retrieve information about a given namespace, specified by its `namespace_id` and region. Full details about the namespace, such as `description`, `project_id`, `status`, `endpoint`, `is_public`, `size`, and `image_count` are returned in the response.
43
+ *
44
+ * @param request - The request {@link GetNamespaceRequest}
45
+ * @returns A Promise of Namespace
46
+ */
47
+ getNamespace = (request) => this.client.fetch(
48
+ {
49
+ method: "GET",
50
+ path: `/registry/v1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/namespaces/${sdkClient.validatePathParam("namespaceId", request.namespaceId)}`
51
+ },
52
+ marshalling_gen.unmarshalNamespace
53
+ );
54
+ /**
55
+ * Waits for {@link Namespace} to be in a final state.
56
+ *
57
+ * @param request - The request {@link GetNamespaceRequest}
58
+ * @param options - The waiting options
59
+ * @returns A Promise of Namespace
60
+ */
61
+ waitForNamespace = (request, options) => sdkClient.waitForResource(
62
+ options?.stop ?? ((res) => Promise.resolve(
63
+ !content_gen.NAMESPACE_TRANSIENT_STATUSES.includes(res.status)
64
+ )),
65
+ this.getNamespace,
66
+ request,
67
+ options
68
+ );
69
+ /**
70
+ * Create a namespace. Create a new Container Registry namespace. You must specify the namespace name and region in which you want it to be created. Optionally, you can specify the `project_id` and `is_public` in the request payload.
71
+ *
72
+ * @param request - The request {@link CreateNamespaceRequest}
73
+ * @returns A Promise of Namespace
74
+ */
75
+ createNamespace = (request) => this.client.fetch(
76
+ {
77
+ body: JSON.stringify(
78
+ marshalling_gen.marshalCreateNamespaceRequest(request, this.client.settings)
79
+ ),
80
+ headers: jsonContentHeaders,
81
+ method: "POST",
82
+ path: `/registry/v1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/namespaces`
83
+ },
84
+ marshalling_gen.unmarshalNamespace
85
+ );
86
+ /**
87
+ * Update a namespace. Update the parameters of a given namespace, specified by its `namespace_id` and `region`. You can update the `description` and `is_public` parameters.
88
+ *
89
+ * @param request - The request {@link UpdateNamespaceRequest}
90
+ * @returns A Promise of Namespace
91
+ */
92
+ updateNamespace = (request) => this.client.fetch(
93
+ {
94
+ body: JSON.stringify(
95
+ marshalling_gen.marshalUpdateNamespaceRequest(request, this.client.settings)
96
+ ),
97
+ headers: jsonContentHeaders,
98
+ method: "PATCH",
99
+ path: `/registry/v1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/namespaces/${sdkClient.validatePathParam("namespaceId", request.namespaceId)}`
100
+ },
101
+ marshalling_gen.unmarshalNamespace
102
+ );
103
+ /**
104
+ * Delete a namespace. Delete a given namespace. You must specify, in the endpoint, the `region` and `namespace_id` parameters of the namespace you want to delete.
105
+ *
106
+ * @param request - The request {@link DeleteNamespaceRequest}
107
+ * @returns A Promise of Namespace
108
+ */
109
+ deleteNamespace = (request) => this.client.fetch(
110
+ {
111
+ method: "DELETE",
112
+ path: `/registry/v1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/namespaces/${sdkClient.validatePathParam("namespaceId", request.namespaceId)}`
113
+ },
114
+ marshalling_gen.unmarshalNamespace
115
+ );
116
+ pageOfListImages = (request = {}) => this.client.fetch(
117
+ {
118
+ method: "GET",
119
+ path: `/registry/v1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/images`,
120
+ urlParams: sdkClient.urlParams(
121
+ ["name", request.name],
122
+ ["namespace_id", request.namespaceId],
123
+ ["order_by", request.orderBy],
124
+ ["organization_id", request.organizationId],
125
+ ["page", request.page],
126
+ [
127
+ "page_size",
128
+ request.pageSize ?? this.client.settings.defaultPageSize
129
+ ],
130
+ ["project_id", request.projectId]
131
+ )
132
+ },
133
+ marshalling_gen.unmarshalListImagesResponse
134
+ );
135
+ /**
136
+ * List images. List all images in a specified region. By default, the images listed are ordered by creation date in ascending order. This can be modified via the order_by field. You can also define additional parameters 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 = (request = {}) => sdkClient.enrichForPagination("images", this.pageOfListImages, request);
142
+ /**
143
+ * Get an image. Retrieve information about a given container image, specified by its `image_id` and region. Full details about the image, such as `name`, `namespace_id`, `status`, `visibility`, and `size` are returned in the response.
144
+ *
145
+ * @param request - The request {@link GetImageRequest}
146
+ * @returns A Promise of Image
147
+ */
148
+ getImage = (request) => this.client.fetch(
149
+ {
150
+ method: "GET",
151
+ path: `/registry/v1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/images/${sdkClient.validatePathParam("imageId", request.imageId)}`
152
+ },
153
+ marshalling_gen.unmarshalImage
154
+ );
155
+ /**
156
+ * Waits for {@link Image} to be in a final state.
157
+ *
158
+ * @param request - The request {@link GetImageRequest}
159
+ * @param options - The waiting options
160
+ * @returns A Promise of Image
161
+ */
162
+ waitForImage = (request, options) => sdkClient.waitForResource(
163
+ options?.stop ?? ((res) => Promise.resolve(
164
+ !content_gen.IMAGE_TRANSIENT_STATUSES.includes(res.status)
165
+ )),
166
+ this.getImage,
167
+ request,
168
+ options
169
+ );
170
+ /**
171
+ * Update an image. Update the parameters of a given image, specified by its `image_id` and `region`. You can update the `visibility` parameter.
172
+ *
173
+ * @param request - The request {@link UpdateImageRequest}
174
+ * @returns A Promise of Image
175
+ */
176
+ updateImage = (request) => this.client.fetch(
177
+ {
178
+ body: JSON.stringify(
179
+ marshalling_gen.marshalUpdateImageRequest(request, this.client.settings)
180
+ ),
181
+ headers: jsonContentHeaders,
182
+ method: "PATCH",
183
+ path: `/registry/v1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/images/${sdkClient.validatePathParam("imageId", request.imageId)}`
184
+ },
185
+ marshalling_gen.unmarshalImage
186
+ );
187
+ /**
188
+ * Delete an image. Delete a given image. You must specify, in the endpoint, the `region` and `image_id` parameters of the image you want to delete.
189
+ *
190
+ * @param request - The request {@link DeleteImageRequest}
191
+ * @returns A Promise of Image
192
+ */
193
+ deleteImage = (request) => this.client.fetch(
194
+ {
195
+ method: "DELETE",
196
+ path: `/registry/v1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/images/${sdkClient.validatePathParam("imageId", request.imageId)}`
197
+ },
198
+ marshalling_gen.unmarshalImage
199
+ );
200
+ pageOfListTags = (request) => this.client.fetch(
201
+ {
202
+ method: "GET",
203
+ path: `/registry/v1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/images/${sdkClient.validatePathParam("imageId", request.imageId)}/tags`,
204
+ urlParams: sdkClient.urlParams(
205
+ ["name", request.name],
206
+ ["order_by", request.orderBy],
207
+ ["page", request.page],
208
+ [
209
+ "page_size",
210
+ request.pageSize ?? this.client.settings.defaultPageSize
211
+ ]
212
+ )
213
+ },
214
+ marshalling_gen.unmarshalListTagsResponse
215
+ );
216
+ /**
217
+ * List tags. List all tags for a given image, specified by region. By default, the tags listed are ordered by creation date in ascending order. This can be modified via the order_by field. You can also define additional parameters for your query, such as the `name`.
218
+ *
219
+ * @param request - The request {@link ListTagsRequest}
220
+ * @returns A Promise of ListTagsResponse
221
+ */
222
+ listTags = (request) => sdkClient.enrichForPagination("tags", this.pageOfListTags, request);
223
+ /**
224
+ * Get a tag. Retrieve information about a given image tag, specified by its `tag_id` and region. Full details about the tag, such as `name`, `image_id`, `status`, and `digest` are returned in the response.
225
+ *
226
+ * @param request - The request {@link GetTagRequest}
227
+ * @returns A Promise of Tag
228
+ */
229
+ getTag = (request) => this.client.fetch(
230
+ {
231
+ method: "GET",
232
+ path: `/registry/v1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/tags/${sdkClient.validatePathParam("tagId", request.tagId)}`
233
+ },
234
+ marshalling_gen.unmarshalTag
235
+ );
236
+ /**
237
+ * Waits for {@link Tag} to be in a final state.
238
+ *
239
+ * @param request - The request {@link GetTagRequest}
240
+ * @param options - The waiting options
241
+ * @returns A Promise of Tag
242
+ */
243
+ waitForTag = (request, options) => sdkClient.waitForResource(
244
+ options?.stop ?? ((res) => Promise.resolve(
245
+ !content_gen.TAG_TRANSIENT_STATUSES.includes(res.status)
246
+ )),
247
+ this.getTag,
248
+ request,
249
+ options
250
+ );
251
+ /**
252
+ * Delete a tag. Delete a given image tag. You must specify, in the endpoint, the `region` and `tag_id` parameters of the tag you want to delete.
253
+ *
254
+ * @param request - The request {@link DeleteTagRequest}
255
+ * @returns A Promise of Tag
256
+ */
257
+ deleteTag = (request) => this.client.fetch(
258
+ {
259
+ method: "DELETE",
260
+ path: `/registry/v1/regions/${sdkClient.validatePathParam("region", request.region ?? this.client.settings.defaultRegion)}/tags/${sdkClient.validatePathParam("tagId", request.tagId)}`,
261
+ urlParams: sdkClient.urlParams(["force", request.force])
262
+ },
263
+ marshalling_gen.unmarshalTag
264
+ );
265
+ }
266
+ exports.API = API;
@@ -0,0 +1,132 @@
1
+ import { API as ParentAPI } from '@scaleway/sdk-client';
2
+ import type { Region as ScwRegion, WaitForOptions } from '@scaleway/sdk-client';
3
+ import type { CreateNamespaceRequest, DeleteImageRequest, DeleteNamespaceRequest, DeleteTagRequest, GetImageRequest, GetNamespaceRequest, GetTagRequest, Image, ListImagesRequest, ListImagesResponse, ListNamespacesRequest, ListNamespacesResponse, ListTagsRequest, ListTagsResponse, Namespace, Tag, UpdateImageRequest, UpdateNamespaceRequest } from './types.gen';
4
+ /**
5
+ * Container Registry API.
6
+
7
+ This API allows you to manage your Container Registry resources.
8
+ */
9
+ export declare class API extends ParentAPI {
10
+ /** Lists the available regions of the API. */
11
+ static readonly LOCALITIES: ScwRegion[];
12
+ protected pageOfListNamespaces: (request?: Readonly<ListNamespacesRequest>) => Promise<ListNamespacesResponse>;
13
+ /**
14
+ * List namespaces. List all namespaces in a specified region. By default, the namespaces listed are ordered by creation date in ascending order. This can be modified via the order_by field. You can also define additional parameters for your query, such as the `instance_id` and `project_id` parameters.
15
+ *
16
+ * @param request - The request {@link ListNamespacesRequest}
17
+ * @returns A Promise of ListNamespacesResponse
18
+ */
19
+ listNamespaces: (request?: Readonly<ListNamespacesRequest>) => Promise<ListNamespacesResponse> & {
20
+ all: () => Promise<Namespace[]>;
21
+ [Symbol.asyncIterator]: () => AsyncGenerator<Namespace[], void, void>;
22
+ };
23
+ /**
24
+ * Get a namespace. Retrieve information about a given namespace, specified by its `namespace_id` and region. Full details about the namespace, such as `description`, `project_id`, `status`, `endpoint`, `is_public`, `size`, and `image_count` are returned in the response.
25
+ *
26
+ * @param request - The request {@link GetNamespaceRequest}
27
+ * @returns A Promise of Namespace
28
+ */
29
+ getNamespace: (request: Readonly<GetNamespaceRequest>) => Promise<Namespace>;
30
+ /**
31
+ * Waits for {@link Namespace} to be in a final state.
32
+ *
33
+ * @param request - The request {@link GetNamespaceRequest}
34
+ * @param options - The waiting options
35
+ * @returns A Promise of Namespace
36
+ */
37
+ waitForNamespace: (request: Readonly<GetNamespaceRequest>, options?: Readonly<WaitForOptions<Namespace>>) => Promise<Namespace>;
38
+ /**
39
+ * Create a namespace. Create a new Container Registry namespace. You must specify the namespace name and region in which you want it to be created. Optionally, you can specify the `project_id` and `is_public` in the request payload.
40
+ *
41
+ * @param request - The request {@link CreateNamespaceRequest}
42
+ * @returns A Promise of Namespace
43
+ */
44
+ createNamespace: (request: Readonly<CreateNamespaceRequest>) => Promise<Namespace>;
45
+ /**
46
+ * Update a namespace. Update the parameters of a given namespace, specified by its `namespace_id` and `region`. You can update the `description` and `is_public` parameters.
47
+ *
48
+ * @param request - The request {@link UpdateNamespaceRequest}
49
+ * @returns A Promise of Namespace
50
+ */
51
+ updateNamespace: (request: Readonly<UpdateNamespaceRequest>) => Promise<Namespace>;
52
+ /**
53
+ * Delete a namespace. Delete a given namespace. You must specify, in the endpoint, the `region` and `namespace_id` parameters of the namespace you want to delete.
54
+ *
55
+ * @param request - The request {@link DeleteNamespaceRequest}
56
+ * @returns A Promise of Namespace
57
+ */
58
+ deleteNamespace: (request: Readonly<DeleteNamespaceRequest>) => Promise<Namespace>;
59
+ protected pageOfListImages: (request?: Readonly<ListImagesRequest>) => Promise<ListImagesResponse>;
60
+ /**
61
+ * List images. List all images in a specified region. By default, the images listed are ordered by creation date in ascending order. This can be modified via the order_by field. You can also define additional parameters for your query, such as the `namespace_id` and `project_id` parameters.
62
+ *
63
+ * @param request - The request {@link ListImagesRequest}
64
+ * @returns A Promise of ListImagesResponse
65
+ */
66
+ listImages: (request?: Readonly<ListImagesRequest>) => Promise<ListImagesResponse> & {
67
+ all: () => Promise<Image[]>;
68
+ [Symbol.asyncIterator]: () => AsyncGenerator<Image[], void, void>;
69
+ };
70
+ /**
71
+ * Get an image. Retrieve information about a given container image, specified by its `image_id` and region. Full details about the image, such as `name`, `namespace_id`, `status`, `visibility`, and `size` are returned in the response.
72
+ *
73
+ * @param request - The request {@link GetImageRequest}
74
+ * @returns A Promise of Image
75
+ */
76
+ getImage: (request: Readonly<GetImageRequest>) => Promise<Image>;
77
+ /**
78
+ * Waits for {@link Image} to be in a final state.
79
+ *
80
+ * @param request - The request {@link GetImageRequest}
81
+ * @param options - The waiting options
82
+ * @returns A Promise of Image
83
+ */
84
+ waitForImage: (request: Readonly<GetImageRequest>, options?: Readonly<WaitForOptions<Image>>) => Promise<Image>;
85
+ /**
86
+ * Update an image. Update the parameters of a given image, specified by its `image_id` and `region`. You can update the `visibility` parameter.
87
+ *
88
+ * @param request - The request {@link UpdateImageRequest}
89
+ * @returns A Promise of Image
90
+ */
91
+ updateImage: (request: Readonly<UpdateImageRequest>) => Promise<Image>;
92
+ /**
93
+ * Delete an image. Delete a given image. You must specify, in the endpoint, the `region` and `image_id` parameters of the image you want to delete.
94
+ *
95
+ * @param request - The request {@link DeleteImageRequest}
96
+ * @returns A Promise of Image
97
+ */
98
+ deleteImage: (request: Readonly<DeleteImageRequest>) => Promise<Image>;
99
+ protected pageOfListTags: (request: Readonly<ListTagsRequest>) => Promise<ListTagsResponse>;
100
+ /**
101
+ * List tags. List all tags for a given image, specified by region. By default, the tags listed are ordered by creation date in ascending order. This can be modified via the order_by field. You can also define additional parameters for your query, such as the `name`.
102
+ *
103
+ * @param request - The request {@link ListTagsRequest}
104
+ * @returns A Promise of ListTagsResponse
105
+ */
106
+ listTags: (request: Readonly<ListTagsRequest>) => Promise<ListTagsResponse> & {
107
+ all: () => Promise<Tag[]>;
108
+ [Symbol.asyncIterator]: () => AsyncGenerator<Tag[], void, void>;
109
+ };
110
+ /**
111
+ * Get a tag. Retrieve information about a given image tag, specified by its `tag_id` and region. Full details about the tag, such as `name`, `image_id`, `status`, and `digest` are returned in the response.
112
+ *
113
+ * @param request - The request {@link GetTagRequest}
114
+ * @returns A Promise of Tag
115
+ */
116
+ getTag: (request: Readonly<GetTagRequest>) => Promise<Tag>;
117
+ /**
118
+ * Waits for {@link Tag} to be in a final state.
119
+ *
120
+ * @param request - The request {@link GetTagRequest}
121
+ * @param options - The waiting options
122
+ * @returns A Promise of Tag
123
+ */
124
+ waitForTag: (request: Readonly<GetTagRequest>, options?: Readonly<WaitForOptions<Tag>>) => Promise<Tag>;
125
+ /**
126
+ * Delete a tag. Delete a given image tag. You must specify, in the endpoint, the `region` and `tag_id` parameters of the tag you want to delete.
127
+ *
128
+ * @param request - The request {@link DeleteTagRequest}
129
+ * @returns A Promise of Tag
130
+ */
131
+ deleteTag: (request: Readonly<DeleteTagRequest>) => Promise<Tag>;
132
+ }