@easyedu/js-lsm-api 1.41.0 → 1.43.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.
- package/.openapi-generator/FILES +22 -0
- package/README.md +23 -2
- package/dist/apis/CourseApi.d.ts +32 -1
- package/dist/apis/CourseApi.js +99 -0
- package/dist/apis/SupportTicketApi.d.ts +191 -0
- package/dist/apis/SupportTicketApi.js +457 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/CourseApi.d.ts +32 -1
- package/dist/esm/apis/CourseApi.js +100 -1
- package/dist/esm/apis/SupportTicketApi.d.ts +191 -0
- package/dist/esm/apis/SupportTicketApi.js +453 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/DownloadSupportTicketAttachment200Response.d.ts +32 -0
- package/dist/esm/models/DownloadSupportTicketAttachment200Response.js +43 -0
- package/dist/esm/models/GetCourseImageUpload.d.ts +32 -0
- package/dist/esm/models/GetCourseImageUpload.js +43 -0
- package/dist/esm/models/GetSupportTicket.d.ts +142 -0
- package/dist/esm/models/GetSupportTicket.js +120 -0
- package/dist/esm/models/GetSupportTicketAttachment.d.ts +62 -0
- package/dist/esm/models/GetSupportTicketAttachment.js +63 -0
- package/dist/esm/models/GetSupportTicketComment.d.ts +57 -0
- package/dist/esm/models/GetSupportTicketComment.js +60 -0
- package/dist/esm/models/GetSupportTicketList.d.ts +57 -0
- package/dist/esm/models/GetSupportTicketList.js +60 -0
- package/dist/esm/models/PostSupportTicket.d.ts +71 -0
- package/dist/esm/models/PostSupportTicket.js +74 -0
- package/dist/esm/models/PostSupportTicketComment.d.ts +38 -0
- package/dist/esm/models/PostSupportTicketComment.js +45 -0
- package/dist/esm/models/PutCourse.d.ts +0 -6
- package/dist/esm/models/PutCourse.js +0 -2
- package/dist/esm/models/PutSupportTicket.d.ts +63 -0
- package/dist/esm/models/PutSupportTicket.js +62 -0
- package/dist/esm/models/SupportTicketUser.d.ts +50 -0
- package/dist/esm/models/SupportTicketUser.js +55 -0
- package/dist/esm/models/index.d.ts +10 -0
- package/dist/esm/models/index.js +10 -0
- package/dist/models/DownloadSupportTicketAttachment200Response.d.ts +32 -0
- package/dist/models/DownloadSupportTicketAttachment200Response.js +50 -0
- package/dist/models/GetCourseImageUpload.d.ts +32 -0
- package/dist/models/GetCourseImageUpload.js +50 -0
- package/dist/models/GetSupportTicket.d.ts +142 -0
- package/dist/models/GetSupportTicket.js +128 -0
- package/dist/models/GetSupportTicketAttachment.d.ts +62 -0
- package/dist/models/GetSupportTicketAttachment.js +70 -0
- package/dist/models/GetSupportTicketComment.d.ts +57 -0
- package/dist/models/GetSupportTicketComment.js +67 -0
- package/dist/models/GetSupportTicketList.d.ts +57 -0
- package/dist/models/GetSupportTicketList.js +67 -0
- package/dist/models/PostSupportTicket.d.ts +71 -0
- package/dist/models/PostSupportTicket.js +82 -0
- package/dist/models/PostSupportTicketComment.d.ts +38 -0
- package/dist/models/PostSupportTicketComment.js +52 -0
- package/dist/models/PutCourse.d.ts +0 -6
- package/dist/models/PutCourse.js +0 -2
- package/dist/models/PutSupportTicket.d.ts +63 -0
- package/dist/models/PutSupportTicket.js +70 -0
- package/dist/models/SupportTicketUser.d.ts +50 -0
- package/dist/models/SupportTicketUser.js +62 -0
- package/dist/models/index.d.ts +10 -0
- package/dist/models/index.js +10 -0
- package/docs/CourseApi.md +138 -0
- package/docs/DownloadSupportTicketAttachment200Response.md +34 -0
- package/docs/GetCourseImageUpload.md +34 -0
- package/docs/GetSupportTicket.md +60 -0
- package/docs/GetSupportTicketAttachment.md +44 -0
- package/docs/GetSupportTicketComment.md +42 -0
- package/docs/GetSupportTicketList.md +42 -0
- package/docs/PostSupportTicket.md +40 -0
- package/docs/PostSupportTicketComment.md +36 -0
- package/docs/PutCourse.md +0 -2
- package/docs/PutSupportTicket.md +38 -0
- package/docs/SupportTicketApi.md +651 -0
- package/docs/SupportTicketUser.md +40 -0
- package/package.json +1 -1
- package/src/apis/CourseApi.ts +129 -0
- package/src/apis/SupportTicketApi.ts +599 -0
- package/src/apis/index.ts +1 -0
- package/src/models/DownloadSupportTicketAttachment200Response.ts +66 -0
- package/src/models/GetCourseImageUpload.ts +66 -0
- package/src/models/GetSupportTicket.ts +231 -0
- package/src/models/GetSupportTicketAttachment.ts +111 -0
- package/src/models/GetSupportTicketComment.ts +110 -0
- package/src/models/GetSupportTicketList.ts +110 -0
- package/src/models/PostSupportTicket.ts +118 -0
- package/src/models/PostSupportTicketComment.ts +74 -0
- package/src/models/PutCourse.ts +0 -8
- package/src/models/PutSupportTicket.ts +104 -0
- package/src/models/SupportTicketUser.ts +93 -0
- package/src/models/index.ts +10 -0
package/package.json
CHANGED
package/src/apis/CourseApi.ts
CHANGED
|
@@ -20,6 +20,7 @@ import type {
|
|
|
20
20
|
GetCourseEnrollmentList,
|
|
21
21
|
GetCourseExport,
|
|
22
22
|
GetCourseExportList,
|
|
23
|
+
GetCourseImageUpload,
|
|
23
24
|
GetCourseList,
|
|
24
25
|
GetCourseReportingBasic,
|
|
25
26
|
PostCourse,
|
|
@@ -39,6 +40,8 @@ import {
|
|
|
39
40
|
GetCourseExportToJSON,
|
|
40
41
|
GetCourseExportListFromJSON,
|
|
41
42
|
GetCourseExportListToJSON,
|
|
43
|
+
GetCourseImageUploadFromJSON,
|
|
44
|
+
GetCourseImageUploadToJSON,
|
|
42
45
|
GetCourseListFromJSON,
|
|
43
46
|
GetCourseListToJSON,
|
|
44
47
|
GetCourseReportingBasicFromJSON,
|
|
@@ -55,6 +58,10 @@ import {
|
|
|
55
58
|
PutCourseEnrollmentToJSON,
|
|
56
59
|
} from '../models/index';
|
|
57
60
|
|
|
61
|
+
export interface DeleteCourseImageRequest {
|
|
62
|
+
courseId: string;
|
|
63
|
+
}
|
|
64
|
+
|
|
58
65
|
export interface GetCourseRequest {
|
|
59
66
|
courseId: string;
|
|
60
67
|
}
|
|
@@ -104,6 +111,11 @@ export interface PostCourseExportRequest {
|
|
|
104
111
|
postCourseExport: PostCourseExport;
|
|
105
112
|
}
|
|
106
113
|
|
|
114
|
+
export interface PostCourseImageUploadRequest {
|
|
115
|
+
courseId: string;
|
|
116
|
+
file: Blob;
|
|
117
|
+
}
|
|
118
|
+
|
|
107
119
|
export interface PutCourseRequest {
|
|
108
120
|
courseId: string;
|
|
109
121
|
putCourse: Omit<PutCourse, 'id'>;
|
|
@@ -120,6 +132,50 @@ export interface PutCourseEnrollmentRequest {
|
|
|
120
132
|
*/
|
|
121
133
|
export class CourseApi extends runtime.BaseAPI {
|
|
122
134
|
|
|
135
|
+
/**
|
|
136
|
+
* Creates request options for deleteCourseImage without sending the request
|
|
137
|
+
*/
|
|
138
|
+
async deleteCourseImageRequestOpts(requestParameters: DeleteCourseImageRequest): Promise<runtime.RequestOpts> {
|
|
139
|
+
if (requestParameters['courseId'] == null) {
|
|
140
|
+
throw new runtime.RequiredError(
|
|
141
|
+
'courseId',
|
|
142
|
+
'Required parameter "courseId" was null or undefined when calling deleteCourseImage().'
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
const queryParameters: any = {};
|
|
147
|
+
|
|
148
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
let urlPath = `/courses/{courseId}/image`;
|
|
152
|
+
urlPath = urlPath.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId'])));
|
|
153
|
+
|
|
154
|
+
return {
|
|
155
|
+
path: urlPath,
|
|
156
|
+
method: 'DELETE',
|
|
157
|
+
headers: headerParameters,
|
|
158
|
+
query: queryParameters,
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Remove the course image
|
|
164
|
+
*/
|
|
165
|
+
async deleteCourseImageRaw(requestParameters: DeleteCourseImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
166
|
+
const requestOptions = await this.deleteCourseImageRequestOpts(requestParameters);
|
|
167
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
168
|
+
|
|
169
|
+
return new runtime.VoidApiResponse(response);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Remove the course image
|
|
174
|
+
*/
|
|
175
|
+
async deleteCourseImage(requestParameters: DeleteCourseImageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
176
|
+
await this.deleteCourseImageRaw(requestParameters, initOverrides);
|
|
177
|
+
}
|
|
178
|
+
|
|
123
179
|
/**
|
|
124
180
|
* Creates request options for getCourse without sending the request
|
|
125
181
|
*/
|
|
@@ -626,6 +682,79 @@ export class CourseApi extends runtime.BaseAPI {
|
|
|
626
682
|
return await response.value();
|
|
627
683
|
}
|
|
628
684
|
|
|
685
|
+
/**
|
|
686
|
+
* Creates request options for postCourseImageUpload without sending the request
|
|
687
|
+
*/
|
|
688
|
+
async postCourseImageUploadRequestOpts(requestParameters: PostCourseImageUploadRequest): Promise<runtime.RequestOpts> {
|
|
689
|
+
if (requestParameters['courseId'] == null) {
|
|
690
|
+
throw new runtime.RequiredError(
|
|
691
|
+
'courseId',
|
|
692
|
+
'Required parameter "courseId" was null or undefined when calling postCourseImageUpload().'
|
|
693
|
+
);
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
if (requestParameters['file'] == null) {
|
|
697
|
+
throw new runtime.RequiredError(
|
|
698
|
+
'file',
|
|
699
|
+
'Required parameter "file" was null or undefined when calling postCourseImageUpload().'
|
|
700
|
+
);
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
const queryParameters: any = {};
|
|
704
|
+
|
|
705
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
706
|
+
|
|
707
|
+
const consumes: runtime.Consume[] = [
|
|
708
|
+
{ contentType: 'multipart/form-data' },
|
|
709
|
+
];
|
|
710
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
711
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
712
|
+
|
|
713
|
+
let formParams: { append(param: string, value: any): any };
|
|
714
|
+
let useForm = false;
|
|
715
|
+
// use FormData to transmit files using content-type "multipart/form-data"
|
|
716
|
+
useForm = canConsumeForm;
|
|
717
|
+
if (useForm) {
|
|
718
|
+
formParams = new FormData();
|
|
719
|
+
} else {
|
|
720
|
+
formParams = new URLSearchParams();
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
if (requestParameters['file'] != null) {
|
|
724
|
+
formParams.append('file', requestParameters['file'] as any);
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
|
|
728
|
+
let urlPath = `/courses/{courseId}/image`;
|
|
729
|
+
urlPath = urlPath.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId'])));
|
|
730
|
+
|
|
731
|
+
return {
|
|
732
|
+
path: urlPath,
|
|
733
|
+
method: 'POST',
|
|
734
|
+
headers: headerParameters,
|
|
735
|
+
query: queryParameters,
|
|
736
|
+
body: formParams,
|
|
737
|
+
};
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
/**
|
|
741
|
+
* Upload a course image
|
|
742
|
+
*/
|
|
743
|
+
async postCourseImageUploadRaw(requestParameters: PostCourseImageUploadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetCourseImageUpload>> {
|
|
744
|
+
const requestOptions = await this.postCourseImageUploadRequestOpts(requestParameters);
|
|
745
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
746
|
+
|
|
747
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetCourseImageUploadFromJSON(jsonValue));
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
/**
|
|
751
|
+
* Upload a course image
|
|
752
|
+
*/
|
|
753
|
+
async postCourseImageUpload(requestParameters: PostCourseImageUploadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetCourseImageUpload> {
|
|
754
|
+
const response = await this.postCourseImageUploadRaw(requestParameters, initOverrides);
|
|
755
|
+
return await response.value();
|
|
756
|
+
}
|
|
757
|
+
|
|
629
758
|
/**
|
|
630
759
|
* Creates request options for putCourse without sending the request
|
|
631
760
|
*/
|