carbon_ruby_sdk 0.1.33 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +70 -13
  4. data/lib/carbon_ruby_sdk/api/files_api.rb +9 -2
  5. data/lib/carbon_ruby_sdk/api/integrations_api.rb +34 -22
  6. data/lib/carbon_ruby_sdk/api/organizations_api.rb +83 -0
  7. data/lib/carbon_ruby_sdk/models/data_source_type.rb +9 -2
  8. data/lib/carbon_ruby_sdk/models/data_source_type_nullable.rb +9 -2
  9. data/lib/carbon_ruby_sdk/models/fetch_urls_response.rb +14 -4
  10. data/lib/carbon_ruby_sdk/models/file_content_types.rb +3 -1
  11. data/lib/carbon_ruby_sdk/models/file_content_types_nullable.rb +3 -1
  12. data/lib/carbon_ruby_sdk/models/file_formats.rb +9 -3
  13. data/lib/carbon_ruby_sdk/models/file_formats_nullable.rb +9 -3
  14. data/lib/carbon_ruby_sdk/models/{helpdesk_file_sync_config.rb → file_sync_config.rb} +28 -14
  15. data/lib/carbon_ruby_sdk/models/{helpdesk_file_sync_config_nullable.rb → file_sync_config_nullable.rb} +28 -14
  16. data/lib/carbon_ruby_sdk/models/fresh_desk_connect_request.rb +1 -1
  17. data/lib/carbon_ruby_sdk/models/gmail_sync_input.rb +11 -1
  18. data/lib/carbon_ruby_sdk/models/o_auth_url_request.rb +3 -3
  19. data/lib/carbon_ruby_sdk/models/organization_response.rb +39 -1
  20. data/lib/carbon_ruby_sdk/models/outlook_sync_input.rb +11 -1
  21. data/lib/carbon_ruby_sdk/models/s3_file_sync_input.rb +15 -5
  22. data/lib/carbon_ruby_sdk/models/sync_files_request.rb +2 -2
  23. data/lib/carbon_ruby_sdk/models/sync_options.rb +2 -2
  24. data/lib/carbon_ruby_sdk/models/user_file.rb +15 -11
  25. data/lib/carbon_ruby_sdk/models/user_response.rb +85 -1
  26. data/lib/carbon_ruby_sdk/models/webhook.rb +25 -1
  27. data/lib/carbon_ruby_sdk/models/webhook_no_key.rb +25 -1
  28. data/lib/carbon_ruby_sdk/models/webhook_status.rb +36 -0
  29. data/lib/carbon_ruby_sdk/version.rb +1 -1
  30. data/lib/carbon_ruby_sdk.rb +3 -4
  31. data/spec/api/files_api_spec.rb +1 -0
  32. data/spec/api/organizations_api_spec.rb +11 -0
  33. data/spec/models/fetch_urls_response_spec.rb +6 -0
  34. data/spec/models/file_sync_config_nullable_spec.rb +40 -0
  35. data/spec/models/file_sync_config_spec.rb +40 -0
  36. data/spec/models/gmail_sync_input_spec.rb +6 -0
  37. data/spec/models/organization_response_spec.rb +18 -0
  38. data/spec/models/outlook_sync_input_spec.rb +6 -0
  39. data/spec/models/s3_file_sync_input_spec.rb +6 -0
  40. data/spec/models/user_file_spec.rb +2 -2
  41. data/spec/models/user_response_spec.rb +36 -0
  42. data/spec/models/webhook_no_key_spec.rb +12 -0
  43. data/spec/models/webhook_spec.rb +12 -0
  44. data/spec/models/webhook_status_spec.rb +22 -0
  45. metadata +11 -14
  46. data/lib/carbon_ruby_sdk/models/helpdesk_global_file_sync_config.rb +0 -217
  47. data/lib/carbon_ruby_sdk/models/helpdesk_global_file_sync_config_nullable.rb +0 -218
  48. data/spec/models/helpdesk_file_sync_config_nullable_spec.rb +0 -34
  49. data/spec/models/helpdesk_file_sync_config_spec.rb +0 -34
  50. data/spec/models/helpdesk_global_file_sync_config_nullable_spec.rb +0 -28
  51. data/spec/models/helpdesk_global_file_sync_config_spec.rb +0 -28
@@ -177,6 +177,89 @@ module Carbon
177
177
  end
178
178
  APIResponse::new(data, status_code, headers, response)
