Skip to content

Commit 5c75175

Browse files
authored
Merge pull request #170 from mateenkasim/improve-pyi
Include re-exports in pyi file
2 parents e63d4a7 + 8328be3 commit 5c75175

File tree

1 file changed

+121
-6
lines changed

1 file changed

+121
-6
lines changed

authzed/api/v1/__init__.pyi

+121-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,72 @@
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+
)
228
from authzed.api.v1.experimental_service_pb2_grpc import (
3-
ExperimentalServiceStub,
429
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,
556
)
657
from authzed.api.v1.permission_service_pb2_grpc import (
7-
PermissionsServiceStub,
858
PermissionsServiceAsyncStub,
59+
PermissionsServiceStub,
960
)
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
1370

1471
class Client(SchemaServiceStub, PermissionsServiceStub, ExperimentalServiceStub, WatchServiceStub):
1572
"""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(
48105
options: Optional[Sequence[Tuple[str, Any]]] = None,
49106
compression: Optional[grpc.Compression] = None,
50107
) -> 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

Comments
 (0)