@selfcommunity/api-services 0.6.7-alpha.2 → 0.6.7-payments.143

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 (42) hide show
  1. package/lib/cjs/client/index.d.ts +3 -3
  2. package/lib/cjs/client/index.js +3 -3
  3. package/lib/cjs/constants/Endpoints.js +198 -0
  4. package/lib/cjs/index.d.ts +4 -2
  5. package/lib/cjs/index.js +8 -1
  6. package/lib/cjs/services/course/index.d.ts +449 -0
  7. package/lib/cjs/services/course/index.js +643 -0
  8. package/lib/cjs/services/payment/index.d.ts +117 -0
  9. package/lib/cjs/services/payment/index.js +120 -0
  10. package/lib/cjs/services/suggestion/index.d.ts +9 -1
  11. package/lib/cjs/services/suggestion/index.js +13 -0
  12. package/lib/cjs/services/user/index.d.ts +19 -0
  13. package/lib/cjs/services/user/index.js +29 -0
  14. package/lib/cjs/types/category.d.ts +4 -0
  15. package/lib/cjs/types/course.d.ts +123 -0
  16. package/lib/cjs/types/course.js +12 -0
  17. package/lib/cjs/types/index.d.ts +2 -1
  18. package/lib/cjs/types/index.js +3 -1
  19. package/lib/cjs/types/payment.d.ts +39 -0
  20. package/lib/cjs/types/payment.js +2 -0
  21. package/lib/esm/client/index.d.ts +3 -3
  22. package/lib/esm/client/index.js +3 -3
  23. package/lib/esm/constants/Endpoints.js +198 -0
  24. package/lib/esm/index.d.ts +4 -2
  25. package/lib/esm/index.js +4 -2
  26. package/lib/esm/services/course/index.d.ts +449 -0
  27. package/lib/esm/services/course/index.js +638 -0
  28. package/lib/esm/services/payment/index.d.ts +117 -0
  29. package/lib/esm/services/payment/index.js +115 -0
  30. package/lib/esm/services/suggestion/index.d.ts +9 -1
  31. package/lib/esm/services/suggestion/index.js +13 -0
  32. package/lib/esm/services/user/index.d.ts +19 -0
  33. package/lib/esm/services/user/index.js +29 -0
  34. package/lib/esm/types/category.d.ts +4 -0
  35. package/lib/esm/types/course.d.ts +123 -0
  36. package/lib/esm/types/course.js +9 -0
  37. package/lib/esm/types/index.d.ts +2 -1
  38. package/lib/esm/types/index.js +2 -1
  39. package/lib/esm/types/payment.d.ts +39 -0
  40. package/lib/esm/types/payment.js +1 -0
  41. package/lib/umd/api-services.js +1 -1
  42. package/package.json +4 -4
