carbon_ruby_sdk 0.2.30 → 0.2.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/README.md +9 -3
- data/lib/carbon_ruby_sdk/api/integrations_api.rb +8 -4
- data/lib/carbon_ruby_sdk/models/authentication_property.rb +19 -4
- data/lib/carbon_ruby_sdk/models/data_source_type.rb +2 -1
- data/lib/carbon_ruby_sdk/models/data_source_type_nullable.rb +2 -1
- data/lib/carbon_ruby_sdk/models/file_formats.rb +2 -1
- data/lib/carbon_ruby_sdk/models/file_formats_nullable.rb +2 -1
- data/lib/carbon_ruby_sdk/models/gong_authentication.rb +254 -0
- data/lib/carbon_ruby_sdk/models/o_auth_url_request.rb +13 -2
- data/lib/carbon_ruby_sdk/models/{external_data_source_type.rb → oauth_based_connectors.rb} +5 -4
- data/lib/carbon_ruby_sdk/version.rb +1 -1
- data/lib/carbon_ruby_sdk.rb +2 -1
- data/spec/models/authentication_property_spec.rb +6 -0
- data/spec/models/gong_authentication_spec.rb +46 -0
- data/spec/models/o_auth_url_request_spec.rb +6 -0
- data/spec/models/oauth_based_connectors_spec.rb +22 -0
- metadata +8 -5
- data/spec/models/external_data_source_type_spec.rb +0 -22
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1939099e2521b3ce6cd543619658ed58f1faa33ce3a130183c5c974f35a000e4
|
|
4
|
+
data.tar.gz: 4573715a75b4ac334b788ff4a2d3750d04ec01a488daa01d5581d36c1d61ae1d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e97681a4f7458e062ac3c13f822d359ddd5096b9f8982ec81d6ceb19374f33ca6c906df6cedcd4794c4e57f91827de14a8b03de4575373e925c632cd3a686505
|
|
7
|
+
data.tar.gz: 0d2a1f1704620c3e481c11f7f124dcf4f08df5a40cd59c43890e1f504076376faeec18acd31a7ae508975619d6fcfdf5a70b6521ebb00cf160b5152b8a7f9efa
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
carbon_ruby_sdk (0.2.
|
|
4
|
+
carbon_ruby_sdk (0.2.31)
|
|
5
5
|
faraday (>= 1.0.1, < 3.0)
|
|
6
6
|
faraday-multipart (~> 1.0, >= 1.0.4)
|
|
7
7
|
|
|
@@ -42,7 +42,7 @@ GEM
|
|
|
42
42
|
rainbow (3.1.1)
|
|
43
43
|
rake (13.0.6)
|
|
44
44
|
regexp_parser (2.9.2)
|
|
45
|
-
reline (0.5.
|
|
45
|
+
reline (0.5.10)
|
|
46
46
|
io-console (~> 0.5)
|
|
47
47
|
rexml (3.3.7)
|
|
48
48
|
rspec (3.13.0)
|
|
@@ -51,7 +51,7 @@ GEM
|
|
|
51
51
|
rspec-mocks (~> 3.13.0)
|
|
52
52
|
rspec-core (3.13.1)
|
|
53
53
|
rspec-support (~> 3.13.0)
|
|
54
|
-
rspec-expectations (3.13.
|
|
54
|
+
rspec-expectations (3.13.3)
|
|
55
55
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
56
56
|
rspec-support (~> 3.13.0)
|
|
57
57
|
rspec-mocks (3.13.1)
|
data/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
Connect external data to LLMs, no matter the source.
|
|
8
8
|
|
|
9
|
-
[](https://rubygems.org/gems/carbon_ruby_sdk/versions/0.2.31)
|
|
10
10
|
|
|
11
11
|
</div>
|
|
12
12
|
|
|
@@ -94,7 +94,7 @@ Connect external data to LLMs, no matter the source.
|
|
|
94
94
|
Add to Gemfile:
|
|
95
95
|
|
|
96
96
|
```ruby
|
|
97
|
-
gem 'carbon_ruby_sdk', '~> 0.2.
|
|
97
|
+
gem 'carbon_ruby_sdk', '~> 0.2.31'
|
|
98
98
|
```
|
|
99
99
|
|
|
100
100
|
## Getting Started<a id="getting-started"></a>
|
|
@@ -1734,6 +1734,7 @@ result = carbon.integrations.get_oauth_url(
|
|
|
1734
1734
|
"generate_chunks_only" => false,
|
|
1735
1735
|
},
|
|
1736
1736
|
automatically_open_file_picker: true,
|
|
1737
|
+
gong_account_email: "string_example",
|
|
1737
1738
|
servicenow_credentials: {
|
|
1738
1739
|
"instance_subdomain" => "instance_subdomain_example",
|
|
1739
1740
|
"client_id" => "client_id_example",
|
|
@@ -1746,7 +1747,7 @@ p result
|
|
|
1746
1747
|
|
|
1747
1748
|
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
|
1748
1749
|
|
|
1749
|
-
##### service: [`
|
|
1750
|
+
##### service: [`OauthBasedConnectors`](./lib/carbon_ruby_sdk/models/oauth_based_connectors.rb)<a id="service-oauthbasedconnectorslibcarbon_ruby_sdkmodelsoauth_based_connectorsrb"></a>
|
|
1750
1751
|
##### tags: `Object`<a id="tags-object"></a>
|
|
1751
1752
|
##### scope: `String`<a id="scope-string"></a>
|
|
1752
1753
|
##### chunk_size: `Integer`<a id="chunk_size-integer"></a>
|
|
@@ -1807,6 +1808,11 @@ Automatically open source file picker after the OAuth flow is complete. This
|
|
|
1807
1808
|
flag is currently supported by BOX, DROPBOX, GOOGLE_DRIVE, ONEDRIVE, SHAREPOINT.
|
|
1808
1809
|
It will be ignored for other data sources.
|
|
1809
1810
|
|
|
1811
|
+
##### gong_account_email: `String`<a id="gong_account_email-string"></a>
|
|
1812
|
+
If you are connecting a Gong account, you need to input the email of the account
|
|
1813
|
+
you wish to connect. This email will be used to identify your carbon data
|
|
1814
|
+
source.
|
|
1815
|
+
|
|
1810
1816
|
##### servicenow_credentials: [`ServiceNowCredentialsNullable`](./lib/carbon_ruby_sdk/models/service_now_credentials_nullable.rb)<a id="servicenow_credentials-servicenowcredentialsnullablelibcarbon_ruby_sdkmodelsservice_now_credentials_nullablerb"></a>
|
|
1811
1817
|
#### 🔄 Return<a id="🔄-return"></a>
|
|
1812
1818
|
|
|
@@ -789,7 +789,7 @@ module Carbon
|
|
|
789
789
|
# - A file syncing URL which skips the OAuth flow if the user already has a valid access token and takes them to the
|
|
790
790
|
# success state.
|
|
791
791
|
#
|
|
792
|
-
# @param service [
|
|
792
|
+
# @param service [OauthBasedConnectors]
|
|
793
793
|
# @param tags [Object]
|
|
794
794
|
# @param scope [String]
|
|
795
795
|
# @param chunk_size [Integer]
|
|
@@ -816,10 +816,11 @@ module Carbon
|
|
|
816
816
|
# @param incremental_sync [Boolean] Only sync files if they have not already been synced or if the embedding properties have changed. This flag is currently supported by ONEDRIVE, GOOGLE_DRIVE, BOX, DROPBOX, INTERCOM, GMAIL, OUTLOOK, ZENDESK, CONFLUENCE, NOTION, SHAREPOINT, SERVICENOW. It will be ignored for other data sources.
|
|
817
817
|
# @param file_sync_config [FileSyncConfigNullable]
|
|
818
818
|
# @param automatically_open_file_picker [Boolean] Automatically open source file picker after the OAuth flow is complete. This flag is currently supported by BOX, DROPBOX, GOOGLE_DRIVE, ONEDRIVE, SHAREPOINT. It will be ignored for other data sources.
|
|
819
|
+
# @param gong_account_email [String] If you are connecting a Gong account, you need to input the email of the account you wish to connect. This email will be used to identify your carbon data source.
|
|
819
820
|
# @param servicenow_credentials [ServiceNowCredentialsNullable]
|
|
820
821
|
# @param body [OAuthURLRequest]
|
|
821
822
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
|
822
|
-
def get_oauth_url(service:, tags: SENTINEL, scope: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', zendesk_subdomain: SENTINEL, microsoft_tenant: SENTINEL, sharepoint_site_name: SENTINEL, confluence_subdomain: SENTINEL, generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, salesforce_domain: SENTINEL, sync_files_on_connection: true, set_page_as_boundary: false, data_source_id: SENTINEL, connecting_new_account: false, request_id: SENTINEL, use_ocr: false, parse_pdf_tables_with_ocr: false, enable_file_picker: true, sync_source_items: true, incremental_sync: false, file_sync_config: SENTINEL, automatically_open_file_picker: SENTINEL, servicenow_credentials: SENTINEL, extra: {})
|
|
823
|
+
def get_oauth_url(service:, tags: SENTINEL, scope: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', zendesk_subdomain: SENTINEL, microsoft_tenant: SENTINEL, sharepoint_site_name: SENTINEL, confluence_subdomain: SENTINEL, generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, salesforce_domain: SENTINEL, sync_files_on_connection: true, set_page_as_boundary: false, data_source_id: SENTINEL, connecting_new_account: false, request_id: SENTINEL, use_ocr: false, parse_pdf_tables_with_ocr: false, enable_file_picker: true, sync_source_items: true, incremental_sync: false, file_sync_config: SENTINEL, automatically_open_file_picker: SENTINEL, gong_account_email: SENTINEL, servicenow_credentials: SENTINEL, extra: {})
|
|
823
824
|
_body = {}
|
|
824
825
|
_body[:tags] = tags if tags != SENTINEL
|
|
825
826
|
_body[:scope] = scope if scope != SENTINEL
|
|
@@ -848,6 +849,7 @@ module Carbon
|
|
|
848
849
|
_body[:incremental_sync] = incremental_sync if incremental_sync != SENTINEL
|
|
849
850
|
_body[:file_sync_config] = file_sync_config if file_sync_config != SENTINEL
|
|
850
851
|
_body[:automatically_open_file_picker] = automatically_open_file_picker if automatically_open_file_picker != SENTINEL
|
|
852
|
+
_body[:gong_account_email] = gong_account_email if gong_account_email != SENTINEL
|
|
851
853
|
_body[:servicenow_credentials] = servicenow_credentials if servicenow_credentials != SENTINEL
|
|
852
854
|
o_auth_url_request = _body
|
|
853
855
|
api_response = get_oauth_url_with_http_info_impl(o_auth_url_request, extra)
|
|
@@ -861,7 +863,7 @@ module Carbon
|
|
|
861
863
|
# - A file syncing URL which skips the OAuth flow if the user already has a valid access token and takes them to the
|
|
862
864
|
# success state.
|
|
863
865
|
#
|
|
864
|
-
# @param service [
|
|
866
|
+
# @param service [OauthBasedConnectors]
|
|
865
867
|
# @param tags [Object]
|
|
866
868
|
# @param scope [String]
|
|
867
869
|
# @param chunk_size [Integer]
|
|
@@ -888,10 +890,11 @@ module Carbon
|
|
|
888
890
|
# @param incremental_sync [Boolean] Only sync files if they have not already been synced or if the embedding properties have changed. This flag is currently supported by ONEDRIVE, GOOGLE_DRIVE, BOX, DROPBOX, INTERCOM, GMAIL, OUTLOOK, ZENDESK, CONFLUENCE, NOTION, SHAREPOINT, SERVICENOW. It will be ignored for other data sources.
|
|
889
891
|
# @param file_sync_config [FileSyncConfigNullable]
|
|
890
892
|
# @param automatically_open_file_picker [Boolean] Automatically open source file picker after the OAuth flow is complete. This flag is currently supported by BOX, DROPBOX, GOOGLE_DRIVE, ONEDRIVE, SHAREPOINT. It will be ignored for other data sources.
|
|
893
|
+
# @param gong_account_email [String] If you are connecting a Gong account, you need to input the email of the account you wish to connect. This email will be used to identify your carbon data source.
|
|
891
894
|
# @param servicenow_credentials [ServiceNowCredentialsNullable]
|
|
892
895
|
# @param body [OAuthURLRequest]
|
|
893
896
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
|
894
|
-
def get_oauth_url_with_http_info(service:, tags: SENTINEL, scope: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', zendesk_subdomain: SENTINEL, microsoft_tenant: SENTINEL, sharepoint_site_name: SENTINEL, confluence_subdomain: SENTINEL, generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, salesforce_domain: SENTINEL, sync_files_on_connection: true, set_page_as_boundary: false, data_source_id: SENTINEL, connecting_new_account: false, request_id: SENTINEL, use_ocr: false, parse_pdf_tables_with_ocr: false, enable_file_picker: true, sync_source_items: true, incremental_sync: false, file_sync_config: SENTINEL, automatically_open_file_picker: SENTINEL, servicenow_credentials: SENTINEL, extra: {})
|
|
897
|
+
def get_oauth_url_with_http_info(service:, tags: SENTINEL, scope: SENTINEL, chunk_size: 1500, chunk_overlap: 20, skip_embedding_generation: false, embedding_model: 'OPENAI', zendesk_subdomain: SENTINEL, microsoft_tenant: SENTINEL, sharepoint_site_name: SENTINEL, confluence_subdomain: SENTINEL, generate_sparse_vectors: false, prepend_filename_to_chunks: false, max_items_per_chunk: SENTINEL, salesforce_domain: SENTINEL, sync_files_on_connection: true, set_page_as_boundary: false, data_source_id: SENTINEL, connecting_new_account: false, request_id: SENTINEL, use_ocr: false, parse_pdf_tables_with_ocr: false, enable_file_picker: true, sync_source_items: true, incremental_sync: false, file_sync_config: SENTINEL, automatically_open_file_picker: SENTINEL, gong_account_email: SENTINEL, servicenow_credentials: SENTINEL, extra: {})
|
|
895
898
|
_body = {}
|
|
896
899
|
_body[:tags] = tags if tags != SENTINEL
|
|
897
900
|
_body[:scope] = scope if scope != SENTINEL
|
|
@@ -920,6 +923,7 @@ module Carbon
|
|
|
920
923
|
_body[:incremental_sync] = incremental_sync if incremental_sync != SENTINEL
|
|
921
924
|
_body[:file_sync_config] = file_sync_config if file_sync_config != SENTINEL
|
|
922
925
|
_body[:automatically_open_file_picker] = automatically_open_file_picker if automatically_open_file_picker != SENTINEL
|
|
926
|
+
_body[:gong_account_email] = gong_account_email if gong_account_email != SENTINEL
|
|
923
927
|
_body[:servicenow_credentials] = servicenow_credentials if servicenow_credentials != SENTINEL
|
|
924
928
|
o_auth_url_request = _body
|
|
925
929
|
get_oauth_url_with_http_info_impl(o_auth_url_request, extra)
|
|
@@ -52,6 +52,8 @@ module Carbon
|
|
|
52
52
|
|
|
53
53
|
attr_accessor :redirect_uri
|
|
54
54
|
|
|
55
|
+
attr_accessor :gong_account_email
|
|
56
|
+
|
|
55
57
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
56
58
|
def self.attribute_map
|
|
57
59
|
{
|
|
@@ -74,7 +76,8 @@ module Carbon
|
|
|
74
76
|
:'instance_subdomain' => :'instance_subdomain',
|
|
75
77
|
:'client_id' => :'client_id',
|
|
76
78
|
:'client_secret' => :'client_secret',
|
|
77
|
-
:'redirect_uri' => :'redirect_uri'
|
|
79
|
+
:'redirect_uri' => :'redirect_uri',
|
|
80
|
+
:'gong_account_email' => :'gong_account_email'
|
|
78
81
|
}
|
|
79
82
|
end
|
|
80
83
|
|
|
@@ -105,7 +108,8 @@ module Carbon
|
|
|
105
108
|
:'instance_subdomain' => :'String',
|
|
106
109
|
:'client_id' => :'String',
|
|
107
110
|
:'client_secret' => :'String',
|
|
108
|
-
:'redirect_uri' => :'String'
|
|
111
|
+
:'redirect_uri' => :'String',
|
|
112
|
+
:'gong_account_email' => :'String'
|
|
109
113
|
}
|
|
110
114
|
end
|
|
111
115
|
|
|
@@ -125,6 +129,7 @@ module Carbon
|
|
|
125
129
|
:'FreskdeskAuthentication',
|
|
126
130
|
:'GitbookAuthetication',
|
|
127
131
|
:'GithubAuthentication',
|
|
132
|
+
:'GongAuthentication',
|
|
128
133
|
:'GuruAuthentication',
|
|
129
134
|
:'NotionAuthentication',
|
|
130
135
|
:'OAuthAuthentication',
|
|
@@ -231,6 +236,10 @@ module Carbon
|
|
|
231
236
|
if attributes.key?(:'redirect_uri')
|
|
232
237
|
self.redirect_uri = attributes[:'redirect_uri']
|
|
233
238
|
end
|
|
239
|
+
|
|
240
|
+
if attributes.key?(:'gong_account_email')
|
|
241
|
+
self.gong_account_email = attributes[:'gong_account_email']
|
|
242
|
+
end
|
|
234
243
|
end
|
|
235
244
|
|
|
236
245
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -305,6 +314,10 @@ module Carbon
|
|
|
305
314
|
invalid_properties.push('invalid value for "redirect_uri", redirect_uri cannot be nil.')
|
|
306
315
|
end
|
|
307
316
|
|
|
317
|
+
if @gong_account_email.nil?
|
|
318
|
+
invalid_properties.push('invalid value for "gong_account_email", gong_account_email cannot be nil.')
|
|
319
|
+
end
|
|
320
|
+
|
|
308
321
|
invalid_properties
|
|
309
322
|
end
|
|
310
323
|
|
|
@@ -328,6 +341,7 @@ module Carbon
|
|
|
328
341
|
return false if @client_id.nil?
|
|
329
342
|
return false if @client_secret.nil?
|
|
330
343
|
return false if @redirect_uri.nil?
|
|
344
|
+
return false if @gong_account_email.nil?
|
|
331
345
|
_any_of_found = false
|
|
332
346
|
self.class.openapi_any_of.each do |_class|
|
|
333
347
|
_any_of = Carbon.const_get(_class).build_from_hash(self.to_hash)
|
|
@@ -367,7 +381,8 @@ module Carbon
|
|
|
367
381
|
instance_subdomain == o.instance_subdomain &&
|
|
368
382
|
client_id == o.client_id &&
|
|
369
383
|
client_secret == o.client_secret &&
|
|
370
|
-
redirect_uri == o.redirect_uri
|
|
384
|
+
redirect_uri == o.redirect_uri &&
|
|
385
|
+
gong_account_email == o.gong_account_email
|
|
371
386
|
end
|
|
372
387
|
|
|
373
388
|
# @see the `==` method
|
|
@@ -379,7 +394,7 @@ module Carbon
|
|
|
379
394
|
# Calculates hash code according to all attributes.
|
|
380
395
|
# @return [Integer] Hash code
|
|
381
396
|
def hash
|
|
382
|
-
[source, access_token, refresh_token, workspace_id, tenant_name, site_name, subdomain, access_token_secret, username, zotero_id, organization_name, domain, api_key, access_key, access_key_secret, endpoint_url, instance_subdomain, client_id, client_secret, redirect_uri].hash
|
|
397
|
+
[source, access_token, refresh_token, workspace_id, tenant_name, site_name, subdomain, access_token_secret, username, zotero_id, organization_name, domain, api_key, access_key, access_key_secret, endpoint_url, instance_subdomain, client_id, client_secret, redirect_uri, gong_account_email].hash
|
|
383
398
|
end
|
|
384
399
|
|
|
385
400
|
# Builds the object from hash
|
|
@@ -47,6 +47,7 @@ module Carbon
|
|
|
47
47
|
GITHUB = "GITHUB".freeze
|
|
48
48
|
SLACK = "SLACK".freeze
|
|
49
49
|
GURU = "GURU".freeze
|
|
50
|
+
GONG = "GONG".freeze
|
|
50
51
|
JPG = "JPG".freeze
|
|
51
52
|
PNG = "PNG".freeze
|
|
52
53
|
JPEG = "JPEG".freeze
|
|
@@ -72,7 +73,7 @@ module Carbon
|
|
|
72
73
|
MSG = "MSG".freeze
|
|
73
74
|
|
|
74
75
|
def self.all_vars
|
|
75
|
-
@all_vars ||= [GOOGLE_CLOUD_STORAGE, GOOGLE_DRIVE, NOTION, NOTION_DATABASE, INTERCOM, DROPBOX, ONEDRIVE, SHAREPOINT, CONFLUENCE, BOX, ZENDESK, ZOTERO, S3, GMAIL, OUTLOOK, SERVICENOW, TEXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, HTML, RAW_TEXT, WEB_SCRAPE, RSS_FEED, FRESHDESK, GITBOOK, SALESFORCE, GITHUB, SLACK, GURU, JPG, PNG, JPEG, MP3, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, MPEG, MPG, MP4, WMV, AVI, MOV, MKV, FLV, WEBM, EML, MSG].freeze
|
|
76
|
+
@all_vars ||= [GOOGLE_CLOUD_STORAGE, GOOGLE_DRIVE, NOTION, NOTION_DATABASE, INTERCOM, DROPBOX, ONEDRIVE, SHAREPOINT, CONFLUENCE, BOX, ZENDESK, ZOTERO, S3, GMAIL, OUTLOOK, SERVICENOW, TEXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, HTML, RAW_TEXT, WEB_SCRAPE, RSS_FEED, FRESHDESK, GITBOOK, SALESFORCE, GITHUB, SLACK, GURU, GONG, JPG, PNG, JPEG, MP3, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, MPEG, MPG, MP4, WMV, AVI, MOV, MKV, FLV, WEBM, EML, MSG].freeze
|
|
76
77
|
end
|
|
77
78
|
|
|
78
79
|
# Builds the enum from string
|
|
@@ -47,6 +47,7 @@ module Carbon
|
|
|
47
47
|
GITHUB = "GITHUB".freeze
|
|
48
48
|
SLACK = "SLACK".freeze
|
|
49
49
|
GURU = "GURU".freeze
|
|
50
|
+
GONG = "GONG".freeze
|
|
50
51
|
JPG = "JPG".freeze
|
|
51
52
|
PNG = "PNG".freeze
|
|
52
53
|
JPEG = "JPEG".freeze
|
|
@@ -72,7 +73,7 @@ module Carbon
|
|
|
72
73
|
MSG = "MSG".freeze
|
|
73
74
|
|
|
74
75
|
def self.all_vars
|
|
75
|
-
@all_vars ||= [GOOGLE_CLOUD_STORAGE, GOOGLE_DRIVE, NOTION, NOTION_DATABASE, INTERCOM, DROPBOX, ONEDRIVE, SHAREPOINT, CONFLUENCE, BOX, ZENDESK, ZOTERO, S3, GMAIL, OUTLOOK, SERVICENOW, TEXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, HTML, RAW_TEXT, WEB_SCRAPE, RSS_FEED, FRESHDESK, GITBOOK, SALESFORCE, GITHUB, SLACK, GURU, JPG, PNG, JPEG, MP3, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, MPEG, MPG, MP4, WMV, AVI, MOV, MKV, FLV, WEBM, EML, MSG].freeze
|
|
76
|
+
@all_vars ||= [GOOGLE_CLOUD_STORAGE, GOOGLE_DRIVE, NOTION, NOTION_DATABASE, INTERCOM, DROPBOX, ONEDRIVE, SHAREPOINT, CONFLUENCE, BOX, ZENDESK, ZOTERO, S3, GMAIL, OUTLOOK, SERVICENOW, TEXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, HTML, RAW_TEXT, WEB_SCRAPE, RSS_FEED, FRESHDESK, GITBOOK, SALESFORCE, GITHUB, SLACK, GURU, GONG, JPG, PNG, JPEG, MP3, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, MPEG, MPG, MP4, WMV, AVI, MOV, MKV, FLV, WEBM, EML, MSG].freeze
|
|
76
77
|
end
|
|
77
78
|
|
|
78
79
|
# Builds the enum from string
|
|
@@ -40,6 +40,7 @@ module Carbon
|
|
|
40
40
|
SLACK = "SLACK".freeze
|
|
41
41
|
GURU = "GURU".freeze
|
|
42
42
|
SERVICENOW = "SERVICENOW".freeze
|
|
43
|
+
GONG = "GONG".freeze
|
|
43
44
|
JPG = "JPG".freeze
|
|
44
45
|
PNG = "PNG".freeze
|
|
45
46
|
MP3 = "MP3".freeze
|
|
@@ -64,7 +65,7 @@ module Carbon
|
|
|
64
65
|
MSG = "MSG".freeze
|
|
65
66
|
|
|
66
67
|
def self.all_vars
|
|
67
|
-
@all_vars ||= [TXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, HTML, NOTION, GOOGLE_DOCS, GOOGLE_SHEETS, GOOGLE_SLIDES, INTERCOM, CONFLUENCE, RSS_FEED, GMAIL, OUTLOOK, ZENDESK, FRESHDESK, WEB_SCRAPE, GITBOOK, SALESFORCE, GITHUB, SLACK, GURU, SERVICENOW, JPG, PNG, MP3, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, MPEG, MPG, MP4, WMV, AVI, MOV, MKV, FLV, WEBM, EML, MSG].freeze
|
|
68
|
+
@all_vars ||= [TXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, HTML, NOTION, GOOGLE_DOCS, GOOGLE_SHEETS, GOOGLE_SLIDES, INTERCOM, CONFLUENCE, RSS_FEED, GMAIL, OUTLOOK, ZENDESK, FRESHDESK, WEB_SCRAPE, GITBOOK, SALESFORCE, GITHUB, SLACK, GURU, SERVICENOW, GONG, JPG, PNG, MP3, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, MPEG, MPG, MP4, WMV, AVI, MOV, MKV, FLV, WEBM, EML, MSG].freeze
|
|
68
69
|
end
|
|
69
70
|
|
|
70
71
|
# Builds the enum from string
|
|
@@ -40,6 +40,7 @@ module Carbon
|
|
|
40
40
|
SLACK = "SLACK".freeze
|
|
41
41
|
GURU = "GURU".freeze
|
|
42
42
|
SERVICENOW = "SERVICENOW".freeze
|
|
43
|
+
GONG = "GONG".freeze
|
|
43
44
|
JPG = "JPG".freeze
|
|
44
45
|
PNG = "PNG".freeze
|
|
45
46
|
MP3 = "MP3".freeze
|
|
@@ -64,7 +65,7 @@ module Carbon
|
|
|
64
65
|
MSG = "MSG".freeze
|
|
65
66
|
|
|
66
67
|
def self.all_vars
|
|
67
|
-
@all_vars ||= [TXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, HTML, NOTION, GOOGLE_DOCS, GOOGLE_SHEETS, GOOGLE_SLIDES, INTERCOM, CONFLUENCE, RSS_FEED, GMAIL, OUTLOOK, ZENDESK, FRESHDESK, WEB_SCRAPE, GITBOOK, SALESFORCE, GITHUB, SLACK, GURU, SERVICENOW, JPG, PNG, MP3, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, MPEG, MPG, MP4, WMV, AVI, MOV, MKV, FLV, WEBM, EML, MSG].freeze
|
|
68
|
+
@all_vars ||= [TXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, HTML, NOTION, GOOGLE_DOCS, GOOGLE_SHEETS, GOOGLE_SLIDES, INTERCOM, CONFLUENCE, RSS_FEED, GMAIL, OUTLOOK, ZENDESK, FRESHDESK, WEB_SCRAPE, GITBOOK, SALESFORCE, GITHUB, SLACK, GURU, SERVICENOW, GONG, JPG, PNG, MP3, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, MPEG, MPG, MP4, WMV, AVI, MOV, MKV, FLV, WEBM, EML, MSG].freeze
|
|
68
69
|
end
|
|
69
70
|
|
|
70
71
|
# Builds the enum from string
|
|
@@ -0,0 +1,254 @@
|
|
|
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 'date'
|
|
10
|
+
require 'time'
|
|
11
|
+
|
|
12
|
+
module Carbon
|
|
13
|
+
class GongAuthentication
|
|
14
|
+
attr_accessor :source
|
|
15
|
+
|
|
16
|
+
attr_accessor :access_token
|
|
17
|
+
|
|
18
|
+
attr_accessor :refresh_token
|
|
19
|
+
|
|
20
|
+
attr_accessor :gong_account_email
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'source' => :'source',
|
|
26
|
+
:'access_token' => :'access_token',
|
|
27
|
+
:'refresh_token' => :'refresh_token',
|
|
28
|
+
:'gong_account_email' => :'gong_account_email'
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns all the JSON keys this model knows about
|
|
33
|
+
def self.acceptable_attributes
|
|
34
|
+
attribute_map.values
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Attribute type mapping.
|
|
38
|
+
def self.openapi_types
|
|
39
|
+
{
|
|
40
|
+
:'source' => :'Object',
|
|
41
|
+
:'access_token' => :'String',
|
|
42
|
+
:'refresh_token' => :'String',
|
|
43
|
+
:'gong_account_email' => :'String'
|
|
44
|
+
}
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# List of attributes with nullable: true
|
|
48
|
+
def self.openapi_nullable
|
|
49
|
+
Set.new([
|
|
50
|
+
:'source',
|
|
51
|
+
:'refresh_token',
|
|
52
|
+
])
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Initializes the object
|
|
56
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
57
|
+
def initialize(attributes = {})
|
|
58
|
+
if (!attributes.is_a?(Hash))
|
|
59
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Carbon::GongAuthentication` initialize method"
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
63
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
64
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Carbon::GongAuthentication`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
66
|
+
end
|
|
67
|
+
h[k.to_sym] = v
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if attributes.key?(:'source')
|
|
71
|
+
self.source = attributes[:'source']
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
if attributes.key?(:'access_token')
|
|
75
|
+
self.access_token = attributes[:'access_token']
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'refresh_token')
|
|
79
|
+
self.refresh_token = attributes[:'refresh_token']
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'gong_account_email')
|
|
83
|
+
self.gong_account_email = attributes[:'gong_account_email']
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
88
|
+
# @return Array for valid properties with the reasons
|
|
89
|
+
def list_invalid_properties
|
|
90
|
+
invalid_properties = Array.new
|
|
91
|
+
if @access_token.nil?
|
|
92
|
+
invalid_properties.push('invalid value for "access_token", access_token cannot be nil.')
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
if @gong_account_email.nil?
|
|
96
|
+
invalid_properties.push('invalid value for "gong_account_email", gong_account_email cannot be nil.')
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
invalid_properties
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Check to see if the all the properties in the model are valid
|
|
103
|
+
# @return true if the model is valid
|
|
104
|
+
def valid?
|
|
105
|
+
return false if @access_token.nil?
|
|
106
|
+
return false if @gong_account_email.nil?
|
|
107
|
+
true
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Checks equality by comparing each attribute.
|
|
111
|
+
# @param [Object] Object to be compared
|
|
112
|
+
def ==(o)
|
|
113
|
+
return true if self.equal?(o)
|
|
114
|
+
self.class == o.class &&
|
|
115
|
+
source == o.source &&
|
|
116
|
+
access_token == o.access_token &&
|
|
117
|
+
refresh_token == o.refresh_token &&
|
|
118
|
+
gong_account_email == o.gong_account_email
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# @see the `==` method
|
|
122
|
+
# @param [Object] Object to be compared
|
|
123
|
+
def eql?(o)
|
|
124
|
+
self == o
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Calculates hash code according to all attributes.
|
|
128
|
+
# @return [Integer] Hash code
|
|
129
|
+
def hash
|
|
130
|
+
[source, access_token, refresh_token, gong_account_email].hash
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# Builds the object from hash
|
|
134
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
135
|
+
# @return [Object] Returns the model itself
|
|
136
|
+
def self.build_from_hash(attributes)
|
|
137
|
+
new.build_from_hash(attributes)
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Builds the object from hash
|
|
141
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
142
|
+
# @return [Object] Returns the model itself
|
|
143
|
+
def build_from_hash(attributes)
|
|
144
|
+
return nil unless attributes.is_a?(Hash)
|
|
145
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
146
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
147
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
148
|
+
self.send("#{key}=", nil)
|
|
149
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
150
|
+
# check to ensure the input is an array given that the attribute
|
|
151
|
+
# is documented as an array but the input is not
|
|
152
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
153
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
154
|
+
end
|
|
155
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
156
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
157
|
+
end
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
self
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# Deserializes the data based on type
|
|
164
|
+
# @param string type Data type
|
|
165
|
+
# @param string value Value to be deserialized
|
|
166
|
+
# @return [Object] Deserialized data
|
|
167
|
+
def _deserialize(type, value)
|
|
168
|
+
case type.to_sym
|
|
169
|
+
when :Time
|
|
170
|
+
Time.parse(value)
|
|
171
|
+
when :Date
|
|
172
|
+
Date.parse(value)
|
|
173
|
+
when :String
|
|
174
|
+
value.to_s
|
|
175
|
+
when :Integer
|
|
176
|
+
value.to_i
|
|
177
|
+
when :Float
|
|
178
|
+
value.to_f
|
|
179
|
+
when :Boolean
|
|
180
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
181
|
+
true
|
|
182
|
+
else
|
|
183
|
+
false
|
|
184
|
+
end
|
|
185
|
+
when :Object
|
|
186
|
+
# generic object (usually a Hash), return directly
|
|
187
|
+
value
|
|
188
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
189
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
190
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
191
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
192
|
+
k_type = Regexp.last_match[:k_type]
|
|
193
|
+
v_type = Regexp.last_match[:v_type]
|
|
194
|
+
{}.tap do |hash|
|
|
195
|
+
value.each do |k, v|
|
|
196
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
197
|
+
end
|
|
198
|
+
end
|
|
199
|
+
else # model
|
|
200
|
+
# models (e.g. Pet) or oneOf
|
|
201
|
+
klass = Carbon.const_get(type)
|
|
202
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
203
|
+
end
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# Returns the string representation of the object
|
|
207
|
+
# @return [String] String presentation of the object
|
|
208
|
+
def to_s
|
|
209
|
+
to_hash.to_s
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
213
|
+
# @return [Hash] Returns the object in the form of hash
|
|
214
|
+
def to_body
|
|
215
|
+
to_hash
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# Returns the object in the form of hash
|
|
219
|
+
# @return [Hash] Returns the object in the form of hash
|
|
220
|
+
def to_hash
|
|
221
|
+
hash = {}
|
|
222
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
223
|
+
value = self.send(attr)
|
|
224
|
+
if value.nil?
|
|
225
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
226
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
hash[param] = _to_hash(value)
|
|
230
|
+
end
|
|
231
|
+
hash
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
# Outputs non-array value in the form of hash
|
|
235
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
236
|
+
# @param [Object] value Any valid value
|
|
237
|
+
# @return [Hash] Returns the value in the form of hash
|
|
238
|
+
def _to_hash(value)
|
|
239
|
+
if value.is_a?(Array)
|
|
240
|
+
value.compact.map { |v| _to_hash(v) }
|
|
241
|
+
elsif value.is_a?(Hash)
|
|
242
|
+
{}.tap do |hash|
|
|
243
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
244
|
+
end
|
|
245
|
+
elsif value.respond_to? :to_hash
|
|
246
|
+
value.to_hash
|
|
247
|
+
else
|
|
248
|
+
value
|
|
249
|
+
end
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
end
|
|
@@ -75,6 +75,9 @@ module Carbon
|
|
|
75
75
|
# Automatically open source file picker after the OAuth flow is complete. This flag is currently supported by BOX, DROPBOX, GOOGLE_DRIVE, ONEDRIVE, SHAREPOINT. It will be ignored for other data sources.
|
|
76
76
|
attr_accessor :automatically_open_file_picker
|
|
77
77
|
|
|
78
|
+
# If you are connecting a Gong account, you need to input the email of the account you wish to connect. This email will be used to identify your carbon data source.
|
|
79
|
+
attr_accessor :gong_account_email
|
|
80
|
+
|
|
78
81
|
attr_accessor :servicenow_credentials
|
|
79
82
|
|
|
80
83
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -107,6 +110,7 @@ module Carbon
|
|
|
107
110
|
:'incremental_sync' => :'incremental_sync',
|
|
108
111
|
:'file_sync_config' => :'file_sync_config',
|
|
109
112
|
:'automatically_open_file_picker' => :'automatically_open_file_picker',
|
|
113
|
+
:'gong_account_email' => :'gong_account_email',
|
|
110
114
|
:'servicenow_credentials' => :'servicenow_credentials'
|
|
111
115
|
}
|
|
112
116
|
end
|
|
@@ -121,7 +125,7 @@ module Carbon
|
|
|
121
125
|
{
|
|
122
126
|
:'tags' => :'Object',
|
|
123
127
|
:'scope' => :'String',
|
|
124
|
-
:'service' => :'
|
|
128
|
+
:'service' => :'OauthBasedConnectors',
|
|
125
129
|
:'chunk_size' => :'Integer',
|
|
126
130
|
:'chunk_overlap' => :'Integer',
|
|
127
131
|
:'skip_embedding_generation' => :'Boolean',
|
|
@@ -146,6 +150,7 @@ module Carbon
|
|
|
146
150
|
:'incremental_sync' => :'Boolean',
|
|
147
151
|
:'file_sync_config' => :'FileSyncConfigNullable',
|
|
148
152
|
:'automatically_open_file_picker' => :'Boolean',
|
|
153
|
+
:'gong_account_email' => :'String',
|
|
149
154
|
:'servicenow_credentials' => :'ServiceNowCredentialsNullable'
|
|
150
155
|
}
|
|
151
156
|
end
|
|
@@ -175,6 +180,7 @@ module Carbon
|
|
|
175
180
|
:'parse_pdf_tables_with_ocr',
|
|
176
181
|
:'file_sync_config',
|
|
177
182
|
:'automatically_open_file_picker',
|
|
183
|
+
:'gong_account_email',
|
|
178
184
|
:'servicenow_credentials'
|
|
179
185
|
])
|
|
180
186
|
end
|
|
@@ -330,6 +336,10 @@ module Carbon
|
|
|
330
336
|
self.automatically_open_file_picker = attributes[:'automatically_open_file_picker']
|
|
331
337
|
end
|
|
332
338
|
|
|
339
|
+
if attributes.key?(:'gong_account_email')
|
|
340
|
+
self.gong_account_email = attributes[:'gong_account_email']
|
|
341
|
+
end
|
|
342
|
+
|
|
333
343
|
if attributes.key?(:'servicenow_credentials')
|
|
334
344
|
self.servicenow_credentials = attributes[:'servicenow_credentials']
|
|
335
345
|
end
|
|
@@ -385,6 +395,7 @@ module Carbon
|
|
|
385
395
|
incremental_sync == o.incremental_sync &&
|
|
386
396
|
file_sync_config == o.file_sync_config &&
|
|
387
397
|
automatically_open_file_picker == o.automatically_open_file_picker &&
|
|
398
|
+
gong_account_email == o.gong_account_email &&
|
|
388
399
|
servicenow_credentials == o.servicenow_credentials
|
|
389
400
|
end
|
|
390
401
|
|
|
@@ -397,7 +408,7 @@ module Carbon
|
|
|
397
408
|
# Calculates hash code according to all attributes.
|
|
398
409
|
# @return [Integer] Hash code
|
|
399
410
|
def hash
|
|
400
|
-
[tags, scope, service, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, zendesk_subdomain, microsoft_tenant, sharepoint_site_name, confluence_subdomain, generate_sparse_vectors, prepend_filename_to_chunks, max_items_per_chunk, salesforce_domain, sync_files_on_connection, set_page_as_boundary, data_source_id, connecting_new_account, request_id, use_ocr, parse_pdf_tables_with_ocr, enable_file_picker, sync_source_items, incremental_sync, file_sync_config, automatically_open_file_picker, servicenow_credentials].hash
|
|
411
|
+
[tags, scope, service, chunk_size, chunk_overlap, skip_embedding_generation, embedding_model, zendesk_subdomain, microsoft_tenant, sharepoint_site_name, confluence_subdomain, generate_sparse_vectors, prepend_filename_to_chunks, max_items_per_chunk, salesforce_domain, sync_files_on_connection, set_page_as_boundary, data_source_id, connecting_new_account, request_id, use_ocr, parse_pdf_tables_with_ocr, enable_file_picker, sync_source_items, incremental_sync, file_sync_config, automatically_open_file_picker, gong_account_email, servicenow_credentials].hash
|
|
401
412
|
end
|
|
402
413
|
|
|
403
414
|
# Builds the object from hash
|
|
@@ -10,7 +10,7 @@ require 'date'
|
|
|
10
10
|
require 'time'
|
|
11
11
|
|
|
12
12
|
module Carbon
|
|
13
|
-
class
|
|
13
|
+
class OauthBasedConnectors
|
|
14
14
|
BOX = "BOX".freeze
|
|
15
15
|
CONFLUENCE = "CONFLUENCE".freeze
|
|
16
16
|
DROPBOX = "DROPBOX".freeze
|
|
@@ -26,10 +26,11 @@ module Carbon
|
|
|
26
26
|
SLACK = "SLACK".freeze
|
|
27
27
|
ZENDESK = "ZENDESK".freeze
|
|
28
28
|
ZOTERO = "ZOTERO".freeze
|
|
29
|
+
GONG = "GONG".freeze
|
|
29
30
|
SERVICENOW = "SERVICENOW".freeze
|
|
30
31
|
|
|
31
32
|
def self.all_vars
|
|
32
|
-
@all_vars ||= [BOX, CONFLUENCE, DROPBOX, GMAIL, GOOGLE_DRIVE, GOOGLE_CLOUD_STORAGE, INTERCOM, NOTION, ONEDRIVE, OUTLOOK, SALESFORCE, SHAREPOINT, SLACK, ZENDESK, ZOTERO, SERVICENOW].freeze
|
|
33
|
+
@all_vars ||= [BOX, CONFLUENCE, DROPBOX, GMAIL, GOOGLE_DRIVE, GOOGLE_CLOUD_STORAGE, INTERCOM, NOTION, ONEDRIVE, OUTLOOK, SALESFORCE, SHAREPOINT, SLACK, ZENDESK, ZOTERO, GONG, SERVICENOW].freeze
|
|
33
34
|
end
|
|
34
35
|
|
|
35
36
|
# Builds the enum from string
|
|
@@ -43,8 +44,8 @@ module Carbon
|
|
|
43
44
|
# @param [String] The enum value in the form of the string
|
|
44
45
|
# @return [String] The enum value
|
|
45
46
|
def build_from_hash(value)
|
|
46
|
-
return value if
|
|
47
|
-
raise "Invalid ENUM value #{value} for class #
|
|
47
|
+
return value if OauthBasedConnectors.all_vars.include?(value)
|
|
48
|
+
raise "Invalid ENUM value #{value} for class #OauthBasedConnectors"
|
|
48
49
|
end
|
|
49
50
|
end
|
|
50
51
|
end
|
data/lib/carbon_ruby_sdk.rb
CHANGED
|
@@ -51,7 +51,6 @@ require 'carbon_ruby_sdk/models/embeddings_and_chunks_order_by_columns'
|
|
|
51
51
|
require 'carbon_ruby_sdk/models/embeddings_and_chunks_query_input'
|
|
52
52
|
require 'carbon_ruby_sdk/models/embeddings_and_chunks_query_input_v2'
|
|
53
53
|
require 'carbon_ruby_sdk/models/embeddings_and_chunks_response'
|
|
54
|
-
require 'carbon_ruby_sdk/models/external_data_source_type'
|
|
55
54
|
require 'carbon_ruby_sdk/models/external_file_sync_statuses'
|
|
56
55
|
require 'carbon_ruby_sdk/models/external_source_item'
|
|
57
56
|
require 'carbon_ruby_sdk/models/external_source_items_order_by'
|
|
@@ -76,6 +75,7 @@ require 'carbon_ruby_sdk/models/github_authentication'
|
|
|
76
75
|
require 'carbon_ruby_sdk/models/github_connect_request'
|
|
77
76
|
require 'carbon_ruby_sdk/models/github_fetch_repos_request'
|
|
78
77
|
require 'carbon_ruby_sdk/models/gmail_sync_input'
|
|
78
|
+
require 'carbon_ruby_sdk/models/gong_authentication'
|
|
79
79
|
require 'carbon_ruby_sdk/models/guru_authentication'
|
|
80
80
|
require 'carbon_ruby_sdk/models/guru_connect_request'
|
|
81
81
|
require 'carbon_ruby_sdk/models/http_validation_error'
|
|
@@ -100,6 +100,7 @@ require 'carbon_ruby_sdk/models/move_to_hot_storage_query_input'
|
|
|
100
100
|
require 'carbon_ruby_sdk/models/notion_authentication'
|
|
101
101
|
require 'carbon_ruby_sdk/models/o_auth_authentication'
|
|
102
102
|
require 'carbon_ruby_sdk/models/o_auth_url_request'
|
|
103
|
+
require 'carbon_ruby_sdk/models/oauth_based_connectors'
|
|
103
104
|
require 'carbon_ruby_sdk/models/object_type'
|
|
104
105
|
require 'carbon_ruby_sdk/models/order_dir'
|
|
105
106
|
require 'carbon_ruby_sdk/models/order_dir_v2'
|
|
@@ -139,4 +139,10 @@ describe Carbon::AuthenticationProperty do
|
|
|
139
139
|
end
|
|
140
140
|
end
|
|
141
141
|
|
|
142
|
+
describe 'test attribute "gong_account_email"' do
|
|
143
|
+
it 'should work' do
|
|
144
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
145
|
+
end
|
|
146
|
+
end
|
|
147
|
+
|
|
142
148
|
end
|
|
@@ -0,0 +1,46 @@
|
|
|
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 'spec_helper'
|
|
10
|
+
require 'json'
|
|
11
|
+
require 'date'
|
|
12
|
+
|
|
13
|
+
# Unit tests for Carbon::GongAuthentication
|
|
14
|
+
describe Carbon::GongAuthentication do
|
|
15
|
+
let(:instance) { Carbon::GongAuthentication.new }
|
|
16
|
+
|
|
17
|
+
describe 'test an instance of GongAuthentication' do
|
|
18
|
+
it 'should create an instance of GongAuthentication' do
|
|
19
|
+
expect(instance).to be_instance_of(Carbon::GongAuthentication)
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
describe 'test attribute "source"' do
|
|
23
|
+
it 'should work' do
|
|
24
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
describe 'test attribute "access_token"' do
|
|
29
|
+
it 'should work' do
|
|
30
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
describe 'test attribute "refresh_token"' do
|
|
35
|
+
it 'should work' do
|
|
36
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
describe 'test attribute "gong_account_email"' do
|
|
41
|
+
it 'should work' do
|
|
42
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
end
|
|
@@ -181,6 +181,12 @@ describe Carbon::OAuthURLRequest do
|
|
|
181
181
|
end
|
|
182
182
|
end
|
|
183
183
|
|
|
184
|
+
describe 'test attribute "gong_account_email"' do
|
|
185
|
+
it 'should work' do
|
|
186
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
187
|
+
end
|
|
188
|
+
end
|
|
189
|
+
|
|
184
190
|
describe 'test attribute "servicenow_credentials"' do
|
|
185
191
|
it 'should work' do
|
|
186
192
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
@@ -0,0 +1,22 @@
|
|
|
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 'spec_helper'
|
|
10
|
+
require 'json'
|
|
11
|
+
require 'date'
|
|
12
|
+
|
|
13
|
+
# Unit tests for Carbon::OauthBasedConnectors
|
|
14
|
+
describe Carbon::OauthBasedConnectors do
|
|
15
|
+
let(:instance) { Carbon::OauthBasedConnectors.new }
|
|
16
|
+
|
|
17
|
+
describe 'test an instance of OauthBasedConnectors' do
|
|
18
|
+
it 'should create an instance of OauthBasedConnectors' do
|
|
19
|
+
expect(instance).to be_instance_of(Carbon::OauthBasedConnectors)
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: carbon_ruby_sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.31
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Konfig
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-09-
|
|
11
|
+
date: 2024-09-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
@@ -133,7 +133,6 @@ files:
|
|
|
133
133
|
- lib/carbon_ruby_sdk/models/embeddings_and_chunks_query_input.rb
|
|
134
134
|
- lib/carbon_ruby_sdk/models/embeddings_and_chunks_query_input_v2.rb
|
|
135
135
|
- lib/carbon_ruby_sdk/models/embeddings_and_chunks_response.rb
|
|
136
|
-
- lib/carbon_ruby_sdk/models/external_data_source_type.rb
|
|
137
136
|
- lib/carbon_ruby_sdk/models/external_file_sync_statuses.rb
|
|
138
137
|
- lib/carbon_ruby_sdk/models/external_source_item.rb
|
|
139
138
|
- lib/carbon_ruby_sdk/models/external_source_items_order_by.rb
|
|
@@ -158,6 +157,7 @@ files:
|
|
|
158
157
|
- lib/carbon_ruby_sdk/models/github_connect_request.rb
|
|
159
158
|
- lib/carbon_ruby_sdk/models/github_fetch_repos_request.rb
|
|
160
159
|
- lib/carbon_ruby_sdk/models/gmail_sync_input.rb
|
|
160
|
+
- lib/carbon_ruby_sdk/models/gong_authentication.rb
|
|
161
161
|
- lib/carbon_ruby_sdk/models/guru_authentication.rb
|
|
162
162
|
- lib/carbon_ruby_sdk/models/guru_connect_request.rb
|
|
163
163
|
- lib/carbon_ruby_sdk/models/helpdesk_file_types.rb
|
|
@@ -182,6 +182,7 @@ files:
|
|
|
182
182
|
- lib/carbon_ruby_sdk/models/notion_authentication.rb
|
|
183
183
|
- lib/carbon_ruby_sdk/models/o_auth_authentication.rb
|
|
184
184
|
- lib/carbon_ruby_sdk/models/o_auth_url_request.rb
|
|
185
|
+
- lib/carbon_ruby_sdk/models/oauth_based_connectors.rb
|
|
185
186
|
- lib/carbon_ruby_sdk/models/object_type.rb
|
|
186
187
|
- lib/carbon_ruby_sdk/models/order_dir.rb
|
|
187
188
|
- lib/carbon_ruby_sdk/models/order_dir_v2.rb
|
|
@@ -314,7 +315,6 @@ files:
|
|
|
314
315
|
- spec/models/embeddings_and_chunks_query_input_spec.rb
|
|
315
316
|
- spec/models/embeddings_and_chunks_query_input_v2_spec.rb
|
|
316
317
|
- spec/models/embeddings_and_chunks_response_spec.rb
|
|
317
|
-
- spec/models/external_data_source_type_spec.rb
|
|
318
318
|
- spec/models/external_file_sync_statuses_spec.rb
|
|
319
319
|
- spec/models/external_source_item_spec.rb
|
|
320
320
|
- spec/models/external_source_items_order_by_spec.rb
|
|
@@ -339,6 +339,7 @@ files:
|
|
|
339
339
|
- spec/models/github_connect_request_spec.rb
|
|
340
340
|
- spec/models/github_fetch_repos_request_spec.rb
|
|
341
341
|
- spec/models/gmail_sync_input_spec.rb
|
|
342
|
+
- spec/models/gong_authentication_spec.rb
|
|
342
343
|
- spec/models/guru_authentication_spec.rb
|
|
343
344
|
- spec/models/guru_connect_request_spec.rb
|
|
344
345
|
- spec/models/helpdesk_file_types_spec.rb
|
|
@@ -363,6 +364,7 @@ files:
|
|
|
363
364
|
- spec/models/notion_authentication_spec.rb
|
|
364
365
|
- spec/models/o_auth_authentication_spec.rb
|
|
365
366
|
- spec/models/o_auth_url_request_spec.rb
|
|
367
|
+
- spec/models/oauth_based_connectors_spec.rb
|
|
366
368
|
- spec/models/object_type_spec.rb
|
|
367
369
|
- spec/models/order_dir_spec.rb
|
|
368
370
|
- spec/models/order_dir_v2_spec.rb
|
|
@@ -494,7 +496,6 @@ test_files:
|
|
|
494
496
|
- spec/models/embeddings_and_chunks_query_input_v2_spec.rb
|
|
495
497
|
- spec/models/custom_credentials_type_spec.rb
|
|
496
498
|
- spec/models/update_organization_input_spec.rb
|
|
497
|
-
- spec/models/external_data_source_type_spec.rb
|
|
498
499
|
- spec/models/data_source_type_nullable_spec.rb
|
|
499
500
|
- spec/models/guru_connect_request_spec.rb
|
|
500
501
|
- spec/models/validation_error_spec.rb
|
|
@@ -524,6 +525,7 @@ test_files:
|
|
|
524
525
|
- spec/models/connect_data_source_response_spec.rb
|
|
525
526
|
- spec/models/s3_get_file_input_spec.rb
|
|
526
527
|
- spec/models/location_property_inner_spec.rb
|
|
528
|
+
- spec/models/gong_authentication_spec.rb
|
|
527
529
|
- spec/models/document_response_spec.rb
|
|
528
530
|
- spec/models/document_response_list_spec.rb
|
|
529
531
|
- spec/models/list_user_response_spec.rb
|
|
@@ -603,6 +605,7 @@ test_files:
|
|
|
603
605
|
- spec/models/update_users_input_spec.rb
|
|
604
606
|
- spec/models/organization_user_files_to_sync_query_input_spec.rb
|
|
605
607
|
- spec/models/list_response_spec.rb
|
|
608
|
+
- spec/models/oauth_based_connectors_spec.rb
|
|
606
609
|
- spec/models/sent_webhook_payload_spec.rb
|
|
607
610
|
- spec/models/external_file_sync_statuses_spec.rb
|
|
608
611
|
- spec/models/directory_item_spec.rb
|
|
@@ -1,22 +0,0 @@
|
|
|
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 'spec_helper'
|
|
10
|
-
require 'json'
|
|
11
|
-
require 'date'
|
|
12
|
-
|
|
13
|
-
# Unit tests for Carbon::ExternalDataSourceType
|
|
14
|
-
describe Carbon::ExternalDataSourceType do
|
|
15
|
-
let(:instance) { Carbon::ExternalDataSourceType.new }
|
|
16
|
-
|
|
17
|
-
describe 'test an instance of ExternalDataSourceType' do
|
|
18
|
-
it 'should create an instance of ExternalDataSourceType' do
|
|
19
|
-
expect(instance).to be_instance_of(Carbon::ExternalDataSourceType)
|
|
20
|
-
end
|
|
21
|
-
end
|
|
22
|
-
end
|