carbon_ruby_sdk 0.1.18 → 0.1.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +6 -6
- data/README.md +3 -3
- data/lib/carbon_ruby_sdk/api/integrations_api.rb +2 -2
- data/lib/carbon_ruby_sdk/models/o_auth_url_request.rb +1 -1
- data/lib/carbon_ruby_sdk/models/organization_user_data_source_api.rb +18 -4
- data/lib/carbon_ruby_sdk/models/sync_options.rb +11 -1
- data/lib/carbon_ruby_sdk/version.rb +1 -1
- data/spec/models/organization_user_data_source_api_spec.rb +6 -0
- data/spec/models/sync_options_spec.rb +6 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f6cf35df8f818988583c33069bd6edf623ba084d4f1766d9453381dff9efd5e
|
4
|
+
data.tar.gz: bd95141916d06bc935f75c0bccbfffb875165f735c6078175d7ae04d89525e57
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9c4264421797407245bd7becebb8454ce513b608b8e87555b3331d6c4c9191179ce111f9e17a11bf02c20906dcfdfc8e0baca1a465aa95f845e80ca8ad476ce
|
7
|
+
data.tar.gz: b48a281cab2711645c6b1a45d369d99dc4422cee614049406ed41172162f1863e2ba71b7723c48af876730ccb7391e707fc46328967ddaaa72d45eb8249ddd71
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
carbon_ruby_sdk (0.1.
|
4
|
+
carbon_ruby_sdk (0.1.19)
|
5
5
|
faraday (>= 1.0.1, < 3.0)
|
6
6
|
faraday-multipart (~> 1.0, >= 1.0.4)
|
7
7
|
|
@@ -42,7 +42,7 @@ GEM
|
|
42
42
|
rainbow (3.1.1)
|
43
43
|
rake (13.0.6)
|
44
44
|
regexp_parser (2.9.0)
|
45
|
-
reline (0.
|
45
|
+
reline (0.5.0)
|
46
46
|
io-console (~> 0.5)
|
47
47
|
rexml (3.2.6)
|
48
48
|
rspec (3.13.0)
|
@@ -67,14 +67,14 @@ GEM
|
|
67
67
|
rubocop-ast (>= 1.2.0, < 2.0)
|
68
68
|
ruby-progressbar (~> 1.7)
|
69
69
|
unicode-display_width (>= 1.4.0, < 3.0)
|
70
|
-
rubocop-ast (1.
|
71
|
-
parser (>= 3.
|
70
|
+
rubocop-ast (1.31.2)
|
71
|
+
parser (>= 3.3.0.4)
|
72
72
|
ruby-progressbar (1.13.0)
|
73
73
|
unicode-display_width (2.5.0)
|
74
74
|
uri (0.13.0)
|
75
75
|
|
76
76
|
PLATFORMS
|
77
|
-
arm64-darwin-
|
77
|
+
arm64-darwin-22
|
78
78
|
|
79
79
|
DEPENDENCIES
|
80
80
|
carbon_ruby_sdk!
|
@@ -86,4 +86,4 @@ DEPENDENCIES
|
|
86
86
|
rubocop (~> 1.12.1)
|
87
87
|
|
88
88
|
BUNDLED WITH
|
89
|
-
2.
|
89
|
+
2.4.19
|
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.
|
9
|
+
[![npm](https://img.shields.io/badge/gem-v0.1.20-blue)](https://rubygems.org/gems/carbon_ruby_sdk/versions/0.1.20)
|
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.
|
83
|
+
gem 'carbon_ruby_sdk', '~> 0.1.20'
|
84
84
|
```
|
85
85
|
|
86
86
|
## Getting Started<a id="getting-started"></a>
|
@@ -1439,7 +1439,7 @@ Enable OCR for files that support it. Supported formats: pdf
|
|
1439
1439
|
##### parse_pdf_tables_with_ocr: `Boolean`<a id="parse_pdf_tables_with_ocr-boolean"></a>
|
1440
1440
|
##### enable_file_picker: `Boolean`<a id="enable_file_picker-boolean"></a>
|
1441
1441
|
Enable integration's file picker for sources that support it. Supported sources:
|
1442
|
-
|
1442
|
+
DROPBOX, GOOGLE_DRIVE, BOX, ONEDRIVE, SHAREPOINT
|
1443
1443
|
|
1444
1444
|
#### 🔄 Return<a id="🔄-return"></a>
|
1445
1445
|
|
@@ -545,7 +545,7 @@ 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:
|
548
|
+
# @param enable_file_picker [Boolean] Enable integration's file picker for sources that support it. Supported sources: DROPBOX, GOOGLE_DRIVE, BOX, ONEDRIVE, SHAREPOINT
|
549
549
|
# @param body [OAuthURLRequest]
|
550
550
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
551
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: {})
|
@@ -607,7 +607,7 @@ module Carbon
|
|
607
607
|
# @param request_id [String] This request id will be added to all files that get synced using the generated OAuth URL
|
608
608
|
# @param use_ocr [Boolean] Enable OCR for files that support it. Supported formats: pdf
|
609
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:
|
610
|
+
# @param enable_file_picker [Boolean] Enable integration's file picker for sources that support it. Supported sources: DROPBOX, GOOGLE_DRIVE, BOX, ONEDRIVE, SHAREPOINT
|
611
611
|
# @param body [OAuthURLRequest]
|
612
612
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
613
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: {})
|
@@ -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:
|
64
|
+
# Enable integration's file picker for sources that support it. Supported sources: DROPBOX, GOOGLE_DRIVE, BOX, ONEDRIVE, SHAREPOINT
|
65
65
|
attr_accessor :enable_file_picker
|
66
66
|
|
67
67
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -41,6 +41,8 @@ module Carbon
|
|
41
41
|
|
42
42
|
attr_accessor :updated_at
|
43
43
|
|
44
|
+
attr_accessor :files_synced_at
|
45
|
+
|
44
46
|
# Attribute mapping from ruby-style variable name to JSON key.
|
45
47
|
def self.attribute_map
|
46
48
|
{
|
@@ -58,7 +60,8 @@ module Carbon
|
|
58
60
|
:'last_sync_action' => :'last_sync_action',
|
59
61
|
:'enable_auto_sync' => :'enable_auto_sync',
|
60
62
|
:'created_at' => :'created_at',
|
61
|
-
:'updated_at' => :'updated_at'
|
63
|
+
:'updated_at' => :'updated_at',
|
64
|
+
:'files_synced_at' => :'files_synced_at'
|
62
65
|
}
|
63
66
|
end
|
64
67
|
|
@@ -84,7 +87,8 @@ module Carbon
|
|
84
87
|
:'last_sync_action' => :'DataSourceLastSyncActions',
|
85
88
|
:'enable_auto_sync' => :'Boolean',
|
86
89
|
:'created_at' => :'Time',
|
87
|
-
:'updated_at' => :'Time'
|
90
|
+
:'updated_at' => :'Time',
|
91
|
+
:'files_synced_at' => :'Time'
|
88
92
|
}
|
89
93
|
end
|
90
94
|
|
@@ -172,6 +176,10 @@ module Carbon
|
|
172
176
|
if attributes.key?(:'updated_at')
|
173
177
|
self.updated_at = attributes[:'updated_at']
|
174
178
|
end
|
179
|
+
|
180
|
+
if attributes.key?(:'files_synced_at')
|
181
|
+
self.files_synced_at = attributes[:'files_synced_at']
|
182
|
+
end
|
175
183
|
end
|
176
184
|
|
177
185
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -222,6 +230,10 @@ module Carbon
|
|
222
230
|
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
223
231
|
end
|
224
232
|
|
233
|
+
if @files_synced_at.nil?
|
234
|
+
invalid_properties.push('invalid value for "files_synced_at", files_synced_at cannot be nil.')
|
235
|
+
end
|
236
|
+
|
225
237
|
invalid_properties
|
226
238
|
end
|
227
239
|
|
@@ -239,6 +251,7 @@ module Carbon
|
|
239
251
|
return false if @last_sync_action.nil?
|
240
252
|
return false if @created_at.nil?
|
241
253
|
return false if @updated_at.nil?
|
254
|
+
return false if @files_synced_at.nil?
|
242
255
|
true
|
243
256
|
end
|
244
257
|
|
@@ -261,7 +274,8 @@ module Carbon
|
|
261
274
|
last_sync_action == o.last_sync_action &&
|
262
275
|
enable_auto_sync == o.enable_auto_sync &&
|
263
276
|
created_at == o.created_at &&
|
264
|
-
updated_at == o.updated_at
|
277
|
+
updated_at == o.updated_at &&
|
278
|
+
files_synced_at == o.files_synced_at
|
265
279
|
end
|
266
280
|
|
267
281
|
# @see the `==` method
|
@@ -273,7 +287,7 @@ module Carbon
|
|
273
287
|
# Calculates hash code according to all attributes.
|
274
288
|
# @return [Integer] Hash code
|
275
289
|
def hash
|
276
|
-
[id, data_source_external_id, data_source_type, token, sync_status, source_items_synced_at, organization_user_id, organization_id, organization_supplied_user_id, revoked_access, last_synced_at, last_sync_action, enable_auto_sync, created_at, updated_at].hash
|
290
|
+
[id, data_source_external_id, data_source_type, token, sync_status, source_items_synced_at, organization_user_id, organization_id, organization_supplied_user_id, revoked_access, last_synced_at, last_sync_action, enable_auto_sync, created_at, updated_at, files_synced_at].hash
|
277
291
|
end
|
278
292
|
|
279
293
|
# 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 :request_id
|
37
|
+
|
36
38
|
attr_accessor :enable_file_picker
|
37
39
|
|
38
40
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -48,6 +50,7 @@ module Carbon
|
|
48
50
|
:'max_items_per_chunk' => :'max_items_per_chunk',
|
49
51
|
:'sync_files_on_connection' => :'sync_files_on_connection',
|
50
52
|
:'set_page_as_boundary' => :'set_page_as_boundary',
|
53
|
+
:'request_id' => :'request_id',
|
51
54
|
:'enable_file_picker' => :'enable_file_picker'
|
52
55
|
}
|
53
56
|
end
|
@@ -70,6 +73,7 @@ module Carbon
|
|
70
73
|
:'max_items_per_chunk' => :'Integer',
|
71
74
|
:'sync_files_on_connection' => :'Boolean',
|
72
75
|
:'set_page_as_boundary' => :'Boolean',
|
76
|
+
:'request_id' => :'String',
|
73
77
|
:'enable_file_picker' => :'Boolean'
|
74
78
|
}
|
75
79
|
end
|
@@ -86,6 +90,7 @@ module Carbon
|
|
86
90
|
:'prepend_filename_to_chunks',
|
87
91
|
:'max_items_per_chunk',
|
88
92
|
:'sync_files_on_connection',
|
93
|
+
:'request_id',
|
89
94
|
])
|
90
95
|
end
|
91
96
|
|
@@ -160,6 +165,10 @@ module Carbon
|
|
160
165
|
self.set_page_as_boundary = false
|
161
166
|
end
|
162
167
|
|
168
|
+
if attributes.key?(:'request_id')
|
169
|
+
self.request_id = attributes[:'request_id']
|
170
|
+
end
|
171
|
+
|
163
172
|
if attributes.key?(:'enable_file_picker')
|
164
173
|
self.enable_file_picker = attributes[:'enable_file_picker']
|
165
174
|
else
|
@@ -195,6 +204,7 @@ module Carbon
|
|
195
204
|
max_items_per_chunk == o.max_items_per_chunk &&
|
196
205
|
sync_files_on_connection == o.sync_files_on_connection &&
|
197
206
|
set_page_as_boundary == o.set_page_as_boundary &&
|
207
|
+
request_id == o.request_id &&
|
198
208
|
enable_file_picker == o.enable_file_picker
|
199
209
|
end
|
200
210
|
|
@@ -207,7 +217,7 @@ module Carbon
|
|
207
217
|
# Calculates hash code according to all attributes.
|
208
218
|
# @return [Integer] Hash code
|
209
219
|
def 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
|
220
|
+
[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, request_id, enable_file_picker].hash
|
211
221
|
end
|
212
222
|
|
213
223
|
# Builds the object from hash
|
@@ -109,4 +109,10 @@ describe Carbon::OrganizationUserDataSourceAPI do
|
|
109
109
|
end
|
110
110
|
end
|
111
111
|
|
112
|
+
describe 'test attribute "files_synced_at"' do
|
113
|
+
it 'should work' do
|
114
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
112
118
|
end
|
@@ -79,6 +79,12 @@ describe Carbon::SyncOptions do
|
|
79
79
|
end
|
80
80
|
end
|
81
81
|
|
82
|
+
describe 'test attribute "request_id"' 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
|
describe 'test attribute "enable_file_picker"' do
|
83
89
|
it 'should work' do
|
84
90
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
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.
|
4
|
+
version: 0.1.20
|
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-
|
11
|
+
date: 2024-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -372,7 +372,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
372
372
|
- !ruby/object:Gem::Version
|
373
373
|
version: '0'
|
374
374
|
requirements: []
|
375
|
-
rubygems_version: 3.
|
375
|
+
rubygems_version: 3.4.10
|
376
376
|
signing_key:
|
377
377
|
specification_version: 4
|
378
378
|
summary: Carbon Ruby Gem
|