@ornncompute/cli 1.0.184 → 1.0.186
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 +2 -1
- package/package.json +1 -1
- package/src/admin-shell.mjs +15 -4
- package/vendor/api-client/authorization.js +1 -1
- package/vendor/api-client/commerce.js +104 -60
- package/vendor/capabilities/cli.js +19 -12
package/README.md
CHANGED
|
@@ -220,7 +220,8 @@ Every `ornn admin` command, read or mutation, requires an admin session.
|
|
|
220
220
|
`ornn admin users list` and `ornn admin organizations list` search the
|
|
221
221
|
Authorization directory by person name, email, or company name, with bounded `--limit` and
|
|
222
222
|
`--offset` pagination. Users can be restricted by `--organization`; organization
|
|
223
|
-
results can be filtered by `--
|
|
223
|
+
results can be filtered by `--supplier true|false`, `--inference-provider true|false`,
|
|
224
|
+
`--approved`, or `--ids`.
|
|
224
225
|
User, organization, and supplier directory lists return `next_offset`; pass it
|
|
225
226
|
unchanged as the next `--offset`.
|
|
226
227
|
|
package/package.json
CHANGED
package/src/admin-shell.mjs
CHANGED
|
@@ -202,7 +202,12 @@ function parseAdminInput(capability, argv) {
|
|
|
202
202
|
(directoryPagination ? 25 : DEFAULT_PAGE_LIMIT);
|
|
203
203
|
const input = {};
|
|
204
204
|
if (nodeCommand) input.node_id = positionals[0];
|
|
205
|
-
if (
|
|
205
|
+
if (capability.id === "organization.list") {
|
|
206
|
+
const supplier = booleanOption(options.supplier, "supplier");
|
|
207
|
+
if (supplier !== undefined) input.supplier = supplier;
|
|
208
|
+
const provider = booleanOption(options["inference-provider"], "inference-provider");
|
|
209
|
+
if (provider !== undefined) input.inference_provider = provider;
|
|
210
|
+
} else if (options.supplier) input.organization_id = options.supplier;
|
|
206
211
|
if (options.organization && ["users.list", "organization.invite"].includes(capability.id)) {
|
|
207
212
|
input.organization_id = options.organization;
|
|
208
213
|
}
|
|
@@ -214,7 +219,6 @@ function parseAdminInput(capability, argv) {
|
|
|
214
219
|
if (options.listing) input.listingId = options.listing;
|
|
215
220
|
if (options["listing-term"]) input.listingTermId = options["listing-term"];
|
|
216
221
|
if (options.query) input.q = options.query;
|
|
217
|
-
if (options.role) input.role = options.role;
|
|
218
222
|
const approved = booleanOption(options.approved, "approved");
|
|
219
223
|
if (approved !== undefined) input.approved = approved;
|
|
220
224
|
if (options.ids) input.ids = options.ids.split(",");
|
|
@@ -527,7 +531,14 @@ export function writeAdminResultHuman(stdout, command, result, input = {}) {
|
|
|
527
531
|
if (nextPage) {
|
|
528
532
|
const target = command === "admin nodes logs" ? ` ${shellSingleQuote(input.node_id)}` : "";
|
|
529
533
|
const filters = [
|
|
530
|
-
[
|
|
534
|
+
[
|
|
535
|
+
"supplier",
|
|
536
|
+
command === "admin organizations list"
|
|
537
|
+
? input.supplier
|
|
538
|
+
: command === "admin users list"
|
|
539
|
+
? undefined
|
|
540
|
+
: input.organization_id,
|
|
541
|
+
],
|
|
531
542
|
["organization", command === "admin users list" ? input.organization_id : undefined],
|
|
532
543
|
["facility", input.facility_id],
|
|
533
544
|
["status", input.status],
|
|
@@ -536,7 +547,7 @@ export function writeAdminResultHuman(stdout, command, result, input = {}) {
|
|
|
536
547
|
["listing", input.listingId],
|
|
537
548
|
["listing-term", input.listingTermId],
|
|
538
549
|
["query", input.q],
|
|
539
|
-
["
|
|
550
|
+
["inference-provider", input.inference_provider],
|
|
540
551
|
["approved", input.approved],
|
|
541
552
|
["ids", Array.isArray(input.ids) ? input.ids.join(",") : undefined],
|
|
542
553
|
["limit", input.limit],
|
|
@@ -17,7 +17,7 @@ function listOrganizations(request, query = {}, signal) {
|
|
|
17
17
|
async function listSupplierOrganizations(request, signal) {
|
|
18
18
|
const rows = [];
|
|
19
19
|
for (let offset = 0; offset < 5e4; offset += 1e3) {
|
|
20
|
-
const page = await listOrganizations(request, {
|
|
20
|
+
const page = await listOrganizations(request, { supplier: true, limit: 1e3, offset, sort: "created_at", direction: "asc" }, signal);
|
|
21
21
|
if (!Array.isArray(page))
|
|
22
22
|
throw new Error("Invalid supplier directory response.");
|
|
23
23
|
rows.push(...page);
|
|
@@ -560,6 +560,44 @@ function listComputeContractLineCapacity(request, input, signal) {
|
|
|
560
560
|
return request(`${capacityPath}?${query}`, { method: "GET", signal });
|
|
561
561
|
}
|
|
562
562
|
|
|
563
|
+
// ../../packages/api-client/dist/commerce/compute-contract-revenue-share.js
|
|
564
|
+
var base = (id2) => `/internal/v1/gtm/compute-contracts/${encodeURIComponent(id2)}`;
|
|
565
|
+
var terms = (id2) => `${base(id2)}/revenue-share-terms`;
|
|
566
|
+
var reports = (id2) => `${base(id2)}/revenue-share-reports`;
|
|
567
|
+
function listComputeContractRevenueShareTerms(request, id2, signal) {
|
|
568
|
+
return request(terms(id2), {
|
|
569
|
+
method: "GET",
|
|
570
|
+
signal
|
|
571
|
+
});
|
|
572
|
+
}
|
|
573
|
+
function createComputeContractRevenueShareTerms(request, id2, body) {
|
|
574
|
+
return request(terms(id2), {
|
|
575
|
+
method: "POST",
|
|
576
|
+
body
|
|
577
|
+
});
|
|
578
|
+
}
|
|
579
|
+
function updateComputeContractRevenueShareTerms(request, id2, termsId, body) {
|
|
580
|
+
return request(`${terms(id2)}/${encodeURIComponent(termsId)}`, {
|
|
581
|
+
method: "PUT",
|
|
582
|
+
body
|
|
583
|
+
});
|
|
584
|
+
}
|
|
585
|
+
function deleteComputeContractRevenueShareTerms(request, id2, termsId, body) {
|
|
586
|
+
return request(`${terms(id2)}/${encodeURIComponent(termsId)}`, {
|
|
587
|
+
method: "DELETE",
|
|
588
|
+
body
|
|
589
|
+
});
|
|
590
|
+
}
|
|
591
|
+
function listComputeContractRevenueShareReports(request, id2, input, signal) {
|
|
592
|
+
return request(reports(id2) + queryString(input), {
|
|
593
|
+
method: "GET",
|
|
594
|
+
signal
|
|
595
|
+
});
|
|
596
|
+
}
|
|
597
|
+
function createComputeContractRevenueShareReport(request, id2, body) {
|
|
598
|
+
return request(reports(id2), { method: "POST", body });
|
|
599
|
+
}
|
|
600
|
+
|
|
563
601
|
// ../../packages/api-client/dist/commerce/staff.js
|
|
564
602
|
function listDowntime(request, input = {}, signal) {
|
|
565
603
|
return request("/internal/v1/downtime" + queryString(input), {
|
|
@@ -606,103 +644,103 @@ function getCommerceOrganization(request, id2, signal) {
|
|
|
606
644
|
}
|
|
607
645
|
|
|
608
646
|
// ../../packages/api-client/dist/commerce/gtm.js
|
|
609
|
-
var
|
|
647
|
+
var base2 = "/internal/v1/gtm";
|
|
610
648
|
var id = (value) => encodeURIComponent(String(value));
|
|
611
649
|
function listGTMCompanies(request, input = {}, signal) {
|
|
612
|
-
return request(
|
|
650
|
+
return request(base2 + "/companies" + queryString(input), { method: "GET", signal });
|
|
613
651
|
}
|
|
614
652
|
function createGTMCompany(request, body) {
|
|
615
|
-
return request(
|
|
653
|
+
return request(base2 + "/companies", { method: "POST", body });
|
|
616
654
|
}
|
|
617
655
|
function updateGTMCompany(request, recordId, body) {
|
|
618
|
-
return request(`${
|
|
656
|
+
return request(`${base2}/companies/${id(recordId)}`, {
|
|
619
657
|
method: "PATCH",
|
|
620
658
|
body
|
|
621
659
|
});
|
|
622
660
|
}
|
|
623
661
|
function deleteGTMCompany(request, recordId) {
|
|
624
|
-
return request(`${
|
|
662
|
+
return request(`${base2}/companies/${id(recordId)}`, { method: "DELETE" });
|
|
625
663
|
}
|
|
626
664
|
function listGTMDeals(request, input = {}, signal) {
|
|
627
|
-
return request(
|
|
665
|
+
return request(base2 + "/deals" + queryString(input), { method: "GET", signal });
|
|
628
666
|
}
|
|
629
667
|
function createGTMDeal(request, body) {
|
|
630
|
-
return request(
|
|
668
|
+
return request(base2 + "/deals", { method: "POST", body });
|
|
631
669
|
}
|
|
632
670
|
function updateGTMDeal(request, recordId, body) {
|
|
633
|
-
return request(`${
|
|
671
|
+
return request(`${base2}/deals/${id(recordId)}`, { method: "PATCH", body });
|
|
634
672
|
}
|
|
635
673
|
function listGTMTasks(request, input = {}, signal) {
|
|
636
|
-
return request(
|
|
674
|
+
return request(base2 + "/tasks" + queryString(input), { method: "GET", signal });
|
|
637
675
|
}
|
|
638
676
|
function createGTMTask(request, body) {
|
|
639
|
-
return request(
|
|
677
|
+
return request(base2 + "/tasks", { method: "POST", body });
|
|
640
678
|
}
|
|
641
679
|
function updateGTMTask(request, recordId, body) {
|
|
642
|
-
return request(`${
|
|
680
|
+
return request(`${base2}/tasks/${id(recordId)}`, { method: "PATCH", body });
|
|
643
681
|
}
|
|
644
682
|
function deleteGTMTask(request, recordId) {
|
|
645
|
-
return request(`${
|
|
683
|
+
return request(`${base2}/tasks/${id(recordId)}`, { method: "DELETE" });
|
|
646
684
|
}
|
|
647
685
|
function listGTMCompanyComments(request, recordId, input = {}) {
|
|
648
|
-
return request(`${
|
|
686
|
+
return request(`${base2}/companies/${id(recordId)}/comments` + queryString(input), {
|
|
649
687
|
method: "GET"
|
|
650
688
|
});
|
|
651
689
|
}
|
|
652
690
|
function createGTMCompanyComment(request, recordId, body) {
|
|
653
|
-
return request(`${
|
|
691
|
+
return request(`${base2}/companies/${id(recordId)}/comments`, {
|
|
654
692
|
method: "POST",
|
|
655
693
|
body
|
|
656
694
|
});
|
|
657
695
|
}
|
|
658
696
|
function listGTMDealComments(request, recordId, input = {}) {
|
|
659
|
-
return request(`${
|
|
697
|
+
return request(`${base2}/deals/${id(recordId)}/comments` + queryString(input), {
|
|
660
698
|
method: "GET"
|
|
661
699
|
});
|
|
662
700
|
}
|
|
663
701
|
function createGTMDealComment(request, recordId, body) {
|
|
664
|
-
return request(`${
|
|
702
|
+
return request(`${base2}/deals/${id(recordId)}/comments`, {
|
|
665
703
|
method: "POST",
|
|
666
704
|
body
|
|
667
705
|
});
|
|
668
706
|
}
|
|
669
707
|
function listGTMTaskComments(request, recordId, input = {}) {
|
|
670
|
-
return request(`${
|
|
708
|
+
return request(`${base2}/tasks/${id(recordId)}/comments` + queryString(input), {
|
|
671
709
|
method: "GET"
|
|
672
710
|
});
|
|
673
711
|
}
|
|
674
712
|
function createGTMTaskComment(request, recordId, body) {
|
|
675
|
-
return request(`${
|
|
713
|
+
return request(`${base2}/tasks/${id(recordId)}/comments`, {
|
|
676
714
|
method: "POST",
|
|
677
715
|
body
|
|
678
716
|
});
|
|
679
717
|
}
|
|
680
718
|
function updateGTMComment(request, recordId, body) {
|
|
681
|
-
return request(`${
|
|
719
|
+
return request(`${base2}/comments/${id(recordId)}`, {
|
|
682
720
|
method: "PATCH",
|
|
683
721
|
body
|
|
684
722
|
});
|
|
685
723
|
}
|
|
686
724
|
function deleteGTMComment(request, recordId, input) {
|
|
687
|
-
return request(`${
|
|
725
|
+
return request(`${base2}/comments/${id(recordId)}`, {
|
|
688
726
|
method: "DELETE",
|
|
689
727
|
...input ? { body: input } : {}
|
|
690
728
|
});
|
|
691
729
|
}
|
|
692
730
|
function getGTMPersonalWorkspace(request) {
|
|
693
|
-
return request(
|
|
731
|
+
return request(base2 + "/me", { method: "GET" });
|
|
694
732
|
}
|
|
695
733
|
function listGTMPeople(request) {
|
|
696
|
-
return request(
|
|
734
|
+
return request(base2 + "/people", { method: "GET" });
|
|
697
735
|
}
|
|
698
736
|
function getGTMTicket(request, recordId) {
|
|
699
|
-
return request(`${
|
|
737
|
+
return request(`${base2}/tasks/${id(recordId)}`, { method: "GET" });
|
|
700
738
|
}
|
|
701
739
|
function listTicketActivity(request, recordId) {
|
|
702
|
-
return request(`${
|
|
740
|
+
return request(`${base2}/tasks/${id(recordId)}/activity`, { method: "GET" });
|
|
703
741
|
}
|
|
704
742
|
function listGTMListingComments(request, input, signal) {
|
|
705
|
-
return request(
|
|
743
|
+
return request(base2 + "/comments" + queryString(input), {
|
|
706
744
|
method: "GET",
|
|
707
745
|
signal
|
|
708
746
|
});
|
|
@@ -723,26 +761,26 @@ async function listAllGTMListingComments(request, input, signal) {
|
|
|
723
761
|
}
|
|
724
762
|
}
|
|
725
763
|
function getGTMDealDelivery(request, recordId, signal) {
|
|
726
|
-
return request(`${
|
|
764
|
+
return request(`${base2}/deals/${id(recordId)}/delivery`, {
|
|
727
765
|
method: "GET",
|
|
728
766
|
signal
|
|
729
767
|
});
|
|
730
768
|
}
|
|
731
769
|
|
|
732
770
|
// ../../packages/api-client/dist/commerce/contracts.js
|
|
733
|
-
var
|
|
771
|
+
var base3 = "/internal/v1/gtm/contracts";
|
|
734
772
|
function getContractFile(fetcher, id2, signal) {
|
|
735
|
-
return fetcher(`${
|
|
773
|
+
return fetcher(`${base3}/${encodeURIComponent(id2)}`, { method: "GET", signal });
|
|
736
774
|
}
|
|
737
775
|
function uploadContractFile(fetcher, input, signal) {
|
|
738
776
|
const body = new FormData();
|
|
739
777
|
body.set("scopeType", input.scopeType);
|
|
740
778
|
body.set("scopeId", input.scopeId);
|
|
741
779
|
body.set("file", input.file);
|
|
742
|
-
return fetcher(
|
|
780
|
+
return fetcher(base3, { method: "POST", body, signal });
|
|
743
781
|
}
|
|
744
782
|
function listContractFiles(request, input = {}, signal) {
|
|
745
|
-
return request(
|
|
783
|
+
return request(base3 + queryString(input), { method: "GET", signal });
|
|
746
784
|
}
|
|
747
785
|
async function listAllContractFiles(request, signal) {
|
|
748
786
|
const files = [];
|
|
@@ -760,7 +798,7 @@ async function listAllContractFiles(request, signal) {
|
|
|
760
798
|
}
|
|
761
799
|
}
|
|
762
800
|
function deleteContractFile(request, id2) {
|
|
763
|
-
return request(`${
|
|
801
|
+
return request(`${base3}/${encodeURIComponent(id2)}`, { method: "DELETE" });
|
|
764
802
|
}
|
|
765
803
|
|
|
766
804
|
// ../../packages/api-client/dist/commerce/facilities.js
|
|
@@ -838,69 +876,69 @@ function createSupplierAccountSession(request, body, signal) {
|
|
|
838
876
|
}
|
|
839
877
|
|
|
840
878
|
// ../../packages/api-client/dist/commerce/supplier-intake.js
|
|
841
|
-
var
|
|
879
|
+
var base4 = "/internal/v1/supplier-intake";
|
|
842
880
|
function getSupplierIntakeDocument(fetcher, id2, input = {}, signal) {
|
|
843
|
-
return fetcher(`${
|
|
881
|
+
return fetcher(`${base4}/documents/${encodeURIComponent(id2)}${input.download ? "?download=1" : ""}`, {
|
|
844
882
|
method: "GET",
|
|
845
883
|
signal
|
|
846
884
|
});
|
|
847
885
|
}
|
|
848
886
|
function getSupplierIntakePacket(fetcher, id2, input = {}, signal) {
|
|
849
|
-
return fetcher(`${
|
|
887
|
+
return fetcher(`${base4}/submissions/${encodeURIComponent(id2)}/packet${input.download ? "?download=1" : ""}`, {
|
|
850
888
|
method: "GET",
|
|
851
889
|
signal
|
|
852
890
|
});
|
|
853
891
|
}
|
|
854
892
|
function listSupplierIntakeLinks(request) {
|
|
855
|
-
return request(
|
|
893
|
+
return request(base4 + "/links", { method: "GET" });
|
|
856
894
|
}
|
|
857
895
|
function createSupplierIntakeLink(request, body) {
|
|
858
|
-
return request(
|
|
896
|
+
return request(base4 + "/links", { method: "POST", body });
|
|
859
897
|
}
|
|
860
898
|
function revokeSupplierIntakeLink(request, id2) {
|
|
861
|
-
return request(`${
|
|
899
|
+
return request(`${base4}/links/${encodeURIComponent(id2)}/revoke`, { method: "POST" });
|
|
862
900
|
}
|
|
863
901
|
function listSupplierIntakeSubmissions(request, input = {}) {
|
|
864
|
-
return request(
|
|
902
|
+
return request(base4 + "/submissions" + queryString(input), { method: "GET" });
|
|
865
903
|
}
|
|
866
904
|
function getSupplierIntakeSubmission(request, id2) {
|
|
867
|
-
return request(`${
|
|
905
|
+
return request(`${base4}/submissions/${encodeURIComponent(id2)}`, { method: "GET" });
|
|
868
906
|
}
|
|
869
907
|
function reviewSupplierIntakeSubmission(request, id2) {
|
|
870
|
-
return request(`${
|
|
908
|
+
return request(`${base4}/submissions/${encodeURIComponent(id2)}/review`, {
|
|
871
909
|
method: "POST"
|
|
872
910
|
});
|
|
873
911
|
}
|
|
874
912
|
|
|
875
913
|
// ../../packages/api-client/dist/commerce/supplier-documents.js
|
|
876
|
-
var
|
|
914
|
+
var base5 = "/commerce/supplier/documents";
|
|
877
915
|
function uploadSupplierDocument(fetcher, file, signal) {
|
|
878
916
|
const body = new FormData();
|
|
879
917
|
body.set("file", file);
|
|
880
|
-
return fetcher(
|
|
918
|
+
return fetcher(base5, { method: "POST", body, signal });
|
|
881
919
|
}
|
|
882
920
|
function getSupplierDocument(fetcher, id2, input = {}, signal) {
|
|
883
|
-
return fetcher(`${
|
|
921
|
+
return fetcher(`${base5}/${encodeURIComponent(id2)}` + queryString(input), {
|
|
884
922
|
method: "GET",
|
|
885
923
|
signal
|
|
886
924
|
});
|
|
887
925
|
}
|
|
888
926
|
|
|
889
927
|
// ../../packages/api-client/dist/commerce/licenses.js
|
|
890
|
-
var
|
|
928
|
+
var base6 = "/internal/v1/controlplane-licenses";
|
|
891
929
|
function listControlplaneLicenses(request, signal) {
|
|
892
|
-
return request(
|
|
930
|
+
return request(base6, { method: "GET", signal });
|
|
893
931
|
}
|
|
894
932
|
function getControlplaneLicense(request, id2) {
|
|
895
|
-
return request(`${
|
|
933
|
+
return request(`${base6}/${encodeURIComponent(id2)}`, {
|
|
896
934
|
method: "GET"
|
|
897
935
|
});
|
|
898
936
|
}
|
|
899
937
|
function createControlplaneLicense(request, body) {
|
|
900
|
-
return request(
|
|
938
|
+
return request(base6, { method: "POST", body });
|
|
901
939
|
}
|
|
902
940
|
function revokeControlplaneLicense(request, id2) {
|
|
903
|
-
return request(`${
|
|
941
|
+
return request(`${base6}/${encodeURIComponent(id2)}/revoke`, {
|
|
904
942
|
method: "POST",
|
|
905
943
|
body: {}
|
|
906
944
|
});
|
|
@@ -1004,31 +1042,31 @@ function listComputeDealVersions(request, id2, input = {}, signal) {
|
|
|
1004
1042
|
}
|
|
1005
1043
|
|
|
1006
1044
|
// ../../packages/api-client/dist/commerce/compute-contract-payments.js
|
|
1007
|
-
var
|
|
1045
|
+
var base7 = (id2) => `/internal/v1/gtm/compute-contracts/${encodeURIComponent(id2)}/payment-evidence`;
|
|
1008
1046
|
function listComputeContractPaymentEvidence(request, id2, signal) {
|
|
1009
|
-
return request(
|
|
1047
|
+
return request(base7(id2), {
|
|
1010
1048
|
method: "GET",
|
|
1011
1049
|
signal
|
|
1012
1050
|
});
|
|
1013
1051
|
}
|
|
1014
1052
|
function createComputeContractPaymentEvidence(request, id2, body) {
|
|
1015
|
-
return request(
|
|
1053
|
+
return request(base7(id2), {
|
|
1016
1054
|
method: "POST",
|
|
1017
1055
|
body
|
|
1018
1056
|
});
|
|
1019
1057
|
}
|
|
1020
1058
|
function deleteComputeContractPaymentEvidence(request, id2, evidenceId, version) {
|
|
1021
|
-
return request(`${
|
|
1059
|
+
return request(`${base7(id2)}/${encodeURIComponent(evidenceId)}`, {
|
|
1022
1060
|
method: "DELETE",
|
|
1023
1061
|
body: { confirmed: true, version }
|
|
1024
1062
|
});
|
|
1025
1063
|
}
|
|
1026
1064
|
|
|
1027
1065
|
// ../../packages/api-client/dist/commerce/compute-contract-releases.js
|
|
1028
|
-
var
|
|
1029
|
-
var policies = (id2) => `${
|
|
1030
|
-
var requests = (id2) => `${
|
|
1031
|
-
var transfers = (id2) => `${
|
|
1066
|
+
var base8 = (id2) => `/internal/v1/gtm/compute-contracts/${encodeURIComponent(id2)}`;
|
|
1067
|
+
var policies = (id2) => `${base8(id2)}/release-policies`;
|
|
1068
|
+
var requests = (id2) => `${base8(id2)}/release-requests`;
|
|
1069
|
+
var transfers = (id2) => `${base8(id2)}/capacity-transfers`;
|
|
1032
1070
|
function listComputeContractReleasePolicies(request, id2, input = {}, signal) {
|
|
1033
1071
|
return request(policies(id2) + queryString(input), {
|
|
1034
1072
|
method: "GET",
|
|
@@ -1082,21 +1120,21 @@ function recordComputeContractCapacityTransfer(request, id2, body) {
|
|
|
1082
1120
|
}
|
|
1083
1121
|
|
|
1084
1122
|
// ../../packages/api-client/dist/commerce/compute-deal-acceptance.js
|
|
1085
|
-
var
|
|
1123
|
+
var base9 = (dealId, allocationId) => `/internal/v2/gtm/compute-deals/${encodeURIComponent(dealId)}/allocations/${encodeURIComponent(allocationId)}/acceptance-decisions`;
|
|
1086
1124
|
function listComputeDealAcceptanceDecisions(request, dealId, allocationId, signal) {
|
|
1087
|
-
return request(
|
|
1125
|
+
return request(base9(dealId, allocationId), {
|
|
1088
1126
|
method: "GET",
|
|
1089
1127
|
signal
|
|
1090
1128
|
});
|
|
1091
1129
|
}
|
|
1092
1130
|
function createComputeDealAcceptanceDecision(request, dealId, allocationId, body) {
|
|
1093
|
-
return request(
|
|
1131
|
+
return request(base9(dealId, allocationId), {
|
|
1094
1132
|
method: "POST",
|
|
1095
1133
|
body
|
|
1096
1134
|
});
|
|
1097
1135
|
}
|
|
1098
1136
|
function deleteComputeDealAcceptanceDecision(request, dealId, allocationId, decisionId, body) {
|
|
1099
|
-
return request(`${
|
|
1137
|
+
return request(`${base9(dealId, allocationId)}/${encodeURIComponent(decisionId)}`, {
|
|
1100
1138
|
method: "DELETE",
|
|
1101
1139
|
body
|
|
1102
1140
|
});
|
|
@@ -1134,6 +1172,8 @@ export {
|
|
|
1134
1172
|
createComputeContractPaymentEvidence,
|
|
1135
1173
|
createComputeContractReleasePolicy,
|
|
1136
1174
|
createComputeContractReleaseRequest,
|
|
1175
|
+
createComputeContractRevenueShareReport,
|
|
1176
|
+
createComputeContractRevenueShareTerms,
|
|
1137
1177
|
createComputeDeal,
|
|
1138
1178
|
createComputeDealAcceptanceDecision,
|
|
1139
1179
|
createComputeDealAddOn,
|
|
@@ -1162,6 +1202,7 @@ export {
|
|
|
1162
1202
|
deleteComputeContractDocument,
|
|
1163
1203
|
deleteComputeContractLine,
|
|
1164
1204
|
deleteComputeContractPaymentEvidence,
|
|
1205
|
+
deleteComputeContractRevenueShareTerms,
|
|
1165
1206
|
deleteComputeDeal,
|
|
1166
1207
|
deleteComputeDealAcceptanceDecision,
|
|
1167
1208
|
deleteComputeDealAddOn,
|
|
@@ -1239,6 +1280,8 @@ export {
|
|
|
1239
1280
|
listComputeContractPaymentEvidence,
|
|
1240
1281
|
listComputeContractReleasePolicies,
|
|
1241
1282
|
listComputeContractReleaseRequests,
|
|
1283
|
+
listComputeContractRevenueShareReports,
|
|
1284
|
+
listComputeContractRevenueShareTerms,
|
|
1242
1285
|
listComputeContracts,
|
|
1243
1286
|
listComputeDealAcceptanceDecisions,
|
|
1244
1287
|
listComputeDealAddOns,
|
|
@@ -1291,6 +1334,7 @@ export {
|
|
|
1291
1334
|
updateComputeContractLine,
|
|
1292
1335
|
updateComputeContractReleasePolicy,
|
|
1293
1336
|
updateComputeContractReleaseRequest,
|
|
1337
|
+
updateComputeContractRevenueShareTerms,
|
|
1294
1338
|
updateComputeDeal,
|
|
1295
1339
|
updateComputeDealAddOn,
|
|
1296
1340
|
updateComputeDealAllocation,
|
|
@@ -4539,7 +4539,7 @@ function listOrganizations(request, query3 = {}, signal) {
|
|
|
4539
4539
|
async function listSupplierOrganizations(request, signal) {
|
|
4540
4540
|
const rows = [];
|
|
4541
4541
|
for (let offset = 0; offset < 5e4; offset += 1e3) {
|
|
4542
|
-
const page = await listOrganizations(request, {
|
|
4542
|
+
const page = await listOrganizations(request, { supplier: true, limit: 1e3, offset, sort: "created_at", direction: "asc" }, signal);
|
|
4543
4543
|
if (!Array.isArray(page))
|
|
4544
4544
|
throw new Error("Invalid supplier directory response.");
|
|
4545
4545
|
rows.push(...page);
|
|
@@ -4635,7 +4635,7 @@ var listSuppliersCapability = defineCapability({
|
|
|
4635
4635
|
const limit = parsed.limit ?? 25;
|
|
4636
4636
|
const offset = parsed.offset ?? 0;
|
|
4637
4637
|
const rows = paged ? await listOrganizations(ctx.fetch, {
|
|
4638
|
-
|
|
4638
|
+
supplier: true,
|
|
4639
4639
|
limit,
|
|
4640
4640
|
offset,
|
|
4641
4641
|
q: parsed.q?.trim() || void 0,
|
|
@@ -5910,7 +5910,7 @@ import { z as z28 } from "zod";
|
|
|
5910
5910
|
var organizationInviteInput = z28.object({
|
|
5911
5911
|
organization_id: z28.uuid().optional(),
|
|
5912
5912
|
email: z28.string().trim().toLowerCase().pipe(z28.email()),
|
|
5913
|
-
|
|
5913
|
+
supplier: z28.boolean().optional(),
|
|
5914
5914
|
send_email: z28.boolean().optional().describe("Defaults to true for an existing organization; false returns a link. Signup invites cannot be emailed.")
|
|
5915
5915
|
}).superRefine((input, ctx) => {
|
|
5916
5916
|
if (!input.organization_id && input.send_email === true) {
|
|
@@ -5919,15 +5919,18 @@ var organizationInviteInput = z28.object({
|
|
|
5919
5919
|
message: "Choose an existing organization to email an invitation."
|
|
5920
5920
|
});
|
|
5921
5921
|
}
|
|
5922
|
-
if (input.organization_id && input.
|
|
5923
|
-
ctx.addIssue({
|
|
5922
|
+
if (input.organization_id && input.supplier === true) {
|
|
5923
|
+
ctx.addIssue({
|
|
5924
|
+
code: "custom",
|
|
5925
|
+
message: "An existing organization keeps its own permissions."
|
|
5926
|
+
});
|
|
5924
5927
|
}
|
|
5925
5928
|
});
|
|
5926
5929
|
var organizationInviteCapability = defineCapability({
|
|
5927
5930
|
id: "organization.invite",
|
|
5928
5931
|
domain: "users",
|
|
5929
5932
|
roles: ["admin"],
|
|
5930
|
-
description: "Invite a person to an existing organization (emails by default; send_email=false returns a join link), or omit organization_id to create a signup link with
|
|
5933
|
+
description: "Invite a person to an existing organization (emails by default; send_email=false returns a join link), or omit organization_id to create a signup link with supplier=true to grant supplier access. Resolve organization UUIDs first; ask if ambiguous. Executes immediately. Keep invitation links secret.",
|
|
5931
5934
|
mutation: "immediate",
|
|
5932
5935
|
cli: {
|
|
5933
5936
|
command: ["admin", "organizations", "invite"],
|
|
@@ -7022,7 +7025,8 @@ var directoryLimit = z33.number().int().min(1).max(100).default(25);
|
|
|
7022
7025
|
var directoryOffset = z33.number().int().nonnegative().optional();
|
|
7023
7026
|
var organizationListInput = z33.object({
|
|
7024
7027
|
q: z33.string().trim().optional().describe("Company name, contact/member name, or email."),
|
|
7025
|
-
|
|
7028
|
+
supplier: z33.boolean().optional(),
|
|
7029
|
+
inference_provider: z33.boolean().optional(),
|
|
7026
7030
|
approved: z33.boolean().optional(),
|
|
7027
7031
|
ids: z33.array(z33.uuid()).min(1).max(100).optional(),
|
|
7028
7032
|
limit: directoryLimit,
|
|
@@ -7049,7 +7053,7 @@ var organizationListCapability = defineCapability({
|
|
|
7049
7053
|
id: "organization.list",
|
|
7050
7054
|
domain: "users",
|
|
7051
7055
|
roles: ["admin"],
|
|
7052
|
-
description: "List organizations from the Authorization directory. Search by company name, contact/member name, or email; filter by
|
|
7056
|
+
description: "List organizations from the Authorization directory. Search by company name, contact/member name, or email; filter by supplier or inference provider access, approval, or UUIDs. When next_offset is present, pass it back as offset for the next page. Use the organization id as organizationId when recording downtime, and ask the user to choose if matches are ambiguous.",
|
|
7053
7057
|
mutation: "read",
|
|
7054
7058
|
cli: {
|
|
7055
7059
|
command: ["admin", "organizations", "list"],
|
|
@@ -7057,7 +7061,7 @@ var organizationListCapability = defineCapability({
|
|
|
7057
7061
|
audience: "admin",
|
|
7058
7062
|
category: "resource",
|
|
7059
7063
|
outcome: "List organizations in the Authorization directory; pass next_offset as --offset to continue.",
|
|
7060
|
-
human: "ornn admin organizations list [--query QUERY] [--
|
|
7064
|
+
human: "ornn admin organizations list [--query QUERY] [--supplier true|false] [--inference-provider true|false] [--approved true|false] [--ids UUID,...] [--limit 25] [--offset OFFSET]",
|
|
7061
7065
|
automation: "ornn admin organizations list --query QUERY --limit 25 [--offset OFFSET] --format json",
|
|
7062
7066
|
acceptedReferences: []
|
|
7063
7067
|
}
|
|
@@ -7070,7 +7074,8 @@ var organizationListCapability = defineCapability({
|
|
|
7070
7074
|
type: "string",
|
|
7071
7075
|
description: "Company name, contact/member name, or email."
|
|
7072
7076
|
},
|
|
7073
|
-
|
|
7077
|
+
supplier: { type: "boolean" },
|
|
7078
|
+
inference_provider: { type: "boolean" },
|
|
7074
7079
|
approved: { type: "boolean" },
|
|
7075
7080
|
ids: {
|
|
7076
7081
|
type: "array",
|
|
@@ -7099,7 +7104,8 @@ var organizationListCapability = defineCapability({
|
|
|
7099
7104
|
organizations: rows.map((organization) => ({
|
|
7100
7105
|
id: organization.id,
|
|
7101
7106
|
name: organization.name,
|
|
7102
|
-
|
|
7107
|
+
supplier: organization.supplier,
|
|
7108
|
+
inference_provider: organization.inference_provider,
|
|
7103
7109
|
approved: organization.approved,
|
|
7104
7110
|
members: directoryMembers(organization).map((member) => ({
|
|
7105
7111
|
user_id: member.user_id,
|
|
@@ -7168,7 +7174,8 @@ var usersListCapability = defineCapability({
|
|
|
7168
7174
|
name: member.name ?? null,
|
|
7169
7175
|
organization_id: organization.id,
|
|
7170
7176
|
organization_name: organization.name,
|
|
7171
|
-
|
|
7177
|
+
supplier: organization.supplier,
|
|
7178
|
+
inference_provider: organization.inference_provider,
|
|
7172
7179
|
approved: organization.approved
|
|
7173
7180
|
}));
|
|
7174
7181
|
});
|