Skip to content

Commit

Permalink
Change the signatures of the remaining reflection APIs slightly
Browse files Browse the repository at this point in the history
  • Loading branch information
josephschorr committed May 7, 2024
1 parent aa9a74c commit d1c59ae
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions authzed/api/v1/experimental_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ service ExperimentalService {
}

// EXPERIMENTAL: ComputablePermissions is an API that allows clients to request the set of
// permissions that compute based off a set of relations. For example, if a schema has a relation
// permissions that compute based off a relation. For example, if a schema has a relation
// `viewer` and a permission `view` defined as `permission view = viewer + editor`, then the
// computable permissions for the relation `viewer` will include `view`.
rpc ExperimentalComputablePermissions(ExperimentalComputablePermissionsRequest)
Expand All @@ -79,8 +79,8 @@ service ExperimentalService {
}

// EXPERIMENTAL: DependentRelations is an API that allows clients to request the set of
// relations that used to compute a permission, recursively. It is the inverse of the
// ComputablePermissions API.
// relations and permissions that used to compute a permission, recursively. It is the
// inverse of the ComputablePermissions API.
rpc ExperimentalDependentRelations(ExperimentalDependentRelationsRequest)
returns (ExperimentalDependentRelationsResponse) {
option (google.api.http) = {
Expand Down Expand Up @@ -296,36 +296,33 @@ message ExpPermission {

message ExperimentalComputablePermissionsRequest {
Consistency consistency = 1;
repeated ExpRelationReference relations = 2;
string definition_name = 2;

Check failure on line 299 in authzed/api/v1/experimental_service.proto

View workflow job for this annotation

GitHub Actions / Lint & Publish Draft/Branch

Field "2" with name "definition_name" on message "ExperimentalComputablePermissionsRequest" changed option "json_name" from "relations" to "definitionName".

Check failure on line 299 in authzed/api/v1/experimental_service.proto

View workflow job for this annotation

GitHub Actions / Lint & Publish Draft/Branch

Field "2" on message "ExperimentalComputablePermissionsRequest" changed label from "repeated" to "optional".

Check failure on line 299 in authzed/api/v1/experimental_service.proto

View workflow job for this annotation

GitHub Actions / Lint & Publish Draft/Branch

Field "2" on message "ExperimentalComputablePermissionsRequest" changed type from "message" to "string". See https://developers.google.com/protocol-buffers/docs/proto3#updating for wire compatibility rules and https://developers.google.com/protocol-buffers/docs/proto3#json for JSON compatibility rules.

Check failure on line 299 in authzed/api/v1/experimental_service.proto

View workflow job for this annotation

GitHub Actions / Lint & Publish Draft/Branch

Field "2" on message "ExperimentalComputablePermissionsRequest" changed name from "relations" to "definition_name".
string relation_name = 3;

Check failure on line 300 in authzed/api/v1/experimental_service.proto

View workflow job for this annotation

GitHub Actions / Lint & Publish Draft/Branch

Field "3" with name "relation_name" on message "ExperimentalComputablePermissionsRequest" changed option "json_name" from "optionalDefinitionNameFilter" to "relationName".

Check failure on line 300 in authzed/api/v1/experimental_service.proto

View workflow job for this annotation

GitHub Actions / Lint & Publish Draft/Branch

Field "3" on message "ExperimentalComputablePermissionsRequest" changed name from "optional_definition_name_filter" to "relation_name".

// optional_definition_name_match is a prefix that is matched against the definition name(s)
// for the permissions returned.
// If not specified, will be ignored.
string optional_definition_name_filter = 3;
string optional_definition_name_filter = 4;
}

// ExpRelationReference is a reference to a relation in the schema.
// ExpRelationReference is a reference to a relation or permission in the schema.
message ExpRelationReference {
string definition_name = 1;
string relation_name = 2;
}

// ExpPermissionReference is a reference to a permission in the schema.
message ExpPermissionReference {
string definition_name = 1;
string permission_name = 2;
bool is_permission = 3;
}

message ExperimentalComputablePermissionsResponse {
repeated ExpPermissionReference permissions = 1;
repeated ExpRelationReference permissions = 1;

Check failure on line 316 in authzed/api/v1/experimental_service.proto

View workflow job for this annotation

GitHub Actions / Lint & Publish Draft/Branch

Field "1" on message "ExperimentalComputablePermissionsResponse" changed type from "authzed.api.v1.ExpPermissionReference" to "authzed.api.v1.ExpRelationReference".

// read_at is the ZedToken at which the schema was read.
ZedToken read_at = 2;
}

message ExperimentalDependentRelationsRequest {
Consistency consistency = 1;
ExpPermissionReference permission = 2;
string definition_name = 2;

Check failure on line 324 in authzed/api/v1/experimental_service.proto

View workflow job for this annotation

GitHub Actions / Lint & Publish Draft/Branch

Field "2" with name "definition_name" on message "ExperimentalDependentRelationsRequest" changed option "json_name" from "permission" to "definitionName".

Check failure on line 324 in authzed/api/v1/experimental_service.proto

View workflow job for this annotation

GitHub Actions / Lint & Publish Draft/Branch

Field "2" on message "ExperimentalDependentRelationsRequest" changed type from "message" to "string". See https://developers.google.com/protocol-buffers/docs/proto3#updating for wire compatibility rules and https://developers.google.com/protocol-buffers/docs/proto3#json for JSON compatibility rules.

Check failure on line 324 in authzed/api/v1/experimental_service.proto

View workflow job for this annotation

GitHub Actions / Lint & Publish Draft/Branch

Field "2" on message "ExperimentalDependentRelationsRequest" changed name from "permission" to "definition_name".
string permission_name = 3;
}

message ExperimentalDependentRelationsResponse {
Expand Down

0 comments on commit d1c59ae

Please sign in to comment.