diff --git a/packages/continue-sdk/clients/javascript/.babelrc b/packages/continue-sdk/clients/javascript/.babelrc deleted file mode 100644 index c73df9d50..000000000 --- a/packages/continue-sdk/clients/javascript/.babelrc +++ /dev/null @@ -1,33 +0,0 @@ -{ - "presets": [ - "@babel/preset-env" - ], - "plugins": [ - "@babel/plugin-syntax-dynamic-import", - "@babel/plugin-syntax-import-meta", - "@babel/plugin-proposal-class-properties", - "@babel/plugin-proposal-json-strings", - [ - "@babel/plugin-proposal-decorators", - { - "legacy": true - } - ], - "@babel/plugin-proposal-function-sent", - "@babel/plugin-proposal-export-namespace-from", - "@babel/plugin-proposal-numeric-separator", - "@babel/plugin-proposal-throw-expressions", - "@babel/plugin-proposal-export-default-from", - "@babel/plugin-proposal-logical-assignment-operators", - "@babel/plugin-proposal-optional-chaining", - [ - "@babel/plugin-proposal-pipeline-operator", - { - "proposal": "minimal" - } - ], - "@babel/plugin-proposal-nullish-coalescing-operator", - "@babel/plugin-proposal-do-expressions", - "@babel/plugin-proposal-function-bind" - ] -} diff --git a/packages/continue-sdk/clients/javascript/.gitignore b/packages/continue-sdk/clients/javascript/.gitignore deleted file mode 100644 index 6a7d6d8ef..000000000 --- a/packages/continue-sdk/clients/javascript/.gitignore +++ /dev/null @@ -1,130 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -lerna-debug.log* -.pnpm-debug.log* - -# Diagnostic reports (https://nodejs.org/api/report.html) -report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage -*.lcov - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/ -jspm_packages/ - -# Snowpack dependency directory (https://snowpack.dev/) -web_modules/ - -# TypeScript cache -*.tsbuildinfo - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Optional stylelint cache -.stylelintcache - -# Microbundle cache -.rpt2_cache/ -.rts2_cache_cjs/ -.rts2_cache_es/ -.rts2_cache_umd/ - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variable files -.env -.env.development.local -.env.test.local -.env.production.local -.env.local - -# parcel-bundler cache (https://parceljs.org/) -.cache -.parcel-cache - -# Next.js build output -.next -out - -# Nuxt.js build / generate output -.nuxt -dist - -# Gatsby files -.cache/ -# Comment in the public line in if your project uses Gatsby and not Next.js -# https://nextjs.org/blog/next-9-1#public-directory-support -# public - -# vuepress build output -.vuepress/dist - -# vuepress v2.x temp and cache directory -.temp -.cache - -# Docusaurus cache and generated files -.docusaurus - -# Serverless directories -.serverless/ - -# FuseBox cache -.fusebox/ - -# DynamoDB Local files -.dynamodb/ - -# TernJS port file -.tern-port - -# Stores VSCode versions used for testing VSCode extensions -.vscode-test - -# yarn v2 -.yarn/cache -.yarn/unplugged -.yarn/build-state.yml -.yarn/install-state.gz -.pnp.* \ No newline at end of file diff --git a/packages/continue-sdk/clients/javascript/.openapi-generator-ignore b/packages/continue-sdk/clients/javascript/.openapi-generator-ignore deleted file mode 100644 index 7484ee590..000000000 --- a/packages/continue-sdk/clients/javascript/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/packages/continue-sdk/clients/javascript/.openapi-generator/FILES b/packages/continue-sdk/clients/javascript/.openapi-generator/FILES deleted file mode 100644 index b56729a45..000000000 --- a/packages/continue-sdk/clients/javascript/.openapi-generator/FILES +++ /dev/null @@ -1,25 +0,0 @@ -.babelrc -.gitignore -.openapi-generator-ignore -.travis.yml -README.md -docs/DefaultApi.md -docs/ListAssistants200ResponseInner.md -docs/ListAssistants200ResponseInnerConfigResult.md -docs/ListAssistants401Response.md -docs/ListAssistants404Response.md -git_push.sh -mocha.opts -package.json -src/ApiClient.js -src/api/DefaultApi.js -src/index.js -src/models/ListAssistants200ResponseInner.js -src/models/ListAssistants200ResponseInnerConfigResult.js -src/models/ListAssistants401Response.js -src/models/ListAssistants404Response.js -test/api/DefaultApi.spec.js -test/model/ListAssistants200ResponseInner.spec.js -test/model/ListAssistants200ResponseInnerConfigResult.spec.js -test/model/ListAssistants401Response.spec.js -test/model/ListAssistants404Response.spec.js diff --git a/packages/continue-sdk/clients/javascript/.openapi-generator/VERSION b/packages/continue-sdk/clients/javascript/.openapi-generator/VERSION deleted file mode 100644 index 5f84a81db..000000000 --- a/packages/continue-sdk/clients/javascript/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.12.0 diff --git a/packages/continue-sdk/clients/javascript/.travis.yml b/packages/continue-sdk/clients/javascript/.travis.yml deleted file mode 100644 index 0968f7a43..000000000 --- a/packages/continue-sdk/clients/javascript/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -cache: npm -node_js: - - "6" - - "6.1" diff --git a/packages/continue-sdk/clients/javascript/README.md b/packages/continue-sdk/clients/javascript/README.md deleted file mode 100644 index f135228b3..000000000 --- a/packages/continue-sdk/clients/javascript/README.md +++ /dev/null @@ -1,152 +0,0 @@ -# continue_hub_ide_api - -ContinueHubIdeApi - JavaScript client for continue_hub_ide_api -API for Continue IDE to fetch assistants and other related information. -These endpoints are primarily used by the Continue IDE extensions for VS Code and JetBrains. - -This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 1.0.0 -- Package version: 1.0.0 -- Generator version: 7.12.0 -- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen -For more information, please visit [https://continue.dev](https://continue.dev) - -## Installation - -### For [Node.js](https://nodejs.org/) - -#### npm - -To publish the library as a [npm](https://www.npmjs.com/), please follow the procedure in ["Publishing npm packages"](https://docs.npmjs.com/getting-started/publishing-npm-packages). - -Then install it via: - -```shell -npm install continue_hub_ide_api --save -``` - -Finally, you need to build the module: - -```shell -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: - -```shell -npm install -``` - -Next, [link](https://docs.npmjs.com/cli/link) it globally in npm with the following, also from `JAVASCRIPT_CLIENT_DIR`: - -```shell -npm link -``` - -To use the link you just defined in your project, switch to the directory you want to use your continue_hub_ide_api from, and run: - -```shell -npm link /path/to/ -``` - -Finally, you need to build the module: - -```shell -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: - -```shell - npm install GIT_USER_ID/GIT_REPO_ID --save -``` - -### For browser - -The library also works in the browser environment via npm and [browserify](http://browserify.org/). 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): - -```shell -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: - -```javascript -module: { - rules: [ - { - parser: { - amd: false - } - } - ] -} -``` - -## Getting Started - -Please follow the [installation](#installation) instruction and execute the following JS code: - -```javascript -var ContinueHubIdeApi = require('continue_hub_ide_api'); - -var defaultClient = ContinueHubIdeApi.ApiClient.instance; -// Configure Bearer access token for authorization: apiKeyAuth -var apiKeyAuth = defaultClient.authentications['apiKeyAuth']; -apiKeyAuth.accessToken = "YOUR ACCESS TOKEN" - -var api = new ContinueHubIdeApi.DefaultApi() -var opts = { - 'alwaysUseProxy': "alwaysUseProxy_example", // {String} Whether to always use the Continue-managed proxy for model requests - 'organizationId': "organizationId_example" // {String} ID of the organization to scope assistants to. If not provided, personal assistants are returned. -}; -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}; -api.listAssistants(opts, callback); - -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.continue.dev* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*ContinueHubIdeApi.DefaultApi* | [**listAssistants**](docs/DefaultApi.md#listAssistants) | **GET** /ide/list-assistants | List assistants for IDE - - -## Documentation for Models - - - [ContinueHubIdeApi.ListAssistants200ResponseInner](docs/ListAssistants200ResponseInner.md) - - [ContinueHubIdeApi.ListAssistants200ResponseInnerConfigResult](docs/ListAssistants200ResponseInnerConfigResult.md) - - [ContinueHubIdeApi.ListAssistants401Response](docs/ListAssistants401Response.md) - - [ContinueHubIdeApi.ListAssistants404Response](docs/ListAssistants404Response.md) - - -## Documentation for Authorization - - -Authentication schemes defined for the API: -### apiKeyAuth - -- **Type**: Bearer authentication - diff --git a/packages/continue-sdk/clients/javascript/docs/DefaultApi.md b/packages/continue-sdk/clients/javascript/docs/DefaultApi.md deleted file mode 100644 index 54164bf2f..000000000 --- a/packages/continue-sdk/clients/javascript/docs/DefaultApi.md +++ /dev/null @@ -1,62 +0,0 @@ -# ContinueHubIdeApi.DefaultApi - -All URIs are relative to *https://api.continue.dev* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**listAssistants**](DefaultApi.md#listAssistants) | **GET** /ide/list-assistants | List assistants for IDE - - - -## listAssistants - -> [ListAssistants200ResponseInner] listAssistants(opts) - -List assistants for IDE - -Returns a complete list of assistants available to the user, with their full configurations, icons, and other metadata needed by the IDE to display and use them. This endpoint performs a full refresh of the list of assistants, including unrolling configurations and resolving secrets. - -### Example - -```javascript -import ContinueHubIdeApi from 'continue_hub_ide_api'; -let defaultClient = ContinueHubIdeApi.ApiClient.instance; -// Configure Bearer access token for authorization: apiKeyAuth -let apiKeyAuth = defaultClient.authentications['apiKeyAuth']; -apiKeyAuth.accessToken = "YOUR ACCESS TOKEN" - -let apiInstance = new ContinueHubIdeApi.DefaultApi(); -let opts = { - 'alwaysUseProxy': "alwaysUseProxy_example", // String | Whether to always use the Continue-managed proxy for model requests - 'organizationId': "organizationId_example" // String | ID of the organization to scope assistants to. If not provided, personal assistants are returned. -}; -apiInstance.listAssistants(opts, (error, data, response) => { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}); -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **alwaysUseProxy** | **String**| Whether to always use the Continue-managed proxy for model requests | [optional] - **organizationId** | **String**| ID of the organization to scope assistants to. If not provided, personal assistants are returned. | [optional] - -### Return type - -[**[ListAssistants200ResponseInner]**](ListAssistants200ResponseInner.md) - -### Authorization - -[apiKeyAuth](../README.md#apiKeyAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - diff --git a/packages/continue-sdk/clients/javascript/docs/ListAssistants200ResponseInner.md b/packages/continue-sdk/clients/javascript/docs/ListAssistants200ResponseInner.md deleted file mode 100644 index f06225ac3..000000000 --- a/packages/continue-sdk/clients/javascript/docs/ListAssistants200ResponseInner.md +++ /dev/null @@ -1,15 +0,0 @@ -# ContinueHubIdeApi.ListAssistants200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**configResult** | [**ListAssistants200ResponseInnerConfigResult**](ListAssistants200ResponseInnerConfigResult.md) | | -**ownerSlug** | **String** | Slug of the user or organization that owns the assistant | -**packageSlug** | **String** | Slug of the assistant package | -**iconUrl** | **String** | Pre-signed URL for the assistant's icon | [optional] -**onPremProxyUrl** | **String** | URL of the on-premises proxy if the organization uses one | [optional] -**useOnPremProxy** | **Boolean** | Whether the organization uses an on-premises proxy | [optional] -**rawYaml** | **String** | Raw YAML configuration of the assistant | [optional] - - diff --git a/packages/continue-sdk/clients/javascript/docs/ListAssistants200ResponseInnerConfigResult.md b/packages/continue-sdk/clients/javascript/docs/ListAssistants200ResponseInnerConfigResult.md deleted file mode 100644 index 0dcf7c9a3..000000000 --- a/packages/continue-sdk/clients/javascript/docs/ListAssistants200ResponseInnerConfigResult.md +++ /dev/null @@ -1,11 +0,0 @@ -# ContinueHubIdeApi.ListAssistants200ResponseInnerConfigResult - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**config** | **Object** | The unrolled assistant configuration | -**configLoadInterrupted** | **Boolean** | Whether the configuration loading was interrupted | -**errors** | **[String]** | Any errors that occurred during configuration loading | [optional] - - diff --git a/packages/continue-sdk/clients/javascript/docs/ListAssistants401Response.md b/packages/continue-sdk/clients/javascript/docs/ListAssistants401Response.md deleted file mode 100644 index 4fa567704..000000000 --- a/packages/continue-sdk/clients/javascript/docs/ListAssistants401Response.md +++ /dev/null @@ -1,9 +0,0 @@ -# ContinueHubIdeApi.ListAssistants401Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message** | **String** | | [optional] - - diff --git a/packages/continue-sdk/clients/javascript/docs/ListAssistants404Response.md b/packages/continue-sdk/clients/javascript/docs/ListAssistants404Response.md deleted file mode 100644 index 959556867..000000000 --- a/packages/continue-sdk/clients/javascript/docs/ListAssistants404Response.md +++ /dev/null @@ -1,9 +0,0 @@ -# ContinueHubIdeApi.ListAssistants404Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message** | **String** | | [optional] - - diff --git a/packages/continue-sdk/clients/javascript/git_push.sh b/packages/continue-sdk/clients/javascript/git_push.sh deleted file mode 100644 index f53a75d4f..000000000 --- a/packages/continue-sdk/clients/javascript/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/packages/continue-sdk/clients/javascript/mocha.opts b/packages/continue-sdk/clients/javascript/mocha.opts deleted file mode 100644 index 907011807..000000000 --- a/packages/continue-sdk/clients/javascript/mocha.opts +++ /dev/null @@ -1 +0,0 @@ ---timeout 10000 diff --git a/packages/continue-sdk/clients/javascript/package.json b/packages/continue-sdk/clients/javascript/package.json deleted file mode 100644 index 9bd0853fa..000000000 --- a/packages/continue-sdk/clients/javascript/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "continue_hub_ide_api", - "version": "1.0.0", - "description": "API for Continue IDE to fetch assistants and other related information. These endpoints are primarily used by the Continue IDE extensions for VS Code and JetBrains. ", - "license": "Unlicense", - "main": "dist/index.js", - "scripts": { - "build": "babel src -d dist", - "prepare": "npm run build", - "test": "mocha --require @babel/register --recursive" - }, - "browser": { - "fs": false - }, - "dependencies": { - "@babel/cli": "^7.0.0", - "superagent": "^5.3.0" - }, - "devDependencies": { - "@babel/core": "^7.0.0", - "@babel/plugin-proposal-class-properties": "^7.0.0", - "@babel/plugin-proposal-decorators": "^7.0.0", - "@babel/plugin-proposal-do-expressions": "^7.0.0", - "@babel/plugin-proposal-export-default-from": "^7.0.0", - "@babel/plugin-proposal-export-namespace-from": "^7.0.0", - "@babel/plugin-proposal-function-bind": "^7.0.0", - "@babel/plugin-proposal-function-sent": "^7.0.0", - "@babel/plugin-proposal-json-strings": "^7.0.0", - "@babel/plugin-proposal-logical-assignment-operators": "^7.0.0", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0", - "@babel/plugin-proposal-numeric-separator": "^7.0.0", - "@babel/plugin-proposal-optional-chaining": "^7.0.0", - "@babel/plugin-proposal-pipeline-operator": "^7.0.0", - "@babel/plugin-proposal-throw-expressions": "^7.0.0", - "@babel/plugin-syntax-dynamic-import": "^7.0.0", - "@babel/plugin-syntax-import-meta": "^7.0.0", - "@babel/preset-env": "^7.0.0", - "@babel/register": "^7.0.0", - "expect.js": "^0.3.1", - "mocha": "^8.0.1", - "sinon": "^7.2.0" - }, - "files": [ - "dist" - ] -} diff --git a/packages/continue-sdk/clients/javascript/src/ApiClient.js b/packages/continue-sdk/clients/javascript/src/ApiClient.js deleted file mode 100644 index ef2457bb5..000000000 --- a/packages/continue-sdk/clients/javascript/src/ApiClient.js +++ /dev/null @@ -1,698 +0,0 @@ -/** - * Continue Hub IDE API - * API for Continue IDE to fetch assistants and other related information. These endpoints are primarily used by the Continue IDE extensions for VS Code and JetBrains. - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - - -import superagent from "superagent"; - -/** -* @module ApiClient -* @version 1.0.0 -*/ - -/** -* Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an -* application to use this class directly - the *Api and model classes provide the public API for the service. The -* contents of this file should be regarded as internal but are documented for completeness. -* @alias module:ApiClient -* @class -*/ -class ApiClient { - /** - * The base URL against which to resolve every API call's (relative) path. - * Overrides the default value set in spec file if present - * @param {String} basePath - */ - constructor(basePath = 'https://api.continue.dev') { - /** - * The base URL against which to resolve every API call's (relative) path. - * @type {String} - * @default https://api.continue.dev - */ - this.basePath = basePath.replace(/\/+$/, ''); - - /** - * The authentication methods to be included for all API calls. - * @type {Array.} - */ - this.authentications = { - 'apiKeyAuth': {type: 'bearer'} - } - - /** - * The default HTTP headers to be included for all API calls. - * @type {Array.} - * @default {} - */ - this.defaultHeaders = { - 'User-Agent': 'OpenAPI-Generator/1.0.0/Javascript' - }; - - /** - * The default HTTP timeout for all API calls. - * @type {Number} - * @default 60000 - */ - this.timeout = 60000; - - /** - * If set to false an additional timestamp parameter is added to all API GET calls to - * prevent browser caching - * @type {Boolean} - * @default true - */ - this.cache = true; - - /** - * If set to true, the client will save the cookies from each server - * response, and return them in the next request. - * @default false - */ - this.enableCookies = false; - - /* - * Used to save and return cookies in a node.js (non-browser) setting, - * if this.enableCookies is set to true. - */ - if (typeof window === 'undefined') { - this.agent = new superagent.agent(); - } - - /* - * Allow user to override superagent agent - */ - this.requestAgent = null; - - /* - * Allow user to add superagent plugins - */ - this.plugins = null; - - } - - /** - * Returns a string representation for an actual parameter. - * @param param The actual parameter. - * @returns {String} The string representation of param. - */ - paramToString(param) { - if (param == undefined || param == null) { - return ''; - } - if (param instanceof Date) { - return param.toJSON(); - } - if (ApiClient.canBeJsonified(param)) { - return JSON.stringify(param); - } - - return param.toString(); - } - - /** - * Returns a boolean indicating if the parameter could be JSON.stringified - * @param param The actual parameter - * @returns {Boolean} Flag indicating if param can be JSON.stringified - */ - static canBeJsonified(str) { - if (typeof str !== 'string' && typeof str !== 'object') return false; - try { - const type = str.toString(); - return type === '[object Object]' - || type === '[object Array]'; - } catch (err) { - return false; - } - }; - - /** - * Builds full URL by appending the given path to the base URL and replacing path parameter place-holders with parameter values. - * NOTE: query parameters are not handled here. - * @param {String} path The path to append to the base URL. - * @param {Object} pathParams The parameter values to append. - * @param {String} apiBasePath Base path defined in the path, operation level to override the default one - * @returns {String} The encoded path with parameter values substituted. - */ - buildUrl(path, pathParams, apiBasePath) { - if (!path.match(/^\//)) { - path = '/' + path; - } - - var url = this.basePath + path; - - // use API (operation, path) base path if defined - if (apiBasePath !== null && apiBasePath !== undefined) { - url = apiBasePath + path; - } - - url = url.replace(/\{([\w-\.#]+)\}/g, (fullMatch, key) => { - var value; - if (pathParams.hasOwnProperty(key)) { - value = this.paramToString(pathParams[key]); - } else { - value = fullMatch; - } - - return encodeURIComponent(value); - }); - - return url; - } - - /** - * Checks whether the given content type represents JSON.
- * JSON content type examples:
- *
    - *
  • application/json
  • - *
  • application/json; charset=UTF8
  • - *
  • APPLICATION/JSON
  • - *
