ory-kratos-client 0.3.0.alpha1 → 0.4.6.alpha1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +14 -6
  4. data/docs/AdminApi.md +53 -5
  5. data/docs/CommonApi.md +53 -5
  6. data/docs/Form.md +2 -2
  7. data/docs/FormField.md +3 -3
  8. data/docs/GenericErrorPayload.md +1 -1
  9. data/docs/Identity.md +9 -7
  10. data/docs/LoginRequest.md +2 -0
  11. data/docs/LoginRequestMethodConfig.md +2 -2
  12. data/docs/Message.md +23 -0
  13. data/docs/PublicApi.md +153 -13
  14. data/docs/RecoveryAddress.md +21 -0
  15. data/docs/RecoveryRequest.md +31 -0
  16. data/docs/RecoveryRequestMethod.md +19 -0
  17. data/docs/RegistrationRequest.md +2 -0
  18. data/docs/RegistrationRequestMethodConfig.md +2 -2
  19. data/docs/RequestMethodConfig.md +2 -2
  20. data/docs/SettingsRequest.md +4 -2
  21. data/docs/VerificationRequest.md +2 -0
  22. data/lib/ory-kratos-client.rb +6 -3
  23. data/lib/ory-kratos-client/api/admin_api.rb +73 -10
  24. data/lib/ory-kratos-client/api/common_api.rb +73 -10
  25. data/lib/ory-kratos-client/api/health_api.rb +2 -2
  26. data/lib/ory-kratos-client/api/public_api.rb +198 -20
  27. data/lib/ory-kratos-client/api/version_api.rb +2 -2
  28. data/lib/ory-kratos-client/api_client.rb +9 -7
  29. data/lib/ory-kratos-client/api_error.rb +2 -2
  30. data/lib/ory-kratos-client/configuration.rb +2 -2
  31. data/lib/ory-kratos-client/models/complete_self_service_browser_settings_strategy_profile_flow_payload.rb +2 -2
  32. data/lib/ory-kratos-client/models/error_container.rb +2 -2
  33. data/lib/ory-kratos-client/models/form.rb +14 -15
  34. data/lib/ory-kratos-client/models/form_field.rb +11 -11
  35. data/lib/ory-kratos-client/models/generic_error.rb +2 -2
  36. data/lib/ory-kratos-client/models/generic_error_payload.rb +4 -6
  37. data/lib/ory-kratos-client/models/health_not_ready_status.rb +2 -2
  38. data/lib/ory-kratos-client/models/health_status.rb +2 -2
  39. data/lib/ory-kratos-client/models/identity.rb +48 -35
  40. data/lib/ory-kratos-client/models/login_request.rb +14 -3
  41. data/lib/ory-kratos-client/models/login_request_method.rb +2 -2
  42. data/lib/ory-kratos-client/models/login_request_method_config.rb +14 -15
  43. data/lib/ory-kratos-client/models/message.rb +233 -0
  44. data/lib/ory-kratos-client/models/provider_credentials_config.rb +2 -2
  45. data/lib/ory-kratos-client/models/recovery_address.rb +239 -0
  46. data/lib/ory-kratos-client/models/recovery_request.rb +309 -0
  47. data/lib/ory-kratos-client/models/recovery_request_method.rb +216 -0
  48. data/lib/ory-kratos-client/models/registration_request.rb +14 -3
  49. data/lib/ory-kratos-client/models/registration_request_method.rb +2 -2
  50. data/lib/ory-kratos-client/models/registration_request_method_config.rb +14 -15
  51. data/lib/ory-kratos-client/models/request_method_config.rb +14 -15
  52. data/lib/ory-kratos-client/models/session.rb +2 -2
  53. data/lib/ory-kratos-client/models/settings_request.rb +23 -13
  54. data/lib/ory-kratos-client/models/settings_request_method.rb +2 -2
  55. data/lib/ory-kratos-client/models/verifiable_address.rb +2 -2
  56. data/lib/ory-kratos-client/models/verification_request.rb +14 -3
  57. data/lib/ory-kratos-client/models/version.rb +2 -2
  58. data/lib/ory-kratos-client/version.rb +3 -3
  59. data/ory-kratos-client.gemspec +2 -2
  60. data/spec/models/message_spec.rb +59 -0
  61. data/spec/models/recovery_address_spec.rb +53 -0
  62. data/spec/models/recovery_request_method_spec.rb +47 -0
  63. data/spec/models/recovery_request_spec.rb +83 -0
  64. metadata +40 -24
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Welcome to the ORY Kratos HTTP API documentation!
5
5
 
