Skip to content

Commit

Permalink
fix: get tests passing with conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
booniepepper committed Jan 3, 2024
1 parent 6b8dc33 commit 9ed1f70
Show file tree
Hide file tree
Showing 100 changed files with 2,758 additions and 263 deletions.
28 changes: 26 additions & 2 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,24 @@ LICENSE
NOTICE.txt
README.md
VERSION.txt
docs/AbortedMessageResponse.md
docs/Any.md
docs/Assertion.md
docs/AssertionTupleKey.md
docs/AuthorizationModel.md
docs/CheckRequest.md
docs/CheckRequestTupleKey.md
docs/CheckResponse.md
docs/Computed.md
docs/Condition.md
docs/ConditionParamTypeRef.md
docs/ContextualTupleKeys.md
docs/CreateStoreRequest.md
docs/CreateStoreResponse.md
docs/Difference.md
docs/ErrorCode.md
docs/ExpandRequest.md
docs/ExpandRequestTupleKey.md
docs/ExpandResponse.md
docs/GetStoreResponse.md
docs/InternalErrorCode.md
Expand All @@ -37,6 +43,7 @@ docs/Metadata.md
docs/Node.md
docs/Nodes.md
docs/NotFoundErrorCode.md
docs/NullValue.md
docs/ObjectRelation.md
docs/OpenFgaApi.md
docs/PathUnknownErrorMessageResponse.md
Expand All @@ -45,18 +52,21 @@ docs/ReadAuthorizationModelResponse.md
docs/ReadAuthorizationModelsResponse.md
docs/ReadChangesResponse.md
docs/ReadRequest.md
docs/ReadRequestTupleKey.md
docs/ReadResponse.md
docs/RelationMetadata.md
docs/RelationReference.md
docs/RelationshipCondition.md
docs/Status.md
docs/Store.md
docs/Tuple.md
docs/TupleChange.md
docs/TupleKey.md
docs/TupleKeys.md
docs/TupleKeyWithoutCondition.md
docs/TupleOperation.md
docs/TupleToUserset.md
docs/TypeDefinition.md
docs/TypeName.md
docs/Users.md
docs/Userset.md
docs/UsersetTree.md
Expand All @@ -68,6 +78,8 @@ docs/WriteAssertionsRequest.md
docs/WriteAuthorizationModelRequest.md
docs/WriteAuthorizationModelResponse.md
docs/WriteRequest.md
docs/WriteRequestDeletes.md
docs/WriteRequestWrites.md
example/Makefile
example/README.md
example/example1/auth-model.json
Expand Down Expand Up @@ -101,18 +113,24 @@ openfga_sdk/credentials.py
openfga_sdk/exceptions.py
openfga_sdk/help.py
openfga_sdk/models/__init__.py
openfga_sdk/models/aborted_message_response.py
openfga_sdk/models/any.py
openfga_sdk/models/assertion.py
openfga_sdk/models/assertion_tuple_key.py
openfga_sdk/models/authorization_model.py
openfga_sdk/models/check_request.py
openfga_sdk/models/check_request_tuple_key.py
openfga_sdk/models/check_response.py
openfga_sdk/models/computed.py
openfga_sdk/models/condition.py
openfga_sdk/models/condition_param_type_ref.py
openfga_sdk/models/contextual_tuple_keys.py
openfga_sdk/models/create_store_request.py
openfga_sdk/models/create_store_response.py
openfga_sdk/models/difference.py
openfga_sdk/models/error_code.py
openfga_sdk/models/expand_request.py
openfga_sdk/models/expand_request_tuple_key.py
openfga_sdk/models/expand_response.py
openfga_sdk/models/get_store_response.py
openfga_sdk/models/internal_error_code.py
Expand All @@ -125,25 +143,29 @@ openfga_sdk/models/metadata.py
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_relation.py
openfga_sdk/models/path_unknown_error_message_response.py
openfga_sdk/models/read_assertions_response.py
openfga_sdk/models/read_authorization_model_response.py
openfga_sdk/models/read_authorization_models_response.py
openfga_sdk/models/read_changes_response.py
openfga_sdk/models/read_request.py
openfga_sdk/models/read_request_tuple_key.py
openfga_sdk/models/read_response.py
openfga_sdk/models/relation_metadata.py
openfga_sdk/models/relation_reference.py
openfga_sdk/models/relationship_condition.py
openfga_sdk/models/status.py
openfga_sdk/models/store.py
openfga_sdk/models/tuple.py
openfga_sdk/models/tuple_change.py
openfga_sdk/models/tuple_key.py
openfga_sdk/models/tuple_keys.py
openfga_sdk/models/tuple_key_without_condition.py
openfga_sdk/models/tuple_operation.py
openfga_sdk/models/tuple_to_userset.py
openfga_sdk/models/type_definition.py
openfga_sdk/models/type_name.py
openfga_sdk/models/users.py
openfga_sdk/models/userset.py
openfga_sdk/models/userset_tree.py
Expand All @@ -155,6 +177,8 @@ openfga_sdk/models/write_assertions_request.py
openfga_sdk/models/write_authorization_model_request.py
openfga_sdk/models/write_authorization_model_response.py
openfga_sdk/models/write_request.py
openfga_sdk/models/write_request_deletes.py
openfga_sdk/models/write_request_writes.py
openfga_sdk/oauth2.py
openfga_sdk/rest.py
openfga_sdk/sync/__init__.py
Expand Down
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -788,18 +788,24 @@ Class | Method | HTTP request | Description

