From 95880f712a953e54fbd651451f440f93ad680b8a Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Wed, 12 Jul 2023 13:38:12 -0400 Subject: [PATCH] Update API and prepare v0.11.0 --- README.md | 2 +- authzed/api/v0/core_pb2.py | 23 ++-- authzed/api/v0/developer_pb2.py | 83 ++++++------ authzed/api/v1/core_pb2.py | 59 ++++---- authzed/api/v1/debug_pb2.py | 35 ++--- authzed/api/v1/error_reason_pb2.py | 13 +- authzed/api/v1/error_reason_pb2.pyi | 34 +++++ authzed/api/v1/experimental_service_pb2.py | 33 ++--- authzed/api/v1/openapi_pb2.py | 7 +- authzed/api/v1/permission_service_pb2.py | 127 +++++++++--------- authzed/api/v1/permission_service_pb2.pyi | 69 +++++++++- authzed/api/v1/schema_service_pb2.py | 33 ++--- authzed/api/v1/watch_service_pb2.py | 23 ++-- authzed/api/v1alpha1/schema_pb2.py | 27 ++-- .../v1alpha1/watchresources_service_pb2.py | 31 ++--- buf.gen.yaml | 2 +- pyproject.toml | 2 +- 17 files changed, 357 insertions(+), 246 deletions(-) diff --git a/README.md b/README.md index da62d56..35f2d1d 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,8 @@ This repository houses the Python client library for Authzed. Developers create a schema that models their permissions requirements and use a client library, such as this one, to apply the schema to the database, insert data into the database, and query the data to efficiently check permissions in their applications. Supported client API versions: + - [v1](https://docs.authzed.com/reference/api#authzedapiv1) -- [v1alpha1](https://docs.authzed.com/reference/api#authzedapiv1alpha1) You can find more info on each API on the [Authzed API reference documentation]. Additionally, Protobuf API documentation can be found on the [Buf Registry Authzed API repository]. diff --git a/authzed/api/v0/core_pb2.py b/authzed/api/v0/core_pb2.py index e8d74a7..b5c235c 100644 --- a/authzed/api/v0/core_pb2.py +++ b/authzed/api/v0/core_pb2.py @@ -2,10 +2,10 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: authzed/api/v0/core.proto """Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -16,8 +16,9 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19\x61uthzed/api/v0/core.proto\x12\x0e\x61uthzed.api.v0\x1a\x17validate/validate.proto\"\xa0\x01\n\rRelationTuple\x12[\n\x13object_and_relation\x18\x01 \x01(\x0b\x32!.authzed.api.v0.ObjectAndRelationB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x11objectAndRelation\x12\x32\n\x04user\x18\x02 \x01(\x0b\x32\x14.authzed.api.v0.UserB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x04user\"\x9d\x02\n\x11ObjectAndRelation\x12\x66\n\tnamespace\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\tnamespace\x12R\n\tobject_id\x18\x02 \x01(\tB5\xfa\x42\x32r0(\x80\x01\x32+^(([a-zA-Z0-9_][a-zA-Z0-9/_|-]{0,127})|\\*)$R\x08objectId\x12L\n\x08relation\x18\x03 \x01(\tB0\xfa\x42-r+(@2\'^(\\.\\.\\.|[a-z][a-z0-9_]{1,62}[a-z0-9])$R\x08relation\"\xc9\x01\n\x11RelationReference\x12\x66\n\tnamespace\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\tnamespace\x12L\n\x08relation\x18\x03 \x01(\tB0\xfa\x42-r+(@2\'^(\\.\\.\\.|[a-z][a-z0-9_]{1,62}[a-z0-9])$R\x08relation\"b\n\x04User\x12G\n\x07userset\x18\x02 \x01(\x0b\x32!.authzed.api.v0.ObjectAndRelationB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01H\x00R\x07usersetB\x11\n\nuser_oneof\x12\x03\xf8\x42\x01\x42H\n\x12\x63om.authzed.api.v0Z2github.com/authzed/authzed-go/proto/authzed/api/v0b\x06proto3') -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'authzed.api.v0.core_pb2', globals()) +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'authzed.api.v0.core_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None @@ -40,12 +41,12 @@ _USER.oneofs_by_name['user_oneof']._serialized_options = b'\370B\001' _USER.fields_by_name['userset']._options = None _USER.fields_by_name['userset']._serialized_options = b'\372B\005\212\001\002\020\001' - _RELATIONTUPLE._serialized_start=71 - _RELATIONTUPLE._serialized_end=231 - _OBJECTANDRELATION._serialized_start=234 - _OBJECTANDRELATION._serialized_end=519 - _RELATIONREFERENCE._serialized_start=522 - _RELATIONREFERENCE._serialized_end=723 - _USER._serialized_start=725 - _USER._serialized_end=823 + _globals['_RELATIONTUPLE']._serialized_start=71 + _globals['_RELATIONTUPLE']._serialized_end=231 + _globals['_OBJECTANDRELATION']._serialized_start=234 + _globals['_OBJECTANDRELATION']._serialized_end=519 + _globals['_RELATIONREFERENCE']._serialized_start=522 + _globals['_RELATIONREFERENCE']._serialized_end=723 + _globals['_USER']._serialized_start=725 + _globals['_USER']._serialized_end=823 # @@protoc_insertion_point(module_scope) diff --git a/authzed/api/v0/developer_pb2.py b/authzed/api/v0/developer_pb2.py index d68c88c..d665519 100644 --- a/authzed/api/v0/developer_pb2.py +++ b/authzed/api/v0/developer_pb2.py @@ -2,10 +2,10 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: authzed/api/v0/developer.proto """Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -16,48 +16,49 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1e\x61uthzed/api/v0/developer.proto\x12\x0e\x61uthzed.api.v0\x1a\x19\x61uthzed/api/v0/core.proto\"-\n\x13\x46ormatSchemaRequest\x12\x16\n\x06schema\x18\x01 \x01(\tR\x06schema\"w\n\x14\x46ormatSchemaResponse\x12\x34\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x1e.authzed.api.v0.DeveloperErrorR\x05\x65rror\x12)\n\x10\x66ormatted_schema\x18\x02 \x01(\tR\x0f\x66ormattedSchema\"C\n\x14UpgradeSchemaRequest\x12+\n\x11namespace_configs\x18\x01 \x03(\tR\x10namespaceConfigs\"v\n\x15UpgradeSchemaResponse\x12\x34\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x1e.authzed.api.v0.DeveloperErrorR\x05\x65rror\x12\'\n\x0fupgraded_schema\x18\x02 \x01(\tR\x0eupgradedSchema\"\xa7\x01\n\x0cShareRequest\x12\x16\n\x06schema\x18\x01 \x01(\tR\x06schema\x12-\n\x12relationships_yaml\x18\x02 \x01(\tR\x11relationshipsYaml\x12\'\n\x0fvalidation_yaml\x18\x03 \x01(\tR\x0evalidationYaml\x12\'\n\x0f\x61ssertions_yaml\x18\x04 \x01(\tR\x0e\x61ssertionsYaml\"8\n\rShareResponse\x12\'\n\x0fshare_reference\x18\x01 \x01(\tR\x0eshareReference\"=\n\x12LookupShareRequest\x12\'\n\x0fshare_reference\x18\x01 \x01(\tR\x0eshareReference\"\xe2\x02\n\x13LookupShareResponse\x12H\n\x06status\x18\x01 \x01(\x0e\x32\x30.authzed.api.v0.LookupShareResponse.LookupStatusR\x06status\x12\x16\n\x06schema\x18\x02 \x01(\tR\x06schema\x12-\n\x12relationships_yaml\x18\x03 \x01(\tR\x11relationshipsYaml\x12\'\n\x0fvalidation_yaml\x18\x04 \x01(\tR\x0evalidationYaml\x12\'\n\x0f\x61ssertions_yaml\x18\x05 \x01(\tR\x0e\x61ssertionsYaml\"h\n\x0cLookupStatus\x12\x15\n\x11UNKNOWN_REFERENCE\x10\x00\x12\x14\n\x10\x46\x41ILED_TO_LOOKUP\x10\x01\x12\x13\n\x0fVALID_REFERENCE\x10\x02\x12\x16\n\x12UPGRADED_REFERENCE\x10\x03\"s\n\x0eRequestContext\x12\x16\n\x06schema\x18\x01 \x01(\tR\x06schema\x12\x43\n\rrelationships\x18\x02 \x03(\x0b\x32\x1d.authzed.api.v0.RelationTupleR\rrelationshipsJ\x04\x08\x03\x10\x04\"\x9c\x01\n\x10\x45\x64itCheckRequest\x12\x38\n\x07\x63ontext\x18\x01 \x01(\x0b\x32\x1e.authzed.api.v0.RequestContextR\x07\x63ontext\x12N\n\x13\x63heck_relationships\x18\x02 \x03(\x0b\x32\x1d.authzed.api.v0.RelationTupleR\x12\x63heckRelationships\"\xa7\x01\n\x0f\x45\x64itCheckResult\x12\x41\n\x0crelationship\x18\x01 \x01(\x0b\x32\x1d.authzed.api.v0.RelationTupleR\x0crelationship\x12\x1b\n\tis_member\x18\x02 \x01(\x08R\x08isMember\x12\x34\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x1e.authzed.api.v0.DeveloperErrorR\x05\x65rror\"\xa0\x01\n\x11\x45\x64itCheckResponse\x12\x45\n\x0erequest_errors\x18\x01 \x03(\x0b\x32\x1e.authzed.api.v0.DeveloperErrorR\rrequestErrors\x12\x44\n\rcheck_results\x18\x02 \x03(\x0b\x32\x1f.authzed.api.v0.EditCheckResultR\x0c\x63heckResults\"\xd3\x01\n\x0fValidateRequest\x12\x38\n\x07\x63ontext\x18\x01 \x01(\x0b\x32\x1e.authzed.api.v0.RequestContextR\x07\x63ontext\x12\'\n\x0fvalidation_yaml\x18\x03 \x01(\tR\x0evalidationYaml\x12\x34\n\x16update_validation_yaml\x18\x04 \x01(\x08R\x14updateValidationYaml\x12\'\n\x0f\x61ssertions_yaml\x18\x05 \x01(\tR\x0e\x61ssertionsYaml\"\xde\x01\n\x10ValidateResponse\x12\x45\n\x0erequest_errors\x18\x01 \x03(\x0b\x32\x1e.authzed.api.v0.DeveloperErrorR\rrequestErrors\x12K\n\x11validation_errors\x18\x02 \x03(\x0b\x32\x1e.authzed.api.v0.DeveloperErrorR\x10validationErrors\x12\x36\n\x17updated_validation_yaml\x18\x03 \x01(\tR\x15updatedValidationYaml\"\xee\x04\n\x0e\x44\x65veloperError\x12\x18\n\x07message\x18\x01 \x01(\tR\x07message\x12\x12\n\x04line\x18\x02 \x01(\rR\x04line\x12\x16\n\x06\x63olumn\x18\x03 \x01(\rR\x06\x63olumn\x12=\n\x06source\x18\x04 \x01(\x0e\x32%.authzed.api.v0.DeveloperError.SourceR\x06source\x12<\n\x04kind\x18\x05 \x01(\x0e\x32(.authzed.api.v0.DeveloperError.ErrorKindR\x04kind\x12\x12\n\x04path\x18\x06 \x03(\tR\x04path\x12\x18\n\x07\x63ontext\x18\x07 \x01(\tR\x07\x63ontext\"o\n\x06Source\x12\x12\n\x0eUNKNOWN_SOURCE\x10\x00\x12\n\n\x06SCHEMA\x10\x01\x12\x10\n\x0cRELATIONSHIP\x10\x02\x12\x13\n\x0fVALIDATION_YAML\x10\x03\x12\x0f\n\x0b\x43HECK_WATCH\x10\x04\x12\r\n\tASSERTION\x10\x05\"\xf9\x01\n\tErrorKind\x12\x10\n\x0cUNKNOWN_KIND\x10\x00\x12\x0f\n\x0bPARSE_ERROR\x10\x01\x12\x10\n\x0cSCHEMA_ISSUE\x10\x02\x12\x1a\n\x16\x44UPLICATE_RELATIONSHIP\x10\x03\x12!\n\x1dMISSING_EXPECTED_RELATIONSHIP\x10\x04\x12\x1c\n\x18\x45XTRA_RELATIONSHIP_FOUND\x10\x05\x12\x17\n\x13UNKNOWN_OBJECT_TYPE\x10\x06\x12\x14\n\x10UNKNOWN_RELATION\x10\x07\x12\x15\n\x11MAXIMUM_RECURSION\x10\x08\x12\x14\n\x10\x41SSERTION_FAILED\x10\t2\x97\x04\n\x10\x44\x65veloperService\x12R\n\tEditCheck\x12 .authzed.api.v0.EditCheckRequest\x1a!.authzed.api.v0.EditCheckResponse\"\x00\x12O\n\x08Validate\x12\x1f.authzed.api.v0.ValidateRequest\x1a .authzed.api.v0.ValidateResponse\"\x00\x12\x46\n\x05Share\x12\x1c.authzed.api.v0.ShareRequest\x1a\x1d.authzed.api.v0.ShareResponse\"\x00\x12Y\n\x0cLookupShared\x12\".authzed.api.v0.LookupShareRequest\x1a#.authzed.api.v0.LookupShareResponse\"\x00\x12^\n\rUpgradeSchema\x12$.authzed.api.v0.UpgradeSchemaRequest\x1a%.authzed.api.v0.UpgradeSchemaResponse\"\x00\x12[\n\x0c\x46ormatSchema\x12#.authzed.api.v0.FormatSchemaRequest\x1a$.authzed.api.v0.FormatSchemaResponse\"\x00\x42H\n\x12\x63om.authzed.api.v0Z2github.com/authzed/authzed-go/proto/authzed/api/v0b\x06proto3') -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'authzed.api.v0.developer_pb2', globals()) +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'authzed.api.v0.developer_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n\022com.authzed.api.v0Z2github.com/authzed/authzed-go/proto/authzed/api/v0' - _FORMATSCHEMAREQUEST._serialized_start=77 - _FORMATSCHEMAREQUEST._serialized_end=122 - _FORMATSCHEMARESPONSE._serialized_start=124 - _FORMATSCHEMARESPONSE._serialized_end=243 - _UPGRADESCHEMAREQUEST._serialized_start=245 - _UPGRADESCHEMAREQUEST._serialized_end=312 - _UPGRADESCHEMARESPONSE._serialized_start=314 - _UPGRADESCHEMARESPONSE._serialized_end=432 - _SHAREREQUEST._serialized_start=435 - _SHAREREQUEST._serialized_end=602 - _SHARERESPONSE._serialized_start=604 - _SHARERESPONSE._serialized_end=660 - _LOOKUPSHAREREQUEST._serialized_start=662 - _LOOKUPSHAREREQUEST._serialized_end=723 - _LOOKUPSHARERESPONSE._serialized_start=726 - _LOOKUPSHARERESPONSE._serialized_end=1080 - _LOOKUPSHARERESPONSE_LOOKUPSTATUS._serialized_start=976 - _LOOKUPSHARERESPONSE_LOOKUPSTATUS._serialized_end=1080 - _REQUESTCONTEXT._serialized_start=1082 - _REQUESTCONTEXT._serialized_end=1197 - _EDITCHECKREQUEST._serialized_start=1200 - _EDITCHECKREQUEST._serialized_end=1356 - _EDITCHECKRESULT._serialized_start=1359 - _EDITCHECKRESULT._serialized_end=1526 - _EDITCHECKRESPONSE._serialized_start=1529 - _EDITCHECKRESPONSE._serialized_end=1689 - _VALIDATEREQUEST._serialized_start=1692 - _VALIDATEREQUEST._serialized_end=1903 - _VALIDATERESPONSE._serialized_start=1906 - _VALIDATERESPONSE._serialized_end=2128 - _DEVELOPERERROR._serialized_start=2131 - _DEVELOPERERROR._serialized_end=2753 - _DEVELOPERERROR_SOURCE._serialized_start=2390 - _DEVELOPERERROR_SOURCE._serialized_end=2501 - _DEVELOPERERROR_ERRORKIND._serialized_start=2504 - _DEVELOPERERROR_ERRORKIND._serialized_end=2753 - _DEVELOPERSERVICE._serialized_start=2756 - _DEVELOPERSERVICE._serialized_end=3291 + _globals['_FORMATSCHEMAREQUEST']._serialized_start=77 + _globals['_FORMATSCHEMAREQUEST']._serialized_end=122 + _globals['_FORMATSCHEMARESPONSE']._serialized_start=124 + _globals['_FORMATSCHEMARESPONSE']._serialized_end=243 + _globals['_UPGRADESCHEMAREQUEST']._serialized_start=245 + _globals['_UPGRADESCHEMAREQUEST']._serialized_end=312 + _globals['_UPGRADESCHEMARESPONSE']._serialized_start=314 + _globals['_UPGRADESCHEMARESPONSE']._serialized_end=432 + _globals['_SHAREREQUEST']._serialized_start=435 + _globals['_SHAREREQUEST']._serialized_end=602 + _globals['_SHARERESPONSE']._serialized_start=604 + _globals['_SHARERESPONSE']._serialized_end=660 + _globals['_LOOKUPSHAREREQUEST']._serialized_start=662 + _globals['_LOOKUPSHAREREQUEST']._serialized_end=723 + _globals['_LOOKUPSHARERESPONSE']._serialized_start=726 + _globals['_LOOKUPSHARERESPONSE']._serialized_end=1080 + _globals['_LOOKUPSHARERESPONSE_LOOKUPSTATUS']._serialized_start=976 + _globals['_LOOKUPSHARERESPONSE_LOOKUPSTATUS']._serialized_end=1080 + _globals['_REQUESTCONTEXT']._serialized_start=1082 + _globals['_REQUESTCONTEXT']._serialized_end=1197 + _globals['_EDITCHECKREQUEST']._serialized_start=1200 + _globals['_EDITCHECKREQUEST']._serialized_end=1356 + _globals['_EDITCHECKRESULT']._serialized_start=1359 + _globals['_EDITCHECKRESULT']._serialized_end=1526 + _globals['_EDITCHECKRESPONSE']._serialized_start=1529 + _globals['_EDITCHECKRESPONSE']._serialized_end=1689 + _globals['_VALIDATEREQUEST']._serialized_start=1692 + _globals['_VALIDATEREQUEST']._serialized_end=1903 + _globals['_VALIDATERESPONSE']._serialized_start=1906 + _globals['_VALIDATERESPONSE']._serialized_end=2128 + _globals['_DEVELOPERERROR']._serialized_start=2131 + _globals['_DEVELOPERERROR']._serialized_end=2753 + _globals['_DEVELOPERERROR_SOURCE']._serialized_start=2390 + _globals['_DEVELOPERERROR_SOURCE']._serialized_end=2501 + _globals['_DEVELOPERERROR_ERRORKIND']._serialized_start=2504 + _globals['_DEVELOPERERROR_ERRORKIND']._serialized_end=2753 + _globals['_DEVELOPERSERVICE']._serialized_start=2756 + _globals['_DEVELOPERSERVICE']._serialized_end=3291 # @@protoc_insertion_point(module_scope) diff --git a/authzed/api/v1/core_pb2.py b/authzed/api/v1/core_pb2.py index 1669cd6..de50e61 100644 --- a/authzed/api/v1/core_pb2.py +++ b/authzed/api/v1/core_pb2.py @@ -2,10 +2,10 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: authzed/api/v1/core.proto """Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -17,8 +17,9 @@ 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\x16missingRequiredContextBH\n\x12\x63om.authzed.api.v1Z2github.com/authzed/authzed-go/proto/authzed/api/v1b\x06proto3') -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'authzed.api.v1.core_pb2', globals()) +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'authzed.api.v1.core_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None @@ -59,30 +60,30 @@ _ALGEBRAICSUBJECTSET.fields_by_name['children']._serialized_options = b'\372B\n\222\001\007\"\005\212\001\002\020\001' _PARTIALCAVEATINFO.fields_by_name['missing_required_context']._options = None _PARTIALCAVEATINFO.fields_by_name['missing_required_context']._serialized_options = b'\372B\005\222\001\002\010\001' - _RELATIONSHIP._serialized_start=101 - _RELATIONSHIP._serialized_end=414 - _CONTEXTUALIZEDCAVEAT._serialized_start=417 - _CONTEXTUALIZEDCAVEAT._serialized_end=583 - _SUBJECTREFERENCE._serialized_start=586 - _SUBJECTREFERENCE._serialized_end=760 - _OBJECTREFERENCE._serialized_start=763 - _OBJECTREFERENCE._serialized_end=959 - _ZEDTOKEN._serialized_start=961 - _ZEDTOKEN._serialized_end=1002 - _CURSOR._serialized_start=1004 - _CURSOR._serialized_end=1047 - _RELATIONSHIPUPDATE._serialized_start=1050 - _RELATIONSHIPUPDATE._serialized_end=1339 - _RELATIONSHIPUPDATE_OPERATION._serialized_start=1236 - _RELATIONSHIPUPDATE_OPERATION._serialized_end=1339 - _PERMISSIONRELATIONSHIPTREE._serialized_start=1342 - _PERMISSIONRELATIONSHIPTREE._serialized_end=1638 - _ALGEBRAICSUBJECTSET._serialized_start=1641 - _ALGEBRAICSUBJECTSET._serialized_end=1952 - _ALGEBRAICSUBJECTSET_OPERATION._serialized_start=1840 - _ALGEBRAICSUBJECTSET_OPERATION._serialized_end=1952 - _DIRECTSUBJECTSET._serialized_start=1954 - _DIRECTSUBJECTSET._serialized_end=2034 - _PARTIALCAVEATINFO._serialized_start=2036 - _PARTIALCAVEATINFO._serialized_end=2123 + _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 # @@protoc_insertion_point(module_scope) diff --git a/authzed/api/v1/debug_pb2.py b/authzed/api/v1/debug_pb2.py index cddc2e2..aee75ee 100644 --- a/authzed/api/v1/debug_pb2.py +++ b/authzed/api/v1/debug_pb2.py @@ -2,10 +2,10 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: authzed/api/v1/debug.proto """Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -18,8 +18,9 @@ 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\"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\"\xbc\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,\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\x42H\n\x12\x63om.authzed.api.v1Z2github.com/authzed/authzed-go/proto/authzed/api/v1b\x06proto3') -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'authzed.api.v1.debug_pb2', globals()) +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'authzed.api.v1.debug_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None @@ -34,18 +35,18 @@ _CHECKDEBUGTRACE.fields_by_name['subject']._serialized_options = b'\372B\005\212\001\002\020\001' _CHECKDEBUGTRACE.fields_by_name['result']._options = None _CHECKDEBUGTRACE.fields_by_name['result']._serialized_options = b'\372B\007\202\001\004\020\001 \000' - _DEBUGINFORMATION._serialized_start=128 - _DEBUGINFORMATION._serialized_end=234 - _CHECKDEBUGTRACE._serialized_start=237 - _CHECKDEBUGTRACE._serialized_end=1193 - _CHECKDEBUGTRACE_SUBPROBLEMS._serialized_start=828 - _CHECKDEBUGTRACE_SUBPROBLEMS._serialized_end=898 - _CHECKDEBUGTRACE_PERMISSIONTYPE._serialized_start=900 - _CHECKDEBUGTRACE_PERMISSIONTYPE._serialized_end=1011 - _CHECKDEBUGTRACE_PERMISSIONSHIP._serialized_start=1014 - _CHECKDEBUGTRACE_PERMISSIONSHIP._serialized_end=1174 - _CAVEATEVALINFO._serialized_start=1196 - _CAVEATEVALINFO._serialized_end=1600 - _CAVEATEVALINFO_RESULT._serialized_start=1476 - _CAVEATEVALINFO_RESULT._serialized_end=1600 + _globals['_DEBUGINFORMATION']._serialized_start=128 + _globals['_DEBUGINFORMATION']._serialized_end=234 + _globals['_CHECKDEBUGTRACE']._serialized_start=237 + _globals['_CHECKDEBUGTRACE']._serialized_end=1193 + _globals['_CHECKDEBUGTRACE_SUBPROBLEMS']._serialized_start=828 + _globals['_CHECKDEBUGTRACE_SUBPROBLEMS']._serialized_end=898 + _globals['_CHECKDEBUGTRACE_PERMISSIONTYPE']._serialized_start=900 + _globals['_CHECKDEBUGTRACE_PERMISSIONTYPE']._serialized_end=1011 + _globals['_CHECKDEBUGTRACE_PERMISSIONSHIP']._serialized_start=1014 + _globals['_CHECKDEBUGTRACE_PERMISSIONSHIP']._serialized_end=1174 + _globals['_CAVEATEVALINFO']._serialized_start=1196 + _globals['_CAVEATEVALINFO']._serialized_end=1600 + _globals['_CAVEATEVALINFO_RESULT']._serialized_start=1476 + _globals['_CAVEATEVALINFO_RESULT']._serialized_end=1600 # @@protoc_insertion_point(module_scope) diff --git a/authzed/api/v1/error_reason_pb2.py b/authzed/api/v1/error_reason_pb2.py index 93bb648..db408de 100644 --- a/authzed/api/v1/error_reason_pb2.py +++ b/authzed/api/v1/error_reason_pb2.py @@ -2,10 +2,10 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: authzed/api/v1/error_reason.proto """Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -13,14 +13,15 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!authzed/api/v1/error_reason.proto\x12\x0e\x61uthzed.api.v1*\x94\x06\n\x0b\x45rrorReason\x12\x1c\n\x18\x45RROR_REASON_UNSPECIFIED\x10\x00\x12#\n\x1f\x45RROR_REASON_SCHEMA_PARSE_ERROR\x10\x01\x12\"\n\x1e\x45RROR_REASON_SCHEMA_TYPE_ERROR\x10\x02\x12#\n\x1f\x45RROR_REASON_UNKNOWN_DEFINITION\x10\x03\x12/\n+ERROR_REASON_UNKNOWN_RELATION_OR_PERMISSION\x10\x04\x12,\n(ERROR_REASON_TOO_MANY_UPDATES_IN_REQUEST\x10\x05\x12\x32\n.ERROR_REASON_TOO_MANY_PRECONDITIONS_IN_REQUEST\x10\x06\x12\x35\n1ERROR_REASON_WRITE_OR_DELETE_PRECONDITION_FAILURE\x10\x07\x12\"\n\x1e\x45RROR_REASON_SERVICE_READ_ONLY\x10\x08\x12\x1f\n\x1b\x45RROR_REASON_UNKNOWN_CAVEAT\x10\t\x12%\n!ERROR_REASON_INVALID_SUBJECT_TYPE\x10\n\x12,\n(ERROR_REASON_CAVEAT_PARAMETER_TYPE_ERROR\x10\x0b\x12-\n)ERROR_REASON_UPDATES_ON_SAME_RELATIONSHIP\x10\x0c\x12)\n%ERROR_REASON_CANNOT_UPDATE_PERMISSION\x10\r\x12(\n$ERROR_REASON_CAVEAT_EVALUATION_ERROR\x10\x0e\x12\x1f\n\x1b\x45RROR_REASON_INVALID_CURSOR\x10\x0f\x12@\n^([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\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\"\xac\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\x31\n\x0eoptional_limit\x18\x03 \x01(\rB\n\xfa\x42\x07*\x05\x18\xe8\x07(\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\"\xcc\x01\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\"U\n\x1aWriteRelationshipsResponse\x12\x37\n\nwritten_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\twrittenAt\"\xdb\x02\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\x31\n\x0eoptional_limit\x18\x03 \x01(\rB\n\xfa\x42\x07*\x05\x18\xe8\x07(\x00R\roptionalLimit\x12G\n optional_allow_partial_deletions\x18\x04 \x01(\x08R\x1doptionalAllowPartialDeletions\"\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\"\xed\x02\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\"\xc8\x03\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\"\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\"\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\"\x93\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\x31\n\x0eoptional_limit\x18\x06 \x01(\rB\n\xfa\x42\x07*\x05\x18\xe8\x07(\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\"\x88\x04\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\"\xfe\x03\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\"\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*\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\x80\x08\n\x12PermissionsService\x12\x8d\x01\n\x11ReadRelationships\x12(.authzed.api.v1.ReadRelationshipsRequest\x1a).authzed.api.v1.ReadRelationshipsResponse\"!\x82\xd3\xe4\x93\x02\x1b:\x01*\"\x16/v1/relationships/read0\x01\x12\x8f\x01\n\x12WriteRelationships\x12).authzed.api.v1.WriteRelationshipsRequest\x1a*.authzed.api.v1.WriteRelationshipsResponse\"\"\x82\xd3\xe4\x93\x02\x1c:\x01*\"\x17/v1/relationships/write\x12\x93\x01\n\x13\x44\x65leteRelationships\x12*.authzed.api.v1.DeleteRelationshipsRequest\x1a+.authzed.api.v1.DeleteRelationshipsResponse\"#\x82\xd3\xe4\x93\x02\x1d:\x01*\"\x18/v1/relationships/delete\x12\x84\x01\n\x0f\x43heckPermission\x12&.authzed.api.v1.CheckPermissionRequest\x1a\'.authzed.api.v1.CheckPermissionResponse\" \x82\xd3\xe4\x93\x02\x1a:\x01*\"\x15/v1/permissions/check\x12\x94\x01\n\x14\x45xpandPermissionTree\x12+.authzed.api.v1.ExpandPermissionTreeRequest\x1a,.authzed.api.v1.ExpandPermissionTreeResponse\"!\x82\xd3\xe4\x93\x02\x1b:\x01*\"\x16/v1/permissions/expand\x12\x8a\x01\n\x0fLookupResources\x12&.authzed.api.v1.LookupResourcesRequest\x1a\'.authzed.api.v1.LookupResourcesResponse\"$\x82\xd3\xe4\x93\x02\x1e:\x01*\"\x19/v1/permissions/resources0\x01\x12\x86\x01\n\x0eLookupSubjects\x12%.authzed.api.v1.LookupSubjectsRequest\x1a&.authzed.api.v1.LookupSubjectsResponse\"#\x82\xd3\xe4\x93\x02\x1d:\x01*\"\x18/v1/permissions/subjects0\x01\x42H\n\x12\x63om.authzed.api.v1Z2github.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\x17validate/validate.proto\x1a\x19\x61uthzed/api/v1/core.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\"\x8c\x03\n\x12RelationshipFilter\x12m\n\rresource_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\x0cresourceType\x12W\n\x14optional_resource_id\x18\x02 \x01(\tB%\xfa\x42\"r (\x80\x08\x32\x1b^([a-zA-Z0-9/_|\\-=+]{1,})?$R\x12optionalResourceId\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\"\xac\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\x31\n\x0eoptional_limit\x18\x03 \x01(\rB\n\xfa\x42\x07*\x05\x18\xe8\x07(\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\"\xcc\x01\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\"U\n\x1aWriteRelationshipsResponse\x12\x37\n\nwritten_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\twrittenAt\"\xdb\x02\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\x31\n\x0eoptional_limit\x18\x03 \x01(\rB\n\xfa\x42\x07*\x05\x18\xe8\x07(\x00R\roptionalLimit\x12G\n optional_allow_partial_deletions\x18\x04 \x01(\x08R\x1doptionalAllowPartialDeletions\"\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\"\xed\x02\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\"\xc8\x03\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\"\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\"\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\"\x93\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\x31\n\x0eoptional_limit\x18\x06 \x01(\rB\n\xfa\x42\x07*\x05\x18\xe8\x07(\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\"\xed\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\x42\n\x17optional_concrete_limit\x18\x07 \x01(\rB\n\xfa\x42\x07*\x05\x18\xe8\x07(\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*\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\x80\x08\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\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\x42H\n\x12\x63om.authzed.api.v1Z2github.com/authzed/authzed-go/proto/authzed/api/v1b\x06proto3') -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'authzed.api.v1.permission_service_pb2', globals()) +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'authzed.api.v1.permission_service_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None @@ -107,6 +108,8 @@ _LOOKUPSUBJECTSREQUEST.fields_by_name['optional_subject_relation']._serialized_options = b'\372B\'r%(@2!^([a-z][a-z0-9_]{1,62}[a-z0-9])?$' _LOOKUPSUBJECTSREQUEST.fields_by_name['context']._options = None _LOOKUPSUBJECTSREQUEST.fields_by_name['context']._serialized_options = b'\372B\005\212\001\002\020\000' + _LOOKUPSUBJECTSREQUEST.fields_by_name['optional_concrete_limit']._options = None + _LOOKUPSUBJECTSREQUEST.fields_by_name['optional_concrete_limit']._serialized_options = b'\372B\007*\005\030\350\007(\000' _LOOKUPSUBJECTSRESPONSE.fields_by_name['subject_object_id']._options = None _LOOKUPSUBJECTSRESPONSE.fields_by_name['subject_object_id']._serialized_options = b'\030\001' _LOOKUPSUBJECTSRESPONSE.fields_by_name['excluded_subject_ids']._options = None @@ -120,67 +123,69 @@ _RESOLVEDSUBJECT.fields_by_name['partial_caveat_info']._options = None _RESOLVEDSUBJECT.fields_by_name['partial_caveat_info']._serialized_options = b'\372B\005\212\001\002\020\000' _PERMISSIONSSERVICE.methods_by_name['ReadRelationships']._options = None - _PERMISSIONSSERVICE.methods_by_name['ReadRelationships']._serialized_options = b'\202\323\344\223\002\033:\001*\"\026/v1/relationships/read' + _PERMISSIONSSERVICE.methods_by_name['ReadRelationships']._serialized_options = b'\202\323\344\223\002\033\"\026/v1/relationships/read:\001*' _PERMISSIONSSERVICE.methods_by_name['WriteRelationships']._options = None - _PERMISSIONSSERVICE.methods_by_name['WriteRelationships']._serialized_options = b'\202\323\344\223\002\034:\001*\"\027/v1/relationships/write' + _PERMISSIONSSERVICE.methods_by_name['WriteRelationships']._serialized_options = b'\202\323\344\223\002\034\"\027/v1/relationships/write:\001*' _PERMISSIONSSERVICE.methods_by_name['DeleteRelationships']._options = None - _PERMISSIONSSERVICE.methods_by_name['DeleteRelationships']._serialized_options = b'\202\323\344\223\002\035:\001*\"\030/v1/relationships/delete' + _PERMISSIONSSERVICE.methods_by_name['DeleteRelationships']._serialized_options = b'\202\323\344\223\002\035\"\030/v1/relationships/delete:\001*' _PERMISSIONSSERVICE.methods_by_name['CheckPermission']._options = None - _PERMISSIONSSERVICE.methods_by_name['CheckPermission']._serialized_options = b'\202\323\344\223\002\032:\001*\"\025/v1/permissions/check' + _PERMISSIONSSERVICE.methods_by_name['CheckPermission']._serialized_options = b'\202\323\344\223\002\032\"\025/v1/permissions/check:\001*' _PERMISSIONSSERVICE.methods_by_name['ExpandPermissionTree']._options = None - _PERMISSIONSSERVICE.methods_by_name['ExpandPermissionTree']._serialized_options = b'\202\323\344\223\002\033:\001*\"\026/v1/permissions/expand' + _PERMISSIONSSERVICE.methods_by_name['ExpandPermissionTree']._serialized_options = b'\202\323\344\223\002\033\"\026/v1/permissions/expand:\001*' _PERMISSIONSSERVICE.methods_by_name['LookupResources']._options = None - _PERMISSIONSSERVICE.methods_by_name['LookupResources']._serialized_options = b'\202\323\344\223\002\036:\001*\"\031/v1/permissions/resources' + _PERMISSIONSSERVICE.methods_by_name['LookupResources']._serialized_options = b'\202\323\344\223\002\036\"\031/v1/permissions/resources:\001*' _PERMISSIONSSERVICE.methods_by_name['LookupSubjects']._options = None - _PERMISSIONSSERVICE.methods_by_name['LookupSubjects']._serialized_options = b'\202\323\344\223\002\035:\001*\"\030/v1/permissions/subjects' - _LOOKUPPERMISSIONSHIP._serialized_start=6463 - _LOOKUPPERMISSIONSHIP._serialized_end=6616 - _CONSISTENCY._serialized_start=172 - _CONSISTENCY._serialized_end=456 - _RELATIONSHIPFILTER._serialized_start=459 - _RELATIONSHIPFILTER._serialized_end=855 - _SUBJECTFILTER._serialized_start=858 - _SUBJECTFILTER._serialized_end=1255 - _SUBJECTFILTER_RELATIONFILTER._serialized_start=1167 - _SUBJECTFILTER_RELATIONFILTER._serialized_end=1255 - _READRELATIONSHIPSREQUEST._serialized_start=1258 - _READRELATIONSHIPSREQUEST._serialized_end=1558 - _READRELATIONSHIPSRESPONSE._serialized_start=1561 - _READRELATIONSHIPSRESPONSE._serialized_end=1797 - _PRECONDITION._serialized_start=1800 - _PRECONDITION._serialized_end=2062 - _PRECONDITION_OPERATION._serialized_start=1968 - _PRECONDITION_OPERATION._serialized_end=2062 - _WRITERELATIONSHIPSREQUEST._serialized_start=2065 - _WRITERELATIONSHIPSREQUEST._serialized_end=2269 - _WRITERELATIONSHIPSRESPONSE._serialized_start=2271 - _WRITERELATIONSHIPSRESPONSE._serialized_end=2356 - _DELETERELATIONSHIPSREQUEST._serialized_start=2359 - _DELETERELATIONSHIPSREQUEST._serialized_end=2706 - _DELETERELATIONSHIPSRESPONSE._serialized_start=2709 - _DELETERELATIONSHIPSRESPONSE._serialized_end=3020 - _DELETERELATIONSHIPSRESPONSE_DELETIONPROGRESS._serialized_start=2904 - _DELETERELATIONSHIPSRESPONSE_DELETIONPROGRESS._serialized_end=3020 - _CHECKPERMISSIONREQUEST._serialized_start=3023 - _CHECKPERMISSIONREQUEST._serialized_end=3388 - _CHECKPERMISSIONRESPONSE._serialized_start=3391 - _CHECKPERMISSIONRESPONSE._serialized_end=3847 - _CHECKPERMISSIONRESPONSE_PERMISSIONSHIP._serialized_start=3687 - _CHECKPERMISSIONRESPONSE_PERMISSIONSHIP._serialized_end=3847 - _EXPANDPERMISSIONTREEREQUEST._serialized_start=3850 - _EXPANDPERMISSIONTREEREQUEST._serialized_end=4089 - _EXPANDPERMISSIONTREERESPONSE._serialized_start=4092 - _EXPANDPERMISSIONTREERESPONSE._serialized_end=4254 - _LOOKUPRESOURCESREQUEST._serialized_start=4257 - _LOOKUPRESOURCESREQUEST._serialized_end=4788 - _LOOKUPRESOURCESRESPONSE._serialized_start=4791 - _LOOKUPRESOURCESRESPONSE._serialized_end=5177 - _LOOKUPSUBJECTSREQUEST._serialized_start=5180 - _LOOKUPSUBJECTSREQUEST._serialized_end=5700 - _LOOKUPSUBJECTSRESPONSE._serialized_start=5703 - _LOOKUPSUBJECTSRESPONSE._serialized_end=6213 - _RESOLVEDSUBJECT._serialized_start=6216 - _RESOLVEDSUBJECT._serialized_end=6460 - _PERMISSIONSSERVICE._serialized_start=6619 - _PERMISSIONSSERVICE._serialized_end=7643 + _PERMISSIONSSERVICE.methods_by_name['LookupSubjects']._serialized_options = b'\202\323\344\223\002\035\"\030/v1/permissions/subjects:\001*' + _globals['_LOOKUPPERMISSIONSHIP']._serialized_start=6892 + _globals['_LOOKUPPERMISSIONSHIP']._serialized_end=7045 + _globals['_CONSISTENCY']._serialized_start=172 + _globals['_CONSISTENCY']._serialized_end=456 + _globals['_RELATIONSHIPFILTER']._serialized_start=459 + _globals['_RELATIONSHIPFILTER']._serialized_end=855 + _globals['_SUBJECTFILTER']._serialized_start=858 + _globals['_SUBJECTFILTER']._serialized_end=1255 + _globals['_SUBJECTFILTER_RELATIONFILTER']._serialized_start=1167 + _globals['_SUBJECTFILTER_RELATIONFILTER']._serialized_end=1255 + _globals['_READRELATIONSHIPSREQUEST']._serialized_start=1258 + _globals['_READRELATIONSHIPSREQUEST']._serialized_end=1558 + _globals['_READRELATIONSHIPSRESPONSE']._serialized_start=1561 + _globals['_READRELATIONSHIPSRESPONSE']._serialized_end=1797 + _globals['_PRECONDITION']._serialized_start=1800 + _globals['_PRECONDITION']._serialized_end=2062 + _globals['_PRECONDITION_OPERATION']._serialized_start=1968 + _globals['_PRECONDITION_OPERATION']._serialized_end=2062 + _globals['_WRITERELATIONSHIPSREQUEST']._serialized_start=2065 + _globals['_WRITERELATIONSHIPSREQUEST']._serialized_end=2269 + _globals['_WRITERELATIONSHIPSRESPONSE']._serialized_start=2271 + _globals['_WRITERELATIONSHIPSRESPONSE']._serialized_end=2356 + _globals['_DELETERELATIONSHIPSREQUEST']._serialized_start=2359 + _globals['_DELETERELATIONSHIPSREQUEST']._serialized_end=2706 + _globals['_DELETERELATIONSHIPSRESPONSE']._serialized_start=2709 + _globals['_DELETERELATIONSHIPSRESPONSE']._serialized_end=3020 + _globals['_DELETERELATIONSHIPSRESPONSE_DELETIONPROGRESS']._serialized_start=2904 + _globals['_DELETERELATIONSHIPSRESPONSE_DELETIONPROGRESS']._serialized_end=3020 + _globals['_CHECKPERMISSIONREQUEST']._serialized_start=3023 + _globals['_CHECKPERMISSIONREQUEST']._serialized_end=3388 + _globals['_CHECKPERMISSIONRESPONSE']._serialized_start=3391 + _globals['_CHECKPERMISSIONRESPONSE']._serialized_end=3847 + _globals['_CHECKPERMISSIONRESPONSE_PERMISSIONSHIP']._serialized_start=3687 + _globals['_CHECKPERMISSIONRESPONSE_PERMISSIONSHIP']._serialized_end=3847 + _globals['_EXPANDPERMISSIONTREEREQUEST']._serialized_start=3850 + _globals['_EXPANDPERMISSIONTREEREQUEST']._serialized_end=4089 + _globals['_EXPANDPERMISSIONTREERESPONSE']._serialized_start=4092 + _globals['_EXPANDPERMISSIONTREERESPONSE']._serialized_end=4254 + _globals['_LOOKUPRESOURCESREQUEST']._serialized_start=4257 + _globals['_LOOKUPRESOURCESREQUEST']._serialized_end=4788 + _globals['_LOOKUPRESOURCESRESPONSE']._serialized_start=4791 + _globals['_LOOKUPRESOURCESRESPONSE']._serialized_end=5177 + _globals['_LOOKUPSUBJECTSREQUEST']._serialized_start=5180 + _globals['_LOOKUPSUBJECTSREQUEST']._serialized_end=6057 + _globals['_LOOKUPSUBJECTSREQUEST_WILDCARDOPTION']._serialized_start=5930 + _globals['_LOOKUPSUBJECTSREQUEST_WILDCARDOPTION']._serialized_end=6057 + _globals['_LOOKUPSUBJECTSRESPONSE']._serialized_start=6060 + _globals['_LOOKUPSUBJECTSRESPONSE']._serialized_end=6642 + _globals['_RESOLVEDSUBJECT']._serialized_start=6645 + _globals['_RESOLVEDSUBJECT']._serialized_end=6889 + _globals['_PERMISSIONSSERVICE']._serialized_start=7048 + _globals['_PERMISSIONSSERVICE']._serialized_end=8072 # @@protoc_insertion_point(module_scope) diff --git a/authzed/api/v1/permission_service_pb2.pyi b/authzed/api/v1/permission_service_pb2.pyi index bad33a5..5e6ad12 100644 --- a/authzed/api/v1/permission_service_pb2.pyi +++ b/authzed/api/v1/permission_service_pb2.pyi @@ -675,12 +675,30 @@ class LookupSubjectsRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor + class _WildcardOption: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + + class _WildcardOptionEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[LookupSubjectsRequest._WildcardOption.ValueType], builtins.type): # noqa: F821 + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + WILDCARD_OPTION_UNSPECIFIED: LookupSubjectsRequest._WildcardOption.ValueType # 0 + WILDCARD_OPTION_INCLUDE_WILDCARDS: LookupSubjectsRequest._WildcardOption.ValueType # 1 + WILDCARD_OPTION_EXCLUDE_WILDCARDS: LookupSubjectsRequest._WildcardOption.ValueType # 2 + + class WildcardOption(_WildcardOption, metaclass=_WildcardOptionEnumTypeWrapper): ... + WILDCARD_OPTION_UNSPECIFIED: LookupSubjectsRequest.WildcardOption.ValueType # 0 + WILDCARD_OPTION_INCLUDE_WILDCARDS: LookupSubjectsRequest.WildcardOption.ValueType # 1 + WILDCARD_OPTION_EXCLUDE_WILDCARDS: LookupSubjectsRequest.WildcardOption.ValueType # 2 + CONSISTENCY_FIELD_NUMBER: builtins.int RESOURCE_FIELD_NUMBER: builtins.int PERMISSION_FIELD_NUMBER: builtins.int SUBJECT_OBJECT_TYPE_FIELD_NUMBER: builtins.int OPTIONAL_SUBJECT_RELATION_FIELD_NUMBER: builtins.int CONTEXT_FIELD_NUMBER: builtins.int + OPTIONAL_CONCRETE_LIMIT_FIELD_NUMBER: builtins.int + OPTIONAL_CURSOR_FIELD_NUMBER: builtins.int + WILDCARD_OPTION_FIELD_NUMBER: builtins.int @property def consistency(self) -> global___Consistency: ... @property @@ -701,6 +719,39 @@ class LookupSubjectsRequest(google.protobuf.message.Message): @property def context(self) -> google.protobuf.struct_pb2.Struct: """context consists of named values that are injected into the caveat evaluation context""" + optional_concrete_limit: builtins.int + """optional_concrete_limit, if non-zero, specifies the limit on the number of + *concrete* (non-wildcard) subjects to return before the stream is closed on the + server side. With the default value of zero, the stream will continue resolving + concrete subjects until exhausted or the stream is closed due to the client or + a network issue. + + NOTE: Wildcard subjects ("*") have special treatment when cursors and limits are used. Because + wildcards can apply to *any* concrete subjects, if a wildcard subject is found within the dataset, + a wildcard subject can be returned for *all* LookupSubjects calls, regardless of the cursor or + limit. + + For example, if wildcards are requested, a wildcard subject exists, there is a specified limit + of 10 concrete subjects, and at least 10 concrete subjects exist, the API will return 11 subjects + in total: the 10 concrete + the wildcard + + Furthermore, if a wildcard has a set of exclusions generated by the dataset, + the exclusions *will respect the cursor* and only a *partial* set of exclusions will be returned + for each invocation of the API. + + ***IT IS UP TO THE CALLER IN THIS CASE TO COMBINE THE EXCLUSIONS IF DESIRED*** + """ + @property + def optional_cursor(self) -> authzed.api.v1.core_pb2.Cursor: + """optional_cursor, if specified, indicates the cursor after which results should resume being returned. + The cursor can be found on the LookupSubjectsResponse object. + + NOTE: See above for notes about how cursors interact with wildcard subjects. + """ + wildcard_option: global___LookupSubjectsRequest.WildcardOption.ValueType + """wildcard_option specifies whether wildcards should be returned by LookupSubjects. + For backwards compatibility, defaults to WILDCARD_OPTION_INCLUDE_WILDCARDS if unspecified. + """ def __init__( self, *, @@ -710,9 +761,12 @@ class LookupSubjectsRequest(google.protobuf.message.Message): subject_object_type: builtins.str = ..., optional_subject_relation: builtins.str = ..., context: google.protobuf.struct_pb2.Struct | None = ..., + optional_concrete_limit: builtins.int = ..., + optional_cursor: authzed.api.v1.core_pb2.Cursor | None = ..., + wildcard_option: global___LookupSubjectsRequest.WildcardOption.ValueType = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["consistency", b"consistency", "context", b"context", "resource", b"resource"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["consistency", b"consistency", "context", b"context", "optional_subject_relation", b"optional_subject_relation", "permission", b"permission", "resource", b"resource", "subject_object_type", b"subject_object_type"]) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["consistency", b"consistency", "context", b"context", "optional_cursor", b"optional_cursor", "resource", b"resource"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["consistency", b"consistency", "context", b"context", "optional_concrete_limit", b"optional_concrete_limit", "optional_cursor", b"optional_cursor", "optional_subject_relation", b"optional_subject_relation", "permission", b"permission", "resource", b"resource", "subject_object_type", b"subject_object_type", "wildcard_option", b"wildcard_option"]) -> None: ... global___LookupSubjectsRequest = LookupSubjectsRequest @@ -730,6 +784,7 @@ class LookupSubjectsResponse(google.protobuf.message.Message): PARTIAL_CAVEAT_INFO_FIELD_NUMBER: builtins.int SUBJECT_FIELD_NUMBER: builtins.int EXCLUDED_SUBJECTS_FIELD_NUMBER: builtins.int + AFTER_RESULT_CURSOR_FIELD_NUMBER: builtins.int @property def looked_up_at(self) -> authzed.api.v1.core_pb2.ZedToken: ... subject_object_id: builtins.str @@ -762,6 +817,11 @@ class LookupSubjectsResponse(google.protobuf.message.Message): will only contain subjects if `subject.subject_object_id` is a wildcard (`*`) and will only be populated if exclusions exist from the wildcard. """ + @property + def after_result_cursor(self) -> authzed.api.v1.core_pb2.Cursor: + """after_result_cursor holds a cursor that can be used to resume the LookupSubjects stream after this + result. + """ def __init__( self, *, @@ -772,9 +832,10 @@ class LookupSubjectsResponse(google.protobuf.message.Message): partial_caveat_info: authzed.api.v1.core_pb2.PartialCaveatInfo | None = ..., subject: global___ResolvedSubject | None = ..., excluded_subjects: collections.abc.Iterable[global___ResolvedSubject] | None = ..., + after_result_cursor: authzed.api.v1.core_pb2.Cursor | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["looked_up_at", b"looked_up_at", "partial_caveat_info", b"partial_caveat_info", "subject", b"subject"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["excluded_subject_ids", b"excluded_subject_ids", "excluded_subjects", b"excluded_subjects", "looked_up_at", b"looked_up_at", "partial_caveat_info", b"partial_caveat_info", "permissionship", b"permissionship", "subject", b"subject", "subject_object_id", b"subject_object_id"]) -> None: ... + def HasField(self, field_name: typing_extensions.Literal["after_result_cursor", b"after_result_cursor", "looked_up_at", b"looked_up_at", "partial_caveat_info", b"partial_caveat_info", "subject", b"subject"]) -> builtins.bool: ... + def ClearField(self, field_name: typing_extensions.Literal["after_result_cursor", b"after_result_cursor", "excluded_subject_ids", b"excluded_subject_ids", "excluded_subjects", b"excluded_subjects", "looked_up_at", b"looked_up_at", "partial_caveat_info", b"partial_caveat_info", "permissionship", b"permissionship", "subject", b"subject", "subject_object_id", b"subject_object_id"]) -> None: ... global___LookupSubjectsResponse = LookupSubjectsResponse diff --git a/authzed/api/v1/schema_service_pb2.py b/authzed/api/v1/schema_service_pb2.py index 63c3a31..83bc1b9 100644 --- a/authzed/api/v1/schema_service_pb2.py +++ b/authzed/api/v1/schema_service_pb2.py @@ -2,10 +2,10 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: authzed/api/v1/schema_service.proto """Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -16,10 +16,11 @@ from authzed.api.v1 import core_pb2 as authzed_dot_api_dot_v1_dot_core__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#authzed/api/v1/schema_service.proto\x12\x0e\x61uthzed.api.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17validate/validate.proto\x1a\x19\x61uthzed/api/v1/core.proto\"\x13\n\x11ReadSchemaRequest\"r\n\x12ReadSchemaResponse\x12\x1f\n\x0bschema_text\x18\x01 \x01(\tR\nschemaText\x12;\n\x07read_at\x18\x02 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x06readAt\"7\n\x12WriteSchemaRequest\x12!\n\x06schema\x18\x01 \x01(\tB\t\xfa\x42\x06r\x04(\x80\x80\x10R\x06schema\"X\n\x13WriteSchemaResponse\x12\x41\n\nwritten_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\twrittenAt2\xf5\x01\n\rSchemaService\x12o\n\nReadSchema\x12!.authzed.api.v1.ReadSchemaRequest\x1a\".authzed.api.v1.ReadSchemaResponse\"\x1a\x82\xd3\xe4\x93\x02\x14:\x01*\"\x0f/v1/schema/read\x12s\n\x0bWriteSchema\x12\".authzed.api.v1.WriteSchemaRequest\x1a#.authzed.api.v1.WriteSchemaResponse\"\x1b\x82\xd3\xe4\x93\x02\x15:\x01*\"\x10/v1/schema/writeBH\n\x12\x63om.authzed.api.v1Z2github.com/authzed/authzed-go/proto/authzed/api/v1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#authzed/api/v1/schema_service.proto\x12\x0e\x61uthzed.api.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17validate/validate.proto\x1a\x19\x61uthzed/api/v1/core.proto\"\x13\n\x11ReadSchemaRequest\"r\n\x12ReadSchemaResponse\x12\x1f\n\x0bschema_text\x18\x01 \x01(\tR\nschemaText\x12;\n\x07read_at\x18\x02 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x06readAt\"7\n\x12WriteSchemaRequest\x12!\n\x06schema\x18\x01 \x01(\tB\t\xfa\x42\x06r\x04(\x80\x80\x10R\x06schema\"X\n\x13WriteSchemaResponse\x12\x41\n\nwritten_at\x18\x01 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\twrittenAt2\xf5\x01\n\rSchemaService\x12o\n\nReadSchema\x12!.authzed.api.v1.ReadSchemaRequest\x1a\".authzed.api.v1.ReadSchemaResponse\"\x1a\x82\xd3\xe4\x93\x02\x14\"\x0f/v1/schema/read:\x01*\x12s\n\x0bWriteSchema\x12\".authzed.api.v1.WriteSchemaRequest\x1a#.authzed.api.v1.WriteSchemaResponse\"\x1b\x82\xd3\xe4\x93\x02\x15\"\x10/v1/schema/write:\x01*BH\n\x12\x63om.authzed.api.v1Z2github.com/authzed/authzed-go/proto/authzed/api/v1b\x06proto3') -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'authzed.api.v1.schema_service_pb2', globals()) +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'authzed.api.v1.schema_service_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None @@ -31,17 +32,17 @@ _WRITESCHEMARESPONSE.fields_by_name['written_at']._options = None _WRITESCHEMARESPONSE.fields_by_name['written_at']._serialized_options = b'\372B\005\212\001\002\020\001' _SCHEMASERVICE.methods_by_name['ReadSchema']._options = None - _SCHEMASERVICE.methods_by_name['ReadSchema']._serialized_options = b'\202\323\344\223\002\024:\001*\"\017/v1/schema/read' + _SCHEMASERVICE.methods_by_name['ReadSchema']._serialized_options = b'\202\323\344\223\002\024\"\017/v1/schema/read:\001*' _SCHEMASERVICE.methods_by_name['WriteSchema']._options = None - _SCHEMASERVICE.methods_by_name['WriteSchema']._serialized_options = b'\202\323\344\223\002\025:\001*\"\020/v1/schema/write' - _READSCHEMAREQUEST._serialized_start=137 - _READSCHEMAREQUEST._serialized_end=156 - _READSCHEMARESPONSE._serialized_start=158 - _READSCHEMARESPONSE._serialized_end=272 - _WRITESCHEMAREQUEST._serialized_start=274 - _WRITESCHEMAREQUEST._serialized_end=329 - _WRITESCHEMARESPONSE._serialized_start=331 - _WRITESCHEMARESPONSE._serialized_end=419 - _SCHEMASERVICE._serialized_start=422 - _SCHEMASERVICE._serialized_end=667 + _SCHEMASERVICE.methods_by_name['WriteSchema']._serialized_options = b'\202\323\344\223\002\025\"\020/v1/schema/write:\001*' + _globals['_READSCHEMAREQUEST']._serialized_start=137 + _globals['_READSCHEMAREQUEST']._serialized_end=156 + _globals['_READSCHEMARESPONSE']._serialized_start=158 + _globals['_READSCHEMARESPONSE']._serialized_end=272 + _globals['_WRITESCHEMAREQUEST']._serialized_start=274 + _globals['_WRITESCHEMAREQUEST']._serialized_end=329 + _globals['_WRITESCHEMARESPONSE']._serialized_start=331 + _globals['_WRITESCHEMARESPONSE']._serialized_end=419 + _globals['_SCHEMASERVICE']._serialized_start=422 + _globals['_SCHEMASERVICE']._serialized_end=667 # @@protoc_insertion_point(module_scope) diff --git a/authzed/api/v1/watch_service_pb2.py b/authzed/api/v1/watch_service_pb2.py index f27afea..0f9493b 100644 --- a/authzed/api/v1/watch_service_pb2.py +++ b/authzed/api/v1/watch_service_pb2.py @@ -2,10 +2,10 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: authzed/api/v1/watch_service.proto """Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -16,10 +16,11 @@ from authzed.api.v1 import core_pb2 as authzed_dot_api_dot_v1_dot_core__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"authzed/api/v1/watch_service.proto\x12\x0e\x61uthzed.api.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17validate/validate.proto\x1a\x19\x61uthzed/api/v1/core.proto\"\xe2\x01\n\x0cWatchRequest\x12\x83\x01\n\x15optional_object_types\x18\x01 \x03(\tBO\xfa\x42L\x92\x01I\x08\x00\"ErC(\x80\x01\x32>^([a-z][a-z0-9_]{1,62}[a-z0-9]/)?[a-z][a-z0-9_]{1,62}[a-z0-9]$R\x13optionalObjectTypes\x12L\n\x15optional_start_cursor\x18\x02 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\x13optionalStartCursor\"\x90\x01\n\rWatchResponse\x12<\n\x07updates\x18\x01 \x03(\x0b\x32\".authzed.api.v1.RelationshipUpdateR\x07updates\x12\x41\n\x0f\x63hanges_through\x18\x02 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\x0e\x63hangesThrough2l\n\x0cWatchService\x12\\\n\x05Watch\x12\x1c.authzed.api.v1.WatchRequest\x1a\x1d.authzed.api.v1.WatchResponse\"\x14\x82\xd3\xe4\x93\x02\x0e:\x01*\"\t/v1/watch0\x01\x42H\n\x12\x63om.authzed.api.v1Z2github.com/authzed/authzed-go/proto/authzed/api/v1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"authzed/api/v1/watch_service.proto\x12\x0e\x61uthzed.api.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17validate/validate.proto\x1a\x19\x61uthzed/api/v1/core.proto\"\xe2\x01\n\x0cWatchRequest\x12\x83\x01\n\x15optional_object_types\x18\x01 \x03(\tBO\xfa\x42L\x92\x01I\x08\x00\"ErC(\x80\x01\x32>^([a-z][a-z0-9_]{1,62}[a-z0-9]/)?[a-z][a-z0-9_]{1,62}[a-z0-9]$R\x13optionalObjectTypes\x12L\n\x15optional_start_cursor\x18\x02 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\x13optionalStartCursor\"\x90\x01\n\rWatchResponse\x12<\n\x07updates\x18\x01 \x03(\x0b\x32\".authzed.api.v1.RelationshipUpdateR\x07updates\x12\x41\n\x0f\x63hanges_through\x18\x02 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\x0e\x63hangesThrough2l\n\x0cWatchService\x12\\\n\x05Watch\x12\x1c.authzed.api.v1.WatchRequest\x1a\x1d.authzed.api.v1.WatchResponse\"\x14\x82\xd3\xe4\x93\x02\x0e\"\t/v1/watch:\x01*0\x01\x42H\n\x12\x63om.authzed.api.v1Z2github.com/authzed/authzed-go/proto/authzed/api/v1b\x06proto3') -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'authzed.api.v1.watch_service_pb2', globals()) +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'authzed.api.v1.watch_service_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None @@ -27,11 +28,11 @@ _WATCHREQUEST.fields_by_name['optional_object_types']._options = None _WATCHREQUEST.fields_by_name['optional_object_types']._serialized_options = b'\372BL\222\001I\010\000\"ErC(\200\0012>^([a-z][a-z0-9_]{1,62}[a-z0-9]/)?[a-z][a-z0-9_]{1,62}[a-z0-9]$' _WATCHSERVICE.methods_by_name['Watch']._options = None - _WATCHSERVICE.methods_by_name['Watch']._serialized_options = b'\202\323\344\223\002\016:\001*\"\t/v1/watch' - _WATCHREQUEST._serialized_start=137 - _WATCHREQUEST._serialized_end=363 - _WATCHRESPONSE._serialized_start=366 - _WATCHRESPONSE._serialized_end=510 - _WATCHSERVICE._serialized_start=512 - _WATCHSERVICE._serialized_end=620 + _WATCHSERVICE.methods_by_name['Watch']._serialized_options = b'\202\323\344\223\002\016\"\t/v1/watch:\001*' + _globals['_WATCHREQUEST']._serialized_start=137 + _globals['_WATCHREQUEST']._serialized_end=363 + _globals['_WATCHRESPONSE']._serialized_start=366 + _globals['_WATCHRESPONSE']._serialized_end=510 + _globals['_WATCHSERVICE']._serialized_start=512 + _globals['_WATCHSERVICE']._serialized_end=620 # @@protoc_insertion_point(module_scope) diff --git a/authzed/api/v1alpha1/schema_pb2.py b/authzed/api/v1alpha1/schema_pb2.py index dd3964c..6aeafc4 100644 --- a/authzed/api/v1alpha1/schema_pb2.py +++ b/authzed/api/v1alpha1/schema_pb2.py @@ -2,10 +2,10 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: authzed/api/v1alpha1/schema.proto """Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -16,8 +16,9 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!authzed/api/v1alpha1/schema.proto\x12\x14\x61uthzed.api.v1alpha1\x1a\x17validate/validate.proto\"\x9d\x01\n\x11ReadSchemaRequest\x12\x87\x01\n\x18object_definitions_names\x18\x01 \x03(\tBM\xfa\x42J\x92\x01G\"ErC(\x80\x01\x32>^([a-z][a-z0-9_]{1,62}[a-z0-9]/)?[a-z][a-z0-9_]{1,62}[a-z0-9]$R\x16objectDefinitionsNames\"\x87\x01\n\x12ReadSchemaResponse\x12-\n\x12object_definitions\x18\x01 \x03(\tR\x11objectDefinitions\x12\x42\n\x1d\x63omputed_definitions_revision\x18\x02 \x01(\tR\x1b\x63omputedDefinitionsRevision\"\x94\x01\n\x12WriteSchemaRequest\x12!\n\x06schema\x18\x01 \x01(\tB\t\xfa\x42\x06r\x04(\x80\x80\x10R\x06schema\x12[\n*optional_definitions_revision_precondition\x18\x02 \x01(\tR\'optionalDefinitionsRevisionPrecondition\"\x93\x01\n\x13WriteSchemaResponse\x12\x38\n\x18object_definitions_names\x18\x01 \x03(\tR\x16objectDefinitionsNames\x12\x42\n\x1d\x63omputed_definitions_revision\x18\x02 \x01(\tR\x1b\x63omputedDefinitionsRevision2\xd8\x01\n\rSchemaService\x12\x61\n\nReadSchema\x12\'.authzed.api.v1alpha1.ReadSchemaRequest\x1a(.authzed.api.v1alpha1.ReadSchemaResponse\"\x00\x12\x64\n\x0bWriteSchema\x12(.authzed.api.v1alpha1.WriteSchemaRequest\x1a).authzed.api.v1alpha1.WriteSchemaResponse\"\x00\x42T\n\x18\x63om.authzed.api.v1alpha1Z8github.com/authzed/authzed-go/proto/authzed/api/v1alpha1b\x06proto3') -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'authzed.api.v1alpha1.schema_pb2', globals()) +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'authzed.api.v1alpha1.schema_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None @@ -26,14 +27,14 @@ _READSCHEMAREQUEST.fields_by_name['object_definitions_names']._serialized_options = b'\372BJ\222\001G\"ErC(\200\0012>^([a-z][a-z0-9_]{1,62}[a-z0-9]/)?[a-z][a-z0-9_]{1,62}[a-z0-9]$' _WRITESCHEMAREQUEST.fields_by_name['schema']._options = None _WRITESCHEMAREQUEST.fields_by_name['schema']._serialized_options = b'\372B\006r\004(\200\200\020' - _READSCHEMAREQUEST._serialized_start=85 - _READSCHEMAREQUEST._serialized_end=242 - _READSCHEMARESPONSE._serialized_start=245 - _READSCHEMARESPONSE._serialized_end=380 - _WRITESCHEMAREQUEST._serialized_start=383 - _WRITESCHEMAREQUEST._serialized_end=531 - _WRITESCHEMARESPONSE._serialized_start=534 - _WRITESCHEMARESPONSE._serialized_end=681 - _SCHEMASERVICE._serialized_start=684 - _SCHEMASERVICE._serialized_end=900 + _globals['_READSCHEMAREQUEST']._serialized_start=85 + _globals['_READSCHEMAREQUEST']._serialized_end=242 + _globals['_READSCHEMARESPONSE']._serialized_start=245 + _globals['_READSCHEMARESPONSE']._serialized_end=380 + _globals['_WRITESCHEMAREQUEST']._serialized_start=383 + _globals['_WRITESCHEMAREQUEST']._serialized_end=531 + _globals['_WRITESCHEMARESPONSE']._serialized_start=534 + _globals['_WRITESCHEMARESPONSE']._serialized_end=681 + _globals['_SCHEMASERVICE']._serialized_start=684 + _globals['_SCHEMASERVICE']._serialized_end=900 # @@protoc_insertion_point(module_scope) diff --git a/authzed/api/v1alpha1/watchresources_service_pb2.py b/authzed/api/v1alpha1/watchresources_service_pb2.py index 2d6bd14..aa3430f 100644 --- a/authzed/api/v1alpha1/watchresources_service_pb2.py +++ b/authzed/api/v1alpha1/watchresources_service_pb2.py @@ -2,10 +2,10 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: authzed/api/v1alpha1/watchresources_service.proto """Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() @@ -16,10 +16,11 @@ from authzed.api.v1 import core_pb2 as authzed_dot_api_dot_v1_dot_core__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n1authzed/api/v1alpha1/watchresources_service.proto\x12\x14\x61uthzed.api.v1alpha1\x1a\x1cgoogle/api/annotations.proto\x1a\x17validate/validate.proto\x1a\x19\x61uthzed/api/v1/core.proto\"\x96\x03\n\x15WatchResourcesRequest\x12z\n\x14resource_object_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\x12resourceObjectType\x12G\n\npermission\x18\x02 \x01(\tB\'\xfa\x42$r\"(@2\x1e^[a-z][a-z0-9_]{1,62}[a-z0-9]$R\npermission\x12.\n\x13subject_object_type\x18\x03 \x01(\tR\x11subjectObjectType\x12:\n\x19optional_subject_relation\x18\x04 \x01(\tR\x17optionalSubjectRelation\x12L\n\x15optional_start_cursor\x18\x05 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\x13optionalStartCursor\"\x84\x03\n\x10PermissionUpdate\x12:\n\x07subject\x18\x01 \x01(\x0b\x32 .authzed.api.v1.SubjectReferenceR\x07subject\x12;\n\x08resource\x18\x02 \x01(\x0b\x32\x1f.authzed.api.v1.ObjectReferenceR\x08resource\x12\x1a\n\x08relation\x18\x03 \x01(\tR\x08relation\x12\x64\n\x12updated_permission\x18\x04 \x01(\x0e\x32\x35.authzed.api.v1alpha1.PermissionUpdate.PermissionshipR\x11updatedPermission\"u\n\x0ePermissionship\x12\x1e\n\x1aPERMISSIONSHIP_UNSPECIFIED\x10\x00\x12 \n\x1cPERMISSIONSHIP_NO_PERMISSION\x10\x01\x12!\n\x1dPERMISSIONSHIP_HAS_PERMISSION\x10\x02\"\x9d\x01\n\x16WatchResourcesResponse\x12@\n\x07updates\x18\x01 \x03(\x0b\x32&.authzed.api.v1alpha1.PermissionUpdateR\x07updates\x12\x41\n\x0f\x63hanges_through\x18\x02 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\x0e\x63hangesThrough2\xa9\x01\n\x15WatchResourcesService\x12\x8f\x01\n\x0eWatchResources\x12+.authzed.api.v1alpha1.WatchResourcesRequest\x1a,.authzed.api.v1alpha1.WatchResourcesResponse\" \x82\xd3\xe4\x93\x02\x1a:\x01*\"\x15/v1alpha1/lookupwatch0\x01\x42T\n\x18\x63om.authzed.api.v1alpha1Z8github.com/authzed/authzed-go/proto/authzed/api/v1alpha1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n1authzed/api/v1alpha1/watchresources_service.proto\x12\x14\x61uthzed.api.v1alpha1\x1a\x1cgoogle/api/annotations.proto\x1a\x17validate/validate.proto\x1a\x19\x61uthzed/api/v1/core.proto\"\x96\x03\n\x15WatchResourcesRequest\x12z\n\x14resource_object_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\x12resourceObjectType\x12G\n\npermission\x18\x02 \x01(\tB\'\xfa\x42$r\"(@2\x1e^[a-z][a-z0-9_]{1,62}[a-z0-9]$R\npermission\x12.\n\x13subject_object_type\x18\x03 \x01(\tR\x11subjectObjectType\x12:\n\x19optional_subject_relation\x18\x04 \x01(\tR\x17optionalSubjectRelation\x12L\n\x15optional_start_cursor\x18\x05 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\x13optionalStartCursor\"\x84\x03\n\x10PermissionUpdate\x12:\n\x07subject\x18\x01 \x01(\x0b\x32 .authzed.api.v1.SubjectReferenceR\x07subject\x12;\n\x08resource\x18\x02 \x01(\x0b\x32\x1f.authzed.api.v1.ObjectReferenceR\x08resource\x12\x1a\n\x08relation\x18\x03 \x01(\tR\x08relation\x12\x64\n\x12updated_permission\x18\x04 \x01(\x0e\x32\x35.authzed.api.v1alpha1.PermissionUpdate.PermissionshipR\x11updatedPermission\"u\n\x0ePermissionship\x12\x1e\n\x1aPERMISSIONSHIP_UNSPECIFIED\x10\x00\x12 \n\x1cPERMISSIONSHIP_NO_PERMISSION\x10\x01\x12!\n\x1dPERMISSIONSHIP_HAS_PERMISSION\x10\x02\"\x9d\x01\n\x16WatchResourcesResponse\x12@\n\x07updates\x18\x01 \x03(\x0b\x32&.authzed.api.v1alpha1.PermissionUpdateR\x07updates\x12\x41\n\x0f\x63hanges_through\x18\x02 \x01(\x0b\x32\x18.authzed.api.v1.ZedTokenR\x0e\x63hangesThrough2\xa9\x01\n\x15WatchResourcesService\x12\x8f\x01\n\x0eWatchResources\x12+.authzed.api.v1alpha1.WatchResourcesRequest\x1a,.authzed.api.v1alpha1.WatchResourcesResponse\" \x82\xd3\xe4\x93\x02\x1a\"\x15/v1alpha1/lookupwatch:\x01*0\x01\x42T\n\x18\x63om.authzed.api.v1alpha1Z8github.com/authzed/authzed-go/proto/authzed/api/v1alpha1b\x06proto3') -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'authzed.api.v1alpha1.watchresources_service_pb2', globals()) +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'authzed.api.v1alpha1.watchresources_service_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None @@ -29,15 +30,15 @@ _WATCHRESOURCESREQUEST.fields_by_name['permission']._options = None _WATCHRESOURCESREQUEST.fields_by_name['permission']._serialized_options = b'\372B$r\"(@2\036^[a-z][a-z0-9_]{1,62}[a-z0-9]$' _WATCHRESOURCESSERVICE.methods_by_name['WatchResources']._options = None - _WATCHRESOURCESSERVICE.methods_by_name['WatchResources']._serialized_options = b'\202\323\344\223\002\032:\001*\"\025/v1alpha1/lookupwatch' - _WATCHRESOURCESREQUEST._serialized_start=158 - _WATCHRESOURCESREQUEST._serialized_end=564 - _PERMISSIONUPDATE._serialized_start=567 - _PERMISSIONUPDATE._serialized_end=955 - _PERMISSIONUPDATE_PERMISSIONSHIP._serialized_start=838 - _PERMISSIONUPDATE_PERMISSIONSHIP._serialized_end=955 - _WATCHRESOURCESRESPONSE._serialized_start=958 - _WATCHRESOURCESRESPONSE._serialized_end=1115 - _WATCHRESOURCESSERVICE._serialized_start=1118 - _WATCHRESOURCESSERVICE._serialized_end=1287 + _WATCHRESOURCESSERVICE.methods_by_name['WatchResources']._serialized_options = b'\202\323\344\223\002\032\"\025/v1alpha1/lookupwatch:\001*' + _globals['_WATCHRESOURCESREQUEST']._serialized_start=158 + _globals['_WATCHRESOURCESREQUEST']._serialized_end=564 + _globals['_PERMISSIONUPDATE']._serialized_start=567 + _globals['_PERMISSIONUPDATE']._serialized_end=955 + _globals['_PERMISSIONUPDATE_PERMISSIONSHIP']._serialized_start=838 + _globals['_PERMISSIONUPDATE_PERMISSIONSHIP']._serialized_end=955 + _globals['_WATCHRESOURCESRESPONSE']._serialized_start=958 + _globals['_WATCHRESOURCESRESPONSE']._serialized_end=1115 + _globals['_WATCHRESOURCESSERVICE']._serialized_start=1118 + _globals['_WATCHRESOURCESSERVICE']._serialized_end=1287 # @@protoc_insertion_point(module_scope) diff --git a/buf.gen.yaml b/buf.gen.yaml index e43850c..a77a6db 100755 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -1,4 +1,4 @@ -#!/usr/bin/env -S buf generate --verbose --debug buf.build/authzed/api:1753b1837478b33074fe3a9c62f6fd8eda048ee4 --template +#!/usr/bin/env -S buf generate --verbose --debug buf.build/authzed/api:v1.22.2 --template --- version: "v1" plugins: diff --git a/pyproject.toml b/pyproject.toml index 2418d1c..2775137 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ packages = [ {include = "grpcutil"}, ] readme = "README.md" -version = "0.10.0" +version = "0.11.0" [tool.poetry.dependencies] async_generator = "^1.10"