@easyedu/js-lsm-api 1.0.0-677fab496294ee48248fd8a03fee59e3bf0dcf02

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 (147) hide show
  1. package/.openapi-generator/FILES +35 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +46 -0
  5. package/dist/apis/ContentApi.d.ts +82 -0
  6. package/dist/apis/ContentApi.js +204 -0
  7. package/dist/apis/CourseApi.d.ts +71 -0
  8. package/dist/apis/CourseApi.js +177 -0
  9. package/dist/apis/ModuleApi.d.ts +53 -0
  10. package/dist/apis/ModuleApi.js +125 -0
  11. package/dist/apis/OtherApi.d.ts +25 -0
  12. package/dist/apis/OtherApi.js +56 -0
  13. package/dist/apis/UserApi.d.ts +51 -0
  14. package/dist/apis/UserApi.js +121 -0
  15. package/dist/apis/index.d.ts +5 -0
  16. package/dist/apis/index.js +23 -0
  17. package/dist/esm/apis/ContentApi.d.ts +82 -0
  18. package/dist/esm/apis/ContentApi.js +200 -0
  19. package/dist/esm/apis/CourseApi.d.ts +71 -0
  20. package/dist/esm/apis/CourseApi.js +173 -0
  21. package/dist/esm/apis/ModuleApi.d.ts +53 -0
  22. package/dist/esm/apis/ModuleApi.js +121 -0
  23. package/dist/esm/apis/OtherApi.d.ts +25 -0
  24. package/dist/esm/apis/OtherApi.js +52 -0
  25. package/dist/esm/apis/UserApi.d.ts +51 -0
  26. package/dist/esm/apis/UserApi.js +117 -0
  27. package/dist/esm/apis/index.d.ts +5 -0
  28. package/dist/esm/apis/index.js +7 -0
  29. package/dist/esm/index.d.ts +3 -0
  30. package/dist/esm/index.js +5 -0
  31. package/dist/esm/models/GetContent.d.ts +44 -0
  32. package/dist/esm/models/GetContent.js +50 -0
  33. package/dist/esm/models/GetContentList.d.ts +57 -0
  34. package/dist/esm/models/GetContentList.js +60 -0
  35. package/dist/esm/models/GetContentSession.d.ts +50 -0
  36. package/dist/esm/models/GetContentSession.js +55 -0
  37. package/dist/esm/models/GetContentUpload.d.ts +44 -0
  38. package/dist/esm/models/GetContentUpload.js +51 -0
  39. package/dist/esm/models/GetCourse.d.ts +50 -0
  40. package/dist/esm/models/GetCourse.js +52 -0
  41. package/dist/esm/models/GetCourseEnrollment.d.ts +79 -0
  42. package/dist/esm/models/GetCourseEnrollment.js +77 -0
  43. package/dist/esm/models/GetCourseEnrollmentList.d.ts +57 -0
  44. package/dist/esm/models/GetCourseEnrollmentList.js +60 -0
  45. package/dist/esm/models/GetCourseList.d.ts +57 -0
  46. package/dist/esm/models/GetCourseList.js +60 -0
  47. package/dist/esm/models/GetModule.d.ts +62 -0
  48. package/dist/esm/models/GetModule.js +61 -0
  49. package/dist/esm/models/GetModuleList.d.ts +57 -0
  50. package/dist/esm/models/GetModuleList.js +60 -0
  51. package/dist/esm/models/GetUser.d.ts +50 -0
  52. package/dist/esm/models/GetUser.js +54 -0
  53. package/dist/esm/models/LoginRes.d.ts +32 -0
  54. package/dist/esm/models/LoginRes.js +43 -0
  55. package/dist/esm/models/PostContentScorm.d.ts +38 -0
  56. package/dist/esm/models/PostContentScorm.js +47 -0
  57. package/dist/esm/models/PostContentUpload.d.ts +50 -0
  58. package/dist/esm/models/PostContentUpload.js +58 -0
  59. package/dist/esm/models/PostCourse.d.ts +44 -0
  60. package/dist/esm/models/PostCourse.js +51 -0
  61. package/dist/esm/models/PostCourseEnrollment.d.ts +44 -0
  62. package/dist/esm/models/PostCourseEnrollment.js +51 -0
  63. package/dist/esm/models/PostLogin.d.ts +38 -0
  64. package/dist/esm/models/PostLogin.js +47 -0
  65. package/dist/esm/models/PostModule.d.ts +44 -0
  66. package/dist/esm/models/PostModule.js +51 -0
  67. package/dist/esm/models/PostUser.d.ts +44 -0
  68. package/dist/esm/models/PostUser.js +51 -0
  69. package/dist/esm/models/index.d.ts +19 -0
  70. package/dist/esm/models/index.js +21 -0
  71. package/dist/esm/runtime.d.ts +182 -0
  72. package/dist/esm/runtime.js +330 -0
  73. package/dist/index.d.ts +3 -0
  74. package/dist/index.js +21 -0
  75. package/dist/models/GetContent.d.ts +44 -0
  76. package/dist/models/GetContent.js +57 -0
  77. package/dist/models/GetContentList.d.ts +57 -0
  78. package/dist/models/GetContentList.js +67 -0
  79. package/dist/models/GetContentSession.d.ts +50 -0
  80. package/dist/models/GetContentSession.js +62 -0
  81. package/dist/models/GetContentUpload.d.ts +44 -0
  82. package/dist/models/GetContentUpload.js +58 -0
  83. package/dist/models/GetCourse.d.ts +50 -0
  84. package/dist/models/GetCourse.js +59 -0
  85. package/dist/models/GetCourseEnrollment.d.ts +79 -0
  86. package/dist/models/GetCourseEnrollment.js +85 -0
  87. package/dist/models/GetCourseEnrollmentList.d.ts +57 -0
  88. package/dist/models/GetCourseEnrollmentList.js +67 -0
  89. package/dist/models/GetCourseList.d.ts +57 -0
  90. package/dist/models/GetCourseList.js +67 -0
  91. package/dist/models/GetModule.d.ts +62 -0
  92. package/dist/models/GetModule.js +68 -0
  93. package/dist/models/GetModuleList.d.ts +57 -0
  94. package/dist/models/GetModuleList.js +67 -0
  95. package/dist/models/GetUser.d.ts +50 -0
  96. package/dist/models/GetUser.js +61 -0
  97. package/dist/models/LoginRes.d.ts +32 -0
  98. package/dist/models/LoginRes.js +50 -0
  99. package/dist/models/PostContentScorm.d.ts +38 -0
  100. package/dist/models/PostContentScorm.js +54 -0
  101. package/dist/models/PostContentUpload.d.ts +50 -0
  102. package/dist/models/PostContentUpload.js +66 -0
  103. package/dist/models/PostCourse.d.ts +44 -0
  104. package/dist/models/PostCourse.js +58 -0
  105. package/dist/models/PostCourseEnrollment.d.ts +44 -0
  106. package/dist/models/PostCourseEnrollment.js +58 -0
  107. package/dist/models/PostLogin.d.ts +38 -0
  108. package/dist/models/PostLogin.js +54 -0
  109. package/dist/models/PostModule.d.ts +44 -0
  110. package/dist/models/PostModule.js +58 -0
  111. package/dist/models/PostUser.d.ts +44 -0
  112. package/dist/models/PostUser.js +58 -0
  113. package/dist/models/index.d.ts +19 -0
  114. package/dist/models/index.js +37 -0
  115. package/dist/runtime.d.ts +182 -0
  116. package/dist/runtime.js +346 -0
  117. package/package.json +21 -0
  118. package/src/apis/ContentApi.ts +308 -0
  119. package/src/apis/CourseApi.ts +233 -0
  120. package/src/apis/ModuleApi.ts +166 -0
  121. package/src/apis/OtherApi.ts +48 -0
  122. package/src/apis/UserApi.ts +156 -0
  123. package/src/apis/index.ts +7 -0
  124. package/src/index.ts +5 -0
  125. package/src/models/GetContent.ts +83 -0
  126. package/src/models/GetContentList.ts +110 -0
  127. package/src/models/GetContentSession.ts +93 -0
  128. package/src/models/GetContentUpload.ts +84 -0
  129. package/src/models/GetCourse.ts +91 -0
  130. package/src/models/GetCourseEnrollment.ts +134 -0
  131. package/src/models/GetCourseEnrollmentList.ts +110 -0
  132. package/src/models/GetCourseList.ts +110 -0
  133. package/src/models/GetModule.ts +109 -0
  134. package/src/models/GetModuleList.ts +110 -0
  135. package/src/models/GetUser.ts +92 -0
  136. package/src/models/LoginRes.ts +66 -0
  137. package/src/models/PostContentScorm.ts +75 -0
  138. package/src/models/PostContentUpload.ts +90 -0
  139. package/src/models/PostCourse.ts +84 -0
  140. package/src/models/PostCourseEnrollment.ts +84 -0
  141. package/src/models/PostLogin.ts +75 -0
  142. package/src/models/PostModule.ts +84 -0
  143. package/src/models/PostUser.ts +84 -0
  144. package/src/models/index.ts +21 -0
  145. package/src/runtime.ts +431 -0
  146. package/tsconfig.esm.json +7 -0
  147. package/tsconfig.json +16 -0
