ory-kratos-client 0.1.0.alpha5 → 0.3.0.alpha1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +27 -11
  3. data/docs/AdminApi.md +116 -21
  4. data/docs/CommonApi.md +116 -21
  5. data/docs/CompleteSelfServiceBrowserSettingsStrategyProfileFlowPayload.md +19 -0
  6. data/docs/Form.md +3 -3
  7. data/docs/FormField.md +7 -7
  8. data/docs/GenericErrorPayload.md +1 -1
  9. data/docs/Identity.md +4 -2
  10. data/docs/LoginRequest.md +7 -5
  11. data/docs/LoginRequestMethod.md +2 -2
  12. data/docs/LoginRequestMethodConfig.md +10 -1
  13. data/docs/ProfileManagementRequest.md +7 -7
  14. data/docs/ProviderCredentialsConfig.md +19 -0
  15. data/docs/PublicApi.md +365 -39
  16. data/docs/RegistrationRequest.md +5 -5
  17. data/docs/RegistrationRequestMethodConfig.md +10 -1
  18. data/docs/RequestMethodConfig.md +23 -0
  19. data/docs/Session.md +5 -5
  20. data/docs/SettingsRequest.md +31 -0
  21. data/docs/SettingsRequestMethod.md +19 -0
  22. data/docs/VerifiableAddress.md +27 -0
  23. data/docs/VerificationRequest.md +29 -0
  24. data/lib/ory-kratos-client.rb +8 -3
  25. data/lib/ory-kratos-client/api/admin_api.rb +159 -36
  26. data/lib/ory-kratos-client/api/common_api.rb +159 -36
  27. data/lib/ory-kratos-client/api/health_api.rb +1 -1
  28. data/lib/ory-kratos-client/api/public_api.rb +493 -59
  29. data/lib/ory-kratos-client/api/version_api.rb +1 -1
  30. data/lib/ory-kratos-client/api_client.rb +1 -1
  31. data/lib/ory-kratos-client/api_error.rb +1 -1
  32. data/lib/ory-kratos-client/configuration.rb +1 -1
  33. data/lib/ory-kratos-client/models/complete_self_service_browser_profile_management_flow_payload.rb +1 -1
  34. data/lib/ory-kratos-client/models/complete_self_service_browser_settings_strategy_profile_flow_payload.rb +222 -0
  35. data/lib/ory-kratos-client/models/error.rb +1 -1
  36. data/lib/ory-kratos-client/models/error_container.rb +1 -1
  37. data/lib/ory-kratos-client/models/form.rb +17 -2
  38. data/lib/ory-kratos-client/models/form_field.rb +18 -9
  39. data/lib/ory-kratos-client/models/generic_error.rb +1 -1
  40. data/lib/ory-kratos-client/models/generic_error_payload.rb +3 -4
  41. data/lib/ory-kratos-client/models/health_not_ready_status.rb +1 -1
  42. data/lib/ory-kratos-client/models/health_status.rb +1 -1
  43. data/lib/ory-kratos-client/models/identity.rb +18 -2
  44. data/lib/ory-kratos-client/models/login_request.rb +37 -2
  45. data/lib/ory-kratos-client/models/login_request_method.rb +11 -1
  46. data/lib/ory-kratos-client/models/login_request_method_config.rb +74 -3
  47. data/lib/ory-kratos-client/models/profile_management_request.rb +36 -1
  48. data/lib/ory-kratos-client/models/provider_credentials_config.rb +215 -0
  49. data/lib/ory-kratos-client/models/registration_request.rb +26 -1
  50. data/lib/ory-kratos-client/models/registration_request_method.rb +1 -1
  51. data/lib/ory-kratos-client/models/registration_request_method_config.rb +74 -3
  52. data/lib/ory-kratos-client/models/request_method_config.rb +256 -0
  53. data/lib/ory-kratos-client/models/session.rb +26 -1
  54. data/lib/ory-kratos-client/models/settings_request.rb +313 -0
  55. data/lib/ory-kratos-client/models/settings_request_method.rb +216 -0
  56. data/lib/ory-kratos-client/models/verifiable_address.rb +276 -0
  57. data/lib/ory-kratos-client/models/verification_request.rb +265 -0
  58. data/lib/ory-kratos-client/models/version.rb +1 -1
  59. data/lib/ory-kratos-client/version.rb +2 -2
  60. data/ory-kratos-client.gemspec +1 -1
  61. data/spec/models/complete_self_service_browser_settings_strategy_profile_flow_payload_spec.rb +47 -0
  62. data/spec/models/provider_credentials_config_spec.rb +47 -0
  63. data/spec/models/request_method_config_spec.rb +59 -0
  64. data/spec/models/settings_request_method_spec.rb +47 -0
  65. data/spec/models/settings_request_spec.rb +83 -0
  66. data/spec/models/verifiable_address_spec.rb +71 -0
  67. data/spec/models/verification_request_spec.rb +77 -0
  68. metadata +43 -15
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: latest
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.2
9
+ OpenAPI Generator version: 4.2.3
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: latest
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.2
9
+ OpenAPI Generator version: 4.2.3
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: latest
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.2
9
+ OpenAPI Generator version: 4.2.3
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: latest
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.2
9
+ OpenAPI Generator version: 4.2.3
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: latest
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.2
9
+ OpenAPI Generator version: 4.2.3
10
10
 
