chatkitty
Version:
OpenAPI client for chatkitty
345 lines (229 loc) • 11.2 kB
Markdown
# RuntimeApi
All URIs are relative to *https://api.chatkitty.com*
|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**createNodejsRuntimeFunction**](#createnodejsruntimefunction) | **POST** /runtimes/nodejs/functions | Create a NodeJS chat runtime function|
|[**listNodejsRuntimeFunctions**](#listnodejsruntimefunctions) | **GET** /runtimes/nodejs/functions | List NodeJS chat runtime functions|
|[**retrieveNodejsRuntime**](#retrievenodejsruntime) | **GET** /runtimes/nodejs | Retrieve NodeJS chat runtime|
|[**updateNodejsRuntimeDependencies**](#updatenodejsruntimedependencies) | **PUT** /runtimes/nodejs/dependencies | Update NodeJS chat runtime NPM dependencies|
|[**updateNodejsRuntimeEnvironmentVariables**](#updatenodejsruntimeenvironmentvariables) | **PUT** /runtimes/nodejs/environment-variables | Update NodeJS chat runtime environment variables|
|[**updateNodejsRuntimeInitializationScript**](#updatenodejsruntimeinitializationscript) | **PUT** /runtimes/nodejs/initialization-script | Update NodeJS chat runtime initialization script|
# **createNodejsRuntimeFunction**
> ChatFunctionResource createNodejsRuntimeFunction(createChatFunctionResource)
Creates a NodeJS chat function for this runtime
### Example
```typescript
import {
RuntimeApi,
Configuration,
CreateChatFunctionResource
} from 'chatkitty';
const configuration = new Configuration();
const apiInstance = new RuntimeApi(configuration);
let createChatFunctionResource: CreateChatFunctionResource; //
const { status, data } = await apiInstance.createNodejsRuntimeFunction(
createChatFunctionResource
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **createChatFunctionResource** | **CreateChatFunctionResource**| | |
### Return type
**ChatFunctionResource**
### Authorization
[application_authorization](../README.md#application_authorization)
### HTTP request headers
- **Content-Type**: application/vnd.chatkitty+json
- **Accept**: application/json, application/vnd.chatkitty+json, application/vnd.chatkitty.v1+json, application/vnd.hal+json, application/hal+json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**404** | Resource not found | - |
|**403** | Access is denied | - |
|**400** | Client error | - |
|**401** | Unauthorized: Full authentication is required to access this resource | - |
|**200** | OK | - |
[[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)
# **listNodejsRuntimeFunctions**
> PagedModelChatFunctionResource listNodejsRuntimeFunctions()
Returns a page of functions for this application\'s NodeJS chat runtime
### Example
```typescript
import {
RuntimeApi,
Configuration
} from 'chatkitty';
const configuration = new Configuration();
const apiInstance = new RuntimeApi(configuration);
let page: number; //Zero-based page index (0..N) (optional) (default to 0)
let size: number; //The size of the page to be returned (optional) (default to 25)
let sort: Array<string>; //Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) (default to undefined)
const { status, data } = await apiInstance.listNodejsRuntimeFunctions(
page,
size,
sort
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **page** | [**number**] | Zero-based page index (0..N) | (optional) defaults to 0|
| **size** | [**number**] | The size of the page to be returned | (optional) defaults to 25|
| **sort** | **Array<string>** | Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | (optional) defaults to undefined|
### Return type
**PagedModelChatFunctionResource**
### Authorization
[application_authorization](../README.md#application_authorization)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/vnd.chatkitty+json, application/vnd.chatkitty.v1+json, application/vnd.hal+json, application/hal+json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**404** | Resource not found | - |
|**403** | Access is denied | - |
|**400** | Client error | - |
|**401** | Unauthorized: Full authentication is required to access this resource | - |
|**200** | OK | - |
[[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)
# **retrieveNodejsRuntime**
> ChatRuntimeResource retrieveNodejsRuntime()
Return this application\'s NodeJS chat runtime
### Example
```typescript
import {
RuntimeApi,
Configuration
} from 'chatkitty';
const configuration = new Configuration();
const apiInstance = new RuntimeApi(configuration);
const { status, data } = await apiInstance.retrieveNodejsRuntime();
```
### Parameters
This endpoint does not have any parameters.
### Return type
**ChatRuntimeResource**
### Authorization
[application_authorization](../README.md#application_authorization)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/vnd.chatkitty+json, application/vnd.chatkitty.v1+json, application/vnd.hal+json, application/hal+json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**404** | Resource not found | - |
|**403** | Access is denied | - |
|**400** | Client error | - |
|**401** | Unauthorized: Full authentication is required to access this resource | - |
|**200** | OK | - |
[[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)
# **updateNodejsRuntimeDependencies**
> ChatRuntimeResource updateNodejsRuntimeDependencies(chatRuntimeDependencyProperties)
Updates the NPM dependencies for this application\'s NodeJS chat runtime
### Example
```typescript
import {
RuntimeApi,
Configuration
} from 'chatkitty';
const configuration = new Configuration();
const apiInstance = new RuntimeApi(configuration);
let chatRuntimeDependencyProperties: Array<ChatRuntimeDependencyProperties>; //
const { status, data } = await apiInstance.updateNodejsRuntimeDependencies(
chatRuntimeDependencyProperties
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **chatRuntimeDependencyProperties** | **Array<ChatRuntimeDependencyProperties>**| | |
### Return type
**ChatRuntimeResource**
### Authorization
[application_authorization](../README.md#application_authorization)
### HTTP request headers
- **Content-Type**: application/vnd.chatkitty+json
- **Accept**: application/json, application/vnd.chatkitty+json, application/vnd.chatkitty.v1+json, application/vnd.hal+json, application/hal+json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**404** | Resource not found | - |
|**403** | Access is denied | - |
|**400** | Client error | - |
|**401** | Unauthorized: Full authentication is required to access this resource | - |
|**200** | OK | - |
[[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)
# **updateNodejsRuntimeEnvironmentVariables**
> ChatRuntimeResource updateNodejsRuntimeEnvironmentVariables(requestBody)
Updates the runtime environment variables of this application\'s NodeJS chat runtime
### Example
```typescript
import {
RuntimeApi,
Configuration
} from 'chatkitty';
const configuration = new Configuration();
const apiInstance = new RuntimeApi(configuration);
let requestBody: { [key: string]: string; }; //
const { status, data } = await apiInstance.updateNodejsRuntimeEnvironmentVariables(
requestBody
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **requestBody** | **{ [key: string]: string; }**| | |
### Return type
**ChatRuntimeResource**
### Authorization
[application_authorization](../README.md#application_authorization)
### HTTP request headers
- **Content-Type**: application/vnd.chatkitty+json
- **Accept**: application/json, application/vnd.chatkitty+json, application/vnd.chatkitty.v1+json, application/vnd.hal+json, application/hal+json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**404** | Resource not found | - |
|**403** | Access is denied | - |
|**400** | Client error | - |
|**401** | Unauthorized: Full authentication is required to access this resource | - |
|**200** | OK | - |
[[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)
# **updateNodejsRuntimeInitializationScript**
> ChatRuntimeResource updateNodejsRuntimeInitializationScript(chatRuntimeScriptProperties)
Updates the initialization script for this application\'s NodeJS chat runtime
### Example
```typescript
import {
RuntimeApi,
Configuration,
ChatRuntimeScriptProperties
} from 'chatkitty';
const configuration = new Configuration();
const apiInstance = new RuntimeApi(configuration);
let chatRuntimeScriptProperties: ChatRuntimeScriptProperties; //
const { status, data } = await apiInstance.updateNodejsRuntimeInitializationScript(
chatRuntimeScriptProperties
);
```
### Parameters
|Name | Type | Description | Notes|
|------------- | ------------- | ------------- | -------------|
| **chatRuntimeScriptProperties** | **ChatRuntimeScriptProperties**| | |
### Return type
**ChatRuntimeResource**
### Authorization
[application_authorization](../README.md#application_authorization)
### HTTP request headers
- **Content-Type**: application/vnd.chatkitty+json
- **Accept**: application/json, application/vnd.chatkitty+json, application/vnd.chatkitty.v1+json, application/vnd.hal+json, application/hal+json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**404** | Resource not found | - |
|**403** | Access is denied | - |
|**400** | Client error | - |
|**401** | Unauthorized: Full authentication is required to access this resource | - |
|**200** | OK | - |
[[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)