@opensoha/contracts 0.1.8 → 0.1.11

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.
Files changed (80) hide show
  1. package/README.md +1 -1
  2. package/auth/catalog_generated.go +3 -3
  3. package/auth/catalog_test.go +35 -0
  4. package/auth/permission-catalog.json +25 -157
  5. package/compat/json-schema-ecosystem-0.1.0.json +1 -1
  6. package/compat/openapi-loose-boundaries-0.1.0.json +16 -5
  7. package/fixtures/openapi/BrandingAssetUploadEnvelope/invalid/remote-url.json +5 -0
  8. package/fixtures/openapi/BrandingAssetUploadEnvelope/valid/png-data-url.json +5 -0
  9. package/fixtures/openapi/BrandingSettingsEnvelope/invalid/missing-favicon.json +9 -0
  10. package/fixtures/openapi/BrandingSettingsEnvelope/valid/default.json +10 -0
  11. package/fixtures/openapi/DockerHostAgentInstallation/invalid/missing-command.json +6 -0
  12. package/fixtures/openapi/DockerHostAgentInstallation/valid/installation.json +7 -0
  13. package/fixtures/openapi/IdentityProvider/invalid/missing-id.json +9 -0
  14. package/fixtures/openapi/IdentityProvider/valid/current.json +12 -0
  15. package/fixtures/openapi/IdentityProvider/valid/v0.1.9.json +14 -0
  16. package/fixtures/openapi/IdentitySettingsEnvelope/invalid/exposed-secret.json +14 -0
  17. package/fixtures/openapi/IdentitySettingsEnvelope/valid/redacted-provider.json +16 -0
  18. package/fixtures/openapi/KubernetesClusterListEnvelope/invalid/missing-health.json +12 -0
  19. package/fixtures/openapi/KubernetesClusterListEnvelope/valid/agent-cluster.json +18 -0
  20. package/fixtures/openapi/KubernetesNetworkTopologyEnvelope/invalid/missing-summary.json +7 -0
  21. package/fixtures/openapi/KubernetesNetworkTopologyEnvelope/valid/ingress-service-pod.json +29 -0
  22. package/fixtures/openapi/KubernetesPodListEnvelope/invalid/missing-scope.json +11 -0
  23. package/fixtures/openapi/KubernetesPodListEnvelope/valid/running-pod.json +15 -0
  24. package/fixtures/openapi/MenuEnvelope/invalid/missing-data.json +1 -0
  25. package/fixtures/openapi/MenuEnvelope/valid/menu.json +13 -0
  26. package/fixtures/openapi/MenuInput/invalid/missing-icon.json +5 -0
  27. package/fixtures/openapi/MenuInput/valid/top-level.json +12 -0
  28. package/fixtures/openapi/MenuListEnvelope/invalid/items-object.json +3 -0
  29. package/fixtures/openapi/MenuListEnvelope/valid/tree.json +27 -0
  30. package/fixtures/openapi/OIDCClient/invalid/missing-grant-types.json +9 -0
  31. package/fixtures/openapi/OIDCClient/valid/current.json +19 -0
  32. package/fixtures/openapi/OIDCClient/valid/v0.1.9.json +10 -0
  33. package/fixtures/openapi/OIDCClientInput/invalid/empty-rules.json +5 -0
  34. package/fixtures/openapi/OIDCClientInput/valid/regex.json +4 -0
  35. package/fixtures/openapi/OIDCClientInput/valid/strict.json +4 -0
  36. package/fixtures/openapi/OIDCClientInput/valid/v0.1.9.json +7 -0
  37. package/fixtures/openapi/ObservabilityContext/invalid/missing-time-range.json +6 -0
  38. package/fixtures/openapi/ObservabilityContext/valid/scoped.json +27 -0
  39. package/fixtures/openapi/ObservabilityDashboardImportResultEnvelope/valid/imported.json +28 -1
  40. package/fixtures/openapi/ObservabilityDashboardPanelQueryInput/invalid/missing-time-to.json +6 -0
  41. package/fixtures/openapi/ObservabilityDashboardPanelQueryInput/valid/variables.json +8 -0
  42. package/fixtures/openapi/ObservabilityMetricCatalogEnvelope/invalid/missing-availability.json +10 -0
  43. package/fixtures/openapi/ObservabilityMetricCatalogEnvelope/valid/catalog.json +13 -0
  44. package/fixtures/openapi/ObservabilityQueryResultMeta/invalid/missing-state.json +3 -0
  45. package/fixtures/openapi/ObservabilityQueryResultMeta/valid/partial.json +15 -0
  46. package/fixtures/openapi/ObservabilityQuerySnapshot/invalid/missing-context.json +5 -0
  47. package/fixtures/openapi/ObservabilityQuerySnapshot/valid/prometheus.json +22 -0
  48. package/fixtures/openapi/ObservabilityServiceEnvelope/invalid/missing-status.json +12 -0
  49. package/fixtures/openapi/ObservabilityServiceEnvelope/valid/service.json +29 -0
  50. package/fixtures/openapi/ObservabilityServiceListEnvelope/invalid/missing-meta.json +3 -0
  51. package/fixtures/openapi/ObservabilityServiceListEnvelope/valid/services.json +39 -0
  52. package/fixtures/openapi/ObservabilityTopologyEnvelope/invalid/missing-edge-status.json +10 -0
  53. package/fixtures/openapi/ObservabilityTopologyEnvelope/valid/topology.json +22 -0
  54. package/fixtures/openapi/PlatformAuditLogListEnvelope/invalid/missing-action.json +14 -0
  55. package/fixtures/openapi/PlatformAuditLogListEnvelope/valid/kubernetes-mutation.json +24 -0
  56. package/fixtures/openapi/PlatformOperationLogListEnvelope/invalid/missing-target-scope.json +13 -0
  57. package/fixtures/openapi/PlatformOperationLogListEnvelope/valid/kubernetes-operation.json +29 -0
  58. package/fixtures/openapi/PodMetricsEnvelope/invalid/missing-configured.json +10 -0
  59. package/fixtures/openapi/PodMetricsEnvelope/valid/prometheus.json +25 -0
  60. package/fixtures/openapi/ScopeGrantEnvelope/invalid/missing-id.json +13 -0
  61. package/fixtures/openapi/ScopeGrantEnvelope/valid/platform.json +15 -0
  62. package/fixtures/openapi/ScopeGrantInput/invalid/missing-subject.json +7 -0
  63. package/fixtures/openapi/ScopeGrantInput/valid/delivery.json +11 -0
  64. package/fixtures/openapi/ScopeGrantListEnvelope/invalid/unknown-scope.json +16 -0
  65. package/fixtures/openapi/ScopeGrantListEnvelope/valid/list.json +18 -0
  66. package/fixtures/openapi/UpdateBrandingSettingsRequest/invalid/unknown-field.json +9 -0
  67. package/fixtures/openapi/UpdateBrandingSettingsRequest/valid/default.json +8 -0
  68. package/fixtures/openapi/UpdateLoginProvidersSettingsRequest/invalid/missing-providers.json +4 -0
  69. package/fixtures/openapi/UpdateLoginProvidersSettingsRequest/valid/provider-with-secret.json +15 -0
  70. package/fixtures/openapi/UploadBrandingAssetRequest/invalid/missing-file.json +1 -0
  71. package/fixtures/openapi/UploadBrandingAssetRequest/valid/file.json +3 -0
  72. package/gen/go/sohaapi/client.go +1 -1
  73. package/gen/go/sohaapi/client_test.go +18 -0
  74. package/gen/go/sohaapi/types.go +5195 -206
  75. package/gen/ts/sohaapi/index.ts +20364 -10039
  76. package/go.mod +1 -1
  77. package/openapi/soha-api.json +35965 -17157
  78. package/openapi/soha-api.yaml +19528 -11270
  79. package/openapi/spec_generated.go +3 -3
  80. package/package.json +1 -1
