torii-backend 0.0.4 → 0.0.6

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 (41) hide show
  1. checksums.yaml +4 -4
  2. data/spec/server-v1.json +1 -1
  3. data/src/torii/backend/client.rb +38 -38
  4. data/src/torii/backend/generated/lib/torii_backend_generated/api/allowed_origins_api.rb +145 -0
  5. data/src/torii/backend/generated/lib/{torii-backend-generated → torii_backend_generated}/api/server_sessions_api.rb +6 -6
  6. data/src/torii/backend/generated/lib/{torii-backend-generated → torii_backend_generated}/api/server_users_api.rb +102 -28
  7. data/src/torii/backend/generated/lib/{torii-backend-generated → torii_backend_generated}/api_client.rb +4 -3
  8. data/src/torii/backend/generated/lib/{torii-backend-generated → torii_backend_generated}/api_error.rb +3 -3
  9. data/src/torii/backend/generated/lib/{torii-backend-generated → torii_backend_generated}/api_model_base.rb +3 -3
  10. data/src/torii/backend/generated/lib/{torii-backend-generated → torii_backend_generated}/configuration.rb +14 -7
  11. data/src/torii/backend/generated/lib/torii_backend_generated/models/allowed_origins_response.rb +166 -0
  12. data/src/torii/backend/generated/lib/{torii-backend-generated → torii_backend_generated}/models/create_user_request.rb +50 -36
  13. data/src/torii/backend/generated/lib/{torii-backend-generated/models/cursor_page_response_user_response.rb → torii_backend_generated/models/cursor_page_response_server_user_response.rb} +7 -7
  14. data/src/torii/backend/generated/lib/{torii-backend-generated → torii_backend_generated}/models/problem_detail.rb +3 -3
  15. data/src/torii/backend/generated/lib/{torii-backend-generated/models/user_response.rb → torii_backend_generated/models/server_user_response.rb} +119 -43
  16. data/src/torii/backend/generated/lib/{torii-backend-generated → torii_backend_generated}/models/server_user_search_request.rb +3 -3
  17. data/src/torii/backend/generated/lib/torii_backend_generated/models/set_allowed_origins_request.rb +166 -0
  18. data/src/torii/backend/generated/lib/torii_backend_generated/models/update_user_metadata_request.rb +175 -0
  19. data/src/torii/backend/generated/lib/{torii-backend-generated → torii_backend_generated}/models/update_user_request.rb +29 -39
  20. data/src/torii/backend/generated/lib/{torii-backend-generated → torii_backend_generated}/models/user_session_response.rb +19 -8
  21. data/src/torii/backend/generated/lib/torii_backend_generated/version.rb +15 -0
  22. data/src/torii/backend/generated/lib/torii_backend_generated.rb +53 -0
  23. data/src/torii/backend/generated/spec/api/allowed_origins_api_spec.rb +57 -0
  24. data/src/torii/backend/generated/spec/api/server_sessions_api_spec.rb +72 -0
  25. data/src/torii/backend/generated/spec/api/server_users_api_spec.rb +135 -0
  26. data/src/torii/backend/generated/spec/models/allowed_origins_response_spec.rb +36 -0
  27. data/src/torii/backend/generated/spec/models/create_user_request_spec.rb +72 -0
  28. data/src/torii/backend/generated/spec/models/cursor_page_response_server_user_response_spec.rb +48 -0
  29. data/src/torii/backend/generated/spec/models/problem_detail_spec.rb +66 -0
  30. data/src/torii/backend/generated/spec/models/server_user_response_spec.rb +128 -0
  31. data/src/torii/backend/generated/spec/models/server_user_search_request_spec.rb +64 -0
  32. data/src/torii/backend/generated/spec/models/set_allowed_origins_request_spec.rb +36 -0
  33. data/src/torii/backend/generated/spec/models/update_user_metadata_request_spec.rb +48 -0
  34. data/src/torii/backend/generated/spec/models/update_user_request_spec.rb +58 -0
  35. data/src/torii/backend/generated/spec/models/user_session_response_spec.rb +90 -0
  36. data/src/torii/backend/generated/spec/spec_helper.rb +111 -0
  37. data/src/torii/backend/version.rb +1 -1
  38. data/src/torii-backend-generated.rb +8 -19
  39. metadata +35 -17
  40. data/src/torii/backend/generated/lib/torii-backend-generated/version.rb +0 -15
  41. data/src/torii/backend/generated/lib/torii-backend-generated.rb +0 -49
@@ -0,0 +1,166 @@
1
+ =begin
2
+ #Torii Backend API
3
+
4
+ #Server-to-server API (BAPI) for backend SDKs. Authenticated with a secret key (Bearer sk_live_* / sk_test_*).
5
+
6
+ The version of the OpenAPI document: v1
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module ToriiBackendGenerated
17
+ class SetAllowedOriginsRequest < ApiModelBase
18
+ attr_accessor :origins
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'origins' => :'origins'
24
+ }
25
+ end
26
+
27
+ # Returns attribute mapping this model knows about
28
+ def self.acceptable_attribute_map
29
+ attribute_map
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ acceptable_attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'origins' => :'Array<String>'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `ToriiBackendGenerated::SetAllowedOriginsRequest` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ acceptable_attribute_map = self.class.acceptable_attribute_map
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!acceptable_attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `ToriiBackendGenerated::SetAllowedOriginsRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'origins')
67
+ if (value = attributes[:'origins']).is_a?(Array)
68
+ self.origins = value
69
+ end
70
+ else
71
+ self.origins = nil
72
+ end
73
+ end
74
+
75
+ # Show invalid properties with the reasons. Usually used together with valid?
76
+ # @return Array for valid properties with the reasons
77
+ def list_invalid_properties
78
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
79
+ invalid_properties = Array.new
80
+ if @origins.nil?
81
+ invalid_properties.push('invalid value for "origins", origins cannot be nil.')
82
+ end
83
+
84
+ invalid_properties
85
+ end
86
+
87
+ # Check to see if the all the properties in the model are valid
88
+ # @return true if the model is valid
89
+ def valid?
90
+ warn '[DEPRECATED] the `valid?` method is obsolete'
91
+ return false if @origins.nil?
92
+ true
93
+ end
94
+
95
+ # Custom attribute writer method with validation
96
+ # @param [Object] origins Value to be assigned
97
+ def origins=(origins)
98
+ if origins.nil?
99
+ fail ArgumentError, 'origins cannot be nil'
100
+ end
101
+
102
+ @origins = origins
103
+ end
104
+
105
+ # Checks equality by comparing each attribute.
106
+ # @param [Object] Object to be compared
107
+ def ==(o)
108
+ return true if self.equal?(o)
109
+ self.class == o.class &&
110
+ origins == o.origins
111
+ end
112
+
113
+ # @see the `==` method
114
+ # @param [Object] Object to be compared
115
+ def eql?(o)
116
+ self == o
117
+ end
118
+
119
+ # Calculates hash code according to all attributes.
120
+ # @return [Integer] Hash code
121
+ def hash
122
+ [origins].hash
123
+ end
124
+
125
+ # Builds the object from hash
126
+ # @param [Hash] attributes Model attributes in the form of hash
127
+ # @return [Object] Returns the model itself
128
+ def self.build_from_hash(attributes)
129
+ return nil unless attributes.is_a?(Hash)
130
+ attributes = attributes.transform_keys(&:to_sym)
131
+ transformed_hash = {}
132
+ openapi_types.each_pair do |key, type|
133
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
134
+ transformed_hash["#{key}"] = nil
135
+ elsif type =~ /\AArray<(.*)>/i
136
+ # check to ensure the input is an array given that the attribute
137
+ # is documented as an array but the input is not
138
+ if attributes[attribute_map[key]].is_a?(Array)
139
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
140
+ end
141
+ elsif !attributes[attribute_map[key]].nil?
142
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
143
+ end
144
+ end
145
+ new(transformed_hash)
146
+ end
147
+
148
+ # Returns the object in the form of hash
149
+ # @return [Hash] Returns the object in the form of hash
150
+ def to_hash
151
+ hash = {}
152
+ self.class.attribute_map.each_pair do |attr, param|
153
+ value = self.send(attr)
154
+ if value.nil?
155
+ is_nullable = self.class.openapi_nullable.include?(attr)
156
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
157
+ end
158
+
159
+ hash[param] = _to_hash(value)
160
+ end
161
+ hash
162
+ end
163
+
164
+ end
165
+
166
+ end
@@ -0,0 +1,175 @@
1
+ =begin
2
+ #Torii Backend API
3
+
4
+ #Server-to-server API (BAPI) for backend SDKs. Authenticated with a secret key (Bearer sk_live_* / sk_test_*).
5
+
6
+ The version of the OpenAPI document: v1
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module ToriiBackendGenerated
17
+ # PATCH body for a user's metadata bags. Each bag is tri-state: omit to leave it unchanged, or send an object value. Whether the object merges into or replaces the bag depends on the endpoint (see its operation description).
18
+ class UpdateUserMetadataRequest < ApiModelBase
19
+ # Public metadata bag: SDK-readable, server-written. Max 512 bytes.
20
+ attr_accessor :public_metadata
21
+
22
+ # Private metadata bag: server-only, never exposed to the SDK or in a JWT. Max 4096 bytes.
23
+ attr_accessor :private_metadata
24
+
25
+ # Unsafe metadata bag: readable and writable by the end-user via the SDK. Max 512 bytes.
26
+ attr_accessor :unsafe_metadata
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'public_metadata' => :'publicMetadata',
32
+ :'private_metadata' => :'privateMetadata',
33
+ :'unsafe_metadata' => :'unsafeMetadata'
34
+ }
35
+ end
36
+
37
+ # Returns attribute mapping this model knows about
38
+ def self.acceptable_attribute_map
39
+ attribute_map
40
+ end
41
+
42
+ # Returns all the JSON keys this model knows about
43
+ def self.acceptable_attributes
44
+ acceptable_attribute_map.values
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.openapi_types
49
+ {
50
+ :'public_metadata' => :'Hash<String, Object>',
51
+ :'private_metadata' => :'Hash<String, Object>',
52
+ :'unsafe_metadata' => :'Hash<String, Object>'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ ])
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `ToriiBackendGenerated::UpdateUserMetadataRequest` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ acceptable_attribute_map = self.class.acceptable_attribute_map
71
+ attributes = attributes.each_with_object({}) { |(k, v), h|
72
+ if (!acceptable_attribute_map.key?(k.to_sym))
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `ToriiBackendGenerated::UpdateUserMetadataRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
74
+ end
75
+ h[k.to_sym] = v
76
+ }
77
+
78
+ if attributes.key?(:'public_metadata')
79
+ if (value = attributes[:'public_metadata']).is_a?(Hash)
80
+ self.public_metadata = value
81
+ end
82
+ end
83
+
84
+ if attributes.key?(:'private_metadata')
85
+ if (value = attributes[:'private_metadata']).is_a?(Hash)
86
+ self.private_metadata = value
87
+ end
88
+ end
89
+
90
+ if attributes.key?(:'unsafe_metadata')
91
+ if (value = attributes[:'unsafe_metadata']).is_a?(Hash)
92
+ self.unsafe_metadata = value
93
+ end
94
+ end
95
+ end
96
+
97
+ # Show invalid properties with the reasons. Usually used together with valid?
98
+ # @return Array for valid properties with the reasons
99
+ def list_invalid_properties
100
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
101
+ invalid_properties = Array.new
102
+ invalid_properties
103
+ end
104
+
105
+ # Check to see if the all the properties in the model are valid
106
+ # @return true if the model is valid
107
+ def valid?
108
+ warn '[DEPRECATED] the `valid?` method is obsolete'
109
+ true
110
+ end
111
+
112
+ # Checks equality by comparing each attribute.
113
+ # @param [Object] Object to be compared
114
+ def ==(o)
115
+ return true if self.equal?(o)
116
+ self.class == o.class &&
117
+ public_metadata == o.public_metadata &&
118
+ private_metadata == o.private_metadata &&
119
+ unsafe_metadata == o.unsafe_metadata
120
+ end
121
+
122
+ # @see the `==` method
123
+ # @param [Object] Object to be compared
124
+ def eql?(o)
125
+ self == o
126
+ end
127
+
128
+ # Calculates hash code according to all attributes.
129
+ # @return [Integer] Hash code
130
+ def hash
131
+ [public_metadata, private_metadata, unsafe_metadata].hash
132
+ end
133
+
134
+ # Builds the object from hash
135
+ # @param [Hash] attributes Model attributes in the form of hash
136
+ # @return [Object] Returns the model itself
137
+ def self.build_from_hash(attributes)
138
+ return nil unless attributes.is_a?(Hash)
139
+ attributes = attributes.transform_keys(&:to_sym)
140
+ transformed_hash = {}
141
+ openapi_types.each_pair do |key, type|
142
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
143
+ transformed_hash["#{key}"] = nil
144
+ elsif type =~ /\AArray<(.*)>/i
145
+ # check to ensure the input is an array given that the attribute
146
+ # is documented as an array but the input is not
147
+ if attributes[attribute_map[key]].is_a?(Array)
148
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
149
+ end
150
+ elsif !attributes[attribute_map[key]].nil?
151
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
152
+ end
153
+ end
154
+ new(transformed_hash)
155
+ end
156
+
157
+ # Returns the object in the form of hash
158
+ # @return [Hash] Returns the object in the form of hash
159
+ def to_hash
160
+ hash = {}
161
+ self.class.attribute_map.each_pair do |attr, param|
162
+ value = self.send(attr)
163
+ if value.nil?
164
+ is_nullable = self.class.openapi_nullable.include?(attr)
165
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
166
+ end
167
+
168
+ hash[param] = _to_hash(value)
169
+ end
170
+ hash
171
+ end
172
+
173
+ end
174
+
175
+ end
@@ -1,9 +1,9 @@
1
1
  =begin
2
- #OpenAPI definition
2
+ #Torii Backend API
3
3
 
4
- #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ #Server-to-server API (BAPI) for backend SDKs. Authenticated with a secret key (Bearer sk_live_* / sk_test_*).
5
5
 
6
- The version of the OpenAPI document: v0
6
+ The version of the OpenAPI document: v1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -16,20 +16,17 @@ require 'time'
16
16
  module ToriiBackendGenerated
17
17
  # PATCH body for updating an end-user. Every field is tri-state: omit the key entirely to leave the field unchanged, send a non-null value to set it, or send JSON null to clear it.
18
18
  class UpdateUserRequest < ApiModelBase
19
- # New display name. Send null to clear; omit to leave unchanged.
20
- attr_accessor :name
19
+ # New first (given) name. Send null to clear; omit to leave unchanged.
20
+ attr_accessor :first_name
21
21
 
22
- # New phone number. Send null to clear; omit to leave unchanged.
23
- attr_accessor :phone
22
+ # New last (family) name. Send null to clear; omit to leave unchanged.
23
+ attr_accessor :last_name
24
24
 
25
25
  # New preferred locale. Send null to clear; omit to leave unchanged.
26
26
  attr_accessor :locale
27
27
 
28
- # New postal address. Send null to clear; omit to leave unchanged.
29
- attr_accessor :address
30
-
31
- # New date of birth (YYYY-MM-DD). Send null to clear; omit to leave unchanged.
32
- attr_accessor :date_of_birth
28
+ # Deep-merges into the user's unsafe metadata (a key set to null removes it); omit to leave unchanged. Merged result max 512 bytes.
29
+ attr_accessor :unsafe_metadata
33
30
 
