passageidentity 0.3.0 → 0.5.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.
@@ -0,0 +1,232 @@
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
+ OpenAPI Generator version: 7.1.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module OpenapiClient
17
+ class UserSocialConnections
18
+ attr_accessor :apple
19
+
20
+ attr_accessor :github
21
+
22
+ attr_accessor :google
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'apple' => :'apple',
28
+ :'github' => :'github',
29
+ :'google' => :'google'
30
+ }
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'apple' => :'AppleUserSocialConnection',
42
+ :'github' => :'GithubUserSocialConnection',
43
+ :'google' => :'GoogleUserSocialConnection'
44
+ }
45
+ end
46
+
47
+ # List of attributes with nullable: true
48
+ def self.openapi_nullable
49
+ Set.new([
50
+ ])
51
+ end
52
+
53
+ # Initializes the object
54
+ # @param [Hash] attributes Model attributes in the form of hash
55
+ def initialize(attributes = {})
56
+ if (!attributes.is_a?(Hash))
57
+ fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::UserSocialConnections` initialize method"
58
+ end
59
+
60
+ # check to see if the attribute exists and convert string to symbol for hash key
61
+ attributes = attributes.each_with_object({}) { |(k, v), h|
62
+ if (!self.class.attribute_map.key?(k.to_sym))
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::UserSocialConnections`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
+ end
65
+ h[k.to_sym] = v
66
+ }
67
+
68
+ if attributes.key?(:'apple')
69
+ self.apple = attributes[:'apple']
70
+ end
71
+
72
+ if attributes.key?(:'github')
73
+ self.github = attributes[:'github']
74
+ end
75
+
76
+ if attributes.key?(:'google')
77
+ self.google = attributes[:'google']
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
+ invalid_properties
87
+ end
88
+
89
+ # Check to see if the all the properties in the model are valid
90
+ # @return true if the model is valid
91
+ def valid?
92
+ warn '[DEPRECATED] the `valid?` method is obsolete'
93
+ true
94
+ end
95
+
96
+ # Checks equality by comparing each attribute.
97
+ # @param [Object] Object to be compared
98
+ def ==(o)
99
+ return true if self.equal?(o)
100
+ self.class == o.class &&
101
+ apple == o.apple &&
102
+ github == o.github &&
103
+ google == o.google
104
+ end
105
+
106
+ # @see the `==` method
107
+ # @param [Object] Object to be compared
108
+ def eql?(o)
109
+ self == o
110
+ end
111
+
112
+ # Calculates hash code according to all attributes.
113
+ # @return [Integer] Hash code
114
+ def hash
115
+ [apple, github, google].hash
116
+ end
117
+
118
+ # Builds the object from hash
119
+ # @param [Hash] attributes Model attributes in the form of hash
120
+ # @return [Object] Returns the model itself
121
+ def self.build_from_hash(attributes)
122
+ return nil unless attributes.is_a?(Hash)
123
+ attributes = attributes.transform_keys(&:to_sym)
124
+ transformed_hash = {}
125
+ openapi_types.each_pair do |key, type|
126
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
127
+ transformed_hash["#{key}"] = nil
128
+ elsif type =~ /\AArray<(.*)>/i
129
+ # check to ensure the input is an array given that the attribute
130
+ # is documented as an array but the input is not
131
+ if attributes[attribute_map[key]].is_a?(Array)
132
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
133
+ end
134
+ elsif !attributes[attribute_map[key]].nil?
135
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
136
+ end
137
+ end
138
+ new(transformed_hash)
139
+ end
140
+
141
+ # Deserializes the data based on type
142
+ # @param string type Data type
143
+ # @param string value Value to be deserialized
144
+ # @return [Object] Deserialized data
145
+ def self._deserialize(type, value)
146
+ case type.to_sym
147
+ when :Time
148
+ Time.parse(value)
149
+ when :Date
150
+ Date.parse(value)
151
+ when :String
152
+ value.to_s
153
+ when :Integer
154
+ value.to_i
155
+ when :Float
156
+ value.to_f
157
+ when :Boolean
158
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
159
+ true
160
+ else
161
+ false
162
+ end
163
+ when :Object
164
+ # generic object (usually a Hash), return directly
165
+ value
166
+ when /\AArray<(?<inner_type>.+)>\z/
167
+ inner_type = Regexp.last_match[:inner_type]
168
+ value.map { |v| _deserialize(inner_type, v) }
169
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
170
+ k_type = Regexp.last_match[:k_type]
171
+ v_type = Regexp.last_match[:v_type]
172
+ {}.tap do |hash|
173
+ value.each do |k, v|
174
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
175
+ end
176
+ end
177
+ else # model
178
+ # models (e.g. Pet) or oneOf
179
+ klass = OpenapiClient.const_get(type)
180
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
181
+ end
182
+ end
183
+
184
+ # Returns the string representation of the object
185
+ # @return [String] String presentation of the object
186
+ def to_s
187
+ to_hash.to_s
188
+ end
189
+
190
+ # to_body is an alias to to_hash (backward compatibility)
191
+ # @return [Hash] Returns the object in the form of hash
192
+ def to_body
193
+ to_hash
194
+ end
195
+
196
+ # Returns the object in the form of hash
197
+ # @return [Hash] Returns the object in the form of hash
198
+ def to_hash
199
+ hash = {}
200
+ self.class.attribute_map.each_pair do |attr, param|
201
+ value = self.send(attr)
202
+ if value.nil?
203
+ is_nullable = self.class.openapi_nullable.include?(attr)
204
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
205
+ end
206
+
207
+ hash[param] = _to_hash(value)
208
+ end
209
+ hash
210
+ end
211
+
212
+ # Outputs non-array value in the form of hash
213
+ # For object, use to_hash. Otherwise, just return the value
214
+ # @param [Object] value Any valid value
215
+ # @return [Hash] Returns the value in the form of hash
216
+ def _to_hash(value)
217
+ if value.is_a?(Array)
218
+ value.compact.map { |v| _to_hash(v) }
219
+ elsif value.is_a?(Hash)
220
+ {}.tap do |hash|
221
+ value.each { |k, v| hash[k] = _to_hash(v) }
222
+ end
223
+ elsif value.respond_to? :to_hash
224
+ value.to_hash
225
+ else
226
+ value
227
+ end
228
+ end
229
+
230
+ end
231
+
232
+ end
@@ -19,16 +19,19 @@ require_relative 'openapi_client/configuration'
19
19
  # Models
