@ornncompute/cli 1.0.75 → 1.0.107

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.
Files changed (54) hide show
  1. package/README.md +38 -5
  2. package/package.json +4 -2
  3. package/src/admin-capacity-reservations.mjs +4 -1
  4. package/src/admin-command-handlers.mjs +4 -0
  5. package/src/admin-node-diagnostics.mjs +1 -5
  6. package/src/admin-node-lifecycle.mjs +23 -125
  7. package/src/admin-node-sanitize.mjs +243 -0
  8. package/src/admin-ssh.mjs +113 -0
  9. package/src/api-client.mjs +4 -1
  10. package/src/catalog-shell.mjs +6 -6
  11. package/src/evidence-commands.mjs +4 -6
  12. package/src/external-bucket-commands.mjs +71 -23
  13. package/src/interaction-runtime.mjs +3 -0
  14. package/src/kubernetes-commands.mjs +16 -83
  15. package/src/machine-reference.mjs +33 -56
  16. package/src/slurm-commands.mjs +13 -2
  17. package/src/vm-commands.mjs +39 -59
  18. package/vendor/api-client/commerce.js +745 -0
  19. package/vendor/capabilities/cli.js +7756 -7
  20. package/vendor/capabilities/capabilities/admin-capacity-reservations.js +0 -101
  21. package/vendor/capabilities/capabilities/admin-enrollment.js +0 -322
  22. package/vendor/capabilities/capabilities/admin-node-diagnostics.js +0 -88
  23. package/vendor/capabilities/capabilities/admin-nodes-lifecycle.js +0 -137
  24. package/vendor/capabilities/capabilities/admin.js +0 -91
  25. package/vendor/capabilities/capabilities/cli.js +0 -156
  26. package/vendor/capabilities/capabilities/clusters.js +0 -248
  27. package/vendor/capabilities/capabilities/commerce-market.js +0 -405
  28. package/vendor/capabilities/capabilities/compute.js +0 -523
  29. package/vendor/capabilities/capabilities/credits.js +0 -83
  30. package/vendor/capabilities/capabilities/evidence.js +0 -145
  31. package/vendor/capabilities/capabilities/external-buckets.js +0 -191
  32. package/vendor/capabilities/capabilities/fleet.js +0 -386
  33. package/vendor/capabilities/capabilities/identity.js +0 -129
  34. package/vendor/capabilities/capabilities/listings.js +0 -398
  35. package/vendor/capabilities/capabilities/locality.js +0 -42
  36. package/vendor/capabilities/capabilities/market-shared.js +0 -46
  37. package/vendor/capabilities/capabilities/markets.js +0 -482
  38. package/vendor/capabilities/capabilities/mounts.js +0 -176
  39. package/vendor/capabilities/capabilities/native-listing.js +0 -99
  40. package/vendor/capabilities/capabilities/networks.js +0 -1264
  41. package/vendor/capabilities/capabilities/observability.js +0 -253
  42. package/vendor/capabilities/capabilities/organization-invites.js +0 -53
  43. package/vendor/capabilities/capabilities/reservation-list.js +0 -68
  44. package/vendor/capabilities/capabilities/staff-shared.js +0 -64
  45. package/vendor/capabilities/capabilities/tokens.js +0 -161
  46. package/vendor/capabilities/capabilities/users.js +0 -157
  47. package/vendor/capabilities/capabilities/volumes.js +0 -178
  48. package/vendor/capabilities/capability.js +0 -99
  49. package/vendor/capabilities/cli-catalog.js +0 -73
  50. package/vendor/capabilities/cli-migrations.js +0 -264
  51. package/vendor/capabilities/names.js +0 -6
  52. package/vendor/capabilities/software-catalog.js +0 -82
  53. package/vendor/capabilities/spec-catalog.js +0 -151
  54. package/vendor/capabilities/supplier-directory.js +0 -20