34
31
  class EnumAttributeValidator
35
32
  attr_reader :datatype
@@ -56,11 +53,10 @@ module ToriiBackendGenerated
56
53
  # Attribute mapping from ruby-style variable name to JSON key.
57
54
  def self.attribute_map
58
55
  {
59
- :'name' => :'name',
60
- :'phone' => :'phone',
56
+ :'first_name' => :'firstName',
57
+ :'last_name' => :'lastName',
61
58
  :'locale' => :'locale',
62
- :'address' => :'address',
63
- :'date_of_birth' => :'dateOfBirth'
59
+ :'unsafe_metadata' => :'unsafeMetadata'
64
60
  }
65
61
  end
66
62
 
@@ -77,22 +73,19 @@ module ToriiBackendGenerated
77
73
  # Attribute type mapping.
78
74
  def self.openapi_types
79
75
  {
80
- :'name' => :'String',
81
- :'phone' => :'String',
76
+ :'first_name' => :'String',
77
+ :'last_name' => :'String',
82
78
  :'locale' => :'String',
83
- :'address' => :'String',
84
- :'date_of_birth' => :'Date'
79
+ :'unsafe_metadata' => :'Hash<String, Object>'
85
80
  }
86
81
  end
87
82
 
88
83
  # List of attributes with nullable: true
89
84
  def self.openapi_nullable
90
85
  Set.new([
91
- :'name',
92
- :'phone',
86
+ :'first_name',
87
+ :'last_name',
93
88
  :'locale',
94
- :'address',
95
- :'date_of_birth'
96
89
  ])
97
90
  end
98
91
 
@@ -112,24 +105,22 @@ module ToriiBackendGenerated
112
105
  h[k.to_sym] = v
113
106
  }
114
107
 
115
- if attributes.key?(:'name')
116
- self.name = attributes[:'name']
108
+ if attributes.key?(:'first_name')
109
+ self.first_name = attributes[:'first_name']
117
110
  end
118
111
 
