@instructure/athena-api-client 1.0.11 → 1.0.13-rc.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 +18 -0
- package/dist/apis/AdminApi.d.ts +92 -0
- package/dist/apis/AdminApi.js +271 -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 +3 -0
- package/dist/apis/index.js +3 -0
- package/dist/esm/apis/AdminApi.d.ts +92 -0
- package/dist/esm/apis/AdminApi.js +267 -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 +3 -0
- package/dist/esm/apis/index.js +3 -0
- package/dist/esm/models/AdminChat.d.ts +112 -0
- package/dist/esm/models/AdminChat.js +98 -0
- package/dist/esm/models/AdminChatAnalysis.d.ts +68 -0
- package/dist/esm/models/AdminChatAnalysis.js +67 -0
- package/dist/esm/models/AdminChatWithStats.d.ts +62 -0
- package/dist/esm/models/AdminChatWithStats.js +63 -0
- package/dist/esm/models/AdminPaginatedChats.d.ts +39 -0
- package/dist/esm/models/AdminPaginatedChats.js +48 -0
- package/dist/esm/models/AdminStreak.d.ts +62 -0
- package/dist/esm/models/AdminStreak.js +63 -0
- package/dist/esm/models/AdminUserEngagement.d.ts +38 -0
- package/dist/esm/models/AdminUserEngagement.js +47 -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 +9 -0
- package/dist/esm/models/index.js +9 -0
- package/dist/models/AdminChat.d.ts +112 -0
- package/dist/models/AdminChat.js +106 -0
- package/dist/models/AdminChatAnalysis.d.ts +68 -0
- package/dist/models/AdminChatAnalysis.js +74 -0
- package/dist/models/AdminChatWithStats.d.ts +62 -0
- package/dist/models/AdminChatWithStats.js +70 -0
- package/dist/models/AdminPaginatedChats.d.ts +39 -0
- package/dist/models/AdminPaginatedChats.js +55 -0
- package/dist/models/AdminStreak.d.ts +62 -0
- package/dist/models/AdminStreak.js +70 -0
- package/dist/models/AdminUserEngagement.d.ts +38 -0
- package/dist/models/AdminUserEngagement.js +54 -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 +9 -0
- package/dist/models/index.js +9 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -57,6 +57,13 @@ 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
|
+
*AdminApi* | [**adminGetChat**](docs/AdminApi.md#admingetchat) | **GET** /api/v1/admin/chats/{chatId} | Get any chat by ID within the account
|
|
61
|
+
*AdminApi* | [**adminGetChatAnalysis**](docs/AdminApi.md#admingetchatanalysis) | **GET** /api/v1/admin/chats/{chatId}/analysis | Get chat analysis for any chat within the account
|
|
62
|
+
*AdminApi* | [**adminGetUserChats**](docs/AdminApi.md#admingetuserchats) | **GET** /api/v1/admin/users/{externalId}/chats | Get chats with stats for a user
|
|
63
|
+
*AdminApi* | [**adminGetUserEngagement**](docs/AdminApi.md#admingetuserengagement) | **GET** /api/v1/admin/users/{externalId}/engagement | Get engagement dates for a user
|
|
64
|
+
*AdminApi* | [**adminListChats**](docs/AdminApi.md#adminlistchats) | **GET** /api/v1/admin/chats | List recent chats across all account users
|
|
65
|
+
*AdminApi* | [**adminListTopStreaks**](docs/AdminApi.md#adminlisttopstreaks) | **GET** /api/v1/admin/streaks | List top N streaks across the account
|
|
66
|
+
*ChatAnalysisApi* | [**getChatAnalysis**](docs/ChatAnalysisApi.md#getchatanalysis) | **GET** /api/v1/chats/{chatId}/analysis | Get chat analysis
|
|
60
67
|
*ChatsApi* | [**createChat**](docs/ChatsApi.md#createchatoperation) | **POST** /api/v1/chats | Create a chat
|
|
61
68
|
*ChatsApi* | [**deleteChat**](docs/ChatsApi.md#deletechat) | **DELETE** /api/v1/chats/{chatId} | Delete a chat
|
|
62
69
|
*ChatsApi* | [**getChat**](docs/ChatsApi.md#getchat) | **GET** /api/v1/chats/{chatId} | Get a chat
|
|
@@ -98,6 +105,8 @@ All URIs are relative to *http://localhost:3000*
|
|
|
98
105
|
*ServiceTokensApi* | [**listServiceTokens**](docs/ServiceTokensApi.md#listservicetokens) | **GET** /api/v1/tokens | List all service tokens
|
|
99
106
|
*ServiceTokensApi* | [**updateServiceToken**](docs/ServiceTokensApi.md#updateservicetoken) | **PATCH** /api/v1/tokens/{id} | Update service token status
|
|
100
107
|
*TagsApi* | [**listTags**](docs/TagsApi.md#listtags) | **GET** /api/v1/tags | List all tags
|
|
108
|
+
*UserContextApi* | [**getUserContext**](docs/UserContextApi.md#getusercontext) | **GET** /api/v1/user-context | Get user context
|
|
109
|
+
*UserContextApi* | [**upsertUserContext**](docs/UserContextApi.md#upsertusercontextoperation) | **PUT** /api/v1/user-context | Create or update user context
|
|
101
110
|
*VotesApi* | [**listChatVotes**](docs/VotesApi.md#listchatvotes) | **GET** /api/v1/chats/{chatId}/votes | List votes for a chat
|
|
102
111
|
*VotesApi* | [**upsertChatVote**](docs/VotesApi.md#upsertchatvote) | **PATCH** /api/v1/chats/{chatId}/votes | Create or update a vote
|
|
103
112
|
|
|
@@ -105,7 +114,14 @@ All URIs are relative to *http://localhost:3000*
|
|
|
105
114
|
### Models
|
|
106
115
|
|
|
107
116
|
- [Account](docs/Account.md)
|
|
117
|
+
- [AdminChat](docs/AdminChat.md)
|
|
118
|
+
- [AdminChatAnalysis](docs/AdminChatAnalysis.md)
|
|
119
|
+
- [AdminChatWithStats](docs/AdminChatWithStats.md)
|
|
120
|
+
- [AdminPaginatedChats](docs/AdminPaginatedChats.md)
|
|
121
|
+
- [AdminStreak](docs/AdminStreak.md)
|
|
122
|
+
- [AdminUserEngagement](docs/AdminUserEngagement.md)
|
|
108
123
|
- [Chat](docs/Chat.md)
|
|
124
|
+
- [ChatAnalysis](docs/ChatAnalysis.md)
|
|
109
125
|
- [ChatRequest](docs/ChatRequest.md)
|
|
110
126
|
- [ChatRequestAttachmentsInner](docs/ChatRequestAttachmentsInner.md)
|
|
111
127
|
- [CreateAccountRequest](docs/CreateAccountRequest.md)
|
|
@@ -154,7 +170,9 @@ All URIs are relative to *http://localhost:3000*
|
|
|
154
170
|
- [UploadUrlRequestFilesInner](docs/UploadUrlRequestFilesInner.md)
|
|
155
171
|
- [UploadUrlResponse](docs/UploadUrlResponse.md)
|
|
156
172
|
- [UpsertOverrideDto](docs/UpsertOverrideDto.md)
|
|
173
|
+
- [UpsertUserContextRequest](docs/UpsertUserContextRequest.md)
|
|
157
174
|
- [UpsertVoteRequest](docs/UpsertVoteRequest.md)
|
|
175
|
+
- [UserContext](docs/UserContext.md)
|
|
158
176
|
- [Vote](docs/Vote.md)
|
|
159
177
|
- [VotesResponse](docs/VotesResponse.md)
|
|
160
178
|
|
|
@@ -0,0 +1,92 @@
|
|
|
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 { AdminChat, AdminChatAnalysis, AdminChatWithStats, AdminPaginatedChats, AdminStreak, AdminUserEngagement } from '../models/index';
|
|
14
|
+
export interface AdminGetChatRequest {
|
|
15
|
+
xUserId: string;
|
|
16
|
+
chatId: string;
|
|
17
|
+
}
|
|
18
|
+
export interface AdminGetChatAnalysisRequest {
|
|
19
|
+
xUserId: string;
|
|
20
|
+
chatId: string;
|
|
21
|
+
}
|
|
22
|
+
export interface AdminGetUserChatsRequest {
|
|
23
|
+
xUserId: string;
|
|
24
|
+
externalId: string;
|
|
25
|
+
}
|
|
26
|
+
export interface AdminGetUserEngagementRequest {
|
|
27
|
+
xUserId: string;
|
|
28
|
+
externalId: string;
|
|
29
|
+
}
|
|
30
|
+
export interface AdminListChatsRequest {
|
|
31
|
+
xUserId: string;
|
|
32
|
+
limit?: number;
|
|
33
|
+
cursor?: string;
|
|
34
|
+
chatType?: string;
|
|
35
|
+
}
|
|
36
|
+
export interface AdminListTopStreaksRequest {
|
|
37
|
+
xUserId: string;
|
|
38
|
+
limit?: number;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
*/
|
|
43
|
+
export declare class AdminApi extends runtime.BaseAPI {
|
|
44
|
+
/**
|
|
45
|
+
* Get any chat by ID within the account
|
|
46
|
+
*/
|
|
47
|
+
adminGetChatRaw(requestParameters: AdminGetChatRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminChat>>;
|
|
48
|
+
/**
|
|
49
|
+
* Get any chat by ID within the account
|
|
50
|
+
*/
|
|
51
|
+
adminGetChat(requestParameters: AdminGetChatRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminChat>;
|
|
52
|
+
/**
|
|
53
|
+
* Get chat analysis for any chat within the account
|
|
54
|
+
*/
|
|
55
|
+
adminGetChatAnalysisRaw(requestParameters: AdminGetChatAnalysisRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminChatAnalysis>>;
|
|
56
|
+
/**
|
|
57
|
+
* Get chat analysis for any chat within the account
|
|
58
|
+
*/
|
|
59
|
+
adminGetChatAnalysis(requestParameters: AdminGetChatAnalysisRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminChatAnalysis>;
|
|
60
|
+
/**
|
|
61
|
+
* Get chats with stats for a user
|
|
62
|
+
*/
|
|
63
|
+
adminGetUserChatsRaw(requestParameters: AdminGetUserChatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<AdminChatWithStats>>>;
|
|
64
|
+
/**
|
|
65
|
+
* Get chats with stats for a user
|
|
66
|
+
*/
|
|
67
|
+
adminGetUserChats(requestParameters: AdminGetUserChatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AdminChatWithStats>>;
|
|
68
|
+
/**
|
|
69
|
+
* Get engagement dates for a user
|
|
70
|
+
*/
|
|
71
|
+
adminGetUserEngagementRaw(requestParameters: AdminGetUserEngagementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminUserEngagement>>;
|
|
72
|
+
/**
|
|
73
|
+
* Get engagement dates for a user
|
|
74
|
+
*/
|
|
75
|
+
adminGetUserEngagement(requestParameters: AdminGetUserEngagementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminUserEngagement>;
|
|
76
|
+
/**
|
|
77
|
+
* List recent chats across all account users
|
|
78
|
+
*/
|
|
79
|
+
adminListChatsRaw(requestParameters: AdminListChatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminPaginatedChats>>;
|
|
80
|
+
/**
|
|
81
|
+
* List recent chats across all account users
|
|
82
|
+
*/
|
|
83
|
+
adminListChats(requestParameters: AdminListChatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminPaginatedChats>;
|
|
84
|
+
/**
|
|
85
|
+
* List top N streaks across the account
|
|
86
|
+
*/
|
|
87
|
+
adminListTopStreaksRaw(requestParameters: AdminListTopStreaksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<AdminStreak>>>;
|
|
88
|
+
/**
|
|
89
|
+
* List top N streaks across the account
|
|
90
|
+
*/
|
|
91
|
+
adminListTopStreaks(requestParameters: AdminListTopStreaksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AdminStreak>>;
|
|
92
|
+
}
|
|
@@ -0,0 +1,271 @@
|
|
|
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.AdminApi = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const index_1 = require("../models/index");
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
class AdminApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Get any chat by ID within the account
|
|
34
|
+
*/
|
|
35
|
+
adminGetChatRaw(requestParameters, initOverrides) {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
if (requestParameters['xUserId'] == null) {
|
|
38
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminGetChat().');
|
|
39
|
+
}
|
|
40
|
+
if (requestParameters['chatId'] == null) {
|
|
41
|
+
throw new runtime.RequiredError('chatId', 'Required parameter "chatId" was null or undefined when calling adminGetChat().');
|
|
42
|
+
}
|
|
43
|
+
const queryParameters = {};
|
|
44
|
+
const headerParameters = {};
|
|
45
|
+
if (requestParameters['xUserId'] != null) {
|
|
46
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
47
|
+
}
|
|
48
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
49
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
50
|
+
}
|
|
51
|
+
let urlPath = `/api/v1/admin/chats/{chatId}`;
|
|
52
|
+
urlPath = urlPath.replace(`{${"chatId"}}`, encodeURIComponent(String(requestParameters['chatId'])));
|
|
53
|
+
const response = yield this.request({
|
|
54
|
+
path: urlPath,
|
|
55
|
+
method: 'GET',
|
|
56
|
+
headers: headerParameters,
|
|
57
|
+
query: queryParameters,
|
|
58
|
+
}, initOverrides);
|
|
59
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminChatFromJSON)(jsonValue));
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Get any chat by ID within the account
|
|
64
|
+
*/
|
|
65
|
+
adminGetChat(requestParameters, initOverrides) {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
67
|
+
const response = yield this.adminGetChatRaw(requestParameters, initOverrides);
|
|
68
|
+
return yield response.value();
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Get chat analysis for any chat within the account
|
|
73
|
+
*/
|
|
74
|
+
adminGetChatAnalysisRaw(requestParameters, initOverrides) {
|
|
75
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
76
|
+
if (requestParameters['xUserId'] == null) {
|
|
77
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminGetChatAnalysis().');
|
|
78
|
+
}
|
|
79
|
+
if (requestParameters['chatId'] == null) {
|
|
80
|
+
throw new runtime.RequiredError('chatId', 'Required parameter "chatId" was null or undefined when calling adminGetChatAnalysis().');
|
|
81
|
+
}
|
|
82
|
+
const queryParameters = {};
|
|
83
|
+
const headerParameters = {};
|
|
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/admin/chats/{chatId}/analysis`;
|
|
91
|
+
urlPath = urlPath.replace(`{${"chatId"}}`, encodeURIComponent(String(requestParameters['chatId'])));
|
|
92
|
+
const response = yield this.request({
|
|
93
|
+
path: urlPath,
|
|
94
|
+
method: 'GET',
|
|
95
|
+
headers: headerParameters,
|
|
96
|
+
query: queryParameters,
|
|
97
|
+
}, initOverrides);
|
|
98
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminChatAnalysisFromJSON)(jsonValue));
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Get chat analysis for any chat within the account
|
|
103
|
+
*/
|
|
104
|
+
adminGetChatAnalysis(requestParameters, initOverrides) {
|
|
105
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
106
|
+
const response = yield this.adminGetChatAnalysisRaw(requestParameters, initOverrides);
|
|
107
|
+
return yield response.value();
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Get chats with stats for a user
|
|
112
|
+
*/
|
|
113
|
+
adminGetUserChatsRaw(requestParameters, initOverrides) {
|
|
114
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
115
|
+
if (requestParameters['xUserId'] == null) {
|
|
116
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminGetUserChats().');
|
|
117
|
+
}
|
|
118
|
+
if (requestParameters['externalId'] == null) {
|
|
119
|
+
throw new runtime.RequiredError('externalId', 'Required parameter "externalId" was null or undefined when calling adminGetUserChats().');
|
|
120
|
+
}
|
|
121
|
+
const queryParameters = {};
|
|
122
|
+
const headerParameters = {};
|
|
123
|
+
if (requestParameters['xUserId'] != null) {
|
|
124
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
125
|
+
}
|
|
126
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
127
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
128
|
+
}
|
|
129
|
+
let urlPath = `/api/v1/admin/users/{externalId}/chats`;
|
|
130
|
+
urlPath = urlPath.replace(`{${"externalId"}}`, encodeURIComponent(String(requestParameters['externalId'])));
|
|
131
|
+
const response = yield this.request({
|
|
132
|
+
path: urlPath,
|
|
133
|
+
method: 'GET',
|
|
134
|
+
headers: headerParameters,
|
|
135
|
+
query: queryParameters,
|
|
136
|
+
}, initOverrides);
|
|
137
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.AdminChatWithStatsFromJSON));
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Get chats with stats for a user
|
|
142
|
+
*/
|
|
143
|
+
adminGetUserChats(requestParameters, initOverrides) {
|
|
144
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
145
|
+
const response = yield this.adminGetUserChatsRaw(requestParameters, initOverrides);
|
|
146
|
+
return yield response.value();
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Get engagement dates for a user
|
|
151
|
+
*/
|
|
152
|
+
adminGetUserEngagementRaw(requestParameters, initOverrides) {
|
|
153
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
154
|
+
if (requestParameters['xUserId'] == null) {
|
|
155
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminGetUserEngagement().');
|
|
156
|
+
}
|
|
157
|
+
if (requestParameters['externalId'] == null) {
|
|
158
|
+
throw new runtime.RequiredError('externalId', 'Required parameter "externalId" was null or undefined when calling adminGetUserEngagement().');
|
|
159
|
+
}
|
|
160
|
+
const queryParameters = {};
|
|
161
|
+
const headerParameters = {};
|
|
162
|
+
if (requestParameters['xUserId'] != null) {
|
|
163
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
164
|
+
}
|
|
165
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
166
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
167
|
+
}
|
|
168
|
+
let urlPath = `/api/v1/admin/users/{externalId}/engagement`;
|
|
169
|
+
urlPath = urlPath.replace(`{${"externalId"}}`, encodeURIComponent(String(requestParameters['externalId'])));
|
|
170
|
+
const response = yield this.request({
|
|
171
|
+
path: urlPath,
|
|
172
|
+
method: 'GET',
|
|
173
|
+
headers: headerParameters,
|
|
174
|
+
query: queryParameters,
|
|
175
|
+
}, initOverrides);
|
|
176
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminUserEngagementFromJSON)(jsonValue));
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Get engagement dates for a user
|
|
181
|
+
*/
|
|
182
|
+
adminGetUserEngagement(requestParameters, initOverrides) {
|
|
183
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
184
|
+
const response = yield this.adminGetUserEngagementRaw(requestParameters, initOverrides);
|
|
185
|
+
return yield response.value();
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* List recent chats across all account users
|
|
190
|
+
*/
|
|
191
|
+
adminListChatsRaw(requestParameters, initOverrides) {
|
|
192
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
193
|
+
if (requestParameters['xUserId'] == null) {
|
|
194
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminListChats().');
|
|
195
|
+
}
|
|
196
|
+
const queryParameters = {};
|
|
197
|
+
if (requestParameters['limit'] != null) {
|
|
198
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
199
|
+
}
|
|
200
|
+
if (requestParameters['cursor'] != null) {
|
|
201
|
+
queryParameters['cursor'] = requestParameters['cursor'];
|
|
202
|
+
}
|
|
203
|
+
if (requestParameters['chatType'] != null) {
|
|
204
|
+
queryParameters['chatType'] = requestParameters['chatType'];
|
|
205
|
+
}
|
|
206
|
+
const headerParameters = {};
|
|
207
|
+
if (requestParameters['xUserId'] != null) {
|
|
208
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
209
|
+
}
|
|
210
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
211
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
212
|
+
}
|
|
213
|
+
let urlPath = `/api/v1/admin/chats`;
|
|
214
|
+
const response = yield this.request({
|
|
215
|
+
path: urlPath,
|
|
216
|
+
method: 'GET',
|
|
217
|
+
headers: headerParameters,
|
|
218
|
+
query: queryParameters,
|
|
219
|
+
}, initOverrides);
|
|
220
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AdminPaginatedChatsFromJSON)(jsonValue));
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* List recent chats across all account users
|
|
225
|
+
*/
|
|
226
|
+
adminListChats(requestParameters, initOverrides) {
|
|
227
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
228
|
+
const response = yield this.adminListChatsRaw(requestParameters, initOverrides);
|
|
229
|
+
return yield response.value();
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* List top N streaks across the account
|
|
234
|
+
*/
|
|
235
|
+
adminListTopStreaksRaw(requestParameters, initOverrides) {
|
|
236
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
237
|
+
if (requestParameters['xUserId'] == null) {
|
|
238
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminListTopStreaks().');
|
|
239
|
+
}
|
|
240
|
+
const queryParameters = {};
|
|
241
|
+
if (requestParameters['limit'] != null) {
|
|
242
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
243
|
+
}
|
|
244
|
+
const headerParameters = {};
|
|
245
|
+
if (requestParameters['xUserId'] != null) {
|
|
246
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
247
|
+
}
|
|
248
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
249
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
250
|
+
}
|
|
251
|
+
let urlPath = `/api/v1/admin/streaks`;
|
|
252
|
+
const response = yield this.request({
|
|
253
|
+
path: urlPath,
|
|
254
|
+
method: 'GET',
|
|
255
|
+
headers: headerParameters,
|
|
256
|
+
query: queryParameters,
|
|
257
|
+
}, initOverrides);
|
|
258
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.AdminStreakFromJSON));
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* List top N streaks across the account
|
|
263
|
+
*/
|
|
264
|
+
adminListTopStreaks(requestParameters, initOverrides) {
|
|
265
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
266
|
+
const response = yield this.adminListTopStreaksRaw(requestParameters, initOverrides);
|
|
267
|
+
return yield response.value();
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
exports.AdminApi = AdminApi;
|
|
@@ -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
|
+
}
|