@instructure/athena-api-client 1.0.6 → 1.0.8

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 (70) hide show
  1. package/README.md +15 -0
  2. package/dist/apis/QuizSessionsApi.d.ts +76 -0
  3. package/dist/apis/QuizSessionsApi.js +207 -0
  4. package/dist/apis/QuizzesApi.d.ts +32 -0
  5. package/dist/apis/QuizzesApi.js +74 -0
  6. package/dist/apis/index.d.ts +2 -0
  7. package/dist/apis/index.js +2 -0
  8. package/dist/esm/apis/QuizSessionsApi.d.ts +76 -0
  9. package/dist/esm/apis/QuizSessionsApi.js +203 -0
  10. package/dist/esm/apis/QuizzesApi.d.ts +32 -0
  11. package/dist/esm/apis/QuizzesApi.js +70 -0
  12. package/dist/esm/apis/index.d.ts +2 -0
  13. package/dist/esm/apis/index.js +2 -0
  14. package/dist/esm/models/Chat.d.ts +7 -7
  15. package/dist/esm/models/Chat.js +21 -7
  16. package/dist/esm/models/ChatRequestAttachmentsInner.d.ts +6 -0
  17. package/dist/esm/models/ChatRequestAttachmentsInner.js +4 -0
  18. package/dist/esm/models/MessageAttachmentsInner.d.ts +6 -0
  19. package/dist/esm/models/MessageAttachmentsInner.js +4 -0
  20. package/dist/esm/models/Quiz.d.ts +76 -0
  21. package/dist/esm/models/Quiz.js +72 -0
  22. package/dist/esm/models/QuizQuestion.d.ts +103 -0
  23. package/dist/esm/models/QuizQuestion.js +85 -0
  24. package/dist/esm/models/QuizResponse.d.ts +76 -0
  25. package/dist/esm/models/QuizResponse.js +70 -0
  26. package/dist/esm/models/QuizSession.d.ts +71 -0
  27. package/dist/esm/models/QuizSession.js +69 -0
  28. package/dist/esm/models/QuizSessionSummary.d.ts +61 -0
  29. package/dist/esm/models/QuizSessionSummary.js +64 -0
  30. package/dist/esm/models/QuizSessionSummaryScore.d.ts +47 -0
  31. package/dist/esm/models/QuizSessionSummaryScore.js +53 -0
  32. package/dist/esm/models/QuizWithQuestions.d.ts +83 -0
  33. package/dist/esm/models/QuizWithQuestions.js +77 -0
  34. package/dist/esm/models/ScoreByTypeValue.d.ts +38 -0
  35. package/dist/esm/models/ScoreByTypeValue.js +47 -0
  36. package/dist/esm/models/SubmitQuizResponseRequest.d.ts +58 -0
  37. package/dist/esm/models/SubmitQuizResponseRequest.js +58 -0
  38. package/dist/esm/models/UpdateQuizSessionRequest.d.ts +40 -0
  39. package/dist/esm/models/UpdateQuizSessionRequest.js +50 -0
  40. package/dist/esm/models/index.d.ts +10 -0
  41. package/dist/esm/models/index.js +10 -0
  42. package/dist/models/Chat.d.ts +7 -7
  43. package/dist/models/Chat.js +21 -7
  44. package/dist/models/ChatRequestAttachmentsInner.d.ts +6 -0
  45. package/dist/models/ChatRequestAttachmentsInner.js +4 -0
  46. package/dist/models/MessageAttachmentsInner.d.ts +6 -0
  47. package/dist/models/MessageAttachmentsInner.js +4 -0
  48. package/dist/models/Quiz.d.ts +76 -0
  49. package/dist/models/Quiz.js +80 -0
  50. package/dist/models/QuizQuestion.d.ts +103 -0
  51. package/dist/models/QuizQuestion.js +93 -0
  52. package/dist/models/QuizResponse.d.ts +76 -0
  53. package/dist/models/QuizResponse.js +78 -0
  54. package/dist/models/QuizSession.d.ts +71 -0
  55. package/dist/models/QuizSession.js +77 -0
  56. package/dist/models/QuizSessionSummary.d.ts +61 -0
  57. package/dist/models/QuizSessionSummary.js +71 -0
  58. package/dist/models/QuizSessionSummaryScore.d.ts +47 -0
  59. package/dist/models/QuizSessionSummaryScore.js +60 -0
  60. package/dist/models/QuizWithQuestions.d.ts +83 -0
  61. package/dist/models/QuizWithQuestions.js +85 -0
  62. package/dist/models/ScoreByTypeValue.d.ts +38 -0
  63. package/dist/models/ScoreByTypeValue.js +54 -0
  64. package/dist/models/SubmitQuizResponseRequest.d.ts +58 -0
  65. package/dist/models/SubmitQuizResponseRequest.js +66 -0
  66. package/dist/models/UpdateQuizSessionRequest.d.ts +40 -0
  67. package/dist/models/UpdateQuizSessionRequest.js +58 -0
  68. package/dist/models/index.d.ts +10 -0
  69. package/dist/models/index.js +10 -0
  70. package/package.json +1 -1
