@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.
Files changed (58) hide show
  1. package/README.md +18 -0
  2. package/dist/apis/AdminApi.d.ts +92 -0
  3. package/dist/apis/AdminApi.js +271 -0
  4. package/dist/apis/ChatAnalysisApi.d.ts +32 -0
  5. package/dist/apis/ChatAnalysisApi.js +74 -0
  6. package/dist/apis/UserContextApi.d.ts +45 -0
  7. package/dist/apis/UserContextApi.js +112 -0
  8. package/dist/apis/index.d.ts +3 -0
  9. package/dist/apis/index.js +3 -0
  10. package/dist/esm/apis/AdminApi.d.ts +92 -0
  11. package/dist/esm/apis/AdminApi.js +267 -0
  12. package/dist/esm/apis/ChatAnalysisApi.d.ts +32 -0
  13. package/dist/esm/apis/ChatAnalysisApi.js +70 -0
  14. package/dist/esm/apis/UserContextApi.d.ts +45 -0
  15. package/dist/esm/apis/UserContextApi.js +108 -0
  16. package/dist/esm/apis/index.d.ts +3 -0
  17. package/dist/esm/apis/index.js +3 -0
  18. package/dist/esm/models/AdminChat.d.ts +112 -0
  19. package/dist/esm/models/AdminChat.js +98 -0
  20. package/dist/esm/models/AdminChatAnalysis.d.ts +68 -0
  21. package/dist/esm/models/AdminChatAnalysis.js +67 -0
  22. package/dist/esm/models/AdminChatWithStats.d.ts +62 -0
  23. package/dist/esm/models/AdminChatWithStats.js +63 -0
  24. package/dist/esm/models/AdminPaginatedChats.d.ts +39 -0
  25. package/dist/esm/models/AdminPaginatedChats.js +48 -0
  26. package/dist/esm/models/AdminStreak.d.ts +62 -0
  27. package/dist/esm/models/AdminStreak.js +63 -0
  28. package/dist/esm/models/AdminUserEngagement.d.ts +38 -0
  29. package/dist/esm/models/AdminUserEngagement.js +47 -0
  30. package/dist/esm/models/ChatAnalysis.d.ts +68 -0
  31. package/dist/esm/models/ChatAnalysis.js +67 -0
  32. package/dist/esm/models/UpsertUserContextRequest.d.ts +56 -0
  33. package/dist/esm/models/UpsertUserContextRequest.js +49 -0
  34. package/dist/esm/models/UserContext.d.ts +80 -0
  35. package/dist/esm/models/UserContext.js +75 -0
  36. package/dist/esm/models/index.d.ts +9 -0
  37. package/dist/esm/models/index.js +9 -0
  38. package/dist/models/AdminChat.d.ts +112 -0
  39. package/dist/models/AdminChat.js +106 -0
  40. package/dist/models/AdminChatAnalysis.d.ts +68 -0
  41. package/dist/models/AdminChatAnalysis.js +74 -0
  42. package/dist/models/AdminChatWithStats.d.ts +62 -0
  43. package/dist/models/AdminChatWithStats.js +70 -0
  44. package/dist/models/AdminPaginatedChats.d.ts +39 -0
  45. package/dist/models/AdminPaginatedChats.js +55 -0
  46. package/dist/models/AdminStreak.d.ts +62 -0
  47. package/dist/models/AdminStreak.js +70 -0
  48. package/dist/models/AdminUserEngagement.d.ts +38 -0
  49. package/dist/models/AdminUserEngagement.js +54 -0
  50. package/dist/models/ChatAnalysis.d.ts +68 -0
  51. package/dist/models/ChatAnalysis.js +74 -0
  52. package/dist/models/UpsertUserContextRequest.d.ts +56 -0
  53. package/dist/models/UpsertUserContextRequest.js +56 -0
  54. package/dist/models/UserContext.d.ts +80 -0
  55. package/dist/models/UserContext.js +82 -0
  56. package/dist/models/index.d.ts +9 -0
  57. package/dist/models/index.js +9 -0
  58. package/package.json +1 -1
@@ -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;
@@ -1,4 +1,6 @@
1
1
  export * from './AccountsApi';
2
+ export * from './AdminApi';
3
+ export * from './ChatAnalysisApi';
2
4
  export * from './ChatsApi';
3
5
  export * from './FeatureOverridesApi';
4
6
  export * from './FeaturesApi';
@@ -13,4 +15,5 @@ export * from './QuizSessionsApi';
13
15
  export * from './QuizzesApi';
14
16
  export * from './ServiceTokensApi';
15
17
  export * from './TagsApi';
18
+ export * from './UserContextApi';
16
19
  export * from './VotesApi';
@@ -17,6 +17,8 @@ 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);
21
+ __exportStar(require("./ChatAnalysisApi"), exports);
20
22
  __exportStar(require("./ChatsApi"), exports);
21
23
  __exportStar(require("./FeatureOverridesApi"), exports);
22
24
  __exportStar(require("./FeaturesApi"), exports);
