@easyedu/js-lsm-api 1.51.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.
Files changed (91) hide show
  1. package/.openapi-generator/FILES +26 -0
  2. package/README.md +29 -2
  3. package/dist/apis/CourseCatalogApi.d.ts +123 -0
  4. package/dist/apis/CourseCatalogApi.js +313 -0
  5. package/dist/apis/CourseShareApi.d.ts +153 -0
  6. package/dist/apis/CourseShareApi.js +385 -0
  7. package/dist/apis/PortalSublicenseApi.d.ts +36 -0
  8. package/dist/apis/PortalSublicenseApi.js +79 -0
  9. package/dist/apis/index.d.ts +3 -0
  10. package/dist/apis/index.js +3 -0
  11. package/dist/esm/apis/CourseCatalogApi.d.ts +123 -0
  12. package/dist/esm/apis/CourseCatalogApi.js +309 -0
  13. package/dist/esm/apis/CourseShareApi.d.ts +153 -0
  14. package/dist/esm/apis/CourseShareApi.js +381 -0
  15. package/dist/esm/apis/PortalSublicenseApi.d.ts +36 -0
  16. package/dist/esm/apis/PortalSublicenseApi.js +75 -0
  17. package/dist/esm/apis/index.d.ts +3 -0
  18. package/dist/esm/apis/index.js +3 -0
  19. package/dist/esm/models/CourseCatalog.d.ts +44 -0
  20. package/dist/esm/models/CourseCatalog.js +51 -0
  21. package/dist/esm/models/CourseShare.d.ts +88 -0
  22. package/dist/esm/models/CourseShare.js +85 -0
  23. package/dist/esm/models/PortalSublicense.d.ts +65 -0
  24. package/dist/esm/models/PortalSublicense.js +61 -0
  25. package/dist/esm/models/PostCourseCatalog.d.ts +38 -0
  26. package/dist/esm/models/PostCourseCatalog.js +45 -0
  27. package/dist/esm/models/PostOfferCatalog.d.ts +59 -0
  28. package/dist/esm/models/PostOfferCatalog.js +59 -0
  29. package/dist/esm/models/PostOfferCatalogResponse.d.ts +32 -0
  30. package/dist/esm/models/PostOfferCatalogResponse.js +43 -0
  31. package/dist/esm/models/PostOfferCourse.d.ts +59 -0
  32. package/dist/esm/models/PostOfferCourse.js +59 -0
  33. package/dist/esm/models/PostOfferCourseResponse.d.ts +49 -0
  34. package/dist/esm/models/PostOfferCourseResponse.js +57 -0
  35. package/dist/esm/models/PutCourseCatalog.d.ts +38 -0
  36. package/dist/esm/models/PutCourseCatalog.js +43 -0
  37. package/dist/esm/models/PutPortalSublicense.d.ts +46 -0
  38. package/dist/esm/models/PutPortalSublicense.js +45 -0
  39. package/dist/esm/models/index.d.ts +10 -0
  40. package/dist/esm/models/index.js +10 -0
  41. package/dist/models/CourseCatalog.d.ts +44 -0
  42. package/dist/models/CourseCatalog.js +58 -0
  43. package/dist/models/CourseShare.d.ts +88 -0
  44. package/dist/models/CourseShare.js +93 -0
  45. package/dist/models/PortalSublicense.d.ts +65 -0
  46. package/dist/models/PortalSublicense.js +69 -0
  47. package/dist/models/PostCourseCatalog.d.ts +38 -0
  48. package/dist/models/PostCourseCatalog.js +52 -0
  49. package/dist/models/PostOfferCatalog.d.ts +59 -0
  50. package/dist/models/PostOfferCatalog.js +67 -0
  51. package/dist/models/PostOfferCatalogResponse.d.ts +32 -0
  52. package/dist/models/PostOfferCatalogResponse.js +50 -0
  53. package/dist/models/PostOfferCourse.d.ts +59 -0
  54. package/dist/models/PostOfferCourse.js +67 -0
  55. package/dist/models/PostOfferCourseResponse.d.ts +49 -0
  56. package/dist/models/PostOfferCourseResponse.js +65 -0
  57. package/dist/models/PutCourseCatalog.d.ts +38 -0
  58. package/dist/models/PutCourseCatalog.js +50 -0
  59. package/dist/models/PutPortalSublicense.d.ts +46 -0
  60. package/dist/models/PutPortalSublicense.js +52 -0
  61. package/dist/models/index.d.ts +10 -0
  62. package/dist/models/index.js +10 -0
  63. package/docs/CourseCatalog.md +38 -0
  64. package/docs/CourseCatalogApi.md +476 -0
  65. package/docs/CourseShare.md +46 -0
  66. package/docs/CourseShareApi.md +609 -0
  67. package/docs/PortalSublicense.md +42 -0
  68. package/docs/PortalSublicenseApi.md +81 -0
  69. package/docs/PostCourseCatalog.md +36 -0
  70. package/docs/PostOfferCatalog.md +40 -0
  71. package/docs/PostOfferCatalogResponse.md +34 -0
  72. package/docs/PostOfferCourse.md +40 -0
  73. package/docs/PostOfferCourseResponse.md +36 -0
  74. package/docs/PutCourseCatalog.md +36 -0
  75. package/docs/PutPortalSublicense.md +39 -0
  76. package/package.json +1 -1
  77. package/src/apis/CourseCatalogApi.ts +395 -0
  78. package/src/apis/CourseShareApi.ts +480 -0
  79. package/src/apis/PortalSublicenseApi.ts +95 -0
  80. package/src/apis/index.ts +3 -0
  81. package/src/models/CourseCatalog.ts +84 -0
  82. package/src/models/CourseShare.ts +144 -0
  83. package/src/models/PortalSublicense.ts +111 -0
  84. package/src/models/PostCourseCatalog.ts +74 -0
  85. package/src/models/PostOfferCatalog.ts +103 -0
  86. package/src/models/PostOfferCatalogResponse.ts +66 -0
  87. package/src/models/PostOfferCourse.ts +103 -0
  88. package/src/models/PostOfferCourseResponse.ts +89 -0
  89. package/src/models/PutCourseCatalog.ts +73 -0
  90. package/src/models/PutPortalSublicense.ts +83 -0
  91. package/src/models/index.ts +10 -0
