improv: remove clients
This commit is contained in:
parent
cddb7976f7
commit
e1b17b82c4
49 changed files with 2 additions and 3255 deletions
|
|
@ -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"
|
||||
]
|
||||
}
|
||||
130
packages/continue-sdk/clients/javascript/.gitignore
vendored
130
packages/continue-sdk/clients/javascript/.gitignore
vendored
|
|
@ -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.*
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -1 +0,0 @@
|
|||
7.12.0
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
language: node_js
|
||||
cache: npm
|
||||
node_js:
|
||||
- "6"
|
||||
- "6.1"
|
||||
|
|
@ -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/<JAVASCRIPT_CLIENT_DIR>
|
||||
```
|
||||
|
||||
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
|
||||
|
||||
|
|
@ -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
|
||||
|
||||
|
|
@ -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]
|
||||
|
||||
|
||||
|
|
@ -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]
|
||||
|
||||
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
# ContinueHubIdeApi.ListAssistants401Response
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**message** | **String** | | [optional]
|
||||
|
||||
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
# ContinueHubIdeApi.ListAssistants404Response
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**message** | **String** | | [optional]
|
||||
|
||||
|
||||
|
|
@ -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'
|
||||
|
|
@ -1 +0,0 @@
|
|||
--timeout 10000
|
||||
|
|
@ -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"
|
||||
]
|
||||
}
|
||||
|
|
@ -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.<String>}
|
||||
*/
|
||||
this.authentications = {
|
||||
'apiKeyAuth': {type: 'bearer'}
|
||||
}
|
||||
|
||||
/**
|
||||
* The default HTTP headers to be included for all API calls.
|
||||
* @type {Array.<String>}
|
||||
* @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 <code>param</code>.
|
||||
*/
|
||||
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 <code>param</code> 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.<br>
|
||||
* JSON content type examples:<br>
|
||||
* <ul>
|
||||
* <li>application/json</li>
|
||||
* <li>application/json; charset=UTF8</li>
|
||||
* <li>APPLICATION/JSON</li>
|
||||
* </ul>
|
||||
* @param {String} contentType The MIME content type to check.
|
||||
* @returns {Boolean} <code>true</code> if <code>contentType</code> represents JSON, otherwise <code>false</code>.
|
||||
*/
|
||||
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.<String>} 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} <code>true</code> if <code>param</code> 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:
|
||||
* <ul>
|
||||
* <li>remove nils</li>
|
||||
* <li>keep files and arrays</li>
|
||||
* <li>format to string with `paramToString` for other cases</li>
|
||||
* </ul>
|
||||
* @param {Object.<String, Object>} params The parameters as object properties.
|
||||
* @returns {Object.<String, 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
|
||||
* <code>param</code> as is if <code>collectionFormat</code> is <code>multi</code>.
|
||||
*/
|
||||
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 <code>superagent()</code> call.
|
||||
* @param {Array.<String>} 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.<String>|Object.<String, 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 <code>data<code> 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.<String, String>} pathParams A map of path parameters and their values.
|
||||
* @param {Object.<String, Object>} queryParams A map of query parameters and their values.
|
||||
* @param {Object.<String, Object>} headerParams A map of header parameters and their values.
|
||||
* @param {Object.<String, Object>} formParams A map of form parameters and their values.
|
||||
* @param {Object} bodyParam The value to pass as the request body.
|
||||
* @param {Array.<String>} authNames An array of authentication type names.
|
||||
* @param {Array.<String>} contentTypes An array of request MIME types.
|
||||
* @param {Array.<String>} 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.<String>|Object.<String, 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 <code>data<code> 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: <code>csv</code>
|
||||
* @const
|
||||
*/
|
||||
CSV: ',',
|
||||
|
||||
/**
|
||||
* Space-separated values. Value: <code>ssv</code>
|
||||
* @const
|
||||
*/
|
||||
SSV: ' ',
|
||||
|
||||
/**
|
||||
* Tab-separated values. Value: <code>tsv</code>
|
||||
* @const
|
||||
*/
|
||||
TSV: '\t',
|
||||
|
||||
/**
|
||||
* Pipe(|)-separated values. Value: <code>pipes</code>
|
||||
* @const
|
||||
*/
|
||||
PIPES: '|',
|
||||
|
||||
/**
|
||||
* Native array. Value: <code>multi</code>
|
||||
* @const
|
||||
*/
|
||||
MULTI: 'multi'
|
||||
};
|
||||
|
||||
/**
|
||||
* The default API client implementation.
|
||||
* @type {module:ApiClient}
|
||||
*/
|
||||
ApiClient.instance = new ApiClient();
|
||||
export default ApiClient;
|
||||
|
|
@ -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.<module:models/ListAssistants200ResponseInner>} 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.<module:models/ListAssistants200ResponseInner>}
|
||||
*/
|
||||
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
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -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. .<br>
|
||||
* The <code>index</code> module provides access to constructors for all the classes which comprise the public API.
|
||||
* <p>
|
||||
* An AMD (recommended!) or CommonJS application will generally do something equivalent to the following:
|
||||
* <pre>
|
||||
* 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.
|
||||
* ...
|
||||
* </pre>
|
||||
* <em>*NOTE: For a top-level AMD script, use require(['index'], function(){...})
|
||||
* and put the application logic within the callback function.</em>
|
||||
* </p>
|
||||
* <p>
|
||||
* A non-AMD browser application (discouraged) might do something like this:
|
||||
* <pre>
|
||||
* 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.
|
||||
* ...
|
||||
* </pre>
|
||||
* </p>
|
||||
* @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
|
||||
};
|
||||
|
|
@ -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 <code>ListAssistants200ResponseInner</code>.
|
||||
* @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 <code>ListAssistants200ResponseInner</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> 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 <code>ListAssistants200ResponseInner</code> 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 <code>ListAssistants200ResponseInner</code>.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ListAssistants200ResponseInner</code>.
|
||||
*/
|
||||
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;
|
||||
|
||||
|
|
@ -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 <code>ListAssistants200ResponseInnerConfigResult</code>.
|
||||
* @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 <code>ListAssistants200ResponseInnerConfigResult</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> 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 <code>ListAssistants200ResponseInnerConfigResult</code> 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 <code>ListAssistants200ResponseInnerConfigResult</code>.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ListAssistants200ResponseInnerConfigResult</code>.
|
||||
*/
|
||||
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.<String>} errors
|
||||
*/
|
||||
ListAssistants200ResponseInnerConfigResult.prototype['errors'] = undefined;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export default ListAssistants200ResponseInnerConfigResult;
|
||||
|
||||
|
|
@ -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 <code>ListAssistants401Response</code>.
|
||||
* @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 <code>ListAssistants401Response</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> 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 <code>ListAssistants401Response</code> 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 <code>ListAssistants401Response</code>.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ListAssistants401Response</code>.
|
||||
*/
|
||||
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;
|
||||
|
||||
|
|
@ -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 <code>ListAssistants404Response</code>.
|
||||
* @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 <code>ListAssistants404Response</code> from a plain JavaScript object, optionally creating a new instance.
|
||||
* Copies all relevant properties from <code>data</code> to <code>obj</code> 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 <code>ListAssistants404Response</code> 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 <code>ListAssistants404Response</code>.
|
||||
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||||
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>ListAssistants404Response</code>.
|
||||
*/
|
||||
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;
|
||||
|
||||
|
|
@ -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();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
}));
|
||||
|
|
@ -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();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}));
|
||||
|
|
@ -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();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}));
|
||||
|
|
@ -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();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}));
|
||||
|
|
@ -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();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}));
|
||||
15
packages/continue-sdk/clients/php/.gitignore
vendored
15
packages/continue-sdk/clients/php/.gitignore
vendored
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -1 +0,0 @@
|
|||
7.12.0
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @generated
|
||||
* @link https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/HEAD/doc/config.rst
|
||||
*/
|
||||
$finder = PhpCsFixer\Finder::create()
|
||||
->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)
|
||||
;
|
||||
|
|
@ -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"
|
||||
|
|
@ -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
|
||||
<?php
|
||||
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');
|
||||
```
|
||||
|
||||
## Getting Started
|
||||
|
||||
Please follow the [installation procedure](#installation--usage) and then run the following:
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
|
||||
// Configure Bearer authorization: apiKeyAuth
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->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`
|
||||
|
|
@ -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/" }
|
||||
}
|
||||
}
|
||||
|
|
@ -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
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure Bearer authorization: apiKeyAuth
|
||||
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->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)
|
||||
|
|
@ -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)
|
||||
|
|
@ -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)
|
||||
|
|
@ -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)
|
||||
|
|
@ -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)
|
||||
|
|
@ -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'
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="./vendor/autoload.php" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
|
||||
<coverage processUncoveredFiles="true">
|
||||
<include>
|
||||
<directory suffix=".php">./lib/api</directory>
|
||||
<directory suffix=".php">./lib/models</directory>
|
||||
</include>
|
||||
</coverage>
|
||||
<testsuites>
|
||||
<testsuite name="tests">
|
||||
<directory>./test/Api</directory>
|
||||
<directory>./test/Model</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
<php>
|
||||
<ini name="error_reporting" value="E_ALL"/>
|
||||
</php>
|
||||
</phpunit>
|
||||
|
|
@ -1,85 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* DefaultApiTest
|
||||
* PHP version 7.4
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* 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
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* Generator version: 7.12.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Please update the test case below to test the endpoint.
|
||||
*/
|
||||
|
||||
namespace OpenAPI\Client\Test\Api;
|
||||
|
||||
use \OpenAPI\Client\Configuration;
|
||||
use \OpenAPI\Client\ApiException;
|
||||
use \OpenAPI\Client\ObjectSerializer;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* DefaultApiTest Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class DefaultApiTest extends TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* Setup before running any test cases
|
||||
*/
|
||||
public static function setUpBeforeClass(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup before running each test case
|
||||
*/
|
||||
public function setUp(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running each test case
|
||||
*/
|
||||
public function tearDown(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running all test cases
|
||||
*/
|
||||
public static function tearDownAfterClass(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test case for listAssistants
|
||||
*
|
||||
* List assistants for IDE.
|
||||
*
|
||||
*/
|
||||
public function testListAssistants()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
}
|
||||
|
|
@ -1,108 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* ListAssistants200ResponseInnerConfigResultTest
|
||||
*
|
||||
* PHP version 7.4
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* 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
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* Generator version: 7.12.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Please update the test case below to test the model.
|
||||
*/
|
||||
|
||||
namespace OpenAPI\Client\Test\Model;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* ListAssistants200ResponseInnerConfigResultTest Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description ListAssistants200ResponseInnerConfigResult
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class ListAssistants200ResponseInnerConfigResultTest extends TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* Setup before running any test case
|
||||
*/
|
||||
public static function setUpBeforeClass(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup before running each test case
|
||||
*/
|
||||
public function setUp(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running each test case
|
||||
*/
|
||||
public function tearDown(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running all test cases
|
||||
*/
|
||||
public static function tearDownAfterClass(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test "ListAssistants200ResponseInnerConfigResult"
|
||||
*/
|
||||
public function testListAssistants200ResponseInnerConfigResult()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "config"
|
||||
*/
|
||||
public function testPropertyConfig()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "config_load_interrupted"
|
||||
*/
|
||||
public function testPropertyConfigLoadInterrupted()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "errors"
|
||||
*/
|
||||
public function testPropertyErrors()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
}
|
||||
|
|
@ -1,144 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* ListAssistants200ResponseInnerTest
|
||||
*
|
||||
* PHP version 7.4
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* 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
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* Generator version: 7.12.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Please update the test case below to test the model.
|
||||
*/
|
||||
|
||||
namespace OpenAPI\Client\Test\Model;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* ListAssistants200ResponseInnerTest Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description ListAssistants200ResponseInner
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class ListAssistants200ResponseInnerTest extends TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* Setup before running any test case
|
||||
*/
|
||||
public static function setUpBeforeClass(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup before running each test case
|
||||
*/
|
||||
public function setUp(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running each test case
|
||||
*/
|
||||
public function tearDown(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running all test cases
|
||||
*/
|
||||
public static function tearDownAfterClass(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test "ListAssistants200ResponseInner"
|
||||
*/
|
||||
public function testListAssistants200ResponseInner()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "config_result"
|
||||
*/
|
||||
public function testPropertyConfigResult()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "owner_slug"
|
||||
*/
|
||||
public function testPropertyOwnerSlug()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "package_slug"
|
||||
*/
|
||||
public function testPropertyPackageSlug()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "icon_url"
|
||||
*/
|
||||
public function testPropertyIconUrl()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "on_prem_proxy_url"
|
||||
*/
|
||||
public function testPropertyOnPremProxyUrl()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "use_on_prem_proxy"
|
||||
*/
|
||||
public function testPropertyUseOnPremProxy()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "raw_yaml"
|
||||
*/
|
||||
public function testPropertyRawYaml()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
}
|
||||
|
|
@ -1,90 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* ListAssistants401ResponseTest
|
||||
*
|
||||
* PHP version 7.4
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* 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
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* Generator version: 7.12.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Please update the test case below to test the model.
|
||||
*/
|
||||
|
||||
namespace OpenAPI\Client\Test\Model;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* ListAssistants401ResponseTest Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description ListAssistants401Response
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class ListAssistants401ResponseTest extends TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* Setup before running any test case
|
||||
*/
|
||||
public static function setUpBeforeClass(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup before running each test case
|
||||
*/
|
||||
public function setUp(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running each test case
|
||||
*/
|
||||
public function tearDown(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running all test cases
|
||||
*/
|
||||
public static function tearDownAfterClass(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test "ListAssistants401Response"
|
||||
*/
|
||||
public function testListAssistants401Response()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "message"
|
||||
*/
|
||||
public function testPropertyMessage()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
}
|
||||
|
|
@ -1,90 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* ListAssistants404ResponseTest
|
||||
*
|
||||
* PHP version 7.4
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* 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
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* Generator version: 7.12.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Please update the test case below to test the model.
|
||||
*/
|
||||
|
||||
namespace OpenAPI\Client\Test\Model;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* ListAssistants404ResponseTest Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description ListAssistants404Response
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class ListAssistants404ResponseTest extends TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* Setup before running any test case
|
||||
*/
|
||||
public static function setUpBeforeClass(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup before running each test case
|
||||
*/
|
||||
public function setUp(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running each test case
|
||||
*/
|
||||
public function tearDown(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running all test cases
|
||||
*/
|
||||
public static function tearDownAfterClass(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test "ListAssistants404Response"
|
||||
*/
|
||||
public function testListAssistants404Response()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "message"
|
||||
*/
|
||||
public function testPropertyMessage()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
}
|
||||
|
|
@ -524,7 +524,7 @@ class Configuration:
|
|||
'description': "Production server",
|
||||
},
|
||||
{
|
||||
'url': "http://localhost:3002",
|
||||
'url': "http://localhost:3001",
|
||||
'description': "Local development server",
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -6,9 +6,7 @@
|
|||
"scripts": {
|
||||
"generate-client:typescript": "openapi-generator-cli generate -i ./openapi.yaml -g typescript-fetch -o ./clients/typescript -c ./openapi-generator-config.json",
|
||||
"generate-client:python": "openapi-generator-cli generate -i ./openapi.yaml -g python -o ./clients/python -c ./openapi-generator-config.json",
|
||||
"generate-client:javascript": "openapi-generator-cli generate -i ./openapi.yaml -g javascript -o ./clients/javascript -c ./openapi-generator-config.json",
|
||||
"generate-client:php": "openapi-generator-cli generate -i ./openapi.yaml -g php -o ./clients/php -c ./openapi-generator-config.json",
|
||||
"generate-client:ALL": "npm run generate-client:typescript && npm run generate-client:python && npm run generate-client:javascript && npm run generate-client:php",
|
||||
"generate-client:ALL": "npm run generate-client:typescript && npm run generate-client:python",
|
||||
"swagger-ui": "node swagger-ui-server.js"
|
||||
},
|
||||
"author": "Continue Dev, Inc.",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue