@instructure/athena-api-client 1.0.13 → 1.0.16

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
@@ -142,7 +142,7 @@ All URIs are relative to *http://localhost:3000*
142
142
  - [Message](docs/Message.md)
143
143
  - [MessageAttachment](docs/MessageAttachment.md)
144
144
  - [MessageCountResponse](docs/MessageCountResponse.md)
145
- - [MessagePart](docs/MessagePart.md)
145
+ - [MessagePartsInner](docs/MessagePartsInner.md)
146
146
  - [PaginatedChats](docs/PaginatedChats.md)
147
147
  - [PaginatedLearningMoments](docs/PaginatedLearningMoments.md)
148
148
  - [PaginatedMessages](docs/PaginatedMessages.md)
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import type { MessageAttachment } from './MessageAttachment';
13
- import type { MessagePart } from './MessagePart';
13
+ import type { MessagePartsInner } from './MessagePartsInner';
14
14
  /**
15
15
  *
16
16
  * @export
@@ -36,11 +36,11 @@ export interface Message {
36
36
  */
37
37
  role: string;
38
38
  /**
39
- * Message content parts
40
- * @type {Array<MessagePart>}
39
+ * Message content parts (text, tool invocations, reasoning, etc.)
40
+ * @type {Array<MessagePartsInner>}
41
41
  * @memberof Message
42
42
  */
43
- parts: Array<MessagePart>;
43
+ parts: Array<MessagePartsInner>;
44
44
  /**
45
45
  * Message attachments with fresh signed GET URLs
46
46
  * @type {Array<MessageAttachment>}
@@ -12,7 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  import { MessageAttachmentFromJSON, MessageAttachmentToJSON, } from './MessageAttachment';
15
- import { MessagePartFromJSON, MessagePartToJSON, } from './MessagePart';
15
+ import { MessagePartsInnerFromJSON, MessagePartsInnerToJSON, } from './MessagePartsInner';
16
16
  /**
17
17
  * Check if a given object implements the Message interface.
18
18
  */
