From e2bc5ac1092a021fae357a6452cbaccdfb768a19 Mon Sep 17 00:00:00 2001 From: Tanner Stirrat Date: Mon, 6 Jan 2025 14:46:23 -0700 Subject: [PATCH] Push branch with expiration ahead of 1.40.0 --- .../materialize/v0/watchpermissionsets_pb2.py | 40 ++--- .../v0/watchpermissionsets_pb2.pyi | 6 +- authzed/api/v1/core_pb2.py | 55 +++---- authzed/api/v1/core_pb2.pyi | 13 +- authzed/api/v1/debug_pb2.py | 31 ++-- authzed/api/v1/debug_pb2.pyi | 13 +- authzed/api/v1/experimental_service_pb2.pyi | 7 +- authzed/api/v1/openapi_pb2.py | 4 +- authzed/api/v1/permission_service_pb2.py | 147 +++++++++--------- authzed/api/v1/permission_service_pb2.pyi | 18 ++- buf.gen.yaml | 2 +- 11 files changed, 186 insertions(+), 150 deletions(-) diff --git a/authzed/api/materialize/v0/watchpermissionsets_pb2.py b/authzed/api/materialize/v0/watchpermissionsets_pb2.py index 91ae8c3..ed5d227 100644 --- a/authzed/api/materialize/v0/watchpermissionsets_pb2.py +++ b/authzed/api/materialize/v0/watchpermissionsets_pb2.py @@ -25,7 +25,7 @@ from authzed.api.v1 import core_pb2 as authzed_dot_api_dot_v1_dot_core__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n4authzed/api/materialize/v0/watchpermissionsets.proto\x12\x1a\x61uthzed.api.materialize.v0\x1a\x19\x61uthzed/api/v1/core.proto\"n\n\x1aWatchPermissionSetsRequest\x12P\n\x17optional_starting_after\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\x15optionalStartingAfter\"\xad\x03\n\x1bWatchPermissionSetsResponse\x12I\n\x06\x63hange\x18\x01 \x01(\x0b\x32/.authzed.api.materialize.v0.PermissionSetChangeH\x00R\x06\x63hange\x12I\n\x12\x63ompleted_revision\x18\x02 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenH\x00R\x11\x63ompletedRevision\x12\x81\x01\n\x1flookup_permission_sets_required\x18\x03 \x01(\x0b\x32\x38.authzed.api.materialize.v0.LookupPermissionSetsRequiredH\x00R\x1clookupPermissionSetsRequired\x12h\n\x16\x62reaking_schema_change\x18\x04 \x01(\x0b\x32\x30.authzed.api.materialize.v0.BreakingSchemaChangeH\x00R\x14\x62reakingSchemaChangeB\n\n\x08response\"\xc5\x01\n\x06\x43ursor\x12\x14\n\x05limit\x18\x01 \x01(\rR\x05limit\x12.\n\x05token\x18\x04 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\x05token\x12%\n\x0estarting_index\x18\x05 \x01(\rR\rstartingIndex\x12+\n\x11\x63ompleted_members\x18\x06 \x01(\x08R\x10\x63ompletedMembers\x12!\n\x0cstarting_key\x18\x07 \x01(\tR\x0bstartingKey\"\xe8\x01\n\x1bLookupPermissionSetsRequest\x12\x14\n\x05limit\x18\x01 \x01(\rR\x05limit\x12J\n\x14optional_at_revision\x18\x02 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\x12optionalAtRevision\x12g\n\x1eoptional_starting_after_cursor\x18\x04 \x01(\x0b\x32\".authzed.api.materialize.v0.CursorR\x1boptionalStartingAfterCursor\"\xa3\x01\n\x1cLookupPermissionSetsResponse\x12G\n\x06\x63hange\x18\x01 \x01(\x0b\x32/.authzed.api.materialize.v0.PermissionSetChangeR\x06\x63hange\x12:\n\x06\x63ursor\x18\x02 \x01(\x0b\x32\".authzed.api.materialize.v0.CursorR\x06\x63ursor\"\xfc\x03\n\x13PermissionSetChange\x12\x39\n\x0b\x61t_revision\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\natRevision\x12Z\n\toperation\x18\x02 \x01(\x0e\x32<.authzed.api.materialize.v0.PermissionSetChange.SetOperationR\toperation\x12G\n\nparent_set\x18\x03 \x01(\x0b\x32(.authzed.api.materialize.v0.SetReferenceR\tparentSet\x12G\n\tchild_set\x18\x04 \x01(\x0b\x32(.authzed.api.materialize.v0.SetReferenceH\x00R\x08\x63hildSet\x12P\n\x0c\x63hild_member\x18\x05 \x01(\x0b\x32+.authzed.api.materialize.v0.MemberReferenceH\x00R\x0b\x63hildMember\"a\n\x0cSetOperation\x12\x1d\n\x19SET_OPERATION_UNSPECIFIED\x10\x00\x12\x17\n\x13SET_OPERATION_ADDED\x10\x01\x12\x19\n\x15SET_OPERATION_REMOVED\x10\x02\x42\x07\n\x05\x63hild\"\x82\x01\n\x0cSetReference\x12\x1f\n\x0bobject_type\x18\x01 \x01(\tR\nobjectType\x12\x1b\n\tobject_id\x18\x02 \x01(\tR\x08objectId\x12\x34\n\x16permission_or_relation\x18\x03 \x01(\tR\x14permissionOrRelation\"\x96\x01\n\x0fMemberReference\x12\x1f\n\x0bobject_type\x18\x01 \x01(\tR\nobjectType\x12\x1b\n\tobject_id\x18\x02 \x01(\tR\x08objectId\x12\x45\n\x1foptional_permission_or_relation\x18\x03 \x01(\tR\x1coptionalPermissionOrRelation\"f\n\x1cLookupPermissionSetsRequired\x12\x46\n\x12required_lookup_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\x10requiredLookupAt\"M\n\x14\x42reakingSchemaChange\x12\x35\n\tchange_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\x08\x63hangeAt2\xb9\x02\n\x1aWatchPermissionSetsService\x12\x8a\x01\n\x13WatchPermissionSets\x12\x36.authzed.api.materialize.v0.WatchPermissionSetsRequest\x1a\x37.authzed.api.materialize.v0.WatchPermissionSetsResponse\"\x00\x30\x01\x12\x8d\x01\n\x14LookupPermissionSets\x12\x37.authzed.api.materialize.v0.LookupPermissionSetsRequest\x1a\x38.authzed.api.materialize.v0.LookupPermissionSetsResponse\"\x00\x30\x01\x42\x62\n\x1e\x63om.authzed.api.materialize.v0P\x01Z>github.com/authzed/authzed-go/proto/authzed/api/materialize/v0b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n4authzed/api/materialize/v0/watchpermissionsets.proto\x12\x1a\x61uthzed.api.materialize.v0\x1a\x19\x61uthzed/api/v1/core.proto\"n\n\x1aWatchPermissionSetsRequest\x12P\n\x17optional_starting_after\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\x15optionalStartingAfter\"\xad\x03\n\x1bWatchPermissionSetsResponse\x12I\n\x06\x63hange\x18\x01 \x01(\x0b\x32/.authzed.api.materialize.v0.PermissionSetChangeH\x00R\x06\x63hange\x12I\n\x12\x63ompleted_revision\x18\x02 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenH\x00R\x11\x63ompletedRevision\x12\x81\x01\n\x1flookup_permission_sets_required\x18\x03 \x01(\x0b\x32\x38.authzed.api.materialize.v0.LookupPermissionSetsRequiredH\x00R\x1clookupPermissionSetsRequired\x12h\n\x16\x62reaking_schema_change\x18\x04 \x01(\x0b\x32\x30.authzed.api.materialize.v0.BreakingSchemaChangeH\x00R\x14\x62reakingSchemaChangeB\n\n\x08response\"\xdd\x01\n\x06\x43ursor\x12\x14\n\x05limit\x18\x01 \x01(\rR\x05limit\x12.\n\x05token\x18\x04 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\x05token\x12%\n\x0estarting_index\x18\x05 \x01(\rR\rstartingIndex\x12+\n\x11\x63ompleted_members\x18\x06 \x01(\x08R\x10\x63ompletedMembers\x12!\n\x0cstarting_key\x18\x07 \x01(\tR\x0bstartingKey\x12\x16\n\x06\x63ursor\x18\x08 \x01(\tR\x06\x63ursor\"\xe8\x01\n\x1bLookupPermissionSetsRequest\x12\x14\n\x05limit\x18\x01 \x01(\rR\x05limit\x12J\n\x14optional_at_revision\x18\x02 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\x12optionalAtRevision\x12g\n\x1eoptional_starting_after_cursor\x18\x04 \x01(\x0b\x32\".authzed.api.materialize.v0.CursorR\x1boptionalStartingAfterCursor\"\xa3\x01\n\x1cLookupPermissionSetsResponse\x12G\n\x06\x63hange\x18\x01 \x01(\x0b\x32/.authzed.api.materialize.v0.PermissionSetChangeR\x06\x63hange\x12:\n\x06\x63ursor\x18\x02 \x01(\x0b\x32\".authzed.api.materialize.v0.CursorR\x06\x63ursor\"\xfc\x03\n\x13PermissionSetChange\x12\x39\n\x0b\x61t_revision\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\natRevision\x12Z\n\toperation\x18\x02 \x01(\x0e\x32<.authzed.api.materialize.v0.PermissionSetChange.SetOperationR\toperation\x12G\n\nparent_set\x18\x03 \x01(\x0b\x32(.authzed.api.materialize.v0.SetReferenceR\tparentSet\x12G\n\tchild_set\x18\x04 \x01(\x0b\x32(.authzed.api.materialize.v0.SetReferenceH\x00R\x08\x63hildSet\x12P\n\x0c\x63hild_member\x18\x05 \x01(\x0b\x32+.authzed.api.materialize.v0.MemberReferenceH\x00R\x0b\x63hildMember\"a\n\x0cSetOperation\x12\x1d\n\x19SET_OPERATION_UNSPECIFIED\x10\x00\x12\x17\n\x13SET_OPERATION_ADDED\x10\x01\x12\x19\n\x15SET_OPERATION_REMOVED\x10\x02\x42\x07\n\x05\x63hild\"\x82\x01\n\x0cSetReference\x12\x1f\n\x0bobject_type\x18\x01 \x01(\tR\nobjectType\x12\x1b\n\tobject_id\x18\x02 \x01(\tR\x08objectId\x12\x34\n\x16permission_or_relation\x18\x03 \x01(\tR\x14permissionOrRelation\"\x96\x01\n\x0fMemberReference\x12\x1f\n\x0bobject_type\x18\x01 \x01(\tR\nobjectType\x12\x1b\n\tobject_id\x18\x02 \x01(\tR\x08objectId\x12\x45\n\x1foptional_permission_or_relation\x18\x03 \x01(\tR\x1coptionalPermissionOrRelation\"f\n\x1cLookupPermissionSetsRequired\x12\x46\n\x12required_lookup_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\x10requiredLookupAt\"M\n\x14\x42reakingSchemaChange\x12\x35\n\tchange_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\x08\x63hangeAt2\xb9\x02\n\x1aWatchPermissionSetsService\x12\x8a\x01\n\x13WatchPermissionSets\x12\x36.authzed.api.materialize.v0.WatchPermissionSetsRequest\x1a\x37.authzed.api.materialize.v0.WatchPermissionSetsResponse\"\x00\x30\x01\x12\x8d\x01\n\x14LookupPermissionSets\x12\x37.authzed.api.materialize.v0.LookupPermissionSetsRequest\x1a\x38.authzed.api.materialize.v0.LookupPermissionSetsResponse\"\x00\x30\x01\x42\x62\n\x1e\x63om.authzed.api.materialize.v0P\x01Z>github.com/authzed/authzed-go/proto/authzed/api/materialize/v0b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -38,23 +38,23 @@ _globals['_WATCHPERMISSIONSETSRESPONSE']._serialized_start=224 _globals['_WATCHPERMISSIONSETSRESPONSE']._serialized_end=653 _globals['_CURSOR']._serialized_start=656 - _globals['_CURSOR']._serialized_end=853 - _globals['_LOOKUPPERMISSIONSETSREQUEST']._serialized_start=856 - _globals['_LOOKUPPERMISSIONSETSREQUEST']._serialized_end=1088 - _globals['_LOOKUPPERMISSIONSETSRESPONSE']._serialized_start=1091 - _globals['_LOOKUPPERMISSIONSETSRESPONSE']._serialized_end=1254 - _globals['_PERMISSIONSETCHANGE']._serialized_start=1257 - _globals['_PERMISSIONSETCHANGE']._serialized_end=1765 - _globals['_PERMISSIONSETCHANGE_SETOPERATION']._serialized_start=1659 - _globals['_PERMISSIONSETCHANGE_SETOPERATION']._serialized_end=1756 - _globals['_SETREFERENCE']._serialized_start=1768 - _globals['_SETREFERENCE']._serialized_end=1898 - _globals['_MEMBERREFERENCE']._serialized_start=1901 - _globals['_MEMBERREFERENCE']._serialized_end=2051 - _globals['_LOOKUPPERMISSIONSETSREQUIRED']._serialized_start=2053 - _globals['_LOOKUPPERMISSIONSETSREQUIRED']._serialized_end=2155 - _globals['_BREAKINGSCHEMACHANGE']._serialized_start=2157 - _globals['_BREAKINGSCHEMACHANGE']._serialized_end=2234 - _globals['_WATCHPERMISSIONSETSSERVICE']._serialized_start=2237 - _globals['_WATCHPERMISSIONSETSSERVICE']._serialized_end=2550 + _globals['_CURSOR']._serialized_end=877 + _globals['_LOOKUPPERMISSIONSETSREQUEST']._serialized_start=880 + _globals['_LOOKUPPERMISSIONSETSREQUEST']._serialized_end=1112 + _globals['_LOOKUPPERMISSIONSETSRESPONSE']._serialized_start=1115 + _globals['_LOOKUPPERMISSIONSETSRESPONSE']._serialized_end=1278 + _globals['_PERMISSIONSETCHANGE']._serialized_start=1281 + _globals['_PERMISSIONSETCHANGE']._serialized_end=1789 + _globals['_PERMISSIONSETCHANGE_SETOPERATION']._serialized_start=1683 + _globals['_PERMISSIONSETCHANGE_SETOPERATION']._serialized_end=1780 + _globals['_SETREFERENCE']._serialized_start=1792 + _globals['_SETREFERENCE']._serialized_end=1922 + _globals['_MEMBERREFERENCE']._serialized_start=1925 + _globals['_MEMBERREFERENCE']._serialized_end=2075 + _globals['_LOOKUPPERMISSIONSETSREQUIRED']._serialized_start=2077 + _globals['_LOOKUPPERMISSIONSETSREQUIRED']._serialized_end=2179 + _globals['_BREAKINGSCHEMACHANGE']._serialized_start=2181 + _globals['_BREAKINGSCHEMACHANGE']._serialized_end=2258 + _globals['_WATCHPERMISSIONSETSSERVICE']._serialized_start=2261 + _globals['_WATCHPERMISSIONSETSSERVICE']._serialized_end=2574 # @@protoc_insertion_point(module_scope) diff --git a/authzed/api/materialize/v0/watchpermissionsets_pb2.pyi b/authzed/api/materialize/v0/watchpermissionsets_pb2.pyi index d60cbd2..19dffd7 100644 --- a/authzed/api/materialize/v0/watchpermissionsets_pb2.pyi +++ b/authzed/api/materialize/v0/watchpermissionsets_pb2.pyi @@ -102,6 +102,7 @@ class Cursor(google.protobuf.message.Message): STARTING_INDEX_FIELD_NUMBER: builtins.int COMPLETED_MEMBERS_FIELD_NUMBER: builtins.int STARTING_KEY_FIELD_NUMBER: builtins.int + CURSOR_FIELD_NUMBER: builtins.int limit: builtins.int """limit is the number of permission sets to stream over a single LookupPermissionSets call that was requested.""" starting_index: builtins.int @@ -110,6 +111,8 @@ class Cursor(google.protobuf.message.Message): """completed_members is a boolean flag that indicates that the cursor has reached the end of the permission sets""" starting_key: builtins.str """starting_key is a string cursor used by some backends to resume the stream from a specific point.""" + cursor: builtins.str + """cursor is a string-encoded internal materialize cursor.""" @property def token(self) -> authzed.api.v1.core_pb2.ZedToken: """token is the snapshot revision at which the cursor was computed.""" @@ -122,9 +125,10 @@ class Cursor(google.protobuf.message.Message): starting_index: builtins.int = ..., completed_members: builtins.bool = ..., starting_key: builtins.str = ..., + cursor: builtins.str = ..., ) -> None: ... def HasField(self, field_name: typing.Literal["token", b"token"]) -> builtins.bool: ... - def ClearField(self, field_name: typing.Literal["completed_members", b"completed_members", "limit", b"limit", "starting_index", b"starting_index", "starting_key", b"starting_key", "token", b"token"]) -> None: ... + def ClearField(self, field_name: typing.Literal["completed_members", b"completed_members", "cursor", b"cursor", "limit", b"limit", "starting_index", b"starting_index", "starting_key", b"starting_key", "token", b"token"]) -> None: ... global___Cursor = Cursor diff --git a/authzed/api/v1/core_pb2.py b/authzed/api/v1/core_pb2.py index f84cd05..d10381c 100644 --- a/authzed/api/v1/core_pb2.py +++ b/authzed/api/v1/core_pb2.py @@ -23,10 +23,11 @@ from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 from validate import validate_pb2 as validate_dot_validate__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19\x61uthzed/api/v1/core.proto\x12\x0e\x61uthzed.api.v1\x1a\x1cgoogle/protobuf/struct.proto\x1a\x17validate/validate.proto\"\xb9\x02\n\x0cRelationship\x12\x45\n\x08resource\x18\x01 \x01(\x0b\x32\x1f.authzed.api.v1.ObjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08resource\x12\x43\n\x08relation\x18\x02 \x01(\tB\'\xfa\x42$r\"(@2\x1e^[a-z][a-z0-9_]{1,62}[a-z0-9]$R\x08relation\x12\x44\n\x07subject\x18\x03 \x01(\x0b\x32 .authzed.api.v1.SubjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x07subject\x12W\n\x0foptional_caveat\x18\x04 \x01(\x0b\x32$.authzed.api.v1.ContextualizedCaveatB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x0eoptionalCaveat\"\xa6\x01\n\x14\x43ontextualizedCaveat\x12Q\n\x0b\x63\x61veat_name\x18\x01 \x01(\tB0\xfa\x42-r+(\x80\x01\x32&^([a-zA-Z0-9_][a-zA-Z0-9/_|-]{0,127})$R\ncaveatName\x12;\n\x07\x63ontext\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x07\x63ontext\"\xae\x01\n\x10SubjectReference\x12\x41\n\x06object\x18\x01 \x01(\x0b\x32\x1f.authzed.api.v1.ObjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x06object\x12W\n\x11optional_relation\x18\x02 \x01(\tB*\xfa\x42\'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\x10optionalRelation\"\xc4\x01\n\x0fObjectReference\x12i\n\x0bobject_type\x18\x01 \x01(\tBH\xfa\x42\x45rC(\x80\x01\x32>^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$R\nobjectType\x12\x46\n\tobject_id\x18\x02 \x01(\tB)\xfa\x42&r$(\x80\x08\x32\x1f^(([a-zA-Z0-9/_|\\-=+]{1,})|\\*)$R\x08objectId\")\n\x08ZedToken\x12\x1d\n\x05token\x18\x01 \x01(\tB\x07\xfa\x42\x04r\x02 \x01R\x05token\"+\n\x06\x43ursor\x12!\n\x05token\x18\x01 \x01(\tB\x0b\xfa\x42\x08r\x06 \x01(\x80\xa0\x06R\x05token\"\xa1\x02\n\x12RelationshipUpdate\x12V\n\toperation\x18\x01 \x01(\x0e\x32,.authzed.api.v1.RelationshipUpdate.OperationB\n\xfa\x42\x07\x82\x01\x04\x10\x01 \x00R\toperation\x12J\n\x0crelationship\x18\x02 \x01(\x0b\x32\x1c.authzed.api.v1.RelationshipB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x0crelationship\"g\n\tOperation\x12\x19\n\x15OPERATION_UNSPECIFIED\x10\x00\x12\x14\n\x10OPERATION_CREATE\x10\x01\x12\x13\n\x0fOPERATION_TOUCH\x10\x02\x12\x14\n\x10OPERATION_DELETE\x10\x03\"\xa8\x02\n\x1aPermissionRelationshipTree\x12I\n\x0cintermediate\x18\x01 \x01(\x0b\x32#.authzed.api.v1.AlgebraicSubjectSetH\x00R\x0cintermediate\x12\x36\n\x04leaf\x18\x02 \x01(\x0b\x32 .authzed.api.v1.DirectSubjectSetH\x00R\x04leaf\x12H\n\x0f\x65xpanded_object\x18\x03 \x01(\x0b\x32\x1f.authzed.api.v1.ObjectReferenceR\x0e\x65xpandedObject\x12+\n\x11\x65xpanded_relation\x18\x04 \x01(\tR\x10\x65xpandedRelationB\x10\n\ttree_type\x12\x03\xf8\x42\x01\"\xb7\x02\n\x13\x41lgebraicSubjectSet\x12W\n\toperation\x18\x01 \x01(\x0e\x32-.authzed.api.v1.AlgebraicSubjectSet.OperationB\n\xfa\x42\x07\x82\x01\x04\x10\x01 \x00R\toperation\x12U\n\x08\x63hildren\x18\x02 \x03(\x0b\x32*.authzed.api.v1.PermissionRelationshipTreeB\r\xfa\x42\n\x92\x01\x07\"\x05\x8a\x01\x02\x10\x01R\x08\x63hildren\"p\n\tOperation\x12\x19\n\x15OPERATION_UNSPECIFIED\x10\x00\x12\x13\n\x0fOPERATION_UNION\x10\x01\x12\x1a\n\x16OPERATION_INTERSECTION\x10\x02\x12\x17\n\x13OPERATION_EXCLUSION\x10\x03\"P\n\x10\x44irectSubjectSet\x12<\n\x08subjects\x18\x01 \x03(\x0b\x32 .authzed.api.v1.SubjectReferenceR\x08subjects\"W\n\x11PartialCaveatInfo\x12\x42\n\x18missing_required_context\x18\x01 \x03(\tB\x08\xfa\x42\x05\x92\x01\x02\x08\x01R\x16missingRequiredContextBJ\n\x12\x63om.authzed.api.v1P\x01Z2github.com/authzed/authzed-go/proto/authzed/api/v1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19\x61uthzed/api/v1/core.proto\x12\x0e\x61uthzed.api.v1\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17validate/validate.proto\"\x85\x03\n\x0cRelationship\x12\x45\n\x08resource\x18\x01 \x01(\x0b\x32\x1f.authzed.api.v1.ObjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08resource\x12\x43\n\x08relation\x18\x02 \x01(\tB\'\xfa\x42$r\"(@2\x1e^[a-z][a-z0-9_]{1,62}[a-z0-9]$R\x08relation\x12\x44\n\x07subject\x18\x03 \x01(\x0b\x32 .authzed.api.v1.SubjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x07subject\x12W\n\x0foptional_caveat\x18\x04 \x01(\x0b\x32$.authzed.api.v1.ContextualizedCaveatB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x0eoptionalCaveat\x12J\n\x13optional_expires_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x11optionalExpiresAt\"\xa6\x01\n\x14\x43ontextualizedCaveat\x12Q\n\x0b\x63\x61veat_name\x18\x01 \x01(\tB0\xfa\x42-r+(\x80\x01\x32&^([a-zA-Z0-9_][a-zA-Z0-9/_|-]{0,127})$R\ncaveatName\x12;\n\x07\x63ontext\x18\x02 \x01(\x0b\x32\x17.google.protobuf.StructB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x07\x63ontext\"\xae\x01\n\x10SubjectReference\x12\x41\n\x06object\x18\x01 \x01(\x0b\x32\x1f.authzed.api.v1.ObjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x06object\x12W\n\x11optional_relation\x18\x02 \x01(\tB*\xfa\x42\'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\x10optionalRelation\"\xc4\x01\n\x0fObjectReference\x12i\n\x0bobject_type\x18\x01 \x01(\tBH\xfa\x42\x45rC(\x80\x01\x32>^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$R\nobjectType\x12\x46\n\tobject_id\x18\x02 \x01(\tB)\xfa\x42&r$(\x80\x08\x32\x1f^(([a-zA-Z0-9/_|\\-=+]{1,})|\\*)$R\x08objectId\")\n\x08ZedToken\x12\x1d\n\x05token\x18\x01 \x01(\tB\x07\xfa\x42\x04r\x02 \x01R\x05token\"+\n\x06\x43ursor\x12!\n\x05token\x18\x01 \x01(\tB\x0b\xfa\x42\x08r\x06 \x01(\x80\xa0\x06R\x05token\"\xa1\x02\n\x12RelationshipUpdate\x12V\n\toperation\x18\x01 \x01(\x0e\x32,.authzed.api.v1.RelationshipUpdate.OperationB\n\xfa\x42\x07\x82\x01\x04\x10\x01 \x00R\toperation\x12J\n\x0crelationship\x18\x02 \x01(\x0b\x32\x1c.authzed.api.v1.RelationshipB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x0crelationship\"g\n\tOperation\x12\x19\n\x15OPERATION_UNSPECIFIED\x10\x00\x12\x14\n\x10OPERATION_CREATE\x10\x01\x12\x13\n\x0fOPERATION_TOUCH\x10\x02\x12\x14\n\x10OPERATION_DELETE\x10\x03\"\xa8\x02\n\x1aPermissionRelationshipTree\x12I\n\x0cintermediate\x18\x01 \x01(\x0b\x32#.authzed.api.v1.AlgebraicSubjectSetH\x00R\x0cintermediate\x12\x36\n\x04leaf\x18\x02 \x01(\x0b\x32 .authzed.api.v1.DirectSubjectSetH\x00R\x04leaf\x12H\n\x0f\x65xpanded_object\x18\x03 \x01(\x0b\x32\x1f.authzed.api.v1.ObjectReferenceR\x0e\x65xpandedObject\x12+\n\x11\x65xpanded_relation\x18\x04 \x01(\tR\x10\x65xpandedRelationB\x10\n\ttree_type\x12\x03\xf8\x42\x01\"\xb7\x02\n\x13\x41lgebraicSubjectSet\x12W\n\toperation\x18\x01 \x01(\x0e\x32-.authzed.api.v1.AlgebraicSubjectSet.OperationB\n\xfa\x42\x07\x82\x01\x04\x10\x01 \x00R\toperation\x12U\n\x08\x63hildren\x18\x02 \x03(\x0b\x32*.authzed.api.v1.PermissionRelationshipTreeB\r\xfa\x42\n\x92\x01\x07\"\x05\x8a\x01\x02\x10\x01R\x08\x63hildren\"p\n\tOperation\x12\x19\n\x15OPERATION_UNSPECIFIED\x10\x00\x12\x13\n\x0fOPERATION_UNION\x10\x01\x12\x1a\n\x16OPERATION_INTERSECTION\x10\x02\x12\x17\n\x13OPERATION_EXCLUSION\x10\x03\"P\n\x10\x44irectSubjectSet\x12<\n\x08subjects\x18\x01 \x03(\x0b\x32 .authzed.api.v1.SubjectReferenceR\x08subjects\"W\n\x11PartialCaveatInfo\x12\x42\n\x18missing_required_context\x18\x01 \x03(\tB\x08\xfa\x42\x05\x92\x01\x02\x08\x01R\x16missingRequiredContextBJ\n\x12\x63om.authzed.api.v1P\x01Z2github.com/authzed/authzed-go/proto/authzed/api/v1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -70,30 +71,30 @@ _globals['_ALGEBRAICSUBJECTSET'].fields_by_name['children']._serialized_options = b'\372B\n\222\001\007\"\005\212\001\002\020\001' _globals['_PARTIALCAVEATINFO'].fields_by_name['missing_required_context']._loaded_options = None _globals['_PARTIALCAVEATINFO'].fields_by_name['missing_required_context']._serialized_options = b'\372B\005\222\001\002\010\001' - _globals['_RELATIONSHIP']._serialized_start=101 - _globals['_RELATIONSHIP']._serialized_end=414 - _globals['_CONTEXTUALIZEDCAVEAT']._serialized_start=417 - _globals['_CONTEXTUALIZEDCAVEAT']._serialized_end=583 - _globals['_SUBJECTREFERENCE']._serialized_start=586 - _globals['_SUBJECTREFERENCE']._serialized_end=760 - _globals['_OBJECTREFERENCE']._serialized_start=763 - _globals['_OBJECTREFERENCE']._serialized_end=959 - _globals['_ZEDTOKEN']._serialized_start=961 - _globals['_ZEDTOKEN']._serialized_end=1002 - _globals['_CURSOR']._serialized_start=1004 - _globals['_CURSOR']._serialized_end=1047 - _globals['_RELATIONSHIPUPDATE']._serialized_start=1050 - _globals['_RELATIONSHIPUPDATE']._serialized_end=1339 - _globals['_RELATIONSHIPUPDATE_OPERATION']._serialized_start=1236 - _globals['_RELATIONSHIPUPDATE_OPERATION']._serialized_end=1339 - _globals['_PERMISSIONRELATIONSHIPTREE']._serialized_start=1342 - _globals['_PERMISSIONRELATIONSHIPTREE']._serialized_end=1638 - _globals['_ALGEBRAICSUBJECTSET']._serialized_start=1641 - _globals['_ALGEBRAICSUBJECTSET']._serialized_end=1952 - _globals['_ALGEBRAICSUBJECTSET_OPERATION']._serialized_start=1840 - _globals['_ALGEBRAICSUBJECTSET_OPERATION']._serialized_end=1952 - _globals['_DIRECTSUBJECTSET']._serialized_start=1954 - _globals['_DIRECTSUBJECTSET']._serialized_end=2034 - _globals['_PARTIALCAVEATINFO']._serialized_start=2036 - _globals['_PARTIALCAVEATINFO']._serialized_end=2123 + _globals['_RELATIONSHIP']._serialized_start=134 + _globals['_RELATIONSHIP']._serialized_end=523 + _globals['_CONTEXTUALIZEDCAVEAT']._serialized_start=526 + _globals['_CONTEXTUALIZEDCAVEAT']._serialized_end=692 + _globals['_SUBJECTREFERENCE']._serialized_start=695 + _globals['_SUBJECTREFERENCE']._serialized_end=869 + _globals['_OBJECTREFERENCE']._serialized_start=872 + _globals['_OBJECTREFERENCE']._serialized_end=1068 + _globals['_ZEDTOKEN']._serialized_start=1070 + _globals['_ZEDTOKEN']._serialized_end=1111 + _globals['_CURSOR']._serialized_start=1113 + _globals['_CURSOR']._serialized_end=1156 + _globals['_RELATIONSHIPUPDATE']._serialized_start=1159 + _globals['_RELATIONSHIPUPDATE']._serialized_end=1448 + _globals['_RELATIONSHIPUPDATE_OPERATION']._serialized_start=1345 + _globals['_RELATIONSHIPUPDATE_OPERATION']._serialized_end=1448 + _globals['_PERMISSIONRELATIONSHIPTREE']._serialized_start=1451 + _globals['_PERMISSIONRELATIONSHIPTREE']._serialized_end=1747 + _globals['_ALGEBRAICSUBJECTSET']._serialized_start=1750 + _globals['_ALGEBRAICSUBJECTSET']._serialized_end=2061 + _globals['_ALGEBRAICSUBJECTSET_OPERATION']._serialized_start=1949 + _globals['_ALGEBRAICSUBJECTSET_OPERATION']._serialized_end=2061 + _globals['_DIRECTSUBJECTSET']._serialized_start=2063 + _globals['_DIRECTSUBJECTSET']._serialized_end=2143 + _globals['_PARTIALCAVEATINFO']._serialized_start=2145 + _globals['_PARTIALCAVEATINFO']._serialized_end=2232 # @@protoc_insertion_point(module_scope) diff --git a/authzed/api/v1/core_pb2.pyi b/authzed/api/v1/core_pb2.pyi index a4b0755..8ef4332 100644 --- a/authzed/api/v1/core_pb2.pyi +++ b/authzed/api/v1/core_pb2.pyi @@ -10,6 +10,7 @@ import google.protobuf.internal.containers import google.protobuf.internal.enum_type_wrapper import google.protobuf.message import google.protobuf.struct_pb2 +import google.protobuf.timestamp_pb2 import sys import typing @@ -33,6 +34,7 @@ class Relationship(google.protobuf.message.Message): RELATION_FIELD_NUMBER: builtins.int SUBJECT_FIELD_NUMBER: builtins.int OPTIONAL_CAVEAT_FIELD_NUMBER: builtins.int + OPTIONAL_EXPIRES_AT_FIELD_NUMBER: builtins.int relation: builtins.str """relation is how the resource and subject are related.""" @property @@ -45,7 +47,11 @@ class Relationship(google.protobuf.message.Message): @property def optional_caveat(self) -> global___ContextualizedCaveat: - """optional_caveat is a reference to a the caveat that must be enforced over the relationship""" + """optional_caveat is a reference to a the caveat that must be enforced over the relationship.""" + + @property + def optional_expires_at(self) -> google.protobuf.timestamp_pb2.Timestamp: + """optional_expires_at is the time at which the relationship expires, if any.""" def __init__( self, @@ -54,9 +60,10 @@ class Relationship(google.protobuf.message.Message): relation: builtins.str = ..., subject: global___SubjectReference | None = ..., optional_caveat: global___ContextualizedCaveat | None = ..., + optional_expires_at: google.protobuf.timestamp_pb2.Timestamp | None = ..., ) -> None: ... - def HasField(self, field_name: typing.Literal["optional_caveat", b"optional_caveat", "resource", b"resource", "subject", b"subject"]) -> builtins.bool: ... - def ClearField(self, field_name: typing.Literal["optional_caveat", b"optional_caveat", "relation", b"relation", "resource", b"resource", "subject", b"subject"]) -> None: ... + def HasField(self, field_name: typing.Literal["optional_caveat", b"optional_caveat", "optional_expires_at", b"optional_expires_at", "resource", b"resource", "subject", b"subject"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["optional_caveat", b"optional_caveat", "optional_expires_at", b"optional_expires_at", "relation", b"relation", "resource", b"resource", "subject", b"subject"]) -> None: ... global___Relationship = Relationship diff --git a/authzed/api/v1/debug_pb2.py b/authzed/api/v1/debug_pb2.py index b4a491d..688a2f0 100644 --- a/authzed/api/v1/debug_pb2.py +++ b/authzed/api/v1/debug_pb2.py @@ -26,9 +26,10 @@ from validate import validate_pb2 as validate_dot_validate__pb2 from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1a\x61uthzed/api/v1/debug.proto\x12\x0e\x61uthzed.api.v1\x1a\x19\x61uthzed/api/v1/core.proto\x1a\x17validate/validate.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1egoogle/protobuf/duration.proto\"j\n\x10\x44\x65\x62ugInformation\x12\x35\n\x05\x63heck\x18\x01 \x01(\x0b\x32\x1f.authzed.api.v1.CheckDebugTraceR\x05\x63heck\x12\x1f\n\x0bschema_used\x18\x02 \x01(\tR\nschemaUsed\"\xf3\x07\n\x0f\x43heckDebugTrace\x12\x45\n\x08resource\x18\x01 \x01(\x0b\x32\x1f.authzed.api.v1.ObjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08resource\x12\x1e\n\npermission\x18\x02 \x01(\tR\npermission\x12\x63\n\x0fpermission_type\x18\x03 \x01(\x0e\x32..authzed.api.v1.CheckDebugTrace.PermissionTypeB\n\xfa\x42\x07\x82\x01\x04\x10\x01 \x00R\x0epermissionType\x12\x44\n\x07subject\x18\x04 \x01(\x0b\x32 .authzed.api.v1.SubjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x07subject\x12R\n\x06result\x18\x05 \x01(\x0e\x32..authzed.api.v1.CheckDebugTrace.PermissionshipB\n\xfa\x42\x07\x82\x01\x04\x10\x01 \x00R\x06result\x12T\n\x16\x63\x61veat_evaluation_info\x18\x08 \x01(\x0b\x32\x1e.authzed.api.v1.CaveatEvalInfoR\x14\x63\x61veatEvaluationInfo\x12\x35\n\x08\x64uration\x18\t \x01(\x0b\x32\x19.google.protobuf.DurationR\x08\x64uration\x12,\n\x11was_cached_result\x18\x06 \x01(\x08H\x00R\x0fwasCachedResult\x12P\n\x0csub_problems\x18\x07 \x01(\x0b\x32+.authzed.api.v1.CheckDebugTrace.SubProblemsH\x00R\x0bsubProblems\x1a\x46\n\x0bSubProblems\x12\x37\n\x06traces\x18\x01 \x03(\x0b\x32\x1f.authzed.api.v1.CheckDebugTraceR\x06traces\"o\n\x0ePermissionType\x12\x1f\n\x1bPERMISSION_TYPE_UNSPECIFIED\x10\x00\x12\x1c\n\x18PERMISSION_TYPE_RELATION\x10\x01\x12\x1e\n\x1aPERMISSION_TYPE_PERMISSION\x10\x02\"\xa0\x01\n\x0ePermissionship\x12\x1e\n\x1aPERMISSIONSHIP_UNSPECIFIED\x10\x00\x12 \n\x1cPERMISSIONSHIP_NO_PERMISSION\x10\x01\x12!\n\x1dPERMISSIONSHIP_HAS_PERMISSION\x10\x02\x12)\n%PERMISSIONSHIP_CONDITIONAL_PERMISSION\x10\x03\x42\x11\n\nresolution\x12\x03\xf8\x42\x01\"\x94\x03\n\x0e\x43\x61veatEvalInfo\x12\x1e\n\nexpression\x18\x01 \x01(\tR\nexpression\x12=\n\x06result\x18\x02 \x01(\x0e\x32%.authzed.api.v1.CaveatEvalInfo.ResultR\x06result\x12\x31\n\x07\x63ontext\x18\x03 \x01(\x0b\x32\x17.google.protobuf.StructR\x07\x63ontext\x12Q\n\x13partial_caveat_info\x18\x04 \x01(\x0b\x32!.authzed.api.v1.PartialCaveatInfoR\x11partialCaveatInfo\x12\x1f\n\x0b\x63\x61veat_name\x18\x05 \x01(\tR\ncaveatName\"|\n\x06Result\x12\x16\n\x12RESULT_UNSPECIFIED\x10\x00\x12\x16\n\x12RESULT_UNEVALUATED\x10\x01\x12\x10\n\x0cRESULT_FALSE\x10\x02\x12\x0f\n\x0bRESULT_TRUE\x10\x03\x12\x1f\n\x1bRESULT_MISSING_SOME_CONTEXT\x10\x04\x42J\n\x12\x63om.authzed.api.v1P\x01Z2github.com/authzed/authzed-go/proto/authzed/api/v1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1a\x61uthzed/api/v1/debug.proto\x12\x0e\x61uthzed.api.v1\x1a\x19\x61uthzed/api/v1/core.proto\x1a\x17validate/validate.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"j\n\x10\x44\x65\x62ugInformation\x12\x35\n\x05\x63heck\x18\x01 \x01(\x0b\x32\x1f.authzed.api.v1.CheckDebugTraceR\x05\x63heck\x12\x1f\n\x0bschema_used\x18\x02 \x01(\tR\nschemaUsed\"\xbf\x08\n\x0f\x43heckDebugTrace\x12\x45\n\x08resource\x18\x01 \x01(\x0b\x32\x1f.authzed.api.v1.ObjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08resource\x12\x1e\n\npermission\x18\x02 \x01(\tR\npermission\x12\x63\n\x0fpermission_type\x18\x03 \x01(\x0e\x32..authzed.api.v1.CheckDebugTrace.PermissionTypeB\n\xfa\x42\x07\x82\x01\x04\x10\x01 \x00R\x0epermissionType\x12\x44\n\x07subject\x18\x04 \x01(\x0b\x32 .authzed.api.v1.SubjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x07subject\x12R\n\x06result\x18\x05 \x01(\x0e\x32..authzed.api.v1.CheckDebugTrace.PermissionshipB\n\xfa\x42\x07\x82\x01\x04\x10\x01 \x00R\x06result\x12T\n\x16\x63\x61veat_evaluation_info\x18\x08 \x01(\x0b\x32\x1e.authzed.api.v1.CaveatEvalInfoR\x14\x63\x61veatEvaluationInfo\x12\x35\n\x08\x64uration\x18\t \x01(\x0b\x32\x19.google.protobuf.DurationR\x08\x64uration\x12,\n\x11was_cached_result\x18\x06 \x01(\x08H\x00R\x0fwasCachedResult\x12P\n\x0csub_problems\x18\x07 \x01(\x0b\x32+.authzed.api.v1.CheckDebugTrace.SubProblemsH\x00R\x0bsubProblems\x12J\n\x13optional_expires_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x11optionalExpiresAt\x1a\x46\n\x0bSubProblems\x12\x37\n\x06traces\x18\x01 \x03(\x0b\x32\x1f.authzed.api.v1.CheckDebugTraceR\x06traces\"o\n\x0ePermissionType\x12\x1f\n\x1bPERMISSION_TYPE_UNSPECIFIED\x10\x00\x12\x1c\n\x18PERMISSION_TYPE_RELATION\x10\x01\x12\x1e\n\x1aPERMISSION_TYPE_PERMISSION\x10\x02\"\xa0\x01\n\x0ePermissionship\x12\x1e\n\x1aPERMISSIONSHIP_UNSPECIFIED\x10\x00\x12 \n\x1cPERMISSIONSHIP_NO_PERMISSION\x10\x01\x12!\n\x1dPERMISSIONSHIP_HAS_PERMISSION\x10\x02\x12)\n%PERMISSIONSHIP_CONDITIONAL_PERMISSION\x10\x03\x42\x11\n\nresolution\x12\x03\xf8\x42\x01\"\x94\x03\n\x0e\x43\x61veatEvalInfo\x12\x1e\n\nexpression\x18\x01 \x01(\tR\nexpression\x12=\n\x06result\x18\x02 \x01(\x0e\x32%.authzed.api.v1.CaveatEvalInfo.ResultR\x06result\x12\x31\n\x07\x63ontext\x18\x03 \x01(\x0b\x32\x17.google.protobuf.StructR\x07\x63ontext\x12Q\n\x13partial_caveat_info\x18\x04 \x01(\x0b\x32!.authzed.api.v1.PartialCaveatInfoR\x11partialCaveatInfo\x12\x1f\n\x0b\x63\x61veat_name\x18\x05 \x01(\tR\ncaveatName\"|\n\x06Result\x12\x16\n\x12RESULT_UNSPECIFIED\x10\x00\x12\x16\n\x12RESULT_UNEVALUATED\x10\x01\x12\x10\n\x0cRESULT_FALSE\x10\x02\x12\x0f\n\x0bRESULT_TRUE\x10\x03\x12\x1f\n\x1bRESULT_MISSING_SOME_CONTEXT\x10\x04\x42J\n\x12\x63om.authzed.api.v1P\x01Z2github.com/authzed/authzed-go/proto/authzed/api/v1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -46,18 +47,18 @@ _globals['_CHECKDEBUGTRACE'].fields_by_name['subject']._serialized_options = b'\372B\005\212\001\002\020\001' _globals['_CHECKDEBUGTRACE'].fields_by_name['result']._loaded_options = None _globals['_CHECKDEBUGTRACE'].fields_by_name['result']._serialized_options = b'\372B\007\202\001\004\020\001 \000' - _globals['_DEBUGINFORMATION']._serialized_start=160 - _globals['_DEBUGINFORMATION']._serialized_end=266 - _globals['_CHECKDEBUGTRACE']._serialized_start=269 - _globals['_CHECKDEBUGTRACE']._serialized_end=1280 - _globals['_CHECKDEBUGTRACE_SUBPROBLEMS']._serialized_start=915 - _globals['_CHECKDEBUGTRACE_SUBPROBLEMS']._serialized_end=985 - _globals['_CHECKDEBUGTRACE_PERMISSIONTYPE']._serialized_start=987 - _globals['_CHECKDEBUGTRACE_PERMISSIONTYPE']._serialized_end=1098 - _globals['_CHECKDEBUGTRACE_PERMISSIONSHIP']._serialized_start=1101 - _globals['_CHECKDEBUGTRACE_PERMISSIONSHIP']._serialized_end=1261 - _globals['_CAVEATEVALINFO']._serialized_start=1283 - _globals['_CAVEATEVALINFO']._serialized_end=1687 - _globals['_CAVEATEVALINFO_RESULT']._serialized_start=1563 - _globals['_CAVEATEVALINFO_RESULT']._serialized_end=1687 + _globals['_DEBUGINFORMATION']._serialized_start=193 + _globals['_DEBUGINFORMATION']._serialized_end=299 + _globals['_CHECKDEBUGTRACE']._serialized_start=302 + _globals['_CHECKDEBUGTRACE']._serialized_end=1389 + _globals['_CHECKDEBUGTRACE_SUBPROBLEMS']._serialized_start=1024 + _globals['_CHECKDEBUGTRACE_SUBPROBLEMS']._serialized_end=1094 + _globals['_CHECKDEBUGTRACE_PERMISSIONTYPE']._serialized_start=1096 + _globals['_CHECKDEBUGTRACE_PERMISSIONTYPE']._serialized_end=1207 + _globals['_CHECKDEBUGTRACE_PERMISSIONSHIP']._serialized_start=1210 + _globals['_CHECKDEBUGTRACE_PERMISSIONSHIP']._serialized_end=1370 + _globals['_CAVEATEVALINFO']._serialized_start=1392 + _globals['_CAVEATEVALINFO']._serialized_end=1796 + _globals['_CAVEATEVALINFO_RESULT']._serialized_start=1672 + _globals['_CAVEATEVALINFO_RESULT']._serialized_end=1796 # @@protoc_insertion_point(module_scope) diff --git a/authzed/api/v1/debug_pb2.pyi b/authzed/api/v1/debug_pb2.pyi index 3c5206f..5ef45ac 100644 --- a/authzed/api/v1/debug_pb2.pyi +++ b/authzed/api/v1/debug_pb2.pyi @@ -12,6 +12,7 @@ import google.protobuf.internal.containers import google.protobuf.internal.enum_type_wrapper import google.protobuf.message import google.protobuf.struct_pb2 +import google.protobuf.timestamp_pb2 import sys import typing @@ -116,6 +117,7 @@ class CheckDebugTrace(google.protobuf.message.Message): DURATION_FIELD_NUMBER: builtins.int WAS_CACHED_RESULT_FIELD_NUMBER: builtins.int SUB_PROBLEMS_FIELD_NUMBER: builtins.int + OPTIONAL_EXPIRES_AT_FIELD_NUMBER: builtins.int permission: builtins.str """permission holds the name of the permission or relation on which the Check was performed.""" permission_type: global___CheckDebugTrace.PermissionType.ValueType @@ -148,6 +150,12 @@ class CheckDebugTrace(google.protobuf.message.Message): and a permissionship of PERMISSIONSHIP_HAS_PERMISSION indicates the subject was found within this relation. """ + @property + def optional_expires_at(self) -> google.protobuf.timestamp_pb2.Timestamp: + """optional_expires_at is the time at which at least one of the relationships used to + compute this result, expires (if any). This is *not* related to the caching window. + """ + def __init__( self, *, @@ -160,9 +168,10 @@ class CheckDebugTrace(google.protobuf.message.Message): duration: google.protobuf.duration_pb2.Duration | None = ..., was_cached_result: builtins.bool = ..., sub_problems: global___CheckDebugTrace.SubProblems | None = ..., + optional_expires_at: google.protobuf.timestamp_pb2.Timestamp | None = ..., ) -> None: ... - def HasField(self, field_name: typing.Literal["caveat_evaluation_info", b"caveat_evaluation_info", "duration", b"duration", "resolution", b"resolution", "resource", b"resource", "sub_problems", b"sub_problems", "subject", b"subject", "was_cached_result", b"was_cached_result"]) -> builtins.bool: ... - def ClearField(self, field_name: typing.Literal["caveat_evaluation_info", b"caveat_evaluation_info", "duration", b"duration", "permission", b"permission", "permission_type", b"permission_type", "resolution", b"resolution", "resource", b"resource", "result", b"result", "sub_problems", b"sub_problems", "subject", b"subject", "was_cached_result", b"was_cached_result"]) -> None: ... + def HasField(self, field_name: typing.Literal["caveat_evaluation_info", b"caveat_evaluation_info", "duration", b"duration", "optional_expires_at", b"optional_expires_at", "resolution", b"resolution", "resource", b"resource", "sub_problems", b"sub_problems", "subject", b"subject", "was_cached_result", b"was_cached_result"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["caveat_evaluation_info", b"caveat_evaluation_info", "duration", b"duration", "optional_expires_at", b"optional_expires_at", "permission", b"permission", "permission_type", b"permission_type", "resolution", b"resolution", "resource", b"resource", "result", b"result", "sub_problems", b"sub_problems", "subject", b"subject", "was_cached_result", b"was_cached_result"]) -> None: ... def WhichOneof(self, oneof_group: typing.Literal["resolution", b"resolution"]) -> typing.Literal["was_cached_result", "sub_problems"] | None: ... global___CheckDebugTrace = CheckDebugTrace diff --git a/authzed/api/v1/experimental_service_pb2.pyi b/authzed/api/v1/experimental_service_pb2.pyi index 0928095..00fe88e 100644 --- a/authzed/api/v1/experimental_service_pb2.pyi +++ b/authzed/api/v1/experimental_service_pb2.pyi @@ -263,9 +263,10 @@ class BulkImportRelationshipsRequest(google.protobuf.message.Message): """BulkImportRelationshipsRequest represents one batch of the streaming BulkImportRelationships API. The maximum size is only limited by the backing datastore, and optimal size should be determined by the calling client - experimentally. Any relationships within the same request are guaranteed to - be written in a single transaction. If any of the relationships already - exist, the transaction will fail and no relationships will be written. + experimentally. When BulkImport is invoked and receives its first request message, + a transaction is opened to import the relationships. All requests sent to the same + invocation are executed under this single transaction. If a relationship already + exists within the datastore, the entire transaction will fail with an error. """ DESCRIPTOR: google.protobuf.descriptor.Descriptor diff --git a/authzed/api/v1/openapi_pb2.py b/authzed/api/v1/openapi_pb2.py index 6562b30..df6eed0 100644 --- a/authzed/api/v1/openapi_pb2.py +++ b/authzed/api/v1/openapi_pb2.py @@ -25,12 +25,12 @@ from protoc_gen_openapiv2.options import annotations_pb2 as protoc__gen__openapiv2_dot_options_dot_annotations__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1c\x61uthzed/api/v1/openapi.proto\x12\x0e\x61uthzed.api.v1\x1a.protoc-gen-openapiv2/options/annotations.protoB\x82\x03\n\x12\x63om.authzed.api.v1P\x01Z2github.com/authzed/authzed-go/proto/authzed/api/v1\x92\x41\xb4\x02\x12\x9c\x01\n\x07\x41uthzed\"D\n\rAuthzed, Inc.\x12\x1ehttps://github.com/authzed/api\x1a\x13support@authzed.com*F\n\x12\x41pache 2.0 License\x12\x30https://github.com/authzed/api/blob/main/LICENSE2\x03\x31.0*\x03\x01\x02\x04\x32\x10\x61pplication/json:\x10\x61pplication/jsonZ#\n!\n\nApiKeyAuth\x12\x13\x08\x02\x1a\rAuthorization \x02rE\n\x1bMore about the Authzed API.\x12&https://docs.authzed.com/reference/apib\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1c\x61uthzed/api/v1/openapi.proto\x12\x0e\x61uthzed.api.v1\x1a.protoc-gen-openapiv2/options/annotations.protoB\xd7\x03\n\x12\x63om.authzed.api.v1P\x01Z2github.com/authzed/authzed-go/proto/authzed/api/v1\x92\x41\x89\x03\x12\x9c\x01\n\x07\x41uthzed\"D\n\rAuthzed, Inc.\x12\x1ehttps://github.com/authzed/api\x1a\x13support@authzed.com*F\n\x12\x41pache 2.0 License\x12\x30https://github.com/authzed/api/blob/main/LICENSE2\x03\x31.0*\x03\x01\x02\x04\x32\x10\x61pplication/json:\x10\x61pplication/jsonZf\nd\n\nApiKeyAuth\x12V\x08\x02\x12\x41SpiceDB preshared-key, prefixed by Bearer: Bearer \x1a\rAuthorization \x02\x62\x10\n\x0e\n\nApiKeyAuth\x12\x00rE\n\x1bMore about the Authzed API.\x12&https://docs.authzed.com/reference/apib\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'authzed.api.v1.openapi_pb2', _globals) if not _descriptor._USE_C_DESCRIPTORS: _globals['DESCRIPTOR']._loaded_options = None - _globals['DESCRIPTOR']._serialized_options = b'\n\022com.authzed.api.v1P\001Z2github.com/authzed/authzed-go/proto/authzed/api/v1\222A\264\002\022\234\001\n\007Authzed\"D\n\rAuthzed, Inc.\022\036https://github.com/authzed/api\032\023support@authzed.com*F\n\022Apache 2.0 License\0220https://github.com/authzed/api/blob/main/LICENSE2\0031.0*\003\001\002\0042\020application/json:\020application/jsonZ#\n!\n\nApiKeyAuth\022\023\010\002\032\rAuthorization \002rE\n\033More about the Authzed API.\022&https://docs.authzed.com/reference/api' + _globals['DESCRIPTOR']._serialized_options = b'\n\022com.authzed.api.v1P\001Z2github.com/authzed/authzed-go/proto/authzed/api/v1\222A\211\003\022\234\001\n\007Authzed\"D\n\rAuthzed, Inc.\022\036https://github.com/authzed/api\032\023support@authzed.com*F\n\022Apache 2.0 License\0220https://github.com/authzed/api/blob/main/LICENSE2\0031.0*\003\001\002\0042\020application/json:\020application/jsonZf\nd\n\nApiKeyAuth\022V\010\002\022ASpiceDB preshared-key, prefixed by Bearer: Bearer \032\rAuthorization \002b\020\n\016\n\nApiKeyAuth\022\000rE\n\033More about the Authzed API.\022&https://docs.authzed.com/reference/api' # @@protoc_insertion_point(module_scope) diff --git a/authzed/api/v1/permission_service_pb2.py b/authzed/api/v1/permission_service_pb2.py index a99e0bb..21e1434 100644 --- a/authzed/api/v1/permission_service_pb2.py +++ b/authzed/api/v1/permission_service_pb2.py @@ -25,12 +25,13 @@ from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 from google.rpc import status_pb2 as google_dot_rpc_dot_status__pb2 +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 from validate import validate_pb2 as validate_dot_validate__pb2 from authzed.api.v1 import core_pb2 as authzed_dot_api_dot_v1_dot_core__pb2 from authzed.api.v1 import debug_pb2 as authzed_dot_api_dot_v1_dot_debug__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\'authzed/api/v1/permission_service.proto\x12\x0e\x61uthzed.api.v1\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/rpc/status.proto\x1a\x17validate/validate.proto\x1a\x19\x61uthzed/api/v1/core.proto\x1a\x1a\x61uthzed/api/v1/debug.proto\"\x9c\x02\n\x0b\x43onsistency\x12\x34\n\x10minimize_latency\x18\x01 \x01(\x08\x42\x07\xfa\x42\x04j\x02\x08\x01H\x00R\x0fminimizeLatency\x12\x45\n\x11\x61t_least_as_fresh\x18\x02 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenH\x00R\x0e\x61tLeastAsFresh\x12\x46\n\x11\x61t_exact_snapshot\x18\x03 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenH\x00R\x0f\x61tExactSnapshot\x12\x34\n\x10\x66ully_consistent\x18\x04 \x01(\x08\x42\x07\xfa\x42\x04j\x02\x08\x01H\x00R\x0f\x66ullyConsistentB\x12\n\x0brequirement\x12\x03\xf8\x42\x01\"\xf5\x03\n\x12RelationshipFilter\x12p\n\rresource_type\x18\x01 \x01(\tBK\xfa\x42HrF(\x80\x01\x32\x41^(([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9])?$R\x0cresourceType\x12W\n\x14optional_resource_id\x18\x02 \x01(\tB%\xfa\x42\"r (\x80\x08\x32\x1b^([a-zA-Z0-9/_|\\-=+]{1,})?$R\x12optionalResourceId\x12\x64\n\x1boptional_resource_id_prefix\x18\x05 \x01(\tB%\xfa\x42\"r (\x80\x08\x32\x1b^([a-zA-Z0-9/_|\\-=+]{1,})?$R\x18optionalResourceIdPrefix\x12W\n\x11optional_relation\x18\x03 \x01(\tB*\xfa\x42\'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\x10optionalRelation\x12U\n\x17optional_subject_filter\x18\x04 \x01(\x0b\x32\x1d.authzed.api.v1.SubjectFilterR\x15optionalSubjectFilter\"\x8d\x03\n\rSubjectFilter\x12k\n\x0csubject_type\x18\x01 \x01(\tBH\xfa\x42\x45rC(\x80\x01\x32>^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$R\x0bsubjectType\x12Z\n\x13optional_subject_id\x18\x02 \x01(\tB*\xfa\x42\'r%(\x80\x08\x32 ^(([a-zA-Z0-9/_|\\-=+]{1,})|\\*)?$R\x11optionalSubjectId\x12Y\n\x11optional_relation\x18\x03 \x01(\x0b\x32,.authzed.api.v1.SubjectFilter.RelationFilterR\x10optionalRelation\x1aX\n\x0eRelationFilter\x12\x46\n\x08relation\x18\x01 \x01(\tB*\xfa\x42\'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\x08relation\"\xa9\x02\n\x18ReadRelationshipsRequest\x12=\n\x0b\x63onsistency\x18\x01 \x01(\x0b\x32\x1b.authzed.api.v1.ConsistencyR\x0b\x63onsistency\x12]\n\x13relationship_filter\x18\x02 \x01(\x0b\x32\".authzed.api.v1.RelationshipFilterB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x12relationshipFilter\x12.\n\x0eoptional_limit\x18\x03 \x01(\rB\x07\xfa\x42\x04*\x02(\x00R\roptionalLimit\x12?\n\x0foptional_cursor\x18\x04 \x01(\x0b\x32\x16.authzed.api.v1.CursorR\x0eoptionalCursor\"\xec\x01\n\x19ReadRelationshipsResponse\x12;\n\x07read_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x06readAt\x12J\n\x0crelationship\x18\x02 \x01(\x0b\x32\x1c.authzed.api.v1.RelationshipB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x0crelationship\x12\x46\n\x13\x61\x66ter_result_cursor\x18\x03 \x01(\x0b\x32\x16.authzed.api.v1.CursorR\x11\x61\x66terResultCursor\"\x86\x02\n\x0cPrecondition\x12P\n\toperation\x18\x01 \x01(\x0e\x32&.authzed.api.v1.Precondition.OperationB\n\xfa\x42\x07\x82\x01\x04\x10\x01 \x00R\toperation\x12\x44\n\x06\x66ilter\x18\x02 \x01(\x0b\x32\".authzed.api.v1.RelationshipFilterB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x06\x66ilter\"^\n\tOperation\x12\x19\n\x15OPERATION_UNSPECIFIED\x10\x00\x12\x1c\n\x18OPERATION_MUST_NOT_MATCH\x10\x01\x12\x18\n\x14OPERATION_MUST_MATCH\x10\x02\"\xb3\x02\n\x19WriteRelationshipsRequest\x12K\n\x07updates\x18\x01 \x03(\x0b\x32\".authzed.api.v1.RelationshipUpdateB\r\xfa\x42\n\x92\x01\x07\"\x05\x8a\x01\x02\x10\x01R\x07updates\x12\x62\n\x16optional_preconditions\x18\x02 \x03(\x0b\x32\x1c.authzed.api.v1.PreconditionB\r\xfa\x42\n\x92\x01\x07\"\x05\x8a\x01\x02\x10\x01R\x15optionalPreconditions\x12\x65\n\x1doptional_transaction_metadata\x18\x03 \x01(\x0b\x32\x17.google.protobuf.StructB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x1boptionalTransactionMetadata\"U\n\x1aWriteRelationshipsResponse\x12\x37\n\nwritten_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\twrittenAt\"\xbf\x03\n\x1a\x44\x65leteRelationshipsRequest\x12]\n\x13relationship_filter\x18\x01 \x01(\x0b\x32\".authzed.api.v1.RelationshipFilterB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x12relationshipFilter\x12\x62\n\x16optional_preconditions\x18\x02 \x03(\x0b\x32\x1c.authzed.api.v1.PreconditionB\r\xfa\x42\n\x92\x01\x07\"\x05\x8a\x01\x02\x10\x01R\x15optionalPreconditions\x12.\n\x0eoptional_limit\x18\x03 \x01(\rB\x07\xfa\x42\x04*\x02(\x00R\roptionalLimit\x12G\n optional_allow_partial_deletions\x18\x04 \x01(\x08R\x1doptionalAllowPartialDeletions\x12\x65\n\x1doptional_transaction_metadata\x18\x05 \x01(\x0b\x32\x17.google.protobuf.StructB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x1boptionalTransactionMetadata\"\xb7\x02\n\x1b\x44\x65leteRelationshipsResponse\x12\x37\n\ndeleted_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\tdeletedAt\x12i\n\x11\x64\x65letion_progress\x18\x02 \x01(\x0e\x32<.authzed.api.v1.DeleteRelationshipsResponse.DeletionProgressR\x10\x64\x65letionProgress\"t\n\x10\x44\x65letionProgress\x12!\n\x1d\x44\x45LETION_PROGRESS_UNSPECIFIED\x10\x00\x12\x1e\n\x1a\x44\x45LETION_PROGRESS_COMPLETE\x10\x01\x12\x1d\n\x19\x44\x45LETION_PROGRESS_PARTIAL\x10\x02\"\x90\x03\n\x16\x43heckPermissionRequest\x12=\n\x0b\x63onsistency\x18\x01 \x01(\x0b\x32\x1b.authzed.api.v1.ConsistencyR\x0b\x63onsistency\x12\x45\n\x08resource\x18\x02 \x01(\x0b\x32\x1f.authzed.api.v1.ObjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08resource\x12J\n\npermission\x18\x03 \x01(\tB*\xfa\x42\'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\npermission\x12\x44\n\x07subject\x18\x04 \x01(\x0b\x32 .authzed.api.v1.SubjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x07subject\x12;\n\x07\x63ontext\x18\x05 \x01(\x0b\x32\x17.google.protobuf.StructB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x07\x63ontext\x12!\n\x0cwith_tracing\x18\x06 \x01(\x08R\x0bwithTracing\"\x8b\x04\n\x17\x43heckPermissionResponse\x12\x41\n\nchecked_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\tcheckedAt\x12j\n\x0epermissionship\x18\x02 \x01(\x0e\x32\x36.authzed.api.v1.CheckPermissionResponse.PermissionshipB\n\xfa\x42\x07\x82\x01\x04\x10\x01 \x00R\x0epermissionship\x12[\n\x13partial_caveat_info\x18\x03 \x01(\x0b\x32!.authzed.api.v1.PartialCaveatInfoB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x11partialCaveatInfo\x12\x41\n\x0b\x64\x65\x62ug_trace\x18\x04 \x01(\x0b\x32 .authzed.api.v1.DebugInformationR\ndebugTrace\"\xa0\x01\n\x0ePermissionship\x12\x1e\n\x1aPERMISSIONSHIP_UNSPECIFIED\x10\x00\x12 \n\x1cPERMISSIONSHIP_NO_PERMISSION\x10\x01\x12!\n\x1dPERMISSIONSHIP_HAS_PERMISSION\x10\x02\x12)\n%PERMISSIONSHIP_CONDITIONAL_PERMISSION\x10\x03\"\xb2\x01\n\x1b\x43heckBulkPermissionsRequest\x12=\n\x0b\x63onsistency\x18\x01 \x01(\x0b\x32\x1b.authzed.api.v1.ConsistencyR\x0b\x63onsistency\x12T\n\x05items\x18\x02 \x03(\x0b\x32/.authzed.api.v1.CheckBulkPermissionsRequestItemB\r\xfa\x42\n\x92\x01\x07\"\x05\x8a\x01\x02\x10\x01R\x05items\"\xb7\x02\n\x1f\x43heckBulkPermissionsRequestItem\x12\x45\n\x08resource\x18\x01 \x01(\x0b\x32\x1f.authzed.api.v1.ObjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08resource\x12J\n\npermission\x18\x02 \x01(\tB*\xfa\x42\'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\npermission\x12\x44\n\x07subject\x18\x03 \x01(\x0b\x32 .authzed.api.v1.SubjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x07subject\x12;\n\x07\x63ontext\x18\x04 \x01(\x0b\x32\x17.google.protobuf.StructB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x07\x63ontext\"\xb0\x01\n\x1c\x43heckBulkPermissionsResponse\x12\x41\n\nchecked_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\tcheckedAt\x12M\n\x05pairs\x18\x02 \x03(\x0b\x32(.authzed.api.v1.CheckBulkPermissionsPairB\r\xfa\x42\n\x92\x01\x07\"\x05\x8a\x01\x02\x10\x01R\x05pairs\"\xe5\x01\n\x18\x43heckBulkPermissionsPair\x12I\n\x07request\x18\x01 \x01(\x0b\x32/.authzed.api.v1.CheckBulkPermissionsRequestItemR\x07request\x12\x46\n\x04item\x18\x02 \x01(\x0b\x32\x30.authzed.api.v1.CheckBulkPermissionsResponseItemH\x00R\x04item\x12*\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x12.google.rpc.StatusH\x00R\x05\x65rrorB\n\n\x08response\"\xeb\x01\n CheckBulkPermissionsResponseItem\x12j\n\x0epermissionship\x18\x01 \x01(\x0e\x32\x36.authzed.api.v1.CheckPermissionResponse.PermissionshipB\n\xfa\x42\x07\x82\x01\x04\x10\x01 \x00R\x0epermissionship\x12[\n\x13partial_caveat_info\x18\x02 \x01(\x0b\x32!.authzed.api.v1.PartialCaveatInfoB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x11partialCaveatInfo\"\xef\x01\n\x1b\x45xpandPermissionTreeRequest\x12=\n\x0b\x63onsistency\x18\x01 \x01(\x0b\x32\x1b.authzed.api.v1.ConsistencyR\x0b\x63onsistency\x12\x45\n\x08resource\x18\x02 \x01(\x0b\x32\x1f.authzed.api.v1.ObjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08resource\x12J\n\npermission\x18\x03 \x01(\tB*\xfa\x42\'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\npermission\"\xa2\x01\n\x1c\x45xpandPermissionTreeResponse\x12\x39\n\x0b\x65xpanded_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\nexpandedAt\x12G\n\ttree_root\x18\x02 \x01(\x0b\x32*.authzed.api.v1.PermissionRelationshipTreeR\x08treeRoot\"\x90\x04\n\x16LookupResourcesRequest\x12=\n\x0b\x63onsistency\x18\x01 \x01(\x0b\x32\x1b.authzed.api.v1.ConsistencyR\x0b\x63onsistency\x12z\n\x14resource_object_type\x18\x02 \x01(\tBH\xfa\x42\x45rC(\x80\x01\x32>^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$R\x12resourceObjectType\x12G\n\npermission\x18\x03 \x01(\tB\'\xfa\x42$r\"(@2\x1e^[a-z][a-z0-9_]{1,62}[a-z0-9]$R\npermission\x12\x44\n\x07subject\x18\x04 \x01(\x0b\x32 .authzed.api.v1.SubjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x07subject\x12;\n\x07\x63ontext\x18\x05 \x01(\x0b\x32\x17.google.protobuf.StructB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x07\x63ontext\x12.\n\x0eoptional_limit\x18\x06 \x01(\rB\x07\xfa\x42\x04*\x02(\x00R\roptionalLimit\x12?\n\x0foptional_cursor\x18\x07 \x01(\x0b\x32\x16.authzed.api.v1.CursorR\x0eoptionalCursor\"\x82\x03\n\x17LookupResourcesResponse\x12:\n\x0clooked_up_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\nlookedUpAt\x12,\n\x12resource_object_id\x18\x02 \x01(\tR\x10resourceObjectId\x12X\n\x0epermissionship\x18\x03 \x01(\x0e\x32$.authzed.api.v1.LookupPermissionshipB\n\xfa\x42\x07\x82\x01\x04\x10\x01 \x00R\x0epermissionship\x12[\n\x13partial_caveat_info\x18\x04 \x01(\x0b\x32!.authzed.api.v1.PartialCaveatInfoB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x11partialCaveatInfo\x12\x46\n\x13\x61\x66ter_result_cursor\x18\x05 \x01(\x0b\x32\x16.authzed.api.v1.CursorR\x11\x61\x66terResultCursor\"\xea\x06\n\x15LookupSubjectsRequest\x12=\n\x0b\x63onsistency\x18\x01 \x01(\x0b\x32\x1b.authzed.api.v1.ConsistencyR\x0b\x63onsistency\x12\x45\n\x08resource\x18\x02 \x01(\x0b\x32\x1f.authzed.api.v1.ObjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08resource\x12J\n\npermission\x18\x03 \x01(\tB*\xfa\x42\'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\npermission\x12x\n\x13subject_object_type\x18\x04 \x01(\tBH\xfa\x42\x45rC(\x80\x01\x32>^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$R\x11subjectObjectType\x12\x66\n\x19optional_subject_relation\x18\x05 \x01(\tB*\xfa\x42\'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\x17optionalSubjectRelation\x12;\n\x07\x63ontext\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x07\x63ontext\x12?\n\x17optional_concrete_limit\x18\x07 \x01(\rB\x07\xfa\x42\x04*\x02(\x00R\x15optionalConcreteLimit\x12?\n\x0foptional_cursor\x18\x08 \x01(\x0b\x32\x16.authzed.api.v1.CursorR\x0eoptionalCursor\x12]\n\x0fwildcard_option\x18\t \x01(\x0e\x32\x34.authzed.api.v1.LookupSubjectsRequest.WildcardOptionR\x0ewildcardOption\"\x7f\n\x0eWildcardOption\x12\x1f\n\x1bWILDCARD_OPTION_UNSPECIFIED\x10\x00\x12%\n!WILDCARD_OPTION_INCLUDE_WILDCARDS\x10\x01\x12%\n!WILDCARD_OPTION_EXCLUDE_WILDCARDS\x10\x02\"\xc6\x04\n\x16LookupSubjectsResponse\x12:\n\x0clooked_up_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\nlookedUpAt\x12.\n\x11subject_object_id\x18\x02 \x01(\tB\x02\x18\x01R\x0fsubjectObjectId\x12\x34\n\x14\x65xcluded_subject_ids\x18\x03 \x03(\tB\x02\x18\x01R\x12\x65xcludedSubjectIds\x12Z\n\x0epermissionship\x18\x04 \x01(\x0e\x32$.authzed.api.v1.LookupPermissionshipB\x0c\x18\x01\xfa\x42\x07\x82\x01\x04\x10\x01 \x00R\x0epermissionship\x12]\n\x13partial_caveat_info\x18\x05 \x01(\x0b\x32!.authzed.api.v1.PartialCaveatInfoB\n\x18\x01\xfa\x42\x05\x8a\x01\x02\x10\x00R\x11partialCaveatInfo\x12\x39\n\x07subject\x18\x06 \x01(\x0b\x32\x1f.authzed.api.v1.ResolvedSubjectR\x07subject\x12L\n\x11\x65xcluded_subjects\x18\x07 \x03(\x0b\x32\x1f.authzed.api.v1.ResolvedSubjectR\x10\x65xcludedSubjects\x12\x46\n\x13\x61\x66ter_result_cursor\x18\x08 \x01(\x0b\x32\x16.authzed.api.v1.CursorR\x11\x61\x66terResultCursor\"\xf4\x01\n\x0fResolvedSubject\x12*\n\x11subject_object_id\x18\x01 \x01(\tR\x0fsubjectObjectId\x12X\n\x0epermissionship\x18\x02 \x01(\x0e\x32$.authzed.api.v1.LookupPermissionshipB\n\xfa\x42\x07\x82\x01\x04\x10\x01 \x00R\x0epermissionship\x12[\n\x13partial_caveat_info\x18\x03 \x01(\x0b\x32!.authzed.api.v1.PartialCaveatInfoB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x11partialCaveatInfo\"s\n\x1eImportBulkRelationshipsRequest\x12Q\n\rrelationships\x18\x01 \x03(\x0b\x32\x1c.authzed.api.v1.RelationshipB\r\xfa\x42\n\x92\x01\x07\"\x05\x8a\x01\x02\x10\x01R\rrelationships\"@\n\x1fImportBulkRelationshipsResponse\x12\x1d\n\nnum_loaded\x18\x01 \x01(\x04R\tnumLoaded\"\xb6\x02\n\x1e\x45xportBulkRelationshipsRequest\x12=\n\x0b\x63onsistency\x18\x01 \x01(\x0b\x32\x1b.authzed.api.v1.ConsistencyR\x0b\x63onsistency\x12.\n\x0eoptional_limit\x18\x02 \x01(\rB\x07\xfa\x42\x04*\x02(\x00R\roptionalLimit\x12?\n\x0foptional_cursor\x18\x03 \x01(\x0b\x32\x16.authzed.api.v1.CursorR\x0eoptionalCursor\x12\x64\n\x1coptional_relationship_filter\x18\x04 \x01(\x0b\x32\".authzed.api.v1.RelationshipFilterR\x1aoptionalRelationshipFilter\"\xad\x01\n\x1f\x45xportBulkRelationshipsResponse\x12\x46\n\x13\x61\x66ter_result_cursor\x18\x01 \x01(\x0b\x32\x16.authzed.api.v1.CursorR\x11\x61\x66terResultCursor\x12\x42\n\rrelationships\x18\x02 \x03(\x0b\x32\x1c.authzed.api.v1.RelationshipR\rrelationships*\x99\x01\n\x14LookupPermissionship\x12%\n!LOOKUP_PERMISSIONSHIP_UNSPECIFIED\x10\x00\x12(\n$LOOKUP_PERMISSIONSHIP_HAS_PERMISSION\x10\x01\x12\x30\n,LOOKUP_PERMISSIONSHIP_CONDITIONAL_PERMISSION\x10\x02\x32\x84\x0c\n\x12PermissionsService\x12\x8d\x01\n\x11ReadRelationships\x12(.authzed.api.v1.ReadRelationshipsRequest\x1a).authzed.api.v1.ReadRelationshipsResponse\"!\x82\xd3\xe4\x93\x02\x1b\"\x16/v1/relationships/read:\x01*0\x01\x12\x8f\x01\n\x12WriteRelationships\x12).authzed.api.v1.WriteRelationshipsRequest\x1a*.authzed.api.v1.WriteRelationshipsResponse\"\"\x82\xd3\xe4\x93\x02\x1c\"\x17/v1/relationships/write:\x01*\x12\x93\x01\n\x13\x44\x65leteRelationships\x12*.authzed.api.v1.DeleteRelationshipsRequest\x1a+.authzed.api.v1.DeleteRelationshipsResponse\"#\x82\xd3\xe4\x93\x02\x1d\"\x18/v1/relationships/delete:\x01*\x12\x84\x01\n\x0f\x43heckPermission\x12&.authzed.api.v1.CheckPermissionRequest\x1a\'.authzed.api.v1.CheckPermissionResponse\" \x82\xd3\xe4\x93\x02\x1a\"\x15/v1/permissions/check:\x01*\x12\x97\x01\n\x14\x43heckBulkPermissions\x12+.authzed.api.v1.CheckBulkPermissionsRequest\x1a,.authzed.api.v1.CheckBulkPermissionsResponse\"$\x82\xd3\xe4\x93\x02\x1e\"\x19/v1/permissions/checkbulk:\x01*\x12\x94\x01\n\x14\x45xpandPermissionTree\x12+.authzed.api.v1.ExpandPermissionTreeRequest\x1a,.authzed.api.v1.ExpandPermissionTreeResponse\"!\x82\xd3\xe4\x93\x02\x1b\"\x16/v1/permissions/expand:\x01*\x12\x8a\x01\n\x0fLookupResources\x12&.authzed.api.v1.LookupResourcesRequest\x1a\'.authzed.api.v1.LookupResourcesResponse\"$\x82\xd3\xe4\x93\x02\x1e\"\x19/v1/permissions/resources:\x01*0\x01\x12\x86\x01\n\x0eLookupSubjects\x12%.authzed.api.v1.LookupSubjectsRequest\x1a&.authzed.api.v1.LookupSubjectsResponse\"#\x82\xd3\xe4\x93\x02\x1d\"\x18/v1/permissions/subjects:\x01*0\x01\x12\xb2\x01\n\x17ImportBulkRelationships\x12..authzed.api.v1.ImportBulkRelationshipsRequest\x1a/.authzed.api.v1.ImportBulkRelationshipsResponse\"4\x82\xd3\xe4\x93\x02.\")/v1/experimental/relationships/bulkimport:\x01*(\x01\x12\xb2\x01\n\x17\x45xportBulkRelationships\x12..authzed.api.v1.ExportBulkRelationshipsRequest\x1a/.authzed.api.v1.ExportBulkRelationshipsResponse\"4\x82\xd3\xe4\x93\x02.\")/v1/experimental/relationships/bulkexport:\x01*0\x01\x42J\n\x12\x63om.authzed.api.v1P\x01Z2github.com/authzed/authzed-go/proto/authzed/api/v1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\'authzed/api/v1/permission_service.proto\x12\x0e\x61uthzed.api.v1\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/rpc/status.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17validate/validate.proto\x1a\x19\x61uthzed/api/v1/core.proto\x1a\x1a\x61uthzed/api/v1/debug.proto\"\x9c\x02\n\x0b\x43onsistency\x12\x34\n\x10minimize_latency\x18\x01 \x01(\x08\x42\x07\xfa\x42\x04j\x02\x08\x01H\x00R\x0fminimizeLatency\x12\x45\n\x11\x61t_least_as_fresh\x18\x02 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenH\x00R\x0e\x61tLeastAsFresh\x12\x46\n\x11\x61t_exact_snapshot\x18\x03 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenH\x00R\x0f\x61tExactSnapshot\x12\x34\n\x10\x66ully_consistent\x18\x04 \x01(\x08\x42\x07\xfa\x42\x04j\x02\x08\x01H\x00R\x0f\x66ullyConsistentB\x12\n\x0brequirement\x12\x03\xf8\x42\x01\"\xf5\x03\n\x12RelationshipFilter\x12p\n\rresource_type\x18\x01 \x01(\tBK\xfa\x42HrF(\x80\x01\x32\x41^(([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9])?$R\x0cresourceType\x12W\n\x14optional_resource_id\x18\x02 \x01(\tB%\xfa\x42\"r (\x80\x08\x32\x1b^([a-zA-Z0-9/_|\\-=+]{1,})?$R\x12optionalResourceId\x12\x64\n\x1boptional_resource_id_prefix\x18\x05 \x01(\tB%\xfa\x42\"r (\x80\x08\x32\x1b^([a-zA-Z0-9/_|\\-=+]{1,})?$R\x18optionalResourceIdPrefix\x12W\n\x11optional_relation\x18\x03 \x01(\tB*\xfa\x42\'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\x10optionalRelation\x12U\n\x17optional_subject_filter\x18\x04 \x01(\x0b\x32\x1d.authzed.api.v1.SubjectFilterR\x15optionalSubjectFilter\"\x8d\x03\n\rSubjectFilter\x12k\n\x0csubject_type\x18\x01 \x01(\tBH\xfa\x42\x45rC(\x80\x01\x32>^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$R\x0bsubjectType\x12Z\n\x13optional_subject_id\x18\x02 \x01(\tB*\xfa\x42\'r%(\x80\x08\x32 ^(([a-zA-Z0-9/_|\\-=+]{1,})|\\*)?$R\x11optionalSubjectId\x12Y\n\x11optional_relation\x18\x03 \x01(\x0b\x32,.authzed.api.v1.SubjectFilter.RelationFilterR\x10optionalRelation\x1aX\n\x0eRelationFilter\x12\x46\n\x08relation\x18\x01 \x01(\tB*\xfa\x42\'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\x08relation\"\xa9\x02\n\x18ReadRelationshipsRequest\x12=\n\x0b\x63onsistency\x18\x01 \x01(\x0b\x32\x1b.authzed.api.v1.ConsistencyR\x0b\x63onsistency\x12]\n\x13relationship_filter\x18\x02 \x01(\x0b\x32\".authzed.api.v1.RelationshipFilterB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x12relationshipFilter\x12.\n\x0eoptional_limit\x18\x03 \x01(\rB\x07\xfa\x42\x04*\x02(\x00R\roptionalLimit\x12?\n\x0foptional_cursor\x18\x04 \x01(\x0b\x32\x16.authzed.api.v1.CursorR\x0eoptionalCursor\"\xec\x01\n\x19ReadRelationshipsResponse\x12;\n\x07read_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x06readAt\x12J\n\x0crelationship\x18\x02 \x01(\x0b\x32\x1c.authzed.api.v1.RelationshipB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x0crelationship\x12\x46\n\x13\x61\x66ter_result_cursor\x18\x03 \x01(\x0b\x32\x16.authzed.api.v1.CursorR\x11\x61\x66terResultCursor\"\x86\x02\n\x0cPrecondition\x12P\n\toperation\x18\x01 \x01(\x0e\x32&.authzed.api.v1.Precondition.OperationB\n\xfa\x42\x07\x82\x01\x04\x10\x01 \x00R\toperation\x12\x44\n\x06\x66ilter\x18\x02 \x01(\x0b\x32\".authzed.api.v1.RelationshipFilterB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x06\x66ilter\"^\n\tOperation\x12\x19\n\x15OPERATION_UNSPECIFIED\x10\x00\x12\x1c\n\x18OPERATION_MUST_NOT_MATCH\x10\x01\x12\x18\n\x14OPERATION_MUST_MATCH\x10\x02\"\xb3\x02\n\x19WriteRelationshipsRequest\x12K\n\x07updates\x18\x01 \x03(\x0b\x32\".authzed.api.v1.RelationshipUpdateB\r\xfa\x42\n\x92\x01\x07\"\x05\x8a\x01\x02\x10\x01R\x07updates\x12\x62\n\x16optional_preconditions\x18\x02 \x03(\x0b\x32\x1c.authzed.api.v1.PreconditionB\r\xfa\x42\n\x92\x01\x07\"\x05\x8a\x01\x02\x10\x01R\x15optionalPreconditions\x12\x65\n\x1doptional_transaction_metadata\x18\x03 \x01(\x0b\x32\x17.google.protobuf.StructB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x1boptionalTransactionMetadata\"U\n\x1aWriteRelationshipsResponse\x12\x37\n\nwritten_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\twrittenAt\"\xbf\x03\n\x1a\x44\x65leteRelationshipsRequest\x12]\n\x13relationship_filter\x18\x01 \x01(\x0b\x32\".authzed.api.v1.RelationshipFilterB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x12relationshipFilter\x12\x62\n\x16optional_preconditions\x18\x02 \x03(\x0b\x32\x1c.authzed.api.v1.PreconditionB\r\xfa\x42\n\x92\x01\x07\"\x05\x8a\x01\x02\x10\x01R\x15optionalPreconditions\x12.\n\x0eoptional_limit\x18\x03 \x01(\rB\x07\xfa\x42\x04*\x02(\x00R\roptionalLimit\x12G\n optional_allow_partial_deletions\x18\x04 \x01(\x08R\x1doptionalAllowPartialDeletions\x12\x65\n\x1doptional_transaction_metadata\x18\x05 \x01(\x0b\x32\x17.google.protobuf.StructB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x1boptionalTransactionMetadata\"\xb7\x02\n\x1b\x44\x65leteRelationshipsResponse\x12\x37\n\ndeleted_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\tdeletedAt\x12i\n\x11\x64\x65letion_progress\x18\x02 \x01(\x0e\x32<.authzed.api.v1.DeleteRelationshipsResponse.DeletionProgressR\x10\x64\x65letionProgress\"t\n\x10\x44\x65letionProgress\x12!\n\x1d\x44\x45LETION_PROGRESS_UNSPECIFIED\x10\x00\x12\x1e\n\x1a\x44\x45LETION_PROGRESS_COMPLETE\x10\x01\x12\x1d\n\x19\x44\x45LETION_PROGRESS_PARTIAL\x10\x02\"\x90\x03\n\x16\x43heckPermissionRequest\x12=\n\x0b\x63onsistency\x18\x01 \x01(\x0b\x32\x1b.authzed.api.v1.ConsistencyR\x0b\x63onsistency\x12\x45\n\x08resource\x18\x02 \x01(\x0b\x32\x1f.authzed.api.v1.ObjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08resource\x12J\n\npermission\x18\x03 \x01(\tB*\xfa\x42\'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\npermission\x12\x44\n\x07subject\x18\x04 \x01(\x0b\x32 .authzed.api.v1.SubjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x07subject\x12;\n\x07\x63ontext\x18\x05 \x01(\x0b\x32\x17.google.protobuf.StructB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x07\x63ontext\x12!\n\x0cwith_tracing\x18\x06 \x01(\x08R\x0bwithTracing\"\xd7\x04\n\x17\x43heckPermissionResponse\x12\x41\n\nchecked_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\tcheckedAt\x12j\n\x0epermissionship\x18\x02 \x01(\x0e\x32\x36.authzed.api.v1.CheckPermissionResponse.PermissionshipB\n\xfa\x42\x07\x82\x01\x04\x10\x01 \x00R\x0epermissionship\x12[\n\x13partial_caveat_info\x18\x03 \x01(\x0b\x32!.authzed.api.v1.PartialCaveatInfoB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x11partialCaveatInfo\x12\x41\n\x0b\x64\x65\x62ug_trace\x18\x04 \x01(\x0b\x32 .authzed.api.v1.DebugInformationR\ndebugTrace\x12J\n\x13optional_expires_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\x11optionalExpiresAt\"\xa0\x01\n\x0ePermissionship\x12\x1e\n\x1aPERMISSIONSHIP_UNSPECIFIED\x10\x00\x12 \n\x1cPERMISSIONSHIP_NO_PERMISSION\x10\x01\x12!\n\x1dPERMISSIONSHIP_HAS_PERMISSION\x10\x02\x12)\n%PERMISSIONSHIP_CONDITIONAL_PERMISSION\x10\x03\"\xb2\x01\n\x1b\x43heckBulkPermissionsRequest\x12=\n\x0b\x63onsistency\x18\x01 \x01(\x0b\x32\x1b.authzed.api.v1.ConsistencyR\x0b\x63onsistency\x12T\n\x05items\x18\x02 \x03(\x0b\x32/.authzed.api.v1.CheckBulkPermissionsRequestItemB\r\xfa\x42\n\x92\x01\x07\"\x05\x8a\x01\x02\x10\x01R\x05items\"\xb7\x02\n\x1f\x43heckBulkPermissionsRequestItem\x12\x45\n\x08resource\x18\x01 \x01(\x0b\x32\x1f.authzed.api.v1.ObjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08resource\x12J\n\npermission\x18\x02 \x01(\tB*\xfa\x42\'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\npermission\x12\x44\n\x07subject\x18\x03 \x01(\x0b\x32 .authzed.api.v1.SubjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x07subject\x12;\n\x07\x63ontext\x18\x04 \x01(\x0b\x32\x17.google.protobuf.StructB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x07\x63ontext\"\xb0\x01\n\x1c\x43heckBulkPermissionsResponse\x12\x41\n\nchecked_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\tcheckedAt\x12M\n\x05pairs\x18\x02 \x03(\x0b\x32(.authzed.api.v1.CheckBulkPermissionsPairB\r\xfa\x42\n\x92\x01\x07\"\x05\x8a\x01\x02\x10\x01R\x05pairs\"\xe5\x01\n\x18\x43heckBulkPermissionsPair\x12I\n\x07request\x18\x01 \x01(\x0b\x32/.authzed.api.v1.CheckBulkPermissionsRequestItemR\x07request\x12\x46\n\x04item\x18\x02 \x01(\x0b\x32\x30.authzed.api.v1.CheckBulkPermissionsResponseItemH\x00R\x04item\x12*\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x12.google.rpc.StatusH\x00R\x05\x65rrorB\n\n\x08response\"\xeb\x01\n CheckBulkPermissionsResponseItem\x12j\n\x0epermissionship\x18\x01 \x01(\x0e\x32\x36.authzed.api.v1.CheckPermissionResponse.PermissionshipB\n\xfa\x42\x07\x82\x01\x04\x10\x01 \x00R\x0epermissionship\x12[\n\x13partial_caveat_info\x18\x02 \x01(\x0b\x32!.authzed.api.v1.PartialCaveatInfoB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x11partialCaveatInfo\"\xef\x01\n\x1b\x45xpandPermissionTreeRequest\x12=\n\x0b\x63onsistency\x18\x01 \x01(\x0b\x32\x1b.authzed.api.v1.ConsistencyR\x0b\x63onsistency\x12\x45\n\x08resource\x18\x02 \x01(\x0b\x32\x1f.authzed.api.v1.ObjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08resource\x12J\n\npermission\x18\x03 \x01(\tB*\xfa\x42\'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\npermission\"\xa2\x01\n\x1c\x45xpandPermissionTreeResponse\x12\x39\n\x0b\x65xpanded_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\nexpandedAt\x12G\n\ttree_root\x18\x02 \x01(\x0b\x32*.authzed.api.v1.PermissionRelationshipTreeR\x08treeRoot\"\x90\x04\n\x16LookupResourcesRequest\x12=\n\x0b\x63onsistency\x18\x01 \x01(\x0b\x32\x1b.authzed.api.v1.ConsistencyR\x0b\x63onsistency\x12z\n\x14resource_object_type\x18\x02 \x01(\tBH\xfa\x42\x45rC(\x80\x01\x32>^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$R\x12resourceObjectType\x12G\n\npermission\x18\x03 \x01(\tB\'\xfa\x42$r\"(@2\x1e^[a-z][a-z0-9_]{1,62}[a-z0-9]$R\npermission\x12\x44\n\x07subject\x18\x04 \x01(\x0b\x32 .authzed.api.v1.SubjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x07subject\x12;\n\x07\x63ontext\x18\x05 \x01(\x0b\x32\x17.google.protobuf.StructB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x07\x63ontext\x12.\n\x0eoptional_limit\x18\x06 \x01(\rB\x07\xfa\x42\x04*\x02(\x00R\roptionalLimit\x12?\n\x0foptional_cursor\x18\x07 \x01(\x0b\x32\x16.authzed.api.v1.CursorR\x0eoptionalCursor\"\x82\x03\n\x17LookupResourcesResponse\x12:\n\x0clooked_up_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\nlookedUpAt\x12,\n\x12resource_object_id\x18\x02 \x01(\tR\x10resourceObjectId\x12X\n\x0epermissionship\x18\x03 \x01(\x0e\x32$.authzed.api.v1.LookupPermissionshipB\n\xfa\x42\x07\x82\x01\x04\x10\x01 \x00R\x0epermissionship\x12[\n\x13partial_caveat_info\x18\x04 \x01(\x0b\x32!.authzed.api.v1.PartialCaveatInfoB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x11partialCaveatInfo\x12\x46\n\x13\x61\x66ter_result_cursor\x18\x05 \x01(\x0b\x32\x16.authzed.api.v1.CursorR\x11\x61\x66terResultCursor\"\xea\x06\n\x15LookupSubjectsRequest\x12=\n\x0b\x63onsistency\x18\x01 \x01(\x0b\x32\x1b.authzed.api.v1.ConsistencyR\x0b\x63onsistency\x12\x45\n\x08resource\x18\x02 \x01(\x0b\x32\x1f.authzed.api.v1.ObjectReferenceB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08resource\x12J\n\npermission\x18\x03 \x01(\tB*\xfa\x42\'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\npermission\x12x\n\x13subject_object_type\x18\x04 \x01(\tBH\xfa\x42\x45rC(\x80\x01\x32>^([a-z][a-z0-9_]{1,61}[a-z0-9]/)*[a-z][a-z0-9_]{1,62}[a-z0-9]$R\x11subjectObjectType\x12\x66\n\x19optional_subject_relation\x18\x05 \x01(\tB*\xfa\x42\'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$R\x17optionalSubjectRelation\x12;\n\x07\x63ontext\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x07\x63ontext\x12?\n\x17optional_concrete_limit\x18\x07 \x01(\rB\x07\xfa\x42\x04*\x02(\x00R\x15optionalConcreteLimit\x12?\n\x0foptional_cursor\x18\x08 \x01(\x0b\x32\x16.authzed.api.v1.CursorR\x0eoptionalCursor\x12]\n\x0fwildcard_option\x18\t \x01(\x0e\x32\x34.authzed.api.v1.LookupSubjectsRequest.WildcardOptionR\x0ewildcardOption\"\x7f\n\x0eWildcardOption\x12\x1f\n\x1bWILDCARD_OPTION_UNSPECIFIED\x10\x00\x12%\n!WILDCARD_OPTION_INCLUDE_WILDCARDS\x10\x01\x12%\n!WILDCARD_OPTION_EXCLUDE_WILDCARDS\x10\x02\"\xc6\x04\n\x16LookupSubjectsResponse\x12:\n\x0clooked_up_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\nlookedUpAt\x12.\n\x11subject_object_id\x18\x02 \x01(\tB\x02\x18\x01R\x0fsubjectObjectId\x12\x34\n\x14\x65xcluded_subject_ids\x18\x03 \x03(\tB\x02\x18\x01R\x12\x65xcludedSubjectIds\x12Z\n\x0epermissionship\x18\x04 \x01(\x0e\x32$.authzed.api.v1.LookupPermissionshipB\x0c\x18\x01\xfa\x42\x07\x82\x01\x04\x10\x01 \x00R\x0epermissionship\x12]\n\x13partial_caveat_info\x18\x05 \x01(\x0b\x32!.authzed.api.v1.PartialCaveatInfoB\n\x18\x01\xfa\x42\x05\x8a\x01\x02\x10\x00R\x11partialCaveatInfo\x12\x39\n\x07subject\x18\x06 \x01(\x0b\x32\x1f.authzed.api.v1.ResolvedSubjectR\x07subject\x12L\n\x11\x65xcluded_subjects\x18\x07 \x03(\x0b\x32\x1f.authzed.api.v1.ResolvedSubjectR\x10\x65xcludedSubjects\x12\x46\n\x13\x61\x66ter_result_cursor\x18\x08 \x01(\x0b\x32\x16.authzed.api.v1.CursorR\x11\x61\x66terResultCursor\"\xf4\x01\n\x0fResolvedSubject\x12*\n\x11subject_object_id\x18\x01 \x01(\tR\x0fsubjectObjectId\x12X\n\x0epermissionship\x18\x02 \x01(\x0e\x32$.authzed.api.v1.LookupPermissionshipB\n\xfa\x42\x07\x82\x01\x04\x10\x01 \x00R\x0epermissionship\x12[\n\x13partial_caveat_info\x18\x03 \x01(\x0b\x32!.authzed.api.v1.PartialCaveatInfoB\x08\xfa\x42\x05\x8a\x01\x02\x10\x00R\x11partialCaveatInfo\"s\n\x1eImportBulkRelationshipsRequest\x12Q\n\rrelationships\x18\x01 \x03(\x0b\x32\x1c.authzed.api.v1.RelationshipB\r\xfa\x42\n\x92\x01\x07\"\x05\x8a\x01\x02\x10\x01R\rrelationships\"@\n\x1fImportBulkRelationshipsResponse\x12\x1d\n\nnum_loaded\x18\x01 \x01(\x04R\tnumLoaded\"\xb6\x02\n\x1e\x45xportBulkRelationshipsRequest\x12=\n\x0b\x63onsistency\x18\x01 \x01(\x0b\x32\x1b.authzed.api.v1.ConsistencyR\x0b\x63onsistency\x12.\n\x0eoptional_limit\x18\x02 \x01(\rB\x07\xfa\x42\x04*\x02(\x00R\roptionalLimit\x12?\n\x0foptional_cursor\x18\x03 \x01(\x0b\x32\x16.authzed.api.v1.CursorR\x0eoptionalCursor\x12\x64\n\x1coptional_relationship_filter\x18\x04 \x01(\x0b\x32\".authzed.api.v1.RelationshipFilterR\x1aoptionalRelationshipFilter\"\xad\x01\n\x1f\x45xportBulkRelationshipsResponse\x12\x46\n\x13\x61\x66ter_result_cursor\x18\x01 \x01(\x0b\x32\x16.authzed.api.v1.CursorR\x11\x61\x66terResultCursor\x12\x42\n\rrelationships\x18\x02 \x03(\x0b\x32\x1c.authzed.api.v1.RelationshipR\rrelationships*\x99\x01\n\x14LookupPermissionship\x12%\n!LOOKUP_PERMISSIONSHIP_UNSPECIFIED\x10\x00\x12(\n$LOOKUP_PERMISSIONSHIP_HAS_PERMISSION\x10\x01\x12\x30\n,LOOKUP_PERMISSIONSHIP_CONDITIONAL_PERMISSION\x10\x02\x32\xea\x0b\n\x12PermissionsService\x12\x8d\x01\n\x11ReadRelationships\x12(.authzed.api.v1.ReadRelationshipsRequest\x1a).authzed.api.v1.ReadRelationshipsResponse\"!\x82\xd3\xe4\x93\x02\x1b\"\x16/v1/relationships/read:\x01*0\x01\x12\x8f\x01\n\x12WriteRelationships\x12).authzed.api.v1.WriteRelationshipsRequest\x1a*.authzed.api.v1.WriteRelationshipsResponse\"\"\x82\xd3\xe4\x93\x02\x1c\"\x17/v1/relationships/write:\x01*\x12\x93\x01\n\x13\x44\x65leteRelationships\x12*.authzed.api.v1.DeleteRelationshipsRequest\x1a+.authzed.api.v1.DeleteRelationshipsResponse\"#\x82\xd3\xe4\x93\x02\x1d\"\x18/v1/relationships/delete:\x01*\x12\x84\x01\n\x0f\x43heckPermission\x12&.authzed.api.v1.CheckPermissionRequest\x1a\'.authzed.api.v1.CheckPermissionResponse\" \x82\xd3\xe4\x93\x02\x1a\"\x15/v1/permissions/check:\x01*\x12\x97\x01\n\x14\x43heckBulkPermissions\x12+.authzed.api.v1.CheckBulkPermissionsRequest\x1a,.authzed.api.v1.CheckBulkPermissionsResponse\"$\x82\xd3\xe4\x93\x02\x1e\"\x19/v1/permissions/checkbulk:\x01*\x12\x94\x01\n\x14\x45xpandPermissionTree\x12+.authzed.api.v1.ExpandPermissionTreeRequest\x1a,.authzed.api.v1.ExpandPermissionTreeResponse\"!\x82\xd3\xe4\x93\x02\x1b\"\x16/v1/permissions/expand:\x01*\x12\x8a\x01\n\x0fLookupResources\x12&.authzed.api.v1.LookupResourcesRequest\x1a\'.authzed.api.v1.LookupResourcesResponse\"$\x82\xd3\xe4\x93\x02\x1e\"\x19/v1/permissions/resources:\x01*0\x01\x12\x86\x01\n\x0eLookupSubjects\x12%.authzed.api.v1.LookupSubjectsRequest\x1a&.authzed.api.v1.LookupSubjectsResponse\"#\x82\xd3\xe4\x93\x02\x1d\"\x18/v1/permissions/subjects:\x01*0\x01\x12\xa5\x01\n\x17ImportBulkRelationships\x12..authzed.api.v1.ImportBulkRelationshipsRequest\x1a/.authzed.api.v1.ImportBulkRelationshipsResponse\"\'\x82\xd3\xe4\x93\x02!\"\x1c/v1/relationships/importbulk:\x01*(\x01\x12\xa5\x01\n\x17\x45xportBulkRelationships\x12..authzed.api.v1.ExportBulkRelationshipsRequest\x1a/.authzed.api.v1.ExportBulkRelationshipsResponse\"\'\x82\xd3\xe4\x93\x02!\"\x1c/v1/relationships/exportbulk:\x01*0\x01\x42J\n\x12\x63om.authzed.api.v1P\x01Z2github.com/authzed/authzed-go/proto/authzed/api/v1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -179,77 +180,77 @@ _globals['_PERMISSIONSSERVICE'].methods_by_name['LookupSubjects']._loaded_options = None _globals['_PERMISSIONSSERVICE'].methods_by_name['LookupSubjects']._serialized_options = b'\202\323\344\223\002\035\"\030/v1/permissions/subjects:\001*' _globals['_PERMISSIONSSERVICE'].methods_by_name['ImportBulkRelationships']._loaded_options = None - _globals['_PERMISSIONSSERVICE'].methods_by_name['ImportBulkRelationships']._serialized_options = b'\202\323\344\223\002.\")/v1/experimental/relationships/bulkimport:\001*' + _globals['_PERMISSIONSSERVICE'].methods_by_name['ImportBulkRelationships']._serialized_options = b'\202\323\344\223\002!\"\034/v1/relationships/importbulk:\001*' _globals['_PERMISSIONSSERVICE'].methods_by_name['ExportBulkRelationships']._loaded_options = None - _globals['_PERMISSIONSSERVICE'].methods_by_name['ExportBulkRelationships']._serialized_options = b'\202\323\344\223\002.\")/v1/experimental/relationships/bulkexport:\001*' - _globals['_LOOKUPPERMISSIONSHIP']._serialized_start=9162 - _globals['_LOOKUPPERMISSIONSHIP']._serialized_end=9315 - _globals['_CONSISTENCY']._serialized_start=225 - _globals['_CONSISTENCY']._serialized_end=509 - _globals['_RELATIONSHIPFILTER']._serialized_start=512 - _globals['_RELATIONSHIPFILTER']._serialized_end=1013 - _globals['_SUBJECTFILTER']._serialized_start=1016 - _globals['_SUBJECTFILTER']._serialized_end=1413 - _globals['_SUBJECTFILTER_RELATIONFILTER']._serialized_start=1325 - _globals['_SUBJECTFILTER_RELATIONFILTER']._serialized_end=1413 - _globals['_READRELATIONSHIPSREQUEST']._serialized_start=1416 - _globals['_READRELATIONSHIPSREQUEST']._serialized_end=1713 - _globals['_READRELATIONSHIPSRESPONSE']._serialized_start=1716 - _globals['_READRELATIONSHIPSRESPONSE']._serialized_end=1952 - _globals['_PRECONDITION']._serialized_start=1955 - _globals['_PRECONDITION']._serialized_end=2217 - _globals['_PRECONDITION_OPERATION']._serialized_start=2123 - _globals['_PRECONDITION_OPERATION']._serialized_end=2217 - _globals['_WRITERELATIONSHIPSREQUEST']._serialized_start=2220 - _globals['_WRITERELATIONSHIPSREQUEST']._serialized_end=2527 - _globals['_WRITERELATIONSHIPSRESPONSE']._serialized_start=2529 - _globals['_WRITERELATIONSHIPSRESPONSE']._serialized_end=2614 - _globals['_DELETERELATIONSHIPSREQUEST']._serialized_start=2617 - _globals['_DELETERELATIONSHIPSREQUEST']._serialized_end=3064 - _globals['_DELETERELATIONSHIPSRESPONSE']._serialized_start=3067 - _globals['_DELETERELATIONSHIPSRESPONSE']._serialized_end=3378 - _globals['_DELETERELATIONSHIPSRESPONSE_DELETIONPROGRESS']._serialized_start=3262 - _globals['_DELETERELATIONSHIPSRESPONSE_DELETIONPROGRESS']._serialized_end=3378 - _globals['_CHECKPERMISSIONREQUEST']._serialized_start=3381 - _globals['_CHECKPERMISSIONREQUEST']._serialized_end=3781 - _globals['_CHECKPERMISSIONRESPONSE']._serialized_start=3784 - _globals['_CHECKPERMISSIONRESPONSE']._serialized_end=4307 - _globals['_CHECKPERMISSIONRESPONSE_PERMISSIONSHIP']._serialized_start=4147 - _globals['_CHECKPERMISSIONRESPONSE_PERMISSIONSHIP']._serialized_end=4307 - _globals['_CHECKBULKPERMISSIONSREQUEST']._serialized_start=4310 - _globals['_CHECKBULKPERMISSIONSREQUEST']._serialized_end=4488 - _globals['_CHECKBULKPERMISSIONSREQUESTITEM']._serialized_start=4491 - _globals['_CHECKBULKPERMISSIONSREQUESTITEM']._serialized_end=4802 - _globals['_CHECKBULKPERMISSIONSRESPONSE']._serialized_start=4805 - _globals['_CHECKBULKPERMISSIONSRESPONSE']._serialized_end=4981 - _globals['_CHECKBULKPERMISSIONSPAIR']._serialized_start=4984 - _globals['_CHECKBULKPERMISSIONSPAIR']._serialized_end=5213 - _globals['_CHECKBULKPERMISSIONSRESPONSEITEM']._serialized_start=5216 - _globals['_CHECKBULKPERMISSIONSRESPONSEITEM']._serialized_end=5451 - _globals['_EXPANDPERMISSIONTREEREQUEST']._serialized_start=5454 - _globals['_EXPANDPERMISSIONTREEREQUEST']._serialized_end=5693 - _globals['_EXPANDPERMISSIONTREERESPONSE']._serialized_start=5696 - _globals['_EXPANDPERMISSIONTREERESPONSE']._serialized_end=5858 - _globals['_LOOKUPRESOURCESREQUEST']._serialized_start=5861 - _globals['_LOOKUPRESOURCESREQUEST']._serialized_end=6389 - _globals['_LOOKUPRESOURCESRESPONSE']._serialized_start=6392 - _globals['_LOOKUPRESOURCESRESPONSE']._serialized_end=6778 - _globals['_LOOKUPSUBJECTSREQUEST']._serialized_start=6781 - _globals['_LOOKUPSUBJECTSREQUEST']._serialized_end=7655 - _globals['_LOOKUPSUBJECTSREQUEST_WILDCARDOPTION']._serialized_start=7528 - _globals['_LOOKUPSUBJECTSREQUEST_WILDCARDOPTION']._serialized_end=7655 - _globals['_LOOKUPSUBJECTSRESPONSE']._serialized_start=7658 - _globals['_LOOKUPSUBJECTSRESPONSE']._serialized_end=8240 - _globals['_RESOLVEDSUBJECT']._serialized_start=8243 - _globals['_RESOLVEDSUBJECT']._serialized_end=8487 - _globals['_IMPORTBULKRELATIONSHIPSREQUEST']._serialized_start=8489 - _globals['_IMPORTBULKRELATIONSHIPSREQUEST']._serialized_end=8604 - _globals['_IMPORTBULKRELATIONSHIPSRESPONSE']._serialized_start=8606 - _globals['_IMPORTBULKRELATIONSHIPSRESPONSE']._serialized_end=8670 - _globals['_EXPORTBULKRELATIONSHIPSREQUEST']._serialized_start=8673 - _globals['_EXPORTBULKRELATIONSHIPSREQUEST']._serialized_end=8983 - _globals['_EXPORTBULKRELATIONSHIPSRESPONSE']._serialized_start=8986 - _globals['_EXPORTBULKRELATIONSHIPSRESPONSE']._serialized_end=9159 - _globals['_PERMISSIONSSERVICE']._serialized_start=9318 - _globals['_PERMISSIONSSERVICE']._serialized_end=10858 + _globals['_PERMISSIONSSERVICE'].methods_by_name['ExportBulkRelationships']._serialized_options = b'\202\323\344\223\002!\"\034/v1/relationships/exportbulk:\001*' + _globals['_LOOKUPPERMISSIONSHIP']._serialized_start=9271 + _globals['_LOOKUPPERMISSIONSHIP']._serialized_end=9424 + _globals['_CONSISTENCY']._serialized_start=258 + _globals['_CONSISTENCY']._serialized_end=542 + _globals['_RELATIONSHIPFILTER']._serialized_start=545 + _globals['_RELATIONSHIPFILTER']._serialized_end=1046 + _globals['_SUBJECTFILTER']._serialized_start=1049 + _globals['_SUBJECTFILTER']._serialized_end=1446 + _globals['_SUBJECTFILTER_RELATIONFILTER']._serialized_start=1358 + _globals['_SUBJECTFILTER_RELATIONFILTER']._serialized_end=1446 + _globals['_READRELATIONSHIPSREQUEST']._serialized_start=1449 + _globals['_READRELATIONSHIPSREQUEST']._serialized_end=1746 + _globals['_READRELATIONSHIPSRESPONSE']._serialized_start=1749 + _globals['_READRELATIONSHIPSRESPONSE']._serialized_end=1985 + _globals['_PRECONDITION']._serialized_start=1988 + _globals['_PRECONDITION']._serialized_end=2250 + _globals['_PRECONDITION_OPERATION']._serialized_start=2156 + _globals['_PRECONDITION_OPERATION']._serialized_end=2250 + _globals['_WRITERELATIONSHIPSREQUEST']._serialized_start=2253 + _globals['_WRITERELATIONSHIPSREQUEST']._serialized_end=2560 + _globals['_WRITERELATIONSHIPSRESPONSE']._serialized_start=2562 + _globals['_WRITERELATIONSHIPSRESPONSE']._serialized_end=2647 + _globals['_DELETERELATIONSHIPSREQUEST']._serialized_start=2650 + _globals['_DELETERELATIONSHIPSREQUEST']._serialized_end=3097 + _globals['_DELETERELATIONSHIPSRESPONSE']._serialized_start=3100 + _globals['_DELETERELATIONSHIPSRESPONSE']._serialized_end=3411 + _globals['_DELETERELATIONSHIPSRESPONSE_DELETIONPROGRESS']._serialized_start=3295 + _globals['_DELETERELATIONSHIPSRESPONSE_DELETIONPROGRESS']._serialized_end=3411 + _globals['_CHECKPERMISSIONREQUEST']._serialized_start=3414 + _globals['_CHECKPERMISSIONREQUEST']._serialized_end=3814 + _globals['_CHECKPERMISSIONRESPONSE']._serialized_start=3817 + _globals['_CHECKPERMISSIONRESPONSE']._serialized_end=4416 + _globals['_CHECKPERMISSIONRESPONSE_PERMISSIONSHIP']._serialized_start=4256 + _globals['_CHECKPERMISSIONRESPONSE_PERMISSIONSHIP']._serialized_end=4416 + _globals['_CHECKBULKPERMISSIONSREQUEST']._serialized_start=4419 + _globals['_CHECKBULKPERMISSIONSREQUEST']._serialized_end=4597 + _globals['_CHECKBULKPERMISSIONSREQUESTITEM']._serialized_start=4600 + _globals['_CHECKBULKPERMISSIONSREQUESTITEM']._serialized_end=4911 + _globals['_CHECKBULKPERMISSIONSRESPONSE']._serialized_start=4914 + _globals['_CHECKBULKPERMISSIONSRESPONSE']._serialized_end=5090 + _globals['_CHECKBULKPERMISSIONSPAIR']._serialized_start=5093 + _globals['_CHECKBULKPERMISSIONSPAIR']._serialized_end=5322 + _globals['_CHECKBULKPERMISSIONSRESPONSEITEM']._serialized_start=5325 + _globals['_CHECKBULKPERMISSIONSRESPONSEITEM']._serialized_end=5560 + _globals['_EXPANDPERMISSIONTREEREQUEST']._serialized_start=5563 + _globals['_EXPANDPERMISSIONTREEREQUEST']._serialized_end=5802 + _globals['_EXPANDPERMISSIONTREERESPONSE']._serialized_start=5805 + _globals['_EXPANDPERMISSIONTREERESPONSE']._serialized_end=5967 + _globals['_LOOKUPRESOURCESREQUEST']._serialized_start=5970 + _globals['_LOOKUPRESOURCESREQUEST']._serialized_end=6498 + _globals['_LOOKUPRESOURCESRESPONSE']._serialized_start=6501 + _globals['_LOOKUPRESOURCESRESPONSE']._serialized_end=6887 + _globals['_LOOKUPSUBJECTSREQUEST']._serialized_start=6890 + _globals['_LOOKUPSUBJECTSREQUEST']._serialized_end=7764 + _globals['_LOOKUPSUBJECTSREQUEST_WILDCARDOPTION']._serialized_start=7637 + _globals['_LOOKUPSUBJECTSREQUEST_WILDCARDOPTION']._serialized_end=7764 + _globals['_LOOKUPSUBJECTSRESPONSE']._serialized_start=7767 + _globals['_LOOKUPSUBJECTSRESPONSE']._serialized_end=8349 + _globals['_RESOLVEDSUBJECT']._serialized_start=8352 + _globals['_RESOLVEDSUBJECT']._serialized_end=8596 + _globals['_IMPORTBULKRELATIONSHIPSREQUEST']._serialized_start=8598 + _globals['_IMPORTBULKRELATIONSHIPSREQUEST']._serialized_end=8713 + _globals['_IMPORTBULKRELATIONSHIPSRESPONSE']._serialized_start=8715 + _globals['_IMPORTBULKRELATIONSHIPSRESPONSE']._serialized_end=8779 + _globals['_EXPORTBULKRELATIONSHIPSREQUEST']._serialized_start=8782 + _globals['_EXPORTBULKRELATIONSHIPSREQUEST']._serialized_end=9092 + _globals['_EXPORTBULKRELATIONSHIPSRESPONSE']._serialized_start=9095 + _globals['_EXPORTBULKRELATIONSHIPSRESPONSE']._serialized_end=9268 + _globals['_PERMISSIONSSERVICE']._serialized_start=9427 + _globals['_PERMISSIONSSERVICE']._serialized_end=10941 # @@protoc_insertion_point(module_scope) diff --git a/authzed/api/v1/permission_service_pb2.pyi b/authzed/api/v1/permission_service_pb2.pyi index 43ae9c6..34ef123 100644 --- a/authzed/api/v1/permission_service_pb2.pyi +++ b/authzed/api/v1/permission_service_pb2.pyi @@ -12,6 +12,7 @@ import google.protobuf.internal.containers import google.protobuf.internal.enum_type_wrapper import google.protobuf.message import google.protobuf.struct_pb2 +import google.protobuf.timestamp_pb2 import google.rpc.status_pb2 import sys import typing @@ -557,6 +558,7 @@ class CheckPermissionResponse(google.protobuf.message.Message): PERMISSIONSHIP_FIELD_NUMBER: builtins.int PARTIAL_CAVEAT_INFO_FIELD_NUMBER: builtins.int DEBUG_TRACE_FIELD_NUMBER: builtins.int + OPTIONAL_EXPIRES_AT_FIELD_NUMBER: builtins.int permissionship: global___CheckPermissionResponse.Permissionship.ValueType """Permissionship communicates whether or not the subject has the requested permission or has a relationship with the given resource, over the given @@ -577,6 +579,12 @@ class CheckPermissionResponse(google.protobuf.message.Message): def debug_trace(self) -> authzed.api.v1.debug_pb2.DebugInformation: """debug_trace is the debugging trace of this check, if requested.""" + @property + def optional_expires_at(self) -> google.protobuf.timestamp_pb2.Timestamp: + """optional_expires_at is the time at which at least one of the relationships used to + compute this result, expires (if any). This is *not* related to the caching window. + """ + def __init__( self, *, @@ -584,9 +592,10 @@ class CheckPermissionResponse(google.protobuf.message.Message): permissionship: global___CheckPermissionResponse.Permissionship.ValueType = ..., partial_caveat_info: authzed.api.v1.core_pb2.PartialCaveatInfo | None = ..., debug_trace: authzed.api.v1.debug_pb2.DebugInformation | None = ..., + optional_expires_at: google.protobuf.timestamp_pb2.Timestamp | None = ..., ) -> None: ... - def HasField(self, field_name: typing.Literal["checked_at", b"checked_at", "debug_trace", b"debug_trace", "partial_caveat_info", b"partial_caveat_info"]) -> builtins.bool: ... - def ClearField(self, field_name: typing.Literal["checked_at", b"checked_at", "debug_trace", b"debug_trace", "partial_caveat_info", b"partial_caveat_info", "permissionship", b"permissionship"]) -> None: ... + def HasField(self, field_name: typing.Literal["checked_at", b"checked_at", "debug_trace", b"debug_trace", "optional_expires_at", b"optional_expires_at", "partial_caveat_info", b"partial_caveat_info"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["checked_at", b"checked_at", "debug_trace", b"debug_trace", "optional_expires_at", b"optional_expires_at", "partial_caveat_info", b"partial_caveat_info", "permissionship", b"permissionship"]) -> None: ... global___CheckPermissionResponse = CheckPermissionResponse @@ -1102,7 +1111,10 @@ class ImportBulkRelationshipsRequest(google.protobuf.message.Message): """ImportBulkRelationshipsRequest represents one batch of the streaming ImportBulkRelationships API. The maximum size is only limited by the backing datastore, and optimal size should be determined by the calling client - experimentally. + experimentally. When ImportBulk is invoked and receives its first request message, + a transaction is opened to import the relationships. All requests sent to the same + invocation are executed under this single transaction. If a relationship already + exists within the datastore, the entire transaction will fail with an error. """ DESCRIPTOR: google.protobuf.descriptor.Descriptor diff --git a/buf.gen.yaml b/buf.gen.yaml index e6877ea..9bf7e96 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -8,4 +8,4 @@ plugins: - remote: "buf.build/community/nipunn1313-mypy:v3.6.0" out: "." inputs: - - module: "buf.build/authzed/api:v1.38.0" + - module: "buf.build/authzed/api:05f596b3c0e14ebdfffd043a954ef40dd26c49ae"