119
- if attributes.key?(:'phone')
120
- self.phone = attributes[:'phone']
112
+ if attributes.key?(:'last_name')
113
+ self.last_name = attributes[:'last_name']
121
114
  end
122
115
 
123
116
  if attributes.key?(:'locale')
124
117
  self.locale = attributes[:'locale']
125
118
  end
126
119
 
127
- if attributes.key?(:'address')
128
- self.address = attributes[:'address']
129
- end
130
-
131
- if attributes.key?(:'date_of_birth')
132
- self.date_of_birth = attributes[:'date_of_birth']
120
+ if attributes.key?(:'unsafe_metadata')
121
+ if (value = attributes[:'unsafe_metadata']).is_a?(Hash)
122
+ self.unsafe_metadata = value
123
+ end
133
124
  end
134
125
  end
135
126
 
@@ -165,11 +156,10 @@ module ToriiBackendGenerated
165
156
  def ==(o)
166
157
  return true if self.equal?(o)
167
158
  self.class == o.class &&
168
- name == o.name &&
169
- phone == o.phone &&
159
+ first_name == o.first_name &&
160
+ last_name == o.last_name &&
170
161
  locale == o.locale &&
171
- address == o.address &&
172
- date_of_birth == o.date_of_birth
162
+ unsafe_metadata == o.unsafe_metadata
173
163
  end
174
164
 
175
165
  # @see the `==` method
@@ -181,7 +171,7 @@ module ToriiBackendGenerated
181
171
  # Calculates hash code according to all attributes.
182
172
  # @return [Integer] Hash code
183
173
  def hash
184
- [name, phone, locale, address, date_of_birth].hash
174
+ [first_name, last_name, locale, unsafe_metadata].hash
185
175
  end
186
176
 
187
177
  # Builds the object from hash
@@ -1,9 +1,9 @@
1
1
  =begin
2
- #OpenAPI definition
2
+ #Torii Backend API
3
3
 
4
- #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ #Server-to-server API (BAPI) for backend SDKs. Authenticated with a secret key (Bearer sk_live_* / sk_test_*).
5
5
 
6
- The version of the OpenAPI document: v0
6
+ The version of the OpenAPI document: v1
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -43,6 +43,9 @@ module ToriiBackendGenerated
43
43
  # Active organization pinned to this session (`org_id` claim on re-mint).
44
44
  attr_accessor :active_organization_id
45
45
 
46
+ # Platform user behind this session when it was established via impersonation; null for normal sign-ins.
47
+ attr_accessor :impersonated_by
48
+
46
49
  # Attribute mapping from ruby-style variable name to JSON key.
47
50
  def self.attribute_map
48
51
  {
@@ -54,7 +57,8 @@ module ToriiBackendGenerated
54
57
  :'created_at' => :'createdAt',
55
58
  :'expires_at' => :'expiresAt',
56
59
  :'last_used_at' => :'lastUsedAt',
57
- :'active_organization_id' => :'activeOrganizationId'
60
+ :'active_organization_id' => :'activeOrganizationId',
61
+ :'impersonated_by' => :'impersonatedBy'
58
62
  }
59
63
  end
60
64
 
@@ -79,7 +83,8 @@ module ToriiBackendGenerated
79
83
  :'created_at' => :'Time',
80
84
  :'expires_at' => :'Time',
81
85
  :'last_used_at' => :'Time',
82
- :'active_organization_id' => :'String'
86
+ :'active_organization_id' => :'String',
87
+ :'impersonated_by' => :'String'
83
88
  }
84
89
  end
85
90
 
@@ -88,7 +93,8 @@ module ToriiBackendGenerated
88
93
  Set.new([
89
94
  :'user_agent',
90
95
  :'ip_address',
91
- :'active_organization_id'
96
+ :'active_organization_id',
97
+ :'impersonated_by'
92
98
  ])
93
99
  end
94
100
 
@@ -155,6 +161,10 @@ module ToriiBackendGenerated
155
161
  if attributes.key?(:'active_organization_id')
156
162
  self.active_organization_id = attributes[:'active_organization_id']
157
163
  end
164
+
165
+ if attributes.key?(:'impersonated_by')
166
+ self.impersonated_by = attributes[:'impersonated_by']
167
+ end
158
168
  end
159
169
 
160
170
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -275,7 +285,8 @@ module ToriiBackendGenerated
275
285
  created_at == o.created_at &&
276
286
  expires_at == o.expires_at &&
277
287
  last_used_at == o.last_used_at &&
