@@ -39,6 +39,11 @@ class TokenExistsError(APIException):
3939 tags = ['JWT' ],
4040 summary = 'Retrieve JWT Settings' ,
4141 description = 'Retrieve JWT settings for the currently active organization.' ,
42+ extensions = {
43+ 'x-fern-sdk-group-name' : 'jwt_settings' ,
44+ 'x-fern-sdk-method-name' : 'get' ,
45+ 'x-fern-audiences' : ['public' ],
46+ },
4247 ),
4348)
4449@method_decorator (
@@ -47,6 +52,11 @@ class TokenExistsError(APIException):
4752 tags = ['JWT' ],
4853 summary = 'Update JWT Settings' ,
4954 description = 'Update JWT settings for the currently active organization.' ,
55+ extensions = {
56+ 'x-fern-sdk-group-name' : 'jwt_settings' ,
57+ 'x-fern-sdk-method-name' : 'update' ,
58+ 'x-fern-audiences' : ['public' ],
59+ },
5060 ),
5161)
5262class JWTSettingsAPI (CreateAPIView ):
@@ -76,14 +86,19 @@ def post(self, request, *args, **kwargs):
7686 return Response (serializer .data )
7787
7888
79- # Recommended implementation from JWT to support drf-yasg:
80- # https://django-rest-framework-simplejwt.readthedocs.io/en/latest/drf_yasg_integration.html
8189class DecoratedTokenRefreshView (TokenRefreshView ):
8290 @extend_schema (
8391 tags = ['JWT' ],
92+ summary = 'Refresh JWT token' ,
93+ description = 'Get a new access token, using a refresh token.' ,
8494 responses = {
8595 status .HTTP_200_OK : TokenRefreshResponseSerializer ,
8696 },
97+ extensions = {
98+ 'x-fern-sdk-group-name' : 'tokens' ,
99+ 'x-fern-sdk-method-name' : 'refresh' ,
100+ 'x-fern-audiences' : ['public' ],
101+ },
87102 )
88103 def post (self , request , * args , ** kwargs ):
89104 return super ().post (request , * args , ** kwargs )
@@ -95,6 +110,14 @@ def post(self, request, *args, **kwargs):
95110 tags = ['JWT' ],
96111 summary = 'List API tokens' ,
97112 description = 'List all API tokens for the current user.' ,
113+ responses = {
114+ status .HTTP_200_OK : LSAPITokenListSerializer ,
115+ },
116+ extensions = {
117+ 'x-fern-sdk-group-name' : 'tokens' ,
118+ 'x-fern-sdk-method-name' : 'list' ,
119+ 'x-fern-audiences' : ['public' ],
120+ },
98121 ),
99122)
100123@method_decorator (
@@ -103,6 +126,14 @@ def post(self, request, *args, **kwargs):
103126 tags = ['JWT' ],
104127 summary = 'Create API token' ,
105128 description = 'Create a new API token for the current user.' ,
129+ responses = {
130+ status .HTTP_201_CREATED : LSAPITokenCreateSerializer ,
131+ },
132+ extensions = {
133+ 'x-fern-sdk-group-name' : 'tokens' ,
134+ 'x-fern-sdk-method-name' : 'create' ,
135+ 'x-fern-audiences' : ['public' ],
136+ },
106137 ),
107138)
108139class LSAPITokenView (generics .ListCreateAPIView ):
@@ -172,6 +203,11 @@ class LSTokenBlacklistView(TokenViewBase):
172203 status .HTTP_204_NO_CONTENT : 'Token was successfully blacklisted' ,
173204 status .HTTP_404_NOT_FOUND : 'Token is already blacklisted' ,
174205 },
206+ extensions = {
207+ 'x-fern-sdk-group-name' : 'tokens' ,
208+ 'x-fern-sdk-method-name' : 'blacklist' ,
209+ 'x-fern-audiences' : ['public' ],
210+ },
175211 )
176212 def post (self , request , * args , ** kwargs ):
177213 serializer = self .get_serializer (data = request .data )
@@ -202,6 +238,11 @@ class LSAPITokenRotateView(TokenViewBase):
202238 status .HTTP_200_OK : TokenRotateResponseSerializer ,
203239 status .HTTP_400_BAD_REQUEST : 'Invalid token or token already blacklisted' ,
204240 },
241+ extensions = {
242+ 'x-fern-sdk-group-name' : 'tokens' ,
243+ 'x-fern-sdk-method-name' : 'rotate' ,
244+ 'x-fern-audiences' : ['public' ],
245+ },
205246 )
206247 def post (self , request , * args , ** kwargs ):
207248 serializer = self .get_serializer (data = request .data )
0 commit comments