carbon_ruby_sdk 0.2.33 → 0.2.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +159 -2
- data/lib/carbon_ruby_sdk/api/files_api.rb +6 -2
- data/lib/carbon_ruby_sdk/api/integrations_api.rb +310 -4
- data/lib/carbon_ruby_sdk/models/authentication_property.rb +32 -6
- data/lib/carbon_ruby_sdk/models/azure_blob_auth_request.rb +245 -0
- data/lib/carbon_ruby_sdk/models/azure_blob_file_sync_input.rb +379 -0
- data/lib/carbon_ruby_sdk/models/azure_blob_get_file_input.rb +226 -0
- data/lib/carbon_ruby_sdk/models/azure_blob_storage_authentication.rb +244 -0
- data/lib/carbon_ruby_sdk/models/data_source_type.rb +2 -1
- data/lib/carbon_ruby_sdk/models/data_source_type_nullable.rb +2 -1
- data/lib/carbon_ruby_sdk/models/external_file_sync_statuses.rb +2 -1
- data/lib/carbon_ruby_sdk/models/file_sync_config.rb +16 -4
- data/lib/carbon_ruby_sdk/models/file_sync_config_nullable.rb +16 -4
- data/lib/carbon_ruby_sdk/models/gitbook_connect_request.rb +14 -4
- data/lib/carbon_ruby_sdk/models/gitbook_sync_request.rb +15 -5
- data/lib/carbon_ruby_sdk/models/one_drive_authentication.rb +250 -0
- data/lib/carbon_ruby_sdk/models/resync_file_query_input.rb +16 -4
- data/lib/carbon_ruby_sdk/models/sharepoint_authentication.rb +1 -5
- data/lib/carbon_ruby_sdk/version.rb +1 -1
- data/lib/carbon_ruby_sdk.rb +5 -0
- data/spec/api/integrations_api_spec.rb +24 -0
- data/spec/models/authentication_property_spec.rb +12 -0
- data/spec/models/azure_blob_auth_request_spec.rb +40 -0
- data/spec/models/azure_blob_file_sync_input_spec.rb +112 -0
- data/spec/models/azure_blob_get_file_input_spec.rb +34 -0
- data/spec/models/azure_blob_storage_authentication_spec.rb +40 -0
- data/spec/models/file_sync_config_nullable_spec.rb +6 -0
- data/spec/models/file_sync_config_spec.rb +6 -0
- data/spec/models/gitbook_connect_request_spec.rb +6 -0
- data/spec/models/gitbook_sync_request_spec.rb +6 -0
- data/spec/models/one_drive_authentication_spec.rb +46 -0
- data/spec/models/resync_file_query_input_spec.rb +6 -0
- metadata +169 -154
@@ -377,9 +377,10 @@ module Carbon
|
|
377
377
|
# @param sync_files_on_connection [Boolean]
|
378
378
|
# @param request_id [String]
|
379
379
|
# @param sync_source_items [Boolean] Enabling this flag will fetch all available content from the source to be listed via list items endpoint
|
380
|
+
# @param file_sync_config [FileSyncConfigNullable]
|
380
381
|
# @param body [GitbookConnectRequest]
|
381
382
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
382
|
-
def connect_gitbook(organization:, access_token:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, sync_files_on_connection: true, request_id: SENTINEL, sync_source_items: true, extra: {})
|
383
|
+
def connect_gitbook(organization:, access_token:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, sync_files_on_connection: true, request_id: SENTINEL, sync_source_items: true, file_sync_config: SENTINEL, extra: {})
|
383
384
|
_body = {}
|
384
385
|
_body[:tags] = tags if tags != SENTINEL
|
385
386
|
_body[:organization] = organization if organization != SENTINEL
|
@@ -393,6 +394,7 @@ module Carbon
|
|
393
394
|
_body[:sync_files_on_connection] = sync_files_on_connection if sync_files_on_connection != SENTINEL
|
394
395
|
_body[:request_id] = request_id if request_id != SENTINEL
|
395
396
|
_body[:sync_source_items] = sync_source_items if sync_source_items != SENTINEL
|
397
|
+
_body[:file_sync_config] = file_sync_config if file_sync_config != SENTINEL
|
396
398
|
gitbook_connect_request = _body
|
397
399
|
api_response = connect_gitbook_with_http_info_impl(gitbook_connect_request, extra)
|
398
400
|
api_response.data
|
@@ -417,9 +419,10 @@ module Carbon
|
|
417
419
|
# @param sync_files_on_connection [Boolean]
|
418
420
|
# @param request_id [String]
|
419
421
|
# @param sync_source_items [Boolean] Enabling this flag will fetch all available content from the source to be listed via list items endpoint
|
422
|
+
# @param file_sync_config [FileSyncConfigNullable]
|
420
423
|
# @param body [GitbookConnectRequest]
|
421
424
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
422
|
-
def connect_gitbook_with_http_info(organization:, access_token:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, sync_files_on_connection: true, request_id: SENTINEL, sync_source_items: true, extra: {})
|
425
|
+
def connect_gitbook_with_http_info(organization:, access_token:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, sync_files_on_connection: true, request_id: SENTINEL, sync_source_items: true, file_sync_config: SENTINEL, extra: {})
|
423
426
|
_body = {}
|
424
427
|
_body[:tags] = tags if tags != SENTINEL
|
425
428
|
_body[:organization] = organization if organization != SENTINEL
|
@@ -433,6 +436,7 @@ module Carbon
|
|
433
436
|
_body[:sync_files_on_connection] = sync_files_on_connection if sync_files_on_connection != SENTINEL
|
434
437
|
_body[:request_id] = request_id if request_id != SENTINEL
|
435
438
|
_body[:sync_source_items] = sync_source_items if sync_source_items != SENTINEL
|
439
|
+
_body[:file_sync_config] = file_sync_config if file_sync_config != SENTINEL
|
436
440
|
gitbook_connect_request = _body
|
437
441
|
connect_gitbook_with_http_info_impl(gitbook_connect_request, extra)
|
438
442
|
end
|
@@ -1789,6 +1793,304 @@ module Carbon
|
|
1789
1793
|
end
|
1790
1794
|
|
1791
1795
|
|
1796
|
+
# Azure Blob Files
|
1797
|
+
#
|
1798
|
+
# After optionally loading the items via /integrations/items/sync and integrations/items/list, use the container name
|
1799
|
+
# and file name as the ID in this endpoint to sync them into Carbon. Additional parameters below can associate
|
1800
|
+
# data with the selected items or modify the sync behavior
|
1801
|
+
#
|
1802
|
+
# @param ids [Array<AzureBlobGetFileInput>]
|
1803
|
+
# @param tags [Object]
|
1804
|
+
# @param chunk_size [Integer]
|
1805
|
+
# @param chunk_overlap [Integer]
|
1806
|
+
# @param skip_embedding_generation [Boolean]
|
1807
|
+
# @param embedding_model [EmbeddingGenerators]
|
1808
|
+
# @param generate_sparse_vectors [Boolean]
|
1809
|
+
# @param prepend_filename_to_chunks [Boolean]
|
1810
|
+
# @param max_items_per_chunk [Integer] Number of objects per chunk. For csv, tsv, xlsx, and json files only.
|
1811
|
+
# @param set_page_as_boundary [Boolean]
|
1812
|
+
# @param data_source_id [Integer]
|
1813
|
+
# @param request_id [String]
|
1814
|
+
# @param use_ocr [Boolean]
|
1815
|
+
# @param parse_pdf_tables_with_ocr [Boolean]
|
1816
|
+
# @param file_sync_config [FileSyncConfigNullable]
|
1817
|
+
# @param body [AzureBlobFileSyncInput]
|
1818
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1819
|
+
def sync_azure_blob_files(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, data_source_id: SENTINEL, request_id: SENTINEL, use_ocr: false, parse_pdf_tables_with_ocr: false, file_sync_config: SENTINEL, extra: {})
|
1820
|
+
_body = {}
|
1821
|
+
_body[:tags] = tags if tags != SENTINEL
|
1822
|
+
_body[:ids] = ids if ids != SENTINEL
|
1823
|
+
_body[:chunk_size] = chunk_size if chunk_size != SENTINEL
|
1824
|
+
_body[:chunk_overlap] = chunk_overlap if chunk_overlap != SENTINEL
|
1825
|
+
_body[:skip_embedding_generation] = skip_embedding_generation if skip_embedding_generation != SENTINEL
|
1826
|
+
_body[:embedding_model] = embedding_model if embedding_model != SENTINEL
|
1827
|
+
_body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
|
1828
|
+
_body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
|
1829
|
+
_body[:max_items_per_chunk] = max_items_per_chunk if max_items_per_chunk != SENTINEL
|
1830
|
+
_body[:set_page_as_boundary] = set_page_as_boundary if set_page_as_boundary != SENTINEL
|
1831
|
+
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
1832
|
+
_body[:request_id] = request_id if request_id != SENTINEL
|
1833
|
+
_body[:use_ocr] = use_ocr if use_ocr != SENTINEL
|
1834
|
+
_body[:parse_pdf_tables_with_ocr] = parse_pdf_tables_with_ocr if parse_pdf_tables_with_ocr != SENTINEL
|
1835
|
+
_body[:file_sync_config] = file_sync_config if file_sync_config != SENTINEL
|
1836
|
+
azure_blob_file_sync_input = _body
|
1837
|
+
api_response = sync_azure_blob_files_with_http_info_impl(azure_blob_file_sync_input, extra)
|
1838
|
+
api_response.data
|
1839
|
+
end
|
1840
|
+
|
1841
|
+
# Azure Blob Files
|
1842
|
+
#
|
1843
|
+
# After optionally loading the items via /integrations/items/sync and integrations/items/list, use the container name
|
1844
|
+
# and file name as the ID in this endpoint to sync them into Carbon. Additional parameters below can associate
|
1845
|
+
# data with the selected items or modify the sync behavior
|
1846
|
+
#
|
1847
|
+
# @param ids [Array<AzureBlobGetFileInput>]
|
1848
|
+
# @param tags [Object]
|
1849
|
+
# @param chunk_size [Integer]
|
1850
|
+
# @param chunk_overlap [Integer]
|
1851
|
+
# @param skip_embedding_generation [Boolean]
|
1852
|
+
# @param embedding_model [EmbeddingGenerators]
|
1853
|
+
# @param generate_sparse_vectors [Boolean]
|
1854
|
+
# @param prepend_filename_to_chunks [Boolean]
|
1855
|
+
# @param max_items_per_chunk [Integer] Number of objects per chunk. For csv, tsv, xlsx, and json files only.
|
1856
|
+
# @param set_page_as_boundary [Boolean]
|
1857
|
+
# @param data_source_id [Integer]
|
1858
|
+
# @param request_id [String]
|
1859
|
+
# @param use_ocr [Boolean]
|
1860
|
+
# @param parse_pdf_tables_with_ocr [Boolean]
|
1861
|
+
# @param file_sync_config [FileSyncConfigNullable]
|
1862
|
+
# @param body [AzureBlobFileSyncInput]
|
1863
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1864
|
+
def sync_azure_blob_files_with_http_info(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, data_source_id: SENTINEL, request_id: SENTINEL, use_ocr: false, parse_pdf_tables_with_ocr: false, file_sync_config: SENTINEL, extra: {})
|
1865
|
+
_body = {}
|
1866
|
+
_body[:tags] = tags if tags != SENTINEL
|
1867
|
+
_body[:ids] = ids if ids != SENTINEL
|
1868
|
+
_body[:chunk_size] = chunk_size if chunk_size != SENTINEL
|
1869
|
+
_body[:chunk_overlap] = chunk_overlap if chunk_overlap != SENTINEL
|
1870
|
+
_body[:skip_embedding_generation] = skip_embedding_generation if skip_embedding_generation != SENTINEL
|
1871
|
+
_body[:embedding_model] = embedding_model if embedding_model != SENTINEL
|
1872
|
+
_body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
|
1873
|
+
_body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
|
1874
|
+
_body[:max_items_per_chunk] = max_items_per_chunk if max_items_per_chunk != SENTINEL
|
1875
|
+
_body[:set_page_as_boundary] = set_page_as_boundary if set_page_as_boundary != SENTINEL
|
1876
|
+
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
1877
|
+
_body[:request_id] = request_id if request_id != SENTINEL
|
1878
|
+
_body[:use_ocr] = use_ocr if use_ocr != SENTINEL
|
1879
|
+
_body[:parse_pdf_tables_with_ocr] = parse_pdf_tables_with_ocr if parse_pdf_tables_with_ocr != SENTINEL
|
1880
|
+
_body[:file_sync_config] = file_sync_config if file_sync_config != SENTINEL
|
1881
|
+
azure_blob_file_sync_input = _body
|
1882
|
+
sync_azure_blob_files_with_http_info_impl(azure_blob_file_sync_input, extra)
|
1883
|
+
end
|
1884
|
+
|
1885
|
+
# Azure Blob Files
|
1886
|
+
# After optionally loading the items via /integrations/items/sync and integrations/items/list, use the container name and file name as the ID in this endpoint to sync them into Carbon. Additional parameters below can associate data with the selected items or modify the sync behavior
|
1887
|
+
# @param azure_blob_file_sync_input [AzureBlobFileSyncInput]
|
1888
|
+
# @param [Hash] opts the optional parameters
|
1889
|
+
# @return [GenericSuccessResponse]
|
1890
|
+
private def sync_azure_blob_files_impl(azure_blob_file_sync_input, opts = {})
|
1891
|
+
data, _status_code, _headers = sync_azure_blob_files_with_http_info(azure_blob_file_sync_input, opts)
|
1892
|
+
data
|
1893
|
+
end
|
1894
|
+
|
1895
|
+
# Azure Blob Files
|
1896
|
+
# After optionally loading the items via /integrations/items/sync and integrations/items/list, use the container name and file name as the ID in this endpoint to sync them into Carbon. Additional parameters below can associate data with the selected items or modify the sync behavior
|
1897
|
+
# @param azure_blob_file_sync_input [AzureBlobFileSyncInput]
|
1898
|
+
# @param [Hash] opts the optional parameters
|
1899
|
+
# @return [APIResponse] data is GenericSuccessResponse, status code, headers and response
|
1900
|
+
private def sync_azure_blob_files_with_http_info_impl(azure_blob_file_sync_input, opts = {})
|
1901
|
+
if @api_client.config.debugging
|
1902
|
+
@api_client.config.logger.debug 'Calling API: IntegrationsApi.sync_azure_blob_files ...'
|
1903
|
+
end
|
1904
|
+
# verify the required parameter 'azure_blob_file_sync_input' is set
|
1905
|
+
if @api_client.config.client_side_validation && azure_blob_file_sync_input.nil?
|
1906
|
+
fail ArgumentError, "Missing the required parameter 'azure_blob_file_sync_input' when calling IntegrationsApi.sync_azure_blob_files"
|
1907
|
+
end
|
1908
|
+
# resource path
|
1909
|
+
local_var_path = '/integrations/azure_blob_storage/files'
|
1910
|
+
|
1911
|
+
# query parameters
|
1912
|
+
query_params = opts[:query_params] || {}
|
1913
|
+
|
1914
|
+
# header parameters
|
1915
|
+
header_params = opts[:header_params] || {}
|
1916
|
+
# HTTP header 'Accept' (if needed)
|
1917
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1918
|
+
# HTTP header 'Content-Type'
|
1919
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
1920
|
+
if !content_type.nil?
|
1921
|
+
header_params['Content-Type'] = content_type
|
1922
|
+
end
|
1923
|
+
|
1924
|
+
# form parameters
|
1925
|
+
form_params = opts[:form_params] || {}
|
1926
|
+
|
1927
|
+
# http body (model)
|
1928
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(azure_blob_file_sync_input)
|
1929
|
+
|
1930
|
+
# return_type
|
1931
|
+
return_type = opts[:debug_return_type] || 'GenericSuccessResponse'
|
1932
|
+
|
1933
|
+
# auth_names
|
1934
|
+
auth_names = opts[:debug_auth_names] || ['accessToken', 'apiKey', 'customerId']
|
1935
|
+
|
1936
|
+
new_options = opts.merge(
|
1937
|
+
:operation => :"IntegrationsApi.sync_azure_blob_files",
|
1938
|
+
:header_params => header_params,
|
1939
|
+
:query_params => query_params,
|
1940
|
+
:form_params => form_params,
|
1941
|
+
:body => post_body,
|
1942
|
+
:auth_names => auth_names,
|
1943
|
+
:return_type => return_type
|
1944
|
+
)
|
1945
|
+
|
1946
|
+
data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
|
1947
|
+
if @api_client.config.debugging
|
1948
|
+
@api_client.config.logger.debug "API called: IntegrationsApi#sync_azure_blob_files\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1949
|
+
end
|
1950
|
+
APIResponse::new(data, status_code, headers, response)
|
1951
|
+
end
|
1952
|
+
|
1953
|
+
|
1954
|
+
# Azure Blob Storage Auth
|
1955
|
+
#
|
1956
|
+
# This endpoint can be used to connect Azure Blob Storage.
|
1957
|
+
#
|
1958
|
+
# For Azure Blob Storage, follow these steps:
|
1959
|
+
# <ol>
|
1960
|
+
# <li>Create a new Azure Storage account and grant the following permissions:
|
1961
|
+
# <ul>
|
1962
|
+
# <li>List containers.</li>
|
1963
|
+
# <li>Read from specific containers and blobs to sync with Carbon. Ensure any future containers or blobs carry the same permissions.</li>
|
1964
|
+
# </ul>
|
1965
|
+
# </li>
|
1966
|
+
# <li>Generate a shared access signature (SAS) token or an access key for the storage account.</li>
|
1967
|
+
# </ol>
|
1968
|
+
#
|
1969
|
+
# Once created, provide us with the following details to generate the connection URL:
|
1970
|
+
# <ol>
|
1971
|
+
# <li>Storage Account KeyName.</li>
|
1972
|
+
# <li>Storage Account Name.</li>
|
1973
|
+
# </ol>
|
1974
|
+
#
|
1975
|
+
# @param account_name [String]
|
1976
|
+
# @param account_key [String]
|
1977
|
+
# @param sync_source_items [Boolean]
|
1978
|
+
# @param body [AzureBlobAuthRequest]
|
1979
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1980
|
+
def sync_azure_blob_storage(account_name:, account_key:, sync_source_items: true, extra: {})
|
1981
|
+
_body = {}
|
1982
|
+
_body[:account_name] = account_name if account_name != SENTINEL
|
1983
|
+
_body[:account_key] = account_key if account_key != SENTINEL
|
1984
|
+
_body[:sync_source_items] = sync_source_items if sync_source_items != SENTINEL
|
1985
|
+
azure_blob_auth_request = _body
|
1986
|
+
api_response = sync_azure_blob_storage_with_http_info_impl(azure_blob_auth_request, extra)
|
1987
|
+
api_response.data
|
1988
|
+
end
|
1989
|
+
|
1990
|
+
# Azure Blob Storage Auth
|
1991
|
+
#
|
1992
|
+
# This endpoint can be used to connect Azure Blob Storage.
|
1993
|
+
#
|
1994
|
+
# For Azure Blob Storage, follow these steps:
|
1995
|
+
# <ol>
|
1996
|
+
# <li>Create a new Azure Storage account and grant the following permissions:
|
1997
|
+
# <ul>
|
1998
|
+
# <li>List containers.</li>
|
1999
|
+
# <li>Read from specific containers and blobs to sync with Carbon. Ensure any future containers or blobs carry the same permissions.</li>
|
2000
|
+
# </ul>
|
2001
|
+
# </li>
|
2002
|
+
# <li>Generate a shared access signature (SAS) token or an access key for the storage account.</li>
|
2003
|
+
# </ol>
|
2004
|
+
#
|
2005
|
+
# Once created, provide us with the following details to generate the connection URL:
|
2006
|
+
# <ol>
|
2007
|
+
# <li>Storage Account KeyName.</li>
|
2008
|
+
# <li>Storage Account Name.</li>
|
2009
|
+
# </ol>
|
2010
|
+
#
|
2011
|
+
# @param account_name [String]
|
2012
|
+
# @param account_key [String]
|
2013
|
+
# @param sync_source_items [Boolean]
|
2014
|
+
# @param body [AzureBlobAuthRequest]
|
2015
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
2016
|
+
def sync_azure_blob_storage_with_http_info(account_name:, account_key:, sync_source_items: true, extra: {})
|
2017
|
+
_body = {}
|
2018
|
+
_body[:account_name] = account_name if account_name != SENTINEL
|
2019
|
+
_body[:account_key] = account_key if account_key != SENTINEL
|
2020
|
+
_body[:sync_source_items] = sync_source_items if sync_source_items != SENTINEL
|
2021
|
+
azure_blob_auth_request = _body
|
2022
|
+
sync_azure_blob_storage_with_http_info_impl(azure_blob_auth_request, extra)
|
2023
|
+
end
|
2024
|
+
|
2025
|
+
# Azure Blob Storage Auth
|
2026
|
+
# This endpoint can be used to connect Azure Blob Storage. For Azure Blob Storage, follow these steps: <ol> <li>Create a new Azure Storage account and grant the following permissions: <ul> <li>List containers.</li> <li>Read from specific containers and blobs to sync with Carbon. Ensure any future containers or blobs carry the same permissions.</li> </ul> </li> <li>Generate a shared access signature (SAS) token or an access key for the storage account.</li> </ol> Once created, provide us with the following details to generate the connection URL: <ol> <li>Storage Account KeyName.</li> <li>Storage Account Name.</li> </ol>
|
2027
|
+
# @param azure_blob_auth_request [AzureBlobAuthRequest]
|
2028
|
+
# @param [Hash] opts the optional parameters
|
2029
|
+
# @return [OrganizationUserDataSourceAPI]
|
2030
|
+
private def sync_azure_blob_storage_impl(azure_blob_auth_request, opts = {})
|
2031
|
+
data, _status_code, _headers = sync_azure_blob_storage_with_http_info(azure_blob_auth_request, opts)
|
2032
|
+
data
|
2033
|
+
end
|
2034
|
+
|
2035
|
+
# Azure Blob Storage Auth
|
2036
|
+
# This endpoint can be used to connect Azure Blob Storage. For Azure Blob Storage, follow these steps: <ol> <li>Create a new Azure Storage account and grant the following permissions: <ul> <li>List containers.</li> <li>Read from specific containers and blobs to sync with Carbon. Ensure any future containers or blobs carry the same permissions.</li> </ul> </li> <li>Generate a shared access signature (SAS) token or an access key for the storage account.</li> </ol> Once created, provide us with the following details to generate the connection URL: <ol> <li>Storage Account KeyName.</li> <li>Storage Account Name.</li> </ol>
|
2037
|
+
# @param azure_blob_auth_request [AzureBlobAuthRequest]
|
2038
|
+
# @param [Hash] opts the optional parameters
|
2039
|
+
# @return [APIResponse] data is OrganizationUserDataSourceAPI, status code, headers and response
|
2040
|
+
private def sync_azure_blob_storage_with_http_info_impl(azure_blob_auth_request, opts = {})
|
2041
|
+
if @api_client.config.debugging
|
2042
|
+
@api_client.config.logger.debug 'Calling API: IntegrationsApi.sync_azure_blob_storage ...'
|
2043
|
+
end
|
2044
|
+
# verify the required parameter 'azure_blob_auth_request' is set
|
2045
|
+
if @api_client.config.client_side_validation && azure_blob_auth_request.nil?
|
2046
|
+
fail ArgumentError, "Missing the required parameter 'azure_blob_auth_request' when calling IntegrationsApi.sync_azure_blob_storage"
|
2047
|
+
end
|
2048
|
+
# resource path
|
2049
|
+
local_var_path = '/integrations/azure_blob_storage'
|
2050
|
+
|
2051
|
+
# query parameters
|
2052
|
+
query_params = opts[:query_params] || {}
|
2053
|
+
|
2054
|
+
# header parameters
|
2055
|
+
header_params = opts[:header_params] || {}
|
2056
|
+
# HTTP header 'Accept' (if needed)
|
2057
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
2058
|
+
# HTTP header 'Content-Type'
|
2059
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
2060
|
+
if !content_type.nil?
|
2061
|
+
header_params['Content-Type'] = content_type
|
2062
|
+
end
|
2063
|
+
|
2064
|
+
# form parameters
|
2065
|
+
form_params = opts[:form_params] || {}
|
2066
|
+
|
2067
|
+
# http body (model)
|
2068
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(azure_blob_auth_request)
|
2069
|
+
|
2070
|
+
# return_type
|
2071
|
+
return_type = opts[:debug_return_type] || 'OrganizationUserDataSourceAPI'
|
2072
|
+
|
2073
|
+
# auth_names
|
2074
|
+
auth_names = opts[:debug_auth_names] || ['accessToken', 'apiKey', 'customerId']
|
2075
|
+
|
2076
|
+
new_options = opts.merge(
|
2077
|
+
:operation => :"IntegrationsApi.sync_azure_blob_storage",
|
2078
|
+
:header_params => header_params,
|
2079
|
+
:query_params => query_params,
|
2080
|
+
:form_params => form_params,
|
2081
|
+
:body => post_body,
|
2082
|
+
:auth_names => auth_names,
|
2083
|
+
:return_type => return_type
|
2084
|
+
)
|
2085
|
+
|
2086
|
+
data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
|
2087
|
+
if @api_client.config.debugging
|
2088
|
+
@api_client.config.logger.debug "API called: IntegrationsApi#sync_azure_blob_storage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2089
|
+
end
|
2090
|
+
APIResponse::new(data, status_code, headers, response)
|
2091
|
+
end
|
2092
|
+
|
2093
|
+
|
1792
2094
|
# Confluence Sync
|
1793
2095
|
#
|
1794
2096
|
# This endpoint has been deprecated. Use /integrations/files/sync instead.
|
@@ -2338,9 +2640,10 @@ module Carbon
|
|
2338
2640
|
# @param generate_sparse_vectors [Boolean]
|
2339
2641
|
# @param prepend_filename_to_chunks [Boolean]
|
2340
2642
|
# @param request_id [String]
|
2643
|
+
# @param file_sync_config [FileSyncConfigNullable]
|
2341
2644
|
# @param body [GitbookSyncRequest]
|
2342
2645
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
2343
|
-
def sync_gitbook(space_ids:, data_source_id:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, request_id: SENTINEL, extra: {})
|
2646
|
+
def sync_gitbook(space_ids:, data_source_id:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, request_id: SENTINEL, file_sync_config: SENTINEL, extra: {})
|
2344
2647
|
_body = {}
|
2345
2648
|
_body[:tags] = tags if tags != SENTINEL
|
2346
2649
|
_body[:space_ids] = space_ids if space_ids != SENTINEL
|
@@ -2352,6 +2655,7 @@ module Carbon
|
|
2352
2655
|
_body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
|
2353
2656
|
_body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
|
2354
2657
|
_body[:request_id] = request_id if request_id != SENTINEL
|
2658
|
+
_body[:file_sync_config] = file_sync_config if file_sync_config != SENTINEL
|
2355
2659
|
gitbook_sync_request = _body
|
2356
2660
|
api_response = sync_gitbook_with_http_info_impl(gitbook_sync_request, extra)
|
2357
2661
|
api_response.data
|
@@ -2372,9 +2676,10 @@ module Carbon
|
|
2372
2676
|
# @param generate_sparse_vectors [Boolean]
|
2373
2677
|
# @param prepend_filename_to_chunks [Boolean]
|
2374
2678
|
# @param request_id [String]
|
2679
|
+
# @param file_sync_config [FileSyncConfigNullable]
|
2375
2680
|
# @param body [GitbookSyncRequest]
|
2376
2681
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
2377
|
-
def sync_gitbook_with_http_info(space_ids:, data_source_id:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, request_id: SENTINEL, extra: {})
|
2682
|
+
def sync_gitbook_with_http_info(space_ids:, data_source_id:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, request_id: SENTINEL, file_sync_config: SENTINEL, extra: {})
|
2378
2683
|
_body = {}
|
2379
2684
|
_body[:tags] = tags if tags != SENTINEL
|
2380
2685
|
_body[:space_ids] = space_ids if space_ids != SENTINEL
|
@@ -2386,6 +2691,7 @@ module Carbon
|
|
2386
2691
|
_body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
|
2387
2692
|
_body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
|
2388
2693
|
_body[:request_id] = request_id if request_id != SENTINEL
|
2694
|
+
_body[:file_sync_config] = file_sync_config if file_sync_config != SENTINEL
|
2389
2695
|
gitbook_sync_request = _body
|
2390
2696
|
sync_gitbook_with_http_info_impl(gitbook_sync_request, extra)
|
2391
2697
|
end
|
@@ -44,6 +44,10 @@ module Carbon
|
|
44
44
|
# You can specify a Digital Ocean endpoint URL to connect a Digital Ocean Space through this endpoint. The URL should be of format <region>.digitaloceanspaces.com. It's not required for S3 buckets.
|
45
45
|
attr_accessor :endpoint_url
|
46
46
|
|
47
|
+
attr_accessor :account_name
|
48
|
+
|
49
|
+
attr_accessor :account_key
|
50
|
+
|
47
51
|
attr_accessor :instance_subdomain
|
48
52
|
|
49
53
|
attr_accessor :client_id
|
@@ -73,6 +77,8 @@ module Carbon
|
|
73
77
|
:'access_key' => :'access_key',
|
74
78
|
:'access_key_secret' => :'access_key_secret',
|
75
79
|
:'endpoint_url' => :'endpoint_url',
|
80
|
+
:'account_name' => :'account_name',
|
81
|
+
:'account_key' => :'account_key',
|
76
82
|
:'instance_subdomain' => :'instance_subdomain',
|
77
83
|
:'client_id' => :'client_id',
|
78
84
|
:'client_secret' => :'client_secret',
|
@@ -105,6 +111,8 @@ module Carbon
|
|
105
111
|
:'access_key' => :'String',
|
106
112
|
:'access_key_secret' => :'String',
|
107
113
|
:'endpoint_url' => :'String',
|
114
|
+
:'account_name' => :'String',
|
115
|
+
:'account_key' => :'String',
|
108
116
|
:'instance_subdomain' => :'String',
|
109
117
|
:'client_id' => :'String',
|
110
118
|
:'client_secret' => :'String',
|
@@ -118,6 +126,7 @@ module Carbon
|
|
118
126
|
Set.new([
|
119
127
|
:'source',
|
120
128
|
:'refresh_token',
|
129
|
+
:'tenant_name',
|
121
130
|
:'endpoint_url',
|
122
131
|
])
|
123
132
|
end
|
@@ -125,6 +134,7 @@ module Carbon
|
|
125
134
|
# List of class defined in anyOf (OpenAPI v3)
|
126
135
|
def self.openapi_any_of
|
127
136
|
[
|
137
|
+
:'AzureBlobStorageAuthentication',
|
128
138
|
:'ConfluenceAuthentication',
|
129
139
|
:'FreskdeskAuthentication',
|
130
140
|
:'GitbookAuthetication',
|
@@ -133,6 +143,7 @@ module Carbon
|
|
133
143
|
:'GuruAuthentication',
|
134
144
|
:'NotionAuthentication',
|
135
145
|
:'OAuthAuthentication',
|
146
|
+
:'OneDriveAuthentication',
|
136
147
|
:'S3Authentication',
|
137
148
|
:'SalesforceAuthentication',
|
138
149
|
:'ServiceNowAuthentication',
|
@@ -221,6 +232,14 @@ module Carbon
|
|
221
232
|
self.endpoint_url = attributes[:'endpoint_url']
|
222
233
|
end
|
223
234
|
|
235
|
+
if attributes.key?(:'account_name')
|
236
|
+
self.account_name = attributes[:'account_name']
|
237
|
+
end
|
238
|
+
|
239
|
+
if attributes.key?(:'account_key')
|
240
|
+
self.account_key = attributes[:'account_key']
|
241
|
+
end
|
242
|
+
|
224
243
|
if attributes.key?(:'instance_subdomain')
|
225
244
|
self.instance_subdomain = attributes[:'instance_subdomain']
|
226
245
|
end
|
@@ -254,10 +273,6 @@ module Carbon
|
|
254
273
|
invalid_properties.push('invalid value for "workspace_id", workspace_id cannot be nil.')
|
255
274
|
end
|
256
275
|
|
257
|
-
if @tenant_name.nil?
|
258
|
-
invalid_properties.push('invalid value for "tenant_name", tenant_name cannot be nil.')
|
259
|
-
end
|
260
|
-
|
261
276
|
if @site_name.nil?
|
262
277
|
invalid_properties.push('invalid value for "site_name", site_name cannot be nil.')
|
263
278
|
end
|
@@ -298,6 +313,14 @@ module Carbon
|
|
298
313
|
invalid_properties.push('invalid value for "access_key_secret", access_key_secret cannot be nil.')
|
299
314
|
end
|
300
315
|
|
316
|
+
if @account_name.nil?
|
317
|
+
invalid_properties.push('invalid value for "account_name", account_name cannot be nil.')
|
318
|
+
end
|
319
|
+
|
320
|
+
if @account_key.nil?
|
321
|
+
invalid_properties.push('invalid value for "account_key", account_key cannot be nil.')
|
322
|
+
end
|
323
|
+
|
301
324
|
if @instance_subdomain.nil?
|
302
325
|
invalid_properties.push('invalid value for "instance_subdomain", instance_subdomain cannot be nil.')
|
303
326
|
end
|
@@ -326,7 +349,6 @@ module Carbon
|
|
326
349
|
def valid?
|
327
350
|
return false if @access_token.nil?
|
328
351
|
return false if @workspace_id.nil?
|
329
|
-
return false if @tenant_name.nil?
|
330
352
|
return false if @site_name.nil?
|
331
353
|
return false if @subdomain.nil?
|
332
354
|
return false if @access_token_secret.nil?
|
@@ -337,6 +359,8 @@ module Carbon
|
|
337
359
|
return false if @api_key.nil?
|
338
360
|
return false if @access_key.nil?
|
339
361
|
return false if @access_key_secret.nil?
|
362
|
+
return false if @account_name.nil?
|
363
|
+
return false if @account_key.nil?
|
340
364
|
return false if @instance_subdomain.nil?
|
341
365
|
return false if @client_id.nil?
|
342
366
|
return false if @client_secret.nil?
|
@@ -378,6 +402,8 @@ module Carbon
|
|
378
402
|
access_key == o.access_key &&
|
379
403
|
access_key_secret == o.access_key_secret &&
|
380
404
|
endpoint_url == o.endpoint_url &&
|
405
|
+
account_name == o.account_name &&
|
406
|
+
account_key == o.account_key &&
|
381
407
|
instance_subdomain == o.instance_subdomain &&
|
382
408
|
client_id == o.client_id &&
|
383
409
|
client_secret == o.client_secret &&
|
@@ -394,7 +420,7 @@ module Carbon
|
|
394
420
|
# Calculates hash code according to all attributes.
|
395
421
|
# @return [Integer] Hash code
|
396
422
|
def hash
|
397
|
-
[source, access_token, refresh_token, workspace_id, tenant_name, site_name, subdomain, access_token_secret, username, zotero_id, organization_name, domain, api_key, access_key, access_key_secret, endpoint_url, instance_subdomain, client_id, client_secret, redirect_uri, gong_account_email].hash
|
423
|
+
[source, access_token, refresh_token, workspace_id, tenant_name, site_name, subdomain, access_token_secret, username, zotero_id, organization_name, domain, api_key, access_key, access_key_secret, endpoint_url, account_name, account_key, instance_subdomain, client_id, client_secret, redirect_uri, gong_account_email].hash
|
398
424
|
end
|
399
425
|
|
400
426
|
# Builds the object from hash
|