composio 0.1.6 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/README.md +492 -4
- data/lib/composio/api/actions_api.rb +107 -0
- data/lib/composio/api/analytics_api.rb +181 -0
- data/lib/composio/api/apps_api.rb +257 -0
- data/lib/composio/api/connections_api.rb +84 -0
- data/lib/composio/api/event_logs_api.rb +427 -0
- data/lib/composio/api/logs_api.rb +127 -9
- data/lib/composio/api/payment_api.rb +430 -0
- data/lib/composio/models/action_analytics_dto.rb +250 -0
- data/lib/composio/models/action_by_app_dto.rb +237 -0
- data/lib/composio/models/action_by_status_dto.rb +237 -0
- data/lib/composio/models/action_get_nla_inputs_req_dto.rb +220 -0
- data/lib/composio/models/additional_info.rb +220 -0
- data/lib/composio/models/analytics_data_req_dto.rb +250 -0
- data/lib/composio/models/analytics_data_res_dto.rb +282 -0
- data/lib/composio/models/analytics_entity_data_dto.rb +257 -0
- data/lib/composio/models/api_key_res_dto.rb +61 -4
- data/lib/composio/models/app_name_count_dto.rb +267 -0
- data/lib/composio/models/client_unique_user_id_count_dto.rb +237 -0
- data/lib/composio/models/connected_account_response_dto.rb +10 -1
- data/lib/composio/models/connection_params.rb +22 -6
- data/lib/composio/models/connection_with_app_data.rb +22 -6
- data/lib/composio/models/connector_list_item_dto.rb +16 -1
- data/lib/composio/models/create_checkout_session_req_dto.rb +220 -0
- data/lib/composio/models/data.rb +234 -0
- data/lib/composio/models/entity_query_req_dto.rb +216 -0
- data/lib/composio/models/fetch_query_dto.rb +278 -0
- data/lib/composio/models/get_connection_info_response_dto.rb +250 -0
- data/lib/composio/models/get_connector_list_res_dto.rb +0 -1
- data/lib/composio/models/get_logs_dto.rb +10 -10
- data/lib/composio/models/{job_status.rb → get_logs_dto_status.rb} +6 -6
- data/lib/composio/models/ingest_data_dto.rb +298 -0
- data/lib/composio/models/ingest_data_response_dto.rb +220 -0
- data/lib/composio/models/integrations_with_counts_dto.rb +297 -0
- data/lib/composio/models/invite_member_req_dto.rb +14 -4
- data/lib/composio/models/last_time_period.rb +40 -0
- data/lib/composio/models/member_info_res_dto.rb +324 -0
- data/lib/composio/models/{connection_with_app_data_created_at.rb → member_info_res_dto_created_at.rb} +1 -1
- data/lib/composio/models/member_res_dto.rb +16 -1
- data/lib/composio/models/member_res_dto_role.rb +36 -0
- data/lib/composio/models/open_api_spec_list_res_dto.rb +17 -74
- data/lib/composio/models/parameter.rb +248 -0
- data/lib/composio/models/plan.rb +38 -0
- data/lib/composio/models/role.rb +36 -0
- data/lib/composio/models/state.rb +41 -0
- data/lib/composio/models/status.rb +7 -4
- data/lib/composio/models/t_connection_count_dto.rb +236 -0
- data/lib/composio/models/time_period_req_dto.rb +216 -0
- data/lib/composio/models/top_entities_res_dto.rb +223 -0
- data/lib/composio/models/update_member_req_dto.rb +236 -0
- data/lib/composio/models/update_member_req_dto_role.rb +36 -0
- data/lib/composio/models/webhook_req_dto.rb +221 -0
- data/lib/composio/models/webhook_secret_res_dto.rb +221 -0
- data/lib/composio/version.rb +1 -1
- data/lib/composio.rb +43 -2
- data/spec/api/actions_api_spec.rb +13 -0
- data/spec/api/analytics_api_spec.rb +51 -0
- data/spec/api/apps_api_spec.rb +34 -0
- data/spec/api/connections_api_spec.rb +11 -0
- data/spec/api/event_logs_api_spec.rb +83 -0
- data/spec/api/logs_api_spec.rb +13 -1
- data/spec/api/payment_api_spec.rb +83 -0
- data/spec/models/action_analytics_dto_spec.rb +40 -0
- data/spec/models/action_by_app_dto_spec.rb +34 -0
- data/spec/models/action_by_status_dto_spec.rb +34 -0
- data/spec/models/action_get_nla_inputs_req_dto_spec.rb +28 -0
- data/spec/models/additional_info_spec.rb +28 -0
- data/spec/models/analytics_data_req_dto_spec.rb +32 -0
- data/spec/models/analytics_data_res_dto_spec.rb +52 -0
- data/spec/models/analytics_entity_data_dto_spec.rb +40 -0
- data/spec/models/api_key_res_dto_spec.rb +18 -0
- data/spec/models/app_name_count_dto_spec.rb +46 -0
- data/spec/models/client_unique_user_id_count_dto_spec.rb +34 -0
- data/spec/models/connected_account_response_dto_spec.rb +6 -0
- data/spec/models/connection_params_spec.rb +6 -0
- data/spec/models/connection_with_app_data_spec.rb +6 -0
- data/spec/models/connector_list_item_dto_spec.rb +6 -0
- data/spec/models/create_checkout_session_req_dto_spec.rb +28 -0
- data/spec/models/data_spec.rb +34 -0
- data/spec/models/entity_query_req_dto_spec.rb +28 -0
- data/spec/models/fetch_query_dto_spec.rb +34 -0
- data/spec/models/get_connection_info_response_dto_spec.rb +40 -0
- data/spec/models/get_logs_dto_spec.rb +1 -1
- data/spec/models/get_logs_dto_status_spec.rb +22 -0
- data/spec/models/ingest_data_dto_spec.rb +64 -0
- data/spec/models/ingest_data_response_dto_spec.rb +28 -0
- data/spec/models/integrations_with_counts_dto_spec.rb +58 -0
- data/spec/models/invite_member_req_dto_spec.rb +6 -0
- data/spec/models/last_time_period_spec.rb +22 -0
- data/spec/models/{connection_with_app_data_created_at_spec.rb → member_info_res_dto_created_at_spec.rb} +2 -2
- data/spec/models/member_info_res_dto_spec.rb +76 -0
- data/spec/models/member_res_dto_role_spec.rb +22 -0
- data/spec/models/member_res_dto_spec.rb +6 -0
- data/spec/models/open_api_spec_list_res_dto_spec.rb +5 -29
- data/spec/models/parameter_spec.rb +40 -0
- data/spec/models/plan_spec.rb +22 -0
- data/spec/models/role_spec.rb +22 -0
- data/spec/models/state_spec.rb +22 -0
- data/spec/models/t_connection_count_dto_spec.rb +34 -0
- data/spec/models/time_period_req_dto_spec.rb +28 -0
- data/spec/models/top_entities_res_dto_spec.rb +28 -0
- data/spec/models/update_member_req_dto_role_spec.rb +22 -0
- data/spec/models/update_member_req_dto_spec.rb +34 -0
- data/spec/models/webhook_req_dto_spec.rb +28 -0
- data/spec/models/webhook_secret_res_dto_spec.rb +28 -0
- metadata +215 -110
- data/spec/models/job_status_spec.rb +0 -22
@@ -0,0 +1,267 @@
|
|
1
|
+
=begin
|
2
|
+
#Composio OpenAPI
|
3
|
+
|
4
|
+
#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
=end
|
8
|
+
|
9
|
+
require 'date'
|
10
|
+
require 'time'
|
11
|
+
|
12
|
+
module Composio
|
13
|
+
# Comprehensive app-level analytics data, providing a breakdown of connection count, trigger count, and request logs count for each app
|
14
|
+
class AppNameCountDTO
|
15
|
+
# Name of the app
|
16
|
+
attr_accessor :app_name
|
17
|
+
|
18
|
+
# Count of connections for the app
|
19
|
+
attr_accessor :connection_count
|
20
|
+
|
21
|
+
# Count of triggers for the app
|
22
|
+
attr_accessor :trigger_count
|
23
|
+
|
24
|
+
# Count of request logs for the app
|
25
|
+
attr_accessor :request_logs_count
|
26
|
+
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
28
|
+
def self.attribute_map
|
29
|
+
{
|
30
|
+
:'app_name' => :'appName',
|
31
|
+
:'connection_count' => :'connectionCount',
|
32
|
+
:'trigger_count' => :'triggerCount',
|
33
|
+
:'request_logs_count' => :'requestLogsCount'
|
34
|
+
}
|
35
|
+
end
|
36
|
+
|
37
|
+
# Returns all the JSON keys this model knows about
|
38
|
+
def self.acceptable_attributes
|
39
|
+
attribute_map.values
|
40
|
+
end
|
41
|
+
|
42
|
+
# Attribute type mapping.
|
43
|
+
def self.openapi_types
|
44
|
+
{
|
45
|
+
:'app_name' => :'String',
|
46
|
+
:'connection_count' => :'Float',
|
47
|
+
:'trigger_count' => :'Float',
|
48
|
+
:'request_logs_count' => :'Float'
|
49
|
+
}
|
50
|
+
end
|
51
|
+
|
52
|
+
# List of attributes with nullable: true
|
53
|
+
def self.openapi_nullable
|
54
|
+
Set.new([
|
55
|
+
])
|
56
|
+
end
|
57
|
+
|
58
|
+
# Initializes the object
|
59
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
60
|
+
def initialize(attributes = {})
|
61
|
+
if (!attributes.is_a?(Hash))
|
62
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Composio::AppNameCountDTO` initialize method"
|
63
|
+
end
|
64
|
+
|
65
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
66
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
67
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
68
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Composio::AppNameCountDTO`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
69
|
+
end
|
70
|
+
h[k.to_sym] = v
|
71
|
+
}
|
72
|
+
|
73
|
+
if attributes.key?(:'app_name')
|
74
|
+
self.app_name = attributes[:'app_name']
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes.key?(:'connection_count')
|
78
|
+
self.connection_count = attributes[:'connection_count']
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes.key?(:'trigger_count')
|
82
|
+
self.trigger_count = attributes[:'trigger_count']
|
83
|
+
end
|
84
|
+
|
85
|
+
if attributes.key?(:'request_logs_count')
|
86
|
+
self.request_logs_count = attributes[:'request_logs_count']
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
91
|
+
# @return Array for valid properties with the reasons
|
92
|
+
def list_invalid_properties
|
93
|
+
invalid_properties = Array.new
|
94
|
+
if @app_name.nil?
|
95
|
+
invalid_properties.push('invalid value for "app_name", app_name cannot be nil.')
|
96
|
+
end
|
97
|
+
|
98
|
+
if @connection_count.nil?
|
99
|
+
invalid_properties.push('invalid value for "connection_count", connection_count cannot be nil.')
|
100
|
+
end
|
101
|
+
|
102
|
+
if @trigger_count.nil?
|
103
|
+
invalid_properties.push('invalid value for "trigger_count", trigger_count cannot be nil.')
|
104
|
+
end
|
105
|
+
|
106
|
+
if @request_logs_count.nil?
|
107
|
+
invalid_properties.push('invalid value for "request_logs_count", request_logs_count cannot be nil.')
|
108
|
+
end
|
109
|
+
|
110
|
+
invalid_properties
|
111
|
+
end
|
112
|
+
|
113
|
+
# Check to see if the all the properties in the model are valid
|
114
|
+
# @return true if the model is valid
|
115
|
+
def valid?
|
116
|
+
return false if @app_name.nil?
|
117
|
+
return false if @connection_count.nil?
|
118
|
+
return false if @trigger_count.nil?
|
119
|
+
return false if @request_logs_count.nil?
|
120
|
+
true
|
121
|
+
end
|
122
|
+
|
123
|
+
# Checks equality by comparing each attribute.
|
124
|
+
# @param [Object] Object to be compared
|
125
|
+
def ==(o)
|
126
|
+
return true if self.equal?(o)
|
127
|
+
self.class == o.class &&
|
128
|
+
app_name == o.app_name &&
|
129
|
+
connection_count == o.connection_count &&
|
130
|
+
trigger_count == o.trigger_count &&
|
131
|
+
request_logs_count == o.request_logs_count
|
132
|
+
end
|
133
|
+
|
134
|
+
# @see the `==` method
|
135
|
+
# @param [Object] Object to be compared
|
136
|
+
def eql?(o)
|
137
|
+
self == o
|
138
|
+
end
|
139
|
+
|
140
|
+
# Calculates hash code according to all attributes.
|
141
|
+
# @return [Integer] Hash code
|
142
|
+
def hash
|
143
|
+
[app_name, connection_count, trigger_count, request_logs_count].hash
|
144
|
+
end
|
145
|
+
|
146
|
+
# Builds the object from hash
|
147
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
148
|
+
# @return [Object] Returns the model itself
|
149
|
+
def self.build_from_hash(attributes)
|
150
|
+
new.build_from_hash(attributes)
|
151
|
+
end
|
152
|
+
|
153
|
+
# Builds the object from hash
|
154
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
155
|
+
# @return [Object] Returns the model itself
|
156
|
+
def build_from_hash(attributes)
|
157
|
+
return nil unless attributes.is_a?(Hash)
|
158
|
+
attributes = attributes.transform_keys(&:to_sym)
|
159
|
+
self.class.openapi_types.each_pair do |key, type|
|
160
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
161
|
+
self.send("#{key}=", nil)
|
162
|
+
elsif type =~ /\AArray<(.*)>/i
|
163
|
+
# check to ensure the input is an array given that the attribute
|
164
|
+
# is documented as an array but the input is not
|
165
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
166
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
167
|
+
end
|
168
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
169
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
self
|
174
|
+
end
|
175
|
+
|
176
|
+
# Deserializes the data based on type
|
177
|
+
# @param string type Data type
|
178
|
+
# @param string value Value to be deserialized
|
179
|
+
# @return [Object] Deserialized data
|
180
|
+
def _deserialize(type, value)
|
181
|
+
case type.to_sym
|
182
|
+
when :Time
|
183
|
+
Time.parse(value)
|
184
|
+
when :Date
|
185
|
+
Date.parse(value)
|
186
|
+
when :String
|
187
|
+
value.to_s
|
188
|
+
when :Integer
|
189
|
+
value.to_i
|
190
|
+
when :Float
|
191
|
+
value.to_f
|
192
|
+
when :Boolean
|
193
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
194
|
+
true
|
195
|
+
else
|
196
|
+
false
|
197
|
+
end
|
198
|
+
when :Object
|
199
|
+
# generic object (usually a Hash), return directly
|
200
|
+
value
|
201
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
202
|
+
inner_type = Regexp.last_match[:inner_type]
|
203
|
+
value.map { |v| _deserialize(inner_type, v) }
|
204
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
205
|
+
k_type = Regexp.last_match[:k_type]
|
206
|
+
v_type = Regexp.last_match[:v_type]
|
207
|
+
{}.tap do |hash|
|
208
|
+
value.each do |k, v|
|
209
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
210
|
+
end
|
211
|
+
end
|
212
|
+
else # model
|
213
|
+
# models (e.g. Pet) or oneOf
|
214
|
+
klass = Composio.const_get(type)
|
215
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
216
|
+
end
|
217
|
+
end
|
218
|
+
|
219
|
+
# Returns the string representation of the object
|
220
|
+
# @return [String] String presentation of the object
|
221
|
+
def to_s
|
222
|
+
to_hash.to_s
|
223
|
+
end
|
224
|
+
|
225
|
+
# to_body is an alias to to_hash (backward compatibility)
|
226
|
+
# @return [Hash] Returns the object in the form of hash
|
227
|
+
def to_body
|
228
|
+
to_hash
|
229
|
+
end
|
230
|
+
|
231
|
+
# Returns the object in the form of hash
|
232
|
+
# @return [Hash] Returns the object in the form of hash
|
233
|
+
def to_hash
|
234
|
+
hash = {}
|
235
|
+
self.class.attribute_map.each_pair do |attr, param|
|
236
|
+
value = self.send(attr)
|
237
|
+
if value.nil?
|
238
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
239
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
240
|
+
end
|
241
|
+
|
242
|
+
hash[param] = _to_hash(value)
|
243
|
+
end
|
244
|
+
hash
|
245
|
+
end
|
246
|
+
|
247
|
+
# Outputs non-array value in the form of hash
|
248
|
+
# For object, use to_hash. Otherwise, just return the value
|
249
|
+
# @param [Object] value Any valid value
|
250
|
+
# @return [Hash] Returns the value in the form of hash
|
251
|
+
def _to_hash(value)
|
252
|
+
if value.is_a?(Array)
|
253
|
+
value.compact.map { |v| _to_hash(v) }
|
254
|
+
elsif value.is_a?(Hash)
|
255
|
+
{}.tap do |hash|
|
256
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
257
|
+
end
|
258
|
+
elsif value.respond_to? :to_hash
|
259
|
+
value.to_hash
|
260
|
+
else
|
261
|
+
value
|
262
|
+
end
|
263
|
+
end
|
264
|
+
|
265
|
+
end
|
266
|
+
|
267
|
+
end
|
@@ -0,0 +1,237 @@
|
|
1
|
+
=begin
|
2
|
+
#Composio OpenAPI
|
3
|
+
|
4
|
+
#Composio SDK: Equip your agent with high-quality tools and build your real-world usecase
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
=end
|
8
|
+
|
9
|
+
require 'date'
|
10
|
+
require 'time'
|
11
|
+
|
12
|
+
module Composio
|
13
|
+
# Connection counts by entity
|
14
|
+
class ClientUniqueUserIdCountDTO
|
15
|
+
# Client unique user id
|
16
|
+
attr_accessor :client_unique_user_id
|
17
|
+
|
18
|
+
# Count of connections for the client unique user id
|
19
|
+
attr_accessor :count
|
20
|
+
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
22
|
+
def self.attribute_map
|
23
|
+
{
|
24
|
+
:'client_unique_user_id' => :'clientUniqueUserId',
|
25
|
+
:'count' => :'count'
|
26
|
+
}
|
27
|
+
end
|
28
|
+
|
29
|
+
# Returns all the JSON keys this model knows about
|
30
|
+
def self.acceptable_attributes
|
31
|
+
attribute_map.values
|
32
|
+
end
|
33
|
+
|
34
|
+
# Attribute type mapping.
|
35
|
+
def self.openapi_types
|
36
|
+
{
|
37
|
+
:'client_unique_user_id' => :'String',
|
38
|
+
:'count' => :'Float'
|
39
|
+
}
|
40
|
+
end
|
41
|
+
|
42
|
+
# List of attributes with nullable: true
|
43
|
+
def self.openapi_nullable
|
44
|
+
Set.new([
|
45
|
+
])
|
46
|
+
end
|
47
|
+
|
48
|
+
# Initializes the object
|
49
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
50
|
+
def initialize(attributes = {})
|
51
|
+
if (!attributes.is_a?(Hash))
|
52
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Composio::ClientUniqueUserIdCountDTO` initialize method"
|
53
|
+
end
|
54
|
+
|
55
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
56
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
57
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
58
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Composio::ClientUniqueUserIdCountDTO`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
59
|
+
end
|
60
|
+
h[k.to_sym] = v
|
61
|
+
}
|
62
|
+
|
63
|
+
if attributes.key?(:'client_unique_user_id')
|
64
|
+
self.client_unique_user_id = attributes[:'client_unique_user_id']
|
65
|
+
end
|
66
|
+
|
67
|
+
if attributes.key?(:'count')
|
68
|
+
self.count = attributes[:'count']
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
73
|
+
# @return Array for valid properties with the reasons
|
74
|
+
def list_invalid_properties
|
75
|
+
invalid_properties = Array.new
|
76
|
+
if @client_unique_user_id.nil?
|
77
|
+
invalid_properties.push('invalid value for "client_unique_user_id", client_unique_user_id cannot be nil.')
|
78
|
+
end
|
79
|
+
|
80
|
+
if @count.nil?
|
81
|
+
invalid_properties.push('invalid value for "count", count 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
|
+
return false if @client_unique_user_id.nil?
|
91
|
+
return false if @count.nil?
|
92
|
+
true
|
93
|
+
end
|
94
|
+
|
95
|
+
# Checks equality by comparing each attribute.
|
96
|
+
# @param [Object] Object to be compared
|
97
|
+
def ==(o)
|
98
|
+
return true if self.equal?(o)
|
99
|
+
self.class == o.class &&
|
100
|
+
client_unique_user_id == o.client_unique_user_id &&
|
101
|
+
count == o.count
|
102
|
+
end
|
103
|
+
|
104
|
+
# @see the `==` method
|
105
|
+
# @param [Object] Object to be compared
|
106
|
+
def eql?(o)
|
107
|
+
self == o
|
108
|
+
end
|
109
|
+
|
110
|
+
# Calculates hash code according to all attributes.
|
111
|
+
# @return [Integer] Hash code
|
112
|
+
def hash
|
113
|
+
[client_unique_user_id, count].hash
|
114
|
+
end
|
115
|
+
|
116
|
+
# Builds the object from hash
|
117
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
118
|
+
# @return [Object] Returns the model itself
|
119
|
+
def self.build_from_hash(attributes)
|
120
|
+
new.build_from_hash(attributes)
|
121
|
+
end
|
122
|
+
|
123
|
+
# Builds the object from hash
|
124
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
125
|
+
# @return [Object] Returns the model itself
|
126
|
+
def build_from_hash(attributes)
|
127
|
+
return nil unless attributes.is_a?(Hash)
|
128
|
+
attributes = attributes.transform_keys(&:to_sym)
|
129
|
+
self.class.openapi_types.each_pair do |key, type|
|
130
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
131
|
+
self.send("#{key}=", nil)
|
132
|
+
elsif type =~ /\AArray<(.*)>/i
|
133
|
+
# check to ensure the input is an array given that the attribute
|
134
|
+
# is documented as an array but the input is not
|
135
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
136
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
137
|
+
end
|
138
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
139
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
143
|
+
self
|
144
|
+
end
|
145
|
+
|
146
|
+
# Deserializes the data based on type
|
147
|
+
# @param string type Data type
|
148
|
+
# @param string value Value to be deserialized
|
149
|
+
# @return [Object] Deserialized data
|
150
|
+
def _deserialize(type, value)
|
151
|
+
case type.to_sym
|
152
|
+
when :Time
|
153
|
+
Time.parse(value)
|
154
|
+
when :Date
|
155
|
+
Date.parse(value)
|
156
|
+
when :String
|
157
|
+
value.to_s
|
158
|
+
when :Integer
|
159
|
+
value.to_i
|
160
|
+
when :Float
|
161
|
+
value.to_f
|
162
|
+
when :Boolean
|
163
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
164
|
+
true
|
165
|
+
else
|
166
|
+
false
|
167
|
+
end
|
168
|
+
when :Object
|
169
|
+
# generic object (usually a Hash), return directly
|
170
|
+
value
|
171
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
172
|
+
inner_type = Regexp.last_match[:inner_type]
|
173
|
+
value.map { |v| _deserialize(inner_type, v) }
|
174
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
175
|
+
k_type = Regexp.last_match[:k_type]
|
176
|
+
v_type = Regexp.last_match[:v_type]
|
177
|
+
{}.tap do |hash|
|
178
|
+
value.each do |k, v|
|
179
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
180
|
+
end
|
181
|
+
end
|
182
|
+
else # model
|
183
|
+
# models (e.g. Pet) or oneOf
|
184
|
+
klass = Composio.const_get(type)
|
185
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
186
|
+
end
|
187
|
+
end
|
188
|
+
|
189
|
+
# Returns the string representation of the object
|
190
|
+
# @return [String] String presentation of the object
|
191
|
+
def to_s
|
192
|
+
to_hash.to_s
|
193
|
+
end
|
194
|
+
|
195
|
+
# to_body is an alias to to_hash (backward compatibility)
|
196
|
+
# @return [Hash] Returns the object in the form of hash
|
197
|
+
def to_body
|
198
|
+
to_hash
|
199
|
+
end
|
200
|
+
|
201
|
+
# Returns the object in the form of hash
|
202
|
+
# @return [Hash] Returns the object in the form of hash
|
203
|
+
def to_hash
|
204
|
+
hash = {}
|
205
|
+
self.class.attribute_map.each_pair do |attr, param|
|
206
|
+
value = self.send(attr)
|
207
|
+
if value.nil?
|
208
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
209
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
210
|
+
end
|
211
|
+
|
212
|
+
hash[param] = _to_hash(value)
|
213
|
+
end
|
214
|
+
hash
|
215
|
+
end
|
216
|
+
|
217
|
+
# Outputs non-array value in the form of hash
|
218
|
+
# For object, use to_hash. Otherwise, just return the value
|
219
|
+
# @param [Object] value Any valid value
|
220
|
+
# @return [Hash] Returns the value in the form of hash
|
221
|
+
def _to_hash(value)
|
222
|
+
if value.is_a?(Array)
|
223
|
+
value.compact.map { |v| _to_hash(v) }
|
224
|
+
elsif value.is_a?(Hash)
|
225
|
+
{}.tap do |hash|
|
226
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
227
|
+
end
|
228
|
+
elsif value.respond_to? :to_hash
|
229
|
+
value.to_hash
|
230
|
+
else
|
231
|
+
value
|
232
|
+
end
|
233
|
+
end
|
234
|
+
|
235
|
+
end
|
236
|
+
|
237
|
+
end
|
@@ -15,6 +15,8 @@ module Composio
|
|
15
15
|
|
16
16
|
attr_accessor :app_unique_id
|
17
17
|
|
18
|
+
attr_accessor :member_info
|
19
|
+
|
18
20
|
attr_accessor :meta
|
19
21
|
|
20
22
|
attr_accessor :is_disabled
|
@@ -40,6 +42,7 @@ module Composio
|
|
40
42
|
{
|
41
43
|
:'integration_id' => :'integrationId',
|
42
44
|
:'app_unique_id' => :'appUniqueId',
|
45
|
+
:'member_info' => :'memberInfo',
|
43
46
|
:'meta' => :'meta',
|
44
47
|
:'is_disabled' => :'isDisabled',
|
45
48
|
:'id' => :'id',
|
@@ -63,6 +66,7 @@ module Composio
|
|
63
66
|
{
|
64
67
|
:'integration_id' => :'String',
|
65
68
|
:'app_unique_id' => :'String',
|
69
|
+
:'member_info' => :'MemberInfoResDTO',
|
66
70
|
:'meta' => :'Meta',
|
67
71
|
:'is_disabled' => :'Boolean',
|
68
72
|
:'id' => :'String',
|
@@ -105,6 +109,10 @@ module Composio
|
|
105
109
|
self.app_unique_id = attributes[:'app_unique_id']
|
106
110
|
end
|
107
111
|
|
112
|
+
if attributes.key?(:'member_info')
|
113
|
+
self.member_info = attributes[:'member_info']
|
114
|
+
end
|
115
|
+
|
108
116
|
if attributes.key?(:'meta')
|
109
117
|
self.meta = attributes[:'meta']
|
110
118
|
end
|
@@ -211,6 +219,7 @@ module Composio
|
|
211
219
|
self.class == o.class &&
|
212
220
|
integration_id == o.integration_id &&
|
213
221
|
app_unique_id == o.app_unique_id &&
|
222
|
+
member_info == o.member_info &&
|
214
223
|
meta == o.meta &&
|
215
224
|
is_disabled == o.is_disabled &&
|
216
225
|
id == o.id &&
|
@@ -232,7 +241,7 @@ module Composio
|
|
232
241
|
# Calculates hash code according to all attributes.
|
233
242
|
# @return [Integer] Hash code
|
234
243
|
def hash
|
235
|
-
[integration_id, app_unique_id, meta, is_disabled, id, client_unique_user_id, app_name, entity_id, status, enabled, created_at, updated_at].hash
|
244
|
+
[integration_id, app_unique_id, member_info, meta, is_disabled, id, client_unique_user_id, app_name, entity_id, status, enabled, created_at, updated_at].hash
|
236
245
|
end
|
237
246
|
|
238
247
|
# Builds the object from hash
|
@@ -43,6 +43,8 @@ module Composio
|
|
43
43
|
|
44
44
|
attr_accessor :auth_config
|
45
45
|
|
46
|
+
attr_accessor :member
|
47
|
+
|
46
48
|
# Attribute mapping from ruby-style variable name to JSON key.
|
47
49
|
def self.attribute_map
|
48
50
|
{
|
@@ -61,7 +63,8 @@ module Composio
|
|
61
63
|
:'app_unique_id' => :'appUniqueId',
|
62
64
|
:'app_name' => :'appName',
|
63
65
|
:'logo' => :'logo',
|
64
|
-
:'auth_config' => :'authConfig'
|
66
|
+
:'auth_config' => :'authConfig',
|
67
|
+
:'member' => :'member'
|
65
68
|
}
|
66
69
|
end
|
67
70
|
|
@@ -83,12 +86,13 @@ module Composio
|
|
83
86
|
:'data' => :'Object',
|
84
87
|
:'deleted' => :'Boolean',
|
85
88
|
:'enabled' => :'Boolean',
|
86
|
-
:'created_at' => :'
|
87
|
-
:'updated_at' => :'
|
89
|
+
:'created_at' => :'MemberInfoResDTOCreatedAt',
|
90
|
+
:'updated_at' => :'MemberInfoResDTOCreatedAt',
|
88
91
|
:'app_unique_id' => :'String',
|
89
92
|
:'app_name' => :'String',
|
90
93
|
:'logo' => :'String',
|
91
|
-
:'auth_config' => :'Object'
|
94
|
+
:'auth_config' => :'Object',
|
95
|
+
:'member' => :'Array<MemberInfoResDTO>'
|
92
96
|
}
|
93
97
|
end
|
94
98
|
|
@@ -176,6 +180,12 @@ module Composio
|
|
176
180
|
if attributes.key?(:'auth_config')
|
177
181
|
self.auth_config = attributes[:'auth_config']
|
178
182
|
end
|
183
|
+
|
184
|
+
if attributes.key?(:'member')
|
185
|
+
if (value = attributes[:'member']).is_a?(Array)
|
186
|
+
self.member = value
|
187
|
+
end
|
188
|
+
end
|
179
189
|
end
|
180
190
|
|
181
191
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -218,6 +228,10 @@ module Composio
|
|
218
228
|
invalid_properties.push('invalid value for "app_name", app_name cannot be nil.')
|
219
229
|
end
|
220
230
|
|
231
|
+
if @member.nil?
|
232
|
+
invalid_properties.push('invalid value for "member", member cannot be nil.')
|
233
|
+
end
|
234
|
+
|
221
235
|
invalid_properties
|
222
236
|
end
|
223
237
|
|
@@ -233,6 +247,7 @@ module Composio
|
|
233
247
|
return false if @updated_at.nil?
|
234
248
|
return false if @app_unique_id.nil?
|
235
249
|
return false if @app_name.nil?
|
250
|
+
return false if @member.nil?
|
236
251
|
true
|
237
252
|
end
|
238
253
|
|
@@ -256,7 +271,8 @@ module Composio
|
|
256
271
|
app_unique_id == o.app_unique_id &&
|
257
272
|
app_name == o.app_name &&
|
258
273
|
logo == o.logo &&
|
259
|
-
auth_config == o.auth_config
|
274
|
+
auth_config == o.auth_config &&
|
275
|
+
member == o.member
|
260
276
|
end
|
261
277
|
|
262
278
|
# @see the `==` method
|
@@ -268,7 +284,7 @@ module Composio
|
|
268
284
|
# Calculates hash code according to all attributes.
|
269
285
|
# @return [Integer] Hash code
|
270
286
|
def hash
|
271
|
-
[integration_id, connection_params, is_disabled, invocation_count, id, client_unique_user_id, status, data, deleted, enabled, created_at, updated_at, app_unique_id, app_name, logo, auth_config].hash
|
287
|
+
[integration_id, connection_params, is_disabled, invocation_count, id, client_unique_user_id, status, data, deleted, enabled, created_at, updated_at, app_unique_id, app_name, logo, auth_config, member].hash
|
272
288
|
end
|
273
289
|
|
274
290
|
# Builds the object from hash
|