@ornncompute/cli 1.0.120 → 1.0.122

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.
@@ -13,6 +13,84 @@ function getSoftwareCatalog(request, signal) {
13
13
  });
14
14
  }
15
15
 
16
+ // ../../packages/api-client/dist/orchestrator/disks.js
17
+ var disksSocketPath = "/v1/orchestrator/disks/ws";
18
+ function listDisks(request, query = {}, signal) {
19
+ const params = new URLSearchParams();
20
+ for (const key of ["scope", "organization_id", "limit", "q", "exclude_failed"]) {
21
+ if (query[key] !== void 0)
22
+ params.set(key, String(query[key]));
23
+ }
24
+ return request(`/v1/orchestrator/disks${params.size ? `?${params}` : ""}`, {
25
+ method: "GET",
26
+ ...signal ? { signal } : {}
27
+ });
28
+ }
29
+ function createDisk(request, body) {
30
+ return request("/v1/orchestrator/disks", { method: "POST", body });
31
+ }
32
+ function updateDisk(request, id, body) {
33
+ return request(`/v1/orchestrator/disks/${encodeURIComponent(id)}`, {
34
+ method: "PATCH",
35
+ body
36
+ });
37
+ }
38
+ function deleteDisk(request, id) {
39
+ return request(`/v1/orchestrator/disks/${encodeURIComponent(id)}`, {
40
+ method: "DELETE"
41
+ });
42
+ }
43
+ function startDiskUpload(request, body) {
44
+ return request("/v1/orchestrator/disks/uploads", {
45
+ method: "POST",
46
+ body
47
+ });
48
+ }
49
+ function postDiskObject(request, body) {
50
+ return request("/v1/orchestrator/disks/objects", { method: "POST", body });
51
+ }
52
+ function completeDiskUpload(request, id, body) {
53
+ return request(`/v1/orchestrator/disks/uploads/${encodeURIComponent(id)}/complete`, {
54
+ method: "POST",
55
+ body
56
+ });
57
+ }
58
+ function importDisk(request, body) {
59
+ return request("/v1/orchestrator/disks/imports", { method: "POST", body });
60
+ }
61
+
62
+ // ../../packages/api-client/dist/orchestrator/images.js
63
+ function listCatalogImages(request, query = {}, signal) {
64
+ const params = new URLSearchParams();
65
+ if (query.include_pending !== void 0) {
66
+ params.set("include_pending", String(query.include_pending));
67
+ }
68
+ return request(`/v1/orchestrator/catalog/images${params.size ? `?${params}` : ""}`, {
69
+ method: "GET",
70
+ ...signal ? { signal } : {}
71
+ });
72
+ }
73
+ function startImageUpload(request, body) {
74
+ return request("/v1/orchestrator/images/uploads", {
75
+ method: "POST",
76
+ body
77
+ });
78
+ }
79
+ function postImageObject(request, body) {
80
+ return request("/v1/orchestrator/images/objects", { method: "POST", body });
81
+ }
82
+ function completeImageUpload(request, id, body) {
83
+ return request(`/v1/orchestrator/images/uploads/${encodeURIComponent(id)}/complete`, {
84
+ method: "POST",
85
+ body
86
+ });
87
+ }
88
+ function deleteImage(request, id) {
89
+ return request(`/v1/orchestrator/images/${encodeURIComponent(id)}`, {
90
+ method: "DELETE"
91
+ });
92
+ }
93
+
16
94
  // ../../packages/api-client/dist/orchestrator/locality.js
17
95
  var localityGeolocatePath = "/v1/orchestrator/locality/geolocate";
18
96
  function listLocalityRegions(request, signal) {
@@ -29,6 +107,35 @@ function geolocate(request, query, signal) {
29
107
  });
30
108
  }
31
109
 
