Skip to content

Commit dd1c3c3

Browse files
committed
feat: add handling for ForbiddenResponse and Cancelled errors
1 parent 9f92f78 commit dd1c3c3

13 files changed

Lines changed: 343 additions & 2 deletions

File tree

.openapi-generator/FILES

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ docs/AbortedMessageResponse.md
1919
docs/Any.md
2020
docs/Assertion.md
2121
docs/AssertionTupleKey.md
22+
docs/AuthErrorCode.md
2223
docs/AuthorizationModel.md
2324
docs/CheckRequest.md
2425
docs/CheckRequestTupleKey.md
@@ -37,6 +38,7 @@ docs/ExpandRequest.md
3738
docs/ExpandRequestTupleKey.md
3839
docs/ExpandResponse.md
3940
docs/FgaObject.md
41+
docs/ForbiddenResponse.md
4042
docs/GetStoreResponse.md
4143
docs/InternalErrorCode.md
4244
docs/InternalErrorMessageResponse.md
@@ -140,6 +142,7 @@ openfga_sdk/models/aborted_message_response.py
140142
openfga_sdk/models/any.py
141143
openfga_sdk/models/assertion.py
142144
openfga_sdk/models/assertion_tuple_key.py
145+
openfga_sdk/models/auth_error_code.py
143146
openfga_sdk/models/authorization_model.py
144147
openfga_sdk/models/check_request.py
145148
openfga_sdk/models/check_request_tuple_key.py
@@ -158,6 +161,7 @@ openfga_sdk/models/expand_request.py
158161
openfga_sdk/models/expand_request_tuple_key.py
159162
openfga_sdk/models/expand_response.py
160163
openfga_sdk/models/fga_object.py
164+
openfga_sdk/models/forbidden_response.py
161165
openfga_sdk/models/get_store_response.py
162166
openfga_sdk/models/internal_error_code.py
163167
openfga_sdk/models/internal_error_message_response.py

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,6 +1064,7 @@ Class | Method | HTTP request | Description
10641064
- [Any](https://github.com/openfga/python-sdk/blob/main/docs/Any.md)
10651065
- [Assertion](https://github.com/openfga/python-sdk/blob/main/docs/Assertion.md)
10661066
- [AssertionTupleKey](https://github.com/openfga/python-sdk/blob/main/docs/AssertionTupleKey.md)
1067+
- [AuthErrorCode](https://github.com/openfga/python-sdk/blob/main/docs/AuthErrorCode.md)
10671068
- [AuthorizationModel](https://github.com/openfga/python-sdk/blob/main/docs/AuthorizationModel.md)
10681069
- [CheckRequest](https://github.com/openfga/python-sdk/blob/main/docs/CheckRequest.md)
10691070
- [CheckRequestTupleKey](https://github.com/openfga/python-sdk/blob/main/docs/CheckRequestTupleKey.md)
@@ -1082,6 +1083,7 @@ Class | Method | HTTP request | Description
10821083
- [ExpandRequestTupleKey](https://github.com/openfga/python-sdk/blob/main/docs/ExpandRequestTupleKey.md)
10831084
- [ExpandResponse](https://github.com/openfga/python-sdk/blob/main/docs/ExpandResponse.md)
10841085
- [FgaObject](https://github.com/openfga/python-sdk/blob/main/docs/FgaObject.md)
1086+
- [ForbiddenResponse](https://github.com/openfga/python-sdk/blob/main/docs/ForbiddenResponse.md)
10851087
- [GetStoreResponse](https://github.com/openfga/python-sdk/blob/main/docs/GetStoreResponse.md)
10861088
- [InternalErrorCode](https://github.com/openfga/python-sdk/blob/main/docs/InternalErrorCode.md)
10871089
- [InternalErrorMessageResponse](https://github.com/openfga/python-sdk/blob/main/docs/InternalErrorMessageResponse.md)

docs/AuthErrorCode.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# AuthErrorCode
2+
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
8+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
9+
10+

docs/ForbiddenResponse.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# ForbiddenResponse
2+
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**code** | [**AuthErrorCode**](AuthErrorCode.md) | | [optional]
8+
**message** | **str** | | [optional]
9+
10+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11+
12+

docs/OpenFgaApi.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ No authorization required
9898
**200** | A successful response. | - |
9999
**400** | Request failed due to invalid input. | - |
100100
**401** | Not authenticated. | - |
101+
**403** | Forbidden. | - |
101102
**404** | Request failed due to incorrect path. | - |
102103
**409** | Request was aborted due a transaction conflict. | - |
103104
**422** | Request timed out due to excessive request throttling. | - |
@@ -179,6 +180,7 @@ No authorization required
179180
**201** | A successful response. | - |
180181
**400** | Request failed due to invalid input. | - |
181182
**401** | Not authenticated. | - |
183+
**403** | Forbidden. | - |
182184
**404** | Request failed due to incorrect path. | - |
183185
**409** | Request was aborted due a transaction conflict. | - |
184186
**422** | Request timed out due to excessive request throttling. | - |
@@ -259,6 +261,7 @@ No authorization required
259261
**204** | A successful response. | - |
260262
**400** | Request failed due to invalid input. | - |
261263
**401** | Not authenticated. | - |
264+
**403** | Forbidden. | - |
262265
**404** | Request failed due to incorrect path. | - |
263266
**409** | Request was aborted due a transaction conflict. | - |
264267
**422** | Request timed out due to excessive request throttling. | - |
@@ -342,6 +345,7 @@ No authorization required
342345
**200** | A successful response. | - |
343346
**400** | Request failed due to invalid input. | - |
344347
**401** | Not authenticated. | - |
348+
**403** | Forbidden. | - |
345349
**404** | Request failed due to incorrect path. | - |
346350
**409** | Request was aborted due a transaction conflict. | - |
347351
**422** | Request timed out due to excessive request throttling. | - |
@@ -423,6 +427,7 @@ No authorization required
423427
**200** | A successful response. | - |
424428
**400** | Request failed due to invalid input. | - |
425429
**401** | Not authenticated. | - |
430+
**403** | Forbidden. | - |
426431
**404** | Request failed due to incorrect path. | - |
427432
**409** | Request was aborted due a transaction conflict. | - |
428433
**422** | Request timed out due to excessive request throttling. | - |
@@ -506,6 +511,7 @@ No authorization required
506511
**200** | A successful response. | - |
507512
**400** | Request failed due to invalid input. | - |
508513
**401** | Not authenticated. | - |
514+
**403** | Forbidden. | - |
509515
**404** | Request failed due to incorrect path. | - |
510516
**409** | Request was aborted due a transaction conflict. | - |
511517
**422** | Request timed out due to excessive request throttling. | - |
@@ -588,6 +594,7 @@ No authorization required
588594
**200** | A successful response. | - |
589595
**400** | Request failed due to invalid input. | - |
590596
**401** | Not authenticated. | - |
597+
**403** | Forbidden. | - |
591598
**404** | Request failed due to incorrect path. | - |
592599
**409** | Request was aborted due a transaction conflict. | - |
593600
**422** | Request timed out due to excessive request throttling. | - |
@@ -671,6 +678,7 @@ No authorization required
671678
**200** | A successful response. | - |
672679
**400** | Request failed due to invalid input. | - |
673680
**401** | Not authenticated. | - |
681+
**403** | Forbidden. | - |
674682
**404** | Request failed due to incorrect path. | - |
675683
**409** | Request was aborted due a transaction conflict. | - |
676684
**422** | Request timed out due to excessive request throttling. | - |
@@ -754,6 +762,7 @@ No authorization required
754762
**200** | A successful response. | - |
755763
**400** | Request failed due to invalid input. | - |
756764
**401** | Not authenticated. | - |
765+
**403** | Forbidden. | - |
757766
**404** | Request failed due to incorrect path. | - |
758767
**409** | Request was aborted due a transaction conflict. | - |
759768
**422** | Request timed out due to excessive request throttling. | - |
@@ -837,6 +846,7 @@ No authorization required
837846
**200** | A successful response. | - |
838847
**400** | Request failed due to invalid input. | - |
839848
**401** | Not authenticated. | - |
849+
**403** | Forbidden. | - |
840850
**404** | Request failed due to incorrect path. | - |
841851
**409** | Request was aborted due a transaction conflict. | - |
842852
**422** | Request timed out due to excessive request throttling. | - |
@@ -920,6 +930,7 @@ No authorization required
920930
**200** | A successful response. | - |
921931
**400** | Request failed due to invalid input. | - |
922932
**401** | Not authenticated. | - |
933+
**403** | Forbidden. | - |
923934
**404** | Request failed due to incorrect path. | - |
924935
**409** | Request was aborted due a transaction conflict. | - |
925936
**422** | Request timed out due to excessive request throttling. | - |
@@ -1005,6 +1016,7 @@ No authorization required
10051016
**200** | A successful response. | - |
10061017
**400** | Request failed due to invalid input. | - |
10071018
**401** | Not authenticated. | - |
1019+
**403** | Forbidden. | - |
10081020
**404** | Request failed due to incorrect path. | - |
10091021
**409** | Request was aborted due a transaction conflict. | - |
10101022
**422** | Request timed out due to excessive request throttling. | - |
@@ -1092,6 +1104,7 @@ No authorization required
10921104
**200** | A successful response. | - |
10931105
**400** | Request failed due to invalid input. | - |
10941106
**401** | Not authenticated. | - |
1107+
**403** | Forbidden. | - |
10951108
**404** | Request failed due to incorrect path. | - |
10961109
**409** | Request was aborted due a transaction conflict. | - |
10971110
**422** | Request timed out due to excessive request throttling. | - |
@@ -1175,6 +1188,7 @@ No authorization required
11751188
**200** | A successful response. | - |
11761189
**400** | Request failed due to invalid input. | - |
11771190
**401** | Not authenticated. | - |
1191+
**403** | Forbidden. | - |
11781192
**404** | Request failed due to incorrect path. | - |
11791193
**409** | Request was aborted due a transaction conflict. | - |
11801194
**422** | Request timed out due to excessive request throttling. | - |
@@ -1259,6 +1273,7 @@ No authorization required
12591273
**204** | A successful response. | - |
12601274
**400** | Request failed due to invalid input. | - |
12611275
**401** | Not authenticated. | - |
1276+
**403** | Forbidden. | - |
12621277
**404** | Request failed due to incorrect path. | - |
12631278
**409** | Request was aborted due a transaction conflict. | - |
12641279
**422** | Request timed out due to excessive request throttling. | - |
@@ -1342,6 +1357,7 @@ No authorization required
13421357
**201** | A successful response. | - |
13431358
**400** | Request failed due to invalid input. | - |
13441359
**401** | Not authenticated. | - |
1360+
**403** | Forbidden. | - |
13451361
**404** | Request failed due to incorrect path. | - |
13461362
**409** | Request was aborted due a transaction conflict. | - |
13471363
**422** | Request timed out due to excessive request throttling. | - |

openfga_sdk/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
from openfga_sdk.models.any import Any
3030
from openfga_sdk.models.assertion import Assertion
3131
from openfga_sdk.models.assertion_tuple_key import AssertionTupleKey
32+
from openfga_sdk.models.auth_error_code import AuthErrorCode
3233
from openfga_sdk.models.authorization_model import AuthorizationModel
3334
from openfga_sdk.models.check_request import CheckRequest
3435
from openfga_sdk.models.check_request_tuple_key import CheckRequestTupleKey
@@ -47,6 +48,7 @@
4748
from openfga_sdk.models.expand_request_tuple_key import ExpandRequestTupleKey
4849
from openfga_sdk.models.expand_response import ExpandResponse
4950
from openfga_sdk.models.fga_object import FgaObject
51+
from openfga_sdk.models.forbidden_response import ForbiddenResponse
5052
from openfga_sdk.models.get_store_response import GetStoreResponse
5153
from openfga_sdk.models.internal_error_code import InternalErrorCode
5254
from openfga_sdk.models.internal_error_message_response import (

openfga_sdk/api/open_fga_api.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ async def check_with_http_info(self, body, **kwargs):
185185
200: "CheckResponse",
186186
400: "ValidationErrorMessageResponse",
187187
401: "UnauthenticatedResponse",
188+
403: "ForbiddenResponse",
188189
404: "PathUnknownErrorMessageResponse",
189190
409: "AbortedMessageResponse",
190191
422: "UnprocessableContentMessageResponse",
@@ -345,6 +346,7 @@ async def create_store_with_http_info(self, body, **kwargs):
345346
201: "CreateStoreResponse",
346347
400: "ValidationErrorMessageResponse",
347348
401: "UnauthenticatedResponse",
349+
403: "ForbiddenResponse",
348350
404: "PathUnknownErrorMessageResponse",
349351
409: "AbortedMessageResponse",
350352
422: "UnprocessableContentMessageResponse",
@@ -660,6 +662,7 @@ async def expand_with_http_info(self, body, **kwargs):
660662
200: "ExpandResponse",
661663
400: "ValidationErrorMessageResponse",
662664
401: "UnauthenticatedResponse",
665+
403: "ForbiddenResponse",
663666
404: "PathUnknownErrorMessageResponse",
664667
409: "AbortedMessageResponse",
665668
422: "UnprocessableContentMessageResponse",
@@ -810,6 +813,7 @@ async def get_store_with_http_info(self, **kwargs):
810813
200: "GetStoreResponse",
811814
400: "ValidationErrorMessageResponse",
812815
401: "UnauthenticatedResponse",
816+
403: "ForbiddenResponse",
813817
404: "PathUnknownErrorMessageResponse",
814818
409: "AbortedMessageResponse",
815819
422: "UnprocessableContentMessageResponse",
@@ -984,6 +988,7 @@ async def list_objects_with_http_info(self, body, **kwargs):
984988
200: "ListObjectsResponse",
985989
400: "ValidationErrorMessageResponse",
986990
401: "UnauthenticatedResponse",
991+
403: "ForbiddenResponse",
987992
404: "PathUnknownErrorMessageResponse",
988993
409: "AbortedMessageResponse",
989994
422: "UnprocessableContentMessageResponse",
@@ -1142,6 +1147,7 @@ async def list_stores_with_http_info(self, **kwargs):
11421147
200: "ListStoresResponse",
11431148
400: "ValidationErrorMessageResponse",
11441149
401: "UnauthenticatedResponse",
1150+
403: "ForbiddenResponse",
11451151
404: "PathUnknownErrorMessageResponse",
11461152
409: "AbortedMessageResponse",
11471153
422: "UnprocessableContentMessageResponse",
@@ -1316,6 +1322,7 @@ async def list_users_with_http_info(self, body, **kwargs):
13161322
200: "ListUsersResponse",
13171323
400: "ValidationErrorMessageResponse",
13181324
401: "UnauthenticatedResponse",
1325+
403: "ForbiddenResponse",
13191326
404: "PathUnknownErrorMessageResponse",
13201327
409: "AbortedMessageResponse",
13211328
422: "UnprocessableContentMessageResponse",
@@ -1489,6 +1496,7 @@ async def read_with_http_info(self, body, **kwargs):
14891496
200: "ReadResponse",
14901497
400: "ValidationErrorMessageResponse",
14911498
401: "UnauthenticatedResponse",
1499+
403: "ForbiddenResponse",
14921500
404: "PathUnknownErrorMessageResponse",
14931501
409: "AbortedMessageResponse",
14941502
422: "UnprocessableContentMessageResponse",
@@ -1658,6 +1666,7 @@ async def read_assertions_with_http_info(self, authorization_model_id, **kwargs)
16581666
200: "ReadAssertionsResponse",
16591667
400: "ValidationErrorMessageResponse",
16601668
401: "UnauthenticatedResponse",
1669+
403: "ForbiddenResponse",
16611670
404: "PathUnknownErrorMessageResponse",
16621671
409: "AbortedMessageResponse",
16631672
422: "UnprocessableContentMessageResponse",
@@ -1825,6 +1834,7 @@ async def read_authorization_model_with_http_info(self, id, **kwargs):
18251834
200: "ReadAuthorizationModelResponse",
18261835
400: "ValidationErrorMessageResponse",
18271836
401: "UnauthenticatedResponse",
1837+
403: "ForbiddenResponse",
18281838
404: "PathUnknownErrorMessageResponse",
18291839
409: "AbortedMessageResponse",
18301840
422: "UnprocessableContentMessageResponse",
@@ -1991,6 +2001,7 @@ async def read_authorization_models_with_http_info(self, **kwargs):
19912001
200: "ReadAuthorizationModelsResponse",
19922002
400: "ValidationErrorMessageResponse",
19932003
401: "UnauthenticatedResponse",
2004+
403: "ForbiddenResponse",
19942005
404: "PathUnknownErrorMessageResponse",
19952006
409: "AbortedMessageResponse",
19962007
422: "UnprocessableContentMessageResponse",
@@ -2161,6 +2172,7 @@ async def read_changes_with_http_info(self, **kwargs):
21612172
200: "ReadChangesResponse",
21622173
400: "ValidationErrorMessageResponse",
21632174
401: "UnauthenticatedResponse",
2175+
403: "ForbiddenResponse",
21642176
404: "PathUnknownErrorMessageResponse",
21652177
409: "AbortedMessageResponse",
21662178
422: "UnprocessableContentMessageResponse",
@@ -2334,6 +2346,7 @@ async def write_with_http_info(self, body, **kwargs):
23342346
200: "object",
23352347
400: "ValidationErrorMessageResponse",
23362348
401: "UnauthenticatedResponse",
2349+
403: "ForbiddenResponse",
23372350
404: "PathUnknownErrorMessageResponse",
23382351
409: "AbortedMessageResponse",
23392352
422: "UnprocessableContentMessageResponse",
@@ -2697,6 +2710,7 @@ async def write_authorization_model_with_http_info(self, body, **kwargs):
26972710
201: "WriteAuthorizationModelResponse",
26982711
400: "ValidationErrorMessageResponse",
26992712
401: "UnauthenticatedResponse",
2713+
403: "ForbiddenResponse",
27002714
404: "PathUnknownErrorMessageResponse",
27012715
409: "AbortedMessageResponse",
27022716
422: "UnprocessableContentMessageResponse",

openfga_sdk/models/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from openfga_sdk.models.any import Any
1515
from openfga_sdk.models.assertion import Assertion
1616
from openfga_sdk.models.assertion_tuple_key import AssertionTupleKey
17+
from openfga_sdk.models.auth_error_code import AuthErrorCode
1718
from openfga_sdk.models.authorization_model import AuthorizationModel
1819
from openfga_sdk.models.check_request import CheckRequest
1920
from openfga_sdk.models.check_request_tuple_key import CheckRequestTupleKey
@@ -32,6 +33,7 @@
3233
from openfga_sdk.models.expand_request_tuple_key import ExpandRequestTupleKey
3334
from openfga_sdk.models.expand_response import ExpandResponse
3435
from openfga_sdk.models.fga_object import FgaObject
36+
from openfga_sdk.models.forbidden_response import ForbiddenResponse
3537
from openfga_sdk.models.get_store_response import GetStoreResponse
3638
from openfga_sdk.models.internal_error_code import InternalErrorCode
3739
from openfga_sdk.models.internal_error_message_response import (

0 commit comments

Comments
 (0)