carbon_ruby_sdk 0.1.16 → 0.1.17

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1b9c59c27e714c201ab1212acc804208dfaedf059bad3f9d5043f51ed9ec9feb
4
- data.tar.gz: eef702a430ef7bee9eb012cb5041e0edf25edfabe42716c9149c06f11c01e225
3
+ metadata.gz: 41b973ad8e62b552db19546d3a3755e4c16c9212de8cf9ea371ce39d1a505387
4
+ data.tar.gz: 18d9889d6e9f99f2c02d97408d4620d1c768eb7d2519f9cbebccedef375dd3c7
5
5
  SHA512:
6
- metadata.gz: c05fe1d2089fafbf63df59c8eb207c0ebc8586bcc4c77fc280834f189f9eb607557e13af512f2f7a43baf91fc3a9c64b490d0d95bae29857a6e833aea04f3ea3
7
- data.tar.gz: f90d950b0c378bd7b732be4775c92f775d368674c033d9abf8d06930cc13ccea1b43e920e3d13756175872d470da72bea1d803e5c73ffe0636ed584966e3e337
6
+ metadata.gz: 8e66f4386a86fb62c0da7a79ddb0dc197b6de76a90ba267913d79e2136ee58e92b42f5ddc591c45b5e171b450e557276c2429d91e8f49937eab0cd8b13c1b58f
7
+ data.tar.gz: bb3f6bb1a28029ea0312dd539720c4d2f5cae934817d240eeee4b8b24a7ce27a663e584e2c44c7837a47f54f8d48784227eb7c13f0f50ef0164ca05c3174921e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- carbon_ruby_sdk (0.1.15)
4
+ carbon_ruby_sdk (0.1.17)
5
5
  faraday (>= 1.0.1, < 3.0)
6
6
  faraday-multipart (~> 1.0, >= 1.0.4)
7
7
 
data/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  Connect external data to LLMs, no matter the source.
8
8
 
