carbon_ruby_sdk 0.2.29 → 0.2.30

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +5 -7
  3. data/README.md +42 -6
  4. data/lib/carbon_ruby_sdk/api/embeddings_api.rb +2 -2
  5. data/lib/carbon_ruby_sdk/api/files_api.rb +21 -6
  6. data/lib/carbon_ruby_sdk/api/integrations_api.rb +12 -8
  7. data/lib/carbon_ruby_sdk/api/utilities_api.rb +6 -2
  8. data/lib/carbon_ruby_sdk/models/authentication_property.rb +62 -5
  9. data/lib/carbon_ruby_sdk/models/auto_synced_source_types_property_inner.rb +226 -0
  10. data/lib/carbon_ruby_sdk/models/data_source_type.rb +2 -1
  11. data/lib/carbon_ruby_sdk/models/data_source_type_nullable.rb +2 -1
  12. data/lib/carbon_ruby_sdk/models/external_data_source_type.rb +2 -1
  13. data/lib/carbon_ruby_sdk/models/file_formats.rb +2 -1
  14. data/lib/carbon_ruby_sdk/models/file_formats_nullable.rb +2 -1
  15. data/lib/carbon_ruby_sdk/models/file_sync_config.rb +17 -5
  16. data/lib/carbon_ruby_sdk/models/file_sync_config_nullable.rb +17 -5
  17. data/lib/carbon_ruby_sdk/models/get_embedding_documents_body.rb +1 -1
  18. data/lib/carbon_ruby_sdk/models/o_auth_url_request.rb +16 -6
  19. data/lib/carbon_ruby_sdk/models/organization_user_files_to_sync_filters.rb +1 -1
  20. data/lib/carbon_ruby_sdk/models/raw_text_input.rb +16 -4
  21. data/lib/carbon_ruby_sdk/models/service_now_authentication.rb +296 -0
  22. data/lib/carbon_ruby_sdk/models/service_now_credentials.rb +262 -0
  23. data/lib/carbon_ruby_sdk/models/service_now_credentials_nullable.rb +263 -0
  24. data/lib/carbon_ruby_sdk/models/service_now_file_types.rb +37 -0
  25. data/lib/carbon_ruby_sdk/models/sitemap_scrape_request.rb +17 -5
  26. data/lib/carbon_ruby_sdk/models/sync_files_request.rb +1 -1
  27. data/lib/carbon_ruby_sdk/models/sync_options.rb +1 -1
  28. data/lib/carbon_ruby_sdk/models/upload_file_from_url_input.rb +16 -4
  29. data/lib/carbon_ruby_sdk/models/webscrape_request.rb +17 -5
  30. data/lib/carbon_ruby_sdk/version.rb +1 -1
  31. data/lib/carbon_ruby_sdk.rb +5 -0
  32. data/spec/api/files_api_spec.rb +1 -0
  33. data/spec/models/authentication_property_spec.rb +24 -0
  34. data/spec/models/auto_synced_source_types_property_inner_spec.rb +22 -0
  35. data/spec/models/file_sync_config_nullable_spec.rb +6 -0
  36. data/spec/models/file_sync_config_spec.rb +6 -0
  37. data/spec/models/o_auth_url_request_spec.rb +6 -0
  38. data/spec/models/raw_text_input_spec.rb +6 -0
  39. data/spec/models/service_now_authentication_spec.rb +64 -0
  40. data/spec/models/service_now_credentials_nullable_spec.rb +46 -0
  41. data/spec/models/service_now_credentials_spec.rb +46 -0
  42. data/spec/models/service_now_file_types_spec.rb +22 -0
  43. data/spec/models/sitemap_scrape_request_spec.rb +6 -0
  44. data/spec/models/upload_file_from_url_input_spec.rb +6 -0
  45. data/spec/models/webscrape_request_spec.rb +6 -0
  46. metadata +165 -150