## Documentation For Models

- [AbortedMessageResponse](https://github.com/openfga/python-sdk/blob/main/docs/AbortedMessageResponse.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)
- [AssertionTupleKey](https://github.com/openfga/python-sdk/blob/main/docs/AssertionTupleKey.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)
- [CheckRequestTupleKey](https://github.com/openfga/python-sdk/blob/main/docs/CheckRequestTupleKey.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)
- [Condition](https://github.com/openfga/python-sdk/blob/main/docs/Condition.md)
- [ConditionParamTypeRef](https://github.com/openfga/python-sdk/blob/main/docs/ConditionParamTypeRef.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)
- [ExpandRequestTupleKey](https://github.com/openfga/python-sdk/blob/main/docs/ExpandRequestTupleKey.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)
Expand All @@ -812,25 +818,29 @@ Class | Method | HTTP request | Description
- [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)
- [NullValue](https://github.com/openfga/python-sdk/blob/main/docs/NullValue.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)
- [ReadRequestTupleKey](https://github.com/openfga/python-sdk/blob/main/docs/ReadRequestTupleKey.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)
- [RelationshipCondition](https://github.com/openfga/python-sdk/blob/main/docs/RelationshipCondition.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)
- [TupleKeyWithoutCondition](https://github.com/openfga/python-sdk/blob/main/docs/TupleKeyWithoutCondition.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)
- [TypeName](https://github.com/openfga/python-sdk/blob/main/docs/TypeName.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)
Expand All @@ -842,6 +852,8 @@ Class | Method | HTTP request | Description
- [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)
- [WriteRequestDeletes](https://github.com/openfga/python-sdk/blob/main/docs/WriteRequestDeletes.md)
- [WriteRequestWrites](https://github.com/openfga/python-sdk/blob/main/docs/WriteRequestWrites.md)



Expand Down
12 changes: 12 additions & 0 deletions docs/AbortedMessageResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# AbortedMessageResponse


## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**code** | **str** | | [optional]
**message** | **str** | | [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)


2 changes: 1 addition & 1 deletion docs/Assertion.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**tuple_key** | [**TupleKey**](TupleKey.md) | |
**tuple_key** | [**AssertionTupleKey**](AssertionTupleKey.md) | |
**expectation** | **bool** | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down
13 changes: 13 additions & 0 deletions docs/AssertionTupleKey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# AssertionTupleKey


## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**object** | **str** | |
**relation** | **str** | |
**user** | **str** | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


5 changes: 3 additions & 2 deletions docs/AuthorizationModel.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | | [optional]
**id** | **str** | |
**schema_version** | **str** | |
**type_definitions** | [**list[TypeDefinition]**](TypeDefinition.md) | | [optional]
**type_definitions** | [**list[TypeDefinition]**](TypeDefinition.md) | |
**conditions** | [**dict[str, Condition]**](Condition.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)

Expand Down
3 changes: 2 additions & 1 deletion docs/CheckRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**tuple_key** | [**TupleKey**](TupleKey.md) | |
**tuple_key** | [**CheckRequestTupleKey**](CheckRequestTupleKey.md) | |
**contextual_tuples** | [**ContextualTupleKeys**](ContextualTupleKeys.md) | | [optional]
**authorization_model_id** | **str** | | [optional]
**trace** | **bool** | Defaults to false. Making it true has performance implications. | [optional] [readonly]
**context** | **object** | Additional request context that will be used to evaluate any ABAC conditions encountered in the query evaluation. | [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)

Expand Down
13 changes: 13 additions & 0 deletions docs/CheckRequestTupleKey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# CheckRequestTupleKey


## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**user** | **str** | |
**relation** | **str** | |
**object** | **str** | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


2 changes: 1 addition & 1 deletion docs/Computed.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**userset** | **str** | | [optional]
**userset** | **str** | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
13 changes: 13 additions & 0 deletions docs/Condition.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Condition


## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | |
**expression** | **str** | A Google CEL expression, expressed as a string. |
**parameters** | [**dict[str, ConditionParamTypeRef]**](ConditionParamTypeRef.md) | A map of parameter names to the parameter's defined type reference. | [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)


12 changes: 12 additions & 0 deletions docs/ConditionParamTypeRef.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# ConditionParamTypeRef


## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**type_name** | [**TypeName**](TypeName.md) | |
**generic_types** | [**list[ConditionParamTypeRef]**](ConditionParamTypeRef.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)


8 changes: 4 additions & 4 deletions docs/CreateStoreResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | | [optional]
**name** | **str** | | [optional]
**created_at** | **datetime** | | [optional]
**updated_at** | **datetime** | | [optional]
**id** | **str** | |
**name** | **str** | |
**created_at** | **datetime** | |
**updated_at** | **datetime** | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
2 changes: 1 addition & 1 deletion docs/ExpandRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**tuple_key** | [**TupleKey**](TupleKey.md) | |
**tuple_key** | [**ExpandRequestTupleKey**](ExpandRequestTupleKey.md) | |
**authorization_model_id** | **str** | | [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)
Expand Down
12 changes: 12 additions & 0 deletions docs/ExpandRequestTupleKey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# ExpandRequestTupleKey


## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**relation** | **str** | |
**object** | **str** | |

[[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 changes: 5 additions & 4 deletions docs/GetStoreResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | | [optional]
**name** | **str** | | [optional]
**created_at** | **datetime** | | [optional]
**updated_at** | **datetime** | | [optional]
**id** | **str** | |
**name** | **str** | |
**created_at** | **datetime** | |
**updated_at** | **datetime** | |
**deleted_at** | **datetime** | | [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)

Expand Down
1 change: 1 addition & 0 deletions docs/ListObjectsRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Name | Type | Description | Notes
**relation** | **str** | |
**user** | **str** | |
**contextual_tuples** | [**ContextualTupleKeys**](ContextualTupleKeys.md) | | [optional]
**context** | **object** | Additional request context that will be used to evaluate any ABAC conditions encountered in the query evaluation. | [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)

Expand Down
2 changes: 1 addition & 1 deletion docs/ListObjectsResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**objects** | **list[str]** | | [optional]
**objects** | **list[str]** | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
4 changes: 2 additions & 2 deletions docs/ListStoresResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**stores** | [**list[Store]**](Store.md) | | [optional]
**continuation_token** | **str** | The continuation token will be empty if there are no more stores. | [optional]
**stores** | [**list[Store]**](Store.md) | |
**continuation_token** | **str** | The continuation token will be empty if there are no more stores. |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
2 changes: 1 addition & 1 deletion docs/Node.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | | [optional]
**name** | **str** | |
**leaf** | [**Leaf**](Leaf.md) | | [optional]
**difference** | [**UsersetTreeDifference**](UsersetTreeDifference.md) | | [optional]
**union** | [**Nodes**](Nodes.md) | | [optional]
Expand Down

0 comments on commit 9ed1f70

Please sign in to comment.