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