passageidentity 0.7.1 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/lib/openapi_client/api/users_api.rb +18 -18
  3. data/lib/openapi_client/models/create_magic_link_request.rb +21 -2
  4. data/lib/openapi_client/models/{create_user_request.rb → create_user_args.rb} +3 -3
  5. data/lib/openapi_client/models/magic_link.rb +1 -0
  6. data/lib/openapi_client/models/{theme_type.rb → magic_link_language.rb} +11 -7
  7. data/lib/openapi_client/models/{user_info.rb → passage_user.rb} +3 -3
  8. data/lib/openapi_client/models/{update_user_request.rb → update_user_args.rb} +3 -3
  9. data/lib/openapi_client/models/user_response.rb +1 -1
  10. data/lib/openapi_client.rb +4 -19
  11. data/lib/passageidentity/auth.rb +43 -156
  12. data/lib/passageidentity/client.rb +16 -96
  13. data/lib/passageidentity/user.rb +246 -0
  14. data/lib/passageidentity/version.rb +1 -1
  15. metadata +38 -36
  16. data/lib/models/update_magic_link_auth_method.rb +0 -276
  17. data/lib/models/update_otp_auth_method.rb +0 -276
  18. data/lib/models/update_passkeys_auth_method.rb +0 -216
  19. data/lib/openapi_client/api/apps_api.rb +0 -85
  20. data/lib/openapi_client/models/app_info.rb +0 -886
  21. data/lib/openapi_client/models/app_response.rb +0 -221
  22. data/lib/openapi_client/models/auth_methods.rb +0 -254
  23. data/lib/openapi_client/models/element_customization.rb +0 -457
  24. data/lib/openapi_client/models/font_family.rb +0 -58
  25. data/lib/openapi_client/models/layout_config.rb +0 -285
  26. data/lib/openapi_client/models/layouts.rb +0 -241
  27. data/lib/openapi_client/models/magic_link_auth_method.rb +0 -295
  28. data/lib/openapi_client/models/otp_auth_method.rb +0 -295
  29. data/lib/openapi_client/models/passkeys_auth_method.rb +0 -221
  30. data/lib/openapi_client/models/technologies.rb +0 -46
  31. data/lib/openapi_client/models/ttl_display_unit.rb +0 -42
  32. data/lib/openapi_client/models/user_metadata_field.rb +0 -323
  33. data/lib/openapi_client/models/user_metadata_field_type.rb +0 -44
  34. data/lib/passageidentity/user_api.rb +0 -218