@@ -44,6 +44,14 @@ module Carbon
44
44
  # You can specify a Digital Ocean endpoint URL to connect a Digital Ocean Space through this endpoint. The URL should be of format <region>.digitaloceanspaces.com. It's not required for S3 buckets.
45
45
  attr_accessor :endpoint_url
46
46
 
47
+ attr_accessor :instance_subdomain
48
+
49
+ attr_accessor :client_id
50
+
51
+ attr_accessor :client_secret
52
+
53
+ attr_accessor :redirect_uri
54
+
47
55
  # Attribute mapping from ruby-style variable name to JSON key.
48
56
  def self.attribute_map
49
57
  {
@@ -62,7 +70,11 @@ module Carbon
62
70
  :'api_key' => :'api_key',
63
71
  :'access_key' => :'access_key',
64
72
  :'access_key_secret' => :'access_key_secret',
65
- :'endpoint_url' => :'endpoint_url'
73
+ :'endpoint_url' => :'endpoint_url',
74
+ :'instance_subdomain' => :'instance_subdomain',
75
+ :'client_id' => :'client_id',
76
+ :'client_secret' => :'client_secret',
77
+ :'redirect_uri' => :'redirect_uri'
66
78
  }
67
79
  end
68
80
 
@@ -89,7 +101,11 @@ module Carbon
89
101
  :'api_key' => :'String',
90
102
  :'access_key' => :'String',
91
103
  :'access_key_secret' => :'String',
92
- :'endpoint_url' => :'String'
104
+ :'endpoint_url' => :'String',
105
+ :'instance_subdomain' => :'String',
106
+ :'client_id' => :'String',
107
+ :'client_secret' => :'String',
108
+ :'redirect_uri' => :'String'
93
109
  }
94
110
  end
95
111
 
@@ -98,7 +114,7 @@ module Carbon
98
114
  Set.new([
99
115
  :'source',
100
116
  :'refresh_token',
101
- :'endpoint_url'
117
+ :'endpoint_url',
102
118
  ])
103
119
  end
104
120
 
@@ -114,6 +130,7 @@ module Carbon
114
130
  :'OAuthAuthentication',
115
131
  :'S3Authentication',
116
132
  :'SalesforceAuthentication',
133
+ :'ServiceNowAuthentication',
117
134
  :'SharepointAuthentication',
118
135
  :'ZendeskAuthentication',
119
136
  :'ZoteroAuthentication'
@@ -198,6 +215,22 @@ module Carbon
198
215
  if attributes.key?(:'endpoint_url')
199
216
  self.endpoint_url = attributes[:'endpoint_url']
200
217
  end
218
+
219
+ if attributes.key?(:'instance_subdomain')
220
+ self.instance_subdomain = attributes[:'instance_subdomain']
221
+ end
222
+
223
+ if attributes.key?(:'client_id')
224
+ self.client_id = attributes[:'client_id']
225
+ end
226
+
227
+ if attributes.key?(:'client_secret')
228
+ self.client_secret = attributes[:'client_secret']
229
+ end
230
+
231
+ if attributes.key?(:'redirect_uri')
232
+ self.redirect_uri = attributes[:'redirect_uri']
233
+ end
201
234
  end
202
235
 
203
236
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -256,6 +289,22 @@ module Carbon
256
289
  invalid_properties.push('invalid value for "access_key_secret", access_key_secret cannot be nil.')
257
290
  end
258
291
 
292
+ if @instance_subdomain.nil?
293
+ invalid_properties.push('invalid value for "instance_subdomain", instance_subdomain cannot be nil.')
294
+ end
295
+
296
+ if @client_id.nil?
297
+ invalid_properties.push('invalid value for "client_id", client_id cannot be nil.')
298
+ end
299
+
300
+ if @client_secret.nil?
301
+ invalid_properties.push('invalid value for "client_secret", client_secret cannot be nil.')
302
+ end
303
+
304
+ if @redirect_uri.nil?
305
+ invalid_properties.push('invalid value for "redirect_uri", redirect_uri cannot be nil.')
306
+ end
307
+
259
308
  invalid_properties
