@instructure/athena-api-client 1.0.11 → 1.0.12
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 +6 -0
- package/dist/apis/ChatAnalysisApi.d.ts +32 -0
- package/dist/apis/ChatAnalysisApi.js +74 -0
- package/dist/apis/UserContextApi.d.ts +45 -0
- package/dist/apis/UserContextApi.js +112 -0
- package/dist/apis/index.d.ts +2 -0
- package/dist/apis/index.js +2 -0
- package/dist/esm/apis/ChatAnalysisApi.d.ts +32 -0
- package/dist/esm/apis/ChatAnalysisApi.js +70 -0
- package/dist/esm/apis/UserContextApi.d.ts +45 -0
- package/dist/esm/apis/UserContextApi.js +108 -0
- package/dist/esm/apis/index.d.ts +2 -0
- package/dist/esm/apis/index.js +2 -0
- package/dist/esm/models/ChatAnalysis.d.ts +68 -0
- package/dist/esm/models/ChatAnalysis.js +67 -0
- package/dist/esm/models/UpsertUserContextRequest.d.ts +56 -0
- package/dist/esm/models/UpsertUserContextRequest.js +49 -0
- package/dist/esm/models/UserContext.d.ts +80 -0
- package/dist/esm/models/UserContext.js +75 -0
- package/dist/esm/models/index.d.ts +3 -0
- package/dist/esm/models/index.js +3 -0
- package/dist/models/ChatAnalysis.d.ts +68 -0
- package/dist/models/ChatAnalysis.js +74 -0
- package/dist/models/UpsertUserContextRequest.d.ts +56 -0
- package/dist/models/UpsertUserContextRequest.js +56 -0
- package/dist/models/UserContext.d.ts +80 -0
- package/dist/models/UserContext.js +82 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -57,6 +57,7 @@ All URIs are relative to *http://localhost:3000*
|
|
|
57
57
|
*AccountsApi* | [**createAccount**](docs/AccountsApi.md#createaccountoperation) | **POST** /api/v1/accounts | Create a new account
|
|
58
58
|
*AccountsApi* | [**listAccounts**](docs/AccountsApi.md#listaccounts) | **GET** /api/v1/accounts | List all accounts
|
|
59
59
|
*AccountsApi* | [**updateAccount**](docs/AccountsApi.md#updateaccount) | **PATCH** /api/v1/accounts/{id} | Update an account
|
|
60
|
+
*ChatAnalysisApi* | [**getChatAnalysis**](docs/ChatAnalysisApi.md#getchatanalysis) | **GET** /api/v1/chats/{chatId}/analysis | Get chat analysis
|
|
60
61
|
*ChatsApi* | [**createChat**](docs/ChatsApi.md#createchatoperation) | **POST** /api/v1/chats | Create a chat
|
|
61
62
|
*ChatsApi* | [**deleteChat**](docs/ChatsApi.md#deletechat) | **DELETE** /api/v1/chats/{chatId} | Delete a chat
|
|
62
63
|
*ChatsApi* | [**getChat**](docs/ChatsApi.md#getchat) | **GET** /api/v1/chats/{chatId} | Get a chat
|
|
@@ -98,6 +99,8 @@ All URIs are relative to *http://localhost:3000*
|
|
|
98
99
|
*ServiceTokensApi* | [**listServiceTokens**](docs/ServiceTokensApi.md#listservicetokens) | **GET** /api/v1/tokens | List all service tokens
|
|
99
100
|
*ServiceTokensApi* | [**updateServiceToken**](docs/ServiceTokensApi.md#updateservicetoken) | **PATCH** /api/v1/tokens/{id} | Update service token status
|
|
100
101
|
*TagsApi* | [**listTags**](docs/TagsApi.md#listtags) | **GET** /api/v1/tags | List all tags
|
|
102
|
+
*UserContextApi* | [**getUserContext**](docs/UserContextApi.md#getusercontext) | **GET** /api/v1/user-context | Get user context
|
|
103
|
+
*UserContextApi* | [**upsertUserContext**](docs/UserContextApi.md#upsertusercontextoperation) | **PUT** /api/v1/user-context | Create or update user context
|
|
101
104
|
*VotesApi* | [**listChatVotes**](docs/VotesApi.md#listchatvotes) | **GET** /api/v1/chats/{chatId}/votes | List votes for a chat
|
|
102
105
|
*VotesApi* | [**upsertChatVote**](docs/VotesApi.md#upsertchatvote) | **PATCH** /api/v1/chats/{chatId}/votes | Create or update a vote
|
|
103
106
|
|
|
@@ -106,6 +109,7 @@ All URIs are relative to *http://localhost:3000*
|
|
|
106
109
|
|
|
107
110
|
- [Account](docs/Account.md)
|
|
108
111
|
- [Chat](docs/Chat.md)
|
|
112
|
+
- [ChatAnalysis](docs/ChatAnalysis.md)
|
|
109
113
|
- [ChatRequest](docs/ChatRequest.md)
|
|
110
114
|
- [ChatRequestAttachmentsInner](docs/ChatRequestAttachmentsInner.md)
|
|
111
115
|
- [CreateAccountRequest](docs/CreateAccountRequest.md)
|
|
@@ -154,7 +158,9 @@ All URIs are relative to *http://localhost:3000*
|
|
|
154
158
|
- [UploadUrlRequestFilesInner](docs/UploadUrlRequestFilesInner.md)
|
|
155
159
|
- [UploadUrlResponse](docs/UploadUrlResponse.md)
|
|
156
160
|
- [UpsertOverrideDto](docs/UpsertOverrideDto.md)
|
|
161
|
+
- [UpsertUserContextRequest](docs/UpsertUserContextRequest.md)
|
|
157
162
|
- [UpsertVoteRequest](docs/UpsertVoteRequest.md)
|
|
163
|
+
- [UserContext](docs/UserContext.md)
|
|
158
164
|
- [Vote](docs/Vote.md)
|
|
159
165
|
- [VotesResponse](docs/VotesResponse.md)
|
|
160
166
|
|
|
@@ -0,0 +1,32 @@
|
|
|
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 { ChatAnalysis } from '../models/index';
|
|
14
|
+
export interface GetChatAnalysisRequest {
|
|
15
|
+
chatId: string;
|
|
16
|
+
xUserId: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
export declare class ChatAnalysisApi extends runtime.BaseAPI {
|
|
22
|
+
/**
|
|
23
|
+
* Returns the analysis results for a chat, including subject, concepts, summary, and goal evaluation.
|
|
24
|
+
* Get chat analysis
|
|
25
|
+
*/
|
|
26
|
+
getChatAnalysisRaw(requestParameters: GetChatAnalysisRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChatAnalysis>>;
|
|
27
|
+
/**
|
|
28
|
+
* Returns the analysis results for a chat, including subject, concepts, summary, and goal evaluation.
|
|
29
|
+
* Get chat analysis
|
|
30
|
+
*/
|
|
31
|
+
getChatAnalysis(requestParameters: GetChatAnalysisRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChatAnalysis>;
|
|
32
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
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.ChatAnalysisApi = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const index_1 = require("../models/index");
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
class ChatAnalysisApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Returns the analysis results for a chat, including subject, concepts, summary, and goal evaluation.
|
|
34
|
+
* Get chat analysis
|
|
35
|
+
*/
|
|
36
|
+
getChatAnalysisRaw(requestParameters, initOverrides) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
if (requestParameters['chatId'] == null) {
|
|
39
|
+
throw new runtime.RequiredError('chatId', 'Required parameter "chatId" was null or undefined when calling getChatAnalysis().');
|
|
40
|
+
}
|
|
41
|
+
if (requestParameters['xUserId'] == null) {
|
|
42
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling getChatAnalysis().');
|
|
43
|
+
}
|
|
44
|
+
const queryParameters = {};
|
|
45
|
+
const headerParameters = {};
|
|
46
|
+
if (requestParameters['xUserId'] != null) {
|
|
47
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
48
|
+
}
|
|
49
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
50
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
51
|
+
}
|
|
52
|
+
let urlPath = `/api/v1/chats/{chatId}/analysis`;
|
|
53
|
+
urlPath = urlPath.replace(`{${"chatId"}}`, encodeURIComponent(String(requestParameters['chatId'])));
|
|
54
|
+
const response = yield this.request({
|
|
55
|
+
path: urlPath,
|
|
56
|
+
method: 'GET',
|
|
57
|
+
headers: headerParameters,
|
|
58
|
+
query: queryParameters,
|
|
59
|
+
}, initOverrides);
|
|
60
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ChatAnalysisFromJSON)(jsonValue));
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Returns the analysis results for a chat, including subject, concepts, summary, and goal evaluation.
|
|
65
|
+
* Get chat analysis
|
|
66
|
+
*/
|
|
67
|
+
getChatAnalysis(requestParameters, initOverrides) {
|
|
68
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
69
|
+
const response = yield this.getChatAnalysisRaw(requestParameters, initOverrides);
|
|
70
|
+
return yield response.value();
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
exports.ChatAnalysisApi = ChatAnalysisApi;
|
|
@@ -0,0 +1,45 @@
|
|
|
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 { UpsertUserContextRequest, UserContext } from '../models/index';
|
|
14
|
+
export interface GetUserContextRequest {
|
|
15
|
+
xUserId: string;
|
|
16
|
+
}
|
|
17
|
+
export interface UpsertUserContextOperationRequest {
|
|
18
|
+
xUserId: string;
|
|
19
|
+
upsertUserContextRequest: UpsertUserContextRequest;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
*/
|
|
24
|
+
export declare class UserContextApi extends runtime.BaseAPI {
|
|
25
|
+
/**
|
|
26
|
+
* Returns the personalization context for the authenticated user.
|
|
27
|
+
* Get user context
|
|
28
|
+
*/
|
|
29
|
+
getUserContextRaw(requestParameters: GetUserContextRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserContext>>;
|
|
30
|
+
/**
|
|
31
|
+
* Returns the personalization context for the authenticated user.
|
|
32
|
+
* Get user context
|
|
33
|
+
*/
|
|
34
|
+
getUserContext(requestParameters: GetUserContextRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserContext>;
|
|
35
|
+
/**
|
|
36
|
+
* Creates or updates the personalization context for the authenticated user.
|
|
37
|
+
* Create or update user context
|
|
38
|
+
*/
|
|
39
|
+
upsertUserContextRaw(requestParameters: UpsertUserContextOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserContext>>;
|
|
40
|
+
/**
|
|
41
|
+
* Creates or updates the personalization context for the authenticated user.
|
|
42
|
+
* Create or update user context
|
|
43
|
+
*/
|
|
44
|
+
upsertUserContext(requestParameters: UpsertUserContextOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserContext>;
|
|
45
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
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.UserContextApi = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const index_1 = require("../models/index");
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
class UserContextApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Returns the personalization context for the authenticated user.
|
|
34
|
+
* Get user context
|
|
35
|
+
*/
|
|
36
|
+
getUserContextRaw(requestParameters, initOverrides) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
if (requestParameters['xUserId'] == null) {
|
|
39
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling getUserContext().');
|
|
40
|
+
}
|
|
41
|
+
const queryParameters = {};
|
|
42
|
+
const headerParameters = {};
|
|
43
|
+
if (requestParameters['xUserId'] != null) {
|
|
44
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
45
|
+
}
|
|
46
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
47
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
48
|
+
}
|
|
49
|
+
let urlPath = `/api/v1/user-context`;
|
|
50
|
+
const response = yield this.request({
|
|
51
|
+
path: urlPath,
|
|
52
|
+
method: 'GET',
|
|
53
|
+
headers: headerParameters,
|
|
54
|
+
query: queryParameters,
|
|
55
|
+
}, initOverrides);
|
|
56
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.UserContextFromJSON)(jsonValue));
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Returns the personalization context for the authenticated user.
|
|
61
|
+
* Get user context
|
|
62
|
+
*/
|
|
63
|
+
getUserContext(requestParameters, initOverrides) {
|
|
64
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
const response = yield this.getUserContextRaw(requestParameters, initOverrides);
|
|
66
|
+
return yield response.value();
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Creates or updates the personalization context for the authenticated user.
|
|
71
|
+
* Create or update user context
|
|
72
|
+
*/
|
|
73
|
+
upsertUserContextRaw(requestParameters, initOverrides) {
|
|
74
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
+
if (requestParameters['xUserId'] == null) {
|
|
76
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling upsertUserContext().');
|
|
77
|
+
}
|
|
78
|
+
if (requestParameters['upsertUserContextRequest'] == null) {
|
|
79
|
+
throw new runtime.RequiredError('upsertUserContextRequest', 'Required parameter "upsertUserContextRequest" was null or undefined when calling upsertUserContext().');
|
|
80
|
+
}
|
|
81
|
+
const queryParameters = {};
|
|
82
|
+
const headerParameters = {};
|
|
83
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
84
|
+
if (requestParameters['xUserId'] != null) {
|
|
85
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
86
|
+
}
|
|
87
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
88
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
89
|
+
}
|
|
90
|
+
let urlPath = `/api/v1/user-context`;
|
|
91
|
+
const response = yield this.request({
|
|
92
|
+
path: urlPath,
|
|
93
|
+
method: 'PUT',
|
|
94
|
+
headers: headerParameters,
|
|
95
|
+
query: queryParameters,
|
|
96
|
+
body: (0, index_1.UpsertUserContextRequestToJSON)(requestParameters['upsertUserContextRequest']),
|
|
97
|
+
}, initOverrides);
|
|
98
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.UserContextFromJSON)(jsonValue));
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Creates or updates the personalization context for the authenticated user.
|
|
103
|
+
* Create or update user context
|
|
104
|
+
*/
|
|
105
|
+
upsertUserContext(requestParameters, initOverrides) {
|
|
106
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
107
|
+
const response = yield this.upsertUserContextRaw(requestParameters, initOverrides);
|
|
108
|
+
return yield response.value();
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
exports.UserContextApi = UserContextApi;
|
package/dist/apis/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './AccountsApi';
|
|
2
|
+
export * from './ChatAnalysisApi';
|
|
2
3
|
export * from './ChatsApi';
|
|
3
4
|
export * from './FeatureOverridesApi';
|
|
4
5
|
export * from './FeaturesApi';
|
|
@@ -13,4 +14,5 @@ export * from './QuizSessionsApi';
|
|
|
13
14
|
export * from './QuizzesApi';
|
|
14
15
|
export * from './ServiceTokensApi';
|
|
15
16
|
export * from './TagsApi';
|
|
17
|
+
export * from './UserContextApi';
|
|
16
18
|
export * from './VotesApi';
|
package/dist/apis/index.js
CHANGED
|
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
/* tslint:disable */
|
|
18
18
|
/* eslint-disable */
|
|
19
19
|
__exportStar(require("./AccountsApi"), exports);
|
|
20
|
+
__exportStar(require("./ChatAnalysisApi"), exports);
|
|
20
21
|
__exportStar(require("./ChatsApi"), exports);
|
|
21
22
|
__exportStar(require("./FeatureOverridesApi"), exports);
|
|
22
23
|
__exportStar(require("./FeaturesApi"), exports);
|
|
@@ -31,4 +32,5 @@ __exportStar(require("./QuizSessionsApi"), exports);
|
|
|
31
32
|
__exportStar(require("./QuizzesApi"), exports);
|
|
32
33
|
__exportStar(require("./ServiceTokensApi"), exports);
|
|
33
34
|
__exportStar(require("./TagsApi"), exports);
|
|
35
|
+
__exportStar(require("./UserContextApi"), exports);
|
|
34
36
|
__exportStar(require("./VotesApi"), exports);
|
|
@@ -0,0 +1,32 @@
|
|
|
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 { ChatAnalysis } from '../models/index';
|
|
14
|
+
export interface GetChatAnalysisRequest {
|
|
15
|
+
chatId: string;
|
|
16
|
+
xUserId: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
export declare class ChatAnalysisApi extends runtime.BaseAPI {
|
|
22
|
+
/**
|
|
23
|
+
* Returns the analysis results for a chat, including subject, concepts, summary, and goal evaluation.
|
|
24
|
+
* Get chat analysis
|
|
25
|
+
*/
|
|
26
|
+
getChatAnalysisRaw(requestParameters: GetChatAnalysisRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChatAnalysis>>;
|
|
27
|
+
/**
|
|
28
|
+
* Returns the analysis results for a chat, including subject, concepts, summary, and goal evaluation.
|
|
29
|
+
* Get chat analysis
|
|
30
|
+
*/
|
|
31
|
+
getChatAnalysis(requestParameters: GetChatAnalysisRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChatAnalysis>;
|
|
32
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Athena API
|
|
5
|
+
* REST API for the Athena system
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import * as runtime from '../runtime';
|
|
24
|
+
import { ChatAnalysisFromJSON, } from '../models/index';
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export class ChatAnalysisApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Returns the analysis results for a chat, including subject, concepts, summary, and goal evaluation.
|
|
31
|
+
* Get chat analysis
|
|
32
|
+
*/
|
|
33
|
+
getChatAnalysisRaw(requestParameters, initOverrides) {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
if (requestParameters['chatId'] == null) {
|
|
36
|
+
throw new runtime.RequiredError('chatId', 'Required parameter "chatId" was null or undefined when calling getChatAnalysis().');
|
|
37
|
+
}
|
|
38
|
+
if (requestParameters['xUserId'] == null) {
|
|
39
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling getChatAnalysis().');
|
|
40
|
+
}
|
|
41
|
+
const queryParameters = {};
|
|
42
|
+
const headerParameters = {};
|
|
43
|
+
if (requestParameters['xUserId'] != null) {
|
|
44
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
45
|
+
}
|
|
46
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
47
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
48
|
+
}
|
|
49
|
+
let urlPath = `/api/v1/chats/{chatId}/analysis`;
|
|
50
|
+
urlPath = urlPath.replace(`{${"chatId"}}`, encodeURIComponent(String(requestParameters['chatId'])));
|
|
51
|
+
const response = yield this.request({
|
|
52
|
+
path: urlPath,
|
|
53
|
+
method: 'GET',
|
|
54
|
+
headers: headerParameters,
|
|
55
|
+
query: queryParameters,
|
|
56
|
+
}, initOverrides);
|
|
57
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ChatAnalysisFromJSON(jsonValue));
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Returns the analysis results for a chat, including subject, concepts, summary, and goal evaluation.
|
|
62
|
+
* Get chat analysis
|
|
63
|
+
*/
|
|
64
|
+
getChatAnalysis(requestParameters, initOverrides) {
|
|
65
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
+
const response = yield this.getChatAnalysisRaw(requestParameters, initOverrides);
|
|
67
|
+
return yield response.value();
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
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 { UpsertUserContextRequest, UserContext } from '../models/index';
|
|
14
|
+
export interface GetUserContextRequest {
|
|
15
|
+
xUserId: string;
|
|
16
|
+
}
|
|
17
|
+
export interface UpsertUserContextOperationRequest {
|
|
18
|
+
xUserId: string;
|
|
19
|
+
upsertUserContextRequest: UpsertUserContextRequest;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
*/
|
|
24
|
+
export declare class UserContextApi extends runtime.BaseAPI {
|
|
25
|
+
/**
|
|
26
|
+
* Returns the personalization context for the authenticated user.
|
|
27
|
+
* Get user context
|
|
28
|
+
*/
|
|
29
|
+
getUserContextRaw(requestParameters: GetUserContextRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserContext>>;
|
|
30
|
+
/**
|
|
31
|
+
* Returns the personalization context for the authenticated user.
|
|
32
|
+
* Get user context
|
|
33
|
+
*/
|
|
34
|
+
getUserContext(requestParameters: GetUserContextRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserContext>;
|
|
35
|
+
/**
|
|
36
|
+
* Creates or updates the personalization context for the authenticated user.
|
|
37
|
+
* Create or update user context
|
|
38
|
+
*/
|
|
39
|
+
upsertUserContextRaw(requestParameters: UpsertUserContextOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserContext>>;
|
|
40
|
+
/**
|
|
41
|
+
* Creates or updates the personalization context for the authenticated user.
|
|
42
|
+
* Create or update user context
|
|
43
|
+
*/
|
|
44
|
+
upsertUserContext(requestParameters: UpsertUserContextOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserContext>;
|
|
45
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Athena API
|
|
5
|
+
* REST API for the Athena system
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import * as runtime from '../runtime';
|
|
24
|
+
import { UpsertUserContextRequestToJSON, UserContextFromJSON, } from '../models/index';
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export class UserContextApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Returns the personalization context for the authenticated user.
|
|
31
|
+
* Get user context
|
|
32
|
+
*/
|
|
33
|
+
getUserContextRaw(requestParameters, initOverrides) {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
if (requestParameters['xUserId'] == null) {
|
|
36
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling getUserContext().');
|
|
37
|
+
}
|
|
38
|
+
const queryParameters = {};
|
|
39
|
+
const headerParameters = {};
|
|
40
|
+
if (requestParameters['xUserId'] != null) {
|
|
41
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
42
|
+
}
|
|
43
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
44
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
45
|
+
}
|
|
46
|
+
let urlPath = `/api/v1/user-context`;
|
|
47
|
+
const response = yield this.request({
|
|
48
|
+
path: urlPath,
|
|
49
|
+
method: 'GET',
|
|
50
|
+
headers: headerParameters,
|
|
51
|
+
query: queryParameters,
|
|
52
|
+
}, initOverrides);
|
|
53
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => UserContextFromJSON(jsonValue));
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Returns the personalization context for the authenticated user.
|
|
58
|
+
* Get user context
|
|
59
|
+
*/
|
|
60
|
+
getUserContext(requestParameters, initOverrides) {
|
|
61
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
62
|
+
const response = yield this.getUserContextRaw(requestParameters, initOverrides);
|
|
63
|
+
return yield response.value();
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Creates or updates the personalization context for the authenticated user.
|
|
68
|
+
* Create or update user context
|
|
69
|
+
*/
|
|
70
|
+
upsertUserContextRaw(requestParameters, initOverrides) {
|
|
71
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
72
|
+
if (requestParameters['xUserId'] == null) {
|
|
73
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling upsertUserContext().');
|
|
74
|
+
}
|
|
75
|
+
if (requestParameters['upsertUserContextRequest'] == null) {
|
|
76
|
+
throw new runtime.RequiredError('upsertUserContextRequest', 'Required parameter "upsertUserContextRequest" was null or undefined when calling upsertUserContext().');
|
|
77
|
+
}
|
|
78
|
+
const queryParameters = {};
|
|
79
|
+
const headerParameters = {};
|
|
80
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
81
|
+
if (requestParameters['xUserId'] != null) {
|
|
82
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
83
|
+
}
|
|
84
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
85
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
86
|
+
}
|
|
87
|
+
let urlPath = `/api/v1/user-context`;
|
|
88
|
+
const response = yield this.request({
|
|
89
|
+
path: urlPath,
|
|
90
|
+
method: 'PUT',
|
|
91
|
+
headers: headerParameters,
|
|
92
|
+
query: queryParameters,
|
|
93
|
+
body: UpsertUserContextRequestToJSON(requestParameters['upsertUserContextRequest']),
|
|
94
|
+
}, initOverrides);
|
|
95
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => UserContextFromJSON(jsonValue));
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Creates or updates the personalization context for the authenticated user.
|
|
100
|
+
* Create or update user context
|
|
101
|
+
*/
|
|
102
|
+
upsertUserContext(requestParameters, initOverrides) {
|
|
103
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
104
|
+
const response = yield this.upsertUserContextRaw(requestParameters, initOverrides);
|
|
105
|
+
return yield response.value();
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
}
|
package/dist/esm/apis/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './AccountsApi';
|
|
2
|
+
export * from './ChatAnalysisApi';
|
|
2
3
|
export * from './ChatsApi';
|
|
3
4
|
export * from './FeatureOverridesApi';
|
|
4
5
|
export * from './FeaturesApi';
|
|
@@ -13,4 +14,5 @@ export * from './QuizSessionsApi';
|
|
|
13
14
|
export * from './QuizzesApi';
|
|
14
15
|
export * from './ServiceTokensApi';
|
|
15
16
|
export * from './TagsApi';
|
|
17
|
+
export * from './UserContextApi';
|
|
16
18
|
export * from './VotesApi';
|
package/dist/esm/apis/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export * from './AccountsApi';
|
|
4
|
+
export * from './ChatAnalysisApi';
|
|
4
5
|
export * from './ChatsApi';
|
|
5
6
|
export * from './FeatureOverridesApi';
|
|
6
7
|
export * from './FeaturesApi';
|
|
@@ -15,4 +16,5 @@ export * from './QuizSessionsApi';
|
|
|
15
16
|
export * from './QuizzesApi';
|
|
16
17
|
export * from './ServiceTokensApi';
|
|
17
18
|
export * from './TagsApi';
|
|
19
|
+
export * from './UserContextApi';
|
|
18
20
|
export * from './VotesApi';
|