carbon_ruby_sdk 0.2.6 → 0.2.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 +1 -1
- data/README.md +155 -28
- data/lib/carbon_ruby_sdk/api/integrations_api.rb +261 -8
- data/lib/carbon_ruby_sdk/api/utilities_api.rb +196 -0
- data/lib/carbon_ruby_sdk/models/data_source_type.rb +2 -1
- data/lib/carbon_ruby_sdk/models/data_source_type_nullable.rb +2 -1
- data/lib/carbon_ruby_sdk/models/fetch_urls_request.rb +220 -0
- data/lib/carbon_ruby_sdk/models/file_formats.rb +2 -1
- data/lib/carbon_ruby_sdk/models/file_formats_nullable.rb +2 -1
- data/lib/carbon_ruby_sdk/models/o_auth_url_request.rb +2 -2
- data/lib/carbon_ruby_sdk/models/simple_o_auth_data_sources.rb +2 -1
- data/lib/carbon_ruby_sdk/models/slack_filters.rb +232 -0
- data/lib/carbon_ruby_sdk/models/slack_sync_request.rb +321 -0
- data/lib/carbon_ruby_sdk/models/sync_files_request.rb +1 -1
- data/lib/carbon_ruby_sdk/models/sync_options.rb +1 -1
- data/lib/carbon_ruby_sdk/models/user_file.rb +15 -1
- data/lib/carbon_ruby_sdk/models/user_web_page_order_by_types.rb +37 -0
- data/lib/carbon_ruby_sdk/models/user_web_pages_filters.rb +218 -0
- data/lib/carbon_ruby_sdk/models/user_web_pages_request.rb +246 -0
- data/lib/carbon_ruby_sdk/version.rb +1 -1
- data/lib/carbon_ruby_sdk.rb +6 -3
- data/spec/api/integrations_api_spec.rb +27 -0
- data/spec/api/utilities_api_spec.rb +22 -0
- data/spec/models/fetch_urls_request_spec.rb +28 -0
- data/spec/models/slack_filters_spec.rb +34 -0
- data/spec/models/slack_sync_request_spec.rb +82 -0
- data/spec/models/user_file_spec.rb +6 -0
- data/spec/models/user_web_page_order_by_types_spec.rb +22 -0
- data/spec/models/user_web_pages_filters_spec.rb +28 -0
- data/spec/models/user_web_pages_request_spec.rb +46 -0
- metadata +20 -5
- data/lib/carbon_ruby_sdk/api/health_api.rb +0 -92
- data/spec/api/health_api_spec.rb +0 -39
@@ -0,0 +1,218 @@
|
|
1
|
+
=begin
|
2
|
+
#Carbon
|
3
|
+
|
4
|
+
#Connect external data to LLMs, no matter the source.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
=end
|
8
|
+
|
9
|
+
require 'date'
|
10
|
+
require 'time'
|
11
|
+
|
12
|
+
module Carbon
|
13
|
+
class UserWebPagesFilters
|
14
|
+
attr_accessor :ids
|
15
|
+
|
16
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
17
|
+
def self.attribute_map
|
18
|
+
{
|
19
|
+
:'ids' => :'ids'
|
20
|
+
}
|
21
|
+
end
|
22
|
+
|
23
|
+
# Returns all the JSON keys this model knows about
|
24
|
+
def self.acceptable_attributes
|
25
|
+
attribute_map.values
|
26
|
+
end
|
27
|
+
|
28
|
+
# Attribute type mapping.
|
29
|
+
def self.openapi_types
|
30
|
+
{
|
31
|
+
:'ids' => :'Array<Integer>'
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
# List of attributes with nullable: true
|
36
|
+
def self.openapi_nullable
|
37
|
+
Set.new([
|
38
|
+
:'ids'
|
39
|
+
])
|
40
|
+
end
|
41
|
+
|
42
|
+
# Initializes the object
|
43
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
44
|
+
def initialize(attributes = {})
|
45
|
+
if (!attributes.is_a?(Hash))
|
46
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Carbon::UserWebPagesFilters` initialize method"
|
47
|
+
end
|
48
|
+
|
49
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
50
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
51
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
52
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Carbon::UserWebPagesFilters`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
53
|
+
end
|
54
|
+
h[k.to_sym] = v
|
55
|
+
}
|
56
|
+
|
57
|
+
if attributes.key?(:'ids')
|
58
|
+
if (value = attributes[:'ids']).is_a?(Array)
|
59
|
+
self.ids = value
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
65
|
+
# @return Array for valid properties with the reasons
|
66
|
+
def list_invalid_properties
|
67
|
+
invalid_properties = Array.new
|
68
|
+
invalid_properties
|
69
|
+
end
|
70
|
+
|
71
|
+
# Check to see if the all the properties in the model are valid
|
72
|
+
# @return true if the model is valid
|
73
|
+
def valid?
|
74
|
+
true
|
75
|
+
end
|
76
|
+
|
77
|
+
# Checks equality by comparing each attribute.
|
78
|
+
# @param [Object] Object to be compared
|
79
|
+
def ==(o)
|
80
|
+
return true if self.equal?(o)
|
81
|
+
self.class == o.class &&
|
82
|
+
ids == o.ids
|
83
|
+
end
|
84
|
+
|
85
|
+
# @see the `==` method
|
86
|
+
# @param [Object] Object to be compared
|
87
|
+
def eql?(o)
|
88
|
+
self == o
|
89
|
+
end
|
90
|
+
|
91
|
+
# Calculates hash code according to all attributes.
|
92
|
+
# @return [Integer] Hash code
|
93
|
+
def hash
|
94
|
+
[ids].hash
|
95
|
+
end
|
96
|
+
|
97
|
+
# Builds the object from hash
|
98
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
99
|
+
# @return [Object] Returns the model itself
|
100
|
+
def self.build_from_hash(attributes)
|
101
|
+
new.build_from_hash(attributes)
|
102
|
+
end
|
103
|
+
|
104
|
+
# Builds the object from hash
|
105
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
106
|
+
# @return [Object] Returns the model itself
|
107
|
+
def build_from_hash(attributes)
|
108
|
+
return nil unless attributes.is_a?(Hash)
|
109
|
+
attributes = attributes.transform_keys(&:to_sym)
|
110
|
+
self.class.openapi_types.each_pair do |key, type|
|
111
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
112
|
+
self.send("#{key}=", nil)
|
113
|
+
elsif type =~ /\AArray<(.*)>/i
|
114
|
+
# check to ensure the input is an array given that the attribute
|
115
|
+
# is documented as an array but the input is not
|
116
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
117
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
118
|
+
end
|
119
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
120
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
124
|
+
self
|
125
|
+
end
|
126
|
+
|
127
|
+
# Deserializes the data based on type
|
128
|
+
# @param string type Data type
|
129
|
+
# @param string value Value to be deserialized
|
130
|
+
# @return [Object] Deserialized data
|
131
|
+
def _deserialize(type, value)
|
132
|
+
case type.to_sym
|
133
|
+
when :Time
|
134
|
+
Time.parse(value)
|
135
|
+
when :Date
|
136
|
+
Date.parse(value)
|
137
|
+
when :String
|
138
|
+
value.to_s
|
139
|
+
when :Integer
|
140
|
+
value.to_i
|
141
|
+
when :Float
|
142
|
+
value.to_f
|
143
|
+
when :Boolean
|
144
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
145
|
+
true
|
146
|
+
else
|
147
|
+
false
|
148
|
+
end
|
149
|
+
when :Object
|
150
|
+
# generic object (usually a Hash), return directly
|
151
|
+
value
|
152
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
153
|
+
inner_type = Regexp.last_match[:inner_type]
|
154
|
+
value.map { |v| _deserialize(inner_type, v) }
|
155
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
156
|
+
k_type = Regexp.last_match[:k_type]
|
157
|
+
v_type = Regexp.last_match[:v_type]
|
158
|
+
{}.tap do |hash|
|
159
|
+
value.each do |k, v|
|
160
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
161
|
+
end
|
162
|
+
end
|
163
|
+
else # model
|
164
|
+
# models (e.g. Pet) or oneOf
|
165
|
+
klass = Carbon.const_get(type)
|
166
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
170
|
+
# Returns the string representation of the object
|
171
|
+
# @return [String] String presentation of the object
|
172
|
+
def to_s
|
173
|
+
to_hash.to_s
|
174
|
+
end
|
175
|
+
|
176
|
+
# to_body is an alias to to_hash (backward compatibility)
|
177
|
+
# @return [Hash] Returns the object in the form of hash
|
178
|
+
def to_body
|
179
|
+
to_hash
|
180
|
+
end
|
181
|
+
|
182
|
+
# Returns the object in the form of hash
|
183
|
+
# @return [Hash] Returns the object in the form of hash
|
184
|
+
def to_hash
|
185
|
+
hash = {}
|
186
|
+
self.class.attribute_map.each_pair do |attr, param|
|
187
|
+
value = self.send(attr)
|
188
|
+
if value.nil?
|
189
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
190
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
191
|
+
end
|
192
|
+
|
193
|
+
hash[param] = _to_hash(value)
|
194
|
+
end
|
195
|
+
hash
|
196
|
+
end
|
197
|
+
|
198
|
+
# Outputs non-array value in the form of hash
|
199
|
+
# For object, use to_hash. Otherwise, just return the value
|
200
|
+
# @param [Object] value Any valid value
|
201
|
+
# @return [Hash] Returns the value in the form of hash
|
202
|
+
def _to_hash(value)
|
203
|
+
if value.is_a?(Array)
|
204
|
+
value.compact.map { |v| _to_hash(v) }
|
205
|
+
elsif value.is_a?(Hash)
|
206
|
+
{}.tap do |hash|
|
207
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
208
|
+
end
|
209
|
+
elsif value.respond_to? :to_hash
|
210
|
+
value.to_hash
|
211
|
+
else
|
212
|
+
value
|
213
|
+
end
|
214
|
+
end
|
215
|
+
|
216
|
+
end
|
217
|
+
|
218
|
+
end
|
@@ -0,0 +1,246 @@
|
|
1
|
+
=begin
|
2
|
+
#Carbon
|
3
|
+
|
4
|
+
#Connect external data to LLMs, no matter the source.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
=end
|
8
|
+
|
9
|
+
require 'date'
|
10
|
+
require 'time'
|
11
|
+
|
12
|
+
module Carbon
|
13
|
+
class UserWebPagesRequest
|
14
|
+
attr_accessor :filters
|
15
|
+
|
16
|
+
attr_accessor :pagination
|
17
|
+
|
18
|
+
attr_accessor :order_by
|
19
|
+
|
20
|
+
attr_accessor :order_dir
|
21
|
+
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
23
|
+
def self.attribute_map
|
24
|
+
{
|
25
|
+
:'filters' => :'filters',
|
26
|
+
:'pagination' => :'pagination',
|
27
|
+
:'order_by' => :'order_by',
|
28
|
+
:'order_dir' => :'order_dir'
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
# Returns all the JSON keys this model knows about
|
33
|
+
def self.acceptable_attributes
|
34
|
+
attribute_map.values
|
35
|
+
end
|
36
|
+
|
37
|
+
# Attribute type mapping.
|
38
|
+
def self.openapi_types
|
39
|
+
{
|
40
|
+
:'filters' => :'UserWebPagesFilters',
|
41
|
+
:'pagination' => :'Pagination',
|
42
|
+
:'order_by' => :'UserWebPageOrderByTypes',
|
43
|
+
:'order_dir' => :'OrderDirV2'
|
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 `Carbon::UserWebPagesRequest` 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 `Carbon::UserWebPagesRequest`. 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?(:'filters')
|
69
|
+
self.filters = attributes[:'filters']
|
70
|
+
end
|
71
|
+
|
72
|
+
if attributes.key?(:'pagination')
|
73
|
+
self.pagination = attributes[:'pagination']
|
74
|
+
end
|
75
|
+
|
76
|
+
if attributes.key?(:'order_by')
|
77
|
+
self.order_by = attributes[:'order_by']
|
78
|
+
else
|
79
|
+
self.order_by = 'updated_at'
|
80
|
+
end
|
81
|
+
|
82
|
+
if attributes.key?(:'order_dir')
|
83
|
+
self.order_dir = attributes[:'order_dir']
|
84
|
+
else
|
85
|
+
self.order_dir = 'desc'
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
90
|
+
# @return Array for valid properties with the reasons
|
91
|
+
def list_invalid_properties
|
92
|
+
invalid_properties = Array.new
|
93
|
+
invalid_properties
|
94
|
+
end
|
95
|
+
|
96
|
+
# Check to see if the all the properties in the model are valid
|
97
|
+
# @return true if the model is valid
|
98
|
+
def valid?
|
99
|
+
true
|
100
|
+
end
|
101
|
+
|
102
|
+
# Checks equality by comparing each attribute.
|
103
|
+
# @param [Object] Object to be compared
|
104
|
+
def ==(o)
|
105
|
+
return true if self.equal?(o)
|
106
|
+
self.class == o.class &&
|
107
|
+
filters == o.filters &&
|
108
|
+
pagination == o.pagination &&
|
109
|
+
order_by == o.order_by &&
|
110
|
+
order_dir == o.order_dir
|
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
|
+
[filters, pagination, order_by, order_dir].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
|
+
new.build_from_hash(attributes)
|
130
|
+
end
|
131
|
+
|
132
|
+
# Builds the object from hash
|
133
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
134
|
+
# @return [Object] Returns the model itself
|
135
|
+
def build_from_hash(attributes)
|
136
|
+
return nil unless attributes.is_a?(Hash)
|
137
|
+
attributes = attributes.transform_keys(&:to_sym)
|
138
|
+
self.class.openapi_types.each_pair do |key, type|
|
139
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
140
|
+
self.send("#{key}=", nil)
|
141
|
+
elsif type =~ /\AArray<(.*)>/i
|
142
|
+
# check to ensure the input is an array given that the attribute
|
143
|
+
# is documented as an array but the input is not
|
144
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
145
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
146
|
+
end
|
147
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
148
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
self
|
153
|
+
end
|
154
|
+
|
155
|
+
# Deserializes the data based on type
|
156
|
+
# @param string type Data type
|
157
|
+
# @param string value Value to be deserialized
|
158
|
+
# @return [Object] Deserialized data
|
159
|
+
def _deserialize(type, value)
|
160
|
+
case type.to_sym
|
161
|
+
when :Time
|
162
|
+
Time.parse(value)
|
163
|
+
when :Date
|
164
|
+
Date.parse(value)
|
165
|
+
when :String
|
166
|
+
value.to_s
|
167
|
+
when :Integer
|
168
|
+
value.to_i
|
169
|
+
when :Float
|
170
|
+
value.to_f
|
171
|
+
when :Boolean
|
172
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
173
|
+
true
|
174
|
+
else
|
175
|
+
false
|
176
|
+
end
|
177
|
+
when :Object
|
178
|
+
# generic object (usually a Hash), return directly
|
179
|
+
value
|
180
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
181
|
+
inner_type = Regexp.last_match[:inner_type]
|
182
|
+
value.map { |v| _deserialize(inner_type, v) }
|
183
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
184
|
+
k_type = Regexp.last_match[:k_type]
|
185
|
+
v_type = Regexp.last_match[:v_type]
|
186
|
+
{}.tap do |hash|
|
187
|
+
value.each do |k, v|
|
188
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
189
|
+
end
|
190
|
+
end
|
191
|
+
else # model
|
192
|
+
# models (e.g. Pet) or oneOf
|
193
|
+
klass = Carbon.const_get(type)
|
194
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
195
|
+
end
|
196
|
+
end
|
197
|
+
|
198
|
+
# Returns the string representation of the object
|
199
|
+
# @return [String] String presentation of the object
|
200
|
+
def to_s
|
201
|
+
to_hash.to_s
|
202
|
+
end
|
203
|
+
|
204
|
+
# to_body is an alias to to_hash (backward compatibility)
|
205
|
+
# @return [Hash] Returns the object in the form of hash
|
206
|
+
def to_body
|
207
|
+
to_hash
|
208
|
+
end
|
209
|
+
|
210
|
+
# Returns the object in the form of hash
|
211
|
+
# @return [Hash] Returns the object in the form of hash
|
212
|
+
def to_hash
|
213
|
+
hash = {}
|
214
|
+
self.class.attribute_map.each_pair do |attr, param|
|
215
|
+
value = self.send(attr)
|
216
|
+
if value.nil?
|
217
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
218
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
219
|
+
end
|
220
|
+
|
221
|
+
hash[param] = _to_hash(value)
|
222
|
+
end
|
223
|
+
hash
|
224
|
+
end
|
225
|
+
|
226
|
+
# Outputs non-array value in the form of hash
|
227
|
+
# For object, use to_hash. Otherwise, just return the value
|
228
|
+
# @param [Object] value Any valid value
|
229
|
+
# @return [Hash] Returns the value in the form of hash
|
230
|
+
def _to_hash(value)
|
231
|
+
if value.is_a?(Array)
|
232
|
+
value.compact.map { |v| _to_hash(v) }
|
233
|
+
elsif value.is_a?(Hash)
|
234
|
+
{}.tap do |hash|
|
235
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
236
|
+
end
|
237
|
+
elsif value.respond_to? :to_hash
|
238
|
+
value.to_hash
|
239
|
+
else
|
240
|
+
value
|
241
|
+
end
|
242
|
+
end
|
243
|
+
|
244
|
+
end
|
245
|
+
|
246
|
+
end
|
data/lib/carbon_ruby_sdk.rb
CHANGED
@@ -49,6 +49,7 @@ require 'carbon_ruby_sdk/models/embeddings_and_chunks_response'
|
|
49
49
|
require 'carbon_ruby_sdk/models/external_file_sync_statuses'
|
50
50
|
require 'carbon_ruby_sdk/models/external_source_item'
|
51
51
|
require 'carbon_ruby_sdk/models/external_source_items_order_by'
|
52
|
+
require 'carbon_ruby_sdk/models/fetch_urls_request'
|
52
53
|
require 'carbon_ruby_sdk/models/fetch_urls_response'
|
53
54
|
require 'carbon_ruby_sdk/models/file_content_types'
|
54
55
|
require 'carbon_ruby_sdk/models/file_content_types_nullable'
|
@@ -117,6 +118,8 @@ require 'carbon_ruby_sdk/models/sharepoint_authentication'
|
|
117
118
|
require 'carbon_ruby_sdk/models/simple_o_auth_data_sources'
|
118
119
|
require 'carbon_ruby_sdk/models/single_chunks_and_embeddings_upload_input'
|
119
120
|
require 'carbon_ruby_sdk/models/sitemap_scrape_request'
|
121
|
+
require 'carbon_ruby_sdk/models/slack_filters'
|
122
|
+
require 'carbon_ruby_sdk/models/slack_sync_request'
|
120
123
|
require 'carbon_ruby_sdk/models/source_property'
|
121
124
|
require 'carbon_ruby_sdk/models/sync_directory_request'
|
122
125
|
require 'carbon_ruby_sdk/models/sync_files_ids'
|
@@ -135,6 +138,9 @@ require 'carbon_ruby_sdk/models/user_file'
|
|
135
138
|
require 'carbon_ruby_sdk/models/user_files_v2'
|
136
139
|
require 'carbon_ruby_sdk/models/user_request_content'
|
137
140
|
require 'carbon_ruby_sdk/models/user_response'
|
141
|
+
require 'carbon_ruby_sdk/models/user_web_page_order_by_types'
|
142
|
+
require 'carbon_ruby_sdk/models/user_web_pages_filters'
|
143
|
+
require 'carbon_ruby_sdk/models/user_web_pages_request'
|
138
144
|
require 'carbon_ruby_sdk/models/validation_error'
|
139
145
|
require 'carbon_ruby_sdk/models/webhook'
|
140
146
|
require 'carbon_ruby_sdk/models/webhook_filters'
|
@@ -154,7 +160,6 @@ require 'carbon_ruby_sdk/api/auth_api'
|
|
154
160
|
require 'carbon_ruby_sdk/api/data_sources_api'
|
155
161
|
require 'carbon_ruby_sdk/api/embeddings_api'
|
156
162
|
require 'carbon_ruby_sdk/api/files_api'
|
157
|
-
require 'carbon_ruby_sdk/api/health_api'
|
158
163
|
require 'carbon_ruby_sdk/api/integrations_api'
|
159
164
|
require 'carbon_ruby_sdk/api/organizations_api'
|
160
165
|
require 'carbon_ruby_sdk/api/users_api'
|
@@ -221,7 +226,6 @@ module Carbon
|
|
221
226
|
attr_reader :data_sources
|
222
227
|
attr_reader :embeddings
|
223
228
|
attr_reader :files
|
224
|
-
attr_reader :health
|
225
229
|
attr_reader :integrations
|
226
230
|
attr_reader :organizations
|
227
231
|
attr_reader :users
|
@@ -234,7 +238,6 @@ module Carbon
|
|
234
238
|
@data_sources = Carbon::DataSourcesApi.new(@api_client)
|
235
239
|
@embeddings = Carbon::EmbeddingsApi.new(@api_client)
|
236
240
|
@files = Carbon::FilesApi.new(@api_client)
|
237
|
-
@health = Carbon::HealthApi.new(@api_client)
|
238
241
|
@integrations = Carbon::IntegrationsApi.new(@api_client)
|
239
242
|
@organizations = Carbon::OrganizationsApi.new(@api_client)
|
240
243
|
@users = Carbon::UsersApi.new(@api_client)
|
@@ -108,6 +108,21 @@ describe 'IntegrationsApi' do
|
|
108
108
|
end
|
109
109
|
end
|
110
110
|
|
111
|
+
# unit tests for list_conversations
|
112
|
+
# Slack List Conversations
|
113
|
+
# List all of your public and private channels, DMs, and Group DMs. The ID from response can be used as a filter to sync messages to Carbon types: Comma separated list of types. Available types are im (DMs), mpim (group DMs), public_channel, and private_channel. Defaults to public_channel. cursor: Used for pagination. If next_cursor is returned in response, you need to pass it as the cursor in the next request data_source_id: Data source needs to be specified if you have linked multiple slack accounts exclude_archived: Should archived conversations be excluded, defaults to true
|
114
|
+
# @param [Hash] opts the optional parameters
|
115
|
+
# @option opts [String] :types
|
116
|
+
# @option opts [String] :cursor
|
117
|
+
# @option opts [Integer] :data_source_id
|
118
|
+
# @option opts [Boolean] :exclude_archived
|
119
|
+
# @return [Object]
|
120
|
+
describe 'list_conversations test' do
|
121
|
+
it 'should work' do
|
122
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
111
126
|
# unit tests for list_data_source_items
|
112
127
|
# List Data Source Items
|
113
128
|
# @param list_data_source_items_request
|
@@ -299,4 +314,16 @@ describe 'IntegrationsApi' do
|
|
299
314
|
end
|
300
315
|
end
|
301
316
|
|
317
|
+
# unit tests for sync_slack
|
318
|
+
# Slack Sync
|
319
|
+
# You can list all conversations using the endpoint /integrations/slack/conversations. The ID of conversation will be used as an input for this endpoint with timestamps as optional filters.
|
320
|
+
# @param slack_sync_request
|
321
|
+
# @param [Hash] opts the optional parameters
|
322
|
+
# @return [Object]
|
323
|
+
describe 'sync_slack test' do
|
324
|
+
it 'should work' do
|
325
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
326
|
+
end
|
327
|
+
end
|
328
|
+
|
302
329
|
end
|
@@ -38,6 +38,17 @@ describe 'UtilitiesApi' do
|
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
|
+
# unit tests for fetch_webpage
|
42
|
+
# Fetch Urls V2
|
43
|
+
# @param fetch_urls_request
|
44
|
+
# @param [Hash] opts the optional parameters
|
45
|
+
# @return [Object]
|
46
|
+
describe 'fetch_webpage test' do
|
47
|
+
it 'should work' do
|
48
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
41
52
|
# unit tests for fetch_youtube_transcripts
|
42
53
|
# Fetch Youtube Transcripts
|
43
54
|
# Fetches english transcripts from YouTube videos. Args: id (str): The ID of the YouTube video. raw (bool): Whether to return the raw transcript or not. Defaults to False. Returns: dict: A dictionary with the transcript of the YouTube video.
|
@@ -99,4 +110,15 @@ describe 'UtilitiesApi' do
|
|
99
110
|
end
|
100
111
|
end
|
101
112
|
|
113
|
+
# unit tests for user_webpages
|
114
|
+
# User Web Pages
|
115
|
+
# @param user_web_pages_request
|
116
|
+
# @param [Hash] opts the optional parameters
|
117
|
+
# @return [Object]
|
118
|
+
describe 'user_webpages test' do
|
119
|
+
it 'should work' do
|
120
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
102
124
|
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
=begin
|
2
|
+
#Carbon
|
3
|
+
|
4
|
+
#Connect external data to LLMs, no matter the source.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
=end
|
8
|
+
|
9
|
+
require 'spec_helper'
|
10
|
+
require 'json'
|
11
|
+
require 'date'
|
12
|
+
|
13
|
+
# Unit tests for Carbon::FetchURLsRequest
|
14
|
+
describe Carbon::FetchURLsRequest do
|
15
|
+
let(:instance) { Carbon::FetchURLsRequest.new }
|
16
|
+
|
17
|
+
describe 'test an instance of FetchURLsRequest' do
|
18
|
+
it 'should create an instance of FetchURLsRequest' do
|
19
|
+
expect(instance).to be_instance_of(Carbon::FetchURLsRequest)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
describe 'test attribute "url"' do
|
23
|
+
it 'should work' do
|
24
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
=begin
|
2
|
+
#Carbon
|
3
|
+
|
4
|
+
#Connect external data to LLMs, no matter the source.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
=end
|
8
|
+
|
9
|
+
require 'spec_helper'
|
10
|
+
require 'json'
|
11
|
+
require 'date'
|
12
|
+
|
13
|
+
# Unit tests for Carbon::SlackFilters
|
14
|
+
describe Carbon::SlackFilters do
|
15
|
+
let(:instance) { Carbon::SlackFilters.new }
|
16
|
+
|
17
|
+
describe 'test an instance of SlackFilters' do
|
18
|
+
it 'should create an instance of SlackFilters' do
|
19
|
+
expect(instance).to be_instance_of(Carbon::SlackFilters)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
describe 'test attribute "conversation_id"' do
|
23
|
+
it 'should work' do
|
24
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
describe 'test attribute "after"' do
|
29
|
+
it 'should work' do
|
30
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|