Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .openapi-generator-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,7 @@ openfga_sdk/api/open_fga_api
openfga_sdk/sync/open_fga_api.py
openfga_sdk/api_client.py
openfga_sdk/configuration.py
openfga_sdk/constants.py
openfga_sdk/exceptions.py
openfga_sdk/rest.py
openfga_sdk/rest.py
VERSION.txt
2 changes: 0 additions & 2 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
CONTRIBUTING.md
LICENSE
README.md
VERSION.txt
docs/AbortedMessageResponse.md
docs/Any.md
docs/Assertion.md
Expand Down Expand Up @@ -98,7 +97,6 @@ docs/WriteRequest.md
docs/WriteRequestDeletes.md
docs/WriteRequestWrites.md
openfga_sdk/api/open_fga_api.py
openfga_sdk/constants.py
openfga_sdk/models/__init__.py
openfga_sdk/models/aborted_message_response.py
openfga_sdk/models/any.py
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1381,6 +1381,7 @@ response = await fga_client.execute_api_request(
)
```


### Retries

If a network request fails with a 429 or 5xx error from the server, the SDK will automatically retry the request up to 3 times with a minimum wait time of 100 milliseconds between each attempt.
Expand Down
89 changes: 73 additions & 16 deletions openfga_sdk/api/open_fga_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,9 @@ async def batch_check_with_http_info(self, body, **kwargs):

local_var_params = locals()

all_params = ["body"]
all_params = [
"body",
]
all_params.extend(self._COMMON_PARAMS)

for key, val in local_var_params["kwargs"].items():
Expand All @@ -457,6 +459,7 @@ async def batch_check_with_http_info(self, body, **kwargs):
)
local_var_params[key] = val
del local_var_params["kwargs"]
# verify the required parameter 'body' is set
if (
self.api_client.client_side_validation
and local_var_params.get("body") is None
Expand Down Expand Up @@ -541,7 +544,9 @@ async def check_with_http_info(self, body, **kwargs):

local_var_params = locals()

all_params = ["body"]
all_params = [
"body",
]
all_params.extend(self._COMMON_PARAMS)

for key, val in local_var_params["kwargs"].items():
Expand All @@ -551,6 +556,7 @@ async def check_with_http_info(self, body, **kwargs):
)
local_var_params[key] = val
del local_var_params["kwargs"]
# verify the required parameter 'body' is set
if (
self.api_client.client_side_validation
and local_var_params.get("body") is None
Expand Down Expand Up @@ -635,7 +641,9 @@ async def create_store_with_http_info(self, body, **kwargs):

local_var_params = locals()

all_params = ["body"]
all_params = [
"body",
]
all_params.extend(self._COMMON_PARAMS)

for key, val in local_var_params["kwargs"].items():
Expand All @@ -645,6 +653,14 @@ async def create_store_with_http_info(self, body, **kwargs):
)
local_var_params[key] = val
del local_var_params["kwargs"]
# verify the required parameter 'body' is set
if (
self.api_client.client_side_validation
and local_var_params.get("body") is None
):
raise ApiValueError(
"Missing the required parameter `body` when calling `create_store`"
)
return await self._execute(
method="POST",
path="/stores",
Expand Down Expand Up @@ -799,7 +815,9 @@ async def expand_with_http_info(self, body, **kwargs):

local_var_params = locals()

all_params = ["body"]
all_params = [
"body",
]
all_params.extend(self._COMMON_PARAMS)

for key, val in local_var_params["kwargs"].items():
Expand All @@ -809,6 +827,7 @@ async def expand_with_http_info(self, body, **kwargs):
)
local_var_params[key] = val
del local_var_params["kwargs"]
# verify the required parameter 'body' is set
if (
self.api_client.client_side_validation
and local_var_params.get("body") is None
Expand Down Expand Up @@ -975,7 +994,9 @@ async def list_objects_with_http_info(self, body, **kwargs):

local_var_params = locals()

all_params = ["body"]
all_params = [
"body",
]
all_params.extend(self._COMMON_PARAMS)

for key, val in local_var_params["kwargs"].items():
Expand All @@ -985,6 +1006,7 @@ async def list_objects_with_http_info(self, body, **kwargs):
)
local_var_params[key] = val
del local_var_params["kwargs"]
# verify the required parameter 'body' is set
if (
self.api_client.client_side_validation
and local_var_params.get("body") is None
Expand Down Expand Up @@ -1077,7 +1099,11 @@ async def list_stores_with_http_info(self, **kwargs):

local_var_params = locals()

all_params = ["page_size", "continuation_token", "name"]
all_params = [
"page_size",
"continuation_token",
"name",
]
all_params.extend(self._COMMON_PARAMS)

for key, val in local_var_params["kwargs"].items():
Expand Down Expand Up @@ -1168,7 +1194,9 @@ async def list_users_with_http_info(self, body, **kwargs):

local_var_params = locals()

all_params = ["body"]
all_params = [
"body",
]
all_params.extend(self._COMMON_PARAMS)

for key, val in local_var_params["kwargs"].items():
Expand All @@ -1178,6 +1206,7 @@ async def list_users_with_http_info(self, body, **kwargs):
)
local_var_params[key] = val
del local_var_params["kwargs"]
# verify the required parameter 'body' is set
if (
self.api_client.client_side_validation
and local_var_params.get("body") is None
Expand Down Expand Up @@ -1262,7 +1291,9 @@ async def read_with_http_info(self, body, **kwargs):

local_var_params = locals()

all_params = ["body"]
all_params = [
"body",
]
all_params.extend(self._COMMON_PARAMS)

for key, val in local_var_params["kwargs"].items():
Expand All @@ -1272,6 +1303,7 @@ async def read_with_http_info(self, body, **kwargs):
)
local_var_params[key] = val
del local_var_params["kwargs"]
# verify the required parameter 'body' is set
if (
self.api_client.client_side_validation
and local_var_params.get("body") is None
Expand Down Expand Up @@ -1358,7 +1390,9 @@ async def read_assertions_with_http_info(self, authorization_model_id, **kwargs)

local_var_params = locals()

all_params = ["authorization_model_id"]
all_params = [
"authorization_model_id",
]
all_params.extend(self._COMMON_PARAMS)

for key, val in local_var_params["kwargs"].items():
Expand Down Expand Up @@ -1451,7 +1485,9 @@ async def read_authorization_model_with_http_info(self, id, **kwargs):

local_var_params = locals()

all_params = ["id"]
all_params = [
"id",
]
all_params.extend(self._COMMON_PARAMS)

for key, val in local_var_params["kwargs"].items():
Expand Down Expand Up @@ -1548,7 +1584,10 @@ async def read_authorization_models_with_http_info(self, **kwargs):

local_var_params = locals()

all_params = ["page_size", "continuation_token"]
all_params = [
"page_size",
"continuation_token",
]
all_params.extend(self._COMMON_PARAMS)

for key, val in local_var_params["kwargs"].items():
Expand Down Expand Up @@ -1654,7 +1693,12 @@ async def read_changes_with_http_info(self, **kwargs):

local_var_params = locals()

all_params = ["type", "page_size", "continuation_token", "start_time"]
all_params = [
"type",
"page_size",
"continuation_token",
"start_time",
]
all_params.extend(self._COMMON_PARAMS)

for key, val in local_var_params["kwargs"].items():
Expand Down Expand Up @@ -1752,7 +1796,9 @@ async def streamed_list_objects_with_http_info(self, body, **kwargs):

local_var_params = locals()

all_params = ["body"]
all_params = [
"body",
]
all_params.extend(self._COMMON_PARAMS)

for key, val in local_var_params["kwargs"].items():
Expand All @@ -1762,6 +1808,7 @@ async def streamed_list_objects_with_http_info(self, body, **kwargs):
)
local_var_params[key] = val
del local_var_params["kwargs"]
# verify the required parameter 'body' is set
if (
self.api_client.client_side_validation
and local_var_params.get("body") is None
Expand Down Expand Up @@ -1846,7 +1893,9 @@ async def write_with_http_info(self, body, **kwargs):

local_var_params = locals()

all_params = ["body"]
all_params = [
"body",
]
all_params.extend(self._COMMON_PARAMS)

for key, val in local_var_params["kwargs"].items():
Expand All @@ -1856,6 +1905,7 @@ async def write_with_http_info(self, body, **kwargs):
)
local_var_params[key] = val
del local_var_params["kwargs"]
# verify the required parameter 'body' is set
if (
self.api_client.client_side_validation
and local_var_params.get("body") is None
Expand Down Expand Up @@ -1948,7 +1998,10 @@ async def write_assertions_with_http_info(

local_var_params = locals()

all_params = ["authorization_model_id", "body"]
all_params = [
"authorization_model_id",
"body",
]
all_params.extend(self._COMMON_PARAMS)

for key, val in local_var_params["kwargs"].items():
Expand All @@ -1965,6 +2018,7 @@ async def write_assertions_with_http_info(
raise ApiValueError(
"Missing the required parameter `authorization_model_id` when calling `write_assertions`"
)
# verify the required parameter 'body' is set
if (
self.api_client.client_side_validation
and local_var_params.get("body") is None
Expand Down Expand Up @@ -2049,7 +2103,9 @@ async def write_authorization_model_with_http_info(self, body, **kwargs):

local_var_params = locals()

all_params = ["body"]
all_params = [
"body",
]
all_params.extend(self._COMMON_PARAMS)

for key, val in local_var_params["kwargs"].items():
Expand All @@ -2059,6 +2115,7 @@ async def write_authorization_model_with_http_info(self, body, **kwargs):
)
local_var_params[key] = val
del local_var_params["kwargs"]
# verify the required parameter 'body' is set
if (
self.api_client.client_side_validation
and local_var_params.get("body") is None
Expand Down
Loading