@cozeloop/prompt-components 0.0.1 → 0.0.3

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 (150) hide show
  1. package/dist/es/idls/fornax_ml_flow/index.js +2322 -0
  2. package/dist/es/idls/fornax_ml_flow/namespaces/ai_annotate.js +41 -0
  3. package/dist/es/idls/fornax_ml_flow/namespaces/aidpcallback.js +108 -0
  4. package/dist/es/idls/fornax_ml_flow/namespaces/annotation_job.js +52 -0
  5. package/dist/es/idls/fornax_ml_flow/namespaces/base.js +0 -0
  6. package/dist/es/idls/fornax_ml_flow/namespaces/batch_infer.js +72 -0
  7. package/dist/es/idls/fornax_ml_flow/namespaces/dataprocess.js +10 -0
  8. package/dist/es/idls/fornax_ml_flow/namespaces/dataset.js +36 -0
  9. package/dist/es/idls/fornax_ml_flow/namespaces/datasetv2.js +139 -0
  10. package/dist/es/idls/fornax_ml_flow/namespaces/datasetv2job.js +40 -0
  11. package/dist/es/idls/fornax_ml_flow/namespaces/datasetv2lineage.js +25 -0
  12. package/dist/es/idls/fornax_ml_flow/namespaces/datasetv2similarity.js +12 -0
  13. package/dist/es/idls/fornax_ml_flow/namespaces/filter.js +0 -0
  14. package/dist/es/idls/fornax_ml_flow/namespaces/flow_devops_evaluation_callback_common.js +36 -0
  15. package/dist/es/idls/fornax_ml_flow/namespaces/flow_devops_prompt_common.js +318 -0
  16. package/dist/es/idls/fornax_ml_flow/namespaces/fornax_domain_model.js +326 -0
  17. package/dist/es/idls/fornax_ml_flow/namespaces/ml_flow_domain_model.js +327 -0
  18. package/dist/es/idls/fornax_ml_flow/namespaces/openapi.js +0 -0
  19. package/dist/es/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_annotateservice.js +0 -0
  20. package/dist/es/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_annotationjobservice.js +0 -0
  21. package/dist/es/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_batchinferservice.js +0 -0
  22. package/dist/es/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_crowdsourcingannotationjobservice.js +0 -0
  23. package/dist/es/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_dataprocessservice.js +0 -0
  24. package/dist/es/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_datasetservice.js +0 -0
  25. package/dist/es/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_datasetservicev2.js +0 -0
  26. package/dist/es/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_modelservice.js +0 -0
  27. package/dist/es/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_openapi_annotationjobservice.js +0 -0
  28. package/dist/es/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_openapi_batchinferservice.js +0 -0
  29. package/dist/es/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_openapi_datasetservicev2.js +0 -0
  30. package/dist/es/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_tagservice.js +0 -0
  31. package/dist/es/idls/fornax_ml_flow/namespaces/tag.js +33 -0
  32. package/dist/es/idls/prompt_api/index.js +2009 -0
  33. package/dist/es/idls/prompt_api/namespaces/base.js +0 -0
  34. package/dist/es/idls/prompt_api/namespaces/flow_devops_prompt_callback.js +35 -0
  35. package/dist/es/idls/prompt_api/namespaces/flow_devops_prompt_commercial_openapi.js +0 -0
  36. package/dist/es/idls/prompt_api/namespaces/flow_devops_prompt_common.js +318 -0
  37. package/dist/es/idls/prompt_api/namespaces/flow_devops_prompt_debug.js +0 -0
  38. package/dist/es/idls/prompt_api/namespaces/flow_devops_prompt_manage.js +23 -0
  39. package/dist/es/idls/prompt_api/namespaces/flow_devops_prompt_mcp.js +0 -0
  40. package/dist/es/idls/prompt_api/namespaces/flow_devops_prompt_optimize.js +0 -0
  41. package/dist/es/idls/prompt_api/namespaces/flow_devops_prompt_paas.js +43 -0
  42. package/dist/es/idls/prompt_api/namespaces/flow_devops_prompt_platform.js +0 -0
  43. package/dist/es/idls/prompt_api/namespaces/mcp.js +9 -0
  44. package/dist/es/idls/prompt_api/namespaces/model.js +320 -0
  45. package/dist/es/idls/prompt_api/namespaces/permission.js +47 -0
  46. package/dist/es/idls/prompt_api/namespaces/release.js +25 -0
  47. package/dist/es/prompt-editor/index.js +1 -1
  48. package/dist/es/utils/model-config.js +3 -3
  49. package/dist/lib/idls/fornax_ml_flow/index.js +2414 -0
  50. package/dist/lib/idls/fornax_ml_flow/namespaces/ai_annotate.js +69 -0
  51. package/dist/lib/idls/fornax_ml_flow/namespaces/aidpcallback.js +140 -0
  52. package/dist/lib/idls/fornax_ml_flow/namespaces/annotation_job.js +82 -0
  53. package/dist/lib/idls/fornax_ml_flow/namespaces/base.js +16 -0
  54. package/dist/lib/idls/fornax_ml_flow/namespaces/batch_infer.js +105 -0
  55. package/dist/lib/idls/fornax_ml_flow/namespaces/dataprocess.js +34 -0
  56. package/dist/lib/idls/fornax_ml_flow/namespaces/dataset.js +63 -0
  57. package/dist/lib/idls/fornax_ml_flow/namespaces/datasetv2.js +177 -0
  58. package/dist/lib/idls/fornax_ml_flow/namespaces/datasetv2job.js +68 -0
  59. package/dist/lib/idls/fornax_ml_flow/namespaces/datasetv2lineage.js +50 -0
  60. package/dist/lib/idls/fornax_ml_flow/namespaces/datasetv2similarity.js +37 -0
  61. package/dist/lib/idls/fornax_ml_flow/namespaces/filter.js +16 -0
  62. package/dist/lib/idls/fornax_ml_flow/namespaces/flow_devops_evaluation_callback_common.js +62 -0
  63. package/dist/lib/idls/fornax_ml_flow/namespaces/flow_devops_prompt_common.js +378 -0
  64. package/dist/lib/idls/fornax_ml_flow/namespaces/fornax_domain_model.js +384 -0
  65. package/dist/lib/idls/fornax_ml_flow/namespaces/ml_flow_domain_model.js +385 -0
  66. package/dist/lib/idls/fornax_ml_flow/namespaces/openapi.js +16 -0
  67. package/dist/lib/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_annotateservice.js +16 -0
  68. package/dist/lib/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_annotationjobservice.js +16 -0
  69. package/dist/lib/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_batchinferservice.js +16 -0
  70. package/dist/lib/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_crowdsourcingannotationjobservice.js +16 -0
  71. package/dist/lib/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_dataprocessservice.js +16 -0
  72. package/dist/lib/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_datasetservice.js +16 -0
  73. package/dist/lib/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_datasetservicev2.js +16 -0
  74. package/dist/lib/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_modelservice.js +16 -0
  75. package/dist/lib/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_openapi_annotationjobservice.js +16 -0
  76. package/dist/lib/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_openapi_batchinferservice.js +16 -0
  77. package/dist/lib/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_openapi_datasetservicev2.js +16 -0
  78. package/dist/lib/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_tagservice.js +16 -0
  79. package/dist/lib/idls/fornax_ml_flow/namespaces/tag.js +60 -0
  80. package/dist/lib/idls/prompt_api/index.js +2071 -0
  81. package/dist/lib/idls/prompt_api/namespaces/base.js +16 -0
  82. package/dist/lib/idls/prompt_api/namespaces/flow_devops_prompt_callback.js +62 -0
  83. package/dist/lib/idls/prompt_api/namespaces/flow_devops_prompt_commercial_openapi.js +16 -0
  84. package/dist/lib/idls/prompt_api/namespaces/flow_devops_prompt_common.js +378 -0
  85. package/dist/lib/idls/prompt_api/namespaces/flow_devops_prompt_debug.js +16 -0
  86. package/dist/lib/idls/prompt_api/namespaces/flow_devops_prompt_manage.js +49 -0
  87. package/dist/lib/idls/prompt_api/namespaces/flow_devops_prompt_mcp.js +16 -0
  88. package/dist/lib/idls/prompt_api/namespaces/flow_devops_prompt_optimize.js +16 -0
  89. package/dist/lib/idls/prompt_api/namespaces/flow_devops_prompt_paas.js +72 -0
  90. package/dist/lib/idls/prompt_api/namespaces/flow_devops_prompt_platform.js +16 -0
  91. package/dist/lib/idls/prompt_api/namespaces/mcp.js +33 -0
  92. package/dist/lib/idls/prompt_api/namespaces/model.js +377 -0
  93. package/dist/lib/idls/prompt_api/namespaces/permission.js +72 -0
  94. package/dist/lib/idls/prompt_api/namespaces/release.js +50 -0
  95. package/dist/lib/prompt-editor/index.js +1 -1
  96. package/dist/lib/utils/model-config.js +13 -3
  97. package/dist/types/idls/fornax_ml_flow/index.d.ts +779 -0
  98. package/dist/types/idls/fornax_ml_flow/namespaces/ai_annotate.d.ts +102 -0
  99. package/dist/types/idls/fornax_ml_flow/namespaces/aidpcallback.d.ts +227 -0
  100. package/dist/types/idls/fornax_ml_flow/namespaces/annotation_job.d.ts +402 -0
  101. package/dist/types/idls/fornax_ml_flow/namespaces/base.d.ts +18 -0
  102. package/dist/types/idls/fornax_ml_flow/namespaces/batch_infer.d.ts +331 -0
  103. package/dist/types/idls/fornax_ml_flow/namespaces/dataprocess.d.ts +16 -0
  104. package/dist/types/idls/fornax_ml_flow/namespaces/dataset.d.ts +88 -0
  105. package/dist/types/idls/fornax_ml_flow/namespaces/datasetv2.d.ts +462 -0
  106. package/dist/types/idls/fornax_ml_flow/namespaces/datasetv2job.d.ts +180 -0
  107. package/dist/types/idls/fornax_ml_flow/namespaces/datasetv2lineage.d.ts +69 -0
  108. package/dist/types/idls/fornax_ml_flow/namespaces/datasetv2similarity.d.ts +8 -0
  109. package/dist/types/idls/fornax_ml_flow/namespaces/filter.d.ts +39 -0
  110. package/dist/types/idls/fornax_ml_flow/namespaces/flow_devops_evaluation_callback_common.d.ts +88 -0
  111. package/dist/types/idls/fornax_ml_flow/namespaces/flow_devops_prompt_common.d.ts +370 -0
  112. package/dist/types/idls/fornax_ml_flow/namespaces/fornax_domain_model.d.ts +320 -0
  113. package/dist/types/idls/fornax_ml_flow/namespaces/ml_flow_domain_model.d.ts +510 -0
  114. package/dist/types/idls/fornax_ml_flow/namespaces/openapi.d.ts +6 -0
  115. package/dist/types/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_annotateservice.d.ts +106 -0
  116. package/dist/types/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_annotationjobservice.d.ts +256 -0
  117. package/dist/types/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_batchinferservice.d.ts +73 -0
  118. package/dist/types/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_crowdsourcingannotationjobservice.d.ts +94 -0
  119. package/dist/types/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_dataprocessservice.d.ts +11 -0
  120. package/dist/types/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_datasetservice.d.ts +24 -0
  121. package/dist/types/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_datasetservicev2.d.ts +653 -0
  122. package/dist/types/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_modelservice.d.ts +83 -0
  123. package/dist/types/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_openapi_annotationjobservice.d.ts +81 -0
  124. package/dist/types/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_openapi_batchinferservice.d.ts +24 -0
  125. package/dist/types/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_openapi_datasetservicev2.d.ts +260 -0
  126. package/dist/types/idls/fornax_ml_flow/namespaces/stone_fornax_ml_flow_tagservice.d.ts +111 -0
  127. package/dist/types/idls/fornax_ml_flow/namespaces/tag.d.ts +109 -0
  128. package/dist/types/idls/prompt_api/index.d.ts +667 -0
  129. package/dist/types/idls/prompt_api/namespaces/base.d.ts +18 -0
  130. package/dist/types/idls/prompt_api/namespaces/flow_devops_prompt_callback.d.ts +102 -0
  131. package/dist/types/idls/prompt_api/namespaces/flow_devops_prompt_commercial_openapi.d.ts +81 -0
  132. package/dist/types/idls/prompt_api/namespaces/flow_devops_prompt_common.d.ts +1270 -0
  133. package/dist/types/idls/prompt_api/namespaces/flow_devops_prompt_debug.d.ts +197 -0
  134. package/dist/types/idls/prompt_api/namespaces/flow_devops_prompt_manage.d.ts +769 -0
  135. package/dist/types/idls/prompt_api/namespaces/flow_devops_prompt_mcp.d.ts +301 -0
  136. package/dist/types/idls/prompt_api/namespaces/flow_devops_prompt_optimize.d.ts +155 -0
  137. package/dist/types/idls/prompt_api/namespaces/flow_devops_prompt_paas.d.ts +198 -0
  138. package/dist/types/idls/prompt_api/namespaces/flow_devops_prompt_platform.d.ts +230 -0
  139. package/dist/types/idls/prompt_api/namespaces/mcp.d.ts +95 -0
  140. package/dist/types/idls/prompt_api/namespaces/model.d.ts +315 -0
  141. package/dist/types/idls/prompt_api/namespaces/permission.d.ts +52 -0
  142. package/dist/types/idls/prompt_api/namespaces/release.d.ts +62 -0
  143. package/dist/types/model-config-editor/basic-type.d.ts +2 -2
  144. package/dist/types/model-config-editor/model-config-form.d.ts +1 -1
  145. package/dist/types/model-config-editor/popover-type.d.ts +3 -3
  146. package/dist/types/model-select/index.d.ts +1 -1
  147. package/dist/types/model-select/model-option/index.d.ts +1 -1
  148. package/dist/types/prompt-editor/index.d.ts +1 -1
  149. package/dist/types/utils/model-config.d.ts +4 -4
  150. package/package.json +5 -3