@@ -0,0 +1,449 @@
1
+ import { SCCourseCommentType, SCCourseLessonType, SCCourseSectionType, SCCourseType, SCUserType } from '@selfcommunity/types';
2
+ import { AxiosRequestConfig } from 'axios';
3
+ import { BaseGetParams, BaseSearchParams, CourseCreateParams, CourseDashboardUsersParams, CourseInfoParams, CourseLessonCommentsParams, CourseSearchParams, CourseUserRoleParams, CourseUsersParams, SCPaginatedResponse } from '../../types';
4
+ import { CourseSectionParams, CourseUserParams } from '../../types/course';
5
+ export interface CourseApiClientInterface {
6
+ changeCourseUserRole(id: number | string, data: CourseUserRoleParams, config?: AxiosRequestConfig): Promise<any>;
7
+ getJoinedCourses(params?: CourseUserParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCourseType>>;
8
+ getUserJoinedCourses(id: number | string, params?: BaseSearchParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCourseType>>;
9
+ searchCourses(params?: CourseSearchParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCourseType>>;
10
+ getSpecificCourseInfo(id: number | string, params?: CourseInfoParams, config?: AxiosRequestConfig): Promise<SCCourseType>;
11
+ getCourseDashboardUsers(id: number | string, params?: CourseDashboardUsersParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
12
+ createCourse(data: CourseCreateParams | FormData, config?: AxiosRequestConfig): Promise<SCCourseType>;
13
+ updateCourse(id: number | string, data: SCCourseType, config?: AxiosRequestConfig): Promise<SCCourseType>;
14
+ patchCourse(id: number | string, data: Partial<SCCourseType>, config?: AxiosRequestConfig): Promise<SCCourseType>;
15
+ deleteCourse(id: number | string, config?: AxiosRequestConfig): Promise<any>;
16
+ getCourseLessonComment(id: number | string, section_id: number | string, lesson_id: number | string, comment_id: number | string, config?: AxiosRequestConfig): Promise<SCCourseCommentType>;
17
+ getCourseComments(id: number | string, course_id: number | string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCourseCommentType>>;
18
+ createCourseComment(id: number | string, section_id: number | string, lesson_id: number | string, data: SCCourseCommentType, config?: AxiosRequestConfig): Promise<SCCourseCommentType>;
19
+ updateCourseComment(id: number | string, section_id: number | string, lesson_id: number | string, comment_id: number | string, data: SCCourseCommentType, config?: AxiosRequestConfig): Promise<SCCourseCommentType>;
20
+ patchCourseComment(id: number | string, section_id: number | string, lesson_id: number | string, comment_id: number | string, data: SCCourseLessonType, config?: AxiosRequestConfig): Promise<SCCourseCommentType>;
21
+ deleteCourseComment(id: number | string, section_id: number | string, lesson_id: number | string, comment_id: number | string, config?: AxiosRequestConfig): Promise<any>;
22
+ getCourseSection(id: number | string, section_id: number | string, config?: AxiosRequestConfig): Promise<SCCourseSectionType>;
23
+ getCourseSections(id: number | string, config?: AxiosRequestConfig): Promise<SCCourseSectionType[]>;
24
+ createCourseSection(id: number | string, data: CourseSectionParams, config?: AxiosRequestConfig): Promise<SCCourseSectionType>;
25
+ updateCourseSection(id: number | string, section_id: number | string, data: SCCourseSectionType, config?: AxiosRequestConfig): Promise<SCCourseSectionType>;
26
+ patchCourseSection(id: number | string, section_id: number | string, data: SCCourseSectionType, config?: AxiosRequestConfig): Promise<SCCourseSectionType>;
27
+ deleteCourseSection(id: number | string, section_id: number | string, config?: AxiosRequestConfig): Promise<any>;
28
+ getCourseLesson(id: number | string, section_id: number | string, lesson_id: number | string, config?: AxiosRequestConfig): Promise<SCCourseLessonType>;
29
+ getCourseLessonComments(id: number | string, section_id: number | string, lesson_id: number | string, params?: CourseLessonCommentsParams, config?: AxiosRequestConfig): Promise<SCCourseCommentType[]>;
30
+ getCourseLessons(id: number | string, section_id: number | string, config?: AxiosRequestConfig): Promise<SCCourseLessonType[]>;
31
+ createCourseLesson(data: SCCourseLessonType, config?: AxiosRequestConfig): Promise<SCCourseLessonType>;
32
+ updateCourseLesson(id: number | string, section_id: number | string, lesson_id: number | string, data: SCCourseLessonType, config?: AxiosRequestConfig): Promise<SCCourseLessonType>;
33
+ patchCourseLesson(id: number | string, section_id: number | string, lesson_id: number | string, data: Partial<SCCourseLessonType>, config?: AxiosRequestConfig): Promise<SCCourseLessonType>;
34
+ deleteCourseLesson(id: number | string, section_id: number | string, lesson_id: number | string, config?: AxiosRequestConfig): Promise<any>;
35
+ markLessonComplete(id: number | string, section_id: number | string, lesson_id: number | string, data: SCCourseLessonType, config?: AxiosRequestConfig): Promise<any>;
36
+ markLessonInComplete(id: number | string, section_id: number | string, lesson_id: number | string, data: SCCourseLessonType, config?: AxiosRequestConfig): Promise<any>;
37
+ changeCourseCover(id: number | string, data: FormData, config?: AxiosRequestConfig): Promise<SCCourseType>;
38
+ getCourseWaitingApproval(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
39
+ getCourseSuggestedUsers(id: number | string, search: string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
40
+ getCourseInvitedUsers(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
41
+ getCourseJoinedUsers(id: number | string, params?: CourseUsersParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
42
+ joinOrAcceptInviteToCourse(id: number | string, config?: AxiosRequestConfig): Promise<any>;
43
+ leaveOrRemoveCourseRequest(id: number | string, params?: {
44
+ user: number;
45
+ }, config?: AxiosRequestConfig): Promise<any>;
46
+ inviteOrAcceptUsersToCourse(id: number | string, data: {
47
+ users: number[];
48
+ }, config?: AxiosRequestConfig): Promise<any>;
49
+ removeInvitationToCourse(id: number | string, data: {
50
+ users: number[];
51
+ }, config?: AxiosRequestConfig): Promise<any>;
52
+ getCourseStatus(id: number | string, config?: AxiosRequestConfig): Promise<any>;
53
+ }
54
+ /**
55
+ * Contains all the endpoints needed to manage events.
56
+ */
57
+ export declare class CourseApiClient {
58
+ /**
59
+ * This endpoint allows user managers to change the role of some users in the specified course.
60
+ * @param _id
61
+ * @param data
62
+ * @param config
63
+ */
64
+ static changeCourseUserRole(id: number | string, data: CourseUserRoleParams, config?: AxiosRequestConfig): Promise<any>;
65
+ /**
66
+ * This endpoint retrieves all the events of the logged-in user.
67
+ * @param params
68
+ * @param config
69
+ */
70
+ static getJoinedCourses(params?: CourseUserParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCourseType>>;
71
+ /**
72
+ * This endpoint retrieves a specific course.
73
+ * @param id
74
+ * @param config
75
+ */
76
+ static getUserJoinedCourses(id: number | string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCourseType>>;
77
+ /**
78
+ * This endpoint performs events search
79
+ * @param params
80
+ * @param config
81
+ */
82
+ static searchCourses(params?: CourseSearchParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCourseType>>;
83
+ /**
84
+ * This endpoint retrieves a specific course.
85
+ * @param id
86
+ * @param params
87
+ * @param config
88
+ */
89
+ static getSpecificCourseInfo(id: number | string, params?: CourseInfoParams, config?: AxiosRequestConfig): Promise<SCCourseType>;
90
+ /**
91
+ * This endpoint retrieves the list of all users that joined the course identified by Id
92
+ * it will also return some useful stats that can be used to make a course dashboard.
93
+ * @param id
94
+ * @param params
95
+ * @param config
96
+ */
97
+ static getCourseDashboardUsers(id: number | string, params?: CourseDashboardUsersParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
98
+ /**
99
+ * This endpoint creates a course.
100
+ * @param data
101
+ * @param config
102
+ */
103
+ static createCourse(data: CourseCreateParams | FormData, config?: AxiosRequestConfig): Promise<SCCourseType>;
104
+ /**
105
+ * This endpoint updates a course.
106
+ * @param id
107
+ * @param data
108
+ * @param config
109
+ */
110
+ static updateCourse(id: number | string, data: SCCourseType, config?: AxiosRequestConfig): Promise<SCCourseType>;
111
+ /**
112
+ * This endpoint patches a course.
113
+ * @param id
114
+ * @param data
115
+ * @param config
116
+ */
117
+ static patchCourse(id: number | string, data: Partial<SCCourseType>, config?: AxiosRequestConfig): Promise<SCCourseType>;
118
+ /**
119
+ * This endpoint deletes a course.
120
+ * @param id
121
+ * @param config
122
+ */
123
+ static deleteCourse(id: number | string, config?: AxiosRequestConfig): Promise<any>;
124
+ /**
125
+ * This endpoint retrieves a specific course comment.
126
+ * @param id
127
+ * @param section_id
128
+ * @param lesson_id
129
+ * @param comment_id
130
+ * @param config
131
+ */
132
+ static getCourseLessonComment(id: number | string, section_id: number | string, lesson_id: number | string, comment_id: number | string, config?: AxiosRequestConfig): Promise<SCCourseCommentType>;
133
+ /**
134
+ * This endpoint retrieves the course comments.
135
+ * @param id
136
+ * @param params
137
+ * @param config
138
+ */
139
+ static getCourseComments(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCourseCommentType>>;
140
+ /**
141
+ * This endpoint creates a course comment.
142
+ * @param id
143
+ * @param section_id
144
+ * @param lesson_id
145
+ * @param data
146
+ * @param config
147
+ */
148
+ static createCourseComment(id: number | string, section_id: number | string, lesson_id: number | string, data: SCCourseCommentType, config?: AxiosRequestConfig): Promise<SCCourseCommentType>;
149
+ /**
150
+ * This endpoint updates a course comment.
151
+ * @param id
152
+ * @param section_id
153
+ * @param lesson_id
154
+ * @param comment_id
155
+ * @param data
156
+ * @param config
157
+ */
158
+ static updateCourseComment(id: number | string, section_id: number | string, lesson_id: number | string, comment_id: number | string, data: SCCourseCommentType, config?: AxiosRequestConfig): Promise<SCCourseCommentType>;
159
+ /**
160
+ * This endpoint patches a course comment.
161
+ * @param id
162
+ * @param section_id
163
+ * @param lesson_id
164
+ * @param comment_id
165
+ * @param data
166
+ * @param config
167
+ */
168
+ static patchCourseComment(id: number | string, section_id: number | string, lesson_id: number | string, comment_id: number | string, data: SCCourseLessonType, config?: AxiosRequestConfig): Promise<SCCourseCommentType>;
169
+ /**
170
+ * This endpoint deletes a course comment.
171
+ * @param id
172
+ * @param section_id
173
+ * @param lesson_id
174
+ * @param comment_id
175
+ * @param config
176
+ */
177
+ static deleteCourseComment(id: number | string, section_id: number | string, lesson_id: number | string, comment_id: number | string, config?: AxiosRequestConfig): Promise<any>;
178
+ /**
179
+ * This endpoint retrieves a specific course section.
180
+ * @param id
181
+ * @param section_id
182
+ * @param config
183
+ */
184
+ static getCourseSection(id: number | string, section_id: number | string, config?: AxiosRequestConfig): Promise<SCCourseSectionType>;
185
+ /**
186
+ * This endpoint retrieves the course sections.
187
+ * @param id
188
+ * @param config
189
+ */
190
+ static getCourseSections(id: number | string, config?: AxiosRequestConfig): Promise<SCCourseSectionType[]>;
191
+ /**
192
+ * This endpoint creates a course section.
193
+ * @param data
194
+ * @param config
195
+ */
196
+ static createCourseSection(id: number | string, data: CourseSectionParams, config?: AxiosRequestConfig): Promise<SCCourseSectionType>;
197
+ /**
198
+ * This endpoint updates a course section.
199
+ * @param id
200
+ * @param section_id
201
+ * @param data
202
+ * @param config
203
+ */
204
+ static updateCourseSection(id: number | string, section_id: number | string, data: SCCourseSectionType, config?: AxiosRequestConfig): Promise<SCCourseSectionType>;
205
+ /**
206
+ * This endpoint patches a course section.
207
+ * @param id
208
+ * @param section_id
209
+ * @param data
210
+ * @param config
211
+ */
212
+ static patchCourseSection(id: number | string, section_id: number | string, data: SCCourseSectionType, config?: AxiosRequestConfig): Promise<SCCourseSectionType>;
213
+ /**
214
+ * This endpoint deletes a course section.
215
+ * @param id
216
+ * @param section_id
217
+ * @param config
218
+ */
219
+ static deleteCourseSection(id: number | string, section_id: number | string, config?: AxiosRequestConfig): Promise<any>;
220
+ /**
221
+ * This endpoint retrieves a specific course lesson.
222
+ * @param id
223
+ * @param section_id
224
+ * @param lesson_id
225
+ * @param config
226
+ */
227
+ static getCourseLesson(id: number | string, section_id: number | string, lesson_id: number | string, config?: AxiosRequestConfig): Promise<SCCourseLessonType>;
228
+ /**
229
+ * This endpoint retrieves the comments for a specific course lesson.
230
+ * @param id
231
+ * @param section_id
232
+ * @param lesson_id
233
+ * @param params
234
+ * @param config
235
+ */
236
+ static getCourseLessonComments(id: number | string, section_id: number | string, lesson_id: number | string, params?: CourseLessonCommentsParams, config?: AxiosRequestConfig): Promise<SCCourseCommentType[]>;
237
+ /**
238
+ * This endpoint retrieves the course lessons.
239
+ * @param id
240
+ * @param section_id
241
+ * @param config
242
+ */
243
+ static getCourseLessons(id: number | string, section_id: number | string, config?: AxiosRequestConfig): Promise<SCCourseLessonType[]>;
244
+ /**
245
+ * This endpoint creates a course lesson.
246
+ * @param data
247
+ * @param config
248
+ */
249
+ static createCourseLesson(data: SCCourseLessonType, config?: AxiosRequestConfig): Promise<SCCourseLessonType>;
250
+ /**
251
+ * This endpoint updates a course lesson.
252
+ * @param id
253
+ * @param section_id
254
+ * @param lesson_id
255
+ * @param data
256
+ * @param config
257
+ */
258
+ static updateCourseLesson(id: number | string, section_id: number | string, lesson_id: number | string, data: SCCourseLessonType, config?: AxiosRequestConfig): Promise<SCCourseLessonType>;
259
+ /**
260
+ * This endpoint patches a course lesson.
261
+ * @param id
262
+ * @param section_id
263
+ * @param lesson_id
264
+ * @param data
265
+ * @param config
266
+ */
267
+ static patchCourseLesson(id: number | string, section_id: number | string, lesson_id: number | string, data: Partial<SCCourseLessonType>, config?: AxiosRequestConfig): Promise<SCCourseLessonType>;
268
+ /**
269
+ * This endpoint deletes a course lesson.
270
+ * @param id
271
+ * @param section_id
272
+ * @param lesson_id
273
+ * @param config
274
+ */
275
+ static deleteCourseLesson(id: number | string, section_id: number | string, lesson_id: number | string, config?: AxiosRequestConfig): Promise<any>;
276
+ /**
277
+ * This endpoint marks a course lesson as complete.
278
+ * @param id
279
+ * @param section_id
280
+ * @param lesson_id
281
+ * @param config
282
+ */
283
+ static markLessonComplete(id: number | string, section_id: number | string, lesson_id: number | string, config?: AxiosRequestConfig): Promise<any>;
284
+ /**
285
+ * This endpoint marks a course lesson as incomplete.
286
+ * @param id
287
+ * @param section_id
288
+ * @param lesson_id
289
+ * @param config
290
+ */
291
+ static markLessonIncomplete(id: number | string, section_id: number | string, lesson_id: number | string, config?: AxiosRequestConfig): Promise<any>;
292
+ /**
293
+ * This endpoint changes the course avatar
294
+ * @param id
295
+ * @param data
296
+ * @param config
297
+ */
298
+ static changeCourseCover(id: number | string, data: FormData, config?: AxiosRequestConfig): Promise<SCCourseType>;
299
+ /**
300
+ * This endpoint returns all waiting approval subscribers
301
+ * @param id
302
+ * @param params
303
+ * @param config
304
+ */
305
+ static getCourseWaitingApproval(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
306
+ /**
307
+ * This endpoint returns a list of suggested users to invite to the course.
308
+ * @param id
309
+ * @param search
310
+ * @param config
311
+ */
312
+ static getCourseSuggestedUsers(id: number | string, search: string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
313
+ /**
314
+ * This endpoint returns a list of invited users.
315
+ * @param id
316
+ * @param params
317
+ * @param config
318
+ */
319
+ static getCourseInvitedUsers(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
320
+ /**
321
+ * This endpoint returns a list of joined users.
322
+ * @param id
323
+ * @param params
324
+ * @param config
325
+ */
326
+ static getCourseJoinedUsers(id: number | string, params?: CourseUsersParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
327
+ /**
328
+ * This endpoint subscribes to a course.
329
+ * @param id
330
+ * @param config
331
+ */
332
+ static joinOrAcceptInviteToCourse(id: number | string, config?: AxiosRequestConfig): Promise<any>;
333
+ /**
334
+ * This endpoint unsubscribes from a course.
335
+ * @param id
336
+ * @param config
337
+ */
338
+ static leaveOrRemoveCourseRequest(id: number | string, params?: {
339
+ user: number;
340
+ }, config?: AxiosRequestConfig): Promise<any>;
341
+ /**
342
+ * This endpoint allows to invite or accept a course invite.
343
+ * @param id
344
+ * @param data
345
+ * @param config
346
+ */
347
+ static inviteOrAcceptUsersToCourse(id: number | string, data: {
348
+ users: number[];
349
+ }, config?: AxiosRequestConfig): Promise<any>;
350
+ /**
351
+ * This endpoint allows to remove invites.
352
+ * @param id
353
+ * @param data
354
+ * @param config
355
+ */
356
+ static removeInvitationToCourse(id: number | string, data: {
357
+ users: number[];
358
+ }, config?: AxiosRequestConfig): Promise<any>;
359
+ /**
360
+ * This endpoint retrieves the course subscription status.
361
+ * @param id
362
+ * @param config
363
+ */
364
+ static getCourseStatus(id: number | string, config?: AxiosRequestConfig): Promise<any>;
365
+ }
366
+ /**
367
+ *
368
+ :::tip Incubator service can be used in the following way:
369
+
370
+ ```jsx
371
+ 1. Import the service from our library:
372
+
373
+ import {CourseService} from "@selfcommunity/api-services";
374
+ ```
375
+ ```jsx
376
+ 2. Create a function and put the service inside it!
377
+ The async function `searchCourses` will return the events matching the search query.
378
+
379
+ async searchCourses() {
380
+ return await CourseService.searchCourses();
381
+ }
382
+ ```
383
+ ```jsx
384
+ In case of required `params`, just add them inside the brackets.
385
+
386
+ async getSpecificCourseInfo(eventId) {
387
+ return await CourseService.getSpecificCourseInfo(eventId);
388
+ }
389
+ ```
390
+ ```jsx
391
+ If you need to customize the request, you can add optional config params (`AxiosRequestConfig` type).
392
+
393
+ 1. Declare it(or declare them, it is possible to add multiple params)
394
+
395
+ const headers = headers: {Authorization: `Bearer ${yourToken}`}
396
+
397
+ 2. Add it inside the brackets and pass it to the function, as shown in the previous example!
398
+ ```
399
+ :::
400
+ */
401
+ export default class CourseService {
402
+ static changeCourseUserRole(id: number | string, data: CourseUserRoleParams, config?: AxiosRequestConfig): Promise<any>;
403
+ static getJoinedCourses(params?: CourseUserParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCourseType>>;
404
+ static getUserJoinedCourses(id: number | string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCourseType>>;
405
+ static searchCourses(params?: CourseSearchParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCourseType>>;
406
+ static getSpecificCourseInfo(id: number | string, params?: CourseInfoParams, config?: AxiosRequestConfig): Promise<SCCourseType>;
407
+ static getCourseDashboardUsers(id: number | string, params?: CourseDashboardUsersParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
408
+ static createCourse(data: CourseCreateParams | FormData, config?: AxiosRequestConfig): Promise<SCCourseType>;
409
+ static updateCourse(id: number | string, data: SCCourseType, config?: AxiosRequestConfig): Promise<SCCourseType>;
410
+ static patchCourse(id: number | string, data: Partial<SCCourseType>, config?: AxiosRequestConfig): Promise<SCCourseType>;
411
+ static deleteCourse(id: number | string, config?: AxiosRequestConfig): Promise<any>;
412
+ static getCourseLessonComment(id: number | string, section_id: number | string, lesson_id: number | string, comment_id: number | string, config?: AxiosRequestConfig): Promise<SCCourseCommentType>;
413
+ static getCourseComments(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCourseCommentType>>;
414
+ static createCourseComment(id: number | string, section_id: number | string, lesson_id: number | string, data: SCCourseCommentType, config?: AxiosRequestConfig): Promise<SCCourseCommentType>;
415
+ static updateCourseComment(id: number | string, section_id: number | string, lesson_id: number | string, comment_id: number | string, data: SCCourseCommentType, config?: AxiosRequestConfig): Promise<SCCourseCommentType>;
416
+ static patchCourseComment(id: number | string, section_id: number | string, lesson_id: number | string, comment_id: number | string, data: SCCourseLessonType, config?: AxiosRequestConfig): Promise<SCCourseCommentType>;
417
+ static deleteCourseComment(id: number | string, section_id: number | string, lesson_id: number | string, comment_id: number | string, config?: AxiosRequestConfig): Promise<any>;
418
+ static getCourseSection(id: number | string, section_id: number | string, config?: AxiosRequestConfig): Promise<SCCourseSectionType>;
419
+ static getCourseSections(id: number | string, config?: AxiosRequestConfig): Promise<SCCourseSectionType[]>;
420
+ static createCourseSection(id: number | string, data: CourseSectionParams, config?: AxiosRequestConfig): Promise<SCCourseSectionType>;
421
+ static updateCourseSection(id: number | string, section_id: number | string, data: SCCourseSectionType, config?: AxiosRequestConfig): Promise<SCCourseSectionType>;
422
+ static patchCourseSection(id: number | string, section_id: number | string, data: SCCourseSectionType, config?: AxiosRequestConfig): Promise<SCCourseSectionType>;
423
+ static deleteCourseSection(id: number | string, section_id: number | string, config?: AxiosRequestConfig): Promise<any>;
424
+ static getCourseLesson(id: number | string, section_id: number | string, lesson_id: number | string, config?: AxiosRequestConfig): Promise<SCCourseLessonType>;
425
+ static getCourseLessonComments(id: number | string, section_id: number | string, lesson_id: number | string, params?: CourseLessonCommentsParams, config?: AxiosRequestConfig): Promise<SCCourseCommentType[]>;
426
+ static getCourseLessons(id: number | string, section_id: number | string, config?: AxiosRequestConfig): Promise<SCCourseLessonType[]>;
427
+ static createCourseLesson(data: SCCourseLessonType, config?: AxiosRequestConfig): Promise<SCCourseLessonType>;
428
+ static updateCourseLesson(id: number | string, section_id: number | string, lesson_id: number | string, data: SCCourseLessonType, config?: AxiosRequestConfig): Promise<SCCourseLessonType>;
429
+ static patchCourseLesson(id: number | string, section_id: number | string, lesson_id: number | string, data: Partial<SCCourseLessonType>, config?: AxiosRequestConfig): Promise<SCCourseLessonType>;
430
+ static deleteCourseLesson(id: number | string, section_id: number | string, lesson_id: number | string, config?: AxiosRequestConfig): Promise<any>;
431
+ static markLessonComplete(id: number | string, section_id: number | string, lesson_id: number | string, config?: AxiosRequestConfig): Promise<any>;
432
+ static markLessonIncomplete(id: number | string, section_id: number | string, lesson_id: number | string, config?: AxiosRequestConfig): Promise<any>;
433
+ static changeCourseCover(id: number | string, data: FormData, config?: AxiosRequestConfig): Promise<SCCourseType>;
434
+ static getCourseWaitingApproval(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
435
+ static getCourseSuggestedUsers(id: number | string, search: string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
436
+ static getCourseInvitedUsers(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
437
+ static getCourseJoinedUsers(id: number | string, params?: CourseUsersParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
438
+ static joinOrAcceptInviteToCourse(id: number | string, config?: AxiosRequestConfig): Promise<any>;
439
+ static leaveOrRemoveCourseRequest(id: number | string, params?: {
440
+ user: number;
441
+ }, config?: AxiosRequestConfig): Promise<any>;
442
+ static inviteOrAcceptUsersToCourse(id: number | string, data: {
443
+ users: number[];
444
+ }, config?: AxiosRequestConfig): Promise<any>;
445
+ static removeInvitationToCourse(id: number | string, data: {
446
+ users: number[];
447
+ }, config?: AxiosRequestConfig): Promise<any>;
448
+ static getCourseStatus(id: number | string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<any>>;
449
+ }