|
1 |
| -from authzed.api.v1.schema_service_pb2_grpc import SchemaServiceStub, SchemaServiceAsyncStub |
| 1 | +from typing import Any, Optional, Sequence, Tuple |
| 2 | + |
| 3 | +import grpc |
| 4 | + |
| 5 | +from authzed.api.v1.core_pb2 import ( |
| 6 | + AlgebraicSubjectSet, |
| 7 | + ContextualizedCaveat, |
| 8 | + DirectSubjectSet, |
| 9 | + ObjectReference, |
| 10 | + PermissionRelationshipTree, |
| 11 | + Relationship, |
| 12 | + RelationshipUpdate, |
| 13 | + SubjectReference, |
| 14 | + ZedToken, |
| 15 | +) |
| 16 | +from authzed.api.v1.error_reason_pb2 import ErrorReason |
| 17 | +from authzed.api.v1.experimental_service_pb2 import ( |
| 18 | + BulkCheckPermissionPair, |
| 19 | + BulkCheckPermissionRequest, |
| 20 | + BulkCheckPermissionRequestItem, |
| 21 | + BulkCheckPermissionResponse, |
| 22 | + BulkCheckPermissionResponseItem, |
| 23 | + BulkExportRelationshipsRequest, |
| 24 | + BulkExportRelationshipsResponse, |
| 25 | + BulkImportRelationshipsRequest, |
| 26 | + BulkImportRelationshipsResponse, |
| 27 | +) |
2 | 28 | from authzed.api.v1.experimental_service_pb2_grpc import (
|
3 |
| - ExperimentalServiceStub, |
4 | 29 | ExperimentalServiceAsyncStub,
|
| 30 | + ExperimentalServiceStub, |
| 31 | +) |
| 32 | +from authzed.api.v1.permission_service_pb2 import ( |
| 33 | + CheckBulkPermissionsPair, |
| 34 | + CheckBulkPermissionsRequest, |
| 35 | + CheckBulkPermissionsRequestItem, |
| 36 | + CheckBulkPermissionsResponse, |
| 37 | + CheckBulkPermissionsResponseItem, |
| 38 | + CheckPermissionRequest, |
| 39 | + CheckPermissionResponse, |
| 40 | + Consistency, |
| 41 | + DeleteRelationshipsRequest, |
| 42 | + DeleteRelationshipsResponse, |
| 43 | + ExpandPermissionTreeRequest, |
| 44 | + ExpandPermissionTreeResponse, |
| 45 | + LookupResourcesRequest, |
| 46 | + LookupResourcesResponse, |
| 47 | + LookupSubjectsRequest, |
| 48 | + LookupSubjectsResponse, |
| 49 | + Precondition, |
| 50 | + ReadRelationshipsRequest, |
| 51 | + ReadRelationshipsResponse, |
| 52 | + RelationshipFilter, |
| 53 | + SubjectFilter, |
| 54 | + WriteRelationshipsRequest, |
| 55 | + WriteRelationshipsResponse, |
5 | 56 | )
|
6 | 57 | from authzed.api.v1.permission_service_pb2_grpc import (
|
7 |
| - PermissionsServiceStub, |
8 | 58 | PermissionsServiceAsyncStub,
|
| 59 | + PermissionsServiceStub, |
9 | 60 | )
|
10 |
| -from authzed.api.v1.watch_service_pb2_grpc import WatchServiceStub, WatchServiceAsyncStub |
11 |
| -import grpc |
12 |
| -from typing import Optional, Sequence, Tuple, Any |
| 61 | +from authzed.api.v1.schema_service_pb2 import ( |
| 62 | + ReadSchemaRequest, |
| 63 | + ReadSchemaResponse, |
| 64 | + WriteSchemaRequest, |
| 65 | + WriteSchemaResponse, |
| 66 | +) |
| 67 | +from authzed.api.v1.schema_service_pb2_grpc import SchemaServiceAsyncStub, SchemaServiceStub |
| 68 | +from authzed.api.v1.watch_service_pb2 import WatchRequest, WatchResponse |
| 69 | +from authzed.api.v1.watch_service_pb2_grpc import WatchServiceAsyncStub, WatchServiceStub |
13 | 70 |
|
14 | 71 | class Client(SchemaServiceStub, PermissionsServiceStub, ExperimentalServiceStub, WatchServiceStub):
|
15 | 72 | """The Client is typed as a synchronous client (though in practice it works with both sync and async code).
|
@@ -48,3 +105,61 @@ class AsyncClient(
|
48 | 105 | options: Optional[Sequence[Tuple[str, Any]]] = None,
|
49 | 106 | compression: Optional[grpc.Compression] = None,
|
50 | 107 | ) -> None: ...
|
| 108 | + |
| 109 | +__all__ = [ |
| 110 | + "Client", |
| 111 | + # Core |
| 112 | + "AlgebraicSubjectSet", |
| 113 | + "ContextualizedCaveat", |
| 114 | + "DirectSubjectSet", |
| 115 | + "ObjectReference", |
| 116 | + "PermissionRelationshipTree", |
| 117 | + "Relationship", |
| 118 | + "RelationshipUpdate", |
| 119 | + "SubjectReference", |
| 120 | + "ZedToken", |
| 121 | + # Error Reason |
| 122 | + "ErrorReason", |
| 123 | + # Permission Service |
| 124 | + "CheckBulkPermissionsPair", |
| 125 | + "CheckBulkPermissionsRequest", |
| 126 | + "CheckBulkPermissionsRequestItem", |
| 127 | + "CheckBulkPermissionsResponse", |
| 128 | + "CheckBulkPermissionsResponseItem", |
| 129 | + "CheckPermissionRequest", |
| 130 | + "CheckPermissionResponse", |
| 131 | + "Consistency", |
| 132 | + "DeleteRelationshipsRequest", |
| 133 | + "DeleteRelationshipsResponse", |
| 134 | + "ExpandPermissionTreeRequest", |
| 135 | + "ExpandPermissionTreeResponse", |
| 136 | + "LookupResourcesRequest", |
| 137 | + "LookupResourcesResponse", |
| 138 | + "LookupSubjectsRequest", |
| 139 | + "LookupSubjectsResponse", |
| 140 | + "Precondition", |
| 141 | + "ReadRelationshipsRequest", |
| 142 | + "ReadRelationshipsResponse", |
| 143 | + "RelationshipFilter", |
| 144 | + "SubjectFilter", |
| 145 | + "WriteRelationshipsRequest", |
| 146 | + "WriteRelationshipsResponse", |
| 147 | + # Schema Service |
| 148 | + "ReadSchemaRequest", |
| 149 | + "ReadSchemaResponse", |
| 150 | + "WriteSchemaRequest", |
| 151 | + "WriteSchemaResponse", |
| 152 | + # Watch Service |
| 153 | + "WatchRequest", |
| 154 | + "WatchResponse", |
| 155 | + # Experimental Service |
| 156 | + "BulkCheckPermissionRequest", |
| 157 | + "BulkCheckPermissionResponse", |
| 158 | + "BulkCheckPermissionPair", |
| 159 | + "BulkCheckPermissionRequestItem", |
| 160 | + "BulkCheckPermissionResponseItem", |
| 161 | + "BulkImportRelationshipsRequest", |
| 162 | + "BulkImportRelationshipsResponse", |
| 163 | + "BulkExportRelationshipsRequest", |
| 164 | + "BulkExportRelationshipsResponse", |
| 165 | +] |
0 commit comments