From 36bd43e0361ceff7245afbcd5d24c4760dac4d71 Mon Sep 17 00:00:00 2001 From: Raghd Hamzeh Date: Tue, 17 Jan 2023 17:45:30 -0500 Subject: [PATCH] release: v0.1.1 with upgrade dependencies --- CHANGELOG.md | 6 ++ README.md | 138 ++++++++++++++++---------------- VERSION.txt | 2 +- docs/OpenFgaApi.md | 8 +- openfga_sdk/__init__.py | 2 +- openfga_sdk/api/open_fga_api.py | 8 +- openfga_sdk/api_client.py | 2 +- openfga_sdk/configuration.py | 2 +- openfga_sdk/credentials.py | 2 +- requirements.txt | 10 +-- setup.py | 2 +- test/test_credentials.py | 2 +- test/test_open_fga_api.py | 4 +- 13 files changed, 97 insertions(+), 91 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f6c775d..4691b1b 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## v0.1.1 + +### [0.1.1](https://github.com/openfga/python-sdk/compare/v0.1.0...v0.1.1) (2023-01-17) + +- chore(deps): upgrade dependencies + ## v0.1.0 ### [0.1.0](https://github.com/openfga/python-sdk/compare/v0.0.1...v0.1.0) (2022-12-14) diff --git a/README.md b/README.md index 097d65c..ddb4223 100755 --- a/README.md +++ b/README.md @@ -655,81 +655,81 @@ async def list_objects(): Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*OpenFgaApi* | [**check**](docs/OpenFgaApi.md#check) | **POST** /stores/{store_id}/check | Check whether a user is authorized to access an object -*OpenFgaApi* | [**create_store**](docs/OpenFgaApi.md#create_store) | **POST** /stores | Create a store -*OpenFgaApi* | [**delete_store**](docs/OpenFgaApi.md#delete_store) | **DELETE** /stores/{store_id} | Delete a store -*OpenFgaApi* | [**expand**](docs/OpenFgaApi.md#expand) | **POST** /stores/{store_id}/expand | Expand all relationships in userset tree format, and following userset rewrite rules. Useful to reason about and debug a certain relationship -*OpenFgaApi* | [**get_store**](docs/OpenFgaApi.md#get_store) | **GET** /stores/{store_id} | Get a store -*OpenFgaApi* | [**list_objects**](docs/OpenFgaApi.md#list_objects) | **POST** /stores/{store_id}/list-objects | [EXPERIMENTAL] Get all object ids of the given type that the user has a relation with -*OpenFgaApi* | [**list_stores**](docs/OpenFgaApi.md#list_stores) | **GET** /stores | List all stores -*OpenFgaApi* | [**read**](docs/OpenFgaApi.md#read) | **POST** /stores/{store_id}/read | Get tuples from the store that matches a query, without following userset rewrite rules -*OpenFgaApi* | [**read_assertions**](docs/OpenFgaApi.md#read_assertions) | **GET** /stores/{store_id}/assertions/{authorization_model_id} | Read assertions for an authorization model ID -*OpenFgaApi* | [**read_authorization_model**](docs/OpenFgaApi.md#read_authorization_model) | **GET** /stores/{store_id}/authorization-models/{id} | Return a particular version of an authorization model -*OpenFgaApi* | [**read_authorization_models**](docs/OpenFgaApi.md#read_authorization_models) | **GET** /stores/{store_id}/authorization-models | Return all the authorization models for a particular store -*OpenFgaApi* | [**read_changes**](docs/OpenFgaApi.md#read_changes) | **GET** /stores/{store_id}/changes | Return a list of all the tuple changes -*OpenFgaApi* | [**write**](docs/OpenFgaApi.md#write) | **POST** /stores/{store_id}/write | Add or delete tuples from the store -*OpenFgaApi* | [**write_assertions**](docs/OpenFgaApi.md#write_assertions) | **PUT** /stores/{store_id}/assertions/{authorization_model_id} | Upsert assertions for an authorization model ID -*OpenFgaApi* | [**write_authorization_model**](docs/OpenFgaApi.md#write_authorization_model) | **POST** /stores/{store_id}/authorization-models | Create a new authorization model +*OpenFgaApi* | [**check**](https://github.com/openfga/python-sdk/blob/main/docs/OpenFgaApi.md#check) | **POST** /stores/{store_id}/check | Check whether a user is authorized to access an object +*OpenFgaApi* | [**create_store**](https://github.com/openfga/python-sdk/blob/main/docs/OpenFgaApi.md#create_store) | **POST** /stores | Create a store +*OpenFgaApi* | [**delete_store**](https://github.com/openfga/python-sdk/blob/main/docs/OpenFgaApi.md#delete_store) | **DELETE** /stores/{store_id} | Delete a store +*OpenFgaApi* | [**expand**](https://github.com/openfga/python-sdk/blob/main/docs/OpenFgaApi.md#expand) | **POST** /stores/{store_id}/expand | Expand all relationships in userset tree format, and following userset rewrite rules. Useful to reason about and debug a certain relationship +*OpenFgaApi* | [**get_store**](https://github.com/openfga/python-sdk/blob/main/docs/OpenFgaApi.md#get_store) | **GET** /stores/{store_id} | Get a store +*OpenFgaApi* | [**list_objects**](https://github.com/openfga/python-sdk/blob/main/docs/OpenFgaApi.md#list_objects) | **POST** /stores/{store_id}/list-objects | [EXPERIMENTAL] Get all objects of the given type that the user has a relation with +*OpenFgaApi* | [**list_stores**](https://github.com/openfga/python-sdk/blob/main/docs/OpenFgaApi.md#list_stores) | **GET** /stores | List all stores +*OpenFgaApi* | [**read**](https://github.com/openfga/python-sdk/blob/main/docs/OpenFgaApi.md#read) | **POST** /stores/{store_id}/read | Get tuples from the store that matches a query, without following userset rewrite rules +*OpenFgaApi* | [**read_assertions**](https://github.com/openfga/python-sdk/blob/main/docs/OpenFgaApi.md#read_assertions) | **GET** /stores/{store_id}/assertions/{authorization_model_id} | Read assertions for an authorization model ID +*OpenFgaApi* | [**read_authorization_model**](https://github.com/openfga/python-sdk/blob/main/docs/OpenFgaApi.md#read_authorization_model) | **GET** /stores/{store_id}/authorization-models/{id} | Return a particular version of an authorization model +*OpenFgaApi* | [**read_authorization_models**](https://github.com/openfga/python-sdk/blob/main/docs/OpenFgaApi.md#read_authorization_models) | **GET** /stores/{store_id}/authorization-models | Return all the authorization models for a particular store +*OpenFgaApi* | [**read_changes**](https://github.com/openfga/python-sdk/blob/main/docs/OpenFgaApi.md#read_changes) | **GET** /stores/{store_id}/changes | Return a list of all the tuple changes +*OpenFgaApi* | [**write**](https://github.com/openfga/python-sdk/blob/main/docs/OpenFgaApi.md#write) | **POST** /stores/{store_id}/write | Add or delete tuples from the store +*OpenFgaApi* | [**write_assertions**](https://github.com/openfga/python-sdk/blob/main/docs/OpenFgaApi.md#write_assertions) | **PUT** /stores/{store_id}/assertions/{authorization_model_id} | Upsert assertions for an authorization model ID +*OpenFgaApi* | [**write_authorization_model**](https://github.com/openfga/python-sdk/blob/main/docs/OpenFgaApi.md#write_authorization_model) | **POST** /stores/{store_id}/authorization-models | Create a new authorization model ### Models ## Documentation For Models - - [Any](docs/Any.md) - - [Assertion](docs/Assertion.md) - - [AuthorizationModel](docs/AuthorizationModel.md) - - [CheckRequest](docs/CheckRequest.md) - - [CheckResponse](docs/CheckResponse.md) - - [Computed](docs/Computed.md) - - [ContextualTupleKeys](docs/ContextualTupleKeys.md) - - [CreateStoreRequest](docs/CreateStoreRequest.md) - - [CreateStoreResponse](docs/CreateStoreResponse.md) - - [Difference](docs/Difference.md) - - [ErrorCode](docs/ErrorCode.md) - - [ExpandRequest](docs/ExpandRequest.md) - - [ExpandResponse](docs/ExpandResponse.md) - - [GetStoreResponse](docs/GetStoreResponse.md) - - [InternalErrorCode](docs/InternalErrorCode.md) - - [InternalErrorMessageResponse](docs/InternalErrorMessageResponse.md) - - [Leaf](docs/Leaf.md) - - [ListObjectsRequest](docs/ListObjectsRequest.md) - - [ListObjectsResponse](docs/ListObjectsResponse.md) - - [ListStoresResponse](docs/ListStoresResponse.md) - - [Metadata](docs/Metadata.md) - - [Node](docs/Node.md) - - [Nodes](docs/Nodes.md) - - [NotFoundErrorCode](docs/NotFoundErrorCode.md) - - [ObjectRelation](docs/ObjectRelation.md) - - [PathUnknownErrorMessageResponse](docs/PathUnknownErrorMessageResponse.md) - - [ReadAssertionsResponse](docs/ReadAssertionsResponse.md) - - [ReadAuthorizationModelResponse](docs/ReadAuthorizationModelResponse.md) - - [ReadAuthorizationModelsResponse](docs/ReadAuthorizationModelsResponse.md) - - [ReadChangesResponse](docs/ReadChangesResponse.md) - - [ReadRequest](docs/ReadRequest.md) - - [ReadResponse](docs/ReadResponse.md) - - [RelationMetadata](docs/RelationMetadata.md) - - [RelationReference](docs/RelationReference.md) - - [Status](docs/Status.md) - - [Store](docs/Store.md) - - [Tuple](docs/Tuple.md) - - [TupleChange](docs/TupleChange.md) - - [TupleKey](docs/TupleKey.md) - - [TupleKeys](docs/TupleKeys.md) - - [TupleOperation](docs/TupleOperation.md) - - [TupleToUserset](docs/TupleToUserset.md) - - [TypeDefinition](docs/TypeDefinition.md) - - [Users](docs/Users.md) - - [Userset](docs/Userset.md) - - [UsersetTree](docs/UsersetTree.md) - - [UsersetTreeDifference](docs/UsersetTreeDifference.md) - - [UsersetTreeTupleToUserset](docs/UsersetTreeTupleToUserset.md) - - [Usersets](docs/Usersets.md) - - [ValidationErrorMessageResponse](docs/ValidationErrorMessageResponse.md) - - [WriteAssertionsRequest](docs/WriteAssertionsRequest.md) - - [WriteAuthorizationModelRequest](docs/WriteAuthorizationModelRequest.md) - - [WriteAuthorizationModelResponse](docs/WriteAuthorizationModelResponse.md) - - [WriteRequest](docs/WriteRequest.md) + - [Any](https://github.com/openfga/python-sdk/blob/main/docs/Any.md) + - [Assertion](https://github.com/openfga/python-sdk/blob/main/docs/Assertion.md) + - [AuthorizationModel](https://github.com/openfga/python-sdk/blob/main/docs/AuthorizationModel.md) + - [CheckRequest](https://github.com/openfga/python-sdk/blob/main/docs/CheckRequest.md) + - [CheckResponse](https://github.com/openfga/python-sdk/blob/main/docs/CheckResponse.md) + - [Computed](https://github.com/openfga/python-sdk/blob/main/docs/Computed.md) + - [ContextualTupleKeys](https://github.com/openfga/python-sdk/blob/main/docs/ContextualTupleKeys.md) + - [CreateStoreRequest](https://github.com/openfga/python-sdk/blob/main/docs/CreateStoreRequest.md) + - [CreateStoreResponse](https://github.com/openfga/python-sdk/blob/main/docs/CreateStoreResponse.md) + - [Difference](https://github.com/openfga/python-sdk/blob/main/docs/Difference.md) + - [ErrorCode](https://github.com/openfga/python-sdk/blob/main/docs/ErrorCode.md) + - [ExpandRequest](https://github.com/openfga/python-sdk/blob/main/docs/ExpandRequest.md) + - [ExpandResponse](https://github.com/openfga/python-sdk/blob/main/docs/ExpandResponse.md) + - [GetStoreResponse](https://github.com/openfga/python-sdk/blob/main/docs/GetStoreResponse.md) + - [InternalErrorCode](https://github.com/openfga/python-sdk/blob/main/docs/InternalErrorCode.md) + - [InternalErrorMessageResponse](https://github.com/openfga/python-sdk/blob/main/docs/InternalErrorMessageResponse.md) + - [Leaf](https://github.com/openfga/python-sdk/blob/main/docs/Leaf.md) + - [ListObjectsRequest](https://github.com/openfga/python-sdk/blob/main/docs/ListObjectsRequest.md) + - [ListObjectsResponse](https://github.com/openfga/python-sdk/blob/main/docs/ListObjectsResponse.md) + - [ListStoresResponse](https://github.com/openfga/python-sdk/blob/main/docs/ListStoresResponse.md) + - [Metadata](https://github.com/openfga/python-sdk/blob/main/docs/Metadata.md) + - [Node](https://github.com/openfga/python-sdk/blob/main/docs/Node.md) + - [Nodes](https://github.com/openfga/python-sdk/blob/main/docs/Nodes.md) + - [NotFoundErrorCode](https://github.com/openfga/python-sdk/blob/main/docs/NotFoundErrorCode.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) + - [ReadAuthorizationModelResponse](https://github.com/openfga/python-sdk/blob/main/docs/ReadAuthorizationModelResponse.md) + - [ReadAuthorizationModelsResponse](https://github.com/openfga/python-sdk/blob/main/docs/ReadAuthorizationModelsResponse.md) + - [ReadChangesResponse](https://github.com/openfga/python-sdk/blob/main/docs/ReadChangesResponse.md) + - [ReadRequest](https://github.com/openfga/python-sdk/blob/main/docs/ReadRequest.md) + - [ReadResponse](https://github.com/openfga/python-sdk/blob/main/docs/ReadResponse.md) + - [RelationMetadata](https://github.com/openfga/python-sdk/blob/main/docs/RelationMetadata.md) + - [RelationReference](https://github.com/openfga/python-sdk/blob/main/docs/RelationReference.md) + - [Status](https://github.com/openfga/python-sdk/blob/main/docs/Status.md) + - [Store](https://github.com/openfga/python-sdk/blob/main/docs/Store.md) + - [Tuple](https://github.com/openfga/python-sdk/blob/main/docs/Tuple.md) + - [TupleChange](https://github.com/openfga/python-sdk/blob/main/docs/TupleChange.md) + - [TupleKey](https://github.com/openfga/python-sdk/blob/main/docs/TupleKey.md) + - [TupleKeys](https://github.com/openfga/python-sdk/blob/main/docs/TupleKeys.md) + - [TupleOperation](https://github.com/openfga/python-sdk/blob/main/docs/TupleOperation.md) + - [TupleToUserset](https://github.com/openfga/python-sdk/blob/main/docs/TupleToUserset.md) + - [TypeDefinition](https://github.com/openfga/python-sdk/blob/main/docs/TypeDefinition.md) + - [Users](https://github.com/openfga/python-sdk/blob/main/docs/Users.md) + - [Userset](https://github.com/openfga/python-sdk/blob/main/docs/Userset.md) + - [UsersetTree](https://github.com/openfga/python-sdk/blob/main/docs/UsersetTree.md) + - [UsersetTreeDifference](https://github.com/openfga/python-sdk/blob/main/docs/UsersetTreeDifference.md) + - [UsersetTreeTupleToUserset](https://github.com/openfga/python-sdk/blob/main/docs/UsersetTreeTupleToUserset.md) + - [Usersets](https://github.com/openfga/python-sdk/blob/main/docs/Usersets.md) + - [ValidationErrorMessageResponse](https://github.com/openfga/python-sdk/blob/main/docs/ValidationErrorMessageResponse.md) + - [WriteAssertionsRequest](https://github.com/openfga/python-sdk/blob/main/docs/WriteAssertionsRequest.md) + - [WriteAuthorizationModelRequest](https://github.com/openfga/python-sdk/blob/main/docs/WriteAuthorizationModelRequest.md) + - [WriteAuthorizationModelResponse](https://github.com/openfga/python-sdk/blob/main/docs/WriteAuthorizationModelResponse.md) + - [WriteRequest](https://github.com/openfga/python-sdk/blob/main/docs/WriteRequest.md) diff --git a/VERSION.txt b/VERSION.txt index 6e8bf73..17e51c3 100755 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -0.1.0 +0.1.1 diff --git a/docs/OpenFgaApi.md b/docs/OpenFgaApi.md index ab3b303..a525daf 100755 --- a/docs/OpenFgaApi.md +++ b/docs/OpenFgaApi.md @@ -9,7 +9,7 @@ Method | HTTP request | Description [**delete_store**](OpenFgaApi.md#delete_store) | **DELETE** /stores/{store_id} | Delete a store [**expand**](OpenFgaApi.md#expand) | **POST** /stores/{store_id}/expand | Expand all relationships in userset tree format, and following userset rewrite rules. Useful to reason about and debug a certain relationship [**get_store**](OpenFgaApi.md#get_store) | **GET** /stores/{store_id} | Get a store -[**list_objects**](OpenFgaApi.md#list_objects) | **POST** /stores/{store_id}/list-objects | [EXPERIMENTAL] Get all object ids of the given type that the user has a relation with +[**list_objects**](OpenFgaApi.md#list_objects) | **POST** /stores/{store_id}/list-objects | [EXPERIMENTAL] Get all objects of the given type that the user has a relation with [**list_stores**](OpenFgaApi.md#list_stores) | **GET** /stores | List all stores [**read**](OpenFgaApi.md#read) | **POST** /stores/{store_id}/read | Get tuples from the store that matches a query, without following userset rewrite rules [**read_assertions**](OpenFgaApi.md#read_assertions) | **GET** /stores/{store_id}/assertions/{authorization_model_id} | Read assertions for an authorization model ID @@ -417,9 +417,9 @@ No authorization required # **list_objects** > ListObjectsResponse list_objects(body) -[EXPERIMENTAL] Get all object ids of the given type that the user has a relation with +[EXPERIMENTAL] Get all objects of the given type that the user has a relation with -The ListObjects API returns a list of all the objects of the given type that the user has a relation with. To achieve this, both the store tuples and the authorization model are used. An `authorization_model_id` may be specified in the body. If it is, it will be used to decide the underlying implementation used. If it is not specified, the latest authorization model ID will be used. You may also specify `contextual_tuples` that will be treated as regular tuples. +The ListObjects API returns a list of all the objects of the given type that the user has a relation with. To achieve this, both the store tuples and the authorization model are used. An `authorization_model_id` may be specified in the body. If it is, it will be used to decide the underlying implementation used. If it is not specified, the latest authorization model ID will be used. You may also specify `contextual_tuples` that will be treated as regular tuples. The response will contain the related objects in an array in the \"objects\" field of the response and they will be strings in the object format `:` (e.g. \"document:roadmap\") ### Example @@ -456,7 +456,7 @@ async with openfga_sdk.ApiClient(configuration) as api_client: body = openfga_sdk.ListObjectsRequest() # ListObjectsRequest | try: - # [EXPERIMENTAL] Get all object ids of the given type that the user has a relation with + # [EXPERIMENTAL] Get all objects of the given type that the user has a relation with api_response = await api_instance.api_instance.list_objects(body) pprint(api_response) except ApiException as e: diff --git a/openfga_sdk/__init__.py b/openfga_sdk/__init__.py index f717fb6..33f7b9b 100755 --- a/openfga_sdk/__init__.py +++ b/openfga_sdk/__init__.py @@ -14,7 +14,7 @@ NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT. """ -__version__ = "0.1.0" +__version__ = "0.1.1" # import apis into sdk package from openfga_sdk.api.open_fga_api import OpenFgaApi diff --git a/openfga_sdk/api/open_fga_api.py b/openfga_sdk/api/open_fga_api.py index 58a9ca1..606cd24 100755 --- a/openfga_sdk/api/open_fga_api.py +++ b/openfga_sdk/api/open_fga_api.py @@ -728,9 +728,9 @@ async def get_store_with_http_info(self, **kwargs): # noqa: E501 _request_auth=local_var_params.get('_request_auth'))) async def list_objects(self, body, **kwargs): # noqa: E501 - """[EXPERIMENTAL] Get all object ids of the given type that the user has a relation with # noqa: E501 + """[EXPERIMENTAL] Get all objects of the given type that the user has a relation with # noqa: E501 - The ListObjects API returns a list of all the objects of the given type that the user has a relation with. To achieve this, both the store tuples and the authorization model are used. An `authorization_model_id` may be specified in the body. If it is, it will be used to decide the underlying implementation used. If it is not specified, the latest authorization model ID will be used. You may also specify `contextual_tuples` that will be treated as regular tuples. # noqa: E501 + The ListObjects API returns a list of all the objects of the given type that the user has a relation with. To achieve this, both the store tuples and the authorization model are used. An `authorization_model_id` may be specified in the body. If it is, it will be used to decide the underlying implementation used. If it is not specified, the latest authorization model ID will be used. You may also specify `contextual_tuples` that will be treated as regular tuples. The response will contain the related objects in an array in the \"objects\" field of the response and they will be strings in the object format `:` (e.g. \"document:roadmap\") # noqa: E501 >>> thread = await api.list_objects(body) @@ -755,9 +755,9 @@ async def list_objects(self, body, **kwargs): # noqa: E501 return await(self.list_objects_with_http_info(body, **kwargs)) # noqa: E501 async def list_objects_with_http_info(self, body, **kwargs): # noqa: E501 - """[EXPERIMENTAL] Get all object ids of the given type that the user has a relation with # noqa: E501 + """[EXPERIMENTAL] Get all objects of the given type that the user has a relation with # noqa: E501 - The ListObjects API returns a list of all the objects of the given type that the user has a relation with. To achieve this, both the store tuples and the authorization model are used. An `authorization_model_id` may be specified in the body. If it is, it will be used to decide the underlying implementation used. If it is not specified, the latest authorization model ID will be used. You may also specify `contextual_tuples` that will be treated as regular tuples. # noqa: E501 + The ListObjects API returns a list of all the objects of the given type that the user has a relation with. To achieve this, both the store tuples and the authorization model are used. An `authorization_model_id` may be specified in the body. If it is, it will be used to decide the underlying implementation used. If it is not specified, the latest authorization model ID will be used. You may also specify `contextual_tuples` that will be treated as regular tuples. The response will contain the related objects in an array in the \"objects\" field of the response and they will be strings in the object format `:` (e.g. \"document:roadmap\") # noqa: E501 >>> thread = api.list_objects_with_http_info(body) diff --git a/openfga_sdk/api_client.py b/openfga_sdk/api_client.py index 46b952e..8339203 100755 --- a/openfga_sdk/api_client.py +++ b/openfga_sdk/api_client.py @@ -92,7 +92,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.cookie = cookie # Set default User-Agent. self.user_agent = 'openfga-sdk {sdkId}/{packageVersion}'.replace( - '{sdkId}', '').replace('{packageVersion}', '0.1.0') + '{sdkId}', '').replace('{packageVersion}', '0.1.1') self.client_side_validation = configuration.client_side_validation async def __aenter__(self): diff --git a/openfga_sdk/configuration.py b/openfga_sdk/configuration.py index 865e65e..73e4f6c 100755 --- a/openfga_sdk/configuration.py +++ b/openfga_sdk/configuration.py @@ -438,7 +438,7 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 0.1\n"\ - "SDK Package Version: 0.1.0".\ + "SDK Package Version: 0.1.1".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/openfga_sdk/credentials.py b/openfga_sdk/credentials.py index f804ddb..571c3e0 100755 --- a/openfga_sdk/credentials.py +++ b/openfga_sdk/credentials.py @@ -215,7 +215,7 @@ async def _obtain_token(self, client): 'grant_type': "client_credentials", } headers = urllib3.response.HTTPHeaderDict( - {'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'openfga-sdk (python) 0.1.0'}) + {'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'openfga-sdk (python) 0.1.1'}) raw_response = await client.POST(token_url, headers=headers, body=body) if 200 <= raw_response.status <= 299: try: diff --git a/requirements.txt b/requirements.txt index 625834f..9239145 100755 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ -six >= 1.10 -setuptools >= 65.5.1 -python-dateutil>=2.8.2 -urllib3>=1.26.11 -aiohttp>=3.8.1 \ No newline at end of file +six >= 1.16 +setuptools >= 66.0.0 +python-dateutil >= 2.8.2 +urllib3 >= 1.26.14 +aiohttp >= 3.8.3 diff --git a/setup.py b/setup.py index da639ba..37640b3 100755 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "openfga-sdk" -VERSION = "0.1.0" +VERSION = "0.1.1" # To install the library, run the following # # python setup.py install diff --git a/test/test_credentials.py b/test/test_credentials.py index 9e8d8fd..a914568 100755 --- a/test/test_credentials.py +++ b/test/test_credentials.py @@ -219,7 +219,7 @@ async def test_get_authentication_obtain_client_credentials(self, mock_request): self.assertGreaterEqual(credential._access_expiry_time, current_time + timedelta(seconds=int(120))) expected_header = urllib3.response.HTTPHeaderDict( - {'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'openfga-sdk (python) 0.1.0'}) + {'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'openfga-sdk (python) 0.1.1'}) mock_request.assert_called_once_with( 'POST', 'https://www.testme.com/oauth/token', diff --git a/test/test_open_fga_api.py b/test/test_open_fga_api.py index 005667f..33700ac 100755 --- a/test/test_open_fga_api.py +++ b/test/test_open_fga_api.py @@ -1161,7 +1161,7 @@ async def test_check_api_token(self, mock_request): self.assertTrue(api_response.allowed) # Make sure the API was called with the right data expectedHeader = urllib3.response.HTTPHeaderDict( - {'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'openfga-sdk /0.1.0', 'Authorization': 'Bearer TOKEN1'}) + {'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'openfga-sdk /0.1.1', 'Authorization': 'Bearer TOKEN1'}) mock_request.assert_called_once_with( 'POST', 'http://api.fga.example/stores/d12345abc/check', @@ -1204,7 +1204,7 @@ async def test_check_custom_header(self, mock_request): self.assertTrue(api_response.allowed) # Make sure the API was called with the right data expectedHeader = urllib3.response.HTTPHeaderDict( - {'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'openfga-sdk /0.1.0', 'Custom Header': 'custom value'}) + {'Accept': 'application/json', 'Content-Type': 'application/json', 'User-Agent': 'openfga-sdk /0.1.1', 'Custom Header': 'custom value'}) mock_request.assert_called_once_with( 'POST', 'http://api.fga.example/stores/d12345abc/check',