@easyedu/js-lsm-api 1.65.0 → 1.67.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 (115) hide show
  1. package/.openapi-generator/FILES +2 -2
  2. package/README.md +9 -3
  3. package/dist/apis/ContentApi.d.ts +18 -0
  4. package/dist/apis/ContentApi.js +51 -0
  5. package/dist/apis/CourseApi.d.ts +16 -0
  6. package/dist/apis/CourseApi.js +43 -0
  7. package/dist/apis/PortalApi.d.ts +58 -0
  8. package/dist/apis/PortalApi.js +152 -0
  9. package/dist/apis/SupportTicketApi.d.ts +2 -3
  10. package/dist/apis/SupportTicketApi.js +1 -2
  11. package/dist/esm/apis/ContentApi.d.ts +18 -0
  12. package/dist/esm/apis/ContentApi.js +51 -0
  13. package/dist/esm/apis/CourseApi.d.ts +16 -0
  14. package/dist/esm/apis/CourseApi.js +43 -0
  15. package/dist/esm/apis/PortalApi.d.ts +58 -0
  16. package/dist/esm/apis/PortalApi.js +152 -0
  17. package/dist/esm/apis/SupportTicketApi.d.ts +2 -3
  18. package/dist/esm/apis/SupportTicketApi.js +1 -2
  19. package/dist/esm/models/ContentLaunchMode.d.ts +26 -0
  20. package/dist/esm/models/ContentLaunchMode.js +44 -0
  21. package/dist/esm/models/GetContent.d.ts +7 -0
  22. package/dist/esm/models/GetContent.js +5 -0
  23. package/dist/esm/models/GetCourse.d.ts +27 -0
  24. package/dist/esm/models/GetCourse.js +20 -0
  25. package/dist/esm/models/GetCourseEnrollment.d.ts +29 -1
  26. package/dist/esm/models/GetCourseEnrollment.js +23 -1
  27. package/dist/esm/models/GetCourseEnrollmentListItem.d.ts +28 -1
  28. package/dist/esm/models/GetCourseEnrollmentListItem.js +23 -1
  29. package/dist/esm/models/GetPortal.d.ts +2 -2
  30. package/dist/esm/models/GetPortalFaviconUpload.d.ts +1 -1
  31. package/dist/esm/models/GetPortalLogoUpload.d.ts +1 -1
  32. package/dist/esm/models/GetPublicPortalBranding.d.ts +2 -2
  33. package/dist/esm/models/PostContentSession.d.ts +7 -0
  34. package/dist/esm/models/PostContentSession.js +5 -0
  35. package/dist/esm/models/PostCourse.d.ts +29 -0
  36. package/dist/esm/models/PostCourse.js +14 -0
  37. package/dist/esm/models/PostCourseEnrollment.d.ts +18 -1
  38. package/dist/esm/models/PostCourseEnrollment.js +10 -3
  39. package/dist/esm/models/PutContent.d.ts +7 -0
  40. package/dist/esm/models/PutContent.js +3 -0
  41. package/dist/esm/models/PutCourse.d.ts +27 -0
  42. package/dist/esm/models/PutCourse.js +14 -0
  43. package/dist/esm/models/PutCourseEnrollment.d.ts +8 -1
  44. package/dist/esm/models/PutCourseEnrollment.js +4 -1
  45. package/dist/esm/models/index.d.ts +1 -1
  46. package/dist/esm/models/index.js +1 -1
  47. package/dist/models/ContentLaunchMode.d.ts +26 -0
  48. package/dist/models/ContentLaunchMode.js +52 -0
  49. package/dist/models/GetContent.d.ts +7 -0
  50. package/dist/models/GetContent.js +5 -0
  51. package/dist/models/GetCourse.d.ts +27 -0
  52. package/dist/models/GetCourse.js +21 -0
  53. package/dist/models/GetCourseEnrollment.d.ts +29 -1
  54. package/dist/models/GetCourseEnrollment.js +24 -2
  55. package/dist/models/GetCourseEnrollmentListItem.d.ts +28 -1
  56. package/dist/models/GetCourseEnrollmentListItem.js +24 -2
  57. package/dist/models/GetPortal.d.ts +2 -2
  58. package/dist/models/GetPortalFaviconUpload.d.ts +1 -1
  59. package/dist/models/GetPortalLogoUpload.d.ts +1 -1
  60. package/dist/models/GetPublicPortalBranding.d.ts +2 -2
  61. package/dist/models/PostContentSession.d.ts +7 -0
  62. package/dist/models/PostContentSession.js +5 -0
  63. package/dist/models/PostCourse.d.ts +29 -0
  64. package/dist/models/PostCourse.js +15 -0
  65. package/dist/models/PostCourseEnrollment.d.ts +18 -1
  66. package/dist/models/PostCourseEnrollment.js +11 -4
  67. package/dist/models/PutContent.d.ts +7 -0
  68. package/dist/models/PutContent.js +3 -0
  69. package/dist/models/PutCourse.d.ts +27 -0
  70. package/dist/models/PutCourse.js +15 -0
  71. package/dist/models/PutCourseEnrollment.d.ts +8 -1
  72. package/dist/models/PutCourseEnrollment.js +4 -1
  73. package/dist/models/index.d.ts +1 -1
  74. package/dist/models/index.js +1 -1
  75. package/docs/ContentApi.md +79 -0
  76. package/docs/{DownloadSupportTicketAttachment200Response.md → ContentLaunchMode.md} +5 -6
  77. package/docs/CourseApi.md +72 -0
  78. package/docs/GetContent.md +2 -0
  79. package/docs/GetCourse.md +6 -0
  80. package/docs/GetCourseEnrollment.md +4 -0
  81. package/docs/GetCourseEnrollmentListItem.md +4 -0
  82. package/docs/PortalApi.md +258 -0
  83. package/docs/PostContentSession.md +2 -0
  84. package/docs/PostCourse.md +6 -0
  85. package/docs/PostCourseEnrollment.md +2 -0
  86. package/docs/PutContent.md +2 -0
  87. package/docs/PutCourse.md +6 -0
  88. package/docs/PutCourseEnrollment.md +2 -0
  89. package/docs/SupportTicketApi.md +4 -4
  90. package/package.json +1 -1
  91. package/src/apis/ContentApi.ts +77 -0
  92. package/src/apis/CourseApi.ts +58 -0
  93. package/src/apis/PortalApi.ts +176 -0
  94. package/src/apis/SupportTicketApi.ts +3 -8
  95. package/src/models/ContentLaunchMode.ts +54 -0
  96. package/src/models/GetContent.ts +16 -0
  97. package/src/models/GetCourse.ts +39 -0
  98. package/src/models/GetCourseEnrollment.ts +37 -2
  99. package/src/models/GetCourseEnrollmentListItem.ts +36 -2
  100. package/src/models/GetPortal.ts +2 -2
  101. package/src/models/GetPortalFaviconUpload.ts +1 -1
  102. package/src/models/GetPortalLogoUpload.ts +1 -1
  103. package/src/models/GetPublicPortalBranding.ts +2 -2
  104. package/src/models/PostContentSession.ts +19 -0
  105. package/src/models/PostCourse.ts +38 -0
  106. package/src/models/PostCourseEnrollment.ts +22 -3
  107. package/src/models/PutContent.ts +18 -0
  108. package/src/models/PutCourse.ts +36 -0
  109. package/src/models/PutCourseEnrollment.ts +11 -2
  110. package/src/models/index.ts +1 -1
  111. package/dist/esm/models/DownloadSupportTicketAttachment200Response.d.ts +0 -32
  112. package/dist/esm/models/DownloadSupportTicketAttachment200Response.js +0 -43
  113. package/dist/models/DownloadSupportTicketAttachment200Response.d.ts +0 -32
  114. package/dist/models/DownloadSupportTicketAttachment200Response.js +0 -50
  115. package/src/models/DownloadSupportTicketAttachment200Response.ts +0 -66