6
- The version of the OpenAPI document: latest
6
+ The version of the OpenAPI document: v0.4.6-alpha.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Welcome to the ORY Kratos HTTP API documentation!
5
5
 
6
- The version of the OpenAPI document: latest
6
+ The version of the OpenAPI document: v0.4.6-alpha.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -268,11 +268,13 @@ module OryHydraClient
268
268
  tempfile.write(chunk)
269
269
  end
270
270
  request.on_complete do |response|
271
- tempfile.close if tempfile
272
- @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
273
- "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
274
- "will be deleted automatically with GC. It's also recommended to delete the temp file "\
275
- "explicitly with `tempfile.delete`"
271
+ if tempfile
272
+ tempfile.close
273
+ @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
274
+ "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
275
+ "will be deleted automatically with GC. It's also recommended to delete the temp file "\
276
+ "explicitly with `tempfile.delete`"
277
+ end
276
278
  end
277
279
  end
278
280
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Welcome to the ORY Kratos HTTP API documentation!
5
5
 
6
- The version of the OpenAPI document: latest
6
+ The version of the OpenAPI document: v0.4.6-alpha.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Welcome to the ORY Kratos HTTP API documentation!
5
5
 
6
- The version of the OpenAPI document: latest
6
+ The version of the OpenAPI document: v0.4.6-alpha.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Welcome to the ORY Kratos HTTP API documentation!
5
5
 
6
- The version of the OpenAPI document: latest
6
+ The version of the OpenAPI document: v0.4.6-alpha.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Welcome to the ORY Kratos HTTP API documentation!
5
5
 
6
- The version of the OpenAPI document: latest
6
+ The version of the OpenAPI document: v0.4.6-alpha.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Welcome to the ORY Kratos HTTP API documentation!
5
5
 
6
- The version of the OpenAPI document: latest
6
+ The version of the OpenAPI document: v0.4.6-alpha.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -18,12 +18,11 @@ module OryHydraClient
18
18
  # Action should be used as the form action URL `<form action=\"{{ .Action }}\" method=\"post\">`.
19
19
  attr_accessor :action
20
20
 
21
- # Errors contains all form errors. These will be duplicates of the individual field errors.
22
- attr_accessor :errors
23
-
24
21
  # Fields contains multiple fields
25
22
  attr_accessor :fields
26
23
 
24
+ attr_accessor :messages
25
+
27
26
  # Method is the form method (e.g. POST)
28
27
  attr_accessor :method
29
28
 
@@ -31,8 +30,8 @@ module OryHydraClient
31
30
  def self.attribute_map
32
31
  {
33
32
  :'action' => :'action',
34
- :'errors' => :'errors',
35
33
  :'fields' => :'fields',
34
+ :'messages' => :'messages',
36
35
  :'method' => :'method'
37
36
  }
38
37
  end
@@ -41,8 +40,8 @@ module OryHydraClient
41
40
  def self.openapi_types
42
41
  {
43
42
  :'action' => :'String',
44
- :'errors' => :'Array<Error>',
45
43
  :'fields' => :'Array<FormField>',
44
+ :'messages' => :'Array<Message>',
46
45
  :'method' => :'String'
47
46
  }
48
47
  end
@@ -72,18 +71,18 @@ module OryHydraClient
72
71
  self.action = attributes[:'action']
73
72
  end
74
73
 
75
- if attributes.key?(:'errors')
76
- if (value = attributes[:'errors']).is_a?(Array)
77
- self.errors = value
78
- end
79
- end
80
-
81
74
  if attributes.key?(:'fields')
