@easyedu/js-lsm-api 1.112.0 → 1.114.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 (38) hide show
  1. package/.openapi-generator/FILES +2 -0
  2. package/README.md +5 -3
  3. package/dist/apis/QuestionApi.d.ts +17 -2
  4. package/dist/apis/QuestionApi.js +41 -2
  5. package/dist/esm/apis/QuestionApi.d.ts +17 -2
  6. package/dist/esm/apis/QuestionApi.js +41 -2
  7. package/dist/esm/models/ChatFeatureUsage.d.ts +47 -0
  8. package/dist/esm/models/ChatFeatureUsage.js +55 -0
  9. package/dist/esm/models/GetChatUsage.d.ts +7 -0
  10. package/dist/esm/models/GetChatUsage.js +5 -0
  11. package/dist/esm/models/GetQuestion.d.ts +13 -1
  12. package/dist/esm/models/GetQuestion.js +5 -0
  13. package/dist/esm/models/PutQuestion.d.ts +6 -0
  14. package/dist/esm/models/PutQuestion.js +2 -0
  15. package/dist/esm/models/index.d.ts +1 -0
  16. package/dist/esm/models/index.js +1 -0
  17. package/dist/models/ChatFeatureUsage.d.ts +47 -0
  18. package/dist/models/ChatFeatureUsage.js +63 -0
  19. package/dist/models/GetChatUsage.d.ts +7 -0
  20. package/dist/models/GetChatUsage.js +5 -0
  21. package/dist/models/GetQuestion.d.ts +13 -1
  22. package/dist/models/GetQuestion.js +5 -0
  23. package/dist/models/PutQuestion.d.ts +6 -0
  24. package/dist/models/PutQuestion.js +2 -0
  25. package/dist/models/index.d.ts +1 -0
  26. package/dist/models/index.js +1 -0
  27. package/docs/ChatFeatureUsage.md +36 -0
  28. package/docs/GetChatUsage.md +2 -0
  29. package/docs/GetQuestion.md +4 -0
  30. package/docs/PutQuestion.md +2 -0
  31. package/docs/QuestionApi.md +70 -2
  32. package/package.json +1 -1
  33. package/src/apis/QuestionApi.ts +51 -2
  34. package/src/models/ChatFeatureUsage.ts +94 -0
  35. package/src/models/GetChatUsage.ts +16 -0
  36. package/src/models/GetQuestion.ts +17 -1
  37. package/src/models/PutQuestion.ts +8 -0
  38. package/src/models/index.ts +1 -0
@@ -33,6 +33,7 @@ docs/CertificateTemplateVersion.md
33
33
  docs/ChangelogApi.md
34
34
  docs/ChatApi.md
35
35
  docs/ChatDailyUsage.md
36
+ docs/ChatFeatureUsage.md
36
37
  docs/ChatModelUsage.md
37
38
  docs/ChatQuota.md
38
39
  docs/ChatQuotaExceeded.md
@@ -388,6 +389,7 @@ src/models/CertificateRenewalPolicy.ts
388
389
  src/models/CertificateTemplate.ts
389
390
  src/models/CertificateTemplateVersion.ts
390
391
  src/models/ChatDailyUsage.ts
392
+ src/models/ChatFeatureUsage.ts
391
393
  src/models/ChatModelUsage.ts
392
394
  src/models/ChatQuota.ts
393
395
  src/models/ChatQuotaExceeded.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @easyedu/js-lsm-api@1.112.0
1
+ # @easyedu/js-lsm-api@1.114.0
2
2
 
3
3
  A TypeScript SDK client for the sbzw93t49b.execute-api.us-east-2.amazonaws.com API.
4
4
 
