@selfcommunity/api-services 0.6.7-payments.168 → 0.6.7-payments.175
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SCCourseCommentType, SCCourseLessonType, SCCourseSectionType, SCCourseType, SCUserType } from '@selfcommunity/types';
|
|
2
2
|
import { AxiosRequestConfig } from 'axios';
|
|
3
|
-
import { BaseGetParams, CourseCreateParams, CourseDashboardUsersParams, CourseInfoParams, CourseLessonCommentsParams, CourseSearchParams, CourseUserRoleParams, CourseUsersParams, SCPaginatedResponse } from '../../types';
|
|
3
|
+
import { BaseGetParams, BaseSearchParams, CourseCreateParams, CourseDashboardUsersParams, CourseInfoParams, CourseLessonCommentsParams, CourseSearchParams, CourseUserRoleParams, CourseUsersParams, SCPaginatedResponse } from '../../types';
|
|
4
4
|
import { CourseSectionParams, CourseUserParams } from '../../types/course';
|
|
5
5
|
export interface CourseApiClientInterface {
|
|
6
6
|
changeCourseUserRole(id: number | string, data: CourseUserRoleParams, config?: AxiosRequestConfig): Promise<any>;
|
|
@@ -10,8 +10,8 @@ export interface CourseApiClientInterface {
|
|
|
10
10
|
getSpecificCourseInfo(id: number | string, params?: CourseInfoParams, config?: AxiosRequestConfig): Promise<SCCourseType>;
|
|
11
11
|
getCourseDashboardUsers(id: number | string, params?: CourseDashboardUsersParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
|
|
12
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
|
|
13
|
+
updateCourse(id: number | string, data: SCCourseType | FormData, config?: AxiosRequestConfig): Promise<SCCourseType>;
|
|
14
|
+
patchCourse(id: number | string, data: Partial<SCCourseType> | FormData, config?: AxiosRequestConfig): Promise<SCCourseType>;
|
|
15
15
|
deleteCourse(id: number | string, config?: AxiosRequestConfig): Promise<any>;
|
|
16
16
|
getCourseLessonComment(id: number | string, section_id: number | string, lesson_id: number | string, comment_id: number | string, config?: AxiosRequestConfig): Promise<SCCourseCommentType>;
|
|
17
17
|
getCourseComments(id: number | string, course_id: number | string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCourseCommentType>>;
|
|
@@ -39,7 +39,7 @@ export interface CourseApiClientInterface {
|
|
|
39
39
|
getCourseSuggestedUsers(id: number | string, search: string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
|
|
40
40
|
getCourseInvitedUsers(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
|
|
41
41
|
getCourseJoinedUsers(id: number | string, params?: CourseUsersParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
|
|
42
|
-
joinOrAcceptInviteToCourse(id: number | string, config?: AxiosRequestConfig): Promise<
|
|
42
|
+
joinOrAcceptInviteToCourse(id: number | string, config?: AxiosRequestConfig): Promise<SCCourseType>;
|
|
43
43
|
leaveOrRemoveCourseRequest(id: number | string, params?: {
|
|
44
44
|
user: number;
|
|
45
45
|
}, config?: AxiosRequestConfig): Promise<any>;
|
|
@@ -108,14 +108,14 @@ export declare class CourseApiClient {
|
|
|
108
108
|
* @param data
|
|
109
109
|
* @param config
|
|
110
110
|
*/
|
|
111
|
-
static updateCourse(id: number | string, data: SCCourseType, config?: AxiosRequestConfig): Promise<SCCourseType>;
|
|
111
|
+
static updateCourse(id: number | string, data: SCCourseType | FormData, config?: AxiosRequestConfig): Promise<SCCourseType>;
|
|
112
112
|
/**
|
|
113
113
|
* This endpoint patches a course.
|
|
114
114
|
* @param id
|
|
115
115
|
* @param data
|
|
116
116
|
* @param config
|
|
117
117
|
*/
|
|
118
|
-
static patchCourse(id: number | string, data: Partial<SCCourseType
|
|
118
|
+
static patchCourse(id: number | string, data: Partial<SCCourseType> | FormData, config?: AxiosRequestConfig): Promise<SCCourseType>;
|
|
119
119
|
/**
|
|
120
120
|
* This endpoint deletes a course.
|
|
121
121
|
* @param id
|
|
@@ -330,7 +330,7 @@ export declare class CourseApiClient {
|
|
|
330
330
|
* @param id
|
|
331
331
|
* @param config
|
|
332
332
|
*/
|
|
333
|
-
static joinOrAcceptInviteToCourse(id: number | string, config?: AxiosRequestConfig): Promise<
|
|
333
|
+
static joinOrAcceptInviteToCourse(id: number | string, config?: AxiosRequestConfig): Promise<SCCourseType>;
|
|
334
334
|
/**
|
|
335
335
|
* This endpoint unsubscribes from a course.
|
|
336
336
|
* @param id
|
|
@@ -407,8 +407,8 @@ export default class CourseService {
|
|
|
407
407
|
static getSpecificCourseInfo(id: number | string, params?: CourseInfoParams, config?: AxiosRequestConfig): Promise<SCCourseType>;
|
|
408
408
|
static getCourseDashboardUsers(id: number | string, params?: CourseDashboardUsersParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
|
|
409
409
|
static createCourse(data: CourseCreateParams | FormData, config?: AxiosRequestConfig): Promise<SCCourseType>;
|
|
410
|
-
static updateCourse(id: number | string, data: SCCourseType, config?: AxiosRequestConfig): Promise<SCCourseType>;
|
|
411
|
-
static patchCourse(id: number | string, data: Partial<SCCourseType
|
|
410
|
+
static updateCourse(id: number | string, data: SCCourseType | FormData, config?: AxiosRequestConfig): Promise<SCCourseType>;
|
|
411
|
+
static patchCourse(id: number | string, data: Partial<SCCourseType> | FormData, config?: AxiosRequestConfig): Promise<SCCourseType>;
|
|
412
412
|
static deleteCourse(id: number | string, config?: AxiosRequestConfig): Promise<any>;
|
|
413
413
|
static getCourseLessonComment(id: number | string, section_id: number | string, lesson_id: number | string, comment_id: number | string, config?: AxiosRequestConfig): Promise<SCCourseCommentType>;
|
|
414
414
|
static getCourseComments(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCourseCommentType>>;
|
|
@@ -432,11 +432,11 @@ export default class CourseService {
|
|
|
432
432
|
static markLessonComplete(id: number | string, section_id: number | string, lesson_id: number | string, config?: AxiosRequestConfig): Promise<any>;
|
|
433
433
|
static markLessonIncomplete(id: number | string, section_id: number | string, lesson_id: number | string, config?: AxiosRequestConfig): Promise<any>;
|
|
434
434
|
static changeCourseCover(id: number | string, data: FormData, config?: AxiosRequestConfig): Promise<SCCourseType>;
|
|
435
|
-
static getCourseWaitingApproval(id: number | string, params?:
|
|
435
|
+
static getCourseWaitingApproval(id: number | string, params?: BaseSearchParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
|
|
436
436
|
static getCourseSuggestedUsers(id: number | string, search: string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
|
|
437
437
|
static getCourseInvitedUsers(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
|
|
438
438
|
static getCourseJoinedUsers(id: number | string, params?: CourseUsersParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
|
|
439
|
-
static joinOrAcceptInviteToCourse(id: number | string, config?: AxiosRequestConfig): Promise<
|
|
439
|
+
static joinOrAcceptInviteToCourse(id: number | string, config?: AxiosRequestConfig): Promise<SCCourseType>;
|
|
440
440
|
static leaveOrRemoveCourseRequest(id: number | string, params?: {
|
|
441
441
|
user: number;
|
|
442
442
|
}, config?: AxiosRequestConfig): Promise<any>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* CourseCreateParams interface
|
|
3
3
|
*/
|
|
4
|
-
import { SCCoursePrivacyType, SCCourseJoinStatusType, SCCourseTypologyType } from '@selfcommunity/types';
|
|
4
|
+
import { SCCoursePrivacyType, SCCourseJoinStatusType, SCCourseTypologyType, SCCourseOrderingUsersType } from '@selfcommunity/types';
|
|
5
5
|
import { BaseGetParams, BaseSearchParams } from './baseParams';
|
|
6
6
|
export interface CourseCreateParams {
|
|
7
7
|
/**
|
|
@@ -120,4 +120,8 @@ export interface CourseDashboardUsersParams extends BaseSearchParams {
|
|
|
120
120
|
* Filter by join_status; default: ["manager", "joined"]
|
|
121
121
|
*/
|
|
122
122
|
statuses?: SCCourseJoinStatusType[];
|
|
123
|
+
/**
|
|
124
|
+
* The order of the users. Default to -joined_at
|
|
125
|
+
*/
|
|
126
|
+
ordering?: SCCourseOrderingUsersType;
|
|
123
127
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SCCourseCommentType, SCCourseLessonType, SCCourseSectionType, SCCourseType, SCUserType } from '@selfcommunity/types';
|
|
2
2
|
import { AxiosRequestConfig } from 'axios';
|
|
3
|
-
import { BaseGetParams, CourseCreateParams, CourseDashboardUsersParams, CourseInfoParams, CourseLessonCommentsParams, CourseSearchParams, CourseUserRoleParams, CourseUsersParams, SCPaginatedResponse } from '../../types';
|
|
3
|
+
import { BaseGetParams, BaseSearchParams, CourseCreateParams, CourseDashboardUsersParams, CourseInfoParams, CourseLessonCommentsParams, CourseSearchParams, CourseUserRoleParams, CourseUsersParams, SCPaginatedResponse } from '../../types';
|
|
4
4
|
import { CourseSectionParams, CourseUserParams } from '../../types/course';
|
|
5
5
|
export interface CourseApiClientInterface {
|
|
6
6
|
changeCourseUserRole(id: number | string, data: CourseUserRoleParams, config?: AxiosRequestConfig): Promise<any>;
|
|
@@ -10,8 +10,8 @@ export interface CourseApiClientInterface {
|
|
|
10
10
|
getSpecificCourseInfo(id: number | string, params?: CourseInfoParams, config?: AxiosRequestConfig): Promise<SCCourseType>;
|
|
11
11
|
getCourseDashboardUsers(id: number | string, params?: CourseDashboardUsersParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
|
|
12
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
|
|
13
|
+
updateCourse(id: number | string, data: SCCourseType | FormData, config?: AxiosRequestConfig): Promise<SCCourseType>;
|
|
14
|
+
patchCourse(id: number | string, data: Partial<SCCourseType> | FormData, config?: AxiosRequestConfig): Promise<SCCourseType>;
|
|
15
15
|
deleteCourse(id: number | string, config?: AxiosRequestConfig): Promise<any>;
|
|
16
16
|
getCourseLessonComment(id: number | string, section_id: number | string, lesson_id: number | string, comment_id: number | string, config?: AxiosRequestConfig): Promise<SCCourseCommentType>;
|
|
17
17
|
getCourseComments(id: number | string, course_id: number | string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCourseCommentType>>;
|
|
@@ -39,7 +39,7 @@ export interface CourseApiClientInterface {
|
|
|
39
39
|
getCourseSuggestedUsers(id: number | string, search: string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
|
|
40
40
|
getCourseInvitedUsers(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
|
|
41
41
|
getCourseJoinedUsers(id: number | string, params?: CourseUsersParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
|
|
42
|
-
joinOrAcceptInviteToCourse(id: number | string, config?: AxiosRequestConfig): Promise<
|
|
42
|
+
joinOrAcceptInviteToCourse(id: number | string, config?: AxiosRequestConfig): Promise<SCCourseType>;
|
|
43
43
|
leaveOrRemoveCourseRequest(id: number | string, params?: {
|
|
44
44
|
user: number;
|
|
45
45
|
}, config?: AxiosRequestConfig): Promise<any>;
|
|
@@ -108,14 +108,14 @@ export declare class CourseApiClient {
|
|
|
108
108
|
* @param data
|
|
109
109
|
* @param config
|
|
110
110
|
*/
|
|
111
|
-
static updateCourse(id: number | string, data: SCCourseType, config?: AxiosRequestConfig): Promise<SCCourseType>;
|
|
111
|
+
static updateCourse(id: number | string, data: SCCourseType | FormData, config?: AxiosRequestConfig): Promise<SCCourseType>;
|
|
112
112
|
/**
|
|
113
113
|
* This endpoint patches a course.
|
|
114
114
|
* @param id
|
|
115
115
|
* @param data
|
|
116
116
|
* @param config
|
|
117
117
|
*/
|
|
118
|
-
static patchCourse(id: number | string, data: Partial<SCCourseType
|
|
118
|
+
static patchCourse(id: number | string, data: Partial<SCCourseType> | FormData, config?: AxiosRequestConfig): Promise<SCCourseType>;
|
|
119
119
|
/**
|
|
120
120
|
* This endpoint deletes a course.
|
|
121
121
|
* @param id
|
|
@@ -330,7 +330,7 @@ export declare class CourseApiClient {
|
|
|
330
330
|
* @param id
|
|
331
331
|
* @param config
|
|
332
332
|
*/
|
|
333
|
-
static joinOrAcceptInviteToCourse(id: number | string, config?: AxiosRequestConfig): Promise<
|
|
333
|
+
static joinOrAcceptInviteToCourse(id: number | string, config?: AxiosRequestConfig): Promise<SCCourseType>;
|
|
334
334
|
/**
|
|
335
335
|
* This endpoint unsubscribes from a course.
|
|
336
336
|
* @param id
|
|
@@ -407,8 +407,8 @@ export default class CourseService {
|
|
|
407
407
|
static getSpecificCourseInfo(id: number | string, params?: CourseInfoParams, config?: AxiosRequestConfig): Promise<SCCourseType>;
|
|
408
408
|
static getCourseDashboardUsers(id: number | string, params?: CourseDashboardUsersParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
|
|
409
409
|
static createCourse(data: CourseCreateParams | FormData, config?: AxiosRequestConfig): Promise<SCCourseType>;
|
|
410
|
-
static updateCourse(id: number | string, data: SCCourseType, config?: AxiosRequestConfig): Promise<SCCourseType>;
|
|
411
|
-
static patchCourse(id: number | string, data: Partial<SCCourseType
|
|
410
|
+
static updateCourse(id: number | string, data: SCCourseType | FormData, config?: AxiosRequestConfig): Promise<SCCourseType>;
|
|
411
|
+
static patchCourse(id: number | string, data: Partial<SCCourseType> | FormData, config?: AxiosRequestConfig): Promise<SCCourseType>;
|
|
412
412
|
static deleteCourse(id: number | string, config?: AxiosRequestConfig): Promise<any>;
|
|
413
413
|
static getCourseLessonComment(id: number | string, section_id: number | string, lesson_id: number | string, comment_id: number | string, config?: AxiosRequestConfig): Promise<SCCourseCommentType>;
|
|
414
414
|
static getCourseComments(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCCourseCommentType>>;
|
|
@@ -432,11 +432,11 @@ export default class CourseService {
|
|
|
432
432
|
static markLessonComplete(id: number | string, section_id: number | string, lesson_id: number | string, config?: AxiosRequestConfig): Promise<any>;
|
|
433
433
|
static markLessonIncomplete(id: number | string, section_id: number | string, lesson_id: number | string, config?: AxiosRequestConfig): Promise<any>;
|
|
434
434
|
static changeCourseCover(id: number | string, data: FormData, config?: AxiosRequestConfig): Promise<SCCourseType>;
|
|
435
|
-
static getCourseWaitingApproval(id: number | string, params?:
|
|
435
|
+
static getCourseWaitingApproval(id: number | string, params?: BaseSearchParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
|
|
436
436
|
static getCourseSuggestedUsers(id: number | string, search: string, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
|
|
437
437
|
static getCourseInvitedUsers(id: number | string, params?: BaseGetParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
|
|
438
438
|
static getCourseJoinedUsers(id: number | string, params?: CourseUsersParams, config?: AxiosRequestConfig): Promise<SCPaginatedResponse<SCUserType>>;
|
|
439
|
-
static joinOrAcceptInviteToCourse(id: number | string, config?: AxiosRequestConfig): Promise<
|
|
439
|
+
static joinOrAcceptInviteToCourse(id: number | string, config?: AxiosRequestConfig): Promise<SCCourseType>;
|
|
440
440
|
static leaveOrRemoveCourseRequest(id: number | string, params?: {
|
|
441
441
|
user: number;
|
|
442
442
|
}, config?: AxiosRequestConfig): Promise<any>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* CourseCreateParams interface
|
|
3
3
|
*/
|
|
4
|
-
import { SCCoursePrivacyType, SCCourseJoinStatusType, SCCourseTypologyType } from '@selfcommunity/types';
|
|
4
|
+
import { SCCoursePrivacyType, SCCourseJoinStatusType, SCCourseTypologyType, SCCourseOrderingUsersType } from '@selfcommunity/types';
|
|
5
5
|
import { BaseGetParams, BaseSearchParams } from './baseParams';
|
|
6
6
|
export interface CourseCreateParams {
|
|
7
7
|
/**
|
|
@@ -120,4 +120,8 @@ export interface CourseDashboardUsersParams extends BaseSearchParams {
|
|
|
120
120
|
* Filter by join_status; default: ["manager", "joined"]
|
|
121
121
|
*/
|
|
122
122
|
statuses?: SCCourseJoinStatusType[];
|
|
123
|
+
/**
|
|
124
|
+
* The order of the users. Default to -joined_at
|
|
125
|
+
*/
|
|
126
|
+
ordering?: SCCourseOrderingUsersType;
|
|
123
127
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@selfcommunity/api-services",
|
|
3
|
-
"version": "0.6.7-payments.
|
|
3
|
+
"version": "0.6.7-payments.175+17e4c863a",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "./lib/cjs/index.js",
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@selfcommunity/types": "0.7.7-payments.
|
|
62
|
-
"@selfcommunity/utils": "0.2.64-payments.
|
|
61
|
+
"@selfcommunity/types": "0.7.7-payments.175+17e4c863a",
|
|
62
|
+
"@selfcommunity/utils": "0.2.64-payments.175+17e4c863a",
|
|
63
63
|
"axios": "^1.4.0",
|
|
64
64
|
"jose": "^4.14.4"
|
|
65
65
|
},
|
|
@@ -115,5 +115,5 @@
|
|
|
115
115
|
"bugs": {
|
|
116
116
|
"url": "https://github.com/selfcommunity/community-js/issues"
|
|
117
117
|
},
|
|
118
|
-
"gitHead": "
|
|
118
|
+
"gitHead": "17e4c863a5fd49f8508adf49d3287c850ee1ff6c"
|
|
119
119
|
}
|