9
- [![npm](https://img.shields.io/badge/gem-v0.1.16-blue)](https://rubygems.org/gems/carbon_ruby_sdk/versions/0.1.16)
9
+ [![npm](https://img.shields.io/badge/gem-v0.1.17-blue)](https://rubygems.org/gems/carbon_ruby_sdk/versions/0.1.17)
10
10
 
11
11
  </div>
12
12
 
@@ -80,7 +80,7 @@ Connect external data to LLMs, no matter the source.
80
80
  Add to Gemfile:
81
81
 
82
82
  ```ruby
83
- gem 'carbon_ruby_sdk', '~> 0.1.16'
83
+ gem 'carbon_ruby_sdk', '~> 0.1.17'
84
84
  ```
85
85
 
86
86
  ## Getting Started<a id="getting-started"></a>
@@ -1186,6 +1186,7 @@ result = carbon.integrations.connect_data_source(
1186
1186
  "prepend_filename_to_chunks" => false,
1187
1187
  "sync_files_on_connection" => true,
1188
1188
  "set_page_as_boundary" => false,
1189
+ "enable_file_picker" => true,
1189
1190
  },
1190
1191
  )
1191
1192
  p result
@@ -1383,6 +1384,7 @@ result = carbon.integrations.get_oauth_url(
1383
1384
  request_id: "string_example",
1384
1385
  use_ocr: false,
1385
1386
  parse_pdf_tables_with_ocr: false,
1387
+ enable_file_picker: true,
1386
1388
  )
1387
1389
  p result
1388
1390
  ```
@@ -1430,6 +1432,10 @@ OAuth URL
1430
1432
  Enable OCR for files that support it. Supported formats: pdf
1431
1433
 
1432
1434
  ##### parse_pdf_tables_with_ocr: `Boolean`<a id="parse_pdf_tables_with_ocr-boolean"></a>
1435
+ ##### enable_file_picker: `Boolean`<a id="enable_file_picker-boolean"></a>
1436
+ Enable integration's file picker for sources that support it. Supported sources:
1437
+ DROPBOX, BOX, GOOGLE_DRIVE, SHAREPOINT, ONEDRIVE
1438
+
1433
1439
  #### 🔄 Return<a id="🔄-return"></a>
1434
1440
 
1435
1441
  [OuthURLResponse](./lib/carbon_ruby_sdk/models/outh_url_response.rb)
@@ -2265,7 +2271,8 @@ result = carbon.users.update_users(
2265
2271
  auto_sync_enabled_sources: [
2266
2272
  "string_example"
2267
2273
  ],
2268
- file_upload_limit: 1,
2274
+ max_files: -1,
2275
+ max_files_per_upload: -1,
2269
2276
  )
2270
2277
  p result
2271
2278
  ```
@@ -2276,9 +2283,15 @@ p result
2276
2283
  List of organization supplied user IDs
2277
2284
 
2278
2285
  ##### auto_sync_enabled_sources: [`AutoSyncEnabledSourcesProperty`](./lib/carbon_ruby_sdk/models/auto_sync_enabled_sources_property.rb)<a id="auto_sync_enabled_sources-autosyncenabledsourcespropertylibcarbon_ruby_sdkmodelsauto_sync_enabled_sources_propertyrb"></a>
2279
- ##### file_upload_limit: `Integer`<a id="file_upload_limit-integer"></a>
2280
- Custom file upload limit for the user. If set, then the user will not be allowed
2281
- to upload more files than this limit
2286
+ ##### max_files: `Integer`<a id="max_files-integer"></a>
2287
+ Custom file upload limit for the user over *all* user's files across all
2288
+ uploads. If set, then the user will not be allowed to upload more files than
2289
+ this limit. If not set, or if set to -1, then the user will have no limit.
2290
+
2291
+ ##### max_files_per_upload: `Integer`<a id="max_files_per_upload-integer"></a>
2292
+ Custom file upload limit for the user across a single upload. If set, then the
2293
+ user will not be allowed to upload more files than this limit in a single
2294
+ upload. If not set, or if set to -1, then the user will have no limit.
2282
2295
 
2283
2296
  #### 🔄 Return<a id="🔄-return"></a>
2284
2297
 
@@ -545,9 +545,10 @@ module Carbon
545
545
  # @param request_id [String] This request id will be added to all files that get synced using the generated OAuth URL
546
546
  # @param use_ocr [Boolean] Enable OCR for files that support it. Supported formats: pdf
547
547
  # @param parse_pdf_tables_with_ocr [Boolean]
548
+ # @param enable_file_picker [Boolean] Enable integration's file picker for sources that support it. Supported sources: DROPBOX, BOX, GOOGLE_DRIVE, SHAREPOINT, ONEDRIVE
548
549
  # @param body [OAuthURLRequest]
549
550
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
550
- def get_oauth_url(service:, tags: SENTINEL, scope: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', zendesk_subdomain: SENTINEL, microsoft_tenant: SENTINEL, sharepoint_site_name: SENTINEL, confluence_subdomain: SENTINEL, generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, salesforce_domain: SENTINEL, sync_files_on_connection: true, set_page_as_boundary: false, data_source_id: SENTINEL, connecting_new_account: false, request_id: SENTINEL, use_ocr: false, parse_pdf_tables_with_ocr: false, extra: {})
551
+ def get_oauth_url(service:, tags: SENTINEL, scope: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', zendesk_subdomain: SENTINEL, microsoft_tenant: SENTINEL, sharepoint_site_name: SENTINEL, confluence_subdomain: SENTINEL, generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, salesforce_domain: SENTINEL, sync_files_on_connection: true, set_page_as_boundary: false, data_source_id: SENTINEL, connecting_new_account: false, request_id: SENTINEL, use_ocr: false, parse_pdf_tables_with_ocr: false, enable_file_picker: true, extra: {})
551
552
  _body = {}
552
553
  _body[:tags] = tags if tags != SENTINEL
553
554
  _body[:scope] = scope if scope != SENTINEL
@@ -571,6 +572,7 @@ module Carbon
571
572
  _body[:request_id] = request_id if request_id != SENTINEL
572
573
  _body[:use_ocr] = use_ocr if use_ocr != SENTINEL
573
574
  _body[:parse_pdf_tables_with_ocr] = parse_pdf_tables_with_ocr if parse_pdf_tables_with_ocr != SENTINEL
575
+ _body[:enable_file_picker] = enable_file_picker if enable_file_picker != SENTINEL
574
576
  o_auth_url_request = _body
575
577
  api_response = get_oauth_url_with_http_info_impl(o_auth_url_request, extra)
576
578
  api_response.data
@@ -605,9 +607,10 @@ module Carbon
605
607
  # @param request_id [String] This request id will be added to all files that get synced using the generated OAuth URL
606
608
  # @param use_ocr [Boolean] Enable OCR for files that support it. Supported formats: pdf
607
609
  # @param parse_pdf_tables_with_ocr [Boolean]
610
+ # @param enable_file_picker [Boolean] Enable integration's file picker for sources that support it. Supported sources: DROPBOX, BOX, GOOGLE_DRIVE, SHAREPOINT, ONEDRIVE
608
611
  # @param body [OAuthURLRequest]
609
612
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
610
- def get_oauth_url_with_http_info(service:, tags: SENTINEL, scope: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', zendesk_subdomain: SENTINEL, microsoft_tenant: SENTINEL, sharepoint_site_name: SENTINEL, confluence_subdomain: SENTINEL, generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, salesforce_domain: SENTINEL, sync_files_on_connection: true, set_page_as_boundary: false, data_source_id: SENTINEL, connecting_new_account: false, request_id: SENTINEL, use_ocr: false, parse_pdf_tables_with_ocr: false, extra: {})
613
+ def get_oauth_url_with_http_info(service:, tags: SENTINEL, scope: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', zendesk_subdomain: SENTINEL, microsoft_tenant: SENTINEL, sharepoint_site_name: SENTINEL, confluence_subdomain: SENTINEL, generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, salesforce_domain: SENTINEL, sync_files_on_connection: true, set_page_as_boundary: false, data_source_id: SENTINEL, connecting_new_account: false, request_id: SENTINEL, use_ocr: false, parse_pdf_tables_with_ocr: false, enable_file_picker: true, extra: {})
611
614
  _body = {}
612
615
  _body[:tags] = tags if tags != SENTINEL
613
616
  _body[:scope] = scope if scope != SENTINEL
@@ -631,6 +634,7 @@ module Carbon
631
634
  _body[:request_id] = request_id if request_id != SENTINEL
632
635
  _body[:use_ocr] = use_ocr if use_ocr != SENTINEL
633
636
  _body[:parse_pdf_tables_with_ocr] = parse_pdf_tables_with_ocr if parse_pdf_tables_with_ocr != SENTINEL
637
+ _body[:enable_file_picker] = enable_file_picker if enable_file_picker != SENTINEL
634
638
  o_auth_url_request = _body
635
639
  get_oauth_url_with_http_info_impl(o_auth_url_request, extra)
636
640
  end
@@ -300,14 +300,16 @@ module Carbon
300
300
  #
301
301
  # @param customer_ids [Array<String>] List of organization supplied user IDs
302
302
  # @param auto_sync_enabled_sources [AutoSyncEnabledSourcesProperty]
303
- # @param file_upload_limit [Integer] Custom file upload limit for the user. If set, then the user will not be allowed to upload more files than this limit
303
+ # @param max_files [Integer] Custom file upload limit for the user over *all* user's files across all uploads. If set, then the user will not be allowed to upload more files than this limit. If not set, or if set to -1, then the user will have no limit.
304
+ # @param max_files_per_upload [Integer] Custom file upload limit for the user across a single upload. If set, then the user will not be allowed to upload more files than this limit in a single upload. If not set, or if set to -1, then the user will have no limit.
304
305
  # @param body [UpdateUsersInput]
305
306
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
306
- def update_users(customer_ids:, auto_sync_enabled_sources: SENTINEL, file_upload_limit: SENTINEL, extra: {})
307
+ def update_users(customer_ids:, auto_sync_enabled_sources: SENTINEL, max_files: SENTINEL, max_files_per_upload: SENTINEL, extra: {})
307
308
  _body = {}
308
309
  _body[:customer_ids] = customer_ids if customer_ids != SENTINEL
309
310
  _body[:auto_sync_enabled_sources] = auto_sync_enabled_sources if auto_sync_enabled_sources != SENTINEL
310
- _body[:file_upload_limit] = file_upload_limit if file_upload_limit != SENTINEL
311
+ _body[:max_files] = max_files if max_files != SENTINEL
312
+ _body[:max_files_per_upload] = max_files_per_upload if max_files_per_upload != SENTINEL
311
313
  update_users_input = _body
312
314
  api_response = update_users_with_http_info_impl(update_users_input, extra)
313
315
  api_response.data
@@ -317,14 +319,16 @@ module Carbon
317
319
  #
318
320
  # @param customer_ids [Array<String>] List of organization supplied user IDs
319
321
  # @param auto_sync_enabled_sources [AutoSyncEnabledSourcesProperty]
320
- # @param file_upload_limit [Integer] Custom file upload limit for the user. If set, then the user will not be allowed to upload more files than this limit
322
+ # @param max_files [Integer] Custom file upload limit for the user over *all* user's files across all uploads. If set, then the user will not be allowed to upload more files than this limit. If not set, or if set to -1, then the user will have no limit.
323
+ # @param max_files_per_upload [Integer] Custom file upload limit for the user across a single upload. If set, then the user will not be allowed to upload more files than this limit in a single upload. If not set, or if set to -1, then the user will have no limit.
321
324
  # @param body [UpdateUsersInput]
322
325
  # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
323
- def update_users_with_http_info(customer_ids:, auto_sync_enabled_sources: SENTINEL, file_upload_limit: SENTINEL, extra: {})
326
+ def update_users_with_http_info(customer_ids:, auto_sync_enabled_sources: SENTINEL, max_files: SENTINEL, max_files_per_upload: SENTINEL, extra: {})
324
327
  _body = {}
325
328
  _body[:customer_ids] = customer_ids if customer_ids != SENTINEL
326
329
  _body[:auto_sync_enabled_sources] = auto_sync_enabled_sources if auto_sync_enabled_sources != SENTINEL
327
- _body[:file_upload_limit] = file_upload_limit if file_upload_limit != SENTINEL
330
+ _body[:max_files] = max_files if max_files != SENTINEL
331
+ _body[:max_files_per_upload] = max_files_per_upload if max_files_per_upload != SENTINEL
328
332
  update_users_input = _body
329
333
  update_users_with_http_info_impl(update_users_input, extra)
330
334
  end
@@ -43,6 +43,7 @@ module Carbon
43
43
  SALESFORCE = "SALESFORCE".freeze
44
44
  JPG = "JPG".freeze
45
45
  PNG = "PNG".freeze
46
+ JPEG = "JPEG".freeze
46
47
  MP3 = "MP3".freeze
47
48
  MP4 = "MP4".freeze
48
49
  MP2 = "MP2".freeze
@@ -56,7 +57,7 @@ module Carbon
56
57
  WEBM = "WEBM".freeze
57
58
 
58
59
  def self.all_vars
59
- @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, RAW_TEXT, WEB_SCRAPE, RSS_FEED, FRESHDESK, GITBOOK, SALESFORCE, JPG, PNG, MP3, MP4, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, WEBM].freeze
60
+ @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, RAW_TEXT, WEB_SCRAPE, RSS_FEED, FRESHDESK, GITBOOK, SALESFORCE, JPG, PNG, JPEG, MP3, MP4, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, WEBM].freeze
60
61
  end
61
62
 
62
63
  # Builds the enum from string
@@ -43,6 +43,7 @@ module Carbon
43
43
  SALESFORCE = "SALESFORCE".freeze
44
44
  JPG = "JPG".freeze
45
45
  PNG = "PNG".freeze
46
+ JPEG = "JPEG".freeze
46
47
  MP3 = "MP3".freeze
47
48
  MP4 = "MP4".freeze
48
49
  MP2 = "MP2".freeze
@@ -56,7 +57,7 @@ module Carbon
56
57
  WEBM = "WEBM".freeze
57
58
 
58
59
  def self.all_vars
59
- @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, RAW_TEXT, WEB_SCRAPE, RSS_FEED, FRESHDESK, GITBOOK, SALESFORCE, JPG, PNG, MP3, MP4, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, WEBM].freeze
60
+ @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, RAW_TEXT, WEB_SCRAPE, RSS_FEED, FRESHDESK, GITBOOK, SALESFORCE, JPG, PNG, JPEG, MP3, MP4, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, WEBM].freeze
60
61
  end
61
62
 
62
63
  # Builds the enum from string
@@ -61,6 +61,9 @@ 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: DROPBOX, BOX, GOOGLE_DRIVE, SHAREPOINT, ONEDRIVE
65
+ attr_accessor :enable_file_picker
66
+
64
67
  # Attribute mapping from ruby-style variable name to JSON key.
65
68
  def self.attribute_map
66
69
  {
@@ -85,7 +88,8 @@ module Carbon
85
88
  :'connecting_new_account' => :'connecting_new_account',
86
89
  :'request_id' => :'request_id',
87
90
  :'use_ocr' => :'use_ocr',
88
- :'parse_pdf_tables_with_ocr' => :'parse_pdf_tables_with_ocr'
91
+ :'parse_pdf_tables_with_ocr' => :'parse_pdf_tables_with_ocr',
92
+ :'enable_file_picker' => :'enable_file_picker'
89
93
  }
90
94
  end
91
95
 
@@ -118,7 +122,8 @@ module Carbon
118
122
  :'connecting_new_account' => :'Boolean',
119
123
  :'request_id' => :'String',
120
124
  :'use_ocr' => :'Boolean',
121
- :'parse_pdf_tables_with_ocr' => :'Boolean'
125
+ :'parse_pdf_tables_with_ocr' => :'Boolean',
126
+ :'enable_file_picker' => :'Boolean'
122
127
  }
123
128
  end
124
129
 
@@ -144,7 +149,7 @@ module Carbon
144
149
  :'connecting_new_account',
145
150
  :'request_id',
146
151
  :'use_ocr',
147
- :'parse_pdf_tables_with_ocr'
152
+ :'parse_pdf_tables_with_ocr',
148
153
  ])
