@x-edu/service 0.0.1

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/README.md ADDED
File without changes
@@ -0,0 +1,22 @@
1
+ declare const config: {
2
+ 'ncet-xedu': {
3
+ 'x-proxy': string;
4
+ recommend: string;
5
+ 'e-assessment-api': string;
6
+ 'x-cloud-web': string;
7
+ 'x-feedback': string;
8
+ 'cs-feedback': string;
9
+ 'e-favorite-api': string;
10
+ 'x-study-record': string;
11
+ };
12
+ preproduction: {
13
+ 'x-proxy': string;
14
+ 'x-cloud-web': string;
15
+ 'x-feedback': string;
16
+ 'x-feedback-gray': string;
17
+ 'cs-feedback': string;
18
+ 'e-favorite-api': string;
19
+ 'x-study-record': string;
20
+ };
21
+ };
22
+ export default config;
@@ -0,0 +1,36 @@
1
+ declare class Service {
2
+ env: 'ncet-xedu' | 'preproduction';
3
+ uc: any;
4
+ request: any;
5
+ service: any;
6
+ rawAPI: any;
7
+ recommend: any;
8
+ sdpAppId?: string;
9
+ private static instance;
10
+ constructor(props: any);
11
+ static getInstance(ucInstance: any): Service;
12
+ setUC(ucInstance: any): void;
13
+ init(): void;
14
+ }
15
+ export default Service;
16
+ export declare const serviceConfig: {
17
+ 'ncet-xedu': {
18
+ 'x-proxy': string;
19
+ recommend: string;
20
+ 'e-assessment-api': string;
21
+ 'x-cloud-web': string;
22
+ 'x-feedback': string;
23
+ 'cs-feedback': string;
24
+ 'e-favorite-api': string;
25
+ 'x-study-record': string;
26
+ };
27
+ preproduction: {
28
+ 'x-proxy': string;
29
+ 'x-cloud-web': string;
30
+ 'x-feedback': string;
31
+ 'x-feedback-gray': string;
32
+ 'cs-feedback': string;
33
+ 'e-favorite-api': string;
34
+ 'x-study-record': string;
35
+ };
36
+ };
@@ -0,0 +1,4 @@
1
+ export declare const assessmentAPI: ({ uc, env, }: {
2
+ uc: any;
3
+ env: any;
4
+ }) => import('../../node_modules/@x-edu/functions/dist/request/interface').RequestInstance;
@@ -0,0 +1,12 @@
1
+ export declare const favoriteCommonAPI: ({ uc, env, }: {
2
+ uc: any;
3
+ env: any;
4
+ }) => import('../../node_modules/@x-edu/functions/dist/request/interface').RequestInstance;
5
+ export declare const favoriteAuthAPI: ({ uc, env, }: {
6
+ uc: any;
7
+ env: any;
8
+ }) => import('../../node_modules/@x-edu/functions/dist/request/interface').RequestInstance;
9
+ export declare const favoriteAuthAPIWithError: ({ uc, env, }: {
10
+ uc: any;
11
+ env: any;
12
+ }) => import('../../node_modules/@x-edu/functions/dist/request/interface').RequestInstance;
@@ -0,0 +1,2 @@
1
+ export declare const parseParams: (params: any) => any;
2
+ export declare function getApi({ uc, host, prefix, params, throwError, sdpAppId }: any): import('../../node_modules/@x-edu/functions/dist/request/interface').RequestInstance;
@@ -0,0 +1,2 @@
1
+ declare const api: import('../../node_modules/@x-edu/functions/dist/request/interface').RequestInstance;
2
+ export default api;
@@ -0,0 +1,4 @@
1
+ export declare const recommendAPIV2: ({ uc, env, }: {
2
+ uc: any;
3
+ env: any;
4
+ }) => import('../../node_modules/@x-edu/functions/dist/request/interface').RequestInstance;
@@ -0,0 +1,4 @@
1
+ export declare const xCloudWebAPI: ({ uc, env, }: {
2
+ uc: any;
3
+ env: any;
4
+ }) => import('../../node_modules/@x-edu/functions/dist/request/interface').RequestInstance;
@@ -0,0 +1,8 @@
1
+ export declare const xFeddbackCommonAPI: ({ uc, env, }: {
2
+ uc: any;
3
+ env: any;
4
+ }) => import('../../node_modules/@x-edu/functions/dist/request/interface').RequestInstance;
5
+ export declare const xFeddbackAuthAPI: ({ uc, env, }: {
6
+ uc: any;
7
+ env: any;
8
+ }) => import('../../node_modules/@x-edu/functions/dist/request/interface').RequestInstance;
@@ -0,0 +1,12 @@
1
+ export declare const xProxyCloudAPI: ({ env, uc }: {
2
+ env: any;
3
+ uc: any;
4
+ }) => import('../../node_modules/@x-edu/functions/dist/request/interface').RequestInstance;
5
+ export declare const xProxyAssessmentAPI: ({ env, uc }: {
6
+ env: any;
7
+ uc: any;
8
+ }) => import('../../node_modules/@x-edu/functions/dist/request/interface').RequestInstance;
9
+ export declare const xProxyRecommendAPI: ({ env, uc }: {
10
+ env: any;
11
+ uc: any;
12
+ }) => import('../../node_modules/@x-edu/functions/dist/request/interface').RequestInstance;
@@ -0,0 +1,4 @@
1
+ export declare const xStudyRecordAPI: ({ uc, env, }: {
2
+ uc: any;
3
+ env: any;
4
+ }) => import('../../node_modules/@x-edu/functions/dist/request/interface').RequestInstance;
@@ -0,0 +1,26 @@
1
+ declare class Assessment {
2
+ request: any;
3
+ constructor(props: any);
4
+ getAssessmentRate: ({ assessmentId, assessmentType, userInfo }: {
5
+ assessmentId: any;
6
+ assessmentType?: string | undefined;
7
+ userInfo: any;
8
+ }) => Promise<any>;
9
+ getUserAssessmentRate: ({ assessmentId, assessmentType, userInfo }: {
10
+ assessmentId: any;
11
+ assessmentType?: string | undefined;
12
+ userInfo: any;
13
+ }) => Promise<any>;
14
+ /** 提交用户评价
15
+ * @param assessmentId: 评价对象(课程id)
16
+ * @param score: 评分
17
+ * @param assessment_type: 评价对象资源类型(默认course,前后端暂时都没有用这个字段,建议传递资源类型字段x_course(课本),x_class_hour_activity(课程也就是课时),t_course(教师研修),t_course_pdf(教师研修下的Pdf资源),x_audio_video,x_url,x_image_list,x_document,x_article
18
+ */
19
+ submitUserAssessmentRate: ({ assessmentId, score, assessmentType, userInfo }: {
20
+ assessmentId: any;
21
+ score: any;
22
+ assessmentType?: string | undefined;
23
+ userInfo: any;
24
+ }) => Promise<any>;
25
+ }
26
+ export default Assessment;
@@ -0,0 +1,31 @@
1
+ declare class Favorite {
2
+ request: any;
3
+ constructor(props: any);
4
+ getMyCollections: (params: any) => Promise<any>;
5
+ isCollection: ({ contentId, contentType }: {
6
+ contentId: any;
7
+ contentType: any;
8
+ }) => Promise<any>;
9
+ addCollection: ({ contentId, contentType, content, userContent, collectionId }: {
10
+ contentId: any;
11
+ contentType: any;
12
+ content: any;
13
+ userContent: any;
14
+ collectionId: any;
15
+ }) => Promise<any>;
16
+ delCollection: ({ contentId, contentType, clientId }: {
17
+ contentId: any;
18
+ contentType: any;
19
+ clientId: any;
20
+ }) => Promise<any>;
21
+ addFavorites: ({ name }: {
22
+ name: any;
23
+ }) => Promise<any>;
24
+ updateFavorites: ({ id, name }: {
25
+ id: any;
26
+ name: any;
27
+ }) => Promise<any>;
28
+ delFavorites: (id: any) => Promise<any>;
29
+ getFavorites: (params: any) => Promise<string | null>;
30
+ }
31
+ export default Favorite;
@@ -0,0 +1,9 @@
1
+ declare class Feedback {
2
+ request: any;
3
+ constructor(props: any);
4
+ getCsToken: () => Promise<any>;
5
+ getChannelTypes: () => Promise<any>;
6
+ getContentTypes: () => Promise<any>;
7
+ uploadFeedback: (body?: {}) => Promise<any>;
8
+ }
9
+ export default Feedback;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * 点赞
3
+ */
4
+ declare class Like {
5
+ request: any;
6
+ constructor(props: any);
7
+ getResourceLikes: ({ resId, type }: {
8
+ resId: any;
9
+ type: any;
10
+ }) => Promise<any>;
11
+ postResourceLikes: ({ resId, type }: {
12
+ resId: any;
13
+ type?: string | undefined;
14
+ }) => Promise<void>;
15
+ }
16
+ export default Like;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * 资源统计
3
+ */
4
+ declare class Stat {
5
+ request: any;
6
+ constructor(props: any);
7
+ getResourceStat: (resIds: any) => Promise<any>;
8
+ }
9
+ export default Stat;
@@ -0,0 +1,36 @@
1
+ declare class StudyRecord {
2
+ request: any;
3
+ constructor(props: any);
4
+ /**
5
+ * 获取学习位置
6
+ */
7
+ getLearningPosition: ({ resourceId, userId }: {
8
+ resourceId: any;
9
+ userId: any;
10
+ }) => Promise<any>;
11
+ /**
12
+ * 报告学习位置
13
+ */
14
+ reportLearningPosition: ({ resourceId, userId, position }: {
15
+ resourceId: any;
16
+ userId: any;
17
+ position: any;
18
+ }) => Promise<any>;
19
+ /**
20
+ * 获取学习进度列表
21
+ * @param {Object} params
22
+ * @return {Object} { total, items } | {} // total: 总数,items:当前页的资源数据
23
+ */
24
+ getLearningProgress: ({ resourceId, userId }: {
25
+ resourceId: any;
26
+ userId: any;
27
+ }) => Promise<any>;
28
+ /**
29
+ * 报告学习进度
30
+ * https://wiki.doc.101.com/index.php?title=X%E5%AD%A6%E4%B9%A0%E9%A1%B9%E7%9B%AE%E6%B5%8F%E8%A7%88%E5%8E%86%E5%8F%B2
31
+ * @param {Object} body
32
+ * @return {void}
33
+ */
34
+ reportLearningProgress: (body: any) => Promise<void>;
35
+ }
36
+ export default StudyRecord;