add more routes to continue sdk

This commit is contained in:
Nate 2025-07-15 10:34:52 -07:00
parent 768d375fcc
commit 2e46efaf9e
71 changed files with 6947 additions and 832 deletions

View file

@ -114,6 +114,394 @@ paths:
message:
type: string
example: "User not found"
/ide/get-assistant/{ownerSlug}/{packageSlug}:
get:
summary: Get a specific assistant by slug
description: |
Returns a single assistant configuration by its owner and package slug.
This endpoint is useful when you need to retrieve or refresh a specific assistant
without fetching the entire list.
operationId: getAssistant
parameters:
- name: ownerSlug
in: path
description: Slug of the user or organization that owns the assistant
required: true
schema:
type: string
- name: packageSlug
in: path
description: Slug of the assistant package
required: true
schema:
type: string
- name: alwaysUseProxy
in: query
description: Whether to always use the Continue-managed proxy for model requests
required: false
schema:
type: string
enum: ["true", "false"]
- name: organizationId
in: query
description: ID of the organization to scope assistants to. If not provided, personal assistants are returned.
required: false
schema:
type: string
security:
- apiKeyAuth: []
responses:
"200":
description: Successfully retrieved assistant
content:
application/json:
schema:
type: object
nullable: true
required:
- configResult
- ownerSlug
- packageSlug
properties:
configResult:
type: object
required:
- config
- configLoadInterrupted
properties:
config:
type: object
description: The unrolled assistant configuration
nullable: true
configLoadInterrupted:
type: boolean
description: Whether the configuration loading was interrupted
errors:
type: array
items:
type: string
nullable: true
description: Any errors that occurred during configuration loading
ownerSlug:
type: string
description: Slug of the user or organization that owns the assistant
packageSlug:
type: string
description: Slug of the assistant package
iconUrl:
type: string
nullable: true
description: Pre-signed URL for the assistant's icon
onPremProxyUrl:
type: string
nullable: true
description: URL of the on-premises proxy if the organization uses one
useOnPremProxy:
type: boolean
nullable: true
description: Whether the organization uses an on-premises proxy
rawYaml:
type: string
description: Raw YAML configuration of the assistant
"401":
description: Unauthorized - Authentication failed
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: "Unauthorized"
"403":
description: Forbidden - Assistant not allowed in organization
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: "This assistant is not allowed in this organization"
"404":
description: User or assistant not found
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: "Assistant not found"
/ide/free-trial-status:
get:
summary: Get free trial status for user
description: |
Returns the current free trial status for the authenticated user, including
usage counts and limits for chat and autocomplete features.
operationId: getFreeTrialStatus
security:
- apiKeyAuth: []
responses:
"200":
description: Successfully retrieved free trial status
content:
application/json:
schema:
type: object
required:
- optedInToFreeTrial
- chatLimit
- autocompleteLimit
properties:
optedInToFreeTrial:
type: boolean
description: Whether the user has opted into the free trial
chatCount:
type: number
nullable: true
description: Current number of chat messages used
autocompleteCount:
type: number
nullable: true
description: Current number of autocomplete requests used
chatLimit:
type: number
description: Maximum number of chat messages allowed in free trial
autocompleteLimit:
type: number
description: Maximum number of autocomplete requests allowed in free trial
"404":
description: User not found
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: "User not found"
/ide/get-models-add-on-checkout-url:
get:
summary: Get Stripe checkout URL for models add-on
description: |
Creates a Stripe checkout session for the models add-on subscription
and returns the checkout URL.
operationId: getModelsAddOnCheckoutUrl
parameters:
- name: profile_id
in: query
description: Profile ID to include in the callback URL
required: false
schema:
type: string
- name: vscode_uri_scheme
in: query
description: VS Code URI scheme to include in the callback URL
required: false
schema:
type: string
security:
- apiKeyAuth: []
responses:
"200":
description: Successfully created checkout session
content:
application/json:
schema:
type: object
required:
- url
properties:
url:
type: string
description: Stripe checkout session URL
"404":
description: User not found
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: "User not found"
"500":
description: Failed to create checkout session
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: "Failed to create checkout session"
/ide/policy:
get:
summary: Get organization policy
description: |
Returns the policy configuration for the first organization
that the user belongs to which has a policy configured.
operationId: getPolicy
security:
- apiKeyAuth: []
responses:
"200":
description: Successfully retrieved policy
content:
application/json:
schema:
type: object
properties:
policy:
type: object
nullable: true
description: Organization policy configuration
orgSlug:
type: string
nullable: true
description: Slug of the organization that has the policy
"404":
description: User not found
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: "User not found"
/ide/sync-secrets:
post:
summary: Synchronize secrets for user
description: |
Resolves and synchronizes secrets for the authenticated user based on
the provided Fully Qualified Secret Names (FQSNs).
operationId: syncSecrets
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- fqsns
properties:
fqsns:
type: array
items:
type: object
description: Array of Fully Qualified Secret Names to resolve
orgScopeId:
type: string
nullable: true
description: Organization ID to scope secret resolution to
orgScopeSlug:
type: string
nullable: true
description: Organization slug to scope secret resolution to
security:
- apiKeyAuth: []
responses:
"200":
description: Successfully resolved secrets
content:
application/json:
schema:
type: array
items:
type: object
nullable: true
description: Resolved secret result or undefined if not found
"404":
description: User not found
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: "User not found"
/ide/list-assistant-full-slugs:
get:
summary: List assistant full slugs (currently returns 429)
description: |
This endpoint is temporarily disabled and returns a 429 status code
to prevent constant refreshes of the full assistant list until a
fixed client version can be deployed.
operationId: listAssistantFullSlugs
security:
- apiKeyAuth: []
responses:
"429":
description: Too many requests - endpoint temporarily disabled
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: "Too many requests"
/ide/list-organizations:
get:
summary: List organizations for user
description: |
Returns a list of organizations that the authenticated user belongs to,
including organization metadata and pre-signed icon URLs.
operationId: listOrganizations
security:
- apiKeyAuth: []
responses:
"200":
description: Successfully retrieved organizations
content:
application/json:
schema:
type: object
required:
- organizations
properties:
organizations:
type: array
items:
type: object
required:
- id
- name
- slug
properties:
id:
type: string
description: Organization ID
name:
type: string
description: Organization name
iconUrl:
type: string
nullable: true
description: Pre-signed URL for the organization's icon
slug:
type: string
description: Organization slug
"404":
description: User not found
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: "User not found"
components:
securitySchemes:

View file