149
154
  end
150
155
 
@@ -272,6 +277,12 @@ module Carbon
272
277
  else
273
278
  self.parse_pdf_tables_with_ocr = false
274
279
  end
280
+
281
+ if attributes.key?(:'enable_file_picker')
282
+ self.enable_file_picker = attributes[:'enable_file_picker']
283
+ else
284
+ self.enable_file_picker = true
285
+ end
275
286
  end
276
287
 
277
288
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -318,7 +329,8 @@ module Carbon
318
329
  connecting_new_account == o.connecting_new_account &&
319
330
  request_id == o.request_id &&
320
331
  use_ocr == o.use_ocr &&
321
- parse_pdf_tables_with_ocr == o.parse_pdf_tables_with_ocr
332
+ parse_pdf_tables_with_ocr == o.parse_pdf_tables_with_ocr &&
333
+ enable_file_picker == o.enable_file_picker
322
334
  end
323
335
 
324
336
  # @see the `==` method
@@ -330,7 +342,7 @@ module Carbon
330
342
  # Calculates hash code according to all attributes.
331
343
  # @return [Integer] Hash code
332
344
  def hash
333
- [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].hash
345
+ [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].hash
334
346
  end
335
347
 
336
348
  # Builds the object from hash
@@ -33,6 +33,8 @@ module Carbon
33
33
 
