Skip to content

Commit

Permalink
Revert "ListUsers API protobuf definitions (#140)"
Browse files Browse the repository at this point in the history
This reverts commit 4255ca2.
  • Loading branch information
willvedd committed Mar 11, 2024
1 parent 4255ca2 commit c91128b
Show file tree
Hide file tree
Showing 6 changed files with 1,978 additions and 3,822 deletions.
176 changes: 0 additions & 176 deletions docs/openapiv2/apidocs.swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

115 changes: 0 additions & 115 deletions openfga/v1/openfga_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -672,20 +672,6 @@ service OpenFGAService {
"The objects given will not be sorted, and therefore two identical calls can give a given different set of objects."
};
}

rpc ListUsers(ListUsersRequest) returns (ListUsersResponse) {
option (google.api.http) = {
post: "/stores/{store_id}/list-users",
body: "*"
};

option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "List all users of the given type that the object has a relation with"
tags: ["Relationship Queries"]
operation_id: "ListUsers"
description: ""
};
}
}

message ListObjectsRequest {
Expand Down Expand Up @@ -745,107 +731,6 @@ message ListObjectsResponse {
];
}

message ListUsersRequest {
string store_id = 1 [
json_name = "store_id",
(validate.rules).string = {pattern: "^[ABCDEFGHJKMNPQRSTVWXYZ0-9]{26}$"},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "\"01YCP46JKYM8FJCQ37NMBYHE5X\""}
];

string authorization_model_id = 2 [
json_name = "authorization_model_id",
(validate.rules).string = {
pattern: "^[ABCDEFGHJKMNPQRSTVWXYZ0-9]{26}$",
ignore_empty: true
},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "\"01G5JAVJ41T49E9TT3SKVS7X1J\""}
];

Object object = 3 [
json_name = "object",
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "\"document:example\""},
(google.api.field_behavior) = REQUIRED
];

string relation = 4 [
(validate.rules).string = {pattern: "^[^:#@\\s]{1,50}$"},
(google.api.field_behavior) = REQUIRED,
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "\"reader\""}
];

repeated ListUsersFilter user_filters = 5 [
json_name = "user_filters",
(google.api.field_behavior) = REQUIRED,
(validate.rules).repeated = {
min_items: 1,
max_items: 1
},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "[{\"type\": \"user\"}, {\"type\": \"group\", \"relation\": \"member\"}]"}
];

openfga.v1.ContextualTupleKeys contextual_tuples = 6 [json_name = "contextual_tuples"];
}

message ListUsersFilter {
string type = 1 [
(validate.rules).string = {
pattern: "^[^:#@\\s]{1,254}$",
ignore_empty: false
},
(google.api.field_behavior) = REQUIRED,
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "\"group\""}
];
string relation = 2 [
(validate.rules).string = {
pattern: "^[^:#@\\s]{1,50}$",
ignore_empty: true
},
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "\"member\""}
];
}

message User {
oneof user {
Object object = 1;
UsersetUser userset = 2;
Wildcard wildcard = 3;
}
}

message UsersetUser {
string type = 1 [
(validate.rules).string = {
pattern: "^[^:#@\\s]{1,254}$",
ignore_empty: false
},
(google.api.field_behavior) = REQUIRED,
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "\"group\""}
];
string id = 2 [
(validate.rules).string = {
pattern: "[^#:\\s]+$",
ignore_empty: false
},
(google.api.field_behavior) = REQUIRED
];
string relation = 3 [
(validate.rules).string = {
pattern: "^[^:#@\\s]{1,50}$",
ignore_empty: true
},
(google.api.field_behavior) = REQUIRED,
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: "\"member\""}
];
}

message ListUsersResponse {
repeated User users = 1 [
json_name = "users",
(google.api.field_behavior) = REQUIRED,
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {example: ""}
];
}

message StreamedListObjectsRequest {
string store_id = 1 [
json_name = "store_id",
Expand Down
Loading

0 comments on commit c91128b

Please sign in to comment.