@instructure/athena-api-client 4.0.1 → 4.1.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.
- package/README.md +16 -0
- package/dist/apis/AdminApi.d.ts +12 -12
- package/dist/apis/AdminApi.js +12 -12
- package/dist/apis/ConceptDiagramsApi.d.ts +2 -2
- package/dist/apis/ConceptDiagramsApi.js +2 -2
- package/dist/apis/ConceptImagesApi.d.ts +2 -2
- package/dist/apis/ConceptImagesApi.js +2 -2
- package/dist/apis/StudyGuidesApi.d.ts +112 -0
- package/dist/apis/StudyGuidesApi.js +312 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/AdminApi.d.ts +12 -12
- package/dist/esm/apis/AdminApi.js +12 -12
- package/dist/esm/apis/ConceptDiagramsApi.d.ts +2 -2
- package/dist/esm/apis/ConceptDiagramsApi.js +2 -2
- package/dist/esm/apis/ConceptImagesApi.d.ts +2 -2
- package/dist/esm/apis/ConceptImagesApi.js +2 -2
- package/dist/esm/apis/StudyGuidesApi.d.ts +112 -0
- package/dist/esm/apis/StudyGuidesApi.js +308 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/AdminConceptDiagram.d.ts +7 -1
- package/dist/esm/models/AdminConceptDiagram.js +4 -0
- package/dist/esm/models/AdminConceptDiagramDetail.d.ts +7 -1
- package/dist/esm/models/AdminConceptDiagramDetail.js +4 -0
- package/dist/esm/models/AdminConceptImage.d.ts +7 -1
- package/dist/esm/models/AdminConceptImage.js +4 -0
- package/dist/esm/models/AdminConceptImageDetail.d.ts +7 -1
- package/dist/esm/models/AdminConceptImageDetail.js +4 -0
- package/dist/esm/models/AdminShownConceptDiagram.d.ts +7 -1
- package/dist/esm/models/AdminShownConceptDiagram.js +4 -0
- package/dist/esm/models/AdminShownConceptImage.d.ts +7 -1
- package/dist/esm/models/AdminShownConceptImage.js +4 -0
- package/dist/esm/models/AssociateUserFileRequest.d.ts +1 -0
- package/dist/esm/models/AssociateUserFileRequest.js +2 -1
- package/dist/esm/models/ConceptMediaFlagResult.d.ts +1 -1
- package/dist/esm/models/CreateStudyGuideQuizRequest.d.ts +46 -0
- package/dist/esm/models/CreateStudyGuideQuizRequest.js +50 -0
- package/dist/esm/models/CreateStudyGuideRequest.d.ts +74 -0
- package/dist/esm/models/CreateStudyGuideRequest.js +55 -0
- package/dist/esm/models/PaginatedStudyGuides.d.ts +39 -0
- package/dist/esm/models/PaginatedStudyGuides.js +48 -0
- package/dist/esm/models/RegenerateStudyGuideRequest.d.ts +38 -0
- package/dist/esm/models/RegenerateStudyGuideRequest.js +43 -0
- package/dist/esm/models/StudyGuide.d.ts +153 -0
- package/dist/esm/models/StudyGuide.js +127 -0
- package/dist/esm/models/StudyGuideConcept.d.ts +68 -0
- package/dist/esm/models/StudyGuideConcept.js +67 -0
- package/dist/esm/models/StudyGuideFile.d.ts +56 -0
- package/dist/esm/models/StudyGuideFile.js +59 -0
- package/dist/esm/models/StudyGuideListItem.d.ts +102 -0
- package/dist/esm/models/StudyGuideListItem.js +92 -0
- package/dist/esm/models/StudyGuideQuiz.d.ts +58 -0
- package/dist/esm/models/StudyGuideQuiz.js +62 -0
- package/dist/esm/models/StudyGuideSourceSummary.d.ts +56 -0
- package/dist/esm/models/StudyGuideSourceSummary.js +59 -0
- package/dist/esm/models/UserFileAssociation.d.ts +1 -0
- package/dist/esm/models/UserFileAssociation.js +2 -1
- package/dist/esm/models/index.d.ts +10 -0
- package/dist/esm/models/index.js +10 -0
- package/dist/models/AdminConceptDiagram.d.ts +7 -1
- package/dist/models/AdminConceptDiagram.js +4 -0
- package/dist/models/AdminConceptDiagramDetail.d.ts +7 -1
- package/dist/models/AdminConceptDiagramDetail.js +4 -0
- package/dist/models/AdminConceptImage.d.ts +7 -1
- package/dist/models/AdminConceptImage.js +4 -0
- package/dist/models/AdminConceptImageDetail.d.ts +7 -1
- package/dist/models/AdminConceptImageDetail.js +4 -0
- package/dist/models/AdminShownConceptDiagram.d.ts +7 -1
- package/dist/models/AdminShownConceptDiagram.js +4 -0
- package/dist/models/AdminShownConceptImage.d.ts +7 -1
- package/dist/models/AdminShownConceptImage.js +4 -0
- package/dist/models/AssociateUserFileRequest.d.ts +1 -0
- package/dist/models/AssociateUserFileRequest.js +2 -1
- package/dist/models/ConceptMediaFlagResult.d.ts +1 -1
- package/dist/models/CreateStudyGuideQuizRequest.d.ts +46 -0
- package/dist/models/CreateStudyGuideQuizRequest.js +58 -0
- package/dist/models/CreateStudyGuideRequest.d.ts +74 -0
- package/dist/models/CreateStudyGuideRequest.js +62 -0
- package/dist/models/PaginatedStudyGuides.d.ts +39 -0
- package/dist/models/PaginatedStudyGuides.js +55 -0
- package/dist/models/RegenerateStudyGuideRequest.d.ts +38 -0
- package/dist/models/RegenerateStudyGuideRequest.js +50 -0
- package/dist/models/StudyGuide.d.ts +153 -0
- package/dist/models/StudyGuide.js +135 -0
- package/dist/models/StudyGuideConcept.d.ts +68 -0
- package/dist/models/StudyGuideConcept.js +74 -0
- package/dist/models/StudyGuideFile.d.ts +56 -0
- package/dist/models/StudyGuideFile.js +66 -0
- package/dist/models/StudyGuideListItem.d.ts +102 -0
- package/dist/models/StudyGuideListItem.js +100 -0
- package/dist/models/StudyGuideQuiz.d.ts +58 -0
- package/dist/models/StudyGuideQuiz.js +70 -0
- package/dist/models/StudyGuideSourceSummary.d.ts +56 -0
- package/dist/models/StudyGuideSourceSummary.js +66 -0
- package/dist/models/UserFileAssociation.d.ts +1 -0
- package/dist/models/UserFileAssociation.js +2 -1
- package/dist/models/index.d.ts +10 -0
- package/dist/models/index.js +10 -0
- package/package.json +1 -1
|
@@ -27,7 +27,7 @@ import { ConceptMediaFlagResultFromJSON, PaginatedConceptImagesFromJSON, } from
|
|
|
27
27
|
*/
|
|
28
28
|
export class ConceptImagesApi extends runtime.BaseAPI {
|
|
29
29
|
/**
|
|
30
|
-
* Acts on a learner\'s thumbs-down on a shared concept image. A visible image that no admin has approved is hidden at once, from every learner, until an admin shows it again or shows a revision of it. Any authenticated learner may flag any image id; the calling client is expected to check that the image was shown to this learner. Idempotent: an image that is already hidden or deleted is left as it is (the first hide keeps its time and actor)
|
|
30
|
+
* Acts on a learner\'s thumbs-down on a shared concept image. A visible image that no admin has approved is hidden at once, from every learner, until an admin shows it again or shows a revision of it. Any authenticated learner may flag any image id; the calling client is expected to check that the image was shown to this learner. Idempotent: an image that is already hidden or deleted is left as it is (the first hide keeps its time and actor). An admin-approved image stays visible but goes back in the admins\' flagged list for re-review (flaggedAfterApprovalAt keeps the first such flag). hidden says whether learners are kept from it after the call. Applies to later reads only: a signed URL already handed out stays valid until it expires (12 hours).
|
|
31
31
|
* Flag a concept image so learners stop being shown it
|
|
32
32
|
*/
|
|
33
33
|
flagConceptImageRaw(requestParameters, initOverrides) {
|
|
@@ -58,7 +58,7 @@ export class ConceptImagesApi extends runtime.BaseAPI {
|
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
60
|
/**
|
|
61
|
-
* Acts on a learner\'s thumbs-down on a shared concept image. A visible image that no admin has approved is hidden at once, from every learner, until an admin shows it again or shows a revision of it. Any authenticated learner may flag any image id; the calling client is expected to check that the image was shown to this learner. Idempotent: an image that is already hidden or deleted is left as it is (the first hide keeps its time and actor)
|
|
61
|
+
* Acts on a learner\'s thumbs-down on a shared concept image. A visible image that no admin has approved is hidden at once, from every learner, until an admin shows it again or shows a revision of it. Any authenticated learner may flag any image id; the calling client is expected to check that the image was shown to this learner. Idempotent: an image that is already hidden or deleted is left as it is (the first hide keeps its time and actor). An admin-approved image stays visible but goes back in the admins\' flagged list for re-review (flaggedAfterApprovalAt keeps the first such flag). hidden says whether learners are kept from it after the call. Applies to later reads only: a signed URL already handed out stays valid until it expires (12 hours).
|
|
62
62
|
* Flag a concept image so learners stop being shown it
|
|
63
63
|
*/
|
|
64
64
|
flagConceptImage(requestParameters, initOverrides) {
|
|
@@ -0,0 +1,112 @@
|
|
|
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 { CreateStudyGuideQuizRequest, CreateStudyGuideRequest, PaginatedStudyGuides, RegenerateStudyGuideRequest, StudyGuide, StudyGuideQuiz } from '../models/index';
|
|
14
|
+
export interface CreateStudyGuideOperationRequest {
|
|
15
|
+
xUserId: string;
|
|
16
|
+
createStudyGuideRequest: CreateStudyGuideRequest;
|
|
17
|
+
xCanvasDomain?: string;
|
|
18
|
+
xCanvasToken?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface CreateStudyGuideQuizOperationRequest {
|
|
21
|
+
xUserId: string;
|
|
22
|
+
studyGuideId: string;
|
|
23
|
+
createStudyGuideQuizRequest: CreateStudyGuideQuizRequest;
|
|
24
|
+
}
|
|
25
|
+
export interface DeleteStudyGuideRequest {
|
|
26
|
+
xUserId: string;
|
|
27
|
+
studyGuideId: string;
|
|
28
|
+
}
|
|
29
|
+
export interface GetStudyGuideRequest {
|
|
30
|
+
xUserId: string;
|
|
31
|
+
studyGuideId: string;
|
|
32
|
+
}
|
|
33
|
+
export interface ListStudyGuidesRequest {
|
|
34
|
+
xUserId: string;
|
|
35
|
+
limit?: number;
|
|
36
|
+
cursor?: string;
|
|
37
|
+
studySpaceId?: string;
|
|
38
|
+
studyObjectiveId?: string;
|
|
39
|
+
courseId?: string;
|
|
40
|
+
}
|
|
41
|
+
export interface RegenerateStudyGuideOperationRequest {
|
|
42
|
+
xUserId: string;
|
|
43
|
+
studyGuideId: string;
|
|
44
|
+
regenerateStudyGuideRequest: RegenerateStudyGuideRequest;
|
|
45
|
+
xCanvasDomain?: string;
|
|
46
|
+
xCanvasToken?: string;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
*/
|
|
51
|
+
export declare class StudyGuidesApi extends runtime.BaseAPI {
|
|
52
|
+
/**
|
|
53
|
+
* Creates a study guide for one assessment and starts generation in the background; the row comes back in status \'generating\' and the client polls GET /api/v1/study-guides/{studyGuideId}. Generation reads the linked Canvas assessment and course syllabus (with Canvas credentials), the linked study objective\'s notes, attachments and extracted concepts, the learner\'s own context, and any attached user files. It refuses (\'needs-context\') when none of that says what the assessment covers.
|
|
54
|
+
* Create a study guide and start generating it
|
|
55
|
+
*/
|
|
56
|
+
createStudyGuideRaw(requestParameters: CreateStudyGuideOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StudyGuide>>;
|
|
57
|
+
/**
|
|
58
|
+
* Creates a study guide for one assessment and starts generation in the background; the row comes back in status \'generating\' and the client polls GET /api/v1/study-guides/{studyGuideId}. Generation reads the linked Canvas assessment and course syllabus (with Canvas credentials), the linked study objective\'s notes, attachments and extracted concepts, the learner\'s own context, and any attached user files. It refuses (\'needs-context\') when none of that says what the assessment covers.
|
|
59
|
+
* Create a study guide and start generating it
|
|
60
|
+
*/
|
|
61
|
+
createStudyGuide(requestParameters: CreateStudyGuideOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StudyGuide>;
|
|
62
|
+
/**
|
|
63
|
+
* Generates and persists a quiz (or flashcard deck) from the guide\'s concepts, at least one question per concept, with every question bound to its concept id. Omit conceptIds for the whole guide. Synchronous: the response carries the quiz id to open a session on.
|
|
64
|
+
* Build a quiz or flashcard deck from a study guide
|
|
65
|
+
*/
|
|
66
|
+
createStudyGuideQuizRaw(requestParameters: CreateStudyGuideQuizOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StudyGuideQuiz>>;
|
|
67
|
+
/**
|
|
68
|
+
* Generates and persists a quiz (or flashcard deck) from the guide\'s concepts, at least one question per concept, with every question bound to its concept id. Omit conceptIds for the whole guide. Synchronous: the response carries the quiz id to open a session on.
|
|
69
|
+
* Build a quiz or flashcard deck from a study guide
|
|
70
|
+
*/
|
|
71
|
+
createStudyGuideQuiz(requestParameters: CreateStudyGuideQuizOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StudyGuideQuiz>;
|
|
72
|
+
/**
|
|
73
|
+
* Removes the guide and its concept list. Attached user files are detached, not deleted; quizzes built from the guide remain.
|
|
74
|
+
* Delete a study guide
|
|
75
|
+
*/
|
|
76
|
+
deleteStudyGuideRaw(requestParameters: DeleteStudyGuideRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
77
|
+
/**
|
|
78
|
+
* Removes the guide and its concept list. Attached user files are detached, not deleted; quizzes built from the guide remain.
|
|
79
|
+
* Delete a study guide
|
|
80
|
+
*/
|
|
81
|
+
deleteStudyGuide(requestParameters: DeleteStudyGuideRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
82
|
+
/**
|
|
83
|
+
* Returns the guide, its concepts in display order, its attached files, and its generation status. Poll while status is \'generating\'.
|
|
84
|
+
* Get a study guide with its concepts
|
|
85
|
+
*/
|
|
86
|
+
getStudyGuideRaw(requestParameters: GetStudyGuideRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StudyGuide>>;
|
|
87
|
+
/**
|
|
88
|
+
* Returns the guide, its concepts in display order, its attached files, and its generation status. Poll while status is \'generating\'.
|
|
89
|
+
* Get a study guide with its concepts
|
|
90
|
+
*/
|
|
91
|
+
getStudyGuide(requestParameters: GetStudyGuideRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StudyGuide>;
|
|
92
|
+
/**
|
|
93
|
+
* Newest first, with a concept count per guide. Optionally scoped to a study space, study objective, or Canvas course.
|
|
94
|
+
* List the learner\'s study guides
|
|
95
|
+
*/
|
|
96
|
+
listStudyGuidesRaw(requestParameters: ListStudyGuidesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedStudyGuides>>;
|
|
97
|
+
/**
|
|
98
|
+
* Newest first, with a concept count per guide. Optionally scoped to a study space, study objective, or Canvas course.
|
|
99
|
+
* List the learner\'s study guides
|
|
100
|
+
*/
|
|
101
|
+
listStudyGuides(requestParameters: ListStudyGuidesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedStudyGuides>;
|
|
102
|
+
/**
|
|
103
|
+
* Appends the learner\'s additional context and files, then generates again. This is how a \'needs-context\' guide becomes a ready one. A ready guide can also be regenerated to refine it.
|
|
104
|
+
* Regenerate a study guide with more context
|
|
105
|
+
*/
|
|
106
|
+
regenerateStudyGuideRaw(requestParameters: RegenerateStudyGuideOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StudyGuide>>;
|
|
107
|
+
/**
|
|
108
|
+
* Appends the learner\'s additional context and files, then generates again. This is how a \'needs-context\' guide becomes a ready one. A ready guide can also be regenerated to refine it.
|
|
109
|
+
* Regenerate a study guide with more context
|
|
110
|
+
*/
|
|
111
|
+
regenerateStudyGuide(requestParameters: RegenerateStudyGuideOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StudyGuide>;
|
|
112
|
+
}
|
|
@@ -0,0 +1,308 @@
|
|
|
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 { CreateStudyGuideQuizRequestToJSON, CreateStudyGuideRequestToJSON, PaginatedStudyGuidesFromJSON, RegenerateStudyGuideRequestToJSON, StudyGuideFromJSON, StudyGuideQuizFromJSON, } from '../models/index';
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export class StudyGuidesApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Creates a study guide for one assessment and starts generation in the background; the row comes back in status \'generating\' and the client polls GET /api/v1/study-guides/{studyGuideId}. Generation reads the linked Canvas assessment and course syllabus (with Canvas credentials), the linked study objective\'s notes, attachments and extracted concepts, the learner\'s own context, and any attached user files. It refuses (\'needs-context\') when none of that says what the assessment covers.
|
|
31
|
+
* Create a study guide and start generating it
|
|
32
|
+
*/
|
|
33
|
+
createStudyGuideRaw(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 createStudyGuide().');
|
|
37
|
+
}
|
|
38
|
+
if (requestParameters['createStudyGuideRequest'] == null) {
|
|
39
|
+
throw new runtime.RequiredError('createStudyGuideRequest', 'Required parameter "createStudyGuideRequest" was null or undefined when calling createStudyGuide().');
|
|
40
|
+
}
|
|
41
|
+
const queryParameters = {};
|
|
42
|
+
const headerParameters = {};
|
|
43
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
44
|
+
if (requestParameters['xUserId'] != null) {
|
|
45
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
46
|
+
}
|
|
47
|
+
if (requestParameters['xCanvasDomain'] != null) {
|
|
48
|
+
headerParameters['X-Canvas-Domain'] = String(requestParameters['xCanvasDomain']);
|
|
49
|
+
}
|
|
50
|
+
if (requestParameters['xCanvasToken'] != null) {
|
|
51
|
+
headerParameters['X-Canvas-Token'] = String(requestParameters['xCanvasToken']);
|
|
52
|
+
}
|
|
53
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
54
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
55
|
+
}
|
|
56
|
+
let urlPath = `/api/v1/study-guides`;
|
|
57
|
+
const response = yield this.request({
|
|
58
|
+
path: urlPath,
|
|
59
|
+
method: 'POST',
|
|
60
|
+
headers: headerParameters,
|
|
61
|
+
query: queryParameters,
|
|
62
|
+
body: CreateStudyGuideRequestToJSON(requestParameters['createStudyGuideRequest']),
|
|
63
|
+
}, initOverrides);
|
|
64
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => StudyGuideFromJSON(jsonValue));
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Creates a study guide for one assessment and starts generation in the background; the row comes back in status \'generating\' and the client polls GET /api/v1/study-guides/{studyGuideId}. Generation reads the linked Canvas assessment and course syllabus (with Canvas credentials), the linked study objective\'s notes, attachments and extracted concepts, the learner\'s own context, and any attached user files. It refuses (\'needs-context\') when none of that says what the assessment covers.
|
|
69
|
+
* Create a study guide and start generating it
|
|
70
|
+
*/
|
|
71
|
+
createStudyGuide(requestParameters, initOverrides) {
|
|
72
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
73
|
+
const response = yield this.createStudyGuideRaw(requestParameters, initOverrides);
|
|
74
|
+
return yield response.value();
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Generates and persists a quiz (or flashcard deck) from the guide\'s concepts, at least one question per concept, with every question bound to its concept id. Omit conceptIds for the whole guide. Synchronous: the response carries the quiz id to open a session on.
|
|
79
|
+
* Build a quiz or flashcard deck from a study guide
|
|
80
|
+
*/
|
|
81
|
+
createStudyGuideQuizRaw(requestParameters, initOverrides) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
if (requestParameters['xUserId'] == null) {
|
|
84
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling createStudyGuideQuiz().');
|
|
85
|
+
}
|
|
86
|
+
if (requestParameters['studyGuideId'] == null) {
|
|
87
|
+
throw new runtime.RequiredError('studyGuideId', 'Required parameter "studyGuideId" was null or undefined when calling createStudyGuideQuiz().');
|
|
88
|
+
}
|
|
89
|
+
if (requestParameters['createStudyGuideQuizRequest'] == null) {
|
|
90
|
+
throw new runtime.RequiredError('createStudyGuideQuizRequest', 'Required parameter "createStudyGuideQuizRequest" was null or undefined when calling createStudyGuideQuiz().');
|
|
91
|
+
}
|
|
92
|
+
const queryParameters = {};
|
|
93
|
+
const headerParameters = {};
|
|
94
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
95
|
+
if (requestParameters['xUserId'] != null) {
|
|
96
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
97
|
+
}
|
|
98
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
99
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
100
|
+
}
|
|
101
|
+
let urlPath = `/api/v1/study-guides/{studyGuideId}/quizzes`;
|
|
102
|
+
urlPath = urlPath.replace(`{${"studyGuideId"}}`, encodeURIComponent(String(requestParameters['studyGuideId'])));
|
|
103
|
+
const response = yield this.request({
|
|
104
|
+
path: urlPath,
|
|
105
|
+
method: 'POST',
|
|
106
|
+
headers: headerParameters,
|
|
107
|
+
query: queryParameters,
|
|
108
|
+
body: CreateStudyGuideQuizRequestToJSON(requestParameters['createStudyGuideQuizRequest']),
|
|
109
|
+
}, initOverrides);
|
|
110
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => StudyGuideQuizFromJSON(jsonValue));
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Generates and persists a quiz (or flashcard deck) from the guide\'s concepts, at least one question per concept, with every question bound to its concept id. Omit conceptIds for the whole guide. Synchronous: the response carries the quiz id to open a session on.
|
|
115
|
+
* Build a quiz or flashcard deck from a study guide
|
|
116
|
+
*/
|
|
117
|
+
createStudyGuideQuiz(requestParameters, initOverrides) {
|
|
118
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
119
|
+
const response = yield this.createStudyGuideQuizRaw(requestParameters, initOverrides);
|
|
120
|
+
return yield response.value();
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Removes the guide and its concept list. Attached user files are detached, not deleted; quizzes built from the guide remain.
|
|
125
|
+
* Delete a study guide
|
|
126
|
+
*/
|
|
127
|
+
deleteStudyGuideRaw(requestParameters, initOverrides) {
|
|
128
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
129
|
+
if (requestParameters['xUserId'] == null) {
|
|
130
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling deleteStudyGuide().');
|
|
131
|
+
}
|
|
132
|
+
if (requestParameters['studyGuideId'] == null) {
|
|
133
|
+
throw new runtime.RequiredError('studyGuideId', 'Required parameter "studyGuideId" was null or undefined when calling deleteStudyGuide().');
|
|
134
|
+
}
|
|
135
|
+
const queryParameters = {};
|
|
136
|
+
const headerParameters = {};
|
|
137
|
+
if (requestParameters['xUserId'] != null) {
|
|
138
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
139
|
+
}
|
|
140
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
141
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
142
|
+
}
|
|
143
|
+
let urlPath = `/api/v1/study-guides/{studyGuideId}`;
|
|
144
|
+
urlPath = urlPath.replace(`{${"studyGuideId"}}`, encodeURIComponent(String(requestParameters['studyGuideId'])));
|
|
145
|
+
const response = yield this.request({
|
|
146
|
+
path: urlPath,
|
|
147
|
+
method: 'DELETE',
|
|
148
|
+
headers: headerParameters,
|
|
149
|
+
query: queryParameters,
|
|
150
|
+
}, initOverrides);
|
|
151
|
+
return new runtime.VoidApiResponse(response);
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Removes the guide and its concept list. Attached user files are detached, not deleted; quizzes built from the guide remain.
|
|
156
|
+
* Delete a study guide
|
|
157
|
+
*/
|
|
158
|
+
deleteStudyGuide(requestParameters, initOverrides) {
|
|
159
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
160
|
+
yield this.deleteStudyGuideRaw(requestParameters, initOverrides);
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Returns the guide, its concepts in display order, its attached files, and its generation status. Poll while status is \'generating\'.
|
|
165
|
+
* Get a study guide with its concepts
|
|
166
|
+
*/
|
|
167
|
+
getStudyGuideRaw(requestParameters, initOverrides) {
|
|
168
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
169
|
+
if (requestParameters['xUserId'] == null) {
|
|
170
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling getStudyGuide().');
|
|
171
|
+
}
|
|
172
|
+
if (requestParameters['studyGuideId'] == null) {
|
|
173
|
+
throw new runtime.RequiredError('studyGuideId', 'Required parameter "studyGuideId" was null or undefined when calling getStudyGuide().');
|
|
174
|
+
}
|
|
175
|
+
const queryParameters = {};
|
|
176
|
+
const headerParameters = {};
|
|
177
|
+
if (requestParameters['xUserId'] != null) {
|
|
178
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
179
|
+
}
|
|
180
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
181
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
182
|
+
}
|
|
183
|
+
let urlPath = `/api/v1/study-guides/{studyGuideId}`;
|
|
184
|
+
urlPath = urlPath.replace(`{${"studyGuideId"}}`, encodeURIComponent(String(requestParameters['studyGuideId'])));
|
|
185
|
+
const response = yield this.request({
|
|
186
|
+
path: urlPath,
|
|
187
|
+
method: 'GET',
|
|
188
|
+
headers: headerParameters,
|
|
189
|
+
query: queryParameters,
|
|
190
|
+
}, initOverrides);
|
|
191
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => StudyGuideFromJSON(jsonValue));
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Returns the guide, its concepts in display order, its attached files, and its generation status. Poll while status is \'generating\'.
|
|
196
|
+
* Get a study guide with its concepts
|
|
197
|
+
*/
|
|
198
|
+
getStudyGuide(requestParameters, initOverrides) {
|
|
199
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
200
|
+
const response = yield this.getStudyGuideRaw(requestParameters, initOverrides);
|
|
201
|
+
return yield response.value();
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Newest first, with a concept count per guide. Optionally scoped to a study space, study objective, or Canvas course.
|
|
206
|
+
* List the learner\'s study guides
|
|
207
|
+
*/
|
|
208
|
+
listStudyGuidesRaw(requestParameters, initOverrides) {
|
|
209
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
210
|
+
if (requestParameters['xUserId'] == null) {
|
|
211
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling listStudyGuides().');
|
|
212
|
+
}
|
|
213
|
+
const queryParameters = {};
|
|
214
|
+
if (requestParameters['limit'] != null) {
|
|
215
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
216
|
+
}
|
|
217
|
+
if (requestParameters['cursor'] != null) {
|
|
218
|
+
queryParameters['cursor'] = requestParameters['cursor'];
|
|
219
|
+
}
|
|
220
|
+
if (requestParameters['studySpaceId'] != null) {
|
|
221
|
+
queryParameters['studySpaceId'] = requestParameters['studySpaceId'];
|
|
222
|
+
}
|
|
223
|
+
if (requestParameters['studyObjectiveId'] != null) {
|
|
224
|
+
queryParameters['studyObjectiveId'] = requestParameters['studyObjectiveId'];
|
|
225
|
+
}
|
|
226
|
+
if (requestParameters['courseId'] != null) {
|
|
227
|
+
queryParameters['courseId'] = requestParameters['courseId'];
|
|
228
|
+
}
|
|
229
|
+
const headerParameters = {};
|
|
230
|
+
if (requestParameters['xUserId'] != null) {
|
|
231
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
232
|
+
}
|
|
233
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
234
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
235
|
+
}
|
|
236
|
+
let urlPath = `/api/v1/study-guides`;
|
|
237
|
+
const response = yield this.request({
|
|
238
|
+
path: urlPath,
|
|
239
|
+
method: 'GET',
|
|
240
|
+
headers: headerParameters,
|
|
241
|
+
query: queryParameters,
|
|
242
|
+
}, initOverrides);
|
|
243
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedStudyGuidesFromJSON(jsonValue));
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Newest first, with a concept count per guide. Optionally scoped to a study space, study objective, or Canvas course.
|
|
248
|
+
* List the learner\'s study guides
|
|
249
|
+
*/
|
|
250
|
+
listStudyGuides(requestParameters, initOverrides) {
|
|
251
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
252
|
+
const response = yield this.listStudyGuidesRaw(requestParameters, initOverrides);
|
|
253
|
+
return yield response.value();
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Appends the learner\'s additional context and files, then generates again. This is how a \'needs-context\' guide becomes a ready one. A ready guide can also be regenerated to refine it.
|
|
258
|
+
* Regenerate a study guide with more context
|
|
259
|
+
*/
|
|
260
|
+
regenerateStudyGuideRaw(requestParameters, initOverrides) {
|
|
261
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
262
|
+
if (requestParameters['xUserId'] == null) {
|
|
263
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling regenerateStudyGuide().');
|
|
264
|
+
}
|
|
265
|
+
if (requestParameters['studyGuideId'] == null) {
|
|
266
|
+
throw new runtime.RequiredError('studyGuideId', 'Required parameter "studyGuideId" was null or undefined when calling regenerateStudyGuide().');
|
|
267
|
+
}
|
|
268
|
+
if (requestParameters['regenerateStudyGuideRequest'] == null) {
|
|
269
|
+
throw new runtime.RequiredError('regenerateStudyGuideRequest', 'Required parameter "regenerateStudyGuideRequest" was null or undefined when calling regenerateStudyGuide().');
|
|
270
|
+
}
|
|
271
|
+
const queryParameters = {};
|
|
272
|
+
const headerParameters = {};
|
|
273
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
274
|
+
if (requestParameters['xUserId'] != null) {
|
|
275
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
276
|
+
}
|
|
277
|
+
if (requestParameters['xCanvasDomain'] != null) {
|
|
278
|
+
headerParameters['X-Canvas-Domain'] = String(requestParameters['xCanvasDomain']);
|
|
279
|
+
}
|
|
280
|
+
if (requestParameters['xCanvasToken'] != null) {
|
|
281
|
+
headerParameters['X-Canvas-Token'] = String(requestParameters['xCanvasToken']);
|
|
282
|
+
}
|
|
283
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
284
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
285
|
+
}
|
|
286
|
+
let urlPath = `/api/v1/study-guides/{studyGuideId}/regenerate`;
|
|
287
|
+
urlPath = urlPath.replace(`{${"studyGuideId"}}`, encodeURIComponent(String(requestParameters['studyGuideId'])));
|
|
288
|
+
const response = yield this.request({
|
|
289
|
+
path: urlPath,
|
|
290
|
+
method: 'POST',
|
|
291
|
+
headers: headerParameters,
|
|
292
|
+
query: queryParameters,
|
|
293
|
+
body: RegenerateStudyGuideRequestToJSON(requestParameters['regenerateStudyGuideRequest']),
|
|
294
|
+
}, initOverrides);
|
|
295
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => StudyGuideFromJSON(jsonValue));
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Appends the learner\'s additional context and files, then generates again. This is how a \'needs-context\' guide becomes a ready one. A ready guide can also be regenerated to refine it.
|
|
300
|
+
* Regenerate a study guide with more context
|
|
301
|
+
*/
|
|
302
|
+
regenerateStudyGuide(requestParameters, initOverrides) {
|
|
303
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
304
|
+
const response = yield this.regenerateStudyGuideRaw(requestParameters, initOverrides);
|
|
305
|
+
return yield response.value();
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
}
|
package/dist/esm/apis/index.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export * from './QuizzesApi';
|
|
|
23
23
|
export * from './ResourcesApi';
|
|
24
24
|
export * from './ServiceTokensApi';
|
|
25
25
|
export * from './SharedQuizzesApi';
|
|
26
|
+
export * from './StudyGuidesApi';
|
|
26
27
|
export * from './StudyObjectiveConceptsApi';
|
|
27
28
|
export * from './StudyObjectivesApi';
|
|
28
29
|
export * from './StudyPlansApi';
|
package/dist/esm/apis/index.js
CHANGED
|
@@ -25,6 +25,7 @@ export * from './QuizzesApi';
|
|
|
25
25
|
export * from './ResourcesApi';
|
|
26
26
|
export * from './ServiceTokensApi';
|
|
27
27
|
export * from './SharedQuizzesApi';
|
|
28
|
+
export * from './StudyGuidesApi';
|
|
28
29
|
export * from './StudyObjectiveConceptsApi';
|
|
29
30
|
export * from './StudyObjectivesApi';
|
|
30
31
|
export * from './StudyPlansApi';
|
|
@@ -84,7 +84,7 @@ export interface AdminConceptDiagram {
|
|
|
84
84
|
*/
|
|
85
85
|
hiddenByFlag: boolean;
|
|
86
86
|
/**
|
|
87
|
-
* When an admin last showed (approved) it. A learner flag never hides an approved row. Cleared when an admin hides it again (hide, restore, or showing another version with hideOtherVersions).
|
|
87
|
+
* When an admin last showed (approved) it. A learner flag never hides an approved row (see flaggedAfterApprovalAt). Cleared when an admin hides it again (hide, restore, or showing another version with hideOtherVersions).
|
|
88
88
|
* @type {Date}
|
|
89
89
|
* @memberof AdminConceptDiagram
|
|
90
90
|
*/
|
|
@@ -95,6 +95,12 @@ export interface AdminConceptDiagram {
|
|
|
95
95
|
* @memberof AdminConceptDiagram
|
|
96
96
|
*/
|
|
97
97
|
approvedBy: AdminConceptMediaActor | null;
|
|
98
|
+
/**
|
|
99
|
+
* When a learner first flagged it after an admin approved it. The flag leaves an approved row visible, so this is what puts it back in state=flagged for re-review. Null when no flag has come in since the last admin show or hide; cleared by show, hide, restore, and by showing another version with hideOtherVersions.
|
|
100
|
+
* @type {Date}
|
|
101
|
+
* @memberof AdminConceptDiagram
|
|
102
|
+
*/
|
|
103
|
+
flaggedAfterApprovalAt: Date | null;
|
|
98
104
|
/**
|
|
99
105
|
*
|
|
100
106
|
* @type {Date}
|
|
@@ -58,6 +58,8 @@ export function instanceOfAdminConceptDiagram(value) {
|
|
|
58
58
|
return false;
|
|
59
59
|
if (!('approvedBy' in value) || value['approvedBy'] === undefined)
|
|
60
60
|
return false;
|
|
61
|
+
if (!('flaggedAfterApprovalAt' in value) || value['flaggedAfterApprovalAt'] === undefined)
|
|
62
|
+
return false;
|
|
61
63
|
if (!('deletedAt' in value) || value['deletedAt'] === undefined)
|
|
62
64
|
return false;
|
|
63
65
|
if (!('deletedBy' in value) || value['deletedBy'] === undefined)
|
|
@@ -101,6 +103,7 @@ export function AdminConceptDiagramFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
101
103
|
'hiddenByFlag': json['hiddenByFlag'],
|
|
102
104
|
'approvedAt': (json['approvedAt'] == null ? null : new Date(json['approvedAt'])),
|
|
103
105
|
'approvedBy': AdminConceptMediaActorFromJSON(json['approvedBy']),
|
|
106
|
+
'flaggedAfterApprovalAt': (json['flaggedAfterApprovalAt'] == null ? null : new Date(json['flaggedAfterApprovalAt'])),
|
|
104
107
|
'deletedAt': (json['deletedAt'] == null ? null : new Date(json['deletedAt'])),
|
|
105
108
|
'deletedBy': AdminConceptMediaActorFromJSON(json['deletedBy']),
|
|
106
109
|
'model': json['model'],
|
|
@@ -134,6 +137,7 @@ export function AdminConceptDiagramToJSONTyped(value, ignoreDiscriminator = fals
|
|
|
134
137
|
'hiddenByFlag': value['hiddenByFlag'],
|
|
135
138
|
'approvedAt': value['approvedAt'] == null ? value['approvedAt'] : value['approvedAt'].toISOString(),
|
|
136
139
|
'approvedBy': AdminConceptMediaActorToJSON(value['approvedBy']),
|
|
140
|
+
'flaggedAfterApprovalAt': value['flaggedAfterApprovalAt'] == null ? value['flaggedAfterApprovalAt'] : value['flaggedAfterApprovalAt'].toISOString(),
|
|
137
141
|
'deletedAt': value['deletedAt'] == null ? value['deletedAt'] : value['deletedAt'].toISOString(),
|
|
138
142
|
'deletedBy': AdminConceptMediaActorToJSON(value['deletedBy']),
|
|
139
143
|
'model': value['model'],
|
|
@@ -86,7 +86,7 @@ export interface AdminConceptDiagramDetail {
|
|
|
86
86
|
*/
|
|
87
87
|
hiddenByFlag: boolean;
|
|
88
88
|
/**
|
|
89
|
-
* When an admin last showed (approved) it. A learner flag never hides an approved row. Cleared when an admin hides it again (hide, restore, or showing another version with hideOtherVersions).
|
|
89
|
+
* When an admin last showed (approved) it. A learner flag never hides an approved row (see flaggedAfterApprovalAt). Cleared when an admin hides it again (hide, restore, or showing another version with hideOtherVersions).
|
|
90
90
|
* @type {Date}
|
|
91
91
|
* @memberof AdminConceptDiagramDetail
|
|
92
92
|
*/
|
|
@@ -97,6 +97,12 @@ export interface AdminConceptDiagramDetail {
|
|
|
97
97
|
* @memberof AdminConceptDiagramDetail
|
|
98
98
|
*/
|
|
99
99
|
approvedBy: AdminConceptMediaActor | null;
|
|
100
|
+
/**
|
|
101
|
+
* When a learner first flagged it after an admin approved it. The flag leaves an approved row visible, so this is what puts it back in state=flagged for re-review. Null when no flag has come in since the last admin show or hide; cleared by show, hide, restore, and by showing another version with hideOtherVersions.
|
|
102
|
+
* @type {Date}
|
|
103
|
+
* @memberof AdminConceptDiagramDetail
|
|
104
|
+
*/
|
|
105
|
+
flaggedAfterApprovalAt: Date | null;
|
|
100
106
|
/**
|
|
101
107
|
*
|
|
102
108
|
* @type {Date}
|
|
@@ -60,6 +60,8 @@ export function instanceOfAdminConceptDiagramDetail(value) {
|
|
|
60
60
|
return false;
|
|
61
61
|
if (!('approvedBy' in value) || value['approvedBy'] === undefined)
|
|
62
62
|
return false;
|
|
63
|
+
if (!('flaggedAfterApprovalAt' in value) || value['flaggedAfterApprovalAt'] === undefined)
|
|
64
|
+
return false;
|
|
63
65
|
if (!('deletedAt' in value) || value['deletedAt'] === undefined)
|
|
64
66
|
return false;
|
|
65
67
|
if (!('deletedBy' in value) || value['deletedBy'] === undefined)
|
|
@@ -115,6 +117,7 @@ export function AdminConceptDiagramDetailFromJSONTyped(json, ignoreDiscriminator
|
|
|
115
117
|
'hiddenByFlag': json['hiddenByFlag'],
|
|
116
118
|
'approvedAt': (json['approvedAt'] == null ? null : new Date(json['approvedAt'])),
|
|
117
119
|
'approvedBy': AdminConceptMediaActorFromJSON(json['approvedBy']),
|
|
120
|
+
'flaggedAfterApprovalAt': (json['flaggedAfterApprovalAt'] == null ? null : new Date(json['flaggedAfterApprovalAt'])),
|
|
118
121
|
'deletedAt': (json['deletedAt'] == null ? null : new Date(json['deletedAt'])),
|
|
119
122
|
'deletedBy': AdminConceptMediaActorFromJSON(json['deletedBy']),
|
|
120
123
|
'model': json['model'],
|
|
@@ -154,6 +157,7 @@ export function AdminConceptDiagramDetailToJSONTyped(value, ignoreDiscriminator
|
|
|
154
157
|
'hiddenByFlag': value['hiddenByFlag'],
|
|
155
158
|
'approvedAt': value['approvedAt'] == null ? value['approvedAt'] : value['approvedAt'].toISOString(),
|
|
156
159
|
'approvedBy': AdminConceptMediaActorToJSON(value['approvedBy']),
|
|
160
|
+
'flaggedAfterApprovalAt': value['flaggedAfterApprovalAt'] == null ? value['flaggedAfterApprovalAt'] : value['flaggedAfterApprovalAt'].toISOString(),
|
|
157
161
|
'deletedAt': value['deletedAt'] == null ? value['deletedAt'] : value['deletedAt'].toISOString(),
|
|
158
162
|
'deletedBy': AdminConceptMediaActorToJSON(value['deletedBy']),
|
|
159
163
|
'model': value['model'],
|
|
@@ -84,7 +84,7 @@ export interface AdminConceptImage {
|
|
|
84
84
|
*/
|
|
85
85
|
hiddenByFlag: boolean;
|
|
86
86
|
/**
|
|
87
|
-
* When an admin last showed (approved) it. A learner flag never hides an approved row. Cleared when an admin hides it again (hide, restore, or showing another version with hideOtherVersions).
|
|
87
|
+
* When an admin last showed (approved) it. A learner flag never hides an approved row (see flaggedAfterApprovalAt). Cleared when an admin hides it again (hide, restore, or showing another version with hideOtherVersions).
|
|
88
88
|
* @type {Date}
|
|
89
89
|
* @memberof AdminConceptImage
|
|
90
90
|
*/
|
|
@@ -95,6 +95,12 @@ export interface AdminConceptImage {
|
|
|
95
95
|
* @memberof AdminConceptImage
|
|
96
96
|
*/
|
|
97
97
|
approvedBy: AdminConceptMediaActor | null;
|
|
98
|
+
/**
|
|
99
|
+
* When a learner first flagged it after an admin approved it. The flag leaves an approved row visible, so this is what puts it back in state=flagged for re-review. Null when no flag has come in since the last admin show or hide; cleared by show, hide, restore, and by showing another version with hideOtherVersions.
|
|
100
|
+
* @type {Date}
|
|
101
|
+
* @memberof AdminConceptImage
|
|
102
|
+
*/
|
|
103
|
+
flaggedAfterApprovalAt: Date | null;
|
|
98
104
|
/**
|
|
99
105
|
*
|
|
100
106
|
* @type {Date}
|
|
@@ -58,6 +58,8 @@ export function instanceOfAdminConceptImage(value) {
|
|
|
58
58
|
return false;
|
|
59
59
|
if (!('approvedBy' in value) || value['approvedBy'] === undefined)
|
|
60
60
|
return false;
|
|
61
|
+
if (!('flaggedAfterApprovalAt' in value) || value['flaggedAfterApprovalAt'] === undefined)
|
|
62
|
+
return false;
|
|
61
63
|
if (!('deletedAt' in value) || value['deletedAt'] === undefined)
|
|
62
64
|
return false;
|
|
63
65
|
if (!('deletedBy' in value) || value['deletedBy'] === undefined)
|
|
@@ -107,6 +109,7 @@ export function AdminConceptImageFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
107
109
|
'hiddenByFlag': json['hiddenByFlag'],
|
|
108
110
|
'approvedAt': (json['approvedAt'] == null ? null : new Date(json['approvedAt'])),
|
|
109
111
|
'approvedBy': AdminConceptMediaActorFromJSON(json['approvedBy']),
|
|
112
|
+
'flaggedAfterApprovalAt': (json['flaggedAfterApprovalAt'] == null ? null : new Date(json['flaggedAfterApprovalAt'])),
|
|
110
113
|
'deletedAt': (json['deletedAt'] == null ? null : new Date(json['deletedAt'])),
|
|
111
114
|
'deletedBy': AdminConceptMediaActorFromJSON(json['deletedBy']),
|
|
112
115
|
'model': json['model'],
|
|
@@ -143,6 +146,7 @@ export function AdminConceptImageToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
143
146
|
'hiddenByFlag': value['hiddenByFlag'],
|
|
144
147
|
'approvedAt': value['approvedAt'] == null ? value['approvedAt'] : value['approvedAt'].toISOString(),
|
|
145
148
|
'approvedBy': AdminConceptMediaActorToJSON(value['approvedBy']),
|
|
149
|
+
'flaggedAfterApprovalAt': value['flaggedAfterApprovalAt'] == null ? value['flaggedAfterApprovalAt'] : value['flaggedAfterApprovalAt'].toISOString(),
|
|
146
150
|
'deletedAt': value['deletedAt'] == null ? value['deletedAt'] : value['deletedAt'].toISOString(),
|
|
147
151
|
'deletedBy': AdminConceptMediaActorToJSON(value['deletedBy']),
|
|
148
152
|
'model': value['model'],
|
|
@@ -86,7 +86,7 @@ export interface AdminConceptImageDetail {
|
|
|
86
86
|
*/
|
|
87
87
|
hiddenByFlag: boolean;
|
|
88
88
|
/**
|
|
89
|
-
* When an admin last showed (approved) it. A learner flag never hides an approved row. Cleared when an admin hides it again (hide, restore, or showing another version with hideOtherVersions).
|
|
89
|
+
* When an admin last showed (approved) it. A learner flag never hides an approved row (see flaggedAfterApprovalAt). Cleared when an admin hides it again (hide, restore, or showing another version with hideOtherVersions).
|
|
90
90
|
* @type {Date}
|
|
91
91
|
* @memberof AdminConceptImageDetail
|
|
92
92
|
*/
|
|
@@ -97,6 +97,12 @@ export interface AdminConceptImageDetail {
|
|
|
97
97
|
* @memberof AdminConceptImageDetail
|
|
98
98
|
*/
|
|
99
99
|
approvedBy: AdminConceptMediaActor | null;
|
|
100
|
+
/**
|
|
101
|
+
* When a learner first flagged it after an admin approved it. The flag leaves an approved row visible, so this is what puts it back in state=flagged for re-review. Null when no flag has come in since the last admin show or hide; cleared by show, hide, restore, and by showing another version with hideOtherVersions.
|
|
102
|
+
* @type {Date}
|
|
103
|
+
* @memberof AdminConceptImageDetail
|
|
104
|
+
*/
|
|
105
|
+
flaggedAfterApprovalAt: Date | null;
|
|
100
106
|
/**
|
|
101
107
|
*
|
|
102
108
|
* @type {Date}
|