@hddjs/hdd-cloud-types 1.0.13-SNAPSHOT → 1.0.15-SNAPSHOT.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.
Files changed (47) hide show
  1. package/HddCloud/common/index.d.ts +4 -4
  2. package/HddCloud/index.d.ts +59 -59
  3. package/README.md +2 -2
  4. package/hdd-ai-cloud/common/AISceneEnum.d.ts +54 -54
  5. package/hdd-ai-cloud/common/IAliFcContext.d.ts +5 -5
  6. package/hdd-ai-cloud/common/{ICallUniCloudParams.ts → ICallUniCloudParams.d.ts} +20 -20
  7. package/hdd-ai-cloud/common/IChatAiMessageItem.d.ts +23 -23
  8. package/hdd-ai-cloud/common/ICommonError.d.ts +13 -13
  9. package/hdd-ai-cloud/common/ICommonReqRes.d.ts +23 -23
  10. package/hdd-ai-cloud/common/{ICommonRequstHead.ts → ICommonRequstHead.d.ts} +17 -17
  11. package/hdd-ai-cloud/common/IConfigInfo.d.ts +7 -7
  12. package/hdd-ai-cloud/common/ICounselor.d.ts +4 -4
  13. package/hdd-ai-cloud/common/ICounselorType.d.ts +23 -23
  14. package/hdd-ai-cloud/common/IFormatCutOffCollegeData.d.ts +29 -29
  15. package/hdd-ai-cloud/common/IFormatGaokaoBasicInfo.d.ts +67 -67
  16. package/hdd-ai-cloud/common/{IFormatProfessional.ts → IFormatProfessional.d.ts} +29 -29
  17. package/hdd-ai-cloud/common/IGetRecommendSchool.d.ts +93 -93
  18. package/hdd-ai-cloud/common/IInquiryBasicInfo.d.ts +43 -43
  19. package/hdd-ai-cloud/common/IInquirySession.d.ts +33 -25
  20. package/hdd-ai-cloud/common/IPicture.d.ts +13 -13
  21. package/hdd-ai-cloud/common/IReportData.d.ts +151 -151
  22. package/hdd-ai-cloud/common/IReportInfo.d.ts +33 -33
  23. package/hdd-ai-cloud/common/IReportResult.d.ts +23 -23
  24. package/hdd-ai-cloud/common/ISceneAiConfig.d.ts +27 -27
  25. package/hdd-ai-cloud/common/IScoreRank.d.ts +18 -18
  26. package/hdd-ai-cloud/common/ISelectSubject.d.ts +29 -29
  27. package/hdd-ai-cloud/common/ISessionContent.d.ts +518 -31
  28. package/hdd-ai-cloud/common/ISessionRole.d.ts +21 -21
  29. package/hdd-ai-cloud/common/ISseChunk.d.ts +57 -57
  30. package/hdd-ai-cloud/common/ISseData.d.ts +33 -135
  31. package/hdd-ai-cloud/common/IThisContext.d.ts +128 -128
  32. package/hdd-ai-cloud/common/ReportTypeEnum.d.ts +7 -7
  33. package/hdd-ai-cloud/common/SubReportTypeEnum.d.ts +18 -18
  34. package/hdd-ai-cloud/common/index.d.ts +29 -29
  35. package/hdd-ai-cloud/controller/getRankInfo.d.ts +51 -0
  36. package/hdd-ai-cloud/controller/index.d.ts +496 -496
  37. package/hdd-ai-cloud/index.d.ts +3 -3
  38. package/hdd-ai-cloud/service/index.d.ts +36 -36
  39. package/index.d.ts +2 -2
  40. package/npmPublish.md +10 -10
  41. package/package.json +11 -11
  42. package/hdd-ai-cloud/common/ICallUniCloudParams.js +0 -3
  43. package/hdd-ai-cloud/common/ICallUniCloudParams.js.map +0 -1
  44. package/hdd-ai-cloud/common/ICommonRequstHead.js +0 -3
  45. package/hdd-ai-cloud/common/ICommonRequstHead.js.map +0 -1
  46. package/hdd-ai-cloud/common/IFormatProfessional.js +0 -3
  47. package/hdd-ai-cloud/common/IFormatProfessional.js.map +0 -1
