@instructure/athena-api-client 3.39.3 → 3.40.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 +12 -0
- package/dist/apis/AdminApi.d.ts +17 -1
- package/dist/apis/AdminApi.js +47 -0
- package/dist/apis/QuizzesApi.d.ts +30 -1
- package/dist/apis/QuizzesApi.js +87 -0
- package/dist/apis/ResourcesApi.d.ts +11 -2
- package/dist/apis/ResourcesApi.js +13 -3
- package/dist/apis/SharedQuizzesApi.d.ts +46 -0
- package/dist/apis/SharedQuizzesApi.js +115 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/AdminApi.d.ts +17 -1
- package/dist/esm/apis/AdminApi.js +48 -1
- package/dist/esm/apis/QuizzesApi.d.ts +30 -1
- package/dist/esm/apis/QuizzesApi.js +88 -1
- package/dist/esm/apis/ResourcesApi.d.ts +11 -2
- package/dist/esm/apis/ResourcesApi.js +12 -2
- package/dist/esm/apis/SharedQuizzesApi.d.ts +46 -0
- package/dist/esm/apis/SharedQuizzesApi.js +111 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/AdminPaginatedQuizParticipantSessions.d.ts +39 -0
- package/dist/esm/models/AdminPaginatedQuizParticipantSessions.js +48 -0
- package/dist/esm/models/AdminQuizParticipantSessionListItem.d.ts +84 -0
- package/dist/esm/models/AdminQuizParticipantSessionListItem.js +80 -0
- package/dist/esm/models/AdminQuizParticipantSessionScore.d.ts +44 -0
- package/dist/esm/models/AdminQuizParticipantSessionScore.js +51 -0
- package/dist/esm/models/QuizSharing.d.ts +50 -0
- package/dist/esm/models/QuizSharing.js +55 -0
- package/dist/esm/models/ResourceListItem.d.ts +16 -3
- package/dist/esm/models/ResourceListItem.js +9 -0
- package/dist/esm/models/ResourceSharing.d.ts +44 -0
- package/dist/esm/models/ResourceSharing.js +51 -0
- package/dist/esm/models/SharedQuiz.d.ts +97 -0
- package/dist/esm/models/SharedQuiz.js +90 -0
- package/dist/esm/models/UpdateQuizSharingRequest.d.ts +32 -0
- package/dist/esm/models/UpdateQuizSharingRequest.js +43 -0
- package/dist/esm/models/index.d.ts +7 -0
- package/dist/esm/models/index.js +7 -0
- package/dist/models/AdminPaginatedQuizParticipantSessions.d.ts +39 -0
- package/dist/models/AdminPaginatedQuizParticipantSessions.js +55 -0
- package/dist/models/AdminQuizParticipantSessionListItem.d.ts +84 -0
- package/dist/models/AdminQuizParticipantSessionListItem.js +88 -0
- package/dist/models/AdminQuizParticipantSessionScore.d.ts +44 -0
- package/dist/models/AdminQuizParticipantSessionScore.js +58 -0
- package/dist/models/QuizSharing.d.ts +50 -0
- package/dist/models/QuizSharing.js +62 -0
- package/dist/models/ResourceListItem.d.ts +16 -3
- package/dist/models/ResourceListItem.js +9 -0
- package/dist/models/ResourceSharing.d.ts +44 -0
- package/dist/models/ResourceSharing.js +58 -0
- package/dist/models/SharedQuiz.d.ts +97 -0
- package/dist/models/SharedQuiz.js +98 -0
- package/dist/models/UpdateQuizSharingRequest.d.ts +32 -0
- package/dist/models/UpdateQuizSharingRequest.js +50 -0
- package/dist/models/index.d.ts +7 -0
- package/dist/models/index.js +7 -0
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { AdminChat, AdminChatAnalysis, AdminChatCanvasUsage, AdminChatWithStats, AdminCohortStats, AdminPaginatedActiveStreaks, AdminPaginatedChats, AdminPaginatedLastExchanges, AdminPaginatedQuizSessions, AdminPaginatedStudyObjectiveUserCounts, AdminPaginatedStudyObjectives, AdminPaginatedTaxonomyEnrollments, AdminResetLearningDataResponse, AdminStreak, AdminStudyObjectiveSummary, AdminTriggerAnalysisResponse, AdminUpdateChatRequest, AdminUserActivity, AdminUserActivityTotals, AdminUserEngagement, AdminUsersActivityRequest, AdminUsersActivityTotalsRequest, QuizSessionSummary } from '../models/index';
|
|
13
|
+
import type { AdminChat, AdminChatAnalysis, AdminChatCanvasUsage, AdminChatWithStats, AdminCohortStats, AdminPaginatedActiveStreaks, AdminPaginatedChats, AdminPaginatedLastExchanges, AdminPaginatedQuizParticipantSessions, AdminPaginatedQuizSessions, AdminPaginatedStudyObjectiveUserCounts, AdminPaginatedStudyObjectives, AdminPaginatedTaxonomyEnrollments, AdminResetLearningDataResponse, AdminStreak, AdminStudyObjectiveSummary, AdminTriggerAnalysisResponse, AdminUpdateChatRequest, AdminUserActivity, AdminUserActivityTotals, AdminUserEngagement, AdminUsersActivityRequest, AdminUsersActivityTotalsRequest, QuizSessionSummary } from '../models/index';
|
|
14
14
|
export interface AdminGetChatRequest {
|
|
15
15
|
xUserId: string;
|
|
16
16
|
chatId: string;
|
|
@@ -72,6 +72,12 @@ export interface AdminListLastExchangesRequest {
|
|
|
72
72
|
maxUserMessages?: number;
|
|
73
73
|
inactiveDays?: number;
|
|
74
74
|
}
|
|
75
|
+
export interface AdminListQuizParticipantSessionsRequest {
|
|
76
|
+
xUserId: string;
|
|
77
|
+
quizId: string;
|
|
78
|
+
limit?: number;
|
|
79
|
+
cursor?: string;
|
|
80
|
+
}
|
|
75
81
|
export interface AdminListQuizSessionsRequest {
|
|
76
82
|
xUserId: string;
|
|
77
83
|
limit?: number;
|
|
@@ -239,6 +245,16 @@ export declare class AdminApi extends runtime.BaseAPI {
|
|
|
239
245
|
* List the final user message and assistant reply for low-engagement new users
|
|
240
246
|
*/
|
|
241
247
|
adminListLastExchanges(requestParameters: AdminListLastExchangesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminPaginatedLastExchanges>;
|
|
248
|
+
/**
|
|
249
|
+
* Admin-only. Returns a paginated list of all sessions on one quiz, newest first, across the quiz owner and every learner who opened it by share link. Each item identifies the learner by external id and says whether that learner is the quiz owner. Intended for admin-style views in calling applications; authorization on whether the calling user is allowed to act as an admin is the calling application\'s responsibility - this endpoint only enforces account isolation, so the quiz must belong to a user within the caller\'s account. Like the other admin quiz endpoints, this is not gated on the `enhanced-quizzing` feature flag.
|
|
250
|
+
* List every learner\'s sessions on a quiz within the account
|
|
251
|
+
*/
|
|
252
|
+
adminListQuizParticipantSessionsRaw(requestParameters: AdminListQuizParticipantSessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AdminPaginatedQuizParticipantSessions>>;
|
|
253
|
+
/**
|
|
254
|
+
* Admin-only. Returns a paginated list of all sessions on one quiz, newest first, across the quiz owner and every learner who opened it by share link. Each item identifies the learner by external id and says whether that learner is the quiz owner. Intended for admin-style views in calling applications; authorization on whether the calling user is allowed to act as an admin is the calling application\'s responsibility - this endpoint only enforces account isolation, so the quiz must belong to a user within the caller\'s account. Like the other admin quiz endpoints, this is not gated on the `enhanced-quizzing` feature flag.
|
|
255
|
+
* List every learner\'s sessions on a quiz within the account
|
|
256
|
+
*/
|
|
257
|
+
adminListQuizParticipantSessions(requestParameters: AdminListQuizParticipantSessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AdminPaginatedQuizParticipantSessions>;
|
|
242
258
|
/**
|
|
243
259
|
* Returns a paginated list of quiz sessions belonging to users within the caller\'s account, ordered by start date (newest first), with embedded quiz info, the owning user\'s external id, and a score summary (including the number of questions answered). Intended for admin-style views in calling applications; authorization on whether the calling user is allowed to act as an admin is the calling application\'s responsibility - this endpoint only enforces account isolation. Questions and responses are not included; fetch them per session via the summary endpoint. Like the summary endpoint, this is not gated on the `enhanced-quizzing` feature flag.
|
|
244
260
|
* List recent quiz sessions across all account users
|
|
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { AdminChatFromJSON, AdminChatAnalysisFromJSON, AdminChatCanvasUsageFromJSON, AdminChatWithStatsFromJSON, AdminCohortStatsFromJSON, AdminPaginatedActiveStreaksFromJSON, AdminPaginatedChatsFromJSON, AdminPaginatedLastExchangesFromJSON, AdminPaginatedQuizSessionsFromJSON, AdminPaginatedStudyObjectiveUserCountsFromJSON, AdminPaginatedStudyObjectivesFromJSON, AdminPaginatedTaxonomyEnrollmentsFromJSON, AdminResetLearningDataResponseFromJSON, AdminStreakFromJSON, AdminStudyObjectiveSummaryFromJSON, AdminTriggerAnalysisResponseFromJSON, AdminUpdateChatRequestToJSON, AdminUserActivityFromJSON, AdminUserActivityTotalsFromJSON, AdminUserEngagementFromJSON, AdminUsersActivityRequestToJSON, AdminUsersActivityTotalsRequestToJSON, QuizSessionSummaryFromJSON, } from '../models/index';
|
|
24
|
+
import { AdminChatFromJSON, AdminChatAnalysisFromJSON, AdminChatCanvasUsageFromJSON, AdminChatWithStatsFromJSON, AdminCohortStatsFromJSON, AdminPaginatedActiveStreaksFromJSON, AdminPaginatedChatsFromJSON, AdminPaginatedLastExchangesFromJSON, AdminPaginatedQuizParticipantSessionsFromJSON, AdminPaginatedQuizSessionsFromJSON, AdminPaginatedStudyObjectiveUserCountsFromJSON, AdminPaginatedStudyObjectivesFromJSON, AdminPaginatedTaxonomyEnrollmentsFromJSON, AdminResetLearningDataResponseFromJSON, AdminStreakFromJSON, AdminStudyObjectiveSummaryFromJSON, AdminTriggerAnalysisResponseFromJSON, AdminUpdateChatRequestToJSON, AdminUserActivityFromJSON, AdminUserActivityTotalsFromJSON, AdminUserEngagementFromJSON, AdminUsersActivityRequestToJSON, AdminUsersActivityTotalsRequestToJSON, QuizSessionSummaryFromJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
@@ -576,6 +576,53 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
576
576
|
return yield response.value();
|
|
577
577
|
});
|
|
578
578
|
}
|
|
579
|
+
/**
|
|
580
|
+
* Admin-only. Returns a paginated list of all sessions on one quiz, newest first, across the quiz owner and every learner who opened it by share link. Each item identifies the learner by external id and says whether that learner is the quiz owner. Intended for admin-style views in calling applications; authorization on whether the calling user is allowed to act as an admin is the calling application\'s responsibility - this endpoint only enforces account isolation, so the quiz must belong to a user within the caller\'s account. Like the other admin quiz endpoints, this is not gated on the `enhanced-quizzing` feature flag.
|
|
581
|
+
* List every learner\'s sessions on a quiz within the account
|
|
582
|
+
*/
|
|
583
|
+
adminListQuizParticipantSessionsRaw(requestParameters, initOverrides) {
|
|
584
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
585
|
+
if (requestParameters['xUserId'] == null) {
|
|
586
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling adminListQuizParticipantSessions().');
|
|
587
|
+
}
|
|
588
|
+
if (requestParameters['quizId'] == null) {
|
|
589
|
+
throw new runtime.RequiredError('quizId', 'Required parameter "quizId" was null or undefined when calling adminListQuizParticipantSessions().');
|
|
590
|
+
}
|
|
591
|
+
const queryParameters = {};
|
|
592
|
+
if (requestParameters['limit'] != null) {
|
|
593
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
594
|
+
}
|
|
595
|
+
if (requestParameters['cursor'] != null) {
|
|
596
|
+
queryParameters['cursor'] = requestParameters['cursor'];
|
|
597
|
+
}
|
|
598
|
+
const headerParameters = {};
|
|
599
|
+
if (requestParameters['xUserId'] != null) {
|
|
600
|
+
headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
|
|
601
|
+
}
|
|
602
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
603
|
+
headerParameters["X-Auth-Token"] = yield this.configuration.apiKey("X-Auth-Token"); // AuthToken authentication
|
|
604
|
+
}
|
|
605
|
+
let urlPath = `/api/v1/admin/quizzes/{quizId}/sessions`;
|
|
606
|
+
urlPath = urlPath.replace(`{${"quizId"}}`, encodeURIComponent(String(requestParameters['quizId'])));
|
|
607
|
+
const response = yield this.request({
|
|
608
|
+
path: urlPath,
|
|
609
|
+
method: 'GET',
|
|
610
|
+
headers: headerParameters,
|
|
611
|
+
query: queryParameters,
|
|
612
|
+
}, initOverrides);
|
|
613
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AdminPaginatedQuizParticipantSessionsFromJSON(jsonValue));
|
|
614
|
+
});
|
|
615
|
+
}
|
|
616
|
+
/**
|
|
617
|
+
* Admin-only. Returns a paginated list of all sessions on one quiz, newest first, across the quiz owner and every learner who opened it by share link. Each item identifies the learner by external id and says whether that learner is the quiz owner. Intended for admin-style views in calling applications; authorization on whether the calling user is allowed to act as an admin is the calling application\'s responsibility - this endpoint only enforces account isolation, so the quiz must belong to a user within the caller\'s account. Like the other admin quiz endpoints, this is not gated on the `enhanced-quizzing` feature flag.
|
|
618
|
+
* List every learner\'s sessions on a quiz within the account
|
|
619
|
+
*/
|
|
620
|
+
adminListQuizParticipantSessions(requestParameters, initOverrides) {
|
|
621
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
622
|
+
const response = yield this.adminListQuizParticipantSessionsRaw(requestParameters, initOverrides);
|
|
623
|
+
return yield response.value();
|
|
624
|
+
});
|
|
625
|
+
}
|
|
579
626
|
/**
|
|
580
627
|
* Returns a paginated list of quiz sessions belonging to users within the caller\'s account, ordered by start date (newest first), with embedded quiz info, the owning user\'s external id, and a score summary (including the number of questions answered). Intended for admin-style views in calling applications; authorization on whether the calling user is allowed to act as an admin is the calling application\'s responsibility - this endpoint only enforces account isolation. Questions and responses are not included; fetch them per session via the summary endpoint. Like the summary endpoint, this is not gated on the `enhanced-quizzing` feature flag.
|
|
581
628
|
* List recent quiz sessions across all account users
|
|
@@ -10,17 +10,26 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { PaginatedQuizzes, QuizWithQuestions } from '../models/index';
|
|
13
|
+
import type { PaginatedQuizzes, QuizSharing, QuizWithQuestions, UpdateQuizSharingRequest } from '../models/index';
|
|
14
14
|
export interface GetQuizRequest {
|
|
15
15
|
quizId: string;
|
|
16
16
|
xUserId: string;
|
|
17
17
|
}
|
|
18
|
+
export interface GetQuizSharingRequest {
|
|
19
|
+
quizId: string;
|
|
20
|
+
xUserId: string;
|
|
21
|
+
}
|
|
18
22
|
export interface ListQuizzesRequest {
|
|
19
23
|
xUserId: string;
|
|
20
24
|
limit?: number;
|
|
21
25
|
cursor?: string;
|
|
22
26
|
mode?: ListQuizzesModeEnum;
|
|
23
27
|
}
|
|
28
|
+
export interface UpdateQuizSharingOperationRequest {
|
|
29
|
+
quizId: string;
|
|
30
|
+
xUserId: string;
|
|
31
|
+
updateQuizSharingRequest: UpdateQuizSharingRequest;
|
|
32
|
+
}
|
|
24
33
|
/**
|
|
25
34
|
*
|
|
26
35
|
*/
|
|
@@ -35,6 +44,16 @@ export declare class QuizzesApi extends runtime.BaseAPI {
|
|
|
35
44
|
* Get quiz with questions
|
|
36
45
|
*/
|
|
37
46
|
getQuiz(requestParameters: GetQuizRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<QuizWithQuestions>;
|
|
47
|
+
/**
|
|
48
|
+
* Returns whether the quiz is open to other learners by link, and the link token if so. Only the quiz owner can read this.
|
|
49
|
+
* Get a quiz\'s sharing state
|
|
50
|
+
*/
|
|
51
|
+
getQuizSharingRaw(requestParameters: GetQuizSharingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<QuizSharing>>;
|
|
52
|
+
/**
|
|
53
|
+
* Returns whether the quiz is open to other learners by link, and the link token if so. Only the quiz owner can read this.
|
|
54
|
+
* Get a quiz\'s sharing state
|
|
55
|
+
*/
|
|
56
|
+
getQuizSharing(requestParameters: GetQuizSharingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<QuizSharing>;
|
|
38
57
|
/**
|
|
39
58
|
* Returns a paginated list of quizzes owned by the authenticated user, ordered by creation date (newest first).
|
|
40
59
|
* List user quizzes
|
|
@@ -45,6 +64,16 @@ export declare class QuizzesApi extends runtime.BaseAPI {
|
|
|
45
64
|
* List user quizzes
|
|
46
65
|
*/
|
|
47
66
|
listQuizzes(requestParameters: ListQuizzesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedQuizzes>;
|
|
67
|
+
/**
|
|
68
|
+
* Enabling issues a link token other learners can redeem to take the quiz under their own sessions; enabling an already-shared quiz keeps its token. Disabling revokes the token so the link stops resolving. Sessions learners already started stay theirs. Only the quiz owner can change this.
|
|
69
|
+
* Turn link sharing on or off for a quiz
|
|
70
|
+
*/
|
|
71
|
+
updateQuizSharingRaw(requestParameters: UpdateQuizSharingOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<QuizSharing>>;
|
|
72
|
+
/**
|
|
73
|
+
* Enabling issues a link token other learners can redeem to take the quiz under their own sessions; enabling an already-shared quiz keeps its token. Disabling revokes the token so the link stops resolving. Sessions learners already started stay theirs. Only the quiz owner can change this.
|
|
74
|
+
* Turn link sharing on or off for a quiz
|
|
75
|
+
*/
|
|
76
|
+
updateQuizSharing(requestParameters: UpdateQuizSharingOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<QuizSharing>;
|
|
48
77
|
}
|
|
49
78
|
/**
|
|
50
79
|
* @export
|
|
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { PaginatedQuizzesFromJSON, QuizWithQuestionsFromJSON, } from '../models/index';
|
|
24
|
+
import { PaginatedQuizzesFromJSON, QuizSharingFromJSON, QuizWithQuestionsFromJSON, UpdateQuizSharingRequestToJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
@@ -67,6 +67,47 @@ export class QuizzesApi extends runtime.BaseAPI {
|
|
|
67
67
|
return yield response.value();
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
|
+
/**
|
|
71
|
+
* Returns whether the quiz is open to other learners by link, and the link token if so. Only the quiz owner can read this.
|
|
72
|
+
* Get a quiz\'s sharing state
|
|
73
|
+
*/
|
|
74
|
+
getQuizSharingRaw(requestParameters, initOverrides) {
|
|
75
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
76
|
+
if (requestParameters['quizId'] == null) {
|
|
77
|
+
throw new runtime.RequiredError('quizId', 'Required parameter "quizId" was null or undefined when calling getQuizSharing().');
|
|
78
|
+
}
|
|
79
|
+
if (requestParameters['xUserId'] == null) {
|
|
80
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling getQuizSharing().');
|
|
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/quizzes/{quizId}/sharing`;
|
|
91
|
+
urlPath = urlPath.replace(`{${"quizId"}}`, encodeURIComponent(String(requestParameters['quizId'])));
|
|
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) => QuizSharingFromJSON(jsonValue));
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Returns whether the quiz is open to other learners by link, and the link token if so. Only the quiz owner can read this.
|
|
103
|
+
* Get a quiz\'s sharing state
|
|
104
|
+
*/
|
|
105
|
+
getQuizSharing(requestParameters, initOverrides) {
|
|
106
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
107
|
+
const response = yield this.getQuizSharingRaw(requestParameters, initOverrides);
|
|
108
|
+
return yield response.value();
|
|
109
|
+
});
|
|
110
|
+
}
|
|
70
111
|
/**
|
|
71
112
|
* Returns a paginated list of quizzes owned by the authenticated user, ordered by creation date (newest first).
|
|
72
113
|
* List user quizzes
|
|
@@ -113,6 +154,52 @@ export class QuizzesApi extends runtime.BaseAPI {
|
|
|
113
154
|
return yield response.value();
|
|
114
155
|
});
|
|
115
156
|
}
|
|
157
|
+
/**
|
|
158
|
+
* Enabling issues a link token other learners can redeem to take the quiz under their own sessions; enabling an already-shared quiz keeps its token. Disabling revokes the token so the link stops resolving. Sessions learners already started stay theirs. Only the quiz owner can change this.
|
|
159
|
+
* Turn link sharing on or off for a quiz
|
|
160
|
+
*/
|
|
161
|
+
updateQuizSharingRaw(requestParameters, initOverrides) {
|
|
162
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
163
|
+
if (requestParameters['quizId'] == null) {
|
|
164
|
+
throw new runtime.RequiredError('quizId', 'Required parameter "quizId" was null or undefined when calling updateQuizSharing().');
|
|
165
|
+
}
|
|
166
|
+
if (requestParameters['xUserId'] == null) {
|
|
167
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling updateQuizSharing().');
|
|
168
|
+
}
|
|
169
|
+
if (requestParameters['updateQuizSharingRequest'] == null) {
|
|
170
|
+
throw new runtime.RequiredError('updateQuizSharingRequest', 'Required parameter "updateQuizSharingRequest" was null or undefined when calling updateQuizSharing().');
|
|
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/quizzes/{quizId}/sharing`;
|
|
182
|
+
urlPath = urlPath.replace(`{${"quizId"}}`, encodeURIComponent(String(requestParameters['quizId'])));
|
|
183
|
+
const response = yield this.request({
|
|
184
|
+
path: urlPath,
|
|
185
|
+
method: 'PATCH',
|
|
186
|
+
headers: headerParameters,
|
|
187
|
+
query: queryParameters,
|
|
188
|
+
body: UpdateQuizSharingRequestToJSON(requestParameters['updateQuizSharingRequest']),
|
|
189
|
+
}, initOverrides);
|
|
190
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => QuizSharingFromJSON(jsonValue));
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Enabling issues a link token other learners can redeem to take the quiz under their own sessions; enabling an already-shared quiz keeps its token. Disabling revokes the token so the link stops resolving. Sessions learners already started stay theirs. Only the quiz owner can change this.
|
|
195
|
+
* Turn link sharing on or off for a quiz
|
|
196
|
+
*/
|
|
197
|
+
updateQuizSharing(requestParameters, initOverrides) {
|
|
198
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
199
|
+
const response = yield this.updateQuizSharingRaw(requestParameters, initOverrides);
|
|
200
|
+
return yield response.value();
|
|
201
|
+
});
|
|
202
|
+
}
|
|
116
203
|
}
|
|
117
204
|
/**
|
|
118
205
|
* @export
|
|
@@ -16,6 +16,7 @@ export interface ListResourcesRequest {
|
|
|
16
16
|
limit?: number;
|
|
17
17
|
cursor?: string;
|
|
18
18
|
type?: ListResourcesTypeEnum;
|
|
19
|
+
ownership?: ListResourcesOwnershipEnum;
|
|
19
20
|
courseId?: string;
|
|
20
21
|
chatId?: string;
|
|
21
22
|
studySpaceId?: string;
|
|
@@ -26,12 +27,12 @@ export interface ListResourcesRequest {
|
|
|
26
27
|
*/
|
|
27
28
|
export declare class ResourcesApi extends runtime.BaseAPI {
|
|
28
29
|
/**
|
|
29
|
-
* Returns the authenticated user\'s quizzes and flashcard sets, newest first, each with its question rollup, originating chat, course attribution, study objective, and session activity. Intended for a library view, so every row carries enough to render a card without a follow-up request.
|
|
30
|
+
* Returns the authenticated user\'s quizzes and flashcard sets, newest first, each with its question rollup, originating chat, course attribution, study objective, and session activity. Intended for a library view, so every row carries enough to render a card without a follow-up request. By default lists what the user generated; `ownership=shared` lists other learners\' resources the user has opened through a share link, with the owner\'s chat, objective, space, and course withheld.
|
|
30
31
|
* List the user\'s generated study resources
|
|
31
32
|
*/
|
|
32
33
|
listResourcesRaw(requestParameters: ListResourcesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResources>>;
|
|
33
34
|
/**
|
|
34
|
-
* Returns the authenticated user\'s quizzes and flashcard sets, newest first, each with its question rollup, originating chat, course attribution, study objective, and session activity. Intended for a library view, so every row carries enough to render a card without a follow-up request.
|
|
35
|
+
* Returns the authenticated user\'s quizzes and flashcard sets, newest first, each with its question rollup, originating chat, course attribution, study objective, and session activity. Intended for a library view, so every row carries enough to render a card without a follow-up request. By default lists what the user generated; `ownership=shared` lists other learners\' resources the user has opened through a share link, with the owner\'s chat, objective, space, and course withheld.
|
|
35
36
|
* List the user\'s generated study resources
|
|
36
37
|
*/
|
|
37
38
|
listResources(requestParameters: ListResourcesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResources>;
|
|
@@ -44,6 +45,14 @@ export declare const ListResourcesTypeEnum: {
|
|
|
44
45
|
readonly Flashcards: "flashcards";
|
|
45
46
|
};
|
|
46
47
|
export type ListResourcesTypeEnum = typeof ListResourcesTypeEnum[keyof typeof ListResourcesTypeEnum];
|
|
48
|
+
/**
|
|
49
|
+
* @export
|
|
50
|
+
*/
|
|
51
|
+
export declare const ListResourcesOwnershipEnum: {
|
|
52
|
+
readonly Owned: "owned";
|
|
53
|
+
readonly Shared: "shared";
|
|
54
|
+
};
|
|
55
|
+
export type ListResourcesOwnershipEnum = typeof ListResourcesOwnershipEnum[keyof typeof ListResourcesOwnershipEnum];
|
|
47
56
|
/**
|
|
48
57
|
* @export
|
|
49
58
|
*/
|
|
@@ -27,7 +27,7 @@ import { PaginatedResourcesFromJSON, } from '../models/index';
|
|
|
27
27
|
*/
|
|
28
28
|
export class ResourcesApi extends runtime.BaseAPI {
|
|
29
29
|
/**
|
|
30
|
-
* Returns the authenticated user\'s quizzes and flashcard sets, newest first, each with its question rollup, originating chat, course attribution, study objective, and session activity. Intended for a library view, so every row carries enough to render a card without a follow-up request.
|
|
30
|
+
* Returns the authenticated user\'s quizzes and flashcard sets, newest first, each with its question rollup, originating chat, course attribution, study objective, and session activity. Intended for a library view, so every row carries enough to render a card without a follow-up request. By default lists what the user generated; `ownership=shared` lists other learners\' resources the user has opened through a share link, with the owner\'s chat, objective, space, and course withheld.
|
|
31
31
|
* List the user\'s generated study resources
|
|
32
32
|
*/
|
|
33
33
|
listResourcesRaw(requestParameters, initOverrides) {
|
|
@@ -45,6 +45,9 @@ export class ResourcesApi extends runtime.BaseAPI {
|
|
|
45
45
|
if (requestParameters['type'] != null) {
|
|
46
46
|
queryParameters['type'] = requestParameters['type'];
|
|
47
47
|
}
|
|
48
|
+
if (requestParameters['ownership'] != null) {
|
|
49
|
+
queryParameters['ownership'] = requestParameters['ownership'];
|
|
50
|
+
}
|
|
48
51
|
if (requestParameters['courseId'] != null) {
|
|
49
52
|
queryParameters['courseId'] = requestParameters['courseId'];
|
|
50
53
|
}
|
|
@@ -75,7 +78,7 @@ export class ResourcesApi extends runtime.BaseAPI {
|
|
|
75
78
|
});
|
|
76
79
|
}
|
|
77
80
|
/**
|
|
78
|
-
* Returns the authenticated user\'s quizzes and flashcard sets, newest first, each with its question rollup, originating chat, course attribution, study objective, and session activity. Intended for a library view, so every row carries enough to render a card without a follow-up request.
|
|
81
|
+
* Returns the authenticated user\'s quizzes and flashcard sets, newest first, each with its question rollup, originating chat, course attribution, study objective, and session activity. Intended for a library view, so every row carries enough to render a card without a follow-up request. By default lists what the user generated; `ownership=shared` lists other learners\' resources the user has opened through a share link, with the owner\'s chat, objective, space, and course withheld.
|
|
79
82
|
* List the user\'s generated study resources
|
|
80
83
|
*/
|
|
81
84
|
listResources(requestParameters, initOverrides) {
|
|
@@ -92,6 +95,13 @@ export const ListResourcesTypeEnum = {
|
|
|
92
95
|
Quiz: 'quiz',
|
|
93
96
|
Flashcards: 'flashcards'
|
|
94
97
|
};
|
|
98
|
+
/**
|
|
99
|
+
* @export
|
|
100
|
+
*/
|
|
101
|
+
export const ListResourcesOwnershipEnum = {
|
|
102
|
+
Owned: 'owned',
|
|
103
|
+
Shared: 'shared'
|
|
104
|
+
};
|
|
95
105
|
/**
|
|
96
106
|
* @export
|
|
97
107
|
*/
|
|
@@ -0,0 +1,46 @@
|
|
|
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 { QuizSession, SharedQuiz } from '../models/index';
|
|
14
|
+
export interface GetSharedQuizRequest {
|
|
15
|
+
token: string;
|
|
16
|
+
xUserId: string;
|
|
17
|
+
}
|
|
18
|
+
export interface StartSharedQuizSessionRequest {
|
|
19
|
+
token: string;
|
|
20
|
+
xUserId: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
export declare class SharedQuizzesApi extends runtime.BaseAPI {
|
|
26
|
+
/**
|
|
27
|
+
* Returns the quiz behind a share link: enough to render a landing card and start a session, without identifying the owner.
|
|
28
|
+
* Resolve a quiz share link
|
|
29
|
+
*/
|
|
30
|
+
getSharedQuizRaw(requestParameters: GetSharedQuizRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SharedQuiz>>;
|
|
31
|
+
/**
|
|
32
|
+
* Returns the quiz behind a share link: enough to render a landing card and start a session, without identifying the owner.
|
|
33
|
+
* Resolve a quiz share link
|
|
34
|
+
*/
|
|
35
|
+
getSharedQuiz(requestParameters: GetSharedQuizRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SharedQuiz>;
|
|
36
|
+
/**
|
|
37
|
+
* Returns the caller\'s active session on the quiz behind the link, creating one if none is active. The session belongs to the caller; its answers never touch the owner\'s progress. Returns 201 whether the session was created or resumed.
|
|
38
|
+
* Start or resume the caller\'s session on a shared quiz
|
|
39
|
+
*/
|
|
40
|
+
startSharedQuizSessionRaw(requestParameters: StartSharedQuizSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<QuizSession>>;
|
|
41
|
+
/**
|
|
42
|
+
* Returns the caller\'s active session on the quiz behind the link, creating one if none is active. The session belongs to the caller; its answers never touch the owner\'s progress. Returns 201 whether the session was created or resumed.
|
|
43
|
+
* Start or resume the caller\'s session on a shared quiz
|
|
44
|
+
*/
|
|
45
|
+
startSharedQuizSession(requestParameters: StartSharedQuizSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<QuizSession>;
|
|
46
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
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 { QuizSessionFromJSON, SharedQuizFromJSON, } from '../models/index';
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export class SharedQuizzesApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Returns the quiz behind a share link: enough to render a landing card and start a session, without identifying the owner.
|
|
31
|
+
* Resolve a quiz share link
|
|
32
|
+
*/
|
|
33
|
+
getSharedQuizRaw(requestParameters, initOverrides) {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
if (requestParameters['token'] == null) {
|
|
36
|
+
throw new runtime.RequiredError('token', 'Required parameter "token" was null or undefined when calling getSharedQuiz().');
|
|
37
|
+
}
|
|
38
|
+
if (requestParameters['xUserId'] == null) {
|
|
39
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling getSharedQuiz().');
|
|
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/shared-quizzes/{token}`;
|
|
50
|
+
urlPath = urlPath.replace(`{${"token"}}`, encodeURIComponent(String(requestParameters['token'])));
|
|
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) => SharedQuizFromJSON(jsonValue));
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Returns the quiz behind a share link: enough to render a landing card and start a session, without identifying the owner.
|
|
62
|
+
* Resolve a quiz share link
|
|
63
|
+
*/
|
|
64
|
+
getSharedQuiz(requestParameters, initOverrides) {
|
|
65
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
+
const response = yield this.getSharedQuizRaw(requestParameters, initOverrides);
|
|
67
|
+
return yield response.value();
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Returns the caller\'s active session on the quiz behind the link, creating one if none is active. The session belongs to the caller; its answers never touch the owner\'s progress. Returns 201 whether the session was created or resumed.
|
|
72
|
+
* Start or resume the caller\'s session on a shared quiz
|
|
73
|
+
*/
|
|
74
|
+
startSharedQuizSessionRaw(requestParameters, initOverrides) {
|
|
75
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
76
|
+
if (requestParameters['token'] == null) {
|
|
77
|
+
throw new runtime.RequiredError('token', 'Required parameter "token" was null or undefined when calling startSharedQuizSession().');
|
|
78
|
+
}
|
|
79
|
+
if (requestParameters['xUserId'] == null) {
|
|
80
|
+
throw new runtime.RequiredError('xUserId', 'Required parameter "xUserId" was null or undefined when calling startSharedQuizSession().');
|
|
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/shared-quizzes/{token}/sessions`;
|
|
91
|
+
urlPath = urlPath.replace(`{${"token"}}`, encodeURIComponent(String(requestParameters['token'])));
|
|
92
|
+
const response = yield this.request({
|
|
93
|
+
path: urlPath,
|
|
94
|
+
method: 'POST',
|
|
95
|
+
headers: headerParameters,
|
|
96
|
+
query: queryParameters,
|
|
97
|
+
}, initOverrides);
|
|
98
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => QuizSessionFromJSON(jsonValue));
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Returns the caller\'s active session on the quiz behind the link, creating one if none is active. The session belongs to the caller; its answers never touch the owner\'s progress. Returns 201 whether the session was created or resumed.
|
|
103
|
+
* Start or resume the caller\'s session on a shared quiz
|
|
104
|
+
*/
|
|
105
|
+
startSharedQuizSession(requestParameters, initOverrides) {
|
|
106
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
107
|
+
const response = yield this.startSharedQuizSessionRaw(requestParameters, initOverrides);
|
|
108
|
+
return yield response.value();
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
}
|
package/dist/esm/apis/index.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export * from './QuizSessionsApi';
|
|
|
20
20
|
export * from './QuizzesApi';
|
|
21
21
|
export * from './ResourcesApi';
|
|
22
22
|
export * from './ServiceTokensApi';
|
|
23
|
+
export * from './SharedQuizzesApi';
|
|
23
24
|
export * from './StudyObjectiveConceptsApi';
|
|
24
25
|
export * from './StudyObjectivesApi';
|
|
25
26
|
export * from './StudyPlansApi';
|
package/dist/esm/apis/index.js
CHANGED
|
@@ -22,6 +22,7 @@ export * from './QuizSessionsApi';
|
|
|
22
22
|
export * from './QuizzesApi';
|
|
23
23
|
export * from './ResourcesApi';
|
|
24
24
|
export * from './ServiceTokensApi';
|
|
25
|
+
export * from './SharedQuizzesApi';
|
|
25
26
|
export * from './StudyObjectiveConceptsApi';
|
|
26
27
|
export * from './StudyObjectivesApi';
|
|
27
28
|
export * from './StudyPlansApi';
|
|
@@ -0,0 +1,39 @@
|
|
|
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 { AdminQuizParticipantSessionListItem } from './AdminQuizParticipantSessionListItem';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface AdminPaginatedQuizParticipantSessions
|
|
17
|
+
*/
|
|
18
|
+
export interface AdminPaginatedQuizParticipantSessions {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {Array<AdminQuizParticipantSessionListItem>}
|
|
22
|
+
* @memberof AdminPaginatedQuizParticipantSessions
|
|
23
|
+
*/
|
|
24
|
+
data: Array<AdminQuizParticipantSessionListItem>;
|
|
25
|
+
/**
|
|
26
|
+
* Opaque cursor for fetching the next page. Null when there are no more results.
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof AdminPaginatedQuizParticipantSessions
|
|
29
|
+
*/
|
|
30
|
+
nextCursor: string | null;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Check if a given object implements the AdminPaginatedQuizParticipantSessions interface.
|
|
34
|
+
*/
|
|
35
|
+
export declare function instanceOfAdminPaginatedQuizParticipantSessions(value: object): value is AdminPaginatedQuizParticipantSessions;
|
|
36
|
+
export declare function AdminPaginatedQuizParticipantSessionsFromJSON(json: any): AdminPaginatedQuizParticipantSessions;
|
|
37
|
+
export declare function AdminPaginatedQuizParticipantSessionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): AdminPaginatedQuizParticipantSessions;
|
|
38
|
+
export declare function AdminPaginatedQuizParticipantSessionsToJSON(json: any): AdminPaginatedQuizParticipantSessions;
|
|
39
|
+
export declare function AdminPaginatedQuizParticipantSessionsToJSONTyped(value?: AdminPaginatedQuizParticipantSessions | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,48 @@
|
|
|
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 { AdminQuizParticipantSessionListItemFromJSON, AdminQuizParticipantSessionListItemToJSON, } from './AdminQuizParticipantSessionListItem';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the AdminPaginatedQuizParticipantSessions interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfAdminPaginatedQuizParticipantSessions(value) {
|
|
19
|
+
if (!('data' in value) || value['data'] === undefined)
|
|
20
|
+
return false;
|
|
21
|
+
if (!('nextCursor' in value) || value['nextCursor'] === undefined)
|
|
22
|
+
return false;
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
export function AdminPaginatedQuizParticipantSessionsFromJSON(json) {
|
|
26
|
+
return AdminPaginatedQuizParticipantSessionsFromJSONTyped(json, false);
|
|
27
|
+
}
|
|
28
|
+
export function AdminPaginatedQuizParticipantSessionsFromJSONTyped(json, ignoreDiscriminator) {
|
|
29
|
+
if (json == null) {
|
|
30
|
+
return json;
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
'data': (json['data'].map(AdminQuizParticipantSessionListItemFromJSON)),
|
|
34
|
+
'nextCursor': json['nextCursor'],
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export function AdminPaginatedQuizParticipantSessionsToJSON(json) {
|
|
38
|
+
return AdminPaginatedQuizParticipantSessionsToJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
export function AdminPaginatedQuizParticipantSessionsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
41
|
+
if (value == null) {
|
|
42
|
+
return value;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
'data': (value['data'].map(AdminQuizParticipantSessionListItemToJSON)),
|
|
46
|
+
'nextCursor': value['nextCursor'],
|
|
47
|
+
};
|
|
48
|
+
}
|