=begin #Carbon #Connect external data to LLMs, no matter the source. The version of the OpenAPI document: 1.0.0 =end require 'spec_helper' require 'json' # Unit tests for Carbon::IntegrationsApi describe 'IntegrationsApi' do before do # run before each test @api_instance = Carbon::IntegrationsApi.new end after do # run after each test end describe 'test an instance of IntegrationsApi' do it 'should create an instance of IntegrationsApi' do expect(@api_instance).to be_instance_of(Carbon::IntegrationsApi) end end # unit tests for connect_data_source # Connect Data Source # @param connect_data_source_input # @param [Hash] opts the optional parameters # @return [ConnectDataSourceResponse] describe 'connect_data_source test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for connect_freshdesk # Freshdesk Connect # Refer this article to obtain an API key https://support.freshdesk.com/en/support/solutions/articles/215517. Make sure that your API key has the permission to read solutions from your account and you are on a <b>paid</b> plan. Once you have an API key, you can make a request to this endpoint along with your freshdesk domain. This will trigger an automatic sync of the articles in your \"solutions\" tab. Additional parameters below can be used to associate data with the synced articles or modify the sync behavior. # @param fresh_desk_connect_request # @param [Hash] opts the optional parameters # @return [GenericSuccessResponse] describe 'connect_freshdesk test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for connect_gitbook # Gitbook Connect # You will need an access token to connect your Gitbook account. Note that the permissions will be defined by the user generating access token so make sure you have the permission to access spaces you will be syncing. Refer this article for more details https://developer.gitbook.com/gitbook-api/authentication. Additionally, you need to specify the name of organization you will be syncing data from. # @param gitbook_connect_request # @param [Hash] opts the optional parameters # @return [GenericSuccessResponse] describe 'connect_gitbook test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for create_aws_iam_user # S3 Auth # Create a new IAM user with permissions to: <ol> <li>List all buckets.</li> <li>Read from the specific buckets and objects to sync with Carbon. Ensure any future buckets or objects carry the same permissions.</li> </ol> Once created, generate an access key for this user and share the credentials with us. We recommend testing this key beforehand. # @param s3_auth_request # @param [Hash] opts the optional parameters # @return [OrganizationUserDataSourceAPI] describe 'create_aws_iam_user test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_oauth_url # Get Oauth Url # This endpoint can be used to generate the following URLs - An OAuth URL for OAuth based connectors - A file syncing URL which skips the OAuth flow if the user already has a valid access token and takes them to the success state. # @param o_auth_url_request # @param [Hash] opts the optional parameters # @return [OuthURLResponse] describe 'get_oauth_url test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for list_confluence_pages # Confluence List # To begin listing a user's Confluence pages, at least a `data_source_id` of a connected Confluence account must be specified. This base request returns a list of root pages for every space the user has access to in a Confluence instance. To traverse further down the user's page directory, additional requests to this endpoint can be made with the same `data_source_id` and with `parent_id` set to the id of page from a previous request. For convenience, the `has_children` property in each directory item in the response list will flag which pages will return non-empty lists of pages when set as the `parent_id`. # @param list_request # @param [Hash] opts the optional parameters # @return [ListResponse] describe 'list_confluence_pages test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for list_data_source_items # List Data Source Items # @param list_data_source_items_request # @param [Hash] opts the optional parameters # @return [ListDataSourceItemsResponse] describe 'list_data_source_items test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for list_folders # Outlook Folders # After connecting your Outlook account, you can use this endpoint to list all of your folders on outlook. This includes both system folders like \"inbox\" and user created folders. # @param [Hash] opts the optional parameters # @option opts [Integer] :data_source_id # @return [Object] describe 'list_folders test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for list_gitbook_spaces # Gitbook Spaces # After connecting your Gitbook account, you can use this endpoint to list all of your spaces under current organization. # @param data_source_id # @param [Hash] opts the optional parameters # @return [Object] describe 'list_gitbook_spaces test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for list_labels # Gmail Labels # After connecting your Gmail account, you can use this endpoint to list all of your labels. User created labels will have the type \"user\" and Gmail's default labels will have the type \"system\" # @param [Hash] opts the optional parameters # @option opts [Integer] :data_source_id # @return [Object] describe 'list_labels test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for list_outlook_categories # Outlook Categories # After connecting your Outlook account, you can use this endpoint to list all of your categories on outlook. We currently support listing up to 250 categories. # @param [Hash] opts the optional parameters # @option opts [Integer] :data_source_id # @return [Object] describe 'list_outlook_categories test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for list_repos # Github List Repos # Once you have connected your GitHub account, you can use this endpoint to list the repositories your account has access to. You can use a data source ID or username to fetch from a specific account. # @param [Hash] opts the optional parameters # @option opts [Integer] :per_page # @option opts [Integer] :page # @option opts [Integer] :data_source_id # @return [Object] describe 'list_repos test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for sync_confluence # Confluence Sync # After listing pages in a user's Confluence account, the set of selected page `ids` and the connected account's `data_source_id` can be passed into this endpoint to sync them into Carbon. Additional parameters listed below can be used to associate data to the selected pages or alter the behavior of the sync. # @param sync_files_request # @param [Hash] opts the optional parameters # @return [GenericSuccessResponse] describe 'sync_confluence test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for sync_data_source_items # Sync Data Source Items # @param sync_directory_request # @param [Hash] opts the optional parameters # @return [OrganizationUserDataSourceAPI] describe 'sync_data_source_items test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for sync_files # Sync Files # After listing files and folders via /integrations/items/sync and integrations/items/list, use the selected items' external ids as the ids in this endpoint to sync them into Carbon. Sharepoint items take an additional parameter root_id, which identifies the drive the file or folder is in and is stored in root_external_id. That additional paramter is optional and excluding it will tell the sync to assume the item is stored in the default Documents drive. # @param sync_files_request # @param [Hash] opts the optional parameters # @return [GenericSuccessResponse] describe 'sync_files test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for sync_git_hub # Github Connect # 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. # @param github_connect_request # @param [Hash] opts the optional parameters # @return [GenericSuccessResponse] describe 'sync_git_hub test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for sync_gitbook # Gitbook Sync # 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. # @param gitbook_sync_request # @param [Hash] opts the optional parameters # @return [Object] describe 'sync_gitbook test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for sync_gmail # Gmail Sync # Once you have successfully connected your gmail account, you can choose which emails to sync with us using the filters parameter. Filters is a JSON object with key value pairs. It also supports AND and OR operations. For now, we support a limited set of keys listed below. <b>label</b>: Inbuilt Gmail labels, for example \"Important\" or a custom label you created. <b>after</b> or <b>before</b>: A date in YYYY/mm/dd format (example 2023/12/31). Gets emails after/before a certain date. You can also use them in combination to get emails from a certain period. <b>is</b>: Can have the following values - starred, important, snoozed, and unread Using keys or values outside of the specified values can lead to unexpected behaviour. An example of a basic query with filters can be ```json { \"filters\": { \"key\": \"label\", \"value\": \"Test\" } } ``` Which will list all emails that have the label \"Test\". You can use AND and OR operation in the following way: ```json { \"filters\": { \"AND\": [ { \"key\": \"after\", \"value\": \"2024/01/07\" }, { \"OR\": [ { \"key\": \"label\", \"value\": \"Personal\" }, { \"key\": \"is\", \"value\": \"starred\" } ] } ] } } ``` This will return emails after 7th of Jan that are either starred or have the label \"Personal\". Note that this is the highest level of nesting we support, i.e. you can't add more AND/OR filters within the OR filter in the above example. # @param gmail_sync_input # @param [Hash] opts the optional parameters # @return [GenericSuccessResponse] describe 'sync_gmail test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for sync_outlook # Outlook Sync # Once you have successfully connected your Outlook account, you can choose which emails to sync with us using the filters and folder parameter. \"folder\" should be the folder you want to sync from Outlook. By default we get messages from your inbox folder. Filters is a JSON object with key value pairs. It also supports AND and OR operations. For now, we support a limited set of keys listed below. <b>category</b>: Custom categories that you created in Outlook. <b>after</b> or <b>before</b>: A date in YYYY/mm/dd format (example 2023/12/31). Gets emails after/before a certain date. You can also use them in combination to get emails from a certain period. <b>is</b>: Can have the following values: flagged An example of a basic query with filters can be ```json { \"filters\": { \"key\": \"category\", \"value\": \"Test\" } } ``` Which will list all emails that have the category \"Test\". Specifying a custom folder in the same query ```json { \"folder\": \"Folder Name\", \"filters\": { \"key\": \"category\", \"value\": \"Test\" } } ``` You can use AND and OR operation in the following way: ```json { \"filters\": { \"AND\": [ { \"key\": \"after\", \"value\": \"2024/01/07\" }, { \"OR\": [ { \"key\": \"category\", \"value\": \"Personal\" }, { \"key\": \"category\", \"value\": \"Test\" }, ] } ] } } ``` This will return emails after 7th of Jan that have either Personal or Test as category. Note that this is the highest level of nesting we support, i.e. you can't add more AND/OR filters within the OR filter in the above example. # @param outlook_sync_input # @param [Hash] opts the optional parameters # @return [GenericSuccessResponse] describe 'sync_outlook test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for sync_repos # Github Sync Repos # You can retreive repos your token has access to using /integrations/github/repos and sync their content. You can also pass full name of any public repository (username/repo-name). This will store the repo content with carbon which can be accessed through /integrations/items/list endpoint. Maximum of 25 repositories are accepted per request. # @param github_fetch_repos_request # @param [Hash] opts the optional parameters # @return [Object] describe 'sync_repos test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for sync_rss_feed # Rss Feed # @param rss_feed_input # @param [Hash] opts the optional parameters # @return [GenericSuccessResponse] describe 'sync_rss_feed test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for sync_s3_files # S3 Files # After optionally loading the items via /integrations/items/sync and integrations/items/list, use the bucket name and object key as the ID in this endpoint to sync them into Carbon. Additional parameters below can associate data with the selected items or modify the sync behavior # @param s3_file_sync_input # @param [Hash] opts the optional parameters # @return [GenericSuccessResponse] describe 'sync_s3_files test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end end