Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 6 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ docs/Computed.md
docs/Condition.md
docs/ConditionMetadata.md
docs/ConditionParamTypeRef.md
docs/ConsistencyPreference.md
docs/ContextualTupleKeys.md
docs/CreateStoreRequest.md
docs/CreateStoreResponse.md
Expand Down Expand Up @@ -118,14 +119,18 @@ src/OpenFga.Sdk/Client/Model/ClientBatchCheckOptions.cs
src/OpenFga.Sdk/Client/Model/ClientBatchCheckResponse.cs
src/OpenFga.Sdk/Client/Model/ClientCheckOptions.cs
src/OpenFga.Sdk/Client/Model/ClientCheckRequest.cs
src/OpenFga.Sdk/Client/Model/ClientConsistencyOptions.cs
src/OpenFga.Sdk/Client/Model/ClientCreateStoreOptions.cs
src/OpenFga.Sdk/Client/Model/ClientCreateStoreRequest.cs
src/OpenFga.Sdk/Client/Model/ClientExpandOptions.cs
src/OpenFga.Sdk/Client/Model/ClientExpandRequest.cs
src/OpenFga.Sdk/Client/Model/ClientListObjectsOptions.cs
src/OpenFga.Sdk/Client/Model/ClientListObjectsRequest.cs
src/OpenFga.Sdk/Client/Model/ClientListRelationsOptions.cs
src/OpenFga.Sdk/Client/Model/ClientListRelationsRequest.cs
src/OpenFga.Sdk/Client/Model/ClientListRelationsResponse.cs
src/OpenFga.Sdk/Client/Model/ClientListStoresOptions.cs
src/OpenFga.Sdk/Client/Model/ClientListUsersOptions.cs
src/OpenFga.Sdk/Client/Model/ClientListUsersRequest.cs
src/OpenFga.Sdk/Client/Model/ClientPaginationOptions.cs
src/OpenFga.Sdk/Client/Model/ClientReadAssertionsOptions.cs
Expand Down Expand Up @@ -176,6 +181,7 @@ src/OpenFga.Sdk/Model/Computed.cs
src/OpenFga.Sdk/Model/Condition.cs
src/OpenFga.Sdk/Model/ConditionMetadata.cs
src/OpenFga.Sdk/Model/ConditionParamTypeRef.cs
src/OpenFga.Sdk/Model/ConsistencyPreference.cs
src/OpenFga.Sdk/Model/ContextualTupleKeys.cs
src/OpenFga.Sdk/Model/CreateStoreRequest.cs
src/OpenFga.Sdk/Model/CreateStoreResponse.cs
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ namespace Example {
| [**GetStore**](docs/OpenFgaApi.md#getstore) | **GET** /stores/{store_id} | Get a store |
| [**ListObjects**](docs/OpenFgaApi.md#listobjects) | **POST** /stores/{store_id}/list-objects | List all objects of the given type that the user has a relation with |
| [**ListStores**](docs/OpenFgaApi.md#liststores) | **GET** /stores | List all stores |
| [**ListUsers**](docs/OpenFgaApi.md#listusers) | **POST** /stores/{store_id}/list-users | [EXPERIMENTAL] List the users matching the provided filter who have a certain relation to a particular type. |
| [**ListUsers**](docs/OpenFgaApi.md#listusers) | **POST** /stores/{store_id}/list-users | List the users matching the provided filter who have a certain relation to a particular type. |
| [**Read**](docs/OpenFgaApi.md#read) | **POST** /stores/{store_id}/read | Get tuples from the store that matches a query, without following userset rewrite rules |
| [**ReadAssertions**](docs/OpenFgaApi.md#readassertions) | **GET** /stores/{store_id}/assertions/{authorization_model_id} | Read assertions for an authorization model ID |
| [**ReadAuthorizationModel**](docs/OpenFgaApi.md#readauthorizationmodel) | **GET** /stores/{store_id}/authorization-models/{id} | Return a particular version of an authorization model |
Expand All @@ -858,6 +858,7 @@ namespace Example {
- [Model.Condition](docs/Condition.md)
- [Model.ConditionMetadata](docs/ConditionMetadata.md)
- [Model.ConditionParamTypeRef](docs/ConditionParamTypeRef.md)
- [Model.ConsistencyPreference](docs/ConsistencyPreference.md)
- [Model.ContextualTupleKeys](docs/ContextualTupleKeys.md)
- [Model.CreateStoreRequest](docs/CreateStoreRequest.md)
- [Model.CreateStoreResponse](docs/CreateStoreResponse.md)
Expand Down
1 change: 1 addition & 0 deletions docs/CheckRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Name | Type | Description | Notes
**AuthorizationModelId** | **string** | | [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]
**Consistency** | **ConsistencyPreference** | | [optional]

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

10 changes: 10 additions & 0 deletions docs/ConsistencyPreference.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# OpenFga.Sdk.Model.ConsistencyPreference
- UNSPECIFIED: Default if not set. Behavior will be the same as MINIMIZE_LATENCY - MINIMIZE_LATENCY: Minimize latency at the potential expense of lower consistency. - HIGHER_CONSISTENCY: Prefer higher consistency, at the potential expense of increased latency.

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------

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

1 change: 1 addition & 0 deletions docs/ExpandRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**TupleKey** | [**ExpandRequestTupleKey**](ExpandRequestTupleKey.md) | |
**AuthorizationModelId** | **string** | | [optional]
**Consistency** | **ConsistencyPreference** | | [optional]

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

1 change: 1 addition & 0 deletions docs/ListObjectsRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Name | Type | Description | Notes
**User** | **string** | |
**ContextualTuples** | [**ContextualTupleKeys**](ContextualTupleKeys.md) | | [optional]
**Context** | **Object** | Additional request context that will be used to evaluate any ABAC conditions encountered in the query evaluation. | [optional]
**Consistency** | **ConsistencyPreference** | | [optional]

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

1 change: 1 addition & 0 deletions docs/ListUsersRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Name | Type | Description | Notes
**UserFilters** | [**List<UserTypeFilter>**](UserTypeFilter.md) | The type of results returned. Only accepts exactly one value. |
**ContextualTuples** | [**List<TupleKey>**](TupleKey.md) | | [optional]
**Context** | **Object** | Additional request context that will be used to evaluate any ABAC conditions encountered in the query evaluation. | [optional]
**Consistency** | **ConsistencyPreference** | | [optional]

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

8 changes: 4 additions & 4 deletions docs/OpenFgaApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Method | HTTP request | Description
[**GetStore**](OpenFgaApi.md#getstore) | **GET** /stores/{store_id} | Get a store
[**ListObjects**](OpenFgaApi.md#listobjects) | **POST** /stores/{store_id}/list-objects | List all objects of the given type that the user has a relation with
[**ListStores**](OpenFgaApi.md#liststores) | **GET** /stores | List all stores
[**ListUsers**](OpenFgaApi.md#listusers) | **POST** /stores/{store_id}/list-users | [EXPERIMENTAL] List the users matching the provided filter who have a certain relation to a particular type.
[**ListUsers**](OpenFgaApi.md#listusers) | **POST** /stores/{store_id}/list-users | List the users matching the provided filter who have a certain relation to a particular type.
[**Read**](OpenFgaApi.md#read) | **POST** /stores/{store_id}/read | Get tuples from the store that matches a query, without following userset rewrite rules
[**ReadAssertions**](OpenFgaApi.md#readassertions) | **GET** /stores/{store_id}/assertions/{authorization_model_id} | Read assertions for an authorization model ID
[**ReadAuthorizationModel**](OpenFgaApi.md#readauthorizationmodel) | **GET** /stores/{store_id}/authorization-models/{id} | Return a particular version of an authorization model
Expand Down Expand Up @@ -579,9 +579,9 @@ Name | Type | Description | Notes
# **ListUsers**
> ListUsersResponse ListUsers (ListUsersRequest body)

[EXPERIMENTAL] List the users matching the provided filter who have a certain relation to a particular type.
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 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.
The ListUsers API returns a list of all the users of a specific type that have a relation to a given object. 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
```csharp
Expand Down Expand Up @@ -610,7 +610,7 @@ namespace Example

try
{
// [EXPERIMENTAL] List the users matching the provided filter who have a certain relation to a particular type.
// List the users matching the provided filter who have a certain relation to a particular type.
ListUsersResponse response = await openFgaApi.ListUsers(body);
Debug.WriteLine(response);
}
Expand Down
1 change: 1 addition & 0 deletions docs/ReadRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Name | Type | Description | Notes
**TupleKey** | [**ReadRequestTupleKey**](ReadRequestTupleKey.md) | | [optional]
**PageSize** | **int** | | [optional]
**ContinuationToken** | **string** | | [optional]
**Consistency** | **ConsistencyPreference** | | [optional]

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

Loading