@@ -0,0 +1,745 @@
1
+ // ../../packages/api-client/dist/commerce/client.js
2
+ var BASE = "/commerce/v2/listings";
3
+ var listingPath = (id2) => `${BASE}/${encodeURIComponent(id2)}`;
4
+ var termsPath = (id2) => `${listingPath(id2)}/terms`;
5
+ var nodePath = (id2, nodeId) => `${listingPath(id2)}/nodes/${encodeURIComponent(nodeId)}`;
6
+ var replayHeaders = (key) => key ? { headers: { "Idempotency-Key": key } } : {};
7
+ function listCapacityListings(request, input = {}, signal) {
8
+ const query = new URLSearchParams();
9
+ for (const [key, value] of Object.entries(input)) {
10
+ if (value == null || value === "")
11
+ continue;
12
+ if (key === "sortLabels" || key === "searchTokens")
13
+ query.set(key, JSON.stringify(value));
14
+ else if (Array.isArray(value)) {
15
+ if (value.length)
16
+ query.set(key, value.join(","));
17
+ } else
18
+ query.set(key, String(value));
19
+ }
20
+ const search = query.toString();
21
+ return request(`${BASE}${search ? `?${search}` : ""}`, {
22
+ method: "GET",
23
+ ...signal ? { signal } : {}
24
+ });
25
+ }
26
+ function getCapacityListing(request, id2, signal) {
27
+ return request(listingPath(id2), {
28
+ method: "GET",
29
+ ...signal ? { signal } : {}
30
+ });
31
+ }
32
+ async function listAllCapacityListings(request, input = {}, signal) {
33
+ const listings = [];
34
+ const seen = /* @__PURE__ */ new Set();
35
+ let cursor = input.cursor;
36
+ for (; ; ) {
37
+ const page = await listCapacityListings(request, { limit: 100, ...input, cursor }, signal);
38
+ listings.push(...page.listings);
39
+ if (!page.nextCursor)
40
+ return { ...page, listings };
41
+ if (seen.has(page.nextCursor))
42
+ throw new Error("Could not finish loading capacity listings. Refresh to try again.");
43
+ seen.add(page.nextCursor);
44
+ cursor = page.nextCursor;
45
+ }
46
+ }
47
+ function listCapacityTerms(request, id2, signal) {
48
+ return request(termsPath(id2), { method: "GET", ...signal ? { signal } : {} });
49
+ }
50
+ function listCapacityTermsBatch(request, listingIds, signal) {
51
+ const query = new URLSearchParams({ listingIds: listingIds.join(",") });
52
+ return request(`${BASE}/terms?${query}`, {
53
+ method: "GET",
54
+ ...signal ? { signal } : {}
55
+ });
56
+ }
57
+ function createCapacityListing(request, body, idempotencyKey) {
58
+ return request(BASE, { method: "POST", body, ...replayHeaders(idempotencyKey) });
59
+ }
60
+ function patchCapacityListing(request, id2, body, idempotencyKey) {
61
+ return request(listingPath(id2), {
62
+ method: "PATCH",
63
+ body,
64
+ ...replayHeaders(idempotencyKey)
65
+ });
66
+ }
67
+ function delistCapacityListing(request, id2) {
68
+ return request(`${listingPath(id2)}/delist`, { method: "POST" });
69
+ }
70
+ function reviewCapacityListing(request, id2, body) {
71
+ return request(`${listingPath(id2)}/review`, { method: "POST", body });
72
+ }
73
+ function addCapacityTerms(request, id2, body, idempotencyKey) {
74
+ return request(termsPath(id2), {
75
+ method: "POST",
76
+ body,
77
+ ...replayHeaders(idempotencyKey)
78
+ });
79
+ }
80
+ function editCapacityTerms(request, id2, termId, body, idempotencyKey) {
81
+ return request(`${termsPath(id2)}/${encodeURIComponent(termId)}`, {
82
+ method: "PATCH",
83
+ body,
84
+ ...replayHeaders(idempotencyKey)
85
+ });
86
+ }
87
+ function deleteCapacityTerms(request, id2, termId) {
88
+ return request(`${termsPath(id2)}/${encodeURIComponent(termId)}`, {
89
+ method: "DELETE"
90
+ });
91
+ }
92
+ function listCapacityNodes(request, id2, signal) {
93
+ return request(`${listingPath(id2)}/nodes`, {
94
+ method: "GET",
95
+ ...signal ? { signal } : {}
96
+ });
97
+ }
98
+ function attachCapacityNode(request, id2, nodeId) {
99
+ return request(nodePath(id2, nodeId), { method: "PUT" });
100
+ }
101
+ function detachCapacityNode(request, id2, nodeId) {
102
+ return request(nodePath(id2, nodeId), { method: "DELETE" });
103
+ }
104
+
105
+ // ../../packages/api-client/dist/commerce/reservations.js
106
+ var BASE2 = "/commerce/reservations";
107
+ var reservationPath = (id2) => `${BASE2}/${encodeURIComponent(id2)}`;
108
+ function listReservations(request, input = {}, signal) {
109
+ const query = new URLSearchParams();
110
+ for (const [key, value] of Object.entries(input)) {
111
+ if (value == null || value === "")
112
+ continue;
113
+ if (Array.isArray(value)) {
114
+ if (value.length)
115
+ query.set(key, value.join(","));
116
+ } else
117
+ query.set(key, String(value));
118
+ }
119
+ const search = query.toString();
120
+ return request(`${BASE2}${search ? `?${search}` : ""}`, {
121
+ method: "GET",
122
+ ...signal ? { signal } : {}
123
+ });
124
+ }
125
+ async function listAllReservations(request, input = {}, signal) {
126
+ const reservations = [];
127
+ let cursor = input.cursor;
128
+ const seen = new Set(cursor ? [cursor] : []);
129
+ for (; ; ) {
130
+ const page = await listReservations(request, { ...input, limit: input.limit ?? 100, cursor }, signal);
131
+ reservations.push(...page.reservations);
132
+ if (!page.nextCursor)
133
+ return { ...page, reservations };
134
+ if (seen.has(page.nextCursor))
135
+ throw new Error("Could not finish loading reservations. Refresh to try again.");
136
+ seen.add(page.nextCursor);
137
+ cursor = page.nextCursor;
138
+ }
139
+ }
140
+ function getReservation(request, id2, signal) {
141
+ return request(reservationPath(id2), {
142
+ method: "GET",
143
+ ...signal ? { signal } : {}
144
+ });
145
+ }
146
+ function patchReservation(request, id2, body) {
147
+ return request(reservationPath(id2), { method: "PATCH", body });
148
+ }
149
+ function activateReservation(request, id2, body) {
150
+ return request(`${reservationPath(id2)}/activate`, {
151
+ method: "POST",
152
+ body
153
+ });
154
+ }
155
+ function cancelReservation(request, id2) {
156
+ return request(`${reservationPath(id2)}/cancel`, { method: "POST" });
157
+ }
158
+ function completeReservation(request, id2) {
159
+ return request(`${reservationPath(id2)}/complete`, { method: "POST" });
160
+ }
161
+ function stopReservation(request, id2, body) {
162
+ return request(reservationPath(id2), {
163
+ method: "DELETE",
164
+ ...body === void 0 ? {} : { body }
165
+ });
166
+ }
167
+ function transferReservation(request, id2, body) {
168
+ return request(`${reservationPath(id2)}/transfer`, {
169
+ method: "POST",
170
+ body
171
+ });
172
+ }
173
+ function setReservationDisk(request, id2, body) {
174
+ return request(`${reservationPath(id2)}/disk`, { method: "PUT", body });
175
+ }
176
+ function addReservationNodes(request, id2, body) {
177
+ return request(`${reservationPath(id2)}/nodes`, { method: "POST", body });
178
+ }
179
+ function relistReservation(request, id2, body, idempotencyKey) {
180
+ return request(`${reservationPath(id2)}/relist`, {
181
+ method: "POST",
182
+ body,
183
+ ...idempotencyKey ? { headers: { "Idempotency-Key": idempotencyKey } } : {}
184
+ });
185
+ }
186
+ function listReservationInvoices(request, id2, signal) {
187
+ return request(`${reservationPath(id2)}/invoices`, {
188
+ method: "GET",
189
+ ...signal ? { signal } : {}
190
+ });
191
+ }
192
+ function getReservationHour(request, id2, hourStartsAt) {
193
+ return request(`${reservationPath(id2)}/hours/${encodeURIComponent(hourStartsAt)}`, {
194
+ method: "GET"
195
+ });
196
+ }
197
+ function listReservationCapacityRevisions(request, id2, signal) {
198
+ return request(`${reservationPath(id2)}/capacity-revisions`, {
199
+ method: "GET",
200
+ ...signal ? { signal } : {}
201
+ });
202
+ }
203
+ function listReservationSshKeys(request, id2, input = {}, signal) {
204
+ const query = input.userId ? `?${new URLSearchParams({ userId: input.userId })}` : "";
205
+ return request(`${reservationPath(id2)}/ssh-keys${query}`, {
206
+ method: "GET",
207
+ ...signal ? { signal } : {}
208
+ });
209
+ }
210
+ function detachReservationSshKey(request, id2, keyId) {
211
+ return request(`${reservationPath(id2)}/ssh-keys/${encodeURIComponent(keyId)}`, {
212
+ method: "DELETE"
213
+ });
214
+ }
215
+ function getReservationUsage(request, input, signal) {
216
+ const query = new URLSearchParams({ from: input.from, to: input.to, bucket: input.bucket });
217
+ if (input.organizationId)
218
+ query.set("organizationId", input.organizationId);
219
+ if (input.groupBy)
220
+ query.set("groupBy", input.groupBy);
221
+ return request(`${BASE2}/usage?${query}`, {
222
+ method: "GET",
223
+ ...signal ? { signal } : {}
224
+ });
225
+ }
226
+
227
+ // ../../packages/api-client/dist/commerce/query.js
228
+ function queryString(input) {
229
+ const query = new URLSearchParams();
230
+ for (const [key, value] of Object.entries(input))
231
+ if (value !== void 0 && value !== null && value !== "")
232
+ query.set(key, String(value));
233
+ const search = query.toString();
234
+ return search ? `?${search}` : "";
235
+ }
236
+
237
+ // ../../packages/api-client/dist/commerce/billing.js
238
+ function listInvoices(request, input = {}, signal) {
239
+ return request("/commerce/invoices" + queryString(input), {
240
+ method: "GET",
241
+ signal
242
+ });
243
+ }
244
+ async function listAllInvoices(request, input = {}, signal) {
245
+ const invoices = [];
246
+ const seen = /* @__PURE__ */ new Set();
247
+ let cursor = input.cursor;
248
+ for (; ; ) {
249
+ const page = await listInvoices(request, { limit: 100, ...input, cursor }, signal);
250
+ invoices.push(...page.invoices);
251
+ if (!page.nextCursor)
252
+ return { ...page, invoices };
253
+ if (seen.has(page.nextCursor))
254
+ throw new Error("Could not finish loading invoices. Refresh to try again.");
255
+ seen.add(page.nextCursor);
256
+ cursor = page.nextCursor;
257
+ }
258
+ }
259
+ function getBillingSummary(request, signal) {
260
+ return request("/commerce/billing/summary", { method: "GET", signal });
261
+ }
262
+ function getShowback(request, input, signal) {
263
+ return request(`/commerce/billing/showback?${new URLSearchParams(input)}`, {
264
+ method: "GET",
265
+ signal
266
+ });
267
+ }
268
+ function getBillingContact(request, signal) {
269
+ return request("/commerce/billing/contact", { method: "GET", signal });
270
+ }
271
+ function getBillingPaymentMethod(request, signal) {
272
+ return request("/commerce/billing/payment-method", {
273
+ method: "GET",
274
+ signal
275
+ });
276
+ }
277
+ function createBillingSetupIntent(request, idempotencyKey) {
278
+ return request("/commerce/billing/setup-intent", {
279
+ method: "POST",
280
+ body: {},
281
+ headers: { "Idempotency-Key": idempotencyKey }
282
+ });
283
+ }
284
+ function setBillingPaymentMethod(request, input, idempotencyKey) {
285
+ return request("/commerce/billing/payment-method", {
286
+ method: "PUT",
287
+ body: input,
288
+ headers: { "Idempotency-Key": idempotencyKey }
289
+ });
290
+ }
291
+ function getInferenceWallet(request, organizationId, signal) {
292
+ return request(`/commerce/billing/inference/${encodeURIComponent(organizationId)}`, {
293
+ method: "GET",
294
+ signal
295
+ });
296
+ }
297
+ function activateInferenceWallet(request, organizationId, input, idempotencyKey) {
298
+ return request(`/commerce/billing/inference/${encodeURIComponent(organizationId)}/activate`, {
299
+ method: "POST",
300
+ body: input,
301
+ headers: { "Idempotency-Key": idempotencyKey }
302
+ });
303
+ }
304
+ function getStorageAgreement(request, signal) {
305
+ return request("/commerce/billing/storage-agreements", {
306
+ method: "GET",
307
+ signal
308
+ });
309
+ }
310
+ function getStorageBill(request, organizationId, month, signal) {
311
+ return request(`/v1/organizations/${encodeURIComponent(organizationId)}/storage-bill?${new URLSearchParams({ month })}`, { method: "GET", signal });
312
+ }
313
+
314
+ // ../../packages/api-client/dist/commerce/compute-deals.js
315
+ var deals = "/internal/v1/gtm/compute-deals";
316
+ var dealPath = (id2) => `${deals}/${encodeURIComponent(id2)}`;
317
+ var addOns = (id2) => `${dealPath(id2)}/add-ons`;
318
+ function listComputeDeals(request, input = {}, signal) {
319
+ return request(deals + queryString(input), { method: "GET", signal });
320
+ }
321
+ async function listAllComputeDeals(request, signal) {
322
+ const deals2 = [];
323
+ const seen = /* @__PURE__ */ new Set();
324
+ let after;
325
+ for (; ; ) {
326
+ const page = await listComputeDeals(request, { after }, signal);
327
+ deals2.push(...page.deals);
328
+ if (!page.nextCursor)
329
+ return { ...page, deals: deals2 };
330
+ if (seen.has(page.nextCursor))
331
+ throw new Error("Compute deals returned an incomplete list.");
332
+ seen.add(page.nextCursor);
333
+ after = page.nextCursor;
334
+ }
335
+ }
336
+ function createComputeDeal(request, body) {
337
+ return request(deals, { method: "POST", body });
338
+ }
339
+ function updateComputeDeal(request, id2, body) {
340
+ return request(dealPath(id2), { method: "PUT", body });
341
+ }
342
+ function deleteComputeDeal(request, id2, body) {
343
+ return request(dealPath(id2), { method: "DELETE", body });
344
+ }
345
+ function listComputeDealAddOns(request, id2, signal) {
346
+ return request(addOns(id2), { method: "GET", signal });
347
+ }
348
+ function createComputeDealAddOn(request, id2, body) {
349
+ return request(addOns(id2), { method: "POST", body });
350
+ }
351
+ function updateComputeDealAddOn(request, id2, addOnId, body) {
352
+ return request(`${addOns(id2)}/${encodeURIComponent(addOnId)}`, {
353
+ method: "PUT",
354
+ body
355
+ });
356
+ }
357
+ function deleteComputeDealAddOn(request, id2, addOnId, body) {
358
+ return request(`${addOns(id2)}/${encodeURIComponent(addOnId)}`, {
359
+ method: "DELETE",
360
+ body
361
+ });
362
+ }
363
+
364
+ // ../../packages/api-client/dist/commerce/staff.js
365
+ function listDowntime(request, input = {}, signal) {
366
+ return request("/internal/v1/downtime" + queryString(input), {
367
+ method: "GET",
368
+ signal
369
+ });
370
+ }
371
+ function createDowntime(request, body) {
372
+ return request("/internal/v1/downtime", { method: "POST", body });
373
+ }
374
+ function updateDowntime(request, id2, body) {
375
+ return request(`/internal/v1/downtime/${encodeURIComponent(id2)}`, {
376
+ method: "PUT",
377
+ body
378
+ });
379
+ }
380
+ var adjustments = (organizationId) => `/internal/v1/organizations/${encodeURIComponent(organizationId)}/credit-adjustments`;
381
+ function listCreditAdjustments(request, organizationId, signal) {
382
+ return request(adjustments(organizationId), { method: "GET", signal });
383
+ }
384
+ function createCreditAdjustment(request, organizationId, body) {
385
+ return request(adjustments(organizationId), {
386
+ method: "POST",
387
+ body
388
+ });
389
+ }
390
+ function listAdminInvoices(request, input = {}, signal) {
391
+ return request("/internal/v1/invoices" + queryString(input), {
392
+ method: "GET",
393
+ signal
394
+ });
395
+ }
396
+ function getCommerceOrganization(request, id2, signal) {
397
+ return request(`/internal/v1/organizations/${encodeURIComponent(id2)}`, {
398
+ method: "GET",
399
+ signal
400
+ });
401
+ }
402
+
403
+ // ../../packages/api-client/dist/commerce/gtm.js
404
+ var base = "/internal/v1/gtm";
405
+ var id = (value) => encodeURIComponent(String(value));
406
+ function listGTMCompanies(request, input = {}, signal) {
407
+ return request(base + "/companies" + queryString(input), { method: "GET", signal });
408
+ }
409
+ function createGTMCompany(request, body) {
410
+ return request(base + "/companies", { method: "POST", body });
411
+ }
412
+ function updateGTMCompany(request, recordId, body) {
413
+ return request(`${base}/companies/${id(recordId)}`, {
414
+ method: "PATCH",
415
+ body
416
+ });
417
+ }
418
+ function deleteGTMCompany(request, recordId) {
419
+ return request(`${base}/companies/${id(recordId)}`, { method: "DELETE" });
420
+ }
421
+ function listGTMDeals(request, input = {}, signal) {
422
+ return request(base + "/deals" + queryString(input), { method: "GET", signal });
423
+ }
424
+ function createGTMDeal(request, body) {
425
+ return request(base + "/deals", { method: "POST", body });
426
+ }
427
+ function updateGTMDeal(request, recordId, body) {
428
+ return request(`${base}/deals/${id(recordId)}`, { method: "PATCH", body });
429
+ }
430
+ function listGTMTasks(request, input = {}, signal) {
431
+ return request(base + "/tasks" + queryString(input), { method: "GET", signal });
432
+ }
433
+ function createGTMTask(request, body) {
434
+ return request(base + "/tasks", { method: "POST", body });
435
+ }
436
+ function updateGTMTask(request, recordId, body) {
437
+ return request(`${base}/tasks/${id(recordId)}`, { method: "PATCH", body });
438
+ }
439
+ function deleteGTMTask(request, recordId) {
440
+ return request(`${base}/tasks/${id(recordId)}`, { method: "DELETE" });
441
+ }
442
+ function listGTMCompanyComments(request, recordId, input = {}) {
443
+ return request(`${base}/companies/${id(recordId)}/comments` + queryString(input), {
444
+ method: "GET"
445
+ });
446
+ }
447
+ function createGTMCompanyComment(request, recordId, body) {
448
+ return request(`${base}/companies/${id(recordId)}/comments`, {
449
+ method: "POST",
450
+ body
451
+ });
452
+ }
453
+ function listGTMDealComments(request, recordId, input = {}) {
454
+ return request(`${base}/deals/${id(recordId)}/comments` + queryString(input), {
455
+ method: "GET"
456
+ });
457
+ }
458
+ function createGTMDealComment(request, recordId, body) {
459
+ return request(`${base}/deals/${id(recordId)}/comments`, {
460
+ method: "POST",
461
+ body
462
+ });
463
+ }
464
+ function listGTMTaskComments(request, recordId, input = {}) {
465
+ return request(`${base}/tasks/${id(recordId)}/comments` + queryString(input), {
466
+ method: "GET"
467
+ });
468
+ }
469
+ function createGTMTaskComment(request, recordId, body) {
470
+ return request(`${base}/tasks/${id(recordId)}/comments`, {
471
+ method: "POST",
472
+ body
473
+ });
474
+ }
475
+ function updateGTMComment(request, recordId, body) {
476
+ return request(`${base}/comments/${id(recordId)}`, {
477
+ method: "PATCH",
478
+ body
479
+ });
480
+ }
481
+ function deleteGTMComment(request, recordId) {
482
+ return request(`${base}/comments/${id(recordId)}`, { method: "DELETE" });
483
+ }
484
+ function getGTMPersonalWorkspace(request) {
485
+ return request(base + "/me", { method: "GET" });
486
+ }
487
+ function listGTMPeople(request) {
488
+ return request(base + "/people", { method: "GET" });
489
+ }
490
+ function getGTMTicket(request, recordId) {
491
+ return request(`${base}/tasks/${id(recordId)}`, { method: "GET" });
492
+ }
493
+ function listTicketActivity(request, recordId) {
494
+ return request(`${base}/tasks/${id(recordId)}/activity`, { method: "GET" });
495
+ }
496
+
497
+ // ../../packages/api-client/dist/commerce/contracts.js
498
+ var base2 = "/internal/v1/gtm/contracts";
499
+ function listContractFiles(request, input = {}, signal) {
500
+ return request(base2 + queryString(input), { method: "GET", signal });
501
+ }
502
+ async function listAllContractFiles(request, signal) {
503
+ const files = [];
504
+ const seen = /* @__PURE__ */ new Set();
505
+ let cursor;
506
+ for (; ; ) {
507
+ const page = await listContractFiles(request, { cursor }, signal);
508
+ files.push(...page.files);
509
+ if (!page.nextCursor)
510
+ return { ...page, files };
511
+ if (seen.has(page.nextCursor))
512
+ throw new Error("Contracts returned an incomplete file list.");
513
+ seen.add(page.nextCursor);
514
+ cursor = page.nextCursor;
515
+ }
516
+ }
517
+ function deleteContractFile(request, id2) {
518
+ return request(`${base2}/${encodeURIComponent(id2)}`, { method: "DELETE" });
519
+ }
520
+
521
+ // ../../packages/api-client/dist/commerce/facilities.js
522
+ function listFacilities(request, input = {}, signal) {
523
+ return request("/commerce/facilities" + queryString(input), { method: "GET", signal });
524
+ }
525
+ function listAllFacilities(request, input = {}, signal) {
526
+ return collectFacilities((query) => listFacilities(request, query, signal), input);
527
+ }
528
+ function listStaffFacilities(request, input = {}, signal) {
529
+ return request("/internal/v1/facilities" + queryString(input), {
530
+ method: "GET",
531
+ signal
532
+ });
533
+ }
534
+ function listAllStaffFacilities(request, input = {}, signal) {
535
+ return collectFacilities((query) => listStaffFacilities(request, query, signal), input);
536
+ }
537
+ function getStaffFacility(request, id2, signal) {
538
+ return request(`/internal/v1/facilities/${encodeURIComponent(id2)}`, {
539
+ method: "GET",
540
+ signal
541
+ });
542
+ }
543
+ function ensureFacility(request, body) {
544
+ return request("/internal/v1/facilities/ensure", {
545
+ method: "POST",
546
+ body
547
+ });
548
+ }
549
+ function createFacility(request, body) {
550
+ return request("/internal/v1/facilities", { method: "POST", body });
551
+ }
552
+ function patchFacility(request, id2, body) {
553
+ return request(`/internal/v1/facilities/${encodeURIComponent(id2)}`, {
554
+ method: "PATCH",
555
+ body
556
+ });
557
+ }
558
+ async function collectFacilities(readPage, input) {
559
+ const facilities = [];
560
+ const seen = /* @__PURE__ */ new Set();
561
+ let cursor = input.cursor;
562
+ for (let count = 0; count < 50; count++) {
563
+ const page = await readPage({ limit: 100, ...input, cursor });
564
+ facilities.push(...page.facilities);
565
+ if (!page.nextCursor)
566
+ return { ...page, facilities };
567
+ if (seen.has(page.nextCursor))
568
+ throw new Error("The facility catalog returned a repeated page.");
569
+ seen.add(page.nextCursor);
570
+ cursor = page.nextCursor;
571
+ }
572
+ throw new Error("The facility catalog is too large to load completely.");
573
+ }
574
+
575
+ // ../../packages/api-client/dist/commerce/supplier-payments.js
576
+ function getSupplierPaymentAccount(request, signal) {
577
+ return request("/commerce/supplier/payment-account", { method: "GET", signal });
578
+ }
579
+ function createSupplierPaymentAccount(request, signal) {
580
+ return request("/commerce/supplier/payment-account", {
581
+ method: "POST",
582
+ body: {},
583
+ signal
584
+ });
585
+ }
586
+ function createSupplierAccountSession(request, body, signal) {
587
+ return request("/commerce/supplier/payment-account/session", {
588
+ method: "POST",
589
+ body,
590
+ signal
591
+ });
592
+ }
593
+
594
+ // ../../packages/api-client/dist/commerce/supplier-intake.js
595
+ var base3 = "/internal/v1/supplier-intake";
596
+ function listSupplierIntakeLinks(request) {
597
+ return request(base3 + "/links", { method: "GET" });
598
+ }
599
+ function createSupplierIntakeLink(request, body) {
600
+ return request(base3 + "/links", { method: "POST", body });
601
+ }
602
+ function revokeSupplierIntakeLink(request, id2) {
603
+ return request(`${base3}/links/${encodeURIComponent(id2)}/revoke`, { method: "POST" });
604
+ }
605
+ function listSupplierIntakeSubmissions(request, input = {}) {
606
+ return request(base3 + "/submissions" + queryString(input), { method: "GET" });
607
+ }
608
+ function getSupplierIntakeSubmission(request, id2) {
609
+ return request(`${base3}/submissions/${encodeURIComponent(id2)}`, { method: "GET" });
610
+ }
611
+ function reviewSupplierIntakeSubmission(request, id2) {
612
+ return request(`${base3}/submissions/${encodeURIComponent(id2)}/review`, {
613
+ method: "POST"
614
+ });
615
+ }
616
+
617
+ // ../../packages/api-client/dist/commerce/licenses.js
618
+ var base4 = "/internal/v1/controlplane-licenses";
619
+ function listControlplaneLicenses(request, signal) {
620
+ return request(base4, { method: "GET", signal });
621
+ }
622
+ function getControlplaneLicense(request, id2) {
623
+ return request(`${base4}/${encodeURIComponent(id2)}`, {
624
+ method: "GET"
625
+ });
626
+ }
627
+ function createControlplaneLicense(request, body) {
628
+ return request(base4, { method: "POST", body });
629
+ }
630
+ function revokeControlplaneLicense(request, id2) {
631
+ return request(`${base4}/${encodeURIComponent(id2)}/revoke`, {
632
+ method: "POST",
633
+ body: {}
634
+ });
635
+ }
636
+ export {
637
+ activateInferenceWallet,
638
+ activateReservation,
639
+ addCapacityTerms,
640
+ addReservationNodes,
641
+ attachCapacityNode,
642
+ cancelReservation,
643
+ completeReservation,
644
+ createBillingSetupIntent,
645
+ createCapacityListing,
646
+ createComputeDeal,
647
+ createComputeDealAddOn,
648
+ createControlplaneLicense,
649
+ createCreditAdjustment,
650
+ createDowntime,
651
+ createFacility,
652
+ createGTMCompany,
653
+ createGTMCompanyComment,
654
+ createGTMDeal,
655
+ createGTMDealComment,
656
+ createGTMTask,
657
+ createGTMTaskComment,
658
+ createSupplierAccountSession,
659
+ createSupplierIntakeLink,
660
+ createSupplierPaymentAccount,
661
+ deleteCapacityTerms,
662
+ deleteComputeDeal,
663
+ deleteComputeDealAddOn,
664
+ deleteContractFile,
665
+ deleteGTMComment,
666
+ deleteGTMCompany,
667
+ deleteGTMTask,
668
+ delistCapacityListing,
669
+ detachCapacityNode,
670
+ detachReservationSshKey,
671
+ editCapacityTerms,
672
+ ensureFacility,
673
+ getBillingContact,
674
+ getBillingPaymentMethod,
675
+ getBillingSummary,
676
+ getCapacityListing,
677
+ getCommerceOrganization,
678
+ getControlplaneLicense,
679
+ getGTMPersonalWorkspace,
680
+ getGTMTicket,
681
+ getInferenceWallet,
682
+ getReservation,
683
+ getReservationHour,
684
+ getReservationUsage,
685
+ getShowback,
686
+ getStaffFacility,
687
+ getStorageAgreement,
688
+ getStorageBill,
689
+ getSupplierIntakeSubmission,
690
+ getSupplierPaymentAccount,
691
+ listAdminInvoices,
692
+ listAllCapacityListings,
693
+ listAllComputeDeals,
694
+ listAllContractFiles,
695
+ listAllFacilities,
696
+ listAllInvoices,
697
+ listAllReservations,
698
+ listAllStaffFacilities,
699
+ listCapacityListings,
700
+ listCapacityNodes,
701
+ listCapacityTerms,
702
+ listCapacityTermsBatch,
703
+ listComputeDealAddOns,
704
+ listComputeDeals,
705
+ listContractFiles,
706
+ listControlplaneLicenses,
707
+ listCreditAdjustments,
708
+ listDowntime,
709
+ listFacilities,
710
+ listGTMCompanies,
711
+ listGTMCompanyComments,
712
+ listGTMDealComments,
713
+ listGTMDeals,
714
+ listGTMPeople,
715
+ listGTMTaskComments,
716
+ listGTMTasks,
717
+ listInvoices,
718
+ listReservationCapacityRevisions,
719
+ listReservationInvoices,
720
+ listReservationSshKeys,
721
+ listReservations,
722
+ listStaffFacilities,
723
+ listSupplierIntakeLinks,
724
+ listSupplierIntakeSubmissions,
725
+ listTicketActivity,
726
+ patchCapacityListing,
727
+ patchFacility,
728
+ patchReservation,
729
+ relistReservation,
730
+ reviewCapacityListing,
731
+ reviewSupplierIntakeSubmission,
732
+ revokeControlplaneLicense,
733
+ revokeSupplierIntakeLink,
734
+ setBillingPaymentMethod,
735
+ setReservationDisk,
736
+ stopReservation,
737
+ transferReservation,
738
+ updateComputeDeal,
739
+ updateComputeDealAddOn,
740
+ updateDowntime,
741
+ updateGTMComment,
742
+ updateGTMCompany,
743
+ updateGTMDeal,
744
+ updateGTMTask
745
+ };