@instructure/athena-api-client 3.38.8 → 3.39.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 (42) hide show
  1. package/README.md +8 -0
  2. package/dist/apis/ResourcesApi.d.ts +55 -0
  3. package/dist/apis/ResourcesApi.js +106 -0
  4. package/dist/apis/index.d.ts +1 -0
  5. package/dist/apis/index.js +1 -0
  6. package/dist/esm/apis/ResourcesApi.d.ts +55 -0
  7. package/dist/esm/apis/ResourcesApi.js +102 -0
  8. package/dist/esm/apis/index.d.ts +1 -0
  9. package/dist/esm/apis/index.js +1 -0
  10. package/dist/esm/models/PaginatedResources.d.ts +39 -0
  11. package/dist/esm/models/PaginatedResources.js +48 -0
  12. package/dist/esm/models/ResourceActivity.d.ts +114 -0
  13. package/dist/esm/models/ResourceActivity.js +100 -0
  14. package/dist/esm/models/ResourceChat.d.ts +56 -0
  15. package/dist/esm/models/ResourceChat.js +59 -0
  16. package/dist/esm/models/ResourceListItem.d.ts +145 -0
  17. package/dist/esm/models/ResourceListItem.js +122 -0
  18. package/dist/esm/models/ResourceSession.d.ts +95 -0
  19. package/dist/esm/models/ResourceSession.js +87 -0
  20. package/dist/esm/models/ResourceStudyObjective.d.ts +50 -0
  21. package/dist/esm/models/ResourceStudyObjective.js +55 -0
  22. package/dist/esm/models/ResourceStudySpace.d.ts +44 -0
  23. package/dist/esm/models/ResourceStudySpace.js +51 -0
  24. package/dist/esm/models/index.d.ts +7 -0
  25. package/dist/esm/models/index.js +7 -0
  26. package/dist/models/PaginatedResources.d.ts +39 -0
  27. package/dist/models/PaginatedResources.js +55 -0
  28. package/dist/models/ResourceActivity.d.ts +114 -0
  29. package/dist/models/ResourceActivity.js +108 -0
  30. package/dist/models/ResourceChat.d.ts +56 -0
  31. package/dist/models/ResourceChat.js +66 -0
  32. package/dist/models/ResourceListItem.d.ts +145 -0
  33. package/dist/models/ResourceListItem.js +130 -0
  34. package/dist/models/ResourceSession.d.ts +95 -0
  35. package/dist/models/ResourceSession.js +95 -0
  36. package/dist/models/ResourceStudyObjective.d.ts +50 -0
  37. package/dist/models/ResourceStudyObjective.js +62 -0
  38. package/dist/models/ResourceStudySpace.d.ts +44 -0
  39. package/dist/models/ResourceStudySpace.js +58 -0
  40. package/dist/models/index.d.ts +7 -0
  41. package/dist/models/index.js +7 -0
  42. package/package.json +1 -1
