feat: Use V2 API's in Console (#9312)

# Which Problems Are Solved
Solves #8976

# Additional Changes
I have done some intensive refactorings and we are using the new
@zitadel/client package for GRPC access.

# Additional Context
- Closes #8976

---------

Co-authored-by: Max Peintner <peintnerm@gmail.com>
This commit is contained in:
Ramon
2025-02-17 19:25:46 +01:00
committed by GitHub
parent ad225836d5
commit 3042bbb993
90 changed files with 3679 additions and 2315 deletions

View File

@@ -183,6 +183,7 @@ func Test_instanceFeaturesToCommand(t *testing.T) {
Required: true,
BaseUri: gu.Ptr("https://login.com"),
},
ConsoleUseV2UserApi: gu.Ptr(true),
}
want := &command.InstanceFeatures{
LoginDefaultOrg: gu.Ptr(true),
@@ -200,6 +201,7 @@ func Test_instanceFeaturesToCommand(t *testing.T) {
Required: true,
BaseURI: &url.URL{Scheme: "https", Host: "login.com"},
},
ConsoleUseV2UserApi: gu.Ptr(true),
}
got, err := instanceFeaturesToCommand(arg)
assert.Equal(t, want, got)
@@ -264,6 +266,10 @@ func Test_instanceFeaturesToPb(t *testing.T) {
Level: feature.LevelInstance,
Value: true,
},
ConsoleUseV2UserApi: query.FeatureSource[bool]{
Level: feature.LevelInstance,
Value: true,
},
}
want := &feature_pb.GetInstanceFeaturesResponse{
Details: &object.Details{
@@ -328,6 +334,10 @@ func Test_instanceFeaturesToPb(t *testing.T) {
Enabled: true,
Source: feature_pb.Source_SOURCE_INSTANCE,
},
ConsoleUseV2UserApi: &feature_pb.FeatureFlag{
Enabled: true,
Source: feature_pb.Source_SOURCE_INSTANCE,
},
}
got := instanceFeaturesToPb(arg)
assert.Equal(t, want, got)