20
20
  require_relative 'openapi_client/models/app_info'
21
21
  require_relative 'openapi_client/models/app_response'
22
+ require_relative 'openapi_client/models/apple_user_social_connection'
22
23
  require_relative 'openapi_client/models/auth_methods'
23
24
  require_relative 'openapi_client/models/create_magic_link_request'
24
25
  require_relative 'openapi_client/models/create_user_request'
25
26
  require_relative 'openapi_client/models/element_customization'
26
27
  require_relative 'openapi_client/models/font_family'
28
+ require_relative 'openapi_client/models/github_user_social_connection'
29
+ require_relative 'openapi_client/models/google_user_social_connection'
27
30
  require_relative 'openapi_client/models/layout_config'
28
31
  require_relative 'openapi_client/models/layouts'
29
32
  require_relative 'openapi_client/models/list_devices_response'
30
- require_relative 'openapi_client/models/magic_link_auth_method'
31
33
  require_relative 'openapi_client/models/magic_link'
34
+ require_relative 'openapi_client/models/magic_link_auth_method'
32
35
  require_relative 'openapi_client/models/magic_link_channel'
33
36
  require_relative 'openapi_client/models/magic_link_response'
34
37
  require_relative 'openapi_client/models/magic_link_type'
@@ -44,11 +47,12 @@ require_relative 'openapi_client/models/update_magic_link_auth_method'
44
47
  require_relative 'openapi_client/models/update_otp_auth_method'
45
48
  require_relative 'openapi_client/models/update_passkeys_auth_method'
46
49
  require_relative 'openapi_client/models/update_user_request'
47
- require_relative 'openapi_client/models/user_event_info'
48
50
  require_relative 'openapi_client/models/user_info'
49
51
  require_relative 'openapi_client/models/user_metadata_field'
50
52
  require_relative 'openapi_client/models/user_metadata_field_type'
53
+ require_relative 'openapi_client/models/user_recent_event'
51
54
  require_relative 'openapi_client/models/user_response'
55
+ require_relative 'openapi_client/models/user_social_connections'
52
56
  require_relative 'openapi_client/models/user_status'
53
57
  require_relative 'openapi_client/models/web_authn_devices'
54
58
  require_relative 'openapi_client/models/web_authn_icons'
@@ -63,6 +67,12 @@ require_relative 'openapi_client/api/users_api'
63
67
 
64
68
  module OpenapiClient
65
69
  class << self