110
+ // ../../packages/api-client/dist/orchestrator/registry.js
111
+ function getContainerRegistry(request) {
112
+ return request("/v1/orchestrator/registry", { method: "GET" });
113
+ }
114
+ function listRegistryRepositories(request) {
115
+ return request("/v1/orchestrator/registry/repositories", { method: "GET" });
116
+ }
117
+ function listRegistryTags(request, repository) {
118
+ return request(`/v1/orchestrator/registry/tags?${new URLSearchParams({ repository })}`, {
119
+ method: "GET"
120
+ });
121
+ }
122
+ function getRegistryUsage(request) {
123
+ return request("/v1/orchestrator/registry/usage", { method: "GET" });
124
+ }
125
+ function listRegistryCaches(request, query = {}) {
126
+ const params = new URLSearchParams();
127
+ if (query.controller_id !== void 0)
128
+ params.set("controller_id", query.controller_id);
129
+ return request(`/v1/orchestrator/registry/caches${params.size ? `?${params}` : ""}`, {
130
+ method: "GET"
131
+ });
132
+ }
133
+ function deleteRegistryTag(request, repository, tag) {
134
+ return request(`/v1/orchestrator/registry/tags?${new URLSearchParams({ repository, tag })}`, {
135
+ method: "DELETE"
136
+ });
137
+ }
138
+
32
139
  // ../../packages/api-client/dist/orchestrator/shell.js
33
140
  var sessionsPath = "/v1/orchestrator/shell/sessions";