179
179
  end
180
+
181
+
182
+ # Update Organization Statistics
183
+ #
184
+ # Use this endpoint to reaggregate the statistics for an organization, for example aggregate_file_size. The reaggregation
185
+ # process is asyncronous so a webhook will be sent with the event type being FILE_STATISTICS_AGGREGATED to notify when the
186
+ # process is complee. After this aggregation is complete, the updated statistics can be retrieved using the /organization
187
+ # endpoint. The response of /organization willalso contain a timestamp of the last time the statistics were reaggregated.
188
+ #
189
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
190
+ def update_stats(extra: {})
191
+ api_response = update_stats_with_http_info_impl(extra)
192
+ api_response.data
193
+ end
194
+
195
+ # Update Organization Statistics
196
+ #
197
+ # Use this endpoint to reaggregate the statistics for an organization, for example aggregate_file_size. The reaggregation
198
+ # process is asyncronous so a webhook will be sent with the event type being FILE_STATISTICS_AGGREGATED to notify when the
199
+ # process is complee. After this aggregation is complete, the updated statistics can be retrieved using the /organization
200
+ # endpoint. The response of /organization willalso contain a timestamp of the last time the statistics were reaggregated.
201
+ #
202
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
203
+ def update_stats_with_http_info(extra: {})
204
+ update_stats_with_http_info_impl(extra)
205
+ end
206
+
207
+ # Update Organization Statistics
208
+ # Use this endpoint to reaggregate the statistics for an organization, for example aggregate_file_size. The reaggregation process is asyncronous so a webhook will be sent with the event type being FILE_STATISTICS_AGGREGATED to notify when the process is complee. After this aggregation is complete, the updated statistics can be retrieved using the /organization endpoint. The response of /organization willalso contain a timestamp of the last time the statistics were reaggregated.
209
+ # @param [Hash] opts the optional parameters
210
+ # @return [GenericSuccessResponse]
211
+ private def update_stats_impl(opts = {})
212
+ data, _status_code, _headers = update_stats_with_http_info(opts)
213
+ data
214
+ end
215
+
216
+ # Update Organization Statistics
217
+ # Use this endpoint to reaggregate the statistics for an organization, for example aggregate_file_size. The reaggregation process is asyncronous so a webhook will be sent with the event type being FILE_STATISTICS_AGGREGATED to notify when the process is complee. After this aggregation is complete, the updated statistics can be retrieved using the /organization endpoint. The response of /organization willalso contain a timestamp of the last time the statistics were reaggregated.
218
+ # @param [Hash] opts the optional parameters
219
+ # @return [APIResponse] data is GenericSuccessResponse, status code, headers and response
220
+ private def update_stats_with_http_info_impl(opts = {})
221
+ if @api_client.config.debugging
222
+ @api_client.config.logger.debug 'Calling API: OrganizationsApi.update_stats ...'
223
+ end
224
+ # resource path
225
+ local_var_path = '/organization/statistics'
226
+
227
+ # query parameters
228
+ query_params = opts[:query_params] || {}
229
+
230
+ # header parameters
231
+ header_params = opts[:header_params] || {}
232
+ # HTTP header 'Accept' (if needed)
233
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
234
+
235
+ # form parameters
236
+ form_params = opts[:form_params] || {}
237
+
238
+ # http body (model)
239
+ post_body = opts[:debug_body]
240
+
241
+ # return_type
242
+ return_type = opts[:debug_return_type] || 'GenericSuccessResponse'
243
+
244
+ # auth_names
245
+ auth_names = opts[:debug_auth_names] || ['apiKey']
246
+
247
+ new_options = opts.merge(
248
+ :operation => :"OrganizationsApi.update_stats",
249
+ :header_params => header_params,
250
+ :query_params => query_params,
251
+ :form_params => form_params,
252
+ :body => post_body,
253
+ :auth_names => auth_names,
254
+ :return_type => return_type
255
+ )
256
+
257
+ data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
258
+ if @api_client.config.debugging
259
+ @api_client.config.logger.debug "API called: OrganizationsApi#update_stats\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
260
+ end
261
+ APIResponse::new(data, status_code, headers, response)
262
+ end
180
263
  end
181
264
 
182
265
  # top-level client access to avoid having the user to insantiate their own API instances
@@ -47,7 +47,6 @@ module Carbon
47
47
  PNG = "PNG".freeze
48
48
  JPEG = "JPEG".freeze
