@ornncompute/cli 1.0.211 → 1.0.212

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ornncompute/cli",
3
- "version": "1.0.211",
3
+ "version": "1.0.212",
4
4
  "description": "Command-line interface for Ornn compute access workflows.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -392,6 +392,31 @@ function deleteComputeDealAddOn(request, id2, addOnId, body) {
392
392
  body
393
393
  });
394
394
  }
395
+ function listComputeDealAddOnCollection(request, input, signal) {
396
+ const { deal_id, ...filters } = input;
397
+ const query = new URLSearchParams(queryString(filters));
398
+ for (const id2 of deal_id)
399
+ query.append("deal_id", id2);
400
+ return request(`/internal/v1/gtm/compute-deal-add-ons?${query}`, {
401
+ method: "GET",
402
+ signal
403
+ });
404
+ }
405
+ async function listAllComputeDealAddOns(request, input, signal) {
406
+ const addOns2 = [];
407
+ const seen = /* @__PURE__ */ new Set();
408
+ let cursor;
409
+ for (; ; ) {
410
+ const page = await listComputeDealAddOnCollection(request, { ...input, cursor }, signal);
411
+ addOns2.push(...page.addOns);
412
+ if (!page.nextCursor)
413
+ return { ...page, addOns: addOns2 };
414
+ if (seen.has(page.nextCursor))
415
+ throw new Error("Compute deal add-ons returned an incomplete list.");
416
+ seen.add(page.nextCursor);
417
+ cursor = page.nextCursor;
418
+ }
419
+ }
395
420
 
396
421
  // ../../packages/api-client/dist/commerce/compute-contracts.js
397
422
  var contracts = "/internal/v1/gtm/compute-contracts";
@@ -759,18 +784,22 @@ function getGTMTicket(request, recordId) {
759
784
  function listTicketActivity(request, recordId) {
760
785
  return request(`${base2}/tasks/${id(recordId)}/activity`, { method: "GET" });
761
786
  }
762
- function listGTMListingComments(request, input, signal) {
763
- return request(base2 + "/comments" + queryString(input), {
787
+ function listGTMComments(request, input, signal) {
788
+ const { company_id, ...filters } = input;
789
+ const query = new URLSearchParams(queryString(filters));
790
+ for (const id2 of company_id ?? [])
791
+ query.append("company_id", String(id2));
792
+ return request(base2 + "/comments" + (query.size ? `?${query}` : ""), {
764
793
  method: "GET",
765
794
  signal
766
795
  });
767
796
  }
768
- async function listAllGTMListingComments(request, input, signal) {
797
+ async function listAllGTMComments(request, input, signal) {
769
798
  const rows = [];
770
799
  const seen = /* @__PURE__ */ new Set();
771
800
  let cursor;
772
801
  for (; ; ) {
773
- const page = await listGTMListingComments(request, { ...input, cursor }, signal);
802
+ const page = await listGTMComments(request, { ...input, cursor }, signal);
774
803
  rows.push(...page.comments);
775
804
  if (!page.next_cursor)
776
805
  return rows;
@@ -1291,12 +1320,13 @@ export {
1291
1320
  listAdminInvoices,
1292
1321
  listAllCapacityListings,
1293
1322
  listAllComputeContracts,
1323
+ listAllComputeDealAddOns,
1294
1324
  listAllComputeDeals,
1295
1325
  listAllComputeDealsV2,
1296
1326
  listAllContractExtractions,
1297
1327
  listAllContractFiles,
1298
1328
  listAllFacilities,
1299
- listAllGTMListingComments,
1329
+ listAllGTMComments,
1300
1330
  listAllInvoices,
1301
1331
  listAllReservations,
1302
1332
  listAllStaffFacilities,
@@ -1319,6 +1349,7 @@ export {
1319
1349
  listComputeContractRevenueShareTerms,
1320
1350
  listComputeContracts,
1321
1351
  listComputeDealAcceptanceDecisions,
1352
+ listComputeDealAddOnCollection,
1322
1353
  listComputeDealAddOns,
1323
1354
  listComputeDealAllocations,
1324
1355
  listComputeDealPlanningAddOns,
@@ -1331,11 +1362,11 @@ export {
1331
1362
  listCreditAdjustments,
1332
1363
  listDowntime,
1333
1364
  listFacilities,
1365
+ listGTMComments,
1334
1366
  listGTMCompanies,
1335
1367
  listGTMCompanyComments,
1336
1368
  listGTMDealComments,
1337
1369
  listGTMDeals,
1338
- listGTMListingComments,
1339
1370
  listGTMPeople,
1340
1371
  listGTMTaskComments,
1341
1372
  listGTMTasks,
@@ -3467,7 +3467,9 @@ function queryString2(input) {
3467
3467
  return query3.size ? `?${query3}` : "";
3468
3468
  }
3469
3469
  function listAccounts(request, input = {}, signal) {
3470
- return request(`/v1/ledger/accounts${queryString2(input)}`, {
3470
+ return request(`/v1/ledger/accounts${queryString2({
3471
+ organization_id: Array.isArray(input.organization_id) ? input.organization_id.join(",") : input.organization_id
3472
+ })}`, {
3471
3473
  method: "GET",
3472
3474
  signal
3473
3475
  });