@@ -207,57 +207,64 @@ message ExperimentalReflectSchemaResponse {
207207 ZedToken read_at = 3 ;
208208}
209209
210+ // ExpSchemaFilter is a filter that can be applied to the schema on reflection.
210211message ExpSchemaFilter {
211- enum KindFilter {
212- KIND_FILTER_UNSPECIFIED = 0 ;
213- KIND_FILTER_DEFINITION = 1 ;
214- KIND_FILTER_CAVEAT = 2 ;
215- KIND_FILTER_RELATION = 3 ;
216- KIND_FILTER_PERMISSION = 4 ;
217- }
218-
219- // optional_definition_name_match is a regex that is matched against the definition or caveat name.
220- // If not specified, will be ignored.
212+ // optional_definition_name_match is a regex that is matched against the definition name.
221213 string optional_definition_name_match = 1 ;
222214
223- // optional_relation_or_permission_name_match is a regex that is matched against the relation or permission name.
224- // If not specified, will be ignored.
225- string optional_relation_or_permission_name_match = 2 ;
215+ // optional_caveat_name_match is a regex that is matched against the caveat name.
216+ string optional_caveat_name_match = 2 ;
217+
218+ // optional_relation_name_match is a regex that is matched against the relation name.
219+ string optional_relation_name_match = 3 ;
226220
227- // kind_filters is a list of kinds to filter on. If not specified, will be ignored. If multiple are specified,
228- // the filter will be applied in an OR fashion.
229- repeated KindFilter kind_filters = 3 ;
221+ // optional_permission_name_match is a regex that is matched against the permission name.
222+ string optional_permission_name_match = 4 ;
230223}
231224
225+ // ExpDefinition is the representation of a definition in the schema.
232226message ExpDefinition {
233227 string name = 1 ;
228+
229+ // comment is a human-readable comments on the definition. Will include
230+ // delimiter characters.
234231 string comment = 2 ;
235232
236233 repeated ExpRelation relations = 3 ;
237234 repeated ExpPermission permissions = 4 ;
238235}
239236
237+ // ExpCaveat is the representation of a caveat in the schema.
240238message ExpCaveat {
241239 string name = 1 ;
240+
241+ // comment is a human-readable comments on the caveat. Will include
242+ // delimiter characters.
242243 string comment = 2 ;
243244
244245 repeated ExpCaveatParameter parameters = 3 ;
245246 string expression = 4 ;
246247}
247248
249+ // ExpCaveatParameter is the representation of a parameter in a caveat.
248250message ExpCaveatParameter {
249251 string name = 1 ;
252+
253+ // type is the type of the parameter. Will be a string representing the
254+ // type, e.g. `int` or `list<string>`
250255 string type = 2 ;
251256 string parent_caveat_name = 3 ;
252257}
253258
259+ // ExpRelation is the representation of a relation in the schema.
254260message ExpRelation {
255261 string name = 1 ;
256262 string comment = 2 ;
257263 string parent_definition_name = 3 ;
258264 repeated ExpTypeReference subject_types = 4 ;
259265}
260266
267+ // ExpTypeReference is the representation of a type reference in the schema.
261268message ExpTypeReference {
262269 // subject_definition_name is the name of the subject's definition.
263270 string subject_definition_name = 1 ;
@@ -277,8 +284,12 @@ message ExpTypeReference {
277284 }
278285}
279286
287+ // ExpPermission is the representation of a permission in the schema.
280288message ExpPermission {
281289 string name = 1 ;
290+
291+ // comment is a human-readable comments on the permission. Will include
292+ // delimiter characters.
282293 string comment = 2 ;
283294 string parent_definition_name = 3 ;
284295}
@@ -293,14 +304,16 @@ message ExperimentalComputablePermissionsRequest {
293304 string optional_definition_name_match = 3 ;
294305}
295306
307+ // ExpRelationReference is a reference to a relation in the schema.
296308message ExpRelationReference {
297309 string definition_name = 1 ;
298310 string relation_name = 2 ;
299311}
300312
313+ // ExpPermissionReference is a reference to a permission in the schema.
301314message ExpPermissionReference {
302315 string definition_name = 1 ;
303- string relation_name = 2 ;
316+ string permission_name = 2 ;
304317}
305318
306319message ExperimentalComputablePermissionsResponse {
@@ -344,6 +357,7 @@ message ExpCaveatParameterTypeChange {
344357 string previous_type = 2 ;
345358}
346359
360+ // ExpSchemaDiff is the representation of a diff between two schemas.
347361message ExpSchemaDiff {
348362 oneof diff {
349363 ExpDefinition definition_added = 1 ;
0 commit comments