carbon_ruby_sdk 0.1.5 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +100 -9
- data/lib/carbon_ruby_sdk/api/embeddings_api.rb +10 -2
- data/lib/carbon_ruby_sdk/api/files_api.rb +6 -2
- data/lib/carbon_ruby_sdk/api/integrations_api.rb +168 -19
- data/lib/carbon_ruby_sdk/models/authentication_property.rb +436 -0
- data/lib/carbon_ruby_sdk/models/chunks_and_embeddings.rb +1 -5
- data/lib/carbon_ruby_sdk/models/chunks_and_embeddings_upload_input.rb +24 -4
- data/lib/carbon_ruby_sdk/models/confluence_authentication.rb +254 -0
- data/lib/carbon_ruby_sdk/models/connect_data_source_input.rb +229 -0
- data/lib/carbon_ruby_sdk/models/connect_data_source_response.rb +230 -0
- data/lib/carbon_ruby_sdk/models/freskdesk_authentication.rb +244 -0
- data/lib/carbon_ruby_sdk/models/gitbook_authetication.rb +244 -0
- data/lib/carbon_ruby_sdk/models/gmail_sync_input.rb +15 -5
- data/lib/carbon_ruby_sdk/models/notion_authentication.rb +244 -0
- data/lib/carbon_ruby_sdk/models/o_auth_authentication.rb +244 -0
- data/lib/carbon_ruby_sdk/models/o_auth_url_request.rb +29 -4
- data/lib/carbon_ruby_sdk/models/organization_user_data_source_api.rb +11 -1
- data/lib/carbon_ruby_sdk/models/outh_url_response.rb +220 -0
- data/lib/carbon_ruby_sdk/models/outlook_sync_input.rb +15 -5
- data/lib/carbon_ruby_sdk/models/resync_file_query_input.rb +16 -5
- data/lib/carbon_ruby_sdk/models/s3_authentication.rb +244 -0
- data/lib/carbon_ruby_sdk/models/s3_file_sync_input.rb +14 -4
- data/lib/carbon_ruby_sdk/models/salesforce_authentication.rb +254 -0
- data/lib/carbon_ruby_sdk/models/sharepoint_authentication.rb +268 -0
- data/lib/carbon_ruby_sdk/models/simple_o_auth_data_sources.rb +41 -0
- data/lib/carbon_ruby_sdk/models/sitemap_scrape_request.rb +15 -0
- data/lib/carbon_ruby_sdk/models/sync_options.rb +322 -0
- data/lib/carbon_ruby_sdk/models/webscrape_request.rb +30 -0
- data/lib/carbon_ruby_sdk/models/zendesk_authentication.rb +244 -0
- data/lib/carbon_ruby_sdk/models/zotero_authentication.rb +272 -0
- data/lib/carbon_ruby_sdk/version.rb +1 -1
- data/lib/carbon_ruby_sdk.rb +16 -0
- data/spec/api/integrations_api_spec.rb +16 -1
- data/spec/models/authentication_property_spec.rb +112 -0
- data/spec/models/chunks_and_embeddings_upload_input_spec.rb +12 -0
- data/spec/models/confluence_authentication_spec.rb +46 -0
- data/spec/models/connect_data_source_input_spec.rb +34 -0
- data/spec/models/connect_data_source_response_spec.rb +34 -0
- data/spec/models/freskdesk_authentication_spec.rb +40 -0
- data/spec/models/gitbook_authetication_spec.rb +40 -0
- data/spec/models/gmail_sync_input_spec.rb +6 -0
- data/spec/models/notion_authentication_spec.rb +40 -0
- data/spec/models/o_auth_authentication_spec.rb +40 -0
- data/spec/models/o_auth_url_request_spec.rb +12 -0
- data/spec/models/organization_user_data_source_api_spec.rb +6 -0
- data/spec/models/outh_url_response_spec.rb +28 -0
- data/spec/models/outlook_sync_input_spec.rb +6 -0
- data/spec/models/resync_file_query_input_spec.rb +6 -0
- data/spec/models/s3_authentication_spec.rb +40 -0
- data/spec/models/s3_file_sync_input_spec.rb +6 -0
- data/spec/models/salesforce_authentication_spec.rb +46 -0
- data/spec/models/sharepoint_authentication_spec.rb +52 -0
- data/spec/models/simple_o_auth_data_sources_spec.rb +22 -0
- data/spec/models/sync_options_spec.rb +82 -0
- data/spec/models/zendesk_authentication_spec.rb +40 -0
- data/spec/models/zotero_authentication_spec.rb +52 -0
- metadata +50 -2
@@ -16,6 +16,102 @@ module Carbon
|
|
16
16
|
@api_client = api_client
|
17
17
|
end
|
18
18
|
|
19
|
+
# Connect Data Source
|
20
|
+
#
|
21
|
+
# @param authentication [AuthenticationProperty]
|
22
|
+
# @param sync_options [SyncOptions]
|
23
|
+
# @param body [ConnectDataSourceInput]
|
24
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
25
|
+
def connect_data_source(authentication:, sync_options: SENTINEL, extra: {})
|
26
|
+
_body = {}
|
27
|
+
_body[:authentication] = authentication if authentication != SENTINEL
|
28
|
+
_body[:sync_options] = sync_options if sync_options != SENTINEL
|
29
|
+
connect_data_source_input = _body
|
30
|
+
api_response = connect_data_source_with_http_info_impl(connect_data_source_input, extra)
|
31
|
+
api_response.data
|
32
|
+
end
|
33
|
+
|
34
|
+
# Connect Data Source
|
35
|
+
#
|
36
|
+
# @param authentication [AuthenticationProperty]
|
37
|
+
# @param sync_options [SyncOptions]
|
38
|
+
# @param body [ConnectDataSourceInput]
|
39
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
40
|
+
def connect_data_source_with_http_info(authentication:, sync_options: SENTINEL, extra: {})
|
41
|
+
_body = {}
|
42
|
+
_body[:authentication] = authentication if authentication != SENTINEL
|
43
|
+
_body[:sync_options] = sync_options if sync_options != SENTINEL
|
44
|
+
connect_data_source_input = _body
|
45
|
+
connect_data_source_with_http_info_impl(connect_data_source_input, extra)
|
46
|
+
end
|
47
|
+
|
48
|
+
# Connect Data Source
|
49
|
+
# @param connect_data_source_input [ConnectDataSourceInput]
|
50
|
+
# @param [Hash] opts the optional parameters
|
51
|
+
# @return [ConnectDataSourceResponse]
|
52
|
+
private def connect_data_source_impl(connect_data_source_input, opts = {})
|
53
|
+
data, _status_code, _headers = connect_data_source_with_http_info(connect_data_source_input, opts)
|
54
|
+
data
|
55
|
+
end
|
56
|
+
|
57
|
+
# Connect Data Source
|
58
|
+
# @param connect_data_source_input [ConnectDataSourceInput]
|
59
|
+
# @param [Hash] opts the optional parameters
|
60
|
+
# @return [APIResponse] data is ConnectDataSourceResponse, status code, headers and response
|
61
|
+
private def connect_data_source_with_http_info_impl(connect_data_source_input, opts = {})
|
62
|
+
if @api_client.config.debugging
|
63
|
+
@api_client.config.logger.debug 'Calling API: IntegrationsApi.connect_data_source ...'
|
64
|
+
end
|
65
|
+
# verify the required parameter 'connect_data_source_input' is set
|
66
|
+
if @api_client.config.client_side_validation && connect_data_source_input.nil?
|
67
|
+
fail ArgumentError, "Missing the required parameter 'connect_data_source_input' when calling IntegrationsApi.connect_data_source"
|
68
|
+
end
|
69
|
+
# resource path
|
70
|
+
local_var_path = '/integrations/connect'
|
71
|
+
|
72
|
+
# query parameters
|
73
|
+
query_params = opts[:query_params] || {}
|
74
|
+
|
75
|
+
# header parameters
|
76
|
+
header_params = opts[:header_params] || {}
|
77
|
+
# HTTP header 'Accept' (if needed)
|
78
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
79
|
+
# HTTP header 'Content-Type'
|
80
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
81
|
+
if !content_type.nil?
|
82
|
+
header_params['Content-Type'] = content_type
|
83
|
+
end
|
84
|
+
|
85
|
+
# form parameters
|
86
|
+
form_params = opts[:form_params] || {}
|
87
|
+
|
88
|
+
# http body (model)
|
89
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(connect_data_source_input)
|
90
|
+
|
91
|
+
# return_type
|
92
|
+
return_type = opts[:debug_return_type] || 'ConnectDataSourceResponse'
|
93
|
+
|
94
|
+
# auth_names
|
95
|
+
auth_names = opts[:debug_auth_names] || ['accessToken', 'apiKey', 'customerId']
|
96
|
+
|
97
|
+
new_options = opts.merge(
|
98
|
+
:operation => :"IntegrationsApi.connect_data_source",
|
99
|
+
:header_params => header_params,
|
100
|
+
:query_params => query_params,
|
101
|
+
:form_params => form_params,
|
102
|
+
:body => post_body,
|
103
|
+
:auth_names => auth_names,
|
104
|
+
:return_type => return_type
|
105
|
+
)
|
106
|
+
|
107
|
+
data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
|
108
|
+
if @api_client.config.debugging
|
109
|
+
@api_client.config.logger.debug "API called: IntegrationsApi#connect_data_source\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
110
|
+
end
|
111
|
+
APIResponse::new(data, status_code, headers, response)
|
112
|
+
end
|
113
|
+
|
114
|
+
|
19
115
|
# Freshdesk Connect
|
20
116
|
#
|
21
117
|
# Refer this article to obtain an API key https://support.freshdesk.com/en/support/solutions/articles/215517.
|
@@ -414,6 +510,11 @@ module Carbon
|
|
414
510
|
|
415
511
|
# Get Oauth Url
|
416
512
|
#
|
513
|
+
# This endpoint can be used to generate the following URLs
|
514
|
+
# - An OAuth URL for OAuth based connectors
|
515
|
+
# - A file syncing URL which skips the OAuth flow if the user already has a valid access token and takes them to the
|
516
|
+
# success state.
|
517
|
+
#
|
417
518
|
# @param service [DataSourceType]
|
418
519
|
# @param tags [Object]
|
419
520
|
# @param scope [String]
|
@@ -429,11 +530,13 @@ module Carbon
|
|
429
530
|
# @param prepend_filename_to_chunks [Boolean]
|
430
531
|
# @param max_items_per_chunk [Integer]
|
431
532
|
# @param salesforce_domain [String]
|
432
|
-
# @param sync_files_on_connection [Boolean]
|
533
|
+
# @param sync_files_on_connection [Boolean] Used to specify whether Carbon should attempt to sync all your files automatically when authorization is complete. This is only supported for a subset of connectors and will be ignored for the rest. Supported connectors: Intercom, Zendesk, Gitbook, Confluence, Salesforce, Freshdesk
|
433
534
|
# @param set_page_as_boundary [Boolean]
|
535
|
+
# @param data_source_id [Integer] Used to specify a data source to sync from if you have multiple connected. It can be skipped if you only have one data source of that type connected or are connecting a new account.
|
536
|
+
# @param connecting_new_account [Boolean] Used to connect a new data source. If not specified, we will attempt to create a sync URL for an existing data source based on type and ID.
|
434
537
|
# @param body [OAuthURLRequest]
|
435
538
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
436
|
-
def get_oauth_url(service:, tags: SENTINEL, scope: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', zendesk_subdomain: SENTINEL, microsoft_tenant: SENTINEL, sharepoint_site_name: SENTINEL, confluence_subdomain: SENTINEL, generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, salesforce_domain: SENTINEL, sync_files_on_connection: true, set_page_as_boundary: false, extra: {})
|
539
|
+
def get_oauth_url(service:, tags: SENTINEL, scope: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', zendesk_subdomain: SENTINEL, microsoft_tenant: SENTINEL, sharepoint_site_name: SENTINEL, confluence_subdomain: SENTINEL, generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, salesforce_domain: SENTINEL, sync_files_on_connection: true, set_page_as_boundary: false, data_source_id: SENTINEL, connecting_new_account: false, extra: {})
|
437
540
|
_body = {}
|
438
541
|
_body[:tags] = tags if tags != SENTINEL
|
439
542
|
_body[:scope] = scope if scope != SENTINEL
|
@@ -452,6 +555,8 @@ module Carbon
|
|
452
555
|
_body[:salesforce_domain] = salesforce_domain if salesforce_domain != SENTINEL
|
453
556
|
_body[:sync_files_on_connection] = sync_files_on_connection if sync_files_on_connection != SENTINEL
|
454
557
|
_body[:set_page_as_boundary] = set_page_as_boundary if set_page_as_boundary != SENTINEL
|
558
|
+
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
559
|
+
_body[:connecting_new_account] = connecting_new_account if connecting_new_account != SENTINEL
|
455
560
|
o_auth_url_request = _body
|
456
561
|
api_response = get_oauth_url_with_http_info_impl(o_auth_url_request, extra)
|
457
562
|
api_response.data
|
@@ -459,6 +564,11 @@ module Carbon
|
|
459
564
|
|
460
565
|
# Get Oauth Url
|
461
566
|
#
|
567
|
+
# This endpoint can be used to generate the following URLs
|
568
|
+
# - An OAuth URL for OAuth based connectors
|
569
|
+
# - A file syncing URL which skips the OAuth flow if the user already has a valid access token and takes them to the
|
570
|
+
# success state.
|
571
|
+
#
|
462
572
|
# @param service [DataSourceType]
|
463
573
|
# @param tags [Object]
|
464
574
|
# @param scope [String]
|
@@ -474,11 +584,13 @@ module Carbon
|
|
474
584
|
# @param prepend_filename_to_chunks [Boolean]
|
475
585
|
# @param max_items_per_chunk [Integer]
|
476
586
|
# @param salesforce_domain [String]
|
477
|
-
# @param sync_files_on_connection [Boolean]
|
587
|
+
# @param sync_files_on_connection [Boolean] Used to specify whether Carbon should attempt to sync all your files automatically when authorization is complete. This is only supported for a subset of connectors and will be ignored for the rest. Supported connectors: Intercom, Zendesk, Gitbook, Confluence, Salesforce, Freshdesk
|
478
588
|
# @param set_page_as_boundary [Boolean]
|
589
|
+
# @param data_source_id [Integer] Used to specify a data source to sync from if you have multiple connected. It can be skipped if you only have one data source of that type connected or are connecting a new account.
|
590
|
+
# @param connecting_new_account [Boolean] Used to connect a new data source. If not specified, we will attempt to create a sync URL for an existing data source based on type and ID.
|
479
591
|
# @param body [OAuthURLRequest]
|
480
592
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
481
|
-
def get_oauth_url_with_http_info(service:, tags: SENTINEL, scope: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', zendesk_subdomain: SENTINEL, microsoft_tenant: SENTINEL, sharepoint_site_name: SENTINEL, confluence_subdomain: SENTINEL, generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, salesforce_domain: SENTINEL, sync_files_on_connection: true, set_page_as_boundary: false, extra: {})
|
593
|
+
def get_oauth_url_with_http_info(service:, tags: SENTINEL, scope: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', zendesk_subdomain: SENTINEL, microsoft_tenant: SENTINEL, sharepoint_site_name: SENTINEL, confluence_subdomain: SENTINEL, generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, salesforce_domain: SENTINEL, sync_files_on_connection: true, set_page_as_boundary: false, data_source_id: SENTINEL, connecting_new_account: false, extra: {})
|
482
594
|
_body = {}
|
483
595
|
_body[:tags] = tags if tags != SENTINEL
|
484
596
|
_body[:scope] = scope if scope != SENTINEL
|
@@ -497,23 +609,27 @@ module Carbon
|
|
497
609
|
_body[:salesforce_domain] = salesforce_domain if salesforce_domain != SENTINEL
|
498
610
|
_body[:sync_files_on_connection] = sync_files_on_connection if sync_files_on_connection != SENTINEL
|
499
611
|
_body[:set_page_as_boundary] = set_page_as_boundary if set_page_as_boundary != SENTINEL
|
612
|
+
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
613
|
+
_body[:connecting_new_account] = connecting_new_account if connecting_new_account != SENTINEL
|
500
614
|
o_auth_url_request = _body
|
501
615
|
get_oauth_url_with_http_info_impl(o_auth_url_request, extra)
|
502
616
|
end
|
503
617
|
|
504
618
|
# Get Oauth Url
|
619
|
+
# This endpoint can be used to generate the following URLs - An OAuth URL for OAuth based connectors - A file syncing URL which skips the OAuth flow if the user already has a valid access token and takes them to the success state.
|
505
620
|
# @param o_auth_url_request [OAuthURLRequest]
|
506
621
|
# @param [Hash] opts the optional parameters
|
507
|
-
# @return [
|
622
|
+
# @return [OuthURLResponse]
|
508
623
|
private def get_oauth_url_impl(o_auth_url_request, opts = {})
|
509
624
|
data, _status_code, _headers = get_oauth_url_with_http_info(o_auth_url_request, opts)
|
510
625
|
data
|
511
626
|
end
|
512
627
|
|
513
628
|
# Get Oauth Url
|
629
|
+
# This endpoint can be used to generate the following URLs - An OAuth URL for OAuth based connectors - A file syncing URL which skips the OAuth flow if the user already has a valid access token and takes them to the success state.
|
514
630
|
# @param o_auth_url_request [OAuthURLRequest]
|
515
631
|
# @param [Hash] opts the optional parameters
|
516
|
-
# @return [APIResponse] data is
|
632
|
+
# @return [APIResponse] data is OuthURLResponse, status code, headers and response
|
517
633
|
private def get_oauth_url_with_http_info_impl(o_auth_url_request, opts = {})
|
518
634
|
if @api_client.config.debugging
|
519
635
|
@api_client.config.logger.debug 'Calling API: IntegrationsApi.get_oauth_url ...'
|
@@ -545,7 +661,7 @@ module Carbon
|
|
545
661
|
post_body = opts[:debug_body] || @api_client.object_to_http_body(o_auth_url_request)
|
546
662
|
|
547
663
|
# return_type
|
548
|
-
return_type = opts[:debug_return_type] || '
|
664
|
+
return_type = opts[:debug_return_type] || 'OuthURLResponse'
|
549
665
|
|
550
666
|
# auth_names
|
551
667
|
auth_names = opts[:debug_auth_names] || ['accessToken', 'apiKey', 'customerId']
|
@@ -787,8 +903,10 @@ module Carbon
|
|
787
903
|
# After connecting your Outlook account, you can use this endpoint to list all of your folders on outlook. This includes
|
788
904
|
# both system folders like "inbox" and user created folders.
|
789
905
|
#
|
906
|
+
# @param data_source_id [Integer]
|
790
907
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
791
|
-
def list_folders(extra: {})
|
908
|
+
def list_folders(data_source_id: SENTINEL, extra: {})
|
909
|
+
extra[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
792
910
|
api_response = list_folders_with_http_info_impl(extra)
|
793
911
|
api_response.data
|
794
912
|
end
|
@@ -798,14 +916,17 @@ module Carbon
|
|
798
916
|
# After connecting your Outlook account, you can use this endpoint to list all of your folders on outlook. This includes
|
799
917
|
# both system folders like "inbox" and user created folders.
|
800
918
|
#
|
919
|
+
# @param data_source_id [Integer]
|
801
920
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
802
|
-
def list_folders_with_http_info(extra: {})
|
921
|
+
def list_folders_with_http_info(data_source_id: SENTINEL, extra: {})
|
922
|
+
extra[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
803
923
|
list_folders_with_http_info_impl(extra)
|
804
924
|
end
|
805
925
|
|
806
926
|
# Outlook Folders
|
807
927
|
# 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.
|
808
928
|
# @param [Hash] opts the optional parameters
|
929
|
+
# @option opts [Integer] :data_source_id
|
809
930
|
# @return [Object]
|
810
931
|
private def list_folders_impl(opts = {})
|
811
932
|
data, _status_code, _headers = list_folders_with_http_info(opts)
|
@@ -815,6 +936,7 @@ module Carbon
|
|
815
936
|
# Outlook Folders
|
816
937
|
# 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.
|
817
938
|
# @param [Hash] opts the optional parameters
|
939
|
+
# @option opts [Integer] :data_source_id
|
818
940
|
# @return [APIResponse] data is Object, status code, headers and response
|
819
941
|
private def list_folders_with_http_info_impl(opts = {})
|
820
942
|
if @api_client.config.debugging
|
@@ -825,6 +947,7 @@ module Carbon
|
|
825
947
|
|
826
948
|
# query parameters
|
827
949
|
query_params = opts[:query_params] || {}
|
950
|
+
query_params[:'data_source_id'] = opts[:'data_source_id'] if !opts[:'data_source_id'].nil?
|
828
951
|
|
829
952
|
# header parameters
|
830
953
|
header_params = opts[:header_params] || {}
|
@@ -952,8 +1075,10 @@ module Carbon
|
|
952
1075
|
# After connecting your Gmail account, you can use this endpoint to list all of your labels. User created labels
|
953
1076
|
# will have the type "user" and Gmail's default labels will have the type "system"
|
954
1077
|
#
|
1078
|
+
# @param data_source_id [Integer]
|
955
1079
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
956
|
-
def list_labels(extra: {})
|
1080
|
+
def list_labels(data_source_id: SENTINEL, extra: {})
|
1081
|
+
extra[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
957
1082
|
api_response = list_labels_with_http_info_impl(extra)
|
958
1083
|
api_response.data
|
959
1084
|
end
|
@@ -963,14 +1088,17 @@ module Carbon
|
|
963
1088
|
# After connecting your Gmail account, you can use this endpoint to list all of your labels. User created labels
|
964
1089
|
# will have the type "user" and Gmail's default labels will have the type "system"
|
965
1090
|
#
|
1091
|
+
# @param data_source_id [Integer]
|
966
1092
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
967
|
-
def list_labels_with_http_info(extra: {})
|
1093
|
+
def list_labels_with_http_info(data_source_id: SENTINEL, extra: {})
|
1094
|
+
extra[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
968
1095
|
list_labels_with_http_info_impl(extra)
|
969
1096
|
end
|
970
1097
|
|
971
1098
|
# Gmail Labels
|
972
1099
|
# 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\"
|
973
1100
|
# @param [Hash] opts the optional parameters
|
1101
|
+
# @option opts [Integer] :data_source_id
|
974
1102
|
# @return [Object]
|
975
1103
|
private def list_labels_impl(opts = {})
|
976
1104
|
data, _status_code, _headers = list_labels_with_http_info(opts)
|
@@ -980,6 +1108,7 @@ module Carbon
|
|
980
1108
|
# Gmail Labels
|
981
1109
|
# 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\"
|
982
1110
|
# @param [Hash] opts the optional parameters
|
1111
|
+
# @option opts [Integer] :data_source_id
|
983
1112
|
# @return [APIResponse] data is Object, status code, headers and response
|
984
1113
|
private def list_labels_with_http_info_impl(opts = {})
|
985
1114
|
if @api_client.config.debugging
|
@@ -990,6 +1119,7 @@ module Carbon
|
|
990
1119
|
|
991
1120
|
# query parameters
|
992
1121
|
query_params = opts[:query_params] || {}
|
1122
|
+
query_params[:'data_source_id'] = opts[:'data_source_id'] if !opts[:'data_source_id'].nil?
|
993
1123
|
|
994
1124
|
# header parameters
|
995
1125
|
header_params = opts[:header_params] || {}
|
@@ -1031,8 +1161,10 @@ module Carbon
|
|
1031
1161
|
# After connecting your Outlook account, you can use this endpoint to list all of your categories on outlook. We currently
|
1032
1162
|
# support listing up to 250 categories.
|
1033
1163
|
#
|
1164
|
+
# @param data_source_id [Integer]
|
1034
1165
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1035
|
-
def list_outlook_categories(extra: {})
|
1166
|
+
def list_outlook_categories(data_source_id: SENTINEL, extra: {})
|
1167
|
+
extra[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
1036
1168
|
api_response = list_outlook_categories_with_http_info_impl(extra)
|
1037
1169
|
api_response.data
|
1038
1170
|
end
|
@@ -1042,14 +1174,17 @@ module Carbon
|
|
1042
1174
|
# After connecting your Outlook account, you can use this endpoint to list all of your categories on outlook. We currently
|
1043
1175
|
# support listing up to 250 categories.
|
1044
1176
|
#
|
1177
|
+
# @param data_source_id [Integer]
|
1045
1178
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1046
|
-
def list_outlook_categories_with_http_info(extra: {})
|
1179
|
+
def list_outlook_categories_with_http_info(data_source_id: SENTINEL, extra: {})
|
1180
|
+
extra[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
1047
1181
|
list_outlook_categories_with_http_info_impl(extra)
|
1048
1182
|
end
|
1049
1183
|
|
1050
1184
|
# Outlook Categories
|
1051
1185
|
# After connecting your Outlook account, you can use this endpoint to list all of your categories on outlook. We currently support listing up to 250 categories.
|
1052
1186
|
# @param [Hash] opts the optional parameters
|
1187
|
+
# @option opts [Integer] :data_source_id
|
1053
1188
|
# @return [Object]
|
1054
1189
|
private def list_outlook_categories_impl(opts = {})
|
1055
1190
|
data, _status_code, _headers = list_outlook_categories_with_http_info(opts)
|
@@ -1059,6 +1194,7 @@ module Carbon
|
|
1059
1194
|
# Outlook Categories
|
1060
1195
|
# After connecting your Outlook account, you can use this endpoint to list all of your categories on outlook. We currently support listing up to 250 categories.
|
1061
1196
|
# @param [Hash] opts the optional parameters
|
1197
|
+
# @option opts [Integer] :data_source_id
|
1062
1198
|
# @return [APIResponse] data is Object, status code, headers and response
|
1063
1199
|
private def list_outlook_categories_with_http_info_impl(opts = {})
|
1064
1200
|
if @api_client.config.debugging
|
@@ -1069,6 +1205,7 @@ module Carbon
|
|
1069
1205
|
|
1070
1206
|
# query parameters
|
1071
1207
|
query_params = opts[:query_params] || {}
|
1208
|
+
query_params[:'data_source_id'] = opts[:'data_source_id'] if !opts[:'data_source_id'].nil?
|
1072
1209
|
|
1073
1210
|
# header parameters
|
1074
1211
|
header_params = opts[:header_params] || {}
|
@@ -1678,9 +1815,10 @@ module Carbon
|
|
1678
1815
|
# @param embedding_model [EmbeddingGenerators]
|
1679
1816
|
# @param generate_sparse_vectors [Boolean]
|
1680
1817
|
# @param prepend_filename_to_chunks [Boolean]
|
1818
|
+
# @param data_source_id [Integer]
|
1681
1819
|
# @param body [GmailSyncInput]
|
1682
1820
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1683
|
-
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: {})
|
1821
|
+
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, data_source_id: SENTINEL, extra: {})
|
1684
1822
|
_body = {}
|
1685
1823
|
_body[:tags] = tags if tags != SENTINEL
|
1686
1824
|
_body[:filters] = filters if filters != SENTINEL
|
@@ -1690,6 +1828,7 @@ module Carbon
|
|
1690
1828
|
_body[:embedding_model] = embedding_model if embedding_model != SENTINEL
|
1691
1829
|
_body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
|
1692
1830
|
_body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
|
1831
|
+
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
1693
1832
|
gmail_sync_input = _body
|
1694
1833
|
api_response = sync_gmail_with_http_info_impl(gmail_sync_input, extra)
|
1695
1834
|
api_response.data
|
@@ -1756,9 +1895,10 @@ module Carbon
|
|
1756
1895
|
# @param embedding_model [EmbeddingGenerators]
|
1757
1896
|
# @param generate_sparse_vectors [Boolean]
|
1758
1897
|
# @param prepend_filename_to_chunks [Boolean]
|
1898
|
+
# @param data_source_id [Integer]
|
1759
1899
|
# @param body [GmailSyncInput]
|
1760
1900
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1761
|
-
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: {})
|
1901
|
+
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, data_source_id: SENTINEL, extra: {})
|
1762
1902
|
_body = {}
|
1763
1903
|
_body[:tags] = tags if tags != SENTINEL
|
1764
1904
|
_body[:filters] = filters if filters != SENTINEL
|
@@ -1768,6 +1908,7 @@ module Carbon
|
|
1768
1908
|
_body[:embedding_model] = embedding_model if embedding_model != SENTINEL
|
1769
1909
|
_body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
|
1770
1910
|
_body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
|
1911
|
+
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
1771
1912
|
gmail_sync_input = _body
|
1772
1913
|
sync_gmail_with_http_info_impl(gmail_sync_input, extra)
|
1773
1914
|
end
|
@@ -1913,9 +2054,10 @@ module Carbon
|
|
1913
2054
|
# @param embedding_model [EmbeddingGenerators]
|
1914
2055
|
# @param generate_sparse_vectors [Boolean]
|
1915
2056
|
# @param prepend_filename_to_chunks [Boolean]
|
2057
|
+
# @param data_source_id [Integer]
|
1916
2058
|
# @param body [OutlookSyncInput]
|
1917
2059
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1918
|
-
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: {})
|
2060
|
+
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, data_source_id: SENTINEL, extra: {})
|
1919
2061
|
_body = {}
|
1920
2062
|
_body[:tags] = tags if tags != SENTINEL
|
1921
2063
|
_body[:folder] = folder if folder != SENTINEL
|
@@ -1926,6 +2068,7 @@ module Carbon
|
|
1926
2068
|
_body[:embedding_model] = embedding_model if embedding_model != SENTINEL
|
1927
2069
|
_body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
|
1928
2070
|
_body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
|
2071
|
+
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
1929
2072
|
outlook_sync_input = _body
|
1930
2073
|
api_response = sync_outlook_with_http_info_impl(outlook_sync_input, extra)
|
1931
2074
|
api_response.data
|
@@ -2003,9 +2146,10 @@ module Carbon
|
|
2003
2146
|
# @param embedding_model [EmbeddingGenerators]
|
2004
2147
|
# @param generate_sparse_vectors [Boolean]
|
2005
2148
|
# @param prepend_filename_to_chunks [Boolean]
|
2149
|
+
# @param data_source_id [Integer]
|
2006
2150
|
# @param body [OutlookSyncInput]
|
2007
2151
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
2008
|
-
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: {})
|
2152
|
+
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, data_source_id: SENTINEL, extra: {})
|
2009
2153
|
_body = {}
|
2010
2154
|
_body[:tags] = tags if tags != SENTINEL
|
2011
2155
|
_body[:folder] = folder if folder != SENTINEL
|
@@ -2016,6 +2160,7 @@ module Carbon
|
|
2016
2160
|
_body[:embedding_model] = embedding_model if embedding_model != SENTINEL
|
2017
2161
|
_body[:generate_sparse_vectors] = generate_sparse_vectors if generate_sparse_vectors != SENTINEL
|
2018
2162
|
_body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
|
2163
|
+
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
2019
2164
|
outlook_sync_input = _body
|
2020
2165
|
sync_outlook_with_http_info_impl(outlook_sync_input, extra)
|
2021
2166
|
end
|
@@ -2225,9 +2370,10 @@ module Carbon
|
|
2225
2370
|
# @param prepend_filename_to_chunks [Boolean]
|
2226
2371
|
# @param max_items_per_chunk [Integer]
|
2227
2372
|
# @param set_page_as_boundary [Boolean]
|
2373
|
+
# @param data_source_id [Integer]
|
2228
2374
|
# @param body [S3FileSyncInput]
|
2229
2375
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
2230
|
-
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, set_page_as_boundary: false, extra: {})
|
2376
|
+
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, set_page_as_boundary: false, data_source_id: SENTINEL, extra: {})
|
2231
2377
|
_body = {}
|
2232
2378
|
_body[:tags] = tags if tags != SENTINEL
|
2233
2379
|
_body[:ids] = ids if ids != SENTINEL
|
@@ -2239,6 +2385,7 @@ module Carbon
|
|
2239
2385
|
_body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
|
2240
2386
|
_body[:max_items_per_chunk] = max_items_per_chunk if max_items_per_chunk != SENTINEL
|
2241
2387
|
_body[:set_page_as_boundary] = set_page_as_boundary if set_page_as_boundary != SENTINEL
|
2388
|
+
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
2242
2389
|
s3_file_sync_input = _body
|
2243
2390
|
api_response = sync_s3_files_with_http_info_impl(s3_file_sync_input, extra)
|
2244
2391
|
api_response.data
|
@@ -2260,9 +2407,10 @@ module Carbon
|
|
2260
2407
|
# @param prepend_filename_to_chunks [Boolean]
|
2261
2408
|
# @param max_items_per_chunk [Integer]
|
2262
2409
|
# @param set_page_as_boundary [Boolean]
|
2410
|
+
# @param data_source_id [Integer]
|
2263
2411
|
# @param body [S3FileSyncInput]
|
2264
2412
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
2265
|
-
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, set_page_as_boundary: false, extra: {})
|
2413
|
+
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, set_page_as_boundary: false, data_source_id: SENTINEL, extra: {})
|
2266
2414
|
_body = {}
|
2267
2415
|
_body[:tags] = tags if tags != SENTINEL
|
2268
2416
|
_body[:ids] = ids if ids != SENTINEL
|
@@ -2274,6 +2422,7 @@ module Carbon
|
|
2274
2422
|
_body[:prepend_filename_to_chunks] = prepend_filename_to_chunks if prepend_filename_to_chunks != SENTINEL
|
2275
2423
|
_body[:max_items_per_chunk] = max_items_per_chunk if max_items_per_chunk != SENTINEL
|
2276
2424
|
_body[:set_page_as_boundary] = set_page_as_boundary if set_page_as_boundary != SENTINEL
|
2425
|
+
_body[:data_source_id] = data_source_id if data_source_id != SENTINEL
|
2277
2426
|
s3_file_sync_input = _body
|
2278
2427
|
sync_s3_files_with_http_info_impl(s3_file_sync_input, extra)
|
2279
2428
|
end
|