@@ -0,0 +1,29 @@
1
+ {
2
+ "items": [
3
+ {
4
+ "id": "operation-01",
5
+ "actorId": "user-01",
6
+ "actorName": "Platform Operator",
7
+ "operationType": "platform.port-forward.start",
8
+ "targetScope": {
9
+ "module": "platform",
10
+ "clusterId": "cluster-01",
11
+ "namespace": "production",
12
+ "resourceKind": "PortForward",
13
+ "resourceName": "session-01"
14
+ },
15
+ "result": "success",
16
+ "summary": "started agent port-forward session",
17
+ "requestPath": "/api/v1/clusters/cluster-01/network/port-forwards",
18
+ "requestMethod": "POST",
19
+ "requestId": "request-01",
20
+ "sourceIp": "192.0.2.10",
21
+ "metadata": {
22
+ "connectionMode": "agent",
23
+ "localPort": 18080,
24
+ "remotePort": 8080
25
+ },
26
+ "createdAt": "2026-08-10T08:00:00Z"
27
+ }
28
+ ]
29
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "data": {
3
+ "podName": "api-7c8d9f",
4
+ "namespace": "production",
5
+ "source": "prometheus",
6
+ "generatedAt": "2026-08-09T14:00:00Z",
7
+ "rangeMinutes": 60,
8
+ "stepSeconds": 60
9
+ }
10
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "data": {
3
+ "podName": "api-7c8d9f",
4
+ "namespace": "production",
5
+ "configured": true,
6
+ "source": "prometheus",
7
+ "generatedAt": "2026-08-09T14:00:00Z",
8
+ "rangeMinutes": 60,
9
+ "stepSeconds": 60,
10
+ "series": [
11
+ {
12
+ "key": "cpu",
13
+ "label": "CPU Usage",
14
+ "unit": "cores",
15
+ "latest": 0.25,
16
+ "points": [
17
+ {
18
+ "timestamp": "2026-08-09T14:00:00Z",
19
+ "value": 0.25
20
+ }
21
+ ]
22
+ }
23
+ ]
24
+ }
25
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "data": {
3
+ "subjectType": "team",
4
+ "subjectId": "platform-team",
5
+ "businessLineId": "",
6
+ "scopeType": "platform",
7
+ "role": "readonly",
8
+ "effect": "allow",
9
+ "enabled": true,
10
+ "createdAt": "2026-08-13T08:00:00Z",
11
+ "updatedAt": "2026-08-13T08:00:00Z"
12
+ }
13
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "data": {
3
+ "id": "grant-123",
4
+ "subjectType": "team",
5
+ "subjectId": "platform-team",
6
+ "businessLineId": "",
7
+ "scopeType": "platform",
8
+ "clusterIds": ["cluster-prod"],
9
+ "role": "readonly",
10
+ "effect": "allow",
11
+ "enabled": true,
12
+ "createdAt": "2026-08-13T08:00:00Z",
13
+ "updatedAt": "2026-08-13T08:00:00Z"
14
+ }
15
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "subjectType": "user",
3
+ "scopeType": "delivery",
4
+ "businessLineId": "payments",
5
+ "role": "developer",
6
+ "enabled": true
7
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "subjectType": "user",
3
+ "subjectId": "user-123",
4
+ "businessLineId": "payments",
5
+ "environmentIds": ["production"],
6
+ "applicationIds": ["checkout-api"],
7
+ "scopeType": "delivery",
8
+ "role": "developer",
9
+ "effect": "allow",
10
+ "enabled": true
11
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "items": [
3
+ {
4
+ "id": "grant-123",
5
+ "subjectType": "user",
6
+ "subjectId": "user-123",
7
+ "businessLineId": "payments",
8
+ "scopeType": "global",
9
+ "role": "developer",
10
+ "effect": "allow",
11
+ "enabled": true,
12
+ "createdAt": "2026-08-13T08:00:00Z",
13
+ "updatedAt": "2026-08-13T08:00:00Z"
14
+ }
15
+ ]
16
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "items": [
3
+ {
4
+ "id": "grant-123",
5
+ "subjectType": "user",
6
+ "subjectId": "user-123",
7
+ "businessLineId": "payments",
8
+ "environmentIds": [],
9
+ "applicationIds": ["checkout-api"],
10
+ "scopeType": "delivery",
11
+ "role": "developer",
12
+ "effect": "allow",
13
+ "enabled": true,
14
+ "createdAt": "2026-08-13T08:00:00Z",
15
+ "updatedAt": "2026-08-13T08:00:00Z"
16
+ }
17
+ ]
18
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "appTitle": "Soha",
3
+ "sidebarTitle": "Soha",
4
+ "loginLogoUrl": "/logo.svg",
5
+ "expandedLogoUrl": "/logo.svg",
6
+ "collapsedLogoUrl": "/logo.svg",
7
+ "faviconUrl": "/favicon.ico",
8
+ "themeColor": "blue"
9
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "appTitle": "Soha",
3
+ "sidebarTitle": "Soha",
4
+ "loginLogoUrl": "/logo.svg",
5
+ "expandedLogoUrl": "/logo.svg",
6
+ "collapsedLogoUrl": "/logo.svg",
7
+ "faviconUrl": "/favicon.ico"
8
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "defaultProviderId": "github",
3
+ "localPasswordLoginEnabled": true
4
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "providers": [
3
+ {
4
+ "id": "github",
5
+ "name": "GitHub",
6
+ "type": "oauth2",
7
+ "enabled": true,
8
+ "clientId": "public-client-id",
9
+ "clientSecret": "new-client-secret",
10
+ "certificate": "-----BEGIN CERTIFICATE-----\nMIIB\n-----END CERTIFICATE-----"
11
+ }
12
+ ],
13
+ "defaultProviderId": "github",
14
+ "localPasswordLoginEnabled": false
15
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "file": "branding-image-bytes"
3
+ }
@@ -14,7 +14,7 @@ import (
14
14
  "time"
15
15
  )
16
16
 
17
- const defaultUserAgent = "opensoha-contracts/0.1.8"
17
+ const defaultUserAgent = "opensoha-contracts/0.1.11"
18
18
 
19
19
  type Client struct {
20
20
  BaseURL string
@@ -40,6 +40,24 @@ func TestObservabilityCredentialKeyLegacyTypes(t *testing.T) {
40
40
  }
41
41
  }
42
42
 
43
+ func TestSAMLAttributeMappingLegacyConstants(t *testing.T) {
44
+ targets := map[SAMLAttributeMappingTarget]string{
45
+ Subject: "subject",
46
+ Username: "username",
47
+ Email: "email",
48
+ DisplayName: "displayName",
49
+ Role: "role",
50
+ Organization: "organization",
51
+ Team: "team",
52
+ Project: "project",
53
+ }
54
+ for target, want := range targets {
55
+ if string(target) != want || !target.Valid() {
56
+ t.Fatalf("SAMLAttributeMappingTarget %q is not the compatible value %q", target, want)
57
+ }
58
+ }
59
+ }
60
+
43
61
  func TestSystemHealthAndReadinessUsePublicRequests(t *testing.T) {
44
62
  cases := []struct {
45
63
  name string