carbon_ruby_sdk 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +11 -0
- data/Gemfile.lock +89 -0
- data/README.md +2325 -0
- data/Rakefile +10 -0
- data/carbon_ruby_sdk.gemspec +39 -0
- data/header.png +0 -0
- data/lib/carbon_ruby_sdk/api/auth_api.rb +177 -0
- data/lib/carbon_ruby_sdk/api/data_sources_api.rb +217 -0
- data/lib/carbon_ruby_sdk/api/embeddings_api.rb +565 -0
- data/lib/carbon_ruby_sdk/api/files_api.rb +1526 -0
- data/lib/carbon_ruby_sdk/api/health_api.rb +92 -0
- data/lib/carbon_ruby_sdk/api/integrations_api.rb +2201 -0
- data/lib/carbon_ruby_sdk/api/organizations_api.rb +92 -0
- data/lib/carbon_ruby_sdk/api/users_api.rb +209 -0
- data/lib/carbon_ruby_sdk/api/utilities_api.rb +710 -0
- data/lib/carbon_ruby_sdk/api/webhooks_api.rb +296 -0
- data/lib/carbon_ruby_sdk/api_client.rb +436 -0
- data/lib/carbon_ruby_sdk/api_client_custom.rb +14 -0
- data/lib/carbon_ruby_sdk/api_error.rb +53 -0
- data/lib/carbon_ruby_sdk/configuration.rb +354 -0
- data/lib/carbon_ruby_sdk/models/add_webhook_props.rb +220 -0
- data/lib/carbon_ruby_sdk/models/body_create_upload_file_uploadfile_post.rb +220 -0
- data/lib/carbon_ruby_sdk/models/chunk_properties.rb +248 -0
- data/lib/carbon_ruby_sdk/models/chunk_properties_nullable.rb +248 -0
- data/lib/carbon_ruby_sdk/models/chunks_and_embeddings.rb +246 -0
- data/lib/carbon_ruby_sdk/models/chunks_and_embeddings_upload_input.rb +247 -0
- data/lib/carbon_ruby_sdk/models/data_source_last_sync_actions.rb +38 -0
- data/lib/carbon_ruby_sdk/models/data_source_sync_statuses.rb +38 -0
- data/lib/carbon_ruby_sdk/models/data_source_type.rb +76 -0
- data/lib/carbon_ruby_sdk/models/data_source_type_nullable.rb +76 -0
- data/lib/carbon_ruby_sdk/models/delete_files_query_input.rb +252 -0
- data/lib/carbon_ruby_sdk/models/directory_item.rb +266 -0
- data/lib/carbon_ruby_sdk/models/document_response.rb +328 -0
- data/lib/carbon_ruby_sdk/models/document_response_list.rb +222 -0
- data/lib/carbon_ruby_sdk/models/embedding_and_chunk.rb +256 -0
- data/lib/carbon_ruby_sdk/models/embedding_generators.rb +43 -0
- data/lib/carbon_ruby_sdk/models/embedding_generators_nullable.rb +43 -0
- data/lib/carbon_ruby_sdk/models/embedding_properties.rb +226 -0
- data/lib/carbon_ruby_sdk/models/embeddings_and_chunks_filters.rb +232 -0
- data/lib/carbon_ruby_sdk/models/embeddings_and_chunks_order_by_columns.rb +37 -0
- data/lib/carbon_ruby_sdk/models/embeddings_and_chunks_query_input.rb +262 -0
- data/lib/carbon_ruby_sdk/models/embeddings_and_chunks_response.rb +236 -0
- data/lib/carbon_ruby_sdk/models/external_file_sync_statuses.rb +43 -0
- data/lib/carbon_ruby_sdk/models/external_source_item.rb +420 -0
- data/lib/carbon_ruby_sdk/models/fetch_urls_response.rb +236 -0
- data/lib/carbon_ruby_sdk/models/file_content_types.rb +36 -0
- data/lib/carbon_ruby_sdk/models/file_content_types_nullable.rb +36 -0
- data/lib/carbon_ruby_sdk/models/file_formats.rb +76 -0
- data/lib/carbon_ruby_sdk/models/file_formats_nullable.rb +76 -0
- data/lib/carbon_ruby_sdk/models/file_statistics.rb +256 -0
- data/lib/carbon_ruby_sdk/models/file_statistics_nullable.rb +256 -0
- data/lib/carbon_ruby_sdk/models/fresh_desk_connect_request.rb +316 -0
- data/lib/carbon_ruby_sdk/models/generic_success_response.rb +220 -0
- data/lib/carbon_ruby_sdk/models/get_embedding_documents_body.rb +416 -0
- data/lib/carbon_ruby_sdk/models/gitbook_connect_request.rb +234 -0
- data/lib/carbon_ruby_sdk/models/gitbook_sync_request.rb +336 -0
- data/lib/carbon_ruby_sdk/models/gmail_sync_input.rb +301 -0
- data/lib/carbon_ruby_sdk/models/http_validation_error.rb +217 -0
- data/lib/carbon_ruby_sdk/models/hybrid_search_tuning_params.rb +234 -0
- data/lib/carbon_ruby_sdk/models/hybrid_search_tuning_params_nullable.rb +235 -0
- data/lib/carbon_ruby_sdk/models/list_data_source_items_request.rb +239 -0
- data/lib/carbon_ruby_sdk/models/list_data_source_items_response.rb +236 -0
- data/lib/carbon_ruby_sdk/models/list_request.rb +230 -0
- data/lib/carbon_ruby_sdk/models/list_response.rb +222 -0
- data/lib/carbon_ruby_sdk/models/location_property_inner.rb +226 -0
- data/lib/carbon_ruby_sdk/models/modify_user_configuration_input.rb +234 -0
- data/lib/carbon_ruby_sdk/models/o_auth_url_request.rb +362 -0
- data/lib/carbon_ruby_sdk/models/order_dir.rb +36 -0
- data/lib/carbon_ruby_sdk/models/organization_response.rb +362 -0
- data/lib/carbon_ruby_sdk/models/organization_user_data_source_api.rb +380 -0
- data/lib/carbon_ruby_sdk/models/organization_user_data_source_filters.rb +238 -0
- data/lib/carbon_ruby_sdk/models/organization_user_data_source_order_by_columns.rb +36 -0
- data/lib/carbon_ruby_sdk/models/organization_user_data_source_query_input.rb +246 -0
- data/lib/carbon_ruby_sdk/models/organization_user_data_source_response.rb +236 -0
- data/lib/carbon_ruby_sdk/models/organization_user_file_tag_create.rb +236 -0
- data/lib/carbon_ruby_sdk/models/organization_user_file_tags_remove.rb +236 -0
- data/lib/carbon_ruby_sdk/models/organization_user_files_to_sync_filters.rb +330 -0
- data/lib/carbon_ruby_sdk/models/organization_user_files_to_sync_order_by_types.rb +39 -0
- data/lib/carbon_ruby_sdk/models/organization_user_files_to_sync_query_input.rb +276 -0
- data/lib/carbon_ruby_sdk/models/outlook_sync_input.rb +313 -0
- data/lib/carbon_ruby_sdk/models/pagination.rb +228 -0
- data/lib/carbon_ruby_sdk/models/presigned_url_response.rb +220 -0
- data/lib/carbon_ruby_sdk/models/rank_property.rb +226 -0
- data/lib/carbon_ruby_sdk/models/raw_text_input.rb +295 -0
- data/lib/carbon_ruby_sdk/models/raw_transcript_property_inner_value.rb +226 -0
- data/lib/carbon_ruby_sdk/models/resync_file_query_input.rb +240 -0
- data/lib/carbon_ruby_sdk/models/revoke_access_token_input.rb +220 -0
- data/lib/carbon_ruby_sdk/models/rss_feed_input.rb +301 -0
- data/lib/carbon_ruby_sdk/models/s3_auth_request.rb +234 -0
- data/lib/carbon_ruby_sdk/models/s3_file_sync_input.rb +313 -0
- data/lib/carbon_ruby_sdk/models/s3_get_file_input.rb +226 -0
- data/lib/carbon_ruby_sdk/models/single_chunks_and_embeddings_upload_input.rb +256 -0
- data/lib/carbon_ruby_sdk/models/sitemap_scrape_request.rb +361 -0
- data/lib/carbon_ruby_sdk/models/source_property.rb +226 -0
- data/lib/carbon_ruby_sdk/models/sync_directory_request.rb +220 -0
- data/lib/carbon_ruby_sdk/models/sync_files_request.rb +328 -0
- data/lib/carbon_ruby_sdk/models/tags.rb +232 -0
- data/lib/carbon_ruby_sdk/models/tags1.rb +230 -0
- data/lib/carbon_ruby_sdk/models/text_embedding_generators.rb +42 -0
- data/lib/carbon_ruby_sdk/models/token_response.rb +234 -0
- data/lib/carbon_ruby_sdk/models/upload_file_from_url_input.rb +326 -0
- data/lib/carbon_ruby_sdk/models/user_file.rb +524 -0
- data/lib/carbon_ruby_sdk/models/user_files_v2.rb +236 -0
- data/lib/carbon_ruby_sdk/models/user_request_content.rb +220 -0
- data/lib/carbon_ruby_sdk/models/user_response.rb +354 -0
- data/lib/carbon_ruby_sdk/models/validation_error.rb +250 -0
- data/lib/carbon_ruby_sdk/models/webhook.rb +290 -0
- data/lib/carbon_ruby_sdk/models/webhook_filters.rb +218 -0
- data/lib/carbon_ruby_sdk/models/webhook_no_key.rb +276 -0
- data/lib/carbon_ruby_sdk/models/webhook_order_by_columns.rb +36 -0
- data/lib/carbon_ruby_sdk/models/webhook_query_input.rb +246 -0
- data/lib/carbon_ruby_sdk/models/webhook_query_response.rb +236 -0
- data/lib/carbon_ruby_sdk/models/webscrape_request.rb +375 -0
- data/lib/carbon_ruby_sdk/models/white_labeling_response.rb +234 -0
- data/lib/carbon_ruby_sdk/models/youtube_transcript_response.rb +252 -0
- data/lib/carbon_ruby_sdk/version.rb +11 -0
- data/lib/carbon_ruby_sdk.rb +207 -0
- data/spec/api/auth_api_spec.rb +50 -0
- data/spec/api/data_sources_api_spec.rb +51 -0
- data/spec/api/embeddings_api_spec.rb +63 -0
- data/spec/api/files_api_spec.rb +178 -0
- data/spec/api/health_api_spec.rb +39 -0
- data/spec/api/integrations_api_spec.rb +226 -0
- data/spec/api/organizations_api_spec.rb +39 -0
- data/spec/api/users_api_spec.rb +51 -0
- data/spec/api/utilities_api_spec.rb +102 -0
- data/spec/api/webhooks_api_spec.rb +62 -0
- data/spec/api_client_spec.rb +191 -0
- data/spec/configuration_spec.rb +38 -0
- data/spec/getting_started_spec.rb +196 -0
- data/spec/models/add_webhook_props_spec.rb +28 -0
- data/spec/models/body_create_upload_file_uploadfile_post_spec.rb +28 -0
- data/spec/models/chunk_properties_nullable_spec.rb +40 -0
- data/spec/models/chunk_properties_spec.rb +40 -0
- data/spec/models/chunks_and_embeddings_spec.rb +40 -0
- data/spec/models/chunks_and_embeddings_upload_input_spec.rb +40 -0
- data/spec/models/data_source_last_sync_actions_spec.rb +22 -0
- data/spec/models/data_source_sync_statuses_spec.rb +22 -0
- data/spec/models/data_source_type_nullable_spec.rb +22 -0
- data/spec/models/data_source_type_spec.rb +22 -0
- data/spec/models/delete_files_query_input_spec.rb +46 -0
- data/spec/models/directory_item_spec.rb +46 -0
- data/spec/models/document_response_list_spec.rb +28 -0
- data/spec/models/document_response_spec.rb +88 -0
- data/spec/models/embedding_and_chunk_spec.rb +46 -0
- data/spec/models/embedding_generators_nullable_spec.rb +22 -0
- data/spec/models/embedding_generators_spec.rb +22 -0
- data/spec/models/embedding_properties_spec.rb +34 -0
- data/spec/models/embeddings_and_chunks_filters_spec.rb +34 -0
- data/spec/models/embeddings_and_chunks_order_by_columns_spec.rb +22 -0
- data/spec/models/embeddings_and_chunks_query_input_spec.rb +52 -0
- data/spec/models/embeddings_and_chunks_response_spec.rb +34 -0
- data/spec/models/external_file_sync_statuses_spec.rb +22 -0
- data/spec/models/external_source_item_spec.rb +124 -0
- data/spec/models/fetch_urls_response_spec.rb +34 -0
- data/spec/models/file_content_types_nullable_spec.rb +22 -0
- data/spec/models/file_content_types_spec.rb +22 -0
- data/spec/models/file_formats_nullable_spec.rb +22 -0
- data/spec/models/file_formats_spec.rb +22 -0
- data/spec/models/file_statistics_nullable_spec.rb +52 -0
- data/spec/models/file_statistics_spec.rb +52 -0
- data/spec/models/fresh_desk_connect_request_spec.rb +76 -0
- data/spec/models/generic_success_response_spec.rb +28 -0
- data/spec/models/get_embedding_documents_body_spec.rb +106 -0
- data/spec/models/gitbook_connect_request_spec.rb +34 -0
- data/spec/models/gitbook_sync_request_spec.rb +76 -0
- data/spec/models/gmail_sync_input_spec.rb +70 -0
- data/spec/models/http_validation_error_spec.rb +28 -0
- data/spec/models/hybrid_search_tuning_params_nullable_spec.rb +34 -0
- data/spec/models/hybrid_search_tuning_params_spec.rb +34 -0
- data/spec/models/list_data_source_items_request_spec.rb +40 -0
- data/spec/models/list_data_source_items_response_spec.rb +34 -0
- data/spec/models/list_request_spec.rb +34 -0
- data/spec/models/list_response_spec.rb +28 -0
- data/spec/models/location_property_inner_spec.rb +22 -0
- data/spec/models/modify_user_configuration_input_spec.rb +34 -0
- data/spec/models/o_auth_url_request_spec.rb +106 -0
- data/spec/models/order_dir_spec.rb +22 -0
- data/spec/models/organization_response_spec.rb +94 -0
- data/spec/models/organization_user_data_source_api_spec.rb +100 -0
- data/spec/models/organization_user_data_source_filters_spec.rb +40 -0
- data/spec/models/organization_user_data_source_order_by_columns_spec.rb +22 -0
- data/spec/models/organization_user_data_source_query_input_spec.rb +46 -0
- data/spec/models/organization_user_data_source_response_spec.rb +34 -0
- data/spec/models/organization_user_file_tag_create_spec.rb +34 -0
- data/spec/models/organization_user_file_tags_remove_spec.rb +34 -0
- data/spec/models/organization_user_files_to_sync_filters_spec.rb +88 -0
- data/spec/models/organization_user_files_to_sync_order_by_types_spec.rb +22 -0
- data/spec/models/organization_user_files_to_sync_query_input_spec.rb +64 -0
- data/spec/models/outlook_sync_input_spec.rb +76 -0
- data/spec/models/pagination_spec.rb +34 -0
- data/spec/models/presigned_url_response_spec.rb +28 -0
- data/spec/models/rank_property_spec.rb +22 -0
- data/spec/models/raw_text_input_spec.rb +70 -0
- data/spec/models/raw_transcript_property_inner_value_spec.rb +22 -0
- data/spec/models/resync_file_query_input_spec.rb +40 -0
- data/spec/models/revoke_access_token_input_spec.rb +28 -0
- data/spec/models/rss_feed_input_spec.rb +70 -0
- data/spec/models/s3_auth_request_spec.rb +34 -0
- data/spec/models/s3_file_sync_input_spec.rb +76 -0
- data/spec/models/s3_get_file_input_spec.rb +34 -0
- data/spec/models/single_chunks_and_embeddings_upload_input_spec.rb +46 -0
- data/spec/models/sitemap_scrape_request_spec.rb +100 -0
- data/spec/models/source_property_spec.rb +22 -0
- data/spec/models/sync_directory_request_spec.rb +28 -0
- data/spec/models/sync_files_request_spec.rb +82 -0
- data/spec/models/tags1_spec.rb +22 -0
- data/spec/models/tags_spec.rb +22 -0
- data/spec/models/text_embedding_generators_spec.rb +22 -0
- data/spec/models/token_response_spec.rb +34 -0
- data/spec/models/upload_file_from_url_input_spec.rb +88 -0
- data/spec/models/user_file_spec.rb +190 -0
- data/spec/models/user_files_v2_spec.rb +34 -0
- data/spec/models/user_request_content_spec.rb +28 -0
- data/spec/models/user_response_spec.rb +88 -0
- data/spec/models/validation_error_spec.rb +40 -0
- data/spec/models/webhook_filters_spec.rb +28 -0
- data/spec/models/webhook_no_key_spec.rb +52 -0
- data/spec/models/webhook_order_by_columns_spec.rb +22 -0
- data/spec/models/webhook_query_input_spec.rb +46 -0
- data/spec/models/webhook_query_response_spec.rb +34 -0
- data/spec/models/webhook_spec.rb +58 -0
- data/spec/models/webscrape_request_spec.rb +106 -0
- data/spec/models/white_labeling_response_spec.rb +34 -0
- data/spec/models/youtube_transcript_response_spec.rb +46 -0
- data/spec/spec_helper.rb +107 -0
- metadata +440 -0
@@ -0,0 +1,2201 @@
|
|
1
|
+
=begin
|
2
|
+
#Carbon
|
3
|
+
|
4
|
+
#Connect external data to LLMs, no matter the source.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
=end
|
8
|
+
|
9
|
+
require 'cgi'
|
10
|
+
|
11
|
+
module Carbon
|
12
|
+
class IntegrationsApi
|
13
|
+
attr_accessor :api_client
|
14
|
+
|
15
|
+
def initialize(api_client = ApiClient.default)
|
16
|
+
@api_client = api_client
|
17
|
+
end
|
18
|
+
|
19
|
+
# Freshdesk Connect
|
20
|
+
#
|
21
|
+
# Refer this article to obtain an API key https://support.freshdesk.com/en/support/solutions/articles/215517.
|
22
|
+
# Make sure that your API key has the permission to read solutions from your account and you are on a <b>paid</b> plan.
|
23
|
+
# Once you have an API key, you can make a request to this endpoint along with your freshdesk domain. This will
|
24
|
+
# trigger an automatic sync of the articles in your "solutions" tab. Additional parameters below can be used to associate
|
25
|
+
# data with the synced articles or modify the sync behavior.
|
26
|
+
#
|
27
|
+
# @param domain [String]
|
28
|
+
# @param api_key [String]
|
29
|
+
# @param tags [Object]
|
30
|
+
# @param chunk_size [Integer]
|
31
|
+
# @param chunk_overlap [Integer]
|
32
|
+
# @param skip_embedding_generation [Boolean]
|
33
|
+
# @param embedding_model [EmbeddingGeneratorsNullable]
|
34
|
+
# @param generate_sparse_vectors [Boolean]
|
35
|
+
# @param prepend_filename_to_chunks [Boolean]
|
36
|
+
# @param body [FreshDeskConnectRequest]
|
37
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
38
|
+
def connect_freshdesk(domain:, api_key:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, extra: {})
|
39
|
+
_body = {}
|
40
|
+
_body[:tags] = tags if tags != SENTINEL
|
41
|
+
_body[:domain] = domain if domain != SENTINEL
|
42
|
+
_body[:api_key] = api_key if api_key != SENTINEL
|
43
|
+
_body[:chunk_size] = chunk_size if chunk_size != SENTINEL
|
44
|
+
_body[:chunk_overlap] = chunk_overlap if chunk_overlap != SENTINEL
|
45
|
+
_body[:skip_embedding_generation] = skip_embedding_generation if skip_embedding_generation != SENTINEL
|
46
|
+
_body[:embedding_model] = embedding_model if embedding_model != SENTINEL
|
47
|
+
_body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
|
48
|
+
_body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
|
49
|
+
fresh_desk_connect_request = _body
|
50
|
+
api_response = connect_freshdesk_with_http_info_impl(fresh_desk_connect_request, extra)
|
51
|
+
api_response.data
|
52
|
+
end
|
53
|
+
|
54
|
+
# Freshdesk Connect
|
55
|
+
#
|
56
|
+
# Refer this article to obtain an API key https://support.freshdesk.com/en/support/solutions/articles/215517.
|
57
|
+
# Make sure that your API key has the permission to read solutions from your account and you are on a <b>paid</b> plan.
|
58
|
+
# Once you have an API key, you can make a request to this endpoint along with your freshdesk domain. This will
|
59
|
+
# trigger an automatic sync of the articles in your "solutions" tab. Additional parameters below can be used to associate
|
60
|
+
# data with the synced articles or modify the sync behavior.
|
61
|
+
#
|
62
|
+
# @param domain [String]
|
63
|
+
# @param api_key [String]
|
64
|
+
# @param tags [Object]
|
65
|
+
# @param chunk_size [Integer]
|
66
|
+
# @param chunk_overlap [Integer]
|
67
|
+
# @param skip_embedding_generation [Boolean]
|
68
|
+
# @param embedding_model [EmbeddingGeneratorsNullable]
|
69
|
+
# @param generate_sparse_vectors [Boolean]
|
70
|
+
# @param prepend_filename_to_chunks [Boolean]
|
71
|
+
# @param body [FreshDeskConnectRequest]
|
72
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
73
|
+
def connect_freshdesk_with_http_info(domain:, api_key:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, extra: {})
|
74
|
+
_body = {}
|
75
|
+
_body[:tags] = tags if tags != SENTINEL
|
76
|
+
_body[:domain] = domain if domain != SENTINEL
|
77
|
+
_body[:api_key] = api_key if api_key != SENTINEL
|
78
|
+
_body[:chunk_size] = chunk_size if chunk_size != SENTINEL
|
79
|
+
_body[:chunk_overlap] = chunk_overlap if chunk_overlap != SENTINEL
|
80
|
+
_body[:skip_embedding_generation] = skip_embedding_generation if skip_embedding_generation != SENTINEL
|
81
|
+
_body[:embedding_model] = embedding_model if embedding_model != SENTINEL
|
82
|
+
_body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
|
83
|
+
_body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
|
84
|
+
fresh_desk_connect_request = _body
|
85
|
+
connect_freshdesk_with_http_info_impl(fresh_desk_connect_request, extra)
|
86
|
+
end
|
87
|
+
|
88
|
+
# Freshdesk Connect
|
89
|
+
# Refer this article to obtain an API key https://support.freshdesk.com/en/support/solutions/articles/215517. Make sure that your API key has the permission to read solutions from your account and you are on a <b>paid</b> plan. Once you have an API key, you can make a request to this endpoint along with your freshdesk domain. This will trigger an automatic sync of the articles in your \"solutions\" tab. Additional parameters below can be used to associate data with the synced articles or modify the sync behavior.
|
90
|
+
# @param fresh_desk_connect_request [FreshDeskConnectRequest]
|
91
|
+
# @param [Hash] opts the optional parameters
|
92
|
+
# @return [GenericSuccessResponse]
|
93
|
+
private def connect_freshdesk_impl(fresh_desk_connect_request, opts = {})
|
94
|
+
data, _status_code, _headers = connect_freshdesk_with_http_info(fresh_desk_connect_request, opts)
|
95
|
+
data
|
96
|
+
end
|
97
|
+
|
98
|
+
# Freshdesk Connect
|
99
|
+
# Refer this article to obtain an API key https://support.freshdesk.com/en/support/solutions/articles/215517. Make sure that your API key has the permission to read solutions from your account and you are on a <b>paid</b> plan. Once you have an API key, you can make a request to this endpoint along with your freshdesk domain. This will trigger an automatic sync of the articles in your \"solutions\" tab. Additional parameters below can be used to associate data with the synced articles or modify the sync behavior.
|
100
|
+
# @param fresh_desk_connect_request [FreshDeskConnectRequest]
|
101
|
+
# @param [Hash] opts the optional parameters
|
102
|
+
# @return [APIResponse] data is GenericSuccessResponse, status code, headers and response
|
103
|
+
private def connect_freshdesk_with_http_info_impl(fresh_desk_connect_request, opts = {})
|
104
|
+
if @api_client.config.debugging
|
105
|
+
@api_client.config.logger.debug 'Calling API: IntegrationsApi.connect_freshdesk ...'
|
106
|
+
end
|
107
|
+
# verify the required parameter 'fresh_desk_connect_request' is set
|
108
|
+
if @api_client.config.client_side_validation && fresh_desk_connect_request.nil?
|
109
|
+
fail ArgumentError, "Missing the required parameter 'fresh_desk_connect_request' when calling IntegrationsApi.connect_freshdesk"
|
110
|
+
end
|
111
|
+
# resource path
|
112
|
+
local_var_path = '/integrations/freshdesk'
|
113
|
+
|
114
|
+
# query parameters
|
115
|
+
query_params = opts[:query_params] || {}
|
116
|
+
|
117
|
+
# header parameters
|
118
|
+
header_params = opts[:header_params] || {}
|
119
|
+
# HTTP header 'Accept' (if needed)
|
120
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
121
|
+
# HTTP header 'Content-Type'
|
122
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
123
|
+
if !content_type.nil?
|
124
|
+
header_params['Content-Type'] = content_type
|
125
|
+
end
|
126
|
+
|
127
|
+
# form parameters
|
128
|
+
form_params = opts[:form_params] || {}
|
129
|
+
|
130
|
+
# http body (model)
|
131
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(fresh_desk_connect_request)
|
132
|
+
|
133
|
+
# return_type
|
134
|
+
return_type = opts[:debug_return_type] || 'GenericSuccessResponse'
|
135
|
+
|
136
|
+
# auth_names
|
137
|
+
auth_names = opts[:debug_auth_names] || ['accessToken', 'apiKey', 'customerId']
|
138
|
+
|
139
|
+
new_options = opts.merge(
|
140
|
+
:operation => :"IntegrationsApi.connect_freshdesk",
|
141
|
+
:header_params => header_params,
|
142
|
+
:query_params => query_params,
|
143
|
+
:form_params => form_params,
|
144
|
+
:body => post_body,
|
145
|
+
:auth_names => auth_names,
|
146
|
+
:return_type => return_type
|
147
|
+
)
|
148
|
+
|
149
|
+
data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
|
150
|
+
if @api_client.config.debugging
|
151
|
+
@api_client.config.logger.debug "API called: IntegrationsApi#connect_freshdesk\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
152
|
+
end
|
153
|
+
APIResponse::new(data, status_code, headers, response)
|
154
|
+
end
|
155
|
+
|
156
|
+
|
157
|
+
# Gitbook Connect
|
158
|
+
#
|
159
|
+
# You will need an access token to connect your Gitbook account. Note that the permissions will be defined by the user
|
160
|
+
# generating access token so make sure you have the permission to access spaces you will be syncing.
|
161
|
+
# Refer this article for more details https://developer.gitbook.com/gitbook-api/authentication. Additionally, you
|
162
|
+
# need to specify the name of organization you will be syncing data from.
|
163
|
+
#
|
164
|
+
# @param organization [String]
|
165
|
+
# @param access_token [String]
|
166
|
+
# @param body [GitbookConnectRequest]
|
167
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
168
|
+
def connect_gitbook(organization:, access_token:, extra: {})
|
169
|
+
_body = {}
|
170
|
+
_body[:organization] = organization if organization != SENTINEL
|
171
|
+
_body[:access_token] = access_token if access_token != SENTINEL
|
172
|
+
gitbook_connect_request = _body
|
173
|
+
api_response = connect_gitbook_with_http_info_impl(gitbook_connect_request, extra)
|
174
|
+
api_response.data
|
175
|
+
end
|
176
|
+
|
177
|
+
# Gitbook Connect
|
178
|
+
#
|
179
|
+
# You will need an access token to connect your Gitbook account. Note that the permissions will be defined by the user
|
180
|
+
# generating access token so make sure you have the permission to access spaces you will be syncing.
|
181
|
+
# Refer this article for more details https://developer.gitbook.com/gitbook-api/authentication. Additionally, you
|
182
|
+
# need to specify the name of organization you will be syncing data from.
|
183
|
+
#
|
184
|
+
# @param organization [String]
|
185
|
+
# @param access_token [String]
|
186
|
+
# @param body [GitbookConnectRequest]
|
187
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
188
|
+
def connect_gitbook_with_http_info(organization:, access_token:, extra: {})
|
189
|
+
_body = {}
|
190
|
+
_body[:organization] = organization if organization != SENTINEL
|
191
|
+
_body[:access_token] = access_token if access_token != SENTINEL
|
192
|
+
gitbook_connect_request = _body
|
193
|
+
connect_gitbook_with_http_info_impl(gitbook_connect_request, extra)
|
194
|
+
end
|
195
|
+
|
196
|
+
# Gitbook Connect
|
197
|
+
# You will need an access token to connect your Gitbook account. Note that the permissions will be defined by the user generating access token so make sure you have the permission to access spaces you will be syncing. Refer this article for more details https://developer.gitbook.com/gitbook-api/authentication. Additionally, you need to specify the name of organization you will be syncing data from.
|
198
|
+
# @param gitbook_connect_request [GitbookConnectRequest]
|
199
|
+
# @param [Hash] opts the optional parameters
|
200
|
+
# @return [GenericSuccessResponse]
|
201
|
+
private def connect_gitbook_impl(gitbook_connect_request, opts = {})
|
202
|
+
data, _status_code, _headers = connect_gitbook_with_http_info(gitbook_connect_request, opts)
|
203
|
+
data
|
204
|
+
end
|
205
|
+
|
206
|
+
# Gitbook Connect
|
207
|
+
# You will need an access token to connect your Gitbook account. Note that the permissions will be defined by the user generating access token so make sure you have the permission to access spaces you will be syncing. Refer this article for more details https://developer.gitbook.com/gitbook-api/authentication. Additionally, you need to specify the name of organization you will be syncing data from.
|
208
|
+
# @param gitbook_connect_request [GitbookConnectRequest]
|
209
|
+
# @param [Hash] opts the optional parameters
|
210
|
+
# @return [APIResponse] data is GenericSuccessResponse, status code, headers and response
|
211
|
+
private def connect_gitbook_with_http_info_impl(gitbook_connect_request, opts = {})
|
212
|
+
if @api_client.config.debugging
|
213
|
+
@api_client.config.logger.debug 'Calling API: IntegrationsApi.connect_gitbook ...'
|
214
|
+
end
|
215
|
+
# verify the required parameter 'gitbook_connect_request' is set
|
216
|
+
if @api_client.config.client_side_validation && gitbook_connect_request.nil?
|
217
|
+
fail ArgumentError, "Missing the required parameter 'gitbook_connect_request' when calling IntegrationsApi.connect_gitbook"
|
218
|
+
end
|
219
|
+
# resource path
|
220
|
+
local_var_path = '/integrations/gitbook'
|
221
|
+
|
222
|
+
# query parameters
|
223
|
+
query_params = opts[:query_params] || {}
|
224
|
+
|
225
|
+
# header parameters
|
226
|
+
header_params = opts[:header_params] || {}
|
227
|
+
# HTTP header 'Accept' (if needed)
|
228
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
229
|
+
# HTTP header 'Content-Type'
|
230
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
231
|
+
if !content_type.nil?
|
232
|
+
header_params['Content-Type'] = content_type
|
233
|
+
end
|
234
|
+
|
235
|
+
# form parameters
|
236
|
+
form_params = opts[:form_params] || {}
|
237
|
+
|
238
|
+
# http body (model)
|
239
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(gitbook_connect_request)
|
240
|
+
|
241
|
+
# return_type
|
242
|
+
return_type = opts[:debug_return_type] || 'GenericSuccessResponse'
|
243
|
+
|
244
|
+
# auth_names
|
245
|
+
auth_names = opts[:debug_auth_names] || ['accessToken', 'apiKey', 'customerId']
|
246
|
+
|
247
|
+
new_options = opts.merge(
|
248
|
+
:operation => :"IntegrationsApi.connect_gitbook",
|
249
|
+
:header_params => header_params,
|
250
|
+
:query_params => query_params,
|
251
|
+
:form_params => form_params,
|
252
|
+
:body => post_body,
|
253
|
+
:auth_names => auth_names,
|
254
|
+
:return_type => return_type
|
255
|
+
)
|
256
|
+
|
257
|
+
data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
|
258
|
+
if @api_client.config.debugging
|
259
|
+
@api_client.config.logger.debug "API called: IntegrationsApi#connect_gitbook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
260
|
+
end
|
261
|
+
APIResponse::new(data, status_code, headers, response)
|
262
|
+
end
|
263
|
+
|
264
|
+
|
265
|
+
# S3 Auth
|
266
|
+
#
|
267
|
+
# Create a new IAM user with permissions to:
|
268
|
+
# <ol>
|
269
|
+
# <li>List all buckets.</li>
|
270
|
+
# <li>Read from the specific buckets and objects to sync with Carbon. Ensure any future buckets or objects carry
|
271
|
+
# the same permissions.</li>
|
272
|
+
# </ol>
|
273
|
+
# Once created, generate an access key for this user and share the credentials with us. We recommend testing this key beforehand.
|
274
|
+
#
|
275
|
+
# @param access_key [String]
|
276
|
+
# @param access_key_secret [String]
|
277
|
+
# @param body [S3AuthRequest]
|
278
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
279
|
+
def create_aws_iam_user(access_key:, access_key_secret:, extra: {})
|
280
|
+
_body = {}
|
281
|
+
_body[:access_key] = access_key if access_key != SENTINEL
|
282
|
+
_body[:access_key_secret] = access_key_secret if access_key_secret != SENTINEL
|
283
|
+
s3_auth_request = _body
|
284
|
+
api_response = create_aws_iam_user_with_http_info_impl(s3_auth_request, extra)
|
285
|
+
api_response.data
|
286
|
+
end
|
287
|
+
|
288
|
+
# S3 Auth
|
289
|
+
#
|
290
|
+
# Create a new IAM user with permissions to:
|
291
|
+
# <ol>
|
292
|
+
# <li>List all buckets.</li>
|
293
|
+
# <li>Read from the specific buckets and objects to sync with Carbon. Ensure any future buckets or objects carry
|
294
|
+
# the same permissions.</li>
|
295
|
+
# </ol>
|
296
|
+
# Once created, generate an access key for this user and share the credentials with us. We recommend testing this key beforehand.
|
297
|
+
#
|
298
|
+
# @param access_key [String]
|
299
|
+
# @param access_key_secret [String]
|
300
|
+
# @param body [S3AuthRequest]
|
301
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
302
|
+
def create_aws_iam_user_with_http_info(access_key:, access_key_secret:, extra: {})
|
303
|
+
_body = {}
|
304
|
+
_body[:access_key] = access_key if access_key != SENTINEL
|
305
|
+
_body[:access_key_secret] = access_key_secret if access_key_secret != SENTINEL
|
306
|
+
s3_auth_request = _body
|
307
|
+
create_aws_iam_user_with_http_info_impl(s3_auth_request, extra)
|
308
|
+
end
|
309
|
+
|
310
|
+
# S3 Auth
|
311
|
+
# Create a new IAM user with permissions to: <ol> <li>List all buckets.</li> <li>Read from the specific buckets and objects to sync with Carbon. Ensure any future buckets or objects carry the same permissions.</li> </ol> Once created, generate an access key for this user and share the credentials with us. We recommend testing this key beforehand.
|
312
|
+
# @param s3_auth_request [S3AuthRequest]
|
313
|
+
# @param [Hash] opts the optional parameters
|
314
|
+
# @return [OrganizationUserDataSourceAPI]
|
315
|
+
private def create_aws_iam_user_impl(s3_auth_request, opts = {})
|
316
|
+
data, _status_code, _headers = create_aws_iam_user_with_http_info(s3_auth_request, opts)
|
317
|
+
data
|
318
|
+
end
|
319
|
+
|
320
|
+
# S3 Auth
|
321
|
+
# Create a new IAM user with permissions to: <ol> <li>List all buckets.</li> <li>Read from the specific buckets and objects to sync with Carbon. Ensure any future buckets or objects carry the same permissions.</li> </ol> Once created, generate an access key for this user and share the credentials with us. We recommend testing this key beforehand.
|
322
|
+
# @param s3_auth_request [S3AuthRequest]
|
323
|
+
# @param [Hash] opts the optional parameters
|
324
|
+
# @return [APIResponse] data is OrganizationUserDataSourceAPI, status code, headers and response
|
325
|
+
private def create_aws_iam_user_with_http_info_impl(s3_auth_request, opts = {})
|
326
|
+
if @api_client.config.debugging
|
327
|
+
@api_client.config.logger.debug 'Calling API: IntegrationsApi.create_aws_iam_user ...'
|
328
|
+
end
|
329
|
+
# verify the required parameter 's3_auth_request' is set
|
330
|
+
if @api_client.config.client_side_validation && s3_auth_request.nil?
|
331
|
+
fail ArgumentError, "Missing the required parameter 's3_auth_request' when calling IntegrationsApi.create_aws_iam_user"
|
332
|
+
end
|
333
|
+
# resource path
|
334
|
+
local_var_path = '/integrations/s3'
|
335
|
+
|
336
|
+
# query parameters
|
337
|
+
query_params = opts[:query_params] || {}
|
338
|
+
|
339
|
+
# header parameters
|
340
|
+
header_params = opts[:header_params] || {}
|
341
|
+
# HTTP header 'Accept' (if needed)
|
342
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
343
|
+
# HTTP header 'Content-Type'
|
344
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
345
|
+
if !content_type.nil?
|
346
|
+
header_params['Content-Type'] = content_type
|
347
|
+
end
|
348
|
+
|
349
|
+
# form parameters
|
350
|
+
form_params = opts[:form_params] || {}
|
351
|
+
|
352
|
+
# http body (model)
|
353
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(s3_auth_request)
|
354
|
+
|
355
|
+
# return_type
|
356
|
+
return_type = opts[:debug_return_type] || 'OrganizationUserDataSourceAPI'
|
357
|
+
|
358
|
+
# auth_names
|
359
|
+
auth_names = opts[:debug_auth_names] || ['accessToken', 'apiKey', 'customerId']
|
360
|
+
|
361
|
+
new_options = opts.merge(
|
362
|
+
:operation => :"IntegrationsApi.create_aws_iam_user",
|
363
|
+
:header_params => header_params,
|
364
|
+
:query_params => query_params,
|
365
|
+
:form_params => form_params,
|
366
|
+
:body => post_body,
|
367
|
+
:auth_names => auth_names,
|
368
|
+
:return_type => return_type
|
369
|
+
)
|
370
|
+
|
371
|
+
data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
|
372
|
+
if @api_client.config.debugging
|
373
|
+
@api_client.config.logger.debug "API called: IntegrationsApi#create_aws_iam_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
374
|
+
end
|
375
|
+
APIResponse::new(data, status_code, headers, response)
|
376
|
+
end
|
377
|
+
|
378
|
+
|
379
|
+
# Get Oauth Url
|
380
|
+
#
|
381
|
+
# @param service [DataSourceType]
|
382
|
+
# @param tags [Object]
|
383
|
+
# @param scope [String]
|
384
|
+
# @param chunk_size [Integer]
|
385
|
+
# @param chunk_overlap [Integer]
|
386
|
+
# @param skip_embedding_generation [Boolean]
|
387
|
+
# @param embedding_model [EmbeddingGeneratorsNullable]
|
388
|
+
# @param zendesk_subdomain [String]
|
389
|
+
# @param microsoft_tenant [String]
|
390
|
+
# @param sharepoint_site_name [String]
|
391
|
+
# @param confluence_subdomain [String]
|
392
|
+
# @param generate_sparse_vectors [Boolean]
|
393
|
+
# @param prepend_filename_to_chunks [Boolean]
|
394
|
+
# @param max_items_per_chunk [Integer]
|
395
|
+
# @param body [OAuthURLRequest]
|
396
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
397
|
+
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, extra: {})
|
398
|
+
_body = {}
|
399
|
+
_body[:tags] = tags if tags != SENTINEL
|
400
|
+
_body[:scope] = scope if scope != SENTINEL
|
401
|
+
_body[:service] = service if service != SENTINEL
|
402
|
+
_body[:chunk_size] = chunk_size if chunk_size != SENTINEL
|
403
|
+
_body[:chunk_overlap] = chunk_overlap if chunk_overlap != SENTINEL
|
404
|
+
_body[:skip_embedding_generation] = skip_embedding_generation if skip_embedding_generation != SENTINEL
|
405
|
+
_body[:embedding_model] = embedding_model if embedding_model != SENTINEL
|
406
|
+
_body[:zendesk_subdomain] = zendesk_subdomain if zendesk_subdomain != SENTINEL
|
407
|
+
_body[:microsoft_tenant] = microsoft_tenant if microsoft_tenant != SENTINEL
|
408
|
+
_body[:sharepoint_site_name] = sharepoint_site_name if sharepoint_site_name != SENTINEL
|
409
|
+
_body[:confluence_subdomain] = confluence_subdomain if confluence_subdomain != SENTINEL
|
410
|
+
_body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
|
411
|
+
_body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
|
412
|
+
_body[:max_items_per_chunk] = max_items_per_chunk if max_items_per_chunk != SENTINEL
|
413
|
+
o_auth_url_request = _body
|
414
|
+
api_response = get_oauth_url_with_http_info_impl(o_auth_url_request, extra)
|
415
|
+
api_response.data
|
416
|
+
end
|
417
|
+
|
418
|
+
# Get Oauth Url
|
419
|
+
#
|
420
|
+
# @param service [DataSourceType]
|
421
|
+
# @param tags [Object]
|
422
|
+
# @param scope [String]
|
423
|
+
# @param chunk_size [Integer]
|
424
|
+
# @param chunk_overlap [Integer]
|
425
|
+
# @param skip_embedding_generation [Boolean]
|
426
|
+
# @param embedding_model [EmbeddingGeneratorsNullable]
|
427
|
+
# @param zendesk_subdomain [String]
|
428
|
+
# @param microsoft_tenant [String]
|
429
|
+
# @param sharepoint_site_name [String]
|
430
|
+
# @param confluence_subdomain [String]
|
431
|
+
# @param generate_sparse_vectors [Boolean]
|
432
|
+
# @param prepend_filename_to_chunks [Boolean]
|
433
|
+
# @param max_items_per_chunk [Integer]
|
434
|
+
# @param body [OAuthURLRequest]
|
435
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
436
|
+
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, extra: {})
|
437
|
+
_body = {}
|
438
|
+
_body[:tags] = tags if tags != SENTINEL
|
439
|
+
_body[:scope] = scope if scope != SENTINEL
|
440
|
+
_body[:service] = service if service != SENTINEL
|
441
|
+
_body[:chunk_size] = chunk_size if chunk_size != SENTINEL
|
442
|
+
_body[:chunk_overlap] = chunk_overlap if chunk_overlap != SENTINEL
|
443
|
+
_body[:skip_embedding_generation] = skip_embedding_generation if skip_embedding_generation != SENTINEL
|
444
|
+
_body[:embedding_model] = embedding_model if embedding_model != SENTINEL
|
445
|
+
_body[:zendesk_subdomain] = zendesk_subdomain if zendesk_subdomain != SENTINEL
|
446
|
+
_body[:microsoft_tenant] = microsoft_tenant if microsoft_tenant != SENTINEL
|
447
|
+
_body[:sharepoint_site_name] = sharepoint_site_name if sharepoint_site_name != SENTINEL
|
448
|
+
_body[:confluence_subdomain] = confluence_subdomain if confluence_subdomain != SENTINEL
|
449
|
+
_body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
|
450
|
+
_body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
|
451
|
+
_body[:max_items_per_chunk] = max_items_per_chunk if max_items_per_chunk != SENTINEL
|
452
|
+
o_auth_url_request = _body
|
453
|
+
get_oauth_url_with_http_info_impl(o_auth_url_request, extra)
|
454
|
+
end
|
455
|
+
|
456
|
+
# Get Oauth Url
|
457
|
+
# @param o_auth_url_request [OAuthURLRequest]
|
458
|
+
# @param [Hash] opts the optional parameters
|
459
|
+
# @return [Object]
|
460
|
+
private def get_oauth_url_impl(o_auth_url_request, opts = {})
|
461
|
+
data, _status_code, _headers = get_oauth_url_with_http_info(o_auth_url_request, opts)
|
462
|
+
data
|
463
|
+
end
|
464
|
+
|
465
|
+
# Get Oauth Url
|
466
|
+
# @param o_auth_url_request [OAuthURLRequest]
|
467
|
+
# @param [Hash] opts the optional parameters
|
468
|
+
# @return [APIResponse] data is Object, status code, headers and response
|
469
|
+
private def get_oauth_url_with_http_info_impl(o_auth_url_request, opts = {})
|
470
|
+
if @api_client.config.debugging
|
471
|
+
@api_client.config.logger.debug 'Calling API: IntegrationsApi.get_oauth_url ...'
|
472
|
+
end
|
473
|
+
# verify the required parameter 'o_auth_url_request' is set
|
474
|
+
if @api_client.config.client_side_validation && o_auth_url_request.nil?
|
475
|
+
fail ArgumentError, "Missing the required parameter 'o_auth_url_request' when calling IntegrationsApi.get_oauth_url"
|
476
|
+
end
|
477
|
+
# resource path
|
478
|
+
local_var_path = '/integrations/oauth_url'
|
479
|
+
|
480
|
+
# query parameters
|
481
|
+
query_params = opts[:query_params] || {}
|
482
|
+
|
483
|
+
# header parameters
|
484
|
+
header_params = opts[:header_params] || {}
|
485
|
+
# HTTP header 'Accept' (if needed)
|
486
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
487
|
+
# HTTP header 'Content-Type'
|
488
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
489
|
+
if !content_type.nil?
|
490
|
+
header_params['Content-Type'] = content_type
|
491
|
+
end
|
492
|
+
|
493
|
+
# form parameters
|
494
|
+
form_params = opts[:form_params] || {}
|
495
|
+
|
496
|
+
# http body (model)
|
497
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(o_auth_url_request)
|
498
|
+
|
499
|
+
# return_type
|
500
|
+
return_type = opts[:debug_return_type] || 'Object'
|
501
|
+
|
502
|
+
# auth_names
|
503
|
+
auth_names = opts[:debug_auth_names] || ['accessToken', 'apiKey', 'customerId']
|
504
|
+
|
505
|
+
new_options = opts.merge(
|
506
|
+
:operation => :"IntegrationsApi.get_oauth_url",
|
507
|
+
:header_params => header_params,
|
508
|
+
:query_params => query_params,
|
509
|
+
:form_params => form_params,
|
510
|
+
:body => post_body,
|
511
|
+
:auth_names => auth_names,
|
512
|
+
:return_type => return_type
|
513
|
+
)
|
514
|
+
|
515
|
+
data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
|
516
|
+
if @api_client.config.debugging
|
517
|
+
@api_client.config.logger.debug "API called: IntegrationsApi#get_oauth_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
518
|
+
end
|
519
|
+
APIResponse::new(data, status_code, headers, response)
|
520
|
+
end
|
521
|
+
|
522
|
+
|
523
|
+
# Confluence List
|
524
|
+
#
|
525
|
+
# To begin listing a user's Confluence pages, at least a `data_source_id` of a connected
|
526
|
+
# Confluence account must be specified. This base request returns a list of root pages for
|
527
|
+
# every space the user has access to in a Confluence instance. To traverse further down
|
528
|
+
# the user's page directory, additional requests to this endpoint can be made with the same
|
529
|
+
# `data_source_id` and with `parent_id` set to the id of page from a previous request. For
|
530
|
+
# convenience, the `has_children` property in each directory item in the response list will
|
531
|
+
# flag which pages will return non-empty lists of pages when set as the `parent_id`.
|
532
|
+
#
|
533
|
+
# @param data_source_id [Integer]
|
534
|
+
# @param parent_id [String]
|
535
|
+
# @param body [ListRequest]
|
536
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
537
|
+
def list_confluence_pages(data_source_id:, parent_id: SENTINEL, extra: {})
|
538
|
+
_body = {}
|
539
|
+
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
540
|
+
_body[:parent_id] = parent_id if parent_id != SENTINEL
|
541
|
+
list_request = _body
|
542
|
+
api_response = list_confluence_pages_with_http_info_impl(list_request, extra)
|
543
|
+
api_response.data
|
544
|
+
end
|
545
|
+
|
546
|
+
# Confluence List
|
547
|
+
#
|
548
|
+
# To begin listing a user's Confluence pages, at least a `data_source_id` of a connected
|
549
|
+
# Confluence account must be specified. This base request returns a list of root pages for
|
550
|
+
# every space the user has access to in a Confluence instance. To traverse further down
|
551
|
+
# the user's page directory, additional requests to this endpoint can be made with the same
|
552
|
+
# `data_source_id` and with `parent_id` set to the id of page from a previous request. For
|
553
|
+
# convenience, the `has_children` property in each directory item in the response list will
|
554
|
+
# flag which pages will return non-empty lists of pages when set as the `parent_id`.
|
555
|
+
#
|
556
|
+
# @param data_source_id [Integer]
|
557
|
+
# @param parent_id [String]
|
558
|
+
# @param body [ListRequest]
|
559
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
560
|
+
def list_confluence_pages_with_http_info(data_source_id:, parent_id: SENTINEL, extra: {})
|
561
|
+
_body = {}
|
562
|
+
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
563
|
+
_body[:parent_id] = parent_id if parent_id != SENTINEL
|
564
|
+
list_request = _body
|
565
|
+
list_confluence_pages_with_http_info_impl(list_request, extra)
|
566
|
+
end
|
567
|
+
|
568
|
+
# Confluence List
|
569
|
+
# To begin listing a user's Confluence pages, at least a `data_source_id` of a connected Confluence account must be specified. This base request returns a list of root pages for every space the user has access to in a Confluence instance. To traverse further down the user's page directory, additional requests to this endpoint can be made with the same `data_source_id` and with `parent_id` set to the id of page from a previous request. For convenience, the `has_children` property in each directory item in the response list will flag which pages will return non-empty lists of pages when set as the `parent_id`.
|
570
|
+
# @param list_request [ListRequest]
|
571
|
+
# @param [Hash] opts the optional parameters
|
572
|
+
# @return [ListResponse]
|
573
|
+
private def list_confluence_pages_impl(list_request, opts = {})
|
574
|
+
data, _status_code, _headers = list_confluence_pages_with_http_info(list_request, opts)
|
575
|
+
data
|
576
|
+
end
|
577
|
+
|
578
|
+
# Confluence List
|
579
|
+
# To begin listing a user's Confluence pages, at least a `data_source_id` of a connected Confluence account must be specified. This base request returns a list of root pages for every space the user has access to in a Confluence instance. To traverse further down the user's page directory, additional requests to this endpoint can be made with the same `data_source_id` and with `parent_id` set to the id of page from a previous request. For convenience, the `has_children` property in each directory item in the response list will flag which pages will return non-empty lists of pages when set as the `parent_id`.
|
580
|
+
# @param list_request [ListRequest]
|
581
|
+
# @param [Hash] opts the optional parameters
|
582
|
+
# @return [APIResponse] data is ListResponse, status code, headers and response
|
583
|
+
private def list_confluence_pages_with_http_info_impl(list_request, opts = {})
|
584
|
+
if @api_client.config.debugging
|
585
|
+
@api_client.config.logger.debug 'Calling API: IntegrationsApi.list_confluence_pages ...'
|
586
|
+
end
|
587
|
+
# verify the required parameter 'list_request' is set
|
588
|
+
if @api_client.config.client_side_validation && list_request.nil?
|
589
|
+
fail ArgumentError, "Missing the required parameter 'list_request' when calling IntegrationsApi.list_confluence_pages"
|
590
|
+
end
|
591
|
+
# resource path
|
592
|
+
local_var_path = '/integrations/confluence/list'
|
593
|
+
|
594
|
+
# query parameters
|
595
|
+
query_params = opts[:query_params] || {}
|
596
|
+
|
597
|
+
# header parameters
|
598
|
+
header_params = opts[:header_params] || {}
|
599
|
+
# HTTP header 'Accept' (if needed)
|
600
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
601
|
+
# HTTP header 'Content-Type'
|
602
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
603
|
+
if !content_type.nil?
|
604
|
+
header_params['Content-Type'] = content_type
|
605
|
+
end
|
606
|
+
|
607
|
+
# form parameters
|
608
|
+
form_params = opts[:form_params] || {}
|
609
|
+
|
610
|
+
# http body (model)
|
611
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(list_request)
|
612
|
+
|
613
|
+
# return_type
|
614
|
+
return_type = opts[:debug_return_type] || 'ListResponse'
|
615
|
+
|
616
|
+
# auth_names
|
617
|
+
auth_names = opts[:debug_auth_names] || ['accessToken', 'apiKey', 'customerId']
|
618
|
+
|
619
|
+
new_options = opts.merge(
|
620
|
+
:operation => :"IntegrationsApi.list_confluence_pages",
|
621
|
+
:header_params => header_params,
|
622
|
+
:query_params => query_params,
|
623
|
+
:form_params => form_params,
|
624
|
+
:body => post_body,
|
625
|
+
:auth_names => auth_names,
|
626
|
+
:return_type => return_type
|
627
|
+
)
|
628
|
+
|
629
|
+
data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
|
630
|
+
if @api_client.config.debugging
|
631
|
+
@api_client.config.logger.debug "API called: IntegrationsApi#list_confluence_pages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
632
|
+
end
|
633
|
+
APIResponse::new(data, status_code, headers, response)
|
634
|
+
end
|
635
|
+
|
636
|
+
|
637
|
+
# List Data Source Items
|
638
|
+
#
|
639
|
+
# @param data_source_id [Integer]
|
640
|
+
# @param parent_id [String]
|
641
|
+
# @param pagination [Pagination]
|
642
|
+
# @param body [ListDataSourceItemsRequest]
|
643
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
644
|
+
def list_data_source_items(data_source_id:, parent_id: SENTINEL, pagination: SENTINEL, extra: {})
|
645
|
+
_body = {}
|
646
|
+
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
647
|
+
_body[:parent_id] = parent_id if parent_id != SENTINEL
|
648
|
+
_body[:pagination] = pagination if pagination != SENTINEL
|
649
|
+
list_data_source_items_request = _body
|
650
|
+
api_response = list_data_source_items_with_http_info_impl(list_data_source_items_request, extra)
|
651
|
+
api_response.data
|
652
|
+
end
|
653
|
+
|
654
|
+
# List Data Source Items
|
655
|
+
#
|
656
|
+
# @param data_source_id [Integer]
|
657
|
+
# @param parent_id [String]
|
658
|
+
# @param pagination [Pagination]
|
659
|
+
# @param body [ListDataSourceItemsRequest]
|
660
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
661
|
+
def list_data_source_items_with_http_info(data_source_id:, parent_id: SENTINEL, pagination: SENTINEL, extra: {})
|
662
|
+
_body = {}
|
663
|
+
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
664
|
+
_body[:parent_id] = parent_id if parent_id != SENTINEL
|
665
|
+
_body[:pagination] = pagination if pagination != SENTINEL
|
666
|
+
list_data_source_items_request = _body
|
667
|
+
list_data_source_items_with_http_info_impl(list_data_source_items_request, extra)
|
668
|
+
end
|
669
|
+
|
670
|
+
# List Data Source Items
|
671
|
+
# @param list_data_source_items_request [ListDataSourceItemsRequest]
|
672
|
+
# @param [Hash] opts the optional parameters
|
673
|
+
# @return [ListDataSourceItemsResponse]
|
674
|
+
private def list_data_source_items_impl(list_data_source_items_request, opts = {})
|
675
|
+
data, _status_code, _headers = list_data_source_items_with_http_info(list_data_source_items_request, opts)
|
676
|
+
data
|
677
|
+
end
|
678
|
+
|
679
|
+
# List Data Source Items
|
680
|
+
# @param list_data_source_items_request [ListDataSourceItemsRequest]
|
681
|
+
# @param [Hash] opts the optional parameters
|
682
|
+
# @return [APIResponse] data is ListDataSourceItemsResponse, status code, headers and response
|
683
|
+
private def list_data_source_items_with_http_info_impl(list_data_source_items_request, opts = {})
|
684
|
+
if @api_client.config.debugging
|
685
|
+
@api_client.config.logger.debug 'Calling API: IntegrationsApi.list_data_source_items ...'
|
686
|
+
end
|
687
|
+
# verify the required parameter 'list_data_source_items_request' is set
|
688
|
+
if @api_client.config.client_side_validation && list_data_source_items_request.nil?
|
689
|
+
fail ArgumentError, "Missing the required parameter 'list_data_source_items_request' when calling IntegrationsApi.list_data_source_items"
|
690
|
+
end
|
691
|
+
# resource path
|
692
|
+
local_var_path = '/integrations/items/list'
|
693
|
+
|
694
|
+
# query parameters
|
695
|
+
query_params = opts[:query_params] || {}
|
696
|
+
|
697
|
+
# header parameters
|
698
|
+
header_params = opts[:header_params] || {}
|
699
|
+
# HTTP header 'Accept' (if needed)
|
700
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
701
|
+
# HTTP header 'Content-Type'
|
702
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
703
|
+
if !content_type.nil?
|
704
|
+
header_params['Content-Type'] = content_type
|
705
|
+
end
|
706
|
+
|
707
|
+
# form parameters
|
708
|
+
form_params = opts[:form_params] || {}
|
709
|
+
|
710
|
+
# http body (model)
|
711
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(list_data_source_items_request)
|
712
|
+
|
713
|
+
# return_type
|
714
|
+
return_type = opts[:debug_return_type] || 'ListDataSourceItemsResponse'
|
715
|
+
|
716
|
+
# auth_names
|
717
|
+
auth_names = opts[:debug_auth_names] || ['accessToken', 'apiKey', 'customerId']
|
718
|
+
|
719
|
+
new_options = opts.merge(
|
720
|
+
:operation => :"IntegrationsApi.list_data_source_items",
|
721
|
+
:header_params => header_params,
|
722
|
+
:query_params => query_params,
|
723
|
+
:form_params => form_params,
|
724
|
+
:body => post_body,
|
725
|
+
:auth_names => auth_names,
|
726
|
+
:return_type => return_type
|
727
|
+
)
|
728
|
+
|
729
|
+
data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
|
730
|
+
if @api_client.config.debugging
|
731
|
+
@api_client.config.logger.debug "API called: IntegrationsApi#list_data_source_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
732
|
+
end
|
733
|
+
APIResponse::new(data, status_code, headers, response)
|
734
|
+
end
|
735
|
+
|
736
|
+
|
737
|
+
# Outlook Folders
|
738
|
+
#
|
739
|
+
# After connecting your Outlook account, you can use this endpoint to list all of your folders on outlook. This includes
|
740
|
+
# both system folders like "inbox" and user created folders.
|
741
|
+
#
|
742
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
743
|
+
def list_folders(extra: {})
|
744
|
+
api_response = list_folders_with_http_info_impl(extra)
|
745
|
+
api_response.data
|
746
|
+
end
|
747
|
+
|
748
|
+
# Outlook Folders
|
749
|
+
#
|
750
|
+
# After connecting your Outlook account, you can use this endpoint to list all of your folders on outlook. This includes
|
751
|
+
# both system folders like "inbox" and user created folders.
|
752
|
+
#
|
753
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
754
|
+
def list_folders_with_http_info(extra: {})
|
755
|
+
list_folders_with_http_info_impl(extra)
|
756
|
+
end
|
757
|
+
|
758
|
+
# Outlook Folders
|
759
|
+
# After connecting your Outlook account, you can use this endpoint to list all of your folders on outlook. This includes both system folders like \"inbox\" and user created folders.
|
760
|
+
# @param [Hash] opts the optional parameters
|
761
|
+
# @return [Object]
|
762
|
+
private def list_folders_impl(opts = {})
|
763
|
+
data, _status_code, _headers = list_folders_with_http_info(opts)
|
764
|
+
data
|
765
|
+
end
|
766
|
+
|
767
|
+
# Outlook Folders
|
768
|
+
# After connecting your Outlook account, you can use this endpoint to list all of your folders on outlook. This includes both system folders like \"inbox\" and user created folders.
|
769
|
+
# @param [Hash] opts the optional parameters
|
770
|
+
# @return [APIResponse] data is Object, status code, headers and response
|
771
|
+
private def list_folders_with_http_info_impl(opts = {})
|
772
|
+
if @api_client.config.debugging
|
773
|
+
@api_client.config.logger.debug 'Calling API: IntegrationsApi.list_folders ...'
|
774
|
+
end
|
775
|
+
# resource path
|
776
|
+
local_var_path = '/integrations/outlook/user_folders'
|
777
|
+
|
778
|
+
# query parameters
|
779
|
+
query_params = opts[:query_params] || {}
|
780
|
+
|
781
|
+
# header parameters
|
782
|
+
header_params = opts[:header_params] || {}
|
783
|
+
# HTTP header 'Accept' (if needed)
|
784
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
785
|
+
|
786
|
+
# form parameters
|
787
|
+
form_params = opts[:form_params] || {}
|
788
|
+
|
789
|
+
# http body (model)
|
790
|
+
post_body = opts[:debug_body]
|
791
|
+
|
792
|
+
# return_type
|
793
|
+
return_type = opts[:debug_return_type] || 'Object'
|
794
|
+
|
795
|
+
# auth_names
|
796
|
+
auth_names = opts[:debug_auth_names] || ['accessToken', 'apiKey', 'customerId']
|
797
|
+
|
798
|
+
new_options = opts.merge(
|
799
|
+
:operation => :"IntegrationsApi.list_folders",
|
800
|
+
:header_params => header_params,
|
801
|
+
:query_params => query_params,
|
802
|
+
:form_params => form_params,
|
803
|
+
:body => post_body,
|
804
|
+
:auth_names => auth_names,
|
805
|
+
:return_type => return_type
|
806
|
+
)
|
807
|
+
|
808
|
+
data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
|
809
|
+
if @api_client.config.debugging
|
810
|
+
@api_client.config.logger.debug "API called: IntegrationsApi#list_folders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
811
|
+
end
|
812
|
+
APIResponse::new(data, status_code, headers, response)
|
813
|
+
end
|
814
|
+
|
815
|
+
|
816
|
+
# Gitbook Spaces
|
817
|
+
#
|
818
|
+
# After connecting your Gitbook account, you can use this endpoint to list all of your spaces under current organization.
|
819
|
+
#
|
820
|
+
# @param data_source_id [Integer]
|
821
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
822
|
+
def list_gitbook_spaces(data_source_id:, extra: {})
|
823
|
+
api_response = list_gitbook_spaces_with_http_info_impl(data_source_id, extra)
|
824
|
+
api_response.data
|
825
|
+
end
|
826
|
+
|
827
|
+
# Gitbook Spaces
|
828
|
+
#
|
829
|
+
# After connecting your Gitbook account, you can use this endpoint to list all of your spaces under current organization.
|
830
|
+
#
|
831
|
+
# @param data_source_id [Integer]
|
832
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
833
|
+
def list_gitbook_spaces_with_http_info(data_source_id:, extra: {})
|
834
|
+
list_gitbook_spaces_with_http_info_impl(data_source_id, extra)
|
835
|
+
end
|
836
|
+
|
837
|
+
# Gitbook Spaces
|
838
|
+
# After connecting your Gitbook account, you can use this endpoint to list all of your spaces under current organization.
|
839
|
+
# @param data_source_id [Integer]
|
840
|
+
# @param [Hash] opts the optional parameters
|
841
|
+
# @return [Object]
|
842
|
+
private def list_gitbook_spaces_impl(data_source_id, opts = {})
|
843
|
+
data, _status_code, _headers = list_gitbook_spaces_with_http_info(data_source_id, opts)
|
844
|
+
data
|
845
|
+
end
|
846
|
+
|
847
|
+
# Gitbook Spaces
|
848
|
+
# After connecting your Gitbook account, you can use this endpoint to list all of your spaces under current organization.
|
849
|
+
# @param data_source_id [Integer]
|
850
|
+
# @param [Hash] opts the optional parameters
|
851
|
+
# @return [APIResponse] data is Object, status code, headers and response
|
852
|
+
private def list_gitbook_spaces_with_http_info_impl(data_source_id, opts = {})
|
853
|
+
if @api_client.config.debugging
|
854
|
+
@api_client.config.logger.debug 'Calling API: IntegrationsApi.list_gitbook_spaces ...'
|
855
|
+
end
|
856
|
+
# verify the required parameter 'data_source_id' is set
|
857
|
+
if @api_client.config.client_side_validation && data_source_id.nil?
|
858
|
+
fail ArgumentError, "Missing the required parameter 'data_source_id' when calling IntegrationsApi.list_gitbook_spaces"
|
859
|
+
end
|
860
|
+
# resource path
|
861
|
+
local_var_path = '/integrations/gitbook/spaces'
|
862
|
+
|
863
|
+
# query parameters
|
864
|
+
query_params = opts[:query_params] || {}
|
865
|
+
query_params[:'data_source_id'] = data_source_id
|
866
|
+
|
867
|
+
# header parameters
|
868
|
+
header_params = opts[:header_params] || {}
|
869
|
+
# HTTP header 'Accept' (if needed)
|
870
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
871
|
+
|
872
|
+
# form parameters
|
873
|
+
form_params = opts[:form_params] || {}
|
874
|
+
|
875
|
+
# http body (model)
|
876
|
+
post_body = opts[:debug_body]
|
877
|
+
|
878
|
+
# return_type
|
879
|
+
return_type = opts[:debug_return_type] || 'Object'
|
880
|
+
|
881
|
+
# auth_names
|
882
|
+
auth_names = opts[:debug_auth_names] || ['accessToken', 'apiKey', 'customerId']
|
883
|
+
|
884
|
+
new_options = opts.merge(
|
885
|
+
:operation => :"IntegrationsApi.list_gitbook_spaces",
|
886
|
+
:header_params => header_params,
|
887
|
+
:query_params => query_params,
|
888
|
+
:form_params => form_params,
|
889
|
+
:body => post_body,
|
890
|
+
:auth_names => auth_names,
|
891
|
+
:return_type => return_type
|
892
|
+
)
|
893
|
+
|
894
|
+
data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
|
895
|
+
if @api_client.config.debugging
|
896
|
+
@api_client.config.logger.debug "API called: IntegrationsApi#list_gitbook_spaces\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
897
|
+
end
|
898
|
+
APIResponse::new(data, status_code, headers, response)
|
899
|
+
end
|
900
|
+
|
901
|
+
|
902
|
+
# Gmail Labels
|
903
|
+
#
|
904
|
+
# After connecting your Gmail account, you can use this endpoint to list all of your labels. User created labels
|
905
|
+
# will have the type "user" and Gmail's default labels will have the type "system"
|
906
|
+
#
|
907
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
908
|
+
def list_labels(extra: {})
|
909
|
+
api_response = list_labels_with_http_info_impl(extra)
|
910
|
+
api_response.data
|
911
|
+
end
|
912
|
+
|
913
|
+
# Gmail Labels
|
914
|
+
#
|
915
|
+
# After connecting your Gmail account, you can use this endpoint to list all of your labels. User created labels
|
916
|
+
# will have the type "user" and Gmail's default labels will have the type "system"
|
917
|
+
#
|
918
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
919
|
+
def list_labels_with_http_info(extra: {})
|
920
|
+
list_labels_with_http_info_impl(extra)
|
921
|
+
end
|
922
|
+
|
923
|
+
# Gmail Labels
|
924
|
+
# After connecting your Gmail account, you can use this endpoint to list all of your labels. User created labels will have the type \"user\" and Gmail's default labels will have the type \"system\"
|
925
|
+
# @param [Hash] opts the optional parameters
|
926
|
+
# @return [Object]
|
927
|
+
private def list_labels_impl(opts = {})
|
928
|
+
data, _status_code, _headers = list_labels_with_http_info(opts)
|
929
|
+
data
|
930
|
+
end
|
931
|
+
|
932
|
+
# Gmail Labels
|
933
|
+
# After connecting your Gmail account, you can use this endpoint to list all of your labels. User created labels will have the type \"user\" and Gmail's default labels will have the type \"system\"
|
934
|
+
# @param [Hash] opts the optional parameters
|
935
|
+
# @return [APIResponse] data is Object, status code, headers and response
|
936
|
+
private def list_labels_with_http_info_impl(opts = {})
|
937
|
+
if @api_client.config.debugging
|
938
|
+
@api_client.config.logger.debug 'Calling API: IntegrationsApi.list_labels ...'
|
939
|
+
end
|
940
|
+
# resource path
|
941
|
+
local_var_path = '/integrations/gmail/user_labels'
|
942
|
+
|
943
|
+
# query parameters
|
944
|
+
query_params = opts[:query_params] || {}
|
945
|
+
|
946
|
+
# header parameters
|
947
|
+
header_params = opts[:header_params] || {}
|
948
|
+
# HTTP header 'Accept' (if needed)
|
949
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
950
|
+
|
951
|
+
# form parameters
|
952
|
+
form_params = opts[:form_params] || {}
|
953
|
+
|
954
|
+
# http body (model)
|
955
|
+
post_body = opts[:debug_body]
|
956
|
+
|
957
|
+
# return_type
|
958
|
+
return_type = opts[:debug_return_type] || 'Object'
|
959
|
+
|
960
|
+
# auth_names
|
961
|
+
auth_names = opts[:debug_auth_names] || ['accessToken', 'apiKey', 'customerId']
|
962
|
+
|
963
|
+
new_options = opts.merge(
|
964
|
+
:operation => :"IntegrationsApi.list_labels",
|
965
|
+
:header_params => header_params,
|
966
|
+
:query_params => query_params,
|
967
|
+
:form_params => form_params,
|
968
|
+
:body => post_body,
|
969
|
+
:auth_names => auth_names,
|
970
|
+
:return_type => return_type
|
971
|
+
)
|
972
|
+
|
973
|
+
data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
|
974
|
+
if @api_client.config.debugging
|
975
|
+
@api_client.config.logger.debug "API called: IntegrationsApi#list_labels\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
976
|
+
end
|
977
|
+
APIResponse::new(data, status_code, headers, response)
|
978
|
+
end
|
979
|
+
|
980
|
+
|
981
|
+
# Confluence Sync
|
982
|
+
#
|
983
|
+
# After listing pages in a user's Confluence account, the set of selected page `ids` and the
|
984
|
+
# connected account's `data_source_id` can be passed into this endpoint to sync them into
|
985
|
+
# Carbon. Additional parameters listed below can be used to associate data to the selected
|
986
|
+
# pages or alter the behavior of the sync.
|
987
|
+
#
|
988
|
+
# @param data_source_id [Integer]
|
989
|
+
# @param ids [Array<String>]
|
990
|
+
# @param tags [Object]
|
991
|
+
# @param chunk_size [Integer]
|
992
|
+
# @param chunk_overlap [Integer]
|
993
|
+
# @param skip_embedding_generation [Boolean]
|
994
|
+
# @param embedding_model [EmbeddingGeneratorsNullable]
|
995
|
+
# @param generate_sparse_vectors [Boolean]
|
996
|
+
# @param prepend_filename_to_chunks [Boolean]
|
997
|
+
# @param max_items_per_chunk [Integer]
|
998
|
+
# @param body [SyncFilesRequest]
|
999
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1000
|
+
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, extra: {})
|
1001
|
+
_body = {}
|
1002
|
+
_body[:tags] = tags if tags != SENTINEL
|
1003
|
+
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
1004
|
+
_body[:ids] = ids if ids != SENTINEL
|
1005
|
+
_body[:chunk_size] = chunk_size if chunk_size != SENTINEL
|
1006
|
+
_body[:chunk_overlap] = chunk_overlap if chunk_overlap != SENTINEL
|
1007
|
+
_body[:skip_embedding_generation] = skip_embedding_generation if skip_embedding_generation != SENTINEL
|
1008
|
+
_body[:embedding_model] = embedding_model if embedding_model != SENTINEL
|
1009
|
+
_body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
|
1010
|
+
_body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
|
1011
|
+
_body[:max_items_per_chunk] = max_items_per_chunk if max_items_per_chunk != SENTINEL
|
1012
|
+
sync_files_request = _body
|
1013
|
+
api_response = sync_confluence_with_http_info_impl(sync_files_request, extra)
|
1014
|
+
api_response.data
|
1015
|
+
end
|
1016
|
+
|
1017
|
+
# Confluence Sync
|
1018
|
+
#
|
1019
|
+
# After listing pages in a user's Confluence account, the set of selected page `ids` and the
|
1020
|
+
# connected account's `data_source_id` can be passed into this endpoint to sync them into
|
1021
|
+
# Carbon. Additional parameters listed below can be used to associate data to the selected
|
1022
|
+
# pages or alter the behavior of the sync.
|
1023
|
+
#
|
1024
|
+
# @param data_source_id [Integer]
|
1025
|
+
# @param ids [Array<String>]
|
1026
|
+
# @param tags [Object]
|
1027
|
+
# @param chunk_size [Integer]
|
1028
|
+
# @param chunk_overlap [Integer]
|
1029
|
+
# @param skip_embedding_generation [Boolean]
|
1030
|
+
# @param embedding_model [EmbeddingGeneratorsNullable]
|
1031
|
+
# @param generate_sparse_vectors [Boolean]
|
1032
|
+
# @param prepend_filename_to_chunks [Boolean]
|
1033
|
+
# @param max_items_per_chunk [Integer]
|
1034
|
+
# @param body [SyncFilesRequest]
|
1035
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1036
|
+
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, extra: {})
|
1037
|
+
_body = {}
|
1038
|
+
_body[:tags] = tags if tags != SENTINEL
|
1039
|
+
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
1040
|
+
_body[:ids] = ids if ids != SENTINEL
|
1041
|
+
_body[:chunk_size] = chunk_size if chunk_size != SENTINEL
|
1042
|
+
_body[:chunk_overlap] = chunk_overlap if chunk_overlap != SENTINEL
|
1043
|
+
_body[:skip_embedding_generation] = skip_embedding_generation if skip_embedding_generation != SENTINEL
|
1044
|
+
_body[:embedding_model] = embedding_model if embedding_model != SENTINEL
|
1045
|
+
_body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
|
1046
|
+
_body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
|
1047
|
+
_body[:max_items_per_chunk] = max_items_per_chunk if max_items_per_chunk != SENTINEL
|
1048
|
+
sync_files_request = _body
|
1049
|
+
sync_confluence_with_http_info_impl(sync_files_request, extra)
|
1050
|
+
end
|
1051
|
+
|
1052
|
+
# Confluence Sync
|
1053
|
+
# After listing pages in a user's Confluence account, the set of selected page `ids` and the connected account's `data_source_id` can be passed into this endpoint to sync them into Carbon. Additional parameters listed below can be used to associate data to the selected pages or alter the behavior of the sync.
|
1054
|
+
# @param sync_files_request [SyncFilesRequest]
|
1055
|
+
# @param [Hash] opts the optional parameters
|
1056
|
+
# @return [GenericSuccessResponse]
|
1057
|
+
private def sync_confluence_impl(sync_files_request, opts = {})
|
1058
|
+
data, _status_code, _headers = sync_confluence_with_http_info(sync_files_request, opts)
|
1059
|
+
data
|
1060
|
+
end
|
1061
|
+
|
1062
|
+
# Confluence Sync
|
1063
|
+
# After listing pages in a user's Confluence account, the set of selected page `ids` and the connected account's `data_source_id` can be passed into this endpoint to sync them into Carbon. Additional parameters listed below can be used to associate data to the selected pages or alter the behavior of the sync.
|
1064
|
+
# @param sync_files_request [SyncFilesRequest]
|
1065
|
+
# @param [Hash] opts the optional parameters
|
1066
|
+
# @return [APIResponse] data is GenericSuccessResponse, status code, headers and response
|
1067
|
+
private def sync_confluence_with_http_info_impl(sync_files_request, opts = {})
|
1068
|
+
if @api_client.config.debugging
|
1069
|
+
@api_client.config.logger.debug 'Calling API: IntegrationsApi.sync_confluence ...'
|
1070
|
+
end
|
1071
|
+
# verify the required parameter 'sync_files_request' is set
|
1072
|
+
if @api_client.config.client_side_validation && sync_files_request.nil?
|
1073
|
+
fail ArgumentError, "Missing the required parameter 'sync_files_request' when calling IntegrationsApi.sync_confluence"
|
1074
|
+
end
|
1075
|
+
# resource path
|
1076
|
+
local_var_path = '/integrations/confluence/sync'
|
1077
|
+
|
1078
|
+
# query parameters
|
1079
|
+
query_params = opts[:query_params] || {}
|
1080
|
+
|
1081
|
+
# header parameters
|
1082
|
+
header_params = opts[:header_params] || {}
|
1083
|
+
# HTTP header 'Accept' (if needed)
|
1084
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1085
|
+
# HTTP header 'Content-Type'
|
1086
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
1087
|
+
if !content_type.nil?
|
1088
|
+
header_params['Content-Type'] = content_type
|
1089
|
+
end
|
1090
|
+
|
1091
|
+
# form parameters
|
1092
|
+
form_params = opts[:form_params] || {}
|
1093
|
+
|
1094
|
+
# http body (model)
|
1095
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(sync_files_request)
|
1096
|
+
|
1097
|
+
# return_type
|
1098
|
+
return_type = opts[:debug_return_type] || 'GenericSuccessResponse'
|
1099
|
+
|
1100
|
+
# auth_names
|
1101
|
+
auth_names = opts[:debug_auth_names] || ['accessToken', 'apiKey', 'customerId']
|
1102
|
+
|
1103
|
+
new_options = opts.merge(
|
1104
|
+
:operation => :"IntegrationsApi.sync_confluence",
|
1105
|
+
:header_params => header_params,
|
1106
|
+
:query_params => query_params,
|
1107
|
+
:form_params => form_params,
|
1108
|
+
:body => post_body,
|
1109
|
+
:auth_names => auth_names,
|
1110
|
+
:return_type => return_type
|
1111
|
+
)
|
1112
|
+
|
1113
|
+
data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
|
1114
|
+
if @api_client.config.debugging
|
1115
|
+
@api_client.config.logger.debug "API called: IntegrationsApi#sync_confluence\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1116
|
+
end
|
1117
|
+
APIResponse::new(data, status_code, headers, response)
|
1118
|
+
end
|
1119
|
+
|
1120
|
+
|
1121
|
+
# Sync Data Source Items
|
1122
|
+
#
|
1123
|
+
# @param data_source_id [Integer]
|
1124
|
+
# @param body [SyncDirectoryRequest]
|
1125
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1126
|
+
def sync_data_source_items(data_source_id:, extra: {})
|
1127
|
+
_body = {}
|
1128
|
+
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
1129
|
+
sync_directory_request = _body
|
1130
|
+
api_response = sync_data_source_items_with_http_info_impl(sync_directory_request, extra)
|
1131
|
+
api_response.data
|
1132
|
+
end
|
1133
|
+
|
1134
|
+
# Sync Data Source Items
|
1135
|
+
#
|
1136
|
+
# @param data_source_id [Integer]
|
1137
|
+
# @param body [SyncDirectoryRequest]
|
1138
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1139
|
+
def sync_data_source_items_with_http_info(data_source_id:, extra: {})
|
1140
|
+
_body = {}
|
1141
|
+
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
1142
|
+
sync_directory_request = _body
|
1143
|
+
sync_data_source_items_with_http_info_impl(sync_directory_request, extra)
|
1144
|
+
end
|
1145
|
+
|
1146
|
+
# Sync Data Source Items
|
1147
|
+
# @param sync_directory_request [SyncDirectoryRequest]
|
1148
|
+
# @param [Hash] opts the optional parameters
|
1149
|
+
# @return [OrganizationUserDataSourceAPI]
|
1150
|
+
private def sync_data_source_items_impl(sync_directory_request, opts = {})
|
1151
|
+
data, _status_code, _headers = sync_data_source_items_with_http_info(sync_directory_request, opts)
|
1152
|
+
data
|
1153
|
+
end
|
1154
|
+
|
1155
|
+
# Sync Data Source Items
|
1156
|
+
# @param sync_directory_request [SyncDirectoryRequest]
|
1157
|
+
# @param [Hash] opts the optional parameters
|
1158
|
+
# @return [APIResponse] data is OrganizationUserDataSourceAPI, status code, headers and response
|
1159
|
+
private def sync_data_source_items_with_http_info_impl(sync_directory_request, opts = {})
|
1160
|
+
if @api_client.config.debugging
|
1161
|
+
@api_client.config.logger.debug 'Calling API: IntegrationsApi.sync_data_source_items ...'
|
1162
|
+
end
|
1163
|
+
# verify the required parameter 'sync_directory_request' is set
|
1164
|
+
if @api_client.config.client_side_validation && sync_directory_request.nil?
|
1165
|
+
fail ArgumentError, "Missing the required parameter 'sync_directory_request' when calling IntegrationsApi.sync_data_source_items"
|
1166
|
+
end
|
1167
|
+
# resource path
|
1168
|
+
local_var_path = '/integrations/items/sync'
|
1169
|
+
|
1170
|
+
# query parameters
|
1171
|
+
query_params = opts[:query_params] || {}
|
1172
|
+
|
1173
|
+
# header parameters
|
1174
|
+
header_params = opts[:header_params] || {}
|
1175
|
+
# HTTP header 'Accept' (if needed)
|
1176
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1177
|
+
# HTTP header 'Content-Type'
|
1178
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
1179
|
+
if !content_type.nil?
|
1180
|
+
header_params['Content-Type'] = content_type
|
1181
|
+
end
|
1182
|
+
|
1183
|
+
# form parameters
|
1184
|
+
form_params = opts[:form_params] || {}
|
1185
|
+
|
1186
|
+
# http body (model)
|
1187
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(sync_directory_request)
|
1188
|
+
|
1189
|
+
# return_type
|
1190
|
+
return_type = opts[:debug_return_type] || 'OrganizationUserDataSourceAPI'
|
1191
|
+
|
1192
|
+
# auth_names
|
1193
|
+
auth_names = opts[:debug_auth_names] || ['accessToken', 'apiKey', 'customerId']
|
1194
|
+
|
1195
|
+
new_options = opts.merge(
|
1196
|
+
:operation => :"IntegrationsApi.sync_data_source_items",
|
1197
|
+
:header_params => header_params,
|
1198
|
+
:query_params => query_params,
|
1199
|
+
:form_params => form_params,
|
1200
|
+
:body => post_body,
|
1201
|
+
:auth_names => auth_names,
|
1202
|
+
:return_type => return_type
|
1203
|
+
)
|
1204
|
+
|
1205
|
+
data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
|
1206
|
+
if @api_client.config.debugging
|
1207
|
+
@api_client.config.logger.debug "API called: IntegrationsApi#sync_data_source_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1208
|
+
end
|
1209
|
+
APIResponse::new(data, status_code, headers, response)
|
1210
|
+
end
|
1211
|
+
|
1212
|
+
|
1213
|
+
# Sync Files
|
1214
|
+
#
|
1215
|
+
# @param data_source_id [Integer]
|
1216
|
+
# @param ids [Array<String>]
|
1217
|
+
# @param tags [Object]
|
1218
|
+
# @param chunk_size [Integer]
|
1219
|
+
# @param chunk_overlap [Integer]
|
1220
|
+
# @param skip_embedding_generation [Boolean]
|
1221
|
+
# @param embedding_model [EmbeddingGeneratorsNullable]
|
1222
|
+
# @param generate_sparse_vectors [Boolean]
|
1223
|
+
# @param prepend_filename_to_chunks [Boolean]
|
1224
|
+
# @param max_items_per_chunk [Integer]
|
1225
|
+
# @param body [SyncFilesRequest]
|
1226
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1227
|
+
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, extra: {})
|
1228
|
+
_body = {}
|
1229
|
+
_body[:tags] = tags if tags != SENTINEL
|
1230
|
+
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
1231
|
+
_body[:ids] = ids if ids != SENTINEL
|
1232
|
+
_body[:chunk_size] = chunk_size if chunk_size != SENTINEL
|
1233
|
+
_body[:chunk_overlap] = chunk_overlap if chunk_overlap != SENTINEL
|
1234
|
+
_body[:skip_embedding_generation] = skip_embedding_generation if skip_embedding_generation != SENTINEL
|
1235
|
+
_body[:embedding_model] = embedding_model if embedding_model != SENTINEL
|
1236
|
+
_body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
|
1237
|
+
_body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
|
1238
|
+
_body[:max_items_per_chunk] = max_items_per_chunk if max_items_per_chunk != SENTINEL
|
1239
|
+
sync_files_request = _body
|
1240
|
+
api_response = sync_files_with_http_info_impl(sync_files_request, extra)
|
1241
|
+
api_response.data
|
1242
|
+
end
|
1243
|
+
|
1244
|
+
# Sync Files
|
1245
|
+
#
|
1246
|
+
# @param data_source_id [Integer]
|
1247
|
+
# @param ids [Array<String>]
|
1248
|
+
# @param tags [Object]
|
1249
|
+
# @param chunk_size [Integer]
|
1250
|
+
# @param chunk_overlap [Integer]
|
1251
|
+
# @param skip_embedding_generation [Boolean]
|
1252
|
+
# @param embedding_model [EmbeddingGeneratorsNullable]
|
1253
|
+
# @param generate_sparse_vectors [Boolean]
|
1254
|
+
# @param prepend_filename_to_chunks [Boolean]
|
1255
|
+
# @param max_items_per_chunk [Integer]
|
1256
|
+
# @param body [SyncFilesRequest]
|
1257
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1258
|
+
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, extra: {})
|
1259
|
+
_body = {}
|
1260
|
+
_body[:tags] = tags if tags != SENTINEL
|
1261
|
+
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
1262
|
+
_body[:ids] = ids if ids != SENTINEL
|
1263
|
+
_body[:chunk_size] = chunk_size if chunk_size != SENTINEL
|
1264
|
+
_body[:chunk_overlap] = chunk_overlap if chunk_overlap != SENTINEL
|
1265
|
+
_body[:skip_embedding_generation] = skip_embedding_generation if skip_embedding_generation != SENTINEL
|
1266
|
+
_body[:embedding_model] = embedding_model if embedding_model != SENTINEL
|
1267
|
+
_body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
|
1268
|
+
_body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
|
1269
|
+
_body[:max_items_per_chunk] = max_items_per_chunk if max_items_per_chunk != SENTINEL
|
1270
|
+
sync_files_request = _body
|
1271
|
+
sync_files_with_http_info_impl(sync_files_request, extra)
|
1272
|
+
end
|
1273
|
+
|
1274
|
+
# Sync Files
|
1275
|
+
# @param sync_files_request [SyncFilesRequest]
|
1276
|
+
# @param [Hash] opts the optional parameters
|
1277
|
+
# @return [GenericSuccessResponse]
|
1278
|
+
private def sync_files_impl(sync_files_request, opts = {})
|
1279
|
+
data, _status_code, _headers = sync_files_with_http_info(sync_files_request, opts)
|
1280
|
+
data
|
1281
|
+
end
|
1282
|
+
|
1283
|
+
# Sync Files
|
1284
|
+
# @param sync_files_request [SyncFilesRequest]
|
1285
|
+
# @param [Hash] opts the optional parameters
|
1286
|
+
# @return [APIResponse] data is GenericSuccessResponse, status code, headers and response
|
1287
|
+
private def sync_files_with_http_info_impl(sync_files_request, opts = {})
|
1288
|
+
if @api_client.config.debugging
|
1289
|
+
@api_client.config.logger.debug 'Calling API: IntegrationsApi.sync_files ...'
|
1290
|
+
end
|
1291
|
+
# verify the required parameter 'sync_files_request' is set
|
1292
|
+
if @api_client.config.client_side_validation && sync_files_request.nil?
|
1293
|
+
fail ArgumentError, "Missing the required parameter 'sync_files_request' when calling IntegrationsApi.sync_files"
|
1294
|
+
end
|
1295
|
+
# resource path
|
1296
|
+
local_var_path = '/integrations/files/sync'
|
1297
|
+
|
1298
|
+
# query parameters
|
1299
|
+
query_params = opts[:query_params] || {}
|
1300
|
+
|
1301
|
+
# header parameters
|
1302
|
+
header_params = opts[:header_params] || {}
|
1303
|
+
# HTTP header 'Accept' (if needed)
|
1304
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1305
|
+
# HTTP header 'Content-Type'
|
1306
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
1307
|
+
if !content_type.nil?
|
1308
|
+
header_params['Content-Type'] = content_type
|
1309
|
+
end
|
1310
|
+
|
1311
|
+
# form parameters
|
1312
|
+
form_params = opts[:form_params] || {}
|
1313
|
+
|
1314
|
+
# http body (model)
|
1315
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(sync_files_request)
|
1316
|
+
|
1317
|
+
# return_type
|
1318
|
+
return_type = opts[:debug_return_type] || 'GenericSuccessResponse'
|
1319
|
+
|
1320
|
+
# auth_names
|
1321
|
+
auth_names = opts[:debug_auth_names] || ['accessToken', 'apiKey', 'customerId']
|
1322
|
+
|
1323
|
+
new_options = opts.merge(
|
1324
|
+
:operation => :"IntegrationsApi.sync_files",
|
1325
|
+
:header_params => header_params,
|
1326
|
+
:query_params => query_params,
|
1327
|
+
:form_params => form_params,
|
1328
|
+
:body => post_body,
|
1329
|
+
:auth_names => auth_names,
|
1330
|
+
:return_type => return_type
|
1331
|
+
)
|
1332
|
+
|
1333
|
+
data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
|
1334
|
+
if @api_client.config.debugging
|
1335
|
+
@api_client.config.logger.debug "API called: IntegrationsApi#sync_files\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1336
|
+
end
|
1337
|
+
APIResponse::new(data, status_code, headers, response)
|
1338
|
+
end
|
1339
|
+
|
1340
|
+
|
1341
|
+
# Gitbook Sync
|
1342
|
+
#
|
1343
|
+
# You can sync upto 20 Gitbook spaces at a time using this endpoint. Additional parameters below can be used to associate
|
1344
|
+
# data with the synced pages or modify the sync behavior.
|
1345
|
+
#
|
1346
|
+
# @param space_ids [Array<String>]
|
1347
|
+
# @param data_source_id [Integer]
|
1348
|
+
# @param tags [Object]
|
1349
|
+
# @param chunk_size [Integer]
|
1350
|
+
# @param chunk_overlap [Integer]
|
1351
|
+
# @param skip_embedding_generation [Boolean]
|
1352
|
+
# @param embedding_model [EmbeddingGenerators]
|
1353
|
+
# @param generate_sparse_vectors [Boolean]
|
1354
|
+
# @param prepend_filename_to_chunks [Boolean]
|
1355
|
+
# @param body [GitbookSyncRequest]
|
1356
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1357
|
+
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, extra: {})
|
1358
|
+
_body = {}
|
1359
|
+
_body[:tags] = tags if tags != SENTINEL
|
1360
|
+
_body[:space_ids] = space_ids if space_ids != SENTINEL
|
1361
|
+
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
1362
|
+
_body[:chunk_size] = chunk_size if chunk_size != SENTINEL
|
1363
|
+
_body[:chunk_overlap] = chunk_overlap if chunk_overlap != SENTINEL
|
1364
|
+
_body[:skip_embedding_generation] = skip_embedding_generation if skip_embedding_generation != SENTINEL
|
1365
|
+
_body[:embedding_model] = embedding_model if embedding_model != SENTINEL
|
1366
|
+
_body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
|
1367
|
+
_body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
|
1368
|
+
gitbook_sync_request = _body
|
1369
|
+
api_response = sync_gitbook_with_http_info_impl(gitbook_sync_request, extra)
|
1370
|
+
api_response.data
|
1371
|
+
end
|
1372
|
+
|
1373
|
+
# Gitbook Sync
|
1374
|
+
#
|
1375
|
+
# You can sync upto 20 Gitbook spaces at a time using this endpoint. Additional parameters below can be used to associate
|
1376
|
+
# data with the synced pages or modify the sync behavior.
|
1377
|
+
#
|
1378
|
+
# @param space_ids [Array<String>]
|
1379
|
+
# @param data_source_id [Integer]
|
1380
|
+
# @param tags [Object]
|
1381
|
+
# @param chunk_size [Integer]
|
1382
|
+
# @param chunk_overlap [Integer]
|
1383
|
+
# @param skip_embedding_generation [Boolean]
|
1384
|
+
# @param embedding_model [EmbeddingGenerators]
|
1385
|
+
# @param generate_sparse_vectors [Boolean]
|
1386
|
+
# @param prepend_filename_to_chunks [Boolean]
|
1387
|
+
# @param body [GitbookSyncRequest]
|
1388
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1389
|
+
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, extra: {})
|
1390
|
+
_body = {}
|
1391
|
+
_body[:tags] = tags if tags != SENTINEL
|
1392
|
+
_body[:space_ids] = space_ids if space_ids != SENTINEL
|
1393
|
+
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
1394
|
+
_body[:chunk_size] = chunk_size if chunk_size != SENTINEL
|
1395
|
+
_body[:chunk_overlap] = chunk_overlap if chunk_overlap != SENTINEL
|
1396
|
+
_body[:skip_embedding_generation] = skip_embedding_generation if skip_embedding_generation != SENTINEL
|
1397
|
+
_body[:embedding_model] = embedding_model if embedding_model != SENTINEL
|
1398
|
+
_body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
|
1399
|
+
_body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
|
1400
|
+
gitbook_sync_request = _body
|
1401
|
+
sync_gitbook_with_http_info_impl(gitbook_sync_request, extra)
|
1402
|
+
end
|
1403
|
+
|
1404
|
+
# Gitbook Sync
|
1405
|
+
# You can sync upto 20 Gitbook spaces at a time using this endpoint. Additional parameters below can be used to associate data with the synced pages or modify the sync behavior.
|
1406
|
+
# @param gitbook_sync_request [GitbookSyncRequest]
|
1407
|
+
# @param [Hash] opts the optional parameters
|
1408
|
+
# @return [Object]
|
1409
|
+
private def sync_gitbook_impl(gitbook_sync_request, opts = {})
|
1410
|
+
data, _status_code, _headers = sync_gitbook_with_http_info(gitbook_sync_request, opts)
|
1411
|
+
data
|
1412
|
+
end
|
1413
|
+
|
1414
|
+
# Gitbook Sync
|
1415
|
+
# You can sync upto 20 Gitbook spaces at a time using this endpoint. Additional parameters below can be used to associate data with the synced pages or modify the sync behavior.
|
1416
|
+
# @param gitbook_sync_request [GitbookSyncRequest]
|
1417
|
+
# @param [Hash] opts the optional parameters
|
1418
|
+
# @return [APIResponse] data is Object, status code, headers and response
|
1419
|
+
private def sync_gitbook_with_http_info_impl(gitbook_sync_request, opts = {})
|
1420
|
+
if @api_client.config.debugging
|
1421
|
+
@api_client.config.logger.debug 'Calling API: IntegrationsApi.sync_gitbook ...'
|
1422
|
+
end
|
1423
|
+
# verify the required parameter 'gitbook_sync_request' is set
|
1424
|
+
if @api_client.config.client_side_validation && gitbook_sync_request.nil?
|
1425
|
+
fail ArgumentError, "Missing the required parameter 'gitbook_sync_request' when calling IntegrationsApi.sync_gitbook"
|
1426
|
+
end
|
1427
|
+
# resource path
|
1428
|
+
local_var_path = '/integrations/gitbook/sync'
|
1429
|
+
|
1430
|
+
# query parameters
|
1431
|
+
query_params = opts[:query_params] || {}
|
1432
|
+
|
1433
|
+
# header parameters
|
1434
|
+
header_params = opts[:header_params] || {}
|
1435
|
+
# HTTP header 'Accept' (if needed)
|
1436
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1437
|
+
# HTTP header 'Content-Type'
|
1438
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
1439
|
+
if !content_type.nil?
|
1440
|
+
header_params['Content-Type'] = content_type
|
1441
|
+
end
|
1442
|
+
|
1443
|
+
# form parameters
|
1444
|
+
form_params = opts[:form_params] || {}
|
1445
|
+
|
1446
|
+
# http body (model)
|
1447
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(gitbook_sync_request)
|
1448
|
+
|
1449
|
+
# return_type
|
1450
|
+
return_type = opts[:debug_return_type] || 'Object'
|
1451
|
+
|
1452
|
+
# auth_names
|
1453
|
+
auth_names = opts[:debug_auth_names] || ['accessToken', 'apiKey', 'customerId']
|
1454
|
+
|
1455
|
+
new_options = opts.merge(
|
1456
|
+
:operation => :"IntegrationsApi.sync_gitbook",
|
1457
|
+
:header_params => header_params,
|
1458
|
+
:query_params => query_params,
|
1459
|
+
:form_params => form_params,
|
1460
|
+
:body => post_body,
|
1461
|
+
:auth_names => auth_names,
|
1462
|
+
:return_type => return_type
|
1463
|
+
)
|
1464
|
+
|
1465
|
+
data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
|
1466
|
+
if @api_client.config.debugging
|
1467
|
+
@api_client.config.logger.debug "API called: IntegrationsApi#sync_gitbook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1468
|
+
end
|
1469
|
+
APIResponse::new(data, status_code, headers, response)
|
1470
|
+
end
|
1471
|
+
|
1472
|
+
|
1473
|
+
# Gmail Sync
|
1474
|
+
#
|
1475
|
+
# Once you have successfully connected your gmail account, you can choose which emails to sync with us
|
1476
|
+
# using the filters parameter. Filters is a JSON object with key value pairs. It also supports AND and OR operations.
|
1477
|
+
# For now, we support a limited set of keys listed below.
|
1478
|
+
#
|
1479
|
+
# <b>label</b>: Inbuilt Gmail labels, for example "Important" or a custom label you created.
|
1480
|
+
# <b>after</b> or <b>before</b>: A date in YYYY/mm/dd format (example 2023/12/31). Gets emails after/before a certain date.
|
1481
|
+
# You can also use them in combination to get emails from a certain period.
|
1482
|
+
# <b>is</b>: Can have the following values - starred, important, snoozed, and unread
|
1483
|
+
#
|
1484
|
+
# Using keys or values outside of the specified values can lead to unexpected behaviour.
|
1485
|
+
#
|
1486
|
+
# An example of a basic query with filters can be
|
1487
|
+
# ```json
|
1488
|
+
# {
|
1489
|
+
# "filters": {
|
1490
|
+
# "key": "label",
|
1491
|
+
# "value": "Test"
|
1492
|
+
# }
|
1493
|
+
# }
|
1494
|
+
# ```
|
1495
|
+
# Which will list all emails that have the label "Test".
|
1496
|
+
#
|
1497
|
+
# You can use AND and OR operation in the following way:
|
1498
|
+
# ```json
|
1499
|
+
# {
|
1500
|
+
# "filters": {
|
1501
|
+
# "AND": [
|
1502
|
+
# {
|
1503
|
+
# "key": "after",
|
1504
|
+
# "value": "2024/01/07"
|
1505
|
+
# },
|
1506
|
+
# {
|
1507
|
+
# "OR": [
|
1508
|
+
# {
|
1509
|
+
# "key": "label",
|
1510
|
+
# "value": "Personal"
|
1511
|
+
# },
|
1512
|
+
# {
|
1513
|
+
# "key": "is",
|
1514
|
+
# "value": "starred"
|
1515
|
+
# }
|
1516
|
+
# ]
|
1517
|
+
# }
|
1518
|
+
# ]
|
1519
|
+
# }
|
1520
|
+
# }
|
1521
|
+
# ```
|
1522
|
+
# This will return emails after 7th of Jan that are either starred or have the label "Personal".
|
1523
|
+
# Note that this is the highest level of nesting we support, i.e. you can't add more AND/OR filters within the OR filter
|
1524
|
+
# in the above example.
|
1525
|
+
#
|
1526
|
+
# @param filters [Object]
|
1527
|
+
# @param tags [Object]
|
1528
|
+
# @param chunk_size [Integer]
|
1529
|
+
# @param chunk_overlap [Integer]
|
1530
|
+
# @param skip_embedding_generation [Boolean]
|
1531
|
+
# @param embedding_model [EmbeddingGenerators]
|
1532
|
+
# @param generate_sparse_vectors [Boolean]
|
1533
|
+
# @param prepend_filename_to_chunks [Boolean]
|
1534
|
+
# @param body [GmailSyncInput]
|
1535
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1536
|
+
def sync_gmail(filters:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, extra: {})
|
1537
|
+
_body = {}
|
1538
|
+
_body[:tags] = tags if tags != SENTINEL
|
1539
|
+
_body[:filters] = filters if filters != SENTINEL
|
1540
|
+
_body[:chunk_size] = chunk_size if chunk_size != SENTINEL
|
1541
|
+
_body[:chunk_overlap] = chunk_overlap if chunk_overlap != SENTINEL
|
1542
|
+
_body[:skip_embedding_generation] = skip_embedding_generation if skip_embedding_generation != SENTINEL
|
1543
|
+
_body[:embedding_model] = embedding_model if embedding_model != SENTINEL
|
1544
|
+
_body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
|
1545
|
+
_body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
|
1546
|
+
gmail_sync_input = _body
|
1547
|
+
api_response = sync_gmail_with_http_info_impl(gmail_sync_input, extra)
|
1548
|
+
api_response.data
|
1549
|
+
end
|
1550
|
+
|
1551
|
+
# Gmail Sync
|
1552
|
+
#
|
1553
|
+
# Once you have successfully connected your gmail account, you can choose which emails to sync with us
|
1554
|
+
# using the filters parameter. Filters is a JSON object with key value pairs. It also supports AND and OR operations.
|
1555
|
+
# For now, we support a limited set of keys listed below.
|
1556
|
+
#
|
1557
|
+
# <b>label</b>: Inbuilt Gmail labels, for example "Important" or a custom label you created.
|
1558
|
+
# <b>after</b> or <b>before</b>: A date in YYYY/mm/dd format (example 2023/12/31). Gets emails after/before a certain date.
|
1559
|
+
# You can also use them in combination to get emails from a certain period.
|
1560
|
+
# <b>is</b>: Can have the following values - starred, important, snoozed, and unread
|
1561
|
+
#
|
1562
|
+
# Using keys or values outside of the specified values can lead to unexpected behaviour.
|
1563
|
+
#
|
1564
|
+
# An example of a basic query with filters can be
|
1565
|
+
# ```json
|
1566
|
+
# {
|
1567
|
+
# "filters": {
|
1568
|
+
# "key": "label",
|
1569
|
+
# "value": "Test"
|
1570
|
+
# }
|
1571
|
+
# }
|
1572
|
+
# ```
|
1573
|
+
# Which will list all emails that have the label "Test".
|
1574
|
+
#
|
1575
|
+
# You can use AND and OR operation in the following way:
|
1576
|
+
# ```json
|
1577
|
+
# {
|
1578
|
+
# "filters": {
|
1579
|
+
# "AND": [
|
1580
|
+
# {
|
1581
|
+
# "key": "after",
|
1582
|
+
# "value": "2024/01/07"
|
1583
|
+
# },
|
1584
|
+
# {
|
1585
|
+
# "OR": [
|
1586
|
+
# {
|
1587
|
+
# "key": "label",
|
1588
|
+
# "value": "Personal"
|
1589
|
+
# },
|
1590
|
+
# {
|
1591
|
+
# "key": "is",
|
1592
|
+
# "value": "starred"
|
1593
|
+
# }
|
1594
|
+
# ]
|
1595
|
+
# }
|
1596
|
+
# ]
|
1597
|
+
# }
|
1598
|
+
# }
|
1599
|
+
# ```
|
1600
|
+
# This will return emails after 7th of Jan that are either starred or have the label "Personal".
|
1601
|
+
# Note that this is the highest level of nesting we support, i.e. you can't add more AND/OR filters within the OR filter
|
1602
|
+
# in the above example.
|
1603
|
+
#
|
1604
|
+
# @param filters [Object]
|
1605
|
+
# @param tags [Object]
|
1606
|
+
# @param chunk_size [Integer]
|
1607
|
+
# @param chunk_overlap [Integer]
|
1608
|
+
# @param skip_embedding_generation [Boolean]
|
1609
|
+
# @param embedding_model [EmbeddingGenerators]
|
1610
|
+
# @param generate_sparse_vectors [Boolean]
|
1611
|
+
# @param prepend_filename_to_chunks [Boolean]
|
1612
|
+
# @param body [GmailSyncInput]
|
1613
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1614
|
+
def sync_gmail_with_http_info(filters:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, extra: {})
|
1615
|
+
_body = {}
|
1616
|
+
_body[:tags] = tags if tags != SENTINEL
|
1617
|
+
_body[:filters] = filters if filters != SENTINEL
|
1618
|
+
_body[:chunk_size] = chunk_size if chunk_size != SENTINEL
|
1619
|
+
_body[:chunk_overlap] = chunk_overlap if chunk_overlap != SENTINEL
|
1620
|
+
_body[:skip_embedding_generation] = skip_embedding_generation if skip_embedding_generation != SENTINEL
|
1621
|
+
_body[:embedding_model] = embedding_model if embedding_model != SENTINEL
|
1622
|
+
_body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
|
1623
|
+
_body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
|
1624
|
+
gmail_sync_input = _body
|
1625
|
+
sync_gmail_with_http_info_impl(gmail_sync_input, extra)
|
1626
|
+
end
|
1627
|
+
|
1628
|
+
# Gmail Sync
|
1629
|
+
# Once you have successfully connected your gmail account, you can choose which emails to sync with us using the filters parameter. Filters is a JSON object with key value pairs. It also supports AND and OR operations. For now, we support a limited set of keys listed below. <b>label</b>: Inbuilt Gmail labels, for example \"Important\" or a custom label you created. <b>after</b> or <b>before</b>: A date in YYYY/mm/dd format (example 2023/12/31). Gets emails after/before a certain date. You can also use them in combination to get emails from a certain period. <b>is</b>: Can have the following values - starred, important, snoozed, and unread Using keys or values outside of the specified values can lead to unexpected behaviour. An example of a basic query with filters can be ```json { \"filters\": { \"key\": \"label\", \"value\": \"Test\" } } ``` Which will list all emails that have the label \"Test\". You can use AND and OR operation in the following way: ```json { \"filters\": { \"AND\": [ { \"key\": \"after\", \"value\": \"2024/01/07\" }, { \"OR\": [ { \"key\": \"label\", \"value\": \"Personal\" }, { \"key\": \"is\", \"value\": \"starred\" } ] } ] } } ``` This will return emails after 7th of Jan that are either starred or have the label \"Personal\". Note that this is the highest level of nesting we support, i.e. you can't add more AND/OR filters within the OR filter in the above example.
|
1630
|
+
# @param gmail_sync_input [GmailSyncInput]
|
1631
|
+
# @param [Hash] opts the optional parameters
|
1632
|
+
# @return [GenericSuccessResponse]
|
1633
|
+
private def sync_gmail_impl(gmail_sync_input, opts = {})
|
1634
|
+
data, _status_code, _headers = sync_gmail_with_http_info(gmail_sync_input, opts)
|
1635
|
+
data
|
1636
|
+
end
|
1637
|
+
|
1638
|
+
# Gmail Sync
|
1639
|
+
# Once you have successfully connected your gmail account, you can choose which emails to sync with us using the filters parameter. Filters is a JSON object with key value pairs. It also supports AND and OR operations. For now, we support a limited set of keys listed below. <b>label</b>: Inbuilt Gmail labels, for example \"Important\" or a custom label you created. <b>after</b> or <b>before</b>: A date in YYYY/mm/dd format (example 2023/12/31). Gets emails after/before a certain date. You can also use them in combination to get emails from a certain period. <b>is</b>: Can have the following values - starred, important, snoozed, and unread Using keys or values outside of the specified values can lead to unexpected behaviour. An example of a basic query with filters can be ```json { \"filters\": { \"key\": \"label\", \"value\": \"Test\" } } ``` Which will list all emails that have the label \"Test\". You can use AND and OR operation in the following way: ```json { \"filters\": { \"AND\": [ { \"key\": \"after\", \"value\": \"2024/01/07\" }, { \"OR\": [ { \"key\": \"label\", \"value\": \"Personal\" }, { \"key\": \"is\", \"value\": \"starred\" } ] } ] } } ``` This will return emails after 7th of Jan that are either starred or have the label \"Personal\". Note that this is the highest level of nesting we support, i.e. you can't add more AND/OR filters within the OR filter in the above example.
|
1640
|
+
# @param gmail_sync_input [GmailSyncInput]
|
1641
|
+
# @param [Hash] opts the optional parameters
|
1642
|
+
# @return [APIResponse] data is GenericSuccessResponse, status code, headers and response
|
1643
|
+
private def sync_gmail_with_http_info_impl(gmail_sync_input, opts = {})
|
1644
|
+
if @api_client.config.debugging
|
1645
|
+
@api_client.config.logger.debug 'Calling API: IntegrationsApi.sync_gmail ...'
|
1646
|
+
end
|
1647
|
+
# verify the required parameter 'gmail_sync_input' is set
|
1648
|
+
if @api_client.config.client_side_validation && gmail_sync_input.nil?
|
1649
|
+
fail ArgumentError, "Missing the required parameter 'gmail_sync_input' when calling IntegrationsApi.sync_gmail"
|
1650
|
+
end
|
1651
|
+
# resource path
|
1652
|
+
local_var_path = '/integrations/gmail/sync'
|
1653
|
+
|
1654
|
+
# query parameters
|
1655
|
+
query_params = opts[:query_params] || {}
|
1656
|
+
|
1657
|
+
# header parameters
|
1658
|
+
header_params = opts[:header_params] || {}
|
1659
|
+
# HTTP header 'Accept' (if needed)
|
1660
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1661
|
+
# HTTP header 'Content-Type'
|
1662
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
1663
|
+
if !content_type.nil?
|
1664
|
+
header_params['Content-Type'] = content_type
|
1665
|
+
end
|
1666
|
+
|
1667
|
+
# form parameters
|
1668
|
+
form_params = opts[:form_params] || {}
|
1669
|
+
|
1670
|
+
# http body (model)
|
1671
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(gmail_sync_input)
|
1672
|
+
|
1673
|
+
# return_type
|
1674
|
+
return_type = opts[:debug_return_type] || 'GenericSuccessResponse'
|
1675
|
+
|
1676
|
+
# auth_names
|
1677
|
+
auth_names = opts[:debug_auth_names] || ['accessToken', 'apiKey', 'customerId']
|
1678
|
+
|
1679
|
+
new_options = opts.merge(
|
1680
|
+
:operation => :"IntegrationsApi.sync_gmail",
|
1681
|
+
:header_params => header_params,
|
1682
|
+
:query_params => query_params,
|
1683
|
+
:form_params => form_params,
|
1684
|
+
:body => post_body,
|
1685
|
+
:auth_names => auth_names,
|
1686
|
+
:return_type => return_type
|
1687
|
+
)
|
1688
|
+
|
1689
|
+
data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
|
1690
|
+
if @api_client.config.debugging
|
1691
|
+
@api_client.config.logger.debug "API called: IntegrationsApi#sync_gmail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1692
|
+
end
|
1693
|
+
APIResponse::new(data, status_code, headers, response)
|
1694
|
+
end
|
1695
|
+
|
1696
|
+
|
1697
|
+
# Outlook Sync
|
1698
|
+
#
|
1699
|
+
# Once you have successfully connected your Outlook account, you can choose which emails to sync with us
|
1700
|
+
# using the filters and folder parameter. "folder" should be the folder you want to sync from Outlook. By default
|
1701
|
+
# we get messages from your inbox folder.
|
1702
|
+
# Filters is a JSON object with key value pairs. It also supports AND and OR operations.
|
1703
|
+
# For now, we support a limited set of keys listed below.
|
1704
|
+
#
|
1705
|
+
# <b>category</b>: Custom categories that you created in Outlook.
|
1706
|
+
# <b>after</b> or <b>before</b>: A date in YYYY/mm/dd format (example 2023/12/31). Gets emails after/before a certain date. You can also use them in combination to get emails from a certain period.
|
1707
|
+
# <b>is</b>: Can have the following values: flagged
|
1708
|
+
#
|
1709
|
+
# An example of a basic query with filters can be
|
1710
|
+
# ```json
|
1711
|
+
# {
|
1712
|
+
# "filters": {
|
1713
|
+
# "key": "category",
|
1714
|
+
# "value": "Test"
|
1715
|
+
# }
|
1716
|
+
# }
|
1717
|
+
# ```
|
1718
|
+
# Which will list all emails that have the category "Test".
|
1719
|
+
#
|
1720
|
+
# Specifying a custom folder in the same query
|
1721
|
+
# ```json
|
1722
|
+
# {
|
1723
|
+
# "folder": "Folder Name",
|
1724
|
+
# "filters": {
|
1725
|
+
# "key": "category",
|
1726
|
+
# "value": "Test"
|
1727
|
+
# }
|
1728
|
+
# }
|
1729
|
+
# ```
|
1730
|
+
#
|
1731
|
+
# You can use AND and OR operation in the following way:
|
1732
|
+
# ```json
|
1733
|
+
# {
|
1734
|
+
# "filters": {
|
1735
|
+
# "AND": [
|
1736
|
+
# {
|
1737
|
+
# "key": "after",
|
1738
|
+
# "value": "2024/01/07"
|
1739
|
+
# },
|
1740
|
+
# {
|
1741
|
+
# "OR": [
|
1742
|
+
# {
|
1743
|
+
# "key": "category",
|
1744
|
+
# "value": "Personal"
|
1745
|
+
# },
|
1746
|
+
# {
|
1747
|
+
# "key": "category",
|
1748
|
+
# "value": "Test"
|
1749
|
+
# },
|
1750
|
+
# ]
|
1751
|
+
# }
|
1752
|
+
# ]
|
1753
|
+
# }
|
1754
|
+
# }
|
1755
|
+
# ```
|
1756
|
+
# This will return emails after 7th of Jan that have either Personal or Test as category.
|
1757
|
+
# Note that this is the highest level of nesting we support, i.e. you can't add more AND/OR filters within the OR filter
|
1758
|
+
# in the above example.
|
1759
|
+
#
|
1760
|
+
# @param filters [Object]
|
1761
|
+
# @param tags [Object]
|
1762
|
+
# @param folder [String]
|
1763
|
+
# @param chunk_size [Integer]
|
1764
|
+
# @param chunk_overlap [Integer]
|
1765
|
+
# @param skip_embedding_generation [Boolean]
|
1766
|
+
# @param embedding_model [EmbeddingGenerators]
|
1767
|
+
# @param generate_sparse_vectors [Boolean]
|
1768
|
+
# @param prepend_filename_to_chunks [Boolean]
|
1769
|
+
# @param body [OutlookSyncInput]
|
1770
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1771
|
+
def sync_outlook(filters:, tags: SENTINEL, folder: 'Inbox', chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, extra: {})
|
1772
|
+
_body = {}
|
1773
|
+
_body[:tags] = tags if tags != SENTINEL
|
1774
|
+
_body[:folder] = folder if folder != SENTINEL
|
1775
|
+
_body[:filters] = filters if filters != SENTINEL
|
1776
|
+
_body[:chunk_size] = chunk_size if chunk_size != SENTINEL
|
1777
|
+
_body[:chunk_overlap] = chunk_overlap if chunk_overlap != SENTINEL
|
1778
|
+
_body[:skip_embedding_generation] = skip_embedding_generation if skip_embedding_generation != SENTINEL
|
1779
|
+
_body[:embedding_model] = embedding_model if embedding_model != SENTINEL
|
1780
|
+
_body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
|
1781
|
+
_body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
|
1782
|
+
outlook_sync_input = _body
|
1783
|
+
api_response = sync_outlook_with_http_info_impl(outlook_sync_input, extra)
|
1784
|
+
api_response.data
|
1785
|
+
end
|
1786
|
+
|
1787
|
+
# Outlook Sync
|
1788
|
+
#
|
1789
|
+
# Once you have successfully connected your Outlook account, you can choose which emails to sync with us
|
1790
|
+
# using the filters and folder parameter. "folder" should be the folder you want to sync from Outlook. By default
|
1791
|
+
# we get messages from your inbox folder.
|
1792
|
+
# Filters is a JSON object with key value pairs. It also supports AND and OR operations.
|
1793
|
+
# For now, we support a limited set of keys listed below.
|
1794
|
+
#
|
1795
|
+
# <b>category</b>: Custom categories that you created in Outlook.
|
1796
|
+
# <b>after</b> or <b>before</b>: A date in YYYY/mm/dd format (example 2023/12/31). Gets emails after/before a certain date. You can also use them in combination to get emails from a certain period.
|
1797
|
+
# <b>is</b>: Can have the following values: flagged
|
1798
|
+
#
|
1799
|
+
# An example of a basic query with filters can be
|
1800
|
+
# ```json
|
1801
|
+
# {
|
1802
|
+
# "filters": {
|
1803
|
+
# "key": "category",
|
1804
|
+
# "value": "Test"
|
1805
|
+
# }
|
1806
|
+
# }
|
1807
|
+
# ```
|
1808
|
+
# Which will list all emails that have the category "Test".
|
1809
|
+
#
|
1810
|
+
# Specifying a custom folder in the same query
|
1811
|
+
# ```json
|
1812
|
+
# {
|
1813
|
+
# "folder": "Folder Name",
|
1814
|
+
# "filters": {
|
1815
|
+
# "key": "category",
|
1816
|
+
# "value": "Test"
|
1817
|
+
# }
|
1818
|
+
# }
|
1819
|
+
# ```
|
1820
|
+
#
|
1821
|
+
# You can use AND and OR operation in the following way:
|
1822
|
+
# ```json
|
1823
|
+
# {
|
1824
|
+
# "filters": {
|
1825
|
+
# "AND": [
|
1826
|
+
# {
|
1827
|
+
# "key": "after",
|
1828
|
+
# "value": "2024/01/07"
|
1829
|
+
# },
|
1830
|
+
# {
|
1831
|
+
# "OR": [
|
1832
|
+
# {
|
1833
|
+
# "key": "category",
|
1834
|
+
# "value": "Personal"
|
1835
|
+
# },
|
1836
|
+
# {
|
1837
|
+
# "key": "category",
|
1838
|
+
# "value": "Test"
|
1839
|
+
# },
|
1840
|
+
# ]
|
1841
|
+
# }
|
1842
|
+
# ]
|
1843
|
+
# }
|
1844
|
+
# }
|
1845
|
+
# ```
|
1846
|
+
# This will return emails after 7th of Jan that have either Personal or Test as category.
|
1847
|
+
# Note that this is the highest level of nesting we support, i.e. you can't add more AND/OR filters within the OR filter
|
1848
|
+
# in the above example.
|
1849
|
+
#
|
1850
|
+
# @param filters [Object]
|
1851
|
+
# @param tags [Object]
|
1852
|
+
# @param folder [String]
|
1853
|
+
# @param chunk_size [Integer]
|
1854
|
+
# @param chunk_overlap [Integer]
|
1855
|
+
# @param skip_embedding_generation [Boolean]
|
1856
|
+
# @param embedding_model [EmbeddingGenerators]
|
1857
|
+
# @param generate_sparse_vectors [Boolean]
|
1858
|
+
# @param prepend_filename_to_chunks [Boolean]
|
1859
|
+
# @param body [OutlookSyncInput]
|
1860
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1861
|
+
def sync_outlook_with_http_info(filters:, tags: SENTINEL, folder: 'Inbox', chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, extra: {})
|
1862
|
+
_body = {}
|
1863
|
+
_body[:tags] = tags if tags != SENTINEL
|
1864
|
+
_body[:folder] = folder if folder != SENTINEL
|
1865
|
+
_body[:filters] = filters if filters != SENTINEL
|
1866
|
+
_body[:chunk_size] = chunk_size if chunk_size != SENTINEL
|
1867
|
+
_body[:chunk_overlap] = chunk_overlap if chunk_overlap != SENTINEL
|
1868
|
+
_body[:skip_embedding_generation] = skip_embedding_generation if skip_embedding_generation != SENTINEL
|
1869
|
+
_body[:embedding_model] = embedding_model if embedding_model != SENTINEL
|
1870
|
+
_body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
|
1871
|
+
_body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
|
1872
|
+
outlook_sync_input = _body
|
1873
|
+
sync_outlook_with_http_info_impl(outlook_sync_input, extra)
|
1874
|
+
end
|
1875
|
+
|
1876
|
+
# Outlook Sync
|
1877
|
+
# Once you have successfully connected your Outlook account, you can choose which emails to sync with us using the filters and folder parameter. \"folder\" should be the folder you want to sync from Outlook. By default we get messages from your inbox folder. Filters is a JSON object with key value pairs. It also supports AND and OR operations. For now, we support a limited set of keys listed below. <b>category</b>: Custom categories that you created in Outlook. <b>after</b> or <b>before</b>: A date in YYYY/mm/dd format (example 2023/12/31). Gets emails after/before a certain date. You can also use them in combination to get emails from a certain period. <b>is</b>: Can have the following values: flagged An example of a basic query with filters can be ```json { \"filters\": { \"key\": \"category\", \"value\": \"Test\" } } ``` Which will list all emails that have the category \"Test\". Specifying a custom folder in the same query ```json { \"folder\": \"Folder Name\", \"filters\": { \"key\": \"category\", \"value\": \"Test\" } } ``` You can use AND and OR operation in the following way: ```json { \"filters\": { \"AND\": [ { \"key\": \"after\", \"value\": \"2024/01/07\" }, { \"OR\": [ { \"key\": \"category\", \"value\": \"Personal\" }, { \"key\": \"category\", \"value\": \"Test\" }, ] } ] } } ``` This will return emails after 7th of Jan that have either Personal or Test as category. Note that this is the highest level of nesting we support, i.e. you can't add more AND/OR filters within the OR filter in the above example.
|
1878
|
+
# @param outlook_sync_input [OutlookSyncInput]
|
1879
|
+
# @param [Hash] opts the optional parameters
|
1880
|
+
# @return [GenericSuccessResponse]
|
1881
|
+
private def sync_outlook_impl(outlook_sync_input, opts = {})
|
1882
|
+
data, _status_code, _headers = sync_outlook_with_http_info(outlook_sync_input, opts)
|
1883
|
+
data
|
1884
|
+
end
|
1885
|
+
|
1886
|
+
# Outlook Sync
|
1887
|
+
# Once you have successfully connected your Outlook account, you can choose which emails to sync with us using the filters and folder parameter. \"folder\" should be the folder you want to sync from Outlook. By default we get messages from your inbox folder. Filters is a JSON object with key value pairs. It also supports AND and OR operations. For now, we support a limited set of keys listed below. <b>category</b>: Custom categories that you created in Outlook. <b>after</b> or <b>before</b>: A date in YYYY/mm/dd format (example 2023/12/31). Gets emails after/before a certain date. You can also use them in combination to get emails from a certain period. <b>is</b>: Can have the following values: flagged An example of a basic query with filters can be ```json { \"filters\": { \"key\": \"category\", \"value\": \"Test\" } } ``` Which will list all emails that have the category \"Test\". Specifying a custom folder in the same query ```json { \"folder\": \"Folder Name\", \"filters\": { \"key\": \"category\", \"value\": \"Test\" } } ``` You can use AND and OR operation in the following way: ```json { \"filters\": { \"AND\": [ { \"key\": \"after\", \"value\": \"2024/01/07\" }, { \"OR\": [ { \"key\": \"category\", \"value\": \"Personal\" }, { \"key\": \"category\", \"value\": \"Test\" }, ] } ] } } ``` This will return emails after 7th of Jan that have either Personal or Test as category. Note that this is the highest level of nesting we support, i.e. you can't add more AND/OR filters within the OR filter in the above example.
|
1888
|
+
# @param outlook_sync_input [OutlookSyncInput]
|
1889
|
+
# @param [Hash] opts the optional parameters
|
1890
|
+
# @return [APIResponse] data is GenericSuccessResponse, status code, headers and response
|
1891
|
+
private def sync_outlook_with_http_info_impl(outlook_sync_input, opts = {})
|
1892
|
+
if @api_client.config.debugging
|
1893
|
+
@api_client.config.logger.debug 'Calling API: IntegrationsApi.sync_outlook ...'
|
1894
|
+
end
|
1895
|
+
# verify the required parameter 'outlook_sync_input' is set
|
1896
|
+
if @api_client.config.client_side_validation && outlook_sync_input.nil?
|
1897
|
+
fail ArgumentError, "Missing the required parameter 'outlook_sync_input' when calling IntegrationsApi.sync_outlook"
|
1898
|
+
end
|
1899
|
+
# resource path
|
1900
|
+
local_var_path = '/integrations/outlook/sync'
|
1901
|
+
|
1902
|
+
# query parameters
|
1903
|
+
query_params = opts[:query_params] || {}
|
1904
|
+
|
1905
|
+
# header parameters
|
1906
|
+
header_params = opts[:header_params] || {}
|
1907
|
+
# HTTP header 'Accept' (if needed)
|
1908
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1909
|
+
# HTTP header 'Content-Type'
|
1910
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
1911
|
+
if !content_type.nil?
|
1912
|
+
header_params['Content-Type'] = content_type
|
1913
|
+
end
|
1914
|
+
|
1915
|
+
# form parameters
|
1916
|
+
form_params = opts[:form_params] || {}
|
1917
|
+
|
1918
|
+
# http body (model)
|
1919
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(outlook_sync_input)
|
1920
|
+
|
1921
|
+
# return_type
|
1922
|
+
return_type = opts[:debug_return_type] || 'GenericSuccessResponse'
|
1923
|
+
|
1924
|
+
# auth_names
|
1925
|
+
auth_names = opts[:debug_auth_names] || ['accessToken', 'apiKey', 'customerId']
|
1926
|
+
|
1927
|
+
new_options = opts.merge(
|
1928
|
+
:operation => :"IntegrationsApi.sync_outlook",
|
1929
|
+
:header_params => header_params,
|
1930
|
+
:query_params => query_params,
|
1931
|
+
:form_params => form_params,
|
1932
|
+
:body => post_body,
|
1933
|
+
:auth_names => auth_names,
|
1934
|
+
:return_type => return_type
|
1935
|
+
)
|
1936
|
+
|
1937
|
+
data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
|
1938
|
+
if @api_client.config.debugging
|
1939
|
+
@api_client.config.logger.debug "API called: IntegrationsApi#sync_outlook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1940
|
+
end
|
1941
|
+
APIResponse::new(data, status_code, headers, response)
|
1942
|
+
end
|
1943
|
+
|
1944
|
+
|
1945
|
+
# Rss Feed
|
1946
|
+
#
|
1947
|
+
# @param url [String]
|
1948
|
+
# @param tags [Object]
|
1949
|
+
# @param chunk_size [Integer]
|
1950
|
+
# @param chunk_overlap [Integer]
|
1951
|
+
# @param skip_embedding_generation [Boolean]
|
1952
|
+
# @param embedding_model [EmbeddingGenerators]
|
1953
|
+
# @param generate_sparse_vectors [Boolean]
|
1954
|
+
# @param prepend_filename_to_chunks [Boolean]
|
1955
|
+
# @param body [RSSFeedInput]
|
1956
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1957
|
+
def sync_rss_feed(url:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, extra: {})
|
1958
|
+
_body = {}
|
1959
|
+
_body[:tags] = tags if tags != SENTINEL
|
1960
|
+
_body[:url] = url if url != SENTINEL
|
1961
|
+
_body[:chunk_size] = chunk_size if chunk_size != SENTINEL
|
1962
|
+
_body[:chunk_overlap] = chunk_overlap if chunk_overlap != SENTINEL
|
1963
|
+
_body[:skip_embedding_generation] = skip_embedding_generation if skip_embedding_generation != SENTINEL
|
1964
|
+
_body[:embedding_model] = embedding_model if embedding_model != SENTINEL
|
1965
|
+
_body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
|
1966
|
+
_body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
|
1967
|
+
rss_feed_input = _body
|
1968
|
+
api_response = sync_rss_feed_with_http_info_impl(rss_feed_input, extra)
|
1969
|
+
api_response.data
|
1970
|
+
end
|
1971
|
+
|
1972
|
+
# Rss Feed
|
1973
|
+
#
|
1974
|
+
# @param url [String]
|
1975
|
+
# @param tags [Object]
|
1976
|
+
# @param chunk_size [Integer]
|
1977
|
+
# @param chunk_overlap [Integer]
|
1978
|
+
# @param skip_embedding_generation [Boolean]
|
1979
|
+
# @param embedding_model [EmbeddingGenerators]
|
1980
|
+
# @param generate_sparse_vectors [Boolean]
|
1981
|
+
# @param prepend_filename_to_chunks [Boolean]
|
1982
|
+
# @param body [RSSFeedInput]
|
1983
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1984
|
+
def sync_rss_feed_with_http_info(url:, tags: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', generate_sparse_vectors: false, prepend_filename_to_chunks: false, extra: {})
|
1985
|
+
_body = {}
|
1986
|
+
_body[:tags] = tags if tags != SENTINEL
|
1987
|
+
_body[:url] = url if url != SENTINEL
|
1988
|
+
_body[:chunk_size] = chunk_size if chunk_size != SENTINEL
|
1989
|
+
_body[:chunk_overlap] = chunk_overlap if chunk_overlap != SENTINEL
|
1990
|
+
_body[:skip_embedding_generation] = skip_embedding_generation if skip_embedding_generation != SENTINEL
|
1991
|
+
_body[:embedding_model] = embedding_model if embedding_model != SENTINEL
|
1992
|
+
_body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
|
1993
|
+
_body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
|
1994
|
+
rss_feed_input = _body
|
1995
|
+
sync_rss_feed_with_http_info_impl(rss_feed_input, extra)
|
1996
|
+
end
|
1997
|
+
|
1998
|
+
# Rss Feed
|
1999
|
+
# @param rss_feed_input [RSSFeedInput]
|
2000
|
+
# @param [Hash] opts the optional parameters
|
2001
|
+
# @return [GenericSuccessResponse]
|
2002
|
+
private def sync_rss_feed_impl(rss_feed_input, opts = {})
|
2003
|
+
data, _status_code, _headers = sync_rss_feed_with_http_info(rss_feed_input, opts)
|
2004
|
+
data
|
2005
|
+
end
|
2006
|
+
|
2007
|
+
# Rss Feed
|
2008
|
+
# @param rss_feed_input [RSSFeedInput]
|
2009
|
+
# @param [Hash] opts the optional parameters
|
2010
|
+
# @return [APIResponse] data is GenericSuccessResponse, status code, headers and response
|
2011
|
+
private def sync_rss_feed_with_http_info_impl(rss_feed_input, opts = {})
|
2012
|
+
if @api_client.config.debugging
|
2013
|
+
@api_client.config.logger.debug 'Calling API: IntegrationsApi.sync_rss_feed ...'
|
2014
|
+
end
|
2015
|
+
# verify the required parameter 'rss_feed_input' is set
|
2016
|
+
if @api_client.config.client_side_validation && rss_feed_input.nil?
|
2017
|
+
fail ArgumentError, "Missing the required parameter 'rss_feed_input' when calling IntegrationsApi.sync_rss_feed"
|
2018
|
+
end
|
2019
|
+
# resource path
|
2020
|
+
local_var_path = '/integrations/rss_feed'
|
2021
|
+
|
2022
|
+
# query parameters
|
2023
|
+
query_params = opts[:query_params] || {}
|
2024
|
+
|
2025
|
+
# header parameters
|
2026
|
+
header_params = opts[:header_params] || {}
|
2027
|
+
# HTTP header 'Accept' (if needed)
|
2028
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
2029
|
+
# HTTP header 'Content-Type'
|
2030
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
2031
|
+
if !content_type.nil?
|
2032
|
+
header_params['Content-Type'] = content_type
|
2033
|
+
end
|
2034
|
+
|
2035
|
+
# form parameters
|
2036
|
+
form_params = opts[:form_params] || {}
|
2037
|
+
|
2038
|
+
# http body (model)
|
2039
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(rss_feed_input)
|
2040
|
+
|
2041
|
+
# return_type
|
2042
|
+
return_type = opts[:debug_return_type] || 'GenericSuccessResponse'
|
2043
|
+
|
2044
|
+
# auth_names
|
2045
|
+
auth_names = opts[:debug_auth_names] || ['accessToken', 'apiKey', 'customerId']
|
2046
|
+
|
2047
|
+
new_options = opts.merge(
|
2048
|
+
:operation => :"IntegrationsApi.sync_rss_feed",
|
2049
|
+
:header_params => header_params,
|
2050
|
+
:query_params => query_params,
|
2051
|
+
:form_params => form_params,
|
2052
|
+
:body => post_body,
|
2053
|
+
:auth_names => auth_names,
|
2054
|
+
:return_type => return_type
|
2055
|
+
)
|
2056
|
+
|
2057
|
+
data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
|
2058
|
+
if @api_client.config.debugging
|
2059
|
+
@api_client.config.logger.debug "API called: IntegrationsApi#sync_rss_feed\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2060
|
+
end
|
2061
|
+
APIResponse::new(data, status_code, headers, response)
|
2062
|
+
end
|
2063
|
+
|
2064
|
+
|
2065
|
+
# S3 Files
|
2066
|
+
#
|
2067
|
+
# After optionally loading the items via /integrations/items/sync and integrations/items/list, use the bucket name
|
2068
|
+
# and object key as the ID in this endpoint to sync them into Carbon. Additional parameters below can associate
|
2069
|
+
# data with the selected items or modify the sync behavior
|
2070
|
+
#
|
2071
|
+
# @param ids [Array<S3GetFileInput>]
|
2072
|
+
# @param tags [Object]
|
2073
|
+
# @param chunk_size [Integer]
|
2074
|
+
# @param chunk_overlap [Integer]
|
2075
|
+
# @param skip_embedding_generation [Boolean]
|
2076
|
+
# @param embedding_model [EmbeddingGenerators]
|
2077
|
+
# @param generate_sparse_vectors [Boolean]
|
2078
|
+
# @param prepend_filename_to_chunks [Boolean]
|
2079
|
+
# @param max_items_per_chunk [Integer]
|
2080
|
+
# @param body [S3FileSyncInput]
|
2081
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
2082
|
+
def sync_s3_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, extra: {})
|
2083
|
+
_body = {}
|
2084
|
+
_body[:tags] = tags if tags != SENTINEL
|
2085
|
+
_body[:ids] = ids if ids != SENTINEL
|
2086
|
+
_body[:chunk_size] = chunk_size if chunk_size != SENTINEL
|
2087
|
+
_body[:chunk_overlap] = chunk_overlap if chunk_overlap != SENTINEL
|
2088
|
+
_body[:skip_embedding_generation] = skip_embedding_generation if skip_embedding_generation != SENTINEL
|
2089
|
+
_body[:embedding_model] = embedding_model if embedding_model != SENTINEL
|
2090
|
+
_body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
|
2091
|
+
_body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
|
2092
|
+
_body[:max_items_per_chunk] = max_items_per_chunk if max_items_per_chunk != SENTINEL
|
2093
|
+
s3_file_sync_input = _body
|
2094
|
+
api_response = sync_s3_files_with_http_info_impl(s3_file_sync_input, extra)
|
2095
|
+
api_response.data
|
2096
|
+
end
|
2097
|
+
|
2098
|
+
# S3 Files
|
2099
|
+
#
|
2100
|
+
# After optionally loading the items via /integrations/items/sync and integrations/items/list, use the bucket name
|
2101
|
+
# and object key as the ID in this endpoint to sync them into Carbon. Additional parameters below can associate
|
2102
|
+
# data with the selected items or modify the sync behavior
|
2103
|
+
#
|
2104
|
+
# @param ids [Array<S3GetFileInput>]
|
2105
|
+
# @param tags [Object]
|
2106
|
+
# @param chunk_size [Integer]
|
2107
|
+
# @param chunk_overlap [Integer]
|
2108
|
+
# @param skip_embedding_generation [Boolean]
|
2109
|
+
# @param embedding_model [EmbeddingGenerators]
|
2110
|
+
# @param generate_sparse_vectors [Boolean]
|
2111
|
+
# @param prepend_filename_to_chunks [Boolean]
|
2112
|
+
# @param max_items_per_chunk [Integer]
|
2113
|
+
# @param body [S3FileSyncInput]
|
2114
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
2115
|
+
def sync_s3_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, extra: {})
|
2116
|
+
_body = {}
|
2117
|
+
_body[:tags] = tags if tags != SENTINEL
|
2118
|
+
_body[:ids] = ids if ids != SENTINEL
|
2119
|
+
_body[:chunk_size] = chunk_size if chunk_size != SENTINEL
|
2120
|
+
_body[:chunk_overlap] = chunk_overlap if chunk_overlap != SENTINEL
|
2121
|
+
_body[:skip_embedding_generation] = skip_embedding_generation if skip_embedding_generation != SENTINEL
|
2122
|
+
_body[:embedding_model] = embedding_model if embedding_model != SENTINEL
|
2123
|
+
_body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
|
2124
|
+
_body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
|
2125
|
+
_body[:max_items_per_chunk] = max_items_per_chunk if max_items_per_chunk != SENTINEL
|
2126
|
+
s3_file_sync_input = _body
|
2127
|
+
sync_s3_files_with_http_info_impl(s3_file_sync_input, extra)
|
2128
|
+
end
|
2129
|
+
|
2130
|
+
# S3 Files
|
2131
|
+
# After optionally loading the items via /integrations/items/sync and integrations/items/list, use the bucket name and object key 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
|
2132
|
+
# @param s3_file_sync_input [S3FileSyncInput]
|
2133
|
+
# @param [Hash] opts the optional parameters
|
2134
|
+
# @return [GenericSuccessResponse]
|
2135
|
+
private def sync_s3_files_impl(s3_file_sync_input, opts = {})
|
2136
|
+
data, _status_code, _headers = sync_s3_files_with_http_info(s3_file_sync_input, opts)
|
2137
|
+
data
|
2138
|
+
end
|
2139
|
+
|
2140
|
+
# S3 Files
|
2141
|
+
# After optionally loading the items via /integrations/items/sync and integrations/items/list, use the bucket name and object key 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
|
2142
|
+
# @param s3_file_sync_input [S3FileSyncInput]
|
2143
|
+
# @param [Hash] opts the optional parameters
|
2144
|
+
# @return [APIResponse] data is GenericSuccessResponse, status code, headers and response
|
2145
|
+
private def sync_s3_files_with_http_info_impl(s3_file_sync_input, opts = {})
|
2146
|
+
if @api_client.config.debugging
|
2147
|
+
@api_client.config.logger.debug 'Calling API: IntegrationsApi.sync_s3_files ...'
|
2148
|
+
end
|
2149
|
+
# verify the required parameter 's3_file_sync_input' is set
|
2150
|
+
if @api_client.config.client_side_validation && s3_file_sync_input.nil?
|
2151
|
+
fail ArgumentError, "Missing the required parameter 's3_file_sync_input' when calling IntegrationsApi.sync_s3_files"
|
2152
|
+
end
|
2153
|
+
# resource path
|
2154
|
+
local_var_path = '/integrations/s3/files'
|
2155
|
+
|
2156
|
+
# query parameters
|
2157
|
+
query_params = opts[:query_params] || {}
|
2158
|
+
|
2159
|
+
# header parameters
|
2160
|
+
header_params = opts[:header_params] || {}
|
2161
|
+
# HTTP header 'Accept' (if needed)
|
2162
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
2163
|
+
# HTTP header 'Content-Type'
|
2164
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
2165
|
+
if !content_type.nil?
|
2166
|
+
header_params['Content-Type'] = content_type
|
2167
|
+
end
|
2168
|
+
|
2169
|
+
# form parameters
|
2170
|
+
form_params = opts[:form_params] || {}
|
2171
|
+
|
2172
|
+
# http body (model)
|
2173
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(s3_file_sync_input)
|
2174
|
+
|
2175
|
+
# return_type
|
2176
|
+
return_type = opts[:debug_return_type] || 'GenericSuccessResponse'
|
2177
|
+
|
2178
|
+
# auth_names
|
2179
|
+
auth_names = opts[:debug_auth_names] || ['accessToken', 'apiKey', 'customerId']
|
2180
|
+
|
2181
|
+
new_options = opts.merge(
|
2182
|
+
:operation => :"IntegrationsApi.sync_s3_files",
|
2183
|
+
:header_params => header_params,
|
2184
|
+
:query_params => query_params,
|
2185
|
+
:form_params => form_params,
|
2186
|
+
:body => post_body,
|
2187
|
+
:auth_names => auth_names,
|
2188
|
+
:return_type => return_type
|
2189
|
+
)
|
2190
|
+
|
2191
|
+
data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
|
2192
|
+
if @api_client.config.debugging
|
2193
|
+
@api_client.config.logger.debug "API called: IntegrationsApi#sync_s3_files\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2194
|
+
end
|
2195
|
+
APIResponse::new(data, status_code, headers, response)
|
2196
|
+
end
|
2197
|
+
end
|
2198
|
+
|
2199
|
+
# top-level client access to avoid having the user to insantiate their own API instances
|
2200
|
+
Integrations = IntegrationsApi::new
|
2201
|
+
end
|