shcp-api-lib 1.0.3 → 1.0.5

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 (106) hide show
  1. package/dist/index.d.ts +8818 -3069
  2. package/dist/index.esm.js +4900 -942
  3. package/dist/index.esm.js.map +1 -1
  4. package/dist/index.js +4960 -959
  5. package/dist/index.js.map +1 -1
  6. package/dist/types/src/api/ai-api.d.ts +17 -0
  7. package/dist/types/src/api/ai-application-api.d.ts +17 -0
  8. package/dist/types/src/api/app-client-api.d.ts +2 -2
  9. package/dist/types/src/api/app-client-page-config-api.d.ts +19 -3
  10. package/dist/types/src/api/app-client-setting-api.d.ts +32 -2
  11. package/dist/types/src/api/common-file-api.d.ts +1 -0
  12. package/dist/types/src/api/common-right-api.d.ts +6 -1
  13. package/dist/types/src/api/consumer-api.d.ts +7 -2
  14. package/dist/types/src/api/disease-care-api.d.ts +91 -0
  15. package/dist/types/src/api/flow-follow-api.d.ts +22 -0
  16. package/dist/types/src/api/flow-manager-api.d.ts +40 -0
  17. package/dist/types/src/api/flow-model-api.d.ts +35 -0
  18. package/dist/types/src/api/flow-process-api.d.ts +27 -0
  19. package/dist/types/src/api/health-medication-api.d.ts +25 -0
  20. package/dist/types/src/api/health-metric-api.d.ts +10 -10
  21. package/dist/types/src/api/health-profile-api.d.ts +13 -2
  22. package/dist/types/src/api/health-study-api.d.ts +61 -0
  23. package/dist/types/src/api/index.d.ts +43 -2
  24. package/dist/types/src/api/job-info-api.d.ts +63 -0
  25. package/dist/types/src/api/job-server-api.d.ts +58 -0
  26. package/dist/types/src/api/km-article-api.d.ts +34 -11
  27. package/dist/types/src/api/km-article-apply-api.d.ts +9 -0
  28. package/dist/types/src/api/km-article-category-api.d.ts +39 -0
  29. package/dist/types/src/api/km-article-draft-api.d.ts +29 -0
  30. package/dist/types/src/api/km-article-tag-api.d.ts +29 -0
  31. package/dist/types/src/api/km-article-tag-category-api.d.ts +34 -0
  32. package/dist/types/src/api/km-form-api.d.ts +37 -7
  33. package/dist/types/src/api/km-form-category-api.d.ts +39 -0
  34. package/dist/types/src/api/km-form-content-draft-api.d.ts +14 -0
  35. package/dist/types/src/api/km-form-draft-api.d.ts +14 -0
  36. package/dist/types/src/api/km-form-item-api.d.ts +9 -0
  37. package/dist/types/src/api/km-form-tree-node-api.d.ts +29 -0
  38. package/dist/types/src/api/km-tag-api.d.ts +42 -0
  39. package/dist/types/src/api/km-tag-category-api.d.ts +47 -0
  40. package/dist/types/src/api/km-tag-value-dict-api.d.ts +32 -0
  41. package/dist/types/src/api/license-api.d.ts +50 -0
  42. package/dist/types/src/api/login-api.d.ts +6 -1
  43. package/dist/types/src/api/potential-customer-api.d.ts +14 -0
  44. package/dist/types/src/api/region-api.d.ts +70 -0
  45. package/dist/types/src/api/report-api.d.ts +9 -0
  46. package/dist/types/src/api/right-api.d.ts +39 -0
  47. package/dist/types/src/api/right-draft-api.d.ts +59 -0
  48. package/dist/types/src/api/right-draft-service-config-api.d.ts +28 -0
  49. package/dist/types/src/api/right-service-config-api.d.ts +26 -6
  50. package/dist/types/src/api/rule-api.d.ts +39 -0
  51. package/dist/types/src/api/system-ApiScopeController-api.d.ts +39 -0
  52. package/dist/types/src/api/system-DeptController-api.d.ts +27 -0
  53. package/dist/types/src/api/system-DictBizController-api.d.ts +33 -0
  54. package/dist/types/src/api/system-DictController-api.d.ts +33 -0
  55. package/dist/types/src/api/system-MenuController-api.d.ts +42 -0
  56. package/dist/types/src/api/system-PostController-api.d.ts +49 -0
  57. package/dist/types/src/api/system-RoleController-api.d.ts +48 -0
  58. package/dist/types/src/api/system-TenantController-api.d.ts +118 -0
  59. package/dist/types/src/api/system-TenantPackageController-api.d.ts +44 -0
  60. package/dist/types/src/api/system-TopMenuController-api.d.ts +44 -0
  61. package/dist/types/src/api/system-UserController-api.d.ts +116 -0
  62. package/dist/types/src/api/system-right-api.d.ts +3 -3
  63. package/dist/types/src/api/user-group-api.d.ts +13 -1
  64. package/dist/types/src/constants/qiniuUploader.d.ts +2 -14
  65. package/dist/types/src/constants/shcp-common.d.ts +114 -0
  66. package/dist/types/src/index.d.ts +3 -0
  67. package/dist/types/src/shcp-api-sdk.d.ts +17 -4
  68. package/dist/types/src/type/model/ai-model.d.ts +69 -0
  69. package/dist/types/src/type/model/app-client-page-config-model.d.ts +148 -0
  70. package/dist/types/src/type/model/app-client-setting-model.d.ts +55 -0
  71. package/dist/types/src/type/model/common-right-model.d.ts +129 -7
  72. package/dist/types/src/type/model/consumer-model.d.ts +34 -38
  73. package/dist/types/src/type/model/flow-follow-model.d.ts +14 -0
  74. package/dist/types/src/type/model/flow-manager-model.d.ts +16 -0
  75. package/dist/types/src/type/model/flow-model-model.d.ts +14 -0
  76. package/dist/types/src/type/model/flow-process-model.d.ts +13 -0
  77. package/dist/types/src/type/model/health-medication-model.d.ts +177 -0
  78. package/dist/types/src/type/model/health-metric-model.d.ts +8 -8
  79. package/dist/types/src/type/model/index.d.ts +28 -0
  80. package/dist/types/src/type/model/job-info-model.d.ts +24 -0
  81. package/dist/types/src/type/model/job-server-model.d.ts +20 -0
  82. package/dist/types/src/type/model/km-article-model.d.ts +579 -5
  83. package/dist/types/src/type/model/km-form-model.d.ts +739 -2
  84. package/dist/types/src/type/model/km-tag-model.d.ts +623 -0
  85. package/dist/types/src/type/model/license-model.d.ts +84 -0
  86. package/dist/types/src/type/model/login-model.d.ts +6 -0
  87. package/dist/types/src/type/model/potential-customer-model.d.ts +136 -0
  88. package/dist/types/src/type/model/region-model.d.ts +36 -0
  89. package/dist/types/src/type/model/report-model.d.ts +75 -0
  90. package/dist/types/src/type/model/right-draft-model.d.ts +243 -0
  91. package/dist/types/src/type/model/right-model.d.ts +88 -0
  92. package/dist/types/src/type/model/rule-model.d.ts +140 -0
  93. package/dist/types/src/type/model/system-ApiScopeController-model.d.ts +36 -0
  94. package/dist/types/src/type/model/system-DeptController-model.d.ts +26 -0
  95. package/dist/types/src/type/model/system-DictBizController-model.d.ts +25 -0
  96. package/dist/types/src/type/model/system-DictController-model.d.ts +25 -0
  97. package/dist/types/src/type/model/system-MenuController-model.d.ts +56 -0
  98. package/dist/types/src/type/model/system-PostController-model.d.ts +22 -0
  99. package/dist/types/src/type/model/system-RoleController-model.d.ts +35 -0
  100. package/dist/types/src/type/model/system-TenantController-model.d.ts +61 -0
  101. package/dist/types/src/type/model/system-TenantPackageController-model.d.ts +14 -0
  102. package/dist/types/src/type/model/system-TopMenuController-model.d.ts +27 -0
  103. package/dist/types/src/type/model/system-UserController-model.d.ts +51 -0
  104. package/package.json +13 -13
  105. package/dist/types/src/api/disease-care-right-api.d.ts +0 -22
  106. package/dist/types/src/api/health-study-right-api.d.ts +0 -23