@@ -76,6 +76,14 @@ export interface GetPortalByIdRequest {
76
76
  portalId: string;
77
77
  }
78
78
 
79
+ export interface GetPortalFaviconAssetRequest {
80
+ portalId: string;
81
+ }
82
+
83
+ export interface GetPortalLogoAssetRequest {
84
+ portalId: string;
85
+ }
86
+
79
87
  export interface GetPortalUsersRequest {
80
88
  portalId: string;
81
89
  type?: GetPortalUsersTypeEnum;
@@ -256,6 +264,51 @@ export class PortalApi extends runtime.BaseAPI {
256
264
  return await response.value();
257
265
  }
258
266
 
267
+ /**
268
+ * Creates request options for getPortalFaviconAsset without sending the request
269
+ */
270
+ async getPortalFaviconAssetRequestOpts(requestParameters: GetPortalFaviconAssetRequest): Promise<runtime.RequestOpts> {
271
+ if (requestParameters['portalId'] == null) {
272
+ throw new runtime.RequiredError(
273
+ 'portalId',
274
+ 'Required parameter "portalId" was null or undefined when calling getPortalFaviconAsset().'
275
+ );
276
+ }
277
+
278
+ const queryParameters: any = {};
279
+
280
+ const headerParameters: runtime.HTTPHeaders = {};
281
+
282
+
283
+ let urlPath = `/portals/{portalId}/branding/favicon`;
284
+ urlPath = urlPath.replace('{portalId}', encodeURIComponent(String(requestParameters['portalId'])));
285
+
286
+ return {
287
+ path: urlPath,
288
+ method: 'GET',
289
+ headers: headerParameters,
290
+ query: queryParameters,
291
+ };
292
+ }
293
+
294
+ /**
295
+ * Stream the configured portal favicon
296
+ */
297
+ async getPortalFaviconAssetRaw(requestParameters: GetPortalFaviconAssetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>> {
298
+ const requestOptions = await this.getPortalFaviconAssetRequestOpts(requestParameters);
299
+ const response = await this.request(requestOptions, initOverrides);
300
+
301
+ return new runtime.BlobApiResponse(response);
302
+ }
303
+
304
+ /**
305
+ * Stream the configured portal favicon
306
+ */
307
+ async getPortalFaviconAsset(requestParameters: GetPortalFaviconAssetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
308
+ const response = await this.getPortalFaviconAssetRaw(requestParameters, initOverrides);
309
+ return await response.value();
310
+ }
311
+
259
312
  /**
260
313
  * Creates request options for getPortalList without sending the request
261
314
  */
@@ -293,6 +346,51 @@ export class PortalApi extends runtime.BaseAPI {
293
346
  return await response.value();
294
347
  }
295
348
 
349
+ /**
350
+ * Creates request options for getPortalLogoAsset without sending the request
351
+ */
352
+ async getPortalLogoAssetRequestOpts(requestParameters: GetPortalLogoAssetRequest): Promise<runtime.RequestOpts> {
353
+ if (requestParameters['portalId'] == null) {
354
+ throw new runtime.RequiredError(
355
+ 'portalId',
356
+ 'Required parameter "portalId" was null or undefined when calling getPortalLogoAsset().'
357
+ );
358
+ }
359
+
360
+ const queryParameters: any = {};
361
+
362
+ const headerParameters: runtime.HTTPHeaders = {};
363
+
364
+
365
+ let urlPath = `/portals/{portalId}/branding/logo`;
366
+ urlPath = urlPath.replace('{portalId}', encodeURIComponent(String(requestParameters['portalId'])));
367
+
368
+ return {
369
+ path: urlPath,
370
+ method: 'GET',
371
+ headers: headerParameters,
372
+ query: queryParameters,
373
+ };
374
+ }
375
+
376
+ /**
377
+ * Stream the configured portal logo
378
+ */
379
+ async getPortalLogoAssetRaw(requestParameters: GetPortalLogoAssetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>> {
380
+ const requestOptions = await this.getPortalLogoAssetRequestOpts(requestParameters);
381
+ const response = await this.request(requestOptions, initOverrides);
382
+
383
+ return new runtime.BlobApiResponse(response);
384
+ }
385
+
386
+ /**
387
+ * Stream the configured portal logo
388
+ */
389
+ async getPortalLogoAsset(requestParameters: GetPortalLogoAssetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
390
+ const response = await this.getPortalLogoAssetRaw(requestParameters, initOverrides);
391
+ return await response.value();
392
+ }
393
+
296
394
  /**
297
395
  * Creates request options for getPortalUsers without sending the request
298
396
  */
@@ -397,6 +495,84 @@ export class PortalApi extends runtime.BaseAPI {
397
495
  return await response.value();
398
496
  }
399
497
 
498
+ /**
499
+ * Creates request options for getPublicPortalFaviconAsset without sending the request
500
+ */
501
+ async getPublicPortalFaviconAssetRequestOpts(): Promise<runtime.RequestOpts> {
502
+ const queryParameters: any = {};
503
+
504
+ const headerParameters: runtime.HTTPHeaders = {};
505
+
506
+
507
+ let urlPath = `/public/portal/branding/favicon`;
508
+
509
+ return {
510
+ path: urlPath,
511
+ method: 'GET',
512
+ headers: headerParameters,
513
+ query: queryParameters,
514
+ };
515
+ }
516
+
517
+ /**
518
+ * Resolves the browser Origin/Referer/Host to a portal and streams its configured favicon.
519
+ * Public portal favicon resolved from the request host
520
+ */
521
+ async getPublicPortalFaviconAssetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>> {
522
+ const requestOptions = await this.getPublicPortalFaviconAssetRequestOpts();
523
+ const response = await this.request(requestOptions, initOverrides);
524
+
525
+ return new runtime.BlobApiResponse(response);
526
+ }
527
+
528
+ /**
529
+ * Resolves the browser Origin/Referer/Host to a portal and streams its configured favicon.
530
+ * Public portal favicon resolved from the request host
531
+ */
532
+ async getPublicPortalFaviconAsset(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
533
+ const response = await this.getPublicPortalFaviconAssetRaw(initOverrides);
534
+ return await response.value();
535
+ }
536
+
537
+ /**
538
+ * Creates request options for getPublicPortalLogoAsset without sending the request
539
+ */
540
+ async getPublicPortalLogoAssetRequestOpts(): Promise<runtime.RequestOpts> {
541
+ const queryParameters: any = {};
542
+
543
+ const headerParameters: runtime.HTTPHeaders = {};
544
+
545
+
546
+ let urlPath = `/public/portal/branding/logo`;
547
+
548
+ return {
549
+ path: urlPath,
550
+ method: 'GET',
551
+ headers: headerParameters,
552
+ query: queryParameters,
553
+ };
554
+ }
555
+
556
+ /**
557
+ * Resolves the browser Origin/Referer/Host to a portal and streams its configured logo.
558
+ * Public portal logo resolved from the request host
559
+ */
560
+ async getPublicPortalLogoAssetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>> {
561
+ const requestOptions = await this.getPublicPortalLogoAssetRequestOpts();
562
+ const response = await this.request(requestOptions, initOverrides);
563
+
564
+ return new runtime.BlobApiResponse(response);
565
+ }
566
+
567
+ /**
568
+ * Resolves the browser Origin/Referer/Host to a portal and streams its configured logo.
569
+ * Public portal logo resolved from the request host
570
+ */
571
+ async getPublicPortalLogoAsset(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
572
+ const response = await this.getPublicPortalLogoAssetRaw(initOverrides);
573
+ return await response.value();
574
+ }
575
+
400
576
  /**
401
577
  * Creates request options for inviteUserToPortal without sending the request
402
578
  */
@@ -13,11 +13,6 @@
13
13
  */
14
14
 
15
15
  import * as runtime from '../runtime';
16
- import {
17
- type DownloadSupportTicketAttachment200Response,
18
- DownloadSupportTicketAttachment200ResponseFromJSON,
19
- DownloadSupportTicketAttachment200ResponseToJSON,
20
- } from '../models/DownloadSupportTicketAttachment200Response';
21
16
  import {
22
17
  type GetSupportTicket,
23
18
  GetSupportTicketFromJSON,
@@ -185,17 +180,17 @@ export class SupportTicketApi extends runtime.BaseAPI {
185
180
  /**
186
181
  * Download a ticket attachment
187
182
  */
188
- async downloadSupportTicketAttachmentRaw(requestParameters: DownloadSupportTicketAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DownloadSupportTicketAttachment200Response>> {
183
+ async downloadSupportTicketAttachmentRaw(requestParameters: DownloadSupportTicketAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>> {
189
184
  const requestOptions = await this.downloadSupportTicketAttachmentRequestOpts(requestParameters);
190
185
  const response = await this.request(requestOptions, initOverrides);
191
186
 
192
- return new runtime.JSONApiResponse(response, (jsonValue) => DownloadSupportTicketAttachment200ResponseFromJSON(jsonValue));
187
+ return new runtime.BlobApiResponse(response);
193
188
  }
194
189
 
195
190
  /**
196
191
  * Download a ticket attachment
197
192
  */
198
- async downloadSupportTicketAttachment(requestParameters: DownloadSupportTicketAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DownloadSupportTicketAttachment200Response> {
193
+ async downloadSupportTicketAttachment(requestParameters: DownloadSupportTicketAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
199
194
  const response = await this.downloadSupportTicketAttachmentRaw(requestParameters, initOverrides);
200
195
  return await response.value();
201
196
  }
@@ -0,0 +1,54 @@
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
+
16
+ /**
17
+ * How the learner player should present the launched content.
18
+ * @export
19
+ */
20
+ export const ContentLaunchMode = {
21
+ Embedded: 'embedded',
22
+ Fullscreen: 'fullscreen',
23
+ NewWindow: 'new_window'
24
+ } as const;
25
+ export type ContentLaunchMode = typeof ContentLaunchMode[keyof typeof ContentLaunchMode];
26
+
27
+
28
+ export function instanceOfContentLaunchMode(value: any): boolean {
29
+ for (const key in ContentLaunchMode) {
30
+ if (Object.prototype.hasOwnProperty.call(ContentLaunchMode, key)) {
31
+ if (ContentLaunchMode[key as keyof typeof ContentLaunchMode] === value) {
32
+ return true;
33
+ }
34
+ }
35
+ }
36
+ return false;
37
+ }
38
+
39
+ export function ContentLaunchModeFromJSON(json: any): ContentLaunchMode {
40
+ return ContentLaunchModeFromJSONTyped(json, false);
41
+ }
42
+
43
+ export function ContentLaunchModeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContentLaunchMode {
44
+ return json as ContentLaunchMode;
45
+ }
46
+
47
+ export function ContentLaunchModeToJSON(value?: ContentLaunchMode | null): any {
48
+ return value as any;
49
+ }
50
+
51
+ export function ContentLaunchModeToJSONTyped(value: any, ignoreDiscriminator: boolean): ContentLaunchMode {
52
+ return value as ContentLaunchMode;
53
+ }
54
+
@@ -20,6 +20,13 @@ import {
20
20
  GetContentContentDataToJSON,
21
21
  GetContentContentDataToJSONTyped,
22
22
  } from './GetContentContentData';
23
+ import type { ContentLaunchMode } from './ContentLaunchMode';
24
+ import {
25
+ ContentLaunchModeFromJSON,
26
+ ContentLaunchModeFromJSONTyped,
27
+ ContentLaunchModeToJSON,
28
+ ContentLaunchModeToJSONTyped,
29
+ } from './ContentLaunchMode';
23
30
 
24
31
  /**
25
32
  *
@@ -57,6 +64,12 @@ export interface GetContent {
57
64
  * @memberof GetContent
58
65
  */
59
66
  contentType: GetContentContentTypeEnum;
67
+ /**
68
+ *
69
+ * @type {ContentLaunchMode}
70
+ * @memberof GetContent
71
+ */
72
+ launchMode: ContentLaunchMode;
60
73
  /**
61
74
  *
62
75
  * @type {GetContentContentData}
@@ -131,6 +144,7 @@ export function instanceOfGetContent(value: object): value is GetContent {
131
144
  if (!('moduleId' in value) || value['moduleId'] === undefined) return false;
132
145
  if (!('name' in value) || value['name'] === undefined) return false;
133
146
  if (!('contentType' in value) || value['contentType'] === undefined) return false;
147
+ if (!('launchMode' in value) || value['launchMode'] === undefined) return false;
134
148
  if (!('contentData' in value) || value['contentData'] === undefined) return false;
135
149
  if (!('published' in value) || value['published'] === undefined) return false;
136
150
  return true;
@@ -151,6 +165,7 @@ export function GetContentFromJSONTyped(json: any, ignoreDiscriminator: boolean)
151
165
  'name': json['name'],
152
166
  'description': json['description'] == null ? undefined : json['description'],
153
167
  'contentType': json['content_type'],
168
+ 'launchMode': ContentLaunchModeFromJSON(json['launch_mode']),
154
169
  'contentData': GetContentContentDataFromJSON(json['content_data']),
155
170
  'order': json['order'] == null ? undefined : json['order'],
156
171
  'published': json['published'],
@@ -177,6 +192,7 @@ export function GetContentToJSONTyped(value?: Omit<GetContent, 'id'|'created_dat
177
192
  'name': value['name'],
178
193
  'description': value['description'],
179
194
  'content_type': value['contentType'],
195
+ 'launch_mode': ContentLaunchModeToJSON(value['launchMode']),
180
196
  'content_data': GetContentContentDataToJSON(value['contentData']),
181
197
  'order': value['order'],
182
198
  'published': value['published'],
@@ -55,8 +55,38 @@ export interface GetCourse {
55
55
  * @memberof GetCourse
56
56
  */
57
57
  createdAt: number;
58
+ /**
59
+ * Course-level learner access policy.
60
+ * @type {GetCourseAccessPolicyTypeEnum}
61
+ * @memberof GetCourse
62
+ */
63
+ accessPolicyType: GetCourseAccessPolicyTypeEnum;
64
+ /**
65
+ * Number of access days from enrollment start when access_policy_type is duration_days.
66
+ * @type {number}
67
+ * @memberof GetCourse
68
+ */
69
+ accessDurationDays: number | null;
70
+ /**
71
+ * Fixed Unix timestamp when access expires when access_policy_type is fixed_end_date.
72
+ * @type {number}
73
+ * @memberof GetCourse
74
+ */
75
+ accessFixedEndAt: number | null;
58
76
  }
59
77
 
78
+
79
+ /**
80
+ * @export
81
+ */
82
+ export const GetCourseAccessPolicyTypeEnum = {
83
+ DurationDays: 'duration_days',
84
+ FixedEndDate: 'fixed_end_date',
85
+ NeverExpires: 'never_expires'
86
+ } as const;
87
+ export type GetCourseAccessPolicyTypeEnum = typeof GetCourseAccessPolicyTypeEnum[keyof typeof GetCourseAccessPolicyTypeEnum];
88
+
89
+
60
90
  /**
61
91
  * Check if a given object implements the GetCourse interface.
62
92
  */
@@ -67,6 +97,9 @@ export function instanceOfGetCourse(value: object): value is GetCourse {
67
97
  if (!('imageUrl' in value) || value['imageUrl'] === undefined) return false;
68
98
  if (!('published' in value) || value['published'] === undefined) return false;
69
99
  if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
100
+ if (!('accessPolicyType' in value) || value['accessPolicyType'] === undefined) return false;
101
+ if (!('accessDurationDays' in value) || value['accessDurationDays'] === undefined) return false;
102
+ if (!('accessFixedEndAt' in value) || value['accessFixedEndAt'] === undefined) return false;
70
103
  return true;
71
104
  }
72
105
 
@@ -86,6 +119,9 @@ export function GetCourseFromJSONTyped(json: any, ignoreDiscriminator: boolean):
86
119
  'imageUrl': json['image_url'],
87
120
  'published': json['published'],
88
121
  'createdAt': json['created_at'],
122
+ 'accessPolicyType': json['access_policy_type'],
123
+ 'accessDurationDays': json['access_duration_days'],
124
+ 'accessFixedEndAt': json['access_fixed_end_at'],
89
125
  };
90
126
  }
91
127
 
@@ -105,6 +141,9 @@ export function GetCourseToJSONTyped(value?: Omit<GetCourse, 'id'> | null, ignor
105
141
  'image_url': value['imageUrl'],
106
142
  'published': value['published'],
107
143
  'created_at': value['createdAt'],
144
+ 'access_policy_type': value['accessPolicyType'],
145
+ 'access_duration_days': value['accessDurationDays'],
146
+ 'access_fixed_end_at': value['accessFixedEndAt'],
108
147
  };
109
148
  }
110
149
 
@@ -48,7 +48,7 @@ export interface GetCourseEnrollment {
48
48
  * @type {number}
49
49
  * @memberof GetCourseEnrollment
50
50
  */
51
- enrollmentDateEnd: number;
51
+ enrollmentDateEnd: number | null;
52
52
  /**
53
53
  * Optional notes about the enrollment
54
54
  * @type {string}
@@ -65,11 +65,24 @@ export interface GetCourseEnrollment {
65
65
  * - Withdrawn: learner pulled out before completion
66
66
  * - Removed: admin-removed enrollment
67
67
  * - Archived: historical / read-only (e.g. course share revoked)
68
+ * - Suspended: access temporarily disabled by an admin
68
69
  *
69
70
  * @type {GetCourseEnrollmentStatusEnum}
70
71
  * @memberof GetCourseEnrollment
71
72
  */
72
73
  status: GetCourseEnrollmentStatusEnum;
74
+ /**
75
+ * Derived learner access state for UI indicators and access decisions.
76
+ * @type {GetCourseEnrollmentAccessStateEnum}
77
+ * @memberof GetCourseEnrollment
78
+ */
79
+ accessState: GetCourseEnrollmentAccessStateEnum;
80
+ /**
81
+ * Whole days until access expiry; null for never-expiring or already inactive enrollments.
82
+ * @type {number}
83
+ * @memberof GetCourseEnrollment
84
+ */
85
+ daysUntilExpiry: number | null;
73
86
  /**
74
87
  * The role/type of the user in this enrollment
75
88
  * @type {GetCourseEnrollmentUserTypeEnum}
@@ -96,10 +109,26 @@ export const GetCourseEnrollmentStatusEnum = {
96
109
  Expired: 'Expired',
97
110
  Withdrawn: 'Withdrawn',
98
111
  Removed: 'Removed',
99
- Archived: 'Archived'
112
+ Archived: 'Archived',
113
+ Suspended: 'Suspended'
100
114
  } as const;
101
115
  export type GetCourseEnrollmentStatusEnum = typeof GetCourseEnrollmentStatusEnum[keyof typeof GetCourseEnrollmentStatusEnum];
102
116
 
117
+ /**
118
+ * @export
119
+ */
120
+ export const GetCourseEnrollmentAccessStateEnum = {
121
+ Active: 'active',
122
+ CompletedReview: 'completed_review',
123
+ Expired: 'expired',
124
+ Suspended: 'suspended',
125
+ Failed: 'failed',
126
+ Withdrawn: 'withdrawn',
127
+ Removed: 'removed',
128
+ Archived: 'archived'
129
+ } as const;
130
+ export type GetCourseEnrollmentAccessStateEnum = typeof GetCourseEnrollmentAccessStateEnum[keyof typeof GetCourseEnrollmentAccessStateEnum];
131
+
103
132
  /**
104
133
  * @export
105
134
  */
@@ -121,6 +150,8 @@ export function instanceOfGetCourseEnrollment(value: object): value is GetCourse
121
150
  if (!('enrollmentDateEnd' in value) || value['enrollmentDateEnd'] === undefined) return false;
122
151
  if (!('notes' in value) || value['notes'] === undefined) return false;
123
152
  if (!('status' in value) || value['status'] === undefined) return false;
153
+ if (!('accessState' in value) || value['accessState'] === undefined) return false;
154
+ if (!('daysUntilExpiry' in value) || value['daysUntilExpiry'] === undefined) return false;
124
155
  if (!('userType' in value) || value['userType'] === undefined) return false;
125
156
  if (!('completionDate' in value) || value['completionDate'] === undefined) return false;
126
157
  return true;
@@ -143,6 +174,8 @@ export function GetCourseEnrollmentFromJSONTyped(json: any, ignoreDiscriminator:
143
174
  'enrollmentDateEnd': json['enrollment_date_end'],
144
175
  'notes': json['notes'],
145
176
  'status': json['status'],
177
+ 'accessState': json['access_state'],
178
+ 'daysUntilExpiry': json['days_until_expiry'],
146
179
  'userType': json['user_type'],
147
180
  'completionDate': json['completion_date'],
148
181
  };
@@ -166,6 +199,8 @@ export function GetCourseEnrollmentToJSONTyped(value?: GetCourseEnrollment | nul
166
199
  'enrollment_date_end': value['enrollmentDateEnd'],
167
200
  'notes': value['notes'],
168
201
  'status': value['status'],
202
+ 'access_state': value['accessState'],
203
+ 'days_until_expiry': value['daysUntilExpiry'],
169
204
  'user_type': value['userType'],
170
205
  'completion_date': value['completionDate'],
171
206
  };
@@ -60,13 +60,25 @@ export interface GetCourseEnrollmentListItem {
60
60
  * @type {number}
61
61
  * @memberof GetCourseEnrollmentListItem
62
62
  */
63
- enrollmentDateEnd: number;
63
+ enrollmentDateEnd: number | null;
64
64
  /**
65
65
  * Current status of the enrollment
66
66
  * @type {GetCourseEnrollmentListItemStatusEnum}
67
67
  * @memberof GetCourseEnrollmentListItem
68
68
  */
69
69
  status: GetCourseEnrollmentListItemStatusEnum;
70
+ /**
71
+ * Derived learner access state for UI indicators and access decisions.
72
+ * @type {GetCourseEnrollmentListItemAccessStateEnum}
73
+ * @memberof GetCourseEnrollmentListItem
74
+ */
75
+ accessState: GetCourseEnrollmentListItemAccessStateEnum;
76
+ /**
77
+ * Whole days until access expiry; null for never-expiring or already inactive enrollments.
78
+ * @type {number}
79
+ * @memberof GetCourseEnrollmentListItem
80
+ */
81
+ daysUntilExpiry: number | null;
70
82
  /**
71
83
  * The role/type of the user in this enrollment
72
84
  * @type {GetCourseEnrollmentListItemUserTypeEnum}
@@ -93,10 +105,26 @@ export const GetCourseEnrollmentListItemStatusEnum = {
93
105
  Expired: 'Expired',
94
106
  Withdrawn: 'Withdrawn',
95
107
  Removed: 'Removed',
96
- Archived: 'Archived'
108
+ Archived: 'Archived',
109
+ Suspended: 'Suspended'
97
110
  } as const;
98
111
  export type GetCourseEnrollmentListItemStatusEnum = typeof GetCourseEnrollmentListItemStatusEnum[keyof typeof GetCourseEnrollmentListItemStatusEnum];
99
112
 
113
+ /**
114
+ * @export
115
+ */
116
+ export const GetCourseEnrollmentListItemAccessStateEnum = {
117
+ Active: 'active',
118
+ CompletedReview: 'completed_review',
119
+ Expired: 'expired',
120
+ Suspended: 'suspended',
121
+ Failed: 'failed',
122
+ Withdrawn: 'withdrawn',
123
+ Removed: 'removed',
124
+ Archived: 'archived'
125
+ } as const;
126
+ export type GetCourseEnrollmentListItemAccessStateEnum = typeof GetCourseEnrollmentListItemAccessStateEnum[keyof typeof GetCourseEnrollmentListItemAccessStateEnum];
127
+
100
128
  /**
101
129
  * @export
102
130
  */
@@ -119,6 +147,8 @@ export function instanceOfGetCourseEnrollmentListItem(value: object): value is G
119
147
  if (!('enrollmentDateStart' in value) || value['enrollmentDateStart'] === undefined) return false;
120
148
  if (!('enrollmentDateEnd' in value) || value['enrollmentDateEnd'] === undefined) return false;
121
149
  if (!('status' in value) || value['status'] === undefined) return false;
150
+ if (!('accessState' in value) || value['accessState'] === undefined) return false;
151
+ if (!('daysUntilExpiry' in value) || value['daysUntilExpiry'] === undefined) return false;
122
152
  if (!('userType' in value) || value['userType'] === undefined) return false;
123
153
  if (!('completionDate' in value) || value['completionDate'] === undefined) return false;
124
154
  return true;
@@ -142,6 +172,8 @@ export function GetCourseEnrollmentListItemFromJSONTyped(json: any, ignoreDiscri
142
172
  'enrollmentDateStart': json['enrollment_date_start'],
143
173
  'enrollmentDateEnd': json['enrollment_date_end'],
144
174
  'status': json['status'],
175
+ 'accessState': json['access_state'],
176
+ 'daysUntilExpiry': json['days_until_expiry'],
145
177
  'userType': json['user_type'],
146
178
  'completionDate': json['completion_date'],
147
179
  };
@@ -166,6 +198,8 @@ export function GetCourseEnrollmentListItemToJSONTyped(value?: GetCourseEnrollme
166
198
  'enrollment_date_start': value['enrollmentDateStart'],
167
199
  'enrollment_date_end': value['enrollmentDateEnd'],
168
200
  'status': value['status'],
201
+ 'access_state': value['accessState'],
202
+ 'days_until_expiry': value['daysUntilExpiry'],
169
203
  'user_type': value['userType'],
170
204
  'completion_date': value['completionDate'],
171
205
  };
@@ -50,13 +50,13 @@ export interface GetPortal {
50
50
  */
51
51
  clientDomain?: string | null;
52
52
  /**
53
- *
53
+ * API-proxied portal logo URL when a logo is configured.
54
54
  * @type {string}
55
55
  * @memberof GetPortal
56
56
  */
57
57
  logoUrl?: string | null;
58
58
  /**
59
- *
59
+ * API-proxied portal favicon URL when a favicon is configured.
60
60
  * @type {string}
61
61
  * @memberof GetPortal
62
62
  */
@@ -20,7 +20,7 @@ import { mapValues } from '../runtime';
20
20
  */
21
21
  export interface GetPortalFaviconUpload {
22
22
  /**
23
- * Presigned URL for the uploaded favicon image
23
+ * API-proxied URL for the uploaded favicon image
24
24
  * @type {string}
25
25
  * @memberof GetPortalFaviconUpload
26
26
  */
@@ -20,7 +20,7 @@ import { mapValues } from '../runtime';
20
20
  */
21
21
  export interface GetPortalLogoUpload {
22
22
  /**
23
- * Presigned URL for the uploaded logo image
23
+ * API-proxied URL for the uploaded logo image
24
24
  * @type {string}
25
25
  * @memberof GetPortalLogoUpload
26
26
  */
@@ -38,13 +38,13 @@ export interface GetPublicPortalBranding {
38
38
  */
39
39
  slug: string | null;
40
40
  /**
41
- * Presigned portal logo URL when a logo is configured.
41
+ * API-proxied portal logo URL when a logo is configured.
42
42
  * @type {string}
43
43
  * @memberof GetPublicPortalBranding
44
44
  */
45
45
  logoUrl: string | null;
46
46
  /**
47
- * Presigned portal favicon URL when a favicon is configured.
47
+ * API-proxied portal favicon URL when a favicon is configured.
48
48
  * @type {string}
49
49
  * @memberof GetPublicPortalBranding
50
50
  */