@@ -0,0 +1,203 @@
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 { QuizResponseFromJSON, QuizSessionFromJSON, QuizSessionSummaryFromJSON, SubmitQuizResponseRequestToJSON, UpdateQuizSessionRequestToJSON, } from '../models/index';
25
+ /**
26
+ *
27
+ */
28
+ export class QuizSessionsApi extends runtime.BaseAPI {
29
+ /**
30
+ * Creates a new session for taking a quiz. Only the quiz owner can create sessions.
31
+ * Create a quiz session
32
+ */
33
+ createQuizSessionRaw(requestParameters, initOverrides) {
34
+ return __awaiter(this, void 0, void 0, function* () {
35
+ if (requestParameters['xUserId'] == null) {
36
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling createQuizSession().');
37
+ }
38
+ if (requestParameters['quizId'] == null) {
39
+ throw new runtime.RequiredError('quizId', 'Required parameter "quizId" was null or undefined when calling createQuizSession().');
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/quizzes/{quizId}/sessions`;
50
+ urlPath = urlPath.replace(`{${"quizId"}}`, encodeURIComponent(String(requestParameters['quizId'])));
51
+ const response = yield this.request({
52
+ path: urlPath,
53
+ method: 'POST',
54
+ headers: headerParameters,
55
+ query: queryParameters,
56
+ }, initOverrides);
57
+ return new runtime.JSONApiResponse(response, (jsonValue) => QuizSessionFromJSON(jsonValue));
58
+ });
59
+ }
60
+ /**
61
+ * Creates a new session for taking a quiz. Only the quiz owner can create sessions.
62
+ * Create a quiz session
63
+ */
64
+ createQuizSession(requestParameters, initOverrides) {
65
+ return __awaiter(this, void 0, void 0, function* () {
66
+ const response = yield this.createQuizSessionRaw(requestParameters, initOverrides);
67
+ return yield response.value();
68
+ });
69
+ }
70
+ /**
71
+ * Returns the session summary with quiz details, questions, responses, and score breakdown.
72
+ * Get quiz session summary
73
+ */
74
+ getQuizSessionSummaryRaw(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 getQuizSessionSummary().');
78
+ }
79
+ if (requestParameters['sessionId'] == null) {
80
+ throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling getQuizSessionSummary().');
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/quiz-sessions/{sessionId}/summary`;
91
+ urlPath = urlPath.replace(`{${"sessionId"}}`, encodeURIComponent(String(requestParameters['sessionId'])));
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) => QuizSessionSummaryFromJSON(jsonValue));
99
+ });
100
+ }
101
+ /**
102
+ * Returns the session summary with quiz details, questions, responses, and score breakdown.
103
+ * Get quiz session summary
104
+ */
105
+ getQuizSessionSummary(requestParameters, initOverrides) {
106
+ return __awaiter(this, void 0, void 0, function* () {
107
+ const response = yield this.getQuizSessionSummaryRaw(requestParameters, initOverrides);
108
+ return yield response.value();
109
+ });
110
+ }
111
+ /**
112
+ * Submits an answer for a question within a quiz session.
113
+ * Submit a quiz response
114
+ */
115
+ submitQuizResponseRaw(requestParameters, initOverrides) {
116
+ return __awaiter(this, void 0, void 0, function* () {
117
+ if (requestParameters['xUserId'] == null) {
118
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling submitQuizResponse().');
119
+ }
120
+ if (requestParameters['sessionId'] == null) {
121
+ throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling submitQuizResponse().');
122
+ }
123
+ if (requestParameters['submitQuizResponseRequest'] == null) {
124
+ throw new runtime.RequiredError('submitQuizResponseRequest', 'Required parameter "submitQuizResponseRequest" was null or undefined when calling submitQuizResponse().');
125
+ }
126
+ const queryParameters = {};
127
+ const headerParameters = {};
128
+ headerParameters['Content-Type'] = 'application/json';
129
+ if (requestParameters['xUserId'] != null) {
130
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
131
+ }
132
+ if (this.configuration && this.configuration.apiKey) {
133
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
134
+ }
135
+ let urlPath = `/api/v1/quiz-sessions/{sessionId}/responses`;
136
+ urlPath = urlPath.replace(`{${"sessionId"}}`, encodeURIComponent(String(requestParameters['sessionId'])));
137
+ const response = yield this.request({
138
+ path: urlPath,
139
+ method: 'POST',
140
+ headers: headerParameters,
141
+ query: queryParameters,
142
+ body: SubmitQuizResponseRequestToJSON(requestParameters['submitQuizResponseRequest']),
143
+ }, initOverrides);
144
+ return new runtime.JSONApiResponse(response, (jsonValue) => QuizResponseFromJSON(jsonValue));
145
+ });
146
+ }
147
+ /**
148
+ * Submits an answer for a question within a quiz session.
149
+ * Submit a quiz response
150
+ */
151
+ submitQuizResponse(requestParameters, initOverrides) {
152
+ return __awaiter(this, void 0, void 0, function* () {
153
+ const response = yield this.submitQuizResponseRaw(requestParameters, initOverrides);
154
+ return yield response.value();
155
+ });
156
+ }
157
+ /**
158
+ * Updates the status of a quiz session. Sets completedAt when status is \"completed\".
159
+ * Update quiz session status
160
+ */
161
+ updateQuizSessionRaw(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 updateQuizSession().');
165
+ }
166
+ if (requestParameters['sessionId'] == null) {
167
+ throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling updateQuizSession().');
168
+ }
169
+ if (requestParameters['updateQuizSessionRequest'] == null) {
170
+ throw new runtime.RequiredError('updateQuizSessionRequest', 'Required parameter "updateQuizSessionRequest" was null or undefined when calling updateQuizSession().');
171
+ }
172
+ const queryParameters = {};
173
+ const headerParameters = {};
174
+ headerParameters['Content-Type'] = 'application/json';
175
+ if (requestParameters['xUserId'] != null) {
176
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
177
+ }
178
+ if (this.configuration && this.configuration.apiKey) {
179
+ headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
180
+ }
181
+ let urlPath = `/api/v1/quiz-sessions/{sessionId}`;
182
+ urlPath = urlPath.replace(`{${"sessionId"}}`, encodeURIComponent(String(requestParameters['sessionId'])));
183
+ const response = yield this.request({
184
+ path: urlPath,
185
+ method: 'PATCH',
186
+ headers: headerParameters,
187
+ query: queryParameters,
188
+ body: UpdateQuizSessionRequestToJSON(requestParameters['updateQuizSessionRequest']),
189
+ }, initOverrides);
190
+ return new runtime.JSONApiResponse(response, (jsonValue) => QuizSessionFromJSON(jsonValue));
191
+ });
192
+ }
193
+ /**
194
+ * Updates the status of a quiz session. Sets completedAt when status is \"completed\".
195
+ * Update quiz session status
196
+ */
197
+ updateQuizSession(requestParameters, initOverrides) {
198
+ return __awaiter(this, void 0, void 0, function* () {
199
+ const response = yield this.updateQuizSessionRaw(requestParameters, initOverrides);
200
+ return yield response.value();
201
+ });
202
+ }
203
+ }
@@ -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 { QuizWithQuestions } from '../models/index';
14
+ export interface GetQuizRequest {
15
+ xUserId: string;
16
+ quizId: string;
17
+ }
18
+ /**
19
+ *
20
+ */
21
+ export declare class QuizzesApi extends runtime.BaseAPI {
22
+ /**
23
+ * Returns a quiz and its questions. Only accessible by the quiz owner.
24
+ * Get quiz with questions
25
+ */
26
+ getQuizRaw(requestParameters: GetQuizRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<QuizWithQuestions>>;
27
+ /**
28
+ * Returns a quiz and its questions. Only accessible by the quiz owner.
29
+ * Get quiz with questions
30
+ */
31
+ getQuiz(requestParameters: GetQuizRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<QuizWithQuestions>;
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 { QuizWithQuestionsFromJSON, } from '../models/index';
25
+ /**
26
+ *
27
+ */
28
+ export class QuizzesApi extends runtime.BaseAPI {
29
+ /**
30
+ * Returns a quiz and its questions. Only accessible by the quiz owner.
31
+ * Get quiz with questions
32
+ */
33
+ getQuizRaw(requestParameters, initOverrides) {
34
+ return __awaiter(this, void 0, void 0, function* () {
35
+ if (requestParameters['xUserId'] == null) {
36
+ throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling getQuiz().');
37
+ }
38
+ if (requestParameters['quizId'] == null) {
39
+ throw new runtime.RequiredError('quizId', 'Required parameter "quizId" was null or undefined when calling getQuiz().');
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/quizzes/{quizId}`;
50
+ urlPath = urlPath.replace(`{${"quizId"}}`, encodeURIComponent(String(requestParameters['quizId'])));
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) => QuizWithQuestionsFromJSON(jsonValue));
58
+ });
59
+ }
60
+ /**
61
+ * Returns a quiz and its questions. Only accessible by the quiz owner.
62
+ * Get quiz with questions
63
+ */
64
+ getQuiz(requestParameters, initOverrides) {
65
+ return __awaiter(this, void 0, void 0, function* () {
66
+ const response = yield this.getQuizRaw(requestParameters, initOverrides);
67
+ return yield response.value();
68
+ });
69
+ }
70
+ }
@@ -6,5 +6,7 @@ export * from './LearningDaysApi';
6
6
  export * from './LearningMomentsApi';
7
7
  export * from './LearningStreakApi';
8
8
  export * from './MessagesApi';
9
+ export * from './QuizSessionsApi';
10
+ export * from './QuizzesApi';
9
11
  export * from './ServiceTokensApi';
10
12
  export * from './TagsApi';
@@ -8,5 +8,7 @@ export * from './LearningDaysApi';
8
8
  export * from './LearningMomentsApi';
9
9
  export * from './LearningStreakApi';
10
10
  export * from './MessagesApi';
11
+ export * from './QuizSessionsApi';
12
+ export * from './QuizzesApi';
11
13
  export * from './ServiceTokensApi';
12
14
  export * from './TagsApi';
@@ -38,13 +38,13 @@ export interface Chat {
38
38
  * @type {string}
39
39
  * @memberof Chat
40
40
  */
41
- chatType?: string | null;
41
+ chatType: string | null;
42
42
  /**
43
43
  * Last viewed timestamp
44
44
  * @type {Date}
45
45
  * @memberof Chat
46
46
  */
47
- lastViewedAt?: Date | null;
47
+ lastViewedAt: Date | null;
48
48
  /**
49
49
  * External user ID (matches the X-User-Id header value)
50
50
  * @type {string}
@@ -62,31 +62,31 @@ export interface Chat {
62
62
  * @type {string}
63
63
  * @memberof Chat
64
64
  */
65
- subjectId?: string | null;
65
+ subjectId: string | null;
66
66
  /**
67
67
  * Latest job ID
68
68
  * @type {string}
69
69
  * @memberof Chat
70
70
  */
71
- latestJobId?: string | null;
71
+ latestJobId: string | null;
72
72
  /**
73
73
  * Scheduled analysis timestamp
74
74
  * @type {Date}
75
75
  * @memberof Chat
76
76
  */
77
- analysisScheduledFor?: Date | null;
77
+ analysisScheduledFor: Date | null;
78
78
  /**
79
79
  * Chat goal
80
80
  * @type {string}
81
81
  * @memberof Chat
82
82
  */
83
- goal?: string | null;
83
+ goal: string | null;
84
84
  /**
85
85
  * Whether the goal has been achieved
86
86
  * @type {boolean}
87
87
  * @memberof Chat
88
88
  */
89
- goalAchieved?: boolean | null;
89
+ goalAchieved: boolean | null;
90
90
  /**
91
91
  * Whether the chat is marked for review
92
92
  * @type {boolean}
@@ -28,10 +28,24 @@ export function instanceOfChat(value) {
28
28
  return false;
29
29
  if (!('title' in value) || value['title'] === undefined)
30
30
  return false;
31
+ if (!('chatType' in value) || value['chatType'] === undefined)
32
+ return false;
33
+ if (!('lastViewedAt' in value) || value['lastViewedAt'] === undefined)
34
+ return false;
31
35
  if (!('userId' in value) || value['userId'] === undefined)
32
36
  return false;
33
37
  if (!('visibility' in value) || value['visibility'] === undefined)
34
38
  return false;
39
+ if (!('subjectId' in value) || value['subjectId'] === undefined)
40
+ return false;
41
+ if (!('latestJobId' in value) || value['latestJobId'] === undefined)
42
+ return false;
43
+ if (!('analysisScheduledFor' in value) || value['analysisScheduledFor'] === undefined)
44
+ return false;
45
+ if (!('goal' in value) || value['goal'] === undefined)
46
+ return false;
47
+ if (!('goalAchieved' in value) || value['goalAchieved'] === undefined)
48
+ return false;
35
49
  if (!('forReview' in value) || value['forReview'] === undefined)
36
50
  return false;
37
51
  return true;
@@ -47,15 +61,15 @@ export function ChatFromJSONTyped(json, ignoreDiscriminator) {
47
61
  'id': json['id'],
48
62
  'createdAt': (new Date(json['createdAt'])),
49
63
  'title': json['title'],
50
- 'chatType': json['chatType'] == null ? undefined : json['chatType'],
51
- 'lastViewedAt': json['lastViewedAt'] == null ? undefined : (new Date(json['lastViewedAt'])),
64
+ 'chatType': json['chatType'],
65
+ 'lastViewedAt': (json['lastViewedAt'] == null ? null : new Date(json['lastViewedAt'])),
52
66
  'userId': json['userId'],
53
67
  'visibility': json['visibility'],
54
- 'subjectId': json['subjectId'] == null ? undefined : json['subjectId'],
55
- 'latestJobId': json['latestJobId'] == null ? undefined : json['latestJobId'],
56
- 'analysisScheduledFor': json['analysisScheduledFor'] == null ? undefined : (new Date(json['analysisScheduledFor'])),
57
- 'goal': json['goal'] == null ? undefined : json['goal'],
58
- 'goalAchieved': json['goalAchieved'] == null ? undefined : json['goalAchieved'],
68
+ 'subjectId': json['subjectId'],
69
+ 'latestJobId': json['latestJobId'],
70
+ 'analysisScheduledFor': (json['analysisScheduledFor'] == null ? null : new Date(json['analysisScheduledFor'])),
71
+ 'goal': json['goal'],
72
+ 'goalAchieved': json['goalAchieved'],
59
73
  'forReview': json['forReview'],
60
74
  };
61
75
  }
@@ -27,6 +27,12 @@ export interface ChatRequestAttachmentsInner {
27
27
  * @memberof ChatRequestAttachmentsInner
28
28
  */
29
29
  mimeType: ChatRequestAttachmentsInnerMimeTypeEnum;
30
+ /**
31
+ * Original filename of the uploaded file
32
+ * @type {string}
33
+ * @memberof ChatRequestAttachmentsInner
34
+ */
35
+ name: string;
30
36
  }
31
37
  /**
32
38
  * @export
@@ -29,6 +29,8 @@ export function instanceOfChatRequestAttachmentsInner(value) {
29
29
  return false;
30
30
  if (!('mimeType' in value) || value['mimeType'] === undefined)
31
31
  return false;
32
+ if (!('name' in value) || value['name'] === undefined)
33
+ return false;
32
34
  return true;
33
35
  }
34
36
  export function ChatRequestAttachmentsInnerFromJSON(json) {
@@ -41,6 +43,7 @@ export function ChatRequestAttachmentsInnerFromJSONTyped(json, ignoreDiscriminat
41
43
  return {
42
44
  'fileId': json['fileId'],
43
45
  'mimeType': json['mimeType'],
46
+ 'name': json['name'],
44
47
  };
45
48
  }
46
49
  export function ChatRequestAttachmentsInnerToJSON(json) {
@@ -53,5 +56,6 @@ export function ChatRequestAttachmentsInnerToJSONTyped(value, ignoreDiscriminato
53
56
  return {
54
57
  'fileId': value['fileId'],
55
58
  'mimeType': value['mimeType'],
59
+ 'name': value['name'],
56
60
  };
57
61
  }
@@ -27,6 +27,12 @@ export interface MessageAttachmentsInner {
27
27
  * @memberof MessageAttachmentsInner
28
28
  */
29
29
  mimeType: MessageAttachmentsInnerMimeTypeEnum;
30
+ /**
31
+ * Original filename of the uploaded file
32
+ * @type {string}
33
+ * @memberof MessageAttachmentsInner
34
+ */
35
+ name: string;
30
36
  /**
31
37
  * Fresh signed GET URL (expires in 30 minutes). Absent for legacy attachments without a fileId.
32
38
  * @type {string}
@@ -29,6 +29,8 @@ export function instanceOfMessageAttachmentsInner(value) {
29
29
  return false;
30
30
  if (!('mimeType' in value) || value['mimeType'] === undefined)
31
31
  return false;
32
+ if (!('name' in value) || value['name'] === undefined)
33
+ return false;
32
34
  return true;
33
35
  }
34
36
  export function MessageAttachmentsInnerFromJSON(json) {
@@ -41,6 +43,7 @@ export function MessageAttachmentsInnerFromJSONTyped(json, ignoreDiscriminator)
41
43
  return {
42
44
  'fileId': json['fileId'],
43
45
  'mimeType': json['mimeType'],
46
+ 'name': json['name'],
44
47
  'url': json['url'] == null ? undefined : json['url'],
45
48
  };
46
49
  }
@@ -54,6 +57,7 @@ export function MessageAttachmentsInnerToJSONTyped(value, ignoreDiscriminator =
54
57
  return {
55
58
  'fileId': value['fileId'],
56
59
  'mimeType': value['mimeType'],
60
+ 'name': value['name'],
57
61
  'url': value['url'],
58
62
  };
59
63
  }
@@ -0,0 +1,76 @@
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
+ /**
13
+ *
14
+ * @export
15
+ * @interface Quiz
16
+ */
17
+ export interface Quiz {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof Quiz
22
+ */
23
+ id: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof Quiz
28
+ */
29
+ accountUserId: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof Quiz
34
+ */
35
+ chatId?: string | null;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof Quiz
40
+ */
41
+ title: string;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof Quiz
46
+ */
47
+ topic: string;
48
+ /**
49
+ *
50
+ * @type {string}
51
+ * @memberof Quiz
52
+ */
53
+ mode: QuizModeEnum;
54
+ /**
55
+ *
56
+ * @type {Date}
57
+ * @memberof Quiz
58
+ */
59
+ createdAt: Date;
60
+ }
61
+ /**
62
+ * @export
63
+ */
64
+ export declare const QuizModeEnum: {
65
+ readonly Quiz: "quiz";
66
+ readonly Flashcards: "flashcards";
67
+ };
68
+ export type QuizModeEnum = typeof QuizModeEnum[keyof typeof QuizModeEnum];
69
+ /**
70
+ * Check if a given object implements the Quiz interface.
71
+ */
72
+ export declare function instanceOfQuiz(value: object): value is Quiz;
73
+ export declare function QuizFromJSON(json: any): Quiz;
74
+ export declare function QuizFromJSONTyped(json: any, ignoreDiscriminator: boolean): Quiz;
75
+ export declare function QuizToJSON(json: any): Quiz;
76
+ export declare function QuizToJSONTyped(value?: Quiz | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,72 @@
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
+ /**
15
+ * @export
16
+ */
17
+ export const QuizModeEnum = {
18
+ Quiz: 'quiz',
19
+ Flashcards: 'flashcards'
20
+ };
21
+ /**
22
+ * Check if a given object implements the Quiz interface.
23
+ */
24
+ export function instanceOfQuiz(value) {
25
+ if (!('id' in value) || value['id'] === undefined)
26
+ return false;
27
+ if (!('accountUserId' in value) || value['accountUserId'] === undefined)
28
+ return false;
29
+ if (!('title' in value) || value['title'] === undefined)
30
+ return false;
31
+ if (!('topic' in value) || value['topic'] === undefined)
32
+ return false;
33
+ if (!('mode' in value) || value['mode'] === undefined)
34
+ return false;
35
+ if (!('createdAt' in value) || value['createdAt'] === undefined)
36
+ return false;
37
+ return true;
38
+ }
39
+ export function QuizFromJSON(json) {
40
+ return QuizFromJSONTyped(json, false);
41
+ }
42
+ export function QuizFromJSONTyped(json, ignoreDiscriminator) {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+ 'id': json['id'],
48
+ 'accountUserId': json['accountUserId'],
49
+ 'chatId': json['chatId'] == null ? undefined : json['chatId'],
50
+ 'title': json['title'],
51
+ 'topic': json['topic'],
52
+ 'mode': json['mode'],
53
+ 'createdAt': (new Date(json['createdAt'])),
54
+ };
55
+ }
56
+ export function QuizToJSON(json) {
57
+ return QuizToJSONTyped(json, false);
58
+ }
59
+ export function QuizToJSONTyped(value, ignoreDiscriminator = false) {
60
+ if (value == null) {
61
+ return value;
62
+ }
63
+ return {
64
+ 'id': value['id'],
65
+ 'accountUserId': value['accountUserId'],
66
+ 'chatId': value['chatId'],
67
+ 'title': value['title'],
68
+ 'topic': value['topic'],
69
+ 'mode': value['mode'],
70
+ 'createdAt': value['createdAt'].toISOString(),
71
+ };
72
+ }