82
75
  if (value = attributes[:'fields']).is_a?(Array)
83
76
  self.fields = value
84
77
  end
85
78
  end
86
79
 
80
+ if attributes.key?(:'messages')
81
+ if (value = attributes[:'messages']).is_a?(Array)
82
+ self.messages = value
83
+ end
84
+ end
85
+
87
86
  if attributes.key?(:'method')
88
87
  self.method = attributes[:'method']
89
88
  end
@@ -123,8 +122,8 @@ module OryHydraClient
123
122
  return true if self.equal?(o)
124
123
  self.class == o.class &&
125
124
  action == o.action &&
126
- errors == o.errors &&
127
125
  fields == o.fields &&
126
+ messages == o.messages &&
128
127
  method == o.method
129
128
  end
130
129
 
@@ -137,7 +136,7 @@ module OryHydraClient
137
136
  # Calculates hash code according to all attributes.
138
137
  # @return [Integer] Hash code
139
138
  def hash
140
- [action, errors, fields, method].hash
139
+ [action, fields, messages, method].hash
141
140
  end
142
141
 
143
142
  # Builds the object from hash
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Welcome to the ORY Kratos HTTP API documentation!
5
5
 
6
- The version of the OpenAPI document: latest
6
+ The version of the OpenAPI document: v0.4.6-alpha.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -15,10 +15,10 @@ require 'date'
15
15
  module OryHydraClient
16
16
  # Field represents a HTML Form Field
17
17
  class FormField
18
- # Disabled is the equivalent of `<input disabled=\"{{.Disabled}}\">`
18
+ # Disabled is the equivalent of `<input {{if .Disabled}}disabled{{end}}\">`
19
19
  attr_accessor :disabled
20
20
 
21
- attr_accessor :errors
21
+ attr_accessor :messages
22
22
 
23
23
  # Name is the equivalent of `<input name=\"{{.Name}}\">`
24
24
  attr_accessor :name
@@ -39,7 +39,7 @@ module OryHydraClient
39
39
  def self.attribute_map
