mirror of
https://github.com/zitadel/zitadel.git
synced 2025-02-28 16:07:24 +00:00
feat: add project resource owner serch query (#2528)
This commit is contained in:
parent
4c50b6dfa2
commit
6f984efb16
@ -102,6 +102,18 @@ title: zitadel/project.proto
|
||||
| Field | Type | Description | Validation |
|
||||
| ----- | ---- | ----------- | ----------- |
|
||||
| [**oneof**](https://developers.google.com/protocol-buffers/docs/proto3#oneof) query.name_query | ProjectNameQuery | - | |
|
||||
| [**oneof**](https://developers.google.com/protocol-buffers/docs/proto3#oneof) query.project_resource_owner_query | ProjectResourceOwnerQuery | - | |
|
||||
|
||||
|
||||
|
||||
|
||||
### ProjectResourceOwnerQuery
|
||||
|
||||
|
||||
|
||||
| Field | Type | Description | Validation |
|
||||
| ----- | ---- | ----------- | ----------- |
|
||||
| resource_owner | string | - | string.max_len: 200<br /> |
|
||||
|
||||
|
||||
|
||||
|
@ -68,6 +68,8 @@ func ProjectQueryToModel(apiQuery *proj_pb.ProjectQuery) (query.SearchQuery, err
|
||||
switch q := apiQuery.Query.(type) {
|
||||
case *proj_pb.ProjectQuery_NameQuery:
|
||||
return query.NewProjectNameSearchQuery(object.TextMethodToQuery(q.NameQuery.Method), q.NameQuery.Name)
|
||||
case *proj_pb.ProjectQuery_ProjectResourceOwnerQuery:
|
||||
return query.NewProjectResourceOwnerSearchQuery(q.ProjectResourceOwnerQuery.ResourceOwner)
|
||||
default:
|
||||
return nil, errors.ThrowInvalidArgument(nil, "ORG-vR9nC", "List.Query.Invalid")
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ message GrantedProject {
|
||||
description: "current state of the project grant";
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
string project_id = 6 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"69629023906488334\""
|
||||
@ -109,6 +109,7 @@ message ProjectQuery {
|
||||
option (validate.required) = true;
|
||||
|
||||
ProjectNameQuery name_query = 1;
|
||||
ProjectResourceOwnerQuery project_resource_owner_query = 2;
|
||||
}
|
||||
}
|
||||
|
||||
@ -127,6 +128,15 @@ message ProjectNameQuery {
|
||||
];
|
||||
}
|
||||
|
||||
message ProjectResourceOwnerQuery {
|
||||
string resource_owner = 1 [
|
||||
(validate.rules).string = {max_len: 200},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "\"69629023906488334\""
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message Role {
|
||||
string key = 1 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user