@@ -328,8 +328,9 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
328
328
  *QuestionApi* | [**deleteQuestion**](docs/QuestionApi.md#deletequestion) | **DELETE** /questions/{questionId} | Delete a question by ID
329
329
  *QuestionApi* | [**getQuestion**](docs/QuestionApi.md#getquestion) | **GET** /questions/{questionId} | Get a question by ID
330
330
  *QuestionApi* | [**getQuestionList**](docs/QuestionApi.md#getquestionlist) | **GET** /questions | Get list of questions with filtering and pagination
331
+ *QuestionApi* | [**getQuestionVersions**](docs/QuestionApi.md#getquestionversions) | **GET** /questions/{questionId}/versions | Get all versions of a question
331
332
  *QuestionApi* | [**postQuestion**](docs/QuestionApi.md#postquestion) | **POST** /questions | Create a new question
332
- *QuestionApi* | [**putQuestion**](docs/QuestionApi.md#putquestion) | **PUT** /questions/{questionId} | Update a question by ID
333
+ *QuestionApi* | [**putQuestion**](docs/QuestionApi.md#putquestion) | **PUT** /questions/{questionId} | Create the next version of a question
333
334
  *QuestionImportApi* | [**postQuestionImportCommit**](docs/QuestionImportApi.md#postquestionimportcommit) | **POST** /question-imports/commit | Validate and atomically create, version, or skip approved question drafts
334
335
  *QuestionImportApi* | [**postQuestionImportParse**](docs/QuestionImportApi.md#postquestionimportparse) | **POST** /question-imports/parse | Parse a question document into stateless review drafts
335
336
  *ReportingApi* | [**getCourseVersionReporting**](docs/ReportingApi.md#getcourseversionreporting) | **GET** /courses/{courseId}/versions/{courseVersionId}/reporting | Get instructor reporting for one explicit course version
@@ -407,6 +408,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
407
408
  - [CertificateTemplate](docs/CertificateTemplate.md)
408
409
  - [CertificateTemplateVersion](docs/CertificateTemplateVersion.md)
409
410
  - [ChatDailyUsage](docs/ChatDailyUsage.md)
411
+ - [ChatFeatureUsage](docs/ChatFeatureUsage.md)
410
412
  - [ChatModelUsage](docs/ChatModelUsage.md)
411
413
  - [ChatQuota](docs/ChatQuota.md)
412
414
  - [ChatQuotaExceeded](docs/ChatQuotaExceeded.md)
@@ -701,7 +703,7 @@ and is automatically generated by the
701
703
  [OpenAPI Generator](https://openapi-generator.tech) project:
702
704
 
703
705
  - API version: `1.0.0`
704
- - Package version: `1.112.0`
706
+ - Package version: `1.114.0`
705
707
  - Generator version: `7.22.0`
706
708
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
707
709
 
@@ -27,6 +27,9 @@ export interface GetQuestionListRequest {
27
27
  tagId?: string;
28
28
  search?: string;
29
29
  }
30
+ export interface GetQuestionVersionsRequest {
31
+ questionId: string;
32
+ }
30
33
  export interface PostQuestionRequest {
31
34
  postQuestion: PostQuestion;
32
35
  }
@@ -74,6 +77,18 @@ export declare class QuestionApi extends runtime.BaseAPI {
74
77
  * Get list of questions with filtering and pagination
75
78
  */
76
79
  getQuestionList(requestParameters?: GetQuestionListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetQuestionList>;
80
+ /**
81
+ * Creates request options for getQuestionVersions without sending the request
82
+ */
83
+ getQuestionVersionsRequestOpts(requestParameters: GetQuestionVersionsRequest): Promise<runtime.RequestOpts>;
84
+ /**
85
+ * Get all versions of a question
86
+ */
87
+ getQuestionVersionsRaw(requestParameters: GetQuestionVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<GetQuestion>>>;
88
+ /**
89
+ * Get all versions of a question
90
+ */
91
+ getQuestionVersions(requestParameters: GetQuestionVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<GetQuestion>>;
77
92
  /**
78
93
  * Creates request options for postQuestion without sending the request
79
94
  */
@@ -91,11 +106,11 @@ export declare class QuestionApi extends runtime.BaseAPI {
91
106
  */
92
107
  putQuestionRequestOpts(requestParameters: PutQuestionRequest): Promise<runtime.RequestOpts>;
93
108
  /**
94
- * Update a question by ID
109
+ * Create the next version of a question
95
110
  */
96
111
  putQuestionRaw(requestParameters: PutQuestionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetQuestion>>;
97
112
  /**
98
- * Update a question by ID
113
+ * Create the next version of a question
99
114
  */
100
115
  putQuestion(requestParameters: PutQuestionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetQuestion>;
101
116
  }
@@ -159,6 +159,45 @@ class QuestionApi extends runtime.BaseAPI {
159
159
  return yield response.value();
160
160
  });
161
161
  }
162
+ /**
163
+ * Creates request options for getQuestionVersions without sending the request
164
+ */
165
+ getQuestionVersionsRequestOpts(requestParameters) {
166
+ return __awaiter(this, void 0, void 0, function* () {
167
+ if (requestParameters['questionId'] == null) {
168
+ throw new runtime.RequiredError('questionId', 'Required parameter "questionId" was null or undefined when calling getQuestionVersions().');
169
+ }
170
+ const queryParameters = {};
171
+ const headerParameters = {};
172
+ let urlPath = `/questions/{questionId}/versions`;
173
+ urlPath = urlPath.replace('{questionId}', encodeURIComponent(String(requestParameters['questionId'])));
174
+ return {
175
+ path: urlPath,
176
+ method: 'GET',
177
+ headers: headerParameters,
178
+ query: queryParameters,
179
+ };
180
+ });
181
+ }
182
+ /**
183
+ * Get all versions of a question
184
+ */
185
+ getQuestionVersionsRaw(requestParameters, initOverrides) {
186
+ return __awaiter(this, void 0, void 0, function* () {
187
+ const requestOptions = yield this.getQuestionVersionsRequestOpts(requestParameters);
188
+ const response = yield this.request(requestOptions, initOverrides);
189
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(GetQuestion_1.GetQuestionFromJSON));
190
+ });
191
+ }
192
+ /**
193
+ * Get all versions of a question
194
+ */
195
+ getQuestionVersions(requestParameters, initOverrides) {
196
+ return __awaiter(this, void 0, void 0, function* () {
197
+ const response = yield this.getQuestionVersionsRaw(requestParameters, initOverrides);
198
+ return yield response.value();
199
+ });
200
+ }
162
201
  /**
163
202
  * Creates request options for postQuestion without sending the request
164
203
  */
@@ -225,7 +264,7 @@ class QuestionApi extends runtime.BaseAPI {
225
264
  });
226
265
  }
227
266
  /**
228
- * Update a question by ID
267
+ * Create the next version of a question
229
268
  */
230
269
  putQuestionRaw(requestParameters, initOverrides) {
231
270
  return __awaiter(this, void 0, void 0, function* () {
@@ -235,7 +274,7 @@ class QuestionApi extends runtime.BaseAPI {
235
274
  });
236
275
  }
237
276
  /**
238
- * Update a question by ID
277
+ * Create the next version of a question
239
278
  */
240
279
  putQuestion(requestParameters, initOverrides) {
241
280
  return __awaiter(this, void 0, void 0, function* () {
@@ -27,6 +27,9 @@ export interface GetQuestionListRequest {
27
27
  tagId?: string;
28
28
  search?: string;
29
29
  }
30
+ export interface GetQuestionVersionsRequest {
31
+ questionId: string;
32
+ }
30
33
  export interface PostQuestionRequest {
31
34
  postQuestion: PostQuestion;
32
35
  }
@@ -74,6 +77,18 @@ export declare class QuestionApi extends runtime.BaseAPI {
74
77
  * Get list of questions with filtering and pagination
75
78
  */
76
79
  getQuestionList(requestParameters?: GetQuestionListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetQuestionList>;
80
+ /**
81
+ * Creates request options for getQuestionVersions without sending the request
82
+ */
83
+ getQuestionVersionsRequestOpts(requestParameters: GetQuestionVersionsRequest): Promise<runtime.RequestOpts>;
84
+ /**
85
+ * Get all versions of a question
86
+ */
87
+ getQuestionVersionsRaw(requestParameters: GetQuestionVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<GetQuestion>>>;
88
+ /**
89
+ * Get all versions of a question
90
+ */
91
+ getQuestionVersions(requestParameters: GetQuestionVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<GetQuestion>>;
77
92
  /**
78
93
  * Creates request options for postQuestion without sending the request
79
94
  */
@@ -91,11 +106,11 @@ export declare class QuestionApi extends runtime.BaseAPI {
91
106
  */
92
107
  putQuestionRequestOpts(requestParameters: PutQuestionRequest): Promise<runtime.RequestOpts>;
93
108
  /**
94
- * Update a question by ID
109
+ * Create the next version of a question
95
110
  */
96
111
  putQuestionRaw(requestParameters: PutQuestionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetQuestion>>;
97
112
  /**
98
- * Update a question by ID
113
+ * Create the next version of a question
99
114
  */
100
115
  putQuestion(requestParameters: PutQuestionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetQuestion>;
101
116
  }
@@ -156,6 +156,45 @@ export class QuestionApi extends runtime.BaseAPI {
156
156
  return yield response.value();
157
157
  });
158
158
  }
159
+ /**
160
+ * Creates request options for getQuestionVersions without sending the request
161
+ */
162
+ getQuestionVersionsRequestOpts(requestParameters) {
163
+ return __awaiter(this, void 0, void 0, function* () {
164
+ if (requestParameters['questionId'] == null) {
165
+ throw new runtime.RequiredError('questionId', 'Required parameter "questionId" was null or undefined when calling getQuestionVersions().');
166
+ }
167
+ const queryParameters = {};
168
+ const headerParameters = {};
169
+ let urlPath = `/questions/{questionId}/versions`;
170
+ urlPath = urlPath.replace('{questionId}', encodeURIComponent(String(requestParameters['questionId'])));
171
+ return {
172
+ path: urlPath,
173
+ method: 'GET',
174
+ headers: headerParameters,
175
+ query: queryParameters,
176
+ };
177
+ });
178
+ }
179
+ /**
180
+ * Get all versions of a question
181
+ */
182
+ getQuestionVersionsRaw(requestParameters, initOverrides) {
183
+ return __awaiter(this, void 0, void 0, function* () {
184
+ const requestOptions = yield this.getQuestionVersionsRequestOpts(requestParameters);
185
+ const response = yield this.request(requestOptions, initOverrides);
186
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(GetQuestionFromJSON));
187
+ });
188
+ }
189
+ /**
190
+ * Get all versions of a question
191
+ */
192
+ getQuestionVersions(requestParameters, initOverrides) {
193
+ return __awaiter(this, void 0, void 0, function* () {
194
+ const response = yield this.getQuestionVersionsRaw(requestParameters, initOverrides);
195
+ return yield response.value();
196
+ });
197
+ }
159
198
  /**
160
199
  * Creates request options for postQuestion without sending the request
161
200
  */
@@ -222,7 +261,7 @@ export class QuestionApi extends runtime.BaseAPI {
222
261
  });
223
262
  }
224
263
  /**
225
- * Update a question by ID
264
+ * Create the next version of a question
226
265
  */
227
266
  putQuestionRaw(requestParameters, initOverrides) {
228
267
  return __awaiter(this, void 0, void 0, function* () {
@@ -232,7 +271,7 @@ export class QuestionApi extends runtime.BaseAPI {
232
271
  });
233
272
  }
234
273
  /**
235
- * Update a question by ID
274
+ * Create the next version of a question
236
275
  */
237
276
  putQuestion(requestParameters, initOverrides) {
238
277
  return __awaiter(this, void 0, void 0, function* () {
@@ -0,0 +1,47 @@
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 { ChatUsageTotals } from './ChatUsageTotals';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface ChatFeatureUsage
17
+ */
18
+ export interface ChatFeatureUsage {
19
+ /**
20
+ *
21
+ * @type {ChatFeatureUsageFeatureEnum}
22
+ * @memberof ChatFeatureUsage
23
+ */
24
+ feature: ChatFeatureUsageFeatureEnum;
25
+ /**
26
+ *
27
+ * @type {ChatUsageTotals}
28
+ * @memberof ChatFeatureUsage
29
+ */
30
+ usage: ChatUsageTotals;
31
+ }
32
+ /**
33
+ * @export
34
+ */
35
+ export declare const ChatFeatureUsageFeatureEnum: {
36
+ readonly Chat: "chat";
37
+ readonly QuestionImport: "question_import";
38
+ };
39
+ export type ChatFeatureUsageFeatureEnum = typeof ChatFeatureUsageFeatureEnum[keyof typeof ChatFeatureUsageFeatureEnum];
40
+ /**
41
+ * Check if a given object implements the ChatFeatureUsage interface.
42
+ */
43
+ export declare function instanceOfChatFeatureUsage(value: object): value is ChatFeatureUsage;
44
+ export declare function ChatFeatureUsageFromJSON(json: any): ChatFeatureUsage;
45
+ export declare function ChatFeatureUsageFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChatFeatureUsage;
46
+ export declare function ChatFeatureUsageToJSON(json: any): ChatFeatureUsage;
47
+ export declare function ChatFeatureUsageToJSONTyped(value?: ChatFeatureUsage | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,55 @@
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
+ import { ChatUsageTotalsFromJSON, ChatUsageTotalsToJSON, } from './ChatUsageTotals';
15
+ /**
16
+ * @export
17
+ */
18
+ export const ChatFeatureUsageFeatureEnum = {
19
+ Chat: 'chat',
20
+ QuestionImport: 'question_import'
21
+ };
22
+ /**
23
+ * Check if a given object implements the ChatFeatureUsage interface.
24
+ */
25
+ export function instanceOfChatFeatureUsage(value) {
26
+ if (!('feature' in value) || value['feature'] === undefined)
27
+ return false;
28
+ if (!('usage' in value) || value['usage'] === undefined)
29
+ return false;
30
+ return true;
31
+ }
32
+ export function ChatFeatureUsageFromJSON(json) {
33
+ return ChatFeatureUsageFromJSONTyped(json, false);
34
+ }
35
+ export function ChatFeatureUsageFromJSONTyped(json, ignoreDiscriminator) {
36
+ if (json == null) {
37
+ return json;
38
+ }
39
+ return {
40
+ 'feature': json['feature'],
41
+ 'usage': ChatUsageTotalsFromJSON(json['usage']),
42
+ };
43
+ }
44
+ export function ChatFeatureUsageToJSON(json) {
45
+ return ChatFeatureUsageToJSONTyped(json, false);
46
+ }
47
+ export function ChatFeatureUsageToJSONTyped(value, ignoreDiscriminator = false) {
48
+ if (value == null) {
49
+ return value;
50
+ }
51
+ return {
52
+ 'feature': value['feature'],
53
+ 'usage': ChatUsageTotalsToJSON(value['usage']),
54
+ };
55
+ }
@@ -12,6 +12,7 @@
12
12
  import type { ChatDailyUsage } from './ChatDailyUsage';
13
13
  import type { ChatModelUsage } from './ChatModelUsage';
14
14
  import type { ChatUsageTotals } from './ChatUsageTotals';
15
+ import type { ChatFeatureUsage } from './ChatFeatureUsage';
15
16
  /**
16
17
  *
17
18
  * @export
@@ -48,6 +49,12 @@ export interface GetChatUsage {
48
49
  * @memberof GetChatUsage
49
50
  */
50
51
  modelUsage: Array<ChatModelUsage>;
52
+ /**
53
+ *
54
+ * @type {Array<ChatFeatureUsage>}
55
+ * @memberof GetChatUsage
56
+ */
57
+ featureUsage: Array<ChatFeatureUsage>;
51
58
  }
52
59
  /**
53
60
  * Check if a given object implements the GetChatUsage interface.
@@ -14,6 +14,7 @@
14
14
  import { ChatDailyUsageFromJSON, ChatDailyUsageToJSON, } from './ChatDailyUsage';
15
15
  import { ChatModelUsageFromJSON, ChatModelUsageToJSON, } from './ChatModelUsage';
16
16
  import { ChatUsageTotalsFromJSON, ChatUsageTotalsToJSON, } from './ChatUsageTotals';
17
+ import { ChatFeatureUsageFromJSON, ChatFeatureUsageToJSON, } from './ChatFeatureUsage';
17
18
  /**
18
19
  * Check if a given object implements the GetChatUsage interface.
19
20
  */
@@ -28,6 +29,8 @@ export function instanceOfGetChatUsage(value) {
28
29
  return false;
29
30
  if (!('modelUsage' in value) || value['modelUsage'] === undefined)
30
31
  return false;
32
+ if (!('featureUsage' in value) || value['featureUsage'] === undefined)
33
+ return false;
31
34
  return true;
32
35
  }
33
36
  export function GetChatUsageFromJSON(json) {
@@ -43,6 +46,7 @@ export function GetChatUsageFromJSONTyped(json, ignoreDiscriminator) {
43
46
  'totals': ChatUsageTotalsFromJSON(json['totals']),
44
47
  'daily': (json['daily'].map(ChatDailyUsageFromJSON)),
45
48
  'modelUsage': (json['model_usage'].map(ChatModelUsageFromJSON)),
49
+ 'featureUsage': (json['feature_usage'].map(ChatFeatureUsageFromJSON)),
46
50
  };
47
51
  }
48
52
  export function GetChatUsageToJSON(json) {
@@ -58,5 +62,6 @@ export function GetChatUsageToJSONTyped(value, ignoreDiscriminator = false) {
58
62
  'totals': ChatUsageTotalsToJSON(value['totals']),
59
63
  'daily': (value['daily'].map(ChatDailyUsageToJSON)),
60
64
  'model_usage': (value['modelUsage'].map(ChatModelUsageToJSON)),
65
+ 'feature_usage': (value['featureUsage'].map(ChatFeatureUsageToJSON)),
61
66
  };
62
67
  }
@@ -74,6 +74,18 @@ export interface GetQuestion {
74
74
  * @memberof GetQuestion
75
75
  */
76
76
  readonly versionNumber: number;
77
+ /**
78
+ * Whether this is the current editable version in the question history
79
+ * @type {boolean}
80
+ * @memberof GetQuestion
81
+ */
82
+ readonly isLatestVersion: boolean;
83
+ /**
84
+ * Optional note describing why this version was created
85
+ * @type {string}
86
+ * @memberof GetQuestion
87
+ */
88
+ versionCreatedReason?: string;
77
89
  /**
78
90
  * When the question was created
79
91
  * @type {Date}
@@ -130,4 +142,4 @@ export declare function instanceOfGetQuestion(value: object): value is GetQuesti
130
142
  export declare function GetQuestionFromJSON(json: any): GetQuestion;
131
143
  export declare function GetQuestionFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetQuestion;
132
144
  export declare function GetQuestionToJSON(json: any): GetQuestion;
133
- export declare function GetQuestionToJSONTyped(value?: Omit<GetQuestion, 'id' | 'version_number' | 'created_date' | 'updated_date' | 'created_by' | 'quiz_count' | 'quizzes'> | null, ignoreDiscriminator?: boolean): any;
145
+ export declare function GetQuestionToJSONTyped(value?: Omit<GetQuestion, 'id' | 'version_number' | 'is_latest_version' | 'created_date' | 'updated_date' | 'created_by' | 'quiz_count' | 'quizzes'> | null, ignoreDiscriminator?: boolean): any;
@@ -39,6 +39,8 @@ export function instanceOfGetQuestion(value) {
39
39
  return false;
40
40
  if (!('versionNumber' in value) || value['versionNumber'] === undefined)
41
41
  return false;
42
+ if (!('isLatestVersion' in value) || value['isLatestVersion'] === undefined)
43
+ return false;
42
44
  if (!('createdDate' in value) || value['createdDate'] === undefined)
43
45
  return false;
44
46
  if (!('updatedDate' in value) || value['updatedDate'] === undefined)
@@ -62,6 +64,8 @@ export function GetQuestionFromJSONTyped(json, ignoreDiscriminator) {
62
64
  'tags': json['tags'] == null ? undefined : (json['tags'].map(ContentLibraryTagFromJSON)),
63
65
  'version': json['version'] == null ? undefined : json['version'],
64
66
  'versionNumber': json['version_number'],
67
+ 'isLatestVersion': json['is_latest_version'],
68
+ 'versionCreatedReason': json['version_created_reason'] == null ? undefined : json['version_created_reason'],
65
69
  'createdDate': (new Date(json['created_date'])),
66
70
  'updatedDate': (new Date(json['updated_date'])),
67
71
  'createdBy': json['created_by'] == null ? undefined : json['created_by'],
@@ -85,6 +89,7 @@ export function GetQuestionToJSONTyped(value, ignoreDiscriminator = false) {
85
89
  'explanation': RichTextDocumentToJSON(value['explanation']),
86
90
  'tags': value['tags'] == null ? undefined : (value['tags'].map(ContentLibraryTagToJSON)),
87
91
  'version': value['version'],
92
+ 'version_created_reason': value['versionCreatedReason'],
88
93
  'import_source': QuestionImportSourceSummaryToJSON(value['importSource']),
89
94
  };
90
95
  }
@@ -59,6 +59,12 @@ export interface PutQuestion {
59
59
  * @memberof PutQuestion
60
60
  */
61
61
  version?: string;
62
+ /**
63
+ * Optional note describing the changes in the new version
64
+ * @type {string}
65
+ * @memberof PutQuestion
66
+ */
67
+ versionReason?: string;
62
68
  }
63
69
  /**
64
70
  * @export
@@ -45,6 +45,7 @@ export function PutQuestionFromJSONTyped(json, ignoreDiscriminator) {
45
45
  'explanation': json['explanation'] == null ? undefined : RichTextInputFromJSON(json['explanation']),
46
46
  'tags': json['tags'] == null ? undefined : json['tags'],
47
47
  'version': json['version'] == null ? undefined : json['version'],
48
+ 'versionReason': json['version_reason'] == null ? undefined : json['version_reason'],
48
49
  };
49
50
  }
50
51
  export function PutQuestionToJSON(json) {
@@ -62,5 +63,6 @@ export function PutQuestionToJSONTyped(value, ignoreDiscriminator = false) {
62
63
  'explanation': RichTextInputToJSON(value['explanation']),
63
64
  'tags': value['tags'],
64
65
  'version': value['version'],
66
+ 'version_reason': value['versionReason'],
65
67
  };
66
68
  }
@@ -25,6 +25,7 @@ export * from './CertificateRenewalPolicy';
25
25
  export * from './CertificateTemplate';
26
26
  export * from './CertificateTemplateVersion';
27
27
  export * from './ChatDailyUsage';
28
+ export * from './ChatFeatureUsage';
28
29
  export * from './ChatModelUsage';
29
30
  export * from './ChatQuota';
30
31
  export * from './ChatQuotaExceeded';
@@ -27,6 +27,7 @@ export * from './CertificateRenewalPolicy';
27
27
  export * from './CertificateTemplate';
28
28
  export * from './CertificateTemplateVersion';
29
29
  export * from './ChatDailyUsage';
30
+ export * from './ChatFeatureUsage';
30
31
  export * from './ChatModelUsage';
31
32
  export * from './ChatQuota';
32
33
  export * from './ChatQuotaExceeded';
@@ -0,0 +1,47 @@
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 { ChatUsageTotals } from './ChatUsageTotals';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface ChatFeatureUsage
17
+ */
18
+ export interface ChatFeatureUsage {
19
+ /**
20
+ *
21
+ * @type {ChatFeatureUsageFeatureEnum}
22
+ * @memberof ChatFeatureUsage
23
+ */
24
+ feature: ChatFeatureUsageFeatureEnum;
25
+ /**
26
+ *
27
+ * @type {ChatUsageTotals}
28
+ * @memberof ChatFeatureUsage
29
+ */
30
+ usage: ChatUsageTotals;
31
+ }
32
+ /**
33
+ * @export
34
+ */
35
+ export declare const ChatFeatureUsageFeatureEnum: {
36
+ readonly Chat: "chat";
37
+ readonly QuestionImport: "question_import";
38
+ };
39
+ export type ChatFeatureUsageFeatureEnum = typeof ChatFeatureUsageFeatureEnum[keyof typeof ChatFeatureUsageFeatureEnum];
40
+ /**
41
+ * Check if a given object implements the ChatFeatureUsage interface.
42
+ */
43
+ export declare function instanceOfChatFeatureUsage(value: object): value is ChatFeatureUsage;
44
+ export declare function ChatFeatureUsageFromJSON(json: any): ChatFeatureUsage;
45
+ export declare function ChatFeatureUsageFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChatFeatureUsage;
46
+ export declare function ChatFeatureUsageToJSON(json: any): ChatFeatureUsage;
47
+ export declare function ChatFeatureUsageToJSONTyped(value?: ChatFeatureUsage | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,63 @@
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.ChatFeatureUsageFeatureEnum = void 0;
17
+ exports.instanceOfChatFeatureUsage = instanceOfChatFeatureUsage;
18
+ exports.ChatFeatureUsageFromJSON = ChatFeatureUsageFromJSON;
19
+ exports.ChatFeatureUsageFromJSONTyped = ChatFeatureUsageFromJSONTyped;
20
+ exports.ChatFeatureUsageToJSON = ChatFeatureUsageToJSON;
21
+ exports.ChatFeatureUsageToJSONTyped = ChatFeatureUsageToJSONTyped;
22
+ const ChatUsageTotals_1 = require("./ChatUsageTotals");
23
+ /**
24
+ * @export
25
+ */
26
+ exports.ChatFeatureUsageFeatureEnum = {
27
+ Chat: 'chat',
28
+ QuestionImport: 'question_import'
29
+ };
30
+ /**
31
+ * Check if a given object implements the ChatFeatureUsage interface.
32
+ */
33
+ function instanceOfChatFeatureUsage(value) {
34
+ if (!('feature' in value) || value['feature'] === undefined)
35
+ return false;
36
+ if (!('usage' in value) || value['usage'] === undefined)
37
+ return false;
38
+ return true;
39
+ }
40
+ function ChatFeatureUsageFromJSON(json) {
41
+ return ChatFeatureUsageFromJSONTyped(json, false);
42
+ }
43
+ function ChatFeatureUsageFromJSONTyped(json, ignoreDiscriminator) {
44
+ if (json == null) {
45
+ return json;
46
+ }
47
+ return {
48
+ 'feature': json['feature'],
49
+ 'usage': (0, ChatUsageTotals_1.ChatUsageTotalsFromJSON)(json['usage']),
50
+ };
51
+ }
52
+ function ChatFeatureUsageToJSON(json) {
53
+ return ChatFeatureUsageToJSONTyped(json, false);
54
+ }
55
+ function ChatFeatureUsageToJSONTyped(value, ignoreDiscriminator = false) {
56
+ if (value == null) {
57
+ return value;
58
+ }
59
+ return {
60
+ 'feature': value['feature'],
61
+ 'usage': (0, ChatUsageTotals_1.ChatUsageTotalsToJSON)(value['usage']),
62
+ };
63
+ }
@@ -12,6 +12,7 @@
12
12
  import type { ChatDailyUsage } from './ChatDailyUsage';
13
13
  import type { ChatModelUsage } from './ChatModelUsage';
14
14
  import type { ChatUsageTotals } from './ChatUsageTotals';
15
+ import type { ChatFeatureUsage } from './ChatFeatureUsage';
15
16
  /**
16
17
  *
17
18
  * @export
@@ -48,6 +49,12 @@ export interface GetChatUsage {
48
49
  * @memberof GetChatUsage
49
50
  */
50
51
  modelUsage: Array<ChatModelUsage>;
52
+ /**
53
+ *
54
+ * @type {Array<ChatFeatureUsage>}
55
+ * @memberof GetChatUsage
56
+ */
57
+ featureUsage: Array<ChatFeatureUsage>;
51
58
  }
52
59
  /**
53
60
  * Check if a given object implements the GetChatUsage interface.