@instructure/athena-api-client 2.23.5 → 2.24.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 CHANGED
@@ -60,6 +60,7 @@ All URIs are relative to *http://localhost:3000*
60
60
  *AdminApi* | [**adminGetChat**](docs/AdminApi.md#admingetchat) | **GET** /api/v1/admin/chats/{chatId} | Get any chat by ID within the account
61
61
  *AdminApi* | [**adminGetChatAnalysis**](docs/AdminApi.md#admingetchatanalysis) | **GET** /api/v1/admin/chats/{chatId}/analysis | Get chat analysis for any chat within the account
62
62
  *AdminApi* | [**adminGetCohortStats**](docs/AdminApi.md#admingetcohortstats) | **GET** /api/v1/admin/cohort-stats | Get cohort statistics for users created within a date range
63
+ *AdminApi* | [**adminGetQuizSessionSummary**](docs/AdminApi.md#admingetquizsessionsummary) | **GET** /api/v1/admin/quiz-sessions/{sessionId}/summary | Get quiz session summary for any session within the account
63
64
  *AdminApi* | [**adminGetUserChats**](docs/AdminApi.md#admingetuserchats) | **GET** /api/v1/admin/users/{externalId}/chats | Get chats with stats for a user
64
65
  *AdminApi* | [**adminGetUserEngagement**](docs/AdminApi.md#admingetuserengagement) | **GET** /api/v1/admin/users/{externalId}/engagement | Get engagement dates for a user
65
66
  *AdminApi* | [**adminListActiveStreaks**](docs/AdminApi.md#adminlistactivestreaks) | **GET** /api/v1/admin/streaks/active | List all active streaks (currentDays > 0) across the account, paginated
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { AdminChat, AdminChatAnalysis, AdminChatWithStats, AdminCohortStats, AdminPaginatedActiveStreaks, AdminPaginatedChats, AdminPaginatedTaxonomyEnrollments, AdminStreak, AdminTriggerAnalysisResponse, AdminUpdateChatRequest, AdminUserEngagement } from '../models/index';
13
+ import type { AdminChat, AdminChatAnalysis, AdminChatWithStats, AdminCohortStats, AdminPaginatedActiveStreaks, AdminPaginatedChats, AdminPaginatedTaxonomyEnrollments, AdminStreak, AdminTriggerAnalysisResponse, AdminUpdateChatRequest, AdminUserEngagement, QuizSessionSummary } from '../models/index';
14
14
  export interface AdminGetChatRequest {
15
15
  xUserId: string;
16
16
  chatId: string;
@@ -24,6 +24,10 @@ export interface AdminGetCohortStatsRequest {
24
24
  since: Date;
25
25
  until: Date;
26
26
  }
27
+ export interface AdminGetQuizSessionSummaryRequest {
28
+ xUserId: string;
29
+ sessionId: string;
30
+ }
27
31
  export interface AdminGetUserChatsRequest {
28
32
  xUserId: string;
29
33
  externalId: string;
@@ -90,6 +94,16 @@ export declare class AdminApi extends runtime.BaseAPI {
90
94
  * Get cohort statistics for users created within a date range
91
95
  */
92
96
  adminGetCohortStats(requestParameters: AdminGetCohortStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminCohortStats>;
97
+ /**
98
+ * Returns the session summary (quiz details, questions, responses, score) for any quiz session belonging to a user within the caller\'s account. Intended for admin-style views in calling applications; authorization on whether the calling user is allowed to act as an admin is the calling application\'s responsibility - this endpoint only enforces account isolation. Unlike the per-user `getQuizSessionSummary` endpoint, this endpoint does not gate on the `enhanced-quizzing` feature flag; an admin can read any historical session in their account regardless of whether the chat owner currently has the feature.
99
+ * Get quiz session summary for any session within the account
100
+ */
101
+ adminGetQuizSessionSummaryRaw(requestParameters: AdminGetQuizSessionSummaryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<QuizSessionSummary>>;
102
+ /**
103
+ * Returns the session summary (quiz details, questions, responses, score) for any quiz session belonging to a user within the caller\'s account. Intended for admin-style views in calling applications; authorization on whether the calling user is allowed to act as an admin is the calling application\'s responsibility - this endpoint only enforces account isolation. Unlike the per-user `getQuizSessionSummary` endpoint, this endpoint does not gate on the `enhanced-quizzing` feature flag; an admin can read any historical session in their account regardless of whether the chat owner currently has the feature.
104
+ * Get quiz session summary for any session within the account
105
+ */
106
+ adminGetQuizSessionSummary(requestParameters: AdminGetQuizSessionSummaryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<QuizSessionSummary>;
93
107
  /**
94
108
  * Get chats with stats for a user
95
109
  */
@@ -154,6 +154,47 @@ class AdminApi extends runtime.BaseAPI {
154
154
  return yield response.value();
155
155
  });
156
156
  }
157
+ /**
158
+ * Returns the session summary (quiz details, questions, responses, score) for any quiz session belonging to a user within the caller\'s account. Intended for admin-style views in calling applications; authorization on whether the calling user is allowed to act as an admin is the calling application\'s responsibility - this endpoint only enforces account isolation. Unlike the per-user `getQuizSessionSummary` endpoint, this endpoint does not gate on the `enhanced-quizzing` feature flag; an admin can read any historical session in their account regardless of whether the chat owner currently has the feature.
159
+ * Get quiz session summary for any session within the account
160
+ */
161
+ adminGetQuizSessionSummaryRaw(requestParameters, initOverrides) {
162
+ return __awaiter(this, void 0, void 0, function* () {
163
+ if (requestParameters['xUserId'] == null) {
164
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminGetQuizSessionSummary().');
165
+ }
166
+ if (requestParameters['sessionId'] == null) {
167
+ throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling adminGetQuizSessionSummary().');
168
+ }
169
+ const queryParameters = {};
170
+ const headerParameters = {};
171
+ if (requestParameters['xUserId'] != null) {
172
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
173
+ }
174
+ if (this.configuration && this.configuration.apiKey) {
175
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
176
+ }
177
+ let urlPath = `/api/v1/admin/quiz-sessions/{sessionId}/summary`;
178
+ urlPath = urlPath.replace(`{${"sessionId"}}`, encodeURIComponent(String(requestParameters['sessionId'])));
179
+ const response = yield this.request({
180
+ path: urlPath,
181
+ method: 'GET',
182
+ headers: headerParameters,
183
+ query: queryParameters,
184
+ }, initOverrides);
185
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.QuizSessionSummaryFromJSON)(jsonValue));
186
+ });
187
+ }
188
+ /**
189
+ * Returns the session summary (quiz details, questions, responses, score) for any quiz session belonging to a user within the caller\'s account. Intended for admin-style views in calling applications; authorization on whether the calling user is allowed to act as an admin is the calling application\'s responsibility - this endpoint only enforces account isolation. Unlike the per-user `getQuizSessionSummary` endpoint, this endpoint does not gate on the `enhanced-quizzing` feature flag; an admin can read any historical session in their account regardless of whether the chat owner currently has the feature.
190
+ * Get quiz session summary for any session within the account
191
+ */
192
+ adminGetQuizSessionSummary(requestParameters, initOverrides) {
193
+ return __awaiter(this, void 0, void 0, function* () {
194
+ const response = yield this.adminGetQuizSessionSummaryRaw(requestParameters, initOverrides);
195
+ return yield response.value();
196
+ });
197
+ }
157
198
  /**
158
199
  * Get chats with stats for a user
159
200
  */
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { AdminChat, AdminChatAnalysis, AdminChatWithStats, AdminCohortStats, AdminPaginatedActiveStreaks, AdminPaginatedChats, AdminPaginatedTaxonomyEnrollments, AdminStreak, AdminTriggerAnalysisResponse, AdminUpdateChatRequest, AdminUserEngagement } from '../models/index';
13
+ import type { AdminChat, AdminChatAnalysis, AdminChatWithStats, AdminCohortStats, AdminPaginatedActiveStreaks, AdminPaginatedChats, AdminPaginatedTaxonomyEnrollments, AdminStreak, AdminTriggerAnalysisResponse, AdminUpdateChatRequest, AdminUserEngagement, QuizSessionSummary } from '../models/index';
14
14
  export interface AdminGetChatRequest {
15
15
  xUserId: string;
16
16
  chatId: string;
@@ -24,6 +24,10 @@ export interface AdminGetCohortStatsRequest {
24
24
  since: Date;
25
25
  until: Date;
26
26
  }
27
+ export interface AdminGetQuizSessionSummaryRequest {
28
+ xUserId: string;
29
+ sessionId: string;
30
+ }
27
31
  export interface AdminGetUserChatsRequest {
28
32
  xUserId: string;
29
33
  externalId: string;
@@ -90,6 +94,16 @@ export declare class AdminApi extends runtime.BaseAPI {
90
94
  * Get cohort statistics for users created within a date range
91
95
  */
92
96
  adminGetCohortStats(requestParameters: AdminGetCohortStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminCohortStats>;
97
+ /**
98
+ * Returns the session summary (quiz details, questions, responses, score) for any quiz session belonging to a user within the caller\'s account. Intended for admin-style views in calling applications; authorization on whether the calling user is allowed to act as an admin is the calling application\'s responsibility - this endpoint only enforces account isolation. Unlike the per-user `getQuizSessionSummary` endpoint, this endpoint does not gate on the `enhanced-quizzing` feature flag; an admin can read any historical session in their account regardless of whether the chat owner currently has the feature.
99
+ * Get quiz session summary for any session within the account
100
+ */
101
+ adminGetQuizSessionSummaryRaw(requestParameters: AdminGetQuizSessionSummaryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<QuizSessionSummary>>;
102
+ /**
103
+ * Returns the session summary (quiz details, questions, responses, score) for any quiz session belonging to a user within the caller\'s account. Intended for admin-style views in calling applications; authorization on whether the calling user is allowed to act as an admin is the calling application\'s responsibility - this endpoint only enforces account isolation. Unlike the per-user `getQuizSessionSummary` endpoint, this endpoint does not gate on the `enhanced-quizzing` feature flag; an admin can read any historical session in their account regardless of whether the chat owner currently has the feature.
104
+ * Get quiz session summary for any session within the account
105
+ */
106
+ adminGetQuizSessionSummary(requestParameters: AdminGetQuizSessionSummaryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<QuizSessionSummary>;
93
107
  /**
94
108
  * Get chats with stats for a user
95
109
  */
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import * as runtime from '../runtime';
24
- import { AdminChatFromJSON, AdminChatAnalysisFromJSON, AdminChatWithStatsFromJSON, AdminCohortStatsFromJSON, AdminPaginatedActiveStreaksFromJSON, AdminPaginatedChatsFromJSON, AdminPaginatedTaxonomyEnrollmentsFromJSON, AdminStreakFromJSON, AdminTriggerAnalysisResponseFromJSON, AdminUpdateChatRequestToJSON, AdminUserEngagementFromJSON, } from '../models/index';
24
+ import { AdminChatFromJSON, AdminChatAnalysisFromJSON, AdminChatWithStatsFromJSON, AdminCohortStatsFromJSON, AdminPaginatedActiveStreaksFromJSON, AdminPaginatedChatsFromJSON, AdminPaginatedTaxonomyEnrollmentsFromJSON, AdminStreakFromJSON, AdminTriggerAnalysisResponseFromJSON, AdminUpdateChatRequestToJSON, AdminUserEngagementFromJSON, QuizSessionSummaryFromJSON, } from '../models/index';
25
25
  /**
26
26
  *
27
27
  */
@@ -151,6 +151,47 @@ export class AdminApi extends runtime.BaseAPI {
151
151
  return yield response.value();
152
152
  });
153
153
  }
154
+ /**
155
+ * Returns the session summary (quiz details, questions, responses, score) for any quiz session belonging to a user within the caller\'s account. Intended for admin-style views in calling applications; authorization on whether the calling user is allowed to act as an admin is the calling application\'s responsibility - this endpoint only enforces account isolation. Unlike the per-user `getQuizSessionSummary` endpoint, this endpoint does not gate on the `enhanced-quizzing` feature flag; an admin can read any historical session in their account regardless of whether the chat owner currently has the feature.
156
+ * Get quiz session summary for any session within the account
157
+ */
158
+ adminGetQuizSessionSummaryRaw(requestParameters, initOverrides) {
159
+ return __awaiter(this, void 0, void 0, function* () {
160
+ if (requestParameters['xUserId'] == null) {
161
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminGetQuizSessionSummary().');
162
+ }
163
+ if (requestParameters['sessionId'] == null) {
164
+ throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling adminGetQuizSessionSummary().');
165
+ }
166
+ const queryParameters = {};
167
+ const headerParameters = {};
168
+ if (requestParameters['xUserId'] != null) {
169
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
170
+ }
171
+ if (this.configuration && this.configuration.apiKey) {
172
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
173
+ }
174
+ let urlPath = `/api/v1/admin/quiz-sessions/{sessionId}/summary`;
175
+ urlPath = urlPath.replace(`{${"sessionId"}}`, encodeURIComponent(String(requestParameters['sessionId'])));
176
+ const response = yield this.request({
177
+ path: urlPath,
178
+ method: 'GET',
179
+ headers: headerParameters,
180
+ query: queryParameters,
181
+ }, initOverrides);
182
+ return new runtime.JSONApiResponse(response, (jsonValue) => QuizSessionSummaryFromJSON(jsonValue));
183
+ });
184
+ }
185
+ /**
186
+ * Returns the session summary (quiz details, questions, responses, score) for any quiz session belonging to a user within the caller\'s account. Intended for admin-style views in calling applications; authorization on whether the calling user is allowed to act as an admin is the calling application\'s responsibility - this endpoint only enforces account isolation. Unlike the per-user `getQuizSessionSummary` endpoint, this endpoint does not gate on the `enhanced-quizzing` feature flag; an admin can read any historical session in their account regardless of whether the chat owner currently has the feature.
187
+ * Get quiz session summary for any session within the account
188
+ */
189
+ adminGetQuizSessionSummary(requestParameters, initOverrides) {
190
+ return __awaiter(this, void 0, void 0, function* () {
191
+ const response = yield this.adminGetQuizSessionSummaryRaw(requestParameters, initOverrides);
192
+ return yield response.value();
193
+ });
194
+ }
154
195
  /**
155
196
  * Get chats with stats for a user
156
197
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@instructure/athena-api-client",
3
3
  "private": false,
4
- "version": "2.23.5",
4
+ "version": "2.24.1",
5
5
  "description": "OpenAPI client for the Athena API",
6
6
  "author": "Instructure",
7
7
  "repository": {