11
11
  =end
12
12
 
@@ -0,0 +1,222 @@
1
+ =begin
2
+ #Ory Kratos
3
+
4
+ #Welcome to the ORY Kratos HTTP API documentation!
5
+
6
+ The version of the OpenAPI document: latest
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.2.3
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module OryHydraClient
16
+ class CompleteSelfServiceBrowserSettingsStrategyProfileFlowPayload
17
+ # RequestID is request ID. in: query
18
+ attr_accessor :request_id
19
+
20
+ # Traits contains all of the identity's traits. type: string format: binary
21
+ attr_accessor :traits
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'request_id' => :'request_id',
27
+ :'traits' => :'traits'
28
+ }
29
+ end
30
+
31
+ # Attribute type mapping.
32
+ def self.openapi_types
33
+ {
34
+ :'request_id' => :'String',
35
+ :'traits' => :'Object'
36
+ }
37
+ end
38
+
39
+ # List of attributes with nullable: true
40
+ def self.openapi_nullable
41
+ Set.new([
42
+ ])
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ if (!attributes.is_a?(Hash))
49
+ fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::CompleteSelfServiceBrowserSettingsStrategyProfileFlowPayload` initialize method"
50
+ end
51
+
52
+ # check to see if the attribute exists and convert string to symbol for hash key
53
+ attributes = attributes.each_with_object({}) { |(k, v), h|
54
+ if (!self.class.attribute_map.key?(k.to_sym))
55
+ fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::CompleteSelfServiceBrowserSettingsStrategyProfileFlowPayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ end
57
+ h[k.to_sym] = v
58
+ }
59
+
60
+ if attributes.key?(:'request_id')
61
+ self.request_id = attributes[:'request_id']
62
+ end
63
+
64
+ if attributes.key?(:'traits')
65
+ self.traits = attributes[:'traits']
66
+ end
67
+ end
68
+
69
+ # Show invalid properties with the reasons. Usually used together with valid?
70
+ # @return Array for valid properties with the reasons
71
+ def list_invalid_properties
72
+ invalid_properties = Array.new
73
+ if @traits.nil?
74
+ invalid_properties.push('invalid value for "traits", traits cannot be nil.')
75
+ end
76
+
77
+ invalid_properties
78
+ end
79
+
80
+ # Check to see if the all the properties in the model are valid
81
+ # @return true if the model is valid
82
+ def valid?
83
+ return false if @traits.nil?
84
+ true
85
+ end
86
+
87
+ # Checks equality by comparing each attribute.
88
+ # @param [Object] Object to be compared
89
+ def ==(o)
90
+ return true if self.equal?(o)
91
+ self.class == o.class &&
92
+ request_id == o.request_id &&
93
+ traits == o.traits
94
+ end
95
+
96
+ # @see the `==` method
97
+ # @param [Object] Object to be compared
98
+ def eql?(o)
99
+ self == o
100
+ end
101
+
102
+ # Calculates hash code according to all attributes.
103
+ # @return [Integer] Hash code
104
+ def hash
105
+ [request_id, traits].hash
106
+ end
107
+
108
+ # Builds the object from hash
109
+ # @param [Hash] attributes Model attributes in the form of hash
110
+ # @return [Object] Returns the model itself
111
+ def self.build_from_hash(attributes)
112
+ new.build_from_hash(attributes)
113
+ end
114
+
115
+ # Builds the object from hash
116
+ # @param [Hash] attributes Model attributes in the form of hash
117
+ # @return [Object] Returns the model itself
118
+ def build_from_hash(attributes)
119
+ return nil unless attributes.is_a?(Hash)
120
+ self.class.openapi_types.each_pair do |key, type|
121
+ if type =~ /\AArray<(.*)>/i
122
+ # check to ensure the input is an array given that the attribute
123
+ # is documented as an array but the input is not
124
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
125
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
126
+ end
127
+ elsif !attributes[self.class.attribute_map[key]].nil?
128
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
129
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
130
+ end
131
+
132
+ self
133
+ end
134
+
135
+ # Deserializes the data based on type
136
+ # @param string type Data type
137
+ # @param string value Value to be deserialized
138
+ # @return [Object] Deserialized data
139
+ def _deserialize(type, value)
140
+ case type.to_sym
141
+ when :DateTime
142
+ DateTime.parse(value)
143
+ when :Date
144
+ Date.parse(value)
145
+ when :String
146
+ value.to_s
147
+ when :Integer
148
+ value.to_i
149
+ when :Float
150
+ value.to_f
151
+ when :Boolean
152
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
153
+ true
154
+ else
155
+ false
156
+ end
157
+ when :Object
158
+ # generic object (usually a Hash), return directly
159
+ value
160
+ when /\AArray<(?<inner_type>.+)>\z/
161
+ inner_type = Regexp.last_match[:inner_type]
162
+ value.map { |v| _deserialize(inner_type, v) }
163
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
164
+ k_type = Regexp.last_match[:k_type]
165
+ v_type = Regexp.last_match[:v_type]
166
+ {}.tap do |hash|
167
+ value.each do |k, v|
168
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
169
+ end
170
+ end
171
+ else # model
172
+ OryHydraClient.const_get(type).build_from_hash(value)
173
+ end
174
+ end
175
+
176
+ # Returns the string representation of the object
177
+ # @return [String] String presentation of the object
178
+ def to_s
179
+ to_hash.to_s
180
+ end
181
+
182
+ # to_body is an alias to to_hash (backward compatibility)
183
+ # @return [Hash] Returns the object in the form of hash
184
+ def to_body
185
+ to_hash
186
+ end
187
+
188
+ # Returns the object in the form of hash
189
+ # @return [Hash] Returns the object in the form of hash
190
+ def to_hash
191
+ hash = {}
192
+ self.class.attribute_map.each_pair do |attr, param|
193
+ value = self.send(attr)
194
+ if value.nil?
195
+ is_nullable = self.class.openapi_nullable.include?(attr)
196
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
197
+ end
198
+
199
+ hash[param] = _to_hash(value)
200
+ end
201
+ hash
202
+ end
203
+
204
+ # Outputs non-array value in the form of hash
205
+ # For object, use to_hash. Otherwise, just return the value
206
+ # @param [Object] value Any valid value
207
+ # @return [Hash] Returns the value in the form of hash
208
+ def _to_hash(value)
209
+ if value.is_a?(Array)
210
+ value.compact.map { |v| _to_hash(v) }
211
+ elsif value.is_a?(Hash)
212
+ {}.tap do |hash|
213
+ value.each { |k, v| hash[k] = _to_hash(v) }
214
+ end
215
+ elsif value.respond_to? :to_hash
216
+ value.to_hash
217
+ else
218
+ value
219
+ end
220
+ end
221
+ end
222
+ end
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: latest
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.2
9
+ OpenAPI Generator version: 4.2.3
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: latest
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.2
9
+ OpenAPI Generator version: 4.2.3
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: latest
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.2
9
+ OpenAPI Generator version: 4.2.3
10
10
 
11
11
  =end
12
12
 
@@ -15,7 +15,7 @@ require 'date'
15
15
  module OryHydraClient
16
16
  # HTMLForm represents a HTML Form. The container can work with both HTTP Form and JSON requests
17
17
  class Form
18
- # Action should be used as the form action URL (<form action=\"{{ .Action }}\" method=\"post\">).
18
+ # Action should be used as the form action URL `<form action=\"{{ .Action }}\" method=\"post\">`.
19
19
  attr_accessor :action
