@ornncompute/cli 1.0.166 → 1.0.167
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 +1 -1
- package/vendor/api-client/commerce.js +146 -8
package/package.json
CHANGED
|
@@ -376,8 +376,14 @@ var contractPath = (id2) => `${contracts}/${encodeURIComponent(id2)}`;
|
|
|
376
376
|
var documents = (id2) => `${contractPath(id2)}/documents`;
|
|
377
377
|
var lines = (id2) => `${contractPath(id2)}/lines`;
|
|
378
378
|
var delayPenalties = (id2) => `${contractPath(id2)}/delay-penalties`;
|
|
379
|
-
function listComputeContracts(request, input = {}, signal) {
|
|
380
|
-
|
|
379
|
+
async function listComputeContracts(request, input = {}, signal) {
|
|
380
|
+
const page = await request(contracts + queryString(input), {
|
|
381
|
+
method: "GET",
|
|
382
|
+
signal
|
|
383
|
+
});
|
|
384
|
+
if (input.listingId && page.listingId !== input.listingId || input.lineId && page.lineId !== input.lineId)
|
|
385
|
+
throw new Error("Compute contracts did not confirm the requested scope.");
|
|
386
|
+
return page;
|
|
381
387
|
}
|
|
382
388
|
async function listAllComputeContracts(request, filter = {}, signal) {
|
|
383
389
|
const contracts2 = [];
|
|
@@ -424,8 +430,14 @@ function deleteComputeContractDocument(request, id2, documentId, body) {
|
|
|
424
430
|
body
|
|
425
431
|
});
|
|
426
432
|
}
|
|
427
|
-
function listComputeContractLines(request, id2, signal) {
|
|
428
|
-
|
|
433
|
+
async function listComputeContractLines(request, id2, signal, input = {}) {
|
|
434
|
+
const page = await request(lines(id2) + queryString(input), {
|
|
435
|
+
method: "GET",
|
|
436
|
+
signal
|
|
437
|
+
});
|
|
438
|
+
if (input.listingId && page.listingId !== input.listingId)
|
|
439
|
+
throw new Error("Compute contract lines did not confirm the requested scope.");
|
|
440
|
+
return page;
|
|
429
441
|
}
|
|
430
442
|
function createComputeContractLine(request, id2, body) {
|
|
431
443
|
return request(lines(id2), { method: "POST", body });
|
|
@@ -545,6 +557,12 @@ function createCreditAdjustment(request, organizationId, body) {
|
|
|
545
557
|
body
|
|
546
558
|
});
|
|
547
559
|
}
|
|
560
|
+
function getAdminInvoice(request, id2, signal) {
|
|
561
|
+
return request(`/internal/v1/invoices/${encodeURIComponent(id2)}`, {
|
|
562
|
+
method: "GET",
|
|
563
|
+
...signal ? { signal } : {}
|
|
564
|
+
});
|
|
565
|
+
}
|
|
548
566
|
function listAdminInvoices(request, input = {}, signal) {
|
|
549
567
|
return request("/internal/v1/invoices" + queryString(input), {
|
|
550
568
|
method: "GET",
|
|
@@ -636,8 +654,11 @@ function updateGTMComment(request, recordId, body) {
|
|
|
636
654
|
body
|
|
637
655
|
});
|
|
638
656
|
}
|
|
639
|
-
function deleteGTMComment(request, recordId) {
|
|
640
|
-
return request(`${base}/comments/${id(recordId)}`, {
|
|
657
|
+
function deleteGTMComment(request, recordId, input) {
|
|
658
|
+
return request(`${base}/comments/${id(recordId)}`, {
|
|
659
|
+
method: "DELETE",
|
|
660
|
+
...input ? { body: input } : {}
|
|
661
|
+
});
|
|
641
662
|
}
|
|
642
663
|
function getGTMPersonalWorkspace(request) {
|
|
643
664
|
return request(base + "/me", { method: "GET" });
|
|
@@ -651,6 +672,33 @@ function getGTMTicket(request, recordId) {
|
|
|
651
672
|
function listTicketActivity(request, recordId) {
|
|
652
673
|
return request(`${base}/tasks/${id(recordId)}/activity`, { method: "GET" });
|
|
653
674
|
}
|
|
675
|
+
function listGTMListingComments(request, input, signal) {
|
|
676
|
+
return request(base + "/comments" + queryString(input), {
|
|
677
|
+
method: "GET",
|
|
678
|
+
signal
|
|
679
|
+
});
|
|
680
|
+
}
|
|
681
|
+
async function listAllGTMListingComments(request, input, signal) {
|
|
682
|
+
const rows = [];
|
|
683
|
+
const seen = /* @__PURE__ */ new Set();
|
|
684
|
+
let cursor;
|
|
685
|
+
for (; ; ) {
|
|
686
|
+
const page = await listGTMListingComments(request, { ...input, cursor }, signal);
|
|
687
|
+
rows.push(...page.comments);
|
|
688
|
+
if (!page.next_cursor)
|
|
689
|
+
return rows;
|
|
690
|
+
if (seen.has(page.next_cursor))
|
|
691
|
+
throw new Error("The update feed returned an incomplete page. Retry the feed.");
|
|
692
|
+
seen.add(page.next_cursor);
|
|
693
|
+
cursor = page.next_cursor;
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
function getGTMDealDelivery(request, recordId, signal) {
|
|
697
|
+
return request(`${base}/deals/${id(recordId)}/delivery`, {
|
|
698
|
+
method: "GET",
|
|
699
|
+
signal
|
|
700
|
+
});
|
|
701
|
+
}
|
|
654
702
|
|
|
655
703
|
// ../../packages/api-client/dist/commerce/contracts.js
|
|
656
704
|
var base2 = "/internal/v1/gtm/contracts";
|
|
@@ -832,8 +880,29 @@ function revokeControlplaneLicense(request, id2) {
|
|
|
832
880
|
// ../../packages/api-client/dist/commerce/compute-deal-allocations.js
|
|
833
881
|
var root = "/internal/v2/gtm/compute-deals";
|
|
834
882
|
var dealPath2 = (id2) => `${root}/${encodeURIComponent(id2)}`;
|
|
835
|
-
function listComputeDealsV2(request, input = {}, signal) {
|
|
836
|
-
|
|
883
|
+
async function listComputeDealsV2(request, input = {}, signal) {
|
|
884
|
+
const page = await request(root + queryString(input), {
|
|
885
|
+
method: "GET",
|
|
886
|
+
signal
|
|
887
|
+
});
|
|
888
|
+
if (input.listingId && page.listingId !== input.listingId || input.supplyLineId && page.supplyLineId !== input.supplyLineId)
|
|
889
|
+
throw new Error("Compute deals did not confirm the requested scope.");
|
|
890
|
+
return page;
|
|
891
|
+
}
|
|
892
|
+
async function listAllComputeDealsV2(request, input = {}, signal) {
|
|
893
|
+
const deals2 = [];
|
|
894
|
+
const seen = /* @__PURE__ */ new Set();
|
|
895
|
+
let after;
|
|
896
|
+
for (; ; ) {
|
|
897
|
+
const page = await listComputeDealsV2(request, { ...input, after }, signal);
|
|
898
|
+
deals2.push(...page.deals);
|
|
899
|
+
if (!page.nextCursor)
|
|
900
|
+
return { ...page, deals: deals2 };
|
|
901
|
+
if (seen.has(page.nextCursor))
|
|
902
|
+
throw new Error("Compute deals returned an incomplete list.");
|
|
903
|
+
seen.add(page.nextCursor);
|
|
904
|
+
after = page.nextCursor;
|
|
905
|
+
}
|
|
837
906
|
}
|
|
838
907
|
function getComputeDealV2(request, id2, signal) {
|
|
839
908
|
return request(dealPath2(id2), { method: "GET", signal });
|
|
@@ -904,6 +973,62 @@ function listComputeDealVersions(request, id2, input = {}, signal) {
|
|
|
904
973
|
signal
|
|
905
974
|
});
|
|
906
975
|
}
|
|
976
|
+
|
|
977
|
+
// ../../packages/api-client/dist/commerce/compute-contract-payments.js
|
|
978
|
+
var base6 = (id2) => `/internal/v1/gtm/compute-contracts/${encodeURIComponent(id2)}/payment-evidence`;
|
|
979
|
+
function listComputeContractPaymentEvidence(request, id2, signal) {
|
|
980
|
+
return request(base6(id2), {
|
|
981
|
+
method: "GET",
|
|
982
|
+
signal
|
|
983
|
+
});
|
|
984
|
+
}
|
|
985
|
+
function createComputeContractPaymentEvidence(request, id2, body) {
|
|
986
|
+
return request(base6(id2), {
|
|
987
|
+
method: "POST",
|
|
988
|
+
body
|
|
989
|
+
});
|
|
990
|
+
}
|
|
991
|
+
function deleteComputeContractPaymentEvidence(request, id2, evidenceId, version) {
|
|
992
|
+
return request(`${base6(id2)}/${encodeURIComponent(evidenceId)}`, {
|
|
993
|
+
method: "DELETE",
|
|
994
|
+
body: { confirmed: true, version }
|
|
995
|
+
});
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
// ../../packages/api-client/dist/commerce/compute-deal-acceptance.js
|
|
999
|
+
var base7 = (dealId, allocationId) => `/internal/v2/gtm/compute-deals/${encodeURIComponent(dealId)}/allocations/${encodeURIComponent(allocationId)}/acceptance-decisions`;
|
|
1000
|
+
function listComputeDealAcceptanceDecisions(request, dealId, allocationId, signal) {
|
|
1001
|
+
return request(base7(dealId, allocationId), {
|
|
1002
|
+
method: "GET",
|
|
1003
|
+
signal
|
|
1004
|
+
});
|
|
1005
|
+
}
|
|
1006
|
+
function createComputeDealAcceptanceDecision(request, dealId, allocationId, body) {
|
|
1007
|
+
return request(base7(dealId, allocationId), {
|
|
1008
|
+
method: "POST",
|
|
1009
|
+
body
|
|
1010
|
+
});
|
|
1011
|
+
}
|
|
1012
|
+
function deleteComputeDealAcceptanceDecision(request, dealId, allocationId, decisionId, body) {
|
|
1013
|
+
return request(`${base7(dealId, allocationId)}/${encodeURIComponent(decisionId)}`, {
|
|
1014
|
+
method: "DELETE",
|
|
1015
|
+
body
|
|
1016
|
+
});
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
// ../../packages/api-client/dist/commerce/gtm-diligence.js
|
|
1020
|
+
function getGTMDealDiligence(request, dealId, signal) {
|
|
1021
|
+
return request(`/internal/v1/gtm/deals/${encodeURIComponent(dealId)}/diligence`, {
|
|
1022
|
+
method: "GET",
|
|
1023
|
+
signal
|
|
1024
|
+
});
|
|
1025
|
+
}
|
|
1026
|
+
function updateGTMDealDiligence(request, dealId, input) {
|
|
1027
|
+
return request(`/internal/v1/gtm/deals/${encodeURIComponent(dealId)}/diligence`, {
|
|
1028
|
+
method: "PUT",
|
|
1029
|
+
body: input
|
|
1030
|
+
});
|
|
1031
|
+
}
|
|
907
1032
|
export {
|
|
908
1033
|
activateInferenceWallet,
|
|
909
1034
|
activateReservation,
|
|
@@ -918,7 +1043,9 @@ export {
|
|
|
918
1043
|
createComputeContractDelayPenalty,
|
|
919
1044
|
createComputeContractDocument,
|
|
920
1045
|
createComputeContractLine,
|
|
1046
|
+
createComputeContractPaymentEvidence,
|
|
921
1047
|
createComputeDeal,
|
|
1048
|
+
createComputeDealAcceptanceDecision,
|
|
922
1049
|
createComputeDealAddOn,
|
|
923
1050
|
createComputeDealAllocation,
|
|
924
1051
|
createComputeDealPlanningAddOn,
|
|
@@ -942,7 +1069,9 @@ export {
|
|
|
942
1069
|
deleteComputeContractDelayPenalty,
|
|
943
1070
|
deleteComputeContractDocument,
|
|
944
1071
|
deleteComputeContractLine,
|
|
1072
|
+
deleteComputeContractPaymentEvidence,
|
|
945
1073
|
deleteComputeDeal,
|
|
1074
|
+
deleteComputeDealAcceptanceDecision,
|
|
946
1075
|
deleteComputeDealAddOn,
|
|
947
1076
|
deleteComputeDealAllocation,
|
|
948
1077
|
deleteComputeDealPlanningAddOn,
|
|
@@ -958,6 +1087,7 @@ export {
|
|
|
958
1087
|
editCapacityTerms,
|
|
959
1088
|
ensureFacility,
|
|
960
1089
|
facilityEnsurePath,
|
|
1090
|
+
getAdminInvoice,
|
|
961
1091
|
getBillingContact,
|
|
962
1092
|
getBillingPaymentMethod,
|
|
963
1093
|
getBillingSummary,
|
|
@@ -971,6 +1101,8 @@ export {
|
|
|
971
1101
|
getContractExtraction,
|
|
972
1102
|
getContractFile,
|
|
973
1103
|
getControlplaneLicense,
|
|
1104
|
+
getGTMDealDelivery,
|
|
1105
|
+
getGTMDealDiligence,
|
|
974
1106
|
getGTMPersonalWorkspace,
|
|
975
1107
|
getGTMTicket,
|
|
976
1108
|
getInferenceWallet,
|
|
@@ -991,9 +1123,11 @@ export {
|
|
|
991
1123
|
listAllCapacityListings,
|
|
992
1124
|
listAllComputeContracts,
|
|
993
1125
|
listAllComputeDeals,
|
|
1126
|
+
listAllComputeDealsV2,
|
|
994
1127
|
listAllContractExtractions,
|
|
995
1128
|
listAllContractFiles,
|
|
996
1129
|
listAllFacilities,
|
|
1130
|
+
listAllGTMListingComments,
|
|
997
1131
|
listAllInvoices,
|
|
998
1132
|
listAllReservations,
|
|
999
1133
|
listAllStaffFacilities,
|
|
@@ -1006,7 +1140,9 @@ export {
|
|
|
1006
1140
|
listComputeContractLineCapacity,
|
|
1007
1141
|
listComputeContractLineMatches,
|
|
1008
1142
|
listComputeContractLines,
|
|
1143
|
+
listComputeContractPaymentEvidence,
|
|
1009
1144
|
listComputeContracts,
|
|
1145
|
+
listComputeDealAcceptanceDecisions,
|
|
1010
1146
|
listComputeDealAddOns,
|
|
1011
1147
|
listComputeDealAllocations,
|
|
1012
1148
|
listComputeDealPlanningAddOns,
|
|
@@ -1023,6 +1159,7 @@ export {
|
|
|
1023
1159
|
listGTMCompanyComments,
|
|
1024
1160
|
listGTMDealComments,
|
|
1025
1161
|
listGTMDeals,
|
|
1162
|
+
listGTMListingComments,
|
|
1026
1163
|
listGTMPeople,
|
|
1027
1164
|
listGTMTaskComments,
|
|
1028
1165
|
listGTMTasks,
|
|
@@ -1061,6 +1198,7 @@ export {
|
|
|
1061
1198
|
updateGTMComment,
|
|
1062
1199
|
updateGTMCompany,
|
|
1063
1200
|
updateGTMDeal,
|
|
1201
|
+
updateGTMDealDiligence,
|
|
1064
1202
|
updateGTMTask,
|
|
1065
1203
|
uploadContractFile,
|
|
1066
1204
|
uploadSupplierDocument
|