carbon_ruby_sdk 0.1.20 → 0.1.22
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 +37 -3
- data/lib/carbon_ruby_sdk/api/integrations_api.rb +108 -2
- data/lib/carbon_ruby_sdk/models/authentication_property.rb +1 -0
- data/lib/carbon_ruby_sdk/models/data_source_type.rb +2 -1
- data/lib/carbon_ruby_sdk/models/data_source_type_nullable.rb +2 -1
- data/lib/carbon_ruby_sdk/models/file_formats.rb +2 -1
- data/lib/carbon_ruby_sdk/models/file_formats_nullable.rb +2 -1
- data/lib/carbon_ruby_sdk/models/github_authentication.rb +244 -0
- data/lib/carbon_ruby_sdk/models/github_connect_request.rb +234 -0
- data/lib/carbon_ruby_sdk/models/o_auth_url_request.rb +1 -1
- data/lib/carbon_ruby_sdk/models/organization_user_data_source_api.rb +1 -5
- data/lib/carbon_ruby_sdk/models/organization_user_files_to_sync_filters.rb +16 -5
- data/lib/carbon_ruby_sdk/version.rb +1 -1
- data/lib/carbon_ruby_sdk.rb +2 -0
- data/spec/api/integrations_api_spec.rb +12 -0
- data/spec/models/github_authentication_spec.rb +40 -0
- data/spec/models/github_connect_request_spec.rb +34 -0
- data/spec/models/organization_user_files_to_sync_filters_spec.rb +6 -0
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '080102ce7c1ece17f804c75431e1716daabd5a70f83657e16f4a627fd7de26fb'
|
4
|
+
data.tar.gz: e5a823db1b5b09da8d975226c12a02c831ddf9e111640deda5cad99cf9183453
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a8702a024da0d5c63eba40f1964c784ce236f4b700edd501661676bfa1f5dd4ce068a3ae29ea3e38132267a27315a01659cb0888b323fec700612b34f7f02c6
|
7
|
+
data.tar.gz: b9fd8e806ea2fb79802ed6a494c94f82051ec7fc78a9d9fa7798c0abcdcd69e79f169e5d39fe47dd68b305801e14a2741e18293dfb20bac133ae8865bc5dce23
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
Connect external data to LLMs, no matter the source.
|
8
8
|
|
9
|
-
[![npm](https://img.shields.io/badge/gem-v0.1.
|
9
|
+
[![npm](https://img.shields.io/badge/gem-v0.1.22-blue)](https://rubygems.org/gems/carbon_ruby_sdk/versions/0.1.22)
|
10
10
|
|
11
11
|
</div>
|
12
12
|
|
@@ -53,6 +53,7 @@ Connect external data to LLMs, no matter the source.
|
|
53
53
|
* [`carbon.integrations.sync_confluence`](#carbonintegrationssync_confluence)
|
54
54
|
* [`carbon.integrations.sync_data_source_items`](#carbonintegrationssync_data_source_items)
|
55
55
|
* [`carbon.integrations.sync_files`](#carbonintegrationssync_files)
|
56
|
+
* [`carbon.integrations.sync_git_hub`](#carbonintegrationssync_git_hub)
|
56
57
|
* [`carbon.integrations.sync_gitbook`](#carbonintegrationssync_gitbook)
|
57
58
|
* [`carbon.integrations.sync_gmail`](#carbonintegrationssync_gmail)
|
58
59
|
* [`carbon.integrations.sync_outlook`](#carbonintegrationssync_outlook)
|
@@ -80,7 +81,7 @@ Connect external data to LLMs, no matter the source.
|
|
80
81
|
Add to Gemfile:
|
81
82
|
|
82
83
|
```ruby
|
83
|
-
gem 'carbon_ruby_sdk', '~> 0.1.
|
84
|
+
gem 'carbon_ruby_sdk', '~> 0.1.22'
|
84
85
|
```
|
85
86
|
|
86
87
|
## Getting Started<a id="getting-started"></a>
|
@@ -1439,7 +1440,7 @@ Enable OCR for files that support it. Supported formats: pdf
|
|
1439
1440
|
##### parse_pdf_tables_with_ocr: `Boolean`<a id="parse_pdf_tables_with_ocr-boolean"></a>
|
1440
1441
|
##### enable_file_picker: `Boolean`<a id="enable_file_picker-boolean"></a>
|
1441
1442
|
Enable integration's file picker for sources that support it. Supported sources:
|
1442
|
-
|
1443
|
+
ONEDRIVE, DROPBOX, BOX, GOOGLE_DRIVE, SHAREPOINT
|
1443
1444
|
|
1444
1445
|
#### 🔄 Return<a id="🔄-return"></a>
|
1445
1446
|
|
@@ -1786,6 +1787,39 @@ Number of objects per chunk. For csv, tsv, xlsx, and json files only.
|
|
1786
1787
|
---
|
1787
1788
|
|
1788
1789
|
|
1790
|
+
### `carbon.integrations.sync_git_hub`<a id="carbonintegrationssync_git_hub"></a>
|
1791
|
+
|
1792
|
+
Refer this article to obtain an access token https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens.
|
1793
|
+
Make sure that your access token has the permission to read content from your desired repos. Note that if your access token
|
1794
|
+
expires you will need to manually update it through this endpoint.
|
1795
|
+
|
1796
|
+
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
1797
|
+
|
1798
|
+
```ruby
|
1799
|
+
result = carbon.integrations.sync_git_hub(
|
1800
|
+
username: "string_example",
|
1801
|
+
access_token: "string_example",
|
1802
|
+
)
|
1803
|
+
p result
|
1804
|
+
```
|
1805
|
+
|
1806
|
+
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
1807
|
+
|
1808
|
+
##### username: `String`<a id="username-string"></a>
|
1809
|
+
##### access_token: `String`<a id="access_token-string"></a>
|
1810
|
+
#### 🔄 Return<a id="🔄-return"></a>
|
1811
|
+
|
1812
|
+
[GenericSuccessResponse](./lib/carbon_ruby_sdk/models/generic_success_response.rb)
|
1813
|
+
|
1814
|
+
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
1815
|
+
|
1816
|
+
`/integrations/github` `POST`
|
1817
|
+
|
1818
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
1819
|
+
|
1820
|
+
---
|
1821
|
+
|
1822
|
+
|
1789
1823
|
### `carbon.integrations.sync_gitbook`<a id="carbonintegrationssync_gitbook"></a>
|
1790
1824
|
|
1791
1825
|
You can sync upto 20 Gitbook spaces at a time using this endpoint. Additional parameters below can be used to associate
|
@@ -545,7 +545,7 @@ module Carbon
|
|
545
545
|
# @param request_id [String] This request id will be added to all files that get synced using the generated OAuth URL
|
546
546
|
# @param use_ocr [Boolean] Enable OCR for files that support it. Supported formats: pdf
|
547
547
|
# @param parse_pdf_tables_with_ocr [Boolean]
|
548
|
-
# @param enable_file_picker [Boolean] Enable integration's file picker for sources that support it. Supported sources:
|
548
|
+
# @param enable_file_picker [Boolean] Enable integration's file picker for sources that support it. Supported sources: ONEDRIVE, DROPBOX, BOX, GOOGLE_DRIVE, SHAREPOINT
|
549
549
|
# @param body [OAuthURLRequest]
|
550
550
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
551
551
|
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, extra: {})
|
@@ -607,7 +607,7 @@ module Carbon
|
|
607
607
|
# @param request_id [String] This request id will be added to all files that get synced using the generated OAuth URL
|
608
608
|
# @param use_ocr [Boolean] Enable OCR for files that support it. Supported formats: pdf
|
609
609
|
# @param parse_pdf_tables_with_ocr [Boolean]
|
610
|
-
# @param enable_file_picker [Boolean] Enable integration's file picker for sources that support it. Supported sources:
|
610
|
+
# @param enable_file_picker [Boolean] Enable integration's file picker for sources that support it. Supported sources: ONEDRIVE, DROPBOX, BOX, GOOGLE_DRIVE, SHAREPOINT
|
611
611
|
# @param body [OAuthURLRequest]
|
612
612
|
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
613
613
|
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, extra: {})
|
@@ -1674,6 +1674,112 @@ module Carbon
|
|
1674
1674
|
end
|
1675
1675
|
|
1676
1676
|
|
1677
|
+
# Github Connect
|
1678
|
+
#
|
1679
|
+
# Refer this article to obtain an access token https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens.
|
1680
|
+
# Make sure that your access token has the permission to read content from your desired repos. Note that if your access token
|
1681
|
+
# expires you will need to manually update it through this endpoint.
|
1682
|
+
#
|
1683
|
+
# @param username [String]
|
1684
|
+
# @param access_token [String]
|
1685
|
+
# @param body [GithubConnectRequest]
|
1686
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1687
|
+
def sync_git_hub(username:, access_token:, extra: {})
|
1688
|
+
_body = {}
|
1689
|
+
_body[:username] = username if username != SENTINEL
|
1690
|
+
_body[:access_token] = access_token if access_token != SENTINEL
|
1691
|
+
github_connect_request = _body
|
1692
|
+
api_response = sync_git_hub_with_http_info_impl(github_connect_request, extra)
|
1693
|
+
api_response.data
|
1694
|
+
end
|
1695
|
+
|
1696
|
+
# Github Connect
|
1697
|
+
#
|
1698
|
+
# Refer this article to obtain an access token https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens.
|
1699
|
+
# Make sure that your access token has the permission to read content from your desired repos. Note that if your access token
|
1700
|
+
# expires you will need to manually update it through this endpoint.
|
1701
|
+
#
|
1702
|
+
# @param username [String]
|
1703
|
+
# @param access_token [String]
|
1704
|
+
# @param body [GithubConnectRequest]
|
1705
|
+
# @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
|
1706
|
+
def sync_git_hub_with_http_info(username:, access_token:, extra: {})
|
1707
|
+
_body = {}
|
1708
|
+
_body[:username] = username if username != SENTINEL
|
1709
|
+
_body[:access_token] = access_token if access_token != SENTINEL
|
1710
|
+
github_connect_request = _body
|
1711
|
+
sync_git_hub_with_http_info_impl(github_connect_request, extra)
|
1712
|
+
end
|
1713
|
+
|
1714
|
+
# Github Connect
|
1715
|
+
# Refer this article to obtain an access token https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens. Make sure that your access token has the permission to read content from your desired repos. Note that if your access token expires you will need to manually update it through this endpoint.
|
1716
|
+
# @param github_connect_request [GithubConnectRequest]
|
1717
|
+
# @param [Hash] opts the optional parameters
|
1718
|
+
# @return [GenericSuccessResponse]
|
1719
|
+
private def sync_git_hub_impl(github_connect_request, opts = {})
|
1720
|
+
data, _status_code, _headers = sync_git_hub_with_http_info(github_connect_request, opts)
|
1721
|
+
data
|
1722
|
+
end
|
1723
|
+
|
1724
|
+
# Github Connect
|
1725
|
+
# Refer this article to obtain an access token https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens. Make sure that your access token has the permission to read content from your desired repos. Note that if your access token expires you will need to manually update it through this endpoint.
|
1726
|
+
# @param github_connect_request [GithubConnectRequest]
|
1727
|
+
# @param [Hash] opts the optional parameters
|
1728
|
+
# @return [APIResponse] data is GenericSuccessResponse, status code, headers and response
|
1729
|
+
private def sync_git_hub_with_http_info_impl(github_connect_request, opts = {})
|
1730
|
+
if @api_client.config.debugging
|
1731
|
+
@api_client.config.logger.debug 'Calling API: IntegrationsApi.sync_git_hub ...'
|
1732
|
+
end
|
1733
|
+
# verify the required parameter 'github_connect_request' is set
|
1734
|
+
if @api_client.config.client_side_validation && github_connect_request.nil?
|
1735
|
+
fail ArgumentError, "Missing the required parameter 'github_connect_request' when calling IntegrationsApi.sync_git_hub"
|
1736
|
+
end
|
1737
|
+
# resource path
|
1738
|
+
local_var_path = '/integrations/github'
|
1739
|
+
|
1740
|
+
# query parameters
|
1741
|
+
query_params = opts[:query_params] || {}
|
1742
|
+
|
1743
|
+
# header parameters
|
1744
|
+
header_params = opts[:header_params] || {}
|
1745
|
+
# HTTP header 'Accept' (if needed)
|
1746
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1747
|
+
# HTTP header 'Content-Type'
|
1748
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
1749
|
+
if !content_type.nil?
|
1750
|
+
header_params['Content-Type'] = content_type
|
1751
|
+
end
|
1752
|
+
|
1753
|
+
# form parameters
|
1754
|
+
form_params = opts[:form_params] || {}
|
1755
|
+
|
1756
|
+
# http body (model)
|
1757
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(github_connect_request)
|
1758
|
+
|
1759
|
+
# return_type
|
1760
|
+
return_type = opts[:debug_return_type] || 'GenericSuccessResponse'
|
1761
|
+
|
1762
|
+
# auth_names
|
1763
|
+
auth_names = opts[:debug_auth_names] || ['accessToken', 'apiKey', 'customerId']
|
1764
|
+
|
1765
|
+
new_options = opts.merge(
|
1766
|
+
:operation => :"IntegrationsApi.sync_git_hub",
|
1767
|
+
:header_params => header_params,
|
1768
|
+
:query_params => query_params,
|
1769
|
+
:form_params => form_params,
|
1770
|
+
:body => post_body,
|
1771
|
+
:auth_names => auth_names,
|
1772
|
+
:return_type => return_type
|
1773
|
+
)
|
1774
|
+
|
1775
|
+
data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
|
1776
|
+
if @api_client.config.debugging
|
1777
|
+
@api_client.config.logger.debug "API called: IntegrationsApi#sync_git_hub\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1778
|
+
end
|
1779
|
+
APIResponse::new(data, status_code, headers, response)
|
1780
|
+
end
|
1781
|
+
|
1782
|
+
|
1677
1783
|
# Gitbook Sync
|
1678
1784
|
#
|
1679
1785
|
# You can sync upto 20 Gitbook spaces at a time using this endpoint. Additional parameters below can be used to associate
|
@@ -41,6 +41,7 @@ module Carbon
|
|
41
41
|
FRESHDESK = "FRESHDESK".freeze
|
42
42
|
GITBOOK = "GITBOOK".freeze
|
43
43
|
SALESFORCE = "SALESFORCE".freeze
|
44
|
+
GITHUB = "GITHUB".freeze
|
44
45
|
JPG = "JPG".freeze
|
45
46
|
PNG = "PNG".freeze
|
46
47
|
JPEG = "JPEG".freeze
|
@@ -57,7 +58,7 @@ module Carbon
|
|
57
58
|
WEBM = "WEBM".freeze
|
58
59
|
|
59
60
|
def self.all_vars
|
60
|
-
@all_vars ||= [GOOGLE_DRIVE, NOTION, NOTION_DATABASE, INTERCOM, DROPBOX, ONEDRIVE, SHAREPOINT, CONFLUENCE, BOX, ZENDESK, ZOTERO, S3, GMAIL, OUTLOOK, TEXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, RAW_TEXT, WEB_SCRAPE, RSS_FEED, FRESHDESK, GITBOOK, SALESFORCE, JPG, PNG, JPEG, MP3, MP4, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, WEBM].freeze
|
61
|
+
@all_vars ||= [GOOGLE_DRIVE, NOTION, NOTION_DATABASE, INTERCOM, DROPBOX, ONEDRIVE, SHAREPOINT, CONFLUENCE, BOX, ZENDESK, ZOTERO, S3, GMAIL, OUTLOOK, TEXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, RAW_TEXT, WEB_SCRAPE, RSS_FEED, FRESHDESK, GITBOOK, SALESFORCE, GITHUB, JPG, PNG, JPEG, MP3, MP4, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, WEBM].freeze
|
61
62
|
end
|
62
63
|
|
63
64
|
# Builds the enum from string
|
@@ -41,6 +41,7 @@ module Carbon
|
|
41
41
|
FRESHDESK = "FRESHDESK".freeze
|
42
42
|
GITBOOK = "GITBOOK".freeze
|
43
43
|
SALESFORCE = "SALESFORCE".freeze
|
44
|
+
GITHUB = "GITHUB".freeze
|
44
45
|
JPG = "JPG".freeze
|
45
46
|
PNG = "PNG".freeze
|
46
47
|
JPEG = "JPEG".freeze
|
@@ -57,7 +58,7 @@ module Carbon
|
|
57
58
|
WEBM = "WEBM".freeze
|
58
59
|
|
59
60
|
def self.all_vars
|
60
|
-
@all_vars ||= [GOOGLE_DRIVE, NOTION, NOTION_DATABASE, INTERCOM, DROPBOX, ONEDRIVE, SHAREPOINT, CONFLUENCE, BOX, ZENDESK, ZOTERO, S3, GMAIL, OUTLOOK, TEXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, RAW_TEXT, WEB_SCRAPE, RSS_FEED, FRESHDESK, GITBOOK, SALESFORCE, JPG, PNG, JPEG, MP3, MP4, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, WEBM].freeze
|
61
|
+
@all_vars ||= [GOOGLE_DRIVE, NOTION, NOTION_DATABASE, INTERCOM, DROPBOX, ONEDRIVE, SHAREPOINT, CONFLUENCE, BOX, ZENDESK, ZOTERO, S3, GMAIL, OUTLOOK, TEXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, RAW_TEXT, WEB_SCRAPE, RSS_FEED, FRESHDESK, GITBOOK, SALESFORCE, GITHUB, JPG, PNG, JPEG, MP3, MP4, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, WEBM].freeze
|
61
62
|
end
|
62
63
|
|
63
64
|
# Builds the enum from string
|
@@ -35,6 +35,7 @@ module Carbon
|
|
35
35
|
WEB_SCRAPE = "WEB_SCRAPE".freeze
|
36
36
|
GITBOOK = "GITBOOK".freeze
|
37
37
|
SALESFORCE = "SALESFORCE".freeze
|
38
|
+
GITHUB = "GITHUB".freeze
|
38
39
|
JPG = "JPG".freeze
|
39
40
|
PNG = "PNG".freeze
|
40
41
|
MP3 = "MP3".freeze
|
@@ -50,7 +51,7 @@ module Carbon
|
|
50
51
|
WEBM = "WEBM".freeze
|
51
52
|
|
52
53
|
def self.all_vars
|
53
|
-
@all_vars ||= [TXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, NOTION, GOOGLE_DOCS, GOOGLE_SHEETS, GOOGLE_SLIDES, INTERCOM, CONFLUENCE, RSS_FEED, GMAIL, OUTLOOK, ZENDESK, FRESHDESK, WEB_SCRAPE, GITBOOK, SALESFORCE, JPG, PNG, MP3, MP4, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, WEBM].freeze
|
54
|
+
@all_vars ||= [TXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, NOTION, GOOGLE_DOCS, GOOGLE_SHEETS, GOOGLE_SLIDES, INTERCOM, CONFLUENCE, RSS_FEED, GMAIL, OUTLOOK, ZENDESK, FRESHDESK, WEB_SCRAPE, GITBOOK, SALESFORCE, GITHUB, JPG, PNG, MP3, MP4, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, WEBM].freeze
|
54
55
|
end
|
55
56
|
|
56
57
|
# Builds the enum from string
|
@@ -35,6 +35,7 @@ module Carbon
|
|
35
35
|
WEB_SCRAPE = "WEB_SCRAPE".freeze
|
36
36
|
GITBOOK = "GITBOOK".freeze
|
37
37
|
SALESFORCE = "SALESFORCE".freeze
|
38
|
+
GITHUB = "GITHUB".freeze
|
38
39
|
JPG = "JPG".freeze
|
39
40
|
PNG = "PNG".freeze
|
40
41
|
MP3 = "MP3".freeze
|
@@ -50,7 +51,7 @@ module Carbon
|
|
50
51
|
WEBM = "WEBM".freeze
|
51
52
|
|
52
53
|
def self.all_vars
|
53
|
-
@all_vars ||= [TXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, NOTION, GOOGLE_DOCS, GOOGLE_SHEETS, GOOGLE_SLIDES, INTERCOM, CONFLUENCE, RSS_FEED, GMAIL, OUTLOOK, ZENDESK, FRESHDESK, WEB_SCRAPE, GITBOOK, SALESFORCE, JPG, PNG, MP3, MP4, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, WEBM].freeze
|
54
|
+
@all_vars ||= [TXT, CSV, TSV, PDF, DOCX, PPTX, XLSX, MD, RTF, JSON, NOTION, GOOGLE_DOCS, GOOGLE_SHEETS, GOOGLE_SLIDES, INTERCOM, CONFLUENCE, RSS_FEED, GMAIL, OUTLOOK, ZENDESK, FRESHDESK, WEB_SCRAPE, GITBOOK, SALESFORCE, GITHUB, JPG, PNG, MP3, MP4, MP2, AAC, WAV, FLAC, PCM, M4_A, OGG, OPUS, WEBM].freeze
|
54
55
|
end
|
55
56
|
|
56
57
|
# Builds the enum from string
|
@@ -0,0 +1,244 @@
|
|
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 GithubAuthentication
|
14
|
+
attr_accessor :source
|
15
|
+
|
16
|
+
attr_accessor :access_token
|
17
|
+
|
18
|
+
attr_accessor :username
|
19
|
+
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
21
|
+
def self.attribute_map
|
22
|
+
{
|
23
|
+
:'source' => :'source',
|
24
|
+
:'access_token' => :'access_token',
|
25
|
+
:'username' => :'username'
|
26
|
+
}
|
27
|
+
end
|
28
|
+
|
29
|
+
# Returns all the JSON keys this model knows about
|
30
|
+
def self.acceptable_attributes
|
31
|
+
attribute_map.values
|
32
|
+
end
|
33
|
+
|
34
|
+
# Attribute type mapping.
|
35
|
+
def self.openapi_types
|
36
|
+
{
|
37
|
+
:'source' => :'Object',
|
38
|
+
:'access_token' => :'String',
|
39
|
+
:'username' => :'String'
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
# List of attributes with nullable: true
|
44
|
+
def self.openapi_nullable
|
45
|
+
Set.new([
|
46
|
+
:'source',
|
47
|
+
])
|
48
|
+
end
|
49
|
+
|
50
|
+
# Initializes the object
|
51
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
52
|
+
def initialize(attributes = {})
|
53
|
+
if (!attributes.is_a?(Hash))
|
54
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Carbon::GithubAuthentication` initialize method"
|
55
|
+
end
|
56
|
+
|
57
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
58
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
59
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
60
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Carbon::GithubAuthentication`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
61
|
+
end
|
62
|
+
h[k.to_sym] = v
|
63
|
+
}
|
64
|
+
|
65
|
+
if attributes.key?(:'source')
|
66
|
+
self.source = attributes[:'source']
|
67
|
+
end
|
68
|
+
|
69
|
+
if attributes.key?(:'access_token')
|
70
|
+
self.access_token = attributes[:'access_token']
|
71
|
+
end
|
72
|
+
|
73
|
+
if attributes.key?(:'username')
|
74
|
+
self.username = attributes[:'username']
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
79
|
+
# @return Array for valid properties with the reasons
|
80
|
+
def list_invalid_properties
|
81
|
+
invalid_properties = Array.new
|
82
|
+
if @access_token.nil?
|
83
|
+
invalid_properties.push('invalid value for "access_token", access_token cannot be nil.')
|
84
|
+
end
|
85
|
+
|
86
|
+
if @username.nil?
|
87
|
+
invalid_properties.push('invalid value for "username", username cannot be nil.')
|
88
|
+
end
|
89
|
+
|
90
|
+
invalid_properties
|
91
|
+
end
|
92
|
+
|
93
|
+
# Check to see if the all the properties in the model are valid
|
94
|
+
# @return true if the model is valid
|
95
|
+
def valid?
|
96
|
+
return false if @access_token.nil?
|
97
|
+
return false if @username.nil?
|
98
|
+
true
|
99
|
+
end
|
100
|
+
|
101
|
+
# Checks equality by comparing each attribute.
|
102
|
+
# @param [Object] Object to be compared
|
103
|
+
def ==(o)
|
104
|
+
return true if self.equal?(o)
|
105
|
+
self.class == o.class &&
|
106
|
+
source == o.source &&
|
107
|
+
access_token == o.access_token &&
|
108
|
+
username == o.username
|
109
|
+
end
|
110
|
+
|
111
|
+
# @see the `==` method
|
112
|
+
# @param [Object] Object to be compared
|
113
|
+
def eql?(o)
|
114
|
+
self == o
|
115
|
+
end
|
116
|
+
|
117
|
+
# Calculates hash code according to all attributes.
|
118
|
+
# @return [Integer] Hash code
|
119
|
+
def hash
|
120
|
+
[source, access_token, username].hash
|
121
|
+
end
|
122
|
+
|
123
|
+
# Builds the object from hash
|
124
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
125
|
+
# @return [Object] Returns the model itself
|
126
|
+
def self.build_from_hash(attributes)
|
127
|
+
new.build_from_hash(attributes)
|
128
|
+
end
|
129
|
+
|
130
|
+
# Builds the object from hash
|
131
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
132
|
+
# @return [Object] Returns the model itself
|
133
|
+
def build_from_hash(attributes)
|
134
|
+
return nil unless attributes.is_a?(Hash)
|
135
|
+
attributes = attributes.transform_keys(&:to_sym)
|
136
|
+
self.class.openapi_types.each_pair do |key, type|
|
137
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
138
|
+
self.send("#{key}=", nil)
|
139
|
+
elsif type =~ /\AArray<(.*)>/i
|
140
|
+
# check to ensure the input is an array given that the attribute
|
141
|
+
# is documented as an array but the input is not
|
142
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
143
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
144
|
+
end
|
145
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
146
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|
150
|
+
self
|
151
|
+
end
|
152
|
+
|
153
|
+
# Deserializes the data based on type
|
154
|
+
# @param string type Data type
|
155
|
+
# @param string value Value to be deserialized
|
156
|
+
# @return [Object] Deserialized data
|
157
|
+
def _deserialize(type, value)
|
158
|
+
case type.to_sym
|
159
|
+
when :Time
|
160
|
+
Time.parse(value)
|
161
|
+
when :Date
|
162
|
+
Date.parse(value)
|
163
|
+
when :String
|
164
|
+
value.to_s
|
165
|
+
when :Integer
|
166
|
+
value.to_i
|
167
|
+
when :Float
|
168
|
+
value.to_f
|
169
|
+
when :Boolean
|
170
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
171
|
+
true
|
172
|
+
else
|
173
|
+
false
|
174
|
+
end
|
175
|
+
when :Object
|
176
|
+
# generic object (usually a Hash), return directly
|
177
|
+
value
|
178
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
179
|
+
inner_type = Regexp.last_match[:inner_type]
|
180
|
+
value.map { |v| _deserialize(inner_type, v) }
|
181
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
182
|
+
k_type = Regexp.last_match[:k_type]
|
183
|
+
v_type = Regexp.last_match[:v_type]
|
184
|
+
{}.tap do |hash|
|
185
|
+
value.each do |k, v|
|
186
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
187
|
+
end
|
188
|
+
end
|
189
|
+
else # model
|
190
|
+
# models (e.g. Pet) or oneOf
|
191
|
+
klass = Carbon.const_get(type)
|
192
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
193
|
+
end
|
194
|
+
end
|
195
|
+
|
196
|
+
# Returns the string representation of the object
|
197
|
+
# @return [String] String presentation of the object
|
198
|
+
def to_s
|
199
|
+
to_hash.to_s
|
200
|
+
end
|
201
|
+
|
202
|
+
# to_body is an alias to to_hash (backward compatibility)
|
203
|
+
# @return [Hash] Returns the object in the form of hash
|
204
|
+
def to_body
|
205
|
+
to_hash
|
206
|
+
end
|
207
|
+
|
208
|
+
# Returns the object in the form of hash
|
209
|
+
# @return [Hash] Returns the object in the form of hash
|
210
|
+
def to_hash
|
211
|
+
hash = {}
|
212
|
+
self.class.attribute_map.each_pair do |attr, param|
|
213
|
+
value = self.send(attr)
|
214
|
+
if value.nil?
|
215
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
216
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
217
|
+
end
|
218
|
+
|
219
|
+
hash[param] = _to_hash(value)
|
220
|
+
end
|
221
|
+
hash
|
222
|
+
end
|
223
|
+
|
224
|
+
# Outputs non-array value in the form of hash
|
225
|
+
# For object, use to_hash. Otherwise, just return the value
|
226
|
+
# @param [Object] value Any valid value
|
227
|
+
# @return [Hash] Returns the value in the form of hash
|
228
|
+
def _to_hash(value)
|
229
|
+
if value.is_a?(Array)
|
230
|
+
value.compact.map { |v| _to_hash(v) }
|
231
|
+
elsif value.is_a?(Hash)
|
232
|
+
{}.tap do |hash|
|
233
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
234
|
+
end
|
235
|
+
elsif value.respond_to? :to_hash
|
236
|
+
value.to_hash
|
237
|
+
else
|
238
|
+
value
|
239
|
+
end
|
240
|
+
end
|
241
|
+
|
242
|
+
end
|
243
|
+
|
244
|
+
end
|
@@ -0,0 +1,234 @@
|
|
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 GithubConnectRequest
|
14
|
+
attr_accessor :username
|
15
|
+
|
16
|
+
attr_accessor :access_token
|
17
|
+
|
18
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
19
|
+
def self.attribute_map
|
20
|
+
{
|
21
|
+
:'username' => :'username',
|
22
|
+
:'access_token' => :'access_token'
|
23
|
+
}
|
24
|
+
end
|
25
|
+
|
26
|
+
# Returns all the JSON keys this model knows about
|
27
|
+
def self.acceptable_attributes
|
28
|
+
attribute_map.values
|
29
|
+
end
|
30
|
+
|
31
|
+
# Attribute type mapping.
|
32
|
+
def self.openapi_types
|
33
|
+
{
|
34
|
+
:'username' => :'String',
|
35
|
+
:'access_token' => :'String'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# List of attributes with nullable: true
|
40
|
+
def self.openapi_nullable
|
41
|
+
Set.new([
|
42
|
+
])
|
43
|
+
end
|
44
|
+
|
45
|
+
# Initializes the object
|
46
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
47
|
+
def initialize(attributes = {})
|
48
|
+
if (!attributes.is_a?(Hash))
|
49
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Carbon::GithubConnectRequest` initialize method"
|
50
|
+
end
|
51
|
+
|
52
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
53
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
54
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
55
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Carbon::GithubConnectRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
56
|
+
end
|
57
|
+
h[k.to_sym] = v
|
58
|
+
}
|
59
|
+
|
60
|
+
if attributes.key?(:'username')
|
61
|
+
self.username = attributes[:'username']
|
62
|
+
end
|
63
|
+
|
64
|
+
if attributes.key?(:'access_token')
|
65
|
+
self.access_token = attributes[:'access_token']
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
70
|
+
# @return Array for valid properties with the reasons
|
71
|
+
def list_invalid_properties
|
72
|
+
invalid_properties = Array.new
|
73
|
+
if @username.nil?
|
74
|
+
invalid_properties.push('invalid value for "username", username cannot be nil.')
|
75
|
+
end
|
76
|
+
|
77
|
+
if @access_token.nil?
|
78
|
+
invalid_properties.push('invalid value for "access_token", access_token cannot be nil.')
|
79
|
+
end
|
80
|
+
|
81
|
+
invalid_properties
|
82
|
+
end
|
83
|
+
|
84
|
+
# Check to see if the all the properties in the model are valid
|
85
|
+
# @return true if the model is valid
|
86
|
+
def valid?
|
87
|
+
return false if @username.nil?
|
88
|
+
return false if @access_token.nil?
|
89
|
+
true
|
90
|
+
end
|
91
|
+
|
92
|
+
# Checks equality by comparing each attribute.
|
93
|
+
# @param [Object] Object to be compared
|
94
|
+
def ==(o)
|
95
|
+
return true if self.equal?(o)
|
96
|
+
self.class == o.class &&
|
97
|
+
username == o.username &&
|
98
|
+
access_token == o.access_token
|
99
|
+
end
|
100
|
+
|
101
|
+
# @see the `==` method
|
102
|
+
# @param [Object] Object to be compared
|
103
|
+
def eql?(o)
|
104
|
+
self == o
|
105
|
+
end
|
106
|
+
|
107
|
+
# Calculates hash code according to all attributes.
|
108
|
+
# @return [Integer] Hash code
|
109
|
+
def hash
|
110
|
+
[username, access_token].hash
|
111
|
+
end
|
112
|
+
|
113
|
+
# Builds the object from hash
|
114
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
115
|
+
# @return [Object] Returns the model itself
|
116
|
+
def self.build_from_hash(attributes)
|
117
|
+
new.build_from_hash(attributes)
|
118
|
+
end
|
119
|
+
|
120
|
+
# Builds the object from hash
|
121
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
122
|
+
# @return [Object] Returns the model itself
|
123
|
+
def build_from_hash(attributes)
|
124
|
+
return nil unless attributes.is_a?(Hash)
|
125
|
+
attributes = attributes.transform_keys(&:to_sym)
|
126
|
+
self.class.openapi_types.each_pair do |key, type|
|
127
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
128
|
+
self.send("#{key}=", nil)
|
129
|
+
elsif type =~ /\AArray<(.*)>/i
|
130
|
+
# check to ensure the input is an array given that the attribute
|
131
|
+
# is documented as an array but the input is not
|
132
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
133
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
134
|
+
end
|
135
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
136
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
self
|
141
|
+
end
|
142
|
+
|
143
|
+
# Deserializes the data based on type
|
144
|
+
# @param string type Data type
|
145
|
+
# @param string value Value to be deserialized
|
146
|
+
# @return [Object] Deserialized data
|
147
|
+
def _deserialize(type, value)
|
148
|
+
case type.to_sym
|
149
|
+
when :Time
|
150
|
+
Time.parse(value)
|
151
|
+
when :Date
|
152
|
+
Date.parse(value)
|
153
|
+
when :String
|
154
|
+
value.to_s
|
155
|
+
when :Integer
|
156
|
+
value.to_i
|
157
|
+
when :Float
|
158
|
+
value.to_f
|
159
|
+
when :Boolean
|
160
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
161
|
+
true
|
162
|
+
else
|
163
|
+
false
|
164
|
+
end
|
165
|
+
when :Object
|
166
|
+
# generic object (usually a Hash), return directly
|
167
|
+
value
|
168
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
169
|
+
inner_type = Regexp.last_match[:inner_type]
|
170
|
+
value.map { |v| _deserialize(inner_type, v) }
|
171
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
172
|
+
k_type = Regexp.last_match[:k_type]
|
173
|
+
v_type = Regexp.last_match[:v_type]
|
174
|
+
{}.tap do |hash|
|
175
|
+
value.each do |k, v|
|
176
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
177
|
+
end
|
178
|
+
end
|
179
|
+
else # model
|
180
|
+
# models (e.g. Pet) or oneOf
|
181
|
+
klass = Carbon.const_get(type)
|
182
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
183
|
+
end
|
184
|
+
end
|
185
|
+
|
186
|
+
# Returns the string representation of the object
|
187
|
+
# @return [String] String presentation of the object
|
188
|
+
def to_s
|
189
|
+
to_hash.to_s
|
190
|
+
end
|
191
|
+
|
192
|
+
# to_body is an alias to to_hash (backward compatibility)
|
193
|
+
# @return [Hash] Returns the object in the form of hash
|
194
|
+
def to_body
|
195
|
+
to_hash
|
196
|
+
end
|
197
|
+
|
198
|
+
# Returns the object in the form of hash
|
199
|
+
# @return [Hash] Returns the object in the form of hash
|
200
|
+
def to_hash
|
201
|
+
hash = {}
|
202
|
+
self.class.attribute_map.each_pair do |attr, param|
|
203
|
+
value = self.send(attr)
|
204
|
+
if value.nil?
|
205
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
206
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
207
|
+
end
|
208
|
+
|
209
|
+
hash[param] = _to_hash(value)
|
210
|
+
end
|
211
|
+
hash
|
212
|
+
end
|
213
|
+
|
214
|
+
# Outputs non-array value in the form of hash
|
215
|
+
# For object, use to_hash. Otherwise, just return the value
|
216
|
+
# @param [Object] value Any valid value
|
217
|
+
# @return [Hash] Returns the value in the form of hash
|
218
|
+
def _to_hash(value)
|
219
|
+
if value.is_a?(Array)
|
220
|
+
value.compact.map { |v| _to_hash(v) }
|
221
|
+
elsif value.is_a?(Hash)
|
222
|
+
{}.tap do |hash|
|
223
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
224
|
+
end
|
225
|
+
elsif value.respond_to? :to_hash
|
226
|
+
value.to_hash
|
227
|
+
else
|
228
|
+
value
|
229
|
+
end
|
230
|
+
end
|
231
|
+
|
232
|
+
end
|
233
|
+
|
234
|
+
end
|
@@ -61,7 +61,7 @@ module Carbon
|
|
61
61
|
|
62
62
|
attr_accessor :parse_pdf_tables_with_ocr
|
63
63
|
|
64
|
-
# Enable integration's file picker for sources that support it. Supported sources:
|
64
|
+
# Enable integration's file picker for sources that support it. Supported sources: ONEDRIVE, DROPBOX, BOX, GOOGLE_DRIVE, SHAREPOINT
|
65
65
|
attr_accessor :enable_file_picker
|
66
66
|
|
67
67
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -99,6 +99,7 @@ module Carbon
|
|
99
99
|
:'token',
|
100
100
|
:'source_items_synced_at',
|
101
101
|
:'enable_auto_sync',
|
102
|
+
:'files_synced_at'
|
102
103
|
])
|
103
104
|
end
|
104
105
|
|
@@ -230,10 +231,6 @@ module Carbon
|
|
230
231
|
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
231
232
|
end
|
232
233
|
|
233
|
-
if @files_synced_at.nil?
|
234
|
-
invalid_properties.push('invalid value for "files_synced_at", files_synced_at cannot be nil.')
|
235
|
-
end
|
236
|
-
|
237
234
|
invalid_properties
|
238
235
|
end
|
239
236
|
|
@@ -251,7 +248,6 @@ module Carbon
|
|
251
248
|
return false if @last_sync_action.nil?
|
252
249
|
return false if @created_at.nil?
|
253
250
|
return false if @updated_at.nil?
|
254
|
-
return false if @files_synced_at.nil?
|
255
251
|
true
|
256
252
|
end
|
257
253
|
|
@@ -50,6 +50,9 @@ module Carbon
|
|
50
50
|
# Filter by request ID(s) which were used to sync the files
|
51
51
|
attr_accessor :request_ids
|
52
52
|
|
53
|
+
# The error message of the file. The query will return files with error messages that contain this string. To search for files with no error message, use an empty string.
|
54
|
+
attr_accessor :sync_error_message
|
55
|
+
|
53
56
|
# Attribute mapping from ruby-style variable name to JSON key.
|
54
57
|
def self.attribute_map
|
55
58
|
{
|
@@ -66,7 +69,8 @@ module Carbon
|
|
66
69
|
:'root_files_only' => :'root_files_only',
|
67
70
|
:'include_all_children' => :'include_all_children',
|
68
71
|
:'non_synced_only' => :'non_synced_only',
|
69
|
-
:'request_ids' => :'request_ids'
|
72
|
+
:'request_ids' => :'request_ids',
|
73
|
+
:'sync_error_message' => :'sync_error_message'
|
70
74
|
}
|
71
75
|
end
|
72
76
|
|
@@ -91,7 +95,8 @@ module Carbon
|
|
91
95
|
:'root_files_only' => :'Boolean',
|
92
96
|
:'include_all_children' => :'Boolean',
|
93
97
|
:'non_synced_only' => :'Boolean',
|
94
|
-
:'request_ids' => :'Array<String>'
|
98
|
+
:'request_ids' => :'Array<String>',
|
99
|
+
:'sync_error_message' => :'String'
|
95
100
|
}
|
96
101
|
end
|
97
102
|
|
@@ -109,7 +114,8 @@ module Carbon
|
|
109
114
|
:'organization_user_data_source_id',
|
110
115
|
:'embedding_generators',
|
111
116
|
:'root_files_only',
|
112
|
-
:'request_ids'
|
117
|
+
:'request_ids',
|
118
|
+
:'sync_error_message'
|
113
119
|
])
|
114
120
|
end
|
115
121
|
|
@@ -203,6 +209,10 @@ module Carbon
|
|
203
209
|
self.request_ids = value
|
204
210
|
end
|
205
211
|
end
|
212
|
+
|
213
|
+
if attributes.key?(:'sync_error_message')
|
214
|
+
self.sync_error_message = attributes[:'sync_error_message']
|
215
|
+
end
|
206
216
|
end
|
207
217
|
|
208
218
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -251,7 +261,8 @@ module Carbon
|
|
251
261
|
root_files_only == o.root_files_only &&
|
252
262
|
include_all_children == o.include_all_children &&
|
253
263
|
non_synced_only == o.non_synced_only &&
|
254
|
-
request_ids == o.request_ids
|
264
|
+
request_ids == o.request_ids &&
|
265
|
+
sync_error_message == o.sync_error_message
|
255
266
|
end
|
256
267
|
|
257
268
|
# @see the `==` method
|
@@ -263,7 +274,7 @@ module Carbon
|
|
263
274
|
# Calculates hash code according to all attributes.
|
264
275
|
# @return [Integer] Hash code
|
265
276
|
def hash
|
266
|
-
[tags, source, name, tags_v2, ids, external_file_ids, sync_statuses, parent_file_ids, organization_user_data_source_id, embedding_generators, root_files_only, include_all_children, non_synced_only, request_ids].hash
|
277
|
+
[tags, source, name, tags_v2, ids, external_file_ids, sync_statuses, parent_file_ids, organization_user_data_source_id, embedding_generators, root_files_only, include_all_children, non_synced_only, request_ids, sync_error_message].hash
|
267
278
|
end
|
268
279
|
|
269
280
|
# Builds the object from hash
|
data/lib/carbon_ruby_sdk.rb
CHANGED
@@ -60,6 +60,8 @@ require 'carbon_ruby_sdk/models/get_embedding_documents_body'
|
|
60
60
|
require 'carbon_ruby_sdk/models/gitbook_authetication'
|
61
61
|
require 'carbon_ruby_sdk/models/gitbook_connect_request'
|
62
62
|
require 'carbon_ruby_sdk/models/gitbook_sync_request'
|
63
|
+
require 'carbon_ruby_sdk/models/github_authentication'
|
64
|
+
require 'carbon_ruby_sdk/models/github_connect_request'
|
63
65
|
require 'carbon_ruby_sdk/models/gmail_sync_input'
|
64
66
|
require 'carbon_ruby_sdk/models/http_validation_error'
|
65
67
|
require 'carbon_ruby_sdk/models/hybrid_search_tuning_params'
|
@@ -191,6 +191,18 @@ describe 'IntegrationsApi' do
|
|
191
191
|
end
|
192
192
|
end
|
193
193
|
|
194
|
+
# unit tests for sync_git_hub
|
195
|
+
# Github Connect
|
196
|
+
# Refer this article to obtain an access token https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens. Make sure that your access token has the permission to read content from your desired repos. Note that if your access token expires you will need to manually update it through this endpoint.
|
197
|
+
# @param github_connect_request
|
198
|
+
# @param [Hash] opts the optional parameters
|
199
|
+
# @return [GenericSuccessResponse]
|
200
|
+
describe 'sync_git_hub test' do
|
201
|
+
it 'should work' do
|
202
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
203
|
+
end
|
204
|
+
end
|
205
|
+
|
194
206
|
# unit tests for sync_gitbook
|
195
207
|
# Gitbook Sync
|
196
208
|
# 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.
|
@@ -0,0 +1,40 @@
|
|
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::GithubAuthentication
|
14
|
+
describe Carbon::GithubAuthentication do
|
15
|
+
let(:instance) { Carbon::GithubAuthentication.new }
|
16
|
+
|
17
|
+
describe 'test an instance of GithubAuthentication' do
|
18
|
+
it 'should create an instance of GithubAuthentication' do
|
19
|
+
expect(instance).to be_instance_of(Carbon::GithubAuthentication)
|
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 "username"' 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
|
+
end
|
@@ -0,0 +1,34 @@
|
|
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::GithubConnectRequest
|
14
|
+
describe Carbon::GithubConnectRequest do
|
15
|
+
let(:instance) { Carbon::GithubConnectRequest.new }
|
16
|
+
|
17
|
+
describe 'test an instance of GithubConnectRequest' do
|
18
|
+
it 'should create an instance of GithubConnectRequest' do
|
19
|
+
expect(instance).to be_instance_of(Carbon::GithubConnectRequest)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
describe 'test attribute "username"' 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
|
+
end
|
@@ -103,4 +103,10 @@ describe Carbon::OrganizationUserFilesToSyncFilters do
|
|
103
103
|
end
|
104
104
|
end
|
105
105
|
|
106
|
+
describe 'test attribute "sync_error_message"' do
|
107
|
+
it 'should work' do
|
108
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
106
112
|
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.1.
|
4
|
+
version: 0.1.22
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Konfig
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-04-
|
11
|
+
date: 2024-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -143,6 +143,8 @@ files:
|
|
143
143
|
- lib/carbon_ruby_sdk/models/gitbook_authetication.rb
|
144
144
|
- lib/carbon_ruby_sdk/models/gitbook_connect_request.rb
|
145
145
|
- lib/carbon_ruby_sdk/models/gitbook_sync_request.rb
|
146
|
+
- lib/carbon_ruby_sdk/models/github_authentication.rb
|
147
|
+
- lib/carbon_ruby_sdk/models/github_connect_request.rb
|
146
148
|
- lib/carbon_ruby_sdk/models/gmail_sync_input.rb
|
147
149
|
- lib/carbon_ruby_sdk/models/http_validation_error.rb
|
148
150
|
- lib/carbon_ruby_sdk/models/hybrid_search_tuning_params.rb
|
@@ -276,6 +278,8 @@ files:
|
|
276
278
|
- spec/models/gitbook_authetication_spec.rb
|
277
279
|
- spec/models/gitbook_connect_request_spec.rb
|
278
280
|
- spec/models/gitbook_sync_request_spec.rb
|
281
|
+
- spec/models/github_authentication_spec.rb
|
282
|
+
- spec/models/github_connect_request_spec.rb
|
279
283
|
- spec/models/gmail_sync_input_spec.rb
|
280
284
|
- spec/models/http_validation_error_spec.rb
|
281
285
|
- spec/models/hybrid_search_tuning_params_nullable_spec.rb
|
@@ -401,7 +405,9 @@ test_files:
|
|
401
405
|
- spec/models/webhook_spec.rb
|
402
406
|
- spec/models/data_source_type_spec.rb
|
403
407
|
- spec/models/sync_files_request_spec.rb
|
408
|
+
- spec/models/github_connect_request_spec.rb
|
404
409
|
- spec/models/list_data_source_items_response_spec.rb
|
410
|
+
- spec/models/github_authentication_spec.rb
|
405
411
|
- spec/models/chunk_properties_nullable_spec.rb
|
406
412
|
- spec/models/gitbook_connect_request_spec.rb
|
407
413
|
- spec/models/token_response_spec.rb
|