@@ -42,7 +42,7 @@ export function MessageFromJSONTyped(json, ignoreDiscriminator) {
42
42
  'id': json['id'],
43
43
  'chatId': json['chatId'],
44
44
  'role': json['role'],
45
- 'parts': (json['parts'].map(MessagePartFromJSON)),
45
+ 'parts': (json['parts'].map(MessagePartsInnerFromJSON)),
46
46
  'attachments': (json['attachments'].map(MessageAttachmentFromJSON)),
47
47
  'createdAt': (new Date(json['createdAt'])),
48
48
  'isLearningMoment': json['isLearningMoment'] == null ? undefined : json['isLearningMoment'],
@@ -59,7 +59,7 @@ export function MessageToJSONTyped(value, ignoreDiscriminator = false) {
59
59
  'id': value['id'],
60
60
  'chatId': value['chatId'],
61
61
  'role': value['role'],
62
- 'parts': (value['parts'].map(MessagePartToJSON)),
62
+ 'parts': (value['parts'].map(MessagePartsInnerToJSON)),
63
63
  'attachments': (value['attachments'].map(MessageAttachmentToJSON)),
64
64
  'createdAt': value['createdAt'].toISOString(),
65
65
  'isLearningMoment': value['isLearningMoment'],
@@ -15,6 +15,7 @@
15
15
  * @interface MessagePartsInner
16
16
  */
17
17
  export interface MessagePartsInner {
18
+ [key: string]: any | any;
18
19
  /**
19
20
  *
20
21
  * @type {string}
@@ -24,10 +24,7 @@ export function MessagePartsInnerFromJSONTyped(json, ignoreDiscriminator) {
24
24
  if (json == null) {
25
25
  return json;
26
26
  }
27
- return {
28
- 'type': json['type'] == null ? undefined : json['type'],
29
- 'text': json['text'] == null ? undefined : json['text'],
30
- };
27
+ return Object.assign(Object.assign({}, json), { 'type': json['type'] == null ? undefined : json['type'], 'text': json['text'] == null ? undefined : json['text'] });
31
28
  }
32
29
  export function MessagePartsInnerToJSON(json) {
33
30
  return MessagePartsInnerToJSONTyped(json, false);
@@ -36,8 +33,5 @@ export function MessagePartsInnerToJSONTyped(value, ignoreDiscriminator = false)
36
33
  if (value == null) {
37
34
  return value;
38
35
  }
39
- return {
40
- 'type': value['type'],
41
- 'text': value['text'],
42
- };
36
+ return Object.assign(Object.assign({}, value), { 'type': value['type'], 'text': value['text'] });
43
37
  }
@@ -51,6 +51,18 @@ export interface QuizResponse {
51
51
  * @memberof QuizResponse
52
52
  */
53
53
  rating: QuizResponseRatingEnum | null;
54
+ /**
55
+ *
56
+ * @type {string}
57
+ * @memberof QuizResponse
58
+ */
59
+ grade: QuizResponseGradeEnum | null;
60
+ /**
61
+ *
62
+ * @type {string}
63
+ * @memberof QuizResponse
64
+ */
65
+ feedback: string | null;
54
66
  /**
55
67
  *
56
68
  * @type {Date}
@@ -66,6 +78,15 @@ export declare const QuizResponseRatingEnum: {
66
78
  readonly NeedPractice: "need-practice";
67
79
  };
68
80
  export type QuizResponseRatingEnum = typeof QuizResponseRatingEnum[keyof typeof QuizResponseRatingEnum];
81
+ /**
82
+ * @export
83
+ */
84
+ export declare const QuizResponseGradeEnum: {
85
+ readonly Correct: "correct";
86
+ readonly Almost: "almost";
87
+ readonly Incorrect: "incorrect";
88
+ };
89
+ export type QuizResponseGradeEnum = typeof QuizResponseGradeEnum[keyof typeof QuizResponseGradeEnum];
69
90
  /**
70
91
  * Check if a given object implements the QuizResponse interface.
71
92
  */
@@ -18,6 +18,14 @@ export const QuizResponseRatingEnum = {
18
18
  WasRight: 'was-right',
19
19
  NeedPractice: 'need-practice'
20
20
  };
21
+ /**
22
+ * @export
23
+ */
24
+ export const QuizResponseGradeEnum = {
25
+ Correct: 'correct',
26
+ Almost: 'almost',
27
+ Incorrect: 'incorrect'
28
+ };
21
29
  /**
22
30
  * Check if a given object implements the QuizResponse interface.
23
31
  */
@@ -34,6 +42,10 @@ export function instanceOfQuizResponse(value) {
34
42
  return false;
35
43
  if (!('rating' in value) || value['rating'] === undefined)
36
44
  return false;
45
+ if (!('grade' in value) || value['grade'] === undefined)
46
+ return false;
47
+ if (!('feedback' in value) || value['feedback'] === undefined)
48
+ return false;
37
49
  if (!('createdAt' in value) || value['createdAt'] === undefined)
38
50
  return false;
39
51
  return true;
@@ -52,6 +64,8 @@ export function QuizResponseFromJSONTyped(json, ignoreDiscriminator) {
52
64
  'userAnswer': json['userAnswer'],
53
65
  'isCorrect': json['isCorrect'],
54
66
  'rating': json['rating'],
67
+ 'grade': json['grade'],
68
+ 'feedback': json['feedback'],
55
69
  'createdAt': (new Date(json['createdAt'])),
56
70
  };
57
71
  }
@@ -69,6 +83,8 @@ export function QuizResponseToJSONTyped(value, ignoreDiscriminator = false) {
69
83
  'userAnswer': value['userAnswer'],
70
84
  'isCorrect': value['isCorrect'],
71
85
  'rating': value['rating'],
86
+ 'grade': value['grade'],
87
+ 'feedback': value['feedback'],
72
88
  'createdAt': value['createdAt'].toISOString(),
73
89
  };
74
90
  }
@@ -27,12 +27,6 @@ export interface SubmitQuizResponseRequest {
27
27
  * @memberof SubmitQuizResponseRequest
28
28
  */
29
29
  userAnswer: string;
30
- /**
31
- *
32
- * @type {boolean}
33
- * @memberof SubmitQuizResponseRequest
34
- */
35
- isCorrect?: boolean | null;
36
30
  /**
37
31
  *
38
32
  * @type {string}
@@ -38,7 +38,6 @@ export function SubmitQuizResponseRequestFromJSONTyped(json, ignoreDiscriminator
38
38
  return {
39
39
  'questionId': json['questionId'],
40
40
  'userAnswer': json['userAnswer'],
41
- 'isCorrect': json['isCorrect'] == null ? undefined : json['isCorrect'],
42
41
  'rating': json['rating'] == null ? undefined : json['rating'],
43
42
  };
44
43
  }
@@ -52,7 +51,6 @@ export function SubmitQuizResponseRequestToJSONTyped(value, ignoreDiscriminator
52
51
  return {
53
52
  'questionId': value['questionId'],
54
53
  'userAnswer': value['userAnswer'],
55
- 'isCorrect': value['isCorrect'],
56
54
  'rating': value['rating'],
57
55
  };
58
56
  }
@@ -27,7 +27,7 @@ export * from './LearningStreakResponse';
27
27
  export * from './Message';
28
28
  export * from './MessageAttachment';
29
29
  export * from './MessageCountResponse';
30
- export * from './MessagePart';
30
+ export * from './MessagePartsInner';
31
31
  export * from './PaginatedChats';
32
32
  export * from './PaginatedLearningMoments';
33
33
  export * from './PaginatedMessages';
@@ -29,7 +29,7 @@ export * from './LearningStreakResponse';
29
29
  export * from './Message';
30
30
  export * from './MessageAttachment';
31
31
  export * from './MessageCountResponse';
32
- export * from './MessagePart';
32
+ export * from './MessagePartsInner';
33
33
  export * from './PaginatedChats';
34
34
  export * from './PaginatedLearningMoments';
35
35
  export * from './PaginatedMessages';
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import type { MessageAttachment } from './MessageAttachment';
13
- import type { MessagePart } from './MessagePart';
13
+ import type { MessagePartsInner } from './MessagePartsInner';
14
14
  /**
15
15
  *
16
16
  * @export
@@ -36,11 +36,11 @@ export interface Message {
36
36
  */
37
37
  role: string;
38
38
  /**
39
- * Message content parts
40
- * @type {Array<MessagePart>}
39
+ * Message content parts (text, tool invocations, reasoning, etc.)
40
+ * @type {Array<MessagePartsInner>}
41
41
  * @memberof Message
42
42
  */
43
- parts: Array<MessagePart>;
43
+ parts: Array<MessagePartsInner>;
44
44
  /**
45
45
  * Message attachments with fresh signed GET URLs
46
46
  * @type {Array<MessageAttachment>}
@@ -19,7 +19,7 @@ exports.MessageFromJSONTyped = MessageFromJSONTyped;
19
19
  exports.MessageToJSON = MessageToJSON;
20
20
  exports.MessageToJSONTyped = MessageToJSONTyped;
21
21
  const MessageAttachment_1 = require("./MessageAttachment");
22
- const MessagePart_1 = require("./MessagePart");
22
+ const MessagePartsInner_1 = require("./MessagePartsInner");
23
23
  /**
24
24
  * Check if a given object implements the Message interface.
25
25
  */
@@ -49,7 +49,7 @@ function MessageFromJSONTyped(json, ignoreDiscriminator) {
49
49
  'id': json['id'],
50
50
  'chatId': json['chatId'],
51
51
  'role': json['role'],
52
- 'parts': (json['parts'].map(MessagePart_1.MessagePartFromJSON)),
52
+ 'parts': (json['parts'].map(MessagePartsInner_1.MessagePartsInnerFromJSON)),
53
53
  'attachments': (json['attachments'].map(MessageAttachment_1.MessageAttachmentFromJSON)),
54
54
  'createdAt': (new Date(json['createdAt'])),
55
55
  'isLearningMoment': json['isLearningMoment'] == null ? undefined : json['isLearningMoment'],
@@ -66,7 +66,7 @@ function MessageToJSONTyped(value, ignoreDiscriminator = false) {
66
66
  'id': value['id'],
67
67
  'chatId': value['chatId'],
68
68
  'role': value['role'],
69
- 'parts': (value['parts'].map(MessagePart_1.MessagePartToJSON)),
69
+ 'parts': (value['parts'].map(MessagePartsInner_1.MessagePartsInnerToJSON)),
70
70
  'attachments': (value['attachments'].map(MessageAttachment_1.MessageAttachmentToJSON)),
71
71
  'createdAt': value['createdAt'].toISOString(),
72
72
  'isLearningMoment': value['isLearningMoment'],
@@ -15,6 +15,7 @@
15
15
  * @interface MessagePartsInner
16
16
  */
17
17
  export interface MessagePartsInner {
18
+ [key: string]: any | any;
18
19
  /**
19
20
  *
20
21
  * @type {string}
@@ -31,10 +31,7 @@ function MessagePartsInnerFromJSONTyped(json, ignoreDiscriminator) {
31
31
  if (json == null) {
32
32
  return json;
33
33
  }
34
- return {
35
- 'type': json['type'] == null ? undefined : json['type'],
36
- 'text': json['text'] == null ? undefined : json['text'],
37
- };
34
+ return Object.assign(Object.assign({}, json), { 'type': json['type'] == null ? undefined : json['type'], 'text': json['text'] == null ? undefined : json['text'] });
38
35
  }
39
36
  function MessagePartsInnerToJSON(json) {
40
37
  return MessagePartsInnerToJSONTyped(json, false);
@@ -43,8 +40,5 @@ function MessagePartsInnerToJSONTyped(value, ignoreDiscriminator = false) {
43
40
  if (value == null) {
44
41
  return value;
45
42
  }
46
- return {
47
- 'type': value['type'],
48
- 'text': value['text'],
49
- };
43
+ return Object.assign(Object.assign({}, value), { 'type': value['type'], 'text': value['text'] });
50
44
  }
@@ -51,6 +51,18 @@ export interface QuizResponse {
51
51
  * @memberof QuizResponse
52
52
  */
53
53
  rating: QuizResponseRatingEnum | null;
54
+ /**
55
+ *
56
+ * @type {string}
57
+ * @memberof QuizResponse
58
+ */
59
+ grade: QuizResponseGradeEnum | null;
60
+ /**
61
+ *
62
+ * @type {string}
63
+ * @memberof QuizResponse
64
+ */
65
+ feedback: string | null;
54
66
  /**
55
67
  *
56
68
  * @type {Date}
@@ -66,6 +78,15 @@ export declare const QuizResponseRatingEnum: {
66
78
  readonly NeedPractice: "need-practice";
67
79
  };
68
80
  export type QuizResponseRatingEnum = typeof QuizResponseRatingEnum[keyof typeof QuizResponseRatingEnum];
81
+ /**
82
+ * @export
83
+ */
84
+ export declare const QuizResponseGradeEnum: {
85
+ readonly Correct: "correct";
86
+ readonly Almost: "almost";
87
+ readonly Incorrect: "incorrect";
88
+ };
89
+ export type QuizResponseGradeEnum = typeof QuizResponseGradeEnum[keyof typeof QuizResponseGradeEnum];
69
90
  /**
70
91
  * Check if a given object implements the QuizResponse interface.
71
92
  */
@@ -13,7 +13,7 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.QuizResponseRatingEnum = void 0;
16
+ exports.QuizResponseGradeEnum = exports.QuizResponseRatingEnum = void 0;
17
17
  exports.instanceOfQuizResponse = instanceOfQuizResponse;
18
18
  exports.QuizResponseFromJSON = QuizResponseFromJSON;
19
19
  exports.QuizResponseFromJSONTyped = QuizResponseFromJSONTyped;
@@ -26,6 +26,14 @@ exports.QuizResponseRatingEnum = {
26
26
  WasRight: 'was-right',
27
27
  NeedPractice: 'need-practice'
28
28
  };
29
+ /**
30
+ * @export
31
+ */
32
+ exports.QuizResponseGradeEnum = {
33
+ Correct: 'correct',
34
+ Almost: 'almost',
35
+ Incorrect: 'incorrect'
36
+ };
29
37
  /**
30
38
  * Check if a given object implements the QuizResponse interface.
31
39
  */
@@ -42,6 +50,10 @@ function instanceOfQuizResponse(value) {
42
50
  return false;
43
51
  if (!('rating' in value) || value['rating'] === undefined)
44
52
  return false;
53
+ if (!('grade' in value) || value['grade'] === undefined)
54
+ return false;
55
+ if (!('feedback' in value) || value['feedback'] === undefined)
56
+ return false;
45
57
  if (!('createdAt' in value) || value['createdAt'] === undefined)
46
58
  return false;
47
59
  return true;
@@ -60,6 +72,8 @@ function QuizResponseFromJSONTyped(json, ignoreDiscriminator) {
60
72
  'userAnswer': json['userAnswer'],
61
73
  'isCorrect': json['isCorrect'],
62
74
  'rating': json['rating'],
75
+ 'grade': json['grade'],
76
+ 'feedback': json['feedback'],
63
77
  'createdAt': (new Date(json['createdAt'])),
64
78
  };
65
79
  }
@@ -77,6 +91,8 @@ function QuizResponseToJSONTyped(value, ignoreDiscriminator = false) {
77
91
  'userAnswer': value['userAnswer'],
78
92
  'isCorrect': value['isCorrect'],
79
93
  'rating': value['rating'],
94
+ 'grade': value['grade'],
95
+ 'feedback': value['feedback'],
80
96
  'createdAt': value['createdAt'].toISOString(),
81
97
  };
82
98
  }
@@ -27,12 +27,6 @@ export interface SubmitQuizResponseRequest {
27
27
  * @memberof SubmitQuizResponseRequest
28
28
  */
29
29
  userAnswer: string;
30
- /**
31
- *
32
- * @type {boolean}
33
- * @memberof SubmitQuizResponseRequest
34
- */
35
- isCorrect?: boolean | null;
36
30
  /**
37
31
  *
38
32
  * @type {string}
@@ -46,7 +46,6 @@ function SubmitQuizResponseRequestFromJSONTyped(json, ignoreDiscriminator) {
46
46
  return {
47
47
  'questionId': json['questionId'],
48
48
  'userAnswer': json['userAnswer'],
49
- 'isCorrect': json['isCorrect'] == null ? undefined : json['isCorrect'],
50
49
  'rating': json['rating'] == null ? undefined : json['rating'],
51
50
  };
52
51
  }
@@ -60,7 +59,6 @@ function SubmitQuizResponseRequestToJSONTyped(value, ignoreDiscriminator = false
60
59
  return {
61
60
  'questionId': value['questionId'],
62
61
  'userAnswer': value['userAnswer'],
63
- 'isCorrect': value['isCorrect'],
64
62
  'rating': value['rating'],
65
63
  };
66
64
  }
@@ -27,7 +27,7 @@ export * from './LearningStreakResponse';
27
27
  export * from './Message';
28
28
  export * from './MessageAttachment';
29
29
  export * from './MessageCountResponse';
30
- export * from './MessagePart';
30
+ export * from './MessagePartsInner';
31
31
  export * from './PaginatedChats';
32
32
  export * from './PaginatedLearningMoments';
33
33
  export * from './PaginatedMessages';
@@ -45,7 +45,7 @@ __exportStar(require("./LearningStreakResponse"), exports);
45
45
  __exportStar(require("./Message"), exports);
46
46
  __exportStar(require("./MessageAttachment"), exports);
47
47
  __exportStar(require("./MessageCountResponse"), exports);
48
- __exportStar(require("./MessagePart"), exports);
48
+ __exportStar(require("./MessagePartsInner"), exports);
49
49
  __exportStar(require("./PaginatedChats"), exports);
50
50
  __exportStar(require("./PaginatedLearningMoments"), exports);
51
51
  __exportStar(require("./PaginatedMessages"), exports);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@instructure/athena-api-client",
3
3
  "private": false,
4
- "version": "1.0.13",
4
+ "version": "1.0.16",
5
5
  "description": "OpenAPI client for the Athena API",
6
6
  "author": "Instructure",
7
7
  "repository": {