34
34
  attr_accessor :set_page_as_boundary
35
35
 
36
+ attr_accessor :enable_file_picker
37
+
36
38
  # Attribute mapping from ruby-style variable name to JSON key.
37
39
  def self.attribute_map
38
40
  {
@@ -45,7 +47,8 @@ module Carbon
45
47
  :'prepend_filename_to_chunks' => :'prepend_filename_to_chunks',
46
48
  :'max_items_per_chunk' => :'max_items_per_chunk',
47
49
  :'sync_files_on_connection' => :'sync_files_on_connection',
48
- :'set_page_as_boundary' => :'set_page_as_boundary'
50
+ :'set_page_as_boundary' => :'set_page_as_boundary',
51
+ :'enable_file_picker' => :'enable_file_picker'
49
52
  }
50
53
  end
51
54
 
@@ -66,7 +69,8 @@ module Carbon
66
69
  :'prepend_filename_to_chunks' => :'Boolean',
67
70
  :'max_items_per_chunk' => :'Integer',
68
71
  :'sync_files_on_connection' => :'Boolean',
69
- :'set_page_as_boundary' => :'Boolean'
72
+ :'set_page_as_boundary' => :'Boolean',
73
+ :'enable_file_picker' => :'Boolean'
70
74
  }
71
75
  end