@@ -31,4 +33,5 @@ __exportStar(require("./QuizSessionsApi"), exports);
31
33
  __exportStar(require("./QuizzesApi"), exports);
32
34
  __exportStar(require("./ServiceTokensApi"), exports);
33
35
  __exportStar(require("./TagsApi"), exports);
36
+ __exportStar(require("./UserContextApi"), exports);
34
37
  __exportStar(require("./VotesApi"), 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
+ }
@@ -0,0 +1,267 @@
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 { AdminChatFromJSON, AdminChatAnalysisFromJSON, AdminChatWithStatsFromJSON, AdminPaginatedChatsFromJSON, AdminStreakFromJSON, AdminUserEngagementFromJSON, } from '../models/index';
25
+ /**
26
+ *
27
+ */
28
+ export class AdminApi extends runtime.BaseAPI {
29
+ /**
30
+ * Get any chat by ID within the account
31
+ */
32
+ adminGetChatRaw(requestParameters, initOverrides) {
33
+ return __awaiter(this, void 0, void 0, function* () {
34
+ if (requestParameters['xUserId'] == null) {
35
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminGetChat().');
36
+ }
37
+ if (requestParameters['chatId'] == null) {
38
+ throw new runtime.RequiredError('chatId', 'Required parameter "chatId" was null or undefined when calling adminGetChat().');
39
+ }
40
+ const queryParameters = {};
41
+ const headerParameters = {};
42
+ if (requestParameters['xUserId'] != null) {
43
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
44
+ }
45
+ if (this.configuration && this.configuration.apiKey) {
46
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
47
+ }
48
+ let urlPath = `/api/v1/admin/chats/{chatId}`;
49
+ urlPath = urlPath.replace(`{${"chatId"}}`, encodeURIComponent(String(requestParameters['chatId'])));
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) => AdminChatFromJSON(jsonValue));
57
+ });
58
+ }
59
+ /**
60
+ * Get any chat by ID within the account
61
+ */
62
+ adminGetChat(requestParameters, initOverrides) {
63
+ return __awaiter(this, void 0, void 0, function* () {
64
+ const response = yield this.adminGetChatRaw(requestParameters, initOverrides);
65
+ return yield response.value();
66
+ });
67
+ }
68
+ /**
69
+ * Get chat analysis for any chat within the account
70
+ */
71
+ adminGetChatAnalysisRaw(requestParameters, initOverrides) {
72
+ return __awaiter(this, void 0, void 0, function* () {
73
+ if (requestParameters['xUserId'] == null) {
74
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminGetChatAnalysis().');
75
+ }
76
+ if (requestParameters['chatId'] == null) {
77
+ throw new runtime.RequiredError('chatId', 'Required parameter "chatId" was null or undefined when calling adminGetChatAnalysis().');
78
+ }
79
+ const queryParameters = {};
80
+ const headerParameters = {};
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/admin/chats/{chatId}/analysis`;
88
+ urlPath = urlPath.replace(`{${"chatId"}}`, encodeURIComponent(String(requestParameters['chatId'])));
89
+ const response = yield this.request({
90
+ path: urlPath,
91
+ method: 'GET',
92
+ headers: headerParameters,
93
+ query: queryParameters,
94
+ }, initOverrides);
95
+ return new runtime.JSONApiResponse(response, (jsonValue) => AdminChatAnalysisFromJSON(jsonValue));
96
+ });
97
+ }
98
+ /**
99
+ * Get chat analysis for any chat within the account
100
+ */
101
+ adminGetChatAnalysis(requestParameters, initOverrides) {
102
+ return __awaiter(this, void 0, void 0, function* () {
103
+ const response = yield this.adminGetChatAnalysisRaw(requestParameters, initOverrides);
104
+ return yield response.value();
105
+ });
106
+ }
107
+ /**
108
+ * Get chats with stats for a user
109
+ */
110
+ adminGetUserChatsRaw(requestParameters, initOverrides) {
111
+ return __awaiter(this, void 0, void 0, function* () {
112
+ if (requestParameters['xUserId'] == null) {
113
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminGetUserChats().');
114
+ }
115
+ if (requestParameters['externalId'] == null) {
116
+ throw new runtime.RequiredError('externalId', 'Required parameter "externalId" was null or undefined when calling adminGetUserChats().');
117
+ }
118
+ const queryParameters = {};
119
+ const headerParameters = {};
120
+ if (requestParameters['xUserId'] != null) {
121
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
122
+ }
123
+ if (this.configuration && this.configuration.apiKey) {
124
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
125
+ }
126
+ let urlPath = `/api/v1/admin/users/{externalId}/chats`;
127
+ urlPath = urlPath.replace(`{${"externalId"}}`, encodeURIComponent(String(requestParameters['externalId'])));
128
+ const response = yield this.request({
129
+ path: urlPath,
130
+ method: 'GET',
131
+ headers: headerParameters,
132
+ query: queryParameters,
133
+ }, initOverrides);
134
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AdminChatWithStatsFromJSON));
135
+ });
136
+ }
137
+ /**
138
+ * Get chats with stats for a user
139
+ */
140
+ adminGetUserChats(requestParameters, initOverrides) {
141
+ return __awaiter(this, void 0, void 0, function* () {
142
+ const response = yield this.adminGetUserChatsRaw(requestParameters, initOverrides);
143
+ return yield response.value();
144
+ });
145
+ }
146
+ /**
147
+ * Get engagement dates for a user
148
+ */
149
+ adminGetUserEngagementRaw(requestParameters, initOverrides) {
150
+ return __awaiter(this, void 0, void 0, function* () {
151
+ if (requestParameters['xUserId'] == null) {
152
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminGetUserEngagement().');
153
+ }
154
+ if (requestParameters['externalId'] == null) {
155
+ throw new runtime.RequiredError('externalId', 'Required parameter "externalId" was null or undefined when calling adminGetUserEngagement().');
156
+ }
157
+ const queryParameters = {};
158
+ const headerParameters = {};
159
+ if (requestParameters['xUserId'] != null) {
160
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
161
+ }
162
+ if (this.configuration && this.configuration.apiKey) {
163
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
164
+ }
165
+ let urlPath = `/api/v1/admin/users/{externalId}/engagement`;
166
+ urlPath = urlPath.replace(`{${"externalId"}}`, encodeURIComponent(String(requestParameters['externalId'])));
167
+ const response = yield this.request({
168
+ path: urlPath,
169
+ method: 'GET',
170
+ headers: headerParameters,
171
+ query: queryParameters,
172
+ }, initOverrides);
173
+ return new runtime.JSONApiResponse(response, (jsonValue) => AdminUserEngagementFromJSON(jsonValue));
174
+ });
175
+ }
176
+ /**
177
+ * Get engagement dates for a user
178
+ */
179
+ adminGetUserEngagement(requestParameters, initOverrides) {
180
+ return __awaiter(this, void 0, void 0, function* () {
181
+ const response = yield this.adminGetUserEngagementRaw(requestParameters, initOverrides);
182
+ return yield response.value();
183
+ });
184
+ }
185
+ /**
186
+ * List recent chats across all account users
187
+ */
188
+ adminListChatsRaw(requestParameters, initOverrides) {
189
+ return __awaiter(this, void 0, void 0, function* () {
190
+ if (requestParameters['xUserId'] == null) {
191
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminListChats().');
192
+ }
193
+ const queryParameters = {};
194
+ if (requestParameters['limit'] != null) {
195
+ queryParameters['limit'] = requestParameters['limit'];
196
+ }
197
+ if (requestParameters['cursor'] != null) {
198
+ queryParameters['cursor'] = requestParameters['cursor'];
199
+ }
200
+ if (requestParameters['chatType'] != null) {
201
+ queryParameters['chatType'] = requestParameters['chatType'];
202
+ }
203
+ const headerParameters = {};
204
+ if (requestParameters['xUserId'] != null) {
205
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
206
+ }
207
+ if (this.configuration && this.configuration.apiKey) {
208
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
209
+ }
210
+ let urlPath = `/api/v1/admin/chats`;
211
+ const response = yield this.request({
212
+ path: urlPath,
213
+ method: 'GET',
214
+ headers: headerParameters,
215
+ query: queryParameters,
216
+ }, initOverrides);
217
+ return new runtime.JSONApiResponse(response, (jsonValue) => AdminPaginatedChatsFromJSON(jsonValue));
218
+ });
219
+ }
220
+ /**
221
+ * List recent chats across all account users
222
+ */
223
+ adminListChats(requestParameters, initOverrides) {
224
+ return __awaiter(this, void 0, void 0, function* () {
225
+ const response = yield this.adminListChatsRaw(requestParameters, initOverrides);
226
+ return yield response.value();
227
+ });
228
+ }
229
+ /**
230
+ * List top N streaks across the account
231
+ */
232
+ adminListTopStreaksRaw(requestParameters, initOverrides) {
233
+ return __awaiter(this, void 0, void 0, function* () {
234
+ if (requestParameters['xUserId'] == null) {
235
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminListTopStreaks().');
236
+ }
237
+ const queryParameters = {};
238
+ if (requestParameters['limit'] != null) {
239
+ queryParameters['limit'] = requestParameters['limit'];
240
+ }
241
+ const headerParameters = {};
242
+ if (requestParameters['xUserId'] != null) {
243
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
244
+ }
245
+ if (this.configuration && this.configuration.apiKey) {
246
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
247
+ }
248
+ let urlPath = `/api/v1/admin/streaks`;
249
+ const response = yield this.request({
250
+ path: urlPath,
251
+ method: 'GET',
252
+ headers: headerParameters,
253
+ query: queryParameters,
254
+ }, initOverrides);
255
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AdminStreakFromJSON));
256
+ });
257
+ }
258
+ /**
259
+ * List top N streaks across the account
260
+ */
261
+ adminListTopStreaks(requestParameters, initOverrides) {
262
+ return __awaiter(this, void 0, void 0, function* () {
263
+ const response = yield this.adminListTopStreaksRaw(requestParameters, initOverrides);
264
+ return yield response.value();
265
+ });
266
+ }
267
+ }
@@ -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
+ }