@@ -0,0 +1,330 @@
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ export const BASE_PATH = "https://sbzw93t49b.execute-api.us-east-2.amazonaws.com/stage1".replace(/\/+$/, "");
24
+ export class Configuration {
25
+ constructor(configuration = {}) {
26
+ this.configuration = configuration;
27
+ }
28
+ set config(configuration) {
29
+ this.configuration = configuration;
30
+ }
31
+ get basePath() {
32
+ return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH;
33
+ }
34
+ get fetchApi() {
35
+ return this.configuration.fetchApi;
36
+ }
37
+ get middleware() {
38
+ return this.configuration.middleware || [];
39
+ }
40
+ get queryParamsStringify() {
41
+ return this.configuration.queryParamsStringify || querystring;
42
+ }
43
+ get username() {
44
+ return this.configuration.username;
45
+ }
46
+ get password() {
47
+ return this.configuration.password;
48
+ }
49
+ get apiKey() {
50
+ const apiKey = this.configuration.apiKey;
51
+ if (apiKey) {
52
+ return typeof apiKey === 'function' ? apiKey : () => apiKey;
53
+ }
54
+ return undefined;
55
+ }
56
+ get accessToken() {
57
+ const accessToken = this.configuration.accessToken;
58
+ if (accessToken) {
59
+ return typeof accessToken === 'function' ? accessToken : () => __awaiter(this, void 0, void 0, function* () { return accessToken; });
60
+ }
61
+ return undefined;
62
+ }
63
+ get headers() {
64
+ return this.configuration.headers;
65
+ }
66
+ get credentials() {
67
+ return this.configuration.credentials;
68
+ }
69
+ }
70
+ export const DefaultConfig = new Configuration();
71
+ /**
72
+ * This is the base class for all generated API classes.
73
+ */
74
+ export class BaseAPI {
75
+ constructor(configuration = DefaultConfig) {
76
+ this.configuration = configuration;
77
+ this.fetchApi = (url, init) => __awaiter(this, void 0, void 0, function* () {
78
+ let fetchParams = { url, init };
79
+ for (const middleware of this.middleware) {
80
+ if (middleware.pre) {
81
+ fetchParams = (yield middleware.pre(Object.assign({ fetch: this.fetchApi }, fetchParams))) || fetchParams;
82
+ }
83
+ }
84
+ let response = undefined;
85
+ try {
86
+ response = yield (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init);
87
+ }
88
+ catch (e) {
89
+ for (const middleware of this.middleware) {
90
+ if (middleware.onError) {
91
+ response = (yield middleware.onError({
92
+ fetch: this.fetchApi,
93
+ url: fetchParams.url,
94
+ init: fetchParams.init,
95
+ error: e,
96
+ response: response ? response.clone() : undefined,
97
+ })) || response;
98
+ }
99
+ }
100
+ if (response === undefined) {
101
+ if (e instanceof Error) {
102
+ throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response');
103
+ }
104
+ else {
105
+ throw e;
106
+ }
107
+ }
108
+ }
109
+ for (const middleware of this.middleware) {
110
+ if (middleware.post) {
111
+ response = (yield middleware.post({
112
+ fetch: this.fetchApi,
113
+ url: fetchParams.url,
114
+ init: fetchParams.init,
115
+ response: response.clone(),
116
+ })) || response;
117
+ }
118
+ }
119
+ return response;
120
+ });
121
+ this.middleware = configuration.middleware;
122
+ }
123
+ withMiddleware(...middlewares) {
124
+ const next = this.clone();
125
+ next.middleware = next.middleware.concat(...middlewares);
126
+ return next;
127
+ }
128
+ withPreMiddleware(...preMiddlewares) {
129
+ const middlewares = preMiddlewares.map((pre) => ({ pre }));
130
+ return this.withMiddleware(...middlewares);
131
+ }
132
+ withPostMiddleware(...postMiddlewares) {
133
+ const middlewares = postMiddlewares.map((post) => ({ post }));
134
+ return this.withMiddleware(...middlewares);
135
+ }
136
+ /**
137
+ * Check if the given MIME is a JSON MIME.
138
+ * JSON MIME examples:
139
+ * application/json
140
+ * application/json; charset=UTF8
141
+ * APPLICATION/JSON
142
+ * application/vnd.company+json
143
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
144
+ * @return True if the given MIME is JSON, false otherwise.
145
+ */
146
+ isJsonMime(mime) {
147
+ if (!mime) {
148
+ return false;
149
+ }
150
+ return BaseAPI.jsonRegex.test(mime);
151
+ }
152
+ request(context, initOverrides) {
153
+ return __awaiter(this, void 0, void 0, function* () {
154
+ const { url, init } = yield this.createFetchParams(context, initOverrides);
155
+ const response = yield this.fetchApi(url, init);
156
+ if (response && (response.status >= 200 && response.status < 300)) {
157
+ return response;
158
+ }
159
+ throw new ResponseError(response, 'Response returned an error code');
160
+ });
161
+ }
162
+ createFetchParams(context, initOverrides) {
163
+ return __awaiter(this, void 0, void 0, function* () {
164
+ let url = this.configuration.basePath + context.path;
165
+ if (context.query !== undefined && Object.keys(context.query).length !== 0) {
166
+ // only add the querystring to the URL if there are query parameters.
167
+ // this is done to avoid urls ending with a "?" character which buggy webservers
168
+ // do not handle correctly sometimes.
169
+ url += '?' + this.configuration.queryParamsStringify(context.query);
170
+ }
171
+ const headers = Object.assign({}, this.configuration.headers, context.headers);
172
+ Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {});
173
+ const initOverrideFn = typeof initOverrides === "function"
174
+ ? initOverrides
175
+ : () => __awaiter(this, void 0, void 0, function* () { return initOverrides; });
176
+ const initParams = {
177
+ method: context.method,
178
+ headers,
179
+ body: context.body,
180
+ credentials: this.configuration.credentials,
181
+ };
182
+ const overriddenInit = Object.assign(Object.assign({}, initParams), (yield initOverrideFn({
183
+ init: initParams,
184
+ context,
185
+ })));
186
+ let body;
187
+ if (isFormData(overriddenInit.body)
188
+ || (overriddenInit.body instanceof URLSearchParams)
189
+ || isBlob(overriddenInit.body)) {
190
+ body = overriddenInit.body;
191
+ }
192
+ else if (this.isJsonMime(headers['Content-Type'])) {
193
+ body = JSON.stringify(overriddenInit.body);
194
+ }
195
+ else {
196
+ body = overriddenInit.body;
197
+ }
198
+ const init = Object.assign(Object.assign({}, overriddenInit), { body });
199
+ return { url, init };
200
+ });
201
+ }
202
+ /**
203
+ * Create a shallow clone of `this` by constructing a new instance
204
+ * and then shallow cloning data members.
205
+ */
206
+ clone() {
207
+ const constructor = this.constructor;
208
+ const next = new constructor(this.configuration);
209
+ next.middleware = this.middleware.slice();
210
+ return next;
211
+ }
212
+ }
213
+ BaseAPI.jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i');
214
+ ;
215
+ function isBlob(value) {
216
+ return typeof Blob !== 'undefined' && value instanceof Blob;
217
+ }
218
+ function isFormData(value) {
219
+ return typeof FormData !== "undefined" && value instanceof FormData;
220
+ }
221
+ export class ResponseError extends Error {
222
+ constructor(response, msg) {
223
+ super(msg);
224
+ this.response = response;
225
+ this.name = "ResponseError";
226
+ }
227
+ }
228
+ export class FetchError extends Error {
229
+ constructor(cause, msg) {
230
+ super(msg);
231
+ this.cause = cause;
232
+ this.name = "FetchError";
233
+ }
234
+ }
235
+ export class RequiredError extends Error {
236
+ constructor(field, msg) {
237
+ super(msg);
238
+ this.field = field;
239
+ this.name = "RequiredError";
240
+ }
241
+ }
242
+ export const COLLECTION_FORMATS = {
243
+ csv: ",",
244
+ ssv: " ",
245
+ tsv: "\t",
246
+ pipes: "|",
247
+ };
248
+ export function querystring(params, prefix = '') {
249
+ return Object.keys(params)
250
+ .map(key => querystringSingleKey(key, params[key], prefix))
251
+ .filter(part => part.length > 0)
252
+ .join('&');
253
+ }
254
+ function querystringSingleKey(key, value, keyPrefix = '') {
255
+ const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key);
256
+ if (value instanceof Array) {
257
+ const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue)))
258
+ .join(`&${encodeURIComponent(fullKey)}=`);
259
+ return `${encodeURIComponent(fullKey)}=${multiValue}`;
260
+ }
261
+ if (value instanceof Set) {
262
+ const valueAsArray = Array.from(value);
263
+ return querystringSingleKey(key, valueAsArray, keyPrefix);
264
+ }
265
+ if (value instanceof Date) {
266
+ return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`;
267
+ }
268
+ if (value instanceof Object) {
269
+ return querystring(value, fullKey);
270
+ }
271
+ return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
272
+ }
273
+ export function exists(json, key) {
274
+ const value = json[key];
275
+ return value !== null && value !== undefined;
276
+ }
277
+ export function mapValues(data, fn) {
278
+ return Object.keys(data).reduce((acc, key) => (Object.assign(Object.assign({}, acc), { [key]: fn(data[key]) })), {});
279
+ }
280
+ export function canConsumeForm(consumes) {
281
+ for (const consume of consumes) {
282
+ if ('multipart/form-data' === consume.contentType) {
283
+ return true;
284
+ }
285
+ }
286
+ return false;
287
+ }
288
+ export class JSONApiResponse {
289
+ constructor(raw, transformer = (jsonValue) => jsonValue) {
290
+ this.raw = raw;
291
+ this.transformer = transformer;
292
+ }
293
+ value() {
294
+ return __awaiter(this, void 0, void 0, function* () {
295
+ return this.transformer(yield this.raw.json());
296
+ });
297
+ }
298
+ }
299
+ export class VoidApiResponse {
300
+ constructor(raw) {
301
+ this.raw = raw;
302
+ }
303
+ value() {
304
+ return __awaiter(this, void 0, void 0, function* () {
305
+ return undefined;
306
+ });
307
+ }
308
+ }
309
+ export class BlobApiResponse {
310
+ constructor(raw) {
311
+ this.raw = raw;
312
+ }
313
+ value() {
314
+ return __awaiter(this, void 0, void 0, function* () {
315
+ return yield this.raw.blob();
316
+ });
317
+ }
318
+ ;
319
+ }
320
+ export class TextApiResponse {
321
+ constructor(raw) {
322
+ this.raw = raw;
323
+ }
324
+ value() {
325
+ return __awaiter(this, void 0, void 0, function* () {
326
+ return yield this.raw.text();
327
+ });
328
+ }
329
+ ;
330
+ }
@@ -0,0 +1,3 @@
1
+ export * from './runtime';
2
+ export * from './apis/index';
3
+ export * from './models/index';
package/dist/index.js ADDED
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ /* tslint:disable */
18
+ /* eslint-disable */
19
+ __exportStar(require("./runtime"), exports);
20
+ __exportStar(require("./apis/index"), exports);
21
+ __exportStar(require("./models/index"), exports);
@@ -0,0 +1,44 @@
1
+ /**
2
+ * LMS API
3
+ * LMS API
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface GetContent
16
+ */
17
+ export interface GetContent {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof GetContent
22
+ */
23
+ readonly id: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof GetContent
28
+ */
29
+ moduleId: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof GetContent
34
+ */
35
+ name: string;
36
+ }
37
+ /**
38
+ * Check if a given object implements the GetContent interface.
39
+ */
40
+ export declare function instanceOfGetContent(value: object): value is GetContent;
41
+ export declare function GetContentFromJSON(json: any): GetContent;
42
+ export declare function GetContentFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetContent;
43
+ export declare function GetContentToJSON(json: any): GetContent;
44
+ export declare function GetContentToJSONTyped(value?: Omit<GetContent, 'id'> | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * LMS API
6
+ * LMS API
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfGetContent = instanceOfGetContent;
17
+ exports.GetContentFromJSON = GetContentFromJSON;
18
+ exports.GetContentFromJSONTyped = GetContentFromJSONTyped;
19
+ exports.GetContentToJSON = GetContentToJSON;
20
+ exports.GetContentToJSONTyped = GetContentToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the GetContent interface.
23
+ */
24
+ function instanceOfGetContent(value) {
25
+ if (!('id' in value) || value['id'] === undefined)
26
+ return false;
27
+ if (!('moduleId' in value) || value['moduleId'] === undefined)
28
+ return false;
29
+ if (!('name' in value) || value['name'] === undefined)
30
+ return false;
31
+ return true;
32
+ }
33
+ function GetContentFromJSON(json) {
34
+ return GetContentFromJSONTyped(json, false);
35
+ }
36
+ function GetContentFromJSONTyped(json, ignoreDiscriminator) {
37
+ if (json == null) {
38
+ return json;
39
+ }
40
+ return {
41
+ 'id': json['id'],
42
+ 'moduleId': json['module_id'],
43
+ 'name': json['name'],
44
+ };
45
+ }
46
+ function GetContentToJSON(json) {
47
+ return GetContentToJSONTyped(json, false);
48
+ }
49
+ function GetContentToJSONTyped(value, ignoreDiscriminator = false) {
50
+ if (value == null) {
51
+ return value;
52
+ }
53
+ return {
54
+ 'module_id': value['moduleId'],
55
+ 'name': value['name'],
56
+ };
57
+ }
@@ -0,0 +1,57 @@
1
+ /**
2
+ * LMS API
3
+ * LMS API
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { GetContent } from './GetContent';
13
+ /**
14
+ * A list of content within a module
15
+ * @export
16
+ * @interface GetContentList
17
+ */
18
+ export interface GetContentList {
19
+ /**
20
+ * The current page number
21
+ * @type {number}
22
+ * @memberof GetContentList
23
+ */
24
+ page: number;
25
+ /**
26
+ * The number of items per page
27
+ * @type {number}
28
+ * @memberof GetContentList
29
+ */
30
+ pageSize: number;
31
+ /**
32
+ * The total number of pages
33
+ * @type {number}
34
+ * @memberof GetContentList
35
+ */
36
+ totalPages: number;
37
+ /**
38
+ * The total number of items
39
+ * @type {number}
40
+ * @memberof GetContentList
41
+ */
42
+ totalItems: number;
43
+ /**
44
+ *
45
+ * @type {Array<GetContent>}
46
+ * @memberof GetContentList
47
+ */
48
+ items: Array<GetContent>;
49
+ }
50
+ /**
51
+ * Check if a given object implements the GetContentList interface.
52
+ */
53
+ export declare function instanceOfGetContentList(value: object): value is GetContentList;
54
+ export declare function GetContentListFromJSON(json: any): GetContentList;
55
+ export declare function GetContentListFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetContentList;
56
+ export declare function GetContentListToJSON(json: any): GetContentList;
57
+ export declare function GetContentListToJSONTyped(value?: GetContentList | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * LMS API
6
+ * LMS API
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfGetContentList = instanceOfGetContentList;
17
+ exports.GetContentListFromJSON = GetContentListFromJSON;
18
+ exports.GetContentListFromJSONTyped = GetContentListFromJSONTyped;
19
+ exports.GetContentListToJSON = GetContentListToJSON;
20
+ exports.GetContentListToJSONTyped = GetContentListToJSONTyped;
21
+ const GetContent_1 = require("./GetContent");
22
+ /**
23
+ * Check if a given object implements the GetContentList interface.
24
+ */
25
+ function instanceOfGetContentList(value) {
26
+ if (!('page' in value) || value['page'] === undefined)
27
+ return false;
28
+ if (!('pageSize' in value) || value['pageSize'] === undefined)
29
+ return false;
30
+ if (!('totalPages' in value) || value['totalPages'] === undefined)
31
+ return false;
32
+ if (!('totalItems' in value) || value['totalItems'] === undefined)
33
+ return false;
34
+ if (!('items' in value) || value['items'] === undefined)
35
+ return false;
36
+ return true;
37
+ }
38
+ function GetContentListFromJSON(json) {
39
+ return GetContentListFromJSONTyped(json, false);
40
+ }
41
+ function GetContentListFromJSONTyped(json, ignoreDiscriminator) {
42
+ if (json == null) {
43
+ return json;
44
+ }
45
+ return {
46
+ 'page': json['page'],
47
+ 'pageSize': json['page_size'],
48
+ 'totalPages': json['total_pages'],
49
+ 'totalItems': json['total_items'],
50
+ 'items': (json['items'].map(GetContent_1.GetContentFromJSON)),
51
+ };
52
+ }
53
+ function GetContentListToJSON(json) {
54
+ return GetContentListToJSONTyped(json, false);
55
+ }
56
+ function GetContentListToJSONTyped(value, ignoreDiscriminator = false) {
57
+ if (value == null) {
58
+ return value;
59
+ }
60
+ return {
61
+ 'page': value['page'],
62
+ 'page_size': value['pageSize'],
63
+ 'total_pages': value['totalPages'],
64
+ 'total_items': value['totalItems'],
65
+ 'items': (value['items'].map(GetContent_1.GetContentToJSON)),
66
+ };
67
+ }
@@ -0,0 +1,50 @@
1
+ /**
2
+ * LMS API
3
+ * LMS API
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * A content session
14
+ * @export
15
+ * @interface GetContentSession
16
+ */
17
+ export interface GetContentSession {
18
+ /**
19
+ * The id of the content
20
+ * @type {string}
21
+ * @memberof GetContentSession
22
+ */
23
+ contentId: string;
24
+ /**
25
+ * The id of the user
26
+ * @type {string}
27
+ * @memberof GetContentSession
28
+ */
29
+ userId: string;
30
+ /**
31
+ * The url of the content
32
+ * @type {string}
33
+ * @memberof GetContentSession
34
+ */
35
+ lanchUrl: string;
36
+ /**
37
+ * The date and time the content session was created
38
+ * @type {number}
39
+ * @memberof GetContentSession
40
+ */
41
+ createdAt: number;
42
+ }
43
+ /**
44
+ * Check if a given object implements the GetContentSession interface.
45
+ */
46
+ export declare function instanceOfGetContentSession(value: object): value is GetContentSession;
47
+ export declare function GetContentSessionFromJSON(json: any): GetContentSession;
48
+ export declare function GetContentSessionFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetContentSession;
49
+ export declare function GetContentSessionToJSON(json: any): GetContentSession;
50
+ export declare function GetContentSessionToJSONTyped(value?: GetContentSession | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * LMS API
6
+ * LMS API
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfGetContentSession = instanceOfGetContentSession;
17
+ exports.GetContentSessionFromJSON = GetContentSessionFromJSON;
18
+ exports.GetContentSessionFromJSONTyped = GetContentSessionFromJSONTyped;
19
+ exports.GetContentSessionToJSON = GetContentSessionToJSON;
20
+ exports.GetContentSessionToJSONTyped = GetContentSessionToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the GetContentSession interface.
23
+ */
24
+ function instanceOfGetContentSession(value) {
25
+ if (!('contentId' in value) || value['contentId'] === undefined)
26
+ return false;
27
+ if (!('userId' in value) || value['userId'] === undefined)
28
+ return false;
29
+ if (!('lanchUrl' in value) || value['lanchUrl'] === undefined)
30
+ return false;
31
+ if (!('createdAt' in value) || value['createdAt'] === undefined)
32
+ return false;
33
+ return true;
34
+ }
35
+ function GetContentSessionFromJSON(json) {
36
+ return GetContentSessionFromJSONTyped(json, false);
37
+ }
38
+ function GetContentSessionFromJSONTyped(json, ignoreDiscriminator) {
39
+ if (json == null) {
40
+ return json;
41
+ }
42
+ return {
43
+ 'contentId': json['content_id'],
44
+ 'userId': json['user_id'],
45
+ 'lanchUrl': json['lanch_url'],
46
+ 'createdAt': json['created_at'],
47
+ };
48
+ }
49
+ function GetContentSessionToJSON(json) {
50
+ return GetContentSessionToJSONTyped(json, false);
51
+ }
52
+ function GetContentSessionToJSONTyped(value, ignoreDiscriminator = false) {
53
+ if (value == null) {
54
+ return value;
55
+ }
56
+ return {
57
+ 'content_id': value['contentId'],
58
+ 'user_id': value['userId'],
59
+ 'lanch_url': value['lanchUrl'],
60
+ 'created_at': value['createdAt'],
61
+ };
62
+ }