@@ -1,285 +0,0 @@
1
- =begin
2
- #Passage Management API
3
-
4
- #Passage's management API to manage your Passage apps and users.
5
-
6
- The version of the OpenAPI document: 1
7
- Contact: support@passage.id
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.11.0-SNAPSHOT
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module OpenapiClient
17
- class LayoutConfig
18
- attr_accessor :h
19
-
20
- attr_accessor :id
21
-
22
- attr_accessor :w
23
-
24
- attr_accessor :x
25
-
26
- attr_accessor :y
27
-
28
- # Attribute mapping from ruby-style variable name to JSON key.
29
- def self.attribute_map
30
- {
31
- :'h' => :'h',
32
- :'id' => :'id',
33
- :'w' => :'w',
34
- :'x' => :'x',
35
- :'y' => :'y'
36
- }
37
- end
38
-
39
- # Returns all the JSON keys this model knows about
40
- def self.acceptable_attributes
41
- attribute_map.values
42
- end
43
-
44
- # Attribute type mapping.
45
- def self.openapi_types
46
- {
47
- :'h' => :'Integer',
48
- :'id' => :'String',
49
- :'w' => :'Integer',
50
- :'x' => :'Integer',
51
- :'y' => :'Integer'
52
- }
53
- end
54
-
55
- # List of attributes with nullable: true
56
- def self.openapi_nullable
57
- Set.new([
58
- ])
59
- end
60
-
61
- # Initializes the object
62
- # @param [Hash] attributes Model attributes in the form of hash
63
- def initialize(attributes = {})
64
- if (!attributes.is_a?(Hash))
65
- fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::LayoutConfig` initialize method"
66
- end
67
-
68
- # check to see if the attribute exists and convert string to symbol for hash key
69
- attributes = attributes.each_with_object({}) { |(k, v), h|
70
- if (!self.class.attribute_map.key?(k.to_sym))
71
- fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::LayoutConfig`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
72
- end
73
- h[k.to_sym] = v
74
- }
75
-
76
- if attributes.key?(:'h')
77
- self.h = attributes[:'h']
78
- else
79
- self.h = nil
80
- end
81
-
82
- if attributes.key?(:'id')
83
- self.id = attributes[:'id']
84
- else
85
- self.id = nil
86
- end
87
-
88
- if attributes.key?(:'w')
89
- self.w = attributes[:'w']
90
- else
91
- self.w = nil
92
- end
93
-
94
- if attributes.key?(:'x')
95
- self.x = attributes[:'x']
96
- else
97
- self.x = nil
98
- end
99
-
100
- if attributes.key?(:'y')
101
- self.y = attributes[:'y']
102
- else
103
- self.y = nil
104
- end
105
- end
106
-
107
- # Show invalid properties with the reasons. Usually used together with valid?
108
- # @return Array for valid properties with the reasons
109
- def list_invalid_properties
110
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
111
- invalid_properties = Array.new
112
- if @h.nil?
113
- invalid_properties.push('invalid value for "h", h cannot be nil.')
114
- end
115
-
116
- if @id.nil?
117
- invalid_properties.push('invalid value for "id", id cannot be nil.')
118
- end
119
-
120
- if @w.nil?
121
- invalid_properties.push('invalid value for "w", w cannot be nil.')
122
- end
123
-
124
- if @x.nil?
125
- invalid_properties.push('invalid value for "x", x cannot be nil.')
126
- end
127
-
128
- if @y.nil?
129
- invalid_properties.push('invalid value for "y", y cannot be nil.')
130
- end
131
-
132
- invalid_properties
133
- end
134
-
135
- # Check to see if the all the properties in the model are valid
136
- # @return true if the model is valid
137
- def valid?
138
- warn '[DEPRECATED] the `valid?` method is obsolete'
139
- return false if @h.nil?
140
- return false if @id.nil?
141
- return false if @w.nil?
142
- return false if @x.nil?
143
- return false if @y.nil?
144
- true
145
- end
146
-
147
- # Checks equality by comparing each attribute.
148
- # @param [Object] Object to be compared
149
- def ==(o)
150
- return true if self.equal?(o)
151
- self.class == o.class &&
152
- h == o.h &&
153
- id == o.id &&
154
- w == o.w &&
155
- x == o.x &&
156
- y == o.y
157
- end
158
-
159
- # @see the `==` method
160
- # @param [Object] Object to be compared
161
- def eql?(o)
162
- self == o
163
- end
164
-
165
- # Calculates hash code according to all attributes.
166
- # @return [Integer] Hash code
167
- def hash
168
- [h, id, w, x, y].hash
169
- end
170
-
171
- # Builds the object from hash
172
- # @param [Hash] attributes Model attributes in the form of hash
173
- # @return [Object] Returns the model itself
174
- def self.build_from_hash(attributes)
175
- return nil unless attributes.is_a?(Hash)
176
- attributes = attributes.transform_keys(&:to_sym)
177
- transformed_hash = {}
178
- openapi_types.each_pair do |key, type|
179
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
180
- transformed_hash["#{key}"] = nil
181
- elsif type =~ /\AArray<(.*)>/i
182
- # check to ensure the input is an array given that the attribute
183
- # is documented as an array but the input is not
184
- if attributes[attribute_map[key]].is_a?(Array)
185
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
186
- end
187
- elsif !attributes[attribute_map[key]].nil?
188
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
189
- end
190
- end
191
- new(transformed_hash)
192
- end
193
-
194
- # Deserializes the data based on type
195
- # @param string type Data type
196
- # @param string value Value to be deserialized
197
- # @return [Object] Deserialized data
198
- def self._deserialize(type, value)
199
- case type.to_sym
200
- when :Time
201
- Time.parse(value)
202
- when :Date
203
- Date.parse(value)
204
- when :String
205
- value.to_s
206
- when :Integer
207
- value.to_i
208
- when :Float
209
- value.to_f
210
- when :Boolean
211
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
212
- true
213
- else
214
- false
215
- end
216
- when :Object
217
- # generic object (usually a Hash), return directly
218
- value
219
- when /\AArray<(?<inner_type>.+)>\z/
220
- inner_type = Regexp.last_match[:inner_type]
221
- value.map { |v| _deserialize(inner_type, v) }
222
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
223
- k_type = Regexp.last_match[:k_type]
224
- v_type = Regexp.last_match[:v_type]
225
- {}.tap do |hash|
226
- value.each do |k, v|
227
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
228
- end
229
- end
230
- else # model
231
- # models (e.g. Pet) or oneOf
232
- klass = OpenapiClient.const_get(type)
233
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
234
- end
235
- end
236
-
237
- # Returns the string representation of the object
238
- # @return [String] String presentation of the object
239
- def to_s
240
- to_hash.to_s
241
- end
242
-
243
- # to_body is an alias to to_hash (backward compatibility)
244
- # @return [Hash] Returns the object in the form of hash
245
- def to_body
246
- to_hash
247
- end
248
-
249
- # Returns the object in the form of hash
250
- # @return [Hash] Returns the object in the form of hash
251
- def to_hash
252
- hash = {}
253
- self.class.attribute_map.each_pair do |attr, param|
254
- value = self.send(attr)
255
- if value.nil?
256
- is_nullable = self.class.openapi_nullable.include?(attr)
257
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
258
- end
259
-
260
- hash[param] = _to_hash(value)
261
- end
262
- hash
263
- end
264
-
265
- # Outputs non-array value in the form of hash
266
- # For object, use to_hash. Otherwise, just return the value
267
- # @param [Object] value Any valid value
268
- # @return [Hash] Returns the value in the form of hash
269
- def _to_hash(value)
270
- if value.is_a?(Array)
271
- value.compact.map { |v| _to_hash(v) }
272
- elsif value.is_a?(Hash)
273
- {}.tap do |hash|
274
- value.each { |k, v| hash[k] = _to_hash(v) }
275
- end
276
- elsif value.respond_to? :to_hash
277
- value.to_hash
278
- else
279
- value
280
- end
281
- end
282
-
283
- end
284
-
285
- end
@@ -1,241 +0,0 @@
1
- =begin
2
- #Passage Management API
3
-
4
- #Passage's management API to manage your Passage apps and users.
5
-
6
- The version of the OpenAPI document: 1
7
- Contact: support@passage.id
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.11.0-SNAPSHOT
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module OpenapiClient
17
- class Layouts
18
- attr_accessor :profile
19
-
20
- attr_accessor :registration
21
-
22
- # Attribute mapping from ruby-style variable name to JSON key.
23
- def self.attribute_map
24
- {
25
- :'profile' => :'profile',
26
- :'registration' => :'registration'
27
- }
28
- end
29
-
30
- # Returns all the JSON keys this model knows about
31
- def self.acceptable_attributes
32
- attribute_map.values
33
- end
34
-
35
- # Attribute type mapping.
36
- def self.openapi_types
37
- {
38
- :'profile' => :'Array<LayoutConfig>',
39
- :'registration' => :'Array<LayoutConfig>'
40
- }
41
- end
42
-
43
- # List of attributes with nullable: true
44
- def self.openapi_nullable
45
- Set.new([
46
- ])
47
- end
48
-
49
- # Initializes the object
50
- # @param [Hash] attributes Model attributes in the form of hash
51
- def initialize(attributes = {})
52
- if (!attributes.is_a?(Hash))
53
- fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::Layouts` initialize method"
54
- end
55
-
56
- # check to see if the attribute exists and convert string to symbol for hash key
57
- attributes = attributes.each_with_object({}) { |(k, v), h|
58
- if (!self.class.attribute_map.key?(k.to_sym))
59
- fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::Layouts`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
- end
61
- h[k.to_sym] = v
62
- }
63
-
64
- if attributes.key?(:'profile')
65
- if (value = attributes[:'profile']).is_a?(Array)
66
- self.profile = value
67
- end
68
- else
69
- self.profile = nil
70
- end
71
-
72
- if attributes.key?(:'registration')
73
- if (value = attributes[:'registration']).is_a?(Array)
74
- self.registration = value
75
- end
76
- else
77
- self.registration = nil
78
- end
79
- end
80
-
81
- # Show invalid properties with the reasons. Usually used together with valid?
82
- # @return Array for valid properties with the reasons
83
- def list_invalid_properties
84
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
85
- invalid_properties = Array.new
86
- if @profile.nil?
87
- invalid_properties.push('invalid value for "profile", profile cannot be nil.')
88
- end
89
-
90
- if @registration.nil?
91
- invalid_properties.push('invalid value for "registration", registration cannot be nil.')
92
- end
93
-
94
- invalid_properties
95
- end
96
-
97
- # Check to see if the all the properties in the model are valid
98
- # @return true if the model is valid
99
- def valid?
100
- warn '[DEPRECATED] the `valid?` method is obsolete'
101
- return false if @profile.nil?
102
- return false if @registration.nil?
103
- true
104
- end
105
-
106
- # Checks equality by comparing each attribute.
107
- # @param [Object] Object to be compared
108
- def ==(o)
109
- return true if self.equal?(o)
110
- self.class == o.class &&
111
- profile == o.profile &&
112
- registration == o.registration
113
- end
114
-
115
- # @see the `==` method
116
- # @param [Object] Object to be compared
117
- def eql?(o)
118
- self == o
119
- end
120
-
121
- # Calculates hash code according to all attributes.
122
- # @return [Integer] Hash code
123
- def hash
124
- [profile, registration].hash
125
- end
126
-
127
- # Builds the object from hash
128
- # @param [Hash] attributes Model attributes in the form of hash
129
- # @return [Object] Returns the model itself
130
- def self.build_from_hash(attributes)
131
- return nil unless attributes.is_a?(Hash)
132
- attributes = attributes.transform_keys(&:to_sym)
133
- transformed_hash = {}
134
- openapi_types.each_pair do |key, type|
135
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
136
- transformed_hash["#{key}"] = nil
137
- elsif type =~ /\AArray<(.*)>/i
138
- # check to ensure the input is an array given that the attribute
139
- # is documented as an array but the input is not
140
- if attributes[attribute_map[key]].is_a?(Array)
141
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
142
- end
143
- elsif !attributes[attribute_map[key]].nil?
144
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
145
- end
146
- end
147
- new(transformed_hash)
148
- end
149
-
150
- # Deserializes the data based on type
151
- # @param string type Data type
152
- # @param string value Value to be deserialized
153
- # @return [Object] Deserialized data
154
- def self._deserialize(type, value)
155
- case type.to_sym
156
- when :Time
157
- Time.parse(value)
158
- when :Date
159
- Date.parse(value)
160
- when :String
161
- value.to_s
162
- when :Integer
163
- value.to_i
164
- when :Float
165
- value.to_f
166
- when :Boolean
167
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
168
- true
169
- else
170
- false
171
- end
172
- when :Object
173
- # generic object (usually a Hash), return directly
174
- value
175
- when /\AArray<(?<inner_type>.+)>\z/
176
- inner_type = Regexp.last_match[:inner_type]
177
- value.map { |v| _deserialize(inner_type, v) }
178
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
179
- k_type = Regexp.last_match[:k_type]
180
- v_type = Regexp.last_match[:v_type]
181
- {}.tap do |hash|
182
- value.each do |k, v|
183
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
184
- end
185
- end
186
- else # model
187
- # models (e.g. Pet) or oneOf
188
- klass = OpenapiClient.const_get(type)
189
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
190
- end
191
- end
192
-
193
- # Returns the string representation of the object
194
- # @return [String] String presentation of the object
195
- def to_s
196
- to_hash.to_s
197
- end
198
-
199
- # to_body is an alias to to_hash (backward compatibility)
200
- # @return [Hash] Returns the object in the form of hash
201
- def to_body
202
- to_hash
203
- end
204
-
205
- # Returns the object in the form of hash
206
- # @return [Hash] Returns the object in the form of hash
207
- def to_hash
208
- hash = {}
209
- self.class.attribute_map.each_pair do |attr, param|
210
- value = self.send(attr)
211
- if value.nil?
212
- is_nullable = self.class.openapi_nullable.include?(attr)
213
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
214
- end
215
-
216
- hash[param] = _to_hash(value)
217
- end
218
- hash
219
- end
220
-
221
- # Outputs non-array value in the form of hash
222
- # For object, use to_hash. Otherwise, just return the value
223
- # @param [Object] value Any valid value
224
- # @return [Hash] Returns the value in the form of hash
225
- def _to_hash(value)
226
- if value.is_a?(Array)
227
- value.compact.map { |v| _to_hash(v) }
228
- elsif value.is_a?(Hash)
229
- {}.tap do |hash|
230
- value.each { |k, v| hash[k] = _to_hash(v) }
231
- end
232
- elsif value.respond_to? :to_hash
233
- value.to_hash
234
- else
235
- value
236
- end
237
- end
238
-
239
- end
240
-
241
- end