49
49
  MP3 = "MP3".freeze
50
- MP4 = "MP4".freeze
51
50
  MP2 = "MP2".freeze
52
51
  AAC = "AAC".freeze
53
52
  WAV = "WAV".freeze
@@ -56,10 +55,18 @@ module Carbon
56
55
  M4_A = "M4A".freeze
57
56
  OGG = "OGG".freeze
58
57
  OPUS = "OPUS".freeze
58
+ MPEG = "MPEG".freeze
59
+ MPG = "MPG".freeze
60
+ MP4 = "MP4".freeze
61
+ WMV = "WMV".freeze
62
+ AVI = "AVI".freeze
63
+ MOV = "MOV".freeze
64
+ MKV = "MKV".freeze
65
+ FLV = "FLV".freeze
59
66
  WEBM = "WEBM".freeze
60
67
 
61
68
  def self.all_vars
62
- @all_vars ||= [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, JPG, PNG, JPEG, MP3, MP4, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, WEBM].freeze
69
+ @all_vars ||= [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, JPG, PNG, JPEG, MP3, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, MPEG, MPG, MP4, WMV, AVI, MOV, MKV, FLV, WEBM].freeze
63
70
  end
64
71
 
65
72
  # Builds the enum from string
@@ -47,7 +47,6 @@ module Carbon
47
47
  PNG = "PNG".freeze
48
48
  JPEG = "JPEG".freeze
49
49
  MP3 = "MP3".freeze
50
- MP4 = "MP4".freeze
51
50
  MP2 = "MP2".freeze
52
51
  AAC = "AAC".freeze
53
52
  WAV = "WAV".freeze
@@ -56,10 +55,18 @@ module Carbon
56
55
  M4_A = "M4A".freeze
57
56
  OGG = "OGG".freeze
58
57
  OPUS = "OPUS".freeze
58
+ MPEG = "MPEG".freeze
59
+ MPG = "MPG".freeze
60
+ MP4 = "MP4".freeze
61
+ WMV = "WMV".freeze
62
+ AVI = "AVI".freeze
63
+ MOV = "MOV".freeze
64
+ MKV = "MKV".freeze
65
+ FLV = "FLV".freeze
59
66
  WEBM = "WEBM".freeze
60
67
 
61
68
  def self.all_vars
62
- @all_vars ||= [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, JPG, PNG, JPEG, MP3, MP4, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, WEBM].freeze
69
+ @all_vars ||= [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, JPG, PNG, JPEG, MP3, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, MPEG, MPG, MP4, WMV, AVI, MOV, MKV, FLV, WEBM].freeze
63
70
  end
64
71
 
65
72
  # Builds the enum from string
@@ -15,11 +15,14 @@ module Carbon
15
15
 
16
16
  attr_accessor :html_content
17
17
 
18
+ attr_accessor :error_message
19
+
18
20
  # Attribute mapping from ruby-style variable name to JSON key.
19
21
  def self.attribute_map
20
22
  {
21
23
  :'urls' => :'urls',
22
- :'html_content' => :'html_content'
24
+ :'html_content' => :'html_content',
25
+ :'error_message' => :'error_message'
23
26
  }
24
27
  end
25
28
 
@@ -32,13 +35,15 @@ module Carbon
32
35
  def self.openapi_types
33
36
  {
34
37
  :'urls' => :'Array<String>',
35
- :'html_content' => :'String'
38
+ :'html_content' => :'String',
39
+ :'error_message' => :'String'
36
40
  }
37
41
  end
38
42
 
39
43
  # List of attributes with nullable: true
40
44
  def self.openapi_nullable
41
45
  Set.new([
46
+ :'error_message'
42
47
  ])
43
48
  end
44
49
 
@@ -66,6 +71,10 @@ module Carbon
66
71
  if attributes.key?(:'html_content')
67
72
  self.html_content = attributes[:'html_content']
68
73
  end
74
+
75
+ if attributes.key?(:'error_message')
76
+ self.error_message = attributes[:'error_message']
77
+ end
69
78
  end
70
79
 
71
80
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -97,7 +106,8 @@ module Carbon
97
106
  return true if self.equal?(o)
98
107
  self.class == o.class &&
99
108
  urls == o.urls &&
100
- html_content == o.html_content
109
+ html_content == o.html_content &&
110
+ error_message == o.error_message
101
111
  end
102
112
 
103
113
  # @see the `==` method