@ -20,7 +20,7 @@
},
"../config-yaml": {
"name": "@continuedev/config-yaml",
"version": "1.0.88",
"version": "1.0.96",
"license": "Apache-2.0",
"dependencies": {
"@continuedev/config-types": "^1.0.14",
@ -31,10 +31,15 @@
"config-yaml": "dist/cli.js"
},
"devDependencies": {
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^9.2.6",
"@semantic-release/npm": "^10.0.6",
"@types/jest": "^29.5.14",
"@types/node": "^20.0.0",
"cross-env": "^7.0.3",
"jest": "^29.7.0",
"semantic-release": "^21.1.2",
"ts-jest": "^29.2.3",
"ts-node": "^10.9.2",
"zod-to-json-schema": "^3.24.5"

View file

@ -4,10 +4,21 @@
.travis.yml
README.md
docs/DefaultApi.md
docs/GetAssistant200Response.md
docs/GetAssistant403Response.md
docs/GetAssistant404Response.md
docs/GetFreeTrialStatus200Response.md
docs/GetModelsAddOnCheckoutUrl200Response.md
docs/GetModelsAddOnCheckoutUrl500Response.md
docs/GetPolicy200Response.md
docs/ListAssistantFullSlugs429Response.md
docs/ListAssistants200ResponseInner.md
docs/ListAssistants200ResponseInnerConfigResult.md
docs/ListAssistants401Response.md
docs/ListAssistants404Response.md
docs/ListOrganizations200Response.md
docs/ListOrganizations200ResponseOrganizationsInner.md
docs/SyncSecretsRequest.md
git_push.sh
openapi_client/__init__.py
openapi_client/api/__init__.py
@ -17,10 +28,21 @@ openapi_client/api_response.py
openapi_client/configuration.py
openapi_client/exceptions.py
openapi_client/models/__init__.py
openapi_client/models/get_assistant200_response.py
openapi_client/models/get_assistant403_response.py
openapi_client/models/get_assistant404_response.py
openapi_client/models/get_free_trial_status200_response.py
openapi_client/models/get_models_add_on_checkout_url200_response.py
openapi_client/models/get_models_add_on_checkout_url500_response.py
openapi_client/models/get_policy200_response.py
openapi_client/models/list_assistant_full_slugs429_response.py
openapi_client/models/list_assistants200_response_inner.py
openapi_client/models/list_assistants200_response_inner_config_result.py
openapi_client/models/list_assistants401_response.py
openapi_client/models/list_assistants404_response.py
openapi_client/models/list_organizations200_response.py
openapi_client/models/list_organizations200_response_organizations_inner.py
openapi_client/models/sync_secrets_request.py
openapi_client/py.typed
openapi_client/rest.py
pyproject.toml
@ -29,4 +51,12 @@ setup.cfg
setup.py
test-requirements.txt
test/__init__.py
test/test_get_free_trial_status200_response.py
test/test_get_models_add_on_checkout_url200_response.py
test/test_get_models_add_on_checkout_url500_response.py
test/test_get_policy200_response.py
test/test_list_assistant_full_slugs429_response.py
test/test_list_organizations200_response.py
test/test_list_organizations200_response_organizations_inner.py
test/test_sync_secrets_request.py
tox.ini

View file

@ -1,22 +1,21 @@
# openapi-client
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 Python package 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.PythonClientCodegen
For more information, please visit [https://continue.dev](https://continue.dev)
For more information, please visit [https://continue.dev](https://continue.dev)
## Requirements.
Python 3.8+
## Installation & Usage
### pip install
If the python package is hosted on a repository, you can install directly using:
@ -24,11 +23,9 @@ If the python package is hosted on a repository, you can install directly using:
```sh
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
```
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)
Then import the package:
```python
import openapi_client
```
@ -40,11 +37,9 @@ Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)
Then import the package:
```python
import openapi_client
```
@ -84,16 +79,18 @@ configuration = openapi_client.Configuration(
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.DefaultApi(api_client)
owner_slug = 'owner_slug_example' # str | Slug of the user or organization that owns the assistant
package_slug = 'package_slug_example' # str | Slug of the assistant package
always_use_proxy = 'always_use_proxy_example' # str | Whether to always use the Continue-managed proxy for model requests (optional)
organization_id = 'organization_id_example' # str | ID of the organization to scope assistants to. If not provided, personal assistants are returned. (optional)
try:
# List assistants for IDE
api_response = api_instance.list_assistants(always_use_proxy=always_use_proxy, organization_id=organization_id)
print("The response of DefaultApi->list_assistants:\n")
# Get a specific assistant by slug
api_response = api_instance.get_assistant(owner_slug, package_slug, always_use_proxy=always_use_proxy, organization_id=organization_id)
print("The response of DefaultApi->get_assistant:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->list_assistants: %s\n" % e)
print("Exception when calling DefaultApi->get_assistant: %s\n" % e)
```
@ -101,26 +98,50 @@ with openapi_client.ApiClient(configuration) as api_client:
All URIs are relative to *https://api.continue.dev*
| Class | Method | HTTP request | Description |
| ------------ | --------------------------------------------------------- | ---------------------------- | ----------------------- |
| _DefaultApi_ | [**list_assistants**](docs/DefaultApi.md#list_assistants) | **GET** /ide/list-assistants | List assistants for IDE |
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*DefaultApi* | [**get_assistant**](docs/DefaultApi.md#get_assistant) | **GET** /ide/get-assistant/{ownerSlug}/{packageSlug} | Get a specific assistant by slug
*DefaultApi* | [**get_free_trial_status**](docs/DefaultApi.md#get_free_trial_status) | **GET** /ide/free-trial-status | Get free trial status for user
*DefaultApi* | [**get_models_add_on_checkout_url**](docs/DefaultApi.md#get_models_add_on_checkout_url) | **GET** /ide/get-models-add-on-checkout-url | Get Stripe checkout URL for models add-on
*DefaultApi* | [**get_policy**](docs/DefaultApi.md#get_policy) | **GET** /ide/policy | Get organization policy
*DefaultApi* | [**list_assistant_full_slugs**](docs/DefaultApi.md#list_assistant_full_slugs) | **GET** /ide/list-assistant-full-slugs | List assistant full slugs (currently returns 429)
*DefaultApi* | [**list_assistants**](docs/DefaultApi.md#list_assistants) | **GET** /ide/list-assistants | List assistants for IDE
*DefaultApi* | [**list_organizations**](docs/DefaultApi.md#list_organizations) | **GET** /ide/list-organizations | List organizations for user
*DefaultApi* | [**sync_secrets**](docs/DefaultApi.md#sync_secrets) | **POST** /ide/sync-secrets | Synchronize secrets for user
## Documentation For Models
- [ListAssistants200ResponseInner](docs/ListAssistants200ResponseInner.md)
- [ListAssistants200ResponseInnerConfigResult](docs/ListAssistants200ResponseInnerConfigResult.md)
- [ListAssistants401Response](docs/ListAssistants401Response.md)
- [ListAssistants404Response](docs/ListAssistants404Response.md)
- [GetAssistant200Response](docs/GetAssistant200Response.md)
- [GetAssistant403Response](docs/GetAssistant403Response.md)
- [GetAssistant404Response](docs/GetAssistant404Response.md)
- [GetFreeTrialStatus200Response](docs/GetFreeTrialStatus200Response.md)
- [GetModelsAddOnCheckoutUrl200Response](docs/GetModelsAddOnCheckoutUrl200Response.md)
- [GetModelsAddOnCheckoutUrl500Response](docs/GetModelsAddOnCheckoutUrl500Response.md)
- [GetPolicy200Response](docs/GetPolicy200Response.md)
- [ListAssistantFullSlugs429Response](docs/ListAssistantFullSlugs429Response.md)
- [ListAssistants200ResponseInner](docs/ListAssistants200ResponseInner.md)
- [ListAssistants200ResponseInnerConfigResult](docs/ListAssistants200ResponseInnerConfigResult.md)
- [ListAssistants401Response](docs/ListAssistants401Response.md)
- [ListAssistants404Response](docs/ListAssistants404Response.md)
- [ListOrganizations200Response](docs/ListOrganizations200Response.md)
- [ListOrganizations200ResponseOrganizationsInner](docs/ListOrganizations200ResponseOrganizationsInner.md)
- [SyncSecretsRequest](docs/SyncSecretsRequest.md)
<a id="documentation-for-authorization"></a>
## Documentation For Authorization
Authentication schemes defined for the API:
<a id="apiKeyAuth"></a>
### apiKeyAuth
- **Type**: Bearer authentication
## Author

View file

@ -2,12 +2,421 @@
All URIs are relative to *https://api.continue.dev*
| Method | HTTP request | Description |
| ---------------------------------------------------- | ---------------------------- | ----------------------- |
| [**list_assistants**](DefaultApi.md#list_assistants) | **GET** /ide/list-assistants | List assistants for IDE |
Method | HTTP request | Description
------------- | ------------- | -------------
[**get_assistant**](DefaultApi.md#get_assistant) | **GET** /ide/get-assistant/{ownerSlug}/{packageSlug} | Get a specific assistant by slug
[**get_free_trial_status**](DefaultApi.md#get_free_trial_status) | **GET** /ide/free-trial-status | Get free trial status for user
[**get_models_add_on_checkout_url**](DefaultApi.md#get_models_add_on_checkout_url) | **GET** /ide/get-models-add-on-checkout-url | Get Stripe checkout URL for models add-on
[**get_policy**](DefaultApi.md#get_policy) | **GET** /ide/policy | Get organization policy
[**list_assistant_full_slugs**](DefaultApi.md#list_assistant_full_slugs) | **GET** /ide/list-assistant-full-slugs | List assistant full slugs (currently returns 429)
[**list_assistants**](DefaultApi.md#list_assistants) | **GET** /ide/list-assistants | List assistants for IDE
[**list_organizations**](DefaultApi.md#list_organizations) | **GET** /ide/list-organizations | List organizations for user
[**sync_secrets**](DefaultApi.md#sync_secrets) | **POST** /ide/sync-secrets | Synchronize secrets for user
# **get_assistant**
> GetAssistant200Response get_assistant(owner_slug, package_slug, always_use_proxy=always_use_proxy, organization_id=organization_id)
Get a specific assistant by slug
Returns a single assistant configuration by its owner and package slug.
This endpoint is useful when you need to retrieve or refresh a specific assistant
without fetching the entire list.
### Example
* Bearer Authentication (apiKeyAuth):
```python
import openapi_client
from openapi_client.models.get_assistant200_response import GetAssistant200Response
from openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.continue.dev
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "https://api.continue.dev"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: apiKeyAuth
configuration = openapi_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.DefaultApi(api_client)
owner_slug = 'owner_slug_example' # str | Slug of the user or organization that owns the assistant
package_slug = 'package_slug_example' # str | Slug of the assistant package
always_use_proxy = 'always_use_proxy_example' # str | Whether to always use the Continue-managed proxy for model requests (optional)
organization_id = 'organization_id_example' # str | ID of the organization to scope assistants to. If not provided, personal assistants are returned. (optional)
try:
# Get a specific assistant by slug
api_response = api_instance.get_assistant(owner_slug, package_slug, always_use_proxy=always_use_proxy, organization_id=organization_id)
print("The response of DefaultApi->get_assistant:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DefaultApi->get_assistant: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**owner_slug** | **str**| Slug of the user or organization that owns the assistant |
**package_slug** | **str**| Slug of the assistant package |
**always_use_proxy** | **str**| Whether to always use the Continue-managed proxy for model requests | [optional]
**organization_id** | **str**| ID of the organization to scope assistants to. If not provided, personal assistants are returned. | [optional]
### Return type
[**GetAssistant200Response**](GetAssistant200Response.md)
### Authorization
[apiKeyAuth](../README.md#apiKeyAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Successfully retrieved assistant | - |
**401** | Unauthorized - Authentication failed | - |
**403** | Forbidden - Assistant not allowed in organization | - |
**404** | User or assistant not found | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **get_free_trial_status**
> GetFreeTrialStatus200Response get_free_trial_status()
Get free trial status for user
Returns the current free trial status for the authenticated user, including
usage counts and limits for chat and autocomplete features.
### Example
* Bearer Authentication (apiKeyAuth):
```python
import openapi_client
from openapi_client.models.get_free_trial_status200_response import GetFreeTrialStatus200Response
from openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.continue.dev
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "https://api.continue.dev"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: apiKeyAuth
configuration = openapi_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.DefaultApi(api_client)
try:
# Get free trial status for user
api_response = api_instance.get_free_trial_status()
print("The response of DefaultApi->get_free_trial_status:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DefaultApi->get_free_trial_status: %s\n" % e)
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**GetFreeTrialStatus200Response**](GetFreeTrialStatus200Response.md)
### Authorization
[apiKeyAuth](../README.md#apiKeyAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Successfully retrieved free trial status | - |
**404** | User not found | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **get_models_add_on_checkout_url**
> GetModelsAddOnCheckoutUrl200Response get_models_add_on_checkout_url(profile_id=profile_id, vscode_uri_scheme=vscode_uri_scheme)
Get Stripe checkout URL for models add-on
Creates a Stripe checkout session for the models add-on subscription
and returns the checkout URL.
### Example
* Bearer Authentication (apiKeyAuth):
```python
import openapi_client
from openapi_client.models.get_models_add_on_checkout_url200_response import GetModelsAddOnCheckoutUrl200Response
from openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.continue.dev
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "https://api.continue.dev"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: apiKeyAuth
configuration = openapi_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.DefaultApi(api_client)
profile_id = 'profile_id_example' # str | Profile ID to include in the callback URL (optional)
vscode_uri_scheme = 'vscode_uri_scheme_example' # str | VS Code URI scheme to include in the callback URL (optional)
try:
# Get Stripe checkout URL for models add-on
api_response = api_instance.get_models_add_on_checkout_url(profile_id=profile_id, vscode_uri_scheme=vscode_uri_scheme)
print("The response of DefaultApi->get_models_add_on_checkout_url:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DefaultApi->get_models_add_on_checkout_url: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**profile_id** | **str**| Profile ID to include in the callback URL | [optional]
**vscode_uri_scheme** | **str**| VS Code URI scheme to include in the callback URL | [optional]
### Return type
[**GetModelsAddOnCheckoutUrl200Response**](GetModelsAddOnCheckoutUrl200Response.md)
### Authorization
[apiKeyAuth](../README.md#apiKeyAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Successfully created checkout session | - |
**404** | User not found | - |
**500** | Failed to create checkout session | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **get_policy**
> GetPolicy200Response get_policy()
Get organization policy
Returns the policy configuration for the first organization
that the user belongs to which has a policy configured.
### Example
* Bearer Authentication (apiKeyAuth):
```python
import openapi_client
from openapi_client.models.get_policy200_response import GetPolicy200Response
from openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.continue.dev
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "https://api.continue.dev"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: apiKeyAuth
configuration = openapi_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.DefaultApi(api_client)
try:
# Get organization policy
api_response = api_instance.get_policy()
print("The response of DefaultApi->get_policy:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DefaultApi->get_policy: %s\n" % e)
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**GetPolicy200Response**](GetPolicy200Response.md)
### Authorization
[apiKeyAuth](../README.md#apiKeyAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Successfully retrieved policy | - |
**404** | User not found | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **list_assistant_full_slugs**
> list_assistant_full_slugs()
List assistant full slugs (currently returns 429)
This endpoint is temporarily disabled and returns a 429 status code
to prevent constant refreshes of the full assistant list until a
fixed client version can be deployed.
### Example
* Bearer Authentication (apiKeyAuth):
```python
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.continue.dev
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "https://api.continue.dev"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: apiKeyAuth
configuration = openapi_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.DefaultApi(api_client)
try:
# List assistant full slugs (currently returns 429)
api_instance.list_assistant_full_slugs()
except Exception as e:
print("Exception when calling DefaultApi->list_assistant_full_slugs: %s\n" % e)
```
### Parameters
This endpoint does not need any parameter.
### Return type
void (empty response body)
### Authorization
[apiKeyAuth](../README.md#apiKeyAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**429** | Too many requests - endpoint temporarily disabled | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **list_assistants**
> List[ListAssistants200ResponseInner] list_assistants(always_use_proxy=always_use_proxy, organization_id=organization_id)
List assistants for IDE
@ -18,9 +427,10 @@ 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
- Bearer Authentication (apiKeyAuth):
* Bearer Authentication (apiKeyAuth):
```python
import openapi_client
@ -60,12 +470,15 @@ with openapi_client.ApiClient(configuration) as api_client:
print("Exception when calling DefaultApi->list_assistants: %s\n" % e)
```
### Parameters
| Name | Type | Description | Notes |
| -------------------- | ------- | ------------------------------------------------------------------------------------------------- | ---------- |
| **always_use_proxy** | **str** | Whether to always use the Continue-managed proxy for model requests | [optional] |
| **organization_id** | **str** | ID of the organization to scope assistants to. If not provided, personal assistants are returned. | [optional] |
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**always_use_proxy** | **str**| Whether to always use the Continue-managed proxy for model requests | [optional]
**organization_id** | **str**| ID of the organization to scope assistants to. If not provided, personal assistants are returned. | [optional]
### Return type
@ -77,15 +490,174 @@ with openapi_client.ApiClient(configuration) as api_client:
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
| ----------- | ------------------------------------ | ---------------- |
| **200** | Successfully retrieved assistants | - |
| **401** | Unauthorized - Authentication failed | - |
| **404** | User not found | - |
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Successfully retrieved assistants | - |
**401** | Unauthorized - Authentication failed | - |
**404** | User not found | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **list_organizations**
> ListOrganizations200Response list_organizations()
List organizations for user
Returns a list of organizations that the authenticated user belongs to,
including organization metadata and pre-signed icon URLs.
### Example
* Bearer Authentication (apiKeyAuth):
```python
import openapi_client
from openapi_client.models.list_organizations200_response import ListOrganizations200Response
from openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.continue.dev
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "https://api.continue.dev"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: apiKeyAuth
configuration = openapi_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.DefaultApi(api_client)
try:
# List organizations for user
api_response = api_instance.list_organizations()
print("The response of DefaultApi->list_organizations:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DefaultApi->list_organizations: %s\n" % e)
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**ListOrganizations200Response**](ListOrganizations200Response.md)
### Authorization
[apiKeyAuth](../README.md#apiKeyAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Successfully retrieved organizations | - |
**404** | User not found | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **sync_secrets**
> List[Optional[object]] sync_secrets(sync_secrets_request)
Synchronize secrets for user
Resolves and synchronizes secrets for the authenticated user based on
the provided Fully Qualified Secret Names (FQSNs).
### Example
* Bearer Authentication (apiKeyAuth):
```python
import openapi_client
from openapi_client.models.sync_secrets_request import SyncSecretsRequest
from openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.continue.dev
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "https://api.continue.dev"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization: apiKeyAuth
configuration = openapi_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.DefaultApi(api_client)
sync_secrets_request = openapi_client.SyncSecretsRequest() # SyncSecretsRequest |
try:
# Synchronize secrets for user
api_response = api_instance.sync_secrets(sync_secrets_request)
print("The response of DefaultApi->sync_secrets:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DefaultApi->sync_secrets: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**sync_secrets_request** | [**SyncSecretsRequest**](SyncSecretsRequest.md)| |
### Return type
**List[Optional[object]]**
### Authorization
[apiKeyAuth](../README.md#apiKeyAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Successfully resolved secrets | - |
**404** | User not found | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View file

@ -0,0 +1,35 @@
# GetAssistant200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**config_result** | [**ListAssistants200ResponseInnerConfigResult**](ListAssistants200ResponseInnerConfigResult.md) | |
**owner_slug** | **str** | Slug of the user or organization that owns the assistant |
**package_slug** | **str** | Slug of the assistant package |
**icon_url** | **str** | Pre-signed URL for the assistant&#39;s icon | [optional]
**on_prem_proxy_url** | **str** | 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** | **str** | Raw YAML configuration of the assistant | [optional]
## Example
```python
from openapi_client.models.get_assistant200_response import GetAssistant200Response
# TODO update the JSON string below
json = "{}"
# create an instance of GetAssistant200Response from a JSON string
get_assistant200_response_instance = GetAssistant200Response.from_json(json)
# print the JSON string representation of the object
print(GetAssistant200Response.to_json())
# convert the object into a dict
get_assistant200_response_dict = get_assistant200_response_instance.to_dict()
# create an instance of GetAssistant200Response from a dict
get_assistant200_response_from_dict = GetAssistant200Response.from_dict(get_assistant200_response_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -0,0 +1,29 @@
# GetAssistant403Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**message** | **str** | | [optional]
## Example
```python
from openapi_client.models.get_assistant403_response import GetAssistant403Response
# TODO update the JSON string below
json = "{}"
# create an instance of GetAssistant403Response from a JSON string
get_assistant403_response_instance = GetAssistant403Response.from_json(json)
# print the JSON string representation of the object
print(GetAssistant403Response.to_json())
# convert the object into a dict
get_assistant403_response_dict = get_assistant403_response_instance.to_dict()
# create an instance of GetAssistant403Response from a dict
get_assistant403_response_from_dict = GetAssistant403Response.from_dict(get_assistant403_response_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -0,0 +1,29 @@
# GetAssistant404Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**message** | **str** | | [optional]
## Example
```python
from openapi_client.models.get_assistant404_response import GetAssistant404Response
# TODO update the JSON string below
json = "{}"
# create an instance of GetAssistant404Response from a JSON string
get_assistant404_response_instance = GetAssistant404Response.from_json(json)
# print the JSON string representation of the object
print(GetAssistant404Response.to_json())
# convert the object into a dict
get_assistant404_response_dict = get_assistant404_response_instance.to_dict()
# create an instance of GetAssistant404Response from a dict
get_assistant404_response_from_dict = GetAssistant404Response.from_dict(get_assistant404_response_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -0,0 +1,33 @@
# GetFreeTrialStatus200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**opted_in_to_free_trial** | **bool** | Whether the user has opted into the free trial |
**chat_count** | **float** | Current number of chat messages used | [optional]
**autocomplete_count** | **float** | Current number of autocomplete requests used | [optional]
**chat_limit** | **float** | Maximum number of chat messages allowed in free trial |
**autocomplete_limit** | **float** | Maximum number of autocomplete requests allowed in free trial |
## Example
```python
from openapi_client.models.get_free_trial_status200_response import GetFreeTrialStatus200Response
# TODO update the JSON string below
json = "{}"
# create an instance of GetFreeTrialStatus200Response from a JSON string
get_free_trial_status200_response_instance = GetFreeTrialStatus200Response.from_json(json)
# print the JSON string representation of the object
print(GetFreeTrialStatus200Response.to_json())
# convert the object into a dict
get_free_trial_status200_response_dict = get_free_trial_status200_response_instance.to_dict()
# create an instance of GetFreeTrialStatus200Response from a dict
get_free_trial_status200_response_from_dict = GetFreeTrialStatus200Response.from_dict(get_free_trial_status200_response_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -0,0 +1,29 @@
# GetModelsAddOnCheckoutUrl200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**url** | **str** | Stripe checkout session URL |
## Example
```python
from openapi_client.models.get_models_add_on_checkout_url200_response import GetModelsAddOnCheckoutUrl200Response
# TODO update the JSON string below
json = "{}"
# create an instance of GetModelsAddOnCheckoutUrl200Response from a JSON string
get_models_add_on_checkout_url200_response_instance = GetModelsAddOnCheckoutUrl200Response.from_json(json)
# print the JSON string representation of the object
print(GetModelsAddOnCheckoutUrl200Response.to_json())
# convert the object into a dict
get_models_add_on_checkout_url200_response_dict = get_models_add_on_checkout_url200_response_instance.to_dict()
# create an instance of GetModelsAddOnCheckoutUrl200Response from a dict
get_models_add_on_checkout_url200_response_from_dict = GetModelsAddOnCheckoutUrl200Response.from_dict(get_models_add_on_checkout_url200_response_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -0,0 +1,29 @@
# GetModelsAddOnCheckoutUrl500Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**message** | **str** | | [optional]
## Example
```python
from openapi_client.models.get_models_add_on_checkout_url500_response import GetModelsAddOnCheckoutUrl500Response
# TODO update the JSON string below
json = "{}"
# create an instance of GetModelsAddOnCheckoutUrl500Response from a JSON string
get_models_add_on_checkout_url500_response_instance = GetModelsAddOnCheckoutUrl500Response.from_json(json)
# print the JSON string representation of the object
print(GetModelsAddOnCheckoutUrl500Response.to_json())
# convert the object into a dict
get_models_add_on_checkout_url500_response_dict = get_models_add_on_checkout_url500_response_instance.to_dict()
# create an instance of GetModelsAddOnCheckoutUrl500Response from a dict
get_models_add_on_checkout_url500_response_from_dict = GetModelsAddOnCheckoutUrl500Response.from_dict(get_models_add_on_checkout_url500_response_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -0,0 +1,30 @@
# GetPolicy200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**policy** | **object** | Organization policy configuration | [optional]
**org_slug** | **str** | Slug of the organization that has the policy | [optional]
## Example
```python
from openapi_client.models.get_policy200_response import GetPolicy200Response
# TODO update the JSON string below
json = "{}"
# create an instance of GetPolicy200Response from a JSON string
get_policy200_response_instance = GetPolicy200Response.from_json(json)
# print the JSON string representation of the object
print(GetPolicy200Response.to_json())
# convert the object into a dict
get_policy200_response_dict = get_policy200_response_instance.to_dict()
# create an instance of GetPolicy200Response from a dict
get_policy200_response_from_dict = GetPolicy200Response.from_dict(get_policy200_response_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -0,0 +1,29 @@
# ListAssistantFullSlugs429Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**message** | **str** | | [optional]
## Example
```python
from openapi_client.models.list_assistant_full_slugs429_response import ListAssistantFullSlugs429Response
# TODO update the JSON string below
json = "{}"
# create an instance of ListAssistantFullSlugs429Response from a JSON string
list_assistant_full_slugs429_response_instance = ListAssistantFullSlugs429Response.from_json(json)
# print the JSON string representation of the object
print(ListAssistantFullSlugs429Response.to_json())
# convert the object into a dict
list_assistant_full_slugs429_response_dict = list_assistant_full_slugs429_response_instance.to_dict()
# create an instance of ListAssistantFullSlugs429Response from a dict
list_assistant_full_slugs429_response_from_dict = ListAssistantFullSlugs429Response.from_dict(list_assistant_full_slugs429_response_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -1,16 +1,17 @@
# ListAssistants200ResponseInner
## Properties
| Name | Type | Description | Notes |
| --------------------- | ----------------------------------------------------------------------------------------------- | --------------------------------------------------------- | ---------- |
| **config_result** | [**ListAssistants200ResponseInnerConfigResult**](ListAssistants200ResponseInnerConfigResult.md) | |
| **owner_slug** | **str** | Slug of the user or organization that owns the assistant |
| **package_slug** | **str** | Slug of the assistant package |
| **icon_url** | **str** | Pre-signed URL for the assistant&#39;s icon | [optional] |
| **on_prem_proxy_url** | **str** | 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** | **str** | Raw YAML configuration of the assistant | [optional] |
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**config_result** | [**ListAssistants200ResponseInnerConfigResult**](ListAssistants200ResponseInnerConfigResult.md) | |
**owner_slug** | **str** | Slug of the user or organization that owns the assistant |
**package_slug** | **str** | Slug of the assistant package |
**icon_url** | **str** | Pre-signed URL for the assistant&#39;s icon | [optional]
**on_prem_proxy_url** | **str** | 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** | **str** | Raw YAML configuration of the assistant | [optional]
## Example
@ -29,5 +30,6 @@ list_assistants200_response_inner_dict = list_assistants200_response_inner_insta
# create an instance of ListAssistants200ResponseInner from a dict
list_assistants200_response_inner_from_dict = ListAssistants200ResponseInner.from_dict(list_assistants200_response_inner_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -1,12 +1,13 @@
# ListAssistants200ResponseInnerConfigResult
## Properties
| Name | Type | Description | Notes |
| --------------------------- | ------------- | ----------------------------------------------------- | ---------- |
| **config** | **object** | The unrolled assistant configuration |
| **config_load_interrupted** | **bool** | Whether the configuration loading was interrupted |
| **errors** | **List[str]** | Any errors that occurred during configuration loading | [optional] |
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**config** | **object** | The unrolled assistant configuration |
**config_load_interrupted** | **bool** | Whether the configuration loading was interrupted |
**errors** | **List[str]** | Any errors that occurred during configuration loading | [optional]
## Example
@ -25,5 +26,6 @@ list_assistants200_response_inner_config_result_dict = list_assistants200_respon
# create an instance of ListAssistants200ResponseInnerConfigResult from a dict
list_assistants200_response_inner_config_result_from_dict = ListAssistants200ResponseInnerConfigResult.from_dict(list_assistants200_response_inner_config_result_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -1,10 +1,11 @@
# ListAssistants401Response
## Properties
| Name | Type | Description | Notes |
| ----------- | ------- | ----------- | ---------- |
| **message** | **str** | | [optional] |
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**message** | **str** | | [optional]
## Example
@ -23,5 +24,6 @@ list_assistants401_response_dict = list_assistants401_response_instance.to_dict(
# create an instance of ListAssistants401Response from a dict
list_assistants401_response_from_dict = ListAssistants401Response.from_dict(list_assistants401_response_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -1,10 +1,11 @@
# ListAssistants404Response
## Properties
| Name | Type | Description | Notes |
| ----------- | ------- | ----------- | ---------- |
| **message** | **str** | | [optional] |
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**message** | **str** | | [optional]
## Example
@ -23,5 +24,6 @@ list_assistants404_response_dict = list_assistants404_response_instance.to_dict(
# create an instance of ListAssistants404Response from a dict
list_assistants404_response_from_dict = ListAssistants404Response.from_dict(list_assistants404_response_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -0,0 +1,29 @@
# ListOrganizations200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**organizations** | [**List[ListOrganizations200ResponseOrganizationsInner]**](ListOrganizations200ResponseOrganizationsInner.md) | |
## Example
```python
from openapi_client.models.list_organizations200_response import ListOrganizations200Response
# TODO update the JSON string below
json = "{}"
# create an instance of ListOrganizations200Response from a JSON string
list_organizations200_response_instance = ListOrganizations200Response.from_json(json)
# print the JSON string representation of the object
print(ListOrganizations200Response.to_json())
# convert the object into a dict
list_organizations200_response_dict = list_organizations200_response_instance.to_dict()
# create an instance of ListOrganizations200Response from a dict
list_organizations200_response_from_dict = ListOrganizations200Response.from_dict(list_organizations200_response_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -0,0 +1,32 @@
# ListOrganizations200ResponseOrganizationsInner
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **str** | Organization ID |
**name** | **str** | Organization name |
**icon_url** | **str** | Pre-signed URL for the organization&#39;s icon | [optional]
**slug** | **str** | Organization slug |
## Example
```python
from openapi_client.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner
# TODO update the JSON string below
json = "{}"
# create an instance of ListOrganizations200ResponseOrganizationsInner from a JSON string
list_organizations200_response_organizations_inner_instance = ListOrganizations200ResponseOrganizationsInner.from_json(json)
# print the JSON string representation of the object
print(ListOrganizations200ResponseOrganizationsInner.to_json())
# convert the object into a dict
list_organizations200_response_organizations_inner_dict = list_organizations200_response_organizations_inner_instance.to_dict()
# create an instance of ListOrganizations200ResponseOrganizationsInner from a dict
list_organizations200_response_organizations_inner_from_dict = ListOrganizations200ResponseOrganizationsInner.from_dict(list_organizations200_response_organizations_inner_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -0,0 +1,31 @@
# SyncSecretsRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**fqsns** | **List[object]** | Array of Fully Qualified Secret Names to resolve |
**org_scope_id** | **str** | Organization ID to scope secret resolution to | [optional]
**org_scope_slug** | **str** | Organization slug to scope secret resolution to | [optional]
## Example
```python
from openapi_client.models.sync_secrets_request import SyncSecretsRequest
# TODO update the JSON string below
json = "{}"
# create an instance of SyncSecretsRequest from a JSON string
sync_secrets_request_instance = SyncSecretsRequest.from_json(json)
# print the JSON string representation of the object
print(SyncSecretsRequest.to_json())
# convert the object into a dict
sync_secrets_request_dict = sync_secrets_request_instance.to_dict()
# create an instance of SyncSecretsRequest from a dict
sync_secrets_request_from_dict = SyncSecretsRequest.from_dict(sync_secrets_request_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View file

@ -31,7 +31,18 @@ from openapi_client.exceptions import ApiAttributeError
from openapi_client.exceptions import ApiException
# import models into sdk package
from openapi_client.models.get_assistant200_response import GetAssistant200Response
from openapi_client.models.get_assistant403_response import GetAssistant403Response
from openapi_client.models.get_assistant404_response import GetAssistant404Response
from openapi_client.models.get_free_trial_status200_response import GetFreeTrialStatus200Response
from openapi_client.models.get_models_add_on_checkout_url200_response import GetModelsAddOnCheckoutUrl200Response
from openapi_client.models.get_models_add_on_checkout_url500_response import GetModelsAddOnCheckoutUrl500Response
from openapi_client.models.get_policy200_response import GetPolicy200Response
from openapi_client.models.list_assistant_full_slugs429_response import ListAssistantFullSlugs429Response
from openapi_client.models.list_assistants200_response_inner import ListAssistants200ResponseInner
from openapi_client.models.list_assistants200_response_inner_config_result import ListAssistants200ResponseInnerConfigResult
from openapi_client.models.list_assistants401_response import ListAssistants401Response
from openapi_client.models.list_assistants404_response import ListAssistants404Response
from openapi_client.models.list_organizations200_response import ListOrganizations200Response
from openapi_client.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner
from openapi_client.models.sync_secrets_request import SyncSecretsRequest

View file

@ -14,7 +14,18 @@
# import models into model package
from openapi_client.models.get_assistant200_response import GetAssistant200Response
from openapi_client.models.get_assistant403_response import GetAssistant403Response
from openapi_client.models.get_assistant404_response import GetAssistant404Response
from openapi_client.models.get_free_trial_status200_response import GetFreeTrialStatus200Response
from openapi_client.models.get_models_add_on_checkout_url200_response import GetModelsAddOnCheckoutUrl200Response
from openapi_client.models.get_models_add_on_checkout_url500_response import GetModelsAddOnCheckoutUrl500Response
from openapi_client.models.get_policy200_response import GetPolicy200Response
from openapi_client.models.list_assistant_full_slugs429_response import ListAssistantFullSlugs429Response
from openapi_client.models.list_assistants200_response_inner import ListAssistants200ResponseInner
from openapi_client.models.list_assistants200_response_inner_config_result import ListAssistants200ResponseInnerConfigResult
from openapi_client.models.list_assistants401_response import ListAssistants401Response
from openapi_client.models.list_assistants404_response import ListAssistants404Response
from openapi_client.models.list_organizations200_response import ListOrganizations200Response
from openapi_client.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner
from openapi_client.models.sync_secrets_request import SyncSecretsRequest

View file

@ -0,0 +1,118 @@
# coding: utf-8
"""
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 OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from openapi_client.models.list_assistants200_response_inner_config_result import ListAssistants200ResponseInnerConfigResult
from typing import Optional, Set
from typing_extensions import Self
class GetAssistant200Response(BaseModel):
"""
GetAssistant200Response
""" # noqa: E501
config_result: ListAssistants200ResponseInnerConfigResult = Field(alias="configResult")
owner_slug: StrictStr = Field(description="Slug of the user or organization that owns the assistant", alias="ownerSlug")
package_slug: StrictStr = Field(description="Slug of the assistant package", alias="packageSlug")
icon_url: Optional[StrictStr] = Field(default=None, description="Pre-signed URL for the assistant's icon", alias="iconUrl")
on_prem_proxy_url: Optional[StrictStr] = Field(default=None, description="URL of the on-premises proxy if the organization uses one", alias="onPremProxyUrl")
use_on_prem_proxy: Optional[StrictBool] = Field(default=None, description="Whether the organization uses an on-premises proxy", alias="useOnPremProxy")
raw_yaml: Optional[StrictStr] = Field(default=None, description="Raw YAML configuration of the assistant", alias="rawYaml")
__properties: ClassVar[List[str]] = ["configResult", "ownerSlug", "packageSlug", "iconUrl", "onPremProxyUrl", "useOnPremProxy", "rawYaml"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of GetAssistant200Response from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of config_result
if self.config_result:
_dict['configResult'] = self.config_result.to_dict()
# set to None if icon_url (nullable) is None
# and model_fields_set contains the field
if self.icon_url is None and "icon_url" in self.model_fields_set:
_dict['iconUrl'] = None
# set to None if on_prem_proxy_url (nullable) is None
# and model_fields_set contains the field
if self.on_prem_proxy_url is None and "on_prem_proxy_url" in self.model_fields_set:
_dict['onPremProxyUrl'] = None
# set to None if use_on_prem_proxy (nullable) is None
# and model_fields_set contains the field
if self.use_on_prem_proxy is None and "use_on_prem_proxy" in self.model_fields_set:
_dict['useOnPremProxy'] = None
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of GetAssistant200Response from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"configResult": ListAssistants200ResponseInnerConfigResult.from_dict(obj["configResult"]) if obj.get("configResult") is not None else None,
"ownerSlug": obj.get("ownerSlug"),
"packageSlug": obj.get("packageSlug"),
"iconUrl": obj.get("iconUrl"),
"onPremProxyUrl": obj.get("onPremProxyUrl"),
"useOnPremProxy": obj.get("useOnPremProxy"),
"rawYaml": obj.get("rawYaml")
})
return _obj

View file

@ -0,0 +1,87 @@
# coding: utf-8
"""
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 OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class GetAssistant403Response(BaseModel):
"""
GetAssistant403Response
""" # noqa: E501
message: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = ["message"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of GetAssistant403Response from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of GetAssistant403Response from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"message": obj.get("message")
})
return _obj

View file

@ -0,0 +1,87 @@
# coding: utf-8
"""
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 OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class GetAssistant404Response(BaseModel):
"""
GetAssistant404Response
""" # noqa: E501
message: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = ["message"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of GetAssistant404Response from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of GetAssistant404Response from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"message": obj.get("message")
})
return _obj

View file

@ -0,0 +1,105 @@
# coding: utf-8
"""
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 OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt
from typing import Any, ClassVar, Dict, List, Optional, Union
from typing import Optional, Set
from typing_extensions import Self
class GetFreeTrialStatus200Response(BaseModel):
"""
GetFreeTrialStatus200Response
""" # noqa: E501
opted_in_to_free_trial: StrictBool = Field(description="Whether the user has opted into the free trial", alias="optedInToFreeTrial")
chat_count: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Current number of chat messages used", alias="chatCount")
autocomplete_count: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Current number of autocomplete requests used", alias="autocompleteCount")
chat_limit: Union[StrictFloat, StrictInt] = Field(description="Maximum number of chat messages allowed in free trial", alias="chatLimit")
autocomplete_limit: Union[StrictFloat, StrictInt] = Field(description="Maximum number of autocomplete requests allowed in free trial", alias="autocompleteLimit")
__properties: ClassVar[List[str]] = ["optedInToFreeTrial", "chatCount", "autocompleteCount", "chatLimit", "autocompleteLimit"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of GetFreeTrialStatus200Response from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# set to None if chat_count (nullable) is None
# and model_fields_set contains the field
if self.chat_count is None and "chat_count" in self.model_fields_set:
_dict['chatCount'] = None
# set to None if autocomplete_count (nullable) is None
# and model_fields_set contains the field
if self.autocomplete_count is None and "autocomplete_count" in self.model_fields_set:
_dict['autocompleteCount'] = None
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of GetFreeTrialStatus200Response from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"optedInToFreeTrial": obj.get("optedInToFreeTrial"),
"chatCount": obj.get("chatCount"),
"autocompleteCount": obj.get("autocompleteCount"),
"chatLimit": obj.get("chatLimit"),
"autocompleteLimit": obj.get("autocompleteLimit")
})
return _obj

View file

@ -0,0 +1,87 @@
# coding: utf-8
"""
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 OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List
from typing import Optional, Set
from typing_extensions import Self
class GetModelsAddOnCheckoutUrl200Response(BaseModel):
"""
GetModelsAddOnCheckoutUrl200Response
""" # noqa: E501
url: StrictStr = Field(description="Stripe checkout session URL")
__properties: ClassVar[List[str]] = ["url"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of GetModelsAddOnCheckoutUrl200Response from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of GetModelsAddOnCheckoutUrl200Response from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"url": obj.get("url")
})
return _obj

View file

@ -0,0 +1,87 @@
# coding: utf-8
"""
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 OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class GetModelsAddOnCheckoutUrl500Response(BaseModel):
"""
GetModelsAddOnCheckoutUrl500Response
""" # noqa: E501
message: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = ["message"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of GetModelsAddOnCheckoutUrl500Response from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of GetModelsAddOnCheckoutUrl500Response from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"message": obj.get("message")
})
return _obj

View file

@ -0,0 +1,99 @@
# coding: utf-8
"""
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 OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class GetPolicy200Response(BaseModel):
"""
GetPolicy200Response
""" # noqa: E501
policy: Optional[Dict[str, Any]] = Field(default=None, description="Organization policy configuration")
org_slug: Optional[StrictStr] = Field(default=None, description="Slug of the organization that has the policy", alias="orgSlug")
__properties: ClassVar[List[str]] = ["policy", "orgSlug"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of GetPolicy200Response from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# set to None if policy (nullable) is None
# and model_fields_set contains the field
if self.policy is None and "policy" in self.model_fields_set:
_dict['policy'] = None
# set to None if org_slug (nullable) is None
# and model_fields_set contains the field
if self.org_slug is None and "org_slug" in self.model_fields_set:
_dict['orgSlug'] = None
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of GetPolicy200Response from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"policy": obj.get("policy"),
"orgSlug": obj.get("orgSlug")
})
return _obj

View file

@ -0,0 +1,87 @@
# coding: utf-8
"""
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 OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class ListAssistantFullSlugs429Response(BaseModel):
"""
ListAssistantFullSlugs429Response
""" # noqa: E501
message: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = ["message"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of ListAssistantFullSlugs429Response from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of ListAssistantFullSlugs429Response from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"message": obj.get("message")
})
return _obj

View file

@ -0,0 +1,95 @@
# coding: utf-8
"""
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 OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict
from typing import Any, ClassVar, Dict, List
from openapi_client.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner
from typing import Optional, Set
from typing_extensions import Self
class ListOrganizations200Response(BaseModel):
"""
ListOrganizations200Response
""" # noqa: E501
organizations: List[ListOrganizations200ResponseOrganizationsInner]
__properties: ClassVar[List[str]] = ["organizations"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of ListOrganizations200Response from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of each item in organizations (list)
_items = []
if self.organizations:
for _item_organizations in self.organizations:
if _item_organizations:
_items.append(_item_organizations.to_dict())
_dict['organizations'] = _items
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of ListOrganizations200Response from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"organizations": [ListOrganizations200ResponseOrganizationsInner.from_dict(_item) for _item in obj["organizations"]] if obj.get("organizations") is not None else None
})
return _obj

View file

@ -0,0 +1,98 @@
# coding: utf-8
"""
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 OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class ListOrganizations200ResponseOrganizationsInner(BaseModel):
"""
ListOrganizations200ResponseOrganizationsInner
""" # noqa: E501
id: StrictStr = Field(description="Organization ID")
name: StrictStr = Field(description="Organization name")
icon_url: Optional[StrictStr] = Field(default=None, description="Pre-signed URL for the organization's icon", alias="iconUrl")
slug: StrictStr = Field(description="Organization slug")
__properties: ClassVar[List[str]] = ["id", "name", "iconUrl", "slug"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of ListOrganizations200ResponseOrganizationsInner from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# set to None if icon_url (nullable) is None
# and model_fields_set contains the field
if self.icon_url is None and "icon_url" in self.model_fields_set:
_dict['iconUrl'] = None
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of ListOrganizations200ResponseOrganizationsInner from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"id": obj.get("id"),
"name": obj.get("name"),
"iconUrl": obj.get("iconUrl"),
"slug": obj.get("slug")
})
return _obj

View file

@ -0,0 +1,101 @@
# coding: utf-8
"""
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 OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
from __future__ import annotations
import pprint
import re # noqa: F401
import json
from pydantic import BaseModel, ConfigDict, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self
class SyncSecretsRequest(BaseModel):
"""
SyncSecretsRequest
""" # noqa: E501
fqsns: List[Dict[str, Any]] = Field(description="Array of Fully Qualified Secret Names to resolve")
org_scope_id: Optional[StrictStr] = Field(default=None, description="Organization ID to scope secret resolution to", alias="orgScopeId")
org_scope_slug: Optional[StrictStr] = Field(default=None, description="Organization slug to scope secret resolution to", alias="orgScopeSlug")
__properties: ClassVar[List[str]] = ["fqsns", "orgScopeId", "orgScopeSlug"]
model_config = ConfigDict(
populate_by_name=True,
validate_assignment=True,
protected_namespaces=(),
)
def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))
def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())
@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of SyncSecretsRequest from a JSON string"""
return cls.from_dict(json.loads(json_str))
def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
"""
excluded_fields: Set[str] = set([
])
_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# set to None if org_scope_id (nullable) is None
# and model_fields_set contains the field
if self.org_scope_id is None and "org_scope_id" in self.model_fields_set:
_dict['orgScopeId'] = None
# set to None if org_scope_slug (nullable) is None
# and model_fields_set contains the field
if self.org_scope_slug is None and "org_scope_slug" in self.model_fields_set:
_dict['orgScopeSlug'] = None
return _dict
@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of SyncSecretsRequest from a dict"""
if obj is None:
return None
if not isinstance(obj, dict):
return cls.model_validate(obj)
_obj = cls.model_validate({
"fqsns": obj.get("fqsns"),
"orgScopeId": obj.get("orgScopeId"),
"orgScopeSlug": obj.get("orgScopeSlug")
})
return _obj

View file

@ -0,0 +1,70 @@
# coding: utf-8
"""
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 OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import unittest
from openapi_client.models.get_assistant200_response import GetAssistant200Response
class TestGetAssistant200Response(unittest.TestCase):
"""GetAssistant200Response unit test stubs"""
def setUp(self):
pass
def tearDown(self):
pass
def make_instance(self, include_optional) -> GetAssistant200Response:
"""Test GetAssistant200Response
include_optional is a boolean, when False only required
params are included, when True both required and
optional params are included """
# uncomment below to create an instance of `GetAssistant200Response`
"""
model = GetAssistant200Response()
if include_optional:
return GetAssistant200Response(
config_result = openapi_client.models.list_assistants_200_response_inner_config_result.listAssistants_200_response_inner_configResult(
config = openapi_client.models.config.config(),
config_load_interrupted = True,
errors = [
''
], ),
owner_slug = '',
package_slug = '',
icon_url = '',
on_prem_proxy_url = '',
use_on_prem_proxy = True,
raw_yaml = ''
)
else:
return GetAssistant200Response(
config_result = openapi_client.models.list_assistants_200_response_inner_config_result.listAssistants_200_response_inner_configResult(
config = openapi_client.models.config.config(),
config_load_interrupted = True,
errors = [
''
], ),
owner_slug = '',
package_slug = '',
)
"""
def testGetAssistant200Response(self):
"""Test GetAssistant200Response"""
# inst_req_only = self.make_instance(include_optional=False)
# inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()

View file

@ -0,0 +1,51 @@
# coding: utf-8
"""
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 OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import unittest
from openapi_client.models.get_assistant403_response import GetAssistant403Response
class TestGetAssistant403Response(unittest.TestCase):
"""GetAssistant403Response unit test stubs"""
def setUp(self):
pass
def tearDown(self):
pass
def make_instance(self, include_optional) -> GetAssistant403Response:
"""Test GetAssistant403Response
include_optional is a boolean, when False only required
params are included, when True both required and
optional params are included """
# uncomment below to create an instance of `GetAssistant403Response`
"""
model = GetAssistant403Response()
if include_optional:
return GetAssistant403Response(
message = 'This assistant is not allowed in this organization'
)
else:
return GetAssistant403Response(
)
"""
def testGetAssistant403Response(self):
"""Test GetAssistant403Response"""
# inst_req_only = self.make_instance(include_optional=False)
# inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()

View file

@ -0,0 +1,51 @@
# coding: utf-8
"""
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 OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import unittest
from openapi_client.models.get_assistant404_response import GetAssistant404Response
class TestGetAssistant404Response(unittest.TestCase):
"""GetAssistant404Response unit test stubs"""
def setUp(self):
pass
def tearDown(self):
pass
def make_instance(self, include_optional) -> GetAssistant404Response:
"""Test GetAssistant404Response
include_optional is a boolean, when False only required
params are included, when True both required and
optional params are included """
# uncomment below to create an instance of `GetAssistant404Response`
"""
model = GetAssistant404Response()
if include_optional:
return GetAssistant404Response(
message = 'Assistant not found'
)
else:
return GetAssistant404Response(
)
"""
def testGetAssistant404Response(self):
"""Test GetAssistant404Response"""
# inst_req_only = self.make_instance(include_optional=False)
# inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()

View file

@ -0,0 +1,58 @@
# coding: utf-8
"""
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 OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import unittest
from openapi_client.models.get_free_trial_status200_response import GetFreeTrialStatus200Response
class TestGetFreeTrialStatus200Response(unittest.TestCase):
"""GetFreeTrialStatus200Response unit test stubs"""
def setUp(self):
pass
def tearDown(self):
pass
def make_instance(self, include_optional) -> GetFreeTrialStatus200Response:
"""Test GetFreeTrialStatus200Response
include_optional is a boolean, when False only required
params are included, when True both required and
optional params are included """
# uncomment below to create an instance of `GetFreeTrialStatus200Response`
"""
model = GetFreeTrialStatus200Response()
if include_optional:
return GetFreeTrialStatus200Response(
opted_in_to_free_trial = True,
chat_count = 1.337,
autocomplete_count = 1.337,
chat_limit = 1.337,
autocomplete_limit = 1.337
)
else:
return GetFreeTrialStatus200Response(
opted_in_to_free_trial = True,
chat_limit = 1.337,
autocomplete_limit = 1.337,
)
"""
def testGetFreeTrialStatus200Response(self):
"""Test GetFreeTrialStatus200Response"""
# inst_req_only = self.make_instance(include_optional=False)
# inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()

View file

@ -0,0 +1,52 @@
# coding: utf-8
"""
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 OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import unittest
from openapi_client.models.get_models_add_on_checkout_url200_response import GetModelsAddOnCheckoutUrl200Response
class TestGetModelsAddOnCheckoutUrl200Response(unittest.TestCase):
"""GetModelsAddOnCheckoutUrl200Response unit test stubs"""
def setUp(self):
pass
def tearDown(self):
pass
def make_instance(self, include_optional) -> GetModelsAddOnCheckoutUrl200Response:
"""Test GetModelsAddOnCheckoutUrl200Response
include_optional is a boolean, when False only required
params are included, when True both required and
optional params are included """
# uncomment below to create an instance of `GetModelsAddOnCheckoutUrl200Response`
"""
model = GetModelsAddOnCheckoutUrl200Response()
if include_optional:
return GetModelsAddOnCheckoutUrl200Response(
url = ''
)
else:
return GetModelsAddOnCheckoutUrl200Response(
url = '',
)
"""
def testGetModelsAddOnCheckoutUrl200Response(self):
"""Test GetModelsAddOnCheckoutUrl200Response"""
# inst_req_only = self.make_instance(include_optional=False)
# inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()

View file

@ -0,0 +1,51 @@
# coding: utf-8
"""
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 OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import unittest
from openapi_client.models.get_models_add_on_checkout_url500_response import GetModelsAddOnCheckoutUrl500Response
class TestGetModelsAddOnCheckoutUrl500Response(unittest.TestCase):
"""GetModelsAddOnCheckoutUrl500Response unit test stubs"""
def setUp(self):
pass
def tearDown(self):
pass
def make_instance(self, include_optional) -> GetModelsAddOnCheckoutUrl500Response:
"""Test GetModelsAddOnCheckoutUrl500Response
include_optional is a boolean, when False only required
params are included, when True both required and
optional params are included """
# uncomment below to create an instance of `GetModelsAddOnCheckoutUrl500Response`
"""
model = GetModelsAddOnCheckoutUrl500Response()
if include_optional:
return GetModelsAddOnCheckoutUrl500Response(
message = 'Failed to create checkout session'
)
else:
return GetModelsAddOnCheckoutUrl500Response(
)
"""
def testGetModelsAddOnCheckoutUrl500Response(self):
"""Test GetModelsAddOnCheckoutUrl500Response"""
# inst_req_only = self.make_instance(include_optional=False)
# inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()

View file

@ -0,0 +1,52 @@
# coding: utf-8
"""
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 OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import unittest
from openapi_client.models.get_policy200_response import GetPolicy200Response
class TestGetPolicy200Response(unittest.TestCase):
"""GetPolicy200Response unit test stubs"""
def setUp(self):
pass
def tearDown(self):
pass
def make_instance(self, include_optional) -> GetPolicy200Response:
"""Test GetPolicy200Response
include_optional is a boolean, when False only required
params are included, when True both required and
optional params are included """
# uncomment below to create an instance of `GetPolicy200Response`
"""
model = GetPolicy200Response()
if include_optional:
return GetPolicy200Response(
policy = None,
org_slug = ''
)
else:
return GetPolicy200Response(
)
"""
def testGetPolicy200Response(self):
"""Test GetPolicy200Response"""
# inst_req_only = self.make_instance(include_optional=False)
# inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()

View file

@ -0,0 +1,51 @@
# coding: utf-8
"""
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 OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import unittest
from openapi_client.models.list_assistant_full_slugs429_response import ListAssistantFullSlugs429Response
class TestListAssistantFullSlugs429Response(unittest.TestCase):
"""ListAssistantFullSlugs429Response unit test stubs"""
def setUp(self):
pass
def tearDown(self):
pass
def make_instance(self, include_optional) -> ListAssistantFullSlugs429Response:
"""Test ListAssistantFullSlugs429Response
include_optional is a boolean, when False only required
params are included, when True both required and
optional params are included """
# uncomment below to create an instance of `ListAssistantFullSlugs429Response`
"""
model = ListAssistantFullSlugs429Response()
if include_optional:
return ListAssistantFullSlugs429Response(
message = 'Too many requests'
)
else:
return ListAssistantFullSlugs429Response(
)
"""
def testListAssistantFullSlugs429Response(self):
"""Test ListAssistantFullSlugs429Response"""
# inst_req_only = self.make_instance(include_optional=False)
# inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()

View file

@ -0,0 +1,64 @@
# coding: utf-8
"""
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 OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import unittest
from openapi_client.models.list_organizations200_response import ListOrganizations200Response
class TestListOrganizations200Response(unittest.TestCase):
"""ListOrganizations200Response unit test stubs"""
def setUp(self):
pass
def tearDown(self):
pass
def make_instance(self, include_optional) -> ListOrganizations200Response:
"""Test ListOrganizations200Response
include_optional is a boolean, when False only required
params are included, when True both required and
optional params are included """
# uncomment below to create an instance of `ListOrganizations200Response`
"""
model = ListOrganizations200Response()
if include_optional:
return ListOrganizations200Response(
organizations = [
openapi_client.models.list_organizations_200_response_organizations_inner.listOrganizations_200_response_organizations_inner(
id = '',
name = '',
icon_url = '',
slug = '', )
]
)
else:
return ListOrganizations200Response(
organizations = [
openapi_client.models.list_organizations_200_response_organizations_inner.listOrganizations_200_response_organizations_inner(
id = '',
name = '',
icon_url = '',
slug = '', )
],
)
"""
def testListOrganizations200Response(self):
"""Test ListOrganizations200Response"""
# inst_req_only = self.make_instance(include_optional=False)
# inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()

View file

@ -0,0 +1,57 @@
# coding: utf-8
"""
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 OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import unittest
from openapi_client.models.list_organizations200_response_organizations_inner import ListOrganizations200ResponseOrganizationsInner
class TestListOrganizations200ResponseOrganizationsInner(unittest.TestCase):
"""ListOrganizations200ResponseOrganizationsInner unit test stubs"""
def setUp(self):
pass
def tearDown(self):
pass
def make_instance(self, include_optional) -> ListOrganizations200ResponseOrganizationsInner:
"""Test ListOrganizations200ResponseOrganizationsInner
include_optional is a boolean, when False only required
params are included, when True both required and
optional params are included """
# uncomment below to create an instance of `ListOrganizations200ResponseOrganizationsInner`
"""
model = ListOrganizations200ResponseOrganizationsInner()
if include_optional:
return ListOrganizations200ResponseOrganizationsInner(
id = '',
name = '',
icon_url = '',
slug = ''
)
else:
return ListOrganizations200ResponseOrganizationsInner(
id = '',
name = '',
slug = '',
)
"""
def testListOrganizations200ResponseOrganizationsInner(self):
"""Test ListOrganizations200ResponseOrganizationsInner"""
# inst_req_only = self.make_instance(include_optional=False)
# inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()

View file

@ -0,0 +1,58 @@
# coding: utf-8
"""
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 OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import unittest
from openapi_client.models.sync_secrets_request import SyncSecretsRequest
class TestSyncSecretsRequest(unittest.TestCase):
"""SyncSecretsRequest unit test stubs"""
def setUp(self):
pass
def tearDown(self):
pass
def make_instance(self, include_optional) -> SyncSecretsRequest:
"""Test SyncSecretsRequest
include_optional is a boolean, when False only required
params are included, when True both required and
optional params are included """
# uncomment below to create an instance of `SyncSecretsRequest`
"""
model = SyncSecretsRequest()
if include_optional:
return SyncSecretsRequest(
fqsns = [
None
],
org_scope_id = '',
org_scope_slug = ''
)
else:
return SyncSecretsRequest(
fqsns = [
None
],
)
"""
def testSyncSecretsRequest(self):
"""Test SyncSecretsRequest"""
# inst_req_only = self.make_instance(include_optional=False)
# inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()

View file

@ -5,10 +5,21 @@ package.json
src/apis/DefaultApi.ts
src/apis/index.ts
src/index.ts
src/models/GetAssistant200Response.ts
src/models/GetAssistant403Response.ts
src/models/GetAssistant404Response.ts
src/models/GetFreeTrialStatus200Response.ts
src/models/GetModelsAddOnCheckoutUrl200Response.ts
src/models/GetModelsAddOnCheckoutUrl500Response.ts
src/models/GetPolicy200Response.ts
src/models/ListAssistantFullSlugs429Response.ts
src/models/ListAssistants200ResponseInner.ts
src/models/ListAssistants200ResponseInnerConfigResult.ts
src/models/ListAssistants401Response.ts
src/models/ListAssistants404Response.ts
src/models/ListOrganizations200Response.ts
src/models/ListOrganizations200ResponseOrganizationsInner.ts
src/models/SyncSecretsRequest.ts
src/models/index.ts
src/runtime.ts
tsconfig.esm.json

View file

@ -3,27 +3,23 @@
This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
Environment
- Node.js
- Webpack
- Browserify
* Node.js
* Webpack
* Browserify
Language level
- ES5 - you must have a Promises/A+ library installed
- ES6
* ES5 - you must have a Promises/A+ library installed
* ES6
Module system
- CommonJS
- ES6 module system
* CommonJS
* ES6 module system
It can be used in both TypeScript and JavaScript. In TypeScript, the definition will be automatically resolved via `package.json`. ([Reference](https://www.typescriptlang.org/docs/handbook/declaration-files/consumption.html))
### Building
To build and compile the typescript sources to javascript use:
```
npm install
npm run build

View file

@ -2,136 +2,576 @@
/* eslint-disable */
/**
* 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.
* 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 * as runtime from "../runtime";
import * as runtime from '../runtime';
import type {
GetAssistant200Response,
GetAssistant403Response,
GetAssistant404Response,
GetFreeTrialStatus200Response,
GetModelsAddOnCheckoutUrl200Response,
GetModelsAddOnCheckoutUrl500Response,
GetPolicy200Response,
ListAssistantFullSlugs429Response,
ListAssistants200ResponseInner,
ListAssistants401Response,
ListAssistants404Response,
} from "../models/index";
ListOrganizations200Response,
SyncSecretsRequest,
} from '../models/index';
import {
ListAssistants200ResponseInnerFromJSON,
ListAssistants200ResponseInnerToJSON,
ListAssistants401ResponseFromJSON,
ListAssistants401ResponseToJSON,
ListAssistants404ResponseFromJSON,
ListAssistants404ResponseToJSON,
} from "../models/index";
GetAssistant200ResponseFromJSON,
GetAssistant200ResponseToJSON,
GetAssistant403ResponseFromJSON,
GetAssistant403ResponseToJSON,
GetAssistant404ResponseFromJSON,
GetAssistant404ResponseToJSON,
GetFreeTrialStatus200ResponseFromJSON,
GetFreeTrialStatus200ResponseToJSON,
GetModelsAddOnCheckoutUrl200ResponseFromJSON,
GetModelsAddOnCheckoutUrl200ResponseToJSON,
GetModelsAddOnCheckoutUrl500ResponseFromJSON,
GetModelsAddOnCheckoutUrl500ResponseToJSON,
GetPolicy200ResponseFromJSON,
GetPolicy200ResponseToJSON,
ListAssistantFullSlugs429ResponseFromJSON,
ListAssistantFullSlugs429ResponseToJSON,
ListAssistants200ResponseInnerFromJSON,
ListAssistants200ResponseInnerToJSON,
ListAssistants401ResponseFromJSON,
ListAssistants401ResponseToJSON,
ListAssistants404ResponseFromJSON,
ListAssistants404ResponseToJSON,
ListOrganizations200ResponseFromJSON,
ListOrganizations200ResponseToJSON,
SyncSecretsRequestFromJSON,
SyncSecretsRequestToJSON,
} from '../models/index';
export interface GetAssistantRequest {
ownerSlug: string;
packageSlug: string;
alwaysUseProxy?: GetAssistantAlwaysUseProxyEnum;
organizationId?: string;
}
export interface GetModelsAddOnCheckoutUrlRequest {
profileId?: string;
vscodeUriScheme?: string;
}
export interface ListAssistantsRequest {
alwaysUseProxy?: ListAssistantsAlwaysUseProxyEnum;
organizationId?: string;
alwaysUseProxy?: ListAssistantsAlwaysUseProxyEnum;
organizationId?: string;
}
export interface SyncSecretsOperationRequest {
syncSecretsRequest: SyncSecretsRequest;
}
/**
* DefaultApi - interface
*
*
* @export
* @interface DefaultApiInterface
*/
export interface DefaultApiInterface {
/**
* 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.
* @summary List assistants for IDE
* @param {'true' | 'false'} [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 {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof DefaultApiInterface
*/
listAssistantsRaw(
requestParameters: ListAssistantsRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<runtime.ApiResponse<Array<ListAssistants200ResponseInner>>>;
/**
* Returns a single assistant configuration by its owner and package slug. This endpoint is useful when you need to retrieve or refresh a specific assistant without fetching the entire list.
* @summary Get a specific assistant by slug
* @param {string} ownerSlug Slug of the user or organization that owns the assistant
* @param {string} packageSlug Slug of the assistant package
* @param {'true' | 'false'} [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 {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof DefaultApiInterface
*/
getAssistantRaw(requestParameters: GetAssistantRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetAssistant200Response>>;
/**
* Returns a single assistant configuration by its owner and package slug. This endpoint is useful when you need to retrieve or refresh a specific assistant without fetching the entire list.
* Get a specific assistant by slug
*/
getAssistant(requestParameters: GetAssistantRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetAssistant200Response>;
/**
* Returns the current free trial status for the authenticated user, including usage counts and limits for chat and autocomplete features.
* @summary Get free trial status for user
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof DefaultApiInterface
*/
getFreeTrialStatusRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetFreeTrialStatus200Response>>;
/**
* Returns the current free trial status for the authenticated user, including usage counts and limits for chat and autocomplete features.
* Get free trial status for user
*/
getFreeTrialStatus(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetFreeTrialStatus200Response>;
/**
* Creates a Stripe checkout session for the models add-on subscription and returns the checkout URL.
* @summary Get Stripe checkout URL for models add-on
* @param {string} [profileId] Profile ID to include in the callback URL
* @param {string} [vscodeUriScheme] VS Code URI scheme to include in the callback URL
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof DefaultApiInterface
*/
getModelsAddOnCheckoutUrlRaw(requestParameters: GetModelsAddOnCheckoutUrlRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetModelsAddOnCheckoutUrl200Response>>;
/**
* Creates a Stripe checkout session for the models add-on subscription and returns the checkout URL.
* Get Stripe checkout URL for models add-on
*/
getModelsAddOnCheckoutUrl(requestParameters: GetModelsAddOnCheckoutUrlRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModelsAddOnCheckoutUrl200Response>;
/**
* Returns the policy configuration for the first organization that the user belongs to which has a policy configured.
* @summary Get organization policy
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof DefaultApiInterface
*/
getPolicyRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetPolicy200Response>>;
/**
* Returns the policy configuration for the first organization that the user belongs to which has a policy configured.
* Get organization policy
*/
getPolicy(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPolicy200Response>;
/**
* This endpoint is temporarily disabled and returns a 429 status code to prevent constant refreshes of the full assistant list until a fixed client version can be deployed.
* @summary List assistant full slugs (currently returns 429)
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof DefaultApiInterface
*/
listAssistantFullSlugsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
/**
* This endpoint is temporarily disabled and returns a 429 status code to prevent constant refreshes of the full assistant list until a fixed client version can be deployed.
* List assistant full slugs (currently returns 429)
*/
listAssistantFullSlugs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
/**
* 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.
* @summary List assistants for IDE
* @param {'true' | 'false'} [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 {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof DefaultApiInterface
*/
listAssistantsRaw(requestParameters: ListAssistantsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ListAssistants200ResponseInner>>>;
/**
* 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.
* List assistants for IDE
*/
listAssistants(requestParameters: ListAssistantsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ListAssistants200ResponseInner>>;
/**
* Returns a list of organizations that the authenticated user belongs to, including organization metadata and pre-signed icon URLs.
* @summary List organizations for user
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof DefaultApiInterface
*/
listOrganizationsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListOrganizations200Response>>;
/**
* Returns a list of organizations that the authenticated user belongs to, including organization metadata and pre-signed icon URLs.
* List organizations for user
*/
listOrganizations(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListOrganizations200Response>;
/**
* Resolves and synchronizes secrets for the authenticated user based on the provided Fully Qualified Secret Names (FQSNs).
* @summary Synchronize secrets for user
* @param {SyncSecretsRequest} syncSecretsRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof DefaultApiInterface
*/
syncSecretsRaw(requestParameters: SyncSecretsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<object | null>>>;
/**
* Resolves and synchronizes secrets for the authenticated user based on the provided Fully Qualified Secret Names (FQSNs).
* Synchronize secrets for user
*/
syncSecrets(requestParameters: SyncSecretsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<object | null>>;
/**
* 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.
* List assistants for IDE
*/
listAssistants(
requestParameters: ListAssistantsRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<Array<ListAssistants200ResponseInner>>;
}
/**
*
*
*/
export class DefaultApi extends runtime.BaseAPI implements DefaultApiInterface {
/**
* 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.
* List assistants for IDE
*/
async listAssistantsRaw(
requestParameters: ListAssistantsRequest,
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<runtime.ApiResponse<Array<ListAssistants200ResponseInner>>> {
const queryParameters: any = {};
if (requestParameters["alwaysUseProxy"] != null) {
queryParameters["alwaysUseProxy"] = requestParameters["alwaysUseProxy"];
/**
* Returns a single assistant configuration by its owner and package slug. This endpoint is useful when you need to retrieve or refresh a specific assistant without fetching the entire list.
* Get a specific assistant by slug
*/
async getAssistantRaw(requestParameters: GetAssistantRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetAssistant200Response>> {
if (requestParameters['ownerSlug'] == null) {
throw new runtime.RequiredError(
'ownerSlug',
'Required parameter "ownerSlug" was null or undefined when calling getAssistant().'
);
}
if (requestParameters['packageSlug'] == null) {
throw new runtime.RequiredError(
'packageSlug',
'Required parameter "packageSlug" was null or undefined when calling getAssistant().'
);
}
const queryParameters: any = {};
if (requestParameters['alwaysUseProxy'] != null) {
queryParameters['alwaysUseProxy'] = requestParameters['alwaysUseProxy'];
}
if (requestParameters['organizationId'] != null) {
queryParameters['organizationId'] = requestParameters['organizationId'];
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = await token("apiKeyAuth", []);
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/ide/get-assistant/{ownerSlug}/{packageSlug}`.replace(`{${"ownerSlug"}}`, encodeURIComponent(String(requestParameters['ownerSlug']))).replace(`{${"packageSlug"}}`, encodeURIComponent(String(requestParameters['packageSlug']))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => GetAssistant200ResponseFromJSON(jsonValue));
}
if (requestParameters["organizationId"] != null) {
queryParameters["organizationId"] = requestParameters["organizationId"];
/**
* Returns a single assistant configuration by its owner and package slug. This endpoint is useful when you need to retrieve or refresh a specific assistant without fetching the entire list.
* Get a specific assistant by slug
*/
async getAssistant(requestParameters: GetAssistantRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetAssistant200Response> {
const response = await this.getAssistantRaw(requestParameters, initOverrides);
return await response.value();
}
const headerParameters: runtime.HTTPHeaders = {};
/**
* Returns the current free trial status for the authenticated user, including usage counts and limits for chat and autocomplete features.
* Get free trial status for user
*/
async getFreeTrialStatusRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetFreeTrialStatus200Response>> {
const queryParameters: any = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = await token("apiKeyAuth", []);
const headerParameters: runtime.HTTPHeaders = {};
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = await token("apiKeyAuth", []);
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/ide/free-trial-status`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => GetFreeTrialStatus200ResponseFromJSON(jsonValue));
}
const response = await this.request(
{
path: `/ide/list-assistants`,
method: "GET",
headers: headerParameters,
query: queryParameters,
},
initOverrides,
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
jsonValue.map(ListAssistants200ResponseInnerFromJSON),
);
}
/**
* Returns the current free trial status for the authenticated user, including usage counts and limits for chat and autocomplete features.
* Get free trial status for user
*/
async getFreeTrialStatus(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetFreeTrialStatus200Response> {
const response = await this.getFreeTrialStatusRaw(initOverrides);
return await response.value();
}
/**
* Creates a Stripe checkout session for the models add-on subscription and returns the checkout URL.
* Get Stripe checkout URL for models add-on
*/
async getModelsAddOnCheckoutUrlRaw(requestParameters: GetModelsAddOnCheckoutUrlRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetModelsAddOnCheckoutUrl200Response>> {
const queryParameters: any = {};
if (requestParameters['profileId'] != null) {
queryParameters['profile_id'] = requestParameters['profileId'];
}
if (requestParameters['vscodeUriScheme'] != null) {
queryParameters['vscode_uri_scheme'] = requestParameters['vscodeUriScheme'];
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = await token("apiKeyAuth", []);
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/ide/get-models-add-on-checkout-url`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => GetModelsAddOnCheckoutUrl200ResponseFromJSON(jsonValue));
}
/**
* Creates a Stripe checkout session for the models add-on subscription and returns the checkout URL.
* Get Stripe checkout URL for models add-on
*/
async getModelsAddOnCheckoutUrl(requestParameters: GetModelsAddOnCheckoutUrlRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModelsAddOnCheckoutUrl200Response> {
const response = await this.getModelsAddOnCheckoutUrlRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Returns the policy configuration for the first organization that the user belongs to which has a policy configured.
* Get organization policy
*/
async getPolicyRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetPolicy200Response>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = await token("apiKeyAuth", []);
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/ide/policy`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => GetPolicy200ResponseFromJSON(jsonValue));
}
/**
* Returns the policy configuration for the first organization that the user belongs to which has a policy configured.
* Get organization policy
*/
async getPolicy(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPolicy200Response> {
const response = await this.getPolicyRaw(initOverrides);
return await response.value();
}
/**
* This endpoint is temporarily disabled and returns a 429 status code to prevent constant refreshes of the full assistant list until a fixed client version can be deployed.
* List assistant full slugs (currently returns 429)
*/
async listAssistantFullSlugsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = await token("apiKeyAuth", []);
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/ide/list-assistant-full-slugs`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.VoidApiResponse(response);
}
/**
* This endpoint is temporarily disabled and returns a 429 status code to prevent constant refreshes of the full assistant list until a fixed client version can be deployed.
* List assistant full slugs (currently returns 429)
*/
async listAssistantFullSlugs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
await this.listAssistantFullSlugsRaw(initOverrides);
}
/**
* 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.
* List assistants for IDE
*/
async listAssistantsRaw(requestParameters: ListAssistantsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ListAssistants200ResponseInner>>> {
const queryParameters: any = {};
if (requestParameters['alwaysUseProxy'] != null) {
queryParameters['alwaysUseProxy'] = requestParameters['alwaysUseProxy'];
}
if (requestParameters['organizationId'] != null) {
queryParameters['organizationId'] = requestParameters['organizationId'];
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = await token("apiKeyAuth", []);
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/ide/list-assistants`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ListAssistants200ResponseInnerFromJSON));
}
/**
* 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.
* List assistants for IDE
*/
async listAssistants(requestParameters: ListAssistantsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ListAssistants200ResponseInner>> {
const response = await this.listAssistantsRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Returns a list of organizations that the authenticated user belongs to, including organization metadata and pre-signed icon URLs.
* List organizations for user
*/
async listOrganizationsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListOrganizations200Response>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = await token("apiKeyAuth", []);
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/ide/list-organizations`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => ListOrganizations200ResponseFromJSON(jsonValue));
}
/**
* Returns a list of organizations that the authenticated user belongs to, including organization metadata and pre-signed icon URLs.
* List organizations for user
*/
async listOrganizations(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListOrganizations200Response> {
const response = await this.listOrganizationsRaw(initOverrides);
return await response.value();
}
/**
* Resolves and synchronizes secrets for the authenticated user based on the provided Fully Qualified Secret Names (FQSNs).
* Synchronize secrets for user
*/
async syncSecretsRaw(requestParameters: SyncSecretsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<object | null>>> {
if (requestParameters['syncSecretsRequest'] == null) {
throw new runtime.RequiredError(
'syncSecretsRequest',
'Required parameter "syncSecretsRequest" was null or undefined when calling syncSecrets().'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = await token("apiKeyAuth", []);
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
const response = await this.request({
path: `/ide/sync-secrets`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: SyncSecretsRequestToJSON(requestParameters['syncSecretsRequest']),
}, initOverrides);
return new runtime.JSONApiResponse<any>(response);
}
/**
* Resolves and synchronizes secrets for the authenticated user based on the provided Fully Qualified Secret Names (FQSNs).
* Synchronize secrets for user
*/
async syncSecrets(requestParameters: SyncSecretsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<object | null>> {
const response = await this.syncSecretsRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* 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.
* List assistants for IDE
*/
async listAssistants(
requestParameters: ListAssistantsRequest = {},
initOverrides?: RequestInit | runtime.InitOverrideFunction,
): Promise<Array<ListAssistants200ResponseInner>> {
const response = await this.listAssistantsRaw(
requestParameters,
initOverrides,
);
return await response.value();
}
}
/**
* @export
*/
export const ListAssistantsAlwaysUseProxyEnum = {
TRUE: "true",
FALSE: "false",
export const GetAssistantAlwaysUseProxyEnum = {
TRUE: 'true',
FALSE: 'false'
} as const;
export type ListAssistantsAlwaysUseProxyEnum =
(typeof ListAssistantsAlwaysUseProxyEnum)[keyof typeof ListAssistantsAlwaysUseProxyEnum];
export type GetAssistantAlwaysUseProxyEnum = typeof GetAssistantAlwaysUseProxyEnum[keyof typeof GetAssistantAlwaysUseProxyEnum];
/**
* @export
*/
export const ListAssistantsAlwaysUseProxyEnum = {
TRUE: 'true',
FALSE: 'false'
} as const;
export type ListAssistantsAlwaysUseProxyEnum = typeof ListAssistantsAlwaysUseProxyEnum[keyof typeof ListAssistantsAlwaysUseProxyEnum];

View file

@ -1,3 +1,3 @@
/* tslint:disable */
/* eslint-disable */
export * from "./DefaultApi";
export * from './DefaultApi';

View file

@ -1,5 +1,5 @@
/* tslint:disable */
/* eslint-disable */
export * from "./runtime";
export * from "./apis/index";
export * from "./models/index";
export * from './runtime';
export * from './apis/index';
export * from './models/index';

View file

@ -0,0 +1,124 @@
/* tslint:disable */
/* eslint-disable */
/**
* 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 { mapValues } from '../runtime';
import type { ListAssistants200ResponseInnerConfigResult } from './ListAssistants200ResponseInnerConfigResult';
import {
ListAssistants200ResponseInnerConfigResultFromJSON,
ListAssistants200ResponseInnerConfigResultFromJSONTyped,
ListAssistants200ResponseInnerConfigResultToJSON,
ListAssistants200ResponseInnerConfigResultToJSONTyped,
} from './ListAssistants200ResponseInnerConfigResult';
/**
*
* @export
* @interface GetAssistant200Response
*/
export interface GetAssistant200Response {
/**
*
* @type {ListAssistants200ResponseInnerConfigResult}
* @memberof GetAssistant200Response
*/
configResult: ListAssistants200ResponseInnerConfigResult;
/**
* Slug of the user or organization that owns the assistant
* @type {string}
* @memberof GetAssistant200Response
*/
ownerSlug: string;
/**
* Slug of the assistant package
* @type {string}
* @memberof GetAssistant200Response
*/
packageSlug: string;
/**
* Pre-signed URL for the assistant's icon
* @type {string}
* @memberof GetAssistant200Response
*/
iconUrl?: string | null;
/**
* URL of the on-premises proxy if the organization uses one
* @type {string}
* @memberof GetAssistant200Response
*/
onPremProxyUrl?: string | null;
/**
* Whether the organization uses an on-premises proxy
* @type {boolean}
* @memberof GetAssistant200Response
*/
useOnPremProxy?: boolean | null;
/**
* Raw YAML configuration of the assistant
* @type {string}
* @memberof GetAssistant200Response
*/
rawYaml?: string;
}
/**
* Check if a given object implements the GetAssistant200Response interface.
*/
export function instanceOfGetAssistant200Response(value: object): value is GetAssistant200Response {
if (!('configResult' in value) || value['configResult'] === undefined) return false;
if (!('ownerSlug' in value) || value['ownerSlug'] === undefined) return false;
if (!('packageSlug' in value) || value['packageSlug'] === undefined) return false;
return true;
}
export function GetAssistant200ResponseFromJSON(json: any): GetAssistant200Response {
return GetAssistant200ResponseFromJSONTyped(json, false);
}
export function GetAssistant200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetAssistant200Response {
if (json == null) {
return json;
}
return {
'configResult': ListAssistants200ResponseInnerConfigResultFromJSON(json['configResult']),
'ownerSlug': json['ownerSlug'],
'packageSlug': json['packageSlug'],
'iconUrl': json['iconUrl'] == null ? undefined : json['iconUrl'],
'onPremProxyUrl': json['onPremProxyUrl'] == null ? undefined : json['onPremProxyUrl'],
'useOnPremProxy': json['useOnPremProxy'] == null ? undefined : json['useOnPremProxy'],
'rawYaml': json['rawYaml'] == null ? undefined : json['rawYaml'],
};
}
export function GetAssistant200ResponseToJSON(json: any): GetAssistant200Response {
return GetAssistant200ResponseToJSONTyped(json, false);
}
export function GetAssistant200ResponseToJSONTyped(value?: GetAssistant200Response | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'configResult': ListAssistants200ResponseInnerConfigResultToJSON(value['configResult']),
'ownerSlug': value['ownerSlug'],
'packageSlug': value['packageSlug'],
'iconUrl': value['iconUrl'],
'onPremProxyUrl': value['onPremProxyUrl'],
'useOnPremProxy': value['useOnPremProxy'],
'rawYaml': value['rawYaml'],
};
}

View file

@ -0,0 +1,65 @@
/* tslint:disable */
/* eslint-disable */
/**
* 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 { mapValues } from '../runtime';
/**
*
* @export
* @interface GetAssistant403Response
*/
export interface GetAssistant403Response {
/**
*
* @type {string}
* @memberof GetAssistant403Response
*/
message?: string;
}
/**
* Check if a given object implements the GetAssistant403Response interface.
*/
export function instanceOfGetAssistant403Response(value: object): value is GetAssistant403Response {
return true;
}
export function GetAssistant403ResponseFromJSON(json: any): GetAssistant403Response {
return GetAssistant403ResponseFromJSONTyped(json, false);
}
export function GetAssistant403ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetAssistant403Response {
if (json == null) {
return json;
}
return {
'message': json['message'] == null ? undefined : json['message'],
};
}
export function GetAssistant403ResponseToJSON(json: any): GetAssistant403Response {
return GetAssistant403ResponseToJSONTyped(json, false);
}
export function GetAssistant403ResponseToJSONTyped(value?: GetAssistant403Response | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'message': value['message'],
};
}

View file

@ -0,0 +1,65 @@
/* tslint:disable */
/* eslint-disable */
/**
* 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 { mapValues } from '../runtime';
/**
*
* @export
* @interface GetAssistant404Response
*/
export interface GetAssistant404Response {
/**
*
* @type {string}
* @memberof GetAssistant404Response
*/
message?: string;
}
/**
* Check if a given object implements the GetAssistant404Response interface.
*/
export function instanceOfGetAssistant404Response(value: object): value is GetAssistant404Response {
return true;
}
export function GetAssistant404ResponseFromJSON(json: any): GetAssistant404Response {
return GetAssistant404ResponseFromJSONTyped(json, false);
}
export function GetAssistant404ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetAssistant404Response {
if (json == null) {
return json;
}
return {
'message': json['message'] == null ? undefined : json['message'],
};
}
export function GetAssistant404ResponseToJSON(json: any): GetAssistant404Response {
return GetAssistant404ResponseToJSONTyped(json, false);
}
export function GetAssistant404ResponseToJSONTyped(value?: GetAssistant404Response | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'message': value['message'],
};
}

View file

@ -0,0 +1,100 @@
/* tslint:disable */
/* eslint-disable */
/**
* 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 { mapValues } from '../runtime';
/**
*
* @export
* @interface GetFreeTrialStatus200Response
*/
export interface GetFreeTrialStatus200Response {
/**
* Whether the user has opted into the free trial
* @type {boolean}
* @memberof GetFreeTrialStatus200Response
*/
optedInToFreeTrial: boolean;
/**
* Current number of chat messages used
* @type {number}
* @memberof GetFreeTrialStatus200Response
*/
chatCount?: number | null;
/**
* Current number of autocomplete requests used
* @type {number}
* @memberof GetFreeTrialStatus200Response
*/
autocompleteCount?: number | null;
/**
* Maximum number of chat messages allowed in free trial
* @type {number}
* @memberof GetFreeTrialStatus200Response
*/
chatLimit: number;
/**
* Maximum number of autocomplete requests allowed in free trial
* @type {number}
* @memberof GetFreeTrialStatus200Response
*/
autocompleteLimit: number;
}
/**
* Check if a given object implements the GetFreeTrialStatus200Response interface.
*/
export function instanceOfGetFreeTrialStatus200Response(value: object): value is GetFreeTrialStatus200Response {
if (!('optedInToFreeTrial' in value) || value['optedInToFreeTrial'] === undefined) return false;
if (!('chatLimit' in value) || value['chatLimit'] === undefined) return false;
if (!('autocompleteLimit' in value) || value['autocompleteLimit'] === undefined) return false;
return true;
}
export function GetFreeTrialStatus200ResponseFromJSON(json: any): GetFreeTrialStatus200Response {
return GetFreeTrialStatus200ResponseFromJSONTyped(json, false);
}
export function GetFreeTrialStatus200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetFreeTrialStatus200Response {
if (json == null) {
return json;
}
return {
'optedInToFreeTrial': json['optedInToFreeTrial'],
'chatCount': json['chatCount'] == null ? undefined : json['chatCount'],
'autocompleteCount': json['autocompleteCount'] == null ? undefined : json['autocompleteCount'],
'chatLimit': json['chatLimit'],
'autocompleteLimit': json['autocompleteLimit'],
};
}
export function GetFreeTrialStatus200ResponseToJSON(json: any): GetFreeTrialStatus200Response {
return GetFreeTrialStatus200ResponseToJSONTyped(json, false);
}
export function GetFreeTrialStatus200ResponseToJSONTyped(value?: GetFreeTrialStatus200Response | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'optedInToFreeTrial': value['optedInToFreeTrial'],
'chatCount': value['chatCount'],
'autocompleteCount': value['autocompleteCount'],
'chatLimit': value['chatLimit'],
'autocompleteLimit': value['autocompleteLimit'],
};
}

View file

@ -0,0 +1,66 @@
/* tslint:disable */
/* eslint-disable */
/**
* 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 { mapValues } from '../runtime';
/**
*
* @export
* @interface GetModelsAddOnCheckoutUrl200Response
*/
export interface GetModelsAddOnCheckoutUrl200Response {
/**
* Stripe checkout session URL
* @type {string}
* @memberof GetModelsAddOnCheckoutUrl200Response
*/
url: string;
}
/**
* Check if a given object implements the GetModelsAddOnCheckoutUrl200Response interface.
*/
export function instanceOfGetModelsAddOnCheckoutUrl200Response(value: object): value is GetModelsAddOnCheckoutUrl200Response {
if (!('url' in value) || value['url'] === undefined) return false;
return true;
}
export function GetModelsAddOnCheckoutUrl200ResponseFromJSON(json: any): GetModelsAddOnCheckoutUrl200Response {
return GetModelsAddOnCheckoutUrl200ResponseFromJSONTyped(json, false);
}
export function GetModelsAddOnCheckoutUrl200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetModelsAddOnCheckoutUrl200Response {
if (json == null) {
return json;
}
return {
'url': json['url'],
};
}
export function GetModelsAddOnCheckoutUrl200ResponseToJSON(json: any): GetModelsAddOnCheckoutUrl200Response {
return GetModelsAddOnCheckoutUrl200ResponseToJSONTyped(json, false);
}
export function GetModelsAddOnCheckoutUrl200ResponseToJSONTyped(value?: GetModelsAddOnCheckoutUrl200Response | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'url': value['url'],
};
}

View file

@ -0,0 +1,65 @@
/* tslint:disable */
/* eslint-disable */
/**
* 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 { mapValues } from '../runtime';
/**
*
* @export
* @interface GetModelsAddOnCheckoutUrl500Response
*/
export interface GetModelsAddOnCheckoutUrl500Response {
/**
*
* @type {string}
* @memberof GetModelsAddOnCheckoutUrl500Response
*/
message?: string;
}
/**
* Check if a given object implements the GetModelsAddOnCheckoutUrl500Response interface.
*/
export function instanceOfGetModelsAddOnCheckoutUrl500Response(value: object): value is GetModelsAddOnCheckoutUrl500Response {
return true;
}
export function GetModelsAddOnCheckoutUrl500ResponseFromJSON(json: any): GetModelsAddOnCheckoutUrl500Response {
return GetModelsAddOnCheckoutUrl500ResponseFromJSONTyped(json, false);
}
export function GetModelsAddOnCheckoutUrl500ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetModelsAddOnCheckoutUrl500Response {
if (json == null) {
return json;
}
return {
'message': json['message'] == null ? undefined : json['message'],
};
}
export function GetModelsAddOnCheckoutUrl500ResponseToJSON(json: any): GetModelsAddOnCheckoutUrl500Response {
return GetModelsAddOnCheckoutUrl500ResponseToJSONTyped(json, false);
}
export function GetModelsAddOnCheckoutUrl500ResponseToJSONTyped(value?: GetModelsAddOnCheckoutUrl500Response | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'message': value['message'],
};
}

View file

@ -0,0 +1,73 @@
/* tslint:disable */
/* eslint-disable */
/**
* 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 { mapValues } from '../runtime';
/**
*
* @export
* @interface GetPolicy200Response
*/
export interface GetPolicy200Response {
/**
* Organization policy configuration
* @type {object}
* @memberof GetPolicy200Response
*/
policy?: object | null;
/**
* Slug of the organization that has the policy
* @type {string}
* @memberof GetPolicy200Response
*/
orgSlug?: string | null;
}
/**
* Check if a given object implements the GetPolicy200Response interface.
*/
export function instanceOfGetPolicy200Response(value: object): value is GetPolicy200Response {
return true;
}
export function GetPolicy200ResponseFromJSON(json: any): GetPolicy200Response {
return GetPolicy200ResponseFromJSONTyped(json, false);
}
export function GetPolicy200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetPolicy200Response {
if (json == null) {
return json;
}
return {
'policy': json['policy'] == null ? undefined : json['policy'],
'orgSlug': json['orgSlug'] == null ? undefined : json['orgSlug'],
};
}
export function GetPolicy200ResponseToJSON(json: any): GetPolicy200Response {
return GetPolicy200ResponseToJSONTyped(json, false);
}
export function GetPolicy200ResponseToJSONTyped(value?: GetPolicy200Response | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'policy': value['policy'],
'orgSlug': value['orgSlug'],
};
}

View file

@ -0,0 +1,65 @@
/* tslint:disable */
/* eslint-disable */
/**
* 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 { mapValues } from '../runtime';
/**
*
* @export
* @interface ListAssistantFullSlugs429Response
*/
export interface ListAssistantFullSlugs429Response {
/**
*
* @type {string}
* @memberof ListAssistantFullSlugs429Response
*/
message?: string;
}
/**
* Check if a given object implements the ListAssistantFullSlugs429Response interface.
*/
export function instanceOfListAssistantFullSlugs429Response(value: object): value is ListAssistantFullSlugs429Response {
return true;
}
export function ListAssistantFullSlugs429ResponseFromJSON(json: any): ListAssistantFullSlugs429Response {
return ListAssistantFullSlugs429ResponseFromJSONTyped(json, false);
}
export function ListAssistantFullSlugs429ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListAssistantFullSlugs429Response {
if (json == null) {
return json;
}
return {
'message': json['message'] == null ? undefined : json['message'],
};
}
export function ListAssistantFullSlugs429ResponseToJSON(json: any): ListAssistantFullSlugs429Response {
return ListAssistantFullSlugs429ResponseToJSONTyped(json, false);
}
export function ListAssistantFullSlugs429ResponseToJSONTyped(value?: ListAssistantFullSlugs429Response | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'message': value['message'],
};
}

View file

@ -2,140 +2,123 @@
/* eslint-disable */
/**
* 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.
* 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 { mapValues } from "../runtime";
import type { ListAssistants200ResponseInnerConfigResult } from "./ListAssistants200ResponseInnerConfigResult";
import { mapValues } from '../runtime';
import type { ListAssistants200ResponseInnerConfigResult } from './ListAssistants200ResponseInnerConfigResult';
import {
ListAssistants200ResponseInnerConfigResultFromJSON,
ListAssistants200ResponseInnerConfigResultFromJSONTyped,
ListAssistants200ResponseInnerConfigResultToJSON,
ListAssistants200ResponseInnerConfigResultToJSONTyped,
} from "./ListAssistants200ResponseInnerConfigResult";
ListAssistants200ResponseInnerConfigResultFromJSON,
ListAssistants200ResponseInnerConfigResultFromJSONTyped,
ListAssistants200ResponseInnerConfigResultToJSON,
ListAssistants200ResponseInnerConfigResultToJSONTyped,
} from './ListAssistants200ResponseInnerConfigResult';
/**
*
*
* @export
* @interface ListAssistants200ResponseInner
*/
export interface ListAssistants200ResponseInner {
/**
*
* @type {ListAssistants200ResponseInnerConfigResult}
* @memberof ListAssistants200ResponseInner
*/
configResult: ListAssistants200ResponseInnerConfigResult;
/**
* Slug of the user or organization that owns the assistant
* @type {string}
* @memberof ListAssistants200ResponseInner
*/
ownerSlug: string;
/**
* Slug of the assistant package
* @type {string}
* @memberof ListAssistants200ResponseInner
*/
packageSlug: string;
/**
* Pre-signed URL for the assistant's icon
* @type {string}
* @memberof ListAssistants200ResponseInner
*/
iconUrl?: string | null;
/**
* URL of the on-premises proxy if the organization uses one
* @type {string}
* @memberof ListAssistants200ResponseInner
*/
onPremProxyUrl?: string | null;
/**
* Whether the organization uses an on-premises proxy
* @type {boolean}
* @memberof ListAssistants200ResponseInner
*/
useOnPremProxy?: boolean | null;
/**
* Raw YAML configuration of the assistant
* @type {string}
* @memberof ListAssistants200ResponseInner
*/
rawYaml?: string;
/**
*
* @type {ListAssistants200ResponseInnerConfigResult}
* @memberof ListAssistants200ResponseInner
*/
configResult: ListAssistants200ResponseInnerConfigResult;
/**
* Slug of the user or organization that owns the assistant
* @type {string}
* @memberof ListAssistants200ResponseInner
*/
ownerSlug: string;
/**
* Slug of the assistant package
* @type {string}
* @memberof ListAssistants200ResponseInner
*/
packageSlug: string;
/**
* Pre-signed URL for the assistant's icon
* @type {string}
* @memberof ListAssistants200ResponseInner
*/
iconUrl?: string | null;
/**
* URL of the on-premises proxy if the organization uses one
* @type {string}
* @memberof ListAssistants200ResponseInner
*/
onPremProxyUrl?: string | null;
/**
* Whether the organization uses an on-premises proxy
* @type {boolean}
* @memberof ListAssistants200ResponseInner
*/
useOnPremProxy?: boolean | null;
/**
* Raw YAML configuration of the assistant
* @type {string}
* @memberof ListAssistants200ResponseInner
*/
rawYaml?: string;
}
/**
* Check if a given object implements the ListAssistants200ResponseInner interface.
*/
export function instanceOfListAssistants200ResponseInner(
value: object,
): value is ListAssistants200ResponseInner {
if (!("configResult" in value) || value["configResult"] === undefined)
return false;
if (!("ownerSlug" in value) || value["ownerSlug"] === undefined) return false;
if (!("packageSlug" in value) || value["packageSlug"] === undefined)
return false;
return true;
export function instanceOfListAssistants200ResponseInner(value: object): value is ListAssistants200ResponseInner {
if (!('configResult' in value) || value['configResult'] === undefined) return false;
if (!('ownerSlug' in value) || value['ownerSlug'] === undefined) return false;
if (!('packageSlug' in value) || value['packageSlug'] === undefined) return false;
return true;
}
export function ListAssistants200ResponseInnerFromJSON(
json: any,
): ListAssistants200ResponseInner {
return ListAssistants200ResponseInnerFromJSONTyped(json, false);
export function ListAssistants200ResponseInnerFromJSON(json: any): ListAssistants200ResponseInner {
return ListAssistants200ResponseInnerFromJSONTyped(json, false);
}
export function ListAssistants200ResponseInnerFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): ListAssistants200ResponseInner {
if (json == null) {
return json;
}
return {
configResult: ListAssistants200ResponseInnerConfigResultFromJSON(
json["configResult"],
),
ownerSlug: json["ownerSlug"],
packageSlug: json["packageSlug"],
iconUrl: json["iconUrl"] == null ? undefined : json["iconUrl"],
onPremProxyUrl:
json["onPremProxyUrl"] == null ? undefined : json["onPremProxyUrl"],
useOnPremProxy:
json["useOnPremProxy"] == null ? undefined : json["useOnPremProxy"],
rawYaml: json["rawYaml"] == null ? undefined : json["rawYaml"],
};
export function ListAssistants200ResponseInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListAssistants200ResponseInner {
if (json == null) {
return json;
}
return {
'configResult': ListAssistants200ResponseInnerConfigResultFromJSON(json['configResult']),
'ownerSlug': json['ownerSlug'],
'packageSlug': json['packageSlug'],
'iconUrl': json['iconUrl'] == null ? undefined : json['iconUrl'],
'onPremProxyUrl': json['onPremProxyUrl'] == null ? undefined : json['onPremProxyUrl'],
'useOnPremProxy': json['useOnPremProxy'] == null ? undefined : json['useOnPremProxy'],
'rawYaml': json['rawYaml'] == null ? undefined : json['rawYaml'],
};
}
export function ListAssistants200ResponseInnerToJSON(
json: any,
): ListAssistants200ResponseInner {
return ListAssistants200ResponseInnerToJSONTyped(json, false);
export function ListAssistants200ResponseInnerToJSON(json: any): ListAssistants200ResponseInner {
return ListAssistants200ResponseInnerToJSONTyped(json, false);
}
export function ListAssistants200ResponseInnerToJSONTyped(
value?: ListAssistants200ResponseInner | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
export function ListAssistants200ResponseInnerToJSONTyped(value?: ListAssistants200ResponseInner | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
configResult: ListAssistants200ResponseInnerConfigResultToJSON(
value["configResult"],
),
ownerSlug: value["ownerSlug"],
packageSlug: value["packageSlug"],
iconUrl: value["iconUrl"],
onPremProxyUrl: value["onPremProxyUrl"],
useOnPremProxy: value["useOnPremProxy"],
rawYaml: value["rawYaml"],
};
return {
'configResult': ListAssistants200ResponseInnerConfigResultToJSON(value['configResult']),
'ownerSlug': value['ownerSlug'],
'packageSlug': value['packageSlug'],
'iconUrl': value['iconUrl'],
'onPremProxyUrl': value['onPremProxyUrl'],
'useOnPremProxy': value['useOnPremProxy'],
'rawYaml': value['rawYaml'],
};
}

View file

@ -2,95 +2,82 @@
/* eslint-disable */
/**
* 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.
* 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 { mapValues } from "../runtime";
import { mapValues } from '../runtime';
/**
*
*
* @export
* @interface ListAssistants200ResponseInnerConfigResult
*/
export interface ListAssistants200ResponseInnerConfigResult {
/**
* The unrolled assistant configuration
* @type {object}
* @memberof ListAssistants200ResponseInnerConfigResult
*/
config: object | null;
/**
* Whether the configuration loading was interrupted
* @type {boolean}
* @memberof ListAssistants200ResponseInnerConfigResult
*/
configLoadInterrupted: boolean;
/**
* Any errors that occurred during configuration loading
* @type {Array<string>}
* @memberof ListAssistants200ResponseInnerConfigResult
*/
errors?: Array<string> | null;
/**
* The unrolled assistant configuration
* @type {object}
* @memberof ListAssistants200ResponseInnerConfigResult
*/
config: object | null;
/**
* Whether the configuration loading was interrupted
* @type {boolean}
* @memberof ListAssistants200ResponseInnerConfigResult
*/
configLoadInterrupted: boolean;
/**
* Any errors that occurred during configuration loading
* @type {Array<string>}
* @memberof ListAssistants200ResponseInnerConfigResult
*/
errors?: Array<string> | null;
}
/**
* Check if a given object implements the ListAssistants200ResponseInnerConfigResult interface.
*/
export function instanceOfListAssistants200ResponseInnerConfigResult(
value: object,
): value is ListAssistants200ResponseInnerConfigResult {
if (!("config" in value) || value["config"] === undefined) return false;
if (
!("configLoadInterrupted" in value) ||
value["configLoadInterrupted"] === undefined
)
return false;
return true;
export function instanceOfListAssistants200ResponseInnerConfigResult(value: object): value is ListAssistants200ResponseInnerConfigResult {
if (!('config' in value) || value['config'] === undefined) return false;
if (!('configLoadInterrupted' in value) || value['configLoadInterrupted'] === undefined) return false;
return true;
}
export function ListAssistants200ResponseInnerConfigResultFromJSON(
json: any,
): ListAssistants200ResponseInnerConfigResult {
return ListAssistants200ResponseInnerConfigResultFromJSONTyped(json, false);
export function ListAssistants200ResponseInnerConfigResultFromJSON(json: any): ListAssistants200ResponseInnerConfigResult {
return ListAssistants200ResponseInnerConfigResultFromJSONTyped(json, false);
}
export function ListAssistants200ResponseInnerConfigResultFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): ListAssistants200ResponseInnerConfigResult {
if (json == null) {
return json;
}
return {
config: json["config"],
configLoadInterrupted: json["configLoadInterrupted"],
errors: json["errors"] == null ? undefined : json["errors"],
};
export function ListAssistants200ResponseInnerConfigResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListAssistants200ResponseInnerConfigResult {
if (json == null) {
return json;
}
return {
'config': json['config'],
'configLoadInterrupted': json['configLoadInterrupted'],
'errors': json['errors'] == null ? undefined : json['errors'],
};
}
export function ListAssistants200ResponseInnerConfigResultToJSON(
json: any,
): ListAssistants200ResponseInnerConfigResult {
return ListAssistants200ResponseInnerConfigResultToJSONTyped(json, false);
export function ListAssistants200ResponseInnerConfigResultToJSON(json: any): ListAssistants200ResponseInnerConfigResult {
return ListAssistants200ResponseInnerConfigResultToJSONTyped(json, false);
}
export function ListAssistants200ResponseInnerConfigResultToJSONTyped(
value?: ListAssistants200ResponseInnerConfigResult | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
export function ListAssistants200ResponseInnerConfigResultToJSONTyped(value?: ListAssistants200ResponseInnerConfigResult | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
config: value["config"],
configLoadInterrupted: value["configLoadInterrupted"],
errors: value["errors"],
};
return {
'config': value['config'],
'configLoadInterrupted': value['configLoadInterrupted'],
'errors': value['errors'],
};
}

View file

@ -2,73 +2,64 @@
/* eslint-disable */
/**
* 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.
* 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 { mapValues } from "../runtime";
import { mapValues } from '../runtime';
/**
*
*
* @export
* @interface ListAssistants401Response
*/
export interface ListAssistants401Response {
/**
*
* @type {string}
* @memberof ListAssistants401Response
*/
message?: string;
/**
*
* @type {string}
* @memberof ListAssistants401Response
*/
message?: string;
}
/**
* Check if a given object implements the ListAssistants401Response interface.
*/
export function instanceOfListAssistants401Response(
value: object,
): value is ListAssistants401Response {
return true;
export function instanceOfListAssistants401Response(value: object): value is ListAssistants401Response {
return true;
}
export function ListAssistants401ResponseFromJSON(
json: any,
): ListAssistants401Response {
return ListAssistants401ResponseFromJSONTyped(json, false);
export function ListAssistants401ResponseFromJSON(json: any): ListAssistants401Response {
return ListAssistants401ResponseFromJSONTyped(json, false);
}
export function ListAssistants401ResponseFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): ListAssistants401Response {
if (json == null) {
return json;
}
return {
message: json["message"] == null ? undefined : json["message"],
};
export function ListAssistants401ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListAssistants401Response {
if (json == null) {
return json;
}
return {
'message': json['message'] == null ? undefined : json['message'],
};
}
export function ListAssistants401ResponseToJSON(
json: any,
): ListAssistants401Response {
return ListAssistants401ResponseToJSONTyped(json, false);
export function ListAssistants401ResponseToJSON(json: any): ListAssistants401Response {
return ListAssistants401ResponseToJSONTyped(json, false);
}
export function ListAssistants401ResponseToJSONTyped(
value?: ListAssistants401Response | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
export function ListAssistants401ResponseToJSONTyped(value?: ListAssistants401Response | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
message: value["message"],
};
return {
'message': value['message'],
};
}

View file

@ -2,73 +2,64 @@
/* eslint-disable */
/**
* 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.
* 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 { mapValues } from "../runtime";
import { mapValues } from '../runtime';
/**
*
*
* @export
* @interface ListAssistants404Response
*/
export interface ListAssistants404Response {
/**
*
* @type {string}
* @memberof ListAssistants404Response
*/
message?: string;
/**
*
* @type {string}
* @memberof ListAssistants404Response
*/
message?: string;
}
/**
* Check if a given object implements the ListAssistants404Response interface.
*/
export function instanceOfListAssistants404Response(
value: object,
): value is ListAssistants404Response {
return true;
export function instanceOfListAssistants404Response(value: object): value is ListAssistants404Response {
return true;
}
export function ListAssistants404ResponseFromJSON(
json: any,
): ListAssistants404Response {
return ListAssistants404ResponseFromJSONTyped(json, false);
export function ListAssistants404ResponseFromJSON(json: any): ListAssistants404Response {
return ListAssistants404ResponseFromJSONTyped(json, false);
}
export function ListAssistants404ResponseFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): ListAssistants404Response {
if (json == null) {
return json;
}
return {
message: json["message"] == null ? undefined : json["message"],
};
export function ListAssistants404ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListAssistants404Response {
if (json == null) {
return json;
}
return {
'message': json['message'] == null ? undefined : json['message'],
};
}
export function ListAssistants404ResponseToJSON(
json: any,
): ListAssistants404Response {
return ListAssistants404ResponseToJSONTyped(json, false);
export function ListAssistants404ResponseToJSON(json: any): ListAssistants404Response {
return ListAssistants404ResponseToJSONTyped(json, false);
}
export function ListAssistants404ResponseToJSONTyped(
value?: ListAssistants404Response | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
export function ListAssistants404ResponseToJSONTyped(value?: ListAssistants404Response | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
message: value["message"],
};
return {
'message': value['message'],
};
}

View file

@ -0,0 +1,74 @@
/* tslint:disable */
/* eslint-disable */
/**
* 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 { mapValues } from '../runtime';
import type { ListOrganizations200ResponseOrganizationsInner } from './ListOrganizations200ResponseOrganizationsInner';
import {
ListOrganizations200ResponseOrganizationsInnerFromJSON,
ListOrganizations200ResponseOrganizationsInnerFromJSONTyped,
ListOrganizations200ResponseOrganizationsInnerToJSON,
ListOrganizations200ResponseOrganizationsInnerToJSONTyped,
} from './ListOrganizations200ResponseOrganizationsInner';
/**
*
* @export
* @interface ListOrganizations200Response
*/
export interface ListOrganizations200Response {
/**
*
* @type {Array<ListOrganizations200ResponseOrganizationsInner>}
* @memberof ListOrganizations200Response
*/
organizations: Array<ListOrganizations200ResponseOrganizationsInner>;
}
/**
* Check if a given object implements the ListOrganizations200Response interface.
*/
export function instanceOfListOrganizations200Response(value: object): value is ListOrganizations200Response {
if (!('organizations' in value) || value['organizations'] === undefined) return false;
return true;
}
export function ListOrganizations200ResponseFromJSON(json: any): ListOrganizations200Response {
return ListOrganizations200ResponseFromJSONTyped(json, false);
}
export function ListOrganizations200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListOrganizations200Response {
if (json == null) {
return json;
}
return {
'organizations': ((json['organizations'] as Array<any>).map(ListOrganizations200ResponseOrganizationsInnerFromJSON)),
};
}
export function ListOrganizations200ResponseToJSON(json: any): ListOrganizations200Response {
return ListOrganizations200ResponseToJSONTyped(json, false);
}
export function ListOrganizations200ResponseToJSONTyped(value?: ListOrganizations200Response | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'organizations': ((value['organizations'] as Array<any>).map(ListOrganizations200ResponseOrganizationsInnerToJSON)),
};
}

View file

@ -0,0 +1,92 @@
/* tslint:disable */
/* eslint-disable */
/**
* 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 { mapValues } from '../runtime';
/**
*
* @export
* @interface ListOrganizations200ResponseOrganizationsInner
*/
export interface ListOrganizations200ResponseOrganizationsInner {
/**
* Organization ID
* @type {string}
* @memberof ListOrganizations200ResponseOrganizationsInner
*/
id: string;
/**
* Organization name
* @type {string}
* @memberof ListOrganizations200ResponseOrganizationsInner
*/
name: string;
/**
* Pre-signed URL for the organization's icon
* @type {string}
* @memberof ListOrganizations200ResponseOrganizationsInner
*/
iconUrl?: string | null;
/**
* Organization slug
* @type {string}
* @memberof ListOrganizations200ResponseOrganizationsInner
*/
slug: string;
}
/**
* Check if a given object implements the ListOrganizations200ResponseOrganizationsInner interface.
*/
export function instanceOfListOrganizations200ResponseOrganizationsInner(value: object): value is ListOrganizations200ResponseOrganizationsInner {
if (!('id' in value) || value['id'] === undefined) return false;
if (!('name' in value) || value['name'] === undefined) return false;
if (!('slug' in value) || value['slug'] === undefined) return false;
return true;
}
export function ListOrganizations200ResponseOrganizationsInnerFromJSON(json: any): ListOrganizations200ResponseOrganizationsInner {
return ListOrganizations200ResponseOrganizationsInnerFromJSONTyped(json, false);
}
export function ListOrganizations200ResponseOrganizationsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListOrganizations200ResponseOrganizationsInner {
if (json == null) {
return json;
}
return {
'id': json['id'],
'name': json['name'],
'iconUrl': json['iconUrl'] == null ? undefined : json['iconUrl'],
'slug': json['slug'],
};
}
export function ListOrganizations200ResponseOrganizationsInnerToJSON(json: any): ListOrganizations200ResponseOrganizationsInner {
return ListOrganizations200ResponseOrganizationsInnerToJSONTyped(json, false);
}
export function ListOrganizations200ResponseOrganizationsInnerToJSONTyped(value?: ListOrganizations200ResponseOrganizationsInner | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
'name': value['name'],
'iconUrl': value['iconUrl'],
'slug': value['slug'],
};
}

View file

@ -0,0 +1,82 @@
/* tslint:disable */
/* eslint-disable */
/**
* 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 { mapValues } from '../runtime';
/**
*
* @export
* @interface SyncSecretsRequest
*/
export interface SyncSecretsRequest {
/**
* Array of Fully Qualified Secret Names to resolve
* @type {Array<object>}
* @memberof SyncSecretsRequest
*/
fqsns: Array<object>;
/**
* Organization ID to scope secret resolution to
* @type {string}
* @memberof SyncSecretsRequest
*/
orgScopeId?: string | null;
/**
* Organization slug to scope secret resolution to
* @type {string}
* @memberof SyncSecretsRequest
*/
orgScopeSlug?: string | null;
}
/**
* Check if a given object implements the SyncSecretsRequest interface.
*/
export function instanceOfSyncSecretsRequest(value: object): value is SyncSecretsRequest {
if (!('fqsns' in value) || value['fqsns'] === undefined) return false;
return true;
}
export function SyncSecretsRequestFromJSON(json: any): SyncSecretsRequest {
return SyncSecretsRequestFromJSONTyped(json, false);
}
export function SyncSecretsRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SyncSecretsRequest {
if (json == null) {
return json;
}
return {
'fqsns': json['fqsns'],
'orgScopeId': json['orgScopeId'] == null ? undefined : json['orgScopeId'],
'orgScopeSlug': json['orgScopeSlug'] == null ? undefined : json['orgScopeSlug'],
};
}
export function SyncSecretsRequestToJSON(json: any): SyncSecretsRequest {
return SyncSecretsRequestToJSONTyped(json, false);
}
export function SyncSecretsRequestToJSONTyped(value?: SyncSecretsRequest | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'fqsns': value['fqsns'],
'orgScopeId': value['orgScopeId'],
'orgScopeSlug': value['orgScopeSlug'],
};
}

View file

@ -1,6 +1,17 @@
/* tslint:disable */
/* eslint-disable */
export * from "./ListAssistants200ResponseInner";
export * from "./ListAssistants200ResponseInnerConfigResult";
export * from "./ListAssistants401Response";
export * from "./ListAssistants404Response";
export * from './GetAssistant200Response';
export * from './GetAssistant403Response';
export * from './GetAssistant404Response';
export * from './GetFreeTrialStatus200Response';
export * from './GetModelsAddOnCheckoutUrl200Response';
export * from './GetModelsAddOnCheckoutUrl500Response';
export * from './GetPolicy200Response';
export * from './ListAssistantFullSlugs429Response';
export * from './ListAssistants200ResponseInner';
export * from './ListAssistants200ResponseInnerConfigResult';
export * from './ListAssistants401Response';
export * from './ListAssistants404Response';
export * from './ListOrganizations200Response';
export * from './ListOrganizations200ResponseOrganizationsInner';
export * from './SyncSecretsRequest';

View file

@ -2,97 +2,86 @@
/* eslint-disable */
/**
* 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.
* 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.
*/
export const BASE_PATH = "https://api.continue.dev".replace(/\/+$/, "");
export interface ConfigurationParameters {
basePath?: string; // override base path
fetchApi?: FetchAPI; // override for fetch implementation
middleware?: Middleware[]; // middleware to apply before/after fetch requests
queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings
username?: string; // parameter for basic security
password?: string; // parameter for basic security
apiKey?:
| string
| Promise<string>
| ((name: string) => string | Promise<string>); // parameter for apiKey security
accessToken?:
| string
| Promise<string>
| ((name?: string, scopes?: string[]) => string | Promise<string>); // parameter for oauth2 security
headers?: HTTPHeaders; //header params we want to use on every request
credentials?: RequestCredentials; //value for the credentials param we want to use on each request
basePath?: string; // override base path
fetchApi?: FetchAPI; // override for fetch implementation
middleware?: Middleware[]; // middleware to apply before/after fetch requests
queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings
username?: string; // parameter for basic security
password?: string; // parameter for basic security
apiKey?: string | Promise<string> | ((name: string) => string | Promise<string>); // parameter for apiKey security
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string | Promise<string>); // parameter for oauth2 security
headers?: HTTPHeaders; //header params we want to use on every request
credentials?: RequestCredentials; //value for the credentials param we want to use on each request
}
export class Configuration {
constructor(private configuration: ConfigurationParameters = {}) {}
constructor(private configuration: ConfigurationParameters = {}) {}
set config(configuration: Configuration) {
this.configuration = configuration;
}
get basePath(): string {
return this.configuration.basePath != null
? this.configuration.basePath
: BASE_PATH;
}
get fetchApi(): FetchAPI | undefined {
return this.configuration.fetchApi;
}
get middleware(): Middleware[] {
return this.configuration.middleware || [];
}
get queryParamsStringify(): (params: HTTPQuery) => string {
return this.configuration.queryParamsStringify || querystring;
}
get username(): string | undefined {
return this.configuration.username;
}
get password(): string | undefined {
return this.configuration.password;
}
get apiKey(): ((name: string) => string | Promise<string>) | undefined {
const apiKey = this.configuration.apiKey;
if (apiKey) {
return typeof apiKey === "function" ? apiKey : () => apiKey;
set config(configuration: Configuration) {
this.configuration = configuration;
}
return undefined;
}
get accessToken():
| ((name?: string, scopes?: string[]) => string | Promise<string>)
| undefined {
const accessToken = this.configuration.accessToken;
if (accessToken) {
return typeof accessToken === "function"
? accessToken
: async () => accessToken;
get basePath(): string {
return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH;
}
return undefined;
}
get headers(): HTTPHeaders | undefined {
return this.configuration.headers;
}
get fetchApi(): FetchAPI | undefined {
return this.configuration.fetchApi;
}
get credentials(): RequestCredentials | undefined {
return this.configuration.credentials;
}
get middleware(): Middleware[] {
return this.configuration.middleware || [];
}
get queryParamsStringify(): (params: HTTPQuery) => string {
return this.configuration.queryParamsStringify || querystring;
}
get username(): string | undefined {
return this.configuration.username;
}
get password(): string | undefined {
return this.configuration.password;
}
get apiKey(): ((name: string) => string | Promise<string>) | undefined {
const apiKey = this.configuration.apiKey;
if (apiKey) {
return typeof apiKey === 'function' ? apiKey : () => apiKey;
}
return undefined;
}
get accessToken(): ((name?: string, scopes?: string[]) => string | Promise<string>) | undefined {
const accessToken = this.configuration.accessToken;
if (accessToken) {
return typeof accessToken === 'function' ? accessToken : async () => accessToken;
}
return undefined;
}
get headers(): HTTPHeaders | undefined {
return this.configuration.headers;
}
get credentials(): RequestCredentials | undefined {
return this.configuration.credentials;
}
}
export const DefaultConfig = new Configuration();
@ -101,429 +90,342 @@ export const DefaultConfig = new Configuration();
* This is the base class for all generated API classes.
*/
export class BaseAPI {
private static readonly jsonRegex = new RegExp(
"^(:?application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$",
"i",
);
private middleware: Middleware[];
constructor(protected configuration = DefaultConfig) {
this.middleware = configuration.middleware;
}
private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i');
private middleware: Middleware[];
withMiddleware<T extends BaseAPI>(this: T, ...middlewares: Middleware[]) {
const next = this.clone<T>();
next.middleware = next.middleware.concat(...middlewares);
return next;
}
withPreMiddleware<T extends BaseAPI>(
this: T,
...preMiddlewares: Array<Middleware["pre"]>
) {
const middlewares = preMiddlewares.map((pre) => ({ pre }));
return this.withMiddleware<T>(...middlewares);
}
withPostMiddleware<T extends BaseAPI>(
this: T,
...postMiddlewares: Array<Middleware["post"]>
) {
const middlewares = postMiddlewares.map((post) => ({ post }));
return this.withMiddleware<T>(...middlewares);
}
/**
* Check if the given MIME is a JSON MIME.
* JSON MIME examples:
* application/json
* application/json; charset=UTF8
* APPLICATION/JSON
* application/vnd.company+json
* @param mime - MIME (Multipurpose Internet Mail Extensions)
* @return True if the given MIME is JSON, false otherwise.
*/
protected isJsonMime(mime: string | null | undefined): boolean {
if (!mime) {
return false;
}
return BaseAPI.jsonRegex.test(mime);
}
protected async request(
context: RequestOpts,
initOverrides?: RequestInit | InitOverrideFunction,
): Promise<Response> {
const { url, init } = await this.createFetchParams(context, initOverrides);
const response = await this.fetchApi(url, init);
if (response && response.status >= 200 && response.status < 300) {
return response;
}
throw new ResponseError(response, "Response returned an error code");
}
private async createFetchParams(
context: RequestOpts,
initOverrides?: RequestInit | InitOverrideFunction,
) {
let url = this.configuration.basePath + context.path;
if (
context.query !== undefined &&
Object.keys(context.query).length !== 0
) {
// only add the querystring to the URL if there are query parameters.
// this is done to avoid urls ending with a "?" character which buggy webservers
// do not handle correctly sometimes.
url += "?" + this.configuration.queryParamsStringify(context.query);
constructor(protected configuration = DefaultConfig) {
this.middleware = configuration.middleware;
}
const headers = Object.assign(
{},
this.configuration.headers,
context.headers,
);
Object.keys(headers).forEach((key) =>
headers[key] === undefined ? delete headers[key] : {},
);
const initOverrideFn =
typeof initOverrides === "function"
? initOverrides
: async () => initOverrides;
const initParams = {
method: context.method,
headers,
body: context.body,
credentials: this.configuration.credentials,
};
const overriddenInit: RequestInit = {
...initParams,
...(await initOverrideFn({
init: initParams,
context,
})),
};
let body: any;
if (
isFormData(overriddenInit.body) ||
overriddenInit.body instanceof URLSearchParams ||
isBlob(overriddenInit.body)
) {
body = overriddenInit.body;
} else if (this.isJsonMime(headers["Content-Type"])) {
body = JSON.stringify(overriddenInit.body);
} else {
body = overriddenInit.body;
withMiddleware<T extends BaseAPI>(this: T, ...middlewares: Middleware[]) {
const next = this.clone<T>();
next.middleware = next.middleware.concat(...middlewares);
return next;
}
const init: RequestInit = {
...overriddenInit,
body,
};
return { url, init };
}
private fetchApi = async (url: string, init: RequestInit) => {
let fetchParams = { url, init };
for (const middleware of this.middleware) {
if (middleware.pre) {
fetchParams =
(await middleware.pre({
fetch: this.fetchApi,
...fetchParams,
})) || fetchParams;
}
withPreMiddleware<T extends BaseAPI>(this: T, ...preMiddlewares: Array<Middleware['pre']>) {
const middlewares = preMiddlewares.map((pre) => ({ pre }));
return this.withMiddleware<T>(...middlewares);
}
let response: Response | undefined = undefined;
try {
response = await (this.configuration.fetchApi || fetch)(
fetchParams.url,
fetchParams.init,
);
} catch (e) {
for (const middleware of this.middleware) {
if (middleware.onError) {
response =
(await middleware.onError({
fetch: this.fetchApi,
url: fetchParams.url,
init: fetchParams.init,
error: e,
response: response ? response.clone() : undefined,
})) || response;
withPostMiddleware<T extends BaseAPI>(this: T, ...postMiddlewares: Array<Middleware['post']>) {
const middlewares = postMiddlewares.map((post) => ({ post }));
return this.withMiddleware<T>(...middlewares);
}
/**
* Check if the given MIME is a JSON MIME.
* JSON MIME examples:
* application/json
* application/json; charset=UTF8
* APPLICATION/JSON
* application/vnd.company+json
* @param mime - MIME (Multipurpose Internet Mail Extensions)
* @return True if the given MIME is JSON, false otherwise.
*/
protected isJsonMime(mime: string | null | undefined): boolean {
if (!mime) {
return false;
}
}
if (response === undefined) {
if (e instanceof Error) {
throw new FetchError(
e,
"The request failed and the interceptors did not return an alternative response",
);
return BaseAPI.jsonRegex.test(mime);
}
protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise<Response> {
const { url, init } = await this.createFetchParams(context, initOverrides);
const response = await this.fetchApi(url, init);
if (response && (response.status >= 200 && response.status < 300)) {
return response;
}
throw new ResponseError(response, 'Response returned an error code');
}
private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) {
let url = this.configuration.basePath + context.path;
if (context.query !== undefined && Object.keys(context.query).length !== 0) {
// only add the querystring to the URL if there are query parameters.
// this is done to avoid urls ending with a "?" character which buggy webservers
// do not handle correctly sometimes.
url += '?' + this.configuration.queryParamsStringify(context.query);
}
const headers = Object.assign({}, this.configuration.headers, context.headers);
Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {});
const initOverrideFn =
typeof initOverrides === "function"
? initOverrides
: async () => initOverrides;
const initParams = {
method: context.method,
headers,
body: context.body,
credentials: this.configuration.credentials,
};
const overriddenInit: RequestInit = {
...initParams,
...(await initOverrideFn({
init: initParams,
context,
}))
};
let body: any;
if (isFormData(overriddenInit.body)
|| (overriddenInit.body instanceof URLSearchParams)
|| isBlob(overriddenInit.body)) {
body = overriddenInit.body;
} else if (this.isJsonMime(headers['Content-Type'])) {
body = JSON.stringify(overriddenInit.body);
} else {
throw e;
body = overriddenInit.body;
}
}
}
for (const middleware of this.middleware) {
if (middleware.post) {
response =
(await middleware.post({
fetch: this.fetchApi,
url: fetchParams.url,
init: fetchParams.init,
response: response.clone(),
})) || response;
}
}
return response;
};
/**
* Create a shallow clone of `this` by constructing a new instance
* and then shallow cloning data members.
*/
private clone<T extends BaseAPI>(this: T): T {
const constructor = this.constructor as any;
const next = new constructor(this.configuration);
next.middleware = this.middleware.slice();
return next;
}
}
const init: RequestInit = {
...overriddenInit,
body
};
return { url, init };
}
private fetchApi = async (url: string, init: RequestInit) => {
let fetchParams = { url, init };
for (const middleware of this.middleware) {
if (middleware.pre) {
fetchParams = await middleware.pre({
fetch: this.fetchApi,
...fetchParams,
}) || fetchParams;
}
}
let response: Response | undefined = undefined;
try {
response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init);
} catch (e) {
for (const middleware of this.middleware) {
if (middleware.onError) {
response = await middleware.onError({
fetch: this.fetchApi,
url: fetchParams.url,
init: fetchParams.init,
error: e,
response: response ? response.clone() : undefined,
}) || response;
}
}
if (response === undefined) {
if (e instanceof Error) {
throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response');
} else {
throw e;
}
}
}
for (const middleware of this.middleware) {
if (middleware.post) {
response = await middleware.post({
fetch: this.fetchApi,
url: fetchParams.url,
init: fetchParams.init,
response: response.clone(),
}) || response;
}
}
return response;
}
/**
* Create a shallow clone of `this` by constructing a new instance
* and then shallow cloning data members.
*/
private clone<T extends BaseAPI>(this: T): T {
const constructor = this.constructor as any;
const next = new constructor(this.configuration);
next.middleware = this.middleware.slice();
return next;
}
};
function isBlob(value: any): value is Blob {
return typeof Blob !== "undefined" && value instanceof Blob;
return typeof Blob !== 'undefined' && value instanceof Blob;
}
function isFormData(value: any): value is FormData {
return typeof FormData !== "undefined" && value instanceof FormData;
return typeof FormData !== "undefined" && value instanceof FormData;
}
export class ResponseError extends Error {
override name: "ResponseError" = "ResponseError";
constructor(
public response: Response,
msg?: string,
) {
super(msg);
}
override name: "ResponseError" = "ResponseError";
constructor(public response: Response, msg?: string) {
super(msg);
}
}
export class FetchError extends Error {
override name: "FetchError" = "FetchError";
constructor(
public cause: Error,
msg?: string,
) {
super(msg);
}
override name: "FetchError" = "FetchError";
constructor(public cause: Error, msg?: string) {
super(msg);
}
}
export class RequiredError extends Error {
override name: "RequiredError" = "RequiredError";
constructor(
public field: string,
msg?: string,
) {
super(msg);
}
override name: "RequiredError" = "RequiredError";
constructor(public field: string, msg?: string) {
super(msg);
}
}
export const COLLECTION_FORMATS = {
csv: ",",
ssv: " ",
tsv: "\t",
pipes: "|",
csv: ",",
ssv: " ",
tsv: "\t",
pipes: "|",
};
export type FetchAPI = WindowOrWorkerGlobalScope["fetch"];
export type FetchAPI = WindowOrWorkerGlobalScope['fetch'];
export type Json = any;
export type HTTPMethod =
| "GET"
| "POST"
| "PUT"
| "PATCH"
| "DELETE"
| "OPTIONS"
| "HEAD";
export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD';
export type HTTPHeaders = { [key: string]: string };
export type HTTPQuery = {
[key: string]:
| string
| number
| null
| boolean
| Array<string | number | null | boolean>
| Set<string | number | null | boolean>
| HTTPQuery;
};
export type HTTPQuery = { [key: string]: string | number | null | boolean | Array<string | number | null | boolean> | Set<string | number | null | boolean> | HTTPQuery };
export type HTTPBody = Json | FormData | URLSearchParams;
export type HTTPRequestInit = {
headers?: HTTPHeaders;
method: HTTPMethod;
credentials?: RequestCredentials;
body?: HTTPBody;
};
export type ModelPropertyNaming =
| "camelCase"
| "snake_case"
| "PascalCase"
| "original";
export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody };
export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original';
export type InitOverrideFunction = (requestContext: {
init: HTTPRequestInit;
context: RequestOpts;
}) => Promise<RequestInit>;
export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise<RequestInit>
export interface FetchParams {
url: string;
init: RequestInit;
url: string;
init: RequestInit;
}
export interface RequestOpts {
path: string;
method: HTTPMethod;
headers: HTTPHeaders;
query?: HTTPQuery;
body?: HTTPBody;
path: string;
method: HTTPMethod;
headers: HTTPHeaders;
query?: HTTPQuery;
body?: HTTPBody;
}
export function querystring(params: HTTPQuery, prefix: string = ""): string {
return Object.keys(params)
.map((key) => querystringSingleKey(key, params[key], prefix))
.filter((part) => part.length > 0)
.join("&");
export function querystring(params: HTTPQuery, prefix: string = ''): string {
return Object.keys(params)
.map(key => querystringSingleKey(key, params[key], prefix))
.filter(part => part.length > 0)
.join('&');
}
function querystringSingleKey(
key: string,
value:
| string
| number
| null
| undefined
| boolean
| Array<string | number | null | boolean>
| Set<string | number | null | boolean>
| HTTPQuery,
keyPrefix: string = "",
): string {
const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key);
if (value instanceof Array) {
const multiValue = value
.map((singleValue) => encodeURIComponent(String(singleValue)))
.join(`&${encodeURIComponent(fullKey)}=`);
return `${encodeURIComponent(fullKey)}=${multiValue}`;
}
if (value instanceof Set) {
const valueAsArray = Array.from(value);
return querystringSingleKey(key, valueAsArray, keyPrefix);
}
if (value instanceof Date) {
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`;
}
if (value instanceof Object) {
return querystring(value as HTTPQuery, fullKey);
}
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array<string | number | null | boolean> | Set<string | number | null | boolean> | HTTPQuery, keyPrefix: string = ''): string {
const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key);
if (value instanceof Array) {
const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue)))
.join(`&${encodeURIComponent(fullKey)}=`);
return `${encodeURIComponent(fullKey)}=${multiValue}`;
}
if (value instanceof Set) {
const valueAsArray = Array.from(value);
return querystringSingleKey(key, valueAsArray, keyPrefix);
}
if (value instanceof Date) {
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`;
}
if (value instanceof Object) {
return querystring(value as HTTPQuery, fullKey);
}
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
}
export function exists(json: any, key: string) {
const value = json[key];
return value !== null && value !== undefined;
const value = json[key];
return value !== null && value !== undefined;
}
export function mapValues(data: any, fn: (item: any) => any) {
return Object.keys(data).reduce(
(acc, key) => ({ ...acc, [key]: fn(data[key]) }),
{},
{}
);
}
export function canConsumeForm(consumes: Consume[]): boolean {
for (const consume of consumes) {
if ("multipart/form-data" === consume.contentType) {
return true;
for (const consume of consumes) {
if ('multipart/form-data' === consume.contentType) {
return true;
}
}
}
return false;
return false;
}
export interface Consume {
contentType: string;
contentType: string;
}
export interface RequestContext {
fetch: FetchAPI;
url: string;
init: RequestInit;
fetch: FetchAPI;
url: string;
init: RequestInit;
}
export interface ResponseContext {
fetch: FetchAPI;
url: string;
init: RequestInit;
response: Response;
fetch: FetchAPI;
url: string;
init: RequestInit;
response: Response;
}
export interface ErrorContext {
fetch: FetchAPI;
url: string;
init: RequestInit;
error: unknown;
response?: Response;
fetch: FetchAPI;
url: string;
init: RequestInit;
error: unknown;
response?: Response;
}
export interface Middleware {
pre?(context: RequestContext): Promise<FetchParams | void>;
post?(context: ResponseContext): Promise<Response | void>;
onError?(context: ErrorContext): Promise<Response | void>;
pre?(context: RequestContext): Promise<FetchParams | void>;
post?(context: ResponseContext): Promise<Response | void>;
onError?(context: ErrorContext): Promise<Response | void>;
}
export interface ApiResponse<T> {
raw: Response;
value(): Promise<T>;
raw: Response;
value(): Promise<T>;
}
export interface ResponseTransformer<T> {
(json: any): T;
(json: any): T;
}
export class JSONApiResponse<T> {
constructor(
public raw: Response,
private transformer: ResponseTransformer<T> = (jsonValue: any) => jsonValue,
) {}
constructor(public raw: Response, private transformer: ResponseTransformer<T> = (jsonValue: any) => jsonValue) {}
async value(): Promise<T> {
return this.transformer(await this.raw.json());
}
async value(): Promise<T> {
return this.transformer(await this.raw.json());
}
}
export class VoidApiResponse {
constructor(public raw: Response) {}
constructor(public raw: Response) {}
async value(): Promise<void> {
return undefined;
}
async value(): Promise<void> {
return undefined;
}
}
export class BlobApiResponse {
constructor(public raw: Response) {}
constructor(public raw: Response) {}
async value(): Promise<Blob> {
return await this.raw.blob();
}
async value(): Promise<Blob> {
return await this.raw.blob();
};
}
export class TextApiResponse {
constructor(public raw: Response) {}
constructor(public raw: Response) {}
async value(): Promise<string> {
return await this.raw.text();
}
async value(): Promise<string> {
return await this.raw.text();
};
}

View file

@ -5,7 +5,12 @@
"module": "commonjs",
"moduleResolution": "node",
"outDir": "dist",
"typeRoots": ["node_modules/@types"]
"typeRoots": [
"node_modules/@types"
]
},
"exclude": ["dist", "node_modules"]
"exclude": [
"dist",
"node_modules"
]
}

View file

@ -4,7 +4,7 @@ cd api && npm run build
cd ..
# Build the SDK
tsc
npx tsc
# Create the necessary directory structure in dist
mkdir -p dist/api/dist

View file

@ -1,12 +1,12 @@
{
"name": "@continuedev/sdk",
"version": "0.0.7",
"version": "0.0.12",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@continuedev/sdk",
"version": "0.0.7",
"version": "0.0.12",
"license": "Apache-2.0",
"dependencies": {
"openai": "^4.96.2"

View file

@ -7,7 +7,6 @@
"strict": true,
"outDir": "dist",
"declaration": true,
"types": ["node", "jest"],
"skipLibCheck": true,
"isolatedModules": true
},