@easyedu/js-lsm-api 1.99.0 → 1.101.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/.openapi-generator/FILES +18 -0
- package/README.md +16 -2
- package/dist/apis/ChangelogApi.d.ts +32 -0
- package/dist/apis/ChangelogApi.js +70 -0
- package/dist/apis/ContentLibraryQuizApi.d.ts +17 -0
- package/dist/apis/ContentLibraryQuizApi.js +45 -0
- package/dist/apis/CourseApi.d.ts +60 -0
- package/dist/apis/CourseApi.js +167 -0
- package/dist/apis/PlayerApi.d.ts +17 -0
- package/dist/apis/PlayerApi.js +45 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/ChangelogApi.d.ts +32 -0
- package/dist/esm/apis/ChangelogApi.js +66 -0
- package/dist/esm/apis/ContentLibraryQuizApi.d.ts +17 -0
- package/dist/esm/apis/ContentLibraryQuizApi.js +45 -0
- package/dist/esm/apis/CourseApi.d.ts +60 -0
- package/dist/esm/apis/CourseApi.js +167 -0
- package/dist/esm/apis/PlayerApi.d.ts +17 -0
- package/dist/esm/apis/PlayerApi.js +45 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/GetAttemptAllowance.d.ts +80 -0
- package/dist/esm/models/GetAttemptAllowance.js +75 -0
- package/dist/esm/models/GetChangelogEntry.d.ts +44 -0
- package/dist/esm/models/GetChangelogEntry.js +51 -0
- package/dist/esm/models/GetChangelogList.d.ts +33 -0
- package/dist/esm/models/GetChangelogList.js +44 -0
- package/dist/esm/models/PostClearSessions.d.ts +32 -0
- package/dist/esm/models/PostClearSessions.js +43 -0
- package/dist/esm/models/PostClearSessionsResponse.d.ts +44 -0
- package/dist/esm/models/PostClearSessionsResponse.js +51 -0
- package/dist/esm/models/PutAttemptAllowance.d.ts +38 -0
- package/dist/esm/models/PutAttemptAllowance.js +47 -0
- package/dist/esm/models/PutLibraryQuizSessionOverride.d.ts +57 -0
- package/dist/esm/models/PutLibraryQuizSessionOverride.js +55 -0
- package/dist/esm/models/PutResourceSessionOverride.d.ts +69 -0
- package/dist/esm/models/PutResourceSessionOverride.js +66 -0
- package/dist/esm/models/index.d.ts +8 -0
- package/dist/esm/models/index.js +8 -0
- package/dist/models/GetAttemptAllowance.d.ts +80 -0
- package/dist/models/GetAttemptAllowance.js +82 -0
- package/dist/models/GetChangelogEntry.d.ts +44 -0
- package/dist/models/GetChangelogEntry.js +58 -0
- package/dist/models/GetChangelogList.d.ts +33 -0
- package/dist/models/GetChangelogList.js +51 -0
- package/dist/models/PostClearSessions.d.ts +32 -0
- package/dist/models/PostClearSessions.js +50 -0
- package/dist/models/PostClearSessionsResponse.d.ts +44 -0
- package/dist/models/PostClearSessionsResponse.js +58 -0
- package/dist/models/PutAttemptAllowance.d.ts +38 -0
- package/dist/models/PutAttemptAllowance.js +54 -0
- package/dist/models/PutLibraryQuizSessionOverride.d.ts +57 -0
- package/dist/models/PutLibraryQuizSessionOverride.js +63 -0
- package/dist/models/PutResourceSessionOverride.d.ts +69 -0
- package/dist/models/PutResourceSessionOverride.js +74 -0
- package/dist/models/index.d.ts +8 -0
- package/dist/models/index.js +8 -0
- package/docs/ChangelogApi.md +68 -0
- package/docs/ContentLibraryQuizApi.md +71 -0
- package/docs/CourseApi.md +236 -0
- package/docs/GetAttemptAllowance.md +51 -0
- package/docs/GetChangelogEntry.md +39 -0
- package/docs/GetChangelogList.md +34 -0
- package/docs/PlayerApi.md +71 -0
- package/docs/PostClearSessions.md +34 -0
- package/docs/PostClearSessionsResponse.md +38 -0
- package/docs/PutAttemptAllowance.md +36 -0
- package/docs/PutLibraryQuizSessionOverride.md +41 -0
- package/docs/PutResourceSessionOverride.md +41 -0
- package/package.json +1 -1
- package/src/apis/ChangelogApi.ts +66 -0
- package/src/apis/ContentLibraryQuizApi.ts +65 -0
- package/src/apis/CourseApi.ts +270 -0
- package/src/apis/PlayerApi.ts +65 -0
- package/src/apis/index.ts +1 -0
- package/src/models/GetAttemptAllowance.ts +138 -0
- package/src/models/GetChangelogEntry.ts +84 -0
- package/src/models/GetChangelogList.ts +74 -0
- package/src/models/PostClearSessions.ts +66 -0
- package/src/models/PostClearSessionsResponse.ts +84 -0
- package/src/models/PutAttemptAllowance.ts +75 -0
- package/src/models/PutLibraryQuizSessionOverride.ts +100 -0
- package/src/models/PutResourceSessionOverride.ts +113 -0
- package/src/models/index.ts +8 -0
package/src/apis/CourseApi.ts
CHANGED
|
@@ -13,6 +13,11 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import * as runtime from '../runtime';
|
|
16
|
+
import {
|
|
17
|
+
type GetAttemptAllowance,
|
|
18
|
+
GetAttemptAllowanceFromJSON,
|
|
19
|
+
GetAttemptAllowanceToJSON,
|
|
20
|
+
} from '../models/GetAttemptAllowance';
|
|
16
21
|
import {
|
|
17
22
|
type GetCourse,
|
|
18
23
|
GetCourseFromJSON,
|
|
@@ -78,6 +83,16 @@ import {
|
|
|
78
83
|
GetCourseVersionSectionFromJSON,
|
|
79
84
|
GetCourseVersionSectionToJSON,
|
|
80
85
|
} from '../models/GetCourseVersionSection';
|
|
86
|
+
import {
|
|
87
|
+
type PostClearSessions,
|
|
88
|
+
PostClearSessionsFromJSON,
|
|
89
|
+
PostClearSessionsToJSON,
|
|
90
|
+
} from '../models/PostClearSessions';
|
|
91
|
+
import {
|
|
92
|
+
type PostClearSessionsResponse,
|
|
93
|
+
PostClearSessionsResponseFromJSON,
|
|
94
|
+
PostClearSessionsResponseToJSON,
|
|
95
|
+
} from '../models/PostClearSessionsResponse';
|
|
81
96
|
import {
|
|
82
97
|
type PostCourse,
|
|
83
98
|
PostCourseFromJSON,
|
|
@@ -133,6 +148,11 @@ import {
|
|
|
133
148
|
PostDuplicateFromJSON,
|
|
134
149
|
PostDuplicateToJSON,
|
|
135
150
|
} from '../models/PostDuplicate';
|
|
151
|
+
import {
|
|
152
|
+
type PutAttemptAllowance,
|
|
153
|
+
PutAttemptAllowanceFromJSON,
|
|
154
|
+
PutAttemptAllowanceToJSON,
|
|
155
|
+
} from '../models/PutAttemptAllowance';
|
|
136
156
|
import {
|
|
137
157
|
type PutCourse,
|
|
138
158
|
PutCourseFromJSON,
|
|
@@ -226,6 +246,13 @@ export interface GetCourseExportsRequest {
|
|
|
226
246
|
pageSize?: number;
|
|
227
247
|
}
|
|
228
248
|
|
|
249
|
+
export interface GetCourseItemLearnerAttemptAllowanceRequest {
|
|
250
|
+
courseId: string;
|
|
251
|
+
courseVersionId: string;
|
|
252
|
+
itemId: string;
|
|
253
|
+
userId: string;
|
|
254
|
+
}
|
|
255
|
+
|
|
229
256
|
export interface GetCourseListRequest {
|
|
230
257
|
page?: number;
|
|
231
258
|
pageSize?: number;
|
|
@@ -282,6 +309,14 @@ export interface PostCourseImageUploadRequest {
|
|
|
282
309
|
file: Blob;
|
|
283
310
|
}
|
|
284
311
|
|
|
312
|
+
export interface PostCourseItemLearnerSessionsClearRequest {
|
|
313
|
+
courseId: string;
|
|
314
|
+
courseVersionId: string;
|
|
315
|
+
itemId: string;
|
|
316
|
+
userId: string;
|
|
317
|
+
postClearSessions: PostClearSessions;
|
|
318
|
+
}
|
|
319
|
+
|
|
285
320
|
export interface PostCourseResumeRequest {
|
|
286
321
|
courseId: string;
|
|
287
322
|
}
|
|
@@ -327,6 +362,14 @@ export interface PutCourseEnrollmentRequest {
|
|
|
327
362
|
putCourseEnrollment: PutCourseEnrollment;
|
|
328
363
|
}
|
|
329
364
|
|
|
365
|
+
export interface PutCourseItemLearnerAttemptAllowanceRequest {
|
|
366
|
+
courseId: string;
|
|
367
|
+
courseVersionId: string;
|
|
368
|
+
itemId: string;
|
|
369
|
+
userId: string;
|
|
370
|
+
putAttemptAllowance: PutAttemptAllowance;
|
|
371
|
+
}
|
|
372
|
+
|
|
330
373
|
export interface PutCourseVersionItemRequest {
|
|
331
374
|
courseId: string;
|
|
332
375
|
sectionId: string;
|
|
@@ -1023,6 +1066,75 @@ export class CourseApi extends runtime.BaseAPI {
|
|
|
1023
1066
|
return await response.value();
|
|
1024
1067
|
}
|
|
1025
1068
|
|
|
1069
|
+
/**
|
|
1070
|
+
* Creates request options for getCourseItemLearnerAttemptAllowance without sending the request
|
|
1071
|
+
*/
|
|
1072
|
+
async getCourseItemLearnerAttemptAllowanceRequestOpts(requestParameters: GetCourseItemLearnerAttemptAllowanceRequest): Promise<runtime.RequestOpts> {
|
|
1073
|
+
if (requestParameters['courseId'] == null) {
|
|
1074
|
+
throw new runtime.RequiredError(
|
|
1075
|
+
'courseId',
|
|
1076
|
+
'Required parameter "courseId" was null or undefined when calling getCourseItemLearnerAttemptAllowance().'
|
|
1077
|
+
);
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
if (requestParameters['courseVersionId'] == null) {
|
|
1081
|
+
throw new runtime.RequiredError(
|
|
1082
|
+
'courseVersionId',
|
|
1083
|
+
'Required parameter "courseVersionId" was null or undefined when calling getCourseItemLearnerAttemptAllowance().'
|
|
1084
|
+
);
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
if (requestParameters['itemId'] == null) {
|
|
1088
|
+
throw new runtime.RequiredError(
|
|
1089
|
+
'itemId',
|
|
1090
|
+
'Required parameter "itemId" was null or undefined when calling getCourseItemLearnerAttemptAllowance().'
|
|
1091
|
+
);
|
|
1092
|
+
}
|
|
1093
|
+
|
|
1094
|
+
if (requestParameters['userId'] == null) {
|
|
1095
|
+
throw new runtime.RequiredError(
|
|
1096
|
+
'userId',
|
|
1097
|
+
'Required parameter "userId" was null or undefined when calling getCourseItemLearnerAttemptAllowance().'
|
|
1098
|
+
);
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1101
|
+
const queryParameters: any = {};
|
|
1102
|
+
|
|
1103
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1104
|
+
|
|
1105
|
+
|
|
1106
|
+
let urlPath = `/courses/{courseId}/versions/{courseVersionId}/items/{itemId}/learners/{userId}/attempt-allowance`;
|
|
1107
|
+
urlPath = urlPath.replace('{courseId}', encodeURIComponent(String(requestParameters['courseId'])));
|
|
1108
|
+
urlPath = urlPath.replace('{courseVersionId}', encodeURIComponent(String(requestParameters['courseVersionId'])));
|
|
1109
|
+
urlPath = urlPath.replace('{itemId}', encodeURIComponent(String(requestParameters['itemId'])));
|
|
1110
|
+
urlPath = urlPath.replace('{userId}', encodeURIComponent(String(requestParameters['userId'])));
|
|
1111
|
+
|
|
1112
|
+
return {
|
|
1113
|
+
path: urlPath,
|
|
1114
|
+
method: 'GET',
|
|
1115
|
+
headers: headerParameters,
|
|
1116
|
+
query: queryParameters,
|
|
1117
|
+
};
|
|
1118
|
+
}
|
|
1119
|
+
|
|
1120
|
+
/**
|
|
1121
|
+
* Get a learner\'s effective attempt limit for a course item
|
|
1122
|
+
*/
|
|
1123
|
+
async getCourseItemLearnerAttemptAllowanceRaw(requestParameters: GetCourseItemLearnerAttemptAllowanceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetAttemptAllowance>> {
|
|
1124
|
+
const requestOptions = await this.getCourseItemLearnerAttemptAllowanceRequestOpts(requestParameters);
|
|
1125
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
1126
|
+
|
|
1127
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetAttemptAllowanceFromJSON(jsonValue));
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1130
|
+
/**
|
|
1131
|
+
* Get a learner\'s effective attempt limit for a course item
|
|
1132
|
+
*/
|
|
1133
|
+
async getCourseItemLearnerAttemptAllowance(requestParameters: GetCourseItemLearnerAttemptAllowanceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetAttemptAllowance> {
|
|
1134
|
+
const response = await this.getCourseItemLearnerAttemptAllowanceRaw(requestParameters, initOverrides);
|
|
1135
|
+
return await response.value();
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1026
1138
|
/**
|
|
1027
1139
|
* Creates request options for getCourseList without sending the request
|
|
1028
1140
|
*/
|
|
@@ -1614,6 +1726,85 @@ export class CourseApi extends runtime.BaseAPI {
|
|
|
1614
1726
|
return await response.value();
|
|
1615
1727
|
}
|
|
1616
1728
|
|
|
1729
|
+
/**
|
|
1730
|
+
* Creates request options for postCourseItemLearnerSessionsClear without sending the request
|
|
1731
|
+
*/
|
|
1732
|
+
async postCourseItemLearnerSessionsClearRequestOpts(requestParameters: PostCourseItemLearnerSessionsClearRequest): Promise<runtime.RequestOpts> {
|
|
1733
|
+
if (requestParameters['courseId'] == null) {
|
|
1734
|
+
throw new runtime.RequiredError(
|
|
1735
|
+
'courseId',
|
|
1736
|
+
'Required parameter "courseId" was null or undefined when calling postCourseItemLearnerSessionsClear().'
|
|
1737
|
+
);
|
|
1738
|
+
}
|
|
1739
|
+
|
|
1740
|
+
if (requestParameters['courseVersionId'] == null) {
|
|
1741
|
+
throw new runtime.RequiredError(
|
|
1742
|
+
'courseVersionId',
|
|
1743
|
+
'Required parameter "courseVersionId" was null or undefined when calling postCourseItemLearnerSessionsClear().'
|
|
1744
|
+
);
|
|
1745
|
+
}
|
|
1746
|
+
|
|
1747
|
+
if (requestParameters['itemId'] == null) {
|
|
1748
|
+
throw new runtime.RequiredError(
|
|
1749
|
+
'itemId',
|
|
1750
|
+
'Required parameter "itemId" was null or undefined when calling postCourseItemLearnerSessionsClear().'
|
|
1751
|
+
);
|
|
1752
|
+
}
|
|
1753
|
+
|
|
1754
|
+
if (requestParameters['userId'] == null) {
|
|
1755
|
+
throw new runtime.RequiredError(
|
|
1756
|
+
'userId',
|
|
1757
|
+
'Required parameter "userId" was null or undefined when calling postCourseItemLearnerSessionsClear().'
|
|
1758
|
+
);
|
|
1759
|
+
}
|
|
1760
|
+
|
|
1761
|
+
if (requestParameters['postClearSessions'] == null) {
|
|
1762
|
+
throw new runtime.RequiredError(
|
|
1763
|
+
'postClearSessions',
|
|
1764
|
+
'Required parameter "postClearSessions" was null or undefined when calling postCourseItemLearnerSessionsClear().'
|
|
1765
|
+
);
|
|
1766
|
+
}
|
|
1767
|
+
|
|
1768
|
+
const queryParameters: any = {};
|
|
1769
|
+
|
|
1770
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1771
|
+
|
|
1772
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1773
|
+
|
|
1774
|
+
|
|
1775
|
+
let urlPath = `/courses/{courseId}/versions/{courseVersionId}/items/{itemId}/learners/{userId}/sessions/clear`;
|
|
1776
|
+
urlPath = urlPath.replace('{courseId}', encodeURIComponent(String(requestParameters['courseId'])));
|
|
1777
|
+
urlPath = urlPath.replace('{courseVersionId}', encodeURIComponent(String(requestParameters['courseVersionId'])));
|
|
1778
|
+
urlPath = urlPath.replace('{itemId}', encodeURIComponent(String(requestParameters['itemId'])));
|
|
1779
|
+
urlPath = urlPath.replace('{userId}', encodeURIComponent(String(requestParameters['userId'])));
|
|
1780
|
+
|
|
1781
|
+
return {
|
|
1782
|
+
path: urlPath,
|
|
1783
|
+
method: 'POST',
|
|
1784
|
+
headers: headerParameters,
|
|
1785
|
+
query: queryParameters,
|
|
1786
|
+
body: PostClearSessionsToJSON(requestParameters['postClearSessions']),
|
|
1787
|
+
};
|
|
1788
|
+
}
|
|
1789
|
+
|
|
1790
|
+
/**
|
|
1791
|
+
* Clear all live sessions for a learner and course item
|
|
1792
|
+
*/
|
|
1793
|
+
async postCourseItemLearnerSessionsClearRaw(requestParameters: PostCourseItemLearnerSessionsClearRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PostClearSessionsResponse>> {
|
|
1794
|
+
const requestOptions = await this.postCourseItemLearnerSessionsClearRequestOpts(requestParameters);
|
|
1795
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
1796
|
+
|
|
1797
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PostClearSessionsResponseFromJSON(jsonValue));
|
|
1798
|
+
}
|
|
1799
|
+
|
|
1800
|
+
/**
|
|
1801
|
+
* Clear all live sessions for a learner and course item
|
|
1802
|
+
*/
|
|
1803
|
+
async postCourseItemLearnerSessionsClear(requestParameters: PostCourseItemLearnerSessionsClearRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PostClearSessionsResponse> {
|
|
1804
|
+
const response = await this.postCourseItemLearnerSessionsClearRaw(requestParameters, initOverrides);
|
|
1805
|
+
return await response.value();
|
|
1806
|
+
}
|
|
1807
|
+
|
|
1617
1808
|
/**
|
|
1618
1809
|
* Creates request options for postCourseResume without sending the request
|
|
1619
1810
|
*/
|
|
@@ -2080,6 +2271,85 @@ export class CourseApi extends runtime.BaseAPI {
|
|
|
2080
2271
|
return await response.value();
|
|
2081
2272
|
}
|
|
2082
2273
|
|
|
2274
|
+
/**
|
|
2275
|
+
* Creates request options for putCourseItemLearnerAttemptAllowance without sending the request
|
|
2276
|
+
*/
|
|
2277
|
+
async putCourseItemLearnerAttemptAllowanceRequestOpts(requestParameters: PutCourseItemLearnerAttemptAllowanceRequest): Promise<runtime.RequestOpts> {
|
|
2278
|
+
if (requestParameters['courseId'] == null) {
|
|
2279
|
+
throw new runtime.RequiredError(
|
|
2280
|
+
'courseId',
|
|
2281
|
+
'Required parameter "courseId" was null or undefined when calling putCourseItemLearnerAttemptAllowance().'
|
|
2282
|
+
);
|
|
2283
|
+
}
|
|
2284
|
+
|
|
2285
|
+
if (requestParameters['courseVersionId'] == null) {
|
|
2286
|
+
throw new runtime.RequiredError(
|
|
2287
|
+
'courseVersionId',
|
|
2288
|
+
'Required parameter "courseVersionId" was null or undefined when calling putCourseItemLearnerAttemptAllowance().'
|
|
2289
|
+
);
|
|
2290
|
+
}
|
|
2291
|
+
|
|
2292
|
+
if (requestParameters['itemId'] == null) {
|
|
2293
|
+
throw new runtime.RequiredError(
|
|
2294
|
+
'itemId',
|
|
2295
|
+
'Required parameter "itemId" was null or undefined when calling putCourseItemLearnerAttemptAllowance().'
|
|
2296
|
+
);
|
|
2297
|
+
}
|
|
2298
|
+
|
|
2299
|
+
if (requestParameters['userId'] == null) {
|
|
2300
|
+
throw new runtime.RequiredError(
|
|
2301
|
+
'userId',
|
|
2302
|
+
'Required parameter "userId" was null or undefined when calling putCourseItemLearnerAttemptAllowance().'
|
|
2303
|
+
);
|
|
2304
|
+
}
|
|
2305
|
+
|
|
2306
|
+
if (requestParameters['putAttemptAllowance'] == null) {
|
|
2307
|
+
throw new runtime.RequiredError(
|
|
2308
|
+
'putAttemptAllowance',
|
|
2309
|
+
'Required parameter "putAttemptAllowance" was null or undefined when calling putCourseItemLearnerAttemptAllowance().'
|
|
2310
|
+
);
|
|
2311
|
+
}
|
|
2312
|
+
|
|
2313
|
+
const queryParameters: any = {};
|
|
2314
|
+
|
|
2315
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
2316
|
+
|
|
2317
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
2318
|
+
|
|
2319
|
+
|
|
2320
|
+
let urlPath = `/courses/{courseId}/versions/{courseVersionId}/items/{itemId}/learners/{userId}/attempt-allowance`;
|
|
2321
|
+
urlPath = urlPath.replace('{courseId}', encodeURIComponent(String(requestParameters['courseId'])));
|
|
2322
|
+
urlPath = urlPath.replace('{courseVersionId}', encodeURIComponent(String(requestParameters['courseVersionId'])));
|
|
2323
|
+
urlPath = urlPath.replace('{itemId}', encodeURIComponent(String(requestParameters['itemId'])));
|
|
2324
|
+
urlPath = urlPath.replace('{userId}', encodeURIComponent(String(requestParameters['userId'])));
|
|
2325
|
+
|
|
2326
|
+
return {
|
|
2327
|
+
path: urlPath,
|
|
2328
|
+
method: 'PUT',
|
|
2329
|
+
headers: headerParameters,
|
|
2330
|
+
query: queryParameters,
|
|
2331
|
+
body: PutAttemptAllowanceToJSON(requestParameters['putAttemptAllowance']),
|
|
2332
|
+
};
|
|
2333
|
+
}
|
|
2334
|
+
|
|
2335
|
+
/**
|
|
2336
|
+
* Set extra attempts for a learner on a course item
|
|
2337
|
+
*/
|
|
2338
|
+
async putCourseItemLearnerAttemptAllowanceRaw(requestParameters: PutCourseItemLearnerAttemptAllowanceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetAttemptAllowance>> {
|
|
2339
|
+
const requestOptions = await this.putCourseItemLearnerAttemptAllowanceRequestOpts(requestParameters);
|
|
2340
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
2341
|
+
|
|
2342
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetAttemptAllowanceFromJSON(jsonValue));
|
|
2343
|
+
}
|
|
2344
|
+
|
|
2345
|
+
/**
|
|
2346
|
+
* Set extra attempts for a learner on a course item
|
|
2347
|
+
*/
|
|
2348
|
+
async putCourseItemLearnerAttemptAllowance(requestParameters: PutCourseItemLearnerAttemptAllowanceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetAttemptAllowance> {
|
|
2349
|
+
const response = await this.putCourseItemLearnerAttemptAllowanceRaw(requestParameters, initOverrides);
|
|
2350
|
+
return await response.value();
|
|
2351
|
+
}
|
|
2352
|
+
|
|
2083
2353
|
/**
|
|
2084
2354
|
* Creates request options for putCourseVersionItem without sending the request
|
|
2085
2355
|
*/
|
package/src/apis/PlayerApi.ts
CHANGED
|
@@ -58,6 +58,11 @@ import {
|
|
|
58
58
|
PostResourceSessionActivityEventFromJSON,
|
|
59
59
|
PostResourceSessionActivityEventToJSON,
|
|
60
60
|
} from '../models/PostResourceSessionActivityEvent';
|
|
61
|
+
import {
|
|
62
|
+
type PutResourceSessionOverride,
|
|
63
|
+
PutResourceSessionOverrideFromJSON,
|
|
64
|
+
PutResourceSessionOverrideToJSON,
|
|
65
|
+
} from '../models/PutResourceSessionOverride';
|
|
61
66
|
import {
|
|
62
67
|
type ResourceSessionEnvironment,
|
|
63
68
|
ResourceSessionEnvironmentFromJSON,
|
|
@@ -183,6 +188,11 @@ export interface PostResourceSessionCompleteRequest {
|
|
|
183
188
|
sessionId: string;
|
|
184
189
|
}
|
|
185
190
|
|
|
191
|
+
export interface PutResourceSessionOverrideRequest {
|
|
192
|
+
sessionId: string;
|
|
193
|
+
putResourceSessionOverride: PutResourceSessionOverride;
|
|
194
|
+
}
|
|
195
|
+
|
|
186
196
|
export interface SetResourceScormValueRequest {
|
|
187
197
|
sessionId: string;
|
|
188
198
|
scormSetValueRequest: ScormSetValueRequest;
|
|
@@ -1090,6 +1100,61 @@ export class PlayerApi extends runtime.BaseAPI {
|
|
|
1090
1100
|
return await response.value();
|
|
1091
1101
|
}
|
|
1092
1102
|
|
|
1103
|
+
/**
|
|
1104
|
+
* Creates request options for putResourceSessionOverride without sending the request
|
|
1105
|
+
*/
|
|
1106
|
+
async putResourceSessionOverrideRequestOpts(requestParameters: PutResourceSessionOverrideRequest): Promise<runtime.RequestOpts> {
|
|
1107
|
+
if (requestParameters['sessionId'] == null) {
|
|
1108
|
+
throw new runtime.RequiredError(
|
|
1109
|
+
'sessionId',
|
|
1110
|
+
'Required parameter "sessionId" was null or undefined when calling putResourceSessionOverride().'
|
|
1111
|
+
);
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
if (requestParameters['putResourceSessionOverride'] == null) {
|
|
1115
|
+
throw new runtime.RequiredError(
|
|
1116
|
+
'putResourceSessionOverride',
|
|
1117
|
+
'Required parameter "putResourceSessionOverride" was null or undefined when calling putResourceSessionOverride().'
|
|
1118
|
+
);
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
const queryParameters: any = {};
|
|
1122
|
+
|
|
1123
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1124
|
+
|
|
1125
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1126
|
+
|
|
1127
|
+
|
|
1128
|
+
let urlPath = `/resource/sessions/{sessionId}/override`;
|
|
1129
|
+
urlPath = urlPath.replace('{sessionId}', encodeURIComponent(String(requestParameters['sessionId'])));
|
|
1130
|
+
|
|
1131
|
+
return {
|
|
1132
|
+
path: urlPath,
|
|
1133
|
+
method: 'PUT',
|
|
1134
|
+
headers: headerParameters,
|
|
1135
|
+
query: queryParameters,
|
|
1136
|
+
body: PutResourceSessionOverrideToJSON(requestParameters['putResourceSessionOverride']),
|
|
1137
|
+
};
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
/**
|
|
1141
|
+
* Override a learner\'s live resource-session progress
|
|
1142
|
+
*/
|
|
1143
|
+
async putResourceSessionOverrideRaw(requestParameters: PutResourceSessionOverrideRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetResourceSession>> {
|
|
1144
|
+
const requestOptions = await this.putResourceSessionOverrideRequestOpts(requestParameters);
|
|
1145
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
1146
|
+
|
|
1147
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetResourceSessionFromJSON(jsonValue));
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1150
|
+
/**
|
|
1151
|
+
* Override a learner\'s live resource-session progress
|
|
1152
|
+
*/
|
|
1153
|
+
async putResourceSessionOverride(requestParameters: PutResourceSessionOverrideRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetResourceSession> {
|
|
1154
|
+
const response = await this.putResourceSessionOverrideRaw(requestParameters, initOverrides);
|
|
1155
|
+
return await response.value();
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1093
1158
|
/**
|
|
1094
1159
|
* Creates request options for setResourceScormValue without sending the request
|
|
1095
1160
|
*/
|
package/src/apis/index.ts
CHANGED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* LMS API
|
|
5
|
+
* LMS API
|
|
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
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
* The effective attempt limit for one learner and course-version item.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface GetAttemptAllowance
|
|
20
|
+
*/
|
|
21
|
+
export interface GetAttemptAllowance {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof GetAttemptAllowance
|
|
26
|
+
*/
|
|
27
|
+
courseId: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof GetAttemptAllowance
|
|
32
|
+
*/
|
|
33
|
+
courseVersionId: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof GetAttemptAllowance
|
|
38
|
+
*/
|
|
39
|
+
itemId: string;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof GetAttemptAllowance
|
|
44
|
+
*/
|
|
45
|
+
userId: string;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof GetAttemptAllowance
|
|
50
|
+
*/
|
|
51
|
+
baseMaxAttempts: number;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {number}
|
|
55
|
+
* @memberof GetAttemptAllowance
|
|
56
|
+
*/
|
|
57
|
+
additionalAttempts: number;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {number}
|
|
61
|
+
* @memberof GetAttemptAllowance
|
|
62
|
+
*/
|
|
63
|
+
effectiveMaxAttempts: number;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {number}
|
|
67
|
+
* @memberof GetAttemptAllowance
|
|
68
|
+
*/
|
|
69
|
+
attemptsUsed: number;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @type {number}
|
|
73
|
+
* @memberof GetAttemptAllowance
|
|
74
|
+
*/
|
|
75
|
+
attemptsRemaining: number;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Check if a given object implements the GetAttemptAllowance interface.
|
|
80
|
+
*/
|
|
81
|
+
export function instanceOfGetAttemptAllowance(value: object): value is GetAttemptAllowance {
|
|
82
|
+
if (!('courseId' in value) || value['courseId'] === undefined) return false;
|
|
83
|
+
if (!('courseVersionId' in value) || value['courseVersionId'] === undefined) return false;
|
|
84
|
+
if (!('itemId' in value) || value['itemId'] === undefined) return false;
|
|
85
|
+
if (!('userId' in value) || value['userId'] === undefined) return false;
|
|
86
|
+
if (!('baseMaxAttempts' in value) || value['baseMaxAttempts'] === undefined) return false;
|
|
87
|
+
if (!('additionalAttempts' in value) || value['additionalAttempts'] === undefined) return false;
|
|
88
|
+
if (!('effectiveMaxAttempts' in value) || value['effectiveMaxAttempts'] === undefined) return false;
|
|
89
|
+
if (!('attemptsUsed' in value) || value['attemptsUsed'] === undefined) return false;
|
|
90
|
+
if (!('attemptsRemaining' in value) || value['attemptsRemaining'] === undefined) return false;
|
|
91
|
+
return true;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export function GetAttemptAllowanceFromJSON(json: any): GetAttemptAllowance {
|
|
95
|
+
return GetAttemptAllowanceFromJSONTyped(json, false);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export function GetAttemptAllowanceFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetAttemptAllowance {
|
|
99
|
+
if (json == null) {
|
|
100
|
+
return json;
|
|
101
|
+
}
|
|
102
|
+
return {
|
|
103
|
+
|
|
104
|
+
'courseId': json['course_id'],
|
|
105
|
+
'courseVersionId': json['course_version_id'],
|
|
106
|
+
'itemId': json['item_id'],
|
|
107
|
+
'userId': json['user_id'],
|
|
108
|
+
'baseMaxAttempts': json['base_max_attempts'],
|
|
109
|
+
'additionalAttempts': json['additional_attempts'],
|
|
110
|
+
'effectiveMaxAttempts': json['effective_max_attempts'],
|
|
111
|
+
'attemptsUsed': json['attempts_used'],
|
|
112
|
+
'attemptsRemaining': json['attempts_remaining'],
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export function GetAttemptAllowanceToJSON(json: any): GetAttemptAllowance {
|
|
117
|
+
return GetAttemptAllowanceToJSONTyped(json, false);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export function GetAttemptAllowanceToJSONTyped(value?: GetAttemptAllowance | null, ignoreDiscriminator: boolean = false): any {
|
|
121
|
+
if (value == null) {
|
|
122
|
+
return value;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
return {
|
|
126
|
+
|
|
127
|
+
'course_id': value['courseId'],
|
|
128
|
+
'course_version_id': value['courseVersionId'],
|
|
129
|
+
'item_id': value['itemId'],
|
|
130
|
+
'user_id': value['userId'],
|
|
131
|
+
'base_max_attempts': value['baseMaxAttempts'],
|
|
132
|
+
'additional_attempts': value['additionalAttempts'],
|
|
133
|
+
'effective_max_attempts': value['effectiveMaxAttempts'],
|
|
134
|
+
'attempts_used': value['attemptsUsed'],
|
|
135
|
+
'attempts_remaining': value['attemptsRemaining'],
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* LMS API
|
|
5
|
+
* LMS API
|
|
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
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
* A user-facing summary of product changes published on one date.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface GetChangelogEntry
|
|
20
|
+
*/
|
|
21
|
+
export interface GetChangelogEntry {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof GetChangelogEntry
|
|
26
|
+
*/
|
|
27
|
+
title: string;
|
|
28
|
+
/**
|
|
29
|
+
* A short Markdown-formatted summary. Multiple changes are represented as bullet points.
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof GetChangelogEntry
|
|
32
|
+
*/
|
|
33
|
+
desc: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {Date}
|
|
37
|
+
* @memberof GetChangelogEntry
|
|
38
|
+
*/
|
|
39
|
+
date: Date;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the GetChangelogEntry interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfGetChangelogEntry(value: object): value is GetChangelogEntry {
|
|
46
|
+
if (!('title' in value) || value['title'] === undefined) return false;
|
|
47
|
+
if (!('desc' in value) || value['desc'] === undefined) return false;
|
|
48
|
+
if (!('date' in value) || value['date'] === undefined) return false;
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function GetChangelogEntryFromJSON(json: any): GetChangelogEntry {
|
|
53
|
+
return GetChangelogEntryFromJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function GetChangelogEntryFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetChangelogEntry {
|
|
57
|
+
if (json == null) {
|
|
58
|
+
return json;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
|
|
62
|
+
'title': json['title'],
|
|
63
|
+
'desc': json['desc'],
|
|
64
|
+
'date': (new Date(json['date'])),
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function GetChangelogEntryToJSON(json: any): GetChangelogEntry {
|
|
69
|
+
return GetChangelogEntryToJSONTyped(json, false);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function GetChangelogEntryToJSONTyped(value?: GetChangelogEntry | null, ignoreDiscriminator: boolean = false): any {
|
|
73
|
+
if (value == null) {
|
|
74
|
+
return value;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return {
|
|
78
|
+
|
|
79
|
+
'title': value['title'],
|
|
80
|
+
'desc': value['desc'],
|
|
81
|
+
'date': value['date'].toISOString().substring(0,10),
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|