@@ -109,7 +119,7 @@ module Carbon
109
119
  # Calculates hash code according to all attributes.
110
120
  # @return [Integer] Hash code
111
121
  def hash
112
- [urls, html_content].hash
122
+ [urls, html_content, error_message].hash
113
123
  end
114
124
 
115
125
  # Builds the object from hash
@@ -13,9 +13,11 @@ module Carbon
13
13
  class FileContentTypes
14
14
  TEXT = "TEXT".freeze
15
15
  IMAGE = "IMAGE".freeze
16
+ AUDIO = "AUDIO".freeze
17
+ VIDEO = "VIDEO".freeze
16
18
 
17
19
  def self.all_vars
18
- @all_vars ||= [TEXT, IMAGE].freeze
20
+ @all_vars ||= [TEXT, IMAGE, AUDIO, VIDEO].freeze
19
21
  end
20
22
 
21
23
  # Builds the enum from string
@@ -13,9 +13,11 @@ module Carbon
13
13
  class FileContentTypesNullable
14
14
  TEXT = "TEXT".freeze
15
15
  IMAGE = "IMAGE".freeze
16
+ AUDIO = "AUDIO".freeze
17
+ VIDEO = "VIDEO".freeze
16
18
 
17
19
  def self.all_vars
18
- @all_vars ||= [TEXT, IMAGE].freeze
20
+ @all_vars ||= [TEXT, IMAGE, AUDIO, VIDEO].freeze
19
21
  end
20
22
 
21
23
  # Builds the enum from string
@@ -39,9 +39,7 @@ module Carbon
39
39
  GITHUB = "GITHUB".freeze
40
40
  JPG = "JPG".freeze
41
41
  PNG = "PNG".freeze
42
- MPEG = "MPEG".freeze
43
42
  MP3 = "MP3".freeze
44
- MP4 = "MP4".freeze
45
43
  MP2 = "MP2".freeze
46
44
  AAC = "AAC".freeze
47
45
  WAV = "WAV".freeze
@@ -50,10 +48,18 @@ module Carbon
50
48
  M4_A = "M4A".freeze
51
49
  OGG = "OGG".freeze
52
50
  OPUS = "OPUS".freeze
51
+ MPEG = "MPEG".freeze
52
+ MPG = "MPG".freeze
53
+ MP4 = "MP4".freeze
54
+ WMV = "WMV".freeze
55
+ AVI = "AVI".freeze
56
+ MOV = "MOV".freeze
57
+ MKV = "MKV".freeze
58
+ FLV = "FLV".freeze
53
59
  WEBM = "WEBM".freeze
54
60
 
55
61
  def self.all_vars
56
- @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, JPG, PNG, MPEG, MP3, MP4, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, WEBM].freeze
62
+ @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, JPG, PNG, MP3, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, MPEG, MPG, MP4, WMV, AVI, MOV, MKV, FLV, WEBM].freeze
57
63
  end
58
64
 
59
65
  # Builds the enum from string
@@ -39,9 +39,7 @@ module Carbon
39
39
  GITHUB = "GITHUB".freeze
40
40
  JPG = "JPG".freeze
41
41
  PNG = "PNG".freeze
42
- MPEG = "MPEG".freeze
43
42
  MP3 = "MP3".freeze
44
- MP4 = "MP4".freeze
45
43
  MP2 = "MP2".freeze
46
44
  AAC = "AAC".freeze
47
45
  WAV = "WAV".freeze
@@ -50,10 +48,18 @@ module Carbon
50
48
  M4_A = "M4A".freeze
51
49
  OGG = "OGG".freeze
52
50
  OPUS = "OPUS".freeze
51
+ MPEG = "MPEG".freeze
52
+ MPG = "MPG".freeze
53
+ MP4 = "MP4".freeze
54
+ WMV = "WMV".freeze
55
+ AVI = "AVI".freeze
56
+ MOV = "MOV".freeze
57
+ MKV = "MKV".freeze
58
+ FLV = "FLV".freeze
53
59
  WEBM = "WEBM".freeze
54
60
 
55
61
  def self.all_vars
56
- @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, JPG, PNG, MPEG, MP3, MP4, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, WEBM].freeze
62
+ @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, JPG, PNG, MP3, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, MPEG, MPG, MP4, WMV, AVI, MOV, MKV, FLV, WEBM].freeze
57
63
  end
58
64
 
59
65
  # Builds the enum from string