@@ -0,0 +1,462 @@
1
+ import * as datasetv2similarity from './datasetv2similarity';
2
+ import * as tag from './tag';
3
+ export type Int64 = string | number;
4
+ export declare enum ContentType {
5
+ /** 基础类型 */
6
+ Text = 1,
7
+ Image = 2,
8
+ Audio = 3,
9
+ Video = 4,
10
+ /** 图文混排 */
11
+ MultiPart = 100,
12
+ }
13
+ export declare enum DatasetCategory {
14
+ /** 数据集 */
15
+ General = 1,
16
+ /** 训练集 (暂无) */
17
+ Training = 2,
18
+ /** 验证集 (暂无) */
19
+ Validation = 3,
20
+ /** 评测集 (暂无) */
21
+ Evaluation = 4,
22
+ }
23
+ export declare enum DatasetLockReason {
24
+ Undefined = 0,
25
+ /** 众包标注任务正在运行 */
26
+ CrowdsourcingAnnotateJobRunning = 1,
27
+ }
28
+ export declare enum DatasetStatus {
29
+ Available = 1,
30
+ Deleted = 2,
31
+ Expired = 3,
32
+ Importing = 4,
33
+ Exporting = 5,
34
+ Indexing = 6,
35
+ }
36
+ export declare enum DatasetVisibility {
37
+ /** 所有空间可见 */
38
+ Public = 1,
39
+ /** 当前空间可见 */
40
+ Space = 2,
41
+ /** 用户不可见 */
42
+ System = 3,
43
+ }
44
+ export declare enum FieldDisplayFormat {
45
+ PlainText = 1,
46
+ Markdown = 2,
47
+ JSON = 3,
48
+ YAML = 4,
49
+ Code = 5,
50
+ SingleOption = 6,
51
+ }
52
+ export declare enum FieldStatus {
53
+ Available = 1,
54
+ Deleted = 2,
55
+ }
56
+ export declare enum FieldTransformationType {
57
+ /** 移除未在当前列的 jsonSchema 中定义的字段(包括 properties 和 patternProperties),仅在列类型为 struct 时有效 */
58
+ RemoveExtraFields = 1,
59
+ }
60
+ export declare enum ItemErrorType {
61
+ /** schema 不匹配 */
62
+ MismatchSchema = 1,
63
+ /** 空数据 */
64
+ EmptyData = 2,
65
+ /** 单条数据大小超限 */
66
+ ExceedMaxItemSize = 3,
67
+ /** 数据集容量超限 */
68
+ ExceedDatasetCapacity = 4,
69
+ /** 文件格式错误 */
70
+ MalformedFile = 5,
71
+ /** 包含非法内容 */
72
+ IllegalContent = 6,
73
+ /** 缺少必填字段 */
74
+ MissingRequiredField = 7,
75
+ /** 数据嵌套层数超限 */
76
+ ExceedMaxNestedDepth = 8,
77
+ /** 数据转换失败 */
78
+ TransformItemFailed = 9,
79
+ /** system error */
80
+ InternalError = 100,
81
+ /** 清空数据集失败 */
82
+ ClearDatasetFailed = 101,
83
+ /** 读写文件失败 */
84
+ RWFileFailed = 102,
85
+ }
86
+ export declare enum LineageSourceType {
87
+ Manual = 1,
88
+ /** 需要根据 ItemSource.dataset.category 字段区分评测集/数据集/... */
89
+ Dataset = 2,
90
+ /** 需要根据 ItemSource.file.storage 字段区分HDFS/本地上传/... */
91
+ FileStorage = 3,
92
+ /** 数据回流,需要根据 ItemSource.span.isManual 是否是手动回流。如果是自动回流,则 ItemSource.jobID 中会包含对应的任务 ID */
93
+ DataReflow = 4,
94
+ /** 暂无 */
95
+ DataAnnotation = 5,
96
+ /** 暂无 */
97
+ DataProcessing = 6,
98
+ /** 暂无 */
99
+ DataGenerate = 7,
100
+ OpenAPI = 8,
101
+ /** 众包标注 */
102
+ CrowdsourcingAnnotation = 9,
103
+ }
104
+ export declare enum SchemaKey {
105
+ String = 1,
106
+ Integer = 2,
107
+ Float = 3,
108
+ Bool = 4,
109
+ Message = 5,
110
+ /** 单选 */
111
+ SingleChoice = 6,
112
+ }
113
+ export declare enum SecurityLevel {
114
+ L1 = 1,
115
+ L2 = 2,
116
+ L3 = 3,
117
+ L4 = 4,
118
+ }
119
+ export declare enum SnapshotStatus {
120
+ Unstarted = 1,
121
+ InProgress = 2,
122
+ Completed = 3,
123
+ Failed = 4,
124
+ }
125
+ export declare enum StorageProvider {
126
+ TOS = 1,
127
+ VETOS = 2,
128
+ HDFS = 3,
129
+ ImageX = 4,
130
+ /** 后端内部使用 */
131
+ Abase = 100,
132
+ RDS = 101,
133
+ LocalFS = 102,
134
+ }
135
+ export declare enum TrackedJobType {
136
+ /** 数据导入任务 */
137
+ DatasetIOJob = 1,
138
+ /** 数据回流任务 */
139
+ DataReflow = 2,
140
+ /** 标注任务 */
141
+ DataAnnotation = 3,
142
+ /** 数据处理任务 */
143
+ DataProcessing = 4,
144
+ /** 数据生成任务 */
145
+ DataGenerate = 5,
146
+ /** 众包标注任务 */
147
+ CrowdsourcingAnnotation = 6,
148
+ }
149
+ /** Dataset 数据集实体 */
150
+ export interface Dataset {
151
+ id: string;
152
+ appID?: number;
153
+ spaceID: string;
154
+ schemaID: string;
155
+ name?: string;
156
+ description?: string;
157
+ status?: DatasetStatus;
158
+ /** 业务场景分类 */
159
+ category?: DatasetCategory;
160
+ /** 提供给上层业务定义数据集类别 */
161
+ bizCategory?: string;
162
+ /** 当前数据集结构 */
163
+ schema?: DatasetSchema;
164
+ /** 密级 */
165
+ securityLevel?: SecurityLevel;
166
+ /** 可见性 */
167
+ visibility?: DatasetVisibility;
168
+ /** 规格限制 */
169
+ spec?: DatasetSpec;
170
+ /** 数据集功能开关 */
171
+ features?: DatasetFeatures;
172
+ /** 最新的版本号 */
173
+ latestVersion?: string;
174
+ /** 下一个的版本号 */
175
+ nextVersionNum?: Int64;
176
+ /** 数据条数 */
177
+ itemCount?: string;
178
+ /** 通用信息 */
179
+ createdBy?: string;
180
+ createdAt?: string;
181
+ updatedBy?: string;
182
+ updatedAt?: string;
183
+ expiredAt?: string;
184
+ /** DTO 专用字段
185
+ 是否有未提交的修改 */
186
+ changeUncommitted?: boolean;
187
+ /** 数据集锁定信息 */
188
+ lockInfo?: Array<DatasetLockInfo>;
189
+ }
190
+ export interface DatasetFeatures {
191
+ /** 变更 schema */
192
+ editSchema?: boolean;
193
+ /** 多轮数据 */
194
+ repeatedData?: boolean;
195
+ /** 多模态 */
196
+ multiModal?: boolean;
197
+ }
198
+ /** DatasetItem 数据内容 */
199
+ export interface DatasetItem {
200
+ /** 主键 ID,创建时可以不传 */
201
+ id?: string;
202
+ /** 冗余 app ID,创建时可以不传 */
203
+ appID?: number;
204
+ /** 冗余 space ID,创建时可以不传 */
205
+ spaceID?: string;
206
+ /** 所属的 data ID,创建时可以不传 */
207
+ datasetID?: string;
208
+ /** 插入时对应的 schema ID,后端根据 req 参数中的 datasetID 自动填充 */
209
+ schemaID?: string;
210
+ /** 数据在当前数据集内的唯一 ID,不随版本发生改变 */
211
+ itemID?: string;
212
+ /** 数据插入的幂等 key */
213
+ itemKey?: string;
214
+ /** 数据内容 */
215
+ data?: Array<FieldData>;
216
+ /** 多轮数据内容,与 data 互斥 */
217
+ repeatedData?: Array<ItemData>;
218
+ /** item 的来源信息,批量返回时不填充任务的详细信息。创建时不填充则视为为手动添加 */
219
+ source?: ItemSource;
220
+ /** 通用信息 */
221
+ createdBy?: string;
222
+ createdAt?: string;
223
+ updatedBy?: string;
224
+ updatedAt?: string;
225
+ /** DTO 专用字段
226
+ 数据(data 或 repeatedData)是否省略。列表查询 item 时,特长的数据内容不予返回,可通过单独 Item 接口获取内容 */
227
+ dataOmitted?: boolean;
228
+ }
229
+ export interface DatasetLockInfo {
230
+ reason?: DatasetLockReason;
231
+ /** 众包标注任务ID */
232
+ crowdsourcingAnnotateJobID?: string;
233
+ }
234
+ /** DatasetSchema 数据集 Schema,包含数据集列的类型限制等信息 */
235
+ export interface DatasetSchema {
236
+ /** 主键 ID,创建时可以不传 */
237
+ id?: string;
238
+ /** schema 所在的空间 ID,创建时可以不传 */
239
+ appID?: number;
240
+ /** schema 所在的空间 ID,创建时可以不传 */
241
+ spaceID?: string;
242
+ /** 数据集 ID,创建时可以不传 */
243
+ datasetID?: string;
244
+ /** 数据集列约束 */
245
+ fields?: Array<FieldSchema>;
246
+ /** 是否不允许编辑 */
247
+ immutable?: boolean;
248
+ /** 通用信息 */
249
+ createdBy?: string;
250
+ createdAt?: string;
251
+ updatedBy?: string;
252
+ updatedAt?: string;
253
+ updateVersion?: string;
254
+ }
255
+ export interface DatasetSpec {
256
+ /** 条数上限 */
257
+ maxItemCount?: string;
258
+ /** 字段数量上限 */
259
+ maxFieldCount?: number;
260
+ /** 单条数据字数上限 */
261
+ maxItemSize?: string;
262
+ /** 单条 array/struct 数据嵌套上限 */
263
+ maxItemDataNestedDepth?: number;
264
+ }
265
+ /** DatasetVersion 数据集版本元信息,不包含数据本身 */
266
+ export interface DatasetVersion {
267
+ id: string;
268
+ appID?: number;
269
+ spaceID: string;
270
+ datasetID: string;
271
+ schemaID: string;
272
+ /** 展示的版本号,SemVer2 三段式 */
273
+ version?: string;
274
+ /** 后端记录的数字版本号,从 1 开始递增 */
275
+ versionNum?: string;
276
+ /** 版本描述 */
277
+ description?: string;
278
+ /** marshal 后的版本保存时的数据集元信息,不包含 schema */
279
+ datasetBrief?: string;
280
+ /** 数据条数 */
281
+ itemCount?: string;
282
+ /** 当前版本的快照状态 */
283
+ snapshotStatus?: SnapshotStatus;
284
+ /** 通用信息 */
285
+ createdBy?: string;
286
+ createdAt?: string;
287
+ /** 版本禁用的时间 */
288
+ disabledAt?: string;
289
+ updatedBy?: string;
290
+ updatedAt?: string;
291
+ }
292
+ export interface FieldData {
293
+ key?: string;
294
+ /** 字段名,写入 Item 时 key 与 name 提供其一即可,同时提供时以 key 为准 */
295
+ name?: string;
296
+ contentType?: ContentType;
297
+ content?: string;
298
+ /** 外部存储信息 */
299
+ attachments?: Array<ObjectStorage>;
300
+ /** 数据的渲染格式 */
301
+ format?: FieldDisplayFormat;
302
+ /** 图文混排时,图文内容 */
303
+ parts?: Array<FieldData>;
304
+ /** 这条数据生成traceID */
305
+ traceID?: string;
306
+ /** 是否生成失败 */
307
+ genFail?: boolean;
308
+ /** 标签回流失败后的展示名称 */
309
+ fallbackDisplayName?: string;
310
+ }
311
+ export interface FieldSchema {
312
+ /** 数据集 schema 版本变化中 key 唯一,新建时自动生成,不需传入 */
313
+ key?: string;
314
+ /** 展示名称 */
315
+ name?: string;
316
+ /** 描述 */
317
+ description?: string;
318
+ /** 类型,如 文本,图片,etc. */
319
+ contentType?: ContentType;
320
+ /** 默认渲染格式,如 code, json, etc. */
321
+ defaultFormat?: FieldDisplayFormat;
322
+ /** 对应的内置 schema */
323
+ schemaKey?: SchemaKey;
324
+ /** [20,50) 内容格式限制相关
325
+ 文本内容格式限制,格式为 JSON schema,协议参考 https://json-schema.org/specification */
326
+ textSchema?: string;
327
+ /** 多模态规格限制 */
328
+ multiModelSpec?: MultiModalSpec;
329
+ /** 当前列的数据是否必填,不填则会报错 */
330
+ isRequired?: boolean;
331
+ /** 用户是否不可见 */
332
+ hidden?: boolean;
333
+ /** 当前列的状态,创建/更新时可以不传 */
334
+ status?: FieldStatus;
335
+ /** 是否开启相似度索引 */
336
+ similaritySearchConfig?: SimilaritySearchConfig;
337
+ /** 质量分配置 */
338
+ qualityScoreConfig?: QualityScoreConfig;
339
+ /** 标签字段配置 */
340
+ tagFieldConfig?: TagFieldConfig;
341
+ /** 默认的预置转换配置,目前在数据校验后执行 */
342
+ defaultTransformations?: Array<FieldTransformationConfig>;
343
+ }
344
+ export interface FieldTransformationConfig {
345
+ /** 预置的转换类型 */
346
+ transType?: FieldTransformationType;
347
+ /** 当前转换配置在这一列上的数据及其嵌套的子结构上均生效 */
348
+ global?: boolean;
349
+ }
350
+ export interface FileUploadToken {
351
+ accessKeyID?: string;
352
+ secretAccessKey?: string;
353
+ sessionToken?: string;
354
+ expiredTime?: string;
355
+ currentTime?: string;
356
+ }
357
+ export interface ItemData {
358
+ id?: string;
359
+ data?: Array<FieldData>;
360
+ }
361
+ export interface ItemErrorDetail {
362
+ message?: string;
363
+ /** 单条错误数据在输入数据中的索引。从 0 开始,下同 */
364
+ index?: number;
365
+ /** [startIndex, endIndex] 表示区间错误范围, 如 ExceedDatasetCapacity 错误时 */
366
+ startIndex?: number;
367
+ endIndex?: number;
368
+ /** ItemErrorType=MismatchSchema, key 为 FieldSchema.name, value 为错误信息 */
369
+ messagesByField?: Record<string, string>;
370
+ }
371
+ export interface ItemErrorGroup {
372
+ type?: ItemErrorType;
373
+ summary?: string;
374
+ /** 错误条数 */
375
+ errorCount?: number;
376
+ /** 批量写入时,每类错误至多提供 5 个错误详情;导入任务,至多提供 10 个错误详情 */
377
+ details?: Array<ItemErrorDetail>;
378
+ }
379
+ export interface ItemSource {
380
+ type: LineageSourceType;
381
+ /** 源 item 信息,可以为空 */
382
+ trackedItem?: TrackedItem;
383
+ /** 任务类型,根据该字段区分数据导入任务/数据回流任务/... */
384
+ jobType?: TrackedJobType;
385
+ /** item 关联的任务 id,为 0 表示无相应任务(例如数据是通过克隆另一数据行产生的) */
386
+ jobID?: string;
387
+ /** type = Dataset 时,从该字段获取数据集具体信息 */
388
+ dataset?: TrackedDataset;
389
+ /** type = FileStorage 时,从该字段获取文件信息 */
390
+ file?: TrackedFile;
391
+ /** type = DataReflow 时,从该字段获取 span 信息 */
392
+ span?: TrackedTraceSpan;
393
+ createdAt?: string;
394
+ }
395
+ export interface MultiModalSpec {
396
+ /** 文件数量上限 */
397
+ maxFileCount?: Int64;
398
+ /** 文件大小上限 */
399
+ maxFileSize?: Int64;
400
+ /** 文件格式 */
401
+ supportedFormats?: Array<string>;
402
+ }
403
+ export interface ObjectStorage {
404
+ provider?: StorageProvider;
405
+ name?: string;
406
+ uri?: string;
407
+ url?: string;
408
+ thumbURL?: string;
409
+ }
410
+ export interface OrderBy {
411
+ /** 排序字段 */
412
+ field?: string;
413
+ /** 升序,默认倒序 */
414
+ isAsc?: boolean;
415
+ }
416
+ /** 质量分配置 */
417
+ export interface QualityScoreConfig {
418
+ /** 列是否为质量分 */
419
+ enabled?: boolean;
420
+ }
421
+ /** 相似度算法的配置 */
422
+ export interface SimilaritySearchConfig {
423
+ /** 是否开启相似度索引 */
424
+ enabled?: boolean;
425
+ /** 配置了哪个相似度算法 */
426
+ similarityAlgorithm?: datasetv2similarity.SimilarityAlgorithm;
427
+ /** 所使用的相似度模型 */
428
+ embeddingType?: datasetv2similarity.EmbeddingModel;
429
+ }
430
+ export interface TagFieldConfig {
431
+ /** tag配置 */
432
+ tagInfo?: tag.TagInfo;
433
+ }
434
+ /** 源数据集信息(数据集 id 从 TrackedItem 中获取,此处不额外返回) */
435
+ export interface TrackedDataset {
436
+ /** 数据集类别,根据该字段区分评测集/数据集/... */
437
+ category?: DatasetCategory;
438
+ datasetName?: string;
439
+ }
440
+ export interface TrackedFile {
441
+ /** 存储介质,根据该字段区分 hdfs/本地文件(即 ImageX)/... */
442
+ storage?: StorageProvider;
443
+ /** 用户上传文件的原始文件名 */
444
+ originalFileName?: string;
445
+ }
446
+ export interface TrackedItem {
447
+ spaceID?: string;
448
+ datasetID?: string;
449
+ itemID?: string;
450
+ /** 版本号提交后的版本 id,为 0 表示为草稿版本 */
451
+ versionID?: string;
452
+ /** 版本号(三段式) */
453
+ version?: string;
454
+ }
455
+ export interface TrackedTraceSpan {
456
+ traceID?: string;
457
+ spanID?: string;
458
+ spanName?: string;
459
+ spanType?: string;
460
+ /** 是否手工回流 */
461
+ isManual?: boolean;
462
+ }
@@ -0,0 +1,180 @@
1
+ import * as datasetv2 from './datasetv2';
2
+ import * as datasetv2similarity from './datasetv2similarity';
3
+ export type Int64 = string | number;
4
+ export declare enum FileFormat {
5
+ JSONL = 1,
6
+ Parquet = 2,
7
+ CSV = 3,
8
+ /** [100, 200) 压缩格式 */
9
+ ZIP = 100,
10
+ }
11
+ export declare enum ImportConfirmType {
12
+ NotConfirmed = 0,
13
+ ConfirmedDuplicated = 1,
14
+ ConfirmedNotDuplicated = 2,
15
+ }
16
+ /** 通用任务状态 */
17
+ export declare enum JobStatus {
18
+ Undefined = 0,
19
+ /** 待处理 */
20
+ Pending = 1,
21
+ /** 处理中 */
22
+ Running = 2,
23
+ /** 已完成 */
24
+ Completed = 3,
25
+ /** 失败 */
26
+ Failed = 4,
27
+ /** 已取消 */
28
+ Cancelled = 5,
29
+ }
30
+ /** 通用任务类型 */
31
+ export declare enum JobType {
32
+ ImportFromFile = 1,
33
+ ExportToFile = 2,
34
+ ExportToDataset = 3,
35
+ }
36
+ export declare enum SourceType {
37
+ File = 1,
38
+ Dataset = 2,
39
+ }
40
+ export interface DatasetIODataset {
41
+ spaceID?: string;
42
+ datasetID: string;
43
+ versionID?: string;
44
+ /** 数据集详情,在接口上返回,不写入 */
45
+ dataset?: datasetv2.Dataset;
46
+ /** 版本详情,在接口上返回,不写入 */
47
+ version?: datasetv2.DatasetVersion;
48
+ }
49
+ export interface DatasetIOEndpoint {
50
+ file?: DatasetIOFile;
51
+ dataset?: DatasetIODataset;
52
+ }
53
+ export interface DatasetIOFile {
54
+ provider: datasetv2.StorageProvider;
55
+ path: string;
56
+ /** 数据文件的格式 */
57
+ format?: FileFormat;
58
+ /** 压缩包格式 */
59
+ compressFormat?: FileFormat;
60
+ /** path 为文件夹或压缩包时,数据文件列表, 服务端设置 */
61
+ files?: Array<string>;
62
+ /** 原始的文件名,创建文件时由前端写入。为空则与 path 保持一致 */
63
+ originalFileName?: string;
64
+ }
65
+ /** DatasetIOJob 数据集导入导出任务 */
66
+ export interface DatasetIOJob {
67
+ id: string;
68
+ appID?: number;
69
+ spaceID: string;
70
+ /** 导入导出到文件时,为数据集 ID;数据集间转移时,为目标数据集 ID */
71
+ datasetID: string;
72
+ jobType: JobType;
73
+ source: DatasetIOEndpoint;
74
+ target: DatasetIOEndpoint;
75
+ /** 字段映射 */
76
+ fieldMappings?: Array<FieldMapping>;
77
+ option?: DatasetIOJobOption;
78
+ /** 运行数据, [20, 100) */
79
+ status?: JobStatus;
80
+ progress?: DatasetIOJobProgress;
81
+ errors?: Array<datasetv2.ItemErrorGroup>;
82
+ /** 通用信息 */
83
+ createdBy?: string;
84
+ createdAt?: string;
85
+ updatedBy?: string;
86
+ updatedAt?: string;
87
+ startedAt?: string;
88
+ endedAt?: string;
89
+ }
90
+ export interface DatasetIOJobOption {
91
+ /** 覆盖数据集,仅在导入任务中生效 */
92
+ overwriteDataset?: boolean;
93
+ /** 需要按照手动打标的taskID结果导入,被确认无需导入的不会被导入,仅在导入任务中生效 */
94
+ jobID?: Int64;
95
+ }
96
+ export interface DatasetIOJobProgress {
97
+ /** 总量 */
98
+ total?: Int64;
99
+ /** 已处理数量 */
100
+ processed?: Int64;
101
+ /** 已成功处理的数量 */
102
+ added?: Int64;
103
+ /** 已跳过的数量 */
104
+ skipped?: Int64;
105
+ /** 下一个扫描的游标,在数据源为数据集时生效 */
106
+ cursor?: string;
107
+ /** 子任务
108
+ 可空, 表示子任务的名称 */
109
+ name?: string;
110
+ /** 子任务的进度 */
111
+ subProgresses?: Array<DatasetIOJobProgress>;
112
+ }
113
+ export interface FieldMapping {
114
+ source: string;
115
+ target: string;
116
+ }
117
+ export interface ItemDeduplicateJob {
118
+ id: string;
119
+ spaceID: string;
120
+ datasetID: string;
121
+ /** 导入文件需要的数据 */
122
+ jobType?: JobType;
123
+ source?: DatasetIOEndpoint;
124
+ target?: DatasetIOEndpoint;
125
+ /** 字段映射 */
126
+ fieldMappings?: Array<FieldMapping>;
127
+ option?: DatasetIOJobOption;
128
+ /** job信息
129
+ 如果status=Completed,则表明已经处理完成 */
130
+ status?: JobStatus;
131
+ /** 任务当时的简要信息,冗余存储 */
132
+ itemDedupJobBrief?: string;
133
+ /** 根据哪一列去重 */
134
+ fieldKey?: string;
135
+ /** 去重算法 */
136
+ similarityAlgorithm?: datasetv2similarity.SimilarityAlgorithm;
137
+ /** 阈值 */
138
+ threshold?: Int64;
139
+ /** job中需要处理的总数据,不跟随筛选条件变动 */
140
+ jobTotal?: Int64;
141
+ /** 已确认的重复条数,不跟随筛选条件变动 */
142
+ confirmedDedupItemsCount?: Int64;
143
+ /** 已确认的不重复条数,不跟随筛选条件变动 */
144
+ confirmedNotDedupItemsCount?: Int64;
145
+ /** 错误信息,当 JobStatus=Failed时使用 */
146
+ error?: string;
147
+ /** 去重列表信息
148
+ 去重列表的内容 */
149
+ pairs?: Array<ItemDeduplicatePair>;
150
+ /** pairs总条数,跟随筛选条件变动 */
151
+ total?: Int64;
152
+ /** 通用信息 */
153
+ createdBy?: string;
154
+ createdAt?: string;
155
+ updatedBy?: string;
156
+ updatedAt?: string;
157
+ startedAt?: string;
158
+ endedAt?: string;
159
+ }
160
+ export interface ItemDeduplicatePair {
161
+ id: string;
162
+ /** 本条主键 */
163
+ uniqKey: string;
164
+ /** 新导入的内容 */
165
+ newItem?: datasetv2.DatasetItem;
166
+ /** 可能重复的内容 */
167
+ items?: Array<SuspectedDupItemInfo>;
168
+ /** 是否确认 */
169
+ importConfirmType?: ImportConfirmType;
170
+ createdBy?: string;
171
+ createdAt?: string;
172
+ updatedBy?: string;
173
+ updatedAt?: string;
174
+ }
175
+ export interface SuspectedDupItemInfo {
176
+ /** 行内容 */
177
+ item?: datasetv2.DatasetItem;
178
+ /** 相似度评分 */
179
+ score?: Int64;
180
+ }
@@ -0,0 +1,69 @@
1
+ import * as datasetv2 from './datasetv2';
2
+ export type Int64 = string | number;
3
+ export declare enum LineageSourceType {
4
+ Manual = 1,
5
+ /** 需要根据 ItemSource.dataset.category 字段区分评测集/数据集/... */
6
+ Dataset = 2,
7
+ /** 需要根据 ItemSource.file.storage 字段区分HDFS/本地上传/... */
8
+ FileStorage = 3,
9
+ /** 暂无 */
10
+ DataReflow = 4,
11
+ /** 暂无 */
12
+ DataAnnotation = 5,
13
+ /** 暂无 */
14
+ DataProcessing = 6,
15
+ /** 暂无 */
16
+ DataGenerate = 7,
17
+ OpenAPI = 8,
18
+ /** 众包标注任务 */
19
+ CrowdsourcingAnnotation = 9,
20
+ }
21
+ export declare enum TrackedJobType {
22
+ /** 数据导入任务 */
23
+ DatasetIOJob = 1,
24
+ /** 数据回流任务 */
25
+ DataReflow = 2,
26
+ /** 标注任务 */
27
+ DataAnnotation = 3,
28
+ /** 数据处理任务 */
29
+ DataProcessing = 4,
30
+ /** 数据生成任务 */
31
+ DataGenerate = 5,
32
+ /** 众包标注任务 */
33
+ CrowdsourcingAnnotation = 6,
34
+ }
35
+ export interface ItemSource {
36
+ type: LineageSourceType;
37
+ /** 源 item 信息,可以为空 */
38
+ trackedItem?: TrackedItem;
39
+ /** 任务类型,根据该字段区分数据导入任务/数据回流任务/... */
40
+ jobType?: TrackedJobType;
41
+ /** item 关联的任务 id,为 0 表示无相应任务(例如数据是通过克隆另一数据行产生的) */
42
+ jobID?: string;
43
+ /** type = Dataset 时,从该字段获取数据集具体信息 */
44
+ dataset?: TrackedDataset;
45
+ /** type = FileStorage 时,从该字段获取文件信息 */
46
+ file?: TrackedFile;
47
+ createdAt?: string;
48
+ }
49
+ /** 源数据集信息(数据集 id 从 TrackedItem 中获取,此处不额外返回) */
50
+ export interface TrackedDataset {
51
+ /** 数据集类别,根据该字段区分评测集/数据集/... */
52
+ category?: datasetv2.DatasetCategory;
53
+ datasetName?: string;
54
+ }
55
+ export interface TrackedFile {
56
+ /** 存储介质,根据该字段区分 hdfs/本地文件(即 ImageX)/... */
57
+ storage?: datasetv2.StorageProvider;
58
+ /** 用户上传文件的原始文件名 */
59
+ originalFileName?: string;
60
+ }
61
+ export interface TrackedItem {
62
+ spaceID?: string;
63
+ datasetID?: string;
64
+ itemID?: string;
65
+ /** 版本号提交后的版本 id,为 0 表示为草稿版本 */
66
+ versionID?: string;
67
+ /** 版本号(三段式) */
68
+ version?: string;
69
+ }