260
309
  end
261
310
 
@@ -275,6 +324,10 @@ module Carbon
275
324
  return false if @api_key.nil?
276
325
  return false if @access_key.nil?
277
326
  return false if @access_key_secret.nil?
327
+ return false if @instance_subdomain.nil?
328
+ return false if @client_id.nil?
329
+ return false if @client_secret.nil?
330
+ return false if @redirect_uri.nil?
278
331
  _any_of_found = false
279
332
  self.class.openapi_any_of.each do |_class|
280
333
  _any_of = Carbon.const_get(_class).build_from_hash(self.to_hash)
@@ -310,7 +363,11 @@ module Carbon
310
363
  api_key == o.api_key &&
311
364
  access_key == o.access_key &&
312
365
  access_key_secret == o.access_key_secret &&
313
- endpoint_url == o.endpoint_url
366
+ endpoint_url == o.endpoint_url &&
367
+ instance_subdomain == o.instance_subdomain &&
368
+ client_id == o.client_id &&
369
+ client_secret == o.client_secret &&
370
+ redirect_uri == o.redirect_uri
314
371
  end
315
372
 
316
373
  # @see the `==` method
@@ -322,7 +379,7 @@ module Carbon
322
379
  # Calculates hash code according to all attributes.
323
380
  # @return [Integer] Hash code
324
381
  def hash
325
- [source, access_token, refresh_token, workspace_id, tenant_name, site_name, subdomain, access_token_secret, username, zotero_id, organization_name, domain, api_key, access_key, access_key_secret, endpoint_url].hash
382
+ [source, access_token, refresh_token, workspace_id, tenant_name, site_name, subdomain, access_token_secret, username, zotero_id, organization_name, domain, api_key, access_key, access_key_secret, endpoint_url, instance_subdomain, client_id, client_secret, redirect_uri].hash
326
383
  end
327
384
 
328
385
  # Builds the object from hash
@@ -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 AutoSyncedSourceTypesPropertyInner
14
+ # Attribute mapping from ruby-style variable name to JSON key.
15
+ def self.attribute_map
16
+ {
17
+ }
18
+ end
19
+
20
+ # Returns all the JSON keys this model knows about
21
+ def self.acceptable_attributes
22
+ attribute_map.values
23
+ end
24
+
25
+ # Attribute type mapping.
26
+ def self.openapi_types
27
+ {
28
+ }
29
+ end
30
+
31
+ # List of attributes with nullable: true
32
+ def self.openapi_nullable
33
+ Set.new([
34
+ ])
35
+ end
36
+
37
+ # List of class defined in anyOf (OpenAPI v3)
38
+ def self.openapi_any_of
39
+ [
40
+ :'HelpdeskFileTypes',
41
+ :'ServiceNowFileTypes'
42
+ ]
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ if (!attributes.is_a?(Hash))
49
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Carbon::AutoSyncedSourceTypesPropertyInner` initialize method"
50
+ end
51
+
52
+ # check to see if the attribute exists and convert string to symbol for hash key
53
+ attributes = attributes.each_with_object({}) { |(k, v), h|
54
+ if (!self.class.attribute_map.key?(k.to_sym))
55
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Carbon::AutoSyncedSourceTypesPropertyInner`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ end
57
+ h[k.to_sym] = v
58
+ }
59
+ end
60
+
61
+ # Show invalid properties with the reasons. Usually used together with valid?
62
+ # @return Array for valid properties with the reasons
63
+ def list_invalid_properties
64
+ invalid_properties = Array.new
65
+ invalid_properties
66
+ end
67
+
68
+ # Check to see if the all the properties in the model are valid
69
+ # @return true if the model is valid
70
+ def valid?
71
+ _any_of_found = false
72
+ self.class.openapi_any_of.each do |_class|
73
+ _any_of = Carbon.const_get(_class).build_from_hash(self.to_hash)
74
+ if _any_of.valid?
75
+ _any_of_found = true
76
+ end
77
+ end
78
+
79
+ if !_any_of_found
80
+ return false
81
+ end
82
+
83
+ true
84
+ end
85
+
86
+ # Checks equality by comparing each attribute.
87
+ # @param [Object] Object to be compared
88
+ def ==(o)
89
+ return true if self.equal?(o)
90
+ self.class == o.class
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
+ [].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
@@ -26,6 +26,7 @@ module Carbon
26
26
  S3 = "S3".freeze
