@instructure/athena-api-client 1.0.12 → 1.0.13-rc.1
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 +12 -0
- package/dist/apis/AdminApi.d.ts +92 -0
- package/dist/apis/AdminApi.js +271 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/AdminApi.d.ts +92 -0
- package/dist/esm/apis/AdminApi.js +267 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -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 +68 -0
- package/dist/esm/models/AdminChatWithStats.js +67 -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/index.d.ts +6 -0
- package/dist/esm/models/index.js +6 -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 +68 -0
- package/dist/models/AdminChatWithStats.js +74 -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/index.d.ts +6 -0
- package/dist/models/index.js +6 -0
- package/package.json +28 -28
package/README.md
CHANGED
|
@@ -57,6 +57,12 @@ 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
|
|
60
66
|
*ChatAnalysisApi* | [**getChatAnalysis**](docs/ChatAnalysisApi.md#getchatanalysis) | **GET** /api/v1/chats/{chatId}/analysis | Get chat analysis
|
|
61
67
|
*ChatsApi* | [**createChat**](docs/ChatsApi.md#createchatoperation) | **POST** /api/v1/chats | Create a chat
|
|
62
68
|
*ChatsApi* | [**deleteChat**](docs/ChatsApi.md#deletechat) | **DELETE** /api/v1/chats/{chatId} | Delete a chat
|
|
@@ -108,6 +114,12 @@ All URIs are relative to *http://localhost:3000*
|
|
|
108
114
|
### Models
|
|
109
115
|
|
|
110
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)
|
|
111
123
|
- [Chat](docs/Chat.md)
|
|
112
124
|
- [ChatAnalysis](docs/ChatAnalysis.md)
|
|
113
125
|
- [ChatRequest](docs/ChatRequest.md)
|
|
@@ -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;
|
package/dist/apis/index.d.ts
CHANGED
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("./AdminApi"), exports);
|
|
20
21
|
__exportStar(require("./ChatAnalysisApi"), exports);
|
|
21
22
|
__exportStar(require("./ChatsApi"), exports);
|
|
22
23
|
__exportStar(require("./FeatureOverridesApi"), exports);
|
|
@@ -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
|
+
}
|