- * @param {String} contentType The MIME content type to check. - * @returns {Boolean} true if contentType represents JSON, otherwise false. - */ - isJsonMime(contentType) { - return Boolean(contentType != null && contentType.match(/^application\/json(;.*)?$/i)); - } - - /** - * Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first. - * @param {Array.} contentTypes - * @returns {String} The chosen content type, preferring JSON. - */ - jsonPreferredMime(contentTypes) { - for (var i = 0; i < contentTypes.length; i++) { - if (this.isJsonMime(contentTypes[i])) { - return contentTypes[i]; - } - } - - return contentTypes[0]; - } - - /** - * Checks whether the given parameter value represents file-like content. - * @param param The parameter to check. - * @returns {Boolean} true if param represents a file. - */ - isFileParam(param) { - // fs.ReadStream in Node.js and Electron (but not in runtime like browserify) - if (typeof require === 'function') { - let fs; - try { - fs = require('fs'); - } catch (err) {} - if (fs && fs.ReadStream && param instanceof fs.ReadStream) { - return true; - } - } - - // Buffer in Node.js - if (typeof Buffer === 'function' && param instanceof Buffer) { - return true; - } - - // Blob in browser - if (typeof Blob === 'function' && param instanceof Blob) { - return true; - } - - // File in browser (it seems File object is also instance of Blob, but keep this for safe) - if (typeof File === 'function' && param instanceof File) { - return true; - } - - return false; - } - - /** - * Normalizes parameter values: - *
    - *
  • remove nils
  • - *
  • keep files and arrays
  • - *
  • format to string with `paramToString` for other cases
  • - *
- * @param {Object.} params The parameters as object properties. - * @returns {Object.} normalized parameters. - */ - normalizeParams(params) { - var newParams = {}; - for (var key in params) { - if (params.hasOwnProperty(key) && params[key] != undefined && params[key] != null) { - var value = params[key]; - if (this.isFileParam(value) || Array.isArray(value)) { - newParams[key] = value; - } else { - newParams[key] = this.paramToString(value); - } - } - } - - return newParams; - } - - /** - * Builds a string representation of an array-type actual parameter, according to the given collection format. - * @param {Array} param An array parameter. - * @param {module:ApiClient.CollectionFormatEnum} collectionFormat The array element separator strategy. - * @returns {String|Array} A string representation of the supplied collection, using the specified delimiter. Returns - * param as is if collectionFormat is multi. - */ - buildCollectionParam(param, collectionFormat) { - if (param == null) { - return null; - } - switch (collectionFormat) { - case 'csv': - return param.map(this.paramToString, this).join(','); - case 'ssv': - return param.map(this.paramToString, this).join(' '); - case 'tsv': - return param.map(this.paramToString, this).join('\t'); - case 'pipes': - return param.map(this.paramToString, this).join('|'); - case 'multi': - //return the array directly as SuperAgent will handle it as expected - return param.map(this.paramToString, this); - case 'passthrough': - return param; - default: - throw new Error('Unknown collection format: ' + collectionFormat); - } - } - - /** - * Applies authentication headers to the request. - * @param {Object} request The request object created by a superagent() call. - * @param {Array.} authNames An array of authentication method names. - */ - applyAuthToRequest(request, authNames) { - authNames.forEach((authName) => { - var auth = this.authentications[authName]; - switch (auth.type) { - case 'basic': - if (auth.username || auth.password) { - request.auth(auth.username || '', auth.password || ''); - } - - break; - case 'bearer': - if (auth.accessToken) { - var localVarBearerToken = typeof auth.accessToken === 'function' - ? auth.accessToken() - : auth.accessToken - request.set({'Authorization': 'Bearer ' + localVarBearerToken}); - } - - break; - case 'apiKey': - if (auth.apiKey) { - var data = {}; - if (auth.apiKeyPrefix) { - data[auth.name] = auth.apiKeyPrefix + ' ' + auth.apiKey; - } else { - data[auth.name] = auth.apiKey; - } - - if (auth['in'] === 'header') { - request.set(data); - } else { - request.query(data); - } - } - - break; - case 'oauth2': - if (auth.accessToken) { - request.set({'Authorization': 'Bearer ' + auth.accessToken}); - } - - break; - default: - throw new Error('Unknown authentication type: ' + auth.type); - } - }); - } - - /** - * Deserializes an HTTP response body into a value of the specified type. - * @param {Object} response A SuperAgent response object. - * @param {(String|Array.|Object.|Function)} returnType The type to return. Pass a string for simple types - * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To - * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type: - * all properties on data will be converted to this type. - * @returns A value of the specified type. - */ - deserialize(response, returnType) { - if (response == null || returnType == null || response.status == 204) { - return null; - } - - // Rely on SuperAgent for parsing response body. - // See http://visionmedia.github.io/superagent/#parsing-response-bodies - var data = response.body; - if (data == null || (typeof data === 'object' && typeof data.length === 'undefined' && !Object.keys(data).length)) { - // SuperAgent does not always produce a body; use the unparsed response as a fallback - data = response.text; - } - - return ApiClient.convertToType(data, returnType); - } - - /** - * Callback function to receive the result of the operation. - * @callback module:ApiClient~callApiCallback - * @param {String} error Error message, if any. - * @param data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * Invokes the REST service using the supplied settings and parameters. - * @param {String} path The base URL to invoke. - * @param {String} httpMethod The HTTP method to use. - * @param {Object.} pathParams A map of path parameters and their values. - * @param {Object.} queryParams A map of query parameters and their values. - * @param {Object.} headerParams A map of header parameters and their values. - * @param {Object.} formParams A map of form parameters and their values. - * @param {Object} bodyParam The value to pass as the request body. - * @param {Array.} authNames An array of authentication type names. - * @param {Array.} contentTypes An array of request MIME types. - * @param {Array.} accepts An array of acceptable response MIME types. - * @param {(String|Array|ObjectFunction)} returnType The required type to return; can be a string for simple types or the - * constructor for a complex type. - * @param {String} apiBasePath base path defined in the operation/path level to override the default one - * @param {module:ApiClient~callApiCallback} callback The callback function. - * @returns {Object} The SuperAgent request object. - */ - callApi(path, httpMethod, pathParams, - queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts, - returnType, apiBasePath, callback) { - - var url = this.buildUrl(path, pathParams, apiBasePath); - var request = superagent(httpMethod, url); - - if (this.plugins !== null) { - for (var index in this.plugins) { - if (this.plugins.hasOwnProperty(index)) { - request.use(this.plugins[index]) - } - } - } - - // apply authentications - this.applyAuthToRequest(request, authNames); - - // set query parameters - if (httpMethod.toUpperCase() === 'GET' && this.cache === false) { - queryParams['_'] = new Date().getTime(); - } - - request.query(this.normalizeParams(queryParams)); - - // set header parameters - request.set(this.defaultHeaders).set(this.normalizeParams(headerParams)); - - // set requestAgent if it is set by user - if (this.requestAgent) { - request.agent(this.requestAgent); - } - - // set request timeout - request.timeout(this.timeout); - - var contentType = this.jsonPreferredMime(contentTypes); - if (contentType) { - // Issue with superagent and multipart/form-data (https://github.com/visionmedia/superagent/issues/746) - if(contentType != 'multipart/form-data') { - request.type(contentType); - } - } - - if (contentType === 'application/x-www-form-urlencoded') { - let normalizedParams = this.normalizeParams(formParams) - let urlSearchParams = new URLSearchParams(normalizedParams); - let queryString = urlSearchParams.toString(); - request.send(queryString); - } else if (contentType == 'multipart/form-data') { - var _formParams = this.normalizeParams(formParams); - for (var key in _formParams) { - if (_formParams.hasOwnProperty(key)) { - let _formParamsValue = _formParams[key]; - if (this.isFileParam(_formParamsValue)) { - // file field - request.attach(key, _formParamsValue); - } else if (Array.isArray(_formParamsValue) && _formParamsValue.length - && this.isFileParam(_formParamsValue[0])) { - // multiple files - _formParamsValue.forEach(file => request.attach(key, file)); - } else { - request.field(key, _formParamsValue); - } - } - } - } else if (bodyParam !== null && bodyParam !== undefined) { - if (!request.header['Content-Type']) { - request.type('application/json'); - } - request.send(bodyParam); - } - - var accept = this.jsonPreferredMime(accepts); - if (accept) { - request.accept(accept); - } - - if (returnType === 'Blob') { - request.responseType('blob'); - } else if (returnType === 'String') { - request.responseType('text'); - } - - // Attach previously saved cookies, if enabled - if (this.enableCookies){ - if (typeof window === 'undefined') { - this.agent._attachCookies(request); - } - else { - request.withCredentials(); - } - } - - request.end((error, response) => { - if (callback) { - var data = null; - if (!error) { - try { - data = this.deserialize(response, returnType); - if (this.enableCookies && typeof window === 'undefined'){ - this.agent._saveCookies(response); - } - } catch (err) { - error = err; - } - } - - callback(error, data, response); - } - }); - - return request; - } - - /** - * Parses an ISO-8601 string representation or epoch representation of a date value. - * @param {String} str The date value as a string. - * @returns {Date} The parsed date object. - */ - static parseDate(str) { - if (isNaN(str)) { - return new Date(str.replace(/(\d)(T)(\d)/i, '$1 $3')); - } - return new Date(+str); - } - - /** - * Converts a value to the specified type. - * @param {(String|Object)} data The data to convert, as a string or object. - * @param {(String|Array.|Object.|Function)} type The type to return. Pass a string for simple types - * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To - * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type: - * all properties on data will be converted to this type. - * @returns An instance of the specified type or null or undefined if data is null or undefined. - */ - static convertToType(data, type) { - if (data === null || data === undefined) - return data - - switch (type) { - case 'Boolean': - return Boolean(data); - case 'Integer': - return parseInt(data, 10); - case 'Number': - return parseFloat(data); - case 'String': - return String(data); - case 'Date': - return ApiClient.parseDate(String(data)); - case 'Blob': - return data; - default: - if (type === Object) { - // generic object, return directly - return data; - } else if (typeof type.constructFromObject === 'function') { - // for model type like User and enum class - return type.constructFromObject(data); - } else if (Array.isArray(type)) { - // for array type like: ['String'] - var itemType = type[0]; - - return data.map((item) => { - return ApiClient.convertToType(item, itemType); - }); - } else if (typeof type === 'object') { - // for plain object type like: {'String': 'Integer'} - var keyType, valueType; - for (var k in type) { - if (type.hasOwnProperty(k)) { - keyType = k; - valueType = type[k]; - break; - } - } - - var result = {}; - for (var k in data) { - if (data.hasOwnProperty(k)) { - var key = ApiClient.convertToType(k, keyType); - var value = ApiClient.convertToType(data[k], valueType); - result[key] = value; - } - } - - return result; - } else { - // for unknown type, return the data directly - return data; - } - } - } - - /** - * Gets an array of host settings - * @returns An array of host settings - */ - hostSettings() { - return [ - { - 'url': "https://api.continue.dev", - 'description': "Production server", - }, - { - 'url': "http://localhost:3002", - 'description': "Local development server", - } - ]; - } - - getBasePathFromSettings(index, variables={}) { - var servers = this.hostSettings(); - - // check array index out of bound - if (index < 0 || index >= servers.length) { - throw new Error("Invalid index " + index + " when selecting the host settings. Must be less than " + servers.length); - } - - var server = servers[index]; - var url = server['url']; - - // go through variable and assign a value - for (var variable_name in server['variables']) { - if (variable_name in variables) { - let variable = server['variables'][variable_name]; - if ( !('enum_values' in variable) || variable['enum_values'].includes(variables[variable_name]) ) { - url = url.replace("{" + variable_name + "}", variables[variable_name]); - } else { - throw new Error("The variable `" + variable_name + "` in the host URL has invalid value " + variables[variable_name] + ". Must be " + server['variables'][variable_name]['enum_values'] + "."); - } - } else { - // use default value - url = url.replace("{" + variable_name + "}", server['variables'][variable_name]['default_value']) - } - } - return url; - } - - /** - * Constructs a new map or array model from REST data. - * @param data {Object|Array} The REST data. - * @param obj {Object|Array} The target object or array. - */ - static constructFromObject(data, obj, itemType) { - if (Array.isArray(data)) { - for (var i = 0; i < data.length; i++) { - if (data.hasOwnProperty(i)) - obj[i] = ApiClient.convertToType(data[i], itemType); - } - } else { - for (var k in data) { - if (data.hasOwnProperty(k)) - obj[k] = ApiClient.convertToType(data[k], itemType); - } - } - }; -} - -/** - * Enumeration of collection format separator strategies. - * @enum {String} - * @readonly - */ -ApiClient.CollectionFormatEnum = { - /** - * Comma-separated values. Value: csv - * @const - */ - CSV: ',', - - /** - * Space-separated values. Value: ssv - * @const - */ - SSV: ' ', - - /** - * Tab-separated values. Value: tsv - * @const - */ - TSV: '\t', - - /** - * Pipe(|)-separated values. Value: pipes - * @const - */ - PIPES: '|', - - /** - * Native array. Value: multi - * @const - */ - MULTI: 'multi' -}; - -/** -* The default API client implementation. -* @type {module:ApiClient} -*/ -ApiClient.instance = new ApiClient(); -export default ApiClient; diff --git a/packages/continue-sdk/clients/javascript/src/api/DefaultApi.js b/packages/continue-sdk/clients/javascript/src/api/DefaultApi.js deleted file mode 100644 index 8e22a6913..000000000 --- a/packages/continue-sdk/clients/javascript/src/api/DefaultApi.js +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Continue Hub IDE API - * API for Continue IDE to fetch assistants and other related information. These endpoints are primarily used by the Continue IDE extensions for VS Code and JetBrains. - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - - -import ApiClient from "../ApiClient"; -import ListAssistants200ResponseInner from '../models/ListAssistants200ResponseInner'; -import ListAssistants401Response from '../models/ListAssistants401Response'; -import ListAssistants404Response from '../models/ListAssistants404Response'; - -/** -* Default service. -* @module api/DefaultApi -* @version 1.0.0 -*/ -export default class DefaultApi { - - /** - * Constructs a new DefaultApi. - * @alias module:api/DefaultApi - * @class - * @param {module:ApiClient} [apiClient] Optional API client implementation to use, - * default to {@link module:ApiClient#instance} if unspecified. - */ - constructor(apiClient) { - this.apiClient = apiClient || ApiClient.instance; - } - - - /** - * Callback function to receive the result of the listAssistants operation. - * @callback module:api/DefaultApi~listAssistantsCallback - * @param {String} error Error message, if any. - * @param {Array.} data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * List assistants for IDE - * Returns a complete list of assistants available to the user, with their full configurations, icons, and other metadata needed by the IDE to display and use them. This endpoint performs a full refresh of the list of assistants, including unrolling configurations and resolving secrets. - * @param {Object} opts Optional parameters - * @param {module:models/String} [alwaysUseProxy] Whether to always use the Continue-managed proxy for model requests - * @param {String} [organizationId] ID of the organization to scope assistants to. If not provided, personal assistants are returned. - * @param {module:api/DefaultApi~listAssistantsCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link Array.} - */ - listAssistants(opts, callback) { - opts = opts || {}; - let postBody = null; - - let pathParams = { - }; - let queryParams = { - 'alwaysUseProxy': opts['alwaysUseProxy'], - 'organizationId': opts['organizationId'] - }; - let headerParams = { - }; - let formParams = { - }; - - let authNames = ['apiKeyAuth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = [ListAssistants200ResponseInner]; - return this.apiClient.callApi( - '/ide/list-assistants', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, null, callback - ); - } - - -} diff --git a/packages/continue-sdk/clients/javascript/src/index.js b/packages/continue-sdk/clients/javascript/src/index.js deleted file mode 100644 index 359dc8ea4..000000000 --- a/packages/continue-sdk/clients/javascript/src/index.js +++ /dev/null @@ -1,90 +0,0 @@ -/** - * Continue Hub IDE API - * API for Continue IDE to fetch assistants and other related information. These endpoints are primarily used by the Continue IDE extensions for VS Code and JetBrains. - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - - -import ApiClient from './ApiClient'; -import ListAssistants200ResponseInner from './models/ListAssistants200ResponseInner'; -import ListAssistants200ResponseInnerConfigResult from './models/ListAssistants200ResponseInnerConfigResult'; -import ListAssistants401Response from './models/ListAssistants401Response'; -import ListAssistants404Response from './models/ListAssistants404Response'; -import DefaultApi from './api/DefaultApi'; - - -/** -* API for Continue IDE to fetch assistants and other related information. These endpoints are primarily used by the Continue IDE extensions for VS Code and JetBrains. .
-* The index module provides access to constructors for all the classes which comprise the public API. -*

-* An AMD (recommended!) or CommonJS application will generally do something equivalent to the following: -*

-* var ContinueHubIdeApi = require('index'); // See note below*.
-* var xxxSvc = new ContinueHubIdeApi.XxxApi(); // Allocate the API class we're going to use.
-* var yyyModel = new ContinueHubIdeApi.Yyy(); // Construct a model instance.
-* yyyModel.someProperty = 'someValue';
-* ...
-* var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service.
-* ...
-* 
-* *NOTE: For a top-level AMD script, use require(['index'], function(){...}) -* and put the application logic within the callback function. -*

-*

-* A non-AMD browser application (discouraged) might do something like this: -*

-* var xxxSvc = new ContinueHubIdeApi.XxxApi(); // Allocate the API class we're going to use.
-* var yyy = new ContinueHubIdeApi.Yyy(); // Construct a model instance.
-* yyyModel.someProperty = 'someValue';
-* ...
-* var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service.
-* ...
-* 
-*

-* @module index -* @version 1.0.0 -*/ -export { - /** - * The ApiClient constructor. - * @property {module:ApiClient} - */ - ApiClient, - - /** - * The ListAssistants200ResponseInner model constructor. - * @property {module:models/ListAssistants200ResponseInner} - */ - ListAssistants200ResponseInner, - - /** - * The ListAssistants200ResponseInnerConfigResult model constructor. - * @property {module:models/ListAssistants200ResponseInnerConfigResult} - */ - ListAssistants200ResponseInnerConfigResult, - - /** - * The ListAssistants401Response model constructor. - * @property {module:models/ListAssistants401Response} - */ - ListAssistants401Response, - - /** - * The ListAssistants404Response model constructor. - * @property {module:models/ListAssistants404Response} - */ - ListAssistants404Response, - - /** - * The DefaultApi service constructor. - * @property {module:api/DefaultApi} - */ - DefaultApi -}; diff --git a/packages/continue-sdk/clients/javascript/src/models/ListAssistants200ResponseInner.js b/packages/continue-sdk/clients/javascript/src/models/ListAssistants200ResponseInner.js deleted file mode 100644 index 48c5ada27..000000000 --- a/packages/continue-sdk/clients/javascript/src/models/ListAssistants200ResponseInner.js +++ /dev/null @@ -1,174 +0,0 @@ -/** - * Continue Hub IDE API - * API for Continue IDE to fetch assistants and other related information. These endpoints are primarily used by the Continue IDE extensions for VS Code and JetBrains. - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; -import ListAssistants200ResponseInnerConfigResult from './ListAssistants200ResponseInnerConfigResult'; - -/** - * The ListAssistants200ResponseInner model module. - * @module models/ListAssistants200ResponseInner - * @version 1.0.0 - */ -class ListAssistants200ResponseInner { - /** - * Constructs a new ListAssistants200ResponseInner. - * @alias module:models/ListAssistants200ResponseInner - * @param configResult {module:models/ListAssistants200ResponseInnerConfigResult} - * @param ownerSlug {String} Slug of the user or organization that owns the assistant - * @param packageSlug {String} Slug of the assistant package - */ - constructor(configResult, ownerSlug, packageSlug) { - - ListAssistants200ResponseInner.initialize(this, configResult, ownerSlug, packageSlug); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj, configResult, ownerSlug, packageSlug) { - obj['configResult'] = configResult; - obj['ownerSlug'] = ownerSlug; - obj['packageSlug'] = packageSlug; - } - - /** - * Constructs a ListAssistants200ResponseInner from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:models/ListAssistants200ResponseInner} obj Optional instance to populate. - * @return {module:models/ListAssistants200ResponseInner} The populated ListAssistants200ResponseInner instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new ListAssistants200ResponseInner(); - - if (data.hasOwnProperty('configResult')) { - obj['configResult'] = ListAssistants200ResponseInnerConfigResult.constructFromObject(data['configResult']); - } - if (data.hasOwnProperty('ownerSlug')) { - obj['ownerSlug'] = ApiClient.convertToType(data['ownerSlug'], 'String'); - } - if (data.hasOwnProperty('packageSlug')) { - obj['packageSlug'] = ApiClient.convertToType(data['packageSlug'], 'String'); - } - if (data.hasOwnProperty('iconUrl')) { - obj['iconUrl'] = ApiClient.convertToType(data['iconUrl'], 'String'); - } - if (data.hasOwnProperty('onPremProxyUrl')) { - obj['onPremProxyUrl'] = ApiClient.convertToType(data['onPremProxyUrl'], 'String'); - } - if (data.hasOwnProperty('useOnPremProxy')) { - obj['useOnPremProxy'] = ApiClient.convertToType(data['useOnPremProxy'], 'Boolean'); - } - if (data.hasOwnProperty('rawYaml')) { - obj['rawYaml'] = ApiClient.convertToType(data['rawYaml'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to ListAssistants200ResponseInner. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to ListAssistants200ResponseInner. - */ - static validateJSON(data) { - // check to make sure all required properties are present in the JSON string - for (const property of ListAssistants200ResponseInner.RequiredProperties) { - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // validate the optional field `configResult` - if (data['configResult']) { // data not null - ListAssistants200ResponseInnerConfigResult.validateJSON(data['configResult']); - } - // ensure the json data is a string - if (data['ownerSlug'] && !(typeof data['ownerSlug'] === 'string' || data['ownerSlug'] instanceof String)) { - throw new Error("Expected the field `ownerSlug` to be a primitive type in the JSON string but got " + data['ownerSlug']); - } - // ensure the json data is a string - if (data['packageSlug'] && !(typeof data['packageSlug'] === 'string' || data['packageSlug'] instanceof String)) { - throw new Error("Expected the field `packageSlug` to be a primitive type in the JSON string but got " + data['packageSlug']); - } - // ensure the json data is a string - if (data['iconUrl'] && !(typeof data['iconUrl'] === 'string' || data['iconUrl'] instanceof String)) { - throw new Error("Expected the field `iconUrl` to be a primitive type in the JSON string but got " + data['iconUrl']); - } - // ensure the json data is a string - if (data['onPremProxyUrl'] && !(typeof data['onPremProxyUrl'] === 'string' || data['onPremProxyUrl'] instanceof String)) { - throw new Error("Expected the field `onPremProxyUrl` to be a primitive type in the JSON string but got " + data['onPremProxyUrl']); - } - // ensure the json data is a string - if (data['rawYaml'] && !(typeof data['rawYaml'] === 'string' || data['rawYaml'] instanceof String)) { - throw new Error("Expected the field `rawYaml` to be a primitive type in the JSON string but got " + data['rawYaml']); - } - - return true; - } - - -} - -ListAssistants200ResponseInner.RequiredProperties = ["configResult", "ownerSlug", "packageSlug"]; - -/** - * @member {module:models/ListAssistants200ResponseInnerConfigResult} configResult - */ -ListAssistants200ResponseInner.prototype['configResult'] = undefined; - -/** - * Slug of the user or organization that owns the assistant - * @member {String} ownerSlug - */ -ListAssistants200ResponseInner.prototype['ownerSlug'] = undefined; - -/** - * Slug of the assistant package - * @member {String} packageSlug - */ -ListAssistants200ResponseInner.prototype['packageSlug'] = undefined; - -/** - * Pre-signed URL for the assistant's icon - * @member {String} iconUrl - */ -ListAssistants200ResponseInner.prototype['iconUrl'] = undefined; - -/** - * URL of the on-premises proxy if the organization uses one - * @member {String} onPremProxyUrl - */ -ListAssistants200ResponseInner.prototype['onPremProxyUrl'] = undefined; - -/** - * Whether the organization uses an on-premises proxy - * @member {Boolean} useOnPremProxy - */ -ListAssistants200ResponseInner.prototype['useOnPremProxy'] = undefined; - -/** - * Raw YAML configuration of the assistant - * @member {String} rawYaml - */ -ListAssistants200ResponseInner.prototype['rawYaml'] = undefined; - - - - - - -export default ListAssistants200ResponseInner; - diff --git a/packages/continue-sdk/clients/javascript/src/models/ListAssistants200ResponseInnerConfigResult.js b/packages/continue-sdk/clients/javascript/src/models/ListAssistants200ResponseInnerConfigResult.js deleted file mode 100644 index 17da838bd..000000000 --- a/packages/continue-sdk/clients/javascript/src/models/ListAssistants200ResponseInnerConfigResult.js +++ /dev/null @@ -1,116 +0,0 @@ -/** - * Continue Hub IDE API - * API for Continue IDE to fetch assistants and other related information. These endpoints are primarily used by the Continue IDE extensions for VS Code and JetBrains. - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The ListAssistants200ResponseInnerConfigResult model module. - * @module models/ListAssistants200ResponseInnerConfigResult - * @version 1.0.0 - */ -class ListAssistants200ResponseInnerConfigResult { - /** - * Constructs a new ListAssistants200ResponseInnerConfigResult. - * @alias module:models/ListAssistants200ResponseInnerConfigResult - * @param config {Object} The unrolled assistant configuration - * @param configLoadInterrupted {Boolean} Whether the configuration loading was interrupted - */ - constructor(config, configLoadInterrupted) { - - ListAssistants200ResponseInnerConfigResult.initialize(this, config, configLoadInterrupted); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj, config, configLoadInterrupted) { - obj['config'] = config; - obj['configLoadInterrupted'] = configLoadInterrupted; - } - - /** - * Constructs a ListAssistants200ResponseInnerConfigResult from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:models/ListAssistants200ResponseInnerConfigResult} obj Optional instance to populate. - * @return {module:models/ListAssistants200ResponseInnerConfigResult} The populated ListAssistants200ResponseInnerConfigResult instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new ListAssistants200ResponseInnerConfigResult(); - - if (data.hasOwnProperty('config')) { - obj['config'] = ApiClient.convertToType(data['config'], Object); - } - if (data.hasOwnProperty('configLoadInterrupted')) { - obj['configLoadInterrupted'] = ApiClient.convertToType(data['configLoadInterrupted'], 'Boolean'); - } - if (data.hasOwnProperty('errors')) { - obj['errors'] = ApiClient.convertToType(data['errors'], ['String']); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to ListAssistants200ResponseInnerConfigResult. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to ListAssistants200ResponseInnerConfigResult. - */ - static validateJSON(data) { - // check to make sure all required properties are present in the JSON string - for (const property of ListAssistants200ResponseInnerConfigResult.RequiredProperties) { - if (!data.hasOwnProperty(property)) { - throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); - } - } - // ensure the json data is an array - if (!Array.isArray(data['errors'])) { - throw new Error("Expected the field `errors` to be an array in the JSON data but got " + data['errors']); - } - - return true; - } - - -} - -ListAssistants200ResponseInnerConfigResult.RequiredProperties = ["config", "configLoadInterrupted"]; - -/** - * The unrolled assistant configuration - * @member {Object} config - */ -ListAssistants200ResponseInnerConfigResult.prototype['config'] = undefined; - -/** - * Whether the configuration loading was interrupted - * @member {Boolean} configLoadInterrupted - */ -ListAssistants200ResponseInnerConfigResult.prototype['configLoadInterrupted'] = undefined; - -/** - * Any errors that occurred during configuration loading - * @member {Array.} errors - */ -ListAssistants200ResponseInnerConfigResult.prototype['errors'] = undefined; - - - - - - -export default ListAssistants200ResponseInnerConfigResult; - diff --git a/packages/continue-sdk/clients/javascript/src/models/ListAssistants401Response.js b/packages/continue-sdk/clients/javascript/src/models/ListAssistants401Response.js deleted file mode 100644 index cb85d5326..000000000 --- a/packages/continue-sdk/clients/javascript/src/models/ListAssistants401Response.js +++ /dev/null @@ -1,87 +0,0 @@ -/** - * Continue Hub IDE API - * API for Continue IDE to fetch assistants and other related information. These endpoints are primarily used by the Continue IDE extensions for VS Code and JetBrains. - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The ListAssistants401Response model module. - * @module models/ListAssistants401Response - * @version 1.0.0 - */ -class ListAssistants401Response { - /** - * Constructs a new ListAssistants401Response. - * @alias module:models/ListAssistants401Response - */ - constructor() { - - ListAssistants401Response.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a ListAssistants401Response from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:models/ListAssistants401Response} obj Optional instance to populate. - * @return {module:models/ListAssistants401Response} The populated ListAssistants401Response instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new ListAssistants401Response(); - - if (data.hasOwnProperty('message')) { - obj['message'] = ApiClient.convertToType(data['message'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to ListAssistants401Response. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to ListAssistants401Response. - */ - static validateJSON(data) { - // ensure the json data is a string - if (data['message'] && !(typeof data['message'] === 'string' || data['message'] instanceof String)) { - throw new Error("Expected the field `message` to be a primitive type in the JSON string but got " + data['message']); - } - - return true; - } - - -} - - - -/** - * @member {String} message - */ -ListAssistants401Response.prototype['message'] = undefined; - - - - - - -export default ListAssistants401Response; - diff --git a/packages/continue-sdk/clients/javascript/src/models/ListAssistants404Response.js b/packages/continue-sdk/clients/javascript/src/models/ListAssistants404Response.js deleted file mode 100644 index 1c722b281..000000000 --- a/packages/continue-sdk/clients/javascript/src/models/ListAssistants404Response.js +++ /dev/null @@ -1,87 +0,0 @@ -/** - * Continue Hub IDE API - * API for Continue IDE to fetch assistants and other related information. These endpoints are primarily used by the Continue IDE extensions for VS Code and JetBrains. - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -import ApiClient from '../ApiClient'; - -/** - * The ListAssistants404Response model module. - * @module models/ListAssistants404Response - * @version 1.0.0 - */ -class ListAssistants404Response { - /** - * Constructs a new ListAssistants404Response. - * @alias module:models/ListAssistants404Response - */ - constructor() { - - ListAssistants404Response.initialize(this); - } - - /** - * Initializes the fields of this object. - * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). - * Only for internal use. - */ - static initialize(obj) { - } - - /** - * Constructs a ListAssistants404Response from a plain JavaScript object, optionally creating a new instance. - * Copies all relevant properties from data to obj if supplied or a new instance if not. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @param {module:models/ListAssistants404Response} obj Optional instance to populate. - * @return {module:models/ListAssistants404Response} The populated ListAssistants404Response instance. - */ - static constructFromObject(data, obj) { - if (data) { - obj = obj || new ListAssistants404Response(); - - if (data.hasOwnProperty('message')) { - obj['message'] = ApiClient.convertToType(data['message'], 'String'); - } - } - return obj; - } - - /** - * Validates the JSON data with respect to ListAssistants404Response. - * @param {Object} data The plain JavaScript object bearing properties of interest. - * @return {boolean} to indicate whether the JSON data is valid with respect to ListAssistants404Response. - */ - static validateJSON(data) { - // ensure the json data is a string - if (data['message'] && !(typeof data['message'] === 'string' || data['message'] instanceof String)) { - throw new Error("Expected the field `message` to be a primitive type in the JSON string but got " + data['message']); - } - - return true; - } - - -} - - - -/** - * @member {String} message - */ -ListAssistants404Response.prototype['message'] = undefined; - - - - - - -export default ListAssistants404Response; - diff --git a/packages/continue-sdk/clients/javascript/test/api/DefaultApi.spec.js b/packages/continue-sdk/clients/javascript/test/api/DefaultApi.spec.js deleted file mode 100644 index 4d59e595a..000000000 --- a/packages/continue-sdk/clients/javascript/test/api/DefaultApi.spec.js +++ /dev/null @@ -1,63 +0,0 @@ -/** - * Continue Hub IDE API - * API for Continue IDE to fetch assistants and other related information. These endpoints are primarily used by the Continue IDE extensions for VS Code and JetBrains. - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.ContinueHubIdeApi); - } -}(this, function(expect, ContinueHubIdeApi) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new ContinueHubIdeApi.DefaultApi(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('DefaultApi', function() { - describe('listAssistants', function() { - it('should call listAssistants successfully', function(done) { - //uncomment below and update the code to test listAssistants - //instance.listAssistants(function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - }); - -})); diff --git a/packages/continue-sdk/clients/javascript/test/model/ListAssistants200ResponseInner.spec.js b/packages/continue-sdk/clients/javascript/test/model/ListAssistants200ResponseInner.spec.js deleted file mode 100644 index 83b0b98d6..000000000 --- a/packages/continue-sdk/clients/javascript/test/model/ListAssistants200ResponseInner.spec.js +++ /dev/null @@ -1,101 +0,0 @@ -/** - * Continue Hub IDE API - * API for Continue IDE to fetch assistants and other related information. These endpoints are primarily used by the Continue IDE extensions for VS Code and JetBrains. - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.ContinueHubIdeApi); - } -}(this, function(expect, ContinueHubIdeApi) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new ContinueHubIdeApi.ListAssistants200ResponseInner(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('ListAssistants200ResponseInner', function() { - it('should create an instance of ListAssistants200ResponseInner', function() { - // uncomment below and update the code to test ListAssistants200ResponseInner - //var instance = new ContinueHubIdeApi.ListAssistants200ResponseInner(); - //expect(instance).to.be.a(ContinueHubIdeApi.ListAssistants200ResponseInner); - }); - - it('should have the property configResult (base name: "configResult")', function() { - // uncomment below and update the code to test the property configResult - //var instance = new ContinueHubIdeApi.ListAssistants200ResponseInner(); - //expect(instance).to.be(); - }); - - it('should have the property ownerSlug (base name: "ownerSlug")', function() { - // uncomment below and update the code to test the property ownerSlug - //var instance = new ContinueHubIdeApi.ListAssistants200ResponseInner(); - //expect(instance).to.be(); - }); - - it('should have the property packageSlug (base name: "packageSlug")', function() { - // uncomment below and update the code to test the property packageSlug - //var instance = new ContinueHubIdeApi.ListAssistants200ResponseInner(); - //expect(instance).to.be(); - }); - - it('should have the property iconUrl (base name: "iconUrl")', function() { - // uncomment below and update the code to test the property iconUrl - //var instance = new ContinueHubIdeApi.ListAssistants200ResponseInner(); - //expect(instance).to.be(); - }); - - it('should have the property onPremProxyUrl (base name: "onPremProxyUrl")', function() { - // uncomment below and update the code to test the property onPremProxyUrl - //var instance = new ContinueHubIdeApi.ListAssistants200ResponseInner(); - //expect(instance).to.be(); - }); - - it('should have the property useOnPremProxy (base name: "useOnPremProxy")', function() { - // uncomment below and update the code to test the property useOnPremProxy - //var instance = new ContinueHubIdeApi.ListAssistants200ResponseInner(); - //expect(instance).to.be(); - }); - - it('should have the property rawYaml (base name: "rawYaml")', function() { - // uncomment below and update the code to test the property rawYaml - //var instance = new ContinueHubIdeApi.ListAssistants200ResponseInner(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/packages/continue-sdk/clients/javascript/test/model/ListAssistants200ResponseInnerConfigResult.spec.js b/packages/continue-sdk/clients/javascript/test/model/ListAssistants200ResponseInnerConfigResult.spec.js deleted file mode 100644 index 3117caa44..000000000 --- a/packages/continue-sdk/clients/javascript/test/model/ListAssistants200ResponseInnerConfigResult.spec.js +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Continue Hub IDE API - * API for Continue IDE to fetch assistants and other related information. These endpoints are primarily used by the Continue IDE extensions for VS Code and JetBrains. - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.ContinueHubIdeApi); - } -}(this, function(expect, ContinueHubIdeApi) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new ContinueHubIdeApi.ListAssistants200ResponseInnerConfigResult(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('ListAssistants200ResponseInnerConfigResult', function() { - it('should create an instance of ListAssistants200ResponseInnerConfigResult', function() { - // uncomment below and update the code to test ListAssistants200ResponseInnerConfigResult - //var instance = new ContinueHubIdeApi.ListAssistants200ResponseInnerConfigResult(); - //expect(instance).to.be.a(ContinueHubIdeApi.ListAssistants200ResponseInnerConfigResult); - }); - - it('should have the property config (base name: "config")', function() { - // uncomment below and update the code to test the property config - //var instance = new ContinueHubIdeApi.ListAssistants200ResponseInnerConfigResult(); - //expect(instance).to.be(); - }); - - it('should have the property configLoadInterrupted (base name: "configLoadInterrupted")', function() { - // uncomment below and update the code to test the property configLoadInterrupted - //var instance = new ContinueHubIdeApi.ListAssistants200ResponseInnerConfigResult(); - //expect(instance).to.be(); - }); - - it('should have the property errors (base name: "errors")', function() { - // uncomment below and update the code to test the property errors - //var instance = new ContinueHubIdeApi.ListAssistants200ResponseInnerConfigResult(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/packages/continue-sdk/clients/javascript/test/model/ListAssistants401Response.spec.js b/packages/continue-sdk/clients/javascript/test/model/ListAssistants401Response.spec.js deleted file mode 100644 index 4e1b7c39f..000000000 --- a/packages/continue-sdk/clients/javascript/test/model/ListAssistants401Response.spec.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Continue Hub IDE API - * API for Continue IDE to fetch assistants and other related information. These endpoints are primarily used by the Continue IDE extensions for VS Code and JetBrains. - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.ContinueHubIdeApi); - } -}(this, function(expect, ContinueHubIdeApi) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new ContinueHubIdeApi.ListAssistants401Response(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('ListAssistants401Response', function() { - it('should create an instance of ListAssistants401Response', function() { - // uncomment below and update the code to test ListAssistants401Response - //var instance = new ContinueHubIdeApi.ListAssistants401Response(); - //expect(instance).to.be.a(ContinueHubIdeApi.ListAssistants401Response); - }); - - it('should have the property message (base name: "message")', function() { - // uncomment below and update the code to test the property message - //var instance = new ContinueHubIdeApi.ListAssistants401Response(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/packages/continue-sdk/clients/javascript/test/model/ListAssistants404Response.spec.js b/packages/continue-sdk/clients/javascript/test/model/ListAssistants404Response.spec.js deleted file mode 100644 index 9582fa6e4..000000000 --- a/packages/continue-sdk/clients/javascript/test/model/ListAssistants404Response.spec.js +++ /dev/null @@ -1,65 +0,0 @@ -/** - * Continue Hub IDE API - * API for Continue IDE to fetch assistants and other related information. These endpoints are primarily used by the Continue IDE extensions for VS Code and JetBrains. - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - * - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', process.cwd()+'/src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require(process.cwd()+'/src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.ContinueHubIdeApi); - } -}(this, function(expect, ContinueHubIdeApi) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new ContinueHubIdeApi.ListAssistants404Response(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('ListAssistants404Response', function() { - it('should create an instance of ListAssistants404Response', function() { - // uncomment below and update the code to test ListAssistants404Response - //var instance = new ContinueHubIdeApi.ListAssistants404Response(); - //expect(instance).to.be.a(ContinueHubIdeApi.ListAssistants404Response); - }); - - it('should have the property message (base name: "message")', function() { - // uncomment below and update the code to test the property message - //var instance = new ContinueHubIdeApi.ListAssistants404Response(); - //expect(instance).to.be(); - }); - - }); - -})); diff --git a/packages/continue-sdk/clients/php/.gitignore b/packages/continue-sdk/clients/php/.gitignore deleted file mode 100644 index 9f1681c2b..000000000 --- a/packages/continue-sdk/clients/php/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -# ref: https://github.com/github/gitignore/blob/master/Composer.gitignore - -composer.phar -/vendor/ - -# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control -# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file -# composer.lock - -# php-cs-fixer cache -.php_cs.cache -.php-cs-fixer.cache - -# PHPUnit cache -.phpunit.result.cache diff --git a/packages/continue-sdk/clients/php/.openapi-generator-ignore b/packages/continue-sdk/clients/php/.openapi-generator-ignore deleted file mode 100644 index 7484ee590..000000000 --- a/packages/continue-sdk/clients/php/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/packages/continue-sdk/clients/php/.openapi-generator/FILES b/packages/continue-sdk/clients/php/.openapi-generator/FILES deleted file mode 100644 index b53111761..000000000 --- a/packages/continue-sdk/clients/php/.openapi-generator/FILES +++ /dev/null @@ -1,28 +0,0 @@ -.gitignore -.openapi-generator-ignore -.php-cs-fixer.dist.php -.travis.yml -README.md -composer.json -docs/Api/DefaultApi.md -docs/Model/ListAssistants200ResponseInner.md -docs/Model/ListAssistants200ResponseInnerConfigResult.md -docs/Model/ListAssistants401Response.md -docs/Model/ListAssistants404Response.md -git_push.sh -lib/ApiException.php -lib/Configuration.php -lib/HeaderSelector.php -lib/ObjectSerializer.php -lib/api/DefaultApi.php -lib/models/ListAssistants200ResponseInner.php -lib/models/ListAssistants200ResponseInnerConfigResult.php -lib/models/ListAssistants401Response.php -lib/models/ListAssistants404Response.php -lib/models/ModelInterface.php -phpunit.xml.dist -test/Api/DefaultApiTest.php -test/Model/ListAssistants200ResponseInnerConfigResultTest.php -test/Model/ListAssistants200ResponseInnerTest.php -test/Model/ListAssistants401ResponseTest.php -test/Model/ListAssistants404ResponseTest.php diff --git a/packages/continue-sdk/clients/php/.openapi-generator/VERSION b/packages/continue-sdk/clients/php/.openapi-generator/VERSION deleted file mode 100644 index 5f84a81db..000000000 --- a/packages/continue-sdk/clients/php/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.12.0 diff --git a/packages/continue-sdk/clients/php/.php-cs-fixer.dist.php b/packages/continue-sdk/clients/php/.php-cs-fixer.dist.php deleted file mode 100644 index af9cf39fd..000000000 --- a/packages/continue-sdk/clients/php/.php-cs-fixer.dist.php +++ /dev/null @@ -1,29 +0,0 @@ -in(__DIR__) - ->exclude('vendor') - ->exclude('test') - ->exclude('tests') -; - -$config = new PhpCsFixer\Config(); -return $config->setRules([ - '@PSR12' => true, - 'phpdoc_order' => true, - 'array_syntax' => [ 'syntax' => 'short' ], - 'strict_comparison' => true, - 'strict_param' => true, - 'no_trailing_whitespace' => false, - 'no_trailing_whitespace_in_comment' => false, - 'braces' => false, - 'single_blank_line_at_eof' => false, - 'blank_line_after_namespace' => false, - 'no_leading_import_slash' => false, - ]) - ->setFinder($finder) -; diff --git a/packages/continue-sdk/clients/php/.travis.yml b/packages/continue-sdk/clients/php/.travis.yml deleted file mode 100644 index 667b81565..000000000 --- a/packages/continue-sdk/clients/php/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: php -# Bionic environment has preinstalled PHP from 7.1 to 7.4 -# https://docs.travis-ci.com/user/reference/bionic/#php-support -dist: bionic -php: - - 7.4 -before_install: "composer install" -script: "vendor/bin/phpunit" diff --git a/packages/continue-sdk/clients/php/README.md b/packages/continue-sdk/clients/php/README.md deleted file mode 100644 index 975aea07a..000000000 --- a/packages/continue-sdk/clients/php/README.md +++ /dev/null @@ -1,118 +0,0 @@ -# OpenAPIClient-php - -API for Continue IDE to fetch assistants and other related information. -These endpoints are primarily used by the Continue IDE extensions for VS Code and JetBrains. - - -For more information, please visit [https://continue.dev](https://continue.dev). - -## Installation & Usage - -### Requirements - -PHP 7.4 and later. -Should also work with PHP 8.0. - -### Composer - -To install the bindings via [Composer](https://getcomposer.org/), add the following to `composer.json`: - -```json -{ - "repositories": [ - { - "type": "vcs", - "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git" - } - ], - "require": { - "GIT_USER_ID/GIT_REPO_ID": "*@dev" - } -} -``` - -Then run `composer install` - -### Manual Installation - -Download the files and include `autoload.php`: - -```php -setAccessToken('YOUR_ACCESS_TOKEN'); - - -$apiInstance = new OpenAPI\Client\Api\DefaultApi( - // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. - // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client(), - $config -); -$always_use_proxy = 'always_use_proxy_example'; // string | Whether to always use the Continue-managed proxy for model requests -$organization_id = 'organization_id_example'; // string | ID of the organization to scope assistants to. If not provided, personal assistants are returned. - -try { - $result = $apiInstance->listAssistants($always_use_proxy, $organization_id); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling DefaultApi->listAssistants: ', $e->getMessage(), PHP_EOL; -} - -``` - -## API Endpoints - -All URIs are relative to *https://api.continue.dev* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DefaultApi* | [**listAssistants**](docs/Api/DefaultApi.md#listassistants) | **GET** /ide/list-assistants | List assistants for IDE - -## Models - -- [ListAssistants200ResponseInner](docs/Model/ListAssistants200ResponseInner.md) -- [ListAssistants200ResponseInnerConfigResult](docs/Model/ListAssistants200ResponseInnerConfigResult.md) -- [ListAssistants401Response](docs/Model/ListAssistants401Response.md) -- [ListAssistants404Response](docs/Model/ListAssistants404Response.md) - -## Authorization - -Authentication schemes defined for the API: -### apiKeyAuth - -- **Type**: Bearer authentication - -## Tests - -To run the tests, use: - -```bash -composer install -vendor/bin/phpunit -``` - -## Author - - - -## About this package - -This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: `1.0.0` - - Generator version: `7.12.0` -- Build package: `org.openapitools.codegen.languages.PhpClientCodegen` diff --git a/packages/continue-sdk/clients/php/composer.json b/packages/continue-sdk/clients/php/composer.json deleted file mode 100644 index 5ec126cc5..000000000 --- a/packages/continue-sdk/clients/php/composer.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "description": "API for Continue IDE to fetch assistants and other related information. These endpoints are primarily used by the Continue IDE extensions for VS Code and JetBrains.", - "keywords": [ - "openapitools", - "openapi-generator", - "openapi", - "php", - "sdk", - "rest", - "api" - ], - "homepage": "https://openapi-generator.tech", - "license": "unlicense", - "authors": [ - { - "name": "OpenAPI", - "homepage": "https://openapi-generator.tech" - } - ], - "require": { - "php": "^7.4 || ^8.0", - "ext-curl": "*", - "ext-json": "*", - "ext-mbstring": "*", - "guzzlehttp/guzzle": "^7.3", - "guzzlehttp/psr7": "^1.7 || ^2.0" - }, - "require-dev": { - "phpunit/phpunit": "^8.0 || ^9.0", - "friendsofphp/php-cs-fixer": "^3.5" - }, - "autoload": { - "psr-4": { "OpenAPI\\Client\\" : "lib/" } - }, - "autoload-dev": { - "psr-4": { "OpenAPI\\Client\\Test\\" : "test/" } - } -} diff --git a/packages/continue-sdk/clients/php/docs/Api/DefaultApi.md b/packages/continue-sdk/clients/php/docs/Api/DefaultApi.md deleted file mode 100644 index ae2de2642..000000000 --- a/packages/continue-sdk/clients/php/docs/Api/DefaultApi.md +++ /dev/null @@ -1,70 +0,0 @@ -# OpenAPI\Client\DefaultApi - -All URIs are relative to https://api.continue.dev, except if the operation defines another base path. - -| Method | HTTP request | Description | -| ------------- | ------------- | ------------- | -| [**listAssistants()**](DefaultApi.md#listAssistants) | **GET** /ide/list-assistants | List assistants for IDE | - - -## `listAssistants()` - -```php -listAssistants($always_use_proxy, $organization_id): \OpenAPI\Client\models\ListAssistants200ResponseInner[] -``` - -List assistants for IDE - -Returns a complete list of assistants available to the user, with their full configurations, icons, and other metadata needed by the IDE to display and use them. This endpoint performs a full refresh of the list of assistants, including unrolling configurations and resolving secrets. - -### Example - -```php -setAccessToken('YOUR_ACCESS_TOKEN'); - - -$apiInstance = new OpenAPI\Client\Api\DefaultApi( - // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. - // This is optional, `GuzzleHttp\Client` will be used as default. - new GuzzleHttp\Client(), - $config -); -$always_use_proxy = 'always_use_proxy_example'; // string | Whether to always use the Continue-managed proxy for model requests -$organization_id = 'organization_id_example'; // string | ID of the organization to scope assistants to. If not provided, personal assistants are returned. - -try { - $result = $apiInstance->listAssistants($always_use_proxy, $organization_id); - print_r($result); -} catch (Exception $e) { - echo 'Exception when calling DefaultApi->listAssistants: ', $e->getMessage(), PHP_EOL; -} -``` - -### Parameters - -| Name | Type | Description | Notes | -| ------------- | ------------- | ------------- | ------------- | -| **always_use_proxy** | **string**| Whether to always use the Continue-managed proxy for model requests | [optional] | -| **organization_id** | **string**| ID of the organization to scope assistants to. If not provided, personal assistants are returned. | [optional] | - -### Return type - -[**\OpenAPI\Client\models\ListAssistants200ResponseInner[]**](../Model/ListAssistants200ResponseInner.md) - -### Authorization - -[apiKeyAuth](../../README.md#apiKeyAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - -[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) -[[Back to Model list]](../../README.md#models) -[[Back to README]](../../README.md) diff --git a/packages/continue-sdk/clients/php/docs/Model/ListAssistants200ResponseInner.md b/packages/continue-sdk/clients/php/docs/Model/ListAssistants200ResponseInner.md deleted file mode 100644 index 82cf30351..000000000 --- a/packages/continue-sdk/clients/php/docs/Model/ListAssistants200ResponseInner.md +++ /dev/null @@ -1,15 +0,0 @@ -# # ListAssistants200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**config_result** | [**\OpenAPI\Client\models\ListAssistants200ResponseInnerConfigResult**](ListAssistants200ResponseInnerConfigResult.md) | | -**owner_slug** | **string** | Slug of the user or organization that owns the assistant | -**package_slug** | **string** | Slug of the assistant package | -**icon_url** | **string** | Pre-signed URL for the assistant's icon | [optional] -**on_prem_proxy_url** | **string** | URL of the on-premises proxy if the organization uses one | [optional] -**use_on_prem_proxy** | **bool** | Whether the organization uses an on-premises proxy | [optional] -**raw_yaml** | **string** | Raw YAML configuration of the assistant | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/packages/continue-sdk/clients/php/docs/Model/ListAssistants200ResponseInnerConfigResult.md b/packages/continue-sdk/clients/php/docs/Model/ListAssistants200ResponseInnerConfigResult.md deleted file mode 100644 index 8505c2161..000000000 --- a/packages/continue-sdk/clients/php/docs/Model/ListAssistants200ResponseInnerConfigResult.md +++ /dev/null @@ -1,11 +0,0 @@ -# # ListAssistants200ResponseInnerConfigResult - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**config** | **object** | The unrolled assistant configuration | -**config_load_interrupted** | **bool** | Whether the configuration loading was interrupted | -**errors** | **string[]** | Any errors that occurred during configuration loading | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/packages/continue-sdk/clients/php/docs/Model/ListAssistants401Response.md b/packages/continue-sdk/clients/php/docs/Model/ListAssistants401Response.md deleted file mode 100644 index 69c9d2800..000000000 --- a/packages/continue-sdk/clients/php/docs/Model/ListAssistants401Response.md +++ /dev/null @@ -1,9 +0,0 @@ -# # ListAssistants401Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message** | **string** | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/packages/continue-sdk/clients/php/docs/Model/ListAssistants404Response.md b/packages/continue-sdk/clients/php/docs/Model/ListAssistants404Response.md deleted file mode 100644 index 0c4ff1bf2..000000000 --- a/packages/continue-sdk/clients/php/docs/Model/ListAssistants404Response.md +++ /dev/null @@ -1,9 +0,0 @@ -# # ListAssistants404Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**message** | **string** | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/packages/continue-sdk/clients/php/git_push.sh b/packages/continue-sdk/clients/php/git_push.sh deleted file mode 100644 index f53a75d4f..000000000 --- a/packages/continue-sdk/clients/php/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/packages/continue-sdk/clients/php/phpunit.xml.dist b/packages/continue-sdk/clients/php/phpunit.xml.dist deleted file mode 100644 index aed112ac8..000000000 --- a/packages/continue-sdk/clients/php/phpunit.xml.dist +++ /dev/null @@ -1,18 +0,0 @@ - - - - - ./lib/api - ./lib/models - - - - - ./test/Api - ./test/Model - - - - - - diff --git a/packages/continue-sdk/clients/php/test/Api/DefaultApiTest.php b/packages/continue-sdk/clients/php/test/Api/DefaultApiTest.php deleted file mode 100644 index 1cc9048ff..000000000 --- a/packages/continue-sdk/clients/php/test/Api/DefaultApiTest.php +++ /dev/null @@ -1,85 +0,0 @@ -