@@ -0,0 +1,136 @@
1
+ import type { PageRequest } from "./common-model";
2
+ /**
3
+ * 潜在客户基本信息
4
+ */
5
+ export interface WebPotentialCustomerDTO {
6
+ /**
7
+ * 主键ID
8
+ */
9
+ id: string | number;
10
+ /**
11
+ * 客户名称
12
+ */
13
+ customerName: string;
14
+ /**
15
+ * 联系电话
16
+ */
17
+ phone: string;
18
+ /**
19
+ * 电子邮箱
20
+ */
21
+ email?: string;
22
+ /**
23
+ * 公司名称
24
+ */
25
+ companyName?: string;
26
+ /**
27
+ * 职位
28
+ */
29
+ position?: string;
30
+ /**
31
+ * 客户来源
32
+ */
33
+ source: string;
34
+ /**
35
+ * 客户状态
36
+ */
37
+ status: number;
38
+ /**
39
+ * 备注
40
+ */
41
+ remark?: string;
42
+ /**
43
+ * 创建用户
44
+ */
45
+ createUser?: string;
46
+ /**
47
+ * 创建部门
48
+ */
49
+ createDept?: string;
50
+ /**
51
+ * 创建时间
52
+ */
53
+ createTime?: string;
54
+ /**
55
+ * 更新用户
56
+ */
57
+ updateUser?: string;
58
+ /**
59
+ * 更新时间
60
+ */
61
+ updateTime?: string;
62
+ /**
63
+ * 是否删除
64
+ */
65
+ isDeleted?: number;
66
+ }
67
+ /**
68
+ * 潜在客户查询条件
69
+ */
70
+ export interface PotentialCustomerQuery extends PageRequest {
71
+ /**
72
+ * 客户名称
73
+ */
74
+ customerName?: string;
75
+ /**
76
+ * 联系电话
77
+ */
78
+ phone?: string;
79
+ /**
80
+ * 电子邮箱
81
+ */
82
+ email?: string;
83
+ /**
84
+ * 公司名称
85
+ */
86
+ companyName?: string;
87
+ /**
88
+ * 客户来源
89
+ */
90
+ source?: string;
91
+ /**
92
+ * 客户状态
93
+ */
94
+ status?: number;
95
+ }
96
+ /**
97
+ * 潜在客户更新请求
98
+ */
99
+ export interface PotentialCustomerUpdateRequest {
100
+ /**
101
+ * 主键ID
102
+ */
103
+ id: string;
104
+ /**
105
+ * 客户名称
106
+ */
107
+ customerName?: string;
108
+ /**
109
+ * 联系电话
110
+ */
111
+ phone?: string;
112
+ /**
113
+ * 电子邮箱
114
+ */
115
+ email?: string;
116
+ /**
117
+ * 公司名称
118
+ */
119
+ companyName?: string;
120
+ /**
121
+ * 职位
122
+ */
123
+ position?: string;
124
+ /**
125
+ * 客户来源
126
+ */
127
+ source?: string;
128
+ /**
129
+ * 客户状态
130
+ */
131
+ status?: number;
132
+ /**
133
+ * 备注
134
+ */
135
+ remark?: string;
136
+ }
@@ -0,0 +1,36 @@
1
+ /**
2
+ * 行政区划实体
3
+ */
4
+ export interface Region {
5
+ id?: string | number;
6
+ code?: string;
7
+ name?: string;
8
+ parentCode?: string;
9
+ fullName?: string;
10
+ shortName?: string;
11
+ level?: number;
12
+ sort?: number;
13
+ status?: number;
14
+ createTime?: string;
15
+ updateTime?: string;
16
+ [key: string]: any;
17
+ }
18
+ /**
19
+ * 行政区划VO
20
+ */
21
+ export interface RegionVO extends Region {
22
+ children?: RegionVO[];
23
+ hasChildren?: boolean;
24
+ }
25
+ /**
26
+ * 行政区划Excel导入导出类型
27
+ */
28
+ export interface RegionExcel {
29
+ code: string;
30
+ name: string;
31
+ parentCode: string;
32
+ fullName?: string;
33
+ shortName?: string;
34
+ level?: number;
35
+ sort?: number;
36
+ }
@@ -0,0 +1,75 @@
1
+ import type { PageRequest } from "./common-model";
2
+ /**
3
+ * 报表基本信息
4
+ */
5
+ export interface WebReportDTO {
6
+ /**
7
+ * 主键ID
8
+ */
9
+ id: string | number;
10
+ /**
11
+ * 报表名称
12
+ */
13
+ reportName: string;
14
+ /**
15
+ * 报表类型
16
+ */
17
+ reportType: number;
18
+ /**
19
+ * 报表描述
20
+ */
21
+ description?: string;
22
+ /**
23
+ * 报表状态
24
+ */
25
+ status: number;
26
+ /**
27
+ * 创建用户
28
+ */
29
+ createUser?: string;
30
+ /**
31
+ * 创建部门
32
+ */
33
+ createDept?: string;
34
+ /**
35
+ * 创建时间
36
+ */
37
+ createTime?: string;
38
+ /**
39
+ * 更新用户
40
+ */
41
+ updateUser?: string;
42
+ /**
43
+ * 更新时间
44
+ */
45
+ updateTime?: string;
46
+ /**
47
+ * 是否删除
48
+ */
49
+ isDeleted?: number;
50
+ }
51
+ /**
52
+ * 报表查询条件
53
+ */
54
+ export interface ReportQuery extends PageRequest {
55
+ /**
56
+ * 报表名称
57
+ */
58
+ reportName?: string;
59
+ /**
60
+ * 报表类型
61
+ */
62
+ reportType?: number;
63
+ /**
64
+ * 报表状态
65
+ */
66
+ status?: number;
67
+ /**
68
+ * 当前页码
69
+ */
70
+ current?: number;
71
+ /**
72
+ * 每页大小
73
+ */
74
+ size?: number;
75
+ }
@@ -0,0 +1,243 @@
1
+ import { HealthServiceType, RightType } from '../../constants/shcp-common';
2
+ import { PageRequest } from './common-model';
3
+ import { RightDTO } from './common-right-model';
4
+ import { DiseaseCareConfigDTO, HealthStudyConfigDTO } from './health-care-config-model';
5
+ /**
6
+ * 权益草稿请求相关类型
7
+ */
8
+ export declare namespace RightDraftRequests {
9
+ /**
10
+ * 权益草稿查询请求
11
+ */
12
+ interface Query extends PageRequest {
13
+ /**
14
+ * 权益草稿ID
15
+ */
16
+ id?: number | string;
17
+ /**
18
+ * 权益草稿所属租户ID
19
+ */
20
+ tenantId?: string;
21
+ /**
22
+ * 权益名称
23
+ */
24
+ name?: string;
25
+ /**
26
+ * 权益类型
27
+ */
28
+ type?: RightType;
29
+ /**
30
+ * 权益关联的健管服务类型
31
+ */
32
+ serviceType?: HealthServiceType;
33
+ /**
34
+ * 权益状态
35
+ */
36
+ status?: number;
37
+ }
38
+ /**
39
+ * 权益草稿创建请求
40
+ */
41
+ interface Create {
42
+ /**
43
+ * 权益草稿所属租户ID
44
+ */
45
+ tenantId: string;
46
+ /**
47
+ * 权益名称
48
+ */
49
+ name?: string;
50
+ /**
51
+ * 权益类型
52
+ */
53
+ type?: RightType;
54
+ /**
55
+ * 权益图标URL地址
56
+ */
57
+ icon?: string;
58
+ /**
59
+ * 权益封面URL地址
60
+ */
61
+ cover?: string;
62
+ /**
63
+ * 权益详情描述
64
+ */
65
+ remark?: string;
66
+ /**
67
+ * 权益详情文章ID
68
+ */
69
+ detailArticleId?: number | string;
70
+ /**
71
+ * 权益关联的健管服务类型
72
+ */
73
+ serviceType?: HealthServiceType;
74
+ /**
75
+ * 权益的医生服务组根ID
76
+ */
77
+ tenantUserGroupRootId?: number | string;
78
+ /**
79
+ * 权益的消费用户组根ID
80
+ */
81
+ consumerGroupRootId?: number | string;
82
+ /**
83
+ * 权益价格
84
+ */
85
+ price?: number;
86
+ /**
87
+ * 使用额度
88
+ */
89
+ quote?: string;
90
+ }
91
+ /**
92
+ * 基于权益创建草稿请求
93
+ */
94
+ interface CreateByRight {
95
+ /**
96
+ * 权益草稿所属租户ID
97
+ */
98
+ tenantId: string;
99
+ /**
100
+ * 基于的权益ID
101
+ */
102
+ rightId: number | string;
103
+ }
104
+ /**
105
+ * 基于授权创建草稿请求
106
+ */
107
+ interface CreateByLicense {
108
+ /**
109
+ * 权益草稿所属租户ID
110
+ */
111
+ tenantId: string;
112
+ /**
113
+ * 基于的授权ID
114
+ */
115
+ licenseId: number | string;
116
+ }
117
+ /**
118
+ * 权益草稿更新请求
119
+ */
120
+ interface Update {
121
+ /**
122
+ * 权益草稿ID
123
+ */
124
+ id: number | string;
125
+ /**
126
+ * 权益草稿所属租户ID
127
+ */
128
+ tenantId: string;
129
+ /**
130
+ * 权益名称
131
+ */
132
+ name?: string;
133
+ /**
134
+ * 权益类型
135
+ */
136
+ type?: RightType;
137
+ /**
138
+ * 权益图标URL地址
139
+ */
140
+ icon?: string;
141
+ /**
142
+ * 权益封面URL地址
143
+ */
144
+ cover?: string;
145
+ /**
146
+ * 权益详情描述
147
+ */
148
+ remark?: string;
149
+ /**
150
+ * 权益详情文章ID
151
+ */
152
+ detailArticleId?: number | string;
153
+ /**
154
+ * 权益关联的健管服务类型
155
+ */
156
+ serviceType?: HealthServiceType;
157
+ /**
158
+ * 权益的医生服务组根ID
159
+ */
160
+ tenantUserGroupRootId?: number | string;
161
+ /**
162
+ * 权益的消费用户组根ID
163
+ */
164
+ consumerGroupRootId?: number | string;
165
+ /**
166
+ * 权益价格
167
+ */
168
+ price?: number;
169
+ /**
170
+ * 使用额度
171
+ */
172
+ quote?: string;
173
+ }
174
+ /**
175
+ * 权益草稿提交请求
176
+ */
177
+ interface Submit {
178
+ /**
179
+ * 权益草稿ID
180
+ */
181
+ id: number | string;
182
+ /**
183
+ * 权益草稿所属租户ID
184
+ */
185
+ tenantId: string;
186
+ }
187
+ /**
188
+ * 权益草稿删除请求
189
+ */
190
+ interface Delete {
191
+ /**
192
+ * 权益草稿ID
193
+ */
194
+ id: number | string;
195
+ /**
196
+ * 权益草稿所属租户ID
197
+ */
198
+ tenantId: string;
199
+ }
200
+ /**
201
+ * 慢病管理配置更新请求
202
+ */
203
+ interface DiseaseCareConfigUpdate {
204
+ /**
205
+ * 慢病管理配置
206
+ */
207
+ config: DiseaseCareConfigDTO;
208
+ /**
209
+ * 配置校验方法
210
+ */
211
+ validate(): string | null;
212
+ }
213
+ /**
214
+ * 课题研究配置更新请求
215
+ */
216
+ interface HealthStudyConfigUpdate {
217
+ /**
218
+ * 课题研究配置
219
+ */
220
+ config: HealthStudyConfigDTO;
221
+ /**
222
+ * 配置校验方法
223
+ */
224
+ validate(): string | null;
225
+ }
226
+ }
227
+ /**
228
+ * 权益草稿数据传输对象
229
+ */
230
+ export interface RightDraftDTO extends RightDTO {
231
+ /**
232
+ * 草稿状态
233
+ */
234
+ draftStatus?: number;
235
+ /**
236
+ * 草稿创建时间
237
+ */
238
+ draftCreateTime?: string;
239
+ /**
240
+ * 草稿更新时间
241
+ */
242
+ draftUpdateTime?: string;
243
+ }
@@ -0,0 +1,88 @@
1
+ import { HealthServiceType, RightType } from '../../constants/shcp-common';
2
+ import { PageRequest } from './common-model';
3
+ /**
4
+ * 权益删除请求
5
+ */
6
+ export interface RightDeleteRequest {
7
+ /**
8
+ * 权益ID
9
+ */
10
+ id: number | string;
11
+ /**
12
+ * 权益所属租户ID
13
+ */
14
+ tenantId: string;
15
+ /**
16
+ * 删除原因
17
+ */
18
+ reason?: string;
19
+ }
20
+ /**
21
+ * 权益查询请求
22
+ */
23
+ export interface ExRightQuery extends PageRequest {
24
+ /**
25
+ * 权益ID
26
+ */
27
+ id?: number | string;
28
+ /**
29
+ * 权益ID(多个)
30
+ */
31
+ ids?: (number | string)[];
32
+ /**
33
+ * 权益所属租户ID,关联: Tenant.id
34
+ */
35
+ tenantId?: string;
36
+ /**
37
+ * 权益所属租户IDs,关联: Tenant.id
38
+ */
39
+ tenantIds?: string[];
40
+ /**
41
+ * 权益名称
42
+ */
43
+ name?: string;
44
+ /**
45
+ * 权益类型,参考: RightType
46
+ */
47
+ type?: RightType;
48
+ /**
49
+ * 权益关联的健管服务类型,参考:HealthServiceType
50
+ */
51
+ serviceType?: HealthServiceType;
52
+ /**
53
+ * 权益关联的健管服务类型,参考:HealthServiceType
54
+ */
55
+ serviceTypes?: HealthServiceType[];
56
+ /**
57
+ * 权益状态
58
+ */
59
+ status?: number;
60
+ /**
61
+ * 权益的消费用户组根ID,关联: ConsumerGroup.ID
62
+ */
63
+ consumerGroupRootId?: number | string;
64
+ /**
65
+ * 权益的消费用户组根IDs,关联: ConsumerGroup.ID
66
+ */
67
+ consumerGroupRootIds?: (number | string)[];
68
+ /**
69
+ * 权益的医生服务组根ID,关联: TenantUserGroup.id
70
+ */
71
+ tenantUserGroupRootId?: number | string;
72
+ /**
73
+ * 权益的医生服务组根IDs,关联: TenantUserGroup.id
74
+ */
75
+ tenantUserGroupRootIds?: (number | string)[];
76
+ /**
77
+ * 权益服务用户ids
78
+ */
79
+ tenantUserIds?: (number | string)[];
80
+ /**
81
+ * 消费者用户id
82
+ */
83
+ consumerId?: number | string;
84
+ /**
85
+ * 权益元数据
86
+ */
87
+ metadata?: Record<string, any>;
88
+ }
@@ -0,0 +1,140 @@
1
+ import { RuleActionOperator, RuleConditionOperator, RuleConditionType, RuleExecutorType, RuleExecuteStrategy, RuleStatus, RuleType } from "../../constants/shcp-common";
2
+ import { PageRequest } from "./common-model";
3
+ export interface DictEntry {
4
+ /** 键 */
5
+ label?: string;
6
+ /** 值 */
7
+ value?: string;
8
+ }
9
+ export interface RuleCondition {
10
+ /** 前端生成的唯一ID */
11
+ id?: string;
12
+ /** 条件的类型 */
13
+ type?: RuleConditionType;
14
+ /** 条件输入变量的标识符,如ID等 */
15
+ source?: string;
16
+ /** 条件输入变量的显示信息 */
17
+ sourceText?: string;
18
+ /** 条件的运算符 */
19
+ operator?: RuleConditionOperator;
20
+ /** 条件的运算值 */
21
+ value?: any;
22
+ /** 条件的运算值的类型 */
23
+ valueType?: string;
24
+ /** 条件的运算值的取值范围,适用于一些枚举类型的变量 */
25
+ valueDict?: DictEntry[];
26
+ /** 子条件 */
27
+ subConditions?: RuleCondition[];
28
+ }
29
+ export interface RuleAction {
30
+ /** 前端生成的唯一ID */
31
+ id?: string;
32
+ /** 动作执行结果的输出变量标识符,如ID等 */
33
+ target?: string;
34
+ /** 动作执行结果的输出变量的显示信息 */
35
+ targetText?: string;
36
+ /** 动作执行的运算符 */
37
+ operator?: RuleActionOperator;
38
+ /** 动作执行的参数 */
39
+ value?: any;
40
+ }
41
+ export interface Rule {
42
+ /** 前端生成的唯一ID */
43
+ id?: string;
44
+ /** 规则名称 */
45
+ name?: string;
46
+ /** 规则优先级。注: 数字越小,优先级越高 */
47
+ priority?: number;
48
+ /** 规则的判断条件 */
49
+ condition?: RuleCondition;
50
+ /** 规则满足后执行的动作 */
51
+ actions?: RuleAction[];
52
+ }
53
+ export interface RuleDTO {
54
+ /** 规则集唯一ID */
55
+ id?: number;
56
+ /** 规则集所属租户ID */
57
+ tenantId?: string;
58
+ /** 规则集名称 */
59
+ name?: string;
60
+ /** 规则集描述 */
61
+ remark?: string;
62
+ /** 规则集用途 */
63
+ type?: RuleType;
64
+ /** 规则集执行策略 */
65
+ executeStrategy?: RuleExecuteStrategy;
66
+ /** 规则集执行器类型 */
67
+ executorType?: RuleExecutorType;
68
+ /** 规则状态 */
69
+ status?: RuleStatus;
70
+ /** 规则的结构化配置 */
71
+ rules?: Rule[];
72
+ /** 规则的代码脚本 */
73
+ ruleScript?: string;
74
+ }
75
+ export interface RuleQuery extends PageRequest {
76
+ /** 规则ID */
77
+ id?: number;
78
+ /** 规则ID集合 */
79
+ ids?: number[];
80
+ /** 规则名称 */
81
+ name?: string;
82
+ /** 所属业务租户ID */
83
+ tenantId?: string;
84
+ /** 规则的状态 */
85
+ status?: RuleStatus;
86
+ }
87
+ export interface RuleCreateRequest {
88
+ /** 规则集所属租户ID */
89
+ tenantId: string;
90
+ /** 规则集名称 */
91
+ name: string;
92
+ /** 规则集描述 */
93
+ remark?: string;
94
+ /** 规则集用途,默认:rule */
95
+ type?: RuleType;
96
+ /** 规则集执行策略,默认:first_match */
97
+ executeStrategy?: RuleExecuteStrategy;
98
+ /** 规则集执行器类型,默认:ql_express */
99
+ executorType?: RuleExecutorType;
100
+ /** 规则的具体配置 */
101
+ rules: Rule[];
102
+ }
103
+ export interface RuleUpdateRequest {
104
+ /** 规则集唯一ID */
105
+ id: number;
106
+ /** 规则集名称 */
107
+ name?: string;
108
+ /** 规则集描述 */
109
+ remark?: string;
110
+ /** 规则集执行策略,默认:first_match */
111
+ executeStrategy?: RuleExecuteStrategy;
112
+ /** 规则集执行器类型,默认:ql_express */
113
+ executorType?: RuleExecutorType;
114
+ /** 规则状态 */
115
+ status?: RuleStatus;
116
+ /** 每一个规则的具体配置 */
117
+ rules?: Rule[];
118
+ }
119
+ export interface RuleDeleteRequest {
120
+ /** 规则ID */
121
+ id: number;
122
+ }
123
+ export interface RuleExecuteRequest {
124
+ /** 规则唯一ID */
125
+ id: number;
126
+ /** 规则执行上下文 */
127
+ context?: Record<string, any>;
128
+ }
129
+ export interface RuleCopyRequest {
130
+ /** 模版租户ID */
131
+ templateTenantId: string;
132
+ /** 新租户ID */
133
+ newTenantId: string;
134
+ /** 复制的RuleIDS */
135
+ ruleIds?: number[];
136
+ }
137
+ export interface RuleCopyResponse {
138
+ /** 规则映射id */
139
+ ruleIdMapping?: Record<number, number>;
140
+ }