weave-python 0.28.2__py3-none-any.whl → 0.30.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- weave/weaveapi/auth/v1/service_pb2.py +184 -88
- weave/weaveapi/auth/v1/service_pb2.pyi +1288 -1134
- weave/weaveapi/auth/v1/service_pb2_grpc.pyi +248 -335
- weave/weaveapi/auth/v1/session_pb2.py +12 -4
- weave/weaveapi/auth/v1/session_pb2.pyi +109 -89
- weave/weaveapi/auth/v1/session_pb2_grpc.pyi +11 -10
- weave/weaveapi/auth/v1/usage_pb2.py +16 -12
- weave/weaveapi/auth/v1/usage_pb2.pyi +251 -197
- weave/weaveapi/auth/v1/usage_pb2_grpc.pyi +11 -10
- weave/weaveapi/auth/v1/user_pb2.py +58 -16
- weave/weaveapi/auth/v1/user_pb2.pyi +588 -505
- weave/weaveapi/auth/v1/user_pb2_grpc.pyi +11 -10
- weave/weaveapi/generate/v1/configuration_pb2.py +29 -17
- weave/weaveapi/generate/v1/configuration_pb2.pyi +277 -241
- weave/weaveapi/generate/v1/configuration_pb2_grpc.pyi +11 -10
- weave/weaveapi/generate/v1/generate_pb2.py +30 -4
- weave/weaveapi/generate/v1/generate_pb2.pyi +138 -40
- weave/weaveapi/generate/v1/generate_pb2_grpc.pyi +11 -10
- weave/weaveapi/generate/v1/service_pb2.py +50 -20
- weave/weaveapi/generate/v1/service_pb2.pyi +264 -135
- weave/weaveapi/generate/v1/service_pb2_grpc.py +47 -0
- weave/weaveapi/generate/v1/service_pb2_grpc.pyi +89 -78
- weave/weaveapi/llmx/v1/architecture_pb2.py +3 -3
- weave/weaveapi/llmx/v1/architecture_pb2.pyi +664 -555
- weave/weaveapi/llmx/v1/architecture_pb2_grpc.pyi +11 -10
- weave/weaveapi/llmx/v1/capabilities_pb2.py +86 -54
- weave/weaveapi/llmx/v1/capabilities_pb2.pyi +967 -852
- weave/weaveapi/llmx/v1/capabilities_pb2_grpc.pyi +11 -10
- weave/weaveapi/llmx/v1/model_pb2.py +54 -18
- weave/weaveapi/llmx/v1/model_pb2.pyi +533 -455
- weave/weaveapi/llmx/v1/model_pb2_grpc.pyi +11 -10
- weave/weaveapi/llmx/v1/pricing_pb2.py +22 -18
- weave/weaveapi/llmx/v1/pricing_pb2.pyi +194 -172
- weave/weaveapi/llmx/v1/pricing_pb2_grpc.pyi +11 -10
- weave/weaveapi/llmx/v1/provider_pb2.py +3 -3
- weave/weaveapi/llmx/v1/provider_pb2.pyi +84 -59
- weave/weaveapi/llmx/v1/provider_pb2_grpc.pyi +11 -10
- weave/weaveapi/llmx/v1/service_pb2.py +224 -86
- weave/weaveapi/llmx/v1/service_pb2.pyi +1651 -1403
- weave/weaveapi/llmx/v1/service_pb2_grpc.pyi +160 -203
- weave/weaveapi/mcpregistry/v1/server_pb2.py +14 -8
- weave/weaveapi/mcpregistry/v1/server_pb2.pyi +143 -121
- weave/weaveapi/mcpregistry/v1/server_pb2_grpc.pyi +11 -10
- weave/weaveapi/mcpregistry/v1/service_pb2.py +47 -27
- weave/weaveapi/mcpregistry/v1/service_pb2.pyi +132 -122
- weave/weaveapi/mcpregistry/v1/service_pb2_grpc.pyi +87 -112
- weave/weaveapi/payment/v1/invoice_pb2.py +36 -10
- weave/weaveapi/payment/v1/invoice_pb2.pyi +352 -291
- weave/weaveapi/payment/v1/invoice_pb2_grpc.pyi +11 -10
- weave/weaveapi/payment/v1/service_pb2.py +256 -90
- weave/weaveapi/payment/v1/service_pb2.pyi +1381 -1242
- weave/weaveapi/payment/v1/service_pb2_grpc.pyi +229 -319
- weave/weaveapi/payment/v1/subscription_pb2.py +97 -21
- weave/weaveapi/payment/v1/subscription_pb2.pyi +727 -611
- weave/weaveapi/payment/v1/subscription_pb2_grpc.pyi +11 -10
- weave/weaveapi/storage/v1/auth_pb2.py +3 -3
- weave/weaveapi/storage/v1/auth_pb2.pyi +42 -29
- weave/weaveapi/storage/v1/auth_pb2_grpc.pyi +11 -10
- weave/weaveapi/storage/v1/nosql_database_pb2.py +45 -21
- weave/weaveapi/storage/v1/nosql_database_pb2.pyi +438 -372
- weave/weaveapi/storage/v1/nosql_database_pb2_grpc.pyi +11 -10
- weave/weaveapi/storage/v1/object_store_pb2.py +25 -11
- weave/weaveapi/storage/v1/object_store_pb2.pyi +203 -187
- weave/weaveapi/storage/v1/object_store_pb2_grpc.pyi +11 -10
- weave/weaveapi/storage/v1/service_pb2.py +94 -34
- weave/weaveapi/storage/v1/service_pb2.pyi +414 -357
- weave/weaveapi/storage/v1/service_pb2_grpc.pyi +88 -107
- weave/weaveapi/storage/v1/sql_database_pb2.py +37 -21
- weave/weaveapi/storage/v1/sql_database_pb2.pyi +481 -400
- weave/weaveapi/storage/v1/sql_database_pb2_grpc.pyi +11 -10
- weave/weaveapi/storage/v1/storage_pb2.py +18 -4
- weave/weaveapi/storage/v1/storage_pb2.pyi +79 -70
- weave/weaveapi/storage/v1/storage_pb2_grpc.pyi +11 -10
- weave/weaveapi/synthesize/v1/dataset_pb2.py +10 -8
- weave/weaveapi/synthesize/v1/dataset_pb2.pyi +158 -128
- weave/weaveapi/synthesize/v1/dataset_pb2_grpc.pyi +11 -10
- weave/weaveapi/synthesize/v1/inline_data_pb2.py +4 -4
- weave/weaveapi/synthesize/v1/inline_data_pb2.pyi +31 -27
- weave/weaveapi/synthesize/v1/inline_data_pb2_grpc.pyi +11 -10
- weave/weaveapi/synthesize/v1/relationship_pb2.py +17 -9
- weave/weaveapi/synthesize/v1/relationship_pb2.pyi +67 -64
- weave/weaveapi/synthesize/v1/relationship_pb2_grpc.pyi +11 -10
- weave/weaveapi/synthesize/v1/service_pb2.py +40 -22
- weave/weaveapi/synthesize/v1/service_pb2.pyi +202 -168
- weave/weaveapi/synthesize/v1/service_pb2_grpc.pyi +67 -79
- weave/weaveapi/synthesize/v1/training_pb2.py +17 -11
- weave/weaveapi/synthesize/v1/training_pb2.pyi +119 -106
- weave/weaveapi/synthesize/v1/training_pb2_grpc.pyi +11 -10
- weave/weavesql/llmxdb/capabilities.py +487 -0
- weave/weavesql/llmxdb/changes.py +297 -0
- weave/weavesql/llmxdb/models.py +594 -0
- weave/weavesql/llmxdb/providers.py +348 -0
- weave/weavesql/llmxdb/scraper_runs.py +287 -0
- weave/weavesql/llmxdb/search.py +721 -0
- weave/weavesql/weavedb/dataset.py +75 -0
- weave/weavesql/weavedb/models.py +135 -0
- weave/weavesql/weavedb/relationships.py +72 -0
- weave/weavesql/weavedb/storage.py +113 -0
- weave/weavesql/weavedb/synthesizer.py +107 -0
- {weave_python-0.28.2.dist-info → weave_python-0.30.4.dist-info}/METADATA +3 -3
- weave_python-0.30.4.dist-info/RECORD +131 -0
- {weave_python-0.28.2.dist-info → weave_python-0.30.4.dist-info}/WHEEL +1 -1
- weave_python-0.28.2.dist-info/RECORD +0 -120
- {weave_python-0.28.2.dist-info → weave_python-0.30.4.dist-info}/licenses/LICENSE +0 -0
|
@@ -3,604 +3,517 @@
|
|
|
3
3
|
isort:skip_file
|
|
4
4
|
"""
|
|
5
5
|
|
|
6
|
-
import abc
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
6
|
+
from collections import abc as _abc
|
|
7
|
+
from grpc import aio as _aio
|
|
8
|
+
from weaveapi.auth.v1 import service_pb2 as _service_pb2
|
|
9
|
+
import abc as _abc_1
|
|
10
|
+
import grpc as _grpc
|
|
11
|
+
import sys
|
|
12
|
+
import typing as _typing
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
if sys.version_info >= (3, 11):
|
|
15
|
+
from typing import Self as _Self
|
|
16
|
+
else:
|
|
17
|
+
from typing_extensions import Self as _Self
|
|
18
|
+
|
|
19
|
+
_T = _typing.TypeVar("_T")
|
|
14
20
|
|
|
15
21
|
class _MaybeAsyncIterator(
|
|
16
|
-
|
|
17
|
-
collections.abc.Iterator[_T],
|
|
18
|
-
metaclass=abc.ABCMeta,
|
|
22
|
+
_abc.AsyncIterator[_T], _abc.Iterator[_T], metaclass=_abc_1.ABCMeta
|
|
19
23
|
): ...
|
|
20
|
-
class _ServicerContext(
|
|
24
|
+
class _ServicerContext(_grpc.ServicerContext, _aio.ServicerContext): # type: ignore[misc, type-arg]
|
|
21
25
|
...
|
|
22
26
|
|
|
27
|
+
GRPC_GENERATED_VERSION: str
|
|
28
|
+
GRPC_VERSION: str
|
|
29
|
+
|
|
23
30
|
class AuthStub:
|
|
24
31
|
"""Auth handles authentication and user management
|
|
25
32
|
OAuth endpoints (provider-agnostic)
|
|
26
33
|
"""
|
|
27
34
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
35
|
+
@_typing.overload
|
|
36
|
+
def __new__(cls, channel: _grpc.Channel) -> _Self: ...
|
|
37
|
+
@_typing.overload
|
|
38
|
+
def __new__(cls, channel: _aio.Channel) -> AuthAsyncStub: ...
|
|
39
|
+
InitiateOAuth: _grpc.UnaryUnaryMultiCallable[
|
|
40
|
+
_service_pb2.InitiateOAuthRequest, _service_pb2.InitiateOAuthResponse
|
|
34
41
|
]
|
|
35
42
|
"""Initiate OAuth flow for any supported provider"""
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
weaveapi.auth.v1.service_pb2.HandleOAuthCallbackResponse,
|
|
43
|
+
HandleOAuthCallback: _grpc.UnaryUnaryMultiCallable[
|
|
44
|
+
_service_pb2.HandleOAuthCallbackRequest,
|
|
45
|
+
_service_pb2.HandleOAuthCallbackResponse,
|
|
40
46
|
]
|
|
41
47
|
"""Handle OAuth callback from any provider"""
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
weaveapi.auth.v1.service_pb2.GetOAuthProvidersRequest,
|
|
45
|
-
weaveapi.auth.v1.service_pb2.GetOAuthProvidersResponse,
|
|
48
|
+
GetOAuthProviders: _grpc.UnaryUnaryMultiCallable[
|
|
49
|
+
_service_pb2.GetOAuthProvidersRequest, _service_pb2.GetOAuthProvidersResponse
|
|
46
50
|
]
|
|
47
51
|
"""Get list of supported OAuth providers"""
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
weaveapi.auth.v1.service_pb2.LinkOAuthProviderRequest,
|
|
51
|
-
weaveapi.auth.v1.service_pb2.LinkOAuthProviderResponse,
|
|
52
|
+
LinkOAuthProvider: _grpc.UnaryUnaryMultiCallable[
|
|
53
|
+
_service_pb2.LinkOAuthProviderRequest, _service_pb2.LinkOAuthProviderResponse
|
|
52
54
|
]
|
|
53
55
|
"""Link additional OAuth provider to existing account"""
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
weaveapi.auth.v1.service_pb2.UnlinkOAuthProviderResponse,
|
|
56
|
+
UnlinkOAuthProvider: _grpc.UnaryUnaryMultiCallable[
|
|
57
|
+
_service_pb2.UnlinkOAuthProviderRequest,
|
|
58
|
+
_service_pb2.UnlinkOAuthProviderResponse,
|
|
58
59
|
]
|
|
59
60
|
"""Unlink OAuth provider from account"""
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
weaveapi.auth.v1.service_pb2.RefreshTokenRequest,
|
|
63
|
-
weaveapi.auth.v1.service_pb2.RefreshTokenResponse,
|
|
61
|
+
RefreshToken: _grpc.UnaryUnaryMultiCallable[
|
|
62
|
+
_service_pb2.RefreshTokenRequest, _service_pb2.RefreshTokenResponse
|
|
64
63
|
]
|
|
65
64
|
"""Token management
|
|
66
65
|
|
|
67
66
|
Refresh access token
|
|
68
67
|
"""
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
weaveapi.auth.v1.service_pb2.RevokeTokenRequest,
|
|
72
|
-
weaveapi.auth.v1.service_pb2.RevokeTokenResponse,
|
|
68
|
+
RevokeToken: _grpc.UnaryUnaryMultiCallable[
|
|
69
|
+
_service_pb2.RevokeTokenRequest, _service_pb2.RevokeTokenResponse
|
|
73
70
|
]
|
|
74
71
|
"""Revoke refresh token (logout)"""
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
weaveapi.auth.v1.service_pb2.ValidateTokenRequest,
|
|
78
|
-
weaveapi.auth.v1.service_pb2.ValidateTokenResponse,
|
|
72
|
+
ValidateToken: _grpc.UnaryUnaryMultiCallable[
|
|
73
|
+
_service_pb2.ValidateTokenRequest, _service_pb2.ValidateTokenResponse
|
|
79
74
|
]
|
|
80
75
|
"""Validate access token"""
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
weaveapi.auth.v1.service_pb2.GetCurrentUserRequest,
|
|
84
|
-
weaveapi.auth.v1.service_pb2.GetCurrentUserResponse,
|
|
76
|
+
GetCurrentUser: _grpc.UnaryUnaryMultiCallable[
|
|
77
|
+
_service_pb2.GetCurrentUserRequest, _service_pb2.GetCurrentUserResponse
|
|
85
78
|
]
|
|
86
79
|
"""User management
|
|
87
80
|
|
|
88
81
|
Get current user profile
|
|
89
82
|
"""
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
weaveapi.auth.v1.service_pb2.UpdateUserRequest,
|
|
93
|
-
weaveapi.auth.v1.service_pb2.UpdateUserResponse,
|
|
83
|
+
UpdateUser: _grpc.UnaryUnaryMultiCallable[
|
|
84
|
+
_service_pb2.UpdateUserRequest, _service_pb2.UpdateUserResponse
|
|
94
85
|
]
|
|
95
86
|
"""Update user profile"""
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
weaveapi.auth.v1.service_pb2.DeleteUserRequest,
|
|
99
|
-
weaveapi.auth.v1.service_pb2.DeleteUserResponse,
|
|
87
|
+
DeleteUser: _grpc.UnaryUnaryMultiCallable[
|
|
88
|
+
_service_pb2.DeleteUserRequest, _service_pb2.DeleteUserResponse
|
|
100
89
|
]
|
|
101
90
|
"""Delete user account"""
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
weaveapi.auth.v1.service_pb2.ListAPIKeysRequest,
|
|
105
|
-
weaveapi.auth.v1.service_pb2.ListAPIKeysResponse,
|
|
91
|
+
ListAPIKeys: _grpc.UnaryUnaryMultiCallable[
|
|
92
|
+
_service_pb2.ListAPIKeysRequest, _service_pb2.ListAPIKeysResponse
|
|
106
93
|
]
|
|
107
94
|
"""API Key management
|
|
108
95
|
|
|
109
96
|
List user's API keys
|
|
110
97
|
"""
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
weaveapi.auth.v1.service_pb2.CreateAPIKeyRequest,
|
|
114
|
-
weaveapi.auth.v1.service_pb2.CreateAPIKeyResponse,
|
|
98
|
+
CreateAPIKey: _grpc.UnaryUnaryMultiCallable[
|
|
99
|
+
_service_pb2.CreateAPIKeyRequest, _service_pb2.CreateAPIKeyResponse
|
|
115
100
|
]
|
|
116
101
|
"""Create new API key"""
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
weaveapi.auth.v1.service_pb2.GetAPIKeyRequest,
|
|
120
|
-
weaveapi.auth.v1.service_pb2.GetAPIKeyResponse,
|
|
102
|
+
GetAPIKey: _grpc.UnaryUnaryMultiCallable[
|
|
103
|
+
_service_pb2.GetAPIKeyRequest, _service_pb2.GetAPIKeyResponse
|
|
121
104
|
]
|
|
122
105
|
"""Get API key details"""
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
weaveapi.auth.v1.service_pb2.UpdateAPIKeyRequest,
|
|
126
|
-
weaveapi.auth.v1.service_pb2.UpdateAPIKeyResponse,
|
|
106
|
+
UpdateAPIKey: _grpc.UnaryUnaryMultiCallable[
|
|
107
|
+
_service_pb2.UpdateAPIKeyRequest, _service_pb2.UpdateAPIKeyResponse
|
|
127
108
|
]
|
|
128
109
|
"""Update API key (rename, etc)"""
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
weaveapi.auth.v1.service_pb2.RevokeAPIKeyRequest,
|
|
132
|
-
weaveapi.auth.v1.service_pb2.RevokeAPIKeyResponse,
|
|
110
|
+
RevokeAPIKey: _grpc.UnaryUnaryMultiCallable[
|
|
111
|
+
_service_pb2.RevokeAPIKeyRequest, _service_pb2.RevokeAPIKeyResponse
|
|
133
112
|
]
|
|
134
113
|
"""Revoke API key"""
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
weaveapi.auth.v1.service_pb2.ValidateAPIKeyRequest,
|
|
138
|
-
weaveapi.auth.v1.service_pb2.ValidateAPIKeyResponse,
|
|
114
|
+
ValidateAPIKey: _grpc.UnaryUnaryMultiCallable[
|
|
115
|
+
_service_pb2.ValidateAPIKeyRequest, _service_pb2.ValidateAPIKeyResponse
|
|
139
116
|
]
|
|
140
117
|
"""Validate API key (for internal use)"""
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
weaveapi.auth.v1.service_pb2.GetUsageStatsRequest,
|
|
144
|
-
weaveapi.auth.v1.service_pb2.GetUsageStatsResponse,
|
|
118
|
+
GetUsageStats: _grpc.UnaryUnaryMultiCallable[
|
|
119
|
+
_service_pb2.GetUsageStatsRequest, _service_pb2.GetUsageStatsResponse
|
|
145
120
|
]
|
|
146
121
|
"""Usage and limits
|
|
147
122
|
|
|
148
123
|
Get user's API usage statistics
|
|
149
124
|
"""
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
weaveapi.auth.v1.service_pb2.GetRateLimitStatusRequest,
|
|
153
|
-
weaveapi.auth.v1.service_pb2.GetRateLimitStatusResponse,
|
|
125
|
+
GetRateLimitStatus: _grpc.UnaryUnaryMultiCallable[
|
|
126
|
+
_service_pb2.GetRateLimitStatusRequest, _service_pb2.GetRateLimitStatusResponse
|
|
154
127
|
]
|
|
155
128
|
"""Get rate limit status"""
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
weaveapi.auth.v1.service_pb2.ListSessionsRequest,
|
|
159
|
-
weaveapi.auth.v1.service_pb2.ListSessionsResponse,
|
|
129
|
+
ListSessions: _grpc.UnaryUnaryMultiCallable[
|
|
130
|
+
_service_pb2.ListSessionsRequest, _service_pb2.ListSessionsResponse
|
|
160
131
|
]
|
|
161
132
|
"""Session management
|
|
162
133
|
|
|
163
134
|
List active sessions
|
|
164
135
|
"""
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
weaveapi.auth.v1.service_pb2.RevokeSessionRequest,
|
|
168
|
-
weaveapi.auth.v1.service_pb2.RevokeSessionResponse,
|
|
136
|
+
RevokeSession: _grpc.UnaryUnaryMultiCallable[
|
|
137
|
+
_service_pb2.RevokeSessionRequest, _service_pb2.RevokeSessionResponse
|
|
169
138
|
]
|
|
170
139
|
"""Revoke a specific session"""
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
weaveapi.auth.v1.service_pb2.RevokeAllSessionsRequest,
|
|
174
|
-
weaveapi.auth.v1.service_pb2.RevokeAllSessionsResponse,
|
|
140
|
+
RevokeAllSessions: _grpc.UnaryUnaryMultiCallable[
|
|
141
|
+
_service_pb2.RevokeAllSessionsRequest, _service_pb2.RevokeAllSessionsResponse
|
|
175
142
|
]
|
|
176
143
|
"""Revoke all sessions except current"""
|
|
177
144
|
|
|
178
|
-
|
|
145
|
+
@_typing.type_check_only
|
|
146
|
+
class AuthAsyncStub(AuthStub):
|
|
179
147
|
"""Auth handles authentication and user management
|
|
180
148
|
OAuth endpoints (provider-agnostic)
|
|
181
149
|
"""
|
|
182
150
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
]
|
|
151
|
+
def __init__(self, channel: _aio.Channel) -> None: ...
|
|
152
|
+
InitiateOAuth: _aio.UnaryUnaryMultiCallable[
|
|
153
|
+
_service_pb2.InitiateOAuthRequest, _service_pb2.InitiateOAuthResponse
|
|
154
|
+
] # type: ignore[assignment]
|
|
187
155
|
"""Initiate OAuth flow for any supported provider"""
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
]
|
|
156
|
+
HandleOAuthCallback: _aio.UnaryUnaryMultiCallable[
|
|
157
|
+
_service_pb2.HandleOAuthCallbackRequest,
|
|
158
|
+
_service_pb2.HandleOAuthCallbackResponse,
|
|
159
|
+
] # type: ignore[assignment]
|
|
193
160
|
"""Handle OAuth callback from any provider"""
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
weaveapi.auth.v1.service_pb2.GetOAuthProvidersResponse,
|
|
198
|
-
]
|
|
161
|
+
GetOAuthProviders: _aio.UnaryUnaryMultiCallable[
|
|
162
|
+
_service_pb2.GetOAuthProvidersRequest, _service_pb2.GetOAuthProvidersResponse
|
|
163
|
+
] # type: ignore[assignment]
|
|
199
164
|
"""Get list of supported OAuth providers"""
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
weaveapi.auth.v1.service_pb2.LinkOAuthProviderResponse,
|
|
204
|
-
]
|
|
165
|
+
LinkOAuthProvider: _aio.UnaryUnaryMultiCallable[
|
|
166
|
+
_service_pb2.LinkOAuthProviderRequest, _service_pb2.LinkOAuthProviderResponse
|
|
167
|
+
] # type: ignore[assignment]
|
|
205
168
|
"""Link additional OAuth provider to existing account"""
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
]
|
|
169
|
+
UnlinkOAuthProvider: _aio.UnaryUnaryMultiCallable[
|
|
170
|
+
_service_pb2.UnlinkOAuthProviderRequest,
|
|
171
|
+
_service_pb2.UnlinkOAuthProviderResponse,
|
|
172
|
+
] # type: ignore[assignment]
|
|
211
173
|
"""Unlink OAuth provider from account"""
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
weaveapi.auth.v1.service_pb2.RefreshTokenResponse,
|
|
216
|
-
]
|
|
174
|
+
RefreshToken: _aio.UnaryUnaryMultiCallable[
|
|
175
|
+
_service_pb2.RefreshTokenRequest, _service_pb2.RefreshTokenResponse
|
|
176
|
+
] # type: ignore[assignment]
|
|
217
177
|
"""Token management
|
|
218
178
|
|
|
219
179
|
Refresh access token
|
|
220
180
|
"""
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
weaveapi.auth.v1.service_pb2.RevokeTokenResponse,
|
|
225
|
-
]
|
|
181
|
+
RevokeToken: _aio.UnaryUnaryMultiCallable[
|
|
182
|
+
_service_pb2.RevokeTokenRequest, _service_pb2.RevokeTokenResponse
|
|
183
|
+
] # type: ignore[assignment]
|
|
226
184
|
"""Revoke refresh token (logout)"""
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
weaveapi.auth.v1.service_pb2.ValidateTokenResponse,
|
|
231
|
-
]
|
|
185
|
+
ValidateToken: _aio.UnaryUnaryMultiCallable[
|
|
186
|
+
_service_pb2.ValidateTokenRequest, _service_pb2.ValidateTokenResponse
|
|
187
|
+
] # type: ignore[assignment]
|
|
232
188
|
"""Validate access token"""
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
weaveapi.auth.v1.service_pb2.GetCurrentUserResponse,
|
|
237
|
-
]
|
|
189
|
+
GetCurrentUser: _aio.UnaryUnaryMultiCallable[
|
|
190
|
+
_service_pb2.GetCurrentUserRequest, _service_pb2.GetCurrentUserResponse
|
|
191
|
+
] # type: ignore[assignment]
|
|
238
192
|
"""User management
|
|
239
193
|
|
|
240
194
|
Get current user profile
|
|
241
195
|
"""
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
weaveapi.auth.v1.service_pb2.UpdateUserResponse,
|
|
246
|
-
]
|
|
196
|
+
UpdateUser: _aio.UnaryUnaryMultiCallable[
|
|
197
|
+
_service_pb2.UpdateUserRequest, _service_pb2.UpdateUserResponse
|
|
198
|
+
] # type: ignore[assignment]
|
|
247
199
|
"""Update user profile"""
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
weaveapi.auth.v1.service_pb2.DeleteUserResponse,
|
|
252
|
-
]
|
|
200
|
+
DeleteUser: _aio.UnaryUnaryMultiCallable[
|
|
201
|
+
_service_pb2.DeleteUserRequest, _service_pb2.DeleteUserResponse
|
|
202
|
+
] # type: ignore[assignment]
|
|
253
203
|
"""Delete user account"""
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
weaveapi.auth.v1.service_pb2.ListAPIKeysResponse,
|
|
258
|
-
]
|
|
204
|
+
ListAPIKeys: _aio.UnaryUnaryMultiCallable[
|
|
205
|
+
_service_pb2.ListAPIKeysRequest, _service_pb2.ListAPIKeysResponse
|
|
206
|
+
] # type: ignore[assignment]
|
|
259
207
|
"""API Key management
|
|
260
208
|
|
|
261
209
|
List user's API keys
|
|
262
210
|
"""
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
weaveapi.auth.v1.service_pb2.CreateAPIKeyResponse,
|
|
267
|
-
]
|
|
211
|
+
CreateAPIKey: _aio.UnaryUnaryMultiCallable[
|
|
212
|
+
_service_pb2.CreateAPIKeyRequest, _service_pb2.CreateAPIKeyResponse
|
|
213
|
+
] # type: ignore[assignment]
|
|
268
214
|
"""Create new API key"""
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
weaveapi.auth.v1.service_pb2.GetAPIKeyResponse,
|
|
273
|
-
]
|
|
215
|
+
GetAPIKey: _aio.UnaryUnaryMultiCallable[
|
|
216
|
+
_service_pb2.GetAPIKeyRequest, _service_pb2.GetAPIKeyResponse
|
|
217
|
+
] # type: ignore[assignment]
|
|
274
218
|
"""Get API key details"""
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
weaveapi.auth.v1.service_pb2.UpdateAPIKeyResponse,
|
|
279
|
-
]
|
|
219
|
+
UpdateAPIKey: _aio.UnaryUnaryMultiCallable[
|
|
220
|
+
_service_pb2.UpdateAPIKeyRequest, _service_pb2.UpdateAPIKeyResponse
|
|
221
|
+
] # type: ignore[assignment]
|
|
280
222
|
"""Update API key (rename, etc)"""
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
weaveapi.auth.v1.service_pb2.RevokeAPIKeyResponse,
|
|
285
|
-
]
|
|
223
|
+
RevokeAPIKey: _aio.UnaryUnaryMultiCallable[
|
|
224
|
+
_service_pb2.RevokeAPIKeyRequest, _service_pb2.RevokeAPIKeyResponse
|
|
225
|
+
] # type: ignore[assignment]
|
|
286
226
|
"""Revoke API key"""
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
weaveapi.auth.v1.service_pb2.ValidateAPIKeyResponse,
|
|
291
|
-
]
|
|
227
|
+
ValidateAPIKey: _aio.UnaryUnaryMultiCallable[
|
|
228
|
+
_service_pb2.ValidateAPIKeyRequest, _service_pb2.ValidateAPIKeyResponse
|
|
229
|
+
] # type: ignore[assignment]
|
|
292
230
|
"""Validate API key (for internal use)"""
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
weaveapi.auth.v1.service_pb2.GetUsageStatsResponse,
|
|
297
|
-
]
|
|
231
|
+
GetUsageStats: _aio.UnaryUnaryMultiCallable[
|
|
232
|
+
_service_pb2.GetUsageStatsRequest, _service_pb2.GetUsageStatsResponse
|
|
233
|
+
] # type: ignore[assignment]
|
|
298
234
|
"""Usage and limits
|
|
299
235
|
|
|
300
236
|
Get user's API usage statistics
|
|
301
237
|
"""
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
weaveapi.auth.v1.service_pb2.GetRateLimitStatusResponse,
|
|
306
|
-
]
|
|
238
|
+
GetRateLimitStatus: _aio.UnaryUnaryMultiCallable[
|
|
239
|
+
_service_pb2.GetRateLimitStatusRequest, _service_pb2.GetRateLimitStatusResponse
|
|
240
|
+
] # type: ignore[assignment]
|
|
307
241
|
"""Get rate limit status"""
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
weaveapi.auth.v1.service_pb2.ListSessionsResponse,
|
|
312
|
-
]
|
|
242
|
+
ListSessions: _aio.UnaryUnaryMultiCallable[
|
|
243
|
+
_service_pb2.ListSessionsRequest, _service_pb2.ListSessionsResponse
|
|
244
|
+
] # type: ignore[assignment]
|
|
313
245
|
"""Session management
|
|
314
246
|
|
|
315
247
|
List active sessions
|
|
316
248
|
"""
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
weaveapi.auth.v1.service_pb2.RevokeSessionResponse,
|
|
321
|
-
]
|
|
249
|
+
RevokeSession: _aio.UnaryUnaryMultiCallable[
|
|
250
|
+
_service_pb2.RevokeSessionRequest, _service_pb2.RevokeSessionResponse
|
|
251
|
+
] # type: ignore[assignment]
|
|
322
252
|
"""Revoke a specific session"""
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
weaveapi.auth.v1.service_pb2.RevokeAllSessionsResponse,
|
|
327
|
-
]
|
|
253
|
+
RevokeAllSessions: _aio.UnaryUnaryMultiCallable[
|
|
254
|
+
_service_pb2.RevokeAllSessionsRequest, _service_pb2.RevokeAllSessionsResponse
|
|
255
|
+
] # type: ignore[assignment]
|
|
328
256
|
"""Revoke all sessions except current"""
|
|
329
257
|
|
|
330
|
-
class AuthServicer(metaclass=
|
|
258
|
+
class AuthServicer(metaclass=_abc_1.ABCMeta):
|
|
331
259
|
"""Auth handles authentication and user management
|
|
332
260
|
OAuth endpoints (provider-agnostic)
|
|
333
261
|
"""
|
|
334
262
|
|
|
335
|
-
@
|
|
263
|
+
@_abc_1.abstractmethod
|
|
336
264
|
def InitiateOAuth(
|
|
337
265
|
self,
|
|
338
|
-
request:
|
|
266
|
+
request: _service_pb2.InitiateOAuthRequest,
|
|
339
267
|
context: _ServicerContext,
|
|
340
|
-
) ->
|
|
341
|
-
|
|
342
|
-
|
|
268
|
+
) -> _typing.Union[
|
|
269
|
+
_service_pb2.InitiateOAuthResponse,
|
|
270
|
+
_abc.Awaitable[_service_pb2.InitiateOAuthResponse],
|
|
343
271
|
]:
|
|
344
272
|
"""Initiate OAuth flow for any supported provider"""
|
|
345
273
|
|
|
346
|
-
@
|
|
274
|
+
@_abc_1.abstractmethod
|
|
347
275
|
def HandleOAuthCallback(
|
|
348
276
|
self,
|
|
349
|
-
request:
|
|
277
|
+
request: _service_pb2.HandleOAuthCallbackRequest,
|
|
350
278
|
context: _ServicerContext,
|
|
351
|
-
) ->
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
weaveapi.auth.v1.service_pb2.HandleOAuthCallbackResponse
|
|
355
|
-
],
|
|
279
|
+
) -> _typing.Union[
|
|
280
|
+
_service_pb2.HandleOAuthCallbackResponse,
|
|
281
|
+
_abc.Awaitable[_service_pb2.HandleOAuthCallbackResponse],
|
|
356
282
|
]:
|
|
357
283
|
"""Handle OAuth callback from any provider"""
|
|
358
284
|
|
|
359
|
-
@
|
|
285
|
+
@_abc_1.abstractmethod
|
|
360
286
|
def GetOAuthProviders(
|
|
361
287
|
self,
|
|
362
|
-
request:
|
|
288
|
+
request: _service_pb2.GetOAuthProvidersRequest,
|
|
363
289
|
context: _ServicerContext,
|
|
364
|
-
) ->
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
weaveapi.auth.v1.service_pb2.GetOAuthProvidersResponse
|
|
368
|
-
],
|
|
290
|
+
) -> _typing.Union[
|
|
291
|
+
_service_pb2.GetOAuthProvidersResponse,
|
|
292
|
+
_abc.Awaitable[_service_pb2.GetOAuthProvidersResponse],
|
|
369
293
|
]:
|
|
370
294
|
"""Get list of supported OAuth providers"""
|
|
371
295
|
|
|
372
|
-
@
|
|
296
|
+
@_abc_1.abstractmethod
|
|
373
297
|
def LinkOAuthProvider(
|
|
374
298
|
self,
|
|
375
|
-
request:
|
|
299
|
+
request: _service_pb2.LinkOAuthProviderRequest,
|
|
376
300
|
context: _ServicerContext,
|
|
377
|
-
) ->
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
weaveapi.auth.v1.service_pb2.LinkOAuthProviderResponse
|
|
381
|
-
],
|
|
301
|
+
) -> _typing.Union[
|
|
302
|
+
_service_pb2.LinkOAuthProviderResponse,
|
|
303
|
+
_abc.Awaitable[_service_pb2.LinkOAuthProviderResponse],
|
|
382
304
|
]:
|
|
383
305
|
"""Link additional OAuth provider to existing account"""
|
|
384
306
|
|
|
385
|
-
@
|
|
307
|
+
@_abc_1.abstractmethod
|
|
386
308
|
def UnlinkOAuthProvider(
|
|
387
309
|
self,
|
|
388
|
-
request:
|
|
310
|
+
request: _service_pb2.UnlinkOAuthProviderRequest,
|
|
389
311
|
context: _ServicerContext,
|
|
390
|
-
) ->
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
weaveapi.auth.v1.service_pb2.UnlinkOAuthProviderResponse
|
|
394
|
-
],
|
|
312
|
+
) -> _typing.Union[
|
|
313
|
+
_service_pb2.UnlinkOAuthProviderResponse,
|
|
314
|
+
_abc.Awaitable[_service_pb2.UnlinkOAuthProviderResponse],
|
|
395
315
|
]:
|
|
396
316
|
"""Unlink OAuth provider from account"""
|
|
397
317
|
|
|
398
|
-
@
|
|
318
|
+
@_abc_1.abstractmethod
|
|
399
319
|
def RefreshToken(
|
|
400
320
|
self,
|
|
401
|
-
request:
|
|
321
|
+
request: _service_pb2.RefreshTokenRequest,
|
|
402
322
|
context: _ServicerContext,
|
|
403
|
-
) ->
|
|
404
|
-
|
|
405
|
-
|
|
323
|
+
) -> _typing.Union[
|
|
324
|
+
_service_pb2.RefreshTokenResponse,
|
|
325
|
+
_abc.Awaitable[_service_pb2.RefreshTokenResponse],
|
|
406
326
|
]:
|
|
407
327
|
"""Token management
|
|
408
328
|
|
|
409
329
|
Refresh access token
|
|
410
330
|
"""
|
|
411
331
|
|
|
412
|
-
@
|
|
332
|
+
@_abc_1.abstractmethod
|
|
413
333
|
def RevokeToken(
|
|
414
334
|
self,
|
|
415
|
-
request:
|
|
335
|
+
request: _service_pb2.RevokeTokenRequest,
|
|
416
336
|
context: _ServicerContext,
|
|
417
|
-
) ->
|
|
418
|
-
|
|
419
|
-
|
|
337
|
+
) -> _typing.Union[
|
|
338
|
+
_service_pb2.RevokeTokenResponse,
|
|
339
|
+
_abc.Awaitable[_service_pb2.RevokeTokenResponse],
|
|
420
340
|
]:
|
|
421
341
|
"""Revoke refresh token (logout)"""
|
|
422
342
|
|
|
423
|
-
@
|
|
343
|
+
@_abc_1.abstractmethod
|
|
424
344
|
def ValidateToken(
|
|
425
345
|
self,
|
|
426
|
-
request:
|
|
346
|
+
request: _service_pb2.ValidateTokenRequest,
|
|
427
347
|
context: _ServicerContext,
|
|
428
|
-
) ->
|
|
429
|
-
|
|
430
|
-
|
|
348
|
+
) -> _typing.Union[
|
|
349
|
+
_service_pb2.ValidateTokenResponse,
|
|
350
|
+
_abc.Awaitable[_service_pb2.ValidateTokenResponse],
|
|
431
351
|
]:
|
|
432
352
|
"""Validate access token"""
|
|
433
353
|
|
|
434
|
-
@
|
|
354
|
+
@_abc_1.abstractmethod
|
|
435
355
|
def GetCurrentUser(
|
|
436
356
|
self,
|
|
437
|
-
request:
|
|
357
|
+
request: _service_pb2.GetCurrentUserRequest,
|
|
438
358
|
context: _ServicerContext,
|
|
439
|
-
) ->
|
|
440
|
-
|
|
441
|
-
|
|
359
|
+
) -> _typing.Union[
|
|
360
|
+
_service_pb2.GetCurrentUserResponse,
|
|
361
|
+
_abc.Awaitable[_service_pb2.GetCurrentUserResponse],
|
|
442
362
|
]:
|
|
443
363
|
"""User management
|
|
444
364
|
|
|
445
365
|
Get current user profile
|
|
446
366
|
"""
|
|
447
367
|
|
|
448
|
-
@
|
|
368
|
+
@_abc_1.abstractmethod
|
|
449
369
|
def UpdateUser(
|
|
450
370
|
self,
|
|
451
|
-
request:
|
|
371
|
+
request: _service_pb2.UpdateUserRequest,
|
|
452
372
|
context: _ServicerContext,
|
|
453
|
-
) ->
|
|
454
|
-
|
|
455
|
-
collections.abc.Awaitable[weaveapi.auth.v1.service_pb2.UpdateUserResponse],
|
|
373
|
+
) -> _typing.Union[
|
|
374
|
+
_service_pb2.UpdateUserResponse, _abc.Awaitable[_service_pb2.UpdateUserResponse]
|
|
456
375
|
]:
|
|
457
376
|
"""Update user profile"""
|
|
458
377
|
|
|
459
|
-
@
|
|
378
|
+
@_abc_1.abstractmethod
|
|
460
379
|
def DeleteUser(
|
|
461
380
|
self,
|
|
462
|
-
request:
|
|
381
|
+
request: _service_pb2.DeleteUserRequest,
|
|
463
382
|
context: _ServicerContext,
|
|
464
|
-
) ->
|
|
465
|
-
|
|
466
|
-
collections.abc.Awaitable[weaveapi.auth.v1.service_pb2.DeleteUserResponse],
|
|
383
|
+
) -> _typing.Union[
|
|
384
|
+
_service_pb2.DeleteUserResponse, _abc.Awaitable[_service_pb2.DeleteUserResponse]
|
|
467
385
|
]:
|
|
468
386
|
"""Delete user account"""
|
|
469
387
|
|
|
470
|
-
@
|
|
388
|
+
@_abc_1.abstractmethod
|
|
471
389
|
def ListAPIKeys(
|
|
472
390
|
self,
|
|
473
|
-
request:
|
|
391
|
+
request: _service_pb2.ListAPIKeysRequest,
|
|
474
392
|
context: _ServicerContext,
|
|
475
|
-
) ->
|
|
476
|
-
|
|
477
|
-
|
|
393
|
+
) -> _typing.Union[
|
|
394
|
+
_service_pb2.ListAPIKeysResponse,
|
|
395
|
+
_abc.Awaitable[_service_pb2.ListAPIKeysResponse],
|
|
478
396
|
]:
|
|
479
397
|
"""API Key management
|
|
480
398
|
|
|
481
399
|
List user's API keys
|
|
482
400
|
"""
|
|
483
401
|
|
|
484
|
-
@
|
|
402
|
+
@_abc_1.abstractmethod
|
|
485
403
|
def CreateAPIKey(
|
|
486
404
|
self,
|
|
487
|
-
request:
|
|
405
|
+
request: _service_pb2.CreateAPIKeyRequest,
|
|
488
406
|
context: _ServicerContext,
|
|
489
|
-
) ->
|
|
490
|
-
|
|
491
|
-
|
|
407
|
+
) -> _typing.Union[
|
|
408
|
+
_service_pb2.CreateAPIKeyResponse,
|
|
409
|
+
_abc.Awaitable[_service_pb2.CreateAPIKeyResponse],
|
|
492
410
|
]:
|
|
493
411
|
"""Create new API key"""
|
|
494
412
|
|
|
495
|
-
@
|
|
413
|
+
@_abc_1.abstractmethod
|
|
496
414
|
def GetAPIKey(
|
|
497
415
|
self,
|
|
498
|
-
request:
|
|
416
|
+
request: _service_pb2.GetAPIKeyRequest,
|
|
499
417
|
context: _ServicerContext,
|
|
500
|
-
) ->
|
|
501
|
-
|
|
502
|
-
collections.abc.Awaitable[weaveapi.auth.v1.service_pb2.GetAPIKeyResponse],
|
|
418
|
+
) -> _typing.Union[
|
|
419
|
+
_service_pb2.GetAPIKeyResponse, _abc.Awaitable[_service_pb2.GetAPIKeyResponse]
|
|
503
420
|
]:
|
|
504
421
|
"""Get API key details"""
|
|
505
422
|
|
|
506
|
-
@
|
|
423
|
+
@_abc_1.abstractmethod
|
|
507
424
|
def UpdateAPIKey(
|
|
508
425
|
self,
|
|
509
|
-
request:
|
|
426
|
+
request: _service_pb2.UpdateAPIKeyRequest,
|
|
510
427
|
context: _ServicerContext,
|
|
511
|
-
) ->
|
|
512
|
-
|
|
513
|
-
|
|
428
|
+
) -> _typing.Union[
|
|
429
|
+
_service_pb2.UpdateAPIKeyResponse,
|
|
430
|
+
_abc.Awaitable[_service_pb2.UpdateAPIKeyResponse],
|
|
514
431
|
]:
|
|
515
432
|
"""Update API key (rename, etc)"""
|
|
516
433
|
|
|
517
|
-
@
|
|
434
|
+
@_abc_1.abstractmethod
|
|
518
435
|
def RevokeAPIKey(
|
|
519
436
|
self,
|
|
520
|
-
request:
|
|
437
|
+
request: _service_pb2.RevokeAPIKeyRequest,
|
|
521
438
|
context: _ServicerContext,
|
|
522
|
-
) ->
|
|
523
|
-
|
|
524
|
-
|
|
439
|
+
) -> _typing.Union[
|
|
440
|
+
_service_pb2.RevokeAPIKeyResponse,
|
|
441
|
+
_abc.Awaitable[_service_pb2.RevokeAPIKeyResponse],
|
|
525
442
|
]:
|
|
526
443
|
"""Revoke API key"""
|
|
527
444
|
|
|
528
|
-
@
|
|
445
|
+
@_abc_1.abstractmethod
|
|
529
446
|
def ValidateAPIKey(
|
|
530
447
|
self,
|
|
531
|
-
request:
|
|
448
|
+
request: _service_pb2.ValidateAPIKeyRequest,
|
|
532
449
|
context: _ServicerContext,
|
|
533
|
-
) ->
|
|
534
|
-
|
|
535
|
-
|
|
450
|
+
) -> _typing.Union[
|
|
451
|
+
_service_pb2.ValidateAPIKeyResponse,
|
|
452
|
+
_abc.Awaitable[_service_pb2.ValidateAPIKeyResponse],
|
|
536
453
|
]:
|
|
537
454
|
"""Validate API key (for internal use)"""
|
|
538
455
|
|
|
539
|
-
@
|
|
456
|
+
@_abc_1.abstractmethod
|
|
540
457
|
def GetUsageStats(
|
|
541
458
|
self,
|
|
542
|
-
request:
|
|
459
|
+
request: _service_pb2.GetUsageStatsRequest,
|
|
543
460
|
context: _ServicerContext,
|
|
544
|
-
) ->
|
|
545
|
-
|
|
546
|
-
|
|
461
|
+
) -> _typing.Union[
|
|
462
|
+
_service_pb2.GetUsageStatsResponse,
|
|
463
|
+
_abc.Awaitable[_service_pb2.GetUsageStatsResponse],
|
|
547
464
|
]:
|
|
548
465
|
"""Usage and limits
|
|
549
466
|
|
|
550
467
|
Get user's API usage statistics
|
|
551
468
|
"""
|
|
552
469
|
|
|
553
|
-
@
|
|
470
|
+
@_abc_1.abstractmethod
|
|
554
471
|
def GetRateLimitStatus(
|
|
555
472
|
self,
|
|
556
|
-
request:
|
|
473
|
+
request: _service_pb2.GetRateLimitStatusRequest,
|
|
557
474
|
context: _ServicerContext,
|
|
558
|
-
) ->
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
weaveapi.auth.v1.service_pb2.GetRateLimitStatusResponse
|
|
562
|
-
],
|
|
475
|
+
) -> _typing.Union[
|
|
476
|
+
_service_pb2.GetRateLimitStatusResponse,
|
|
477
|
+
_abc.Awaitable[_service_pb2.GetRateLimitStatusResponse],
|
|
563
478
|
]:
|
|
564
479
|
"""Get rate limit status"""
|
|
565
480
|
|
|
566
|
-
@
|
|
481
|
+
@_abc_1.abstractmethod
|
|
567
482
|
def ListSessions(
|
|
568
483
|
self,
|
|
569
|
-
request:
|
|
484
|
+
request: _service_pb2.ListSessionsRequest,
|
|
570
485
|
context: _ServicerContext,
|
|
571
|
-
) ->
|
|
572
|
-
|
|
573
|
-
|
|
486
|
+
) -> _typing.Union[
|
|
487
|
+
_service_pb2.ListSessionsResponse,
|
|
488
|
+
_abc.Awaitable[_service_pb2.ListSessionsResponse],
|
|
574
489
|
]:
|
|
575
490
|
"""Session management
|
|
576
491
|
|
|
577
492
|
List active sessions
|
|
578
493
|
"""
|
|
579
494
|
|
|
580
|
-
@
|
|
495
|
+
@_abc_1.abstractmethod
|
|
581
496
|
def RevokeSession(
|
|
582
497
|
self,
|
|
583
|
-
request:
|
|
498
|
+
request: _service_pb2.RevokeSessionRequest,
|
|
584
499
|
context: _ServicerContext,
|
|
585
|
-
) ->
|
|
586
|
-
|
|
587
|
-
|
|
500
|
+
) -> _typing.Union[
|
|
501
|
+
_service_pb2.RevokeSessionResponse,
|
|
502
|
+
_abc.Awaitable[_service_pb2.RevokeSessionResponse],
|
|
588
503
|
]:
|
|
589
504
|
"""Revoke a specific session"""
|
|
590
505
|
|
|
591
|
-
@
|
|
506
|
+
@_abc_1.abstractmethod
|
|
592
507
|
def RevokeAllSessions(
|
|
593
508
|
self,
|
|
594
|
-
request:
|
|
509
|
+
request: _service_pb2.RevokeAllSessionsRequest,
|
|
595
510
|
context: _ServicerContext,
|
|
596
|
-
) ->
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
weaveapi.auth.v1.service_pb2.RevokeAllSessionsResponse
|
|
600
|
-
],
|
|
511
|
+
) -> _typing.Union[
|
|
512
|
+
_service_pb2.RevokeAllSessionsResponse,
|
|
513
|
+
_abc.Awaitable[_service_pb2.RevokeAllSessionsResponse],
|
|
601
514
|
]:
|
|
602
515
|
"""Revoke all sessions except current"""
|
|
603
516
|
|
|
604
517
|
def add_AuthServicer_to_server(
|
|
605
|
-
servicer: AuthServicer, server:
|
|
518
|
+
servicer: AuthServicer, server: _typing.Union[_grpc.Server, _aio.Server]
|
|
606
519
|
) -> None: ...
|