20
20
 
21
21
  # Errors contains all form errors. These will be duplicates of the individual field errors.
@@ -93,12 +93,27 @@ module OryHydraClient
93
93
  # @return Array for valid properties with the reasons
94
94
  def list_invalid_properties
95
95
  invalid_properties = Array.new
96
+ if @action.nil?
97
+ invalid_properties.push('invalid value for "action", action cannot be nil.')
98
+ end
99
+
100
+ if @fields.nil?
101
+ invalid_properties.push('invalid value for "fields", fields cannot be nil.')
102
+ end
103
+
104
+ if @method.nil?
105
+ invalid_properties.push('invalid value for "method", method cannot be nil.')
106
+ end
107
+
96
108
  invalid_properties
97
109
  end
98
110
 
99
111
  # Check to see if the all the properties in the model are valid
100
112
  # @return true if the model is valid
101
113
  def valid?
114
+ return false if @action.nil?
115
+ return false if @fields.nil?
116
+ return false if @method.nil?
102
117
  true
103
118
  end
104
119
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: latest
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.2
9
+ OpenAPI Generator version: 4.2.3
10
10
 
11
11
  =end
12
12
 
@@ -15,25 +15,24 @@ 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 disabled=\"{{.Disabled}}\">`
19
19
  attr_accessor :disabled
