Skip to content

hubbleai/carbon-js-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

carbon-js-sdk

CarbonJsSdk - JavaScript client for carbon-js-sdk No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.JavascriptClientCodegen

Installation

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install carbon-js-sdk --save

Finally, you need to build the module:

npm run build
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

To use the link you just defined in your project, switch to the directory you want to use your carbon-js-sdk from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

Finally, you need to build the module:

npm run build

git

If the library is hosted at a git repository, e.g.https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:

    npm install GIT_USER_ID/GIT_REPO_ID --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var CarbonJsSdk = require('carbon-js-sdk');


var api = new CarbonJsSdk.AuthApi()
var authorization = "authorization_example"; // {String} 
var customerId = "customerId_example"; // {String} 
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAccessTokenAuthV1AccessTokenGet(authorization, customerId, callback);

Documentation for API Endpoints

All URIs are relative to https://api.carbon.ai

Class Method HTTP request Description
CarbonJsSdk.AuthApi getAccessTokenAuthV1AccessTokenGet GET /auth/v1/access_token Get Access Token
CarbonJsSdk.AuthApi getWhiteLabelingAuthV1WhiteLabelingGet GET /auth/v1/white_labeling Get White Labeling
CarbonJsSdk.DataSourcesApi revokeAccessTokenRevokeAccessTokenPost POST /revoke_access_token Revoke Access Token
CarbonJsSdk.DataSourcesApi userDataSourcesUserDataSourcesPost POST /user_data_sources User Data Sources
CarbonJsSdk.EmbeddingsApi embeddingsEmbeddingsPost POST /embeddings Embeddings
CarbonJsSdk.EmbeddingsApi retrieveEmbeddingsAndContentTextChunksPost POST /text_chunks Retrieve Embeddings And Content
CarbonJsSdk.EmbeddingsApi uploadChunksAndEmbeddingsUploadChunksAndEmbeddingsPost POST /upload_chunks_and_embeddings Upload Chunks And Embeddings
CarbonJsSdk.FilesApi createFileTagsCreateUserFileTagsPost POST /create_user_file_tags Create File Tags
CarbonJsSdk.FilesApi createRawTextUploadTextPost POST /upload_text Create Raw Text
CarbonJsSdk.FilesApi createUploadFileFromUrlUploadFileFromUrlPost POST /upload_file_from_url Create Upload File From Url
CarbonJsSdk.FilesApi createUploadFileUploadfilePost POST /uploadfile Create Upload File
CarbonJsSdk.FilesApi deleteFileEndpointDeletefileFileIdDelete DELETE /deletefile/{file_id} Delete File Endpoint
CarbonJsSdk.FilesApi deleteFileTagsDeleteUserFileTagsPost POST /delete_user_file_tags Delete File Tags
CarbonJsSdk.FilesApi deleteFilesEndpointDeleteFilesPost POST /delete_files Delete Files Endpoint
CarbonJsSdk.FilesApi parsedFileParsedFileFileIdGet GET /parsed_file/{file_id} Parsed File
CarbonJsSdk.FilesApi rawFileRawFileFileIdGet GET /raw_file/{file_id} Raw File
CarbonJsSdk.FilesApi resyncFileResyncFilePost POST /resync_file Resync File
CarbonJsSdk.FilesApi userFilesUserFilesPost POST /user_files User Files
CarbonJsSdk.FilesApi userFilesV2UserFilesV2Post POST /user_files_v2 User Files V2
CarbonJsSdk.HealthApi healthHealthGet GET /health Health
CarbonJsSdk.IntegrationsApi confluenceListIntegrationsConfluenceListPost POST /integrations/confluence/list Confluence List
CarbonJsSdk.IntegrationsApi confluenceSyncIntegrationsConfluenceSyncPost POST /integrations/confluence/sync Confluence Sync
CarbonJsSdk.IntegrationsApi freshdeskConnectIntegrationsFreshdeskPost POST /integrations/freshdesk Freshdesk Connect
CarbonJsSdk.IntegrationsApi getOauthUrlIntegrationsOauthUrlPost POST /integrations/oauth_url Get Oauth Url
CarbonJsSdk.IntegrationsApi gmailSyncIntegrationsGmailSyncPost POST /integrations/gmail/sync Gmail Sync
CarbonJsSdk.IntegrationsApi listDataSourceItemsIntegrationsItemsListPost POST /integrations/items/list List Data Source Items
CarbonJsSdk.IntegrationsApi outlookSyncIntegrationsOutlookSyncPost POST /integrations/outlook/sync Outlook Sync
CarbonJsSdk.IntegrationsApi rssFeedIntegrationsRssFeedPost POST /integrations/rss_feed Rss Feed
CarbonJsSdk.IntegrationsApi s3AuthIntegrationsS3Post POST /integrations/s3 S3 Auth
CarbonJsSdk.IntegrationsApi s3FilesIntegrationsS3FilesPost POST /integrations/s3/files S3 Files
CarbonJsSdk.IntegrationsApi syncDataSourceItemsIntegrationsItemsSyncPost POST /integrations/items/sync Sync Data Source Items
CarbonJsSdk.IntegrationsApi syncFilesIntegrationsFilesSyncPost POST /integrations/files/sync Sync Files
CarbonJsSdk.OrganizationsApi getOrganizationOrganizationGet GET /organization Get Organization
CarbonJsSdk.UsersApi toggleUserFeaturesModifyUserConfigurationPost POST /modify_user_configuration Toggle User Features
CarbonJsSdk.UsersApi userEndpointUserPost POST /user User Endpoint
CarbonJsSdk.UtilitiesApi fetchUrlsFetchUrlsGet GET /fetch_urls Fetch Urls
CarbonJsSdk.UtilitiesApi fetchYoutubeTranscriptsFetchYoutubeTranscriptGet GET /fetch_youtube_transcript Fetch Youtube Transcripts
CarbonJsSdk.UtilitiesApi scrapeSitemapScrapeSitemapPost POST /scrape_sitemap Scrape Sitemap
CarbonJsSdk.UtilitiesApi searchUrlsSearchUrlsGet GET /search_urls Search Urls
CarbonJsSdk.UtilitiesApi sitemapProcessSitemapGet GET /process_sitemap Sitemap
CarbonJsSdk.UtilitiesApi webScrapeWebScrapePost POST /web_scrape Web Scrape
CarbonJsSdk.WebhooksApi addWebhookUrlAddWebhookPost POST /add_webhook Add Webhook Url
CarbonJsSdk.WebhooksApi deleteWebhookUrlDeleteWebhookWebhookIdDelete DELETE /delete_webhook/{webhook_id} Delete Webhook Url
CarbonJsSdk.WebhooksApi webhookUrlsWebhooksPost POST /webhooks Webhook Urls

Documentation for Models

Documentation for Authorization

Endpoints do not require authorization.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published