@@ -10,16 +10,22 @@ require 'date'
10
10
  require 'time'
11
11
 
12
12
  module Carbon
13
- class HelpdeskFileSyncConfig
14
- attr_accessor :file_types
13
+ class FileSyncConfig
14
+ # File types to automatically sync when the data source connects. Only a subset of file types can be controlled. If not supported, then they will always be synced
15
+ attr_accessor :auto_synced_source_types
15
16
 
17
+ # Automatically sync attachments from files where supported. Currently applies to Helpdesk Tickets
16
18
  attr_accessor :sync_attachments
17
19
 
20
+ # Detect audio language before transcription for audio files
21
+ attr_accessor :detect_audio_language
22
+
18
23
  # Attribute mapping from ruby-style variable name to JSON key.
19
24
  def self.attribute_map
20
25
  {
21
- :'file_types' => :'file_types',
22
- :'sync_attachments' => :'sync_attachments'
26
+ :'auto_synced_source_types' => :'auto_synced_source_types',
27
+ :'sync_attachments' => :'sync_attachments',
28
+ :'detect_audio_language' => :'detect_audio_language'
23
29
  }
24
30
  end
25
31
 
@@ -31,8 +37,9 @@ module Carbon
31
37
  # Attribute type mapping.
32
38
  def self.openapi_types
33
39
  {
34
- :'file_types' => :'Array<HelpdeskFileTypes>',
35
- :'sync_attachments' => :'Boolean'
40
+ :'auto_synced_source_types' => :'Array<HelpdeskFileTypes>',
41
+ :'sync_attachments' => :'Boolean',
42
+ :'detect_audio_language' => :'Boolean'
36
43
  }
37
44
  end
38
45
 
@@ -46,20 +53,20 @@ module Carbon
46
53
  # @param [Hash] attributes Model attributes in the form of hash
47
54
  def initialize(attributes = {})
48
55
  if (!attributes.is_a?(Hash))
49
- fail ArgumentError, "The input argument (attributes) must be a hash in `Carbon::HelpdeskFileSyncConfig` initialize method"
56
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Carbon::FileSyncConfig` initialize method"
50
57
  end
51
58
 
52
59
  # check to see if the attribute exists and convert string to symbol for hash key
53
60
  attributes = attributes.each_with_object({}) { |(k, v), h|
54
61
  if (!self.class.attribute_map.key?(k.to_sym))
55
- fail ArgumentError, "`#{k}` is not a valid attribute in `Carbon::HelpdeskFileSyncConfig`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Carbon::FileSyncConfig`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
63
  end
57
64
  h[k.to_sym] = v
58
65
  }
59
66
 
60
- if attributes.key?(:'file_types')
61
- if (value = attributes[:'file_types']).is_a?(Array)
62
- self.file_types = value
67
+ if attributes.key?(:'auto_synced_source_types')
68
+ if (value = attributes[:'auto_synced_source_types']).is_a?(Array)
69
+ self.auto_synced_source_types = value
63
70
  end
64
71
  end
65
72
 
@@ -68,6 +75,12 @@ module Carbon
68
75
  else
69
76
  self.sync_attachments = false
70
77
  end
78
+
79
+ if attributes.key?(:'detect_audio_language')
80
+ self.detect_audio_language = attributes[:'detect_audio_language']
81
+ else
82
+ self.detect_audio_language = false
83
+ end
71
84
  end
72
85
 
73
86
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -88,8 +101,9 @@ module Carbon
88
101
  def ==(o)
89
102
  return true if self.equal?(o)
90
103
  self.class == o.class &&
91
- file_types == o.file_types &&
92
- sync_attachments == o.sync_attachments
104
+ auto_synced_source_types == o.auto_synced_source_types &&
105
+ sync_attachments == o.sync_attachments &&
106
+ detect_audio_language == o.detect_audio_language
93
107
  end
94
108
 
95
109
  # @see the `==` method
@@ -101,7 +115,7 @@ module Carbon
101
115
  # Calculates hash code according to all attributes.
102
116
  # @return [Integer] Hash code
103
117
  def hash
104
- [file_types, sync_attachments].hash
118
+ [auto_synced_source_types, sync_attachments, detect_audio_language].hash
105
119
  end
106
120
 
107
121
  # Builds the object from hash
@@ -11,16 +11,22 @@ require 'time'
11
11
 
12
12
  module Carbon
13
13
  # Used to configure file syncing for certain connectors when sync_files_on_connection is set to true