27
27
  GMAIL = "GMAIL".freeze
28
28
  OUTLOOK = "OUTLOOK".freeze
29
+ SERVICENOW = "SERVICENOW".freeze
29
30
  TEXT = "TEXT".freeze
30
31
  CSV = "CSV".freeze
31
32
  TSV = "TSV".freeze
@@ -71,7 +72,7 @@ module Carbon
71
72
  MSG = "MSG".freeze
72
73
 
73
74
  def self.all_vars
74
- @all_vars ||= [GOOGLE_CLOUD_STORAGE, GOOGLE_DRIVE, NOTION, NOTION_DATABASE, INTERCOM, DROPBOX, ONEDRIVE, SHAREPOINT, CONFLUENCE, BOX, ZENDESK, ZOTERO, S3, GMAIL, OUTLOOK, TEXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, HTML, RAW_TEXT, WEB_SCRAPE, RSS_FEED, FRESHDESK, GITBOOK, SALESFORCE, GITHUB, SLACK, GURU, 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
75
+ @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, 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
75
76
  end
76
77
 
77
78
  # Builds the enum from string
@@ -26,6 +26,7 @@ module Carbon
26
26
  S3 = "S3".freeze
27
27
  GMAIL = "GMAIL".freeze
28
28
  OUTLOOK = "OUTLOOK".freeze
29
+ SERVICENOW = "SERVICENOW".freeze
29
30
  TEXT = "TEXT".freeze
30
31
  CSV = "CSV".freeze
31
32
  TSV = "TSV".freeze
@@ -71,7 +72,7 @@ module Carbon
71
72
  MSG = "MSG".freeze
72
73
 
73
74
  def self.all_vars
74
- @all_vars ||= [GOOGLE_CLOUD_STORAGE, GOOGLE_DRIVE, NOTION, NOTION_DATABASE, INTERCOM, DROPBOX, ONEDRIVE, SHAREPOINT, CONFLUENCE, BOX, ZENDESK, ZOTERO, S3, GMAIL, OUTLOOK, TEXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, HTML, RAW_TEXT, WEB_SCRAPE, RSS_FEED, FRESHDESK, GITBOOK, SALESFORCE, GITHUB, SLACK, GURU, 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
75
+ @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, 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
75
76
  end
76
77
 
77
78
  # Builds the enum from string
@@ -26,9 +26,10 @@ module Carbon
26
26
  SLACK = "SLACK".freeze
27
27
  ZENDESK = "ZENDESK".freeze
28
28
  ZOTERO = "ZOTERO".freeze
29
+ SERVICENOW = "SERVICENOW".freeze
29
30
 
30
31
  def self.all_vars
31
- @all_vars ||= [BOX, CONFLUENCE, DROPBOX, GMAIL, GOOGLE_DRIVE, GOOGLE_CLOUD_STORAGE, INTERCOM, NOTION, ONEDRIVE, OUTLOOK, SALESFORCE, SHAREPOINT, SLACK, ZENDESK, ZOTERO].freeze
32
+ @all_vars ||= [BOX, CONFLUENCE, DROPBOX, GMAIL, GOOGLE_DRIVE, GOOGLE_CLOUD_STORAGE, INTERCOM, NOTION, ONEDRIVE, OUTLOOK, SALESFORCE, SHAREPOINT, SLACK, ZENDESK, ZOTERO, SERVICENOW].freeze
32
33
  end
33
34
 
34
35
  # Builds the enum from string
@@ -39,6 +39,7 @@ module Carbon
39
39
  GITHUB = "GITHUB".freeze
40
40
  SLACK = "SLACK".freeze
41
41
  GURU = "GURU".freeze
42
+ SERVICENOW = "SERVICENOW".freeze
42
43
  JPG = "JPG".freeze
43
44
  PNG = "PNG".freeze
44
45
  MP3 = "MP3".freeze
@@ -63,7 +64,7 @@ module Carbon
63
64
  MSG = "MSG".freeze
64
65
 
65
66
  def self.all_vars
66
- @all_vars ||= [TXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, HTML, NOTION, GOOGLE_DOCS, GOOGLE_SHEETS, GOOGLE_SLIDES, INTERCOM, CONFLUENCE, RSS_FEED, GMAIL, OUTLOOK, ZENDESK, FRESHDESK, WEB_SCRAPE, GITBOOK, SALESFORCE, GITHUB, SLACK, GURU, JPG, PNG, MP3, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, MPEG, MPG, MP4, WMV, AVI, MOV, MKV, FLV, WEBM, EML, MSG].freeze
67
+ @all_vars ||= [TXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, HTML, NOTION, GOOGLE_DOCS, GOOGLE_SHEETS, GOOGLE_SLIDES, INTERCOM, CONFLUENCE, RSS_FEED, GMAIL, OUTLOOK, ZENDESK, FRESHDESK, WEB_SCRAPE, GITBOOK, SALESFORCE, GITHUB, SLACK, GURU, SERVICENOW, JPG, PNG, MP3, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, MPEG, MPG, MP4, WMV, AVI, MOV, MKV, FLV, WEBM, EML, MSG].freeze
67
68
  end
68
69
 
69
70
  # Builds the enum from string
@@ -39,6 +39,7 @@ module Carbon
39
39
  GITHUB = "GITHUB".freeze
40
40
  SLACK = "SLACK".freeze
41
41
  GURU = "GURU".freeze
42
+ SERVICENOW = "SERVICENOW".freeze
42
43
  JPG = "JPG".freeze
43
44
  PNG = "PNG".freeze
44
45
  MP3 = "MP3".freeze
@@ -63,7 +64,7 @@ module Carbon
63
64
  MSG = "MSG".freeze
64
65
 
65
66
  def self.all_vars
66
- @all_vars ||= [TXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, HTML, NOTION, GOOGLE_DOCS, GOOGLE_SHEETS, GOOGLE_SLIDES, INTERCOM, CONFLUENCE, RSS_FEED, GMAIL, OUTLOOK, ZENDESK, FRESHDESK, WEB_SCRAPE, GITBOOK, SALESFORCE, GITHUB, SLACK, GURU, JPG, PNG, MP3, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, MPEG, MPG, MP4, WMV, AVI, MOV, MKV, FLV, WEBM, EML, MSG].freeze
67
+ @all_vars ||= [TXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, HTML, NOTION, GOOGLE_DOCS, GOOGLE_SHEETS, GOOGLE_SLIDES, INTERCOM, CONFLUENCE, RSS_FEED, GMAIL, OUTLOOK, ZENDESK, FRESHDESK, WEB_SCRAPE, GITBOOK, SALESFORCE, GITHUB, SLACK, GURU, SERVICENOW, JPG, PNG, MP3, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, MPEG, MPG, MP4, WMV, AVI, MOV, MKV, FLV, WEBM, EML, MSG].freeze
67
68
  end
68
69
 
69
70
  # Builds the enum from string
@@ -28,6 +28,9 @@ module Carbon
28
28
  # Whether to split tabular rows into chunks. Currently only valid for CSV, TSV, and XLSX files.
29
29
  attr_accessor :split_rows
30
30
 
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
+ attr_accessor :generate_chunks_only
33
+
31
34
  # Attribute mapping from ruby-style variable name to JSON key.
32
35
  def self.attribute_map
33
36
  {
@@ -36,7 +39,8 @@ module Carbon
36
39
  :'detect_audio_language' => :'detect_audio_language',
37
40
  :'transcription_service' => :'transcription_service',
38
41
  :'include_speaker_labels' => :'include_speaker_labels',
39
- :'split_rows' => :'split_rows'
42
+ :'split_rows' => :'split_rows',
43
+ :'generate_chunks_only' => :'generate_chunks_only'
40
44
  }
41
45
  end
42
46
 
@@ -48,12 +52,13 @@ module Carbon
48
52
  # Attribute type mapping.
49
53
  def self.openapi_types
50
54
  {
51
- :'auto_synced_source_types' => :'Array<HelpdeskFileTypes>',
55
+ :'auto_synced_source_types' => :'Array<AutoSyncedSourceTypesPropertyInner>',
52
56
  :'sync_attachments' => :'Boolean',
53
57
  :'detect_audio_language' => :'Boolean',
54
58
  :'transcription_service' => :'TranscriptionServiceNullable',
55
59
  :'include_speaker_labels' => :'Boolean',
56
- :'split_rows' => :'Boolean'
60
+ :'split_rows' => :'Boolean',
61
+ :'generate_chunks_only' => :'Boolean'
57
62
  }
58
63
  end
59
64
 
@@ -112,6 +117,12 @@ module Carbon
112
117
  else
113
118
  self.split_rows = false
114
119
  end
120
+
121
+ if attributes.key?(:'generate_chunks_only')
122
+ self.generate_chunks_only = attributes[:'generate_chunks_only']
123
+ else
124
+ self.generate_chunks_only = false
125
+ end
115
126
  end
116
127
 
117
128
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -137,7 +148,8 @@ module Carbon
137
148
  detect_audio_language == o.detect_audio_language &&
138
149
  transcription_service == o.transcription_service &&
139
150
  include_speaker_labels == o.include_speaker_labels &&
140
- split_rows == o.split_rows
151
+ split_rows == o.split_rows &&
152
+ generate_chunks_only == o.generate_chunks_only
141
153
  end
142
154
 
143
155
  # @see the `==` method
@@ -149,7 +161,7 @@ module Carbon
149
161
  # Calculates hash code according to all attributes.
150
162
  # @return [Integer] Hash code
151
163
  def hash
152
- [auto_synced_source_types, sync_attachments, detect_audio_language, transcription_service, include_speaker_labels, split_rows].hash
164
+ [auto_synced_source_types, sync_attachments, detect_audio_language, transcription_service, include_speaker_labels, split_rows, generate_chunks_only].hash
153
165
  end
154
166
 
155
167
  # Builds the object from hash
@@ -29,6 +29,9 @@ module Carbon
29
29
  # Whether to split tabular rows into chunks. Currently only valid for CSV, TSV, and XLSX files.
30
30
  attr_accessor :split_rows
31
31
 
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
+ attr_accessor :generate_chunks_only
34
+
32
35
  # Attribute mapping from ruby-style variable name to JSON key.
33
36
  def self.attribute_map
34
37
  {
@@ -37,7 +40,8 @@ module Carbon
37
40
  :'detect_audio_language' => :'detect_audio_language',
38
41
  :'transcription_service' => :'transcription_service',
39
42
  :'include_speaker_labels' => :'include_speaker_labels',
40
- :'split_rows' => :'split_rows'
43
+ :'split_rows' => :'split_rows',
44
+ :'generate_chunks_only' => :'generate_chunks_only'
41
45
  }
42
46
  end
43
47
 
@@ -49,12 +53,13 @@ module Carbon
49
53
  # Attribute type mapping.
50
54
  def self.openapi_types
51
55
  {
52
- :'auto_synced_source_types' => :'Array<HelpdeskFileTypes>',
56
+ :'auto_synced_source_types' => :'Array<AutoSyncedSourceTypesPropertyInner>',
53
57
  :'sync_attachments' => :'Boolean',
54
58
  :'detect_audio_language' => :'Boolean',
55
59
  :'transcription_service' => :'TranscriptionServiceNullable',
56
60
  :'include_speaker_labels' => :'Boolean',
57
- :'split_rows' => :'Boolean'
61
+ :'split_rows' => :'Boolean',
62
+ :'generate_chunks_only' => :'Boolean'
58
63
  }
59
64
  end
60
65
 
@@ -113,6 +118,12 @@ module Carbon
113
118
  else
114
119
  self.split_rows = false
115
120
  end
121
+
122
+ if attributes.key?(:'generate_chunks_only')
123
+ self.generate_chunks_only = attributes[:'generate_chunks_only']
124
+ else
125
+ self.generate_chunks_only = false
126
+ end
116
127
  end
117
128
 
118
129
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -138,7 +149,8 @@ module Carbon
138
149
  detect_audio_language == o.detect_audio_language &&
139
150
  transcription_service == o.transcription_service &&
140
151
  include_speaker_labels == o.include_speaker_labels &&
141
- split_rows == o.split_rows
152
+ split_rows == o.split_rows &&
153
+ generate_chunks_only == o.generate_chunks_only
142
154
  end
143
155
 
144
156
  # @see the `==` method
@@ -150,7 +162,7 @@ module Carbon
150
162
  # Calculates hash code according to all attributes.
151
163
  # @return [Integer] Hash code
152
164
  def hash
153
- [auto_synced_source_types, sync_attachments, detect_audio_language, transcription_service, include_speaker_labels, split_rows].hash
165
+ [auto_synced_source_types, sync_attachments, detect_audio_language, transcription_service, include_speaker_labels, split_rows, generate_chunks_only].hash
154
166
  end
155
167
 
156
168
  # Builds the object from hash
@@ -119,7 +119,7 @@ module Carbon
119
119
  :'include_file_level_metadata' => :'Boolean',
120
120
  :'high_accuracy' => :'Boolean',
121
121
  :'rerank' => :'RerankParamsNullable',
122
- :'file_types_at_source' => :'Array<HelpdeskFileTypes>',
122
+ :'file_types_at_source' => :'Array<AutoSyncedSourceTypesPropertyInner>',
123
123
  :'exclude_cold_storage_files' => :'Boolean'
124
124
  }
125
125
  end
@@ -67,7 +67,7 @@ module Carbon
67
67
  # Enabling this flag will fetch all available content from the source to be listed via list items endpoint
68
68
  attr_accessor :sync_source_items
69
69
 
70
- # Only sync files if they have not already been synced or if the embedding properties have changed. This flag is currently supported by ONEDRIVE, GOOGLE_DRIVE, BOX, DROPBOX, INTERCOM, GMAIL, OUTLOOK, ZENDESK, CONFLUENCE, NOTION, SHAREPOINT. It will be ignored for other data sources.
70
+ # Only sync files if they have not already been synced or if the embedding properties have changed. This flag is currently supported by ONEDRIVE, GOOGLE_DRIVE, BOX, DROPBOX, INTERCOM, GMAIL, OUTLOOK, ZENDESK, CONFLUENCE, NOTION, SHAREPOINT, SERVICENOW. It will be ignored for other data sources.
71
71
  attr_accessor :incremental_sync
72
72
 
73
73
  attr_accessor :file_sync_config
@@ -75,6 +75,8 @@ module Carbon
75
75
  # Automatically open source file picker after the OAuth flow is complete. This flag is currently supported by BOX, DROPBOX, GOOGLE_DRIVE, ONEDRIVE, SHAREPOINT. It will be ignored for other data sources.
76
76
  attr_accessor :automatically_open_file_picker
77
77
 
78
+ attr_accessor :servicenow_credentials
79
+
78
80
  # Attribute mapping from ruby-style variable name to JSON key.
79
81
  def self.attribute_map
80
82
  {
@@ -104,7 +106,8 @@ module Carbon
104
106
  :'sync_source_items' => :'sync_source_items',
105
107
  :'incremental_sync' => :'incremental_sync',
106
108
  :'file_sync_config' => :'file_sync_config',
107
- :'automatically_open_file_picker' => :'automatically_open_file_picker'
109
+ :'automatically_open_file_picker' => :'automatically_open_file_picker',
110
+ :'servicenow_credentials' => :'servicenow_credentials'
108
111
  }
109
112
  end
110
113
 
@@ -142,7 +145,8 @@ module Carbon
142
145
  :'sync_source_items' => :'Boolean',
143
146
  :'incremental_sync' => :'Boolean',
144
147
  :'file_sync_config' => :'FileSyncConfigNullable',
145
- :'automatically_open_file_picker' => :'Boolean'
148
+ :'automatically_open_file_picker' => :'Boolean',
149
+ :'servicenow_credentials' => :'ServiceNowCredentialsNullable'
146
150
  }
