ory-keto-client 0.5.3.alpha1 → 0.6.0.alpha1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/README.md +22 -31
- data/docs/AddOryAccessControlPolicyRoleMembersBody.md +8 -7
- data/docs/AuthorizationResult.md +8 -7
- data/docs/EnginesApi.md +319 -129
- data/docs/ExpandTree.md +22 -0
- data/docs/GetCheckResponse.md +18 -0
- data/docs/GetRelationTuplesResponse.md +20 -0
- data/docs/HealthApi.md +50 -15
- data/docs/HealthNotReadyStatus.md +8 -7
- data/docs/HealthStatus.md +8 -7
- data/docs/InlineResponse400.md +28 -0
- data/docs/InlineResponse500.md +18 -17
- data/docs/InternalRelationTuple.md +24 -0
- data/docs/OryAccessControlPolicy.md +20 -19
- data/docs/OryAccessControlPolicyAllowedInput.md +14 -13
- data/docs/OryAccessControlPolicyRole.md +10 -9
- data/docs/PatchDelta.md +20 -0
- data/docs/ReadApi.md +297 -0
- data/docs/Version.md +8 -7
- data/docs/VersionApi.md +26 -9
- data/docs/WriteApi.md +212 -0
- data/lib/ory-keto-client.rb +10 -9
- data/lib/ory-keto-client/api/engines_api.rb +46 -35
- data/lib/ory-keto-client/api/health_api.rb +10 -8
- data/lib/ory-keto-client/api/read_api.rb +324 -0
- data/lib/ory-keto-client/api/version_api.rb +6 -5
- data/lib/ory-keto-client/api/write_api.rb +225 -0
- data/lib/ory-keto-client/api_client.rb +50 -46
- data/lib/ory-keto-client/api_error.rb +2 -2
- data/lib/ory-keto-client/configuration.rb +34 -7
- data/lib/ory-keto-client/models/add_ory_access_control_policy_role_members_body.rb +20 -8
- data/lib/ory-keto-client/models/authorization_result.rb +20 -8
- data/lib/ory-keto-client/models/expand_tree.rb +282 -0
- data/lib/ory-keto-client/models/get_check_response.rb +225 -0
- data/lib/ory-keto-client/models/get_relation_tuples_response.rb +230 -0
- data/lib/ory-keto-client/models/health_not_ready_status.rb +20 -8
- data/lib/ory-keto-client/models/health_status.rb +20 -8
- data/lib/ory-keto-client/models/inline_response400.rb +265 -0
- data/lib/ory-keto-client/models/inline_response500.rb +21 -9
- data/lib/ory-keto-client/models/internal_relation_tuple.rb +268 -0
- data/lib/ory-keto-client/models/ory_access_control_policy.rb +22 -12
- data/lib/ory-keto-client/models/ory_access_control_policy_allowed_input.rb +22 -12
- data/lib/ory-keto-client/models/ory_access_control_policy_role.rb +20 -8
- data/lib/ory-keto-client/models/patch_delta.rb +227 -0
- data/lib/ory-keto-client/models/version.rb +20 -8
- data/lib/ory-keto-client/version.rb +3 -3
- data/ory-keto-client.gemspec +4 -5
- data/spec/api/read_api_spec.rb +94 -0
- data/spec/api/write_api_spec.rb +74 -0
- data/spec/api_client_spec.rb +4 -4
- data/spec/configuration_spec.rb +3 -3
- data/spec/models/expand_tree_spec.rb +50 -0
- data/spec/models/get_check_response_spec.rb +34 -0
- data/spec/models/get_relation_tuples_response_spec.rb +40 -0
- data/spec/models/inline_response400_spec.rb +64 -0
- data/spec/models/internal_relation_tuple_spec.rb +52 -0
- data/spec/models/patch_delta_spec.rb +40 -0
- data/spec/spec_helper.rb +3 -3
- metadata +90 -78
data/docs/ExpandTree.md
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# OryHydraClient::ExpandTree
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **children** | [**Array<ExpandTree>**](ExpandTree.md) | | [optional] |
|
8
|
+
| **subject** | **String** | | |
|
9
|
+
| **type** | **String** | | |
|
10
|
+
|
11
|
+
## Example
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'ory-keto-client'
|
15
|
+
|
16
|
+
instance = OryHydraClient::ExpandTree.new(
|
17
|
+
children: null,
|
18
|
+
subject: null,
|
19
|
+
type: null
|
20
|
+
)
|
21
|
+
```
|
22
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# OryHydraClient::GetCheckResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **allowed** | **Boolean** | whether the relation tuple is allowed | |
|
8
|
+
|
9
|
+
## Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'ory-keto-client'
|
13
|
+
|
14
|
+
instance = OryHydraClient::GetCheckResponse.new(
|
15
|
+
allowed: null
|
16
|
+
)
|
17
|
+
```
|
18
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# OryHydraClient::GetRelationTuplesResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **next_page_token** | **String** | The opaque token to provide in a subsequent request to get the next page. It is the empty string iff this is the last page. | [optional] |
|
8
|
+
| **relation_tuples** | [**Array<InternalRelationTuple>**](InternalRelationTuple.md) | | [optional] |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'ory-keto-client'
|
14
|
+
|
15
|
+
instance = OryHydraClient::GetRelationTuplesResponse.new(
|
16
|
+
next_page_token: null,
|
17
|
+
relation_tuples: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
data/docs/HealthApi.md
CHANGED
@@ -2,35 +2,52 @@
|
|
2
2
|
|
3
3
|
All URIs are relative to *http://localhost*
|
4
4
|
|
5
|
-
Method | HTTP request | Description
|
6
|
-
|
7
|
-
[**is_instance_alive**](HealthApi.md#is_instance_alive) | **GET** /health/alive | Check alive status
|
8
|
-
[**is_instance_ready**](HealthApi.md#is_instance_ready) | **GET** /health/ready | Check readiness status
|
9
|
-
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**is_instance_alive**](HealthApi.md#is_instance_alive) | **GET** /health/alive | Check alive status |
|
8
|
+
| [**is_instance_ready**](HealthApi.md#is_instance_ready) | **GET** /health/ready | Check readiness status |
|
10
9
|
|
11
10
|
|
12
11
|
## is_instance_alive
|
13
12
|
|
14
|
-
> HealthStatus is_instance_alive
|
13
|
+
> <HealthStatus> is_instance_alive
|
15
14
|
|
16
15
|
Check alive status
|
17
16
|
|
18
17
|
This endpoint returns a 200 status code when the HTTP server is up running. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance.
|
19
18
|
|
20
|
-
###
|
19
|
+
### Examples
|
21
20
|
|
22
21
|
```ruby
|
23
|
-
|
22
|
+
require 'time'
|
24
23
|
require 'ory-keto-client'
|
25
24
|
|
26
25
|
api_instance = OryHydraClient::HealthApi.new
|
27
26
|
|
28
27
|
begin
|
29
|
-
#Check alive status
|
28
|
+
# Check alive status
|
30
29
|
result = api_instance.is_instance_alive
|
31
30
|
p result
|
32
31
|
rescue OryHydraClient::ApiError => e
|
33
|
-
puts "
|
32
|
+
puts "Error when calling HealthApi->is_instance_alive: #{e}"
|
33
|
+
end
|
34
|
+
```
|
35
|
+
|
36
|
+
#### Using the is_instance_alive_with_http_info variant
|
37
|
+
|
38
|
+
This returns an Array which contains the response data, status code and headers.
|
39
|
+
|
40
|
+
> <Array(<HealthStatus>, Integer, Hash)> is_instance_alive_with_http_info
|
41
|
+
|
42
|
+
```ruby
|
43
|
+
begin
|
44
|
+
# Check alive status
|
45
|
+
data, status_code, headers = api_instance.is_instance_alive_with_http_info
|
46
|
+
p status_code # => 2xx
|
47
|
+
p headers # => { ... }
|
48
|
+
p data # => <HealthStatus>
|
49
|
+
rescue OryHydraClient::ApiError => e
|
50
|
+
puts "Error when calling HealthApi->is_instance_alive_with_http_info: #{e}"
|
34
51
|
end
|
35
52
|
```
|
36
53
|
|
@@ -54,26 +71,44 @@ No authorization required
|
|
54
71
|
|
55
72
|
## is_instance_ready
|
56
73
|
|
57
|
-
> HealthStatus is_instance_ready
|
74
|
+
> <HealthStatus> is_instance_ready
|
58
75
|
|
59
76
|
Check readiness status
|
60
77
|
|
61
78
|
This endpoint returns a 200 status code when the HTTP server is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance.
|
62
79
|
|
63
|
-
###
|
80
|
+
### Examples
|
64
81
|
|
65
82
|
```ruby
|
66
|
-
|
83
|
+
require 'time'
|
67
84
|
require 'ory-keto-client'
|
68
85
|
|
69
86
|
api_instance = OryHydraClient::HealthApi.new
|
70
87
|
|
71
88
|
begin
|
72
|
-
#Check readiness status
|
89
|
+
# Check readiness status
|
73
90
|
result = api_instance.is_instance_ready
|
74
91
|
p result
|
75
92
|
rescue OryHydraClient::ApiError => e
|
76
|
-
puts "
|
93
|
+
puts "Error when calling HealthApi->is_instance_ready: #{e}"
|
94
|
+
end
|
95
|
+
```
|
96
|
+
|
97
|
+
#### Using the is_instance_ready_with_http_info variant
|
98
|
+
|
99
|
+
This returns an Array which contains the response data, status code and headers.
|
100
|
+
|
101
|
+
> <Array(<HealthStatus>, Integer, Hash)> is_instance_ready_with_http_info
|
102
|
+
|
103
|
+
```ruby
|
104
|
+
begin
|
105
|
+
# Check readiness status
|
106
|
+
data, status_code, headers = api_instance.is_instance_ready_with_http_info
|
107
|
+
p status_code # => 2xx
|
108
|
+
p headers # => { ... }
|
109
|
+
p data # => <HealthStatus>
|
110
|
+
rescue OryHydraClient::ApiError => e
|
111
|
+
puts "Error when calling HealthApi->is_instance_ready_with_http_info: #{e}"
|
77
112
|
end
|
78
113
|
```
|
79
114
|
|
@@ -2,16 +2,17 @@
|
|
2
2
|
|
3
3
|
## Properties
|
4
4
|
|
5
|
-
Name | Type | Description | Notes
|
6
|
-
|
7
|
-
**errors** | **Hash<String, String>** | Errors contains a list of errors that caused the not ready status. | [optional]
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **errors** | **Hash<String, String>** | Errors contains a list of errors that caused the not ready status. | [optional] |
|
8
8
|
|
9
|
-
##
|
9
|
+
## Example
|
10
10
|
|
11
11
|
```ruby
|
12
|
-
require '
|
12
|
+
require 'ory-keto-client'
|
13
13
|
|
14
|
-
instance = OryHydraClient::HealthNotReadyStatus.new(
|
14
|
+
instance = OryHydraClient::HealthNotReadyStatus.new(
|
15
|
+
errors: null
|
16
|
+
)
|
15
17
|
```
|
16
18
|
|
17
|
-
|
data/docs/HealthStatus.md
CHANGED
@@ -2,16 +2,17 @@
|
|
2
2
|
|
3
3
|
## Properties
|
4
4
|
|
5
|
-
Name | Type | Description | Notes
|
6
|
-
|
7
|
-
**status** | **String** | Status always contains \"ok\". | [optional]
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **status** | **String** | Status always contains \"ok\". | [optional] |
|
8
8
|
|
9
|
-
##
|
9
|
+
## Example
|
10
10
|
|
11
11
|
```ruby
|
12
|
-
require '
|
12
|
+
require 'ory-keto-client'
|
13
13
|
|
14
|
-
instance = OryHydraClient::HealthStatus.new(
|
14
|
+
instance = OryHydraClient::HealthStatus.new(
|
15
|
+
status: null
|
16
|
+
)
|
15
17
|
```
|
16
18
|
|
17
|
-
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# OryHydraClient::InlineResponse400
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **code** | **Integer** | | [optional] |
|
8
|
+
| **details** | **Array<Object>** | | [optional] |
|
9
|
+
| **message** | **String** | | [optional] |
|
10
|
+
| **reason** | **String** | | [optional] |
|
11
|
+
| **request** | **String** | | [optional] |
|
12
|
+
| **status** | **String** | | [optional] |
|
13
|
+
|
14
|
+
## Example
|
15
|
+
|
16
|
+
```ruby
|
17
|
+
require 'ory-keto-client'
|
18
|
+
|
19
|
+
instance = OryHydraClient::InlineResponse400.new(
|
20
|
+
code: null,
|
21
|
+
details: null,
|
22
|
+
message: null,
|
23
|
+
reason: null,
|
24
|
+
request: null,
|
25
|
+
status: null
|
26
|
+
)
|
27
|
+
```
|
28
|
+
|
data/docs/InlineResponse500.md
CHANGED
@@ -2,26 +2,27 @@
|
|
2
2
|
|
3
3
|
## Properties
|
4
4
|
|
5
|
-
Name | Type | Description | Notes
|
6
|
-
|
7
|
-
**code** | **Integer** | | [optional]
|
8
|
-
**details** | **Array<
|
9
|
-
**message** | **String** | | [optional]
|
10
|
-
**reason** | **String** | | [optional]
|
11
|
-
**request** | **String** | | [optional]
|
12
|
-
**status** | **String** | | [optional]
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **code** | **Integer** | | [optional] |
|
8
|
+
| **details** | **Array<Object>** | | [optional] |
|
9
|
+
| **message** | **String** | | [optional] |
|
10
|
+
| **reason** | **String** | | [optional] |
|
11
|
+
| **request** | **String** | | [optional] |
|
12
|
+
| **status** | **String** | | [optional] |
|
13
13
|
|
14
|
-
##
|
14
|
+
## Example
|
15
15
|
|
16
16
|
```ruby
|
17
|
-
require '
|
17
|
+
require 'ory-keto-client'
|
18
18
|
|
19
|
-
instance = OryHydraClient::InlineResponse500.new(
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
19
|
+
instance = OryHydraClient::InlineResponse500.new(
|
20
|
+
code: null,
|
21
|
+
details: null,
|
22
|
+
message: null,
|
23
|
+
reason: null,
|
24
|
+
request: null,
|
25
|
+
status: null
|
26
|
+
)
|
25
27
|
```
|
26
28
|
|
27
|
-
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# OryHydraClient::InternalRelationTuple
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **namespace** | **String** | Namespace of the Relation Tuple in: query | |
|
8
|
+
| **object** | **String** | Object of the Relation Tuple in: query | |
|
9
|
+
| **relation** | **String** | Relation of the Relation Tuple in: query | |
|
10
|
+
| **subject** | **String** | | |
|
11
|
+
|
12
|
+
## Example
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'ory-keto-client'
|
16
|
+
|
17
|
+
instance = OryHydraClient::InternalRelationTuple.new(
|
18
|
+
namespace: null,
|
19
|
+
object: null,
|
20
|
+
relation: null,
|
21
|
+
subject: null
|
22
|
+
)
|
23
|
+
```
|
24
|
+
|
@@ -2,28 +2,29 @@
|
|
2
2
|
|
3
3
|
## Properties
|
4
4
|
|
5
|
-
Name | Type | Description | Notes
|
6
|
-
|
7
|
-
**actions** | **Array<String>** | Actions is an array representing all the actions this ORY Access Policy applies to. | [optional]
|
8
|
-
**conditions** | **
|
9
|
-
**description** | **String** | Description is an optional, human-readable description. | [optional]
|
10
|
-
**effect** | **String** | Effect is the effect of this ORY Access Policy. It can be \"allow\" or \"deny\". | [optional]
|
11
|
-
**id** | **String** | ID is the unique identifier of the ORY Access Policy. It is used to query, update, and remove the ORY Access Policy. | [optional]
|
12
|
-
**resources** | **Array<String>** | Resources is an array representing all the resources this ORY Access Policy applies to. | [optional]
|
13
|
-
**subjects** | **Array<String>** | Subjects is an array representing all the subjects this ORY Access Policy applies to. | [optional]
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **actions** | **Array<String>** | Actions is an array representing all the actions this ORY Access Policy applies to. | [optional] |
|
8
|
+
| **conditions** | **Object** | Conditions represents a keyed object of conditions under which this ORY Access Policy is active. | [optional] |
|
9
|
+
| **description** | **String** | Description is an optional, human-readable description. | [optional] |
|
10
|
+
| **effect** | **String** | Effect is the effect of this ORY Access Policy. It can be \"allow\" or \"deny\". | [optional] |
|
11
|
+
| **id** | **String** | ID is the unique identifier of the ORY Access Policy. It is used to query, update, and remove the ORY Access Policy. | [optional] |
|
12
|
+
| **resources** | **Array<String>** | Resources is an array representing all the resources this ORY Access Policy applies to. | [optional] |
|
13
|
+
| **subjects** | **Array<String>** | Subjects is an array representing all the subjects this ORY Access Policy applies to. | [optional] |
|
14
14
|
|
15
|
-
##
|
15
|
+
## Example
|
16
16
|
|
17
17
|
```ruby
|
18
|
-
require '
|
18
|
+
require 'ory-keto-client'
|
19
19
|
|
20
|
-
instance = OryHydraClient::OryAccessControlPolicy.new(
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
20
|
+
instance = OryHydraClient::OryAccessControlPolicy.new(
|
21
|
+
actions: null,
|
22
|
+
conditions: null,
|
23
|
+
description: null,
|
24
|
+
effect: null,
|
25
|
+
id: null,
|
26
|
+
resources: null,
|
27
|
+
subjects: null
|
28
|
+
)
|
27
29
|
```
|
28
30
|
|
29
|
-
|
@@ -2,22 +2,23 @@
|
|
2
2
|
|
3
3
|
## Properties
|
4
4
|
|
5
|
-
Name | Type | Description | Notes
|
6
|
-
|
7
|
-
**action** | **String** | Action is the action that is requested on the resource. | [optional]
|
8
|
-
**context** | **
|
9
|
-
**resource** | **String** | Resource is the resource that access is requested to. | [optional]
|
10
|
-
**subject** | **String** | Subject is the subject that is requesting access. | [optional]
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **action** | **String** | Action is the action that is requested on the resource. | [optional] |
|
8
|
+
| **context** | **Object** | Context is the request's environmental context. | [optional] |
|
9
|
+
| **resource** | **String** | Resource is the resource that access is requested to. | [optional] |
|
10
|
+
| **subject** | **String** | Subject is the subject that is requesting access. | [optional] |
|
11
11
|
|
12
|
-
##
|
12
|
+
## Example
|
13
13
|
|
14
14
|
```ruby
|
15
|
-
require '
|
15
|
+
require 'ory-keto-client'
|
16
16
|
|
17
|
-
instance = OryHydraClient::OryAccessControlPolicyAllowedInput.new(
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
instance = OryHydraClient::OryAccessControlPolicyAllowedInput.new(
|
18
|
+
action: null,
|
19
|
+
context: null,
|
20
|
+
resource: null,
|
21
|
+
subject: null
|
22
|
+
)
|
21
23
|
```
|
22
24
|
|
23
|
-
|
@@ -2,18 +2,19 @@
|
|
2
2
|
|
3
3
|
## Properties
|
4
4
|
|
5
|
-
Name | Type | Description | Notes
|
6
|
-
|
7
|
-
**id** | **String** | ID is the role's unique id. | [optional]
|
8
|
-
**members** | **Array<String>** | Members is who belongs to the role. | [optional]
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **id** | **String** | ID is the role's unique id. | [optional] |
|
8
|
+
| **members** | **Array<String>** | Members is who belongs to the role. | [optional] |
|
9
9
|
|
10
|
-
##
|
10
|
+
## Example
|
11
11
|
|
12
12
|
```ruby
|
13
|
-
require '
|
13
|
+
require 'ory-keto-client'
|
14
14
|
|
15
|
-
instance = OryHydraClient::OryAccessControlPolicyRole.new(
|
16
|
-
|
15
|
+
instance = OryHydraClient::OryAccessControlPolicyRole.new(
|
16
|
+
id: null,
|
17
|
+
members: null
|
18
|
+
)
|
17
19
|
```
|
18
20
|
|
19
|
-
|