278
- active_organization_id == o.active_organization_id
288
+ active_organization_id == o.active_organization_id &&
289
+ impersonated_by == o.impersonated_by
279
290
  end
280
291
 
281
292
  # @see the `==` method
@@ -287,7 +298,7 @@ module ToriiBackendGenerated
287
298
  # Calculates hash code according to all attributes.
288
299
  # @return [Integer] Hash code
289
300
  def hash
290
- [id, user_id, environment_id, user_agent, ip_address, created_at, expires_at, last_used_at, active_organization_id].hash
301
+ [id, user_id, environment_id, user_agent, ip_address, created_at, expires_at, last_used_at, active_organization_id, impersonated_by].hash
291
302
  end
292
303
 
293
304
  # Builds the object from hash
@@ -0,0 +1,15 @@
1
+ =begin
2
+ #Torii Backend API
3
+
4
+ #Server-to-server API (BAPI) for backend SDKs. Authenticated with a secret key (Bearer sk_live_* / sk_test_*).
5
+
6
+ The version of the OpenAPI document: v1
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ module ToriiBackendGenerated
14
+ VERSION = '1.0.0'
15
+ end
@@ -0,0 +1,53 @@
1
+ =begin
2
+ #Torii Backend API
3
+
4
+ #Server-to-server API (BAPI) for backend SDKs. Authenticated with a secret key (Bearer sk_live_* / sk_test_*).
5
+
6
+ The version of the OpenAPI document: v1
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ # Common files
14
+ require 'torii_backend_generated/api_client'
15
+ require 'torii_backend_generated/api_error'
16
+ require 'torii_backend_generated/api_model_base'
17
+ require 'torii_backend_generated/version'
18
+ require 'torii_backend_generated/configuration'
19
+
20
+ # Models
21
+ require 'torii_backend_generated/models/allowed_origins_response'
22
+ require 'torii_backend_generated/models/create_user_request'
23
+ require 'torii_backend_generated/models/cursor_page_response_server_user_response'
24
+ require 'torii_backend_generated/models/problem_detail'
25
+ require 'torii_backend_generated/models/server_user_response'
26
+ require 'torii_backend_generated/models/server_user_search_request'
27
+ require 'torii_backend_generated/models/set_allowed_origins_request'
28
+ require 'torii_backend_generated/models/update_user_metadata_request'
29
+ require 'torii_backend_generated/models/update_user_request'
30
+ require 'torii_backend_generated/models/user_session_response'
31
+
32
+ # APIs
33
+ require 'torii_backend_generated/api/allowed_origins_api'
34
+ require 'torii_backend_generated/api/server_sessions_api'
35
+ require 'torii_backend_generated/api/server_users_api'
36
+
37
+ module ToriiBackendGenerated
38
+ class << self
39
+ # Customize default settings for the SDK using block.
40
+ # ToriiBackendGenerated.configure do |config|
41
+ # config.username = "xxx"
42
+ # config.password = "xxx"
43
+ # end
44
+ # If no block given, return the default Configuration object.
45
+ def configure
46
+ if block_given?
47
+ yield(Configuration.default)
48
+ else
49
+ Configuration.default
50
+ end
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,57 @@
1
+ =begin
2
+ #Torii Backend API
3
+
4
+ #Server-to-server API (BAPI) for backend SDKs. Authenticated with a secret key (Bearer sk_live_* / sk_test_*).
5
+
6
+ The version of the OpenAPI document: v1
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for ToriiBackendGenerated::AllowedOriginsApi
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe 'AllowedOriginsApi' do
20
+ before do
21
+ # run before each test
22
+ @api_instance = ToriiBackendGenerated::AllowedOriginsApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of AllowedOriginsApi' do
30
+ it 'should create an instance of AllowedOriginsApi' do
31
+ expect(@api_instance).to be_instance_of(ToriiBackendGenerated::AllowedOriginsApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for list
36
+ # List escape-hatch origins for this environment
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [AllowedOriginsResponse]
39
+ describe 'list test' do
40
+ it 'should work' do
41
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
42
+ end
43
+ end
44
+
45
+ # unit tests for set
46
+ # Replace the escape-hatch origins for this environment
47
+ # Full origins incl. non-http schemes (e.g. capacitor://localhost). Replaces the list.
48
+ # @param set_allowed_origins_request
49
+ # @param [Hash] opts the optional parameters
50
+ # @return [AllowedOriginsResponse]
51
+ describe 'set test' do
52
+ it 'should work' do
53
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
54
+ end
55
+ end
56
+
57
+ end