147
151
  end
148
152
 
@@ -170,7 +174,8 @@ module Carbon
170
174
  :'use_ocr',
171
175
  :'parse_pdf_tables_with_ocr',
172
176
  :'file_sync_config',
173
- :'automatically_open_file_picker'
177
+ :'automatically_open_file_picker',
178
+ :'servicenow_credentials'
174
179
  ])
175
180
  end
176
181
 
@@ -324,6 +329,10 @@ module Carbon
324
329
  if attributes.key?(:'automatically_open_file_picker')
325
330
  self.automatically_open_file_picker = attributes[:'automatically_open_file_picker']
326
331
  end
332
+
333
+ if attributes.key?(:'servicenow_credentials')
334
+ self.servicenow_credentials = attributes[:'servicenow_credentials']
335
+ end
327
336
  end
328
337
 
329
338
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -375,7 +384,8 @@ module Carbon
375
384
  sync_source_items == o.sync_source_items &&
376
385
  incremental_sync == o.incremental_sync &&
377
386
  file_sync_config == o.file_sync_config &&
378
- automatically_open_file_picker == o.automatically_open_file_picker
387
+ automatically_open_file_picker == o.automatically_open_file_picker &&
388
+ servicenow_credentials == o.servicenow_credentials
379
389
  end
380
390
 
