@easyedu/js-lsm-api 1.127.0 → 1.129.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/.openapi-generator/FILES +10 -0
  2. package/README.md +8 -2
  3. package/dist/apis/ScormToolsApi.d.ts +35 -0
  4. package/dist/apis/ScormToolsApi.js +75 -0
  5. package/dist/apis/UserApi.d.ts +16 -0
  6. package/dist/apis/UserApi.js +42 -0
  7. package/dist/apis/index.d.ts +1 -0
  8. package/dist/apis/index.js +1 -0
  9. package/dist/esm/apis/ScormToolsApi.d.ts +35 -0
  10. package/dist/esm/apis/ScormToolsApi.js +71 -0
  11. package/dist/esm/apis/UserApi.d.ts +16 -0
  12. package/dist/esm/apis/UserApi.js +42 -0
  13. package/dist/esm/apis/index.d.ts +1 -0
  14. package/dist/esm/apis/index.js +1 -0
  15. package/dist/esm/models/GetSignupSlugAvailability.d.ts +38 -0
  16. package/dist/esm/models/GetSignupSlugAvailability.js +47 -0
  17. package/dist/esm/models/PostSignupRequest.d.ts +6 -0
  18. package/dist/esm/models/PostSignupRequest.js +2 -0
  19. package/dist/esm/models/PostVerifyManifest.d.ts +106 -0
  20. package/dist/esm/models/PostVerifyManifest.js +73 -0
  21. package/dist/esm/models/PostVerifyManifestItemsInner.d.ts +74 -0
  22. package/dist/esm/models/PostVerifyManifestItemsInner.js +55 -0
  23. package/dist/esm/models/PostVerifyManifestResourcesInner.d.ts +56 -0
  24. package/dist/esm/models/PostVerifyManifestResourcesInner.js +49 -0
  25. package/dist/esm/models/index.d.ts +4 -0
  26. package/dist/esm/models/index.js +4 -0
  27. package/dist/models/GetSignupSlugAvailability.d.ts +38 -0
  28. package/dist/models/GetSignupSlugAvailability.js +54 -0
  29. package/dist/models/PostSignupRequest.d.ts +6 -0
  30. package/dist/models/PostSignupRequest.js +2 -0
  31. package/dist/models/PostVerifyManifest.d.ts +106 -0
  32. package/dist/models/PostVerifyManifest.js +80 -0
  33. package/dist/models/PostVerifyManifestItemsInner.d.ts +74 -0
  34. package/dist/models/PostVerifyManifestItemsInner.js +62 -0
  35. package/dist/models/PostVerifyManifestResourcesInner.d.ts +56 -0
  36. package/dist/models/PostVerifyManifestResourcesInner.js +56 -0
  37. package/dist/models/index.d.ts +4 -0
  38. package/dist/models/index.js +4 -0
  39. package/docs/GetSignupSlugAvailability.md +36 -0
  40. package/docs/PostSignupRequest.md +2 -0
  41. package/docs/PostVerifyManifest.md +59 -0
  42. package/docs/PostVerifyManifestItemsInner.md +48 -0
  43. package/docs/PostVerifyManifestResourcesInner.md +42 -0
  44. package/docs/ScormToolsApi.md +78 -0
  45. package/docs/UserApi.md +69 -0
  46. package/package.json +1 -1
  47. package/src/apis/ScormToolsApi.ts +80 -0
  48. package/src/apis/UserApi.ts +57 -0
  49. package/src/apis/index.ts +1 -0
  50. package/src/models/GetSignupSlugAvailability.ts +75 -0
  51. package/src/models/PostSignupRequest.ts +8 -0
  52. package/src/models/PostVerifyManifest.ts +179 -0
  53. package/src/models/PostVerifyManifestItemsInner.ts +121 -0
  54. package/src/models/PostVerifyManifestResourcesInner.ts +97 -0
  55. package/src/models/index.ts +4 -0