20
20
 
21
- # Errors contains all validation errors this particular field has caused.
22
21
  attr_accessor :errors
23
22
 
24
- # Name is the equivalent of <input name=\"{{.Name}}\">
23
+ # Name is the equivalent of `<input name=\"{{.Name}}\">`
25
24
  attr_accessor :name
26
25
 
27
- # Pattern is the equivalent of <input pattern=\"{{.Pattern}}\">
26
+ # Pattern is the equivalent of `<input pattern=\"{{.Pattern}}\">`
28
27
  attr_accessor :pattern
29
28
 
30
- # Required is the equivalent of <input required=\"{{.Required}}\">
29
+ # Required is the equivalent of `<input required=\"{{.Required}}\">`
31
30
  attr_accessor :required
32
31
 
33
- # Type is the equivalent of <input type=\"{{.Type}}\">
32
+ # Type is the equivalent of `<input type=\"{{.Type}}\">`
34
33
  attr_accessor :type
35
34
 
36
- # Value is the equivalent of <input value=\"{{.Value}}\">
35
+ # Value is the equivalent of `<input value=\"{{.Value}}\">`
37
36
  attr_accessor :value
38
37
 
39
38
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -52,7 +51,7 @@ module OryHydraClient
52
51
  # Attribute type mapping.
53
52
  def self.openapi_types
54
53
  {
55
- :'disabled' => :'String',
54
+ :'disabled' => :'Boolean',
56
55
  :'errors' => :'Array<Error>',
57
56
  :'name' => :'String',
58
57
  :'pattern' => :'String',
@@ -118,12 +117,22 @@ module OryHydraClient
118
117
  # @return Array for valid properties with the reasons
119
118
  def list_invalid_properties
120
119
  invalid_properties = Array.new
120
+ if @name.nil?
121
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
122
+ end
123
+
124
+ if @type.nil?
125
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
126
+ end
127
+
121
128
  invalid_properties
122
129
  end
123
130
 
124
131
  # Check to see if the all the properties in the model are valid
125
132
  # @return true if the model is valid
126
133
  def valid?
134
+ return false if @name.nil?
135
+ return false if @type.nil?
127
136
  true
128
137
  end
129
138
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: latest
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.2
9
+ OpenAPI Generator version: 4.2.3
10
10
 
11
11
  =end
12
12
 
@@ -6,14 +6,13 @@
6
6
  The version of the OpenAPI document: latest
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.2
9
+ OpenAPI Generator version: 4.2.3
10
10
 
11
11
  =end
12
12
 
13
13
  require 'date'
14
14
 
15
15
  module OryHydraClient
16
- # nolint:deadcode,unused
17
16
  class GenericErrorPayload
18
17
  # Code represents the error status code (404, 403, 401, ...).
19
18
  attr_accessor :code
@@ -49,7 +48,7 @@ module OryHydraClient
49
48
  {
50
49
  :'code' => :'Integer',
51
50
  :'debug' => :'String',
52
- :'details' => :'Array<Hash<String, Object>>',
51
+ :'details' => :'Hash<String, Object>',
53
52
  :'message' => :'String',
54
53
  :'reason' => :'String',
55
54
  :'request' => :'String',
@@ -87,7 +86,7 @@ module OryHydraClient
87
86
  end
88
87
 
89
88
  if attributes.key?(:'details')
90
- if (value = attributes[:'details']).is_a?(Array)
89
+ if (value = attributes[:'details']).is_a?(Hash)
91
90
  self.details = value
92
91
  end
93
92
  end