diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 1289c29..1a629e6 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -50,7 +50,6 @@ docs/Node.md docs/Nodes.md docs/NotFoundErrorCode.md docs/NullValue.md -docs/ObjectOrUserset.md docs/ObjectRelation.md docs/OpenFgaApi.md docs/PathUnknownErrorMessageResponse.md @@ -163,7 +162,6 @@ openfga_sdk/models/node.py openfga_sdk/models/nodes.py openfga_sdk/models/not_found_error_code.py openfga_sdk/models/null_value.py -openfga_sdk/models/object_or_userset.py openfga_sdk/models/object_relation.py openfga_sdk/models/path_unknown_error_message_response.py openfga_sdk/models/read_assertions_response.py diff --git a/README.md b/README.md index 99e73d1..44812d7 100644 --- a/README.md +++ b/README.md @@ -951,7 +951,6 @@ async with OpenFgaClient(configuration) as api_client: response = await api_client.list_users(request, options) # response.users = [{object: {type: "user", id: "81684243-9356-4421-8fbf-a4f8d36aa31b"}}, {userset: { type: "user" }}, ...] - # response.excluded_users = [ {object: {type: "user", id: "4a455e27-d15a-4434-82e0-136f9c2aa4cf"}}, ... ] ``` #### Assertions @@ -1093,7 +1092,6 @@ Class | Method | HTTP request | Description - [Nodes](https://github.com/openfga/python-sdk/blob/main/docs/Nodes.md) - [NotFoundErrorCode](https://github.com/openfga/python-sdk/blob/main/docs/NotFoundErrorCode.md) - [NullValue](https://github.com/openfga/python-sdk/blob/main/docs/NullValue.md) - - [ObjectOrUserset](https://github.com/openfga/python-sdk/blob/main/docs/ObjectOrUserset.md) - [ObjectRelation](https://github.com/openfga/python-sdk/blob/main/docs/ObjectRelation.md) - [PathUnknownErrorMessageResponse](https://github.com/openfga/python-sdk/blob/main/docs/PathUnknownErrorMessageResponse.md) - [ReadAssertionsResponse](https://github.com/openfga/python-sdk/blob/main/docs/ReadAssertionsResponse.md) diff --git a/docs/ListUsersResponse.md b/docs/ListUsersResponse.md index 6a82454..e35a987 100644 --- a/docs/ListUsersResponse.md +++ b/docs/ListUsersResponse.md @@ -5,7 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **users** | [**list[User]**](User.md) | | -**excluded_users** | [**list[ObjectOrUserset]**](ObjectOrUserset.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ObjectOrUserset.md b/docs/ObjectOrUserset.md deleted file mode 100644 index 8540631..0000000 --- a/docs/ObjectOrUserset.md +++ /dev/null @@ -1,12 +0,0 @@ -# ObjectOrUserset - - -## Properties -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**object** | [**FgaObject**](FgaObject.md) | | [optional] -**userset** | [**UsersetUser**](UsersetUser.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/OpenFgaApi.md b/docs/OpenFgaApi.md index c495d95..985e537 100644 --- a/docs/OpenFgaApi.md +++ b/docs/OpenFgaApi.md @@ -600,7 +600,7 @@ No authorization required [EXPERIMENTAL] List the users matching the provided filter who have a certain relation to a particular type. -The ListUsers API returns a list of all the users of a specific type that have a relation to a given object. This API is available in an experimental capacity and can be enabled with the `--experimentals enable-list-users` flag. To arrive at a result, the API uses: an authorization model, explicit tuples written through the Write API, contextual tuples present in the request, and implicit tuples that exist by virtue of applying set theory (such as `document:2021-budget#viewer@document:2021-budget#viewer`; the set of users who are viewers of `document:2021-budget` are the set of users who are the viewers of `document:2021-budget`). An `authorization_model_id` may be specified in the body. If it is not specified, the latest authorization model ID will be used. It is strongly recommended to specify authorization model id for better performance. You may also specify `contextual_tuples` that will be treated as regular tuples. Each of these tuples may have an associated `condition`. You may also provide a `context` object that will be used to evaluate the conditioned tuples in the system. It is strongly recommended to provide a value for all the input parameters of all the conditions, to ensure that all tuples be evaluated correctly. The response will contain the related users in an array in the \"users\" field of the response. These results may include specific objects, usersets or type-bound public access. Each of these types of results is encoded in its own type and not represented as a string.In certain cases of negation via the `but not` operator, some results are marked as excluded from the main set of results. These exclusions are returned in the `excluded_users` property and should be handled appropriately at the point of implementation.The number of users in the response array will be limited by the execution timeout specified in the flag OPENFGA_LIST_USERS_DEADLINE and by the upper bound specified in the flag OPENFGA_LIST_USERS_MAX_RESULTS, whichever is hit first. The returned users will not be sorted, and therefore two identical calls may yield different sets of users. +The ListUsers API returns a list of all the users of a specific type that have a relation to a given object. This API is available in an experimental capacity and can be enabled with the `--experimentals enable-list-users` flag. To arrive at a result, the API uses: an authorization model, explicit tuples written through the Write API, contextual tuples present in the request, and implicit tuples that exist by virtue of applying set theory (such as `document:2021-budget#viewer@document:2021-budget#viewer`; the set of users who are viewers of `document:2021-budget` are the set of users who are the viewers of `document:2021-budget`). An `authorization_model_id` may be specified in the body. If it is not specified, the latest authorization model ID will be used. It is strongly recommended to specify authorization model id for better performance. You may also specify `contextual_tuples` that will be treated as regular tuples. Each of these tuples may have an associated `condition`. You may also provide a `context` object that will be used to evaluate the conditioned tuples in the system. It is strongly recommended to provide a value for all the input parameters of all the conditions, to ensure that all tuples be evaluated correctly. The response will contain the related users in an array in the \"users\" field of the response. These results may include specific objects, usersets or type-bound public access. Each of these types of results is encoded in its own type and not represented as a string.In cases where a type-bound public acces result is returned (e.g. `user:*`), it cannot be inferred that all subjects of that type have a relation to the object; it is possible that negations exist and checks should still be queried on individual subjects to ensure access to that document.The number of users in the response array will be limited by the execution timeout specified in the flag OPENFGA_LIST_USERS_DEADLINE and by the upper bound specified in the flag OPENFGA_LIST_USERS_MAX_RESULTS, whichever is hit first. The returned users will not be sorted, and therefore two identical calls may yield different sets of users. ### Example diff --git a/openfga_sdk/__init__.py b/openfga_sdk/__init__.py index efec98d..02461be 100644 --- a/openfga_sdk/__init__.py +++ b/openfga_sdk/__init__.py @@ -62,7 +62,6 @@ from openfga_sdk.models.nodes import Nodes from openfga_sdk.models.not_found_error_code import NotFoundErrorCode from openfga_sdk.models.null_value import NullValue -from openfga_sdk.models.object_or_userset import ObjectOrUserset from openfga_sdk.models.object_relation import ObjectRelation from openfga_sdk.models.path_unknown_error_message_response import ( PathUnknownErrorMessageResponse, diff --git a/openfga_sdk/api/open_fga_api.py b/openfga_sdk/api/open_fga_api.py index 354e004..112f42d 100644 --- a/openfga_sdk/api/open_fga_api.py +++ b/openfga_sdk/api/open_fga_api.py @@ -1098,7 +1098,7 @@ async def list_stores_with_http_info(self, **kwargs): async def list_users(self, body, **kwargs): """[EXPERIMENTAL] List the users matching the provided filter who have a certain relation to a particular type. - The ListUsers API returns a list of all the users of a specific type that have a relation to a given object. This API is available in an experimental capacity and can be enabled with the `--experimentals enable-list-users` flag. To arrive at a result, the API uses: an authorization model, explicit tuples written through the Write API, contextual tuples present in the request, and implicit tuples that exist by virtue of applying set theory (such as `document:2021-budget#viewer@document:2021-budget#viewer`; the set of users who are viewers of `document:2021-budget` are the set of users who are the viewers of `document:2021-budget`). An `authorization_model_id` may be specified in the body. If it is not specified, the latest authorization model ID will be used. It is strongly recommended to specify authorization model id for better performance. You may also specify `contextual_tuples` that will be treated as regular tuples. Each of these tuples may have an associated `condition`. You may also provide a `context` object that will be used to evaluate the conditioned tuples in the system. It is strongly recommended to provide a value for all the input parameters of all the conditions, to ensure that all tuples be evaluated correctly. The response will contain the related users in an array in the \"users\" field of the response. These results may include specific objects, usersets or type-bound public access. Each of these types of results is encoded in its own type and not represented as a string.In certain cases of negation via the `but not` operator, some results are marked as excluded from the main set of results. These exclusions are returned in the `excluded_users` property and should be handled appropriately at the point of implementation.The number of users in the response array will be limited by the execution timeout specified in the flag OPENFGA_LIST_USERS_DEADLINE and by the upper bound specified in the flag OPENFGA_LIST_USERS_MAX_RESULTS, whichever is hit first. The returned users will not be sorted, and therefore two identical calls may yield different sets of users. + The ListUsers API returns a list of all the users of a specific type that have a relation to a given object. This API is available in an experimental capacity and can be enabled with the `--experimentals enable-list-users` flag. To arrive at a result, the API uses: an authorization model, explicit tuples written through the Write API, contextual tuples present in the request, and implicit tuples that exist by virtue of applying set theory (such as `document:2021-budget#viewer@document:2021-budget#viewer`; the set of users who are viewers of `document:2021-budget` are the set of users who are the viewers of `document:2021-budget`). An `authorization_model_id` may be specified in the body. If it is not specified, the latest authorization model ID will be used. It is strongly recommended to specify authorization model id for better performance. You may also specify `contextual_tuples` that will be treated as regular tuples. Each of these tuples may have an associated `condition`. You may also provide a `context` object that will be used to evaluate the conditioned tuples in the system. It is strongly recommended to provide a value for all the input parameters of all the conditions, to ensure that all tuples be evaluated correctly. The response will contain the related users in an array in the \"users\" field of the response. These results may include specific objects, usersets or type-bound public access. Each of these types of results is encoded in its own type and not represented as a string.In cases where a type-bound public acces result is returned (e.g. `user:*`), it cannot be inferred that all subjects of that type have a relation to the object; it is possible that negations exist and checks should still be queried on individual subjects to ensure access to that document.The number of users in the response array will be limited by the execution timeout specified in the flag OPENFGA_LIST_USERS_DEADLINE and by the upper bound specified in the flag OPENFGA_LIST_USERS_MAX_RESULTS, whichever is hit first. The returned users will not be sorted, and therefore two identical calls may yield different sets of users. >>> thread = await api.list_users(body) @@ -1125,7 +1125,7 @@ async def list_users(self, body, **kwargs): async def list_users_with_http_info(self, body, **kwargs): """[EXPERIMENTAL] List the users matching the provided filter who have a certain relation to a particular type. - The ListUsers API returns a list of all the users of a specific type that have a relation to a given object. This API is available in an experimental capacity and can be enabled with the `--experimentals enable-list-users` flag. To arrive at a result, the API uses: an authorization model, explicit tuples written through the Write API, contextual tuples present in the request, and implicit tuples that exist by virtue of applying set theory (such as `document:2021-budget#viewer@document:2021-budget#viewer`; the set of users who are viewers of `document:2021-budget` are the set of users who are the viewers of `document:2021-budget`). An `authorization_model_id` may be specified in the body. If it is not specified, the latest authorization model ID will be used. It is strongly recommended to specify authorization model id for better performance. You may also specify `contextual_tuples` that will be treated as regular tuples. Each of these tuples may have an associated `condition`. You may also provide a `context` object that will be used to evaluate the conditioned tuples in the system. It is strongly recommended to provide a value for all the input parameters of all the conditions, to ensure that all tuples be evaluated correctly. The response will contain the related users in an array in the \"users\" field of the response. These results may include specific objects, usersets or type-bound public access. Each of these types of results is encoded in its own type and not represented as a string.In certain cases of negation via the `but not` operator, some results are marked as excluded from the main set of results. These exclusions are returned in the `excluded_users` property and should be handled appropriately at the point of implementation.The number of users in the response array will be limited by the execution timeout specified in the flag OPENFGA_LIST_USERS_DEADLINE and by the upper bound specified in the flag OPENFGA_LIST_USERS_MAX_RESULTS, whichever is hit first. The returned users will not be sorted, and therefore two identical calls may yield different sets of users. + The ListUsers API returns a list of all the users of a specific type that have a relation to a given object. This API is available in an experimental capacity and can be enabled with the `--experimentals enable-list-users` flag. To arrive at a result, the API uses: an authorization model, explicit tuples written through the Write API, contextual tuples present in the request, and implicit tuples that exist by virtue of applying set theory (such as `document:2021-budget#viewer@document:2021-budget#viewer`; the set of users who are viewers of `document:2021-budget` are the set of users who are the viewers of `document:2021-budget`). An `authorization_model_id` may be specified in the body. If it is not specified, the latest authorization model ID will be used. It is strongly recommended to specify authorization model id for better performance. You may also specify `contextual_tuples` that will be treated as regular tuples. Each of these tuples may have an associated `condition`. You may also provide a `context` object that will be used to evaluate the conditioned tuples in the system. It is strongly recommended to provide a value for all the input parameters of all the conditions, to ensure that all tuples be evaluated correctly. The response will contain the related users in an array in the \"users\" field of the response. These results may include specific objects, usersets or type-bound public access. Each of these types of results is encoded in its own type and not represented as a string.In cases where a type-bound public acces result is returned (e.g. `user:*`), it cannot be inferred that all subjects of that type have a relation to the object; it is possible that negations exist and checks should still be queried on individual subjects to ensure access to that document.The number of users in the response array will be limited by the execution timeout specified in the flag OPENFGA_LIST_USERS_DEADLINE and by the upper bound specified in the flag OPENFGA_LIST_USERS_MAX_RESULTS, whichever is hit first. The returned users will not be sorted, and therefore two identical calls may yield different sets of users. >>> thread = api.list_users_with_http_info(body) diff --git a/openfga_sdk/models/__init__.py b/openfga_sdk/models/__init__.py index dce87a6..630591b 100644 --- a/openfga_sdk/models/__init__.py +++ b/openfga_sdk/models/__init__.py @@ -47,7 +47,6 @@ from openfga_sdk.models.nodes import Nodes from openfga_sdk.models.not_found_error_code import NotFoundErrorCode from openfga_sdk.models.null_value import NullValue -from openfga_sdk.models.object_or_userset import ObjectOrUserset from openfga_sdk.models.object_relation import ObjectRelation from openfga_sdk.models.path_unknown_error_message_response import ( PathUnknownErrorMessageResponse, diff --git a/openfga_sdk/models/list_users_response.py b/openfga_sdk/models/list_users_response.py index a6ce51f..5cd3aed 100644 --- a/openfga_sdk/models/list_users_response.py +++ b/openfga_sdk/models/list_users_response.py @@ -33,22 +33,20 @@ class ListUsersResponse: attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"users": "list[User]", "excluded_users": "list[ObjectOrUserset]"} + openapi_types = {"users": "list[User]"} - attribute_map = {"users": "users", "excluded_users": "excluded_users"} + attribute_map = {"users": "users"} - def __init__(self, users=None, excluded_users=None, local_vars_configuration=None): + def __init__(self, users=None, local_vars_configuration=None): """ListUsersResponse - a model defined in OpenAPI""" if local_vars_configuration is None: local_vars_configuration = Configuration.get_default_copy() self.local_vars_configuration = local_vars_configuration self._users = None - self._excluded_users = None self.discriminator = None self.users = users - self.excluded_users = excluded_users @property def users(self): @@ -73,32 +71,6 @@ def users(self, users): self._users = users - @property - def excluded_users(self): - """Gets the excluded_users of this ListUsersResponse. - - - :return: The excluded_users of this ListUsersResponse. - :rtype: list[ObjectOrUserset] - """ - return self._excluded_users - - @excluded_users.setter - def excluded_users(self, excluded_users): - """Sets the excluded_users of this ListUsersResponse. - - - :param excluded_users: The excluded_users of this ListUsersResponse. - :type excluded_users: list[ObjectOrUserset] - """ - if ( - self.local_vars_configuration.client_side_validation - and excluded_users is None - ): - raise ValueError("Invalid value for `excluded_users`, must not be `None`") - - self._excluded_users = excluded_users - def to_dict(self, serialize=False): """Returns the model properties as a dict""" result = {} diff --git a/openfga_sdk/models/object_or_userset.py b/openfga_sdk/models/object_or_userset.py deleted file mode 100644 index 2a35551..0000000 --- a/openfga_sdk/models/object_or_userset.py +++ /dev/null @@ -1,145 +0,0 @@ -""" - Python SDK for OpenFGA - - API version: 1.x - Website: https://openfga.dev - Documentation: https://openfga.dev/docs - Support: https://openfga.dev/community - License: [Apache-2.0](https://github.com/openfga/python-sdk/blob/main/LICENSE) - - NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. -""" - -try: - from inspect import getfullargspec -except ImportError: - from inspect import getargspec as getfullargspec -import pprint - -from openfga_sdk.configuration import Configuration - - -class ObjectOrUserset: - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_types (dict): The key is attribute name - and the value is attribute type. - attribute_map (dict): The key is attribute name - and the value is json key in definition. - """ - openapi_types = {"object": "FgaObject", "userset": "UsersetUser"} - - attribute_map = {"object": "object", "userset": "userset"} - - def __init__(self, object=None, userset=None, local_vars_configuration=None): - """ObjectOrUserset - a model defined in OpenAPI""" - if local_vars_configuration is None: - local_vars_configuration = Configuration.get_default_copy() - self.local_vars_configuration = local_vars_configuration - - self._object = None - self._userset = None - self.discriminator = None - - if object is not None: - self.object = object - if userset is not None: - self.userset = userset - - @property - def object(self): - """Gets the object of this ObjectOrUserset. - - - :return: The object of this ObjectOrUserset. - :rtype: FgaObject - """ - return self._object - - @object.setter - def object(self, object): - """Sets the object of this ObjectOrUserset. - - - :param object: The object of this ObjectOrUserset. - :type object: FgaObject - """ - - self._object = object - - @property - def userset(self): - """Gets the userset of this ObjectOrUserset. - - - :return: The userset of this ObjectOrUserset. - :rtype: UsersetUser - """ - return self._userset - - @userset.setter - def userset(self, userset): - """Sets the userset of this ObjectOrUserset. - - - :param userset: The userset of this ObjectOrUserset. - :type userset: UsersetUser - """ - - self._userset = userset - - def to_dict(self, serialize=False): - """Returns the model properties as a dict""" - result = {} - - def convert(x): - if hasattr(x, "to_dict"): - args = getfullargspec(x.to_dict).args - if len(args) == 1: - return x.to_dict() - else: - return x.to_dict(serialize) - else: - return x - - for attr, _ in self.openapi_types.items(): - value = getattr(self, attr) - attr = self.attribute_map.get(attr, attr) if serialize else attr - if isinstance(value, list): - result[attr] = list(map(lambda x: convert(x), value)) - elif isinstance(value, dict): - result[attr] = dict( - map(lambda item: (item[0], convert(item[1])), value.items()) - ) - else: - result[attr] = convert(value) - - return result - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, ObjectOrUserset): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, ObjectOrUserset): - return True - - return self.to_dict() != other.to_dict() diff --git a/openfga_sdk/sync/open_fga_api.py b/openfga_sdk/sync/open_fga_api.py index e771541..0e8ab22 100644 --- a/openfga_sdk/sync/open_fga_api.py +++ b/openfga_sdk/sync/open_fga_api.py @@ -10,6 +10,7 @@ NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ + from openfga_sdk.exceptions import ApiValueError, FgaValidationException from openfga_sdk.sync.api_client import ApiClient from openfga_sdk.sync.oauth2 import OAuth2Client @@ -1098,7 +1099,7 @@ def list_stores_with_http_info(self, **kwargs): def list_users(self, body, **kwargs): """[EXPERIMENTAL] List the users matching the provided filter who have a certain relation to a particular type. - The ListUsers API returns a list of all the users of a specific type that have a relation to a given object. This API is available in an experimental capacity and can be enabled with the `--experimentals enable-list-users` flag. To arrive at a result, the API uses: an authorization model, explicit tuples written through the Write API, contextual tuples present in the request, and implicit tuples that exist by virtue of applying set theory (such as `document:2021-budget#viewer@document:2021-budget#viewer`; the set of users who are viewers of `document:2021-budget` are the set of users who are the viewers of `document:2021-budget`). An `authorization_model_id` may be specified in the body. If it is not specified, the latest authorization model ID will be used. It is strongly recommended to specify authorization model id for better performance. You may also specify `contextual_tuples` that will be treated as regular tuples. Each of these tuples may have an associated `condition`. You may also provide a `context` object that will be used to evaluate the conditioned tuples in the system. It is strongly recommended to provide a value for all the input parameters of all the conditions, to ensure that all tuples be evaluated correctly. The response will contain the related users in an array in the \"users\" field of the response. These results may include specific objects, usersets or type-bound public access. Each of these types of results is encoded in its own type and not represented as a string.In certain cases of negation via the `but not` operator, some results are marked as excluded from the main set of results. These exclusions are returned in the `excluded_users` property and should be handled appropriately at the point of implementation.The number of users in the response array will be limited by the execution timeout specified in the flag OPENFGA_LIST_USERS_DEADLINE and by the upper bound specified in the flag OPENFGA_LIST_USERS_MAX_RESULTS, whichever is hit first. The returned users will not be sorted, and therefore two identical calls may yield different sets of users. + The ListUsers API returns a list of all the users of a specific type that have a relation to a given object. This API is available in an experimental capacity and can be enabled with the `--experimentals enable-list-users` flag. To arrive at a result, the API uses: an authorization model, explicit tuples written through the Write API, contextual tuples present in the request, and implicit tuples that exist by virtue of applying set theory (such as `document:2021-budget#viewer@document:2021-budget#viewer`; the set of users who are viewers of `document:2021-budget` are the set of users who are the viewers of `document:2021-budget`). An `authorization_model_id` may be specified in the body. If it is not specified, the latest authorization model ID will be used. It is strongly recommended to specify authorization model id for better performance. You may also specify `contextual_tuples` that will be treated as regular tuples. Each of these tuples may have an associated `condition`. You may also provide a `context` object that will be used to evaluate the conditioned tuples in the system. It is strongly recommended to provide a value for all the input parameters of all the conditions, to ensure that all tuples be evaluated correctly. The response will contain the related users in an array in the \"users\" field of the response. These results may include specific objects, usersets or type-bound public access. Each of these types of results is encoded in its own type and not represented as a string.In cases where a type-bound public acces result is returned (e.g. `user:*`), it cannot be inferred that all subjects of that type have a relation to the object; it is possible that negations exist and checks should still be queried on individual subjects to ensure access to that document.The number of users in the response array will be limited by the execution timeout specified in the flag OPENFGA_LIST_USERS_DEADLINE and by the upper bound specified in the flag OPENFGA_LIST_USERS_MAX_RESULTS, whichever is hit first. The returned users will not be sorted, and therefore two identical calls may yield different sets of users. >>> thread = api.list_users(body) @@ -1125,7 +1126,7 @@ def list_users(self, body, **kwargs): def list_users_with_http_info(self, body, **kwargs): """[EXPERIMENTAL] List the users matching the provided filter who have a certain relation to a particular type. - The ListUsers API returns a list of all the users of a specific type that have a relation to a given object. This API is available in an experimental capacity and can be enabled with the `--experimentals enable-list-users` flag. To arrive at a result, the API uses: an authorization model, explicit tuples written through the Write API, contextual tuples present in the request, and implicit tuples that exist by virtue of applying set theory (such as `document:2021-budget#viewer@document:2021-budget#viewer`; the set of users who are viewers of `document:2021-budget` are the set of users who are the viewers of `document:2021-budget`). An `authorization_model_id` may be specified in the body. If it is not specified, the latest authorization model ID will be used. It is strongly recommended to specify authorization model id for better performance. You may also specify `contextual_tuples` that will be treated as regular tuples. Each of these tuples may have an associated `condition`. You may also provide a `context` object that will be used to evaluate the conditioned tuples in the system. It is strongly recommended to provide a value for all the input parameters of all the conditions, to ensure that all tuples be evaluated correctly. The response will contain the related users in an array in the \"users\" field of the response. These results may include specific objects, usersets or type-bound public access. Each of these types of results is encoded in its own type and not represented as a string.In certain cases of negation via the `but not` operator, some results are marked as excluded from the main set of results. These exclusions are returned in the `excluded_users` property and should be handled appropriately at the point of implementation.The number of users in the response array will be limited by the execution timeout specified in the flag OPENFGA_LIST_USERS_DEADLINE and by the upper bound specified in the flag OPENFGA_LIST_USERS_MAX_RESULTS, whichever is hit first. The returned users will not be sorted, and therefore two identical calls may yield different sets of users. + The ListUsers API returns a list of all the users of a specific type that have a relation to a given object. This API is available in an experimental capacity and can be enabled with the `--experimentals enable-list-users` flag. To arrive at a result, the API uses: an authorization model, explicit tuples written through the Write API, contextual tuples present in the request, and implicit tuples that exist by virtue of applying set theory (such as `document:2021-budget#viewer@document:2021-budget#viewer`; the set of users who are viewers of `document:2021-budget` are the set of users who are the viewers of `document:2021-budget`). An `authorization_model_id` may be specified in the body. If it is not specified, the latest authorization model ID will be used. It is strongly recommended to specify authorization model id for better performance. You may also specify `contextual_tuples` that will be treated as regular tuples. Each of these tuples may have an associated `condition`. You may also provide a `context` object that will be used to evaluate the conditioned tuples in the system. It is strongly recommended to provide a value for all the input parameters of all the conditions, to ensure that all tuples be evaluated correctly. The response will contain the related users in an array in the \"users\" field of the response. These results may include specific objects, usersets or type-bound public access. Each of these types of results is encoded in its own type and not represented as a string.In cases where a type-bound public acces result is returned (e.g. `user:*`), it cannot be inferred that all subjects of that type have a relation to the object; it is possible that negations exist and checks should still be queried on individual subjects to ensure access to that document.The number of users in the response array will be limited by the execution timeout specified in the flag OPENFGA_LIST_USERS_DEADLINE and by the upper bound specified in the flag OPENFGA_LIST_USERS_MAX_RESULTS, whichever is hit first. The returned users will not be sorted, and therefore two identical calls may yield different sets of users. >>> thread = api.list_users_with_http_info(body) diff --git a/test/test_client.py b/test/test_client.py index 4228171..e4171aa 100644 --- a/test/test_client.py +++ b/test/test_client.py @@ -2400,7 +2400,6 @@ async def test_list_users(self, mock_request): """ response_body = """{ - "excluded_users": [], "users": [ { "object": { diff --git a/test/test_client_sync.py b/test/test_client_sync.py index 3fcb593..5138db5 100644 --- a/test/test_client_sync.py +++ b/test/test_client_sync.py @@ -2401,7 +2401,6 @@ def test_list_users(self, mock_request): """ response_body = """{ - "excluded_users": [], "users": [ { "object": { diff --git a/test/test_open_fga_api.py b/test/test_open_fga_api.py index 991b29d..5a822fc 100644 --- a/test/test_open_fga_api.py +++ b/test/test_open_fga_api.py @@ -431,7 +431,6 @@ async def test_list_users(self, mock_request): """ response_body = """{ - "excluded_users": [], "users": [ { "object": { diff --git a/test/test_open_fga_api_sync.py b/test/test_open_fga_api_sync.py index 7ba9b1f..0a1ebce 100644 --- a/test/test_open_fga_api_sync.py +++ b/test/test_open_fga_api_sync.py @@ -432,7 +432,6 @@ async def test_list_users(self, mock_request): """ response_body = """{ - "excluded_users": [], "users": [ { "object": {