@easyedu/js-lsm-api 1.50.0 → 1.52.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 +26 -0
- package/README.md +29 -2
- package/dist/apis/CourseCatalogApi.d.ts +123 -0
- package/dist/apis/CourseCatalogApi.js +313 -0
- package/dist/apis/CourseShareApi.d.ts +153 -0
- package/dist/apis/CourseShareApi.js +385 -0
- package/dist/apis/PortalSublicenseApi.d.ts +36 -0
- package/dist/apis/PortalSublicenseApi.js +79 -0
- package/dist/apis/index.d.ts +3 -0
- package/dist/apis/index.js +3 -0
- package/dist/esm/apis/CourseCatalogApi.d.ts +123 -0
- package/dist/esm/apis/CourseCatalogApi.js +309 -0
- package/dist/esm/apis/CourseShareApi.d.ts +153 -0
- package/dist/esm/apis/CourseShareApi.js +381 -0
- package/dist/esm/apis/PortalSublicenseApi.d.ts +36 -0
- package/dist/esm/apis/PortalSublicenseApi.js +75 -0
- package/dist/esm/apis/index.d.ts +3 -0
- package/dist/esm/apis/index.js +3 -0
- package/dist/esm/models/CourseCatalog.d.ts +44 -0
- package/dist/esm/models/CourseCatalog.js +51 -0
- package/dist/esm/models/CourseShare.d.ts +88 -0
- package/dist/esm/models/CourseShare.js +85 -0
- package/dist/esm/models/PortalSublicense.d.ts +65 -0
- package/dist/esm/models/PortalSublicense.js +61 -0
- package/dist/esm/models/PostCourseCatalog.d.ts +38 -0
- package/dist/esm/models/PostCourseCatalog.js +45 -0
- package/dist/esm/models/PostOfferCatalog.d.ts +59 -0
- package/dist/esm/models/PostOfferCatalog.js +59 -0
- package/dist/esm/models/PostOfferCatalogResponse.d.ts +32 -0
- package/dist/esm/models/PostOfferCatalogResponse.js +43 -0
- package/dist/esm/models/PostOfferCourse.d.ts +59 -0
- package/dist/esm/models/PostOfferCourse.js +59 -0
- package/dist/esm/models/PostOfferCourseResponse.d.ts +49 -0
- package/dist/esm/models/PostOfferCourseResponse.js +57 -0
- package/dist/esm/models/PutCourseCatalog.d.ts +38 -0
- package/dist/esm/models/PutCourseCatalog.js +43 -0
- package/dist/esm/models/PutPortalSublicense.d.ts +46 -0
- package/dist/esm/models/PutPortalSublicense.js +45 -0
- package/dist/esm/models/index.d.ts +10 -0
- package/dist/esm/models/index.js +10 -0
- package/dist/models/CourseCatalog.d.ts +44 -0
- package/dist/models/CourseCatalog.js +58 -0
- package/dist/models/CourseShare.d.ts +88 -0
- package/dist/models/CourseShare.js +93 -0
- package/dist/models/PortalSublicense.d.ts +65 -0
- package/dist/models/PortalSublicense.js +69 -0
- package/dist/models/PostCourseCatalog.d.ts +38 -0
- package/dist/models/PostCourseCatalog.js +52 -0
- package/dist/models/PostOfferCatalog.d.ts +59 -0
- package/dist/models/PostOfferCatalog.js +67 -0
- package/dist/models/PostOfferCatalogResponse.d.ts +32 -0
- package/dist/models/PostOfferCatalogResponse.js +50 -0
- package/dist/models/PostOfferCourse.d.ts +59 -0
- package/dist/models/PostOfferCourse.js +67 -0
- package/dist/models/PostOfferCourseResponse.d.ts +49 -0
- package/dist/models/PostOfferCourseResponse.js +65 -0
- package/dist/models/PutCourseCatalog.d.ts +38 -0
- package/dist/models/PutCourseCatalog.js +50 -0
- package/dist/models/PutPortalSublicense.d.ts +46 -0
- package/dist/models/PutPortalSublicense.js +52 -0
- package/dist/models/index.d.ts +10 -0
- package/dist/models/index.js +10 -0
- package/docs/CourseCatalog.md +38 -0
- package/docs/CourseCatalogApi.md +476 -0
- package/docs/CourseShare.md +46 -0
- package/docs/CourseShareApi.md +609 -0
- package/docs/PortalSublicense.md +42 -0
- package/docs/PortalSublicenseApi.md +81 -0
- package/docs/PostCourseCatalog.md +36 -0
- package/docs/PostOfferCatalog.md +40 -0
- package/docs/PostOfferCatalogResponse.md +34 -0
- package/docs/PostOfferCourse.md +40 -0
- package/docs/PostOfferCourseResponse.md +36 -0
- package/docs/PutCourseCatalog.md +36 -0
- package/docs/PutPortalSublicense.md +39 -0
- package/package.json +1 -1
- package/src/apis/CourseCatalogApi.ts +395 -0
- package/src/apis/CourseShareApi.ts +480 -0
- package/src/apis/PortalSublicenseApi.ts +95 -0
- package/src/apis/index.ts +3 -0
- package/src/models/CourseCatalog.ts +84 -0
- package/src/models/CourseShare.ts +144 -0
- package/src/models/PortalSublicense.ts +111 -0
- package/src/models/PostCourseCatalog.ts +74 -0
- package/src/models/PostOfferCatalog.ts +103 -0
- package/src/models/PostOfferCatalogResponse.ts +66 -0
- package/src/models/PostOfferCourse.ts +103 -0
- package/src/models/PostOfferCourseResponse.ts +89 -0
- package/src/models/PutCourseCatalog.ts +73 -0
- package/src/models/PutPortalSublicense.ts +83 -0
- package/src/models/index.ts +10 -0
|
@@ -0,0 +1,395 @@
|
|
|
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
|
+
import * as runtime from '../runtime';
|
|
17
|
+
import type {
|
|
18
|
+
CourseCatalog,
|
|
19
|
+
PostCourseCatalog,
|
|
20
|
+
PutCourseCatalog,
|
|
21
|
+
} from '../models/index';
|
|
22
|
+
import {
|
|
23
|
+
CourseCatalogFromJSON,
|
|
24
|
+
CourseCatalogToJSON,
|
|
25
|
+
PostCourseCatalogFromJSON,
|
|
26
|
+
PostCourseCatalogToJSON,
|
|
27
|
+
PutCourseCatalogFromJSON,
|
|
28
|
+
PutCourseCatalogToJSON,
|
|
29
|
+
} from '../models/index';
|
|
30
|
+
|
|
31
|
+
export interface AddCourseToCatalogRequest {
|
|
32
|
+
catalogId: string;
|
|
33
|
+
courseId: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface DeleteCourseCatalogRequest {
|
|
37
|
+
catalogId: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface GetCourseCatalogRequest {
|
|
41
|
+
catalogId: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface PostCourseCatalogRequest {
|
|
45
|
+
postCourseCatalog: PostCourseCatalog;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface PutCourseCatalogRequest {
|
|
49
|
+
catalogId: string;
|
|
50
|
+
putCourseCatalog: PutCourseCatalog;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface RemoveCourseFromCatalogRequest {
|
|
54
|
+
catalogId: string;
|
|
55
|
+
courseId: string;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
*/
|
|
61
|
+
export class CourseCatalogApi extends runtime.BaseAPI {
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Creates request options for addCourseToCatalog without sending the request
|
|
65
|
+
*/
|
|
66
|
+
async addCourseToCatalogRequestOpts(requestParameters: AddCourseToCatalogRequest): Promise<runtime.RequestOpts> {
|
|
67
|
+
if (requestParameters['catalogId'] == null) {
|
|
68
|
+
throw new runtime.RequiredError(
|
|
69
|
+
'catalogId',
|
|
70
|
+
'Required parameter "catalogId" was null or undefined when calling addCourseToCatalog().'
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (requestParameters['courseId'] == null) {
|
|
75
|
+
throw new runtime.RequiredError(
|
|
76
|
+
'courseId',
|
|
77
|
+
'Required parameter "courseId" was null or undefined when calling addCourseToCatalog().'
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const queryParameters: any = {};
|
|
82
|
+
|
|
83
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
let urlPath = `/catalogs/{catalogId}/courses/{courseId}`;
|
|
87
|
+
urlPath = urlPath.replace(`{${"catalogId"}}`, encodeURIComponent(String(requestParameters['catalogId'])));
|
|
88
|
+
urlPath = urlPath.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId'])));
|
|
89
|
+
|
|
90
|
+
return {
|
|
91
|
+
path: urlPath,
|
|
92
|
+
method: 'POST',
|
|
93
|
+
headers: headerParameters,
|
|
94
|
+
query: queryParameters,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Add a course to a catalog
|
|
100
|
+
*/
|
|
101
|
+
async addCourseToCatalogRaw(requestParameters: AddCourseToCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
102
|
+
const requestOptions = await this.addCourseToCatalogRequestOpts(requestParameters);
|
|
103
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
104
|
+
|
|
105
|
+
return new runtime.VoidApiResponse(response);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Add a course to a catalog
|
|
110
|
+
*/
|
|
111
|
+
async addCourseToCatalog(requestParameters: AddCourseToCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
112
|
+
await this.addCourseToCatalogRaw(requestParameters, initOverrides);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Creates request options for deleteCourseCatalog without sending the request
|
|
117
|
+
*/
|
|
118
|
+
async deleteCourseCatalogRequestOpts(requestParameters: DeleteCourseCatalogRequest): Promise<runtime.RequestOpts> {
|
|
119
|
+
if (requestParameters['catalogId'] == null) {
|
|
120
|
+
throw new runtime.RequiredError(
|
|
121
|
+
'catalogId',
|
|
122
|
+
'Required parameter "catalogId" was null or undefined when calling deleteCourseCatalog().'
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
const queryParameters: any = {};
|
|
127
|
+
|
|
128
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
let urlPath = `/catalogs/{catalogId}`;
|
|
132
|
+
urlPath = urlPath.replace(`{${"catalogId"}}`, encodeURIComponent(String(requestParameters['catalogId'])));
|
|
133
|
+
|
|
134
|
+
return {
|
|
135
|
+
path: urlPath,
|
|
136
|
+
method: 'DELETE',
|
|
137
|
+
headers: headerParameters,
|
|
138
|
+
query: queryParameters,
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Delete a catalog
|
|
144
|
+
*/
|
|
145
|
+
async deleteCourseCatalogRaw(requestParameters: DeleteCourseCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
146
|
+
const requestOptions = await this.deleteCourseCatalogRequestOpts(requestParameters);
|
|
147
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
148
|
+
|
|
149
|
+
return new runtime.VoidApiResponse(response);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Delete a catalog
|
|
154
|
+
*/
|
|
155
|
+
async deleteCourseCatalog(requestParameters: DeleteCourseCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
156
|
+
await this.deleteCourseCatalogRaw(requestParameters, initOverrides);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Creates request options for getCourseCatalog without sending the request
|
|
161
|
+
*/
|
|
162
|
+
async getCourseCatalogRequestOpts(requestParameters: GetCourseCatalogRequest): Promise<runtime.RequestOpts> {
|
|
163
|
+
if (requestParameters['catalogId'] == null) {
|
|
164
|
+
throw new runtime.RequiredError(
|
|
165
|
+
'catalogId',
|
|
166
|
+
'Required parameter "catalogId" was null or undefined when calling getCourseCatalog().'
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
const queryParameters: any = {};
|
|
171
|
+
|
|
172
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
let urlPath = `/catalogs/{catalogId}`;
|
|
176
|
+
urlPath = urlPath.replace(`{${"catalogId"}}`, encodeURIComponent(String(requestParameters['catalogId'])));
|
|
177
|
+
|
|
178
|
+
return {
|
|
179
|
+
path: urlPath,
|
|
180
|
+
method: 'GET',
|
|
181
|
+
headers: headerParameters,
|
|
182
|
+
query: queryParameters,
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Get a catalog
|
|
188
|
+
*/
|
|
189
|
+
async getCourseCatalogRaw(requestParameters: GetCourseCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CourseCatalog>> {
|
|
190
|
+
const requestOptions = await this.getCourseCatalogRequestOpts(requestParameters);
|
|
191
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
192
|
+
|
|
193
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CourseCatalogFromJSON(jsonValue));
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Get a catalog
|
|
198
|
+
*/
|
|
199
|
+
async getCourseCatalog(requestParameters: GetCourseCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CourseCatalog> {
|
|
200
|
+
const response = await this.getCourseCatalogRaw(requestParameters, initOverrides);
|
|
201
|
+
return await response.value();
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Creates request options for getCourseCatalogs without sending the request
|
|
206
|
+
*/
|
|
207
|
+
async getCourseCatalogsRequestOpts(): Promise<runtime.RequestOpts> {
|
|
208
|
+
const queryParameters: any = {};
|
|
209
|
+
|
|
210
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
let urlPath = `/catalogs`;
|
|
214
|
+
|
|
215
|
+
return {
|
|
216
|
+
path: urlPath,
|
|
217
|
+
method: 'GET',
|
|
218
|
+
headers: headerParameters,
|
|
219
|
+
query: queryParameters,
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* List catalogs in the current portal
|
|
225
|
+
*/
|
|
226
|
+
async getCourseCatalogsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<CourseCatalog>>> {
|
|
227
|
+
const requestOptions = await this.getCourseCatalogsRequestOpts();
|
|
228
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
229
|
+
|
|
230
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(CourseCatalogFromJSON));
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* List catalogs in the current portal
|
|
235
|
+
*/
|
|
236
|
+
async getCourseCatalogs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<CourseCatalog>> {
|
|
237
|
+
const response = await this.getCourseCatalogsRaw(initOverrides);
|
|
238
|
+
return await response.value();
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Creates request options for postCourseCatalog without sending the request
|
|
243
|
+
*/
|
|
244
|
+
async postCourseCatalogRequestOpts(requestParameters: PostCourseCatalogRequest): Promise<runtime.RequestOpts> {
|
|
245
|
+
if (requestParameters['postCourseCatalog'] == null) {
|
|
246
|
+
throw new runtime.RequiredError(
|
|
247
|
+
'postCourseCatalog',
|
|
248
|
+
'Required parameter "postCourseCatalog" was null or undefined when calling postCourseCatalog().'
|
|
249
|
+
);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
const queryParameters: any = {};
|
|
253
|
+
|
|
254
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
255
|
+
|
|
256
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
let urlPath = `/catalogs`;
|
|
260
|
+
|
|
261
|
+
return {
|
|
262
|
+
path: urlPath,
|
|
263
|
+
method: 'POST',
|
|
264
|
+
headers: headerParameters,
|
|
265
|
+
query: queryParameters,
|
|
266
|
+
body: PostCourseCatalogToJSON(requestParameters['postCourseCatalog']),
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Create a course catalog
|
|
272
|
+
*/
|
|
273
|
+
async postCourseCatalogRaw(requestParameters: PostCourseCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CourseCatalog>> {
|
|
274
|
+
const requestOptions = await this.postCourseCatalogRequestOpts(requestParameters);
|
|
275
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
276
|
+
|
|
277
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CourseCatalogFromJSON(jsonValue));
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* Create a course catalog
|
|
282
|
+
*/
|
|
283
|
+
async postCourseCatalog(requestParameters: PostCourseCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CourseCatalog> {
|
|
284
|
+
const response = await this.postCourseCatalogRaw(requestParameters, initOverrides);
|
|
285
|
+
return await response.value();
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* Creates request options for putCourseCatalog without sending the request
|
|
290
|
+
*/
|
|
291
|
+
async putCourseCatalogRequestOpts(requestParameters: PutCourseCatalogRequest): Promise<runtime.RequestOpts> {
|
|
292
|
+
if (requestParameters['catalogId'] == null) {
|
|
293
|
+
throw new runtime.RequiredError(
|
|
294
|
+
'catalogId',
|
|
295
|
+
'Required parameter "catalogId" was null or undefined when calling putCourseCatalog().'
|
|
296
|
+
);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
if (requestParameters['putCourseCatalog'] == null) {
|
|
300
|
+
throw new runtime.RequiredError(
|
|
301
|
+
'putCourseCatalog',
|
|
302
|
+
'Required parameter "putCourseCatalog" was null or undefined when calling putCourseCatalog().'
|
|
303
|
+
);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
const queryParameters: any = {};
|
|
307
|
+
|
|
308
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
309
|
+
|
|
310
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
let urlPath = `/catalogs/{catalogId}`;
|
|
314
|
+
urlPath = urlPath.replace(`{${"catalogId"}}`, encodeURIComponent(String(requestParameters['catalogId'])));
|
|
315
|
+
|
|
316
|
+
return {
|
|
317
|
+
path: urlPath,
|
|
318
|
+
method: 'PUT',
|
|
319
|
+
headers: headerParameters,
|
|
320
|
+
query: queryParameters,
|
|
321
|
+
body: PutCourseCatalogToJSON(requestParameters['putCourseCatalog']),
|
|
322
|
+
};
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* Update a catalog
|
|
327
|
+
*/
|
|
328
|
+
async putCourseCatalogRaw(requestParameters: PutCourseCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CourseCatalog>> {
|
|
329
|
+
const requestOptions = await this.putCourseCatalogRequestOpts(requestParameters);
|
|
330
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
331
|
+
|
|
332
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CourseCatalogFromJSON(jsonValue));
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Update a catalog
|
|
337
|
+
*/
|
|
338
|
+
async putCourseCatalog(requestParameters: PutCourseCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CourseCatalog> {
|
|
339
|
+
const response = await this.putCourseCatalogRaw(requestParameters, initOverrides);
|
|
340
|
+
return await response.value();
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* Creates request options for removeCourseFromCatalog without sending the request
|
|
345
|
+
*/
|
|
346
|
+
async removeCourseFromCatalogRequestOpts(requestParameters: RemoveCourseFromCatalogRequest): Promise<runtime.RequestOpts> {
|
|
347
|
+
if (requestParameters['catalogId'] == null) {
|
|
348
|
+
throw new runtime.RequiredError(
|
|
349
|
+
'catalogId',
|
|
350
|
+
'Required parameter "catalogId" was null or undefined when calling removeCourseFromCatalog().'
|
|
351
|
+
);
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
if (requestParameters['courseId'] == null) {
|
|
355
|
+
throw new runtime.RequiredError(
|
|
356
|
+
'courseId',
|
|
357
|
+
'Required parameter "courseId" was null or undefined when calling removeCourseFromCatalog().'
|
|
358
|
+
);
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
const queryParameters: any = {};
|
|
362
|
+
|
|
363
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
let urlPath = `/catalogs/{catalogId}/courses/{courseId}`;
|
|
367
|
+
urlPath = urlPath.replace(`{${"catalogId"}}`, encodeURIComponent(String(requestParameters['catalogId'])));
|
|
368
|
+
urlPath = urlPath.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId'])));
|
|
369
|
+
|
|
370
|
+
return {
|
|
371
|
+
path: urlPath,
|
|
372
|
+
method: 'DELETE',
|
|
373
|
+
headers: headerParameters,
|
|
374
|
+
query: queryParameters,
|
|
375
|
+
};
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* Remove a course from a catalog
|
|
380
|
+
*/
|
|
381
|
+
async removeCourseFromCatalogRaw(requestParameters: RemoveCourseFromCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
382
|
+
const requestOptions = await this.removeCourseFromCatalogRequestOpts(requestParameters);
|
|
383
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
384
|
+
|
|
385
|
+
return new runtime.VoidApiResponse(response);
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* Remove a course from a catalog
|
|
390
|
+
*/
|
|
391
|
+
async removeCourseFromCatalog(requestParameters: RemoveCourseFromCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
392
|
+
await this.removeCourseFromCatalogRaw(requestParameters, initOverrides);
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
}
|