xoonya 2.3.0 → 2.5.0
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 +16 -0
- package/RELEASE_NOTES.md +17 -13
- package/SERVICE_CONTRACT.md +64 -0
- package/START_HERE.md +27 -0
- package/bin/xoonya.js +55 -0
- package/lib/artifact_distribution_lane_contract.js +54 -0
- package/lib/asyncapi_contract.js +135 -0
- package/lib/auth_interop_contract.js +69 -0
- package/lib/cloudevents_contract.js +79 -0
- package/lib/erc8004_proof_lane_contract.js +64 -0
- package/lib/event_system_lane_contract.js +76 -0
- package/lib/external_proof_import_lane_contract.js +87 -0
- package/lib/feature_control_lane_contract.js +54 -0
- package/lib/framework_lane_contract.js +76 -0
- package/lib/identity_interop_contract.js +83 -0
- package/lib/integration_matrix_contract.js +81 -0
- package/lib/major_rails_proof_lane_contract.js +87 -0
- package/lib/openapi_contract.js +227 -0
- package/lib/proof_bridge_lane_contract.js +82 -0
- package/lib/provenance_lane_contract.js +54 -0
- package/lib/provider_lane_contract.js +67 -0
- package/lib/release_history.js +16 -0
- package/lib/result_package_trust_lane_contract.js +74 -0
- package/lib/role_freeze.js +436 -0
- package/lib/shared_signals_lane_contract.js +54 -0
- package/lib/telemetry_lane_contract.js +54 -0
- package/lib/treasury_proof_lane_contract.js +83 -0
- package/package.json +4 -3
- package/server.js +504 -0
package/server.js
CHANGED
|
@@ -3,6 +3,7 @@ const { URL } = require('url');
|
|
|
3
3
|
const proofSdk = require('./index.js');
|
|
4
4
|
const {
|
|
5
5
|
getIntegration,
|
|
6
|
+
listIntegrations,
|
|
6
7
|
exportIntegrationRegistrySnapshot,
|
|
7
8
|
summarizeIntegrationPromotionWorkflow,
|
|
8
9
|
summarizeIntegrationPromotionWorkflowList,
|
|
@@ -75,6 +76,101 @@ const {
|
|
|
75
76
|
buildBridgeIntelligencePack,
|
|
76
77
|
summarizeBridgeIntelligencePack
|
|
77
78
|
} = require('./lib/bridge_intelligence');
|
|
79
|
+
const {
|
|
80
|
+
buildOpenApiDocument,
|
|
81
|
+
summarizeOpenApiDocument,
|
|
82
|
+
} = require('./lib/openapi_contract');
|
|
83
|
+
const {
|
|
84
|
+
buildAsyncApiDocument,
|
|
85
|
+
summarizeAsyncApiDocument,
|
|
86
|
+
} = require('./lib/asyncapi_contract');
|
|
87
|
+
const {
|
|
88
|
+
buildCloudEventsContract,
|
|
89
|
+
summarizeCloudEventsContract,
|
|
90
|
+
} = require('./lib/cloudevents_contract');
|
|
91
|
+
const {
|
|
92
|
+
buildAuthInteropContract,
|
|
93
|
+
summarizeAuthInteropContract,
|
|
94
|
+
} = require('./lib/auth_interop_contract');
|
|
95
|
+
const {
|
|
96
|
+
buildIdentityInteropContract,
|
|
97
|
+
summarizeIdentityInteropContract,
|
|
98
|
+
} = require('./lib/identity_interop_contract');
|
|
99
|
+
const {
|
|
100
|
+
buildProviderLanePack,
|
|
101
|
+
summarizeProviderLanePack,
|
|
102
|
+
} = require('./lib/provider_lane_contract');
|
|
103
|
+
const {
|
|
104
|
+
buildFrameworkLanePack,
|
|
105
|
+
summarizeFrameworkLanePack,
|
|
106
|
+
} = require('./lib/framework_lane_contract');
|
|
107
|
+
const {
|
|
108
|
+
buildIntegrationMatrixPack,
|
|
109
|
+
summarizeIntegrationMatrixPack,
|
|
110
|
+
} = require('./lib/integration_matrix_contract');
|
|
111
|
+
const {
|
|
112
|
+
buildMajorRailsProofLanePack,
|
|
113
|
+
summarizeMajorRailsProofLanePack,
|
|
114
|
+
} = require('./lib/major_rails_proof_lane_contract');
|
|
115
|
+
const {
|
|
116
|
+
buildTreasuryProofLanePack,
|
|
117
|
+
summarizeTreasuryProofLanePack,
|
|
118
|
+
} = require('./lib/treasury_proof_lane_contract');
|
|
119
|
+
const {
|
|
120
|
+
buildErc8004ProofLanePack,
|
|
121
|
+
summarizeErc8004ProofLanePack,
|
|
122
|
+
} = require('./lib/erc8004_proof_lane_contract');
|
|
123
|
+
const {
|
|
124
|
+
buildProofBridgeLanePack,
|
|
125
|
+
summarizeProofBridgeLanePack,
|
|
126
|
+
} = require('./lib/proof_bridge_lane_contract');
|
|
127
|
+
const {
|
|
128
|
+
buildExternalProofImportLanePack,
|
|
129
|
+
summarizeExternalProofImportLanePack,
|
|
130
|
+
} = require('./lib/external_proof_import_lane_contract');
|
|
131
|
+
const {
|
|
132
|
+
buildResultPackageTrustLanePack,
|
|
133
|
+
summarizeResultPackageTrustLanePack,
|
|
134
|
+
} = require('./lib/result_package_trust_lane_contract');
|
|
135
|
+
const {
|
|
136
|
+
buildEventSystemLanePack,
|
|
137
|
+
summarizeEventSystemLanePack,
|
|
138
|
+
} = require('./lib/event_system_lane_contract');
|
|
139
|
+
const {
|
|
140
|
+
buildTelemetryLanePack,
|
|
141
|
+
summarizeTelemetryLanePack,
|
|
142
|
+
} = require('./lib/telemetry_lane_contract');
|
|
143
|
+
const {
|
|
144
|
+
buildProvenanceLanePack,
|
|
145
|
+
summarizeProvenanceLanePack,
|
|
146
|
+
} = require('./lib/provenance_lane_contract');
|
|
147
|
+
const {
|
|
148
|
+
buildArtifactDistributionLanePack,
|
|
149
|
+
summarizeArtifactDistributionLanePack,
|
|
150
|
+
} = require('./lib/artifact_distribution_lane_contract');
|
|
151
|
+
const {
|
|
152
|
+
buildSharedSignalsLanePack,
|
|
153
|
+
summarizeSharedSignalsLanePack,
|
|
154
|
+
} = require('./lib/shared_signals_lane_contract');
|
|
155
|
+
const {
|
|
156
|
+
buildFeatureControlLanePack,
|
|
157
|
+
summarizeFeatureControlLanePack,
|
|
158
|
+
} = require('./lib/feature_control_lane_contract');
|
|
159
|
+
const {
|
|
160
|
+
buildRoleFreezePack,
|
|
161
|
+
summarizeRoleFreezePack,
|
|
162
|
+
buildRoleFreezeOperatorBundle,
|
|
163
|
+
summarizeRoleFreezeOperatorBundle,
|
|
164
|
+
buildRoleFreezePolicyPack,
|
|
165
|
+
summarizeRoleFreezePolicyPack,
|
|
166
|
+
buildRoleFreezePolicyApplicationSummary,
|
|
167
|
+
buildRoleFreezePackage,
|
|
168
|
+
summarizeRoleFreezePackage,
|
|
169
|
+
buildRoleTransitionPack,
|
|
170
|
+
summarizeRoleTransitionPack,
|
|
171
|
+
buildCapabilityRegistryHomePack,
|
|
172
|
+
summarizeCapabilityRegistryHomePack
|
|
173
|
+
} = require('./lib/role_freeze');
|
|
78
174
|
const {
|
|
79
175
|
buildReleaseCandidatePack,
|
|
80
176
|
summarizeReleaseCandidatePack
|
|
@@ -615,6 +711,206 @@ async function routeRequest(req, res) {
|
|
|
615
711
|
return;
|
|
616
712
|
}
|
|
617
713
|
|
|
714
|
+
if (req.method === 'GET' && (url.pathname === '/openapi.json' || url.pathname === '/v1/openapi')) {
|
|
715
|
+
sendJson(res, 200, buildOpenApiDocument());
|
|
716
|
+
return;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
if (req.method === 'GET' && url.pathname === '/v1/openapi/summary') {
|
|
720
|
+
sendJson(res, 200, summarizeOpenApiDocument());
|
|
721
|
+
return;
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
if (req.method === 'GET' && (url.pathname === '/asyncapi.json' || url.pathname === '/v1/asyncapi')) {
|
|
725
|
+
sendJson(res, 200, buildAsyncApiDocument());
|
|
726
|
+
return;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
if (req.method === 'GET' && url.pathname === '/v1/asyncapi/summary') {
|
|
730
|
+
sendJson(res, 200, summarizeAsyncApiDocument());
|
|
731
|
+
return;
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
if (req.method === 'GET' && (url.pathname === '/cloudevents.json' || url.pathname === '/v1/cloudevents')) {
|
|
735
|
+
sendJson(res, 200, buildCloudEventsContract());
|
|
736
|
+
return;
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
if (req.method === 'GET' && url.pathname === '/v1/cloudevents/summary') {
|
|
740
|
+
sendJson(res, 200, summarizeCloudEventsContract());
|
|
741
|
+
return;
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
if (req.method === 'GET' && (url.pathname === '/v1/auth-profiles' || url.pathname === '/v1/auth-interop')) {
|
|
745
|
+
sendJson(res, 200, buildAuthInteropContract());
|
|
746
|
+
return;
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
if (req.method === 'GET' && (url.pathname === '/v1/auth-profiles/summary' || url.pathname === '/v1/auth-interop/summary')) {
|
|
750
|
+
sendJson(res, 200, summarizeAuthInteropContract());
|
|
751
|
+
return;
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
if (req.method === 'GET' && (url.pathname === '/v1/identity-interop' || url.pathname === '/v1/credential-interop')) {
|
|
755
|
+
sendJson(res, 200, buildIdentityInteropContract());
|
|
756
|
+
return;
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
if (req.method === 'GET' && (url.pathname === '/v1/identity-interop/summary' || url.pathname === '/v1/credential-interop/summary')) {
|
|
760
|
+
sendJson(res, 200, summarizeIdentityInteropContract());
|
|
761
|
+
return;
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
if (req.method === 'GET' && url.pathname === '/v1/providers') {
|
|
765
|
+
sendJson(res, 200, buildProviderLanePack());
|
|
766
|
+
return;
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
if (req.method === 'GET' && url.pathname === '/v1/providers/summary') {
|
|
770
|
+
sendJson(res, 200, summarizeProviderLanePack());
|
|
771
|
+
return;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
if (req.method === 'GET' && url.pathname === '/v1/frameworks') {
|
|
775
|
+
sendJson(res, 200, buildFrameworkLanePack());
|
|
776
|
+
return;
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
if (req.method === 'GET' && url.pathname === '/v1/frameworks/summary') {
|
|
780
|
+
sendJson(res, 200, summarizeFrameworkLanePack());
|
|
781
|
+
return;
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
if (req.method === 'GET' && url.pathname === '/v1/integration-matrix') {
|
|
785
|
+
sendJson(res, 200, buildIntegrationMatrixPack(listIntegrations()));
|
|
786
|
+
return;
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
if (req.method === 'GET' && url.pathname === '/v1/integration-matrix/summary') {
|
|
790
|
+
sendJson(res, 200, summarizeIntegrationMatrixPack(listIntegrations()));
|
|
791
|
+
return;
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
if (req.method === 'GET' && url.pathname === '/v1/major-rails') {
|
|
795
|
+
sendJson(res, 200, buildMajorRailsProofLanePack());
|
|
796
|
+
return;
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
if (req.method === 'GET' && url.pathname === '/v1/major-rails/summary') {
|
|
800
|
+
sendJson(res, 200, summarizeMajorRailsProofLanePack());
|
|
801
|
+
return;
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
if (req.method === 'GET' && url.pathname === '/v1/treasury') {
|
|
805
|
+
sendJson(res, 200, buildTreasuryProofLanePack());
|
|
806
|
+
return;
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
if (req.method === 'GET' && url.pathname === '/v1/treasury/summary') {
|
|
810
|
+
sendJson(res, 200, summarizeTreasuryProofLanePack());
|
|
811
|
+
return;
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
if (req.method === 'GET' && url.pathname === '/v1/erc8004') {
|
|
815
|
+
sendJson(res, 200, buildErc8004ProofLanePack());
|
|
816
|
+
return;
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
if (req.method === 'GET' && url.pathname === '/v1/erc8004/summary') {
|
|
820
|
+
sendJson(res, 200, summarizeErc8004ProofLanePack());
|
|
821
|
+
return;
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
if (req.method === 'GET' && url.pathname === '/v1/proof-bridge') {
|
|
825
|
+
sendJson(res, 200, buildProofBridgeLanePack());
|
|
826
|
+
return;
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
if (req.method === 'GET' && url.pathname === '/v1/proof-bridge/summary') {
|
|
830
|
+
sendJson(res, 200, summarizeProofBridgeLanePack());
|
|
831
|
+
return;
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
if (req.method === 'GET' && url.pathname === '/v1/external-proof-import') {
|
|
835
|
+
sendJson(res, 200, buildExternalProofImportLanePack());
|
|
836
|
+
return;
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
if (req.method === 'GET' && url.pathname === '/v1/external-proof-import/summary') {
|
|
840
|
+
sendJson(res, 200, summarizeExternalProofImportLanePack());
|
|
841
|
+
return;
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
if (req.method === 'GET' && url.pathname === '/v1/result-package-trust') {
|
|
845
|
+
sendJson(res, 200, buildResultPackageTrustLanePack());
|
|
846
|
+
return;
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
if (req.method === 'GET' && url.pathname === '/v1/result-package-trust/summary') {
|
|
850
|
+
sendJson(res, 200, summarizeResultPackageTrustLanePack());
|
|
851
|
+
return;
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
if (req.method === 'GET' && url.pathname === '/v1/event-systems') {
|
|
855
|
+
sendJson(res, 200, buildEventSystemLanePack());
|
|
856
|
+
return;
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
if (req.method === 'GET' && url.pathname === '/v1/event-systems/summary') {
|
|
860
|
+
sendJson(res, 200, summarizeEventSystemLanePack());
|
|
861
|
+
return;
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
if (req.method === 'GET' && url.pathname === '/v1/telemetry') {
|
|
865
|
+
sendJson(res, 200, buildTelemetryLanePack());
|
|
866
|
+
return;
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
if (req.method === 'GET' && url.pathname === '/v1/telemetry/summary') {
|
|
870
|
+
sendJson(res, 200, summarizeTelemetryLanePack());
|
|
871
|
+
return;
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
if (req.method === 'GET' && url.pathname === '/v1/provenance') {
|
|
875
|
+
sendJson(res, 200, buildProvenanceLanePack());
|
|
876
|
+
return;
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
if (req.method === 'GET' && url.pathname === '/v1/provenance/summary') {
|
|
880
|
+
sendJson(res, 200, summarizeProvenanceLanePack());
|
|
881
|
+
return;
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
if (req.method === 'GET' && url.pathname === '/v1/artifact-distribution') {
|
|
885
|
+
sendJson(res, 200, buildArtifactDistributionLanePack());
|
|
886
|
+
return;
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
if (req.method === 'GET' && url.pathname === '/v1/artifact-distribution/summary') {
|
|
890
|
+
sendJson(res, 200, summarizeArtifactDistributionLanePack());
|
|
891
|
+
return;
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
if (req.method === 'GET' && url.pathname === '/v1/shared-signals') {
|
|
895
|
+
sendJson(res, 200, buildSharedSignalsLanePack());
|
|
896
|
+
return;
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
if (req.method === 'GET' && url.pathname === '/v1/shared-signals/summary') {
|
|
900
|
+
sendJson(res, 200, summarizeSharedSignalsLanePack());
|
|
901
|
+
return;
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
if (req.method === 'GET' && url.pathname === '/v1/feature-control') {
|
|
905
|
+
sendJson(res, 200, buildFeatureControlLanePack());
|
|
906
|
+
return;
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
if (req.method === 'GET' && url.pathname === '/v1/feature-control/summary') {
|
|
910
|
+
sendJson(res, 200, summarizeFeatureControlLanePack());
|
|
911
|
+
return;
|
|
912
|
+
}
|
|
913
|
+
|
|
618
914
|
if (req.method === 'GET' && url.pathname === '/v1/release-pack') {
|
|
619
915
|
sendJson(res, 200, buildReleasePack());
|
|
620
916
|
return;
|
|
@@ -1985,6 +2281,71 @@ async function routeRequest(req, res) {
|
|
|
1985
2281
|
return;
|
|
1986
2282
|
}
|
|
1987
2283
|
|
|
2284
|
+
if (req.method === 'GET' && url.pathname === '/v1/role-freeze') {
|
|
2285
|
+
sendJson(res, 200, buildRoleFreezePack());
|
|
2286
|
+
return;
|
|
2287
|
+
}
|
|
2288
|
+
|
|
2289
|
+
if (req.method === 'GET' && url.pathname === '/v1/role-freeze/summary') {
|
|
2290
|
+
sendJson(res, 200, summarizeRoleFreezePack());
|
|
2291
|
+
return;
|
|
2292
|
+
}
|
|
2293
|
+
|
|
2294
|
+
if (req.method === 'GET' && url.pathname === '/v1/role-freeze/operator-bundle') {
|
|
2295
|
+
sendJson(res, 200, buildRoleFreezeOperatorBundle());
|
|
2296
|
+
return;
|
|
2297
|
+
}
|
|
2298
|
+
|
|
2299
|
+
if (req.method === 'GET' && url.pathname === '/v1/role-freeze/operator-bundle/summary') {
|
|
2300
|
+
sendJson(res, 200, summarizeRoleFreezeOperatorBundle());
|
|
2301
|
+
return;
|
|
2302
|
+
}
|
|
2303
|
+
|
|
2304
|
+
if (req.method === 'GET' && url.pathname === '/v1/role-freeze/policy-pack') {
|
|
2305
|
+
sendJson(res, 200, buildRoleFreezePolicyPack());
|
|
2306
|
+
return;
|
|
2307
|
+
}
|
|
2308
|
+
|
|
2309
|
+
if (req.method === 'GET' && url.pathname === '/v1/role-freeze/policy-pack/summary') {
|
|
2310
|
+
sendJson(res, 200, summarizeRoleFreezePolicyPack());
|
|
2311
|
+
return;
|
|
2312
|
+
}
|
|
2313
|
+
|
|
2314
|
+
if (req.method === 'GET' && url.pathname === '/v1/role-freeze/policy-application-summary') {
|
|
2315
|
+
sendJson(res, 200, buildRoleFreezePolicyApplicationSummary(url.searchParams.get('template_id')));
|
|
2316
|
+
return;
|
|
2317
|
+
}
|
|
2318
|
+
|
|
2319
|
+
if (req.method === 'GET' && url.pathname === '/v1/role-freeze/package') {
|
|
2320
|
+
sendJson(res, 200, buildRoleFreezePackage());
|
|
2321
|
+
return;
|
|
2322
|
+
}
|
|
2323
|
+
|
|
2324
|
+
if (req.method === 'GET' && url.pathname === '/v1/role-freeze/package/summary') {
|
|
2325
|
+
sendJson(res, 200, summarizeRoleFreezePackage());
|
|
2326
|
+
return;
|
|
2327
|
+
}
|
|
2328
|
+
|
|
2329
|
+
if (req.method === 'GET' && url.pathname === '/v1/role-transition') {
|
|
2330
|
+
sendJson(res, 200, buildRoleTransitionPack());
|
|
2331
|
+
return;
|
|
2332
|
+
}
|
|
2333
|
+
|
|
2334
|
+
if (req.method === 'GET' && url.pathname === '/v1/role-transition/summary') {
|
|
2335
|
+
sendJson(res, 200, summarizeRoleTransitionPack());
|
|
2336
|
+
return;
|
|
2337
|
+
}
|
|
2338
|
+
|
|
2339
|
+
if (req.method === 'GET' && url.pathname === '/v1/capability-registry-home') {
|
|
2340
|
+
sendJson(res, 200, buildCapabilityRegistryHomePack());
|
|
2341
|
+
return;
|
|
2342
|
+
}
|
|
2343
|
+
|
|
2344
|
+
if (req.method === 'GET' && url.pathname === '/v1/capability-registry-home/summary') {
|
|
2345
|
+
sendJson(res, 200, summarizeCapabilityRegistryHomePack());
|
|
2346
|
+
return;
|
|
2347
|
+
}
|
|
2348
|
+
|
|
1988
2349
|
if (req.method === 'GET' && url.pathname === '/v1/proof-center') {
|
|
1989
2350
|
sendJson(res, 200, proofSdk.buildDefaultProofCenter());
|
|
1990
2351
|
return;
|
|
@@ -2692,6 +3053,149 @@ async function routeRequest(req, res) {
|
|
|
2692
3053
|
return;
|
|
2693
3054
|
}
|
|
2694
3055
|
|
|
3056
|
+
if (req.method === 'POST' && url.pathname === '/v1/role-freeze') {
|
|
3057
|
+
try {
|
|
3058
|
+
await readJsonBody(req);
|
|
3059
|
+
const result = buildRoleFreezePack();
|
|
3060
|
+
sendJson(res, 200, result);
|
|
3061
|
+
} catch (error) {
|
|
3062
|
+
sendJson(res, 400, { ok: false, reason: error.message });
|
|
3063
|
+
}
|
|
3064
|
+
return;
|
|
3065
|
+
}
|
|
3066
|
+
|
|
3067
|
+
if (req.method === 'POST' && url.pathname === '/v1/role-freeze/summary') {
|
|
3068
|
+
try {
|
|
3069
|
+
await readJsonBody(req);
|
|
3070
|
+
const result = summarizeRoleFreezePack();
|
|
3071
|
+
sendJson(res, 200, result);
|
|
3072
|
+
} catch (error) {
|
|
3073
|
+
sendJson(res, 400, { ok: false, reason: error.message });
|
|
3074
|
+
}
|
|
3075
|
+
return;
|
|
3076
|
+
}
|
|
3077
|
+
|
|
3078
|
+
if (req.method === 'POST' && url.pathname === '/v1/role-freeze/operator-bundle') {
|
|
3079
|
+
try {
|
|
3080
|
+
await readJsonBody(req);
|
|
3081
|
+
const result = buildRoleFreezeOperatorBundle();
|
|
3082
|
+
sendJson(res, 200, result);
|
|
3083
|
+
} catch (error) {
|
|
3084
|
+
sendJson(res, 400, { ok: false, reason: error.message });
|
|
3085
|
+
}
|
|
3086
|
+
return;
|
|
3087
|
+
}
|
|
3088
|
+
|
|
3089
|
+
if (req.method === 'POST' && url.pathname === '/v1/role-freeze/operator-bundle/summary') {
|
|
3090
|
+
try {
|
|
3091
|
+
await readJsonBody(req);
|
|
3092
|
+
const result = summarizeRoleFreezeOperatorBundle();
|
|
3093
|
+
sendJson(res, 200, result);
|
|
3094
|
+
} catch (error) {
|
|
3095
|
+
sendJson(res, 400, { ok: false, reason: error.message });
|
|
3096
|
+
}
|
|
3097
|
+
return;
|
|
3098
|
+
}
|
|
3099
|
+
|
|
3100
|
+
if (req.method === 'POST' && url.pathname === '/v1/role-freeze/policy-pack') {
|
|
3101
|
+
try {
|
|
3102
|
+
await readJsonBody(req);
|
|
3103
|
+
const result = buildRoleFreezePolicyPack();
|
|
3104
|
+
sendJson(res, 200, result);
|
|
3105
|
+
} catch (error) {
|
|
3106
|
+
sendJson(res, 400, { ok: false, reason: error.message });
|
|
3107
|
+
}
|
|
3108
|
+
return;
|
|
3109
|
+
}
|
|
3110
|
+
|
|
3111
|
+
if (req.method === 'POST' && url.pathname === '/v1/role-freeze/policy-pack/summary') {
|
|
3112
|
+
try {
|
|
3113
|
+
await readJsonBody(req);
|
|
3114
|
+
const result = summarizeRoleFreezePolicyPack();
|
|
3115
|
+
sendJson(res, 200, result);
|
|
3116
|
+
} catch (error) {
|
|
3117
|
+
sendJson(res, 400, { ok: false, reason: error.message });
|
|
3118
|
+
}
|
|
3119
|
+
return;
|
|
3120
|
+
}
|
|
3121
|
+
|
|
3122
|
+
if (req.method === 'POST' && url.pathname === '/v1/role-freeze/policy-application-summary') {
|
|
3123
|
+
try {
|
|
3124
|
+
const body = await readJsonBody(req);
|
|
3125
|
+
const result = buildRoleFreezePolicyApplicationSummary(body && body.template_id ? body.template_id : null);
|
|
3126
|
+
sendJson(res, 200, result);
|
|
3127
|
+
} catch (error) {
|
|
3128
|
+
sendJson(res, 400, { ok: false, reason: error.message });
|
|
3129
|
+
}
|
|
3130
|
+
return;
|
|
3131
|
+
}
|
|
3132
|
+
|
|
3133
|
+
if (req.method === 'POST' && url.pathname === '/v1/role-freeze/package') {
|
|
3134
|
+
try {
|
|
3135
|
+
await readJsonBody(req);
|
|
3136
|
+
const result = buildRoleFreezePackage();
|
|
3137
|
+
sendJson(res, 200, result);
|
|
3138
|
+
} catch (error) {
|
|
3139
|
+
sendJson(res, 400, { ok: false, reason: error.message });
|
|
3140
|
+
}
|
|
3141
|
+
return;
|
|
3142
|
+
}
|
|
3143
|
+
|
|
3144
|
+
if (req.method === 'POST' && url.pathname === '/v1/role-freeze/package/summary') {
|
|
3145
|
+
try {
|
|
3146
|
+
await readJsonBody(req);
|
|
3147
|
+
const result = summarizeRoleFreezePackage();
|
|
3148
|
+
sendJson(res, 200, result);
|
|
3149
|
+
} catch (error) {
|
|
3150
|
+
sendJson(res, 400, { ok: false, reason: error.message });
|
|
3151
|
+
}
|
|
3152
|
+
return;
|
|
3153
|
+
}
|
|
3154
|
+
|
|
3155
|
+
if (req.method === 'POST' && url.pathname === '/v1/role-transition') {
|
|
3156
|
+
try {
|
|
3157
|
+
await readJsonBody(req);
|
|
3158
|
+
const result = buildRoleTransitionPack();
|
|
3159
|
+
sendJson(res, 200, result);
|
|
3160
|
+
} catch (error) {
|
|
3161
|
+
sendJson(res, 400, { ok: false, reason: error.message });
|
|
3162
|
+
}
|
|
3163
|
+
return;
|
|
3164
|
+
}
|
|
3165
|
+
|
|
3166
|
+
if (req.method === 'POST' && url.pathname === '/v1/role-transition/summary') {
|
|
3167
|
+
try {
|
|
3168
|
+
await readJsonBody(req);
|
|
3169
|
+
const result = summarizeRoleTransitionPack();
|
|
3170
|
+
sendJson(res, 200, result);
|
|
3171
|
+
} catch (error) {
|
|
3172
|
+
sendJson(res, 400, { ok: false, reason: error.message });
|
|
3173
|
+
}
|
|
3174
|
+
return;
|
|
3175
|
+
}
|
|
3176
|
+
|
|
3177
|
+
if (req.method === 'POST' && url.pathname === '/v1/capability-registry-home') {
|
|
3178
|
+
try {
|
|
3179
|
+
await readJsonBody(req);
|
|
3180
|
+
const result = buildCapabilityRegistryHomePack();
|
|
3181
|
+
sendJson(res, 200, result);
|
|
3182
|
+
} catch (error) {
|
|
3183
|
+
sendJson(res, 400, { ok: false, reason: error.message });
|
|
3184
|
+
}
|
|
3185
|
+
return;
|
|
3186
|
+
}
|
|
3187
|
+
|
|
3188
|
+
if (req.method === 'POST' && url.pathname === '/v1/capability-registry-home/summary') {
|
|
3189
|
+
try {
|
|
3190
|
+
await readJsonBody(req);
|
|
3191
|
+
const result = summarizeCapabilityRegistryHomePack();
|
|
3192
|
+
sendJson(res, 200, result);
|
|
3193
|
+
} catch (error) {
|
|
3194
|
+
sendJson(res, 400, { ok: false, reason: error.message });
|
|
3195
|
+
}
|
|
3196
|
+
return;
|
|
3197
|
+
}
|
|
3198
|
+
|
|
2695
3199
|
if (req.method === 'POST' && url.pathname === '/v1/proof-center/governance/operator-view') {
|
|
2696
3200
|
try {
|
|
2697
3201
|
const body = await readJsonBody(req);
|