72
76
 
@@ -155,6 +159,12 @@ module Carbon
155
159
  else
156
160
  self.set_page_as_boundary = false
157
161
  end
162
+
163
+ if attributes.key?(:'enable_file_picker')
164
+ self.enable_file_picker = attributes[:'enable_file_picker']
165
+ else
166
+ self.enable_file_picker = true
167
+ end
158
168
  end
159
169
 
160
170
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -184,7 +194,8 @@ module Carbon
184
194
  prepend_filename_to_chunks == o.prepend_filename_to_chunks &&
185
195
  max_items_per_chunk == o.max_items_per_chunk &&
186
196
  sync_files_on_connection == o.sync_files_on_connection &&
187
- set_page_as_boundary == o.set_page_as_boundary
197
+ set_page_as_boundary == o.set_page_as_boundary &&
198
+ enable_file_picker == o.enable_file_picker
188
199
  end
189
200
 
190
201
  # @see the `==` method
@@ -196,7 +207,7 @@ module Carbon
196
207
  # Calculates hash code according to all attributes.
197
208
  # @return [Integer] Hash code
198
209
  def hash
199
- [tags, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, generate_sparse_vectors, prepend_filename_to_chunks, max_items_per_chunk, sync_files_on_connection, set_page_as_boundary].hash
210
+ [tags, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, generate_sparse_vectors, prepend_filename_to_chunks, max_items_per_chunk, sync_files_on_connection, set_page_as_boundary, enable_file_picker].hash
200
211
  end
