ory-keto-client 0.5.3.alpha2 → 0.6.0.alpha3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +22 -31
  4. data/docs/AddOryAccessControlPolicyRoleMembersBody.md +8 -7
  5. data/docs/AuthorizationResult.md +8 -7
  6. data/docs/EnginesApi.md +319 -129
  7. data/docs/ExpandTree.md +22 -0
  8. data/docs/GetCheckResponse.md +18 -0
  9. data/docs/GetRelationTuplesResponse.md +20 -0
  10. data/docs/HealthApi.md +50 -15
  11. data/docs/HealthNotReadyStatus.md +8 -7
  12. data/docs/HealthStatus.md +8 -7
  13. data/docs/InlineResponse400.md +28 -0
  14. data/docs/InlineResponse500.md +18 -17
  15. data/docs/InternalRelationTuple.md +24 -0
  16. data/docs/OryAccessControlPolicy.md +20 -19
  17. data/docs/OryAccessControlPolicyAllowedInput.md +14 -13
  18. data/docs/OryAccessControlPolicyRole.md +10 -9
  19. data/docs/PatchDelta.md +20 -0
  20. data/docs/ReadApi.md +297 -0
  21. data/docs/Version.md +8 -7
  22. data/docs/VersionApi.md +26 -9
  23. data/docs/WriteApi.md +212 -0
  24. data/lib/ory-keto-client.rb +10 -9
  25. data/lib/ory-keto-client/api/engines_api.rb +46 -35
  26. data/lib/ory-keto-client/api/health_api.rb +10 -8
  27. data/lib/ory-keto-client/api/read_api.rb +324 -0
  28. data/lib/ory-keto-client/api/version_api.rb +6 -5
  29. data/lib/ory-keto-client/api/write_api.rb +225 -0
  30. data/lib/ory-keto-client/api_client.rb +51 -47
  31. data/lib/ory-keto-client/api_error.rb +2 -2
  32. data/lib/ory-keto-client/configuration.rb +40 -11
  33. data/lib/ory-keto-client/models/add_ory_access_control_policy_role_members_body.rb +20 -8
  34. data/lib/ory-keto-client/models/authorization_result.rb +20 -8
  35. data/lib/ory-keto-client/models/expand_tree.rb +282 -0
  36. data/lib/ory-keto-client/models/get_check_response.rb +225 -0
  37. data/lib/ory-keto-client/models/get_relation_tuples_response.rb +230 -0
  38. data/lib/ory-keto-client/models/health_not_ready_status.rb +20 -8
  39. data/lib/ory-keto-client/models/health_status.rb +20 -8
  40. data/lib/ory-keto-client/models/inline_response400.rb +265 -0
  41. data/lib/ory-keto-client/models/inline_response500.rb +21 -9
  42. data/lib/ory-keto-client/models/internal_relation_tuple.rb +268 -0
  43. data/lib/ory-keto-client/models/ory_access_control_policy.rb +22 -12
  44. data/lib/ory-keto-client/models/ory_access_control_policy_allowed_input.rb +22 -12
  45. data/lib/ory-keto-client/models/ory_access_control_policy_role.rb +20 -8
  46. data/lib/ory-keto-client/models/patch_delta.rb +227 -0
  47. data/lib/ory-keto-client/models/version.rb +20 -8
  48. data/lib/ory-keto-client/version.rb +3 -3
  49. data/ory-keto-client.gemspec +4 -5
  50. data/spec/api/read_api_spec.rb +94 -0
  51. data/spec/api/write_api_spec.rb +74 -0
  52. data/spec/api_client_spec.rb +4 -4
  53. data/spec/configuration_spec.rb +3 -3
  54. data/spec/models/expand_tree_spec.rb +50 -0
  55. data/spec/models/get_check_response_spec.rb +34 -0
  56. data/spec/models/get_relation_tuples_response_spec.rb +40 -0
  57. data/spec/models/inline_response400_spec.rb +64 -0
  58. data/spec/models/internal_relation_tuple_spec.rb +52 -0
  59. data/spec/models/patch_delta_spec.rb +40 -0
  60. data/spec/spec_helper.rb +3 -3
  61. metadata +87 -75
@@ -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
- ### Example
19
+ ### Examples
21
20
 
22
21
  ```ruby
23
- # load the gem
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 "Exception when calling HealthApi->is_instance_alive: #{e}"
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
- ### Example
80
+ ### Examples
64
81
 
65
82
  ```ruby