40
40
  {
41
41
  :'disabled' => :'disabled',
42
- :'errors' => :'errors',
42
+ :'messages' => :'messages',
43
43
  :'name' => :'name',
44
44
  :'pattern' => :'pattern',
45
45
  :'required' => :'required',
@@ -52,7 +52,7 @@ module OryHydraClient
52
52
  def self.openapi_types
53
53
  {
54
54
  :'disabled' => :'Boolean',
55
- :'errors' => :'Array<Error>',
55
+ :'messages' => :'Array<Message>',
56
56
  :'name' => :'String',
57
57
  :'pattern' => :'String',
58
58
  :'required' => :'Boolean',
@@ -86,9 +86,9 @@ module OryHydraClient
86
86
  self.disabled = attributes[:'disabled']
87
87
  end
88
88
 
89
- if attributes.key?(:'errors')
90
- if (value = attributes[:'errors']).is_a?(Array)
91
- self.errors = value
89
+ if attributes.key?(:'messages')
90
+ if (value = attributes[:'messages']).is_a?(Array)
91
+ self.messages = value
92
92
  end
93
93
  end
94
94
 
@@ -142,7 +142,7 @@ module OryHydraClient
142
142
  return true if self.equal?(o)
143
143
  self.class == o.class &&
144
144
  disabled == o.disabled &&
145
- errors == o.errors &&
145
+ messages == o.messages &&
146
146
  name == o.name &&
147
147
  pattern == o.pattern &&
148
148
  required == o.required &&
@@ -159,7 +159,7 @@ module OryHydraClient
159
159
  # Calculates hash code according to all attributes.
160
160
  # @return [Integer] Hash code
161
161
  def hash
162
- [disabled, errors, name, pattern, required, type, value].hash
162
+ [disabled, messages, name, pattern, required, type, value].hash
163
163
  end
164
164
 
165
165
  # Builds the object from hash
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Welcome to the ORY Kratos HTTP API documentation!
5
5
 
6
- The version of the OpenAPI document: latest
6
+ The version of the OpenAPI document: v0.4.6-alpha.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Welcome to the ORY Kratos HTTP API documentation!
5
5
 
6
- The version of the OpenAPI document: latest
6
+ The version of the OpenAPI document: v0.4.6-alpha.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -48,7 +48,7 @@ module OryHydraClient
48
48
  {
49
49
  :'code' => :'Integer',
50
50
  :'debug' => :'String',
51
- :'details' => :'Hash<String, Object>',
51
+ :'details' => :'Object',
52
52
  :'message' => :'String',
53
53
  :'reason' => :'String',
54
54
  :'request' => :'String',
@@ -86,9 +86,7 @@ module OryHydraClient
86
86
  end
87
87
 
88
88
  if attributes.key?(:'details')
89
- if (value = attributes[:'details']).is_a?(Hash)
90
- self.details = value
91
- end
89
+ self.details = attributes[:'details']
92
90
  end
93
91
 
94
92
  if attributes.key?(:'message')
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Welcome to the ORY Kratos HTTP API documentation!
5
5
 
6
- The version of the OpenAPI document: latest
6
+ The version of the OpenAPI document: v0.4.6-alpha.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Welcome to the ORY Kratos HTTP API documentation!
5
5
 
6
- The version of the OpenAPI document: latest
6
+ The version of the OpenAPI document: v0.4.6-alpha.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Welcome to the ORY Kratos HTTP API documentation!
5
5
 
6
- The version of the OpenAPI document: latest
6
+ The version of the OpenAPI document: v0.4.6-alpha.1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -14,37 +14,43 @@ require 'date'
14
14
 
15
15
  module OryHydraClient
16
16
  class Identity
17
- attr_accessor :addresses
18
-
19
17
  attr_accessor :id
20
18
 
21
- attr_accessor :traits
19
+ # RecoveryAddresses contains all the addresses that can be used to recover an identity.
20
+ attr_accessor :recovery_addresses
21
+
22
+ # SchemaID is the ID of the JSON Schema to be used for validating the identity's traits.
23
+ attr_accessor :schema_id
22
24
 
23
- # TraitsSchemaID is the ID of the JSON Schema to be used for validating the identity's traits.
24
- attr_accessor :traits_schema_id
25
+ # SchemaURL is the URL of the endpoint where the identity's traits schema can be fetched from. format: url
26
+ attr_accessor :schema_url
27
+
28
+ attr_accessor :traits
25
29
 
26
- # TraitsSchemaURL is the URL of the endpoint where the identity's traits schema can be fetched from. format: url
27
- attr_accessor :traits_schema_url
30
+ # VerifiableAddresses contains all the addresses that can be verified by the user.
31
+ attr_accessor :verifiable_addresses
28
32
 
29
33
  # Attribute mapping from ruby-style variable name to JSON key.
30
34
  def self.attribute_map
31
35
  {
32
- :'addresses' => :'addresses',
33
36
  :'id' => :'id',
37
+ :'recovery_addresses' => :'recovery_addresses',
38
+ :'schema_id' => :'schema_id',
39
+ :'schema_url' => :'schema_url',
34
40
  :'traits' => :'traits',
35
- :'traits_schema_id' => :'traits_schema_id',
36
- :'traits_schema_url' => :'traits_schema_url'
41
+ :'verifiable_addresses' => :'verifiable_addresses'
37
42
  }
38
43
  end
39
44
 
40
45
  # Attribute type mapping.
41
46
  def self.openapi_types
42
47
  {
43
- :'addresses' => :'Array<VerifiableAddress>',
44
48
  :'id' => :'String',
49
+ :'recovery_addresses' => :'Array<RecoveryAddress>',
50
+ :'schema_id' => :'String',
51
+ :'schema_url' => :'String',
45
52
  :'traits' => :'Object',
46
- :'traits_schema_id' => :'String',
47
- :'traits_schema_url' => :'String'
53
+ :'verifiable_addresses' => :'Array<VerifiableAddress>'
48
54
  }
49
55
  end
50
56
 
@@ -69,26 +75,32 @@ module OryHydraClient
69
75
  h[k.to_sym] = v
70
76
  }
71
77
 
72
- if attributes.key?(:'addresses')
73
- if (value = attributes[:'addresses']).is_a?(Array)
74
- self.addresses = value
78
+ if attributes.key?(:'id')
79
+ self.id = attributes[:'id']
80
+ end
81
+
82
+ if attributes.key?(:'recovery_addresses')
83
+ if (value = attributes[:'recovery_addresses']).is_a?(Array)
84
+ self.recovery_addresses = value
75
85
  end
76
86
  end
77
87
 
78
- if attributes.key?(:'id')
79
- self.id = attributes[:'id']
88
+ if attributes.key?(:'schema_id')
89
+ self.schema_id = attributes[:'schema_id']
80
90
  end
81
91
 
82
- if attributes.key?(:'traits')
83
- self.traits = attributes[:'traits']
92
+ if attributes.key?(:'schema_url')
93
+ self.schema_url = attributes[:'schema_url']
84
94
  end
85
95
 
86
- if attributes.key?(:'traits_schema_id')
87
- self.traits_schema_id = attributes[:'traits_schema_id']
96
+ if attributes.key?(:'traits')
97
+ self.traits = attributes[:'traits']
88
98
  end
89
99
 
90
- if attributes.key?(:'traits_schema_url')
91
- self.traits_schema_url = attributes[:'traits_schema_url']
100
+ if attributes.key?(:'verifiable_addresses')
101
+ if (value = attributes[:'verifiable_addresses']).is_a?(Array)
102
+ self.verifiable_addresses = value
103
+ end
92
104
  end
93
105
  end
94
106
 
@@ -100,12 +112,12 @@ module OryHydraClient
100
112
  invalid_properties.push('invalid value for "id", id cannot be nil.')
101
113
  end
102
114
 
103
- if @traits.nil?
104
- invalid_properties.push('invalid value for "traits", traits cannot be nil.')
115
+ if @schema_id.nil?
116
+ invalid_properties.push('invalid value for "schema_id", schema_id cannot be nil.')
105
117
  end
106
118
 
107
- if @traits_schema_id.nil?
108
- invalid_properties.push('invalid value for "traits_schema_id", traits_schema_id cannot be nil.')
119
+ if @traits.nil?
120
+ invalid_properties.push('invalid value for "traits", traits cannot be nil.')
109
121
  end
110
122
 
111
123
  invalid_properties
@@ -115,8 +127,8 @@ module OryHydraClient
115
127
  # @return true if the model is valid
116
128
  def valid?
117
129
  return false if @id.nil?
130
+ return false if @schema_id.nil?
118
131
  return false if @traits.nil?
119
- return false if @traits_schema_id.nil?
120
132
  true
121
133
  end
122
134
 
@@ -125,11 +137,12 @@ module OryHydraClient
125
137
  def ==(o)
126
138
  return true if self.equal?(o)
127
139
  self.class == o.class &&
128
- addresses == o.addresses &&
129
140
  id == o.id &&
141
+ recovery_addresses == o.recovery_addresses &&
142
+ schema_id == o.schema_id &&
143
+ schema_url == o.schema_url &&
130
144
  traits == o.traits &&
131
- traits_schema_id == o.traits_schema_id &&
132
- traits_schema_url == o.traits_schema_url
145
+ verifiable_addresses == o.verifiable_addresses
133
146
  end
134
147
 
135
148
  # @see the `==` method
@@ -141,7 +154,7 @@ module OryHydraClient
141
154
  # Calculates hash code according to all attributes.
142
155
  # @return [Integer] Hash code
143
156
  def hash
144
- [addresses, id, traits, traits_schema_id, traits_schema_url].hash
157
+ [id, recovery_addresses, schema_id, schema_url, traits, verifiable_addresses].hash
145
158
  end
146
159
 
147
160
  # Builds the object from hash