@instructure/athena-api-client 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +155 -0
- package/dist/apis/AccountsApi.d.ts +41 -0
- package/dist/apis/AccountsApi.js +100 -0
- package/dist/apis/ChatsApi.d.ts +105 -0
- package/dist/apis/ChatsApi.js +289 -0
- package/dist/apis/HealthApi.d.ts +28 -0
- package/dist/apis/HealthApi.js +61 -0
- package/dist/apis/MessagesApi.d.ts +34 -0
- package/dist/apis/MessagesApi.js +80 -0
- package/dist/apis/ServiceTokensApi.d.ts +81 -0
- package/dist/apis/ServiceTokensApi.js +209 -0
- package/dist/apis/TagsApi.d.ts +28 -0
- package/dist/apis/TagsApi.js +61 -0
- package/dist/apis/index.d.ts +6 -0
- package/dist/apis/index.js +24 -0
- package/dist/esm/apis/AccountsApi.d.ts +41 -0
- package/dist/esm/apis/AccountsApi.js +96 -0
- package/dist/esm/apis/ChatsApi.d.ts +105 -0
- package/dist/esm/apis/ChatsApi.js +285 -0
- package/dist/esm/apis/HealthApi.d.ts +28 -0
- package/dist/esm/apis/HealthApi.js +57 -0
- package/dist/esm/apis/MessagesApi.d.ts +34 -0
- package/dist/esm/apis/MessagesApi.js +76 -0
- package/dist/esm/apis/ServiceTokensApi.d.ts +81 -0
- package/dist/esm/apis/ServiceTokensApi.js +205 -0
- package/dist/esm/apis/TagsApi.d.ts +28 -0
- package/dist/esm/apis/TagsApi.js +57 -0
- package/dist/esm/apis/index.d.ts +6 -0
- package/dist/esm/apis/index.js +8 -0
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/models/Account.d.ts +50 -0
- package/dist/esm/models/Account.js +55 -0
- package/dist/esm/models/Chat.d.ts +112 -0
- package/dist/esm/models/Chat.js +84 -0
- package/dist/esm/models/ChatRequest.d.ts +38 -0
- package/dist/esm/models/ChatRequest.js +45 -0
- package/dist/esm/models/CreateAccountRequest.d.ts +32 -0
- package/dist/esm/models/CreateAccountRequest.js +43 -0
- package/dist/esm/models/CreateChatRequest.d.ts +32 -0
- package/dist/esm/models/CreateChatRequest.js +41 -0
- package/dist/esm/models/CreateTokenRequest.d.ts +52 -0
- package/dist/esm/models/CreateTokenRequest.js +58 -0
- package/dist/esm/models/CreateTokenResponse.d.ts +50 -0
- package/dist/esm/models/CreateTokenResponse.js +55 -0
- package/dist/esm/models/HealthCheck.d.ts +39 -0
- package/dist/esm/models/HealthCheck.js +49 -0
- package/dist/esm/models/Message.d.ts +63 -0
- package/dist/esm/models/Message.js +64 -0
- package/dist/esm/models/MessagePartsInner.d.ts +38 -0
- package/dist/esm/models/MessagePartsInner.js +43 -0
- package/dist/esm/models/ModelError.d.ts +32 -0
- package/dist/esm/models/ModelError.js +43 -0
- package/dist/esm/models/PaginatedChats.d.ts +39 -0
- package/dist/esm/models/PaginatedChats.js +48 -0
- package/dist/esm/models/PaginatedMessages.d.ts +39 -0
- package/dist/esm/models/PaginatedMessages.js +48 -0
- package/dist/esm/models/ServiceToken.d.ts +70 -0
- package/dist/esm/models/ServiceToken.js +70 -0
- package/dist/esm/models/Tag.d.ts +38 -0
- package/dist/esm/models/Tag.js +47 -0
- package/dist/esm/models/UpdateChatRequest.d.ts +32 -0
- package/dist/esm/models/UpdateChatRequest.js +41 -0
- package/dist/esm/models/UpdateTokenRequest.d.ts +32 -0
- package/dist/esm/models/UpdateTokenRequest.js +43 -0
- package/dist/esm/models/UpdateTokenResponse.d.ts +50 -0
- package/dist/esm/models/UpdateTokenResponse.js +55 -0
- package/dist/esm/models/index.d.ts +18 -0
- package/dist/esm/models/index.js +20 -0
- package/dist/esm/runtime.d.ts +184 -0
- package/dist/esm/runtime.js +334 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +21 -0
- package/dist/models/Account.d.ts +50 -0
- package/dist/models/Account.js +62 -0
- package/dist/models/Chat.d.ts +112 -0
- package/dist/models/Chat.js +92 -0
- package/dist/models/ChatRequest.d.ts +38 -0
- package/dist/models/ChatRequest.js +52 -0
- package/dist/models/CreateAccountRequest.d.ts +32 -0
- package/dist/models/CreateAccountRequest.js +50 -0
- package/dist/models/CreateChatRequest.d.ts +32 -0
- package/dist/models/CreateChatRequest.js +48 -0
- package/dist/models/CreateTokenRequest.d.ts +52 -0
- package/dist/models/CreateTokenRequest.js +66 -0
- package/dist/models/CreateTokenResponse.d.ts +50 -0
- package/dist/models/CreateTokenResponse.js +62 -0
- package/dist/models/HealthCheck.d.ts +39 -0
- package/dist/models/HealthCheck.js +57 -0
- package/dist/models/Message.d.ts +63 -0
- package/dist/models/Message.js +71 -0
- package/dist/models/MessagePartsInner.d.ts +38 -0
- package/dist/models/MessagePartsInner.js +50 -0
- package/dist/models/ModelError.d.ts +32 -0
- package/dist/models/ModelError.js +50 -0
- package/dist/models/PaginatedChats.d.ts +39 -0
- package/dist/models/PaginatedChats.js +55 -0
- package/dist/models/PaginatedMessages.d.ts +39 -0
- package/dist/models/PaginatedMessages.js +55 -0
- package/dist/models/ServiceToken.d.ts +70 -0
- package/dist/models/ServiceToken.js +78 -0
- package/dist/models/Tag.d.ts +38 -0
- package/dist/models/Tag.js +54 -0
- package/dist/models/UpdateChatRequest.d.ts +32 -0
- package/dist/models/UpdateChatRequest.js +48 -0
- package/dist/models/UpdateTokenRequest.d.ts +32 -0
- package/dist/models/UpdateTokenRequest.js +50 -0
- package/dist/models/UpdateTokenResponse.d.ts +50 -0
- package/dist/models/UpdateTokenResponse.js +62 -0
- package/dist/models/index.d.ts +18 -0
- package/dist/models/index.js +36 -0
- package/dist/runtime.d.ts +184 -0
- package/dist/runtime.js +350 -0
- package/package.json +30 -0
package/README.md
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
# athena-api-client@1.0.0
|
|
2
|
+
|
|
3
|
+
A TypeScript SDK client for the localhost API.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
First, install the SDK from npm.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install athena-api-client --save
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Next, try it out.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
import {
|
|
18
|
+
Configuration,
|
|
19
|
+
AccountsApi,
|
|
20
|
+
} from 'athena-api-client';
|
|
21
|
+
import type { CreateAccountOperationRequest } from 'athena-api-client';
|
|
22
|
+
|
|
23
|
+
async function example() {
|
|
24
|
+
console.log("🚀 Testing athena-api-client SDK...");
|
|
25
|
+
const config = new Configuration({
|
|
26
|
+
// To configure API key authorization: AuthToken
|
|
27
|
+
apiKey: "YOUR API KEY",
|
|
28
|
+
});
|
|
29
|
+
const api = new AccountsApi(config);
|
|
30
|
+
|
|
31
|
+
const body = {
|
|
32
|
+
// CreateAccountRequest
|
|
33
|
+
createAccountRequest: ...,
|
|
34
|
+
} satisfies CreateAccountOperationRequest;
|
|
35
|
+
|
|
36
|
+
try {
|
|
37
|
+
const data = await api.createAccount(body);
|
|
38
|
+
console.log(data);
|
|
39
|
+
} catch (error) {
|
|
40
|
+
console.error(error);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Run the test
|
|
45
|
+
example().catch(console.error);
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
## Documentation
|
|
50
|
+
|
|
51
|
+
### API Endpoints
|
|
52
|
+
|
|
53
|
+
All URIs are relative to *http://localhost:3000*
|
|
54
|
+
|
|
55
|
+
| Class | Method | HTTP request | Description
|
|
56
|
+
| ----- | ------ | ------------ | -------------
|
|
57
|
+
*AccountsApi* | [**createAccount**](docs/AccountsApi.md#createaccountoperation) | **POST** /api/v1/accounts | Create a new account
|
|
58
|
+
*AccountsApi* | [**listAccounts**](docs/AccountsApi.md#listaccounts) | **GET** /api/v1/accounts | List all accounts
|
|
59
|
+
*ChatsApi* | [**createChat**](docs/ChatsApi.md#createchatoperation) | **POST** /api/v1/chats | Create a chat
|
|
60
|
+
*ChatsApi* | [**deleteChat**](docs/ChatsApi.md#deletechat) | **DELETE** /api/v1/chats/{chatId} | Delete a chat
|
|
61
|
+
*ChatsApi* | [**getChat**](docs/ChatsApi.md#getchat) | **GET** /api/v1/chats/{chatId} | Get a chat
|
|
62
|
+
*ChatsApi* | [**listChats**](docs/ChatsApi.md#listchats) | **GET** /api/v1/chats | List chats
|
|
63
|
+
*ChatsApi* | [**sendChatMessage**](docs/ChatsApi.md#sendchatmessage) | **POST** /api/v1/chat | Send a message to a chat
|
|
64
|
+
*ChatsApi* | [**updateChat**](docs/ChatsApi.md#updatechatoperation) | **PATCH** /api/v1/chats/{chatId} | Update a chat
|
|
65
|
+
*HealthApi* | [**healthCheck**](docs/HealthApi.md#healthcheck) | **GET** /health | Health check endpoint
|
|
66
|
+
*MessagesApi* | [**getChatMessages**](docs/MessagesApi.md#getchatmessages) | **GET** /api/v1/chats/{chatId}/messages | List chat messages
|
|
67
|
+
*ServiceTokensApi* | [**createServiceToken**](docs/ServiceTokensApi.md#createservicetoken) | **POST** /api/v1/tokens | Create a new service token
|
|
68
|
+
*ServiceTokensApi* | [**deleteServiceToken**](docs/ServiceTokensApi.md#deleteservicetoken) | **DELETE** /api/v1/tokens/{id} | Delete service token
|
|
69
|
+
*ServiceTokensApi* | [**getServiceToken**](docs/ServiceTokensApi.md#getservicetoken) | **GET** /api/v1/tokens/{id} | Get service token by ID
|
|
70
|
+
*ServiceTokensApi* | [**listServiceTokens**](docs/ServiceTokensApi.md#listservicetokens) | **GET** /api/v1/tokens | List all service tokens
|
|
71
|
+
*ServiceTokensApi* | [**updateServiceToken**](docs/ServiceTokensApi.md#updateservicetoken) | **PATCH** /api/v1/tokens/{id} | Update service token status
|
|
72
|
+
*TagsApi* | [**listTags**](docs/TagsApi.md#listtags) | **GET** /api/v1/tags | List all tags
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
### Models
|
|
76
|
+
|
|
77
|
+
- [Account](docs/Account.md)
|
|
78
|
+
- [Chat](docs/Chat.md)
|
|
79
|
+
- [ChatRequest](docs/ChatRequest.md)
|
|
80
|
+
- [CreateAccountRequest](docs/CreateAccountRequest.md)
|
|
81
|
+
- [CreateChatRequest](docs/CreateChatRequest.md)
|
|
82
|
+
- [CreateTokenRequest](docs/CreateTokenRequest.md)
|
|
83
|
+
- [CreateTokenResponse](docs/CreateTokenResponse.md)
|
|
84
|
+
- [HealthCheck](docs/HealthCheck.md)
|
|
85
|
+
- [Message](docs/Message.md)
|
|
86
|
+
- [MessagePartsInner](docs/MessagePartsInner.md)
|
|
87
|
+
- [ModelError](docs/ModelError.md)
|
|
88
|
+
- [PaginatedChats](docs/PaginatedChats.md)
|
|
89
|
+
- [PaginatedMessages](docs/PaginatedMessages.md)
|
|
90
|
+
- [ServiceToken](docs/ServiceToken.md)
|
|
91
|
+
- [Tag](docs/Tag.md)
|
|
92
|
+
- [UpdateChatRequest](docs/UpdateChatRequest.md)
|
|
93
|
+
- [UpdateTokenRequest](docs/UpdateTokenRequest.md)
|
|
94
|
+
- [UpdateTokenResponse](docs/UpdateTokenResponse.md)
|
|
95
|
+
|
|
96
|
+
### Authorization
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
Authentication schemes defined for the API:
|
|
100
|
+
<a id="AuthToken"></a>
|
|
101
|
+
#### AuthToken
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
- **Type**: API key
|
|
105
|
+
- **API key parameter name**: `X-Auth-Token`
|
|
106
|
+
- **Location**: HTTP header
|
|
107
|
+
|
|
108
|
+
## About
|
|
109
|
+
|
|
110
|
+
This TypeScript SDK client supports the [Fetch API](https://fetch.spec.whatwg.org/)
|
|
111
|
+
and is automatically generated by the
|
|
112
|
+
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
113
|
+
|
|
114
|
+
- API version: `1.0.0`
|
|
115
|
+
- Package version: `1.0.0`
|
|
116
|
+
- Generator version: `7.19.0`
|
|
117
|
+
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
118
|
+
|
|
119
|
+
The generated npm module supports the following:
|
|
120
|
+
|
|
121
|
+
- Environments
|
|
122
|
+
* Node.js
|
|
123
|
+
* Webpack
|
|
124
|
+
* Browserify
|
|
125
|
+
- Language levels
|
|
126
|
+
* ES5 - you must have a Promises/A+ library installed
|
|
127
|
+
* ES6
|
|
128
|
+
- Module systems
|
|
129
|
+
* CommonJS
|
|
130
|
+
* ES6 module system
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
## Development
|
|
134
|
+
|
|
135
|
+
### Building
|
|
136
|
+
|
|
137
|
+
To build the TypeScript source code, you need to have Node.js and npm installed.
|
|
138
|
+
After cloning the repository, navigate to the project directory and run:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
npm install
|
|
142
|
+
npm run build
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Publishing
|
|
146
|
+
|
|
147
|
+
Once you've built the package, you can publish it to npm:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
npm publish
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## License
|
|
154
|
+
|
|
155
|
+
[]()
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Athena API
|
|
3
|
+
* REST API for the Athena system
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import type { Account, CreateAccountRequest } from '../models/index';
|
|
14
|
+
export interface CreateAccountOperationRequest {
|
|
15
|
+
createAccountRequest: CreateAccountRequest;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
export declare class AccountsApi extends runtime.BaseAPI {
|
|
21
|
+
/**
|
|
22
|
+
* Creates a new account (admin only)
|
|
23
|
+
* Create a new account
|
|
24
|
+
*/
|
|
25
|
+
createAccountRaw(requestParameters: CreateAccountOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Account>>;
|
|
26
|
+
/**
|
|
27
|
+
* Creates a new account (admin only)
|
|
28
|
+
* Create a new account
|
|
29
|
+
*/
|
|
30
|
+
createAccount(requestParameters: CreateAccountOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Account>;
|
|
31
|
+
/**
|
|
32
|
+
* Retrieves a list of all accounts (admin only)
|
|
33
|
+
* List all accounts
|
|
34
|
+
*/
|
|
35
|
+
listAccountsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Account>>>;
|
|
36
|
+
/**
|
|
37
|
+
* Retrieves a list of all accounts (admin only)
|
|
38
|
+
* List all accounts
|
|
39
|
+
*/
|
|
40
|
+
listAccounts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Account>>;
|
|
41
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Athena API
|
|
6
|
+
* REST API for the Athena system
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.AccountsApi = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const index_1 = require("../models/index");
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
class AccountsApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Creates a new account (admin only)
|
|
34
|
+
* Create a new account
|
|
35
|
+
*/
|
|
36
|
+
createAccountRaw(requestParameters, initOverrides) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
if (requestParameters['createAccountRequest'] == null) {
|
|
39
|
+
throw new runtime.RequiredError('createAccountRequest', 'Required parameter "createAccountRequest" was null or undefined when calling createAccount().');
|
|
40
|
+
}
|
|
41
|
+
const queryParameters = {};
|
|
42
|
+
const headerParameters = {};
|
|
43
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
44
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
45
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
46
|
+
}
|
|
47
|
+
let urlPath = `/api/v1/accounts`;
|
|
48
|
+
const response = yield this.request({
|
|
49
|
+
path: urlPath,
|
|
50
|
+
method: 'POST',
|
|
51
|
+
headers: headerParameters,
|
|
52
|
+
query: queryParameters,
|
|
53
|
+
body: (0, index_1.CreateAccountRequestToJSON)(requestParameters['createAccountRequest']),
|
|
54
|
+
}, initOverrides);
|
|
55
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AccountFromJSON)(jsonValue));
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Creates a new account (admin only)
|
|
60
|
+
* Create a new account
|
|
61
|
+
*/
|
|
62
|
+
createAccount(requestParameters, initOverrides) {
|
|
63
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
const response = yield this.createAccountRaw(requestParameters, initOverrides);
|
|
65
|
+
return yield response.value();
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Retrieves a list of all accounts (admin only)
|
|
70
|
+
* List all accounts
|
|
71
|
+
*/
|
|
72
|
+
listAccountsRaw(initOverrides) {
|
|
73
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
const queryParameters = {};
|
|
75
|
+
const headerParameters = {};
|
|
76
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
77
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
78
|
+
}
|
|
79
|
+
let urlPath = `/api/v1/accounts`;
|
|
80
|
+
const response = yield this.request({
|
|
81
|
+
path: urlPath,
|
|
82
|
+
method: 'GET',
|
|
83
|
+
headers: headerParameters,
|
|
84
|
+
query: queryParameters,
|
|
85
|
+
}, initOverrides);
|
|
86
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.AccountFromJSON));
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Retrieves a list of all accounts (admin only)
|
|
91
|
+
* List all accounts
|
|
92
|
+
*/
|
|
93
|
+
listAccounts(initOverrides) {
|
|
94
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
95
|
+
const response = yield this.listAccountsRaw(initOverrides);
|
|
96
|
+
return yield response.value();
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
exports.AccountsApi = AccountsApi;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Athena API
|
|
3
|
+
* REST API for the Athena system
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import type { Chat, ChatRequest, CreateChatRequest, PaginatedChats, UpdateChatRequest } from '../models/index';
|
|
14
|
+
export interface CreateChatOperationRequest {
|
|
15
|
+
xUserId: string;
|
|
16
|
+
createChatRequest?: CreateChatRequest;
|
|
17
|
+
}
|
|
18
|
+
export interface DeleteChatRequest {
|
|
19
|
+
xUserId: string;
|
|
20
|
+
chatId: string;
|
|
21
|
+
}
|
|
22
|
+
export interface GetChatRequest {
|
|
23
|
+
xUserId: string;
|
|
24
|
+
chatId: string;
|
|
25
|
+
}
|
|
26
|
+
export interface ListChatsRequest {
|
|
27
|
+
xUserId: string;
|
|
28
|
+
limit?: number;
|
|
29
|
+
cursor?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface SendChatMessageRequest {
|
|
32
|
+
xUserId: string;
|
|
33
|
+
chatRequest: ChatRequest;
|
|
34
|
+
xCanvasToken?: string;
|
|
35
|
+
}
|
|
36
|
+
export interface UpdateChatOperationRequest {
|
|
37
|
+
xUserId: string;
|
|
38
|
+
chatId: string;
|
|
39
|
+
updateChatRequest?: UpdateChatRequest;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
*/
|
|
44
|
+
export declare class ChatsApi extends runtime.BaseAPI {
|
|
45
|
+
/**
|
|
46
|
+
* Creates a new chat for the authenticated account user.
|
|
47
|
+
* Create a chat
|
|
48
|
+
*/
|
|
49
|
+
createChatRaw(requestParameters: CreateChatOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Chat>>;
|
|
50
|
+
/**
|
|
51
|
+
* Creates a new chat for the authenticated account user.
|
|
52
|
+
* Create a chat
|
|
53
|
+
*/
|
|
54
|
+
createChat(requestParameters: CreateChatOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Chat>;
|
|
55
|
+
/**
|
|
56
|
+
* Deletes a chat and its messages belonging to the authenticated account user.
|
|
57
|
+
* Delete a chat
|
|
58
|
+
*/
|
|
59
|
+
deleteChatRaw(requestParameters: DeleteChatRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
60
|
+
/**
|
|
61
|
+
* Deletes a chat and its messages belonging to the authenticated account user.
|
|
62
|
+
* Delete a chat
|
|
63
|
+
*/
|
|
64
|
+
deleteChat(requestParameters: DeleteChatRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
65
|
+
/**
|
|
66
|
+
* Returns a single chat belonging to the authenticated account user.
|
|
67
|
+
* Get a chat
|
|
68
|
+
*/
|
|
69
|
+
getChatRaw(requestParameters: GetChatRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Chat>>;
|
|
70
|
+
/**
|
|
71
|
+
* Returns a single chat belonging to the authenticated account user.
|
|
72
|
+
* Get a chat
|
|
73
|
+
*/
|
|
74
|
+
getChat(requestParameters: GetChatRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Chat>;
|
|
75
|
+
/**
|
|
76
|
+
* Returns paginated chats belonging to the authenticated account user, ordered by creation date (newest first).
|
|
77
|
+
* List chats
|
|
78
|
+
*/
|
|
79
|
+
listChatsRaw(requestParameters: ListChatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedChats>>;
|
|
80
|
+
/**
|
|
81
|
+
* Returns paginated chats belonging to the authenticated account user, ordered by creation date (newest first).
|
|
82
|
+
* List chats
|
|
83
|
+
*/
|
|
84
|
+
listChats(requestParameters: ListChatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedChats>;
|
|
85
|
+
/**
|
|
86
|
+
* Sends a message to a chat conversation with an AI assistant. The client must provide a chatId (UUID v4). If the chatId doesn\'t exist, a new chat will be created with that ID. If it exists and belongs to the user, the conversation continues. The response is streamed in real-time.
|
|
87
|
+
* Send a message to a chat
|
|
88
|
+
*/
|
|
89
|
+
sendChatMessageRaw(requestParameters: SendChatMessageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>>;
|
|
90
|
+
/**
|
|
91
|
+
* Sends a message to a chat conversation with an AI assistant. The client must provide a chatId (UUID v4). If the chatId doesn\'t exist, a new chat will be created with that ID. If it exists and belongs to the user, the conversation continues. The response is streamed in real-time.
|
|
92
|
+
* Send a message to a chat
|
|
93
|
+
*/
|
|
94
|
+
sendChatMessage(requestParameters: SendChatMessageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>;
|
|
95
|
+
/**
|
|
96
|
+
* Updates a chat belonging to the authenticated account user.
|
|
97
|
+
* Update a chat
|
|
98
|
+
*/
|
|
99
|
+
updateChatRaw(requestParameters: UpdateChatOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Chat>>;
|
|
100
|
+
/**
|
|
101
|
+
* Updates a chat belonging to the authenticated account user.
|
|
102
|
+
* Update a chat
|
|
103
|
+
*/
|
|
104
|
+
updateChat(requestParameters: UpdateChatOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Chat>;
|
|
105
|
+
}
|