66
- # load the gem
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 "Exception when calling HealthApi->is_instance_ready: #{e}"
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&lt;String, String&gt;** | Errors contains a list of errors that caused the not ready status. | [optional]
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **errors** | **Hash&lt;String, String&gt;** | Errors contains a list of errors that caused the not ready status. | [optional] |
8
8
 
9
- ## Code Sample
9
+ ## Example
10
10
 
11
11
  ```ruby
12
- require 'OryHydraClient'
12
+ require 'ory-keto-client'
13
13
 
14
- instance = OryHydraClient::HealthNotReadyStatus.new(errors: null)
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 \&quot;ok\&quot;. | [optional]
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **status** | **String** | Status always contains \&quot;ok\&quot;. | [optional] |
8
8
 
9
- ## Code Sample
9
+ ## Example
10
10
 
11
11
  ```ruby
12
- require 'OryHydraClient'
12
+ require 'ory-keto-client'
13
13
 
14
- instance = OryHydraClient::HealthStatus.new(status: null)
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&lt;Object&gt;** | | [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
+
@@ -2,26 +2,27 @@
2
2
 
3
3
  ## Properties
4
4
 
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **code** | **Integer** | | [optional]
8
- **details** | **Array&lt;Hash&lt;String, Object&gt;&gt;** | | [optional]
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&lt;Object&gt;** | | [optional] |
9
+ | **message** | **String** | | [optional] |
10
+ | **reason** | **String** | | [optional] |
11
+ | **request** | **String** | | [optional] |
12
+ | **status** | **String** | | [optional] |
13
13
 
14
- ## Code Sample
14
+ ## Example
15
15
 
16
16
  ```ruby
17
- require 'OryHydraClient'
17
+ require 'ory-keto-client'
18
18
 
19
- instance = OryHydraClient::InlineResponse500.new(code: null,
20
- details: null,
21
- message: null,
22
- reason: null,
23
- request: null,
24
- status: null)
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&lt;String&gt;** | Actions is an array representing all the actions this ORY Access Policy applies to. | [optional]
8
- **conditions** | **Hash&lt;String, Object&gt;** | 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 \&quot;allow\&quot; or \&quot;deny\&quot;. | [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&lt;String&gt;** | Resources is an array representing all the resources this ORY Access Policy applies to. | [optional]
13
- **subjects** | **Array&lt;String&gt;** | Subjects is an array representing all the subjects this ORY Access Policy applies to. | [optional]
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **actions** | **Array&lt;String&gt;** | 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 \&quot;allow\&quot; or \&quot;deny\&quot;. | [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&lt;String&gt;** | Resources is an array representing all the resources this ORY Access Policy applies to. | [optional] |
13
+ | **subjects** | **Array&lt;String&gt;** | Subjects is an array representing all the subjects this ORY Access Policy applies to. | [optional] |
14
14
 
15
- ## Code Sample
15
+ ## Example
16
16
 
17
17
  ```ruby
18
- require 'OryHydraClient'
18
+ require 'ory-keto-client'
19
19
 
20
- instance = OryHydraClient::OryAccessControlPolicy.new(actions: null,
21
- conditions: null,
22
- description: null,
23
- effect: null,
24
- id: null,
25
- resources: null,
26
- subjects: null)
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** | **Hash&lt;String, Object&gt;** | Context is the request&#39;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]
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&#39;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
- ## Code Sample
12
+ ## Example
13
13
 
14
14
  ```ruby
15
- require 'OryHydraClient'
15
+ require 'ory-keto-client'
16
16
 
17
- instance = OryHydraClient::OryAccessControlPolicyAllowedInput.new(action: null,
18
- context: null,
19
- resource: null,
20
- subject: null)
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&#39;s unique id. | [optional]
8
- **members** | **Array&lt;String&gt;** | Members is who belongs to the role. | [optional]
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | ID is the role&#39;s unique id. | [optional] |
8
+ | **members** | **Array&lt;String&gt;** | Members is who belongs to the role. | [optional] |
9
9
 
10
- ## Code Sample
10
+ ## Example
11
11
 
12
12
  ```ruby
13
- require 'OryHydraClient'
13
+ require 'ory-keto-client'
14
14
 
15
- instance = OryHydraClient::OryAccessControlPolicyRole.new(id: null,
16
- members: null)
15
+ instance = OryHydraClient::OryAccessControlPolicyRole.new(
16
+ id: null,
17
+ members: null
18
+ )
17
19
  ```
18
20
 
19
-