14
- class HelpdeskFileSyncConfigNullable
15
- attr_accessor :file_types
14
+ class FileSyncConfigNullable
15
+ # File types to automatically sync when the data source connects. Only a subset of file types can be controlled. If not supported, then they will always be synced
16
+ attr_accessor :auto_synced_source_types
16
17
 
18
+ # Automatically sync attachments from files where supported. Currently applies to Helpdesk Tickets
17
19
  attr_accessor :sync_attachments
18
20
 
21
+ # Detect audio language before transcription for audio files
22
+ attr_accessor :detect_audio_language
23
+
19
24
  # Attribute mapping from ruby-style variable name to JSON key.
20
25
  def self.attribute_map
21
26
  {
22
- :'file_types' => :'file_types',
23
- :'sync_attachments' => :'sync_attachments'
27
+ :'auto_synced_source_types' => :'auto_synced_source_types',
28
+ :'sync_attachments' => :'sync_attachments',
29
+ :'detect_audio_language' => :'detect_audio_language'
24
30
  }
25
31
  end
26
32
 
@@ -32,8 +38,9 @@ module Carbon
32
38
  # Attribute type mapping.
33
39
  def self.openapi_types
34
40
  {
35
- :'file_types' => :'Array<HelpdeskFileTypes>',
36
- :'sync_attachments' => :'Boolean'
41
+ :'auto_synced_source_types' => :'Array<HelpdeskFileTypes>',
42
+ :'sync_attachments' => :'Boolean',
43
+ :'detect_audio_language' => :'Boolean'
37
44
  }
38
45
  end
39
46
 
@@ -47,20 +54,20 @@ module Carbon
47
54
  # @param [Hash] attributes Model attributes in the form of hash
48
55
  def initialize(attributes = {})
49
56
  if (!attributes.is_a?(Hash))