70
+ # Customize default settings for the SDK using block.
71
+ # OpenapiClient.configure do |config|
72
+ # config.username = "xxx"
73
+ # config.password = "xxx"
74
+ # end
75
+ # If no block given, return the default Configuration object.
66
76
  def configure
67
77
  if block_given?
68
78
  yield(Configuration.default)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Passage
4
- VERSION = '0.3.0'
4
+ VERSION = '0.5.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: passageidentity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Passage Identity
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-06 00:00:00.000000000 Z
11
+ date: 2024-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -90,12 +90,15 @@ files:
90
90
  - docs/custom/UserApi.md
91
91
  - docs/generated/AppInfo.md
92
92
  - docs/generated/AppResponse.md
93
+ - docs/generated/AppleUserSocialConnection.md
93
94
  - docs/generated/AppsApi.md
94
95
  - docs/generated/AuthMethods.md
95
96
  - docs/generated/CreateMagicLinkRequest.md
96
97
  - docs/generated/CreateUserRequest.md
97
98
  - docs/generated/ElementCustomization.md
98
99
  - docs/generated/FontFamily.md
100
+ - docs/generated/GithubUserSocialConnection.md
101
+ - docs/generated/GoogleUserSocialConnection.md
99
102
  - docs/generated/LayoutConfig.md
100
103
  - docs/generated/Layouts.md
101
104
  - docs/generated/ListDevicesResponse.md
@@ -111,6 +114,7 @@ files:
111
114
  - docs/generated/Model500Error.md
112
115
  - docs/generated/OtpAuthMethod.md
113
116
  - docs/generated/PasskeysAuthMethod.md
117
+ - docs/generated/README.md
114
118
  - docs/generated/Technologies.md
115
119
  - docs/generated/TokensApi.md
116
120
  - docs/generated/TtlDisplayUnit.md
@@ -119,11 +123,12 @@ files:
119
123
  - docs/generated/UpdatePasskeysAuthMethod.md
120
124
  - docs/generated/UpdateUserRequest.md
121
125
  - docs/generated/UserDevicesApi.md
122
- - docs/generated/UserEventInfo.md
123
126
  - docs/generated/UserInfo.md
124
127
  - docs/generated/UserMetadataField.md
125
128
  - docs/generated/UserMetadataFieldType.md
129
+ - docs/generated/UserRecentEvent.md
126
130
  - docs/generated/UserResponse.md
131
+ - docs/generated/UserSocialConnections.md
127
132
  - docs/generated/UserStatus.md
128
133
  - docs/generated/UsersApi.md
129
134
  - docs/generated/WebAuthnDevices.md
@@ -141,11 +146,14 @@ files:
141
146
  - lib/openapi_client/configuration.rb
142
147
  - lib/openapi_client/models/app_info.rb
143
148
  - lib/openapi_client/models/app_response.rb
149
+ - lib/openapi_client/models/apple_user_social_connection.rb
144
150
  - lib/openapi_client/models/auth_methods.rb
145
151
  - lib/openapi_client/models/create_magic_link_request.rb
146
152
  - lib/openapi_client/models/create_user_request.rb
147
153
  - lib/openapi_client/models/element_customization.rb
148
154
  - lib/openapi_client/models/font_family.rb
155
+ - lib/openapi_client/models/github_user_social_connection.rb
156
+ - lib/openapi_client/models/google_user_social_connection.rb
149
157
  - lib/openapi_client/models/layout_config.rb
150
158
  - lib/openapi_client/models/layouts.rb
151
159
  - lib/openapi_client/models/list_devices_response.rb
@@ -166,11 +174,12 @@ files:
166
174
  - lib/openapi_client/models/update_otp_auth_method.rb
167
175
  - lib/openapi_client/models/update_passkeys_auth_method.rb
168
176
  - lib/openapi_client/models/update_user_request.rb
169
- - lib/openapi_client/models/user_event_info.rb
170
177
  - lib/openapi_client/models/user_info.rb
171
178
  - lib/openapi_client/models/user_metadata_field.rb
172
179
  - lib/openapi_client/models/user_metadata_field_type.rb
180
+ - lib/openapi_client/models/user_recent_event.rb
173
181
  - lib/openapi_client/models/user_response.rb
182
+ - lib/openapi_client/models/user_social_connections.rb
174
183
  - lib/openapi_client/models/user_status.rb
175
184
  - lib/openapi_client/models/web_authn_devices.rb
176
185
  - lib/openapi_client/models/web_authn_icons.rb