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,457 +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 ElementCustomization
18
- # Container background color in hex. Default is `#ffffff` in light mode & `#383838` in dark mode.
19
- attr_accessor :passage_container_background_color
20
-
21
- # Maximum width of container (px)
22
- attr_accessor :passage_container_max_width
23
-
24
- # Input box background color in hex. Default is `#ffffff` in light mode & `#4b4b4b` in dark mode.
25
- attr_accessor :passage_input_box_background_color
26
-
27
- # Input box border radius (px)
28
- attr_accessor :passage_input_box_border_radius
29
-
30
- attr_accessor :passage_header_font_family
31
-
32
- attr_accessor :passage_body_font_family
33
-
34
- # Header text color in hex. Default is `#222222` in light mode & `#f3f3f3` in dark mode.
35
- attr_accessor :passage_header_text_color
36
-
37
- # Body text color in hex. Default is `#222222` in light mode & `#f3f3f3` in dark mode.
38
- attr_accessor :passage_body_text_color
39
-
40
- # Primary button background colour (hex)
41
- attr_accessor :passage_primary_button_background_color
42
-
43
- # Primary button font colour (hex)
44
- attr_accessor :passage_primary_button_text_color
45
-
46
- # Primary button background on hover (hex)
47
- attr_accessor :passage_primary_button_hover_color
48
-
49
- # Primary button border radius (px)
50
- attr_accessor :passage_primary_button_border_radius
51
-
52
- # Primary button border color
53
- attr_accessor :passage_primary_button_border_color
54
-
55
- # Primary button border width (px)
56
- attr_accessor :passage_primary_button_border_width
57
-
58
- # Secondary button background colour (hex)
59
- attr_accessor :passage_secondary_button_background_color
60
-
61
- # Secondary button font colour (hex)
62
- attr_accessor :passage_secondary_button_text_color
63
-
64
- # Secondary button background on hover (hex)
65
- attr_accessor :passage_secondary_button_hover_color
66
-
67
- # Secondary button border radius (px)
68
- attr_accessor :passage_secondary_button_border_radius
69
-
70
- # Secondary button border color
71
- attr_accessor :passage_secondary_button_border_color
72
-
73
- # Secondary button border width (px)
74
- attr_accessor :passage_secondary_button_border_width
75
-
76
- class EnumAttributeValidator
77
- attr_reader :datatype
78
- attr_reader :allowable_values
79
-
80
- def initialize(datatype, allowable_values)
81
- @allowable_values = allowable_values.map do |value|
82
- case datatype.to_s
83
- when /Integer/i
84
- value.to_i
85
- when /Float/i
86
- value.to_f
87
- else
88
- value
89
- end
90
- end
91
- end
92
-
93
- def valid?(value)
94
- !value || allowable_values.include?(value)
95
- end
96
- end
97
-
98
- # Attribute mapping from ruby-style variable name to JSON key.
99
- def self.attribute_map
100
- {
101
- :'passage_container_background_color' => :'passage_container_background_color',
102
- :'passage_container_max_width' => :'passage_container_max_width',
103
- :'passage_input_box_background_color' => :'passage_input_box_background_color',
104
- :'passage_input_box_border_radius' => :'passage_input_box_border_radius',
105
- :'passage_header_font_family' => :'passage_header_font_family',
106
- :'passage_body_font_family' => :'passage_body_font_family',
107
- :'passage_header_text_color' => :'passage_header_text_color',
108
- :'passage_body_text_color' => :'passage_body_text_color',
109
- :'passage_primary_button_background_color' => :'passage_primary_button_background_color',
110
- :'passage_primary_button_text_color' => :'passage_primary_button_text_color',
111
- :'passage_primary_button_hover_color' => :'passage_primary_button_hover_color',
112
- :'passage_primary_button_border_radius' => :'passage_primary_button_border_radius',
113
- :'passage_primary_button_border_color' => :'passage_primary_button_border_color',
114
- :'passage_primary_button_border_width' => :'passage_primary_button_border_width',
115
- :'passage_secondary_button_background_color' => :'passage_secondary_button_background_color',
116
- :'passage_secondary_button_text_color' => :'passage_secondary_button_text_color',
117
- :'passage_secondary_button_hover_color' => :'passage_secondary_button_hover_color',
118
- :'passage_secondary_button_border_radius' => :'passage_secondary_button_border_radius',
119
- :'passage_secondary_button_border_color' => :'passage_secondary_button_border_color',
120
- :'passage_secondary_button_border_width' => :'passage_secondary_button_border_width'
121
- }
122
- end
123
-
124
- # Returns all the JSON keys this model knows about
125
- def self.acceptable_attributes
126
- attribute_map.values
127
- end
128
-
129
- # Attribute type mapping.
130
- def self.openapi_types
131
- {
132
- :'passage_container_background_color' => :'String',
133
- :'passage_container_max_width' => :'Integer',
134
- :'passage_input_box_background_color' => :'String',
135
- :'passage_input_box_border_radius' => :'Integer',
136
- :'passage_header_font_family' => :'FontFamily',
137
- :'passage_body_font_family' => :'FontFamily',
138
- :'passage_header_text_color' => :'String',
139
- :'passage_body_text_color' => :'String',
140
- :'passage_primary_button_background_color' => :'String',
141
- :'passage_primary_button_text_color' => :'String',
142
- :'passage_primary_button_hover_color' => :'String',
143
- :'passage_primary_button_border_radius' => :'Integer',
144
- :'passage_primary_button_border_color' => :'String',
145
- :'passage_primary_button_border_width' => :'Integer',
146
- :'passage_secondary_button_background_color' => :'String',
147
- :'passage_secondary_button_text_color' => :'String',
148
- :'passage_secondary_button_hover_color' => :'String',
149
- :'passage_secondary_button_border_radius' => :'Integer',
150
- :'passage_secondary_button_border_color' => :'String',
151
- :'passage_secondary_button_border_width' => :'Integer'
152
- }
153
- end
154
-
155
- # List of attributes with nullable: true
156
- def self.openapi_nullable
157
- Set.new([
158
- ])
159
- end
160
-
161
- # Initializes the object
162
- # @param [Hash] attributes Model attributes in the form of hash
163
- def initialize(attributes = {})
164
- if (!attributes.is_a?(Hash))
165
- fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::ElementCustomization` initialize method"
166
- end
167
-
168
- # check to see if the attribute exists and convert string to symbol for hash key
169
- attributes = attributes.each_with_object({}) { |(k, v), h|
170
- if (!self.class.attribute_map.key?(k.to_sym))
171
- fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::ElementCustomization`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
172
- end
173
- h[k.to_sym] = v
174
- }
175
-
176
- if attributes.key?(:'passage_container_background_color')
177
- self.passage_container_background_color = attributes[:'passage_container_background_color']
178
- end
179
-
180
- if attributes.key?(:'passage_container_max_width')
181
- self.passage_container_max_width = attributes[:'passage_container_max_width']
182
- else
183
- self.passage_container_max_width = 300
184
- end
185
-
186
- if attributes.key?(:'passage_input_box_background_color')
187
- self.passage_input_box_background_color = attributes[:'passage_input_box_background_color']
188
- end
189
-
190
- if attributes.key?(:'passage_input_box_border_radius')
191
- self.passage_input_box_border_radius = attributes[:'passage_input_box_border_radius']
192
- else
193
- self.passage_input_box_border_radius = 5
194
- end
195
-
196
- if attributes.key?(:'passage_header_font_family')
197
- self.passage_header_font_family = attributes[:'passage_header_font_family']
198
- else
199
- self.passage_header_font_family = 'Helvetica'
200
- end
201
-
202
- if attributes.key?(:'passage_body_font_family')
203
- self.passage_body_font_family = attributes[:'passage_body_font_family']
204
- else
205
- self.passage_body_font_family = 'Helvetica'
206
- end
207
-
208
- if attributes.key?(:'passage_header_text_color')
209
- self.passage_header_text_color = attributes[:'passage_header_text_color']
210
- end
211
-
212
- if attributes.key?(:'passage_body_text_color')
213
- self.passage_body_text_color = attributes[:'passage_body_text_color']
214
- end
215
-
216
- if attributes.key?(:'passage_primary_button_background_color')
217
- self.passage_primary_button_background_color = attributes[:'passage_primary_button_background_color']
218
- else
219
- self.passage_primary_button_background_color = '#121212'
220
- end
221
-
222
- if attributes.key?(:'passage_primary_button_text_color')
223
- self.passage_primary_button_text_color = attributes[:'passage_primary_button_text_color']
224
- else
225
- self.passage_primary_button_text_color = '#f3f3f3'
226
- end
227
-
228
- if attributes.key?(:'passage_primary_button_hover_color')
229
- self.passage_primary_button_hover_color = attributes[:'passage_primary_button_hover_color']
230
- else
231
- self.passage_primary_button_hover_color = '#4d4d4d'
232
- end
233
-
234
- if attributes.key?(:'passage_primary_button_border_radius')
235
- self.passage_primary_button_border_radius = attributes[:'passage_primary_button_border_radius']
236
- else
237
- self.passage_primary_button_border_radius = 5
238
- end
239
-
240
- if attributes.key?(:'passage_primary_button_border_color')
241
- self.passage_primary_button_border_color = attributes[:'passage_primary_button_border_color']
242
- else
243
- self.passage_primary_button_border_color = '#121212'
244
- end
245
-
246
- if attributes.key?(:'passage_primary_button_border_width')
247
- self.passage_primary_button_border_width = attributes[:'passage_primary_button_border_width']
248
- else
249
- self.passage_primary_button_border_width = 0
250
- end
251
-
252
- if attributes.key?(:'passage_secondary_button_background_color')
253
- self.passage_secondary_button_background_color = attributes[:'passage_secondary_button_background_color']
254
- else
255
- self.passage_secondary_button_background_color = '#ffffff'
256
- end
257
-
258
- if attributes.key?(:'passage_secondary_button_text_color')
259
- self.passage_secondary_button_text_color = attributes[:'passage_secondary_button_text_color']
260
- else
261
- self.passage_secondary_button_text_color = '#222222'
262
- end
263
-
264
- if attributes.key?(:'passage_secondary_button_hover_color')
265
- self.passage_secondary_button_hover_color = attributes[:'passage_secondary_button_hover_color']
266
- else
267
- self.passage_secondary_button_hover_color = '#d7d7d7'
268
- end
269
-
270
- if attributes.key?(:'passage_secondary_button_border_radius')
271
- self.passage_secondary_button_border_radius = attributes[:'passage_secondary_button_border_radius']
272
- else
273
- self.passage_secondary_button_border_radius = 5
274
- end
275
-
276
- if attributes.key?(:'passage_secondary_button_border_color')
277
- self.passage_secondary_button_border_color = attributes[:'passage_secondary_button_border_color']
278
- else
279
- self.passage_secondary_button_border_color = '#d7d7d7'
280
- end
281
-
282
- if attributes.key?(:'passage_secondary_button_border_width')
283
- self.passage_secondary_button_border_width = attributes[:'passage_secondary_button_border_width']
284
- else
285
- self.passage_secondary_button_border_width = 1
286
- end
287
- end
288
-
289
- # Show invalid properties with the reasons. Usually used together with valid?
290
- # @return Array for valid properties with the reasons
291
- def list_invalid_properties
292
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
293
- invalid_properties = Array.new
294
- invalid_properties
295
- end
296
-
297
- # Check to see if the all the properties in the model are valid
298
- # @return true if the model is valid
299
- def valid?
300
- warn '[DEPRECATED] the `valid?` method is obsolete'
301
- true
302
- end
303
-
304
- # Checks equality by comparing each attribute.
305
- # @param [Object] Object to be compared
306
- def ==(o)
307
- return true if self.equal?(o)
308
- self.class == o.class &&
309
- passage_container_background_color == o.passage_container_background_color &&
310
- passage_container_max_width == o.passage_container_max_width &&
311
- passage_input_box_background_color == o.passage_input_box_background_color &&
312
- passage_input_box_border_radius == o.passage_input_box_border_radius &&
313
- passage_header_font_family == o.passage_header_font_family &&
314
- passage_body_font_family == o.passage_body_font_family &&
315
- passage_header_text_color == o.passage_header_text_color &&
316
- passage_body_text_color == o.passage_body_text_color &&
317
- passage_primary_button_background_color == o.passage_primary_button_background_color &&
318
- passage_primary_button_text_color == o.passage_primary_button_text_color &&
319
- passage_primary_button_hover_color == o.passage_primary_button_hover_color &&
320
- passage_primary_button_border_radius == o.passage_primary_button_border_radius &&
321
- passage_primary_button_border_color == o.passage_primary_button_border_color &&
322
- passage_primary_button_border_width == o.passage_primary_button_border_width &&
323
- passage_secondary_button_background_color == o.passage_secondary_button_background_color &&
324
- passage_secondary_button_text_color == o.passage_secondary_button_text_color &&
325
- passage_secondary_button_hover_color == o.passage_secondary_button_hover_color &&
326
- passage_secondary_button_border_radius == o.passage_secondary_button_border_radius &&
327
- passage_secondary_button_border_color == o.passage_secondary_button_border_color &&
328
- passage_secondary_button_border_width == o.passage_secondary_button_border_width
329
- end
330
-
331
- # @see the `==` method
332
- # @param [Object] Object to be compared
333
- def eql?(o)
334
- self == o
335
- end
336
-
337
- # Calculates hash code according to all attributes.
338
- # @return [Integer] Hash code
339
- def hash
340
- [passage_container_background_color, passage_container_max_width, passage_input_box_background_color, passage_input_box_border_radius, passage_header_font_family, passage_body_font_family, passage_header_text_color, passage_body_text_color, passage_primary_button_background_color, passage_primary_button_text_color, passage_primary_button_hover_color, passage_primary_button_border_radius, passage_primary_button_border_color, passage_primary_button_border_width, passage_secondary_button_background_color, passage_secondary_button_text_color, passage_secondary_button_hover_color, passage_secondary_button_border_radius, passage_secondary_button_border_color, passage_secondary_button_border_width].hash
341
- end
342
-
343
- # Builds the object from hash
344
- # @param [Hash] attributes Model attributes in the form of hash
345
- # @return [Object] Returns the model itself
346
- def self.build_from_hash(attributes)
347
- return nil unless attributes.is_a?(Hash)
348
- attributes = attributes.transform_keys(&:to_sym)
349
- transformed_hash = {}
350
- openapi_types.each_pair do |key, type|
351
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
352
- transformed_hash["#{key}"] = nil
353
- elsif type =~ /\AArray<(.*)>/i
354
- # check to ensure the input is an array given that the attribute
355
- # is documented as an array but the input is not
356
- if attributes[attribute_map[key]].is_a?(Array)
357
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
358
- end
359
- elsif !attributes[attribute_map[key]].nil?
360
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
361
- end
362
- end
363
- new(transformed_hash)
364
- end
365
-
366
- # Deserializes the data based on type
367
- # @param string type Data type
368
- # @param string value Value to be deserialized
369
- # @return [Object] Deserialized data
370
- def self._deserialize(type, value)
371
- case type.to_sym
372
- when :Time
373
- Time.parse(value)
374
- when :Date
375
- Date.parse(value)
376
- when :String
377
- value.to_s
378
- when :Integer
379
- value.to_i
380
- when :Float
381
- value.to_f
382
- when :Boolean
383
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
384
- true
385
- else
386
- false
387
- end
388
- when :Object
389
- # generic object (usually a Hash), return directly
390
- value
391
- when /\AArray<(?<inner_type>.+)>\z/
392
- inner_type = Regexp.last_match[:inner_type]
393
- value.map { |v| _deserialize(inner_type, v) }
394
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
395
- k_type = Regexp.last_match[:k_type]
396
- v_type = Regexp.last_match[:v_type]
397
- {}.tap do |hash|
398
- value.each do |k, v|
399
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
400
- end
401
- end
402
- else # model
403
- # models (e.g. Pet) or oneOf
404
- klass = OpenapiClient.const_get(type)
405
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
406
- end
407
- end
408
-
409
- # Returns the string representation of the object
410
- # @return [String] String presentation of the object
411
- def to_s
412
- to_hash.to_s
413
- end
414
-
415
- # to_body is an alias to to_hash (backward compatibility)
416
- # @return [Hash] Returns the object in the form of hash
417
- def to_body
418
- to_hash
419
- end
420
-
421
- # Returns the object in the form of hash
422
- # @return [Hash] Returns the object in the form of hash
423
- def to_hash
424
- hash = {}
425
- self.class.attribute_map.each_pair do |attr, param|
426
- value = self.send(attr)
427
- if value.nil?
428
- is_nullable = self.class.openapi_nullable.include?(attr)
429
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
430
- end
431
-
432
- hash[param] = _to_hash(value)
433
- end
434
- hash
435
- end
436
-
437
- # Outputs non-array value in the form of hash
438
- # For object, use to_hash. Otherwise, just return the value
439
- # @param [Object] value Any valid value
440
- # @return [Hash] Returns the value in the form of hash
441
- def _to_hash(value)
442
- if value.is_a?(Array)
443
- value.compact.map { |v| _to_hash(v) }
444
- elsif value.is_a?(Hash)
445
- {}.tap do |hash|
446
- value.each { |k, v| hash[k] = _to_hash(v) }
447
- end
448
- elsif value.respond_to? :to_hash
449
- value.to_hash
450
- else
451
- value
452
- end
453
- end
454
-
455
- end
456
-
457
- end
@@ -1,58 +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 FontFamily
18
- HELVETICA = "Helvetica".freeze
19
- ARIAL = "Arial".freeze
20
- ARIAL_BLACK = "Arial Black".freeze
21
- VERDANA = "Verdana".freeze
22
- TAHOMA = "Tahoma".freeze
23
- TREBUCHET_MS = "Trebuchet MS".freeze
24
- IMPACT = "Impact".freeze
25
- GILL_SANS = "Gill Sans".freeze
26
- TIMES_NEW_ROMAN = "Times New Roman".freeze
27
- GEORGIA = "Georgia".freeze
28
- PALATINO = "Palatino".freeze
29
- BASKERVILLE = "Baskerville".freeze
30
- ANDAL_MONO = "Andalé Mono".freeze
31
- COURIER = "Courier".freeze
32
- LUCIDA = "Lucida".freeze
33
- MONACO = "Monaco".freeze
34
- BRADLEY_HAND = "Bradley Hand".freeze
35
- BRUSH_SCRIPT_MT = "Brush Script MT".freeze
36
- LUMINARI = "Luminari".freeze
37
- COMIC_SANS_MS = "Comic Sans MS".freeze
38
-
39
- def self.all_vars
40
- @all_vars ||= [HELVETICA, ARIAL, ARIAL_BLACK, VERDANA, TAHOMA, TREBUCHET_MS, IMPACT, GILL_SANS, TIMES_NEW_ROMAN, GEORGIA, PALATINO, BASKERVILLE, ANDAL_MONO, COURIER, LUCIDA, MONACO, BRADLEY_HAND, BRUSH_SCRIPT_MT, LUMINARI, COMIC_SANS_MS].freeze
41
- end
42
-
43
- # Builds the enum from string
44
- # @param [String] The enum value in the form of the string
45
- # @return [String] The enum value
46
- def self.build_from_hash(value)
47
- new.build_from_hash(value)
48
- end
49
-
50
- # Builds the enum from string
51
- # @param [String] The enum value in the form of the string
52
- # @return [String] The enum value
53
- def build_from_hash(value)
54
- return value if FontFamily.all_vars.include?(value)
55
- raise "Invalid ENUM value #{value} for class #FontFamily"
56
- end
57
- end
58
- end