@@ -0,0 +1,100 @@
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
+ import { ResourceSessionFromJSON, ResourceSessionToJSON, } from './ResourceSession';
15
+ /**
16
+ * @export
17
+ */
18
+ export const ResourceActivityProgressStatusEnum = {
19
+ NotStarted: 'not-started',
20
+ InProgress: 'in-progress',
21
+ Completed: 'completed'
22
+ };
23
+ /**
24
+ * Check if a given object implements the ResourceActivity interface.
25
+ */
26
+ export function instanceOfResourceActivity(value) {
27
+ if (!('progressStatus' in value) || value['progressStatus'] === undefined)
28
+ return false;
29
+ if (!('sessionCount' in value) || value['sessionCount'] === undefined)
30
+ return false;
31
+ if (!('activeSessionCount' in value) || value['activeSessionCount'] === undefined)
32
+ return false;
33
+ if (!('completedSessionCount' in value) || value['completedSessionCount'] === undefined)
34
+ return false;
35
+ if (!('abandonedSessionCount' in value) || value['abandonedSessionCount'] === undefined)
36
+ return false;
37
+ if (!('firstStartedAt' in value) || value['firstStartedAt'] === undefined)
38
+ return false;
39
+ if (!('lastActivityAt' in value) || value['lastActivityAt'] === undefined)
40
+ return false;
41
+ if (!('latestSession' in value) || value['latestSession'] === undefined)
42
+ return false;
43
+ if (!('bestSession' in value) || value['bestSession'] === undefined)
44
+ return false;
45
+ if (!('totalAnsweredCount' in value) || value['totalAnsweredCount'] === undefined)
46
+ return false;
47
+ if (!('totalCorrectCount' in value) || value['totalCorrectCount'] === undefined)
48
+ return false;
49
+ if (!('viewedQuestionCount' in value) || value['viewedQuestionCount'] === undefined)
50
+ return false;
51
+ if (!('totalViewCount' in value) || value['totalViewCount'] === undefined)
52
+ return false;
53
+ return true;
54
+ }
55
+ export function ResourceActivityFromJSON(json) {
56
+ return ResourceActivityFromJSONTyped(json, false);
57
+ }
58
+ export function ResourceActivityFromJSONTyped(json, ignoreDiscriminator) {
59
+ if (json == null) {
60
+ return json;
61
+ }
62
+ return {
63
+ 'progressStatus': json['progressStatus'],
64
+ 'sessionCount': json['sessionCount'],
65
+ 'activeSessionCount': json['activeSessionCount'],
66
+ 'completedSessionCount': json['completedSessionCount'],
67
+ 'abandonedSessionCount': json['abandonedSessionCount'],
68
+ 'firstStartedAt': (json['firstStartedAt'] == null ? null : new Date(json['firstStartedAt'])),
69
+ 'lastActivityAt': (json['lastActivityAt'] == null ? null : new Date(json['lastActivityAt'])),
70
+ 'latestSession': ResourceSessionFromJSON(json['latestSession']),
71
+ 'bestSession': ResourceSessionFromJSON(json['bestSession']),
72
+ 'totalAnsweredCount': json['totalAnsweredCount'],
73
+ 'totalCorrectCount': json['totalCorrectCount'],
74
+ 'viewedQuestionCount': json['viewedQuestionCount'],
75
+ 'totalViewCount': json['totalViewCount'],
76
+ };
77
+ }
78
+ export function ResourceActivityToJSON(json) {
79
+ return ResourceActivityToJSONTyped(json, false);
80
+ }
81
+ export function ResourceActivityToJSONTyped(value, ignoreDiscriminator = false) {
82
+ if (value == null) {
83
+ return value;
84
+ }
85
+ return {
86
+ 'progressStatus': value['progressStatus'],
87
+ 'sessionCount': value['sessionCount'],
88
+ 'activeSessionCount': value['activeSessionCount'],
89
+ 'completedSessionCount': value['completedSessionCount'],
90
+ 'abandonedSessionCount': value['abandonedSessionCount'],
91
+ 'firstStartedAt': value['firstStartedAt'] == null ? value['firstStartedAt'] : value['firstStartedAt'].toISOString(),
92
+ 'lastActivityAt': value['lastActivityAt'] == null ? value['lastActivityAt'] : value['lastActivityAt'].toISOString(),
93
+ 'latestSession': ResourceSessionToJSON(value['latestSession']),
94
+ 'bestSession': ResourceSessionToJSON(value['bestSession']),
95
+ 'totalAnsweredCount': value['totalAnsweredCount'],
96
+ 'totalCorrectCount': value['totalCorrectCount'],
97
+ 'viewedQuestionCount': value['viewedQuestionCount'],
98
+ 'totalViewCount': value['totalViewCount'],
99
+ };
100
+ }
@@ -0,0 +1,56 @@
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 ResourceChat
16
+ */
17
+ export interface ResourceChat {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof ResourceChat
22
+ */
23
+ id: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof ResourceChat
28
+ */
29
+ title: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof ResourceChat
34
+ */
35
+ chatType: string | null;
36
+ /**
37
+ *
38
+ * @type {Date}
39
+ * @memberof ResourceChat
40
+ */
41
+ createdAt: Date;
42
+ /**
43
+ *
44
+ * @type {Date}
45
+ * @memberof ResourceChat
46
+ */
47
+ lastViewedAt: Date | null;
48
+ }
49
+ /**
50
+ * Check if a given object implements the ResourceChat interface.
51
+ */
52
+ export declare function instanceOfResourceChat(value: object): value is ResourceChat;
53
+ export declare function ResourceChatFromJSON(json: any): ResourceChat;
54
+ export declare function ResourceChatFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResourceChat;
55
+ export declare function ResourceChatToJSON(json: any): ResourceChat;
56
+ export declare function ResourceChatToJSONTyped(value?: ResourceChat | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,59 @@
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
+ * Check if a given object implements the ResourceChat interface.
16
+ */
17
+ export function instanceOfResourceChat(value) {
18
+ if (!('id' in value) || value['id'] === undefined)
19
+ return false;
20
+ if (!('title' in value) || value['title'] === undefined)
21
+ return false;
22
+ if (!('chatType' in value) || value['chatType'] === undefined)
23
+ return false;
24
+ if (!('createdAt' in value) || value['createdAt'] === undefined)
25
+ return false;
26
+ if (!('lastViewedAt' in value) || value['lastViewedAt'] === undefined)
27
+ return false;
28
+ return true;
29
+ }
30
+ export function ResourceChatFromJSON(json) {
31
+ return ResourceChatFromJSONTyped(json, false);
32
+ }
33
+ export function ResourceChatFromJSONTyped(json, ignoreDiscriminator) {
34
+ if (json == null) {
35
+ return json;
36
+ }
37
+ return {
38
+ 'id': json['id'],
39
+ 'title': json['title'],
40
+ 'chatType': json['chatType'],
41
+ 'createdAt': (new Date(json['createdAt'])),
42
+ 'lastViewedAt': (json['lastViewedAt'] == null ? null : new Date(json['lastViewedAt'])),
43
+ };
44
+ }
45
+ export function ResourceChatToJSON(json) {
46
+ return ResourceChatToJSONTyped(json, false);
47
+ }
48
+ export function ResourceChatToJSONTyped(value, ignoreDiscriminator = false) {
49
+ if (value == null) {
50
+ return value;
51
+ }
52
+ return {
53
+ 'id': value['id'],
54
+ 'title': value['title'],
55
+ 'chatType': value['chatType'],
56
+ 'createdAt': value['createdAt'].toISOString(),
57
+ 'lastViewedAt': value['lastViewedAt'] == null ? value['lastViewedAt'] : value['lastViewedAt'].toISOString(),
58
+ };
59
+ }
@@ -0,0 +1,145 @@
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 type { ResourceStudyObjective } from './ResourceStudyObjective';
13
+ import type { ResourceChat } from './ResourceChat';
14
+ import type { ResourceStudySpace } from './ResourceStudySpace';
15
+ import type { ResourceActivity } from './ResourceActivity';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface ResourceListItem
20
+ */
21
+ export interface ResourceListItem {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof ResourceListItem
26
+ */
27
+ id: string;
28
+ /**
29
+ * What kind of generated resource this is.
30
+ * @type {string}
31
+ * @memberof ResourceListItem
32
+ */
33
+ type: ResourceListItemTypeEnum;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof ResourceListItem
38
+ */
39
+ title: string;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof ResourceListItem
44
+ */
45
+ topic: string;
46
+ /**
47
+ *
48
+ * @type {string}
49
+ * @memberof ResourceListItem
50
+ */
51
+ generationStatus: ResourceListItemGenerationStatusEnum;
52
+ /**
53
+ *
54
+ * @type {number}
55
+ * @memberof ResourceListItem
56
+ */
57
+ expectedQuestionCount: number | null;
58
+ /**
59
+ *
60
+ * @type {Date}
61
+ * @memberof ResourceListItem
62
+ */
63
+ createdAt: Date;
64
+ /**
65
+ * Questions (or cards) persisted so far.
66
+ * @type {number}
67
+ * @memberof ResourceListItem
68
+ */
69
+ questionCount: number;
70
+ /**
71
+ * Question count per question type, e.g. {"mcq": 4, "fill-blank": 1}.
72
+ * @type {{ [key: string]: number; }}
73
+ * @memberof ResourceListItem
74
+ */
75
+ questionTypeCounts: {
76
+ [key: string]: number;
77
+ };
78
+ /**
79
+ * Distinct question topics, sorted. Empty when none recorded.
80
+ * @type {Array<string>}
81
+ * @memberof ResourceListItem
82
+ */
83
+ topics: Array<string>;
84
+ /**
85
+ * Distinct knowledge concepts the questions are tagged with.
86
+ * @type {number}
87
+ * @memberof ResourceListItem
88
+ */
89
+ conceptCount: number;
90
+ /**
91
+ * External Canvas course this resource is attributed to, resolved through the chat, its study objective, or its practice slot. Null when no source knows a course.
92
+ * @type {string}
93
+ * @memberof ResourceListItem
94
+ */
95
+ courseId: string | null;
96
+ /**
97
+ * The chat this resource was generated in. Null when that chat has been deleted.
98
+ * @type {ResourceChat}
99
+ * @memberof ResourceListItem
100
+ */
101
+ chat: ResourceChat | null;
102
+ /**
103
+ * The study objective the originating chat was filed under.
104
+ * @type {ResourceStudyObjective}
105
+ * @memberof ResourceListItem
106
+ */
107
+ studyObjective: ResourceStudyObjective | null;
108
+ /**
109
+ * The study space this resource belongs to: the objective's space when it has one, else the learner's space for the attributed course.
110
+ * @type {ResourceStudySpace}
111
+ * @memberof ResourceListItem
112
+ */
113
+ studySpace: ResourceStudySpace | null;
114
+ /**
115
+ *
116
+ * @type {ResourceActivity}
117
+ * @memberof ResourceListItem
118
+ */
119
+ activity: ResourceActivity;
120
+ }
121
+ /**
122
+ * @export
123
+ */
124
+ export declare const ResourceListItemTypeEnum: {
125
+ readonly Quiz: "quiz";
126
+ readonly Flashcards: "flashcards";
127
+ };
128
+ export type ResourceListItemTypeEnum = typeof ResourceListItemTypeEnum[keyof typeof ResourceListItemTypeEnum];
129
+ /**
130
+ * @export
131
+ */
132
+ export declare const ResourceListItemGenerationStatusEnum: {
133
+ readonly Generating: "generating";
134
+ readonly Ready: "ready";
135
+ readonly Failed: "failed";
136
+ };
137
+ export type ResourceListItemGenerationStatusEnum = typeof ResourceListItemGenerationStatusEnum[keyof typeof ResourceListItemGenerationStatusEnum];
138
+ /**
139
+ * Check if a given object implements the ResourceListItem interface.
140
+ */
141
+ export declare function instanceOfResourceListItem(value: object): value is ResourceListItem;
142
+ export declare function ResourceListItemFromJSON(json: any): ResourceListItem;
143
+ export declare function ResourceListItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResourceListItem;
144
+ export declare function ResourceListItemToJSON(json: any): ResourceListItem;
145
+ export declare function ResourceListItemToJSONTyped(value?: ResourceListItem | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,122 @@
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
+ import { ResourceStudyObjectiveFromJSON, ResourceStudyObjectiveToJSON, } from './ResourceStudyObjective';
15
+ import { ResourceChatFromJSON, ResourceChatToJSON, } from './ResourceChat';
16
+ import { ResourceStudySpaceFromJSON, ResourceStudySpaceToJSON, } from './ResourceStudySpace';
17
+ import { ResourceActivityFromJSON, ResourceActivityToJSON, } from './ResourceActivity';
18
+ /**
19
+ * @export
20
+ */
21
+ export const ResourceListItemTypeEnum = {
22
+ Quiz: 'quiz',
23
+ Flashcards: 'flashcards'
24
+ };
25
+ /**
26
+ * @export
27
+ */
28
+ export const ResourceListItemGenerationStatusEnum = {
29
+ Generating: 'generating',
30
+ Ready: 'ready',
31
+ Failed: 'failed'
32
+ };
33
+ /**
34
+ * Check if a given object implements the ResourceListItem interface.
35
+ */
36
+ export function instanceOfResourceListItem(value) {
37
+ if (!('id' in value) || value['id'] === undefined)
38
+ return false;
39
+ if (!('type' in value) || value['type'] === undefined)
40
+ return false;
41
+ if (!('title' in value) || value['title'] === undefined)
42
+ return false;
43
+ if (!('topic' in value) || value['topic'] === undefined)
44
+ return false;
45
+ if (!('generationStatus' in value) || value['generationStatus'] === undefined)
46
+ return false;
47
+ if (!('expectedQuestionCount' in value) || value['expectedQuestionCount'] === undefined)
48
+ return false;
49
+ if (!('createdAt' in value) || value['createdAt'] === undefined)
50
+ return false;
51
+ if (!('questionCount' in value) || value['questionCount'] === undefined)
52
+ return false;
53
+ if (!('questionTypeCounts' in value) || value['questionTypeCounts'] === undefined)
54
+ return false;
55
+ if (!('topics' in value) || value['topics'] === undefined)
56
+ return false;
57
+ if (!('conceptCount' in value) || value['conceptCount'] === undefined)
58
+ return false;
59
+ if (!('courseId' in value) || value['courseId'] === undefined)
60
+ return false;
61
+ if (!('chat' in value) || value['chat'] === undefined)
62
+ return false;
63
+ if (!('studyObjective' in value) || value['studyObjective'] === undefined)
64
+ return false;
65
+ if (!('studySpace' in value) || value['studySpace'] === undefined)
66
+ return false;
67
+ if (!('activity' in value) || value['activity'] === undefined)
68
+ return false;
69
+ return true;
70
+ }
71
+ export function ResourceListItemFromJSON(json) {
72
+ return ResourceListItemFromJSONTyped(json, false);
73
+ }
74
+ export function ResourceListItemFromJSONTyped(json, ignoreDiscriminator) {
75
+ if (json == null) {
76
+ return json;
77
+ }
78
+ return {
79
+ 'id': json['id'],
80
+ 'type': json['type'],
81
+ 'title': json['title'],
82
+ 'topic': json['topic'],
83
+ 'generationStatus': json['generationStatus'],
84
+ 'expectedQuestionCount': json['expectedQuestionCount'],
85
+ 'createdAt': (new Date(json['createdAt'])),
86
+ 'questionCount': json['questionCount'],
87
+ 'questionTypeCounts': json['questionTypeCounts'],
88
+ 'topics': json['topics'],
89
+ 'conceptCount': json['conceptCount'],
90
+ 'courseId': json['courseId'],
91
+ 'chat': ResourceChatFromJSON(json['chat']),
92
+ 'studyObjective': ResourceStudyObjectiveFromJSON(json['studyObjective']),
93
+ 'studySpace': ResourceStudySpaceFromJSON(json['studySpace']),
94
+ 'activity': ResourceActivityFromJSON(json['activity']),
95
+ };
96
+ }
97
+ export function ResourceListItemToJSON(json) {
98
+ return ResourceListItemToJSONTyped(json, false);
99
+ }
100
+ export function ResourceListItemToJSONTyped(value, ignoreDiscriminator = false) {
101
+ if (value == null) {
102
+ return value;
103
+ }
104
+ return {
105
+ 'id': value['id'],
106
+ 'type': value['type'],
107
+ 'title': value['title'],
108
+ 'topic': value['topic'],
109
+ 'generationStatus': value['generationStatus'],
110
+ 'expectedQuestionCount': value['expectedQuestionCount'],
111
+ 'createdAt': value['createdAt'].toISOString(),
112
+ 'questionCount': value['questionCount'],
113
+ 'questionTypeCounts': value['questionTypeCounts'],
114
+ 'topics': value['topics'],
115
+ 'conceptCount': value['conceptCount'],
116
+ 'courseId': value['courseId'],
117
+ 'chat': ResourceChatToJSON(value['chat']),
118
+ 'studyObjective': ResourceStudyObjectiveToJSON(value['studyObjective']),
119
+ 'studySpace': ResourceStudySpaceToJSON(value['studySpace']),
120
+ 'activity': ResourceActivityToJSON(value['activity']),
121
+ };
122
+ }
@@ -0,0 +1,95 @@
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 ResourceSession
16
+ */
17
+ export interface ResourceSession {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof ResourceSession
22
+ */
23
+ id: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof ResourceSession
28
+ */
29
+ status: ResourceSessionStatusEnum;
30
+ /**
31
+ *
32
+ * @type {Date}
33
+ * @memberof ResourceSession
34
+ */
35
+ startedAt: Date;
36
+ /**
37
+ *
38
+ * @type {Date}
39
+ * @memberof ResourceSession
40
+ */
41
+ completedAt: Date | null;
42
+ /**
43
+ * When the learner last answered a question in this session.
44
+ * @type {Date}
45
+ * @memberof ResourceSession
46
+ */
47
+ lastResponseAt: Date | null;
48
+ /**
49
+ * Questions the learner answered or rated in this session.
50
+ * @type {number}
51
+ * @memberof ResourceSession
52
+ */
53
+ answeredCount: number;
54
+ /**
55
+ * Answers marked correct, plus flashcards the learner rated as known.
56
+ * @type {number}
57
+ * @memberof ResourceSession
58
+ */
59
+ correctCount: number;
60
+ /**
61
+ * Answers marked incorrect. Flashcard ratings never count here.
62
+ * @type {number}
63
+ * @memberof ResourceSession
64
+ */
65
+ incorrectCount: number;
66
+ /**
67
+ * Flashcards the learner rated as "need practice".
68
+ * @type {number}
69
+ * @memberof ResourceSession
70
+ */
71
+ needPracticeCount: number;
72
+ /**
73
+ * Questions in the quiz the learner has not answered in this session.
74
+ * @type {number}
75
+ * @memberof ResourceSession
76
+ */
77
+ remainingCount: number;
78
+ }
79
+ /**
80
+ * @export
81
+ */
82
+ export declare const ResourceSessionStatusEnum: {
83
+ readonly Active: "active";
84
+ readonly Completed: "completed";
85
+ readonly Abandoned: "abandoned";
86
+ };
87
+ export type ResourceSessionStatusEnum = typeof ResourceSessionStatusEnum[keyof typeof ResourceSessionStatusEnum];
88
+ /**
89
+ * Check if a given object implements the ResourceSession interface.
90
+ */
91
+ export declare function instanceOfResourceSession(value: object): value is ResourceSession;
92
+ export declare function ResourceSessionFromJSON(json: any): ResourceSession;
93
+ export declare function ResourceSessionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResourceSession;
94
+ export declare function ResourceSessionToJSON(json: any): ResourceSession;
95
+ export declare function ResourceSessionToJSONTyped(value?: ResourceSession | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,87 @@
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 ResourceSessionStatusEnum = {
18
+ Active: 'active',
19
+ Completed: 'completed',
20
+ Abandoned: 'abandoned'
21
+ };
22
+ /**
23
+ * Check if a given object implements the ResourceSession interface.
24
+ */
25
+ export function instanceOfResourceSession(value) {
26
+ if (!('id' in value) || value['id'] === undefined)
27
+ return false;
28
+ if (!('status' in value) || value['status'] === undefined)
29
+ return false;
30
+ if (!('startedAt' in value) || value['startedAt'] === undefined)
31
+ return false;
32
+ if (!('completedAt' in value) || value['completedAt'] === undefined)
33
+ return false;
34
+ if (!('lastResponseAt' in value) || value['lastResponseAt'] === undefined)
35
+ return false;
36
+ if (!('answeredCount' in value) || value['answeredCount'] === undefined)
37
+ return false;
38
+ if (!('correctCount' in value) || value['correctCount'] === undefined)
39
+ return false;
40
+ if (!('incorrectCount' in value) || value['incorrectCount'] === undefined)
41
+ return false;
42
+ if (!('needPracticeCount' in value) || value['needPracticeCount'] === undefined)
43
+ return false;
44
+ if (!('remainingCount' in value) || value['remainingCount'] === undefined)
45
+ return false;
46
+ return true;
47
+ }
48
+ export function ResourceSessionFromJSON(json) {
49
+ return ResourceSessionFromJSONTyped(json, false);
50
+ }
51
+ export function ResourceSessionFromJSONTyped(json, ignoreDiscriminator) {
52
+ if (json == null) {
53
+ return json;
54
+ }
55
+ return {
56
+ 'id': json['id'],
57
+ 'status': json['status'],
58
+ 'startedAt': (new Date(json['startedAt'])),
59
+ 'completedAt': (json['completedAt'] == null ? null : new Date(json['completedAt'])),
60
+ 'lastResponseAt': (json['lastResponseAt'] == null ? null : new Date(json['lastResponseAt'])),
61
+ 'answeredCount': json['answeredCount'],
62
+ 'correctCount': json['correctCount'],
63
+ 'incorrectCount': json['incorrectCount'],
64
+ 'needPracticeCount': json['needPracticeCount'],
65
+ 'remainingCount': json['remainingCount'],
66
+ };
67
+ }
68
+ export function ResourceSessionToJSON(json) {
69
+ return ResourceSessionToJSONTyped(json, false);
70
+ }
71
+ export function ResourceSessionToJSONTyped(value, ignoreDiscriminator = false) {
72
+ if (value == null) {
73
+ return value;
74
+ }
75
+ return {
76
+ 'id': value['id'],
77
+ 'status': value['status'],
78
+ 'startedAt': value['startedAt'].toISOString(),
79
+ 'completedAt': value['completedAt'] == null ? value['completedAt'] : value['completedAt'].toISOString(),
80
+ 'lastResponseAt': value['lastResponseAt'] == null ? value['lastResponseAt'] : value['lastResponseAt'].toISOString(),
81
+ 'answeredCount': value['answeredCount'],
82
+ 'correctCount': value['correctCount'],
83
+ 'incorrectCount': value['incorrectCount'],
84
+ 'needPracticeCount': value['needPracticeCount'],
85
+ 'remainingCount': value['remainingCount'],
86
+ };
87
+ }