@@ -0,0 +1,123 @@
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 * as runtime from '../runtime';
13
+ import type { CourseCatalog, PostCourseCatalog, PutCourseCatalog } from '../models/index';
14
+ export interface AddCourseToCatalogRequest {
15
+ catalogId: string;
16
+ courseId: string;
17
+ }
18
+ export interface DeleteCourseCatalogRequest {
19
+ catalogId: string;
20
+ }
21
+ export interface GetCourseCatalogRequest {
22
+ catalogId: string;
23
+ }
24
+ export interface PostCourseCatalogRequest {
25
+ postCourseCatalog: PostCourseCatalog;
26
+ }
27
+ export interface PutCourseCatalogRequest {
28
+ catalogId: string;
29
+ putCourseCatalog: PutCourseCatalog;
30
+ }
31
+ export interface RemoveCourseFromCatalogRequest {
32
+ catalogId: string;
33
+ courseId: string;
34
+ }
35
+ /**
36
+ *
37
+ */
38
+ export declare class CourseCatalogApi extends runtime.BaseAPI {
39
+ /**
40
+ * Creates request options for addCourseToCatalog without sending the request
41
+ */
42
+ addCourseToCatalogRequestOpts(requestParameters: AddCourseToCatalogRequest): Promise<runtime.RequestOpts>;
43
+ /**
44
+ * Add a course to a catalog
45
+ */
46
+ addCourseToCatalogRaw(requestParameters: AddCourseToCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
47
+ /**
48
+ * Add a course to a catalog
49
+ */
50
+ addCourseToCatalog(requestParameters: AddCourseToCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
51
+ /**
52
+ * Creates request options for deleteCourseCatalog without sending the request
53
+ */
54
+ deleteCourseCatalogRequestOpts(requestParameters: DeleteCourseCatalogRequest): Promise<runtime.RequestOpts>;
55
+ /**
56
+ * Delete a catalog
57
+ */
58
+ deleteCourseCatalogRaw(requestParameters: DeleteCourseCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
59
+ /**
60
+ * Delete a catalog
61
+ */
62
+ deleteCourseCatalog(requestParameters: DeleteCourseCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
63
+ /**
64
+ * Creates request options for getCourseCatalog without sending the request
65
+ */
66
+ getCourseCatalogRequestOpts(requestParameters: GetCourseCatalogRequest): Promise<runtime.RequestOpts>;
67
+ /**
68
+ * Get a catalog
69
+ */
70
+ getCourseCatalogRaw(requestParameters: GetCourseCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CourseCatalog>>;
71
+ /**
72
+ * Get a catalog
73
+ */
74
+ getCourseCatalog(requestParameters: GetCourseCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CourseCatalog>;
75
+ /**
76
+ * Creates request options for getCourseCatalogs without sending the request
77
+ */
78
+ getCourseCatalogsRequestOpts(): Promise<runtime.RequestOpts>;
79
+ /**
80
+ * List catalogs in the current portal
81
+ */
82
+ getCourseCatalogsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<CourseCatalog>>>;
83
+ /**
84
+ * List catalogs in the current portal
85
+ */
86
+ getCourseCatalogs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<CourseCatalog>>;
87
+ /**
88
+ * Creates request options for postCourseCatalog without sending the request
89
+ */
90
+ postCourseCatalogRequestOpts(requestParameters: PostCourseCatalogRequest): Promise<runtime.RequestOpts>;
91
+ /**
92
+ * Create a course catalog
93
+ */
94
+ postCourseCatalogRaw(requestParameters: PostCourseCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CourseCatalog>>;
95
+ /**
96
+ * Create a course catalog
97
+ */
98
+ postCourseCatalog(requestParameters: PostCourseCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CourseCatalog>;
99
+ /**
100
+ * Creates request options for putCourseCatalog without sending the request
101
+ */
102
+ putCourseCatalogRequestOpts(requestParameters: PutCourseCatalogRequest): Promise<runtime.RequestOpts>;
103
+ /**
104
+ * Update a catalog
105
+ */
106
+ putCourseCatalogRaw(requestParameters: PutCourseCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CourseCatalog>>;
107
+ /**
108
+ * Update a catalog
109
+ */
110
+ putCourseCatalog(requestParameters: PutCourseCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CourseCatalog>;
111
+ /**
112
+ * Creates request options for removeCourseFromCatalog without sending the request
113
+ */
114
+ removeCourseFromCatalogRequestOpts(requestParameters: RemoveCourseFromCatalogRequest): Promise<runtime.RequestOpts>;
115
+ /**
116
+ * Remove a course from a catalog
117
+ */
118
+ removeCourseFromCatalogRaw(requestParameters: RemoveCourseFromCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
119
+ /**
120
+ * Remove a course from a catalog
121
+ */
122
+ removeCourseFromCatalog(requestParameters: RemoveCourseFromCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
123
+ }
@@ -0,0 +1,309 @@
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import * as runtime from '../runtime';
24
+ import { CourseCatalogFromJSON, PostCourseCatalogToJSON, PutCourseCatalogToJSON, } from '../models/index';
25
+ /**
26
+ *
27
+ */
28
+ export class CourseCatalogApi extends runtime.BaseAPI {
29
+ /**
30
+ * Creates request options for addCourseToCatalog without sending the request
31
+ */
32
+ addCourseToCatalogRequestOpts(requestParameters) {
33
+ return __awaiter(this, void 0, void 0, function* () {
34
+ if (requestParameters['catalogId'] == null) {
35
+ throw new runtime.RequiredError('catalogId', 'Required parameter "catalogId" was null or undefined when calling addCourseToCatalog().');
36
+ }
37
+ if (requestParameters['courseId'] == null) {
38
+ throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling addCourseToCatalog().');
39
+ }
40
+ const queryParameters = {};
41
+ const headerParameters = {};
42
+ let urlPath = `/catalogs/{catalogId}/courses/{courseId}`;
43
+ urlPath = urlPath.replace(`{${"catalogId"}}`, encodeURIComponent(String(requestParameters['catalogId'])));
44
+ urlPath = urlPath.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId'])));
45
+ return {
46
+ path: urlPath,
47
+ method: 'POST',
48
+ headers: headerParameters,
49
+ query: queryParameters,
50
+ };
51
+ });
52
+ }
53
+ /**
54
+ * Add a course to a catalog
55
+ */
56
+ addCourseToCatalogRaw(requestParameters, initOverrides) {
57
+ return __awaiter(this, void 0, void 0, function* () {
58
+ const requestOptions = yield this.addCourseToCatalogRequestOpts(requestParameters);
59
+ const response = yield this.request(requestOptions, initOverrides);
60
+ return new runtime.VoidApiResponse(response);
61
+ });
62
+ }
63
+ /**
64
+ * Add a course to a catalog
65
+ */
66
+ addCourseToCatalog(requestParameters, initOverrides) {
67
+ return __awaiter(this, void 0, void 0, function* () {
68
+ yield this.addCourseToCatalogRaw(requestParameters, initOverrides);
69
+ });
70
+ }
71
+ /**
72
+ * Creates request options for deleteCourseCatalog without sending the request
73
+ */
74
+ deleteCourseCatalogRequestOpts(requestParameters) {
75
+ return __awaiter(this, void 0, void 0, function* () {
76
+ if (requestParameters['catalogId'] == null) {
77
+ throw new runtime.RequiredError('catalogId', 'Required parameter "catalogId" was null or undefined when calling deleteCourseCatalog().');
78
+ }
79
+ const queryParameters = {};
80
+ const headerParameters = {};
81
+ let urlPath = `/catalogs/{catalogId}`;
82
+ urlPath = urlPath.replace(`{${"catalogId"}}`, encodeURIComponent(String(requestParameters['catalogId'])));
83
+ return {
84
+ path: urlPath,
85
+ method: 'DELETE',
86
+ headers: headerParameters,
87
+ query: queryParameters,
88
+ };
89
+ });
90
+ }
91
+ /**
92
+ * Delete a catalog
93
+ */
94
+ deleteCourseCatalogRaw(requestParameters, initOverrides) {
95
+ return __awaiter(this, void 0, void 0, function* () {
96
+ const requestOptions = yield this.deleteCourseCatalogRequestOpts(requestParameters);
97
+ const response = yield this.request(requestOptions, initOverrides);
98
+ return new runtime.VoidApiResponse(response);
99
+ });
100
+ }
101
+ /**
102
+ * Delete a catalog
103
+ */
104
+ deleteCourseCatalog(requestParameters, initOverrides) {
105
+ return __awaiter(this, void 0, void 0, function* () {
106
+ yield this.deleteCourseCatalogRaw(requestParameters, initOverrides);
107
+ });
108
+ }
109
+ /**
110
+ * Creates request options for getCourseCatalog without sending the request
111
+ */
112
+ getCourseCatalogRequestOpts(requestParameters) {
113
+ return __awaiter(this, void 0, void 0, function* () {
114
+ if (requestParameters['catalogId'] == null) {
115
+ throw new runtime.RequiredError('catalogId', 'Required parameter "catalogId" was null or undefined when calling getCourseCatalog().');
116
+ }
117
+ const queryParameters = {};
118
+ const headerParameters = {};
119
+ let urlPath = `/catalogs/{catalogId}`;
120
+ urlPath = urlPath.replace(`{${"catalogId"}}`, encodeURIComponent(String(requestParameters['catalogId'])));
121
+ return {
122
+ path: urlPath,
123
+ method: 'GET',
124
+ headers: headerParameters,
125
+ query: queryParameters,
126
+ };
127
+ });
128
+ }
129
+ /**
130
+ * Get a catalog
131
+ */
132
+ getCourseCatalogRaw(requestParameters, initOverrides) {
133
+ return __awaiter(this, void 0, void 0, function* () {
134
+ const requestOptions = yield this.getCourseCatalogRequestOpts(requestParameters);
135
+ const response = yield this.request(requestOptions, initOverrides);
136
+ return new runtime.JSONApiResponse(response, (jsonValue) => CourseCatalogFromJSON(jsonValue));
137
+ });
138
+ }
139
+ /**
140
+ * Get a catalog
141
+ */
142
+ getCourseCatalog(requestParameters, initOverrides) {
143
+ return __awaiter(this, void 0, void 0, function* () {
144
+ const response = yield this.getCourseCatalogRaw(requestParameters, initOverrides);
145
+ return yield response.value();
146
+ });
147
+ }
148
+ /**
149
+ * Creates request options for getCourseCatalogs without sending the request
150
+ */
151
+ getCourseCatalogsRequestOpts() {
152
+ return __awaiter(this, void 0, void 0, function* () {
153
+ const queryParameters = {};
154
+ const headerParameters = {};
155
+ let urlPath = `/catalogs`;
156
+ return {
157
+ path: urlPath,
158
+ method: 'GET',
159
+ headers: headerParameters,
160
+ query: queryParameters,
161
+ };
162
+ });
163
+ }
164
+ /**
165
+ * List catalogs in the current portal
166
+ */
167
+ getCourseCatalogsRaw(initOverrides) {
168
+ return __awaiter(this, void 0, void 0, function* () {
169
+ const requestOptions = yield this.getCourseCatalogsRequestOpts();
170
+ const response = yield this.request(requestOptions, initOverrides);
171
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(CourseCatalogFromJSON));
172
+ });
173
+ }
174
+ /**
175
+ * List catalogs in the current portal
176
+ */
177
+ getCourseCatalogs(initOverrides) {
178
+ return __awaiter(this, void 0, void 0, function* () {
179
+ const response = yield this.getCourseCatalogsRaw(initOverrides);
180
+ return yield response.value();
181
+ });
182
+ }
183
+ /**
184
+ * Creates request options for postCourseCatalog without sending the request
185
+ */
186
+ postCourseCatalogRequestOpts(requestParameters) {
187
+ return __awaiter(this, void 0, void 0, function* () {
188
+ if (requestParameters['postCourseCatalog'] == null) {
189
+ throw new runtime.RequiredError('postCourseCatalog', 'Required parameter "postCourseCatalog" was null or undefined when calling postCourseCatalog().');
190
+ }
191
+ const queryParameters = {};
192
+ const headerParameters = {};
193
+ headerParameters['Content-Type'] = 'application/json';
194
+ let urlPath = `/catalogs`;
195
+ return {
196
+ path: urlPath,
197
+ method: 'POST',
198
+ headers: headerParameters,
199
+ query: queryParameters,
200
+ body: PostCourseCatalogToJSON(requestParameters['postCourseCatalog']),
201
+ };
202
+ });
203
+ }
204
+ /**
205
+ * Create a course catalog
206
+ */
207
+ postCourseCatalogRaw(requestParameters, initOverrides) {
208
+ return __awaiter(this, void 0, void 0, function* () {
209
+ const requestOptions = yield this.postCourseCatalogRequestOpts(requestParameters);
210
+ const response = yield this.request(requestOptions, initOverrides);
211
+ return new runtime.JSONApiResponse(response, (jsonValue) => CourseCatalogFromJSON(jsonValue));
212
+ });
213
+ }
214
+ /**
215
+ * Create a course catalog
216
+ */
217
+ postCourseCatalog(requestParameters, initOverrides) {
218
+ return __awaiter(this, void 0, void 0, function* () {
219
+ const response = yield this.postCourseCatalogRaw(requestParameters, initOverrides);
220
+ return yield response.value();
221
+ });
222
+ }
223
+ /**
224
+ * Creates request options for putCourseCatalog without sending the request
225
+ */
226
+ putCourseCatalogRequestOpts(requestParameters) {
227
+ return __awaiter(this, void 0, void 0, function* () {
228
+ if (requestParameters['catalogId'] == null) {
229
+ throw new runtime.RequiredError('catalogId', 'Required parameter "catalogId" was null or undefined when calling putCourseCatalog().');
230
+ }
231
+ if (requestParameters['putCourseCatalog'] == null) {
232
+ throw new runtime.RequiredError('putCourseCatalog', 'Required parameter "putCourseCatalog" was null or undefined when calling putCourseCatalog().');
233
+ }
234
+ const queryParameters = {};
235
+ const headerParameters = {};
236
+ headerParameters['Content-Type'] = 'application/json';
237
+ let urlPath = `/catalogs/{catalogId}`;
238
+ urlPath = urlPath.replace(`{${"catalogId"}}`, encodeURIComponent(String(requestParameters['catalogId'])));
239
+ return {
240
+ path: urlPath,
241
+ method: 'PUT',
242
+ headers: headerParameters,
243
+ query: queryParameters,
244
+ body: PutCourseCatalogToJSON(requestParameters['putCourseCatalog']),
245
+ };
246
+ });
247
+ }
248
+ /**
249
+ * Update a catalog
250
+ */
251
+ putCourseCatalogRaw(requestParameters, initOverrides) {
252
+ return __awaiter(this, void 0, void 0, function* () {
253
+ const requestOptions = yield this.putCourseCatalogRequestOpts(requestParameters);
254
+ const response = yield this.request(requestOptions, initOverrides);
255
+ return new runtime.JSONApiResponse(response, (jsonValue) => CourseCatalogFromJSON(jsonValue));
256
+ });
257
+ }
258
+ /**
259
+ * Update a catalog
260
+ */
261
+ putCourseCatalog(requestParameters, initOverrides) {
262
+ return __awaiter(this, void 0, void 0, function* () {
263
+ const response = yield this.putCourseCatalogRaw(requestParameters, initOverrides);
264
+ return yield response.value();
265
+ });
266
+ }
267
+ /**
268
+ * Creates request options for removeCourseFromCatalog without sending the request
269
+ */
270
+ removeCourseFromCatalogRequestOpts(requestParameters) {
271
+ return __awaiter(this, void 0, void 0, function* () {
272
+ if (requestParameters['catalogId'] == null) {
273
+ throw new runtime.RequiredError('catalogId', 'Required parameter "catalogId" was null or undefined when calling removeCourseFromCatalog().');
274
+ }
275
+ if (requestParameters['courseId'] == null) {
276
+ throw new runtime.RequiredError('courseId', 'Required parameter "courseId" was null or undefined when calling removeCourseFromCatalog().');
277
+ }
278
+ const queryParameters = {};
279
+ const headerParameters = {};
280
+ let urlPath = `/catalogs/{catalogId}/courses/{courseId}`;
281
+ urlPath = urlPath.replace(`{${"catalogId"}}`, encodeURIComponent(String(requestParameters['catalogId'])));
282
+ urlPath = urlPath.replace(`{${"courseId"}}`, encodeURIComponent(String(requestParameters['courseId'])));
283
+ return {
284
+ path: urlPath,
285
+ method: 'DELETE',
286
+ headers: headerParameters,
287
+ query: queryParameters,
288
+ };
289
+ });
290
+ }
291
+ /**
292
+ * Remove a course from a catalog
293
+ */
294
+ removeCourseFromCatalogRaw(requestParameters, initOverrides) {
295
+ return __awaiter(this, void 0, void 0, function* () {
296
+ const requestOptions = yield this.removeCourseFromCatalogRequestOpts(requestParameters);
297
+ const response = yield this.request(requestOptions, initOverrides);
298
+ return new runtime.VoidApiResponse(response);
299
+ });
300
+ }
301
+ /**
302
+ * Remove a course from a catalog
303
+ */
304
+ removeCourseFromCatalog(requestParameters, initOverrides) {
305
+ return __awaiter(this, void 0, void 0, function* () {
306
+ yield this.removeCourseFromCatalogRaw(requestParameters, initOverrides);
307
+ });
308
+ }
309
+ }
@@ -0,0 +1,153 @@
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 * as runtime from '../runtime';
13
+ import type { CourseShare, PostOfferCatalog, PostOfferCatalogResponse, PostOfferCourse, PostOfferCourseResponse } from '../models/index';
14
+ export interface DeleteCourseShareRequest {
15
+ shareId: string;
16
+ }
17
+ export interface PostOfferCatalogRequest {
18
+ catalogId: string;
19
+ postOfferCatalog: PostOfferCatalog;
20
+ }
21
+ export interface PostOfferCourseRequest {
22
+ courseId: string;
23
+ postOfferCourse: PostOfferCourse;
24
+ }
25
+ export interface PostUnrevokeShareRequest {
26
+ shareId: string;
27
+ }
28
+ export interface PutAcceptCloneRequest {
29
+ shareId: string;
30
+ }
31
+ export interface PutAcceptMirrorRequest {
32
+ shareId: string;
33
+ }
34
+ export interface PutDeclineShareRequest {
35
+ shareId: string;
36
+ }
37
+ /**
38
+ *
39
+ */
40
+ export declare class CourseShareApi extends runtime.BaseAPI {
41
+ /**
42
+ * Creates request options for deleteCourseShare without sending the request
43
+ */
44
+ deleteCourseShareRequestOpts(requestParameters: DeleteCourseShareRequest): Promise<runtime.RequestOpts>;
45
+ /**
46
+ * Cascades to any downstream re-shares and archives enrollments in the target portal. Use `POST /course-shares/{shareId}/unrevoke` to restore.
47
+ * Revoke a share
48
+ */
49
+ deleteCourseShareRaw(requestParameters: DeleteCourseShareRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
50
+ /**
51
+ * Cascades to any downstream re-shares and archives enrollments in the target portal. Use `POST /course-shares/{shareId}/unrevoke` to restore.
52
+ * Revoke a share
53
+ */
54
+ deleteCourseShare(requestParameters: DeleteCourseShareRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
55
+ /**
56
+ * Creates request options for getCourseSharesOfferedByMe without sending the request
57
+ */
58
+ getCourseSharesOfferedByMeRequestOpts(): Promise<runtime.RequestOpts>;
59
+ /**
60
+ * List shares the current portal has offered out
61
+ */
62
+ getCourseSharesOfferedByMeRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<CourseShare>>>;
63
+ /**
64
+ * List shares the current portal has offered out
65
+ */
66
+ getCourseSharesOfferedByMe(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<CourseShare>>;
67
+ /**
68
+ * Creates request options for getCourseSharesOfferedToMe without sending the request
69
+ */
70
+ getCourseSharesOfferedToMeRequestOpts(): Promise<runtime.RequestOpts>;
71
+ /**
72
+ * List shares offered to the current portal
73
+ */
74
+ getCourseSharesOfferedToMeRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<CourseShare>>>;
75
+ /**
76
+ * List shares offered to the current portal
77
+ */
78
+ getCourseSharesOfferedToMe(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<CourseShare>>;
79
+ /**
80
+ * Creates request options for postOfferCatalog without sending the request
81
+ */
82
+ postOfferCatalogRequestOpts(requestParameters: PostOfferCatalogRequest): Promise<runtime.RequestOpts>;
83
+ /**
84
+ * Fans out one `course_share` per catalog member. Duplicates are silently skipped. The catalog link is preserved on each generated share via `origin_catalog_id`.
85
+ * Offer every course in a catalog to a descendant portal
86
+ */
87
+ postOfferCatalogRaw(requestParameters: PostOfferCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PostOfferCatalogResponse>>;
88
+ /**
89
+ * Fans out one `course_share` per catalog member. Duplicates are silently skipped. The catalog link is preserved on each generated share via `origin_catalog_id`.
90
+ * Offer every course in a catalog to a descendant portal
91
+ */
92
+ postOfferCatalog(requestParameters: PostOfferCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PostOfferCatalogResponse>;
93
+ /**
94
+ * Creates request options for postOfferCourse without sending the request
95
+ */
96
+ postOfferCourseRequestOpts(requestParameters: PostOfferCourseRequest): Promise<runtime.RequestOpts>;
97
+ /**
98
+ * Offer a single course to a descendant portal
99
+ */
100
+ postOfferCourseRaw(requestParameters: PostOfferCourseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PostOfferCourseResponse>>;
101
+ /**
102
+ * Offer a single course to a descendant portal
103
+ */
104
+ postOfferCourse(requestParameters: PostOfferCourseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PostOfferCourseResponse>;
105
+ /**
106
+ * Creates request options for postUnrevokeShare without sending the request
107
+ */
108
+ postUnrevokeShareRequestOpts(requestParameters: PostUnrevokeShareRequest): Promise<runtime.RequestOpts>;
109
+ /**
110
+ * Restore a previously revoked share
111
+ */
112
+ postUnrevokeShareRaw(requestParameters: PostUnrevokeShareRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
113
+ /**
114
+ * Restore a previously revoked share
115
+ */
116
+ postUnrevokeShare(requestParameters: PostUnrevokeShareRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
117
+ /**
118
+ * Creates request options for putAcceptClone without sending the request
119
+ */
120
+ putAcceptCloneRequestOpts(requestParameters: PutAcceptCloneRequest): Promise<runtime.RequestOpts>;
121
+ /**
122
+ * Accept an offer as a clone (deep copy into your portal)
123
+ */
124
+ putAcceptCloneRaw(requestParameters: PutAcceptCloneRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
125
+ /**
126
+ * Accept an offer as a clone (deep copy into your portal)
127
+ */
128
+ putAcceptClone(requestParameters: PutAcceptCloneRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
129
+ /**
130
+ * Creates request options for putAcceptMirror without sending the request
131
+ */
132
+ putAcceptMirrorRequestOpts(requestParameters: PutAcceptMirrorRequest): Promise<runtime.RequestOpts>;
133
+ /**
134
+ * Accept an offer as a mirror (no copy, live link to source)
135
+ */
136
+ putAcceptMirrorRaw(requestParameters: PutAcceptMirrorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
137
+ /**
138
+ * Accept an offer as a mirror (no copy, live link to source)
139
+ */
140
+ putAcceptMirror(requestParameters: PutAcceptMirrorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
141
+ /**
142
+ * Creates request options for putDeclineShare without sending the request
143
+ */
144
+ putDeclineShareRequestOpts(requestParameters: PutDeclineShareRequest): Promise<runtime.RequestOpts>;
145
+ /**
146
+ * Decline an offer
147
+ */
148
+ putDeclineShareRaw(requestParameters: PutDeclineShareRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
149
+ /**
150
+ * Decline an offer
151
+ */
152
+ putDeclineShare(requestParameters: PutDeclineShareRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
153
+ }