@easyedu/js-lsm-api 1.131.0 → 1.132.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 (86) hide show
  1. package/.openapi-generator/FILES +24 -0
  2. package/README.md +15 -2
  3. package/dist/apis/SystemApi.d.ts +16 -0
  4. package/dist/apis/SystemApi.js +40 -0
  5. package/dist/esm/apis/SystemApi.d.ts +16 -0
  6. package/dist/esm/apis/SystemApi.js +40 -0
  7. package/dist/esm/models/GetSystemPortalOverview.d.ts +121 -0
  8. package/dist/esm/models/GetSystemPortalOverview.js +106 -0
  9. package/dist/esm/models/SystemPortalActivityStats.d.ts +56 -0
  10. package/dist/esm/models/SystemPortalActivityStats.js +57 -0
  11. package/dist/esm/models/SystemPortalCertificateStats.d.ts +50 -0
  12. package/dist/esm/models/SystemPortalCertificateStats.js +55 -0
  13. package/dist/esm/models/SystemPortalContentStats.d.ts +56 -0
  14. package/dist/esm/models/SystemPortalContentStats.js +59 -0
  15. package/dist/esm/models/SystemPortalCourseStats.d.ts +62 -0
  16. package/dist/esm/models/SystemPortalCourseStats.js +63 -0
  17. package/dist/esm/models/SystemPortalEnrollmentStats.d.ts +56 -0
  18. package/dist/esm/models/SystemPortalEnrollmentStats.js +59 -0
  19. package/dist/esm/models/SystemPortalHierarchy.d.ts +44 -0
  20. package/dist/esm/models/SystemPortalHierarchy.js +47 -0
  21. package/dist/esm/models/SystemPortalLicense.d.ts +65 -0
  22. package/dist/esm/models/SystemPortalLicense.js +61 -0
  23. package/dist/esm/models/SystemPortalRoleCount.d.ts +51 -0
  24. package/dist/esm/models/SystemPortalRoleCount.js +59 -0
  25. package/dist/esm/models/SystemPortalStorageUsage.d.ts +74 -0
  26. package/dist/esm/models/SystemPortalStorageUsage.js +71 -0
  27. package/dist/esm/models/SystemPortalSupportStats.d.ts +50 -0
  28. package/dist/esm/models/SystemPortalSupportStats.js +55 -0
  29. package/dist/esm/models/SystemPortalUserStats.d.ts +81 -0
  30. package/dist/esm/models/SystemPortalUserStats.js +74 -0
  31. package/dist/esm/models/index.d.ts +12 -0
  32. package/dist/esm/models/index.js +12 -0
  33. package/dist/models/GetSystemPortalOverview.d.ts +121 -0
  34. package/dist/models/GetSystemPortalOverview.js +113 -0
  35. package/dist/models/SystemPortalActivityStats.d.ts +56 -0
  36. package/dist/models/SystemPortalActivityStats.js +64 -0
  37. package/dist/models/SystemPortalCertificateStats.d.ts +50 -0
  38. package/dist/models/SystemPortalCertificateStats.js +62 -0
  39. package/dist/models/SystemPortalContentStats.d.ts +56 -0
  40. package/dist/models/SystemPortalContentStats.js +66 -0
  41. package/dist/models/SystemPortalCourseStats.d.ts +62 -0
  42. package/dist/models/SystemPortalCourseStats.js +70 -0
  43. package/dist/models/SystemPortalEnrollmentStats.d.ts +56 -0
  44. package/dist/models/SystemPortalEnrollmentStats.js +66 -0
  45. package/dist/models/SystemPortalHierarchy.d.ts +44 -0
  46. package/dist/models/SystemPortalHierarchy.js +54 -0
  47. package/dist/models/SystemPortalLicense.d.ts +65 -0
  48. package/dist/models/SystemPortalLicense.js +69 -0
  49. package/dist/models/SystemPortalRoleCount.d.ts +51 -0
  50. package/dist/models/SystemPortalRoleCount.js +67 -0
  51. package/dist/models/SystemPortalStorageUsage.d.ts +74 -0
  52. package/dist/models/SystemPortalStorageUsage.js +78 -0
  53. package/dist/models/SystemPortalSupportStats.d.ts +50 -0
  54. package/dist/models/SystemPortalSupportStats.js +62 -0
  55. package/dist/models/SystemPortalUserStats.d.ts +81 -0
  56. package/dist/models/SystemPortalUserStats.js +81 -0
  57. package/dist/models/index.d.ts +12 -0
  58. package/dist/models/index.js +12 -0
  59. package/docs/GetSystemPortalOverview.md +61 -0
  60. package/docs/SystemApi.md +68 -0
  61. package/docs/SystemPortalActivityStats.md +42 -0
  62. package/docs/SystemPortalCertificateStats.md +40 -0
  63. package/docs/SystemPortalContentStats.md +43 -0
  64. package/docs/SystemPortalCourseStats.md +44 -0
  65. package/docs/SystemPortalEnrollmentStats.md +43 -0
  66. package/docs/SystemPortalHierarchy.md +38 -0
  67. package/docs/SystemPortalLicense.md +42 -0
  68. package/docs/SystemPortalRoleCount.md +36 -0
  69. package/docs/SystemPortalStorageUsage.md +49 -0
  70. package/docs/SystemPortalSupportStats.md +40 -0
  71. package/docs/SystemPortalUserStats.md +50 -0
  72. package/package.json +1 -1
  73. package/src/apis/SystemApi.ts +54 -0
  74. package/src/models/GetSystemPortalOverview.ts +261 -0
  75. package/src/models/SystemPortalActivityStats.ts +101 -0
  76. package/src/models/SystemPortalCertificateStats.ts +93 -0
  77. package/src/models/SystemPortalContentStats.ts +102 -0
  78. package/src/models/SystemPortalCourseStats.ts +111 -0
  79. package/src/models/SystemPortalEnrollmentStats.ts +102 -0
  80. package/src/models/SystemPortalHierarchy.ts +82 -0
  81. package/src/models/SystemPortalLicense.ts +111 -0
  82. package/src/models/SystemPortalRoleCount.ts +91 -0
  83. package/src/models/SystemPortalStorageUsage.ts +129 -0
  84. package/src/models/SystemPortalSupportStats.ts +93 -0
  85. package/src/models/SystemPortalUserStats.ts +145 -0
  86. package/src/models/index.ts +12 -0
