@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.
@@ -0,0 +1,384 @@
1
+ import type { Region as ScwRegion } from '@scaleway/sdk-client';
2
+ export type ImageStatus = 'unknown' | 'ready' | 'deleting' | 'error' | 'locked';
3
+ export type ImageVisibility = 'visibility_unknown' | 'inherit' | 'public' | 'private';
4
+ export type ListImagesRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'name_asc' | 'name_desc';
5
+ export type ListNamespacesRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'description_asc' | 'description_desc' | 'name_asc' | 'name_desc';
6
+ export type ListTagsRequestOrderBy = 'created_at_asc' | 'created_at_desc' | 'name_asc' | 'name_desc';
7
+ export type NamespaceStatus = 'unknown' | 'ready' | 'deleting' | 'error' | 'locked';
8
+ export type TagStatus = 'unknown' | 'ready' | 'deleting' | 'error' | 'locked';
9
+ export interface Image {
10
+ /**
11
+ * UUID of the image.
12
+ */
13
+ id: string;
14
+ /**
15
+ * Name of the image, it must be unique within the namespace.
16
+ */
17
+ name: string;
18
+ /**
19
+ * UUID of the namespace the image belongs to.
20
+ */
21
+ namespaceId: string;
22
+ /**
23
+ * Status of the image.
24
+ */
25
+ status: ImageStatus;
26
+ /**
27
+ * Details of the image status.
28
+ */
29
+ statusMessage?: string;
30
+ /**
31
+ * Set to `public` to allow the image to be pulled without authentication. Else, set to `private`. Set to `inherit` to keep the same visibility configuration as the namespace.
32
+ */
33
+ visibility: ImageVisibility;
34
+ /**
35
+ * Image size in bytes, calculated from the size of image layers. One layer used in two tags of the same image is counted once but one layer used in two images is counted twice.
36
+ */
37
+ size: number;
38
+ /**
39
+ * Date and time of image creation.
40
+ */
41
+ createdAt?: Date;
42
+ /**
43
+ * Date and time of last update.
44
+ */
45
+ updatedAt?: Date;
46
+ /**
47
+ * List of docker tags of the image.
48
+ */
49
+ tags: string[];
50
+ }
51
+ export interface Namespace {
52
+ /**
53
+ * UUID of the namespace.
54
+ */
55
+ id: string;
56
+ /**
57
+ * Name of the namespace, unique in a region across all organizations.
58
+ */
59
+ name: string;
60
+ /**
61
+ * Description of the namespace.
62
+ */
63
+ description: string;
64
+ /**
65
+ * Owner of the namespace.
66
+ */
67
+ organizationId: string;
68
+ /**
69
+ * Project of the namespace.
70
+ */
71
+ projectId: string;
72
+ /**
73
+ * Namespace status.
74
+ */
75
+ status: NamespaceStatus;
76
+ /**
77
+ * Namespace status details.
78
+ */
79
+ statusMessage: string;
80
+ /**
81
+ * Endpoint reachable by docker.
82
+ */
83
+ endpoint: string;
84
+ /**
85
+ * Defines whether or not namespace is public.
86
+ */
87
+ isPublic: boolean;
88
+ /**
89
+ * Total size of the namespace, calculated as the sum of the size of all images in the namespace.
90
+ */
91
+ size: number;
92
+ /**
93
+ * Date and time of creation.
94
+ */
95
+ createdAt?: Date;
96
+ /**
97
+ * Date and time of last update.
98
+ */
99
+ updatedAt?: Date;
100
+ /**
101
+ * Number of images in the namespace.
102
+ */
103
+ imageCount: number;
104
+ /**
105
+ * Region the namespace belongs to.
106
+ */
107
+ region: ScwRegion;
108
+ }
109
+ export interface Tag {
110
+ /**
111
+ * UUID of the tag.
112
+ */
113
+ id: string;
114
+ /**
115
+ * Tag name, unique to an image.
116
+ */
117
+ name: string;
118
+ /**
119
+ * Image ID the of the image the tag belongs to.
120
+ */
121
+ imageId: string;
122
+ /**
123
+ * Tag status.
124
+ */
125
+ status: TagStatus;
126
+ /**
127
+ * Hash of the tag content. Several tags of a same image may have the same digest.
128
+ */
129
+ digest: string;
130
+ /**
131
+ * Date and time of creation.
132
+ */
133
+ createdAt?: Date;
134
+ /**
135
+ * Date and time of last update.
136
+ */
137
+ updatedAt?: Date;
138
+ }
139
+ export type CreateNamespaceRequest = {
140
+ /**
141
+ * Region to target. If none is passed will use default region from the config.
142
+ */
143
+ region?: ScwRegion;
144
+ /**
145
+ * Name of the namespace.
146
+ */
147
+ name?: string;
148
+ /**
149
+ * Description of the namespace.
150
+ */
151
+ description: string;
152
+ /**
153
+ * @deprecated Namespace owner (deprecated).
154
+ *
155
+ * One-of ('projectIdentifier'): at most one of 'projectId', 'organizationId' could be set.
156
+ */
157
+ organizationId?: string;
158
+ /**
159
+ * Project ID on which the namespace will be created.
160
+ *
161
+ * One-of ('projectIdentifier'): at most one of 'projectId', 'organizationId' could be set.
162
+ */
163
+ projectId?: string;
164
+ /**
165
+ * Defines whether or not namespace is public.
166
+ */
167
+ isPublic: boolean;
168
+ };
169
+ export type DeleteImageRequest = {
170
+ /**
171
+ * Region to target. If none is passed will use default region from the config.
172
+ */
173
+ region?: ScwRegion;
174
+ /**
175
+ * UUID of the image.
176
+ */
177
+ imageId: string;
178
+ };
179
+ export type DeleteNamespaceRequest = {
180
+ /**
181
+ * Region to target. If none is passed will use default region from the config.
182
+ */
183
+ region?: ScwRegion;
184
+ /**
185
+ * UUID of the namespace.
186
+ */
187
+ namespaceId: string;
188
+ };
189
+ export type DeleteTagRequest = {
190
+ /**
191
+ * Region to target. If none is passed will use default region from the config.
192
+ */
193
+ region?: ScwRegion;
194
+ /**
195
+ * UUID of the tag.
196
+ */
197
+ tagId: string;
198
+ /**
199
+ * @deprecated If two tags share the same digest the deletion will fail unless this parameter is set to true (deprecated).
200
+ */
201
+ force?: boolean;
202
+ };
203
+ export type GetImageRequest = {
204
+ /**
205
+ * Region to target. If none is passed will use default region from the config.
206
+ */
207
+ region?: ScwRegion;
208
+ /**
209
+ * UUID of the image.
210
+ */
211
+ imageId: string;
212
+ };
213
+ export type GetNamespaceRequest = {
214
+ /**
215
+ * Region to target. If none is passed will use default region from the config.
216
+ */
217
+ region?: ScwRegion;
218
+ /**
219
+ * UUID of the namespace.
220
+ */
221
+ namespaceId: string;
222
+ };
223
+ export type GetTagRequest = {
224
+ /**
225
+ * Region to target. If none is passed will use default region from the config.
226
+ */
227
+ region?: ScwRegion;
228
+ /**
229
+ * UUID of the tag.
230
+ */
231
+ tagId: string;
232
+ };
233
+ export type ListImagesRequest = {
234
+ /**
235
+ * Region to target. If none is passed will use default region from the config.
236
+ */
237
+ region?: ScwRegion;
238
+ /**
239
+ * A positive integer to choose the page to display.
240
+ */
241
+ page?: number;
242
+ /**
243
+ * A positive integer lower or equal to 100 to select the number of items to display.
244
+ */
245
+ pageSize?: number;
246
+ /**
247
+ * Criteria to use when ordering image listings. Possible values are `created_at_asc`, `created_at_desc`, `name_asc`, `name_desc`, `region`, `status_asc` and `status_desc`. The default value is `created_at_asc`.
248
+ */
249
+ orderBy?: ListImagesRequestOrderBy;
250
+ /**
251
+ * Filter by the namespace ID.
252
+ */
253
+ namespaceId?: string;
254
+ /**
255
+ * Filter by the image name (exact match).
256
+ */
257
+ name?: string;
258
+ /**
259
+ * Filter by Organization ID.
260
+ */
261
+ organizationId?: string;
262
+ /**
263
+ * Filter by Project ID.
264
+ */
265
+ projectId?: string;
266
+ };
267
+ export interface ListImagesResponse {
268
+ /**
269
+ * Paginated list of images that match the selected filters.
270
+ */
271
+ images: Image[];
272
+ /**
273
+ * Total number of images that match the selected filters.
274
+ */
275
+ totalCount: number;
276
+ }
277
+ export type ListNamespacesRequest = {
278
+ /**
279
+ * Region to target. If none is passed will use default region from the config.
280
+ */
281
+ region?: ScwRegion;
282
+ /**
283
+ * A positive integer to choose the page to display.
284
+ */
285
+ page?: number;
286
+ /**
287
+ * A positive integer lower or equal to 100 to select the number of items to display.
288
+ */
289
+ pageSize?: number;
290
+ /**
291
+ * Criteria to use when ordering namespace listings. Possible values are `created_at_asc`, `created_at_desc`, `name_asc`, `name_desc`, `region`, `status_asc` and `status_desc`. The default value is `created_at_asc`.
292
+ */
293
+ orderBy?: ListNamespacesRequestOrderBy;
294
+ /**
295
+ * Filter by Organization ID.
296
+ */
297
+ organizationId?: string;
298
+ /**
299
+ * Filter by Project ID.
300
+ */
301
+ projectId?: string;
302
+ /**
303
+ * Filter by the namespace name (exact match).
304
+ */
305
+ name?: string;
306
+ };
307
+ export interface ListNamespacesResponse {
308
+ /**
309
+ * Paginated list of namespaces that match the selected filters.
310
+ */
311
+ namespaces: Namespace[];
312
+ /**
313
+ * Total number of namespaces that match the selected filters.
314
+ */
315
+ totalCount: number;
316
+ }
317
+ export type ListTagsRequest = {
318
+ /**
319
+ * Region to target. If none is passed will use default region from the config.
320
+ */
321
+ region?: ScwRegion;
322
+ /**
323
+ * UUID of the image.
324
+ */
325
+ imageId: string;
326
+ /**
327
+ * A positive integer to choose the page to display.
328
+ */
329
+ page?: number;
330
+ /**
331
+ * A positive integer lower or equal to 100 to select the number of items to display.
332
+ */
333
+ pageSize?: number;
334
+ /**
335
+ * Criteria to use when ordering tag listings. Possible values are `created_at_asc`, `created_at_desc`, `name_asc`, `name_desc`, `region`, `status_asc` and `status_desc`. The default value is `created_at_asc`.
336
+ */
337
+ orderBy?: ListTagsRequestOrderBy;
338
+ /**
339
+ * Filter by the tag name (exact match).
340
+ */
341
+ name?: string;
342
+ };
343
+ export interface ListTagsResponse {
344
+ /**
345
+ * Paginated list of tags that match the selected filters.
346
+ */
347
+ tags: Tag[];
348
+ /**
349
+ * Total number of tags that match the selected filters.
350
+ */
351
+ totalCount: number;
352
+ }
353
+ export type UpdateImageRequest = {
354
+ /**
355
+ * Region to target. If none is passed will use default region from the config.
356
+ */
357
+ region?: ScwRegion;
358
+ /**
359
+ * ID of the image to update.
360
+ */
361
+ imageId: string;
362
+ /**
363
+ * Set to `public` to allow the image to be pulled without authentication. Else, set to `private`. Set to `inherit` to keep the same visibility configuration as the namespace.
364
+ */
365
+ visibility?: ImageVisibility;
366
+ };
367
+ export type UpdateNamespaceRequest = {
368
+ /**
369
+ * Region to target. If none is passed will use default region from the config.
370
+ */
371
+ region?: ScwRegion;
372
+ /**
373
+ * ID of the namespace to update.
374
+ */
375
+ namespaceId: string;
376
+ /**
377
+ * Namespace description.
378
+ */
379
+ description?: string;
380
+ /**
381
+ * Defines whether or not the namespace is public.
382
+ */
383
+ isPublic?: boolean;
384
+ };
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "@scaleway/sdk-registry",
3
+ "version": "1.0.1",
4
+ "description": "Scaleway SDK registry",
5
+ "types": "dist/index.d.ts",
6
+ "files": [
7
+ "dist"
8
+ ],
9
+ "type": "module",
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/index.gen.d.ts",
13
+ "import": "./dist/index.gen.js",
14
+ "require": "./dist/index.gen.cjs",
15
+ "default": "./dist/index.gen.js"
16
+ },
17
+ "./*": {
18
+ "types": "./dist/*/index.gen.d.ts",
19
+ "import": "./dist/*/index.gen.js",
20
+ "require": "./dist/*/index.gen.cjs",
21
+ "default": "./dist/*/index.gen.js"
22
+ }
23
+ },
24
+ "repository": {
25
+ "type": "git",
26
+ "directory": "packages_generated/registry"
27
+ },
28
+ "engines": {
29
+ "node": ">=20.18.3"
30
+ },
31
+ "dependencies": {
32
+ "@scaleway/random-name": "5.1.1",
33
+ "@scaleway/sdk-std": "1.0.1"
34
+ },
35
+ "peerDependencies": {
36
+ "@scaleway/sdk-client": "^1.2.1"
37
+ },
38
+ "devDependencies": {
39
+ "@scaleway/sdk-client": "^1.2.1"
40
+ },
41
+ "bundledDependencies": [
42
+ "@scaleway/random-name"
43
+ ],
44
+ "scripts": {
45
+ "package:check": "pnpm publint",
46
+ "typecheck": "tsc --noEmit",
47
+ "type:generate": "tsc --declaration -p tsconfig.build.json",
48
+ "build": "vite build --config vite.config.ts && pnpm run type:generate",
49
+ "build:profile": "npx vite-bundle-visualizer -c vite.config.ts"
50
+ }
51
+ }