381
391
  # @see the `==` method
@@ -387,7 +397,7 @@ module Carbon
387
397
  # Calculates hash code according to all attributes.
388
398
  # @return [Integer] Hash code
389
399
  def hash
390
- [tags, scope, service, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, zendesk_subdomain, microsoft_tenant, sharepoint_site_name, confluence_subdomain, generate_sparse_vectors, prepend_filename_to_chunks, max_items_per_chunk, salesforce_domain, sync_files_on_connection, set_page_as_boundary, data_source_id, connecting_new_account, request_id, use_ocr, parse_pdf_tables_with_ocr, enable_file_picker, sync_source_items, incremental_sync, file_sync_config, automatically_open_file_picker].hash
400
+ [tags, scope, service, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, zendesk_subdomain, microsoft_tenant, sharepoint_site_name, confluence_subdomain, generate_sparse_vectors, prepend_filename_to_chunks, max_items_per_chunk, salesforce_domain, sync_files_on_connection, set_page_as_boundary, data_source_id, connecting_new_account, request_id, use_ocr, parse_pdf_tables_with_ocr, enable_file_picker, sync_source_items, incremental_sync, file_sync_config, automatically_open_file_picker, servicenow_credentials].hash
391
401
  end
392
402
 
393
403
  # Builds the object from hash
@@ -111,7 +111,7 @@ module Carbon
111
111
  :'sync_error_message' => :'String',
112
112
  :'include_containers' => :'Boolean',
113
113
  :'external_urls' => :'Array<String>',
114
- :'file_types_at_source' => :'Array<HelpdeskFileTypes>'
114
+ :'file_types_at_source' => :'Array<AutoSyncedSourceTypesPropertyInner>'
115
115
  }
116
116
  end
117
117