@@ -1,135 +1,33 @@
1
- /**
2
- * sse流式返回片段
3
- */
4
- export interface ISseData {
5
- /**
6
- * 流式返回片段的类型
7
- */
8
- type: SseDataTypeEnum;
9
- /**
10
- * 标识对话步骤id
11
- */
12
- stepId?: string;
13
- /**
14
- * ai返回的对话内容
15
- */
16
- aiMessage?: {
17
- content?: string;
18
- };
19
- /**
20
- * ai思考的内容
21
- */
22
- aiThinking?: {
23
- reason?: string;
24
- };
25
- /**
26
- * 需要收集非结构化信息
27
- */
28
- needCollectstructuredInfo?: {
29
- /**
30
- * 表单类型
31
- */
32
- type?: string;
33
- /**
34
- * 对用户的语言提示
35
- */
36
- voiceTip?: string;
37
- /**
38
- * 表单标题
39
- */
40
- title?: string;
41
- /**
42
- * 表单描述
43
- */
44
- description?: string;
45
- /**
46
- * 等效的AI内容(当不使用结构化展示时候可以使用等效的AI内容展示给用户 或 用于上下文)
47
- */
48
- equalAiContent: string;
49
- /**
50
- * 需要收集的字段列表
51
- */
52
- fields: {
53
- /**
54
- * 字段名称
55
- */
56
- name?: string;
57
- /**
58
- * 字段标签
59
- */
60
- label?: string;
61
- /**
62
- * 字段描述
63
- */
64
- description?: string;
65
- /**
66
- * 是否必填
67
- */
68
- required?: boolean;
69
- /**
70
- * 选项
71
- */
72
- options?: string[];
73
- /**
74
- * 占位符
75
- */
76
- placeholder?: string;
77
- }[];
78
- };
79
- /**
80
- * 错误信息
81
- */
82
- errorInfo?: {
83
- errCode?: string;
84
- errMsg?: string;
85
- };
86
- /**
87
- * 行为动作
88
- */
89
- behaviorAction?: {
90
- /**
91
- * 行为动作
92
- */
93
- action?: IBehaviorAction;
94
- /**
95
- * 行为动作描述
96
- */
97
- actionDescription?: string;
98
- };
99
- }
100
-
101
- /**
102
- * 行为动作
103
- */
104
- export const enum IBehaviorAction {
105
- /**
106
- * 结束当前咨询流程,开始生成报告
107
- */
108
- EndInquiryToGenerateReport = 'endInquiryToGenerateReport'
109
- }
110
-
111
- /**
112
- * sse流式返回片段的类型
113
- */
114
- export const enum SseDataTypeEnum {
115
- /**
116
- * ai返回的对话内容
117
- */
118
- AIMessage = 'aiMessage',
119
- /**
120
- * ai思考的内容
121
- */
122
- AiThinking = 'aiThinking',
123
- /**
124
- * 需要收集结构化信息
125
- */
126
- NeedCollectStructuredInfo = 'needCollectStructuredInfo',
127
- /**
128
- * 错误信息
129
- */
130
- ErrorInfo = 'errorInfo',
131
- /**
132
- * 行为动作
133
- */
134
- BehaviorAction = 'behaviorAction'
135
- }
1
+ import { type ISessionContent } from './ISessionContent';
2
+ import { type ICommonError } from './ICommonError';
3
+ /**
4
+ * sse流式返回片段
5
+ */
6
+ export interface ISseData extends ISessionContent {
7
+ /**
8
+ * sse类型 默认为messageItem
9
+ * messageItem: 消息项
10
+ * errorInfo: 错误信息
11
+ */
12
+ sseType?: SseTypeEnum;
13
+ /**
14
+ * sse返回的错误信息
15
+ */
16
+ sseErrorInfo?: ICommonError;
17
+ }
18
+
19
+ /**
20
+ * sse类型 默认为messageItem
21
+ * messageItem: 消息项
22
+ * errorInfo: 错误信息
23
+ */
24
+ export const enum SseTypeEnum {
25
+ /**
26
+ * 消息项
27
+ */
28
+ MessageItem = 'messageItem',
29
+ /**
30
+ * 错误信息
31
+ */
32
+ ErrorInfo = 'errorInfo'
33
+ }
@@ -1,128 +1,128 @@
1
- /**
2
- * uniCloud云对象的this上下文
3
- */
4
- export interface IThisContext {
5
- /**
6
- * 函数执行开始的时间戳 毫秒 在_before中赋值
7
- */
8
- funStartTime?: number;
9
- /**
10
- * 函数执行结束的时间戳 毫秒 在_after中赋值
11
- */
12
- funEndTime?: number;
13
- /**
14
- * 函数执行的总时间 毫秒 在_after中赋值funEndTime - funStartTime
15
- */
16
- funRunTime?: number;
17
- /**
18
- * 通过token解析出来的用户信息 _before中赋值 未登录时候赋值为null
19
- */
20
- tokenRes?: ITokenRes | null;
21
- /**
22
- * 获取的云对象信息
23
- */
24
- getCloudInfo?: () => ICloudInfo;
25
- /**
26
- * 获取客户端信息
27
- */
28
- getClientInfo?: () => IClientInfo;
29
- /**
30
- * 获取token
31
- */
32
- getUniIdToken?: () => string;
33
- /**
34
- * 获取调用的云对象方法名
35
- */
36
- getMethodName?: () => string;
37
- /**
38
- * 获取调用云对象时候传入的参数
39
- */
40
- getParams?: () => any;
41
- /**
42
- * 获取请求id
43
- */
44
- getUniCloudRequestId?: () => string;
45
- }
46
-
47
- /**
48
- * this.tokenRes解析出来的用户信息
49
- */
50
- export interface ITokenRes {
51
- /**
52
- * 错误码 0为成功
53
- */
54
- errCode?: number;
55
- /**
56
- * token解析出来的uid
57
- */
58
- uid?: string;
59
- /**
60
- * token解析出来的role角色
61
- */
62
- role?: string[];
63
- /**
64
- * token解析出来的permission权限
65
- */
66
- permission?: string[];
67
- }
68
-
69
- /**
70
- * this.getClientInfo返回的客户端信息
71
- */
72
- export interface IClientInfo {
73
- /**
74
- * 客户端ip
75
- */
76
- clientIP?: string;
77
- /**
78
- * 客户端ua,注意非本地运行环境下客户端getSystemInfoSync也会获取ua参数并上传给云对象,但是云对象会从http请求头里面获取ua而不是clientInfo里面的ua
79
- */
80
- userAgent?: string;
81
- /**
82
- * 调用来源
83
- * client uni-app客户端导入云对象调用
84
- * function 由其他云函数或云对象调用
85
- * http 云对象URL化后通过http访问调用 HBuilderX 3.5.2+
86
- * timing 定时任务调用云对象 HBuilderX 3.5.2+
87
- * server 云函数上传并运行
88
- */
89
- source?: 'client' | 'function' | 'http' | 'timing' | 'server';
90
- /**
91
- * 请求id
92
- */
93
- requestId?: string;
94
- /**
95
- * 场景值 客户端uni.getLaunchOptionsSync返回的scene参数,新增于HBuilderX 3.5.1
96
- */
97
- scene?: string;
98
- }
99
-
100
- /**
101
- * this.getCloudInfo获取的云对象信息
102
- */
103
- export interface ICloudInfo {
104
- /**
105
- * 服务空间供应商,支付宝云为:alipay,阿里云为:aliyun,腾讯云为:tencent
106
- */
107
- provider: 'alipay' | 'aliyun' | 'tencent';
108
- /**
109
- * 服务空间Id
110
- */
111
- spaceId: string;
112
- /**
113
- * 当前获取的服务空间id是否为迁移前的服务空间id
114
- */
115
- useOldSpaceId: boolean;
116
- /**
117
- * 云对象名称
118
- */
119
- functionName: string;
120
- /**
121
- * 云对象此值固定为cloudobject
122
- */
123
- functionType: 'cloudobject';
124
- /**
125
- * 运行环境,取值为local(本地运行)或cloud(云端运行) 新增于HBuilderX 4.25
126
- */
127
- runtimeEnv: 'local' | 'cloud';
128
- }
1
+ /**
2
+ * uniCloud云对象的this上下文
3
+ */
4
+ export interface IThisContext {
5
+ /**
6
+ * 函数执行开始的时间戳 毫秒 在_before中赋值
7
+ */
8
+ funStartTime?: number;
9
+ /**
10
+ * 函数执行结束的时间戳 毫秒 在_after中赋值
11
+ */
12
+ funEndTime?: number;
13
+ /**
14
+ * 函数执行的总时间 毫秒 在_after中赋值funEndTime - funStartTime
15
+ */
16
+ funRunTime?: number;
17
+ /**
18
+ * 通过token解析出来的用户信息 _before中赋值 未登录时候赋值为null
19
+ */
20
+ tokenRes?: ITokenRes | null;
21
+ /**
22
+ * 获取的云对象信息
23
+ */
24
+ getCloudInfo?: () => ICloudInfo;
25
+ /**
26
+ * 获取客户端信息
27
+ */
28
+ getClientInfo?: () => IClientInfo;
29
+ /**
30
+ * 获取token
31
+ */
32
+ getUniIdToken?: () => string;
33
+ /**
34
+ * 获取调用的云对象方法名
35
+ */
36
+ getMethodName?: () => string;
37
+ /**
38
+ * 获取调用云对象时候传入的参数
39
+ */
40
+ getParams?: () => any;
41
+ /**
42
+ * 获取请求id
43
+ */
44
+ getUniCloudRequestId?: () => string;
45
+ }
46
+
47
+ /**
48
+ * this.tokenRes解析出来的用户信息
49
+ */
50
+ export interface ITokenRes {
51
+ /**
52
+ * 错误码 0为成功
53
+ */
54
+ errCode?: number;
55
+ /**
56
+ * token解析出来的uid
57
+ */
58
+ uid?: string;
59
+ /**
60
+ * token解析出来的role角色
61
+ */
62
+ role?: string[];
63
+ /**
64
+ * token解析出来的permission权限
65
+ */
66
+ permission?: string[];
67
+ }
68
+
69
+ /**
70
+ * this.getClientInfo返回的客户端信息
71
+ */
72
+ export interface IClientInfo {
73
+ /**
74
+ * 客户端ip
75
+ */
76
+ clientIP?: string;
77
+ /**
78
+ * 客户端ua,注意非本地运行环境下客户端getSystemInfoSync也会获取ua参数并上传给云对象,但是云对象会从http请求头里面获取ua而不是clientInfo里面的ua
79
+ */
80
+ userAgent?: string;
81
+ /**
82
+ * 调用来源
83
+ * client uni-app客户端导入云对象调用
84
+ * function 由其他云函数或云对象调用
85
+ * http 云对象URL化后通过http访问调用 HBuilderX 3.5.2+
86
+ * timing 定时任务调用云对象 HBuilderX 3.5.2+
87
+ * server 云函数上传并运行
88
+ */
89
+ source?: 'client' | 'function' | 'http' | 'timing' | 'server';
90
+ /**
91
+ * 请求id
92
+ */
93
+ requestId?: string;
94
+ /**
95
+ * 场景值 客户端uni.getLaunchOptionsSync返回的scene参数,新增于HBuilderX 3.5.1
96
+ */
97
+ scene?: string;
98
+ }
99
+
100
+ /**
101
+ * this.getCloudInfo获取的云对象信息
102
+ */
103
+ export interface ICloudInfo {
104
+ /**
105
+ * 服务空间供应商,支付宝云为:alipay,阿里云为:aliyun,腾讯云为:tencent
106
+ */
107
+ provider: 'alipay' | 'aliyun' | 'tencent';
108
+ /**
109
+ * 服务空间Id
110
+ */
111
+ spaceId: string;
112
+ /**
113
+ * 当前获取的服务空间id是否为迁移前的服务空间id
114
+ */
115
+ useOldSpaceId: boolean;
116
+ /**
117
+ * 云对象名称
118
+ */
119
+ functionName: string;
120
+ /**
121
+ * 云对象此值固定为cloudobject
122
+ */
123
+ functionType: 'cloudobject';
124
+ /**
125
+ * 运行环境,取值为local(本地运行)或cloud(云端运行) 新增于HBuilderX 4.25
126
+ */
127
+ runtimeEnv: 'local' | 'cloud';
128
+ }
@@ -1,7 +1,7 @@
1
- /**
2
- * 报告类型枚举
3
- */
4
- export const enum ReportTypeEnum {
5
- /** 高考志愿填报报告 */
6
- GAOKAO = 'gaokao'
7
- }
1
+ /**
2
+ * 报告类型枚举
3
+ */
4
+ export const enum ReportTypeEnum {
5
+ /** 高考志愿填报报告 */
6
+ GAOKAO = 'gaokao'
7
+ }
@@ -1,18 +1,18 @@
1
- /**
2
- * 报告类型枚举
3
- * @enum {string}
4
- */
5
- export const enum SubReportTypeEnum {
6
- /** 分数定位分析 */
7
- GAOKAO_SCORE_POSITION = 'gaokao-score-position',
8
- /** 高考志愿兴趣分析:霍兰德职业兴趣测评报告 */
9
- GAOKAO_INTEREST = 'gaokao-interest',
10
- /** 高考志愿推荐:院校排序等推荐 */
11
- GAOKAO_VOLUNTEER_RECOMMENDATION = 'gaokao-volunteer-recommendation',
12
- /** 高考志愿专业匹配分析:专业推荐报告(专业匹配分析\排序) */
13
- GAOKAO_MAJOR_MATCHING = 'gaokao-major-matching',
14
- /** 高考志愿专业院校解读 */
15
- GAOKAO_KEY_UNIVERSITY = 'gaokao-key-university',
16
- /** 高考志愿未来发展:未来发展建议 */
17
- GAOKAO_FUTURE_DEVELOPMENT = 'gaokao-future-development'
18
- }
1
+ /**
2
+ * 报告类型枚举
3
+ * @enum {string}
4
+ */
5
+ export const enum SubReportTypeEnum {
6
+ /** 分数定位分析 */
7
+ GAOKAO_SCORE_POSITION = 'gaokao-score-position',
8
+ /** 高考志愿兴趣分析:霍兰德职业兴趣测评报告 */
9
+ GAOKAO_INTEREST = 'gaokao-interest',
10
+ /** 高考志愿推荐:院校排序等推荐 */
11
+ GAOKAO_VOLUNTEER_RECOMMENDATION = 'gaokao-volunteer-recommendation',
12
+ /** 高考志愿专业匹配分析:专业推荐报告(专业匹配分析\排序) */
13
+ GAOKAO_MAJOR_MATCHING = 'gaokao-major-matching',
14
+ /** 高考志愿专业院校解读 */
15
+ GAOKAO_KEY_UNIVERSITY = 'gaokao-key-university',
16
+ /** 高考志愿未来发展:未来发展建议 */
17
+ GAOKAO_FUTURE_DEVELOPMENT = 'gaokao-future-development'
18
+ }
@@ -1,29 +1,29 @@
1
- export * from './ICommonReqRes';
2
- export * from './ISessionRole';
3
- export * from './ISessionContent';
4
- export * from './ICounselor';
5
- export * from './IChatAiMessageItem';
6
- export * from './AISceneEnum';
7
- export * from './ISceneAiConfig';
8
- export * from './IAliFcContext';
9
- export * from './ISseChunk';
10
- export * from './ICallUniCloudParams';
11
- export * from './ICommonRequstHead';
12
- export * from './IFormatCutOffCollegeData';
13
- export * from './IFormatProfessional.ts';
14
- export * from './IPicture.ts';
15
- export * from './ISseData';
16
- export * from './ISelectSubject';
17
- export * from './IInquiryBasicInfo';
18
- export * from './IInquirySession';
19
- export * from './ISessionContent';
20
- export * from './IGetRecommendSchool';
21
- export * from './IScoreRank';
22
- export * from './IReportInfo';
23
- export * from './IReportResult';
24
- export * from './ICommonError';
25
- export * from './ReportTypeEnum';
26
- export * from './SubReportTypeEnum';
27
- export * from './IReportData';
28
- export * from './IFormatGaokaoBasicInfo';
29
- export * from './IConfigInfo';
1
+ export * from './ICommonReqRes.d.ts';
2
+ export * from './ISessionRole.d.ts';
3
+ export * from './ISessionContent.d.ts';
4
+ export * from './ICounselor.d.ts';
5
+ export * from './IChatAiMessageItem.d.ts';
6
+ export * from './AISceneEnum.d.ts';
7
+ export * from './ISceneAiConfig.d.ts';
8
+ export * from './IAliFcContext.d.ts';
9
+ export * from './ISseChunk.d.ts';
10
+ export * from './ICallUniCloudParams.d.ts';
11
+ export * from './ICommonRequstHead.d.ts';
12
+ export * from './IFormatCutOffCollegeData.d.ts';
13
+ export * from './IFormatProfessional.d.ts';
14
+ export * from './IPicture.d.ts';
15
+ export * from './ISseData.d.ts';
16
+ export * from './ISelectSubject.d.ts';
17
+ export * from './IInquiryBasicInfo.d.ts';
18
+ export * from './IInquirySession.d.ts';
19
+ export * from './ISessionContent.d.ts';
20
+ export * from './IGetRecommendSchool.d.ts';
21
+ export * from './IScoreRank.d.ts';
22
+ export * from './IReportInfo.d.ts';
23
+ export * from './IReportResult.d.ts';
24
+ export * from './ICommonError.d.ts';
25
+ export * from './ReportTypeEnum.d.ts';
26
+ export * from './SubReportTypeEnum.d.ts';
27
+ export * from './IReportData.d.ts';
28
+ export * from './IFormatGaokaoBasicInfo.d.ts';
29
+ export * from './IConfigInfo.d.ts';
@@ -0,0 +1,51 @@
1
+ import { type ICommonReq, type ICommonRes } from '../common';
2
+
3
+ export interface IGetRankInfoReq extends ICommonReq {
4
+ /**
5
+ * 成绩信息
6
+ */
7
+ scoreInfo: IScoreInfoItem[];
8
+ }
9
+
10
+ export interface IScoreInfoItem {
11
+ /**
12
+ * 年份
13
+ */
14
+ year?: number;
15
+ /**
16
+ * 省份id
17
+ */
18
+ provinceId: string;
19
+ /**
20
+ * 分数
21
+ */
22
+ grade: number;
23
+ }
24
+
25
+ export interface IGetRankInfoRes extends ICommonRes {
26
+ data?: {
27
+ /**
28
+ * 排名信息
29
+ */
30
+ rankInfo?: Array<IRankInfoItem | null>;
31
+ };
32
+ }
33
+
34
+ export interface IRankInfoItem {
35
+ /**
36
+ * 年份
37
+ */
38
+ year: number;
39
+ /**
40
+ * 省份id
41
+ */
42
+ provinceId: string;
43
+ /**
44
+ * 分数
45
+ */
46
+ grade: number;
47
+ /**
48
+ * 排名
49
+ */
50
+ rank: number;
51
+ }