package/docs/UserApi.md CHANGED
@@ -7,6 +7,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
7
7
  | [**deleteUserAvatar**](UserApi.md#deleteuseravatar) | **DELETE** /users/{userId}/avatar | Remove the current user\'s profile photo |
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
+ | [**getSignupSlugAvailability**](UserApi.md#getsignupslugavailability) | **GET** /auth/signup/slug-availability | Check whether a learner subdomain is available |
10
11
  | [**getUser**](UserApi.md#getuser) | **GET** /users/{userId} | Get a user by id |
11
12
  | [**getUserCourses**](UserApi.md#getusercourses) | **GET** /users/{userId}/courses | Get enrolled courses for a user |
12
13
  | [**getUserEnrollments**](UserApi.md#getuserenrollments) | **GET** /users/{userId}/enrollments | Get user enrollments |
@@ -205,6 +206,72 @@ No authorization required
205
206
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
206
207
 
207
208
 
209
+ ## getSignupSlugAvailability
210
+
211
+ > GetSignupSlugAvailability getSignupSlugAvailability(slug)
212
+
213
+ Check whether a learner subdomain is available
214
+
215
+ ### Example
216
+
217
+ ```ts
218
+ import {
219
+ Configuration,
220
+ UserApi,
221
+ } from '@easyedu/js-lsm-api';
222
+ import type { GetSignupSlugAvailabilityRequest } from '@easyedu/js-lsm-api';
223
+
224
+ async function example() {
225
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
226
+ const api = new UserApi();
227
+
228
+ const body = {
229
+ // string
230
+ slug: slug_example,
231
+ } satisfies GetSignupSlugAvailabilityRequest;
232
+
233
+ try {
234
+ const data = await api.getSignupSlugAvailability(body);
235
+ console.log(data);
236
+ } catch (error) {
237
+ console.error(error);
238
+ }
239
+ }
240
+
241
+ // Run the test
242
+ example().catch(console.error);
243
+ ```
244
+
245
+ ### Parameters
246
+
247
+
248
+ | Name | Type | Description | Notes |
249
+ |------------- | ------------- | ------------- | -------------|
250
+ | **slug** | `string` | | [Defaults to `undefined`] |
251
+
252
+ ### Return type
253
+
254
+ [**GetSignupSlugAvailability**](GetSignupSlugAvailability.md)
255
+
256
+ ### Authorization
257
+
258
+ No authorization required
259
+
260
+ ### HTTP request headers
261
+
262
+ - **Content-Type**: Not defined
263
+ - **Accept**: `application/json`
264
+
265
+
266
+ ### HTTP response details
267
+ | Status code | Description | Response headers |
268
+ |-------------|-------------|------------------|
269
+ | **200** | Current availability; does not reserve the address | - |
270
+ | **400** | Invalid or reserved subdomain | - |
271
+
272
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
273
+
274
+
208
275
  ## getUser
209
276
 
210
277
  > GetUser getUser(userId)
@@ -621,6 +688,7 @@ No authorization required
621
688
  |-------------|-------------|------------------|
622
689
  | **200** | signup request accepted | - |
623
690
  | **400** | signup request validation error | - |
691
+ | **409** | Learner subdomain is already in use | - |
624
692
 
625
693
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
626
694
 
@@ -957,6 +1025,7 @@ No authorization required
957
1025
  |-------------|-------------|------------------|
958
1026
  | **303** | signup verified and redirected to portal signin | - |
959
1027
  | **400** | invalid or expired signup verification token | - |
1028
+ | **409** | Saved learner subdomain was claimed before verification; submit signup again with another address | - |
960
1029
 
961
1030
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
962
1031
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyedu/js-lsm-api",
3
- "version": "1.127.0",
3
+ "version": "1.129.0",
4
4
  "description": "OpenAPI client for @easyedu/js-lsm-api",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -0,0 +1,80 @@
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 * as runtime from '../runtime';
16
+ import {
17
+ type PostVerifyManifest,
18
+ PostVerifyManifestFromJSON,
19
+ PostVerifyManifestToJSON,
20
+ } from '../models/PostVerifyManifest';
21
+
22
+ export interface VerifyScormManifestRequest {
23
+ body: string;
24
+ }
25
+
26
+ /**
27
+ *
28
+ */
29
+ export class ScormToolsApi extends runtime.BaseAPI {
30
+
31
+ /**
32
+ * Creates request options for verifyScormManifest without sending the request
33
+ */
34
+ async verifyScormManifestRequestOpts(requestParameters: VerifyScormManifestRequest): Promise<runtime.RequestOpts> {
35
+ if (requestParameters['body'] == null) {
36
+ throw new runtime.RequiredError(
37
+ 'body',
38
+ 'Required parameter "body" was null or undefined when calling verifyScormManifest().'
39
+ );
40
+ }
41
+
42
+ const queryParameters: any = {};
43
+
44
+ const headerParameters: runtime.HTTPHeaders = {};
45
+
46
+ headerParameters['Content-Type'] = 'application/xml';
47
+
48
+
49
+ let urlPath = `/scorm/tools/verify-manifest`;
50
+
51
+ return {
52
+ path: urlPath,
53
+ method: 'POST',
54
+ headers: headerParameters,
55
+ query: queryParameters,
56
+ body: requestParameters['body'] as any,
57
+ };
58
+ }
59
+
60
+ /**
61
+ * 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.
62
+ * Parse and verify a SCORM manifest
63
+ */
64
+ async verifyScormManifestRaw(requestParameters: VerifyScormManifestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PostVerifyManifest>> {
65
+ const requestOptions = await this.verifyScormManifestRequestOpts(requestParameters);
66
+ const response = await this.request(requestOptions, initOverrides);
67
+
68
+ return new runtime.JSONApiResponse(response, (jsonValue) => PostVerifyManifestFromJSON(jsonValue));
69
+ }
70
+
71
+ /**
72
+ * 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.
73
+ * Parse and verify a SCORM manifest
74
+ */
75
+ async verifyScormManifest(requestParameters: VerifyScormManifestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PostVerifyManifest> {
76
+ const response = await this.verifyScormManifestRaw(requestParameters, initOverrides);
77
+ return await response.value();
78
+ }
79
+
80
+ }
@@ -18,6 +18,11 @@ import {
18
18
  GetCourseEnrollmentListFromJSON,
19
19
  GetCourseEnrollmentListToJSON,
20
20
  } from '../models/GetCourseEnrollmentList';
21
+ import {
22
+ type GetSignupSlugAvailability,
23
+ GetSignupSlugAvailabilityFromJSON,
24
+ GetSignupSlugAvailabilityToJSON,
25
+ } from '../models/GetSignupSlugAvailability';
21
26
  import {
22
27
  type GetUser,
23
28
  GetUserFromJSON,
@@ -73,6 +78,10 @@ export interface DeleteUserAvatarRequest {
73
78
  userId: string;
74
79
  }
75
80
 
81
+ export interface GetSignupSlugAvailabilityRequest {
82
+ slug: string;
83
+ }
84
+
76
85
  export interface GetUserRequest {
77
86
  userId: string;
78
87
  }
@@ -250,6 +259,54 @@ export class UserApi extends runtime.BaseAPI {
250
259
  return await response.value();
251
260
  }
252
261
 
262
+ /**
263
+ * Creates request options for getSignupSlugAvailability without sending the request
264
+ */
265
+ async getSignupSlugAvailabilityRequestOpts(requestParameters: GetSignupSlugAvailabilityRequest): Promise<runtime.RequestOpts> {
266
+ if (requestParameters['slug'] == null) {
267
+ throw new runtime.RequiredError(
268
+ 'slug',
269
+ 'Required parameter "slug" was null or undefined when calling getSignupSlugAvailability().'
270
+ );
271
+ }
272
+
273
+ const queryParameters: any = {};
274
+
275
+ if (requestParameters['slug'] != null) {
276
+ queryParameters['slug'] = requestParameters['slug'];
277
+ }
278
+
279
+ const headerParameters: runtime.HTTPHeaders = {};
280
+
281
+
282
+ let urlPath = `/auth/signup/slug-availability`;
283
+
284
+ return {
285
+ path: urlPath,
286
+ method: 'GET',
287
+ headers: headerParameters,
288
+ query: queryParameters,
289
+ };
290
+ }
291
+
292
+ /**
293
+ * Check whether a learner subdomain is available
294
+ */
295
+ async getSignupSlugAvailabilityRaw(requestParameters: GetSignupSlugAvailabilityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetSignupSlugAvailability>> {
296
+ const requestOptions = await this.getSignupSlugAvailabilityRequestOpts(requestParameters);
297
+ const response = await this.request(requestOptions, initOverrides);
298
+
299
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetSignupSlugAvailabilityFromJSON(jsonValue));
300
+ }
301
+
302
+ /**
303
+ * Check whether a learner subdomain is available
304
+ */
305
+ async getSignupSlugAvailability(requestParameters: GetSignupSlugAvailabilityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetSignupSlugAvailability> {
306
+ const response = await this.getSignupSlugAvailabilityRaw(requestParameters, initOverrides);
307
+ return await response.value();
308
+ }
309
+
253
310
  /**
254
311
  * Creates request options for getUser without sending the request
255
312
  */
package/src/apis/index.ts CHANGED
@@ -22,6 +22,7 @@ export * from './QuestionImportApi';
22
22
  export * from './ReportingApi';
23
23
  export * from './RichTextApi';
24
24
  export * from './RoleApi';
25
+ export * from './ScormToolsApi';
25
26
  export * from './SupportTicketApi';
26
27
  export * from './SystemApi';
27
28
  export * from './UserApi';
@@ -0,0 +1,75 @@
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
+ *
18
+ * @export
19
+ * @interface GetSignupSlugAvailability
20
+ */
21
+ export interface GetSignupSlugAvailability {
22
+ /**
23
+ * Normalized subdomain checked.
24
+ * @type {string}
25
+ * @memberof GetSignupSlugAvailability
26
+ */
27
+ slug: string;
28
+ /**
29
+ * Whether the subdomain is currently unused. This check does not reserve it.
30
+ * @type {boolean}
31
+ * @memberof GetSignupSlugAvailability
32
+ */
33
+ available: boolean;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the GetSignupSlugAvailability interface.
38
+ */
39
+ export function instanceOfGetSignupSlugAvailability(value: object): value is GetSignupSlugAvailability {
40
+ if (!('slug' in value) || value['slug'] === undefined) return false;
41
+ if (!('available' in value) || value['available'] === undefined) return false;
42
+ return true;
43
+ }
44
+
45
+ export function GetSignupSlugAvailabilityFromJSON(json: any): GetSignupSlugAvailability {
46
+ return GetSignupSlugAvailabilityFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function GetSignupSlugAvailabilityFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetSignupSlugAvailability {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'slug': json['slug'],
56
+ 'available': json['available'],
57
+ };
58
+ }
59
+
60
+ export function GetSignupSlugAvailabilityToJSON(json: any): GetSignupSlugAvailability {
61
+ return GetSignupSlugAvailabilityToJSONTyped(json, false);
62
+ }
63
+
64
+ export function GetSignupSlugAvailabilityToJSONTyped(value?: GetSignupSlugAvailability | null, ignoreDiscriminator: boolean = false): any {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+
69
+ return {
70
+
71
+ 'slug': value['slug'],
72
+ 'available': value['available'],
73
+ };
74
+ }
75
+
@@ -49,6 +49,12 @@ export interface PostSignupRequest {
49
49
  * @memberof PostSignupRequest
50
50
  */
51
51
  organization: string;
52
+ /**
53
+ * Requested learner subdomain, without the domain suffix. Must be available and not reserved. If omitted, it is derived from the organization. Availability does not reserve the address; verification checks again and never substitutes another address.
54
+ * @type {string}
55
+ * @memberof PostSignupRequest
56
+ */
57
+ slug?: string;
52
58
  /**
53
59
  * Signup/onboarding role supplied by the user; not an LMS RBAC role.
54
60
  * @type {string}
@@ -92,6 +98,7 @@ export function PostSignupRequestFromJSONTyped(json: any, ignoreDiscriminator: b
92
98
  'email': json['email'],
93
99
  'password': json['password'],
94
100
  'organization': json['organization'],
101
+ 'slug': json['slug'] == null ? undefined : json['slug'],
95
102
  'jobRole': json['job_role'],
96
103
  'learnerCount': json['learner_count'],
97
104
  };
@@ -113,6 +120,7 @@ export function PostSignupRequestToJSONTyped(value?: PostSignupRequest | null, i
113
120
  'email': value['email'],
114
121
  'password': value['password'],
115
122
  'organization': value['organization'],
123
+ 'slug': value['slug'],
116
124
  'job_role': value['jobRole'],
117
125
  'learner_count': value['learnerCount'],
118
126
  };
@@ -0,0 +1,179 @@
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
+ import type { PostVerifyManifestResourcesInner } from './PostVerifyManifestResourcesInner';
17
+ import {
18
+ PostVerifyManifestResourcesInnerFromJSON,
19
+ PostVerifyManifestResourcesInnerFromJSONTyped,
20
+ PostVerifyManifestResourcesInnerToJSON,
21
+ PostVerifyManifestResourcesInnerToJSONTyped,
22
+ } from './PostVerifyManifestResourcesInner';
23
+ import type { PostVerifyManifestItemsInner } from './PostVerifyManifestItemsInner';
24
+ import {
25
+ PostVerifyManifestItemsInnerFromJSON,
26
+ PostVerifyManifestItemsInnerFromJSONTyped,
27
+ PostVerifyManifestItemsInnerToJSON,
28
+ PostVerifyManifestItemsInnerToJSONTyped,
29
+ } from './PostVerifyManifestItemsInner';
30
+
31
+ /**
32
+ * Response from parsing and verifying a SCORM manifest
33
+ * @export
34
+ * @interface PostVerifyManifest
35
+ */
36
+ export interface PostVerifyManifest {
37
+ /**
38
+ * Whether the manifest parsed successfully
39
+ * @type {boolean}
40
+ * @memberof PostVerifyManifest
41
+ */
42
+ valid: boolean;
43
+ /**
44
+ * Parse errors that prevented successful parsing
45
+ * @type {Array<string>}
46
+ * @memberof PostVerifyManifest
47
+ */
48
+ errors: Array<string>;
49
+ /**
50
+ * Non-fatal issues or potential problems detected
51
+ * @type {Array<string>}
52
+ * @memberof PostVerifyManifest
53
+ */
54
+ warnings: Array<string>;
55
+ /**
56
+ * Detected SCORM version (e.g., "1.2", "2004 4th Edition")
57
+ * @type {string}
58
+ * @memberof PostVerifyManifest
59
+ */
60
+ scormVersion?: string | null;
61
+ /**
62
+ * Manifest identifier attribute
63
+ * @type {string}
64
+ * @memberof PostVerifyManifest
65
+ */
66
+ identifier?: string | null;
67
+ /**
68
+ * Manifest version attribute
69
+ * @type {string}
70
+ * @memberof PostVerifyManifest
71
+ */
72
+ version?: string | null;
73
+ /**
74
+ * Organization title (course title)
75
+ * @type {string}
76
+ * @memberof PostVerifyManifest
77
+ */
78
+ title?: string | null;
79
+ /**
80
+ * Metadata schema (e.g., "ADL SCORM")
81
+ * @type {string}
82
+ * @memberof PostVerifyManifest
83
+ */
84
+ schema?: string | null;
85
+ /**
86
+ * Metadata schema version
87
+ * @type {string}
88
+ * @memberof PostVerifyManifest
89
+ */
90
+ schemaVersion?: string | null;
91
+ /**
92
+ * Default organization identifier
93
+ * @type {string}
94
+ * @memberof PostVerifyManifest
95
+ */
96
+ defaultOrganization?: string | null;
97
+ /**
98
+ * List of items (SCOs) from the organization
99
+ * @type {Array<PostVerifyManifestItemsInner>}
100
+ * @memberof PostVerifyManifest
101
+ */
102
+ items?: Array<PostVerifyManifestItemsInner>;
103
+ /**
104
+ * List of resources from the manifest
105
+ * @type {Array<PostVerifyManifestResourcesInner>}
106
+ * @memberof PostVerifyManifest
107
+ */
108
+ resources?: Array<PostVerifyManifestResourcesInner>;
109
+ /**
110
+ * List of SCO entry point URLs
111
+ * @type {Array<string>}
112
+ * @memberof PostVerifyManifest
113
+ */
114
+ entryPoints?: Array<string>;
115
+ }
116
+
117
+ /**
118
+ * Check if a given object implements the PostVerifyManifest interface.
119
+ */
120
+ export function instanceOfPostVerifyManifest(value: object): value is PostVerifyManifest {
121
+ if (!('valid' in value) || value['valid'] === undefined) return false;
122
+ if (!('errors' in value) || value['errors'] === undefined) return false;
123
+ if (!('warnings' in value) || value['warnings'] === undefined) return false;
124
+ return true;
125
+ }
126
+
127
+ export function PostVerifyManifestFromJSON(json: any): PostVerifyManifest {
128
+ return PostVerifyManifestFromJSONTyped(json, false);
129
+ }
130
+
131
+ export function PostVerifyManifestFromJSONTyped(json: any, ignoreDiscriminator: boolean): PostVerifyManifest {
132
+ if (json == null) {
133
+ return json;
134
+ }
135
+ return {
136
+
137
+ 'valid': json['valid'],
138
+ 'errors': json['errors'],
139
+ 'warnings': json['warnings'],
140
+ 'scormVersion': json['scorm_version'] == null ? undefined : json['scorm_version'],
141
+ 'identifier': json['identifier'] == null ? undefined : json['identifier'],
142
+ 'version': json['version'] == null ? undefined : json['version'],
143
+ 'title': json['title'] == null ? undefined : json['title'],
144
+ 'schema': json['schema'] == null ? undefined : json['schema'],
145
+ 'schemaVersion': json['schema_version'] == null ? undefined : json['schema_version'],
146
+ 'defaultOrganization': json['default_organization'] == null ? undefined : json['default_organization'],
147
+ 'items': json['items'] == null ? undefined : ((json['items'] as Array<any>).map(PostVerifyManifestItemsInnerFromJSON)),
148
+ 'resources': json['resources'] == null ? undefined : ((json['resources'] as Array<any>).map(PostVerifyManifestResourcesInnerFromJSON)),
149
+ 'entryPoints': json['entry_points'] == null ? undefined : json['entry_points'],
150
+ };
151
+ }
152
+
153
+ export function PostVerifyManifestToJSON(json: any): PostVerifyManifest {
154
+ return PostVerifyManifestToJSONTyped(json, false);
155
+ }
156
+
157
+ export function PostVerifyManifestToJSONTyped(value?: PostVerifyManifest | null, ignoreDiscriminator: boolean = false): any {
158
+ if (value == null) {
159
+ return value;
160
+ }
161
+
162
+ return {
163
+
164
+ 'valid': value['valid'],
165
+ 'errors': value['errors'],
166
+ 'warnings': value['warnings'],
167
+ 'scorm_version': value['scormVersion'],
168
+ 'identifier': value['identifier'],
169
+ 'version': value['version'],
170
+ 'title': value['title'],
171
+ 'schema': value['schema'],
172
+ 'schema_version': value['schemaVersion'],
173
+ 'default_organization': value['defaultOrganization'],
174
+ 'items': value['items'] == null ? undefined : ((value['items'] as Array<any>).map(PostVerifyManifestItemsInnerToJSON)),
175
+ 'resources': value['resources'] == null ? undefined : ((value['resources'] as Array<any>).map(PostVerifyManifestResourcesInnerToJSON)),
176
+ 'entry_points': value['entryPoints'],
177
+ };
178
+ }
179
+
@@ -0,0 +1,121 @@
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
+ *
18
+ * @export
19
+ * @interface PostVerifyManifestItemsInner
20
+ */
21
+ export interface PostVerifyManifestItemsInner {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof PostVerifyManifestItemsInner
26
+ */
27
+ identifier?: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof PostVerifyManifestItemsInner
32
+ */
33
+ identifierRef?: string | null;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof PostVerifyManifestItemsInner
38
+ */
39
+ title?: string;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof PostVerifyManifestItemsInner
44
+ */
45
+ masteryScore?: string | null;
46
+ /**
47
+ *
48
+ * @type {string}
49
+ * @memberof PostVerifyManifestItemsInner
50
+ */
51
+ maxTimeAllowed?: string | null;
52
+ /**
53
+ *
54
+ * @type {string}
55
+ * @memberof PostVerifyManifestItemsInner
56
+ */
57
+ timeLimitAction?: string | null;
58
+ /**
59
+ *
60
+ * @type {string}
61
+ * @memberof PostVerifyManifestItemsInner
62
+ */
63
+ dataFromLms?: string | null;
64
+ /**
65
+ *
66
+ * @type {string}
67
+ * @memberof PostVerifyManifestItemsInner
68
+ */
69
+ minNormalizedMeasure?: string | null;
70
+ }
71
+
72
+ /**
73
+ * Check if a given object implements the PostVerifyManifestItemsInner interface.
74
+ */
75
+ export function instanceOfPostVerifyManifestItemsInner(value: object): value is PostVerifyManifestItemsInner {
76
+ return true;
77
+ }
78
+
79
+ export function PostVerifyManifestItemsInnerFromJSON(json: any): PostVerifyManifestItemsInner {
80
+ return PostVerifyManifestItemsInnerFromJSONTyped(json, false);
81
+ }
82
+
83
+ export function PostVerifyManifestItemsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): PostVerifyManifestItemsInner {
84
+ if (json == null) {
85
+ return json;
86
+ }
87
+ return {
88
+
89
+ 'identifier': json['identifier'] == null ? undefined : json['identifier'],
90
+ 'identifierRef': json['identifier_ref'] == null ? undefined : json['identifier_ref'],
91
+ 'title': json['title'] == null ? undefined : json['title'],
92
+ 'masteryScore': json['mastery_score'] == null ? undefined : json['mastery_score'],
93
+ 'maxTimeAllowed': json['max_time_allowed'] == null ? undefined : json['max_time_allowed'],
94
+ 'timeLimitAction': json['time_limit_action'] == null ? undefined : json['time_limit_action'],
95
+ 'dataFromLms': json['data_from_lms'] == null ? undefined : json['data_from_lms'],
96
+ 'minNormalizedMeasure': json['min_normalized_measure'] == null ? undefined : json['min_normalized_measure'],
97
+ };
98
+ }
99
+
100
+ export function PostVerifyManifestItemsInnerToJSON(json: any): PostVerifyManifestItemsInner {
101
+ return PostVerifyManifestItemsInnerToJSONTyped(json, false);
102
+ }
103
+
104
+ export function PostVerifyManifestItemsInnerToJSONTyped(value?: PostVerifyManifestItemsInner | null, ignoreDiscriminator: boolean = false): any {
105
+ if (value == null) {
106
+ return value;
107
+ }
108
+
109
+ return {
110
+
111
+ 'identifier': value['identifier'],
112
+ 'identifier_ref': value['identifierRef'],
113
+ 'title': value['title'],
114
+ 'mastery_score': value['masteryScore'],
115
+ 'max_time_allowed': value['maxTimeAllowed'],
116
+ 'time_limit_action': value['timeLimitAction'],
117
+ 'data_from_lms': value['dataFromLms'],
118
+ 'min_normalized_measure': value['minNormalizedMeasure'],
119
+ };
120
+ }
121
+