34
141
  function createShellSession(fetcher) {
@@ -43,15 +150,241 @@ function closeShellSession(fetcher, id) {
43
150
  function shellSessionAttachPath(id) {
44
151
  return `${sessionsPath}/${encodeURIComponent(id)}/attach`;
45
152
  }
153
+
154
+ // ../../packages/api-client/dist/orchestrator/drives.js
155
+ function queryPath(path, query) {
156
+ const params = new URLSearchParams();
157
+ for (const [key, value] of Object.entries(query)) {
158
+ if (value !== void 0 && value !== null)
159
+ params.set(key, String(value));
160
+ }
161
+ return `${path}${params.size ? `?${params}` : ""}`;
162
+ }
163
+ function listDrives(request, query = {}, signal) {
164
+ return request(queryPath("/v1/orchestrator/drives", query), {
165
+ method: "GET",
166
+ ...signal ? { signal } : {}
167
+ });
168
+ }
169
+ function getDrive(request, id, query = {}, options = {}) {
170
+ return request(queryPath(`/v1/orchestrator/drives/${encodeURIComponent(id)}`, query), {
171
+ method: "GET",
172
+ ...options
173
+ });
174
+ }
175
+ function createDrive(request, body, options = {}) {
176
+ return request("/v1/orchestrator/drives", {
177
+ method: "POST",
178
+ body,
179
+ ...options
180
+ });
181
+ }
182
+ function updateDrive(request, id, body, options = {}) {
183
+ return request(`/v1/orchestrator/drives/${encodeURIComponent(id)}`, {
184
+ method: "PATCH",
185
+ body,
186
+ ...options
187
+ });
188
+ }
189
+ function deleteDrive(request, id, query = {}, options = {}) {
190
+ return request(queryPath(`/v1/orchestrator/drives/${encodeURIComponent(id)}`, query), {
191
+ method: "DELETE",
192
+ ...options
193
+ });
194
+ }
195
+ function listStorageTargets(request, signal) {
196
+ return request("/v1/orchestrator/storage-targets", {
197
+ method: "GET",
198
+ ...signal ? { signal } : {}
199
+ });
200
+ }
201
+
202
+ // ../../packages/api-client/dist/orchestrator/drive-files.js
203
+ function drivePath(id) {
204
+ return `/v1/orchestrator/drives/${encodeURIComponent(id)}`;
205
+ }
206
+ function filePath(path) {
207
+ return path.replace(/\\/g, "/").split("/").filter(Boolean).map(encodeURIComponent).join("/");
208
+ }
209
+ function driveFilePath(id, path) {
210
+ return `${drivePath(id)}/files/${filePath(path)}`;
211
+ }
212
+ function driveArchivePath(id) {
213
+ return `${drivePath(id)}/archive`;
214
+ }
215
+ function driveFolderArchivePath(id, path) {
216
+ return `${drivePath(id)}/folders/${filePath(path)}/archive`;
217
+ }
218
+ function downloadDriveFile(fetch, id, path, signal) {
219
+ return fetch(driveFilePath(id, path), { method: "GET", ...signal ? { signal } : {} });
220
+ }
221
+ function listDriveContents(request, id, query = {}, signal) {
222
+ const params = new URLSearchParams();
223
+ for (const [key, value] of Object.entries(query)) {
224
+ if (value !== void 0)
225
+ params.set(key, String(value));
226
+ }
227
+ return request(`${drivePath(id)}/contents${params.size ? `?${params}` : ""}`, {
228
+ method: "GET",
229
+ ...signal ? { signal } : {}
230
+ });
231
+ }
232
+ function deleteDriveFile(request, id, path) {
233
+ return request(driveFilePath(id, path), { method: "DELETE" });
234
+ }
235
+ function deleteDriveFolder(request, id, path) {
236
+ return request(`${drivePath(id)}/folders/${filePath(path)}`, { method: "DELETE" });
237
+ }
238
+ function clearDriveContents(request, id) {
239
+ return request(`${drivePath(id)}/contents`, { method: "DELETE" });
240
+ }
241
+ function startDriveUpload(request, id, body, options = {}) {
242
+ return request(`${drivePath(id)}/uploads`, { method: "POST", body, ...options });
243
+ }
244
+ function completeDriveUpload(request, id, uploadId, body, options = {}) {
245
+ return request(`${drivePath(id)}/uploads/${encodeURIComponent(uploadId)}`, {
246
+ method: "POST",
247
+ body,
248
+ ...options
249
+ });
250
+ }
251
+ function cancelDriveUpload(request, id, uploadId, signal) {
252
+ return request(`${drivePath(id)}/uploads/${encodeURIComponent(uploadId)}`, {
253
+ method: "DELETE",
254
+ ...signal ? { signal } : {}
255
+ });
256
+ }
257
+ function keepDriveUploadsAlive(request, id) {
258
+ return request(`${drivePath(id)}/uploads`, { method: "PATCH" });
259
+ }
260
+
261
+ // ../../packages/api-client/dist/orchestrator/storage-types.js
262
+ var storageEventsPath = "/v1/orchestrator/storage/ws";
263
+
264
+ // ../../packages/api-client/dist/orchestrator/storage-usage.js
265
+ function queryPath2(path, query) {
266
+ const params = new URLSearchParams();
267
+ for (const [key, value] of Object.entries(query)) {
268
+ if (value !== void 0)
269
+ params.set(key, String(value));
270
+ }
271
+ return `${path}${params.size ? `?${params}` : ""}`;
272
+ }
273
+ function listStorageInventory(request, query = {}, signal) {
274
+ return request(queryPath2("/v1/staff/storage/volumes", query), {
275
+ method: "GET",
276
+ ...signal ? { signal } : {}
277
+ });
278
+ }
279
+ function getStorageUsage(request, driveId, query, signal) {
280
+ return request(queryPath2(`/v1/staff/storage/volumes/${encodeURIComponent(driveId)}/usage`, query), {
281
+ method: "GET",
282
+ ...signal ? { signal } : {}
283
+ });
284
+ }
285
+ function getOrganizationStorageUsage(request, organizationId, query, signal) {
286
+ return request(queryPath2(`/v1/staff/storage/organizations/${encodeURIComponent(organizationId)}/usage`, query), {
287
+ method: "GET",
288
+ ...signal ? { signal } : {}
289
+ });
290
+ }
291
+
292
+ // ../../packages/api-client/dist/orchestrator/github.js
293
+ var connections = "/v1/orchestrator/github/connections";
294
+ function listGitHubConnections(request) {
295
+ return request(connections, { method: "GET" });
296
+ }
297
+ function startGitHubConnection(request, query = {}) {
298
+ const params = new URLSearchParams();
299
+ if (query.page !== void 0)
300
+ params.set("page", query.page);
301
+ return request(`${connections}${params.size ? `?${params}` : ""}`, {
302
+ method: "POST"
303
+ });
304
+ }
305
+ function completeGitHubConnection(request, body) {
306
+ return request(`${connections}/complete`, { method: "POST", body });
307
+ }
308
+ function deleteGitHubConnection(request, id) {
309
+ return request(`${connections}/${encodeURIComponent(id)}`, { method: "DELETE" });
310
+ }
311
+ function listGitHubRepositories(request, connectionId) {
312
+ return request(`${connections}/${encodeURIComponent(connectionId)}/repositories`, {
313
+ method: "GET"
314
+ });
315
+ }
316
+ function listGitHubBranches(request, connectionId, repositoryId, query) {
317
+ const params = new URLSearchParams({ full_name: query.full_name, page: String(query.page) });
318
+ return request(`${connections}/${encodeURIComponent(connectionId)}/repositories/${repositoryId}/branches?${params}`, { method: "GET" });
319
+ }
320
+ function pullGitHubRepository(request, driveId, body) {
321
+ return request(`/v1/orchestrator/drives/${encodeURIComponent(driveId)}/github`, {
322
+ method: "POST",
323
+ body
324
+ });
325
+ }
326
+ function syncGitHubRepository(request, driveId, folder) {
327
+ return request(`/v1/orchestrator/drives/${encodeURIComponent(driveId)}/github/${encodeURIComponent(folder)}/sync`, { method: "POST" });
328
+ }
46
329
  export {
330
+ cancelDriveUpload,
331
+ clearDriveContents,
47
332
  closeShellSession,
333
+ completeDiskUpload,
334
+ completeDriveUpload,
335
+ completeGitHubConnection,
336
+ completeImageUpload,
337
+ createDisk,
338
+ createDrive,
48
339
  createShellSession,
340
+ deleteDisk,
341
+ deleteDrive,
342
+ deleteDriveFile,
343
+ deleteDriveFolder,
344
+ deleteGitHubConnection,
345
+ deleteImage,
346
+ deleteRegistryTag,
347
+ disksSocketPath,
348
+ downloadDriveFile,
349
+ driveArchivePath,
350
+ driveFilePath,
351
+ driveFolderArchivePath,
49
352
  geolocate,
353
+ getContainerRegistry,
50
354
  getCurrentShellSession,
355
+ getDrive,
51
356
  getHardwareCatalog,
357
+ getOrganizationStorageUsage,
358
+ getRegistryUsage,
52
359
  getSoftwareCatalog,
360
+ getStorageUsage,
53
361
  hardwareCatalogPath,
362
+ importDisk,
363
+ keepDriveUploadsAlive,
364
+ listCatalogImages,
365
+ listDisks,
366
+ listDriveContents,
367
+ listDrives,
368
+ listGitHubBranches,
369
+ listGitHubConnections,
370
+ listGitHubRepositories,
54
371
  listLocalityRegions,
372
+ listRegistryCaches,
373
+ listRegistryRepositories,
374
+ listRegistryTags,
375
+ listStorageInventory,
376
+ listStorageTargets,
55
377
  localityGeolocatePath,
56
- shellSessionAttachPath
378
+ postDiskObject,
379
+ postImageObject,
380
+ pullGitHubRepository,
381
+ shellSessionAttachPath,
382
+ startDiskUpload,
383
+ startDriveUpload,
384
+ startGitHubConnection,
385
+ startImageUpload,
386
+ storageEventsPath,
387
+ syncGitHubRepository,
388
+ updateDisk,
389
+ updateDrive
57
390
  };