mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:37:32 +00:00
perf: query projected milestones for onboarding view (#6760)
* feat: support list milestones api * show milestones in onboarding view * add authenticated milestone * add icon to login milestone * update main * lint * fix import * fix import * lint * reuse proto milestone type mapping
This commit is contained in:
@@ -14,6 +14,7 @@ import "zitadel/event.proto";
|
||||
import "zitadel/management.proto";
|
||||
import "zitadel/v1.proto";
|
||||
import "zitadel/message.proto";
|
||||
import "zitadel/milestone/v1/milestone.proto";
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
import "google/api/field_behavior.proto";
|
||||
@@ -3773,6 +3774,23 @@ service AdminService {
|
||||
permission: "iam.feature.write";
|
||||
};
|
||||
}
|
||||
|
||||
rpc ListMilestones(ListMilestonesRequest) returns (ListMilestonesResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/milestones/_search";
|
||||
body: "*"
|
||||
};
|
||||
|
||||
option (zitadel.v1.auth_option) = {
|
||||
permission: "milestones.read";
|
||||
};
|
||||
|
||||
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
|
||||
tags: "Milestones";
|
||||
summary: "Search Milestones";
|
||||
description: "Returns a list of reached instance usage milestones."
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7892,4 +7910,18 @@ message ActivateFeatureLoginDefaultOrgRequest {}
|
||||
|
||||
message ActivateFeatureLoginDefaultOrgResponse {
|
||||
zitadel.v1.ObjectDetails details = 1;
|
||||
}
|
||||
}
|
||||
|
||||
message ListMilestonesRequest {
|
||||
//list limitations and ordering
|
||||
zitadel.v1.ListQuery query = 1;
|
||||
// the field the result is sorted
|
||||
zitadel.milestone.v1.MilestoneFieldName sorting_column = 2;
|
||||
//criteria the client is looking for
|
||||
repeated zitadel.milestone.v1.MilestoneQuery queries = 3;
|
||||
}
|
||||
|
||||
message ListMilestonesResponse {
|
||||
zitadel.v1.ListDetails details = 1;
|
||||
repeated zitadel.milestone.v1.Milestone result = 2;
|
||||
}
|
||||
|
49
proto/zitadel/milestone/v1/milestone.proto
Normal file
49
proto/zitadel/milestone/v1/milestone.proto
Normal file
@@ -0,0 +1,49 @@
|
||||
syntax = "proto3";
|
||||
|
||||
import "zitadel/object.proto";
|
||||
import "validate/validate.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
import "protoc-gen-openapiv2/options/annotations.proto";
|
||||
|
||||
package zitadel.milestone.v1;
|
||||
|
||||
option go_package ="github.com/zitadel/zitadel/pkg/grpc/milestone";
|
||||
|
||||
enum MilestoneType {
|
||||
MILESTONE_TYPE_UNSPECIFIED = 0;
|
||||
MILESTONE_TYPE_INSTANCE_CREATED = 1;
|
||||
MILESTONE_TYPE_AUTHENTICATION_SUCCEEDED_ON_INSTANCE = 2;
|
||||
MILESTONE_TYPE_PROJECT_CREATED = 3;
|
||||
MILESTONE_TYPE_APPLICATION_CREATED = 4;
|
||||
MILESTONE_TYPE_AUTHENTICATION_SUCCEEDED_ON_APPLICATION = 5;
|
||||
MILESTONE_TYPE_INSTANCE_DELETED = 6;
|
||||
}
|
||||
|
||||
enum MilestoneFieldName {
|
||||
MILESTONE_FIELD_NAME_UNSPECIFIED = 0;
|
||||
MILESTONE_FIELD_NAME_TYPE = 1;
|
||||
MILESTONE_FIELD_NAME_REACHED_DATE = 2;
|
||||
}
|
||||
|
||||
message Milestone {
|
||||
// For the milestones, the standard details are not projected yet
|
||||
reserved 1;
|
||||
reserved "details";
|
||||
MilestoneType type = 2;
|
||||
google.protobuf.Timestamp reached_date = 3;
|
||||
}
|
||||
|
||||
message MilestoneQuery {
|
||||
oneof query {
|
||||
IsReachedQuery is_reached_query = 1;
|
||||
}
|
||||
}
|
||||
|
||||
message IsReachedQuery {
|
||||
bool reached = 1 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
description: "only reached milestones";
|
||||
}
|
||||
];
|
||||
}
|
Reference in New Issue
Block a user