201
212
 
202
213
  # Builds the object from hash
@@ -16,15 +16,19 @@ module Carbon
16
16
 
17
17
  attr_accessor :auto_sync_enabled_sources
18
18
 
19
- # Custom file upload limit for the user. If set, then the user will not be allowed to upload more files than this limit
20
- attr_accessor :file_upload_limit
19
+ # Custom file upload limit for the user over *all* user's files across all uploads. If set, then the user will not be allowed to upload more files than this limit. If not set, or if set to -1, then the user will have no limit.
20
+ attr_accessor :max_files
21
+
22
+ # Custom file upload limit for the user across a single upload. If set, then the user will not be allowed to upload more files than this limit in a single upload. If not set, or if set to -1, then the user will have no limit.
23
+ attr_accessor :max_files_per_upload
21
24
 
22
25
  # Attribute mapping from ruby-style variable name to JSON key.
23
26
  def self.attribute_map
24
27
  {
25
28
  :'customer_ids' => :'customer_ids',
26
29
  :'auto_sync_enabled_sources' => :'auto_sync_enabled_sources',
27
- :'file_upload_limit' => :'file_upload_limit'
30
+ :'max_files' => :'max_files',
31
+ :'max_files_per_upload' => :'max_files_per_upload'
28
32
  }
29
33
  end
30
34
 
@@ -38,7 +42,8 @@ module Carbon
38
42
  {
39
43
  :'customer_ids' => :'Array<String>',
40
44
  :'auto_sync_enabled_sources' => :'AutoSyncEnabledSourcesProperty',
41
- :'file_upload_limit' => :'Integer'
45
+ :'max_files' => :'Integer',
46
+ :'max_files_per_upload' => :'Integer'
42
47
  }
43
48
  end
44
49
 
@@ -46,7 +51,8 @@ module Carbon
46
51
  def self.openapi_nullable
47
52
  Set.new([
48
53
  :'auto_sync_enabled_sources',
49
- :'file_upload_limit'
54
+ :'max_files',
55
+ :'max_files_per_upload'
50
56
  ])
51
57
  end
52
58
 
@@ -75,8 +81,12 @@ module Carbon
75
81
  self.auto_sync_enabled_sources = attributes[:'auto_sync_enabled_sources']
76
82
  end
77
83
 
78
- if attributes.key?(:'file_upload_limit')
79
- self.file_upload_limit = attributes[:'file_upload_limit']
84
+ if attributes.key?(:'max_files')
85
+ self.max_files = attributes[:'max_files']
86
+ end
87
+
88
+ if attributes.key?(:'max_files_per_upload')
89
+ self.max_files_per_upload = attributes[:'max_files_per_upload']
80
90
  end
81
91
  end
82
92
 
@@ -92,6 +102,14 @@ module Carbon
92
102
  invalid_properties.push('invalid value for "customer_ids", number of items must be less than or equal to 100.')
93
103
  end
