@easyedu/js-lsm-api 1.72.0 → 1.74.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 +3 -2
- package/dist/apis/ContentApi.d.ts +2 -2
- package/dist/apis/ContentApi.js +2 -2
- package/dist/apis/CourseApi.d.ts +1 -0
- package/dist/apis/CourseApi.js +3 -0
- package/dist/apis/UserApi.d.ts +28 -0
- package/dist/apis/UserApi.js +60 -1
- package/dist/esm/apis/ContentApi.d.ts +2 -2
- package/dist/esm/apis/ContentApi.js +2 -2
- package/dist/esm/apis/CourseApi.d.ts +1 -0
- package/dist/esm/apis/CourseApi.js +3 -0
- package/dist/esm/apis/UserApi.d.ts +28 -0
- package/dist/esm/apis/UserApi.js +59 -0
- package/docs/ContentApi.md +2 -1
- package/docs/CourseApi.md +10 -7
- package/docs/UserApi.md +79 -0
- package/package.json +1 -1
- package/src/apis/ContentApi.ts +2 -2
- package/src/apis/CourseApi.ts +5 -0
- package/src/apis/UserApi.ts +83 -0
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @easyedu/js-lsm-api@1.
|
|
1
|
+
# @easyedu/js-lsm-api@1.74.0
|
|
2
2
|
|
|
3
3
|
A TypeScript SDK client for the sbzw93t49b.execute-api.us-east-2.amazonaws.com API.
|
|
4
4
|
|
|
@@ -240,6 +240,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
240
240
|
*UserApi* | [**getAuthCheck**](docs/UserApi.md#getauthcheck) | **GET** /auth/check | Check if a user is logged in
|
|
241
241
|
*UserApi* | [**getCurrentUserPermissions**](docs/UserApi.md#getcurrentuserpermissions) | **GET** /users/current/permissions | Get the current user\'s permissions
|
|
242
242
|
*UserApi* | [**getUser**](docs/UserApi.md#getuser) | **GET** /users/{userId} | Get a user by id
|
|
243
|
+
*UserApi* | [**getUserEnrollments**](docs/UserApi.md#getuserenrollments) | **GET** /users/{userId}/enrollments | Get user enrollments
|
|
243
244
|
*UserApi* | [**postLogin**](docs/UserApi.md#postlogin) | **POST** /auth/login | Post a new login
|
|
244
245
|
*UserApi* | [**postLogout**](docs/UserApi.md#postlogout) | **POST** /auth/logout | Logout a user
|
|
245
246
|
*UserApi* | [**postSignupRequest**](docs/UserApi.md#postsignuprequest) | **POST** /auth/signup-request | Request a new organization signup
|
|
@@ -537,7 +538,7 @@ and is automatically generated by the
|
|
|
537
538
|
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
538
539
|
|
|
539
540
|
- API version: `1.0.0`
|
|
540
|
-
- Package version: `1.
|
|
541
|
+
- Package version: `1.74.0`
|
|
541
542
|
- Generator version: `7.22.0`
|
|
542
543
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
543
544
|
|
|
@@ -561,12 +561,12 @@ export declare class ContentApi extends runtime.BaseAPI {
|
|
|
561
561
|
*/
|
|
562
562
|
verifyScormManifestRequestOpts(requestParameters: VerifyScormManifestRequest): Promise<runtime.RequestOpts>;
|
|
563
563
|
/**
|
|
564
|
-
*
|
|
564
|
+
* Public endpoint that takes raw imsmanifest.xml content and returns only parsed values derived from the submitted manifest, plus validation warnings. Request body is limited to 1 MiB.
|
|
565
565
|
* Parse and verify a SCORM manifest
|
|
566
566
|
*/
|
|
567
567
|
verifyScormManifestRaw(requestParameters: VerifyScormManifestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PostVerifyManifest>>;
|
|
568
568
|
/**
|
|
569
|
-
*
|
|
569
|
+
* Public endpoint that takes raw imsmanifest.xml content and returns only parsed values derived from the submitted manifest, plus validation warnings. Request body is limited to 1 MiB.
|
|
570
570
|
* Parse and verify a SCORM manifest
|
|
571
571
|
*/
|
|
572
572
|
verifyScormManifest(requestParameters: VerifyScormManifestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PostVerifyManifest>;
|
package/dist/apis/ContentApi.js
CHANGED
|
@@ -1432,7 +1432,7 @@ class ContentApi extends runtime.BaseAPI {
|
|
|
1432
1432
|
});
|
|
1433
1433
|
}
|
|
1434
1434
|
/**
|
|
1435
|
-
*
|
|
1435
|
+
* Public endpoint that takes raw imsmanifest.xml content and returns only parsed values derived from the submitted manifest, plus validation warnings. Request body is limited to 1 MiB.
|
|
1436
1436
|
* Parse and verify a SCORM manifest
|
|
1437
1437
|
*/
|
|
1438
1438
|
verifyScormManifestRaw(requestParameters, initOverrides) {
|
|
@@ -1443,7 +1443,7 @@ class ContentApi extends runtime.BaseAPI {
|
|
|
1443
1443
|
});
|
|
1444
1444
|
}
|
|
1445
1445
|
/**
|
|
1446
|
-
*
|
|
1446
|
+
* Public endpoint that takes raw imsmanifest.xml content and returns only parsed values derived from the submitted manifest, plus validation warnings. Request body is limited to 1 MiB.
|
|
1447
1447
|
* Parse and verify a SCORM manifest
|
|
1448
1448
|
*/
|
|
1449
1449
|
verifyScormManifest(requestParameters, initOverrides) {
|
package/dist/apis/CourseApi.d.ts
CHANGED
package/dist/apis/CourseApi.js
CHANGED
|
@@ -338,6 +338,9 @@ class CourseApi extends runtime.BaseAPI {
|
|
|
338
338
|
throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling getCourseEnrollments().');
|
|
339
339
|
}
|
|
340
340
|
const queryParameters = {};
|
|
341
|
+
if (requestParameters['userId'] != null) {
|
|
342
|
+
queryParameters['userId'] = requestParameters['userId'];
|
|
343
|
+
}
|
|
341
344
|
if (requestParameters['type'] != null) {
|
|
342
345
|
queryParameters['type'] = requestParameters['type'];
|
|
343
346
|
}
|
package/dist/apis/UserApi.d.ts
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
+
import { type GetCourseEnrollmentList } from '../models/GetCourseEnrollmentList';
|
|
13
14
|
import { type GetUser } from '../models/GetUser';
|
|
14
15
|
import { type GetUserAvatarUpload } from '../models/GetUserAvatarUpload';
|
|
15
16
|
import { type LoginRes } from '../models/LoginRes';
|
|
@@ -25,6 +26,13 @@ export interface DeleteUserAvatarRequest {
|
|
|
25
26
|
export interface GetUserRequest {
|
|
26
27
|
userId: string;
|
|
27
28
|
}
|
|
29
|
+
export interface GetUserEnrollmentsRequest {
|
|
30
|
+
userId: string;
|
|
31
|
+
type?: GetUserEnrollmentsTypeEnum;
|
|
32
|
+
status?: string;
|
|
33
|
+
page?: number;
|
|
34
|
+
pageSize?: number;
|
|
35
|
+
}
|
|
28
36
|
export interface PostLoginRequest {
|
|
29
37
|
postLogin: PostLogin;
|
|
30
38
|
}
|
|
@@ -102,6 +110,18 @@ export declare class UserApi extends runtime.BaseAPI {
|
|
|
102
110
|
* Get a user by id
|
|
103
111
|
*/
|
|
104
112
|
getUser(requestParameters: GetUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetUser>;
|
|
113
|
+
/**
|
|
114
|
+
* Creates request options for getUserEnrollments without sending the request
|
|
115
|
+
*/
|
|
116
|
+
getUserEnrollmentsRequestOpts(requestParameters: GetUserEnrollmentsRequest): Promise<runtime.RequestOpts>;
|
|
117
|
+
/**
|
|
118
|
+
* Get user enrollments
|
|
119
|
+
*/
|
|
120
|
+
getUserEnrollmentsRaw(requestParameters: GetUserEnrollmentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCourseEnrollmentList>>;
|
|
121
|
+
/**
|
|
122
|
+
* Get user enrollments
|
|
123
|
+
*/
|
|
124
|
+
getUserEnrollments(requestParameters: GetUserEnrollmentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseEnrollmentList>;
|
|
105
125
|
/**
|
|
106
126
|
* Creates request options for postLogin without sending the request
|
|
107
127
|
*/
|
|
@@ -199,3 +219,11 @@ export declare class UserApi extends runtime.BaseAPI {
|
|
|
199
219
|
*/
|
|
200
220
|
verifySignupRequest(requestParameters: VerifySignupRequestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
201
221
|
}
|
|
222
|
+
/**
|
|
223
|
+
* @export
|
|
224
|
+
*/
|
|
225
|
+
export declare const GetUserEnrollmentsTypeEnum: {
|
|
226
|
+
readonly Student: "student";
|
|
227
|
+
readonly Instructor: "instructor";
|
|
228
|
+
};
|
|
229
|
+
export type GetUserEnrollmentsTypeEnum = typeof GetUserEnrollmentsTypeEnum[keyof typeof GetUserEnrollmentsTypeEnum];
|
package/dist/apis/UserApi.js
CHANGED
|
@@ -22,8 +22,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.UserApi = void 0;
|
|
25
|
+
exports.GetUserEnrollmentsTypeEnum = exports.UserApi = void 0;
|
|
26
26
|
const runtime = require("../runtime");
|
|
27
|
+
const GetCourseEnrollmentList_1 = require("../models/GetCourseEnrollmentList");
|
|
27
28
|
const GetUser_1 = require("../models/GetUser");
|
|
28
29
|
const GetUserAvatarUpload_1 = require("../models/GetUserAvatarUpload");
|
|
29
30
|
const LoginRes_1 = require("../models/LoginRes");
|
|
@@ -185,6 +186,57 @@ class UserApi extends runtime.BaseAPI {
|
|
|
185
186
|
return yield response.value();
|
|
186
187
|
});
|
|
187
188
|
}
|
|
189
|
+
/**
|
|
190
|
+
* Creates request options for getUserEnrollments without sending the request
|
|
191
|
+
*/
|
|
192
|
+
getUserEnrollmentsRequestOpts(requestParameters) {
|
|
193
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
194
|
+
if (requestParameters['userId'] == null) {
|
|
195
|
+
throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling getUserEnrollments().');
|
|
196
|
+
}
|
|
197
|
+
const queryParameters = {};
|
|
198
|
+
if (requestParameters['type'] != null) {
|
|
199
|
+
queryParameters['type'] = requestParameters['type'];
|
|
200
|
+
}
|
|
201
|
+
if (requestParameters['status'] != null) {
|
|
202
|
+
queryParameters['status'] = requestParameters['status'];
|
|
203
|
+
}
|
|
204
|
+
if (requestParameters['page'] != null) {
|
|
205
|
+
queryParameters['page'] = requestParameters['page'];
|
|
206
|
+
}
|
|
207
|
+
if (requestParameters['pageSize'] != null) {
|
|
208
|
+
queryParameters['pageSize'] = requestParameters['pageSize'];
|
|
209
|
+
}
|
|
210
|
+
const headerParameters = {};
|
|
211
|
+
let urlPath = `/users/{userId}/enrollments`;
|
|
212
|
+
urlPath = urlPath.replace('{userId}', encodeURIComponent(String(requestParameters['userId'])));
|
|
213
|
+
return {
|
|
214
|
+
path: urlPath,
|
|
215
|
+
method: 'GET',
|
|
216
|
+
headers: headerParameters,
|
|
217
|
+
query: queryParameters,
|
|
218
|
+
};
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Get user enrollments
|
|
223
|
+
*/
|
|
224
|
+
getUserEnrollmentsRaw(requestParameters, initOverrides) {
|
|
225
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
226
|
+
const requestOptions = yield this.getUserEnrollmentsRequestOpts(requestParameters);
|
|
227
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
228
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, GetCourseEnrollmentList_1.GetCourseEnrollmentListFromJSON)(jsonValue));
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Get user enrollments
|
|
233
|
+
*/
|
|
234
|
+
getUserEnrollments(requestParameters, initOverrides) {
|
|
235
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
236
|
+
const response = yield this.getUserEnrollmentsRaw(requestParameters, initOverrides);
|
|
237
|
+
return yield response.value();
|
|
238
|
+
});
|
|
239
|
+
}
|
|
188
240
|
/**
|
|
189
241
|
* Creates request options for postLogin without sending the request
|
|
190
242
|
*/
|
|
@@ -524,3 +576,10 @@ class UserApi extends runtime.BaseAPI {
|
|
|
524
576
|
}
|
|
525
577
|
}
|
|
526
578
|
exports.UserApi = UserApi;
|
|
579
|
+
/**
|
|
580
|
+
* @export
|
|
581
|
+
*/
|
|
582
|
+
exports.GetUserEnrollmentsTypeEnum = {
|
|
583
|
+
Student: 'student',
|
|
584
|
+
Instructor: 'instructor'
|
|
585
|
+
};
|
|
@@ -561,12 +561,12 @@ export declare class ContentApi extends runtime.BaseAPI {
|
|
|
561
561
|
*/
|
|
562
562
|
verifyScormManifestRequestOpts(requestParameters: VerifyScormManifestRequest): Promise<runtime.RequestOpts>;
|
|
563
563
|
/**
|
|
564
|
-
*
|
|
564
|
+
* Public endpoint that takes raw imsmanifest.xml content and returns only parsed values derived from the submitted manifest, plus validation warnings. Request body is limited to 1 MiB.
|
|
565
565
|
* Parse and verify a SCORM manifest
|
|
566
566
|
*/
|
|
567
567
|
verifyScormManifestRaw(requestParameters: VerifyScormManifestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PostVerifyManifest>>;
|
|
568
568
|
/**
|
|
569
|
-
*
|
|
569
|
+
* Public endpoint that takes raw imsmanifest.xml content and returns only parsed values derived from the submitted manifest, plus validation warnings. Request body is limited to 1 MiB.
|
|
570
570
|
* Parse and verify a SCORM manifest
|
|
571
571
|
*/
|
|
572
572
|
verifyScormManifest(requestParameters: VerifyScormManifestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PostVerifyManifest>;
|
|
@@ -1429,7 +1429,7 @@ export class ContentApi extends runtime.BaseAPI {
|
|
|
1429
1429
|
});
|
|
1430
1430
|
}
|
|
1431
1431
|
/**
|
|
1432
|
-
*
|
|
1432
|
+
* Public endpoint that takes raw imsmanifest.xml content and returns only parsed values derived from the submitted manifest, plus validation warnings. Request body is limited to 1 MiB.
|
|
1433
1433
|
* Parse and verify a SCORM manifest
|
|
1434
1434
|
*/
|
|
1435
1435
|
verifyScormManifestRaw(requestParameters, initOverrides) {
|
|
@@ -1440,7 +1440,7 @@ export class ContentApi extends runtime.BaseAPI {
|
|
|
1440
1440
|
});
|
|
1441
1441
|
}
|
|
1442
1442
|
/**
|
|
1443
|
-
*
|
|
1443
|
+
* Public endpoint that takes raw imsmanifest.xml content and returns only parsed values derived from the submitted manifest, plus validation warnings. Request body is limited to 1 MiB.
|
|
1444
1444
|
* Parse and verify a SCORM manifest
|
|
1445
1445
|
*/
|
|
1446
1446
|
verifyScormManifest(requestParameters, initOverrides) {
|
|
@@ -335,6 +335,9 @@ export class CourseApi extends runtime.BaseAPI {
|
|
|
335
335
|
throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling getCourseEnrollments().');
|
|
336
336
|
}
|
|
337
337
|
const queryParameters = {};
|
|
338
|
+
if (requestParameters['userId'] != null) {
|
|
339
|
+
queryParameters['userId'] = requestParameters['userId'];
|
|
340
|
+
}
|
|
338
341
|
if (requestParameters['type'] != null) {
|
|
339
342
|
queryParameters['type'] = requestParameters['type'];
|
|
340
343
|
}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
+
import { type GetCourseEnrollmentList } from '../models/GetCourseEnrollmentList';
|
|
13
14
|
import { type GetUser } from '../models/GetUser';
|
|
14
15
|
import { type GetUserAvatarUpload } from '../models/GetUserAvatarUpload';
|
|
15
16
|
import { type LoginRes } from '../models/LoginRes';
|
|
@@ -25,6 +26,13 @@ export interface DeleteUserAvatarRequest {
|
|
|
25
26
|
export interface GetUserRequest {
|
|
26
27
|
userId: string;
|
|
27
28
|
}
|
|
29
|
+
export interface GetUserEnrollmentsRequest {
|
|
30
|
+
userId: string;
|
|
31
|
+
type?: GetUserEnrollmentsTypeEnum;
|
|
32
|
+
status?: string;
|
|
33
|
+
page?: number;
|
|
34
|
+
pageSize?: number;
|
|
35
|
+
}
|
|
28
36
|
export interface PostLoginRequest {
|
|
29
37
|
postLogin: PostLogin;
|
|
30
38
|
}
|
|
@@ -102,6 +110,18 @@ export declare class UserApi extends runtime.BaseAPI {
|
|
|
102
110
|
* Get a user by id
|
|
103
111
|
*/
|
|
104
112
|
getUser(requestParameters: GetUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetUser>;
|
|
113
|
+
/**
|
|
114
|
+
* Creates request options for getUserEnrollments without sending the request
|
|
115
|
+
*/
|
|
116
|
+
getUserEnrollmentsRequestOpts(requestParameters: GetUserEnrollmentsRequest): Promise<runtime.RequestOpts>;
|
|
117
|
+
/**
|
|
118
|
+
* Get user enrollments
|
|
119
|
+
*/
|
|
120
|
+
getUserEnrollmentsRaw(requestParameters: GetUserEnrollmentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCourseEnrollmentList>>;
|
|
121
|
+
/**
|
|
122
|
+
* Get user enrollments
|
|
123
|
+
*/
|
|
124
|
+
getUserEnrollments(requestParameters: GetUserEnrollmentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseEnrollmentList>;
|
|
105
125
|
/**
|
|
106
126
|
* Creates request options for postLogin without sending the request
|
|
107
127
|
*/
|
|
@@ -199,3 +219,11 @@ export declare class UserApi extends runtime.BaseAPI {
|
|
|
199
219
|
*/
|
|
200
220
|
verifySignupRequest(requestParameters: VerifySignupRequestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
201
221
|
}
|
|
222
|
+
/**
|
|
223
|
+
* @export
|
|
224
|
+
*/
|
|
225
|
+
export declare const GetUserEnrollmentsTypeEnum: {
|
|
226
|
+
readonly Student: "student";
|
|
227
|
+
readonly Instructor: "instructor";
|
|
228
|
+
};
|
|
229
|
+
export type GetUserEnrollmentsTypeEnum = typeof GetUserEnrollmentsTypeEnum[keyof typeof GetUserEnrollmentsTypeEnum];
|
package/dist/esm/apis/UserApi.js
CHANGED
|
@@ -21,6 +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 { GetCourseEnrollmentListFromJSON, } from '../models/GetCourseEnrollmentList';
|
|
24
25
|
import { GetUserFromJSON, } from '../models/GetUser';
|
|
25
26
|
import { GetUserAvatarUploadFromJSON, } from '../models/GetUserAvatarUpload';
|
|
26
27
|
import { LoginResFromJSON, } from '../models/LoginRes';
|
|
@@ -182,6 +183,57 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
182
183
|
return yield response.value();
|
|
183
184
|
});
|
|
184
185
|
}
|
|
186
|
+
/**
|
|
187
|
+
* Creates request options for getUserEnrollments without sending the request
|
|
188
|
+
*/
|
|
189
|
+
getUserEnrollmentsRequestOpts(requestParameters) {
|
|
190
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
191
|
+
if (requestParameters['userId'] == null) {
|
|
192
|
+
throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling getUserEnrollments().');
|
|
193
|
+
}
|
|
194
|
+
const queryParameters = {};
|
|
195
|
+
if (requestParameters['type'] != null) {
|
|
196
|
+
queryParameters['type'] = requestParameters['type'];
|
|
197
|
+
}
|
|
198
|
+
if (requestParameters['status'] != null) {
|
|
199
|
+
queryParameters['status'] = requestParameters['status'];
|
|
200
|
+
}
|
|
201
|
+
if (requestParameters['page'] != null) {
|
|
202
|
+
queryParameters['page'] = requestParameters['page'];
|
|
203
|
+
}
|
|
204
|
+
if (requestParameters['pageSize'] != null) {
|
|
205
|
+
queryParameters['pageSize'] = requestParameters['pageSize'];
|
|
206
|
+
}
|
|
207
|
+
const headerParameters = {};
|
|
208
|
+
let urlPath = `/users/{userId}/enrollments`;
|
|
209
|
+
urlPath = urlPath.replace('{userId}', encodeURIComponent(String(requestParameters['userId'])));
|
|
210
|
+
return {
|
|
211
|
+
path: urlPath,
|
|
212
|
+
method: 'GET',
|
|
213
|
+
headers: headerParameters,
|
|
214
|
+
query: queryParameters,
|
|
215
|
+
};
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Get user enrollments
|
|
220
|
+
*/
|
|
221
|
+
getUserEnrollmentsRaw(requestParameters, initOverrides) {
|
|
222
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
223
|
+
const requestOptions = yield this.getUserEnrollmentsRequestOpts(requestParameters);
|
|
224
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
225
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetCourseEnrollmentListFromJSON(jsonValue));
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Get user enrollments
|
|
230
|
+
*/
|
|
231
|
+
getUserEnrollments(requestParameters, initOverrides) {
|
|
232
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
233
|
+
const response = yield this.getUserEnrollmentsRaw(requestParameters, initOverrides);
|
|
234
|
+
return yield response.value();
|
|
235
|
+
});
|
|
236
|
+
}
|
|
185
237
|
/**
|
|
186
238
|
* Creates request options for postLogin without sending the request
|
|
187
239
|
*/
|
|
@@ -520,3 +572,10 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
520
572
|
});
|
|
521
573
|
}
|
|
522
574
|
}
|
|
575
|
+
/**
|
|
576
|
+
* @export
|
|
577
|
+
*/
|
|
578
|
+
export const GetUserEnrollmentsTypeEnum = {
|
|
579
|
+
Student: 'student',
|
|
580
|
+
Instructor: 'instructor'
|
|
581
|
+
};
|
package/docs/ContentApi.md
CHANGED
|
@@ -2125,7 +2125,7 @@ No authorization required
|
|
|
2125
2125
|
|
|
2126
2126
|
Parse and verify a SCORM manifest
|
|
2127
2127
|
|
|
2128
|
-
|
|
2128
|
+
Public endpoint that takes raw imsmanifest.xml content and returns only parsed values derived from the submitted manifest, plus validation warnings. Request body is limited to 1 MiB.
|
|
2129
2129
|
|
|
2130
2130
|
### Example
|
|
2131
2131
|
|
|
@@ -2183,6 +2183,7 @@ No authorization required
|
|
|
2183
2183
|
|-------------|-------------|------------------|
|
|
2184
2184
|
| **200** | Manifest parsed (check valid field for success) | - |
|
|
2185
2185
|
| **400** | Request body is empty or not XML | - |
|
|
2186
|
+
| **413** | Request body exceeds 1 MiB | - |
|
|
2186
2187
|
|
|
2187
2188
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
2188
2189
|
|
package/docs/CourseApi.md
CHANGED
|
@@ -117,7 +117,7 @@ async function example() {
|
|
|
117
117
|
const body = {
|
|
118
118
|
// string
|
|
119
119
|
courseId: courseId_example,
|
|
120
|
-
// string
|
|
120
|
+
// string | Enrollment external ID.
|
|
121
121
|
enrollmentId: enrollmentId_example,
|
|
122
122
|
} satisfies DeleteCourseEnrollmentRequest;
|
|
123
123
|
|
|
@@ -139,7 +139,7 @@ example().catch(console.error);
|
|
|
139
139
|
| Name | Type | Description | Notes |
|
|
140
140
|
|------------- | ------------- | ------------- | -------------|
|
|
141
141
|
| **courseId** | `string` | | [Defaults to `undefined`] |
|
|
142
|
-
| **enrollmentId** | `string` |
|
|
142
|
+
| **enrollmentId** | `string` | Enrollment external ID. | [Defaults to `undefined`] |
|
|
143
143
|
|
|
144
144
|
### Return type
|
|
145
145
|
|
|
@@ -458,7 +458,7 @@ async function example() {
|
|
|
458
458
|
const body = {
|
|
459
459
|
// string
|
|
460
460
|
courseId: courseId_example,
|
|
461
|
-
// string
|
|
461
|
+
// string | Enrollment external ID.
|
|
462
462
|
enrollmentId: enrollmentId_example,
|
|
463
463
|
} satisfies GetCourseEnrollmentRequest;
|
|
464
464
|
|
|
@@ -480,7 +480,7 @@ example().catch(console.error);
|
|
|
480
480
|
| Name | Type | Description | Notes |
|
|
481
481
|
|------------- | ------------- | ------------- | -------------|
|
|
482
482
|
| **courseId** | `string` | | [Defaults to `undefined`] |
|
|
483
|
-
| **enrollmentId** | `string` |
|
|
483
|
+
| **enrollmentId** | `string` | Enrollment external ID. | [Defaults to `undefined`] |
|
|
484
484
|
|
|
485
485
|
### Return type
|
|
486
486
|
|
|
@@ -506,7 +506,7 @@ No authorization required
|
|
|
506
506
|
|
|
507
507
|
## getCourseEnrollments
|
|
508
508
|
|
|
509
|
-
> GetCourseEnrollmentList getCourseEnrollments(courseId, type, status, page, pageSize)
|
|
509
|
+
> GetCourseEnrollmentList getCourseEnrollments(courseId, userId, type, status, page, pageSize)
|
|
510
510
|
|
|
511
511
|
Get course enrollments
|
|
512
512
|
|
|
@@ -526,6 +526,8 @@ async function example() {
|
|
|
526
526
|
const body = {
|
|
527
527
|
// string
|
|
528
528
|
courseId: courseId_example,
|
|
529
|
+
// string | Filter enrollments to a specific user external ID, or `current` for the authenticated user. (optional)
|
|
530
|
+
userId: userId_example,
|
|
529
531
|
// 'student' | 'instructor' | Filter enrollments by user type (optional)
|
|
530
532
|
type: type_example,
|
|
531
533
|
// string | Comma-separated list of enrollment statuses to include. Example: `status=Enrolled,InProgress,Expired`. Unknown values are ignored. (optional)
|
|
@@ -554,6 +556,7 @@ example().catch(console.error);
|
|
|
554
556
|
| Name | Type | Description | Notes |
|
|
555
557
|
|------------- | ------------- | ------------- | -------------|
|
|
556
558
|
| **courseId** | `string` | | [Defaults to `undefined`] |
|
|
559
|
+
| **userId** | `string` | Filter enrollments to a specific user external ID, or `current` for the authenticated user. | [Optional] [Defaults to `undefined`] |
|
|
557
560
|
| **type** | `student`, `instructor` | Filter enrollments by user type | [Optional] [Defaults to `undefined`] [Enum: student, instructor] |
|
|
558
561
|
| **status** | `string` | Comma-separated list of enrollment statuses to include. Example: `status=Enrolled,InProgress,Expired`. Unknown values are ignored. | [Optional] [Defaults to `undefined`] |
|
|
559
562
|
| **page** | `number` | Page number for pagination | [Optional] [Defaults to `1`] |
|
|
@@ -1300,7 +1303,7 @@ async function example() {
|
|
|
1300
1303
|
const body = {
|
|
1301
1304
|
// string
|
|
1302
1305
|
courseId: courseId_example,
|
|
1303
|
-
// string
|
|
1306
|
+
// string | Enrollment external ID.
|
|
1304
1307
|
enrollmentId: enrollmentId_example,
|
|
1305
1308
|
// PutCourseEnrollment | Course enrollment fields to update
|
|
1306
1309
|
putCourseEnrollment: ...,
|
|
@@ -1324,7 +1327,7 @@ example().catch(console.error);
|
|
|
1324
1327
|
| Name | Type | Description | Notes |
|
|
1325
1328
|
|------------- | ------------- | ------------- | -------------|
|
|
1326
1329
|
| **courseId** | `string` | | [Defaults to `undefined`] |
|
|
1327
|
-
| **enrollmentId** | `string` |
|
|
1330
|
+
| **enrollmentId** | `string` | Enrollment external ID. | [Defaults to `undefined`] |
|
|
1328
1331
|
| **putCourseEnrollment** | [PutCourseEnrollment](PutCourseEnrollment.md) | Course enrollment fields to update | |
|
|
1329
1332
|
|
|
1330
1333
|
### Return type
|
package/docs/UserApi.md
CHANGED
|
@@ -8,6 +8,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
8
8
|
| [**getAuthCheck**](UserApi.md#getauthcheck) | **GET** /auth/check | Check if a user is logged in |
|
|
9
9
|
| [**getCurrentUserPermissions**](UserApi.md#getcurrentuserpermissions) | **GET** /users/current/permissions | Get the current user\'s permissions |
|
|
10
10
|
| [**getUser**](UserApi.md#getuser) | **GET** /users/{userId} | Get a user by id |
|
|
11
|
+
| [**getUserEnrollments**](UserApi.md#getuserenrollments) | **GET** /users/{userId}/enrollments | Get user enrollments |
|
|
11
12
|
| [**postLogin**](UserApi.md#postlogin) | **POST** /auth/login | Post a new login |
|
|
12
13
|
| [**postLogout**](UserApi.md#postlogout) | **POST** /auth/logout | Logout a user |
|
|
13
14
|
| [**postSignupRequest**](UserApi.md#postsignuprequest) | **POST** /auth/signup-request | Request a new organization signup |
|
|
@@ -268,6 +269,84 @@ No authorization required
|
|
|
268
269
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
269
270
|
|
|
270
271
|
|
|
272
|
+
## getUserEnrollments
|
|
273
|
+
|
|
274
|
+
> GetCourseEnrollmentList getUserEnrollments(userId, type, status, page, pageSize)
|
|
275
|
+
|
|
276
|
+
Get user enrollments
|
|
277
|
+
|
|
278
|
+
### Example
|
|
279
|
+
|
|
280
|
+
```ts
|
|
281
|
+
import {
|
|
282
|
+
Configuration,
|
|
283
|
+
UserApi,
|
|
284
|
+
} from '@easyedu/js-lsm-api';
|
|
285
|
+
import type { GetUserEnrollmentsRequest } from '@easyedu/js-lsm-api';
|
|
286
|
+
|
|
287
|
+
async function example() {
|
|
288
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
289
|
+
const api = new UserApi();
|
|
290
|
+
|
|
291
|
+
const body = {
|
|
292
|
+
// string | User external ID, or `current` for the authenticated user.
|
|
293
|
+
userId: userId_example,
|
|
294
|
+
// 'student' | 'instructor' | Filter enrollments by user type (optional)
|
|
295
|
+
type: type_example,
|
|
296
|
+
// string | Comma-separated list of enrollment statuses to include. Example: `status=Enrolled,InProgress,Expired`. Unknown values are ignored. (optional)
|
|
297
|
+
status: status_example,
|
|
298
|
+
// number | Page number for pagination (optional)
|
|
299
|
+
page: 56,
|
|
300
|
+
// number | Number of items per page (optional)
|
|
301
|
+
pageSize: 56,
|
|
302
|
+
} satisfies GetUserEnrollmentsRequest;
|
|
303
|
+
|
|
304
|
+
try {
|
|
305
|
+
const data = await api.getUserEnrollments(body);
|
|
306
|
+
console.log(data);
|
|
307
|
+
} catch (error) {
|
|
308
|
+
console.error(error);
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
// Run the test
|
|
313
|
+
example().catch(console.error);
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
### Parameters
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
| Name | Type | Description | Notes |
|
|
320
|
+
|------------- | ------------- | ------------- | -------------|
|
|
321
|
+
| **userId** | `string` | User external ID, or `current` for the authenticated user. | [Defaults to `undefined`] |
|
|
322
|
+
| **type** | `student`, `instructor` | Filter enrollments by user type | [Optional] [Defaults to `undefined`] [Enum: student, instructor] |
|
|
323
|
+
| **status** | `string` | Comma-separated list of enrollment statuses to include. Example: `status=Enrolled,InProgress,Expired`. Unknown values are ignored. | [Optional] [Defaults to `undefined`] |
|
|
324
|
+
| **page** | `number` | Page number for pagination | [Optional] [Defaults to `1`] |
|
|
325
|
+
| **pageSize** | `number` | Number of items per page | [Optional] [Defaults to `20`] |
|
|
326
|
+
|
|
327
|
+
### Return type
|
|
328
|
+
|
|
329
|
+
[**GetCourseEnrollmentList**](GetCourseEnrollmentList.md)
|
|
330
|
+
|
|
331
|
+
### Authorization
|
|
332
|
+
|
|
333
|
+
No authorization required
|
|
334
|
+
|
|
335
|
+
### HTTP request headers
|
|
336
|
+
|
|
337
|
+
- **Content-Type**: Not defined
|
|
338
|
+
- **Accept**: `application/json`
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
### HTTP response details
|
|
342
|
+
| Status code | Description | Response headers |
|
|
343
|
+
|-------------|-------------|------------------|
|
|
344
|
+
| **200** | get user enrollments response OK | - |
|
|
345
|
+
| **403** | Forbidden | - |
|
|
346
|
+
|
|
347
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
348
|
+
|
|
349
|
+
|
|
271
350
|
## postLogin
|
|
272
351
|
|
|
273
352
|
> LoginRes postLogin(postLogin)
|
package/package.json
CHANGED
package/src/apis/ContentApi.ts
CHANGED
|
@@ -2081,7 +2081,7 @@ export class ContentApi extends runtime.BaseAPI {
|
|
|
2081
2081
|
}
|
|
2082
2082
|
|
|
2083
2083
|
/**
|
|
2084
|
-
*
|
|
2084
|
+
* Public endpoint that takes raw imsmanifest.xml content and returns only parsed values derived from the submitted manifest, plus validation warnings. Request body is limited to 1 MiB.
|
|
2085
2085
|
* Parse and verify a SCORM manifest
|
|
2086
2086
|
*/
|
|
2087
2087
|
async verifyScormManifestRaw(requestParameters: VerifyScormManifestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PostVerifyManifest>> {
|
|
@@ -2092,7 +2092,7 @@ export class ContentApi extends runtime.BaseAPI {
|
|
|
2092
2092
|
}
|
|
2093
2093
|
|
|
2094
2094
|
/**
|
|
2095
|
-
*
|
|
2095
|
+
* Public endpoint that takes raw imsmanifest.xml content and returns only parsed values derived from the submitted manifest, plus validation warnings. Request body is limited to 1 MiB.
|
|
2096
2096
|
* Parse and verify a SCORM manifest
|
|
2097
2097
|
*/
|
|
2098
2098
|
async verifyScormManifest(requestParameters: VerifyScormManifestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PostVerifyManifest> {
|
package/src/apis/CourseApi.ts
CHANGED
|
@@ -118,6 +118,7 @@ export interface GetCourseEnrollmentRequest {
|
|
|
118
118
|
|
|
119
119
|
export interface GetCourseEnrollmentsRequest {
|
|
120
120
|
courseId: string;
|
|
121
|
+
userId?: string;
|
|
121
122
|
type?: GetCourseEnrollmentsTypeEnum;
|
|
122
123
|
status?: string;
|
|
123
124
|
page?: number;
|
|
@@ -544,6 +545,10 @@ export class CourseApi extends runtime.BaseAPI {
|
|
|
544
545
|
|
|
545
546
|
const queryParameters: any = {};
|
|
546
547
|
|
|
548
|
+
if (requestParameters['userId'] != null) {
|
|
549
|
+
queryParameters['userId'] = requestParameters['userId'];
|
|
550
|
+
}
|
|
551
|
+
|
|
547
552
|
if (requestParameters['type'] != null) {
|
|
548
553
|
queryParameters['type'] = requestParameters['type'];
|
|
549
554
|
}
|
package/src/apis/UserApi.ts
CHANGED
|
@@ -13,6 +13,11 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import * as runtime from '../runtime';
|
|
16
|
+
import {
|
|
17
|
+
type GetCourseEnrollmentList,
|
|
18
|
+
GetCourseEnrollmentListFromJSON,
|
|
19
|
+
GetCourseEnrollmentListToJSON,
|
|
20
|
+
} from '../models/GetCourseEnrollmentList';
|
|
16
21
|
import {
|
|
17
22
|
type GetUser,
|
|
18
23
|
GetUserFromJSON,
|
|
@@ -67,6 +72,14 @@ export interface GetUserRequest {
|
|
|
67
72
|
userId: string;
|
|
68
73
|
}
|
|
69
74
|
|
|
75
|
+
export interface GetUserEnrollmentsRequest {
|
|
76
|
+
userId: string;
|
|
77
|
+
type?: GetUserEnrollmentsTypeEnum;
|
|
78
|
+
status?: string;
|
|
79
|
+
page?: number;
|
|
80
|
+
pageSize?: number;
|
|
81
|
+
}
|
|
82
|
+
|
|
70
83
|
export interface PostLoginRequest {
|
|
71
84
|
postLogin: PostLogin;
|
|
72
85
|
}
|
|
@@ -266,6 +279,67 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
266
279
|
return await response.value();
|
|
267
280
|
}
|
|
268
281
|
|
|
282
|
+
/**
|
|
283
|
+
* Creates request options for getUserEnrollments without sending the request
|
|
284
|
+
*/
|
|
285
|
+
async getUserEnrollmentsRequestOpts(requestParameters: GetUserEnrollmentsRequest): Promise<runtime.RequestOpts> {
|
|
286
|
+
if (requestParameters['userId'] == null) {
|
|
287
|
+
throw new runtime.RequiredError(
|
|
288
|
+
'userId',
|
|
289
|
+
'Required parameter "userId" was null or undefined when calling getUserEnrollments().'
|
|
290
|
+
);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
const queryParameters: any = {};
|
|
294
|
+
|
|
295
|
+
if (requestParameters['type'] != null) {
|
|
296
|
+
queryParameters['type'] = requestParameters['type'];
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
if (requestParameters['status'] != null) {
|
|
300
|
+
queryParameters['status'] = requestParameters['status'];
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
if (requestParameters['page'] != null) {
|
|
304
|
+
queryParameters['page'] = requestParameters['page'];
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
if (requestParameters['pageSize'] != null) {
|
|
308
|
+
queryParameters['pageSize'] = requestParameters['pageSize'];
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
let urlPath = `/users/{userId}/enrollments`;
|
|
315
|
+
urlPath = urlPath.replace('{userId}', encodeURIComponent(String(requestParameters['userId'])));
|
|
316
|
+
|
|
317
|
+
return {
|
|
318
|
+
path: urlPath,
|
|
319
|
+
method: 'GET',
|
|
320
|
+
headers: headerParameters,
|
|
321
|
+
query: queryParameters,
|
|
322
|
+
};
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* Get user enrollments
|
|
327
|
+
*/
|
|
328
|
+
async getUserEnrollmentsRaw(requestParameters: GetUserEnrollmentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCourseEnrollmentList>> {
|
|
329
|
+
const requestOptions = await this.getUserEnrollmentsRequestOpts(requestParameters);
|
|
330
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
331
|
+
|
|
332
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetCourseEnrollmentListFromJSON(jsonValue));
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Get user enrollments
|
|
337
|
+
*/
|
|
338
|
+
async getUserEnrollments(requestParameters: GetUserEnrollmentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseEnrollmentList> {
|
|
339
|
+
const response = await this.getUserEnrollmentsRaw(requestParameters, initOverrides);
|
|
340
|
+
return await response.value();
|
|
341
|
+
}
|
|
342
|
+
|
|
269
343
|
/**
|
|
270
344
|
* Creates request options for postLogin without sending the request
|
|
271
345
|
*/
|
|
@@ -664,3 +738,12 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
664
738
|
}
|
|
665
739
|
|
|
666
740
|
}
|
|
741
|
+
|
|
742
|
+
/**
|
|
743
|
+
* @export
|
|
744
|
+
*/
|
|
745
|
+
export const GetUserEnrollmentsTypeEnum = {
|
|
746
|
+
Student: 'student',
|
|
747
|
+
Instructor: 'instructor'
|
|
748
|
+
} as const;
|
|
749
|
+
export type GetUserEnrollmentsTypeEnum = typeof GetUserEnrollmentsTypeEnum[keyof typeof GetUserEnrollmentsTypeEnum];
|