50
- fail ArgumentError, "The input argument (attributes) must be a hash in `Carbon::HelpdeskFileSyncConfigNullable` initialize method"
57
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Carbon::FileSyncConfigNullable` initialize method"
51
58
  end
52
59
 
53
60
  # check to see if the attribute exists and convert string to symbol for hash key
54
61
  attributes = attributes.each_with_object({}) { |(k, v), h|
55
62
  if (!self.class.attribute_map.key?(k.to_sym))
56
- fail ArgumentError, "`#{k}` is not a valid attribute in `Carbon::HelpdeskFileSyncConfigNullable`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
63
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Carbon::FileSyncConfigNullable`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
57
64
  end
58
65
  h[k.to_sym] = v
59
66
  }
60
67
 
61
- if attributes.key?(:'file_types')
62
- if (value = attributes[:'file_types']).is_a?(Array)
63
- self.file_types = value
68
+ if attributes.key?(:'auto_synced_source_types')
69
+ if (value = attributes[:'auto_synced_source_types']).is_a?(Array)
70
+ self.auto_synced_source_types = value
64
71
  end
65
72
  end
66
73
 
@@ -69,6 +76,12 @@ module Carbon
69
76
  else
70
77
  self.sync_attachments = false
71
78
  end
79
+
80
+ if attributes.key?(:'detect_audio_language')
81
+ self.detect_audio_language = attributes[:'detect_audio_language']
82
+ else
83
+ self.detect_audio_language = false
84
+ end
72
85
  end
73
86
 
74
87
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -89,8 +102,9 @@ module Carbon
89
102
  def ==(o)
90
103
  return true if self.equal?(o)
91
104
  self.class == o.class &&
92
- file_types == o.file_types &&
93
- sync_attachments == o.sync_attachments
105
+ auto_synced_source_types == o.auto_synced_source_types &&
106
+ sync_attachments == o.sync_attachments &&
107
+ detect_audio_language == o.detect_audio_language
94
108
  end
95
109
 
96
110
  # @see the `==` method
@@ -102,7 +116,7 @@ module Carbon
102
116
  # Calculates hash code according to all attributes.
103
117
  # @return [Integer] Hash code
104
118
  def hash
105
- [file_types, sync_attachments].hash
119
+ [auto_synced_source_types, sync_attachments, detect_audio_language].hash
106
120
  end
107
121
 
108
122
  # Builds the object from hash
@@ -77,7 +77,7 @@ module Carbon
77
77
  :'sync_files_on_connection' => :'Boolean',
78
78
  :'request_id' => :'String',
79
79
  :'sync_source_items' => :'Boolean',
80
- :'file_sync_config' => :'HelpdeskFileSyncConfigNullable'
80
+ :'file_sync_config' => :'FileSyncConfigNullable'
81
81
  }
82
82
  end
83
83
 
@@ -33,6 +33,8 @@ module Carbon
33
33
 
34
34
  attr_accessor :sync_attachments
35
35
 
36
+ attr_accessor :file_sync_config
37
+
36
38
  attr_accessor :incremental_sync
37
39
 
38
40
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -49,6 +51,7 @@ module Carbon
49
51
  :'data_source_id' => :'data_source_id',
50
52
  :'request_id' => :'request_id',
51
53
  :'sync_attachments' => :'sync_attachments',
54
+ :'file_sync_config' => :'file_sync_config',
52
55
  :'incremental_sync' => :'incremental_sync'
53
56
  }
54
57
  end
@@ -72,6 +75,7 @@ module Carbon
72
75
  :'data_source_id' => :'Integer',
73
76
  :'request_id' => :'String',
74
77
  :'sync_attachments' => :'Boolean',
78
+ :'file_sync_config' => :'FileSyncConfigNullable',
75
79
  :'incremental_sync' => :'Boolean'
76
80
  }
77
81
  end
@@ -88,6 +92,7 @@ module Carbon
88
92
  :'data_source_id',
89
93
  :'request_id',
90
94
  :'sync_attachments',
95
+ :'file_sync_config',
91
96
  ])
92
97
  end
93
98
 
@@ -164,6 +169,10 @@ module Carbon
164
169
  self.sync_attachments = false
165
170
  end
166
171
 
172
+ if attributes.key?(:'file_sync_config')
173
+ self.file_sync_config = attributes[:'file_sync_config']
174
+ end
175
+
167
176
  if attributes.key?(:'incremental_sync')
168
177
  self.incremental_sync = attributes[:'incremental_sync']
169
178
  else
@@ -205,6 +214,7 @@ module Carbon
205
214
  data_source_id == o.data_source_id &&
206
215
  request_id == o.request_id &&
207
216
  sync_attachments == o.sync_attachments &&
217
+ file_sync_config == o.file_sync_config &&
208
218
  incremental_sync == o.incremental_sync
209
219
  end
210
220
 
@@ -217,7 +227,7 @@ module Carbon
217
227
  # Calculates hash code according to all attributes.
218
228
  # @return [Integer] Hash code
219
229
  def hash
220
- [tags, filters, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, generate_sparse_vectors, prepend_filename_to_chunks, data_source_id, request_id, sync_attachments, incremental_sync].hash
230
+ [tags, filters, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, generate_sparse_vectors, prepend_filename_to_chunks, data_source_id, request_id, sync_attachments, file_sync_config, incremental_sync].hash
221
231
  end
222
232
 
223
233
  # Builds the object from hash
@@ -61,7 +61,7 @@ module Carbon
61
61
 
62
62
  attr_accessor :parse_pdf_tables_with_ocr
63
63
 
64
- # Enable integration's file picker for sources that support it. Supported sources: SHAREPOINT, DROPBOX, BOX, GOOGLE_DRIVE, ONEDRIVE
64
+ # Enable integration's file picker for sources that support it. Supported sources: SHAREPOINT, DROPBOX, GOOGLE_DRIVE, BOX, ONEDRIVE
65
65
  attr_accessor :enable_file_picker
66
66
 
67
67
  # Enabling this flag will fetch all available content from the source to be listed via list items endpoint
@@ -137,7 +137,7 @@ module Carbon
137
137
  :'enable_file_picker' => :'Boolean',
138
138
  :'sync_source_items' => :'Boolean',
139
139
  :'incremental_sync' => :'Boolean',
140
- :'file_sync_config' => :'HelpdeskFileSyncConfigNullable'
140
+ :'file_sync_config' => :'FileSyncConfigNullable'
141
141
  }
142
142
  end
143
143
 
@@ -279,7 +279,7 @@ module Carbon
279
279
  if attributes.key?(:'request_id')
280
280
  self.request_id = attributes[:'request_id']
281
281
  else
282
- self.request_id = 'a0b57844-5937-42ef-a161-2515fc4f16df'
282
+ self.request_id = '273420dd-e05c-463f-a3cf-0ff28029639e'
283
283
  end
284
284
 
285
285
  if attributes.key?(:'use_ocr')