94
104
 
105
+ if !@max_files.nil? && @max_files < -1
106
+ invalid_properties.push('invalid value for "max_files", must be greater than or equal to -1.')
107
+ end
108
+
109
+ if !@max_files_per_upload.nil? && @max_files_per_upload < -1
110
+ invalid_properties.push('invalid value for "max_files_per_upload", must be greater than or equal to -1.')
111
+ end
112
+
95
113
  invalid_properties
96
114
  end
97
115
 
@@ -100,6 +118,8 @@ module Carbon
100
118
  def valid?
101
119
  return false if @customer_ids.nil?
102
120
  return false if @customer_ids.length > 100
121
+ return false if !@max_files.nil? && @max_files < -1
122
+ return false if !@max_files_per_upload.nil? && @max_files_per_upload < -1
103
123
  true
104
124
  end
105
125
 
@@ -117,6 +137,26 @@ module Carbon
117
137
  @customer_ids = customer_ids
118
138
  end
119
139
 
140
+ # Custom attribute writer method with validation
141
+ # @param [Object] max_files Value to be assigned
142
+ def max_files=(max_files)
143
+ if !max_files.nil? && max_files < -1
144
+ fail ArgumentError, 'invalid value for "max_files", must be greater than or equal to -1.'
145
+ end
146
+
147
+ @max_files = max_files
148
+ end
149
+
150
+ # Custom attribute writer method with validation
151
+ # @param [Object] max_files_per_upload Value to be assigned
152
+ def max_files_per_upload=(max_files_per_upload)
153
+ if !max_files_per_upload.nil? && max_files_per_upload < -1
154
+ fail ArgumentError, 'invalid value for "max_files_per_upload", must be greater than or equal to -1.'
155
+ end
156
+
157
+ @max_files_per_upload = max_files_per_upload
158
+ end
159
+
120
160
  # Checks equality by comparing each attribute.
121
161
  # @param [Object] Object to be compared
122
162
  def ==(o)
@@ -124,7 +164,8 @@ module Carbon
124
164
  self.class == o.class &&
125
165
  customer_ids == o.customer_ids &&
126
166
  auto_sync_enabled_sources == o.auto_sync_enabled_sources &&
127
- file_upload_limit == o.file_upload_limit
167
+ max_files == o.max_files &&
168
+ max_files_per_upload == o.max_files_per_upload
128
169
  end
129
170
 
130
171
  # @see the `==` method
@@ -136,7 +177,7 @@ module Carbon
136
177
  # Calculates hash code according to all attributes.
137
178
  # @return [Integer] Hash code
138
179
  def hash
139
- [customer_ids, auto_sync_enabled_sources, file_upload_limit].hash
180
+ [customer_ids, auto_sync_enabled_sources, max_files, max_files_per_upload].hash
140
181
  end
141
182
 
142
183
  # Builds the object from hash
@@ -7,5 +7,5 @@ The version of the OpenAPI document: 1.0.0
7
7
  =end
8
8
 
9
9
  module Carbon
10
- VERSION = '0.1.16'
10
+ VERSION = '0.1.17'
11
11
  end
@@ -151,4 +151,10 @@ describe Carbon::OAuthURLRequest do
151
151
  end
152
152
  end
153
153
 
154
+ describe 'test attribute "enable_file_picker"' do
155
+ it 'should work' do
156
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
157
+ end
158
+ end
159
+
154
160
  end
@@ -79,4 +79,10 @@ describe Carbon::SyncOptions do
79
79
  end
80
80
  end
81
81
 
82
+ describe 'test attribute "enable_file_picker"' do
83
+ it 'should work' do
84
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
85
+ end
86
+ end
87
+
82
88
  end
@@ -31,7 +31,13 @@ describe Carbon::UpdateUsersInput do
31
31
  end
32
32
  end
33
33
 
34
- describe 'test attribute "file_upload_limit"' do
34
+ describe 'test attribute "max_files"' do
35
+ it 'should work' do
36
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
37
+ end
38
+ end
39
+
40
+ describe 'test attribute "max_files_per_upload"' do
35
41
  it 'should work' do
36
42
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
37
43
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carbon_ruby_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.16
4
+ version: 0.1.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konfig
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-10 00:00:00.000000000 Z
11
+ date: 2024-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday