carbon_ruby_sdk 0.1.24 → 0.1.26
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +38 -7
- data/lib/carbon_ruby_sdk/api/integrations_api.rb +8 -8
- data/lib/carbon_ruby_sdk/api/organizations_api.rb +92 -0
- data/lib/carbon_ruby_sdk/api/users_api.rb +2 -2
- data/lib/carbon_ruby_sdk/models/file_statistics.rb +15 -5
- data/lib/carbon_ruby_sdk/models/file_statistics_nullable.rb +15 -5
- data/lib/carbon_ruby_sdk/models/o_auth_url_request.rb +2 -2
- data/lib/carbon_ruby_sdk/models/organization_response.rb +15 -1
- data/lib/carbon_ruby_sdk/models/organization_user_files_to_sync_filters.rb +16 -5
- data/lib/carbon_ruby_sdk/models/sync_files_request.rb +1 -1
- data/lib/carbon_ruby_sdk/models/sync_options.rb +1 -1
- data/lib/carbon_ruby_sdk/models/update_organization_input.rb +216 -0
- data/lib/carbon_ruby_sdk/models/update_users_input.rb +41 -41
- data/lib/carbon_ruby_sdk/models/user_configuration.rb +268 -0
- data/lib/carbon_ruby_sdk/models/user_configuration_nullable.rb +269 -0
- data/lib/carbon_ruby_sdk/version.rb +1 -1
- data/lib/carbon_ruby_sdk.rb +3 -0
- data/spec/api/organizations_api_spec.rb +11 -0
- data/spec/models/file_statistics_nullable_spec.rb +6 -0
- data/spec/models/file_statistics_spec.rb +6 -0
- data/spec/models/organization_response_spec.rb +6 -0
- data/spec/models/organization_user_files_to_sync_filters_spec.rb +6 -0
- data/spec/models/update_organization_input_spec.rb +28 -0
- data/spec/models/update_users_input_spec.rb +4 -4
- data/spec/models/user_configuration_nullable_spec.rb +40 -0
- data/spec/models/user_configuration_spec.rb +40 -0
- metadata +11 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4df15c006e45848696f32fa5cff53262a27cd3679d984728e3b03032bb20fb2d
|
4
|
+
data.tar.gz: 3bb4f46ac23fcb9b560de22c539f6280c7cbc4d717ff7b762ecff53f3a953ca2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 561bd129472800a3028d531465beb98ba98794a2e813c477d72aa308c58128f9f912a1fc09a967aca5d9de0d16dc435d518ae3715c288707b5ea840f1be6082a
|
7
|
+
data.tar.gz: 3dfa67d79380d9a687dccb456fbab1ce19422564c498eec958d4df186276d090754814224ad6bd20588e23b28adb3a80c2125d93ef2771d22d41a6e55c55afdb
|
data/Gemfile.lock
CHANGED
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.26-blue)](https://rubygems.org/gems/carbon_ruby_sdk/versions/0.1.26)
|
10
10
|
|
11
11
|
</div>
|
12
12
|
|
@@ -62,6 +62,7 @@ Connect external data to LLMs, no matter the source.
|
|
62
62
|
* [`carbon.integrations.sync_rss_feed`](#carbonintegrationssync_rss_feed)
|
63
63
|
* [`carbon.integrations.sync_s3_files`](#carbonintegrationssync_s3_files)
|
64
64
|
* [`carbon.organizations.get`](#carbonorganizationsget)
|
65
|
+
* [`carbon.organizations.update`](#carbonorganizationsupdate)
|
65
66
|
* [`carbon.users.delete`](#carbonusersdelete)
|
66
67
|
* [`carbon.users.get`](#carbonusersget)
|
67
68
|
* [`carbon.users.toggle_user_features`](#carbonuserstoggle_user_features)
|
@@ -83,7 +84,7 @@ Connect external data to LLMs, no matter the source.
|
|
83
84
|
Add to Gemfile:
|
84
85
|
|
85
86
|
```ruby
|
86
|
-
gem 'carbon_ruby_sdk', '~> 0.1.
|
87
|
+
gem 'carbon_ruby_sdk', '~> 0.1.26'
|
87
88
|
```
|
88
89
|
|
89
90
|
## Getting Started<a id="getting-started"></a>
|
@@ -1196,7 +1197,7 @@ result = carbon.integrations.connect_data_source(
|
|
1196
1197
|
"prepend_filename_to_chunks" => false,
|
1197
1198
|
"sync_files_on_connection" => true,
|
1198
1199
|
"set_page_as_boundary" => false,
|
1199
|
-
"request_id" => "
|
1200
|
+
"request_id" => "875454df-996d-4d26-83e0-756af9628ed0",
|
1200
1201
|
"enable_file_picker" => true,
|
1201
1202
|
"sync_source_items" => true,
|
1202
1203
|
},
|
@@ -1408,7 +1409,7 @@ result = carbon.integrations.get_oauth_url(
|
|
1408
1409
|
set_page_as_boundary: false,
|
1409
1410
|
data_source_id: 1,
|
1410
1411
|
connecting_new_account: false,
|
1411
|
-
request_id: "
|
1412
|
+
request_id: "fc8dfd30-8e4c-4f40-acc5-f05b3cc961d2",
|
1412
1413
|
use_ocr: false,
|
1413
1414
|
parse_pdf_tables_with_ocr: false,
|
1414
1415
|
enable_file_picker: true,
|
@@ -1462,7 +1463,7 @@ Enable OCR for files that support it. Supported formats: pdf
|
|
1462
1463
|
##### parse_pdf_tables_with_ocr: `Boolean`<a id="parse_pdf_tables_with_ocr-boolean"></a>
|
1463
1464
|
##### enable_file_picker: `Boolean`<a id="enable_file_picker-boolean"></a>
|
1464
1465
|
Enable integration's file picker for sources that support it. Supported sources:
|
1465
|
-
GOOGLE_DRIVE,
|
1466
|
+
GOOGLE_DRIVE, ONEDRIVE, SHAREPOINT, DROPBOX, BOX
|
1466
1467
|
|
1467
1468
|
##### sync_source_items: `Boolean`<a id="sync_source_items-boolean"></a>
|
1468
1469
|
Enabling this flag will fetch all available content from the source to be listed
|
@@ -1718,7 +1719,7 @@ result = carbon.integrations.sync_confluence(
|
|
1718
1719
|
prepend_filename_to_chunks: false,
|
1719
1720
|
max_items_per_chunk: 1,
|
1720
1721
|
set_page_as_boundary: false,
|
1721
|
-
request_id: "
|
1722
|
+
request_id: "2446df66-66dd-4ea3-b248-a416d886e087",
|
1722
1723
|
use_ocr: false,
|
1723
1724
|
parse_pdf_tables_with_ocr: false,
|
1724
1725
|
)
|
@@ -1809,7 +1810,7 @@ result = carbon.integrations.sync_files(
|
|
1809
1810
|
prepend_filename_to_chunks: false,
|
1810
1811
|
max_items_per_chunk: 1,
|
1811
1812
|
set_page_as_boundary: false,
|
1812
|
-
request_id: "
|
1813
|
+
request_id: "2446df66-66dd-4ea3-b248-a416d886e087",
|
1813
1814
|
use_ocr: false,
|
1814
1815
|
parse_pdf_tables_with_ocr: false,
|
1815
1816
|
)
|
@@ -2301,6 +2302,36 @@ p result
|
|
2301
2302
|
---
|
2302
2303
|
|
2303
2304
|
|
2305
|
+
### `carbon.organizations.update`<a id="carbonorganizationsupdate"></a>
|
2306
|
+
|
2307
|
+
Update Organization
|
2308
|
+
|
2309
|
+
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
2310
|
+
|
2311
|
+
```ruby
|
2312
|
+
result = carbon.organizations.update(
|
2313
|
+
global_user_config: {
|
2314
|
+
},
|
2315
|
+
)
|
2316
|
+
p result
|
2317
|
+
```
|
2318
|
+
|
2319
|
+
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
2320
|
+
|
2321
|
+
##### global_user_config: [`UserConfigurationNullable`](./lib/carbon_ruby_sdk/models/user_configuration_nullable.rb)<a id="global_user_config-userconfigurationnullablelibcarbon_ruby_sdkmodelsuser_configuration_nullablerb"></a>
|
2322
|
+
#### 🔄 Return<a id="🔄-return"></a>
|
2323
|
+
|
2324
|
+
[GenericSuccessResponse](./lib/carbon_ruby_sdk/models/generic_success_response.rb)
|
2325
|
+
|
2326
|
+
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
2327
|
+
|
2328
|
+
`/organization/update` `POST`
|
2329
|
+
|
2330
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
2331
|
+
|
2332
|
+
---
|
2333
|
+
|
2334
|
+
|
2304
2335
|
### `carbon.users.delete`<a id="carbonusersdelete"></a>
|
2305
2336
|
|
2306
2337
|
Delete Users
|
@@ -557,11 +557,11 @@ module Carbon
|
|
557
557
|
# @param request_id [String] This request id will be added to all files that get synced using the generated OAuth URL
|
558
558
|
# @param use_ocr [Boolean] Enable OCR for files that support it. Supported formats: pdf
|
559
559
|
# @param parse_pdf_tables_with_ocr [Boolean]
|
560
|
-
# @param enable_file_picker [Boolean] Enable integration's file picker for sources that support it. Supported sources: GOOGLE_DRIVE,
|
560
|
+
# @param enable_file_picker [Boolean] Enable integration's file picker for sources that support it. Supported sources: GOOGLE_DRIVE, ONEDRIVE, SHAREPOINT, DROPBOX, BOX
|
561
561
|
# @param sync_source_items [Boolean] Enabling this flag will fetch all available content from the source to be listed via list items endpoint
|
562
562
|
# @param body [OAuthURLRequest]
|
563
563
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
564
|
-
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: '
|
564
|
+
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: 'fc8dfd30-8e4c-4f40-acc5-f05b3cc961d2', use_ocr: false, parse_pdf_tables_with_ocr: false, enable_file_picker: true, sync_source_items: true, extra: {})
|
565
565
|
_body = {}
|
566
566
|
_body[:tags] = tags if tags != SENTINEL
|
567
567
|
_body[:scope] = scope if scope != SENTINEL
|
@@ -621,11 +621,11 @@ module Carbon
|
|
621
621
|
# @param request_id [String] This request id will be added to all files that get synced using the generated OAuth URL
|
622
622
|
# @param use_ocr [Boolean] Enable OCR for files that support it. Supported formats: pdf
|
623
623
|
# @param parse_pdf_tables_with_ocr [Boolean]
|
624
|
-
# @param enable_file_picker [Boolean] Enable integration's file picker for sources that support it. Supported sources: GOOGLE_DRIVE,
|
624
|
+
# @param enable_file_picker [Boolean] Enable integration's file picker for sources that support it. Supported sources: GOOGLE_DRIVE, ONEDRIVE, SHAREPOINT, DROPBOX, BOX
|
625
625
|
# @param sync_source_items [Boolean] Enabling this flag will fetch all available content from the source to be listed via list items endpoint
|
626
626
|
# @param body [OAuthURLRequest]
|
627
627
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
628
|
-
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: '
|
628
|
+
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: 'fc8dfd30-8e4c-4f40-acc5-f05b3cc961d2', use_ocr: false, parse_pdf_tables_with_ocr: false, enable_file_picker: true, sync_source_items: true, extra: {})
|
629
629
|
_body = {}
|
630
630
|
_body[:tags] = tags if tags != SENTINEL
|
631
631
|
_body[:scope] = scope if scope != SENTINEL
|
@@ -1417,7 +1417,7 @@ module Carbon
|
|
1417
1417
|
# @param parse_pdf_tables_with_ocr [Boolean]
|
1418
1418
|
# @param body [SyncFilesRequest]
|
1419
1419
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1420
|
-
def sync_confluence(data_source_id:, ids:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, set_page_as_boundary: false, request_id: '
|
1420
|
+
def sync_confluence(data_source_id:, ids:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, set_page_as_boundary: false, request_id: '2446df66-66dd-4ea3-b248-a416d886e087', use_ocr: false, parse_pdf_tables_with_ocr: false, extra: {})
|
1421
1421
|
_body = {}
|
1422
1422
|
_body[:tags] = tags if tags != SENTINEL
|
1423
1423
|
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
@@ -1461,7 +1461,7 @@ module Carbon
|
|
1461
1461
|
# @param parse_pdf_tables_with_ocr [Boolean]
|
1462
1462
|
# @param body [SyncFilesRequest]
|
1463
1463
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1464
|
-
def sync_confluence_with_http_info(data_source_id:, ids:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, set_page_as_boundary: false, request_id: '
|
1464
|
+
def sync_confluence_with_http_info(data_source_id:, ids:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, set_page_as_boundary: false, request_id: '2446df66-66dd-4ea3-b248-a416d886e087', use_ocr: false, parse_pdf_tables_with_ocr: false, extra: {})
|
1465
1465
|
_body = {}
|
1466
1466
|
_body[:tags] = tags if tags != SENTINEL
|
1467
1467
|
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
@@ -1665,7 +1665,7 @@ module Carbon
|
|
1665
1665
|
# @param parse_pdf_tables_with_ocr [Boolean]
|
1666
1666
|
# @param body [SyncFilesRequest]
|
1667
1667
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1668
|
-
def sync_files(data_source_id:, ids:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, set_page_as_boundary: false, request_id: '
|
1668
|
+
def sync_files(data_source_id:, ids:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, set_page_as_boundary: false, request_id: '2446df66-66dd-4ea3-b248-a416d886e087', use_ocr: false, parse_pdf_tables_with_ocr: false, extra: {})
|
1669
1669
|
_body = {}
|
1670
1670
|
_body[:tags] = tags if tags != SENTINEL
|
1671
1671
|
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
@@ -1709,7 +1709,7 @@ module Carbon
|
|
1709
1709
|
# @param parse_pdf_tables_with_ocr [Boolean]
|
1710
1710
|
# @param body [SyncFilesRequest]
|
1711
1711
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1712
|
-
def sync_files_with_http_info(data_source_id:, ids:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, set_page_as_boundary: false, request_id: '
|
1712
|
+
def sync_files_with_http_info(data_source_id:, ids:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, set_page_as_boundary: false, request_id: '2446df66-66dd-4ea3-b248-a416d886e087', use_ocr: false, parse_pdf_tables_with_ocr: false, extra: {})
|
1713
1713
|
_body = {}
|
1714
1714
|
_body[:tags] = tags if tags != SENTINEL
|
1715
1715
|
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
@@ -85,6 +85,98 @@ module Carbon
|
|
85
85
|
end
|
86
86
|
APIResponse::new(data, status_code, headers, response)
|
87
87
|
end
|
88
|
+
|
89
|
+
|
90
|
+
# Update Organization
|
91
|
+
#
|
92
|
+
# @param global_user_config [UserConfigurationNullable]
|
93
|
+
# @param body [UpdateOrganizationInput]
|
94
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
95
|
+
def update(global_user_config: SENTINEL, extra: {})
|
96
|
+
_body = {}
|
97
|
+
_body[:global_user_config] = global_user_config if global_user_config != SENTINEL
|
98
|
+
update_organization_input = _body
|
99
|
+
api_response = update_with_http_info_impl(update_organization_input, extra)
|
100
|
+
api_response.data
|
101
|
+
end
|
102
|
+
|
103
|
+
# Update Organization
|
104
|
+
#
|
105
|
+
# @param global_user_config [UserConfigurationNullable]
|
106
|
+
# @param body [UpdateOrganizationInput]
|
107
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
108
|
+
def update_with_http_info(global_user_config: SENTINEL, extra: {})
|
109
|
+
_body = {}
|
110
|
+
_body[:global_user_config] = global_user_config if global_user_config != SENTINEL
|
111
|
+
update_organization_input = _body
|
112
|
+
update_with_http_info_impl(update_organization_input, extra)
|
113
|
+
end
|
114
|
+
|
115
|
+
# Update Organization
|
116
|
+
# @param update_organization_input [UpdateOrganizationInput]
|
117
|
+
# @param [Hash] opts the optional parameters
|
118
|
+
# @return [GenericSuccessResponse]
|
119
|
+
private def update_impl(update_organization_input, opts = {})
|
120
|
+
data, _status_code, _headers = update_with_http_info(update_organization_input, opts)
|
121
|
+
data
|
122
|
+
end
|
123
|
+
|
124
|
+
# Update Organization
|
125
|
+
# @param update_organization_input [UpdateOrganizationInput]
|
126
|
+
# @param [Hash] opts the optional parameters
|
127
|
+
# @return [APIResponse] data is GenericSuccessResponse, status code, headers and response
|
128
|
+
private def update_with_http_info_impl(update_organization_input, opts = {})
|
129
|
+
if @api_client.config.debugging
|
130
|
+
@api_client.config.logger.debug 'Calling API: OrganizationsApi.update ...'
|
131
|
+
end
|
132
|
+
# verify the required parameter 'update_organization_input' is set
|
133
|
+
if @api_client.config.client_side_validation && update_organization_input.nil?
|
134
|
+
fail ArgumentError, "Missing the required parameter 'update_organization_input' when calling OrganizationsApi.update"
|
135
|
+
end
|
136
|
+
# resource path
|
137
|
+
local_var_path = '/organization/update'
|
138
|
+
|
139
|
+
# query parameters
|
140
|
+
query_params = opts[:query_params] || {}
|
141
|
+
|
142
|
+
# header parameters
|
143
|
+
header_params = opts[:header_params] || {}
|
144
|
+
# HTTP header 'Accept' (if needed)
|
145
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
146
|
+
# HTTP header 'Content-Type'
|
147
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
148
|
+
if !content_type.nil?
|
149
|
+
header_params['Content-Type'] = content_type
|
150
|
+
end
|
151
|
+
|
152
|
+
# form parameters
|
153
|
+
form_params = opts[:form_params] || {}
|
154
|
+
|
155
|
+
# http body (model)
|
156
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_organization_input)
|
157
|
+
|
158
|
+
# return_type
|
159
|
+
return_type = opts[:debug_return_type] || 'GenericSuccessResponse'
|
160
|
+
|
161
|
+
# auth_names
|
162
|
+
auth_names = opts[:debug_auth_names] || ['apiKey']
|
163
|
+
|
164
|
+
new_options = opts.merge(
|
165
|
+
:operation => :"OrganizationsApi.update",
|
166
|
+
:header_params => header_params,
|
167
|
+
:query_params => query_params,
|
168
|
+
:form_params => form_params,
|
169
|
+
:body => post_body,
|
170
|
+
:auth_names => auth_names,
|
171
|
+
:return_type => return_type
|
172
|
+
)
|
173
|
+
|
174
|
+
data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
|
175
|
+
if @api_client.config.debugging
|
176
|
+
@api_client.config.logger.debug "API called: OrganizationsApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
177
|
+
end
|
178
|
+
APIResponse::new(data, status_code, headers, response)
|
179
|
+
end
|
88
180
|
end
|
89
181
|
|
90
182
|
# top-level client access to avoid having the user to insantiate their own API instances
|
@@ -306,10 +306,10 @@ module Carbon
|
|
306
306
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
307
307
|
def update_users(customer_ids:, auto_sync_enabled_sources: SENTINEL, max_files: SENTINEL, max_files_per_upload: SENTINEL, extra: {})
|
308
308
|
_body = {}
|
309
|
-
_body[:customer_ids] = customer_ids if customer_ids != SENTINEL
|
310
309
|
_body[:auto_sync_enabled_sources] = auto_sync_enabled_sources if auto_sync_enabled_sources != SENTINEL
|
311
310
|
_body[:max_files] = max_files if max_files != SENTINEL
|
312
311
|
_body[:max_files_per_upload] = max_files_per_upload if max_files_per_upload != SENTINEL
|
312
|
+
_body[:customer_ids] = customer_ids if customer_ids != SENTINEL
|
313
313
|
update_users_input = _body
|
314
314
|
api_response = update_users_with_http_info_impl(update_users_input, extra)
|
315
315
|
api_response.data
|
@@ -325,10 +325,10 @@ module Carbon
|
|
325
325
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
326
326
|
def update_users_with_http_info(customer_ids:, auto_sync_enabled_sources: SENTINEL, max_files: SENTINEL, max_files_per_upload: SENTINEL, extra: {})
|
327
327
|
_body = {}
|
328
|
-
_body[:customer_ids] = customer_ids if customer_ids != SENTINEL
|
329
328
|
_body[:auto_sync_enabled_sources] = auto_sync_enabled_sources if auto_sync_enabled_sources != SENTINEL
|
330
329
|
_body[:max_files] = max_files if max_files != SENTINEL
|
331
330
|
_body[:max_files_per_upload] = max_files_per_upload if max_files_per_upload != SENTINEL
|
331
|
+
_body[:customer_ids] = customer_ids if customer_ids != SENTINEL
|
332
332
|
update_users_input = _body
|
333
333
|
update_users_with_http_info_impl(update_users_input, extra)
|
334
334
|
end
|
@@ -21,6 +21,8 @@ module Carbon
|
|
21
21
|
|
22
22
|
attr_accessor :num_embeddings
|
23
23
|
|
24
|
+
attr_accessor :mime_type
|
25
|
+
|
24
26
|
# Attribute mapping from ruby-style variable name to JSON key.
|
25
27
|
def self.attribute_map
|
26
28
|
{
|
@@ -28,7 +30,8 @@ module Carbon
|
|
28
30
|
:'file_size' => :'file_size',
|
29
31
|
:'num_characters' => :'num_characters',
|
30
32
|
:'num_tokens' => :'num_tokens',
|
31
|
-
:'num_embeddings' => :'num_embeddings'
|
33
|
+
:'num_embeddings' => :'num_embeddings',
|
34
|
+
:'mime_type' => :'mime_type'
|
32
35
|
}
|
33
36
|
end
|
34
37
|
|
@@ -44,7 +47,8 @@ module Carbon
|
|
44
47
|
:'file_size' => :'Integer',
|
45
48
|
:'num_characters' => :'Integer',
|
46
49
|
:'num_tokens' => :'Integer',
|
47
|
-
:'num_embeddings' => :'Integer'
|
50
|
+
:'num_embeddings' => :'Integer',
|
51
|
+
:'mime_type' => :'String'
|
48
52
|
}
|
49
53
|
end
|
50
54
|
|
@@ -55,7 +59,8 @@ module Carbon
|
|
55
59
|
:'file_size',
|
56
60
|
:'num_characters',
|
57
61
|
:'num_tokens',
|
58
|
-
:'num_embeddings'
|
62
|
+
:'num_embeddings',
|
63
|
+
:'mime_type'
|
59
64
|
])
|
60
65
|
end
|
61
66
|
|
@@ -93,6 +98,10 @@ module Carbon
|
|
93
98
|
if attributes.key?(:'num_embeddings')
|
94
99
|
self.num_embeddings = attributes[:'num_embeddings']
|
95
100
|
end
|
101
|
+
|
102
|
+
if attributes.key?(:'mime_type')
|
103
|
+
self.mime_type = attributes[:'mime_type']
|
104
|
+
end
|
96
105
|
end
|
97
106
|
|
98
107
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -117,7 +126,8 @@ module Carbon
|
|
117
126
|
file_size == o.file_size &&
|
118
127
|
num_characters == o.num_characters &&
|
119
128
|
num_tokens == o.num_tokens &&
|
120
|
-
num_embeddings == o.num_embeddings
|
129
|
+
num_embeddings == o.num_embeddings &&
|
130
|
+
mime_type == o.mime_type
|
121
131
|
end
|
122
132
|
|
123
133
|
# @see the `==` method
|
@@ -129,7 +139,7 @@ module Carbon
|
|
129
139
|
# Calculates hash code according to all attributes.
|
130
140
|
# @return [Integer] Hash code
|
131
141
|
def hash
|
132
|
-
[file_format, file_size, num_characters, num_tokens, num_embeddings].hash
|
142
|
+
[file_format, file_size, num_characters, num_tokens, num_embeddings, mime_type].hash
|
133
143
|
end
|
134
144
|
|
135
145
|
# Builds the object from hash
|
@@ -21,6 +21,8 @@ module Carbon
|
|
21
21
|
|
22
22
|
attr_accessor :num_embeddings
|
23
23
|
|
24
|
+
attr_accessor :mime_type
|
25
|
+
|
24
26
|
# Attribute mapping from ruby-style variable name to JSON key.
|
25
27
|
def self.attribute_map
|
26
28
|
{
|
@@ -28,7 +30,8 @@ module Carbon
|
|
28
30
|
:'file_size' => :'file_size',
|
29
31
|
:'num_characters' => :'num_characters',
|
30
32
|
:'num_tokens' => :'num_tokens',
|
31
|
-
:'num_embeddings' => :'num_embeddings'
|
33
|
+
:'num_embeddings' => :'num_embeddings',
|
34
|
+
:'mime_type' => :'mime_type'
|
32
35
|
}
|
33
36
|
end
|
34
37
|
|
@@ -44,7 +47,8 @@ module Carbon
|
|
44
47
|
:'file_size' => :'Integer',
|
45
48
|
:'num_characters' => :'Integer',
|
46
49
|
:'num_tokens' => :'Integer',
|
47
|
-
:'num_embeddings' => :'Integer'
|
50
|
+
:'num_embeddings' => :'Integer',
|
51
|
+
:'mime_type' => :'String'
|
48
52
|
}
|
49
53
|
end
|
50
54
|
|
@@ -55,7 +59,8 @@ module Carbon
|
|
55
59
|
:'file_size',
|
56
60
|
:'num_characters',
|
57
61
|
:'num_tokens',
|
58
|
-
:'num_embeddings'
|
62
|
+
:'num_embeddings',
|
63
|
+
:'mime_type'
|
59
64
|
])
|
60
65
|
end
|
61
66
|
|
@@ -93,6 +98,10 @@ module Carbon
|
|
93
98
|
if attributes.key?(:'num_embeddings')
|
94
99
|
self.num_embeddings = attributes[:'num_embeddings']
|
95
100
|
end
|
101
|
+
|
102
|
+
if attributes.key?(:'mime_type')
|
103
|
+
self.mime_type = attributes[:'mime_type']
|
104
|
+
end
|
96
105
|
end
|
97
106
|
|
98
107
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -117,7 +126,8 @@ module Carbon
|
|
117
126
|
file_size == o.file_size &&
|
118
127
|
num_characters == o.num_characters &&
|
119
128
|
num_tokens == o.num_tokens &&
|
120
|
-
num_embeddings == o.num_embeddings
|
129
|
+
num_embeddings == o.num_embeddings &&
|
130
|
+
mime_type == o.mime_type
|
121
131
|
end
|
122
132
|
|
123
133
|
# @see the `==` method
|
@@ -129,7 +139,7 @@ module Carbon
|
|
129
139
|
# Calculates hash code according to all attributes.
|
130
140
|
# @return [Integer] Hash code
|
131
141
|
def hash
|
132
|
-
[file_format, file_size, num_characters, num_tokens, num_embeddings].hash
|
142
|
+
[file_format, file_size, num_characters, num_tokens, num_embeddings, mime_type].hash
|
133
143
|
end
|
134
144
|
|
135
145
|
# 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: GOOGLE_DRIVE,
|
64
|
+
# Enable integration's file picker for sources that support it. Supported sources: GOOGLE_DRIVE, ONEDRIVE, SHAREPOINT, DROPBOX, BOX
|
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
|
@@ -269,7 +269,7 @@ module Carbon
|
|
269
269
|
if attributes.key?(:'request_id')
|
270
270
|
self.request_id = attributes[:'request_id']
|
271
271
|
else
|
272
|
-
self.request_id = '
|
272
|
+
self.request_id = 'fc8dfd30-8e4c-4f40-acc5-f05b3cc961d2'
|
273
273
|
end
|
274
274
|
|
275
275
|
if attributes.key?(:'use_ocr')
|
@@ -35,6 +35,8 @@ module Carbon
|
|
35
35
|
|
36
36
|
attr_accessor :cancel_at_period_end
|
37
37
|
|
38
|
+
attr_accessor :global_user_config
|
39
|
+
|
38
40
|
attr_accessor :created_at
|
39
41
|
|
40
42
|
attr_accessor :updated_at
|
@@ -54,6 +56,7 @@ module Carbon
|
|
54
56
|
:'aggregate_num_embeddings' => :'aggregate_num_embeddings',
|
55
57
|
:'period_ends_at' => :'period_ends_at',
|
56
58
|
:'cancel_at_period_end' => :'cancel_at_period_end',
|
59
|
+
:'global_user_config' => :'global_user_config',
|
57
60
|
:'created_at' => :'created_at',
|
58
61
|
:'updated_at' => :'updated_at'
|
59
62
|
}
|
@@ -79,6 +82,7 @@ module Carbon
|
|
79
82
|
:'aggregate_num_embeddings' => :'Object',
|
80
83
|
:'period_ends_at' => :'Time',
|
81
84
|
:'cancel_at_period_end' => :'Boolean',
|
85
|
+
:'global_user_config' => :'Object',
|
82
86
|
:'created_at' => :'Time',
|
83
87
|
:'updated_at' => :'Time'
|
84
88
|
}
|
@@ -158,6 +162,10 @@ module Carbon
|
|
158
162
|
self.cancel_at_period_end = attributes[:'cancel_at_period_end']
|
159
163
|
end
|
160
164
|
|
165
|
+
if attributes.key?(:'global_user_config')
|
166
|
+
self.global_user_config = attributes[:'global_user_config']
|
167
|
+
end
|
168
|
+
|
161
169
|
if attributes.key?(:'created_at')
|
162
170
|
self.created_at = attributes[:'created_at']
|
163
171
|
end
|
@@ -199,6 +207,10 @@ module Carbon
|
|
199
207
|
invalid_properties.push('invalid value for "aggregate_num_embeddings", aggregate_num_embeddings cannot be nil.')
|
200
208
|
end
|
201
209
|
|
210
|
+
if @global_user_config.nil?
|
211
|
+
invalid_properties.push('invalid value for "global_user_config", global_user_config cannot be nil.')
|
212
|
+
end
|
213
|
+
|
202
214
|
if @created_at.nil?
|
203
215
|
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
204
216
|
end
|
@@ -220,6 +232,7 @@ module Carbon
|
|
220
232
|
return false if @aggregate_num_characters.nil?
|
221
233
|
return false if @aggregate_num_tokens.nil?
|
222
234
|
return false if @aggregate_num_embeddings.nil?
|
235
|
+
return false if @global_user_config.nil?
|
223
236
|
return false if @created_at.nil?
|
224
237
|
return false if @updated_at.nil?
|
225
238
|
true
|
@@ -242,6 +255,7 @@ module Carbon
|
|
242
255
|
aggregate_num_embeddings == o.aggregate_num_embeddings &&
|
243
256
|
period_ends_at == o.period_ends_at &&
|
244
257
|
cancel_at_period_end == o.cancel_at_period_end &&
|
258
|
+
global_user_config == o.global_user_config &&
|
245
259
|
created_at == o.created_at &&
|
246
260
|
updated_at == o.updated_at
|
247
261
|
end
|
@@ -255,7 +269,7 @@ module Carbon
|
|
255
269
|
# Calculates hash code according to all attributes.
|
256
270
|
# @return [Integer] Hash code
|
257
271
|
def hash
|
258
|
-
[id, name, nickname, remove_branding, custom_branding, custom_limits, aggregate_file_size, aggregate_num_characters, aggregate_num_tokens, aggregate_num_embeddings, period_ends_at, cancel_at_period_end, created_at, updated_at].hash
|
272
|
+
[id, name, nickname, remove_branding, custom_branding, custom_limits, aggregate_file_size, aggregate_num_characters, aggregate_num_tokens, aggregate_num_embeddings, period_ends_at, cancel_at_period_end, global_user_config, created_at, updated_at].hash
|
259
273
|
end
|
260
274
|
|
261
275
|
# Builds the object from hash
|
@@ -53,6 +53,9 @@ module Carbon
|
|
53
53
|
# The error message of the file. The query will return files with error messages that contain this string. To search for files with no error message, use an empty string.
|
54
54
|
attr_accessor :sync_error_message
|
55
55
|
|
56
|
+
# If true, the query will return containers in the response. Containers are files that group other files together and have no content themselves. Default behavior is to include containers.
|
57
|
+
attr_accessor :include_containers
|
58
|
+
|
56
59
|
# Attribute mapping from ruby-style variable name to JSON key.
|
57
60
|
def self.attribute_map
|
58
61
|
{
|
@@ -70,7 +73,8 @@ module Carbon
|
|
70
73
|
:'include_all_children' => :'include_all_children',
|
71
74
|
:'non_synced_only' => :'non_synced_only',
|
72
75
|
:'request_ids' => :'request_ids',
|
73
|
-
:'sync_error_message' => :'sync_error_message'
|
76
|
+
:'sync_error_message' => :'sync_error_message',
|
77
|
+
:'include_containers' => :'include_containers'
|
74
78
|
}
|
75
79
|
end
|
76
80
|
|
@@ -96,7 +100,8 @@ module Carbon
|
|
96
100
|
:'include_all_children' => :'Boolean',
|
97
101
|
:'non_synced_only' => :'Boolean',
|
98
102
|
:'request_ids' => :'Array<String>',
|
99
|
-
:'sync_error_message' => :'String'
|
103
|
+
:'sync_error_message' => :'String',
|
104
|
+
:'include_containers' => :'Boolean'
|
100
105
|
}
|
101
106
|
end
|
102
107
|
|
@@ -115,7 +120,8 @@ module Carbon
|
|
115
120
|
:'embedding_generators',
|
116
121
|
:'root_files_only',
|
117
122
|
:'request_ids',
|
118
|
-
:'sync_error_message'
|
123
|
+
:'sync_error_message',
|
124
|
+
:'include_containers'
|
119
125
|
])
|
120
126
|
end
|
121
127
|
|
@@ -213,6 +219,10 @@ module Carbon
|
|
213
219
|
if attributes.key?(:'sync_error_message')
|
214
220
|
self.sync_error_message = attributes[:'sync_error_message']
|
215
221
|
end
|
222
|
+
|
223
|
+
if attributes.key?(:'include_containers')
|
224
|
+
self.include_containers = attributes[:'include_containers']
|
225
|
+
end
|
216
226
|
end
|
217
227
|
|
218
228
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -262,7 +272,8 @@ module Carbon
|
|
262
272
|
include_all_children == o.include_all_children &&
|
263
273
|
non_synced_only == o.non_synced_only &&
|
264
274
|
request_ids == o.request_ids &&
|
265
|
-
sync_error_message == o.sync_error_message
|
275
|
+
sync_error_message == o.sync_error_message &&
|
276
|
+
include_containers == o.include_containers
|
266
277
|
end
|
267
278
|
|
268
279
|
# @see the `==` method
|
@@ -274,7 +285,7 @@ module Carbon
|
|
274
285
|
# Calculates hash code according to all attributes.
|
275
286
|
# @return [Integer] Hash code
|
276
287
|
def hash
|
277
|
-
[tags, source, name, tags_v2, ids, external_file_ids, sync_statuses, parent_file_ids, organization_user_data_source_id, embedding_generators, root_files_only, include_all_children, non_synced_only, request_ids, sync_error_message].hash
|
288
|
+
[tags, source, name, tags_v2, ids, external_file_ids, sync_statuses, parent_file_ids, organization_user_data_source_id, embedding_generators, root_files_only, include_all_children, non_synced_only, request_ids, sync_error_message, include_containers].hash
|
278
289
|
end
|
279
290
|
|
280
291
|
# Builds the object from hash
|
@@ -177,7 +177,7 @@ module Carbon
|
|
177
177
|
if attributes.key?(:'request_id')
|
178
178
|
self.request_id = attributes[:'request_id']
|
179
179
|
else
|
180
|
-
self.request_id = '
|
180
|
+
self.request_id = '2446df66-66dd-4ea3-b248-a416d886e087'
|
181
181
|
end
|
182
182
|
|
183
183
|
if attributes.key?(:'use_ocr')
|
@@ -172,7 +172,7 @@ module Carbon
|
|
172
172
|
if attributes.key?(:'request_id')
|
173
173
|
self.request_id = attributes[:'request_id']
|
174
174
|
else
|
175
|
-
self.request_id = '
|
175
|
+
self.request_id = '875454df-996d-4d26-83e0-756af9628ed0'
|
176
176
|
end
|
177
177
|
|
178
178
|
if attributes.key?(:'enable_file_picker')
|