carbon_ruby_sdk 0.2.34 → 0.2.36
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 +460 -2
- data/lib/carbon_ruby_sdk/api/crm_api.rb +909 -0
- data/lib/carbon_ruby_sdk/api/integrations_api.rb +298 -0
- data/lib/carbon_ruby_sdk/models/account.rb +398 -0
- data/lib/carbon_ruby_sdk/models/account_filters.rb +226 -0
- data/lib/carbon_ruby_sdk/models/account_response.rb +246 -0
- data/lib/carbon_ruby_sdk/models/accounts_order_by.rb +39 -0
- data/lib/carbon_ruby_sdk/models/accounts_order_by_nullable.rb +39 -0
- data/lib/carbon_ruby_sdk/models/accounts_request.rb +293 -0
- data/lib/carbon_ruby_sdk/models/address.rb +276 -0
- 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/base_includes.rb +36 -0
- data/lib/carbon_ruby_sdk/models/contact.rb +434 -0
- data/lib/carbon_ruby_sdk/models/contact_filters.rb +236 -0
- data/lib/carbon_ruby_sdk/models/contacts_order_by.rb +39 -0
- data/lib/carbon_ruby_sdk/models/contacts_order_by_nullable.rb +39 -0
- data/lib/carbon_ruby_sdk/models/contacts_request.rb +293 -0
- data/lib/carbon_ruby_sdk/models/contacts_response.rb +246 -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/email.rb +230 -0
- data/lib/carbon_ruby_sdk/models/event.rb +370 -0
- data/lib/carbon_ruby_sdk/models/lead.rb +468 -0
- data/lib/carbon_ruby_sdk/models/lead_filters.rb +246 -0
- data/lib/carbon_ruby_sdk/models/leads_order_by.rb +38 -0
- data/lib/carbon_ruby_sdk/models/leads_order_by_nullable.rb +38 -0
- data/lib/carbon_ruby_sdk/models/leads_request.rb +293 -0
- data/lib/carbon_ruby_sdk/models/leads_response.rb +246 -0
- data/lib/carbon_ruby_sdk/models/one_drive_authentication.rb +250 -0
- data/lib/carbon_ruby_sdk/models/opportunities_order_by.rb +40 -0
- data/lib/carbon_ruby_sdk/models/opportunities_order_by_nullable.rb +40 -0
- data/lib/carbon_ruby_sdk/models/opportunities_request.rb +293 -0
- data/lib/carbon_ruby_sdk/models/opportunities_response.rb +246 -0
- data/lib/carbon_ruby_sdk/models/opportunity.rb +400 -0
- data/lib/carbon_ruby_sdk/models/opportunity_filters.rb +246 -0
- data/lib/carbon_ruby_sdk/models/opportunity_status.rb +36 -0
- data/lib/carbon_ruby_sdk/models/opportunity_status_nullable.rb +36 -0
- data/lib/carbon_ruby_sdk/models/order_dir_v2_nullable.rb +36 -0
- data/lib/carbon_ruby_sdk/models/partial_account.rb +216 -0
- data/lib/carbon_ruby_sdk/models/partial_account_nullable.rb +216 -0
- data/lib/carbon_ruby_sdk/models/partial_contact.rb +216 -0
- data/lib/carbon_ruby_sdk/models/partial_contact_nullable.rb +216 -0
- data/lib/carbon_ruby_sdk/models/partial_owner.rb +216 -0
- data/lib/carbon_ruby_sdk/models/partial_owner_nullable.rb +216 -0
- data/lib/carbon_ruby_sdk/models/phone_number.rb +230 -0
- data/lib/carbon_ruby_sdk/models/sent_webhook_payload.rb +2 -2
- data/lib/carbon_ruby_sdk/models/sharepoint_authentication.rb +1 -5
- data/lib/carbon_ruby_sdk/models/task.rb +346 -0
- data/lib/carbon_ruby_sdk/version.rb +1 -1
- data/lib/carbon_ruby_sdk.rb +47 -0
- data/spec/api/crm_api_spec.rb +129 -0
- data/spec/api/integrations_api_spec.rb +24 -0
- data/spec/models/account_filters_spec.rb +34 -0
- data/spec/models/account_response_spec.rb +40 -0
- data/spec/models/account_spec.rb +118 -0
- data/spec/models/accounts_order_by_nullable_spec.rb +22 -0
- data/spec/models/accounts_order_by_spec.rb +22 -0
- data/spec/models/accounts_request_spec.rb +70 -0
- data/spec/models/address_spec.rb +64 -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/base_includes_spec.rb +22 -0
- data/spec/models/contact_filters_spec.rb +40 -0
- data/spec/models/contact_spec.rb +136 -0
- data/spec/models/contacts_order_by_nullable_spec.rb +22 -0
- data/spec/models/contacts_order_by_spec.rb +22 -0
- data/spec/models/contacts_request_spec.rb +70 -0
- data/spec/models/contacts_response_spec.rb +40 -0
- data/spec/models/email_spec.rb +34 -0
- data/spec/models/event_spec.rb +106 -0
- data/spec/models/lead_filters_spec.rb +46 -0
- data/spec/models/lead_spec.rb +154 -0
- data/spec/models/leads_order_by_nullable_spec.rb +22 -0
- data/spec/models/leads_order_by_spec.rb +22 -0
- data/spec/models/leads_request_spec.rb +70 -0
- data/spec/models/leads_response_spec.rb +40 -0
- data/spec/models/one_drive_authentication_spec.rb +46 -0
- data/spec/models/opportunities_order_by_nullable_spec.rb +22 -0
- data/spec/models/opportunities_order_by_spec.rb +22 -0
- data/spec/models/opportunities_request_spec.rb +70 -0
- data/spec/models/opportunities_response_spec.rb +40 -0
- data/spec/models/opportunity_filters_spec.rb +46 -0
- data/spec/models/opportunity_spec.rb +124 -0
- data/spec/models/opportunity_status_nullable_spec.rb +22 -0
- data/spec/models/opportunity_status_spec.rb +22 -0
- data/spec/models/order_dir_v2_nullable_spec.rb +22 -0
- data/spec/models/partial_account_nullable_spec.rb +28 -0
- data/spec/models/partial_account_spec.rb +28 -0
- data/spec/models/partial_contact_nullable_spec.rb +28 -0
- data/spec/models/partial_contact_spec.rb +28 -0
- data/spec/models/partial_owner_nullable_spec.rb +28 -0
- data/spec/models/partial_owner_spec.rb +28 -0
- data/spec/models/phone_number_spec.rb +34 -0
- data/spec/models/sent_webhook_payload_spec.rb +1 -1
- data/spec/models/task_spec.rb +94 -0
- metadata +137 -2
|
@@ -1793,6 +1793,304 @@ module Carbon
|
|
|
1793
1793
|
end
|
|
1794
1794
|
|
|
1795
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
|
+
|
|
1796
2094
|
# Confluence Sync
|
|
1797
2095
|
#
|
|
1798
2096
|
# This endpoint has been deprecated. Use /integrations/files/sync instead.
|