@@ -0,0 +1,36 @@
1
+
2
+ # SystemPortalRoleCount
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `baseType` | string
10
+ `userCount` | number
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import type { SystemPortalRoleCount } from '@easyedu/js-lsm-api'
16
+
17
+ // TODO: Update the object below with actual values
18
+ const example = {
19
+ "baseType": null,
20
+ "userCount": null,
21
+ } satisfies SystemPortalRoleCount
22
+
23
+ console.log(example)
24
+
25
+ // Convert the instance to a JSON string
26
+ const exampleJSON: string = JSON.stringify(example)
27
+ console.log(exampleJSON)
28
+
29
+ // Parse the JSON string back to an object
30
+ const exampleParsed = JSON.parse(exampleJSON) as SystemPortalRoleCount
31
+ console.log(exampleParsed)
32
+ ```
33
+
34
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
35
+
36
+
@@ -0,0 +1,49 @@
1
+
2
+ # SystemPortalStorageUsage
3
+
4
+ Stored object sizes attributed to the portal, in bytes, as recorded in the database at upload time. Pending and deleted uploads are excluded.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `totalBytes` | number
11
+ `contentLibraryBytes` | number
12
+ `richTextAssetBytes` | number
13
+ `emailAssetBytes` | number
14
+ `certificateAssetBytes` | number
15
+ `certificateArtifactBytes` | number
16
+ `supportAttachmentBytes` | number
17
+ `courseExportBytes` | number
18
+
19
+ ## Example
20
+
21
+ ```typescript
22
+ import type { SystemPortalStorageUsage } from '@easyedu/js-lsm-api'
23
+
24
+ // TODO: Update the object below with actual values
25
+ const example = {
26
+ "totalBytes": null,
27
+ "contentLibraryBytes": null,
28
+ "richTextAssetBytes": null,
29
+ "emailAssetBytes": null,
30
+ "certificateAssetBytes": null,
31
+ "certificateArtifactBytes": null,
32
+ "supportAttachmentBytes": null,
33
+ "courseExportBytes": null,
34
+ } satisfies SystemPortalStorageUsage
35
+
36
+ console.log(example)
37
+
38
+ // Convert the instance to a JSON string
39
+ const exampleJSON: string = JSON.stringify(example)
40
+ console.log(exampleJSON)
41
+
42
+ // Parse the JSON string back to an object
43
+ const exampleParsed = JSON.parse(exampleJSON) as SystemPortalStorageUsage
44
+ console.log(exampleParsed)
45
+ ```
46
+
47
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
48
+
49
+
@@ -0,0 +1,40 @@
1
+
2
+ # SystemPortalSupportStats
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `open` | number
10
+ `inProgress` | number
11
+ `closed` | number
12
+ `total` | number
13
+
14
+ ## Example
15
+
16
+ ```typescript
17
+ import type { SystemPortalSupportStats } from '@easyedu/js-lsm-api'
18
+
19
+ // TODO: Update the object below with actual values
20
+ const example = {
21
+ "open": null,
22
+ "inProgress": null,
23
+ "closed": null,
24
+ "total": null,
25
+ } satisfies SystemPortalSupportStats
26
+
27
+ console.log(example)
28
+
29
+ // Convert the instance to a JSON string
30
+ const exampleJSON: string = JSON.stringify(example)
31
+ console.log(exampleJSON)
32
+
33
+ // Parse the JSON string back to an object
34
+ const exampleParsed = JSON.parse(exampleJSON) as SystemPortalSupportStats
35
+ console.log(exampleParsed)
36
+ ```
37
+
38
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
39
+
40
+
@@ -0,0 +1,50 @@
1
+
2
+ # SystemPortalUserStats
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `total` | number
10
+ `enabled` | number
11
+ `disabled` | number
12
+ `newLast30Days` | number
13
+ `activeLast7Days` | number
14
+ `activeLast30Days` | number
15
+ `pendingInvitations` | number
16
+ `lastLoginAt` | number
17
+ `byRole` | [Array<SystemPortalRoleCount>](SystemPortalRoleCount.md)
18
+
19
+ ## Example
20
+
21
+ ```typescript
22
+ import type { SystemPortalUserStats } from '@easyedu/js-lsm-api'
23
+
24
+ // TODO: Update the object below with actual values
25
+ const example = {
26
+ "total": null,
27
+ "enabled": null,
28
+ "disabled": null,
29
+ "newLast30Days": null,
30
+ "activeLast7Days": null,
31
+ "activeLast30Days": null,
32
+ "pendingInvitations": null,
33
+ "lastLoginAt": null,
34
+ "byRole": null,
35
+ } satisfies SystemPortalUserStats
36
+
37
+ console.log(example)
38
+
39
+ // Convert the instance to a JSON string
40
+ const exampleJSON: string = JSON.stringify(example)
41
+ console.log(exampleJSON)
42
+
43
+ // Parse the JSON string back to an object
44
+ const exampleParsed = JSON.parse(exampleJSON) as SystemPortalUserStats
45
+ console.log(exampleParsed)
46
+ ```
47
+
48
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
49
+
50
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyedu/js-lsm-api",
3
- "version": "1.131.0",
3
+ "version": "1.132.0",
4
4
  "description": "OpenAPI client for @easyedu/js-lsm-api",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -38,6 +38,11 @@ import {
38
38
  GetSystemMetricsFromJSON,
39
39
  GetSystemMetricsToJSON,
40
40
  } from '../models/GetSystemMetrics';
41
+ import {
42
+ type GetSystemPortalOverview,
43
+ GetSystemPortalOverviewFromJSON,
44
+ GetSystemPortalOverviewToJSON,
45
+ } from '../models/GetSystemPortalOverview';
41
46
 
42
47
  export interface GetSystemBillingRequest {
43
48
  page?: number;
@@ -48,6 +53,10 @@ export interface GetSystemPortalRequest {
48
53
  portalId: string;
49
54
  }
50
55
 
56
+ export interface GetSystemPortalOverviewRequest {
57
+ portalId: string;
58
+ }
59
+
51
60
  export interface GetSystemPortalsRequest {
52
61
  page?: number;
53
62
  pageSize?: number;
@@ -190,6 +199,51 @@ export class SystemApi extends runtime.BaseAPI {
190
199
  return await response.value();
191
200
  }
192
201
 
202
+ /**
203
+ * Creates request options for getSystemPortalOverview without sending the request
204
+ */
205
+ async getSystemPortalOverviewRequestOpts(requestParameters: GetSystemPortalOverviewRequest): Promise<runtime.RequestOpts> {
206
+ if (requestParameters['portalId'] == null) {
207
+ throw new runtime.RequiredError(
208
+ 'portalId',
209
+ 'Required parameter "portalId" was null or undefined when calling getSystemPortalOverview().'
210
+ );
211
+ }
212
+
213
+ const queryParameters: any = {};
214
+
215
+ const headerParameters: runtime.HTTPHeaders = {};
216
+
217
+
218
+ let urlPath = `/system/portals/{portalId}/overview`;
219
+ urlPath = urlPath.replace('{portalId}', encodeURIComponent(String(requestParameters['portalId'])));
220
+
221
+ return {
222
+ path: urlPath,
223
+ method: 'GET',
224
+ headers: headerParameters,
225
+ query: queryParameters,
226
+ };
227
+ }
228
+
229
+ /**
230
+ * Get detailed platform portal overview and usage statistics
231
+ */
232
+ async getSystemPortalOverviewRaw(requestParameters: GetSystemPortalOverviewRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetSystemPortalOverview>> {
233
+ const requestOptions = await this.getSystemPortalOverviewRequestOpts(requestParameters);
234
+ const response = await this.request(requestOptions, initOverrides);
235
+
236
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetSystemPortalOverviewFromJSON(jsonValue));
237
+ }
238
+
239
+ /**
240
+ * Get detailed platform portal overview and usage statistics
241
+ */
242
+ async getSystemPortalOverview(requestParameters: GetSystemPortalOverviewRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetSystemPortalOverview> {
243
+ const response = await this.getSystemPortalOverviewRaw(requestParameters, initOverrides);
244
+ return await response.value();
245
+ }
246
+
193
247
  /**
194
248
  * Creates request options for getSystemPortals without sending the request
195
249
  */
@@ -0,0 +1,261 @@
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 { SystemPortalCourseStats } from './SystemPortalCourseStats';
17
+ import {
18
+ SystemPortalCourseStatsFromJSON,
19
+ SystemPortalCourseStatsFromJSONTyped,
20
+ SystemPortalCourseStatsToJSON,
21
+ SystemPortalCourseStatsToJSONTyped,
22
+ } from './SystemPortalCourseStats';
23
+ import type { SystemPortalLicense } from './SystemPortalLicense';
24
+ import {
25
+ SystemPortalLicenseFromJSON,
26
+ SystemPortalLicenseFromJSONTyped,
27
+ SystemPortalLicenseToJSON,
28
+ SystemPortalLicenseToJSONTyped,
29
+ } from './SystemPortalLicense';
30
+ import type { SystemPortalCertificateStats } from './SystemPortalCertificateStats';
31
+ import {
32
+ SystemPortalCertificateStatsFromJSON,
33
+ SystemPortalCertificateStatsFromJSONTyped,
34
+ SystemPortalCertificateStatsToJSON,
35
+ SystemPortalCertificateStatsToJSONTyped,
36
+ } from './SystemPortalCertificateStats';
37
+ import type { SystemPortalStorageUsage } from './SystemPortalStorageUsage';
38
+ import {
39
+ SystemPortalStorageUsageFromJSON,
40
+ SystemPortalStorageUsageFromJSONTyped,
41
+ SystemPortalStorageUsageToJSON,
42
+ SystemPortalStorageUsageToJSONTyped,
43
+ } from './SystemPortalStorageUsage';
44
+ import type { SystemPortalSupportStats } from './SystemPortalSupportStats';
45
+ import {
46
+ SystemPortalSupportStatsFromJSON,
47
+ SystemPortalSupportStatsFromJSONTyped,
48
+ SystemPortalSupportStatsToJSON,
49
+ SystemPortalSupportStatsToJSONTyped,
50
+ } from './SystemPortalSupportStats';
51
+ import type { GetPortal } from './GetPortal';
52
+ import {
53
+ GetPortalFromJSON,
54
+ GetPortalFromJSONTyped,
55
+ GetPortalToJSON,
56
+ GetPortalToJSONTyped,
57
+ } from './GetPortal';
58
+ import type { SystemPortalEnrollmentStats } from './SystemPortalEnrollmentStats';
59
+ import {
60
+ SystemPortalEnrollmentStatsFromJSON,
61
+ SystemPortalEnrollmentStatsFromJSONTyped,
62
+ SystemPortalEnrollmentStatsToJSON,
63
+ SystemPortalEnrollmentStatsToJSONTyped,
64
+ } from './SystemPortalEnrollmentStats';
65
+ import type { SystemPortalActivityStats } from './SystemPortalActivityStats';
66
+ import {
67
+ SystemPortalActivityStatsFromJSON,
68
+ SystemPortalActivityStatsFromJSONTyped,
69
+ SystemPortalActivityStatsToJSON,
70
+ SystemPortalActivityStatsToJSONTyped,
71
+ } from './SystemPortalActivityStats';
72
+ import type { SystemPortalContentStats } from './SystemPortalContentStats';
73
+ import {
74
+ SystemPortalContentStatsFromJSON,
75
+ SystemPortalContentStatsFromJSONTyped,
76
+ SystemPortalContentStatsToJSON,
77
+ SystemPortalContentStatsToJSONTyped,
78
+ } from './SystemPortalContentStats';
79
+ import type { SystemPortalHierarchy } from './SystemPortalHierarchy';
80
+ import {
81
+ SystemPortalHierarchyFromJSON,
82
+ SystemPortalHierarchyFromJSONTyped,
83
+ SystemPortalHierarchyToJSON,
84
+ SystemPortalHierarchyToJSONTyped,
85
+ } from './SystemPortalHierarchy';
86
+ import type { SystemPortalUserStats } from './SystemPortalUserStats';
87
+ import {
88
+ SystemPortalUserStatsFromJSON,
89
+ SystemPortalUserStatsFromJSONTyped,
90
+ SystemPortalUserStatsToJSON,
91
+ SystemPortalUserStatsToJSONTyped,
92
+ } from './SystemPortalUserStats';
93
+
94
+ /**
95
+ * Detailed read-only overview of a single portal for platform administrators. All counts are scoped to the portal itself and exclude child portals. Timestamps are Unix epoch seconds (UTC).
96
+ * @export
97
+ * @interface GetSystemPortalOverview
98
+ */
99
+ export interface GetSystemPortalOverview {
100
+ /**
101
+ *
102
+ * @type {GetPortal}
103
+ * @memberof GetSystemPortalOverview
104
+ */
105
+ portal: GetPortal;
106
+ /**
107
+ *
108
+ * @type {number}
109
+ * @memberof GetSystemPortalOverview
110
+ */
111
+ createdAt: number;
112
+ /**
113
+ *
114
+ * @type {number}
115
+ * @memberof GetSystemPortalOverview
116
+ */
117
+ updatedAt: number;
118
+ /**
119
+ * When these statistics were computed.
120
+ * @type {number}
121
+ * @memberof GetSystemPortalOverview
122
+ */
123
+ generatedAt: number;
124
+ /**
125
+ *
126
+ * @type {SystemPortalHierarchy}
127
+ * @memberof GetSystemPortalOverview
128
+ */
129
+ hierarchy: SystemPortalHierarchy;
130
+ /**
131
+ *
132
+ * @type {SystemPortalLicense}
133
+ * @memberof GetSystemPortalOverview
134
+ */
135
+ license: SystemPortalLicense;
136
+ /**
137
+ *
138
+ * @type {SystemPortalUserStats}
139
+ * @memberof GetSystemPortalOverview
140
+ */
141
+ users: SystemPortalUserStats;
142
+ /**
143
+ *
144
+ * @type {SystemPortalCourseStats}
145
+ * @memberof GetSystemPortalOverview
146
+ */
147
+ courses: SystemPortalCourseStats;
148
+ /**
149
+ *
150
+ * @type {SystemPortalEnrollmentStats}
151
+ * @memberof GetSystemPortalOverview
152
+ */
153
+ enrollments: SystemPortalEnrollmentStats;
154
+ /**
155
+ *
156
+ * @type {SystemPortalContentStats}
157
+ * @memberof GetSystemPortalOverview
158
+ */
159
+ content: SystemPortalContentStats;
160
+ /**
161
+ *
162
+ * @type {SystemPortalCertificateStats}
163
+ * @memberof GetSystemPortalOverview
164
+ */
165
+ certificates: SystemPortalCertificateStats;
166
+ /**
167
+ *
168
+ * @type {SystemPortalStorageUsage}
169
+ * @memberof GetSystemPortalOverview
170
+ */
171
+ storage: SystemPortalStorageUsage;
172
+ /**
173
+ *
174
+ * @type {SystemPortalActivityStats}
175
+ * @memberof GetSystemPortalOverview
176
+ */
177
+ activity: SystemPortalActivityStats;
178
+ /**
179
+ *
180
+ * @type {SystemPortalSupportStats}
181
+ * @memberof GetSystemPortalOverview
182
+ */
183
+ support: SystemPortalSupportStats;
184
+ }
185
+
186
+ /**
187
+ * Check if a given object implements the GetSystemPortalOverview interface.
188
+ */
189
+ export function instanceOfGetSystemPortalOverview(value: object): value is GetSystemPortalOverview {
190
+ if (!('portal' in value) || value['portal'] === undefined) return false;
191
+ if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
192
+ if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
193
+ if (!('generatedAt' in value) || value['generatedAt'] === undefined) return false;
194
+ if (!('hierarchy' in value) || value['hierarchy'] === undefined) return false;
195
+ if (!('license' in value) || value['license'] === undefined) return false;
196
+ if (!('users' in value) || value['users'] === undefined) return false;
197
+ if (!('courses' in value) || value['courses'] === undefined) return false;
198
+ if (!('enrollments' in value) || value['enrollments'] === undefined) return false;
199
+ if (!('content' in value) || value['content'] === undefined) return false;
200
+ if (!('certificates' in value) || value['certificates'] === undefined) return false;
201
+ if (!('storage' in value) || value['storage'] === undefined) return false;
202
+ if (!('activity' in value) || value['activity'] === undefined) return false;
203
+ if (!('support' in value) || value['support'] === undefined) return false;
204
+ return true;
205
+ }
206
+
207
+ export function GetSystemPortalOverviewFromJSON(json: any): GetSystemPortalOverview {
208
+ return GetSystemPortalOverviewFromJSONTyped(json, false);
209
+ }
210
+
211
+ export function GetSystemPortalOverviewFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetSystemPortalOverview {
212
+ if (json == null) {
213
+ return json;
214
+ }
215
+ return {
216
+
217
+ 'portal': GetPortalFromJSON(json['portal']),
218
+ 'createdAt': json['created_at'],
219
+ 'updatedAt': json['updated_at'],
220
+ 'generatedAt': json['generated_at'],
221
+ 'hierarchy': SystemPortalHierarchyFromJSON(json['hierarchy']),
222
+ 'license': SystemPortalLicenseFromJSON(json['license']),
223
+ 'users': SystemPortalUserStatsFromJSON(json['users']),
224
+ 'courses': SystemPortalCourseStatsFromJSON(json['courses']),
225
+ 'enrollments': SystemPortalEnrollmentStatsFromJSON(json['enrollments']),
226
+ 'content': SystemPortalContentStatsFromJSON(json['content']),
227
+ 'certificates': SystemPortalCertificateStatsFromJSON(json['certificates']),
228
+ 'storage': SystemPortalStorageUsageFromJSON(json['storage']),
229
+ 'activity': SystemPortalActivityStatsFromJSON(json['activity']),
230
+ 'support': SystemPortalSupportStatsFromJSON(json['support']),
231
+ };
232
+ }
233
+
234
+ export function GetSystemPortalOverviewToJSON(json: any): GetSystemPortalOverview {
235
+ return GetSystemPortalOverviewToJSONTyped(json, false);
236
+ }
237
+
238
+ export function GetSystemPortalOverviewToJSONTyped(value?: GetSystemPortalOverview | null, ignoreDiscriminator: boolean = false): any {
239
+ if (value == null) {
240
+ return value;
241
+ }
242
+
243
+ return {
244
+
245
+ 'portal': GetPortalToJSON(value['portal']),
246
+ 'created_at': value['createdAt'],
247
+ 'updated_at': value['updatedAt'],
248
+ 'generated_at': value['generatedAt'],
249
+ 'hierarchy': SystemPortalHierarchyToJSON(value['hierarchy']),
250
+ 'license': SystemPortalLicenseToJSON(value['license']),
251
+ 'users': SystemPortalUserStatsToJSON(value['users']),
252
+ 'courses': SystemPortalCourseStatsToJSON(value['courses']),
253
+ 'enrollments': SystemPortalEnrollmentStatsToJSON(value['enrollments']),
254
+ 'content': SystemPortalContentStatsToJSON(value['content']),
255
+ 'certificates': SystemPortalCertificateStatsToJSON(value['certificates']),
256
+ 'storage': SystemPortalStorageUsageToJSON(value['storage']),
257
+ 'activity': SystemPortalActivityStatsToJSON(value['activity']),
258
+ 'support': SystemPortalSupportStatsToJSON(value['support']),
259
+ };
260
+ }
261
+
@@ -0,0 +1,101 @@
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 SystemPortalActivityStats
20
+ */
21
+ export interface SystemPortalActivityStats {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof SystemPortalActivityStats
26
+ */
27
+ loginsLast30Days: number;
28
+ /**
29
+ * Active learning time recorded in the portal over the last 30 days.
30
+ * @type {number}
31
+ * @memberof SystemPortalActivityStats
32
+ */
33
+ learningSecondsLast30Days: number;
34
+ /**
35
+ *
36
+ * @type {number}
37
+ * @memberof SystemPortalActivityStats
38
+ */
39
+ chatRequestsLast30Days: number;
40
+ /**
41
+ *
42
+ * @type {number}
43
+ * @memberof SystemPortalActivityStats
44
+ */
45
+ chatTokensLast30Days: number;
46
+ /**
47
+ *
48
+ * @type {number}
49
+ * @memberof SystemPortalActivityStats
50
+ */
51
+ lastLearningActivityAt?: number | null;
52
+ }
53
+
54
+ /**
55
+ * Check if a given object implements the SystemPortalActivityStats interface.
56
+ */
57
+ export function instanceOfSystemPortalActivityStats(value: object): value is SystemPortalActivityStats {
58
+ if (!('loginsLast30Days' in value) || value['loginsLast30Days'] === undefined) return false;
59
+ if (!('learningSecondsLast30Days' in value) || value['learningSecondsLast30Days'] === undefined) return false;
60
+ if (!('chatRequestsLast30Days' in value) || value['chatRequestsLast30Days'] === undefined) return false;
61
+ if (!('chatTokensLast30Days' in value) || value['chatTokensLast30Days'] === undefined) return false;
62
+ return true;
63
+ }
64
+
65
+ export function SystemPortalActivityStatsFromJSON(json: any): SystemPortalActivityStats {
66
+ return SystemPortalActivityStatsFromJSONTyped(json, false);
67
+ }
68
+
69
+ export function SystemPortalActivityStatsFromJSONTyped(json: any, ignoreDiscriminator: boolean): SystemPortalActivityStats {
70
+ if (json == null) {
71
+ return json;
72
+ }
73
+ return {
74
+
75
+ 'loginsLast30Days': json['logins_last_30_days'],
76
+ 'learningSecondsLast30Days': json['learning_seconds_last_30_days'],
77
+ 'chatRequestsLast30Days': json['chat_requests_last_30_days'],
78
+ 'chatTokensLast30Days': json['chat_tokens_last_30_days'],
79
+ 'lastLearningActivityAt': json['last_learning_activity_at'] == null ? undefined : json['last_learning_activity_at'],
80
+ };
81
+ }
82
+
83
+ export function SystemPortalActivityStatsToJSON(json: any): SystemPortalActivityStats {
84
+ return SystemPortalActivityStatsToJSONTyped(json, false);
85
+ }
86
+
87
+ export function SystemPortalActivityStatsToJSONTyped(value?: SystemPortalActivityStats | null, ignoreDiscriminator: boolean = false): any {
88
+ if (value == null) {
89
+ return value;
90
+ }
91
+
92
+ return {
93
+
94
+ 'logins_last_30_days': value['loginsLast30Days'],
95
+ 'learning_seconds_last_30_days': value['learningSecondsLast30Days'],
96
+ 'chat_requests_last_30_days': value['chatRequestsLast30Days'],
97
+ 'chat_tokens_last_30_days': value['chatTokensLast30Days'],
98
+ 'last_learning_activity_at': value['lastLearningActivityAt'],
99
+ };
100
+ }
101
+