carbon_ruby_sdk 0.2.33 → 0.2.35
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +159 -2
- data/lib/carbon_ruby_sdk/api/files_api.rb +6 -2
- data/lib/carbon_ruby_sdk/api/integrations_api.rb +310 -4
- data/lib/carbon_ruby_sdk/models/authentication_property.rb +32 -6
- data/lib/carbon_ruby_sdk/models/azure_blob_auth_request.rb +245 -0
- data/lib/carbon_ruby_sdk/models/azure_blob_file_sync_input.rb +379 -0
- data/lib/carbon_ruby_sdk/models/azure_blob_get_file_input.rb +226 -0
- data/lib/carbon_ruby_sdk/models/azure_blob_storage_authentication.rb +244 -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/external_file_sync_statuses.rb +2 -1
- data/lib/carbon_ruby_sdk/models/file_sync_config.rb +16 -4
- data/lib/carbon_ruby_sdk/models/file_sync_config_nullable.rb +16 -4
- data/lib/carbon_ruby_sdk/models/gitbook_connect_request.rb +14 -4
- data/lib/carbon_ruby_sdk/models/gitbook_sync_request.rb +15 -5
- data/lib/carbon_ruby_sdk/models/one_drive_authentication.rb +250 -0
- data/lib/carbon_ruby_sdk/models/resync_file_query_input.rb +16 -4
- data/lib/carbon_ruby_sdk/models/sharepoint_authentication.rb +1 -5
- data/lib/carbon_ruby_sdk/version.rb +1 -1
- data/lib/carbon_ruby_sdk.rb +5 -0
- data/spec/api/integrations_api_spec.rb +24 -0
- data/spec/models/authentication_property_spec.rb +12 -0
- data/spec/models/azure_blob_auth_request_spec.rb +40 -0
- data/spec/models/azure_blob_file_sync_input_spec.rb +112 -0
- data/spec/models/azure_blob_get_file_input_spec.rb +34 -0
- data/spec/models/azure_blob_storage_authentication_spec.rb +40 -0
- data/spec/models/file_sync_config_nullable_spec.rb +6 -0
- data/spec/models/file_sync_config_spec.rb +6 -0
- data/spec/models/gitbook_connect_request_spec.rb +6 -0
- data/spec/models/gitbook_sync_request_spec.rb +6 -0
- data/spec/models/one_drive_authentication_spec.rb +46 -0
- data/spec/models/resync_file_query_input_spec.rb +6 -0
- metadata +169 -154
@@ -0,0 +1,226 @@
|
|
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 AzureBlobGetFileInput
|
14
|
+
attr_accessor :id
|
15
|
+
|
16
|
+
attr_accessor :container
|
17
|
+
|
18
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
19
|
+
def self.attribute_map
|
20
|
+
{
|
21
|
+
:'id' => :'id',
|
22
|
+
:'container' => :'container'
|
23
|
+
}
|
24
|
+
end
|
25
|
+
|
26
|
+
# Returns all the JSON keys this model knows about
|
27
|
+
def self.acceptable_attributes
|
28
|
+
attribute_map.values
|
29
|
+
end
|
30
|
+
|
31
|
+
# Attribute type mapping.
|
32
|
+
def self.openapi_types
|
33
|
+
{
|
34
|
+
:'id' => :'String',
|
35
|
+
:'container' => :'String'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# List of attributes with nullable: true
|
40
|
+
def self.openapi_nullable
|
41
|
+
Set.new([
|
42
|
+
:'id',
|
43
|
+
:'container'
|
44
|
+
])
|
45
|
+
end
|
46
|
+
|
47
|
+
# Initializes the object
|
48
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
49
|
+
def initialize(attributes = {})
|
50
|
+
if (!attributes.is_a?(Hash))
|
51
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Carbon::AzureBlobGetFileInput` initialize method"
|
52
|
+
end
|
53
|
+
|
54
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
55
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
56
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
57
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Carbon::AzureBlobGetFileInput`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
58
|
+
end
|
59
|
+
h[k.to_sym] = v
|
60
|
+
}
|
61
|
+
|
62
|
+
if attributes.key?(:'id')
|
63
|
+
self.id = attributes[:'id']
|
64
|
+
end
|
65
|
+
|
66
|
+
if attributes.key?(:'container')
|
67
|
+
self.container = attributes[:'container']
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
72
|
+
# @return Array for valid properties with the reasons
|
73
|
+
def list_invalid_properties
|
74
|
+
invalid_properties = Array.new
|
75
|
+
invalid_properties
|
76
|
+
end
|
77
|
+
|
78
|
+
# Check to see if the all the properties in the model are valid
|
79
|
+
# @return true if the model is valid
|
80
|
+
def valid?
|
81
|
+
true
|
82
|
+
end
|
83
|
+
|
84
|
+
# Checks equality by comparing each attribute.
|
85
|
+
# @param [Object] Object to be compared
|
86
|
+
def ==(o)
|
87
|
+
return true if self.equal?(o)
|
88
|
+
self.class == o.class &&
|
89
|
+
id == o.id &&
|
90
|
+
container == o.container
|
91
|
+
end
|
92
|
+
|
93
|
+
# @see the `==` method
|
94
|
+
# @param [Object] Object to be compared
|
95
|
+
def eql?(o)
|
96
|
+
self == o
|
97
|
+
end
|
98
|
+
|
99
|
+
# Calculates hash code according to all attributes.
|
100
|
+
# @return [Integer] Hash code
|
101
|
+
def hash
|
102
|
+
[id, container].hash
|
103
|
+
end
|
104
|
+
|
105
|
+
# Builds the object from hash
|
106
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
107
|
+
# @return [Object] Returns the model itself
|
108
|
+
def self.build_from_hash(attributes)
|
109
|
+
new.build_from_hash(attributes)
|
110
|
+
end
|
111
|
+
|
112
|
+
# Builds the object from hash
|
113
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
114
|
+
# @return [Object] Returns the model itself
|
115
|
+
def build_from_hash(attributes)
|
116
|
+
return nil unless attributes.is_a?(Hash)
|
117
|
+
attributes = attributes.transform_keys(&:to_sym)
|
118
|
+
self.class.openapi_types.each_pair do |key, type|
|
119
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
120
|
+
self.send("#{key}=", nil)
|
121
|
+
elsif type =~ /\AArray<(.*)>/i
|
122
|
+
# check to ensure the input is an array given that the attribute
|
123
|
+
# is documented as an array but the input is not
|
124
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
125
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
126
|
+
end
|
127
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
128
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
self
|
133
|
+
end
|
134
|
+
|
135
|
+
# Deserializes the data based on type
|
136
|
+
# @param string type Data type
|
137
|
+
# @param string value Value to be deserialized
|
138
|
+
# @return [Object] Deserialized data
|
139
|
+
def _deserialize(type, value)
|
140
|
+
case type.to_sym
|
141
|
+
when :Time
|
142
|
+
Time.parse(value)
|
143
|
+
when :Date
|
144
|
+
Date.parse(value)
|
145
|
+
when :String
|
146
|
+
value.to_s
|
147
|
+
when :Integer
|
148
|
+
value.to_i
|
149
|
+
when :Float
|
150
|
+
value.to_f
|
151
|
+
when :Boolean
|
152
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
153
|
+
true
|
154
|
+
else
|
155
|
+
false
|
156
|
+
end
|
157
|
+
when :Object
|
158
|
+
# generic object (usually a Hash), return directly
|
159
|
+
value
|
160
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
161
|
+
inner_type = Regexp.last_match[:inner_type]
|
162
|
+
value.map { |v| _deserialize(inner_type, v) }
|
163
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
164
|
+
k_type = Regexp.last_match[:k_type]
|
165
|
+
v_type = Regexp.last_match[:v_type]
|
166
|
+
{}.tap do |hash|
|
167
|
+
value.each do |k, v|
|
168
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
169
|
+
end
|
170
|
+
end
|
171
|
+
else # model
|
172
|
+
# models (e.g. Pet) or oneOf
|
173
|
+
klass = Carbon.const_get(type)
|
174
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
175
|
+
end
|
176
|
+
end
|
177
|
+
|
178
|
+
# Returns the string representation of the object
|
179
|
+
# @return [String] String presentation of the object
|
180
|
+
def to_s
|
181
|
+
to_hash.to_s
|
182
|
+
end
|
183
|
+
|
184
|
+
# to_body is an alias to to_hash (backward compatibility)
|
185
|
+
# @return [Hash] Returns the object in the form of hash
|
186
|
+
def to_body
|
187
|
+
to_hash
|
188
|
+
end
|
189
|
+
|
190
|
+
# Returns the object in the form of hash
|
191
|
+
# @return [Hash] Returns the object in the form of hash
|
192
|
+
def to_hash
|
193
|
+
hash = {}
|
194
|
+
self.class.attribute_map.each_pair do |attr, param|
|
195
|
+
value = self.send(attr)
|
196
|
+
if value.nil?
|
197
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
198
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
199
|
+
end
|
200
|
+
|
201
|
+
hash[param] = _to_hash(value)
|
202
|
+
end
|
203
|
+
hash
|
204
|
+
end
|
205
|
+
|
206
|
+
# Outputs non-array value in the form of hash
|
207
|
+
# For object, use to_hash. Otherwise, just return the value
|
208
|
+
# @param [Object] value Any valid value
|
209
|
+
# @return [Hash] Returns the value in the form of hash
|
210
|
+
def _to_hash(value)
|
211
|
+
if value.is_a?(Array)
|
212
|
+
value.compact.map { |v| _to_hash(v) }
|
213
|
+
elsif value.is_a?(Hash)
|
214
|
+
{}.tap do |hash|
|
215
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
216
|
+
end
|
217
|
+
elsif value.respond_to? :to_hash
|
218
|
+
value.to_hash
|
219
|
+
else
|
220
|
+
value
|
221
|
+
end
|
222
|
+
end
|
223
|
+
|
224
|
+
end
|
225
|
+
|
226
|
+
end
|
@@ -0,0 +1,244 @@
|
|
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 AzureBlobStorageAuthentication
|
14
|
+
attr_accessor :source
|
15
|
+
|
16
|
+
attr_accessor :account_name
|
17
|
+
|
18
|
+
attr_accessor :account_key
|
19
|
+
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
21
|
+
def self.attribute_map
|
22
|
+
{
|
23
|
+
:'source' => :'source',
|
24
|
+
:'account_name' => :'account_name',
|
25
|
+
:'account_key' => :'account_key'
|
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
|
+
:'source' => :'Object',
|
38
|
+
:'account_name' => :'String',
|
39
|
+
:'account_key' => :'String'
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
# List of attributes with nullable: true
|
44
|
+
def self.openapi_nullable
|
45
|
+
Set.new([
|
46
|
+
:'source',
|
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 `Carbon::AzureBlobStorageAuthentication` initialize method"
|
55
|
+
end
|
56
|
+
|
57
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
58
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
59
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
60
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Carbon::AzureBlobStorageAuthentication`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
61
|
+
end
|
62
|
+
h[k.to_sym] = v
|
63
|
+
}
|
64
|
+
|
65
|
+
if attributes.key?(:'source')
|
66
|
+
self.source = attributes[:'source']
|
67
|
+
end
|
68
|
+
|
69
|
+
if attributes.key?(:'account_name')
|
70
|
+
self.account_name = attributes[:'account_name']
|
71
|
+
end
|
72
|
+
|
73
|
+
if attributes.key?(:'account_key')
|
74
|
+
self.account_key = attributes[:'account_key']
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
79
|
+
# @return Array for valid properties with the reasons
|
80
|
+
def list_invalid_properties
|
81
|
+
invalid_properties = Array.new
|
82
|
+
if @account_name.nil?
|
83
|
+
invalid_properties.push('invalid value for "account_name", account_name cannot be nil.')
|
84
|
+
end
|
85
|
+
|
86
|
+
if @account_key.nil?
|
87
|
+
invalid_properties.push('invalid value for "account_key", account_key cannot be nil.')
|
88
|
+
end
|
89
|
+
|
90
|
+
invalid_properties
|
91
|
+
end
|
92
|
+
|
93
|
+
# Check to see if the all the properties in the model are valid
|
94
|
+
# @return true if the model is valid
|
95
|
+
def valid?
|
96
|
+
return false if @account_name.nil?
|
97
|
+
return false if @account_key.nil?
|
98
|
+
true
|
99
|
+
end
|
100
|
+
|
101
|
+
# Checks equality by comparing each attribute.
|
102
|
+
# @param [Object] Object to be compared
|
103
|
+
def ==(o)
|
104
|
+
return true if self.equal?(o)
|
105
|
+
self.class == o.class &&
|
106
|
+
source == o.source &&
|
107
|
+
account_name == o.account_name &&
|
108
|
+
account_key == o.account_key
|
109
|
+
end
|
110
|
+
|
111
|
+
# @see the `==` method
|
112
|
+
# @param [Object] Object to be compared
|
113
|
+
def eql?(o)
|
114
|
+
self == o
|
115
|
+
end
|
116
|
+
|
117
|
+
# Calculates hash code according to all attributes.
|
118
|
+
# @return [Integer] Hash code
|
119
|
+
def hash
|
120
|
+
[source, account_name, account_key].hash
|
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 self.build_from_hash(attributes)
|
127
|
+
new.build_from_hash(attributes)
|
128
|
+
end
|
129
|
+
|
130
|
+
# Builds the object from hash
|
131
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
132
|
+
# @return [Object] Returns the model itself
|
133
|
+
def build_from_hash(attributes)
|
134
|
+
return nil unless attributes.is_a?(Hash)
|
135
|
+
attributes = attributes.transform_keys(&:to_sym)
|
136
|
+
self.class.openapi_types.each_pair do |key, type|
|
137
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
138
|
+
self.send("#{key}=", nil)
|
139
|
+
elsif type =~ /\AArray<(.*)>/i
|
140
|
+
# check to ensure the input is an array given that the attribute
|
141
|
+
# is documented as an array but the input is not
|
142
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
143
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
144
|
+
end
|
145
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
146
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|
150
|
+
self
|
151
|
+
end
|
152
|
+
|
153
|
+
# Deserializes the data based on type
|
154
|
+
# @param string type Data type
|
155
|
+
# @param string value Value to be deserialized
|
156
|
+
# @return [Object] Deserialized data
|
157
|
+
def _deserialize(type, value)
|
158
|
+
case type.to_sym
|
159
|
+
when :Time
|
160
|
+
Time.parse(value)
|
161
|
+
when :Date
|
162
|
+
Date.parse(value)
|
163
|
+
when :String
|
164
|
+
value.to_s
|
165
|
+
when :Integer
|
166
|
+
value.to_i
|
167
|
+
when :Float
|
168
|
+
value.to_f
|
169
|
+
when :Boolean
|
170
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
171
|
+
true
|
172
|
+
else
|
173
|
+
false
|
174
|
+
end
|
175
|
+
when :Object
|
176
|
+
# generic object (usually a Hash), return directly
|
177
|
+
value
|
178
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
179
|
+
inner_type = Regexp.last_match[:inner_type]
|
180
|
+
value.map { |v| _deserialize(inner_type, v) }
|
181
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
182
|
+
k_type = Regexp.last_match[:k_type]
|
183
|
+
v_type = Regexp.last_match[:v_type]
|
184
|
+
{}.tap do |hash|
|
185
|
+
value.each do |k, v|
|
186
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
187
|
+
end
|
188
|
+
end
|
189
|
+
else # model
|
190
|
+
# models (e.g. Pet) or oneOf
|
191
|
+
klass = Carbon.const_get(type)
|
192
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
193
|
+
end
|
194
|
+
end
|
195
|
+
|
196
|
+
# Returns the string representation of the object
|
197
|
+
# @return [String] String presentation of the object
|
198
|
+
def to_s
|
199
|
+
to_hash.to_s
|
200
|
+
end
|
201
|
+
|
202
|
+
# to_body is an alias to to_hash (backward compatibility)
|
203
|
+
# @return [Hash] Returns the object in the form of hash
|
204
|
+
def to_body
|
205
|
+
to_hash
|
206
|
+
end
|
207
|
+
|
208
|
+
# Returns the object in the form of hash
|
209
|
+
# @return [Hash] Returns the object in the form of hash
|
210
|
+
def to_hash
|
211
|
+
hash = {}
|
212
|
+
self.class.attribute_map.each_pair do |attr, param|
|
213
|
+
value = self.send(attr)
|
214
|
+
if value.nil?
|
215
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
216
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
217
|
+
end
|
218
|
+
|
219
|
+
hash[param] = _to_hash(value)
|
220
|
+
end
|
221
|
+
hash
|
222
|
+
end
|
223
|
+
|
224
|
+
# Outputs non-array value in the form of hash
|
225
|
+
# For object, use to_hash. Otherwise, just return the value
|
226
|
+
# @param [Object] value Any valid value
|
227
|
+
# @return [Hash] Returns the value in the form of hash
|
228
|
+
def _to_hash(value)
|
229
|
+
if value.is_a?(Array)
|
230
|
+
value.compact.map { |v| _to_hash(v) }
|
231
|
+
elsif value.is_a?(Hash)
|
232
|
+
{}.tap do |hash|
|
233
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
234
|
+
end
|
235
|
+
elsif value.respond_to? :to_hash
|
236
|
+
value.to_hash
|
237
|
+
else
|
238
|
+
value
|
239
|
+
end
|
240
|
+
end
|
241
|
+
|
242
|
+
end
|
243
|
+
|
244
|
+
end
|
@@ -24,6 +24,7 @@ module Carbon
|
|
24
24
|
ZENDESK = "ZENDESK".freeze
|
25
25
|
ZOTERO = "ZOTERO".freeze
|
26
26
|
S3 = "S3".freeze
|
27
|
+
AZURE_BLOB_STORAGE = "AZURE_BLOB_STORAGE".freeze
|
27
28
|
GMAIL = "GMAIL".freeze
|
28
29
|
OUTLOOK = "OUTLOOK".freeze
|
29
30
|
SERVICENOW = "SERVICENOW".freeze
|
@@ -73,7 +74,7 @@ module Carbon
|
|
73
74
|
MSG = "MSG".freeze
|
74
75
|
|
75
76
|
def self.all_vars
|
76
|
-
@all_vars ||= [GOOGLE_CLOUD_STORAGE, GOOGLE_DRIVE, NOTION, NOTION_DATABASE, INTERCOM, DROPBOX, ONEDRIVE, SHAREPOINT, CONFLUENCE, BOX, ZENDESK, ZOTERO, S3, GMAIL, OUTLOOK, SERVICENOW, TEXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, HTML, RAW_TEXT, WEB_SCRAPE, RSS_FEED, FRESHDESK, GITBOOK, SALESFORCE, GITHUB, SLACK, GURU, GONG, JPG, PNG, JPEG, MP3, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, MPEG, MPG, MP4, WMV, AVI, MOV, MKV, FLV, WEBM, EML, MSG].freeze
|
77
|
+
@all_vars ||= [GOOGLE_CLOUD_STORAGE, GOOGLE_DRIVE, NOTION, NOTION_DATABASE, INTERCOM, DROPBOX, ONEDRIVE, SHAREPOINT, CONFLUENCE, BOX, ZENDESK, ZOTERO, S3, AZURE_BLOB_STORAGE, GMAIL, OUTLOOK, SERVICENOW, TEXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, HTML, RAW_TEXT, WEB_SCRAPE, RSS_FEED, FRESHDESK, GITBOOK, SALESFORCE, GITHUB, SLACK, GURU, GONG, JPG, PNG, JPEG, MP3, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, MPEG, MPG, MP4, WMV, AVI, MOV, MKV, FLV, WEBM, EML, MSG].freeze
|
77
78
|
end
|
78
79
|
|
79
80
|
# Builds the enum from string
|
@@ -24,6 +24,7 @@ module Carbon
|
|
24
24
|
ZENDESK = "ZENDESK".freeze
|
25
25
|
ZOTERO = "ZOTERO".freeze
|
26
26
|
S3 = "S3".freeze
|
27
|
+
AZURE_BLOB_STORAGE = "AZURE_BLOB_STORAGE".freeze
|
27
28
|
GMAIL = "GMAIL".freeze
|
28
29
|
OUTLOOK = "OUTLOOK".freeze
|
29
30
|
SERVICENOW = "SERVICENOW".freeze
|
@@ -73,7 +74,7 @@ module Carbon
|
|
73
74
|
MSG = "MSG".freeze
|
74
75
|
|
75
76
|
def self.all_vars
|
76
|
-
@all_vars ||= [GOOGLE_CLOUD_STORAGE, GOOGLE_DRIVE, NOTION, NOTION_DATABASE, INTERCOM, DROPBOX, ONEDRIVE, SHAREPOINT, CONFLUENCE, BOX, ZENDESK, ZOTERO, S3, GMAIL, OUTLOOK, SERVICENOW, TEXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, HTML, RAW_TEXT, WEB_SCRAPE, RSS_FEED, FRESHDESK, GITBOOK, SALESFORCE, GITHUB, SLACK, GURU, GONG, JPG, PNG, JPEG, MP3, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, MPEG, MPG, MP4, WMV, AVI, MOV, MKV, FLV, WEBM, EML, MSG].freeze
|
77
|
+
@all_vars ||= [GOOGLE_CLOUD_STORAGE, GOOGLE_DRIVE, NOTION, NOTION_DATABASE, INTERCOM, DROPBOX, ONEDRIVE, SHAREPOINT, CONFLUENCE, BOX, ZENDESK, ZOTERO, S3, AZURE_BLOB_STORAGE, GMAIL, OUTLOOK, SERVICENOW, TEXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, HTML, RAW_TEXT, WEB_SCRAPE, RSS_FEED, FRESHDESK, GITBOOK, SALESFORCE, GITHUB, SLACK, GURU, GONG, JPG, PNG, JPEG, MP3, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, MPEG, MPG, MP4, WMV, AVI, MOV, MKV, FLV, WEBM, EML, MSG].freeze
|
77
78
|
end
|
78
79
|
|
79
80
|
# Builds the enum from string
|
@@ -20,9 +20,10 @@ module Carbon
|
|
20
20
|
RATE_LIMITED = "RATE_LIMITED".freeze
|
21
21
|
SYNC_ABORTED = "SYNC_ABORTED".freeze
|
22
22
|
QUEUED_FOR_OCR = "QUEUED_FOR_OCR".freeze
|
23
|
+
READY_TO_SYNC = "READY_TO_SYNC".freeze
|
23
24
|
|
24
25
|
def self.all_vars
|
25
|
-
@all_vars ||= [DELAYED, QUEUED_FOR_SYNC, SYNCING, READY, SYNC_ERROR, EVALUATING_RESYNC, RATE_LIMITED, SYNC_ABORTED, QUEUED_FOR_OCR].freeze
|
26
|
+
@all_vars ||= [DELAYED, QUEUED_FOR_SYNC, SYNCING, READY, SYNC_ERROR, EVALUATING_RESYNC, RATE_LIMITED, SYNC_ABORTED, QUEUED_FOR_OCR, READY_TO_SYNC].freeze
|
26
27
|
end
|
27
28
|
|
28
29
|
# Builds the enum from string
|
@@ -31,6 +31,9 @@ module Carbon
|
|
31
31
|
# If this flag is enabled, the file will be chunked and stored with Carbon, but no embeddings will be generated. This overrides the skip_embedding_generation flag.
|
32
32
|
attr_accessor :generate_chunks_only
|
33
33
|
|
34
|
+
# Setting this flag will create a new file record with Carbon but skip any and all processing. This means that we do not download the remote file content or generate any chunks or embeddings. We will store some metadata like name, external id, and external URL depending on the source you are syncing from. Note that this flag overrides both skip_embedding_generation and generate_chunks_only flags. The file will be moved to READY_TO_SYNC status.
|
35
|
+
attr_accessor :skip_file_processing
|
36
|
+
|
34
37
|
# Attribute mapping from ruby-style variable name to JSON key.
|
35
38
|
def self.attribute_map
|
36
39
|
{
|
@@ -40,7 +43,8 @@ module Carbon
|
|
40
43
|
:'transcription_service' => :'transcription_service',
|
41
44
|
:'include_speaker_labels' => :'include_speaker_labels',
|
42
45
|
:'split_rows' => :'split_rows',
|
43
|
-
:'generate_chunks_only' => :'generate_chunks_only'
|
46
|
+
:'generate_chunks_only' => :'generate_chunks_only',
|
47
|
+
:'skip_file_processing' => :'skip_file_processing'
|
44
48
|
}
|
45
49
|
end
|
46
50
|
|
@@ -58,7 +62,8 @@ module Carbon
|
|
58
62
|
:'transcription_service' => :'TranscriptionServiceNullable',
|
59
63
|
:'include_speaker_labels' => :'Boolean',
|
60
64
|
:'split_rows' => :'Boolean',
|
61
|
-
:'generate_chunks_only' => :'Boolean'
|
65
|
+
:'generate_chunks_only' => :'Boolean',
|
66
|
+
:'skip_file_processing' => :'Boolean'
|
62
67
|
}
|
63
68
|
end
|
64
69
|
|
@@ -123,6 +128,12 @@ module Carbon
|
|
123
128
|
else
|
124
129
|
self.generate_chunks_only = false
|
125
130
|
end
|
131
|
+
|
132
|
+
if attributes.key?(:'skip_file_processing')
|
133
|
+
self.skip_file_processing = attributes[:'skip_file_processing']
|
134
|
+
else
|
135
|
+
self.skip_file_processing = false
|
136
|
+
end
|
126
137
|
end
|
127
138
|
|
128
139
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -149,7 +160,8 @@ module Carbon
|
|
149
160
|
transcription_service == o.transcription_service &&
|
150
161
|
include_speaker_labels == o.include_speaker_labels &&
|
151
162
|
split_rows == o.split_rows &&
|
152
|
-
generate_chunks_only == o.generate_chunks_only
|
163
|
+
generate_chunks_only == o.generate_chunks_only &&
|
164
|
+
skip_file_processing == o.skip_file_processing
|
153
165
|
end
|
154
166
|
|
155
167
|
# @see the `==` method
|
@@ -161,7 +173,7 @@ module Carbon
|
|
161
173
|
# Calculates hash code according to all attributes.
|
162
174
|
# @return [Integer] Hash code
|
163
175
|
def hash
|
164
|
-
[auto_synced_source_types, sync_attachments, detect_audio_language, transcription_service, include_speaker_labels, split_rows, generate_chunks_only].hash
|
176
|
+
[auto_synced_source_types, sync_attachments, detect_audio_language, transcription_service, include_speaker_labels, split_rows, generate_chunks_only, skip_file_processing].hash
|
165
177
|
end
|
166
178
|
|
167
179
|
# Builds the object from hash
|
@@ -32,6 +32,9 @@ module Carbon
|
|
32
32
|
# If this flag is enabled, the file will be chunked and stored with Carbon, but no embeddings will be generated. This overrides the skip_embedding_generation flag.
|
33
33
|
attr_accessor :generate_chunks_only
|
34
34
|
|
35
|
+
# Setting this flag will create a new file record with Carbon but skip any and all processing. This means that we do not download the remote file content or generate any chunks or embeddings. We will store some metadata like name, external id, and external URL depending on the source you are syncing from. Note that this flag overrides both skip_embedding_generation and generate_chunks_only flags. The file will be moved to READY_TO_SYNC status.
|
36
|
+
attr_accessor :skip_file_processing
|
37
|
+
|
35
38
|
# Attribute mapping from ruby-style variable name to JSON key.
|
36
39
|
def self.attribute_map
|
37
40
|
{
|
@@ -41,7 +44,8 @@ module Carbon
|
|
41
44
|
:'transcription_service' => :'transcription_service',
|
42
45
|
:'include_speaker_labels' => :'include_speaker_labels',
|
43
46
|
:'split_rows' => :'split_rows',
|
44
|
-
:'generate_chunks_only' => :'generate_chunks_only'
|
47
|
+
:'generate_chunks_only' => :'generate_chunks_only',
|
48
|
+
:'skip_file_processing' => :'skip_file_processing'
|
45
49
|
}
|
46
50
|
end
|
47
51
|
|
@@ -59,7 +63,8 @@ module Carbon
|
|
59
63
|
:'transcription_service' => :'TranscriptionServiceNullable',
|
60
64
|
:'include_speaker_labels' => :'Boolean',
|
61
65
|
:'split_rows' => :'Boolean',
|
62
|
-
:'generate_chunks_only' => :'Boolean'
|
66
|
+
:'generate_chunks_only' => :'Boolean',
|
67
|
+
:'skip_file_processing' => :'Boolean'
|
63
68
|
}
|
64
69
|
end
|
65
70
|
|
@@ -124,6 +129,12 @@ module Carbon
|
|
124
129
|
else
|
125
130
|
self.generate_chunks_only = false
|
126
131
|
end
|
132
|
+
|
133
|
+
if attributes.key?(:'skip_file_processing')
|
134
|
+
self.skip_file_processing = attributes[:'skip_file_processing']
|
135
|
+
else
|
136
|
+
self.skip_file_processing = false
|
137
|
+
end
|
127
138
|
end
|
128
139
|
|
129
140
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -150,7 +161,8 @@ module Carbon
|
|
150
161
|
transcription_service == o.transcription_service &&
|
151
162
|
include_speaker_labels == o.include_speaker_labels &&
|
152
163
|
split_rows == o.split_rows &&
|
153
|
-
generate_chunks_only == o.generate_chunks_only
|
164
|
+
generate_chunks_only == o.generate_chunks_only &&
|
165
|
+
skip_file_processing == o.skip_file_processing
|
154
166
|
end
|
155
167
|
|
156
168
|
# @see the `==` method
|
@@ -162,7 +174,7 @@ module Carbon
|
|
162
174
|
# Calculates hash code according to all attributes.
|
163
175
|
# @return [Integer] Hash code
|
164
176
|
def hash
|
165
|
-
[auto_synced_source_types, sync_attachments, detect_audio_language, transcription_service, include_speaker_labels, split_rows, generate_chunks_only].hash
|
177
|
+
[auto_synced_source_types, sync_attachments, detect_audio_language, transcription_service, include_speaker_labels, split_rows, generate_chunks_only, skip_file_processing].hash
|
166
178
|
end
|
167
179
|
|
168
180
|
# Builds the object from hash
|