@longzai-intelligence-knowledge-graph/sdk 0.0.0-stage → 0.0.2
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/dist/index.d.ts +4515 -0
- package/dist/index.js +1 -0
- package/package.json +39 -4
- package/README.md +0 -3
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,4515 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
//#region src/shared/errors.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* 契约校验部位
|
|
5
|
+
*/
|
|
6
|
+
type ApiContractPart = 'params' | 'query' | 'body' | 'response';
|
|
7
|
+
/**
|
|
8
|
+
* 契约校验错误详情
|
|
9
|
+
*/
|
|
10
|
+
type ApiContractErrorDetails = {
|
|
11
|
+
/**
|
|
12
|
+
* 端点标识,形如 graph.createGraph
|
|
13
|
+
*/
|
|
14
|
+
readonly endpoint: string;
|
|
15
|
+
/**
|
|
16
|
+
* 校验失败的部位
|
|
17
|
+
*/
|
|
18
|
+
readonly part: ApiContractPart;
|
|
19
|
+
/**
|
|
20
|
+
* 原始 zod 校验错误
|
|
21
|
+
*/
|
|
22
|
+
readonly cause: z.ZodError;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* 契约校验错误:端点入参或响应不符合生成契约时抛出
|
|
26
|
+
*/
|
|
27
|
+
declare class ApiContractError extends Error {
|
|
28
|
+
/**
|
|
29
|
+
* 端点标识,形如 graph.createGraph
|
|
30
|
+
*/
|
|
31
|
+
readonly endpoint: string;
|
|
32
|
+
/**
|
|
33
|
+
* 校验失败的部位
|
|
34
|
+
*/
|
|
35
|
+
readonly part: ApiContractPart;
|
|
36
|
+
/**
|
|
37
|
+
* 原始 zod 校验错误
|
|
38
|
+
*/
|
|
39
|
+
readonly cause: z.ZodError;
|
|
40
|
+
/**
|
|
41
|
+
* 构造契约校验错误实例
|
|
42
|
+
*
|
|
43
|
+
* @param details - 错误详情
|
|
44
|
+
*/
|
|
45
|
+
constructor(details: ApiContractErrorDetails);
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
48
|
+
//#region src/shared/transport.types.d.ts
|
|
49
|
+
/**
|
|
50
|
+
* 本文件由手工终态对齐生成形态维护,定义真源为产品仓 define 定义中心。
|
|
51
|
+
* 定义真源:产品仓 define 定义中心(见 `lzi-api.config.ts` definitions 入口)。
|
|
52
|
+
* 重新生成:`bun run api:generate`;一致性校验:`bun run api:check`。
|
|
53
|
+
*/
|
|
54
|
+
/**
|
|
55
|
+
* 生成包的最小传输契约:产品仓以 transport http-core 客户端或任意满足
|
|
56
|
+
* 结构约定的实现注入;生成包自身仅依赖 zod,不依赖任何定义侧模块
|
|
57
|
+
*/
|
|
58
|
+
/**
|
|
59
|
+
* HTTP 方法字面量联合,端点契约使用
|
|
60
|
+
*/
|
|
61
|
+
type ApiHttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
62
|
+
/**
|
|
63
|
+
* 传输请求描述,端点函数组装后交给传输实现
|
|
64
|
+
*/
|
|
65
|
+
type ApiTransportRequest = {
|
|
66
|
+
/**
|
|
67
|
+
* HTTP 方法
|
|
68
|
+
*/
|
|
69
|
+
readonly method: ApiHttpMethod;
|
|
70
|
+
/**
|
|
71
|
+
* 完整路径,路径参数已代入并编码
|
|
72
|
+
*/
|
|
73
|
+
readonly path: string;
|
|
74
|
+
/**
|
|
75
|
+
* 查询参数,已通过 schema 校验
|
|
76
|
+
*/
|
|
77
|
+
readonly query?: unknown;
|
|
78
|
+
/**
|
|
79
|
+
* 请求体,已通过 schema 校验
|
|
80
|
+
*/
|
|
81
|
+
readonly body?: unknown;
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* 传输接口,由产品仓注入实现
|
|
85
|
+
*/
|
|
86
|
+
type ApiTransport = {
|
|
87
|
+
/**
|
|
88
|
+
* 执行一次请求并返回原始响应体
|
|
89
|
+
*/
|
|
90
|
+
request(request: ApiTransportRequest): Promise<unknown>;
|
|
91
|
+
};
|
|
92
|
+
//#endregion
|
|
93
|
+
//#region src/shared/transport.utils.d.ts
|
|
94
|
+
/**
|
|
95
|
+
* 本文件由手工终态对齐生成形态维护,定义真源为产品仓 define 定义中心。
|
|
96
|
+
* 定义真源:产品仓 define 定义中心(见 `lzi-api.config.ts` definitions 入口)。
|
|
97
|
+
* 重新生成:`bun run api:generate`;一致性校验:`bun run api:check`。
|
|
98
|
+
*/
|
|
99
|
+
/**
|
|
100
|
+
* 路径参数代入工具,端点函数使用
|
|
101
|
+
*/
|
|
102
|
+
/**
|
|
103
|
+
* 将路径模板中的参数占位符代入实际值并完成 URL 编码
|
|
104
|
+
*
|
|
105
|
+
* @param template - 含参数占位符的路径模板
|
|
106
|
+
* @param params - 路径参数值集合
|
|
107
|
+
* @returns 代入并编码后的完整路径
|
|
108
|
+
* @throws {@link Error} 路径参数缺失时抛出错误
|
|
109
|
+
*/
|
|
110
|
+
declare function buildApiPath(template: string, params: Record<string, unknown>): string;
|
|
111
|
+
//#endregion
|
|
112
|
+
//#region src/domains/graph/graph.dto.d.ts
|
|
113
|
+
/**
|
|
114
|
+
* 域公共枚举定义:GraphKind
|
|
115
|
+
*/
|
|
116
|
+
declare const GraphKindSchema: z.ZodEnum<{
|
|
117
|
+
custom: "custom";
|
|
118
|
+
organization: "organization";
|
|
119
|
+
person: "person";
|
|
120
|
+
society: "society";
|
|
121
|
+
}>;
|
|
122
|
+
/**
|
|
123
|
+
* GraphKind 的推断类型
|
|
124
|
+
*/
|
|
125
|
+
type GraphKind = z.infer<typeof GraphKindSchema>;
|
|
126
|
+
/**
|
|
127
|
+
* 域公共枚举常量:GraphKind
|
|
128
|
+
*/
|
|
129
|
+
declare const GraphKind: {
|
|
130
|
+
readonly person: 'person';
|
|
131
|
+
readonly organization: 'organization';
|
|
132
|
+
readonly society: 'society';
|
|
133
|
+
readonly custom: 'custom';
|
|
134
|
+
};
|
|
135
|
+
/**
|
|
136
|
+
* 空体回执契约,端口成功路径返回 void 的端点共用
|
|
137
|
+
*/
|
|
138
|
+
declare const NullResultSchema: z.ZodLiteral<null>;
|
|
139
|
+
/**
|
|
140
|
+
* NullResult 的推断类型
|
|
141
|
+
*/
|
|
142
|
+
type NullResult = z.infer<typeof NullResultSchema>;
|
|
143
|
+
/**
|
|
144
|
+
* 图谱档案镜像
|
|
145
|
+
*/
|
|
146
|
+
declare const GraphProfileSchema: z.ZodObject<{
|
|
147
|
+
nodeTypes: z.ZodArray<z.ZodObject<{
|
|
148
|
+
key: z.ZodString;
|
|
149
|
+
label: z.ZodString;
|
|
150
|
+
color: z.ZodOptional<z.ZodString>;
|
|
151
|
+
}, z.core.$strip>>;
|
|
152
|
+
edgeTypes: z.ZodArray<z.ZodObject<{
|
|
153
|
+
key: z.ZodString;
|
|
154
|
+
label: z.ZodString;
|
|
155
|
+
directed: z.ZodBoolean;
|
|
156
|
+
dashed: z.ZodOptional<z.ZodBoolean>;
|
|
157
|
+
dag: z.ZodOptional<z.ZodBoolean>;
|
|
158
|
+
}, z.core.$strip>>;
|
|
159
|
+
groupAxes: z.ZodArray<z.ZodObject<{
|
|
160
|
+
key: z.ZodString;
|
|
161
|
+
label: z.ZodString;
|
|
162
|
+
property: z.ZodString;
|
|
163
|
+
order: z.ZodEnum<{
|
|
164
|
+
asc: "asc";
|
|
165
|
+
desc: "desc";
|
|
166
|
+
}>;
|
|
167
|
+
}, z.core.$strip>>;
|
|
168
|
+
defaultNodeType: z.ZodString;
|
|
169
|
+
defaultEdgeType: z.ZodString;
|
|
170
|
+
}, z.core.$strip>;
|
|
171
|
+
/**
|
|
172
|
+
* 图谱档案
|
|
173
|
+
*/
|
|
174
|
+
type GraphProfile = z.infer<typeof GraphProfileSchema>;
|
|
175
|
+
/**
|
|
176
|
+
* 图谱数据束镜像
|
|
177
|
+
*/
|
|
178
|
+
declare const GraphBundleSchema: z.ZodObject<{
|
|
179
|
+
graph: z.ZodObject<{
|
|
180
|
+
name: z.ZodString;
|
|
181
|
+
kind: z.ZodEnum<{
|
|
182
|
+
custom: "custom";
|
|
183
|
+
organization: "organization";
|
|
184
|
+
person: "person";
|
|
185
|
+
society: "society";
|
|
186
|
+
}>;
|
|
187
|
+
description: z.ZodOptional<z.ZodString>;
|
|
188
|
+
profile: z.ZodObject<{
|
|
189
|
+
nodeTypes: z.ZodArray<z.ZodObject<{
|
|
190
|
+
key: z.ZodString;
|
|
191
|
+
label: z.ZodString;
|
|
192
|
+
color: z.ZodOptional<z.ZodString>;
|
|
193
|
+
}, z.core.$strip>>;
|
|
194
|
+
edgeTypes: z.ZodArray<z.ZodObject<{
|
|
195
|
+
key: z.ZodString;
|
|
196
|
+
label: z.ZodString;
|
|
197
|
+
directed: z.ZodBoolean;
|
|
198
|
+
dashed: z.ZodOptional<z.ZodBoolean>;
|
|
199
|
+
dag: z.ZodOptional<z.ZodBoolean>;
|
|
200
|
+
}, z.core.$strip>>;
|
|
201
|
+
groupAxes: z.ZodArray<z.ZodObject<{
|
|
202
|
+
key: z.ZodString;
|
|
203
|
+
label: z.ZodString;
|
|
204
|
+
property: z.ZodString;
|
|
205
|
+
order: z.ZodEnum<{
|
|
206
|
+
asc: "asc";
|
|
207
|
+
desc: "desc";
|
|
208
|
+
}>;
|
|
209
|
+
}, z.core.$strip>>;
|
|
210
|
+
defaultNodeType: z.ZodString;
|
|
211
|
+
defaultEdgeType: z.ZodString;
|
|
212
|
+
}, z.core.$strip>;
|
|
213
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
214
|
+
}, z.core.$strip>;
|
|
215
|
+
nodes: z.ZodArray<z.ZodObject<{
|
|
216
|
+
id: z.ZodString;
|
|
217
|
+
label: z.ZodString;
|
|
218
|
+
nodeType: z.ZodString;
|
|
219
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
220
|
+
}, z.core.$strip>>;
|
|
221
|
+
edges: z.ZodArray<z.ZodObject<{
|
|
222
|
+
id: z.ZodOptional<z.ZodString>;
|
|
223
|
+
sourceId: z.ZodString;
|
|
224
|
+
targetId: z.ZodString;
|
|
225
|
+
edgeType: z.ZodString;
|
|
226
|
+
label: z.ZodOptional<z.ZodString>;
|
|
227
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
228
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
229
|
+
}, z.core.$strip>>;
|
|
230
|
+
}, z.core.$strip>;
|
|
231
|
+
/**
|
|
232
|
+
* 图谱数据束
|
|
233
|
+
*/
|
|
234
|
+
type GraphBundle = z.infer<typeof GraphBundleSchema>;
|
|
235
|
+
/**
|
|
236
|
+
* 图谱实体镜像
|
|
237
|
+
*/
|
|
238
|
+
declare const GraphSchema: z.ZodObject<{
|
|
239
|
+
id: z.ZodString;
|
|
240
|
+
name: z.ZodString;
|
|
241
|
+
kind: z.ZodEnum<{
|
|
242
|
+
custom: "custom";
|
|
243
|
+
organization: "organization";
|
|
244
|
+
person: "person";
|
|
245
|
+
society: "society";
|
|
246
|
+
}>;
|
|
247
|
+
description: z.ZodOptional<z.ZodString>;
|
|
248
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
249
|
+
profile: z.ZodOptional<z.ZodObject<{
|
|
250
|
+
nodeTypes: z.ZodArray<z.ZodObject<{
|
|
251
|
+
key: z.ZodString;
|
|
252
|
+
label: z.ZodString;
|
|
253
|
+
color: z.ZodOptional<z.ZodString>;
|
|
254
|
+
}, z.core.$strip>>;
|
|
255
|
+
edgeTypes: z.ZodArray<z.ZodObject<{
|
|
256
|
+
key: z.ZodString;
|
|
257
|
+
label: z.ZodString;
|
|
258
|
+
directed: z.ZodBoolean;
|
|
259
|
+
dashed: z.ZodOptional<z.ZodBoolean>;
|
|
260
|
+
dag: z.ZodOptional<z.ZodBoolean>;
|
|
261
|
+
}, z.core.$strip>>;
|
|
262
|
+
groupAxes: z.ZodArray<z.ZodObject<{
|
|
263
|
+
key: z.ZodString;
|
|
264
|
+
label: z.ZodString;
|
|
265
|
+
property: z.ZodString;
|
|
266
|
+
order: z.ZodEnum<{
|
|
267
|
+
asc: "asc";
|
|
268
|
+
desc: "desc";
|
|
269
|
+
}>;
|
|
270
|
+
}, z.core.$strip>>;
|
|
271
|
+
defaultNodeType: z.ZodString;
|
|
272
|
+
defaultEdgeType: z.ZodString;
|
|
273
|
+
}, z.core.$strip>>;
|
|
274
|
+
tenantId: z.ZodOptional<z.ZodString>;
|
|
275
|
+
createdAt: z.ZodString;
|
|
276
|
+
updatedAt: z.ZodString;
|
|
277
|
+
}, z.core.$strip>;
|
|
278
|
+
/**
|
|
279
|
+
* Graph 的推断类型
|
|
280
|
+
*/
|
|
281
|
+
type Graph = z.infer<typeof GraphSchema>;
|
|
282
|
+
/**
|
|
283
|
+
* 域公共数据契约:GraphListData
|
|
284
|
+
*
|
|
285
|
+
* 图谱列表四键分页面
|
|
286
|
+
*/
|
|
287
|
+
declare const GraphListDataSchema: z.ZodObject<{
|
|
288
|
+
items: z.ZodArray<z.ZodObject<{
|
|
289
|
+
id: z.ZodString;
|
|
290
|
+
name: z.ZodString;
|
|
291
|
+
kind: z.ZodEnum<{
|
|
292
|
+
custom: "custom";
|
|
293
|
+
organization: "organization";
|
|
294
|
+
person: "person";
|
|
295
|
+
society: "society";
|
|
296
|
+
}>;
|
|
297
|
+
description: z.ZodOptional<z.ZodString>;
|
|
298
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
299
|
+
profile: z.ZodOptional<z.ZodObject<{
|
|
300
|
+
nodeTypes: z.ZodArray<z.ZodObject<{
|
|
301
|
+
key: z.ZodString;
|
|
302
|
+
label: z.ZodString;
|
|
303
|
+
color: z.ZodOptional<z.ZodString>;
|
|
304
|
+
}, z.core.$strip>>;
|
|
305
|
+
edgeTypes: z.ZodArray<z.ZodObject<{
|
|
306
|
+
key: z.ZodString;
|
|
307
|
+
label: z.ZodString;
|
|
308
|
+
directed: z.ZodBoolean;
|
|
309
|
+
dashed: z.ZodOptional<z.ZodBoolean>;
|
|
310
|
+
dag: z.ZodOptional<z.ZodBoolean>;
|
|
311
|
+
}, z.core.$strip>>;
|
|
312
|
+
groupAxes: z.ZodArray<z.ZodObject<{
|
|
313
|
+
key: z.ZodString;
|
|
314
|
+
label: z.ZodString;
|
|
315
|
+
property: z.ZodString;
|
|
316
|
+
order: z.ZodEnum<{
|
|
317
|
+
asc: "asc";
|
|
318
|
+
desc: "desc";
|
|
319
|
+
}>;
|
|
320
|
+
}, z.core.$strip>>;
|
|
321
|
+
defaultNodeType: z.ZodString;
|
|
322
|
+
defaultEdgeType: z.ZodString;
|
|
323
|
+
}, z.core.$strip>>;
|
|
324
|
+
tenantId: z.ZodOptional<z.ZodString>;
|
|
325
|
+
createdAt: z.ZodString;
|
|
326
|
+
updatedAt: z.ZodString;
|
|
327
|
+
}, z.core.$strip>>;
|
|
328
|
+
total: z.ZodInt;
|
|
329
|
+
page: z.ZodInt;
|
|
330
|
+
pageSize: z.ZodInt;
|
|
331
|
+
}, z.core.$strip>;
|
|
332
|
+
/**
|
|
333
|
+
* GraphListData 的推断类型
|
|
334
|
+
*/
|
|
335
|
+
type GraphListData = z.infer<typeof GraphListDataSchema>;
|
|
336
|
+
//#endregion
|
|
337
|
+
//#region src/domains/graph/graph.schema.d.ts
|
|
338
|
+
/**
|
|
339
|
+
* 路由常量:POST /api/graphs
|
|
340
|
+
*/
|
|
341
|
+
declare const CreateGraphRoute: {
|
|
342
|
+
readonly method: 'POST';
|
|
343
|
+
readonly path: '/api/graphs';
|
|
344
|
+
readonly paramNames: readonly [];
|
|
345
|
+
};
|
|
346
|
+
/**
|
|
347
|
+
* 请求 schema:请求体,POST /api/graphs
|
|
348
|
+
*/
|
|
349
|
+
declare const CreateGraphBodySchema: z.ZodObject<{
|
|
350
|
+
name: z.ZodString;
|
|
351
|
+
kind: z.ZodEnum<{
|
|
352
|
+
custom: "custom";
|
|
353
|
+
organization: "organization";
|
|
354
|
+
person: "person";
|
|
355
|
+
society: "society";
|
|
356
|
+
}>;
|
|
357
|
+
description: z.ZodOptional<z.ZodString>;
|
|
358
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
359
|
+
profile: z.ZodOptional<z.ZodObject<{
|
|
360
|
+
nodeTypes: z.ZodArray<z.ZodObject<{
|
|
361
|
+
key: z.ZodString;
|
|
362
|
+
label: z.ZodString;
|
|
363
|
+
color: z.ZodOptional<z.ZodString>;
|
|
364
|
+
}, z.core.$strip>>;
|
|
365
|
+
edgeTypes: z.ZodArray<z.ZodObject<{
|
|
366
|
+
key: z.ZodString;
|
|
367
|
+
label: z.ZodString;
|
|
368
|
+
directed: z.ZodBoolean;
|
|
369
|
+
dashed: z.ZodOptional<z.ZodBoolean>;
|
|
370
|
+
dag: z.ZodOptional<z.ZodBoolean>;
|
|
371
|
+
}, z.core.$strip>>;
|
|
372
|
+
groupAxes: z.ZodArray<z.ZodObject<{
|
|
373
|
+
key: z.ZodString;
|
|
374
|
+
label: z.ZodString;
|
|
375
|
+
property: z.ZodString;
|
|
376
|
+
order: z.ZodEnum<{
|
|
377
|
+
asc: "asc";
|
|
378
|
+
desc: "desc";
|
|
379
|
+
}>;
|
|
380
|
+
}, z.core.$strip>>;
|
|
381
|
+
defaultNodeType: z.ZodString;
|
|
382
|
+
defaultEdgeType: z.ZodString;
|
|
383
|
+
}, z.core.$strip>>;
|
|
384
|
+
tenantId: z.ZodOptional<z.ZodString>;
|
|
385
|
+
}, z.core.$strip>;
|
|
386
|
+
/**
|
|
387
|
+
* CreateGraphBody 的推断类型
|
|
388
|
+
*/
|
|
389
|
+
type CreateGraphBody = z.infer<typeof CreateGraphBodySchema>;
|
|
390
|
+
/**
|
|
391
|
+
* 响应 schema,POST /api/graphs
|
|
392
|
+
*/
|
|
393
|
+
declare const CreateGraphResponseSchema: z.ZodObject<{
|
|
394
|
+
id: z.ZodString;
|
|
395
|
+
name: z.ZodString;
|
|
396
|
+
kind: z.ZodEnum<{
|
|
397
|
+
custom: "custom";
|
|
398
|
+
organization: "organization";
|
|
399
|
+
person: "person";
|
|
400
|
+
society: "society";
|
|
401
|
+
}>;
|
|
402
|
+
description: z.ZodOptional<z.ZodString>;
|
|
403
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
404
|
+
profile: z.ZodOptional<z.ZodObject<{
|
|
405
|
+
nodeTypes: z.ZodArray<z.ZodObject<{
|
|
406
|
+
key: z.ZodString;
|
|
407
|
+
label: z.ZodString;
|
|
408
|
+
color: z.ZodOptional<z.ZodString>;
|
|
409
|
+
}, z.core.$strip>>;
|
|
410
|
+
edgeTypes: z.ZodArray<z.ZodObject<{
|
|
411
|
+
key: z.ZodString;
|
|
412
|
+
label: z.ZodString;
|
|
413
|
+
directed: z.ZodBoolean;
|
|
414
|
+
dashed: z.ZodOptional<z.ZodBoolean>;
|
|
415
|
+
dag: z.ZodOptional<z.ZodBoolean>;
|
|
416
|
+
}, z.core.$strip>>;
|
|
417
|
+
groupAxes: z.ZodArray<z.ZodObject<{
|
|
418
|
+
key: z.ZodString;
|
|
419
|
+
label: z.ZodString;
|
|
420
|
+
property: z.ZodString;
|
|
421
|
+
order: z.ZodEnum<{
|
|
422
|
+
asc: "asc";
|
|
423
|
+
desc: "desc";
|
|
424
|
+
}>;
|
|
425
|
+
}, z.core.$strip>>;
|
|
426
|
+
defaultNodeType: z.ZodString;
|
|
427
|
+
defaultEdgeType: z.ZodString;
|
|
428
|
+
}, z.core.$strip>>;
|
|
429
|
+
tenantId: z.ZodOptional<z.ZodString>;
|
|
430
|
+
createdAt: z.ZodString;
|
|
431
|
+
updatedAt: z.ZodString;
|
|
432
|
+
}, z.core.$strip>;
|
|
433
|
+
/**
|
|
434
|
+
* CreateGraphResponse 的推断类型
|
|
435
|
+
*/
|
|
436
|
+
type CreateGraphResponse = z.infer<typeof CreateGraphResponseSchema>;
|
|
437
|
+
/**
|
|
438
|
+
* 端点参数契约:创建图谱
|
|
439
|
+
*/
|
|
440
|
+
type CreateGraphArgs = {
|
|
441
|
+
/**
|
|
442
|
+
* 请求体
|
|
443
|
+
*/
|
|
444
|
+
readonly body?: CreateGraphBody;
|
|
445
|
+
};
|
|
446
|
+
/**
|
|
447
|
+
* 路由常量:GET /api/graphs/:id
|
|
448
|
+
*/
|
|
449
|
+
declare const GetGraphRoute: {
|
|
450
|
+
readonly method: 'GET';
|
|
451
|
+
readonly path: '/api/graphs/:id';
|
|
452
|
+
readonly paramNames: readonly ['id'];
|
|
453
|
+
};
|
|
454
|
+
/**
|
|
455
|
+
* 请求 schema:路径参数,GET /api/graphs/:id
|
|
456
|
+
*/
|
|
457
|
+
declare const GetGraphParamsSchema: z.ZodObject<{
|
|
458
|
+
id: z.ZodString;
|
|
459
|
+
}, z.core.$strip>;
|
|
460
|
+
/**
|
|
461
|
+
* 响应 schema,GET /api/graphs/:id
|
|
462
|
+
*
|
|
463
|
+
* 端口详情查询可空,图谱不存在时返回 null
|
|
464
|
+
*/
|
|
465
|
+
declare const GetGraphResponseSchema: z.ZodNullable<z.ZodObject<{
|
|
466
|
+
id: z.ZodString;
|
|
467
|
+
name: z.ZodString;
|
|
468
|
+
kind: z.ZodEnum<{
|
|
469
|
+
custom: "custom";
|
|
470
|
+
organization: "organization";
|
|
471
|
+
person: "person";
|
|
472
|
+
society: "society";
|
|
473
|
+
}>;
|
|
474
|
+
description: z.ZodOptional<z.ZodString>;
|
|
475
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
476
|
+
profile: z.ZodOptional<z.ZodObject<{
|
|
477
|
+
nodeTypes: z.ZodArray<z.ZodObject<{
|
|
478
|
+
key: z.ZodString;
|
|
479
|
+
label: z.ZodString;
|
|
480
|
+
color: z.ZodOptional<z.ZodString>;
|
|
481
|
+
}, z.core.$strip>>;
|
|
482
|
+
edgeTypes: z.ZodArray<z.ZodObject<{
|
|
483
|
+
key: z.ZodString;
|
|
484
|
+
label: z.ZodString;
|
|
485
|
+
directed: z.ZodBoolean;
|
|
486
|
+
dashed: z.ZodOptional<z.ZodBoolean>;
|
|
487
|
+
dag: z.ZodOptional<z.ZodBoolean>;
|
|
488
|
+
}, z.core.$strip>>;
|
|
489
|
+
groupAxes: z.ZodArray<z.ZodObject<{
|
|
490
|
+
key: z.ZodString;
|
|
491
|
+
label: z.ZodString;
|
|
492
|
+
property: z.ZodString;
|
|
493
|
+
order: z.ZodEnum<{
|
|
494
|
+
asc: "asc";
|
|
495
|
+
desc: "desc";
|
|
496
|
+
}>;
|
|
497
|
+
}, z.core.$strip>>;
|
|
498
|
+
defaultNodeType: z.ZodString;
|
|
499
|
+
defaultEdgeType: z.ZodString;
|
|
500
|
+
}, z.core.$strip>>;
|
|
501
|
+
tenantId: z.ZodOptional<z.ZodString>;
|
|
502
|
+
createdAt: z.ZodString;
|
|
503
|
+
updatedAt: z.ZodString;
|
|
504
|
+
}, z.core.$strip>>;
|
|
505
|
+
/**
|
|
506
|
+
* GetGraphResponse 的推断类型
|
|
507
|
+
*/
|
|
508
|
+
type GetGraphResponse = z.infer<typeof GetGraphResponseSchema>;
|
|
509
|
+
/**
|
|
510
|
+
* 端点参数契约:获取单个图谱
|
|
511
|
+
*/
|
|
512
|
+
type GetGraphArgs = {
|
|
513
|
+
/**
|
|
514
|
+
* 路径参数
|
|
515
|
+
*/
|
|
516
|
+
readonly params: z.infer<typeof GetGraphParamsSchema>;
|
|
517
|
+
};
|
|
518
|
+
/**
|
|
519
|
+
* 路由常量:GET /api/graphs
|
|
520
|
+
*/
|
|
521
|
+
declare const ListGraphsRoute: {
|
|
522
|
+
readonly method: 'GET';
|
|
523
|
+
readonly path: '/api/graphs';
|
|
524
|
+
readonly paramNames: readonly [];
|
|
525
|
+
};
|
|
526
|
+
/**
|
|
527
|
+
* 请求 schema:查询参数,GET /api/graphs
|
|
528
|
+
*/
|
|
529
|
+
declare const ListGraphsQuerySchema: z.ZodObject<{
|
|
530
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
531
|
+
custom: "custom";
|
|
532
|
+
organization: "organization";
|
|
533
|
+
person: "person";
|
|
534
|
+
society: "society";
|
|
535
|
+
}>>;
|
|
536
|
+
tenantId: z.ZodOptional<z.ZodString>;
|
|
537
|
+
page: z.ZodOptional<z.ZodInt>;
|
|
538
|
+
pageSize: z.ZodOptional<z.ZodInt>;
|
|
539
|
+
}, z.core.$strip>;
|
|
540
|
+
/**
|
|
541
|
+
* ListGraphsQuery 的推断类型
|
|
542
|
+
*/
|
|
543
|
+
type ListGraphsQuery = z.infer<typeof ListGraphsQuerySchema>;
|
|
544
|
+
/**
|
|
545
|
+
* 响应 schema,GET /api/graphs
|
|
546
|
+
*/
|
|
547
|
+
declare const ListGraphsResponseSchema: z.ZodObject<{
|
|
548
|
+
items: z.ZodArray<z.ZodObject<{
|
|
549
|
+
id: z.ZodString;
|
|
550
|
+
name: z.ZodString;
|
|
551
|
+
kind: z.ZodEnum<{
|
|
552
|
+
custom: "custom";
|
|
553
|
+
organization: "organization";
|
|
554
|
+
person: "person";
|
|
555
|
+
society: "society";
|
|
556
|
+
}>;
|
|
557
|
+
description: z.ZodOptional<z.ZodString>;
|
|
558
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
559
|
+
profile: z.ZodOptional<z.ZodObject<{
|
|
560
|
+
nodeTypes: z.ZodArray<z.ZodObject<{
|
|
561
|
+
key: z.ZodString;
|
|
562
|
+
label: z.ZodString;
|
|
563
|
+
color: z.ZodOptional<z.ZodString>;
|
|
564
|
+
}, z.core.$strip>>;
|
|
565
|
+
edgeTypes: z.ZodArray<z.ZodObject<{
|
|
566
|
+
key: z.ZodString;
|
|
567
|
+
label: z.ZodString;
|
|
568
|
+
directed: z.ZodBoolean;
|
|
569
|
+
dashed: z.ZodOptional<z.ZodBoolean>;
|
|
570
|
+
dag: z.ZodOptional<z.ZodBoolean>;
|
|
571
|
+
}, z.core.$strip>>;
|
|
572
|
+
groupAxes: z.ZodArray<z.ZodObject<{
|
|
573
|
+
key: z.ZodString;
|
|
574
|
+
label: z.ZodString;
|
|
575
|
+
property: z.ZodString;
|
|
576
|
+
order: z.ZodEnum<{
|
|
577
|
+
asc: "asc";
|
|
578
|
+
desc: "desc";
|
|
579
|
+
}>;
|
|
580
|
+
}, z.core.$strip>>;
|
|
581
|
+
defaultNodeType: z.ZodString;
|
|
582
|
+
defaultEdgeType: z.ZodString;
|
|
583
|
+
}, z.core.$strip>>;
|
|
584
|
+
tenantId: z.ZodOptional<z.ZodString>;
|
|
585
|
+
createdAt: z.ZodString;
|
|
586
|
+
updatedAt: z.ZodString;
|
|
587
|
+
}, z.core.$strip>>;
|
|
588
|
+
total: z.ZodInt;
|
|
589
|
+
page: z.ZodInt;
|
|
590
|
+
pageSize: z.ZodInt;
|
|
591
|
+
}, z.core.$strip>;
|
|
592
|
+
/**
|
|
593
|
+
* ListGraphsResponse 的推断类型
|
|
594
|
+
*/
|
|
595
|
+
type ListGraphsResponse = z.infer<typeof ListGraphsResponseSchema>;
|
|
596
|
+
/**
|
|
597
|
+
* 端点参数契约:获取图谱列表
|
|
598
|
+
*/
|
|
599
|
+
type ListGraphsArgs = {
|
|
600
|
+
/**
|
|
601
|
+
* 查询参数
|
|
602
|
+
*/
|
|
603
|
+
readonly query?: ListGraphsQuery;
|
|
604
|
+
};
|
|
605
|
+
/**
|
|
606
|
+
* 路由常量:PATCH /api/graphs/:id
|
|
607
|
+
*/
|
|
608
|
+
declare const UpdateGraphRoute: {
|
|
609
|
+
readonly method: 'PATCH';
|
|
610
|
+
readonly path: '/api/graphs/:id';
|
|
611
|
+
readonly paramNames: readonly ['id'];
|
|
612
|
+
};
|
|
613
|
+
/**
|
|
614
|
+
* 请求 schema:路径参数,PATCH /api/graphs/:id
|
|
615
|
+
*/
|
|
616
|
+
declare const UpdateGraphParamsSchema: z.ZodObject<{
|
|
617
|
+
id: z.ZodString;
|
|
618
|
+
}, z.core.$strip>;
|
|
619
|
+
/**
|
|
620
|
+
* 请求 schema:请求体,PATCH /api/graphs/:id
|
|
621
|
+
*/
|
|
622
|
+
declare const UpdateGraphBodySchema: z.ZodObject<{
|
|
623
|
+
name: z.ZodOptional<z.ZodString>;
|
|
624
|
+
description: z.ZodOptional<z.ZodString>;
|
|
625
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
626
|
+
}, z.core.$strip>;
|
|
627
|
+
/**
|
|
628
|
+
* UpdateGraphBody 的推断类型
|
|
629
|
+
*/
|
|
630
|
+
type UpdateGraphBody = z.infer<typeof UpdateGraphBodySchema>;
|
|
631
|
+
/**
|
|
632
|
+
* 响应 schema,PATCH /api/graphs/:id
|
|
633
|
+
*/
|
|
634
|
+
declare const UpdateGraphResponseSchema: z.ZodObject<{
|
|
635
|
+
id: z.ZodString;
|
|
636
|
+
name: z.ZodString;
|
|
637
|
+
kind: z.ZodEnum<{
|
|
638
|
+
custom: "custom";
|
|
639
|
+
organization: "organization";
|
|
640
|
+
person: "person";
|
|
641
|
+
society: "society";
|
|
642
|
+
}>;
|
|
643
|
+
description: z.ZodOptional<z.ZodString>;
|
|
644
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
645
|
+
profile: z.ZodOptional<z.ZodObject<{
|
|
646
|
+
nodeTypes: z.ZodArray<z.ZodObject<{
|
|
647
|
+
key: z.ZodString;
|
|
648
|
+
label: z.ZodString;
|
|
649
|
+
color: z.ZodOptional<z.ZodString>;
|
|
650
|
+
}, z.core.$strip>>;
|
|
651
|
+
edgeTypes: z.ZodArray<z.ZodObject<{
|
|
652
|
+
key: z.ZodString;
|
|
653
|
+
label: z.ZodString;
|
|
654
|
+
directed: z.ZodBoolean;
|
|
655
|
+
dashed: z.ZodOptional<z.ZodBoolean>;
|
|
656
|
+
dag: z.ZodOptional<z.ZodBoolean>;
|
|
657
|
+
}, z.core.$strip>>;
|
|
658
|
+
groupAxes: z.ZodArray<z.ZodObject<{
|
|
659
|
+
key: z.ZodString;
|
|
660
|
+
label: z.ZodString;
|
|
661
|
+
property: z.ZodString;
|
|
662
|
+
order: z.ZodEnum<{
|
|
663
|
+
asc: "asc";
|
|
664
|
+
desc: "desc";
|
|
665
|
+
}>;
|
|
666
|
+
}, z.core.$strip>>;
|
|
667
|
+
defaultNodeType: z.ZodString;
|
|
668
|
+
defaultEdgeType: z.ZodString;
|
|
669
|
+
}, z.core.$strip>>;
|
|
670
|
+
tenantId: z.ZodOptional<z.ZodString>;
|
|
671
|
+
createdAt: z.ZodString;
|
|
672
|
+
updatedAt: z.ZodString;
|
|
673
|
+
}, z.core.$strip>;
|
|
674
|
+
/**
|
|
675
|
+
* UpdateGraphResponse 的推断类型
|
|
676
|
+
*/
|
|
677
|
+
type UpdateGraphResponse = z.infer<typeof UpdateGraphResponseSchema>;
|
|
678
|
+
/**
|
|
679
|
+
* 端点参数契约:更新图谱
|
|
680
|
+
*/
|
|
681
|
+
type UpdateGraphArgs = {
|
|
682
|
+
/**
|
|
683
|
+
* 路径参数
|
|
684
|
+
*/
|
|
685
|
+
readonly params: z.infer<typeof UpdateGraphParamsSchema>;
|
|
686
|
+
/**
|
|
687
|
+
* 请求体
|
|
688
|
+
*/
|
|
689
|
+
readonly body?: UpdateGraphBody;
|
|
690
|
+
};
|
|
691
|
+
/**
|
|
692
|
+
* 路由常量:DELETE /api/graphs/:id
|
|
693
|
+
*/
|
|
694
|
+
declare const DeleteGraphRoute: {
|
|
695
|
+
readonly method: 'DELETE';
|
|
696
|
+
readonly path: '/api/graphs/:id';
|
|
697
|
+
readonly paramNames: readonly ['id'];
|
|
698
|
+
};
|
|
699
|
+
/**
|
|
700
|
+
* 请求 schema:路径参数,DELETE /api/graphs/:id
|
|
701
|
+
*/
|
|
702
|
+
declare const DeleteGraphParamsSchema: z.ZodObject<{
|
|
703
|
+
id: z.ZodString;
|
|
704
|
+
}, z.core.$strip>;
|
|
705
|
+
/**
|
|
706
|
+
* 响应 schema,DELETE /api/graphs/:id
|
|
707
|
+
*
|
|
708
|
+
* 端口删除成功路径返回 void,传输层将空体归一为 null
|
|
709
|
+
*/
|
|
710
|
+
declare const DeleteGraphResponseSchema: z.ZodLiteral<null>;
|
|
711
|
+
/**
|
|
712
|
+
* DeleteGraphResponse 的推断类型
|
|
713
|
+
*/
|
|
714
|
+
type DeleteGraphResponse = z.infer<typeof DeleteGraphResponseSchema>;
|
|
715
|
+
/**
|
|
716
|
+
* 端点参数契约:删除图谱
|
|
717
|
+
*/
|
|
718
|
+
type DeleteGraphArgs = {
|
|
719
|
+
/**
|
|
720
|
+
* 路径参数
|
|
721
|
+
*/
|
|
722
|
+
readonly params: z.infer<typeof DeleteGraphParamsSchema>;
|
|
723
|
+
};
|
|
724
|
+
/**
|
|
725
|
+
* 数据束导入路由
|
|
726
|
+
*/
|
|
727
|
+
declare const ImportGraphBundleRoute: {
|
|
728
|
+
readonly method: 'POST';
|
|
729
|
+
readonly path: '/api/graphs/import';
|
|
730
|
+
readonly paramNames: readonly [];
|
|
731
|
+
};
|
|
732
|
+
/**
|
|
733
|
+
* 数据束导入请求体即完整数据束
|
|
734
|
+
*/
|
|
735
|
+
declare const ImportGraphBundleBodySchema: z.ZodObject<{
|
|
736
|
+
graph: z.ZodObject<{
|
|
737
|
+
name: z.ZodString;
|
|
738
|
+
kind: z.ZodEnum<{
|
|
739
|
+
custom: "custom";
|
|
740
|
+
organization: "organization";
|
|
741
|
+
person: "person";
|
|
742
|
+
society: "society";
|
|
743
|
+
}>;
|
|
744
|
+
description: z.ZodOptional<z.ZodString>;
|
|
745
|
+
profile: z.ZodObject<{
|
|
746
|
+
nodeTypes: z.ZodArray<z.ZodObject<{
|
|
747
|
+
key: z.ZodString;
|
|
748
|
+
label: z.ZodString;
|
|
749
|
+
color: z.ZodOptional<z.ZodString>;
|
|
750
|
+
}, z.core.$strip>>;
|
|
751
|
+
edgeTypes: z.ZodArray<z.ZodObject<{
|
|
752
|
+
key: z.ZodString;
|
|
753
|
+
label: z.ZodString;
|
|
754
|
+
directed: z.ZodBoolean;
|
|
755
|
+
dashed: z.ZodOptional<z.ZodBoolean>;
|
|
756
|
+
dag: z.ZodOptional<z.ZodBoolean>;
|
|
757
|
+
}, z.core.$strip>>;
|
|
758
|
+
groupAxes: z.ZodArray<z.ZodObject<{
|
|
759
|
+
key: z.ZodString;
|
|
760
|
+
label: z.ZodString;
|
|
761
|
+
property: z.ZodString;
|
|
762
|
+
order: z.ZodEnum<{
|
|
763
|
+
asc: "asc";
|
|
764
|
+
desc: "desc";
|
|
765
|
+
}>;
|
|
766
|
+
}, z.core.$strip>>;
|
|
767
|
+
defaultNodeType: z.ZodString;
|
|
768
|
+
defaultEdgeType: z.ZodString;
|
|
769
|
+
}, z.core.$strip>;
|
|
770
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
771
|
+
}, z.core.$strip>;
|
|
772
|
+
nodes: z.ZodArray<z.ZodObject<{
|
|
773
|
+
id: z.ZodString;
|
|
774
|
+
label: z.ZodString;
|
|
775
|
+
nodeType: z.ZodString;
|
|
776
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
777
|
+
}, z.core.$strip>>;
|
|
778
|
+
edges: z.ZodArray<z.ZodObject<{
|
|
779
|
+
id: z.ZodOptional<z.ZodString>;
|
|
780
|
+
sourceId: z.ZodString;
|
|
781
|
+
targetId: z.ZodString;
|
|
782
|
+
edgeType: z.ZodString;
|
|
783
|
+
label: z.ZodOptional<z.ZodString>;
|
|
784
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
785
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
786
|
+
}, z.core.$strip>>;
|
|
787
|
+
}, z.core.$strip>;
|
|
788
|
+
/**
|
|
789
|
+
* 数据束导入请求体类型
|
|
790
|
+
*/
|
|
791
|
+
type ImportGraphBundleBody = z.infer<typeof ImportGraphBundleBodySchema>;
|
|
792
|
+
/**
|
|
793
|
+
* 数据束导入响应
|
|
794
|
+
*/
|
|
795
|
+
declare const ImportGraphBundleResponseSchema: z.ZodObject<{
|
|
796
|
+
id: z.ZodString;
|
|
797
|
+
name: z.ZodString;
|
|
798
|
+
kind: z.ZodEnum<{
|
|
799
|
+
custom: "custom";
|
|
800
|
+
organization: "organization";
|
|
801
|
+
person: "person";
|
|
802
|
+
society: "society";
|
|
803
|
+
}>;
|
|
804
|
+
description: z.ZodOptional<z.ZodString>;
|
|
805
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
806
|
+
profile: z.ZodOptional<z.ZodObject<{
|
|
807
|
+
nodeTypes: z.ZodArray<z.ZodObject<{
|
|
808
|
+
key: z.ZodString;
|
|
809
|
+
label: z.ZodString;
|
|
810
|
+
color: z.ZodOptional<z.ZodString>;
|
|
811
|
+
}, z.core.$strip>>;
|
|
812
|
+
edgeTypes: z.ZodArray<z.ZodObject<{
|
|
813
|
+
key: z.ZodString;
|
|
814
|
+
label: z.ZodString;
|
|
815
|
+
directed: z.ZodBoolean;
|
|
816
|
+
dashed: z.ZodOptional<z.ZodBoolean>;
|
|
817
|
+
dag: z.ZodOptional<z.ZodBoolean>;
|
|
818
|
+
}, z.core.$strip>>;
|
|
819
|
+
groupAxes: z.ZodArray<z.ZodObject<{
|
|
820
|
+
key: z.ZodString;
|
|
821
|
+
label: z.ZodString;
|
|
822
|
+
property: z.ZodString;
|
|
823
|
+
order: z.ZodEnum<{
|
|
824
|
+
asc: "asc";
|
|
825
|
+
desc: "desc";
|
|
826
|
+
}>;
|
|
827
|
+
}, z.core.$strip>>;
|
|
828
|
+
defaultNodeType: z.ZodString;
|
|
829
|
+
defaultEdgeType: z.ZodString;
|
|
830
|
+
}, z.core.$strip>>;
|
|
831
|
+
tenantId: z.ZodOptional<z.ZodString>;
|
|
832
|
+
createdAt: z.ZodString;
|
|
833
|
+
updatedAt: z.ZodString;
|
|
834
|
+
}, z.core.$strip>;
|
|
835
|
+
/**
|
|
836
|
+
* 数据束导入响应类型
|
|
837
|
+
*/
|
|
838
|
+
type ImportGraphBundleResponse = z.infer<typeof ImportGraphBundleResponseSchema>;
|
|
839
|
+
/**
|
|
840
|
+
* 数据束导入入参
|
|
841
|
+
*/
|
|
842
|
+
type ImportGraphBundleArgs = {
|
|
843
|
+
readonly body: ImportGraphBundleBody;
|
|
844
|
+
};
|
|
845
|
+
/**
|
|
846
|
+
* 数据束导出路由
|
|
847
|
+
*/
|
|
848
|
+
declare const ExportGraphBundleRoute: {
|
|
849
|
+
readonly method: 'GET';
|
|
850
|
+
readonly path: '/api/graphs/:graphId/export';
|
|
851
|
+
readonly paramNames: readonly ['graphId'];
|
|
852
|
+
};
|
|
853
|
+
/**
|
|
854
|
+
* 数据束导出路径参数
|
|
855
|
+
*/
|
|
856
|
+
declare const ExportGraphBundleParamsSchema: z.ZodObject<{
|
|
857
|
+
graphId: z.ZodString;
|
|
858
|
+
}, z.core.$strip>;
|
|
859
|
+
/**
|
|
860
|
+
* 数据束导出响应
|
|
861
|
+
*/
|
|
862
|
+
declare const ExportGraphBundleResponseSchema: z.ZodObject<{
|
|
863
|
+
graph: z.ZodObject<{
|
|
864
|
+
name: z.ZodString;
|
|
865
|
+
kind: z.ZodEnum<{
|
|
866
|
+
custom: "custom";
|
|
867
|
+
organization: "organization";
|
|
868
|
+
person: "person";
|
|
869
|
+
society: "society";
|
|
870
|
+
}>;
|
|
871
|
+
description: z.ZodOptional<z.ZodString>;
|
|
872
|
+
profile: z.ZodObject<{
|
|
873
|
+
nodeTypes: z.ZodArray<z.ZodObject<{
|
|
874
|
+
key: z.ZodString;
|
|
875
|
+
label: z.ZodString;
|
|
876
|
+
color: z.ZodOptional<z.ZodString>;
|
|
877
|
+
}, z.core.$strip>>;
|
|
878
|
+
edgeTypes: z.ZodArray<z.ZodObject<{
|
|
879
|
+
key: z.ZodString;
|
|
880
|
+
label: z.ZodString;
|
|
881
|
+
directed: z.ZodBoolean;
|
|
882
|
+
dashed: z.ZodOptional<z.ZodBoolean>;
|
|
883
|
+
dag: z.ZodOptional<z.ZodBoolean>;
|
|
884
|
+
}, z.core.$strip>>;
|
|
885
|
+
groupAxes: z.ZodArray<z.ZodObject<{
|
|
886
|
+
key: z.ZodString;
|
|
887
|
+
label: z.ZodString;
|
|
888
|
+
property: z.ZodString;
|
|
889
|
+
order: z.ZodEnum<{
|
|
890
|
+
asc: "asc";
|
|
891
|
+
desc: "desc";
|
|
892
|
+
}>;
|
|
893
|
+
}, z.core.$strip>>;
|
|
894
|
+
defaultNodeType: z.ZodString;
|
|
895
|
+
defaultEdgeType: z.ZodString;
|
|
896
|
+
}, z.core.$strip>;
|
|
897
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
898
|
+
}, z.core.$strip>;
|
|
899
|
+
nodes: z.ZodArray<z.ZodObject<{
|
|
900
|
+
id: z.ZodString;
|
|
901
|
+
label: z.ZodString;
|
|
902
|
+
nodeType: z.ZodString;
|
|
903
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
904
|
+
}, z.core.$strip>>;
|
|
905
|
+
edges: z.ZodArray<z.ZodObject<{
|
|
906
|
+
id: z.ZodOptional<z.ZodString>;
|
|
907
|
+
sourceId: z.ZodString;
|
|
908
|
+
targetId: z.ZodString;
|
|
909
|
+
edgeType: z.ZodString;
|
|
910
|
+
label: z.ZodOptional<z.ZodString>;
|
|
911
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
912
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
913
|
+
}, z.core.$strip>>;
|
|
914
|
+
}, z.core.$strip>;
|
|
915
|
+
/**
|
|
916
|
+
* 数据束导出响应类型
|
|
917
|
+
*/
|
|
918
|
+
type ExportGraphBundleResponse = z.infer<typeof ExportGraphBundleResponseSchema>;
|
|
919
|
+
/**
|
|
920
|
+
* 数据束导出入参
|
|
921
|
+
*/
|
|
922
|
+
type ExportGraphBundleArgs = {
|
|
923
|
+
readonly params: z.infer<typeof ExportGraphBundleParamsSchema>;
|
|
924
|
+
};
|
|
925
|
+
//#endregion
|
|
926
|
+
//#region src/domains/graph/graph.client.d.ts
|
|
927
|
+
/**
|
|
928
|
+
* graph 域端点工厂,注入传输实现后取得全部端点函数
|
|
929
|
+
*
|
|
930
|
+
* @param transport - 传输实现,由产品仓注入
|
|
931
|
+
* @returns 全部端点函数集合
|
|
932
|
+
*/
|
|
933
|
+
declare function createGraphEndpoints(transport: ApiTransport): {
|
|
934
|
+
/**
|
|
935
|
+
* 创建图谱
|
|
936
|
+
*/
|
|
937
|
+
createGraph: (args: CreateGraphArgs) => Promise<{
|
|
938
|
+
id: string;
|
|
939
|
+
name: string;
|
|
940
|
+
kind: "custom" | "organization" | "person" | "society";
|
|
941
|
+
description?: string | undefined;
|
|
942
|
+
metadata?: Record<string, unknown> | undefined;
|
|
943
|
+
profile?: {
|
|
944
|
+
nodeTypes: {
|
|
945
|
+
key: string;
|
|
946
|
+
label: string;
|
|
947
|
+
color?: string | undefined;
|
|
948
|
+
}[];
|
|
949
|
+
edgeTypes: {
|
|
950
|
+
key: string;
|
|
951
|
+
label: string;
|
|
952
|
+
directed: boolean;
|
|
953
|
+
dashed?: boolean | undefined;
|
|
954
|
+
dag?: boolean | undefined;
|
|
955
|
+
}[];
|
|
956
|
+
groupAxes: {
|
|
957
|
+
key: string;
|
|
958
|
+
label: string;
|
|
959
|
+
property: string;
|
|
960
|
+
order: "asc" | "desc";
|
|
961
|
+
}[];
|
|
962
|
+
defaultNodeType: string;
|
|
963
|
+
defaultEdgeType: string;
|
|
964
|
+
} | undefined;
|
|
965
|
+
tenantId?: string | undefined;
|
|
966
|
+
createdAt: string;
|
|
967
|
+
updatedAt: string;
|
|
968
|
+
}>;
|
|
969
|
+
/**
|
|
970
|
+
* 获取单个图谱
|
|
971
|
+
*/
|
|
972
|
+
getGraph: (args: GetGraphArgs) => Promise<{
|
|
973
|
+
id: string;
|
|
974
|
+
name: string;
|
|
975
|
+
kind: "custom" | "organization" | "person" | "society";
|
|
976
|
+
description?: string | undefined;
|
|
977
|
+
metadata?: Record<string, unknown> | undefined;
|
|
978
|
+
profile?: {
|
|
979
|
+
nodeTypes: {
|
|
980
|
+
key: string;
|
|
981
|
+
label: string;
|
|
982
|
+
color?: string | undefined;
|
|
983
|
+
}[];
|
|
984
|
+
edgeTypes: {
|
|
985
|
+
key: string;
|
|
986
|
+
label: string;
|
|
987
|
+
directed: boolean;
|
|
988
|
+
dashed?: boolean | undefined;
|
|
989
|
+
dag?: boolean | undefined;
|
|
990
|
+
}[];
|
|
991
|
+
groupAxes: {
|
|
992
|
+
key: string;
|
|
993
|
+
label: string;
|
|
994
|
+
property: string;
|
|
995
|
+
order: "asc" | "desc";
|
|
996
|
+
}[];
|
|
997
|
+
defaultNodeType: string;
|
|
998
|
+
defaultEdgeType: string;
|
|
999
|
+
} | undefined;
|
|
1000
|
+
tenantId?: string | undefined;
|
|
1001
|
+
createdAt: string;
|
|
1002
|
+
updatedAt: string;
|
|
1003
|
+
} | null>;
|
|
1004
|
+
/**
|
|
1005
|
+
* 获取图谱列表
|
|
1006
|
+
*/
|
|
1007
|
+
listGraphs: (args: ListGraphsArgs) => Promise<{
|
|
1008
|
+
items: {
|
|
1009
|
+
id: string;
|
|
1010
|
+
name: string;
|
|
1011
|
+
kind: "custom" | "organization" | "person" | "society";
|
|
1012
|
+
description?: string | undefined;
|
|
1013
|
+
metadata?: Record<string, unknown> | undefined;
|
|
1014
|
+
profile?: {
|
|
1015
|
+
nodeTypes: {
|
|
1016
|
+
key: string;
|
|
1017
|
+
label: string;
|
|
1018
|
+
color?: string | undefined;
|
|
1019
|
+
}[];
|
|
1020
|
+
edgeTypes: {
|
|
1021
|
+
key: string;
|
|
1022
|
+
label: string;
|
|
1023
|
+
directed: boolean;
|
|
1024
|
+
dashed?: boolean | undefined;
|
|
1025
|
+
dag?: boolean | undefined;
|
|
1026
|
+
}[];
|
|
1027
|
+
groupAxes: {
|
|
1028
|
+
key: string;
|
|
1029
|
+
label: string;
|
|
1030
|
+
property: string;
|
|
1031
|
+
order: "asc" | "desc";
|
|
1032
|
+
}[];
|
|
1033
|
+
defaultNodeType: string;
|
|
1034
|
+
defaultEdgeType: string;
|
|
1035
|
+
} | undefined;
|
|
1036
|
+
tenantId?: string | undefined;
|
|
1037
|
+
createdAt: string;
|
|
1038
|
+
updatedAt: string;
|
|
1039
|
+
}[];
|
|
1040
|
+
total: number;
|
|
1041
|
+
page: number;
|
|
1042
|
+
pageSize: number;
|
|
1043
|
+
}>;
|
|
1044
|
+
/**
|
|
1045
|
+
* 更新图谱
|
|
1046
|
+
*/
|
|
1047
|
+
updateGraph: (args: UpdateGraphArgs) => Promise<{
|
|
1048
|
+
id: string;
|
|
1049
|
+
name: string;
|
|
1050
|
+
kind: "custom" | "organization" | "person" | "society";
|
|
1051
|
+
description?: string | undefined;
|
|
1052
|
+
metadata?: Record<string, unknown> | undefined;
|
|
1053
|
+
profile?: {
|
|
1054
|
+
nodeTypes: {
|
|
1055
|
+
key: string;
|
|
1056
|
+
label: string;
|
|
1057
|
+
color?: string | undefined;
|
|
1058
|
+
}[];
|
|
1059
|
+
edgeTypes: {
|
|
1060
|
+
key: string;
|
|
1061
|
+
label: string;
|
|
1062
|
+
directed: boolean;
|
|
1063
|
+
dashed?: boolean | undefined;
|
|
1064
|
+
dag?: boolean | undefined;
|
|
1065
|
+
}[];
|
|
1066
|
+
groupAxes: {
|
|
1067
|
+
key: string;
|
|
1068
|
+
label: string;
|
|
1069
|
+
property: string;
|
|
1070
|
+
order: "asc" | "desc";
|
|
1071
|
+
}[];
|
|
1072
|
+
defaultNodeType: string;
|
|
1073
|
+
defaultEdgeType: string;
|
|
1074
|
+
} | undefined;
|
|
1075
|
+
tenantId?: string | undefined;
|
|
1076
|
+
createdAt: string;
|
|
1077
|
+
updatedAt: string;
|
|
1078
|
+
}>;
|
|
1079
|
+
/**
|
|
1080
|
+
* 删除图谱
|
|
1081
|
+
*/
|
|
1082
|
+
deleteGraph: (args: DeleteGraphArgs) => Promise<null>;
|
|
1083
|
+
/**
|
|
1084
|
+
* importGraphBundle 端点
|
|
1085
|
+
*/
|
|
1086
|
+
importGraphBundle: (args: ImportGraphBundleArgs) => Promise<{
|
|
1087
|
+
id: string;
|
|
1088
|
+
name: string;
|
|
1089
|
+
kind: "custom" | "organization" | "person" | "society";
|
|
1090
|
+
description?: string | undefined;
|
|
1091
|
+
metadata?: Record<string, unknown> | undefined;
|
|
1092
|
+
profile?: {
|
|
1093
|
+
nodeTypes: {
|
|
1094
|
+
key: string;
|
|
1095
|
+
label: string;
|
|
1096
|
+
color?: string | undefined;
|
|
1097
|
+
}[];
|
|
1098
|
+
edgeTypes: {
|
|
1099
|
+
key: string;
|
|
1100
|
+
label: string;
|
|
1101
|
+
directed: boolean;
|
|
1102
|
+
dashed?: boolean | undefined;
|
|
1103
|
+
dag?: boolean | undefined;
|
|
1104
|
+
}[];
|
|
1105
|
+
groupAxes: {
|
|
1106
|
+
key: string;
|
|
1107
|
+
label: string;
|
|
1108
|
+
property: string;
|
|
1109
|
+
order: "asc" | "desc";
|
|
1110
|
+
}[];
|
|
1111
|
+
defaultNodeType: string;
|
|
1112
|
+
defaultEdgeType: string;
|
|
1113
|
+
} | undefined;
|
|
1114
|
+
tenantId?: string | undefined;
|
|
1115
|
+
createdAt: string;
|
|
1116
|
+
updatedAt: string;
|
|
1117
|
+
}>;
|
|
1118
|
+
/**
|
|
1119
|
+
* exportGraphBundle 端点
|
|
1120
|
+
*/
|
|
1121
|
+
exportGraphBundle: (args: ExportGraphBundleArgs) => Promise<{
|
|
1122
|
+
graph: {
|
|
1123
|
+
name: string;
|
|
1124
|
+
kind: "custom" | "organization" | "person" | "society";
|
|
1125
|
+
description?: string | undefined;
|
|
1126
|
+
profile: {
|
|
1127
|
+
nodeTypes: {
|
|
1128
|
+
key: string;
|
|
1129
|
+
label: string;
|
|
1130
|
+
color?: string | undefined;
|
|
1131
|
+
}[];
|
|
1132
|
+
edgeTypes: {
|
|
1133
|
+
key: string;
|
|
1134
|
+
label: string;
|
|
1135
|
+
directed: boolean;
|
|
1136
|
+
dashed?: boolean | undefined;
|
|
1137
|
+
dag?: boolean | undefined;
|
|
1138
|
+
}[];
|
|
1139
|
+
groupAxes: {
|
|
1140
|
+
key: string;
|
|
1141
|
+
label: string;
|
|
1142
|
+
property: string;
|
|
1143
|
+
order: "asc" | "desc";
|
|
1144
|
+
}[];
|
|
1145
|
+
defaultNodeType: string;
|
|
1146
|
+
defaultEdgeType: string;
|
|
1147
|
+
};
|
|
1148
|
+
metadata?: Record<string, unknown> | undefined;
|
|
1149
|
+
};
|
|
1150
|
+
nodes: {
|
|
1151
|
+
id: string;
|
|
1152
|
+
label: string;
|
|
1153
|
+
nodeType: string;
|
|
1154
|
+
properties?: Record<string, unknown> | undefined;
|
|
1155
|
+
}[];
|
|
1156
|
+
edges: {
|
|
1157
|
+
id?: string | undefined;
|
|
1158
|
+
sourceId: string;
|
|
1159
|
+
targetId: string;
|
|
1160
|
+
edgeType: string;
|
|
1161
|
+
label?: string | undefined;
|
|
1162
|
+
properties?: Record<string, unknown> | undefined;
|
|
1163
|
+
weight?: number | undefined;
|
|
1164
|
+
}[];
|
|
1165
|
+
}>;
|
|
1166
|
+
};
|
|
1167
|
+
//#endregion
|
|
1168
|
+
//#region src/domains/graph-node/graph-node.dto.d.ts
|
|
1169
|
+
/**
|
|
1170
|
+
* 域公共枚举定义:NodeType
|
|
1171
|
+
*/
|
|
1172
|
+
declare const NodeTypeSchema: z.ZodString;
|
|
1173
|
+
/**
|
|
1174
|
+
* NodeType 的推断类型
|
|
1175
|
+
*/
|
|
1176
|
+
type NodeType = z.infer<typeof NodeTypeSchema>;
|
|
1177
|
+
/**
|
|
1178
|
+
* 域公共枚举常量:NodeType
|
|
1179
|
+
*/
|
|
1180
|
+
/**
|
|
1181
|
+
* 默认档案的节点类型键集,供消费方提示内置键
|
|
1182
|
+
*/
|
|
1183
|
+
declare const NodeType: {
|
|
1184
|
+
readonly person: 'person';
|
|
1185
|
+
readonly organization: 'organization';
|
|
1186
|
+
readonly concept: 'concept';
|
|
1187
|
+
readonly event: 'event';
|
|
1188
|
+
readonly location: 'location';
|
|
1189
|
+
readonly custom: 'custom';
|
|
1190
|
+
};
|
|
1191
|
+
/**
|
|
1192
|
+
* 域公共数据契约:Node
|
|
1193
|
+
*
|
|
1194
|
+
* 节点自定义属性为任意键值面,生成器封闭集不支持,按领域现实保留
|
|
1195
|
+
*/
|
|
1196
|
+
declare const NodeSchema: z.ZodObject<{
|
|
1197
|
+
id: z.ZodString;
|
|
1198
|
+
graphId: z.ZodString;
|
|
1199
|
+
label: z.ZodString;
|
|
1200
|
+
nodeType: z.ZodString;
|
|
1201
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1202
|
+
createdAt: z.ZodString;
|
|
1203
|
+
updatedAt: z.ZodString;
|
|
1204
|
+
}, z.core.$strip>;
|
|
1205
|
+
/**
|
|
1206
|
+
* Node 的推断类型
|
|
1207
|
+
*/
|
|
1208
|
+
type Node = z.infer<typeof NodeSchema>;
|
|
1209
|
+
/**
|
|
1210
|
+
* 域公共数据契约:NodeListData
|
|
1211
|
+
*
|
|
1212
|
+
* 节点列表四键分页面
|
|
1213
|
+
*/
|
|
1214
|
+
declare const NodeListDataSchema: z.ZodObject<{
|
|
1215
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1216
|
+
id: z.ZodString;
|
|
1217
|
+
graphId: z.ZodString;
|
|
1218
|
+
label: z.ZodString;
|
|
1219
|
+
nodeType: z.ZodString;
|
|
1220
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1221
|
+
createdAt: z.ZodString;
|
|
1222
|
+
updatedAt: z.ZodString;
|
|
1223
|
+
}, z.core.$strip>>;
|
|
1224
|
+
total: z.ZodInt;
|
|
1225
|
+
page: z.ZodInt;
|
|
1226
|
+
pageSize: z.ZodInt;
|
|
1227
|
+
}, z.core.$strip>;
|
|
1228
|
+
/**
|
|
1229
|
+
* NodeListData 的推断类型
|
|
1230
|
+
*/
|
|
1231
|
+
type NodeListData = z.infer<typeof NodeListDataSchema>;
|
|
1232
|
+
//#endregion
|
|
1233
|
+
//#region src/domains/graph-node/graph-node.schema.d.ts
|
|
1234
|
+
/**
|
|
1235
|
+
* 图谱归属路径参数契约,节点路由共用
|
|
1236
|
+
*/
|
|
1237
|
+
declare const GraphScopedParamsSchema: z.ZodObject<{
|
|
1238
|
+
graphId: z.ZodString;
|
|
1239
|
+
}, z.core.$strip>;
|
|
1240
|
+
/**
|
|
1241
|
+
* 图谱子资源路径参数契约,节点单资源路由共用
|
|
1242
|
+
*/
|
|
1243
|
+
declare const GraphScopedIdParamsSchema: z.ZodObject<{
|
|
1244
|
+
graphId: z.ZodString;
|
|
1245
|
+
id: z.ZodString;
|
|
1246
|
+
}, z.core.$strip>;
|
|
1247
|
+
/**
|
|
1248
|
+
* 路由常量:POST /api/graphs/:graphId/nodes
|
|
1249
|
+
*/
|
|
1250
|
+
declare const CreateNodeRoute: {
|
|
1251
|
+
readonly method: 'POST';
|
|
1252
|
+
readonly path: '/api/graphs/:graphId/nodes';
|
|
1253
|
+
readonly paramNames: readonly ['graphId'];
|
|
1254
|
+
};
|
|
1255
|
+
/**
|
|
1256
|
+
* 请求 schema:请求体,POST /api/graphs/:graphId/nodes
|
|
1257
|
+
*/
|
|
1258
|
+
declare const CreateNodeBodySchema: z.ZodObject<{
|
|
1259
|
+
graphId: z.ZodString;
|
|
1260
|
+
label: z.ZodString;
|
|
1261
|
+
nodeType: z.ZodString;
|
|
1262
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1263
|
+
}, z.core.$strip>;
|
|
1264
|
+
/**
|
|
1265
|
+
* CreateNodeBody 的推断类型
|
|
1266
|
+
*/
|
|
1267
|
+
type CreateNodeBody = z.infer<typeof CreateNodeBodySchema>;
|
|
1268
|
+
/**
|
|
1269
|
+
* 响应 schema,POST /api/graphs/:graphId/nodes
|
|
1270
|
+
*/
|
|
1271
|
+
declare const CreateNodeResponseSchema: z.ZodObject<{
|
|
1272
|
+
id: z.ZodString;
|
|
1273
|
+
graphId: z.ZodString;
|
|
1274
|
+
label: z.ZodString;
|
|
1275
|
+
nodeType: z.ZodString;
|
|
1276
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1277
|
+
createdAt: z.ZodString;
|
|
1278
|
+
updatedAt: z.ZodString;
|
|
1279
|
+
}, z.core.$strip>;
|
|
1280
|
+
/**
|
|
1281
|
+
* CreateNodeResponse 的推断类型
|
|
1282
|
+
*/
|
|
1283
|
+
type CreateNodeResponse = z.infer<typeof CreateNodeResponseSchema>;
|
|
1284
|
+
/**
|
|
1285
|
+
* 端点参数契约:创建节点
|
|
1286
|
+
*/
|
|
1287
|
+
type CreateNodeArgs = {
|
|
1288
|
+
/**
|
|
1289
|
+
* 路径参数
|
|
1290
|
+
*/
|
|
1291
|
+
readonly params: z.infer<typeof GraphScopedParamsSchema>;
|
|
1292
|
+
/**
|
|
1293
|
+
* 请求体
|
|
1294
|
+
*/
|
|
1295
|
+
readonly body?: CreateNodeBody;
|
|
1296
|
+
};
|
|
1297
|
+
/**
|
|
1298
|
+
* 路由常量:GET /api/graphs/:graphId/nodes/:id
|
|
1299
|
+
*/
|
|
1300
|
+
declare const GetNodeRoute: {
|
|
1301
|
+
readonly method: 'GET';
|
|
1302
|
+
readonly path: '/api/graphs/:graphId/nodes/:id';
|
|
1303
|
+
readonly paramNames: readonly ['graphId', 'id'];
|
|
1304
|
+
};
|
|
1305
|
+
/**
|
|
1306
|
+
* 响应 schema,GET /api/graphs/:graphId/nodes/:id
|
|
1307
|
+
*
|
|
1308
|
+
* 端口详情查询可空,节点不存在时返回 null
|
|
1309
|
+
*/
|
|
1310
|
+
declare const GetNodeResponseSchema: z.ZodNullable<z.ZodObject<{
|
|
1311
|
+
id: z.ZodString;
|
|
1312
|
+
graphId: z.ZodString;
|
|
1313
|
+
label: z.ZodString;
|
|
1314
|
+
nodeType: z.ZodString;
|
|
1315
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1316
|
+
createdAt: z.ZodString;
|
|
1317
|
+
updatedAt: z.ZodString;
|
|
1318
|
+
}, z.core.$strip>>;
|
|
1319
|
+
/**
|
|
1320
|
+
* GetNodeResponse 的推断类型
|
|
1321
|
+
*/
|
|
1322
|
+
type GetNodeResponse = z.infer<typeof GetNodeResponseSchema>;
|
|
1323
|
+
/**
|
|
1324
|
+
* 端点参数契约:获取单个节点
|
|
1325
|
+
*/
|
|
1326
|
+
type GetNodeArgs = {
|
|
1327
|
+
/**
|
|
1328
|
+
* 路径参数
|
|
1329
|
+
*/
|
|
1330
|
+
readonly params: z.infer<typeof GraphScopedIdParamsSchema>;
|
|
1331
|
+
};
|
|
1332
|
+
/**
|
|
1333
|
+
* 路由常量:GET /api/graphs/:graphId/nodes
|
|
1334
|
+
*/
|
|
1335
|
+
declare const ListNodesRoute: {
|
|
1336
|
+
readonly method: 'GET';
|
|
1337
|
+
readonly path: '/api/graphs/:graphId/nodes';
|
|
1338
|
+
readonly paramNames: readonly ['graphId'];
|
|
1339
|
+
};
|
|
1340
|
+
/**
|
|
1341
|
+
* 请求 schema:查询参数,GET /api/graphs/:graphId/nodes
|
|
1342
|
+
*
|
|
1343
|
+
* 所属图谱标识经路径参数传递
|
|
1344
|
+
*/
|
|
1345
|
+
declare const ListNodesQuerySchema: z.ZodObject<{
|
|
1346
|
+
nodeType: z.ZodOptional<z.ZodString>;
|
|
1347
|
+
page: z.ZodOptional<z.ZodInt>;
|
|
1348
|
+
pageSize: z.ZodOptional<z.ZodInt>;
|
|
1349
|
+
}, z.core.$strip>;
|
|
1350
|
+
/**
|
|
1351
|
+
* ListNodesQuery 的推断类型
|
|
1352
|
+
*/
|
|
1353
|
+
type ListNodesQuery = z.infer<typeof ListNodesQuerySchema>;
|
|
1354
|
+
/**
|
|
1355
|
+
* 响应 schema,GET /api/graphs/:graphId/nodes
|
|
1356
|
+
*/
|
|
1357
|
+
declare const ListNodesResponseSchema: z.ZodObject<{
|
|
1358
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1359
|
+
id: z.ZodString;
|
|
1360
|
+
graphId: z.ZodString;
|
|
1361
|
+
label: z.ZodString;
|
|
1362
|
+
nodeType: z.ZodString;
|
|
1363
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1364
|
+
createdAt: z.ZodString;
|
|
1365
|
+
updatedAt: z.ZodString;
|
|
1366
|
+
}, z.core.$strip>>;
|
|
1367
|
+
total: z.ZodInt;
|
|
1368
|
+
page: z.ZodInt;
|
|
1369
|
+
pageSize: z.ZodInt;
|
|
1370
|
+
}, z.core.$strip>;
|
|
1371
|
+
/**
|
|
1372
|
+
* ListNodesResponse 的推断类型
|
|
1373
|
+
*/
|
|
1374
|
+
type ListNodesResponse = z.infer<typeof ListNodesResponseSchema>;
|
|
1375
|
+
/**
|
|
1376
|
+
* 端点参数契约:获取节点列表
|
|
1377
|
+
*/
|
|
1378
|
+
type ListNodesArgs = {
|
|
1379
|
+
/**
|
|
1380
|
+
* 路径参数
|
|
1381
|
+
*/
|
|
1382
|
+
readonly params: z.infer<typeof GraphScopedParamsSchema>;
|
|
1383
|
+
/**
|
|
1384
|
+
* 查询参数
|
|
1385
|
+
*/
|
|
1386
|
+
readonly query?: ListNodesQuery;
|
|
1387
|
+
};
|
|
1388
|
+
/**
|
|
1389
|
+
* 路由常量:PATCH /api/graphs/:graphId/nodes/:id
|
|
1390
|
+
*/
|
|
1391
|
+
declare const UpdateNodeRoute: {
|
|
1392
|
+
readonly method: 'PATCH';
|
|
1393
|
+
readonly path: '/api/graphs/:graphId/nodes/:id';
|
|
1394
|
+
readonly paramNames: readonly ['graphId', 'id'];
|
|
1395
|
+
};
|
|
1396
|
+
/**
|
|
1397
|
+
* 请求 schema:请求体,PATCH /api/graphs/:graphId/nodes/:id
|
|
1398
|
+
*/
|
|
1399
|
+
declare const UpdateNodeBodySchema: z.ZodObject<{
|
|
1400
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1401
|
+
nodeType: z.ZodOptional<z.ZodString>;
|
|
1402
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1403
|
+
}, z.core.$strip>;
|
|
1404
|
+
/**
|
|
1405
|
+
* UpdateNodeBody 的推断类型
|
|
1406
|
+
*/
|
|
1407
|
+
type UpdateNodeBody = z.infer<typeof UpdateNodeBodySchema>;
|
|
1408
|
+
/**
|
|
1409
|
+
* 响应 schema,PATCH /api/graphs/:graphId/nodes/:id
|
|
1410
|
+
*/
|
|
1411
|
+
declare const UpdateNodeResponseSchema: z.ZodObject<{
|
|
1412
|
+
id: z.ZodString;
|
|
1413
|
+
graphId: z.ZodString;
|
|
1414
|
+
label: z.ZodString;
|
|
1415
|
+
nodeType: z.ZodString;
|
|
1416
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1417
|
+
createdAt: z.ZodString;
|
|
1418
|
+
updatedAt: z.ZodString;
|
|
1419
|
+
}, z.core.$strip>;
|
|
1420
|
+
/**
|
|
1421
|
+
* UpdateNodeResponse 的推断类型
|
|
1422
|
+
*/
|
|
1423
|
+
type UpdateNodeResponse = z.infer<typeof UpdateNodeResponseSchema>;
|
|
1424
|
+
/**
|
|
1425
|
+
* 端点参数契约:更新节点
|
|
1426
|
+
*/
|
|
1427
|
+
type UpdateNodeArgs = {
|
|
1428
|
+
/**
|
|
1429
|
+
* 路径参数
|
|
1430
|
+
*/
|
|
1431
|
+
readonly params: z.infer<typeof GraphScopedIdParamsSchema>;
|
|
1432
|
+
/**
|
|
1433
|
+
* 请求体
|
|
1434
|
+
*/
|
|
1435
|
+
readonly body?: UpdateNodeBody;
|
|
1436
|
+
};
|
|
1437
|
+
/**
|
|
1438
|
+
* 路由常量:DELETE /api/graphs/:graphId/nodes/:id
|
|
1439
|
+
*/
|
|
1440
|
+
declare const DeleteNodeRoute: {
|
|
1441
|
+
readonly method: 'DELETE';
|
|
1442
|
+
readonly path: '/api/graphs/:graphId/nodes/:id';
|
|
1443
|
+
readonly paramNames: readonly ['graphId', 'id'];
|
|
1444
|
+
};
|
|
1445
|
+
/**
|
|
1446
|
+
* 响应 schema,DELETE /api/graphs/:graphId/nodes/:id
|
|
1447
|
+
*
|
|
1448
|
+
* 端口删除成功路径返回 void,传输层将空体归一为 null
|
|
1449
|
+
*/
|
|
1450
|
+
declare const DeleteNodeResponseSchema: z.ZodLiteral<null>;
|
|
1451
|
+
/**
|
|
1452
|
+
* DeleteNodeResponse 的推断类型
|
|
1453
|
+
*/
|
|
1454
|
+
type DeleteNodeResponse = z.infer<typeof DeleteNodeResponseSchema>;
|
|
1455
|
+
/**
|
|
1456
|
+
* 端点参数契约:删除节点
|
|
1457
|
+
*/
|
|
1458
|
+
type DeleteNodeArgs = {
|
|
1459
|
+
/**
|
|
1460
|
+
* 路径参数
|
|
1461
|
+
*/
|
|
1462
|
+
readonly params: z.infer<typeof GraphScopedIdParamsSchema>;
|
|
1463
|
+
};
|
|
1464
|
+
//#endregion
|
|
1465
|
+
//#region src/domains/graph-node/graph-node.client.d.ts
|
|
1466
|
+
/**
|
|
1467
|
+
* graph-node 域端点工厂,注入传输实现后取得全部端点函数
|
|
1468
|
+
*
|
|
1469
|
+
* @param transport - 传输实现,由产品仓注入
|
|
1470
|
+
* @returns 全部端点函数集合
|
|
1471
|
+
*/
|
|
1472
|
+
declare function createGraphNodeEndpoints(transport: ApiTransport): {
|
|
1473
|
+
/**
|
|
1474
|
+
* 创建节点
|
|
1475
|
+
*/
|
|
1476
|
+
createNode: (args: CreateNodeArgs) => Promise<{
|
|
1477
|
+
id: string;
|
|
1478
|
+
graphId: string;
|
|
1479
|
+
label: string;
|
|
1480
|
+
nodeType: string;
|
|
1481
|
+
properties?: Record<string, unknown> | undefined;
|
|
1482
|
+
createdAt: string;
|
|
1483
|
+
updatedAt: string;
|
|
1484
|
+
}>;
|
|
1485
|
+
/**
|
|
1486
|
+
* 获取单个节点
|
|
1487
|
+
*/
|
|
1488
|
+
getNode: (args: GetNodeArgs) => Promise<{
|
|
1489
|
+
id: string;
|
|
1490
|
+
graphId: string;
|
|
1491
|
+
label: string;
|
|
1492
|
+
nodeType: string;
|
|
1493
|
+
properties?: Record<string, unknown> | undefined;
|
|
1494
|
+
createdAt: string;
|
|
1495
|
+
updatedAt: string;
|
|
1496
|
+
} | null>;
|
|
1497
|
+
/**
|
|
1498
|
+
* 获取节点列表
|
|
1499
|
+
*/
|
|
1500
|
+
listNodes: (args: ListNodesArgs) => Promise<{
|
|
1501
|
+
items: {
|
|
1502
|
+
id: string;
|
|
1503
|
+
graphId: string;
|
|
1504
|
+
label: string;
|
|
1505
|
+
nodeType: string;
|
|
1506
|
+
properties?: Record<string, unknown> | undefined;
|
|
1507
|
+
createdAt: string;
|
|
1508
|
+
updatedAt: string;
|
|
1509
|
+
}[];
|
|
1510
|
+
total: number;
|
|
1511
|
+
page: number;
|
|
1512
|
+
pageSize: number;
|
|
1513
|
+
}>;
|
|
1514
|
+
/**
|
|
1515
|
+
* 更新节点
|
|
1516
|
+
*/
|
|
1517
|
+
updateNode: (args: UpdateNodeArgs) => Promise<{
|
|
1518
|
+
id: string;
|
|
1519
|
+
graphId: string;
|
|
1520
|
+
label: string;
|
|
1521
|
+
nodeType: string;
|
|
1522
|
+
properties?: Record<string, unknown> | undefined;
|
|
1523
|
+
createdAt: string;
|
|
1524
|
+
updatedAt: string;
|
|
1525
|
+
}>;
|
|
1526
|
+
/**
|
|
1527
|
+
* 删除节点
|
|
1528
|
+
*/
|
|
1529
|
+
deleteNode: (args: DeleteNodeArgs) => Promise<null>;
|
|
1530
|
+
};
|
|
1531
|
+
//#endregion
|
|
1532
|
+
//#region src/domains/graph-edge/graph-edge.dto.d.ts
|
|
1533
|
+
/**
|
|
1534
|
+
* 域公共枚举定义:EdgeType
|
|
1535
|
+
*/
|
|
1536
|
+
declare const EdgeTypeSchema: z.ZodString;
|
|
1537
|
+
/**
|
|
1538
|
+
* EdgeType 的推断类型
|
|
1539
|
+
*/
|
|
1540
|
+
type EdgeType = z.infer<typeof EdgeTypeSchema>;
|
|
1541
|
+
/**
|
|
1542
|
+
* 域公共枚举常量:EdgeType
|
|
1543
|
+
*/
|
|
1544
|
+
/**
|
|
1545
|
+
* 默认档案的边类型键集,供消费方提示内置键
|
|
1546
|
+
*/
|
|
1547
|
+
declare const EdgeType: {
|
|
1548
|
+
readonly knows: 'knows';
|
|
1549
|
+
readonly works_for: 'works_for';
|
|
1550
|
+
readonly member_of: 'member_of';
|
|
1551
|
+
readonly related_to: 'related_to';
|
|
1552
|
+
readonly located_in: 'located_in';
|
|
1553
|
+
readonly custom: 'custom';
|
|
1554
|
+
};
|
|
1555
|
+
/**
|
|
1556
|
+
* 域公共数据契约:Edge
|
|
1557
|
+
*
|
|
1558
|
+
* 边自定义属性为任意键值面,生成器封闭集不支持,按领域现实保留
|
|
1559
|
+
*/
|
|
1560
|
+
declare const EdgeSchema: z.ZodObject<{
|
|
1561
|
+
id: z.ZodString;
|
|
1562
|
+
graphId: z.ZodString;
|
|
1563
|
+
sourceId: z.ZodString;
|
|
1564
|
+
targetId: z.ZodString;
|
|
1565
|
+
edgeType: z.ZodString;
|
|
1566
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1567
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1568
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
1569
|
+
createdAt: z.ZodString;
|
|
1570
|
+
updatedAt: z.ZodString;
|
|
1571
|
+
}, z.core.$strip>;
|
|
1572
|
+
/**
|
|
1573
|
+
* Edge 的推断类型
|
|
1574
|
+
*/
|
|
1575
|
+
type Edge = z.infer<typeof EdgeSchema>;
|
|
1576
|
+
/**
|
|
1577
|
+
* 域公共数据契约:EdgeListData
|
|
1578
|
+
*
|
|
1579
|
+
* 边列表四键分页面
|
|
1580
|
+
*/
|
|
1581
|
+
declare const EdgeListDataSchema: z.ZodObject<{
|
|
1582
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1583
|
+
id: z.ZodString;
|
|
1584
|
+
graphId: z.ZodString;
|
|
1585
|
+
sourceId: z.ZodString;
|
|
1586
|
+
targetId: z.ZodString;
|
|
1587
|
+
edgeType: z.ZodString;
|
|
1588
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1589
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1590
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
1591
|
+
createdAt: z.ZodString;
|
|
1592
|
+
updatedAt: z.ZodString;
|
|
1593
|
+
}, z.core.$strip>>;
|
|
1594
|
+
total: z.ZodInt;
|
|
1595
|
+
page: z.ZodInt;
|
|
1596
|
+
pageSize: z.ZodInt;
|
|
1597
|
+
}, z.core.$strip>;
|
|
1598
|
+
/**
|
|
1599
|
+
* EdgeListData 的推断类型
|
|
1600
|
+
*/
|
|
1601
|
+
type EdgeListData = z.infer<typeof EdgeListDataSchema>;
|
|
1602
|
+
//#endregion
|
|
1603
|
+
//#region src/domains/graph-edge/graph-edge.schema.d.ts
|
|
1604
|
+
/**
|
|
1605
|
+
* 路由常量:POST /api/graphs/:graphId/edges
|
|
1606
|
+
*/
|
|
1607
|
+
declare const CreateEdgeRoute: {
|
|
1608
|
+
readonly method: 'POST';
|
|
1609
|
+
readonly path: '/api/graphs/:graphId/edges';
|
|
1610
|
+
readonly paramNames: readonly ['graphId'];
|
|
1611
|
+
};
|
|
1612
|
+
/**
|
|
1613
|
+
* 请求 schema:请求体,POST /api/graphs/:graphId/edges
|
|
1614
|
+
*/
|
|
1615
|
+
declare const CreateEdgeBodySchema: z.ZodObject<{
|
|
1616
|
+
graphId: z.ZodString;
|
|
1617
|
+
sourceId: z.ZodString;
|
|
1618
|
+
targetId: z.ZodString;
|
|
1619
|
+
edgeType: z.ZodString;
|
|
1620
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1621
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1622
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
1623
|
+
}, z.core.$strip>;
|
|
1624
|
+
/**
|
|
1625
|
+
* CreateEdgeBody 的推断类型
|
|
1626
|
+
*/
|
|
1627
|
+
type CreateEdgeBody = z.infer<typeof CreateEdgeBodySchema>;
|
|
1628
|
+
/**
|
|
1629
|
+
* 响应 schema,POST /api/graphs/:graphId/edges
|
|
1630
|
+
*/
|
|
1631
|
+
declare const CreateEdgeResponseSchema: z.ZodObject<{
|
|
1632
|
+
id: z.ZodString;
|
|
1633
|
+
graphId: z.ZodString;
|
|
1634
|
+
sourceId: z.ZodString;
|
|
1635
|
+
targetId: z.ZodString;
|
|
1636
|
+
edgeType: z.ZodString;
|
|
1637
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1638
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1639
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
1640
|
+
createdAt: z.ZodString;
|
|
1641
|
+
updatedAt: z.ZodString;
|
|
1642
|
+
}, z.core.$strip>;
|
|
1643
|
+
/**
|
|
1644
|
+
* CreateEdgeResponse 的推断类型
|
|
1645
|
+
*/
|
|
1646
|
+
type CreateEdgeResponse = z.infer<typeof CreateEdgeResponseSchema>;
|
|
1647
|
+
/**
|
|
1648
|
+
* 端点参数契约:创建边
|
|
1649
|
+
*/
|
|
1650
|
+
type CreateEdgeArgs = {
|
|
1651
|
+
/**
|
|
1652
|
+
* 路径参数
|
|
1653
|
+
*/
|
|
1654
|
+
readonly params: z.infer<typeof GraphScopedParamsSchema>;
|
|
1655
|
+
/**
|
|
1656
|
+
* 请求体
|
|
1657
|
+
*/
|
|
1658
|
+
readonly body?: CreateEdgeBody;
|
|
1659
|
+
};
|
|
1660
|
+
/**
|
|
1661
|
+
* 路由常量:GET /api/graphs/:graphId/edges/:id
|
|
1662
|
+
*/
|
|
1663
|
+
declare const GetEdgeRoute: {
|
|
1664
|
+
readonly method: 'GET';
|
|
1665
|
+
readonly path: '/api/graphs/:graphId/edges/:id';
|
|
1666
|
+
readonly paramNames: readonly ['graphId', 'id'];
|
|
1667
|
+
};
|
|
1668
|
+
/**
|
|
1669
|
+
* 响应 schema,GET /api/graphs/:graphId/edges/:id
|
|
1670
|
+
*
|
|
1671
|
+
* 端口详情查询可空,边不存在时返回 null
|
|
1672
|
+
*/
|
|
1673
|
+
declare const GetEdgeResponseSchema: z.ZodNullable<z.ZodObject<{
|
|
1674
|
+
id: z.ZodString;
|
|
1675
|
+
graphId: z.ZodString;
|
|
1676
|
+
sourceId: z.ZodString;
|
|
1677
|
+
targetId: z.ZodString;
|
|
1678
|
+
edgeType: z.ZodString;
|
|
1679
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1680
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1681
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
1682
|
+
createdAt: z.ZodString;
|
|
1683
|
+
updatedAt: z.ZodString;
|
|
1684
|
+
}, z.core.$strip>>;
|
|
1685
|
+
/**
|
|
1686
|
+
* GetEdgeResponse 的推断类型
|
|
1687
|
+
*/
|
|
1688
|
+
type GetEdgeResponse = z.infer<typeof GetEdgeResponseSchema>;
|
|
1689
|
+
/**
|
|
1690
|
+
* 端点参数契约:获取单个边
|
|
1691
|
+
*/
|
|
1692
|
+
type GetEdgeArgs = {
|
|
1693
|
+
/**
|
|
1694
|
+
* 路径参数
|
|
1695
|
+
*/
|
|
1696
|
+
readonly params: z.infer<typeof GraphScopedIdParamsSchema>;
|
|
1697
|
+
};
|
|
1698
|
+
/**
|
|
1699
|
+
* 路由常量:GET /api/graphs/:graphId/edges
|
|
1700
|
+
*/
|
|
1701
|
+
declare const ListEdgesRoute: {
|
|
1702
|
+
readonly method: 'GET';
|
|
1703
|
+
readonly path: '/api/graphs/:graphId/edges';
|
|
1704
|
+
readonly paramNames: readonly ['graphId'];
|
|
1705
|
+
};
|
|
1706
|
+
/**
|
|
1707
|
+
* 请求 schema:查询参数,GET /api/graphs/:graphId/edges
|
|
1708
|
+
*
|
|
1709
|
+
* 所属图谱标识经路径参数传递
|
|
1710
|
+
*/
|
|
1711
|
+
declare const ListEdgesQuerySchema: z.ZodObject<{
|
|
1712
|
+
edgeType: z.ZodOptional<z.ZodString>;
|
|
1713
|
+
sourceId: z.ZodOptional<z.ZodString>;
|
|
1714
|
+
targetId: z.ZodOptional<z.ZodString>;
|
|
1715
|
+
page: z.ZodOptional<z.ZodInt>;
|
|
1716
|
+
pageSize: z.ZodOptional<z.ZodInt>;
|
|
1717
|
+
}, z.core.$strip>;
|
|
1718
|
+
/**
|
|
1719
|
+
* ListEdgesQuery 的推断类型
|
|
1720
|
+
*/
|
|
1721
|
+
type ListEdgesQuery = z.infer<typeof ListEdgesQuerySchema>;
|
|
1722
|
+
/**
|
|
1723
|
+
* 响应 schema,GET /api/graphs/:graphId/edges
|
|
1724
|
+
*/
|
|
1725
|
+
declare const ListEdgesResponseSchema: z.ZodObject<{
|
|
1726
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1727
|
+
id: z.ZodString;
|
|
1728
|
+
graphId: z.ZodString;
|
|
1729
|
+
sourceId: z.ZodString;
|
|
1730
|
+
targetId: z.ZodString;
|
|
1731
|
+
edgeType: z.ZodString;
|
|
1732
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1733
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1734
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
1735
|
+
createdAt: z.ZodString;
|
|
1736
|
+
updatedAt: z.ZodString;
|
|
1737
|
+
}, z.core.$strip>>;
|
|
1738
|
+
total: z.ZodInt;
|
|
1739
|
+
page: z.ZodInt;
|
|
1740
|
+
pageSize: z.ZodInt;
|
|
1741
|
+
}, z.core.$strip>;
|
|
1742
|
+
/**
|
|
1743
|
+
* ListEdgesResponse 的推断类型
|
|
1744
|
+
*/
|
|
1745
|
+
type ListEdgesResponse = z.infer<typeof ListEdgesResponseSchema>;
|
|
1746
|
+
/**
|
|
1747
|
+
* 端点参数契约:获取边列表
|
|
1748
|
+
*/
|
|
1749
|
+
type ListEdgesArgs = {
|
|
1750
|
+
/**
|
|
1751
|
+
* 路径参数
|
|
1752
|
+
*/
|
|
1753
|
+
readonly params: z.infer<typeof GraphScopedParamsSchema>;
|
|
1754
|
+
/**
|
|
1755
|
+
* 查询参数
|
|
1756
|
+
*/
|
|
1757
|
+
readonly query?: ListEdgesQuery;
|
|
1758
|
+
};
|
|
1759
|
+
/**
|
|
1760
|
+
* 路由常量:PATCH /api/graphs/:graphId/edges/:id
|
|
1761
|
+
*/
|
|
1762
|
+
declare const UpdateEdgeRoute: {
|
|
1763
|
+
readonly method: 'PATCH';
|
|
1764
|
+
readonly path: '/api/graphs/:graphId/edges/:id';
|
|
1765
|
+
readonly paramNames: readonly ['graphId', 'id'];
|
|
1766
|
+
};
|
|
1767
|
+
/**
|
|
1768
|
+
* 请求 schema:请求体,PATCH /api/graphs/:graphId/edges/:id
|
|
1769
|
+
*/
|
|
1770
|
+
declare const UpdateEdgeBodySchema: z.ZodObject<{
|
|
1771
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1772
|
+
edgeType: z.ZodOptional<z.ZodString>;
|
|
1773
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1774
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
1775
|
+
}, z.core.$strip>;
|
|
1776
|
+
/**
|
|
1777
|
+
* UpdateEdgeBody 的推断类型
|
|
1778
|
+
*/
|
|
1779
|
+
type UpdateEdgeBody = z.infer<typeof UpdateEdgeBodySchema>;
|
|
1780
|
+
/**
|
|
1781
|
+
* 响应 schema,PATCH /api/graphs/:graphId/edges/:id
|
|
1782
|
+
*/
|
|
1783
|
+
declare const UpdateEdgeResponseSchema: z.ZodObject<{
|
|
1784
|
+
id: z.ZodString;
|
|
1785
|
+
graphId: z.ZodString;
|
|
1786
|
+
sourceId: z.ZodString;
|
|
1787
|
+
targetId: z.ZodString;
|
|
1788
|
+
edgeType: z.ZodString;
|
|
1789
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1790
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1791
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
1792
|
+
createdAt: z.ZodString;
|
|
1793
|
+
updatedAt: z.ZodString;
|
|
1794
|
+
}, z.core.$strip>;
|
|
1795
|
+
/**
|
|
1796
|
+
* UpdateEdgeResponse 的推断类型
|
|
1797
|
+
*/
|
|
1798
|
+
type UpdateEdgeResponse = z.infer<typeof UpdateEdgeResponseSchema>;
|
|
1799
|
+
/**
|
|
1800
|
+
* 端点参数契约:更新边
|
|
1801
|
+
*/
|
|
1802
|
+
type UpdateEdgeArgs = {
|
|
1803
|
+
/**
|
|
1804
|
+
* 路径参数
|
|
1805
|
+
*/
|
|
1806
|
+
readonly params: z.infer<typeof GraphScopedIdParamsSchema>;
|
|
1807
|
+
/**
|
|
1808
|
+
* 请求体
|
|
1809
|
+
*/
|
|
1810
|
+
readonly body?: UpdateEdgeBody;
|
|
1811
|
+
};
|
|
1812
|
+
/**
|
|
1813
|
+
* 路由常量:DELETE /api/graphs/:graphId/edges/:id
|
|
1814
|
+
*/
|
|
1815
|
+
declare const DeleteEdgeRoute: {
|
|
1816
|
+
readonly method: 'DELETE';
|
|
1817
|
+
readonly path: '/api/graphs/:graphId/edges/:id';
|
|
1818
|
+
readonly paramNames: readonly ['graphId', 'id'];
|
|
1819
|
+
};
|
|
1820
|
+
/**
|
|
1821
|
+
* 响应 schema,DELETE /api/graphs/:graphId/edges/:id
|
|
1822
|
+
*
|
|
1823
|
+
* 端口删除成功路径返回 void,传输层将空体归一为 null
|
|
1824
|
+
*/
|
|
1825
|
+
declare const DeleteEdgeResponseSchema: z.ZodLiteral<null>;
|
|
1826
|
+
/**
|
|
1827
|
+
* DeleteEdgeResponse 的推断类型
|
|
1828
|
+
*/
|
|
1829
|
+
type DeleteEdgeResponse = z.infer<typeof DeleteEdgeResponseSchema>;
|
|
1830
|
+
/**
|
|
1831
|
+
* 端点参数契约:删除边
|
|
1832
|
+
*/
|
|
1833
|
+
type DeleteEdgeArgs = {
|
|
1834
|
+
/**
|
|
1835
|
+
* 路径参数
|
|
1836
|
+
*/
|
|
1837
|
+
readonly params: z.infer<typeof GraphScopedIdParamsSchema>;
|
|
1838
|
+
};
|
|
1839
|
+
//#endregion
|
|
1840
|
+
//#region src/domains/graph-edge/graph-edge.client.d.ts
|
|
1841
|
+
/**
|
|
1842
|
+
* graph-edge 域端点工厂,注入传输实现后取得全部端点函数
|
|
1843
|
+
*
|
|
1844
|
+
* @param transport - 传输实现,由产品仓注入
|
|
1845
|
+
* @returns 全部端点函数集合
|
|
1846
|
+
*/
|
|
1847
|
+
declare function createGraphEdgeEndpoints(transport: ApiTransport): {
|
|
1848
|
+
/**
|
|
1849
|
+
* 创建边
|
|
1850
|
+
*/
|
|
1851
|
+
createEdge: (args: CreateEdgeArgs) => Promise<{
|
|
1852
|
+
id: string;
|
|
1853
|
+
graphId: string;
|
|
1854
|
+
sourceId: string;
|
|
1855
|
+
targetId: string;
|
|
1856
|
+
edgeType: string;
|
|
1857
|
+
label?: string | undefined;
|
|
1858
|
+
properties?: Record<string, unknown> | undefined;
|
|
1859
|
+
weight?: number | undefined;
|
|
1860
|
+
createdAt: string;
|
|
1861
|
+
updatedAt: string;
|
|
1862
|
+
}>;
|
|
1863
|
+
/**
|
|
1864
|
+
* 获取单个边
|
|
1865
|
+
*/
|
|
1866
|
+
getEdge: (args: GetEdgeArgs) => Promise<{
|
|
1867
|
+
id: string;
|
|
1868
|
+
graphId: string;
|
|
1869
|
+
sourceId: string;
|
|
1870
|
+
targetId: string;
|
|
1871
|
+
edgeType: string;
|
|
1872
|
+
label?: string | undefined;
|
|
1873
|
+
properties?: Record<string, unknown> | undefined;
|
|
1874
|
+
weight?: number | undefined;
|
|
1875
|
+
createdAt: string;
|
|
1876
|
+
updatedAt: string;
|
|
1877
|
+
} | null>;
|
|
1878
|
+
/**
|
|
1879
|
+
* 获取边列表
|
|
1880
|
+
*/
|
|
1881
|
+
listEdges: (args: ListEdgesArgs) => Promise<{
|
|
1882
|
+
items: {
|
|
1883
|
+
id: string;
|
|
1884
|
+
graphId: string;
|
|
1885
|
+
sourceId: string;
|
|
1886
|
+
targetId: string;
|
|
1887
|
+
edgeType: string;
|
|
1888
|
+
label?: string | undefined;
|
|
1889
|
+
properties?: Record<string, unknown> | undefined;
|
|
1890
|
+
weight?: number | undefined;
|
|
1891
|
+
createdAt: string;
|
|
1892
|
+
updatedAt: string;
|
|
1893
|
+
}[];
|
|
1894
|
+
total: number;
|
|
1895
|
+
page: number;
|
|
1896
|
+
pageSize: number;
|
|
1897
|
+
}>;
|
|
1898
|
+
/**
|
|
1899
|
+
* 更新边
|
|
1900
|
+
*/
|
|
1901
|
+
updateEdge: (args: UpdateEdgeArgs) => Promise<{
|
|
1902
|
+
id: string;
|
|
1903
|
+
graphId: string;
|
|
1904
|
+
sourceId: string;
|
|
1905
|
+
targetId: string;
|
|
1906
|
+
edgeType: string;
|
|
1907
|
+
label?: string | undefined;
|
|
1908
|
+
properties?: Record<string, unknown> | undefined;
|
|
1909
|
+
weight?: number | undefined;
|
|
1910
|
+
createdAt: string;
|
|
1911
|
+
updatedAt: string;
|
|
1912
|
+
}>;
|
|
1913
|
+
/**
|
|
1914
|
+
* 删除边
|
|
1915
|
+
*/
|
|
1916
|
+
deleteEdge: (args: DeleteEdgeArgs) => Promise<null>;
|
|
1917
|
+
};
|
|
1918
|
+
//#endregion
|
|
1919
|
+
//#region src/domains/graph-query/graph-query.dto.d.ts
|
|
1920
|
+
/**
|
|
1921
|
+
* 域公共枚举定义:TraverseDirection
|
|
1922
|
+
*/
|
|
1923
|
+
declare const TraverseDirectionSchema: z.ZodEnum<{
|
|
1924
|
+
both: "both";
|
|
1925
|
+
in: "in";
|
|
1926
|
+
out: "out";
|
|
1927
|
+
}>;
|
|
1928
|
+
/**
|
|
1929
|
+
* TraverseDirection 的推断类型
|
|
1930
|
+
*/
|
|
1931
|
+
type TraverseDirection = z.infer<typeof TraverseDirectionSchema>;
|
|
1932
|
+
/**
|
|
1933
|
+
* 域公共枚举常量:TraverseDirection
|
|
1934
|
+
*/
|
|
1935
|
+
declare const TraverseDirection: {
|
|
1936
|
+
readonly out: 'out';
|
|
1937
|
+
readonly in: 'in';
|
|
1938
|
+
readonly both: 'both';
|
|
1939
|
+
};
|
|
1940
|
+
/**
|
|
1941
|
+
* 域公共数据契约:NeighborsData
|
|
1942
|
+
*
|
|
1943
|
+
* 端口邻居查询返回起始节点标识与邻居节点列表
|
|
1944
|
+
*/
|
|
1945
|
+
declare const NeighborsDataSchema: z.ZodObject<{
|
|
1946
|
+
nodeId: z.ZodString;
|
|
1947
|
+
neighbors: z.ZodArray<z.ZodObject<{
|
|
1948
|
+
id: z.ZodString;
|
|
1949
|
+
graphId: z.ZodString;
|
|
1950
|
+
label: z.ZodString;
|
|
1951
|
+
nodeType: z.ZodString;
|
|
1952
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1953
|
+
createdAt: z.ZodString;
|
|
1954
|
+
updatedAt: z.ZodString;
|
|
1955
|
+
}, z.core.$strip>>;
|
|
1956
|
+
}, z.core.$strip>;
|
|
1957
|
+
/**
|
|
1958
|
+
* NeighborsData 的推断类型
|
|
1959
|
+
*/
|
|
1960
|
+
type NeighborsData = z.infer<typeof NeighborsDataSchema>;
|
|
1961
|
+
/**
|
|
1962
|
+
* 域公共数据契约:TraverseData
|
|
1963
|
+
*
|
|
1964
|
+
* 端口遍历返回起点、访问到的节点列表与最大深度
|
|
1965
|
+
*/
|
|
1966
|
+
declare const TraverseDataSchema: z.ZodObject<{
|
|
1967
|
+
startNodeId: z.ZodString;
|
|
1968
|
+
nodes: z.ZodArray<z.ZodObject<{
|
|
1969
|
+
id: z.ZodString;
|
|
1970
|
+
graphId: z.ZodString;
|
|
1971
|
+
label: z.ZodString;
|
|
1972
|
+
nodeType: z.ZodString;
|
|
1973
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1974
|
+
createdAt: z.ZodString;
|
|
1975
|
+
updatedAt: z.ZodString;
|
|
1976
|
+
}, z.core.$strip>>;
|
|
1977
|
+
depth: z.ZodInt;
|
|
1978
|
+
}, z.core.$strip>;
|
|
1979
|
+
/**
|
|
1980
|
+
* TraverseData 的推断类型
|
|
1981
|
+
*/
|
|
1982
|
+
type TraverseData = z.infer<typeof TraverseDataSchema>;
|
|
1983
|
+
/**
|
|
1984
|
+
* 带层级的遍历节点
|
|
1985
|
+
*/
|
|
1986
|
+
declare const TraverseNodeSchema: z.ZodObject<{
|
|
1987
|
+
id: z.ZodString;
|
|
1988
|
+
graphId: z.ZodString;
|
|
1989
|
+
label: z.ZodString;
|
|
1990
|
+
nodeType: z.ZodString;
|
|
1991
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1992
|
+
createdAt: z.ZodString;
|
|
1993
|
+
updatedAt: z.ZodString;
|
|
1994
|
+
depth: z.ZodInt;
|
|
1995
|
+
}, z.core.$strip>;
|
|
1996
|
+
/**
|
|
1997
|
+
* 带层级的遍历节点推断类型
|
|
1998
|
+
*/
|
|
1999
|
+
type TraverseNode = z.infer<typeof TraverseNodeSchema>;
|
|
2000
|
+
/**
|
|
2001
|
+
* 图切片即节点列表加两端都在集内的边列表
|
|
2002
|
+
*/
|
|
2003
|
+
declare const GraphSliceDataSchema: z.ZodObject<{
|
|
2004
|
+
nodes: z.ZodArray<z.ZodObject<{
|
|
2005
|
+
id: z.ZodString;
|
|
2006
|
+
graphId: z.ZodString;
|
|
2007
|
+
label: z.ZodString;
|
|
2008
|
+
nodeType: z.ZodString;
|
|
2009
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2010
|
+
createdAt: z.ZodString;
|
|
2011
|
+
updatedAt: z.ZodString;
|
|
2012
|
+
}, z.core.$strip>>;
|
|
2013
|
+
edges: z.ZodArray<z.ZodObject<{
|
|
2014
|
+
id: z.ZodString;
|
|
2015
|
+
graphId: z.ZodString;
|
|
2016
|
+
sourceId: z.ZodString;
|
|
2017
|
+
targetId: z.ZodString;
|
|
2018
|
+
edgeType: z.ZodString;
|
|
2019
|
+
label: z.ZodOptional<z.ZodString>;
|
|
2020
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2021
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
2022
|
+
createdAt: z.ZodString;
|
|
2023
|
+
updatedAt: z.ZodString;
|
|
2024
|
+
}, z.core.$strip>>;
|
|
2025
|
+
}, z.core.$strip>;
|
|
2026
|
+
/**
|
|
2027
|
+
* 图切片推断类型
|
|
2028
|
+
*/
|
|
2029
|
+
type GraphSliceData = z.infer<typeof GraphSliceDataSchema>;
|
|
2030
|
+
/**
|
|
2031
|
+
* 标识列表即拓扑序、传递约简与学习路径的返回面
|
|
2032
|
+
*/
|
|
2033
|
+
declare const IdListDataSchema: z.ZodArray<z.ZodString>;
|
|
2034
|
+
/**
|
|
2035
|
+
* 标识列表推断类型
|
|
2036
|
+
*/
|
|
2037
|
+
type IdListData = z.infer<typeof IdListDataSchema>;
|
|
2038
|
+
/**
|
|
2039
|
+
* 分组轴定义镜像
|
|
2040
|
+
*/
|
|
2041
|
+
declare const GroupFoldAxisSchema: z.ZodObject<{
|
|
2042
|
+
key: z.ZodString;
|
|
2043
|
+
label: z.ZodString;
|
|
2044
|
+
property: z.ZodString;
|
|
2045
|
+
order: z.ZodEnum<{
|
|
2046
|
+
asc: "asc";
|
|
2047
|
+
desc: "desc";
|
|
2048
|
+
}>;
|
|
2049
|
+
}, z.core.$strip>;
|
|
2050
|
+
/**
|
|
2051
|
+
* 分组轴推断类型
|
|
2052
|
+
*/
|
|
2053
|
+
type GroupFoldAxis = z.infer<typeof GroupFoldAxisSchema>;
|
|
2054
|
+
/**
|
|
2055
|
+
* 分组折叠结果
|
|
2056
|
+
*/
|
|
2057
|
+
declare const GroupFoldDataSchema: z.ZodObject<{
|
|
2058
|
+
axis: z.ZodObject<{
|
|
2059
|
+
key: z.ZodString;
|
|
2060
|
+
label: z.ZodString;
|
|
2061
|
+
property: z.ZodString;
|
|
2062
|
+
order: z.ZodEnum<{
|
|
2063
|
+
asc: "asc";
|
|
2064
|
+
desc: "desc";
|
|
2065
|
+
}>;
|
|
2066
|
+
}, z.core.$strip>;
|
|
2067
|
+
groups: z.ZodArray<z.ZodObject<{
|
|
2068
|
+
value: z.ZodString;
|
|
2069
|
+
nodeIds: z.ZodArray<z.ZodString>;
|
|
2070
|
+
}, z.core.$strip>>;
|
|
2071
|
+
}, z.core.$strip>;
|
|
2072
|
+
/**
|
|
2073
|
+
* 分组折叠结果推断类型
|
|
2074
|
+
*/
|
|
2075
|
+
type GroupFoldData = z.infer<typeof GroupFoldDataSchema>;
|
|
2076
|
+
//#endregion
|
|
2077
|
+
//#region src/domains/graph-query/graph-query.schema.d.ts
|
|
2078
|
+
/**
|
|
2079
|
+
* 路由常量:GET /api/graphs/:graphId/nodes/:id/neighbors
|
|
2080
|
+
*/
|
|
2081
|
+
declare const GetNeighborsRoute: {
|
|
2082
|
+
readonly method: 'GET';
|
|
2083
|
+
readonly path: '/api/graphs/:graphId/nodes/:id/neighbors';
|
|
2084
|
+
readonly paramNames: readonly ['graphId', 'id'];
|
|
2085
|
+
};
|
|
2086
|
+
/**
|
|
2087
|
+
* 响应 schema,GET /api/graphs/:graphId/nodes/:id/neighbors
|
|
2088
|
+
*/
|
|
2089
|
+
declare const GetNeighborsResponseSchema: z.ZodObject<{
|
|
2090
|
+
nodeId: z.ZodString;
|
|
2091
|
+
neighbors: z.ZodArray<z.ZodObject<{
|
|
2092
|
+
id: z.ZodString;
|
|
2093
|
+
graphId: z.ZodString;
|
|
2094
|
+
label: z.ZodString;
|
|
2095
|
+
nodeType: z.ZodString;
|
|
2096
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2097
|
+
createdAt: z.ZodString;
|
|
2098
|
+
updatedAt: z.ZodString;
|
|
2099
|
+
}, z.core.$strip>>;
|
|
2100
|
+
}, z.core.$strip>;
|
|
2101
|
+
/**
|
|
2102
|
+
* GetNeighborsResponse 的推断类型
|
|
2103
|
+
*/
|
|
2104
|
+
type GetNeighborsResponse = z.infer<typeof GetNeighborsResponseSchema>;
|
|
2105
|
+
/**
|
|
2106
|
+
* 端点参数契约:获取节点邻居
|
|
2107
|
+
*/
|
|
2108
|
+
type GetNeighborsArgs = {
|
|
2109
|
+
/**
|
|
2110
|
+
* 路径参数
|
|
2111
|
+
*/
|
|
2112
|
+
readonly params: z.infer<typeof GraphScopedIdParamsSchema>;
|
|
2113
|
+
};
|
|
2114
|
+
/**
|
|
2115
|
+
* 路由常量:POST /api/graphs/:graphId/traverse
|
|
2116
|
+
*/
|
|
2117
|
+
declare const TraverseGraphRoute: {
|
|
2118
|
+
readonly method: 'POST';
|
|
2119
|
+
readonly path: '/api/graphs/:graphId/traverse';
|
|
2120
|
+
readonly paramNames: readonly ['graphId'];
|
|
2121
|
+
};
|
|
2122
|
+
/**
|
|
2123
|
+
* 请求 schema:请求体,POST /api/graphs/:graphId/traverse
|
|
2124
|
+
*
|
|
2125
|
+
* 端口入参为起点、方向与深度,无边类型过滤键
|
|
2126
|
+
*/
|
|
2127
|
+
declare const TraverseGraphBodySchema: z.ZodObject<{
|
|
2128
|
+
startNodeId: z.ZodString;
|
|
2129
|
+
direction: z.ZodOptional<z.ZodEnum<{
|
|
2130
|
+
both: "both";
|
|
2131
|
+
in: "in";
|
|
2132
|
+
out: "out";
|
|
2133
|
+
}>>;
|
|
2134
|
+
maxDepth: z.ZodOptional<z.ZodInt>;
|
|
2135
|
+
}, z.core.$strip>;
|
|
2136
|
+
/**
|
|
2137
|
+
* TraverseGraphBody 的推断类型
|
|
2138
|
+
*/
|
|
2139
|
+
type TraverseGraphBody = z.infer<typeof TraverseGraphBodySchema>;
|
|
2140
|
+
/**
|
|
2141
|
+
* 响应 schema,POST /api/graphs/:graphId/traverse
|
|
2142
|
+
*/
|
|
2143
|
+
declare const TraverseGraphResponseSchema: z.ZodObject<{
|
|
2144
|
+
startNodeId: z.ZodString;
|
|
2145
|
+
nodes: z.ZodArray<z.ZodObject<{
|
|
2146
|
+
id: z.ZodString;
|
|
2147
|
+
graphId: z.ZodString;
|
|
2148
|
+
label: z.ZodString;
|
|
2149
|
+
nodeType: z.ZodString;
|
|
2150
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2151
|
+
createdAt: z.ZodString;
|
|
2152
|
+
updatedAt: z.ZodString;
|
|
2153
|
+
}, z.core.$strip>>;
|
|
2154
|
+
depth: z.ZodInt;
|
|
2155
|
+
}, z.core.$strip>;
|
|
2156
|
+
/**
|
|
2157
|
+
* TraverseGraphResponse 的推断类型
|
|
2158
|
+
*/
|
|
2159
|
+
type TraverseGraphResponse = z.infer<typeof TraverseGraphResponseSchema>;
|
|
2160
|
+
/**
|
|
2161
|
+
* 端点参数契约:图遍历
|
|
2162
|
+
*/
|
|
2163
|
+
type TraverseGraphArgs = {
|
|
2164
|
+
/**
|
|
2165
|
+
* 路径参数
|
|
2166
|
+
*/
|
|
2167
|
+
readonly params: z.infer<typeof GraphScopedParamsSchema>;
|
|
2168
|
+
/**
|
|
2169
|
+
* 请求体
|
|
2170
|
+
*/
|
|
2171
|
+
readonly body?: TraverseGraphBody;
|
|
2172
|
+
};
|
|
2173
|
+
/**
|
|
2174
|
+
* 祖先与后代查询共用查询串
|
|
2175
|
+
*/
|
|
2176
|
+
declare const GraphQueryParamsWireSchema: z.ZodObject<{
|
|
2177
|
+
depth: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
2178
|
+
edgeTypes: z.ZodOptional<z.ZodString>;
|
|
2179
|
+
}, z.core.$strip>;
|
|
2180
|
+
/**
|
|
2181
|
+
* 祖先查询路由
|
|
2182
|
+
*/
|
|
2183
|
+
declare const GetAncestorsRoute: {
|
|
2184
|
+
readonly method: 'GET';
|
|
2185
|
+
readonly path: '/api/graphs/:graphId/nodes/:id/ancestors';
|
|
2186
|
+
readonly paramNames: readonly ['graphId', 'id'];
|
|
2187
|
+
};
|
|
2188
|
+
/**
|
|
2189
|
+
* 祖先查询响应
|
|
2190
|
+
*/
|
|
2191
|
+
declare const GetAncestorsResponseSchema: z.ZodObject<{
|
|
2192
|
+
nodes: z.ZodArray<z.ZodObject<{
|
|
2193
|
+
id: z.ZodString;
|
|
2194
|
+
graphId: z.ZodString;
|
|
2195
|
+
label: z.ZodString;
|
|
2196
|
+
nodeType: z.ZodString;
|
|
2197
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2198
|
+
createdAt: z.ZodString;
|
|
2199
|
+
updatedAt: z.ZodString;
|
|
2200
|
+
}, z.core.$strip>>;
|
|
2201
|
+
edges: z.ZodArray<z.ZodObject<{
|
|
2202
|
+
id: z.ZodString;
|
|
2203
|
+
graphId: z.ZodString;
|
|
2204
|
+
sourceId: z.ZodString;
|
|
2205
|
+
targetId: z.ZodString;
|
|
2206
|
+
edgeType: z.ZodString;
|
|
2207
|
+
label: z.ZodOptional<z.ZodString>;
|
|
2208
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2209
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
2210
|
+
createdAt: z.ZodString;
|
|
2211
|
+
updatedAt: z.ZodString;
|
|
2212
|
+
}, z.core.$strip>>;
|
|
2213
|
+
}, z.core.$strip>;
|
|
2214
|
+
/**
|
|
2215
|
+
* 祖先查询响应类型
|
|
2216
|
+
*/
|
|
2217
|
+
type GetAncestorsResponse = z.infer<typeof GetAncestorsResponseSchema>;
|
|
2218
|
+
/**
|
|
2219
|
+
* 祖先查询入参
|
|
2220
|
+
*/
|
|
2221
|
+
type GetAncestorsArgs = {
|
|
2222
|
+
readonly params: z.infer<typeof GraphScopedIdParamsSchema>;
|
|
2223
|
+
readonly query?: z.infer<typeof GraphQueryParamsWireSchema>;
|
|
2224
|
+
};
|
|
2225
|
+
/**
|
|
2226
|
+
* 后代查询路由
|
|
2227
|
+
*/
|
|
2228
|
+
declare const GetDescendantsRoute: {
|
|
2229
|
+
readonly method: 'GET';
|
|
2230
|
+
readonly path: '/api/graphs/:graphId/nodes/:id/descendants';
|
|
2231
|
+
readonly paramNames: readonly ['graphId', 'id'];
|
|
2232
|
+
};
|
|
2233
|
+
/**
|
|
2234
|
+
* 后代查询响应
|
|
2235
|
+
*/
|
|
2236
|
+
declare const GetDescendantsResponseSchema: z.ZodObject<{
|
|
2237
|
+
nodes: z.ZodArray<z.ZodObject<{
|
|
2238
|
+
id: z.ZodString;
|
|
2239
|
+
graphId: z.ZodString;
|
|
2240
|
+
label: z.ZodString;
|
|
2241
|
+
nodeType: z.ZodString;
|
|
2242
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2243
|
+
createdAt: z.ZodString;
|
|
2244
|
+
updatedAt: z.ZodString;
|
|
2245
|
+
}, z.core.$strip>>;
|
|
2246
|
+
edges: z.ZodArray<z.ZodObject<{
|
|
2247
|
+
id: z.ZodString;
|
|
2248
|
+
graphId: z.ZodString;
|
|
2249
|
+
sourceId: z.ZodString;
|
|
2250
|
+
targetId: z.ZodString;
|
|
2251
|
+
edgeType: z.ZodString;
|
|
2252
|
+
label: z.ZodOptional<z.ZodString>;
|
|
2253
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2254
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
2255
|
+
createdAt: z.ZodString;
|
|
2256
|
+
updatedAt: z.ZodString;
|
|
2257
|
+
}, z.core.$strip>>;
|
|
2258
|
+
}, z.core.$strip>;
|
|
2259
|
+
/**
|
|
2260
|
+
* 后代查询响应类型
|
|
2261
|
+
*/
|
|
2262
|
+
type GetDescendantsResponse = z.infer<typeof GetDescendantsResponseSchema>;
|
|
2263
|
+
/**
|
|
2264
|
+
* 后代查询入参
|
|
2265
|
+
*/
|
|
2266
|
+
type GetDescendantsArgs = {
|
|
2267
|
+
readonly params: z.infer<typeof GraphScopedIdParamsSchema>;
|
|
2268
|
+
readonly query?: z.infer<typeof GraphQueryParamsWireSchema>;
|
|
2269
|
+
};
|
|
2270
|
+
/**
|
|
2271
|
+
* 子图查询路由
|
|
2272
|
+
*/
|
|
2273
|
+
declare const GetSubgraphRoute: {
|
|
2274
|
+
readonly method: 'POST';
|
|
2275
|
+
readonly path: '/api/graphs/:graphId/subgraph';
|
|
2276
|
+
readonly paramNames: readonly ['graphId'];
|
|
2277
|
+
};
|
|
2278
|
+
/**
|
|
2279
|
+
* 子图查询请求体
|
|
2280
|
+
*/
|
|
2281
|
+
declare const GetSubgraphBodySchema: z.ZodObject<{
|
|
2282
|
+
nodeIds: z.ZodArray<z.ZodString>;
|
|
2283
|
+
}, z.core.$strip>;
|
|
2284
|
+
/**
|
|
2285
|
+
* 子图查询请求体类型
|
|
2286
|
+
*/
|
|
2287
|
+
type GetSubgraphBody = z.infer<typeof GetSubgraphBodySchema>;
|
|
2288
|
+
/**
|
|
2289
|
+
* 子图查询响应
|
|
2290
|
+
*/
|
|
2291
|
+
declare const GetSubgraphResponseSchema: z.ZodObject<{
|
|
2292
|
+
nodes: z.ZodArray<z.ZodObject<{
|
|
2293
|
+
id: z.ZodString;
|
|
2294
|
+
graphId: z.ZodString;
|
|
2295
|
+
label: z.ZodString;
|
|
2296
|
+
nodeType: z.ZodString;
|
|
2297
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2298
|
+
createdAt: z.ZodString;
|
|
2299
|
+
updatedAt: z.ZodString;
|
|
2300
|
+
}, z.core.$strip>>;
|
|
2301
|
+
edges: z.ZodArray<z.ZodObject<{
|
|
2302
|
+
id: z.ZodString;
|
|
2303
|
+
graphId: z.ZodString;
|
|
2304
|
+
sourceId: z.ZodString;
|
|
2305
|
+
targetId: z.ZodString;
|
|
2306
|
+
edgeType: z.ZodString;
|
|
2307
|
+
label: z.ZodOptional<z.ZodString>;
|
|
2308
|
+
properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2309
|
+
weight: z.ZodOptional<z.ZodNumber>;
|
|
2310
|
+
createdAt: z.ZodString;
|
|
2311
|
+
updatedAt: z.ZodString;
|
|
2312
|
+
}, z.core.$strip>>;
|
|
2313
|
+
}, z.core.$strip>;
|
|
2314
|
+
/**
|
|
2315
|
+
* 子图查询响应类型
|
|
2316
|
+
*/
|
|
2317
|
+
type GetSubgraphResponse = z.infer<typeof GetSubgraphResponseSchema>;
|
|
2318
|
+
/**
|
|
2319
|
+
* 子图查询入参
|
|
2320
|
+
*/
|
|
2321
|
+
type GetSubgraphArgs = {
|
|
2322
|
+
readonly params: z.infer<typeof GraphScopedParamsSchema>;
|
|
2323
|
+
readonly body: GetSubgraphBody;
|
|
2324
|
+
};
|
|
2325
|
+
/**
|
|
2326
|
+
* 拓扑序查询路由
|
|
2327
|
+
*/
|
|
2328
|
+
declare const GetTopologicalOrderRoute: {
|
|
2329
|
+
readonly method: 'GET';
|
|
2330
|
+
readonly path: '/api/graphs/:graphId/topological-order';
|
|
2331
|
+
readonly paramNames: readonly ['graphId'];
|
|
2332
|
+
};
|
|
2333
|
+
/**
|
|
2334
|
+
* 拓扑序查询串
|
|
2335
|
+
*/
|
|
2336
|
+
declare const GetTopologicalOrderQuerySchema: z.ZodObject<{
|
|
2337
|
+
edgeTypes: z.ZodOptional<z.ZodString>;
|
|
2338
|
+
}, z.core.$strip>;
|
|
2339
|
+
/**
|
|
2340
|
+
* 拓扑序响应
|
|
2341
|
+
*/
|
|
2342
|
+
declare const GetTopologicalOrderResponseSchema: z.ZodArray<z.ZodString>;
|
|
2343
|
+
/**
|
|
2344
|
+
* 拓扑序响应类型
|
|
2345
|
+
*/
|
|
2346
|
+
type GetTopologicalOrderResponse = z.infer<typeof GetTopologicalOrderResponseSchema>;
|
|
2347
|
+
/**
|
|
2348
|
+
* 拓扑序入参
|
|
2349
|
+
*/
|
|
2350
|
+
type GetTopologicalOrderArgs = {
|
|
2351
|
+
readonly params: z.infer<typeof GraphScopedParamsSchema>;
|
|
2352
|
+
readonly query?: z.infer<typeof GetTopologicalOrderQuerySchema>;
|
|
2353
|
+
};
|
|
2354
|
+
/**
|
|
2355
|
+
* 传递约简路由
|
|
2356
|
+
*/
|
|
2357
|
+
declare const GetTransitiveReductionRoute: {
|
|
2358
|
+
readonly method: 'POST';
|
|
2359
|
+
readonly path: '/api/graphs/:graphId/transitive-reduction';
|
|
2360
|
+
readonly paramNames: readonly ['graphId'];
|
|
2361
|
+
};
|
|
2362
|
+
/**
|
|
2363
|
+
* 传递约简请求体
|
|
2364
|
+
*/
|
|
2365
|
+
declare const GetTransitiveReductionBodySchema: z.ZodObject<{
|
|
2366
|
+
nodeIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2367
|
+
}, z.core.$strip>;
|
|
2368
|
+
/**
|
|
2369
|
+
* 传递约简请求体类型
|
|
2370
|
+
*/
|
|
2371
|
+
type GetTransitiveReductionBody = z.infer<typeof GetTransitiveReductionBodySchema>;
|
|
2372
|
+
/**
|
|
2373
|
+
* 传递约简响应
|
|
2374
|
+
*/
|
|
2375
|
+
declare const GetTransitiveReductionResponseSchema: z.ZodArray<z.ZodString>;
|
|
2376
|
+
/**
|
|
2377
|
+
* 传递约简响应类型
|
|
2378
|
+
*/
|
|
2379
|
+
type GetTransitiveReductionResponse = z.infer<typeof GetTransitiveReductionResponseSchema>;
|
|
2380
|
+
/**
|
|
2381
|
+
* 传递约简入参
|
|
2382
|
+
*/
|
|
2383
|
+
type GetTransitiveReductionArgs = {
|
|
2384
|
+
readonly params: z.infer<typeof GraphScopedParamsSchema>;
|
|
2385
|
+
readonly body?: GetTransitiveReductionBody;
|
|
2386
|
+
};
|
|
2387
|
+
/**
|
|
2388
|
+
* 分组折叠路由
|
|
2389
|
+
*/
|
|
2390
|
+
declare const GetGroupFoldRoute: {
|
|
2391
|
+
readonly method: 'GET';
|
|
2392
|
+
readonly path: '/api/graphs/:graphId/group-fold/:axisKey';
|
|
2393
|
+
readonly paramNames: readonly ['graphId', 'axisKey'];
|
|
2394
|
+
};
|
|
2395
|
+
/**
|
|
2396
|
+
* 分组折叠路径参数
|
|
2397
|
+
*/
|
|
2398
|
+
declare const GroupAxisParamsSchema: z.ZodObject<{
|
|
2399
|
+
graphId: z.ZodString;
|
|
2400
|
+
axisKey: z.ZodString;
|
|
2401
|
+
}, z.core.$strip>;
|
|
2402
|
+
/**
|
|
2403
|
+
* 分组折叠查询串
|
|
2404
|
+
*/
|
|
2405
|
+
declare const GetGroupFoldQuerySchema: z.ZodObject<{
|
|
2406
|
+
nodeIds: z.ZodOptional<z.ZodString>;
|
|
2407
|
+
}, z.core.$strip>;
|
|
2408
|
+
/**
|
|
2409
|
+
* 分组折叠响应
|
|
2410
|
+
*/
|
|
2411
|
+
declare const GetGroupFoldResponseSchema: z.ZodObject<{
|
|
2412
|
+
axis: z.ZodObject<{
|
|
2413
|
+
key: z.ZodString;
|
|
2414
|
+
label: z.ZodString;
|
|
2415
|
+
property: z.ZodString;
|
|
2416
|
+
order: z.ZodEnum<{
|
|
2417
|
+
asc: "asc";
|
|
2418
|
+
desc: "desc";
|
|
2419
|
+
}>;
|
|
2420
|
+
}, z.core.$strip>;
|
|
2421
|
+
groups: z.ZodArray<z.ZodObject<{
|
|
2422
|
+
value: z.ZodString;
|
|
2423
|
+
nodeIds: z.ZodArray<z.ZodString>;
|
|
2424
|
+
}, z.core.$strip>>;
|
|
2425
|
+
}, z.core.$strip>;
|
|
2426
|
+
/**
|
|
2427
|
+
* 分组折叠响应类型
|
|
2428
|
+
*/
|
|
2429
|
+
type GetGroupFoldResponse = z.infer<typeof GetGroupFoldResponseSchema>;
|
|
2430
|
+
/**
|
|
2431
|
+
* 分组折叠入参
|
|
2432
|
+
*/
|
|
2433
|
+
type GetGroupFoldArgs = {
|
|
2434
|
+
readonly params: z.infer<typeof GroupAxisParamsSchema>;
|
|
2435
|
+
readonly query?: z.infer<typeof GetGroupFoldQuerySchema>;
|
|
2436
|
+
};
|
|
2437
|
+
/**
|
|
2438
|
+
* 学习路径路由
|
|
2439
|
+
*/
|
|
2440
|
+
declare const GetLearningPathRoute: {
|
|
2441
|
+
readonly method: 'POST';
|
|
2442
|
+
readonly path: '/api/graphs/:graphId/learning-path';
|
|
2443
|
+
readonly paramNames: readonly ['graphId'];
|
|
2444
|
+
};
|
|
2445
|
+
/**
|
|
2446
|
+
* 学习路径请求体
|
|
2447
|
+
*/
|
|
2448
|
+
declare const GetLearningPathBodySchema: z.ZodObject<{
|
|
2449
|
+
seeds: z.ZodArray<z.ZodString>;
|
|
2450
|
+
orderAxisKey: z.ZodString;
|
|
2451
|
+
edgeTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2452
|
+
}, z.core.$strip>;
|
|
2453
|
+
/**
|
|
2454
|
+
* 学习路径请求体类型
|
|
2455
|
+
*/
|
|
2456
|
+
type GetLearningPathBody = z.infer<typeof GetLearningPathBodySchema>;
|
|
2457
|
+
/**
|
|
2458
|
+
* 学习路径响应
|
|
2459
|
+
*/
|
|
2460
|
+
declare const GetLearningPathResponseSchema: z.ZodArray<z.ZodString>;
|
|
2461
|
+
/**
|
|
2462
|
+
* 学习路径响应类型
|
|
2463
|
+
*/
|
|
2464
|
+
type GetLearningPathResponse = z.infer<typeof GetLearningPathResponseSchema>;
|
|
2465
|
+
/**
|
|
2466
|
+
* 学习路径入参
|
|
2467
|
+
*/
|
|
2468
|
+
type GetLearningPathArgs = {
|
|
2469
|
+
readonly params: z.infer<typeof GraphScopedParamsSchema>;
|
|
2470
|
+
readonly body: GetLearningPathBody;
|
|
2471
|
+
};
|
|
2472
|
+
//#endregion
|
|
2473
|
+
//#region src/domains/graph-query/graph-query.client.d.ts
|
|
2474
|
+
/**
|
|
2475
|
+
* graph-query 域端点工厂,注入传输实现后取得全部端点函数
|
|
2476
|
+
*
|
|
2477
|
+
* @param transport - 传输实现,由产品仓注入
|
|
2478
|
+
* @returns 全部端点函数集合
|
|
2479
|
+
*/
|
|
2480
|
+
declare function createGraphQueryEndpoints(transport: ApiTransport): {
|
|
2481
|
+
/**
|
|
2482
|
+
* 获取节点邻居
|
|
2483
|
+
*/
|
|
2484
|
+
getNeighbors: (args: GetNeighborsArgs) => Promise<{
|
|
2485
|
+
nodeId: string;
|
|
2486
|
+
neighbors: {
|
|
2487
|
+
id: string;
|
|
2488
|
+
graphId: string;
|
|
2489
|
+
label: string;
|
|
2490
|
+
nodeType: string;
|
|
2491
|
+
properties?: Record<string, unknown> | undefined;
|
|
2492
|
+
createdAt: string;
|
|
2493
|
+
updatedAt: string;
|
|
2494
|
+
}[];
|
|
2495
|
+
}>;
|
|
2496
|
+
/**
|
|
2497
|
+
* 图遍历
|
|
2498
|
+
*/
|
|
2499
|
+
traverseGraph: (args: TraverseGraphArgs) => Promise<{
|
|
2500
|
+
startNodeId: string;
|
|
2501
|
+
nodes: {
|
|
2502
|
+
id: string;
|
|
2503
|
+
graphId: string;
|
|
2504
|
+
label: string;
|
|
2505
|
+
nodeType: string;
|
|
2506
|
+
properties?: Record<string, unknown> | undefined;
|
|
2507
|
+
createdAt: string;
|
|
2508
|
+
updatedAt: string;
|
|
2509
|
+
}[];
|
|
2510
|
+
depth: number;
|
|
2511
|
+
}>;
|
|
2512
|
+
/**
|
|
2513
|
+
* 祖先切片端点
|
|
2514
|
+
*/
|
|
2515
|
+
getAncestors: (args: GetAncestorsArgs) => Promise<{
|
|
2516
|
+
nodes: {
|
|
2517
|
+
id: string;
|
|
2518
|
+
graphId: string;
|
|
2519
|
+
label: string;
|
|
2520
|
+
nodeType: string;
|
|
2521
|
+
properties?: Record<string, unknown> | undefined;
|
|
2522
|
+
createdAt: string;
|
|
2523
|
+
updatedAt: string;
|
|
2524
|
+
}[];
|
|
2525
|
+
edges: {
|
|
2526
|
+
id: string;
|
|
2527
|
+
graphId: string;
|
|
2528
|
+
sourceId: string;
|
|
2529
|
+
targetId: string;
|
|
2530
|
+
edgeType: string;
|
|
2531
|
+
label?: string | undefined;
|
|
2532
|
+
properties?: Record<string, unknown> | undefined;
|
|
2533
|
+
weight?: number | undefined;
|
|
2534
|
+
createdAt: string;
|
|
2535
|
+
updatedAt: string;
|
|
2536
|
+
}[];
|
|
2537
|
+
}>;
|
|
2538
|
+
/**
|
|
2539
|
+
* getDescendants 端点
|
|
2540
|
+
*/
|
|
2541
|
+
getDescendants: (args: GetDescendantsArgs) => Promise<{
|
|
2542
|
+
nodes: {
|
|
2543
|
+
id: string;
|
|
2544
|
+
graphId: string;
|
|
2545
|
+
label: string;
|
|
2546
|
+
nodeType: string;
|
|
2547
|
+
properties?: Record<string, unknown> | undefined;
|
|
2548
|
+
createdAt: string;
|
|
2549
|
+
updatedAt: string;
|
|
2550
|
+
}[];
|
|
2551
|
+
edges: {
|
|
2552
|
+
id: string;
|
|
2553
|
+
graphId: string;
|
|
2554
|
+
sourceId: string;
|
|
2555
|
+
targetId: string;
|
|
2556
|
+
edgeType: string;
|
|
2557
|
+
label?: string | undefined;
|
|
2558
|
+
properties?: Record<string, unknown> | undefined;
|
|
2559
|
+
weight?: number | undefined;
|
|
2560
|
+
createdAt: string;
|
|
2561
|
+
updatedAt: string;
|
|
2562
|
+
}[];
|
|
2563
|
+
}>;
|
|
2564
|
+
/**
|
|
2565
|
+
* getSubgraph 端点
|
|
2566
|
+
*/
|
|
2567
|
+
getSubgraph: (args: GetSubgraphArgs) => Promise<{
|
|
2568
|
+
nodes: {
|
|
2569
|
+
id: string;
|
|
2570
|
+
graphId: string;
|
|
2571
|
+
label: string;
|
|
2572
|
+
nodeType: string;
|
|
2573
|
+
properties?: Record<string, unknown> | undefined;
|
|
2574
|
+
createdAt: string;
|
|
2575
|
+
updatedAt: string;
|
|
2576
|
+
}[];
|
|
2577
|
+
edges: {
|
|
2578
|
+
id: string;
|
|
2579
|
+
graphId: string;
|
|
2580
|
+
sourceId: string;
|
|
2581
|
+
targetId: string;
|
|
2582
|
+
edgeType: string;
|
|
2583
|
+
label?: string | undefined;
|
|
2584
|
+
properties?: Record<string, unknown> | undefined;
|
|
2585
|
+
weight?: number | undefined;
|
|
2586
|
+
createdAt: string;
|
|
2587
|
+
updatedAt: string;
|
|
2588
|
+
}[];
|
|
2589
|
+
}>;
|
|
2590
|
+
/**
|
|
2591
|
+
* getTopologicalOrder 端点
|
|
2592
|
+
*/
|
|
2593
|
+
getTopologicalOrder: (args: GetTopologicalOrderArgs) => Promise<string[]>;
|
|
2594
|
+
/**
|
|
2595
|
+
* getTransitiveReduction 端点
|
|
2596
|
+
*/
|
|
2597
|
+
getTransitiveReduction: (args: GetTransitiveReductionArgs) => Promise<string[]>;
|
|
2598
|
+
/**
|
|
2599
|
+
* getGroupFold 端点
|
|
2600
|
+
*/
|
|
2601
|
+
getGroupFold: (args: GetGroupFoldArgs) => Promise<{
|
|
2602
|
+
axis: {
|
|
2603
|
+
key: string;
|
|
2604
|
+
label: string;
|
|
2605
|
+
property: string;
|
|
2606
|
+
order: "asc" | "desc";
|
|
2607
|
+
};
|
|
2608
|
+
groups: {
|
|
2609
|
+
value: string;
|
|
2610
|
+
nodeIds: string[];
|
|
2611
|
+
}[];
|
|
2612
|
+
}>;
|
|
2613
|
+
/**
|
|
2614
|
+
* getLearningPath 端点
|
|
2615
|
+
*/
|
|
2616
|
+
getLearningPath: (args: GetLearningPathArgs) => Promise<string[]>;
|
|
2617
|
+
};
|
|
2618
|
+
//#endregion
|
|
2619
|
+
//#region src/domains/layer/layer.dto.d.ts
|
|
2620
|
+
/**
|
|
2621
|
+
* 域公共枚举定义:LayerType
|
|
2622
|
+
*/
|
|
2623
|
+
declare const LayerTypeSchema: z.ZodEnum<{
|
|
2624
|
+
custom: "custom";
|
|
2625
|
+
organization: "organization";
|
|
2626
|
+
person: "person";
|
|
2627
|
+
society: "society";
|
|
2628
|
+
}>;
|
|
2629
|
+
/**
|
|
2630
|
+
* LayerType 的推断类型
|
|
2631
|
+
*/
|
|
2632
|
+
type LayerType = z.infer<typeof LayerTypeSchema>;
|
|
2633
|
+
/**
|
|
2634
|
+
* 域公共枚举常量:LayerType
|
|
2635
|
+
*/
|
|
2636
|
+
declare const LayerType: {
|
|
2637
|
+
readonly person: 'person';
|
|
2638
|
+
readonly organization: 'organization';
|
|
2639
|
+
readonly society: 'society';
|
|
2640
|
+
readonly custom: 'custom';
|
|
2641
|
+
};
|
|
2642
|
+
/**
|
|
2643
|
+
* 域公共数据契约:Layer
|
|
2644
|
+
*
|
|
2645
|
+
* 图层元数据为任意键值面,生成器封闭集不支持,按领域现实保留
|
|
2646
|
+
*/
|
|
2647
|
+
declare const LayerSchema: z.ZodObject<{
|
|
2648
|
+
id: z.ZodString;
|
|
2649
|
+
graphId: z.ZodString;
|
|
2650
|
+
name: z.ZodString;
|
|
2651
|
+
layerType: z.ZodEnum<{
|
|
2652
|
+
custom: "custom";
|
|
2653
|
+
organization: "organization";
|
|
2654
|
+
person: "person";
|
|
2655
|
+
society: "society";
|
|
2656
|
+
}>;
|
|
2657
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2658
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2659
|
+
tenantId: z.ZodOptional<z.ZodString>;
|
|
2660
|
+
createdAt: z.ZodString;
|
|
2661
|
+
updatedAt: z.ZodString;
|
|
2662
|
+
}, z.core.$strip>;
|
|
2663
|
+
/**
|
|
2664
|
+
* Layer 的推断类型
|
|
2665
|
+
*/
|
|
2666
|
+
type Layer = z.infer<typeof LayerSchema>;
|
|
2667
|
+
/**
|
|
2668
|
+
* 域公共数据契约:LayerListData
|
|
2669
|
+
*
|
|
2670
|
+
* 图层列表四键分页面
|
|
2671
|
+
*/
|
|
2672
|
+
declare const LayerListDataSchema: z.ZodObject<{
|
|
2673
|
+
items: z.ZodArray<z.ZodObject<{
|
|
2674
|
+
id: z.ZodString;
|
|
2675
|
+
graphId: z.ZodString;
|
|
2676
|
+
name: z.ZodString;
|
|
2677
|
+
layerType: z.ZodEnum<{
|
|
2678
|
+
custom: "custom";
|
|
2679
|
+
organization: "organization";
|
|
2680
|
+
person: "person";
|
|
2681
|
+
society: "society";
|
|
2682
|
+
}>;
|
|
2683
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2684
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2685
|
+
tenantId: z.ZodOptional<z.ZodString>;
|
|
2686
|
+
createdAt: z.ZodString;
|
|
2687
|
+
updatedAt: z.ZodString;
|
|
2688
|
+
}, z.core.$strip>>;
|
|
2689
|
+
total: z.ZodInt;
|
|
2690
|
+
page: z.ZodInt;
|
|
2691
|
+
pageSize: z.ZodInt;
|
|
2692
|
+
}, z.core.$strip>;
|
|
2693
|
+
/**
|
|
2694
|
+
* LayerListData 的推断类型
|
|
2695
|
+
*/
|
|
2696
|
+
type LayerListData = z.infer<typeof LayerListDataSchema>;
|
|
2697
|
+
//#endregion
|
|
2698
|
+
//#region src/domains/layer/layer.schema.d.ts
|
|
2699
|
+
/**
|
|
2700
|
+
* 图层标识路径参数契约,图层单资源路由共用
|
|
2701
|
+
*/
|
|
2702
|
+
declare const LayerIdParamsSchema: z.ZodObject<{
|
|
2703
|
+
id: z.ZodString;
|
|
2704
|
+
}, z.core.$strip>;
|
|
2705
|
+
/**
|
|
2706
|
+
* 路由常量:POST /api/layers
|
|
2707
|
+
*/
|
|
2708
|
+
declare const CreateLayerRoute: {
|
|
2709
|
+
readonly method: 'POST';
|
|
2710
|
+
readonly path: '/api/layers';
|
|
2711
|
+
readonly paramNames: readonly [];
|
|
2712
|
+
};
|
|
2713
|
+
/**
|
|
2714
|
+
* 请求 schema:请求体,POST /api/layers
|
|
2715
|
+
*/
|
|
2716
|
+
declare const CreateLayerBodySchema: z.ZodObject<{
|
|
2717
|
+
graphId: z.ZodString;
|
|
2718
|
+
name: z.ZodString;
|
|
2719
|
+
layerType: z.ZodEnum<{
|
|
2720
|
+
custom: "custom";
|
|
2721
|
+
organization: "organization";
|
|
2722
|
+
person: "person";
|
|
2723
|
+
society: "society";
|
|
2724
|
+
}>;
|
|
2725
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2726
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2727
|
+
tenantId: z.ZodOptional<z.ZodString>;
|
|
2728
|
+
}, z.core.$strip>;
|
|
2729
|
+
/**
|
|
2730
|
+
* CreateLayerBody 的推断类型
|
|
2731
|
+
*/
|
|
2732
|
+
type CreateLayerBody = z.infer<typeof CreateLayerBodySchema>;
|
|
2733
|
+
/**
|
|
2734
|
+
* 响应 schema,POST /api/layers
|
|
2735
|
+
*/
|
|
2736
|
+
declare const CreateLayerResponseSchema: z.ZodObject<{
|
|
2737
|
+
id: z.ZodString;
|
|
2738
|
+
graphId: z.ZodString;
|
|
2739
|
+
name: z.ZodString;
|
|
2740
|
+
layerType: z.ZodEnum<{
|
|
2741
|
+
custom: "custom";
|
|
2742
|
+
organization: "organization";
|
|
2743
|
+
person: "person";
|
|
2744
|
+
society: "society";
|
|
2745
|
+
}>;
|
|
2746
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2747
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2748
|
+
tenantId: z.ZodOptional<z.ZodString>;
|
|
2749
|
+
createdAt: z.ZodString;
|
|
2750
|
+
updatedAt: z.ZodString;
|
|
2751
|
+
}, z.core.$strip>;
|
|
2752
|
+
/**
|
|
2753
|
+
* CreateLayerResponse 的推断类型
|
|
2754
|
+
*/
|
|
2755
|
+
type CreateLayerResponse = z.infer<typeof CreateLayerResponseSchema>;
|
|
2756
|
+
/**
|
|
2757
|
+
* 端点参数契约:创建图层
|
|
2758
|
+
*/
|
|
2759
|
+
type CreateLayerArgs = {
|
|
2760
|
+
/**
|
|
2761
|
+
* 请求体
|
|
2762
|
+
*/
|
|
2763
|
+
readonly body?: CreateLayerBody;
|
|
2764
|
+
};
|
|
2765
|
+
/**
|
|
2766
|
+
* 路由常量:GET /api/layers/:id
|
|
2767
|
+
*/
|
|
2768
|
+
declare const GetLayerRoute: {
|
|
2769
|
+
readonly method: 'GET';
|
|
2770
|
+
readonly path: '/api/layers/:id';
|
|
2771
|
+
readonly paramNames: readonly ['id'];
|
|
2772
|
+
};
|
|
2773
|
+
/**
|
|
2774
|
+
* 响应 schema,GET /api/layers/:id
|
|
2775
|
+
*
|
|
2776
|
+
* 端口详情查询可空,图层不存在时返回 null
|
|
2777
|
+
*/
|
|
2778
|
+
declare const GetLayerResponseSchema: z.ZodNullable<z.ZodObject<{
|
|
2779
|
+
id: z.ZodString;
|
|
2780
|
+
graphId: z.ZodString;
|
|
2781
|
+
name: z.ZodString;
|
|
2782
|
+
layerType: z.ZodEnum<{
|
|
2783
|
+
custom: "custom";
|
|
2784
|
+
organization: "organization";
|
|
2785
|
+
person: "person";
|
|
2786
|
+
society: "society";
|
|
2787
|
+
}>;
|
|
2788
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2789
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2790
|
+
tenantId: z.ZodOptional<z.ZodString>;
|
|
2791
|
+
createdAt: z.ZodString;
|
|
2792
|
+
updatedAt: z.ZodString;
|
|
2793
|
+
}, z.core.$strip>>;
|
|
2794
|
+
/**
|
|
2795
|
+
* GetLayerResponse 的推断类型
|
|
2796
|
+
*/
|
|
2797
|
+
type GetLayerResponse = z.infer<typeof GetLayerResponseSchema>;
|
|
2798
|
+
/**
|
|
2799
|
+
* 端点参数契约:获取单个图层
|
|
2800
|
+
*/
|
|
2801
|
+
type GetLayerArgs = {
|
|
2802
|
+
/**
|
|
2803
|
+
* 路径参数
|
|
2804
|
+
*/
|
|
2805
|
+
readonly params: z.infer<typeof LayerIdParamsSchema>;
|
|
2806
|
+
};
|
|
2807
|
+
/**
|
|
2808
|
+
* 路由常量:GET /api/layers
|
|
2809
|
+
*/
|
|
2810
|
+
declare const ListLayersRoute: {
|
|
2811
|
+
readonly method: 'GET';
|
|
2812
|
+
readonly path: '/api/layers';
|
|
2813
|
+
readonly paramNames: readonly [];
|
|
2814
|
+
};
|
|
2815
|
+
/**
|
|
2816
|
+
* 请求 schema:查询参数,GET /api/layers
|
|
2817
|
+
*/
|
|
2818
|
+
declare const ListLayersQuerySchema: z.ZodObject<{
|
|
2819
|
+
graphId: z.ZodOptional<z.ZodString>;
|
|
2820
|
+
layerType: z.ZodOptional<z.ZodEnum<{
|
|
2821
|
+
custom: "custom";
|
|
2822
|
+
organization: "organization";
|
|
2823
|
+
person: "person";
|
|
2824
|
+
society: "society";
|
|
2825
|
+
}>>;
|
|
2826
|
+
tenantId: z.ZodOptional<z.ZodString>;
|
|
2827
|
+
page: z.ZodOptional<z.ZodInt>;
|
|
2828
|
+
pageSize: z.ZodOptional<z.ZodInt>;
|
|
2829
|
+
}, z.core.$strip>;
|
|
2830
|
+
/**
|
|
2831
|
+
* ListLayersQuery 的推断类型
|
|
2832
|
+
*/
|
|
2833
|
+
type ListLayersQuery = z.infer<typeof ListLayersQuerySchema>;
|
|
2834
|
+
/**
|
|
2835
|
+
* 响应 schema,GET /api/layers
|
|
2836
|
+
*/
|
|
2837
|
+
declare const ListLayersResponseSchema: z.ZodObject<{
|
|
2838
|
+
items: z.ZodArray<z.ZodObject<{
|
|
2839
|
+
id: z.ZodString;
|
|
2840
|
+
graphId: z.ZodString;
|
|
2841
|
+
name: z.ZodString;
|
|
2842
|
+
layerType: z.ZodEnum<{
|
|
2843
|
+
custom: "custom";
|
|
2844
|
+
organization: "organization";
|
|
2845
|
+
person: "person";
|
|
2846
|
+
society: "society";
|
|
2847
|
+
}>;
|
|
2848
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2849
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2850
|
+
tenantId: z.ZodOptional<z.ZodString>;
|
|
2851
|
+
createdAt: z.ZodString;
|
|
2852
|
+
updatedAt: z.ZodString;
|
|
2853
|
+
}, z.core.$strip>>;
|
|
2854
|
+
total: z.ZodInt;
|
|
2855
|
+
page: z.ZodInt;
|
|
2856
|
+
pageSize: z.ZodInt;
|
|
2857
|
+
}, z.core.$strip>;
|
|
2858
|
+
/**
|
|
2859
|
+
* ListLayersResponse 的推断类型
|
|
2860
|
+
*/
|
|
2861
|
+
type ListLayersResponse = z.infer<typeof ListLayersResponseSchema>;
|
|
2862
|
+
/**
|
|
2863
|
+
* 端点参数契约:获取图层列表
|
|
2864
|
+
*/
|
|
2865
|
+
type ListLayersArgs = {
|
|
2866
|
+
/**
|
|
2867
|
+
* 查询参数
|
|
2868
|
+
*/
|
|
2869
|
+
readonly query?: ListLayersQuery;
|
|
2870
|
+
};
|
|
2871
|
+
/**
|
|
2872
|
+
* 路由常量:PATCH /api/layers/:id
|
|
2873
|
+
*/
|
|
2874
|
+
declare const UpdateLayerRoute: {
|
|
2875
|
+
readonly method: 'PATCH';
|
|
2876
|
+
readonly path: '/api/layers/:id';
|
|
2877
|
+
readonly paramNames: readonly ['id'];
|
|
2878
|
+
};
|
|
2879
|
+
/**
|
|
2880
|
+
* 请求 schema:请求体,PATCH /api/layers/:id
|
|
2881
|
+
*/
|
|
2882
|
+
declare const UpdateLayerBodySchema: z.ZodObject<{
|
|
2883
|
+
name: z.ZodOptional<z.ZodString>;
|
|
2884
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2885
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2886
|
+
}, z.core.$strip>;
|
|
2887
|
+
/**
|
|
2888
|
+
* UpdateLayerBody 的推断类型
|
|
2889
|
+
*/
|
|
2890
|
+
type UpdateLayerBody = z.infer<typeof UpdateLayerBodySchema>;
|
|
2891
|
+
/**
|
|
2892
|
+
* 响应 schema,PATCH /api/layers/:id
|
|
2893
|
+
*/
|
|
2894
|
+
declare const UpdateLayerResponseSchema: z.ZodObject<{
|
|
2895
|
+
id: z.ZodString;
|
|
2896
|
+
graphId: z.ZodString;
|
|
2897
|
+
name: z.ZodString;
|
|
2898
|
+
layerType: z.ZodEnum<{
|
|
2899
|
+
custom: "custom";
|
|
2900
|
+
organization: "organization";
|
|
2901
|
+
person: "person";
|
|
2902
|
+
society: "society";
|
|
2903
|
+
}>;
|
|
2904
|
+
description: z.ZodOptional<z.ZodString>;
|
|
2905
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2906
|
+
tenantId: z.ZodOptional<z.ZodString>;
|
|
2907
|
+
createdAt: z.ZodString;
|
|
2908
|
+
updatedAt: z.ZodString;
|
|
2909
|
+
}, z.core.$strip>;
|
|
2910
|
+
/**
|
|
2911
|
+
* UpdateLayerResponse 的推断类型
|
|
2912
|
+
*/
|
|
2913
|
+
type UpdateLayerResponse = z.infer<typeof UpdateLayerResponseSchema>;
|
|
2914
|
+
/**
|
|
2915
|
+
* 端点参数契约:更新图层
|
|
2916
|
+
*/
|
|
2917
|
+
type UpdateLayerArgs = {
|
|
2918
|
+
/**
|
|
2919
|
+
* 路径参数
|
|
2920
|
+
*/
|
|
2921
|
+
readonly params: z.infer<typeof LayerIdParamsSchema>;
|
|
2922
|
+
/**
|
|
2923
|
+
* 请求体
|
|
2924
|
+
*/
|
|
2925
|
+
readonly body?: UpdateLayerBody;
|
|
2926
|
+
};
|
|
2927
|
+
/**
|
|
2928
|
+
* 路由常量:DELETE /api/layers/:id
|
|
2929
|
+
*/
|
|
2930
|
+
declare const DeleteLayerRoute: {
|
|
2931
|
+
readonly method: 'DELETE';
|
|
2932
|
+
readonly path: '/api/layers/:id';
|
|
2933
|
+
readonly paramNames: readonly ['id'];
|
|
2934
|
+
};
|
|
2935
|
+
/**
|
|
2936
|
+
* 响应 schema,DELETE /api/layers/:id
|
|
2937
|
+
*
|
|
2938
|
+
* 端口删除成功路径返回 void,传输层将空体归一为 null
|
|
2939
|
+
*/
|
|
2940
|
+
declare const DeleteLayerResponseSchema: z.ZodLiteral<null>;
|
|
2941
|
+
/**
|
|
2942
|
+
* DeleteLayerResponse 的推断类型
|
|
2943
|
+
*/
|
|
2944
|
+
type DeleteLayerResponse = z.infer<typeof DeleteLayerResponseSchema>;
|
|
2945
|
+
/**
|
|
2946
|
+
* 端点参数契约:删除图层
|
|
2947
|
+
*/
|
|
2948
|
+
type DeleteLayerArgs = {
|
|
2949
|
+
/**
|
|
2950
|
+
* 路径参数
|
|
2951
|
+
*/
|
|
2952
|
+
readonly params: z.infer<typeof LayerIdParamsSchema>;
|
|
2953
|
+
};
|
|
2954
|
+
//#endregion
|
|
2955
|
+
//#region src/domains/layer/layer.client.d.ts
|
|
2956
|
+
/**
|
|
2957
|
+
* layer 域端点工厂,注入传输实现后取得全部端点函数
|
|
2958
|
+
*
|
|
2959
|
+
* @param transport - 传输实现,由产品仓注入
|
|
2960
|
+
* @returns 全部端点函数集合
|
|
2961
|
+
*/
|
|
2962
|
+
declare function createLayerEndpoints(transport: ApiTransport): {
|
|
2963
|
+
/**
|
|
2964
|
+
* 创建图层
|
|
2965
|
+
*/
|
|
2966
|
+
createLayer: (args: CreateLayerArgs) => Promise<{
|
|
2967
|
+
id: string;
|
|
2968
|
+
graphId: string;
|
|
2969
|
+
name: string;
|
|
2970
|
+
layerType: "custom" | "organization" | "person" | "society";
|
|
2971
|
+
description?: string | undefined;
|
|
2972
|
+
metadata?: Record<string, unknown> | undefined;
|
|
2973
|
+
tenantId?: string | undefined;
|
|
2974
|
+
createdAt: string;
|
|
2975
|
+
updatedAt: string;
|
|
2976
|
+
}>;
|
|
2977
|
+
/**
|
|
2978
|
+
* 获取单个图层
|
|
2979
|
+
*/
|
|
2980
|
+
getLayer: (args: GetLayerArgs) => Promise<{
|
|
2981
|
+
id: string;
|
|
2982
|
+
graphId: string;
|
|
2983
|
+
name: string;
|
|
2984
|
+
layerType: "custom" | "organization" | "person" | "society";
|
|
2985
|
+
description?: string | undefined;
|
|
2986
|
+
metadata?: Record<string, unknown> | undefined;
|
|
2987
|
+
tenantId?: string | undefined;
|
|
2988
|
+
createdAt: string;
|
|
2989
|
+
updatedAt: string;
|
|
2990
|
+
} | null>;
|
|
2991
|
+
/**
|
|
2992
|
+
* 获取图层列表
|
|
2993
|
+
*/
|
|
2994
|
+
listLayers: (args: ListLayersArgs) => Promise<{
|
|
2995
|
+
items: {
|
|
2996
|
+
id: string;
|
|
2997
|
+
graphId: string;
|
|
2998
|
+
name: string;
|
|
2999
|
+
layerType: "custom" | "organization" | "person" | "society";
|
|
3000
|
+
description?: string | undefined;
|
|
3001
|
+
metadata?: Record<string, unknown> | undefined;
|
|
3002
|
+
tenantId?: string | undefined;
|
|
3003
|
+
createdAt: string;
|
|
3004
|
+
updatedAt: string;
|
|
3005
|
+
}[];
|
|
3006
|
+
total: number;
|
|
3007
|
+
page: number;
|
|
3008
|
+
pageSize: number;
|
|
3009
|
+
}>;
|
|
3010
|
+
/**
|
|
3011
|
+
* 更新图层
|
|
3012
|
+
*/
|
|
3013
|
+
updateLayer: (args: UpdateLayerArgs) => Promise<{
|
|
3014
|
+
id: string;
|
|
3015
|
+
graphId: string;
|
|
3016
|
+
name: string;
|
|
3017
|
+
layerType: "custom" | "organization" | "person" | "society";
|
|
3018
|
+
description?: string | undefined;
|
|
3019
|
+
metadata?: Record<string, unknown> | undefined;
|
|
3020
|
+
tenantId?: string | undefined;
|
|
3021
|
+
createdAt: string;
|
|
3022
|
+
updatedAt: string;
|
|
3023
|
+
}>;
|
|
3024
|
+
/**
|
|
3025
|
+
* 删除图层
|
|
3026
|
+
*/
|
|
3027
|
+
deleteLayer: (args: DeleteLayerArgs) => Promise<null>;
|
|
3028
|
+
};
|
|
3029
|
+
//#endregion
|
|
3030
|
+
//#region src/domains/layer-node/layer-node.dto.d.ts
|
|
3031
|
+
/**
|
|
3032
|
+
* 域公共数据契约:LayerNode
|
|
3033
|
+
*
|
|
3034
|
+
* 记录节点与图层的归属关系
|
|
3035
|
+
*/
|
|
3036
|
+
declare const LayerNodeSchema: z.ZodObject<{
|
|
3037
|
+
id: z.ZodString;
|
|
3038
|
+
layerId: z.ZodString;
|
|
3039
|
+
nodeId: z.ZodString;
|
|
3040
|
+
graphId: z.ZodString;
|
|
3041
|
+
createdAt: z.ZodString;
|
|
3042
|
+
}, z.core.$strip>;
|
|
3043
|
+
/**
|
|
3044
|
+
* LayerNode 的推断类型
|
|
3045
|
+
*/
|
|
3046
|
+
type LayerNode = z.infer<typeof LayerNodeSchema>;
|
|
3047
|
+
//#endregion
|
|
3048
|
+
//#region src/domains/layer-node/layer-node.schema.d.ts
|
|
3049
|
+
/**
|
|
3050
|
+
* 图层归属路径参数契约,图层子资源路由共用
|
|
3051
|
+
*/
|
|
3052
|
+
declare const LayerScopedParamsSchema: z.ZodObject<{
|
|
3053
|
+
layerId: z.ZodString;
|
|
3054
|
+
}, z.core.$strip>;
|
|
3055
|
+
/**
|
|
3056
|
+
* 节点出层路径参数契约,携带图层与节点双参数
|
|
3057
|
+
*/
|
|
3058
|
+
declare const LayerNodeParamsSchema: z.ZodObject<{
|
|
3059
|
+
layerId: z.ZodString;
|
|
3060
|
+
nodeId: z.ZodString;
|
|
3061
|
+
}, z.core.$strip>;
|
|
3062
|
+
/**
|
|
3063
|
+
* 路由常量:POST /api/layers/:layerId/nodes
|
|
3064
|
+
*/
|
|
3065
|
+
declare const AddNodeToLayerRoute: {
|
|
3066
|
+
readonly method: 'POST';
|
|
3067
|
+
readonly path: '/api/layers/:layerId/nodes';
|
|
3068
|
+
readonly paramNames: readonly ['layerId'];
|
|
3069
|
+
};
|
|
3070
|
+
/**
|
|
3071
|
+
* 请求 schema:请求体,POST /api/layers/:layerId/nodes
|
|
3072
|
+
*/
|
|
3073
|
+
declare const AddNodeToLayerBodySchema: z.ZodObject<{
|
|
3074
|
+
layerId: z.ZodString;
|
|
3075
|
+
nodeId: z.ZodString;
|
|
3076
|
+
graphId: z.ZodString;
|
|
3077
|
+
}, z.core.$strip>;
|
|
3078
|
+
/**
|
|
3079
|
+
* AddNodeToLayerBody 的推断类型
|
|
3080
|
+
*/
|
|
3081
|
+
type AddNodeToLayerBody = z.infer<typeof AddNodeToLayerBodySchema>;
|
|
3082
|
+
/**
|
|
3083
|
+
* 响应 schema,POST /api/layers/:layerId/nodes
|
|
3084
|
+
*
|
|
3085
|
+
* 端口入层成功返回图层节点归属实体
|
|
3086
|
+
*/
|
|
3087
|
+
declare const AddNodeToLayerResponseSchema: z.ZodObject<{
|
|
3088
|
+
id: z.ZodString;
|
|
3089
|
+
layerId: z.ZodString;
|
|
3090
|
+
nodeId: z.ZodString;
|
|
3091
|
+
graphId: z.ZodString;
|
|
3092
|
+
createdAt: z.ZodString;
|
|
3093
|
+
}, z.core.$strip>;
|
|
3094
|
+
/**
|
|
3095
|
+
* AddNodeToLayerResponse 的推断类型
|
|
3096
|
+
*/
|
|
3097
|
+
type AddNodeToLayerResponse = z.infer<typeof AddNodeToLayerResponseSchema>;
|
|
3098
|
+
/**
|
|
3099
|
+
* 端点参数契约:将节点加入图层
|
|
3100
|
+
*/
|
|
3101
|
+
type AddNodeToLayerArgs = {
|
|
3102
|
+
/**
|
|
3103
|
+
* 路径参数
|
|
3104
|
+
*/
|
|
3105
|
+
readonly params: z.infer<typeof LayerScopedParamsSchema>;
|
|
3106
|
+
/**
|
|
3107
|
+
* 请求体
|
|
3108
|
+
*/
|
|
3109
|
+
readonly body?: AddNodeToLayerBody;
|
|
3110
|
+
};
|
|
3111
|
+
/**
|
|
3112
|
+
* 路由常量:DELETE /api/layers/:layerId/nodes/:nodeId
|
|
3113
|
+
*/
|
|
3114
|
+
declare const RemoveNodeFromLayerRoute: {
|
|
3115
|
+
readonly method: 'DELETE';
|
|
3116
|
+
readonly path: '/api/layers/:layerId/nodes/:nodeId';
|
|
3117
|
+
readonly paramNames: readonly ['layerId', 'nodeId'];
|
|
3118
|
+
};
|
|
3119
|
+
/**
|
|
3120
|
+
* 响应 schema,DELETE /api/layers/:layerId/nodes/:nodeId
|
|
3121
|
+
*
|
|
3122
|
+
* 端口出层成功路径返回 void,传输层将空体归一为 null
|
|
3123
|
+
*/
|
|
3124
|
+
declare const RemoveNodeFromLayerResponseSchema: z.ZodLiteral<null>;
|
|
3125
|
+
/**
|
|
3126
|
+
* RemoveNodeFromLayerResponse 的推断类型
|
|
3127
|
+
*/
|
|
3128
|
+
type RemoveNodeFromLayerResponse = z.infer<typeof RemoveNodeFromLayerResponseSchema>;
|
|
3129
|
+
/**
|
|
3130
|
+
* 端点参数契约:将节点移出图层
|
|
3131
|
+
*/
|
|
3132
|
+
type RemoveNodeFromLayerArgs = {
|
|
3133
|
+
/**
|
|
3134
|
+
* 路径参数
|
|
3135
|
+
*/
|
|
3136
|
+
readonly params: z.infer<typeof LayerNodeParamsSchema>;
|
|
3137
|
+
};
|
|
3138
|
+
/**
|
|
3139
|
+
* 路由常量:GET /api/layers/:layerId/nodes
|
|
3140
|
+
*/
|
|
3141
|
+
declare const GetLayerNodesRoute: {
|
|
3142
|
+
readonly method: 'GET';
|
|
3143
|
+
readonly path: '/api/layers/:layerId/nodes';
|
|
3144
|
+
readonly paramNames: readonly ['layerId'];
|
|
3145
|
+
};
|
|
3146
|
+
/**
|
|
3147
|
+
* 响应 schema,GET /api/layers/:layerId/nodes
|
|
3148
|
+
*
|
|
3149
|
+
* 端口按裸数组返回图层节点归属列表
|
|
3150
|
+
*/
|
|
3151
|
+
declare const GetLayerNodesResponseSchema: z.ZodArray<z.ZodObject<{
|
|
3152
|
+
id: z.ZodString;
|
|
3153
|
+
layerId: z.ZodString;
|
|
3154
|
+
nodeId: z.ZodString;
|
|
3155
|
+
graphId: z.ZodString;
|
|
3156
|
+
createdAt: z.ZodString;
|
|
3157
|
+
}, z.core.$strip>>;
|
|
3158
|
+
/**
|
|
3159
|
+
* GetLayerNodesResponse 的推断类型
|
|
3160
|
+
*/
|
|
3161
|
+
type GetLayerNodesResponse = z.infer<typeof GetLayerNodesResponseSchema>;
|
|
3162
|
+
/**
|
|
3163
|
+
* 端点参数契约:获取图层节点列表
|
|
3164
|
+
*/
|
|
3165
|
+
type GetLayerNodesArgs = {
|
|
3166
|
+
/**
|
|
3167
|
+
* 路径参数
|
|
3168
|
+
*/
|
|
3169
|
+
readonly params: z.infer<typeof LayerScopedParamsSchema>;
|
|
3170
|
+
};
|
|
3171
|
+
//#endregion
|
|
3172
|
+
//#region src/domains/layer-node/layer-node.client.d.ts
|
|
3173
|
+
/**
|
|
3174
|
+
* layer-node 域端点工厂,注入传输实现后取得全部端点函数
|
|
3175
|
+
*
|
|
3176
|
+
* @param transport - 传输实现,由产品仓注入
|
|
3177
|
+
* @returns 全部端点函数集合
|
|
3178
|
+
*/
|
|
3179
|
+
declare function createLayerNodeEndpoints(transport: ApiTransport): {
|
|
3180
|
+
/**
|
|
3181
|
+
* 将节点加入图层
|
|
3182
|
+
*/
|
|
3183
|
+
addNodeToLayer: (args: AddNodeToLayerArgs) => Promise<{
|
|
3184
|
+
id: string;
|
|
3185
|
+
layerId: string;
|
|
3186
|
+
nodeId: string;
|
|
3187
|
+
graphId: string;
|
|
3188
|
+
createdAt: string;
|
|
3189
|
+
}>;
|
|
3190
|
+
/**
|
|
3191
|
+
* 将节点移出图层
|
|
3192
|
+
*/
|
|
3193
|
+
removeNodeFromLayer: (args: RemoveNodeFromLayerArgs) => Promise<null>;
|
|
3194
|
+
/**
|
|
3195
|
+
* 获取图层节点列表
|
|
3196
|
+
*/
|
|
3197
|
+
getLayerNodes: (args: GetLayerNodesArgs) => Promise<{
|
|
3198
|
+
id: string;
|
|
3199
|
+
layerId: string;
|
|
3200
|
+
nodeId: string;
|
|
3201
|
+
graphId: string;
|
|
3202
|
+
createdAt: string;
|
|
3203
|
+
}[]>;
|
|
3204
|
+
};
|
|
3205
|
+
//#endregion
|
|
3206
|
+
//#region src/domains/layer-relation/layer-relation.dto.d.ts
|
|
3207
|
+
/**
|
|
3208
|
+
* 域公共数据契约:LayerRelation
|
|
3209
|
+
*
|
|
3210
|
+
* 连接源图层与目标图层的层间有向关系
|
|
3211
|
+
*/
|
|
3212
|
+
declare const LayerRelationSchema: z.ZodObject<{
|
|
3213
|
+
id: z.ZodString;
|
|
3214
|
+
sourceLayerId: z.ZodString;
|
|
3215
|
+
targetLayerId: z.ZodString;
|
|
3216
|
+
relationType: z.ZodString;
|
|
3217
|
+
description: z.ZodOptional<z.ZodString>;
|
|
3218
|
+
createdAt: z.ZodString;
|
|
3219
|
+
}, z.core.$strip>;
|
|
3220
|
+
/**
|
|
3221
|
+
* LayerRelation 的推断类型
|
|
3222
|
+
*/
|
|
3223
|
+
type LayerRelation = z.infer<typeof LayerRelationSchema>;
|
|
3224
|
+
//#endregion
|
|
3225
|
+
//#region src/domains/layer-relation/layer-relation.schema.d.ts
|
|
3226
|
+
/**
|
|
3227
|
+
* 层间关系标识路径参数契约
|
|
3228
|
+
*/
|
|
3229
|
+
declare const LayerRelationIdParamsSchema: z.ZodObject<{
|
|
3230
|
+
relationId: z.ZodString;
|
|
3231
|
+
}, z.core.$strip>;
|
|
3232
|
+
/**
|
|
3233
|
+
* 路由常量:POST /api/layers/relations
|
|
3234
|
+
*/
|
|
3235
|
+
declare const LinkLayersRoute: {
|
|
3236
|
+
readonly method: 'POST';
|
|
3237
|
+
readonly path: '/api/layers/relations';
|
|
3238
|
+
readonly paramNames: readonly [];
|
|
3239
|
+
};
|
|
3240
|
+
/**
|
|
3241
|
+
* 请求 schema:请求体,POST /api/layers/relations
|
|
3242
|
+
*/
|
|
3243
|
+
declare const LinkLayersBodySchema: z.ZodObject<{
|
|
3244
|
+
sourceLayerId: z.ZodString;
|
|
3245
|
+
targetLayerId: z.ZodString;
|
|
3246
|
+
relationType: z.ZodString;
|
|
3247
|
+
description: z.ZodOptional<z.ZodString>;
|
|
3248
|
+
}, z.core.$strip>;
|
|
3249
|
+
/**
|
|
3250
|
+
* LinkLayersBody 的推断类型
|
|
3251
|
+
*/
|
|
3252
|
+
type LinkLayersBody = z.infer<typeof LinkLayersBodySchema>;
|
|
3253
|
+
/**
|
|
3254
|
+
* 响应 schema,POST /api/layers/relations
|
|
3255
|
+
*/
|
|
3256
|
+
declare const LinkLayersResponseSchema: z.ZodObject<{
|
|
3257
|
+
id: z.ZodString;
|
|
3258
|
+
sourceLayerId: z.ZodString;
|
|
3259
|
+
targetLayerId: z.ZodString;
|
|
3260
|
+
relationType: z.ZodString;
|
|
3261
|
+
description: z.ZodOptional<z.ZodString>;
|
|
3262
|
+
createdAt: z.ZodString;
|
|
3263
|
+
}, z.core.$strip>;
|
|
3264
|
+
/**
|
|
3265
|
+
* LinkLayersResponse 的推断类型
|
|
3266
|
+
*/
|
|
3267
|
+
type LinkLayersResponse = z.infer<typeof LinkLayersResponseSchema>;
|
|
3268
|
+
/**
|
|
3269
|
+
* 端点参数契约:建立层间关系
|
|
3270
|
+
*/
|
|
3271
|
+
type LinkLayersArgs = {
|
|
3272
|
+
/**
|
|
3273
|
+
* 请求体
|
|
3274
|
+
*/
|
|
3275
|
+
readonly body?: LinkLayersBody;
|
|
3276
|
+
};
|
|
3277
|
+
/**
|
|
3278
|
+
* 路由常量:DELETE /api/layers/relations/:relationId
|
|
3279
|
+
*/
|
|
3280
|
+
declare const UnlinkLayersRoute: {
|
|
3281
|
+
readonly method: 'DELETE';
|
|
3282
|
+
readonly path: '/api/layers/relations/:relationId';
|
|
3283
|
+
readonly paramNames: readonly ['relationId'];
|
|
3284
|
+
};
|
|
3285
|
+
/**
|
|
3286
|
+
* 响应 schema,DELETE /api/layers/relations/:relationId
|
|
3287
|
+
*
|
|
3288
|
+
* 端口解除成功路径返回 void,传输层将空体归一为 null
|
|
3289
|
+
*/
|
|
3290
|
+
declare const UnlinkLayersResponseSchema: z.ZodLiteral<null>;
|
|
3291
|
+
/**
|
|
3292
|
+
* UnlinkLayersResponse 的推断类型
|
|
3293
|
+
*/
|
|
3294
|
+
type UnlinkLayersResponse = z.infer<typeof UnlinkLayersResponseSchema>;
|
|
3295
|
+
/**
|
|
3296
|
+
* 端点参数契约:解除层间关系
|
|
3297
|
+
*/
|
|
3298
|
+
type UnlinkLayersArgs = {
|
|
3299
|
+
/**
|
|
3300
|
+
* 路径参数
|
|
3301
|
+
*/
|
|
3302
|
+
readonly params: z.infer<typeof LayerRelationIdParamsSchema>;
|
|
3303
|
+
};
|
|
3304
|
+
/**
|
|
3305
|
+
* 路由常量:GET /api/layers/relations
|
|
3306
|
+
*/
|
|
3307
|
+
declare const GetLayerRelationsRoute: {
|
|
3308
|
+
readonly method: 'GET';
|
|
3309
|
+
readonly path: '/api/layers/relations';
|
|
3310
|
+
readonly paramNames: readonly [];
|
|
3311
|
+
};
|
|
3312
|
+
/**
|
|
3313
|
+
* 请求 schema:查询参数,GET /api/layers/relations
|
|
3314
|
+
*
|
|
3315
|
+
* 服务端按源图层或目标图层之一查询,两者均缺省时返回 400
|
|
3316
|
+
*/
|
|
3317
|
+
declare const GetLayerRelationsQuerySchema: z.ZodObject<{
|
|
3318
|
+
sourceLayerId: z.ZodOptional<z.ZodString>;
|
|
3319
|
+
targetLayerId: z.ZodOptional<z.ZodString>;
|
|
3320
|
+
}, z.core.$strip>;
|
|
3321
|
+
/**
|
|
3322
|
+
* GetLayerRelationsQuery 的推断类型
|
|
3323
|
+
*/
|
|
3324
|
+
type GetLayerRelationsQuery = z.infer<typeof GetLayerRelationsQuerySchema>;
|
|
3325
|
+
/**
|
|
3326
|
+
* 响应 schema,GET /api/layers/relations
|
|
3327
|
+
*
|
|
3328
|
+
* 端口按裸数组返回层间关系列表
|
|
3329
|
+
*/
|
|
3330
|
+
declare const GetLayerRelationsResponseSchema: z.ZodArray<z.ZodObject<{
|
|
3331
|
+
id: z.ZodString;
|
|
3332
|
+
sourceLayerId: z.ZodString;
|
|
3333
|
+
targetLayerId: z.ZodString;
|
|
3334
|
+
relationType: z.ZodString;
|
|
3335
|
+
description: z.ZodOptional<z.ZodString>;
|
|
3336
|
+
createdAt: z.ZodString;
|
|
3337
|
+
}, z.core.$strip>>;
|
|
3338
|
+
/**
|
|
3339
|
+
* GetLayerRelationsResponse 的推断类型
|
|
3340
|
+
*/
|
|
3341
|
+
type GetLayerRelationsResponse = z.infer<typeof GetLayerRelationsResponseSchema>;
|
|
3342
|
+
/**
|
|
3343
|
+
* 端点参数契约:获取层间关系列表
|
|
3344
|
+
*/
|
|
3345
|
+
type GetLayerRelationsArgs = {
|
|
3346
|
+
/**
|
|
3347
|
+
* 查询参数
|
|
3348
|
+
*/
|
|
3349
|
+
readonly query?: GetLayerRelationsQuery;
|
|
3350
|
+
};
|
|
3351
|
+
//#endregion
|
|
3352
|
+
//#region src/domains/layer-relation/layer-relation.client.d.ts
|
|
3353
|
+
/**
|
|
3354
|
+
* layer-relation 域端点工厂,注入传输实现后取得全部端点函数
|
|
3355
|
+
*
|
|
3356
|
+
* @param transport - 传输实现,由产品仓注入
|
|
3357
|
+
* @returns 全部端点函数集合
|
|
3358
|
+
*/
|
|
3359
|
+
declare function createLayerRelationEndpoints(transport: ApiTransport): {
|
|
3360
|
+
/**
|
|
3361
|
+
* 建立层间关系
|
|
3362
|
+
*/
|
|
3363
|
+
linkLayers: (args: LinkLayersArgs) => Promise<{
|
|
3364
|
+
id: string;
|
|
3365
|
+
sourceLayerId: string;
|
|
3366
|
+
targetLayerId: string;
|
|
3367
|
+
relationType: string;
|
|
3368
|
+
description?: string | undefined;
|
|
3369
|
+
createdAt: string;
|
|
3370
|
+
}>;
|
|
3371
|
+
/**
|
|
3372
|
+
* 解除层间关系
|
|
3373
|
+
*/
|
|
3374
|
+
unlinkLayers: (args: UnlinkLayersArgs) => Promise<null>;
|
|
3375
|
+
/**
|
|
3376
|
+
* 获取层间关系列表
|
|
3377
|
+
*/
|
|
3378
|
+
getLayerRelations: (args: GetLayerRelationsArgs) => Promise<{
|
|
3379
|
+
id: string;
|
|
3380
|
+
sourceLayerId: string;
|
|
3381
|
+
targetLayerId: string;
|
|
3382
|
+
relationType: string;
|
|
3383
|
+
description?: string | undefined;
|
|
3384
|
+
createdAt: string;
|
|
3385
|
+
}[]>;
|
|
3386
|
+
};
|
|
3387
|
+
//#endregion
|
|
3388
|
+
//#region src/domains/layer-cross/layer-cross.dto.d.ts
|
|
3389
|
+
/**
|
|
3390
|
+
* 域公共数据契约:CrossLayerResult
|
|
3391
|
+
*
|
|
3392
|
+
* 端口聚合返回图层、层间关系与图层节点三键
|
|
3393
|
+
*/
|
|
3394
|
+
declare const CrossLayerResultSchema: z.ZodObject<{
|
|
3395
|
+
layers: z.ZodArray<z.ZodObject<{
|
|
3396
|
+
id: z.ZodString;
|
|
3397
|
+
graphId: z.ZodString;
|
|
3398
|
+
name: z.ZodString;
|
|
3399
|
+
layerType: z.ZodEnum<{
|
|
3400
|
+
custom: "custom";
|
|
3401
|
+
organization: "organization";
|
|
3402
|
+
person: "person";
|
|
3403
|
+
society: "society";
|
|
3404
|
+
}>;
|
|
3405
|
+
description: z.ZodOptional<z.ZodString>;
|
|
3406
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3407
|
+
tenantId: z.ZodOptional<z.ZodString>;
|
|
3408
|
+
createdAt: z.ZodString;
|
|
3409
|
+
updatedAt: z.ZodString;
|
|
3410
|
+
}, z.core.$strip>>;
|
|
3411
|
+
relations: z.ZodArray<z.ZodObject<{
|
|
3412
|
+
id: z.ZodString;
|
|
3413
|
+
sourceLayerId: z.ZodString;
|
|
3414
|
+
targetLayerId: z.ZodString;
|
|
3415
|
+
relationType: z.ZodString;
|
|
3416
|
+
description: z.ZodOptional<z.ZodString>;
|
|
3417
|
+
createdAt: z.ZodString;
|
|
3418
|
+
}, z.core.$strip>>;
|
|
3419
|
+
nodes: z.ZodArray<z.ZodObject<{
|
|
3420
|
+
id: z.ZodString;
|
|
3421
|
+
layerId: z.ZodString;
|
|
3422
|
+
nodeId: z.ZodString;
|
|
3423
|
+
graphId: z.ZodString;
|
|
3424
|
+
createdAt: z.ZodString;
|
|
3425
|
+
}, z.core.$strip>>;
|
|
3426
|
+
}, z.core.$strip>;
|
|
3427
|
+
/**
|
|
3428
|
+
* CrossLayerResult 的推断类型
|
|
3429
|
+
*/
|
|
3430
|
+
type CrossLayerResult = z.infer<typeof CrossLayerResultSchema>;
|
|
3431
|
+
//#endregion
|
|
3432
|
+
//#region src/domains/layer-cross/layer-cross.schema.d.ts
|
|
3433
|
+
/**
|
|
3434
|
+
* 路由常量:POST /api/layers/cross/find
|
|
3435
|
+
*/
|
|
3436
|
+
declare const FindCrossLayerRoute: {
|
|
3437
|
+
readonly method: 'POST';
|
|
3438
|
+
readonly path: '/api/layers/cross/find';
|
|
3439
|
+
readonly paramNames: readonly [];
|
|
3440
|
+
};
|
|
3441
|
+
/**
|
|
3442
|
+
* 请求 schema:请求体,POST /api/layers/cross/find
|
|
3443
|
+
*
|
|
3444
|
+
* 服务端实收图谱标识与图层标识列表
|
|
3445
|
+
*/
|
|
3446
|
+
declare const FindCrossLayerBodySchema: z.ZodObject<{
|
|
3447
|
+
graphId: z.ZodString;
|
|
3448
|
+
layerIds: z.ZodArray<z.ZodString>;
|
|
3449
|
+
}, z.core.$strip>;
|
|
3450
|
+
/**
|
|
3451
|
+
* FindCrossLayerBody 的推断类型
|
|
3452
|
+
*/
|
|
3453
|
+
type FindCrossLayerBody = z.infer<typeof FindCrossLayerBodySchema>;
|
|
3454
|
+
/**
|
|
3455
|
+
* 响应 schema,POST /api/layers/cross/find
|
|
3456
|
+
*/
|
|
3457
|
+
declare const FindCrossLayerResponseSchema: z.ZodObject<{
|
|
3458
|
+
layers: z.ZodArray<z.ZodObject<{
|
|
3459
|
+
id: z.ZodString;
|
|
3460
|
+
graphId: z.ZodString;
|
|
3461
|
+
name: z.ZodString;
|
|
3462
|
+
layerType: z.ZodEnum<{
|
|
3463
|
+
custom: "custom";
|
|
3464
|
+
organization: "organization";
|
|
3465
|
+
person: "person";
|
|
3466
|
+
society: "society";
|
|
3467
|
+
}>;
|
|
3468
|
+
description: z.ZodOptional<z.ZodString>;
|
|
3469
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3470
|
+
tenantId: z.ZodOptional<z.ZodString>;
|
|
3471
|
+
createdAt: z.ZodString;
|
|
3472
|
+
updatedAt: z.ZodString;
|
|
3473
|
+
}, z.core.$strip>>;
|
|
3474
|
+
relations: z.ZodArray<z.ZodObject<{
|
|
3475
|
+
id: z.ZodString;
|
|
3476
|
+
sourceLayerId: z.ZodString;
|
|
3477
|
+
targetLayerId: z.ZodString;
|
|
3478
|
+
relationType: z.ZodString;
|
|
3479
|
+
description: z.ZodOptional<z.ZodString>;
|
|
3480
|
+
createdAt: z.ZodString;
|
|
3481
|
+
}, z.core.$strip>>;
|
|
3482
|
+
nodes: z.ZodArray<z.ZodObject<{
|
|
3483
|
+
id: z.ZodString;
|
|
3484
|
+
layerId: z.ZodString;
|
|
3485
|
+
nodeId: z.ZodString;
|
|
3486
|
+
graphId: z.ZodString;
|
|
3487
|
+
createdAt: z.ZodString;
|
|
3488
|
+
}, z.core.$strip>>;
|
|
3489
|
+
}, z.core.$strip>;
|
|
3490
|
+
/**
|
|
3491
|
+
* FindCrossLayerResponse 的推断类型
|
|
3492
|
+
*/
|
|
3493
|
+
type FindCrossLayerResponse = z.infer<typeof FindCrossLayerResponseSchema>;
|
|
3494
|
+
/**
|
|
3495
|
+
* 端点参数契约:跨层查找
|
|
3496
|
+
*/
|
|
3497
|
+
type FindCrossLayerArgs = {
|
|
3498
|
+
/**
|
|
3499
|
+
* 请求体
|
|
3500
|
+
*/
|
|
3501
|
+
readonly body?: FindCrossLayerBody;
|
|
3502
|
+
};
|
|
3503
|
+
//#endregion
|
|
3504
|
+
//#region src/domains/layer-cross/layer-cross.client.d.ts
|
|
3505
|
+
/**
|
|
3506
|
+
* layer-cross 域端点工厂,注入传输实现后取得全部端点函数
|
|
3507
|
+
*
|
|
3508
|
+
* @param transport - 传输实现,由产品仓注入
|
|
3509
|
+
* @returns 全部端点函数集合
|
|
3510
|
+
*/
|
|
3511
|
+
declare function createLayerCrossEndpoints(transport: ApiTransport): {
|
|
3512
|
+
/**
|
|
3513
|
+
* 跨层查找
|
|
3514
|
+
*/
|
|
3515
|
+
findCrossLayer: (args: FindCrossLayerArgs) => Promise<{
|
|
3516
|
+
layers: {
|
|
3517
|
+
id: string;
|
|
3518
|
+
graphId: string;
|
|
3519
|
+
name: string;
|
|
3520
|
+
layerType: "custom" | "organization" | "person" | "society";
|
|
3521
|
+
description?: string | undefined;
|
|
3522
|
+
metadata?: Record<string, unknown> | undefined;
|
|
3523
|
+
tenantId?: string | undefined;
|
|
3524
|
+
createdAt: string;
|
|
3525
|
+
updatedAt: string;
|
|
3526
|
+
}[];
|
|
3527
|
+
relations: {
|
|
3528
|
+
id: string;
|
|
3529
|
+
sourceLayerId: string;
|
|
3530
|
+
targetLayerId: string;
|
|
3531
|
+
relationType: string;
|
|
3532
|
+
description?: string | undefined;
|
|
3533
|
+
createdAt: string;
|
|
3534
|
+
}[];
|
|
3535
|
+
nodes: {
|
|
3536
|
+
id: string;
|
|
3537
|
+
layerId: string;
|
|
3538
|
+
nodeId: string;
|
|
3539
|
+
graphId: string;
|
|
3540
|
+
createdAt: string;
|
|
3541
|
+
}[];
|
|
3542
|
+
}>;
|
|
3543
|
+
};
|
|
3544
|
+
//#endregion
|
|
3545
|
+
//#region src/domains/merge/merge.dto.d.ts
|
|
3546
|
+
/**
|
|
3547
|
+
* 域公共枚举定义:MergeStrategy
|
|
3548
|
+
*/
|
|
3549
|
+
declare const MergeStrategySchema: z.ZodEnum<{
|
|
3550
|
+
auto: "auto";
|
|
3551
|
+
exact_match: "exact_match";
|
|
3552
|
+
fuzzy_match: "fuzzy_match";
|
|
3553
|
+
manual: "manual";
|
|
3554
|
+
}>;
|
|
3555
|
+
/**
|
|
3556
|
+
* MergeStrategy 的推断类型
|
|
3557
|
+
*/
|
|
3558
|
+
type MergeStrategy = z.infer<typeof MergeStrategySchema>;
|
|
3559
|
+
/**
|
|
3560
|
+
* 域公共枚举常量:MergeStrategy
|
|
3561
|
+
*/
|
|
3562
|
+
declare const MergeStrategy: {
|
|
3563
|
+
readonly exact_match: 'exact_match';
|
|
3564
|
+
readonly fuzzy_match: 'fuzzy_match';
|
|
3565
|
+
readonly manual: 'manual';
|
|
3566
|
+
readonly auto: 'auto';
|
|
3567
|
+
};
|
|
3568
|
+
/**
|
|
3569
|
+
* 域公共枚举定义:ConflictResolution
|
|
3570
|
+
*/
|
|
3571
|
+
declare const ConflictResolutionSchema: z.ZodEnum<{
|
|
3572
|
+
keep_first: "keep_first";
|
|
3573
|
+
keep_last: "keep_last";
|
|
3574
|
+
merge: "merge";
|
|
3575
|
+
skip: "skip";
|
|
3576
|
+
}>;
|
|
3577
|
+
/**
|
|
3578
|
+
* ConflictResolution 的推断类型
|
|
3579
|
+
*/
|
|
3580
|
+
type ConflictResolution = z.infer<typeof ConflictResolutionSchema>;
|
|
3581
|
+
/**
|
|
3582
|
+
* 域公共枚举常量:ConflictResolution
|
|
3583
|
+
*/
|
|
3584
|
+
declare const ConflictResolution: {
|
|
3585
|
+
readonly keep_first: 'keep_first';
|
|
3586
|
+
readonly keep_last: 'keep_last';
|
|
3587
|
+
readonly merge: 'merge';
|
|
3588
|
+
readonly skip: 'skip';
|
|
3589
|
+
};
|
|
3590
|
+
/**
|
|
3591
|
+
* 域公共枚举定义:MergeTaskStatus
|
|
3592
|
+
*/
|
|
3593
|
+
declare const MergeTaskStatusSchema: z.ZodEnum<{
|
|
3594
|
+
completed: "completed";
|
|
3595
|
+
failed: "failed";
|
|
3596
|
+
pending: "pending";
|
|
3597
|
+
running: "running";
|
|
3598
|
+
}>;
|
|
3599
|
+
/**
|
|
3600
|
+
* MergeTaskStatus 的推断类型
|
|
3601
|
+
*/
|
|
3602
|
+
type MergeTaskStatus = z.infer<typeof MergeTaskStatusSchema>;
|
|
3603
|
+
/**
|
|
3604
|
+
* 域公共枚举常量:MergeTaskStatus
|
|
3605
|
+
*/
|
|
3606
|
+
declare const MergeTaskStatus: {
|
|
3607
|
+
readonly pending: 'pending';
|
|
3608
|
+
readonly running: 'running';
|
|
3609
|
+
readonly completed: 'completed';
|
|
3610
|
+
readonly failed: 'failed';
|
|
3611
|
+
};
|
|
3612
|
+
/**
|
|
3613
|
+
* 域公共数据契约:MergeStatistics
|
|
3614
|
+
*
|
|
3615
|
+
* 记录合并过程中节点与边的处理数量以及冲突与解决情况
|
|
3616
|
+
*/
|
|
3617
|
+
declare const MergeStatisticsSchema: z.ZodObject<{
|
|
3618
|
+
totalNodes: z.ZodInt;
|
|
3619
|
+
mergedNodes: z.ZodInt;
|
|
3620
|
+
totalEdges: z.ZodInt;
|
|
3621
|
+
mergedEdges: z.ZodInt;
|
|
3622
|
+
conflicts: z.ZodInt;
|
|
3623
|
+
resolutions: z.ZodInt;
|
|
3624
|
+
}, z.core.$strip>;
|
|
3625
|
+
/**
|
|
3626
|
+
* MergeStatistics 的推断类型
|
|
3627
|
+
*/
|
|
3628
|
+
type MergeStatistics = z.infer<typeof MergeStatisticsSchema>;
|
|
3629
|
+
/**
|
|
3630
|
+
* 域公共数据契约:MergeTask
|
|
3631
|
+
*/
|
|
3632
|
+
declare const MergeTaskSchema: z.ZodObject<{
|
|
3633
|
+
id: z.ZodString;
|
|
3634
|
+
sourceGraphIds: z.ZodArray<z.ZodString>;
|
|
3635
|
+
targetGraphId: z.ZodString;
|
|
3636
|
+
strategy: z.ZodEnum<{
|
|
3637
|
+
auto: "auto";
|
|
3638
|
+
exact_match: "exact_match";
|
|
3639
|
+
fuzzy_match: "fuzzy_match";
|
|
3640
|
+
manual: "manual";
|
|
3641
|
+
}>;
|
|
3642
|
+
conflictResolution: z.ZodEnum<{
|
|
3643
|
+
keep_first: "keep_first";
|
|
3644
|
+
keep_last: "keep_last";
|
|
3645
|
+
merge: "merge";
|
|
3646
|
+
skip: "skip";
|
|
3647
|
+
}>;
|
|
3648
|
+
status: z.ZodEnum<{
|
|
3649
|
+
completed: "completed";
|
|
3650
|
+
failed: "failed";
|
|
3651
|
+
pending: "pending";
|
|
3652
|
+
running: "running";
|
|
3653
|
+
}>;
|
|
3654
|
+
statistics: z.ZodOptional<z.ZodObject<{
|
|
3655
|
+
totalNodes: z.ZodInt;
|
|
3656
|
+
mergedNodes: z.ZodInt;
|
|
3657
|
+
totalEdges: z.ZodInt;
|
|
3658
|
+
mergedEdges: z.ZodInt;
|
|
3659
|
+
conflicts: z.ZodInt;
|
|
3660
|
+
resolutions: z.ZodInt;
|
|
3661
|
+
}, z.core.$strip>>;
|
|
3662
|
+
tenantId: z.ZodOptional<z.ZodString>;
|
|
3663
|
+
createdAt: z.ZodString;
|
|
3664
|
+
updatedAt: z.ZodString;
|
|
3665
|
+
completedAt: z.ZodOptional<z.ZodString>;
|
|
3666
|
+
}, z.core.$strip>;
|
|
3667
|
+
/**
|
|
3668
|
+
* MergeTask 的推断类型
|
|
3669
|
+
*/
|
|
3670
|
+
type MergeTask = z.infer<typeof MergeTaskSchema>;
|
|
3671
|
+
/**
|
|
3672
|
+
* 域公共数据契约:MergeTaskListData
|
|
3673
|
+
*
|
|
3674
|
+
* 合并任务列表四键分页面
|
|
3675
|
+
*/
|
|
3676
|
+
declare const MergeTaskListDataSchema: z.ZodObject<{
|
|
3677
|
+
items: z.ZodArray<z.ZodObject<{
|
|
3678
|
+
id: z.ZodString;
|
|
3679
|
+
sourceGraphIds: z.ZodArray<z.ZodString>;
|
|
3680
|
+
targetGraphId: z.ZodString;
|
|
3681
|
+
strategy: z.ZodEnum<{
|
|
3682
|
+
auto: "auto";
|
|
3683
|
+
exact_match: "exact_match";
|
|
3684
|
+
fuzzy_match: "fuzzy_match";
|
|
3685
|
+
manual: "manual";
|
|
3686
|
+
}>;
|
|
3687
|
+
conflictResolution: z.ZodEnum<{
|
|
3688
|
+
keep_first: "keep_first";
|
|
3689
|
+
keep_last: "keep_last";
|
|
3690
|
+
merge: "merge";
|
|
3691
|
+
skip: "skip";
|
|
3692
|
+
}>;
|
|
3693
|
+
status: z.ZodEnum<{
|
|
3694
|
+
completed: "completed";
|
|
3695
|
+
failed: "failed";
|
|
3696
|
+
pending: "pending";
|
|
3697
|
+
running: "running";
|
|
3698
|
+
}>;
|
|
3699
|
+
statistics: z.ZodOptional<z.ZodObject<{
|
|
3700
|
+
totalNodes: z.ZodInt;
|
|
3701
|
+
mergedNodes: z.ZodInt;
|
|
3702
|
+
totalEdges: z.ZodInt;
|
|
3703
|
+
mergedEdges: z.ZodInt;
|
|
3704
|
+
conflicts: z.ZodInt;
|
|
3705
|
+
resolutions: z.ZodInt;
|
|
3706
|
+
}, z.core.$strip>>;
|
|
3707
|
+
tenantId: z.ZodOptional<z.ZodString>;
|
|
3708
|
+
createdAt: z.ZodString;
|
|
3709
|
+
updatedAt: z.ZodString;
|
|
3710
|
+
completedAt: z.ZodOptional<z.ZodString>;
|
|
3711
|
+
}, z.core.$strip>>;
|
|
3712
|
+
total: z.ZodInt;
|
|
3713
|
+
page: z.ZodInt;
|
|
3714
|
+
pageSize: z.ZodInt;
|
|
3715
|
+
}, z.core.$strip>;
|
|
3716
|
+
/**
|
|
3717
|
+
* MergeTaskListData 的推断类型
|
|
3718
|
+
*/
|
|
3719
|
+
type MergeTaskListData = z.infer<typeof MergeTaskListDataSchema>;
|
|
3720
|
+
//#endregion
|
|
3721
|
+
//#region src/domains/merge/merge.schema.d.ts
|
|
3722
|
+
/**
|
|
3723
|
+
* 合并任务标识路径参数契约,合并任务路由共用
|
|
3724
|
+
*/
|
|
3725
|
+
declare const MergeTaskIdParamsSchema: z.ZodObject<{
|
|
3726
|
+
id: z.ZodString;
|
|
3727
|
+
}, z.core.$strip>;
|
|
3728
|
+
/**
|
|
3729
|
+
* 路由常量:POST /api/merge/tasks
|
|
3730
|
+
*/
|
|
3731
|
+
declare const CreateMergeTaskRoute: {
|
|
3732
|
+
readonly method: 'POST';
|
|
3733
|
+
readonly path: '/api/merge/tasks';
|
|
3734
|
+
readonly paramNames: readonly [];
|
|
3735
|
+
};
|
|
3736
|
+
/**
|
|
3737
|
+
* 请求 schema:请求体,POST /api/merge/tasks
|
|
3738
|
+
*/
|
|
3739
|
+
declare const CreateMergeTaskBodySchema: z.ZodObject<{
|
|
3740
|
+
sourceGraphIds: z.ZodArray<z.ZodString>;
|
|
3741
|
+
targetGraphId: z.ZodString;
|
|
3742
|
+
strategy: z.ZodEnum<{
|
|
3743
|
+
auto: "auto";
|
|
3744
|
+
exact_match: "exact_match";
|
|
3745
|
+
fuzzy_match: "fuzzy_match";
|
|
3746
|
+
manual: "manual";
|
|
3747
|
+
}>;
|
|
3748
|
+
conflictResolution: z.ZodEnum<{
|
|
3749
|
+
keep_first: "keep_first";
|
|
3750
|
+
keep_last: "keep_last";
|
|
3751
|
+
merge: "merge";
|
|
3752
|
+
skip: "skip";
|
|
3753
|
+
}>;
|
|
3754
|
+
tenantId: z.ZodOptional<z.ZodString>;
|
|
3755
|
+
}, z.core.$strip>;
|
|
3756
|
+
/**
|
|
3757
|
+
* CreateMergeTaskBody 的推断类型
|
|
3758
|
+
*/
|
|
3759
|
+
type CreateMergeTaskBody = z.infer<typeof CreateMergeTaskBodySchema>;
|
|
3760
|
+
/**
|
|
3761
|
+
* 响应 schema,POST /api/merge/tasks
|
|
3762
|
+
*/
|
|
3763
|
+
declare const CreateMergeTaskResponseSchema: z.ZodObject<{
|
|
3764
|
+
id: z.ZodString;
|
|
3765
|
+
sourceGraphIds: z.ZodArray<z.ZodString>;
|
|
3766
|
+
targetGraphId: z.ZodString;
|
|
3767
|
+
strategy: z.ZodEnum<{
|
|
3768
|
+
auto: "auto";
|
|
3769
|
+
exact_match: "exact_match";
|
|
3770
|
+
fuzzy_match: "fuzzy_match";
|
|
3771
|
+
manual: "manual";
|
|
3772
|
+
}>;
|
|
3773
|
+
conflictResolution: z.ZodEnum<{
|
|
3774
|
+
keep_first: "keep_first";
|
|
3775
|
+
keep_last: "keep_last";
|
|
3776
|
+
merge: "merge";
|
|
3777
|
+
skip: "skip";
|
|
3778
|
+
}>;
|
|
3779
|
+
status: z.ZodEnum<{
|
|
3780
|
+
completed: "completed";
|
|
3781
|
+
failed: "failed";
|
|
3782
|
+
pending: "pending";
|
|
3783
|
+
running: "running";
|
|
3784
|
+
}>;
|
|
3785
|
+
statistics: z.ZodOptional<z.ZodObject<{
|
|
3786
|
+
totalNodes: z.ZodInt;
|
|
3787
|
+
mergedNodes: z.ZodInt;
|
|
3788
|
+
totalEdges: z.ZodInt;
|
|
3789
|
+
mergedEdges: z.ZodInt;
|
|
3790
|
+
conflicts: z.ZodInt;
|
|
3791
|
+
resolutions: z.ZodInt;
|
|
3792
|
+
}, z.core.$strip>>;
|
|
3793
|
+
tenantId: z.ZodOptional<z.ZodString>;
|
|
3794
|
+
createdAt: z.ZodString;
|
|
3795
|
+
updatedAt: z.ZodString;
|
|
3796
|
+
completedAt: z.ZodOptional<z.ZodString>;
|
|
3797
|
+
}, z.core.$strip>;
|
|
3798
|
+
/**
|
|
3799
|
+
* CreateMergeTaskResponse 的推断类型
|
|
3800
|
+
*/
|
|
3801
|
+
type CreateMergeTaskResponse = z.infer<typeof CreateMergeTaskResponseSchema>;
|
|
3802
|
+
/**
|
|
3803
|
+
* 端点参数契约:创建合并任务
|
|
3804
|
+
*/
|
|
3805
|
+
type CreateMergeTaskArgs = {
|
|
3806
|
+
/**
|
|
3807
|
+
* 请求体
|
|
3808
|
+
*/
|
|
3809
|
+
readonly body?: CreateMergeTaskBody;
|
|
3810
|
+
};
|
|
3811
|
+
/**
|
|
3812
|
+
* 路由常量:GET /api/merge/tasks/:id
|
|
3813
|
+
*/
|
|
3814
|
+
declare const GetMergeTaskRoute: {
|
|
3815
|
+
readonly method: 'GET';
|
|
3816
|
+
readonly path: '/api/merge/tasks/:id';
|
|
3817
|
+
readonly paramNames: readonly ['id'];
|
|
3818
|
+
};
|
|
3819
|
+
/**
|
|
3820
|
+
* 响应 schema,GET /api/merge/tasks/:id
|
|
3821
|
+
*
|
|
3822
|
+
* 端口详情查询可空,任务不存在时返回 null
|
|
3823
|
+
*/
|
|
3824
|
+
declare const GetMergeTaskResponseSchema: z.ZodNullable<z.ZodObject<{
|
|
3825
|
+
id: z.ZodString;
|
|
3826
|
+
sourceGraphIds: z.ZodArray<z.ZodString>;
|
|
3827
|
+
targetGraphId: z.ZodString;
|
|
3828
|
+
strategy: z.ZodEnum<{
|
|
3829
|
+
auto: "auto";
|
|
3830
|
+
exact_match: "exact_match";
|
|
3831
|
+
fuzzy_match: "fuzzy_match";
|
|
3832
|
+
manual: "manual";
|
|
3833
|
+
}>;
|
|
3834
|
+
conflictResolution: z.ZodEnum<{
|
|
3835
|
+
keep_first: "keep_first";
|
|
3836
|
+
keep_last: "keep_last";
|
|
3837
|
+
merge: "merge";
|
|
3838
|
+
skip: "skip";
|
|
3839
|
+
}>;
|
|
3840
|
+
status: z.ZodEnum<{
|
|
3841
|
+
completed: "completed";
|
|
3842
|
+
failed: "failed";
|
|
3843
|
+
pending: "pending";
|
|
3844
|
+
running: "running";
|
|
3845
|
+
}>;
|
|
3846
|
+
statistics: z.ZodOptional<z.ZodObject<{
|
|
3847
|
+
totalNodes: z.ZodInt;
|
|
3848
|
+
mergedNodes: z.ZodInt;
|
|
3849
|
+
totalEdges: z.ZodInt;
|
|
3850
|
+
mergedEdges: z.ZodInt;
|
|
3851
|
+
conflicts: z.ZodInt;
|
|
3852
|
+
resolutions: z.ZodInt;
|
|
3853
|
+
}, z.core.$strip>>;
|
|
3854
|
+
tenantId: z.ZodOptional<z.ZodString>;
|
|
3855
|
+
createdAt: z.ZodString;
|
|
3856
|
+
updatedAt: z.ZodString;
|
|
3857
|
+
completedAt: z.ZodOptional<z.ZodString>;
|
|
3858
|
+
}, z.core.$strip>>;
|
|
3859
|
+
/**
|
|
3860
|
+
* GetMergeTaskResponse 的推断类型
|
|
3861
|
+
*/
|
|
3862
|
+
type GetMergeTaskResponse = z.infer<typeof GetMergeTaskResponseSchema>;
|
|
3863
|
+
/**
|
|
3864
|
+
* 端点参数契约:获取单个合并任务
|
|
3865
|
+
*/
|
|
3866
|
+
type GetMergeTaskArgs = {
|
|
3867
|
+
/**
|
|
3868
|
+
* 路径参数
|
|
3869
|
+
*/
|
|
3870
|
+
readonly params: z.infer<typeof MergeTaskIdParamsSchema>;
|
|
3871
|
+
};
|
|
3872
|
+
/**
|
|
3873
|
+
* 路由常量:GET /api/merge/tasks
|
|
3874
|
+
*/
|
|
3875
|
+
declare const ListMergeTasksRoute: {
|
|
3876
|
+
readonly method: 'GET';
|
|
3877
|
+
readonly path: '/api/merge/tasks';
|
|
3878
|
+
readonly paramNames: readonly [];
|
|
3879
|
+
};
|
|
3880
|
+
/**
|
|
3881
|
+
* 请求 schema:查询参数,GET /api/merge/tasks
|
|
3882
|
+
*/
|
|
3883
|
+
declare const ListMergeTasksQuerySchema: z.ZodObject<{
|
|
3884
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
3885
|
+
completed: "completed";
|
|
3886
|
+
failed: "failed";
|
|
3887
|
+
pending: "pending";
|
|
3888
|
+
running: "running";
|
|
3889
|
+
}>>;
|
|
3890
|
+
strategy: z.ZodOptional<z.ZodEnum<{
|
|
3891
|
+
auto: "auto";
|
|
3892
|
+
exact_match: "exact_match";
|
|
3893
|
+
fuzzy_match: "fuzzy_match";
|
|
3894
|
+
manual: "manual";
|
|
3895
|
+
}>>;
|
|
3896
|
+
tenantId: z.ZodOptional<z.ZodString>;
|
|
3897
|
+
page: z.ZodOptional<z.ZodInt>;
|
|
3898
|
+
pageSize: z.ZodOptional<z.ZodInt>;
|
|
3899
|
+
}, z.core.$strip>;
|
|
3900
|
+
/**
|
|
3901
|
+
* ListMergeTasksQuery 的推断类型
|
|
3902
|
+
*/
|
|
3903
|
+
type ListMergeTasksQuery = z.infer<typeof ListMergeTasksQuerySchema>;
|
|
3904
|
+
/**
|
|
3905
|
+
* 响应 schema,GET /api/merge/tasks
|
|
3906
|
+
*/
|
|
3907
|
+
declare const ListMergeTasksResponseSchema: z.ZodObject<{
|
|
3908
|
+
items: z.ZodArray<z.ZodObject<{
|
|
3909
|
+
id: z.ZodString;
|
|
3910
|
+
sourceGraphIds: z.ZodArray<z.ZodString>;
|
|
3911
|
+
targetGraphId: z.ZodString;
|
|
3912
|
+
strategy: z.ZodEnum<{
|
|
3913
|
+
auto: "auto";
|
|
3914
|
+
exact_match: "exact_match";
|
|
3915
|
+
fuzzy_match: "fuzzy_match";
|
|
3916
|
+
manual: "manual";
|
|
3917
|
+
}>;
|
|
3918
|
+
conflictResolution: z.ZodEnum<{
|
|
3919
|
+
keep_first: "keep_first";
|
|
3920
|
+
keep_last: "keep_last";
|
|
3921
|
+
merge: "merge";
|
|
3922
|
+
skip: "skip";
|
|
3923
|
+
}>;
|
|
3924
|
+
status: z.ZodEnum<{
|
|
3925
|
+
completed: "completed";
|
|
3926
|
+
failed: "failed";
|
|
3927
|
+
pending: "pending";
|
|
3928
|
+
running: "running";
|
|
3929
|
+
}>;
|
|
3930
|
+
statistics: z.ZodOptional<z.ZodObject<{
|
|
3931
|
+
totalNodes: z.ZodInt;
|
|
3932
|
+
mergedNodes: z.ZodInt;
|
|
3933
|
+
totalEdges: z.ZodInt;
|
|
3934
|
+
mergedEdges: z.ZodInt;
|
|
3935
|
+
conflicts: z.ZodInt;
|
|
3936
|
+
resolutions: z.ZodInt;
|
|
3937
|
+
}, z.core.$strip>>;
|
|
3938
|
+
tenantId: z.ZodOptional<z.ZodString>;
|
|
3939
|
+
createdAt: z.ZodString;
|
|
3940
|
+
updatedAt: z.ZodString;
|
|
3941
|
+
completedAt: z.ZodOptional<z.ZodString>;
|
|
3942
|
+
}, z.core.$strip>>;
|
|
3943
|
+
total: z.ZodInt;
|
|
3944
|
+
page: z.ZodInt;
|
|
3945
|
+
pageSize: z.ZodInt;
|
|
3946
|
+
}, z.core.$strip>;
|
|
3947
|
+
/**
|
|
3948
|
+
* ListMergeTasksResponse 的推断类型
|
|
3949
|
+
*/
|
|
3950
|
+
type ListMergeTasksResponse = z.infer<typeof ListMergeTasksResponseSchema>;
|
|
3951
|
+
/**
|
|
3952
|
+
* 端点参数契约:获取合并任务列表
|
|
3953
|
+
*/
|
|
3954
|
+
type ListMergeTasksArgs = {
|
|
3955
|
+
/**
|
|
3956
|
+
* 查询参数
|
|
3957
|
+
*/
|
|
3958
|
+
readonly query?: ListMergeTasksQuery;
|
|
3959
|
+
};
|
|
3960
|
+
/**
|
|
3961
|
+
* 路由常量:DELETE /api/merge/tasks/:id
|
|
3962
|
+
*/
|
|
3963
|
+
declare const DeleteMergeTaskRoute: {
|
|
3964
|
+
readonly method: 'DELETE';
|
|
3965
|
+
readonly path: '/api/merge/tasks/:id';
|
|
3966
|
+
readonly paramNames: readonly ['id'];
|
|
3967
|
+
};
|
|
3968
|
+
/**
|
|
3969
|
+
* 响应 schema,DELETE /api/merge/tasks/:id
|
|
3970
|
+
*
|
|
3971
|
+
* 端口删除成功路径返回 void,传输层将空体归一为 null
|
|
3972
|
+
*/
|
|
3973
|
+
declare const DeleteMergeTaskResponseSchema: z.ZodLiteral<null>;
|
|
3974
|
+
/**
|
|
3975
|
+
* DeleteMergeTaskResponse 的推断类型
|
|
3976
|
+
*/
|
|
3977
|
+
type DeleteMergeTaskResponse = z.infer<typeof DeleteMergeTaskResponseSchema>;
|
|
3978
|
+
/**
|
|
3979
|
+
* 端点参数契约:删除合并任务
|
|
3980
|
+
*/
|
|
3981
|
+
type DeleteMergeTaskArgs = {
|
|
3982
|
+
/**
|
|
3983
|
+
* 路径参数
|
|
3984
|
+
*/
|
|
3985
|
+
readonly params: z.infer<typeof MergeTaskIdParamsSchema>;
|
|
3986
|
+
};
|
|
3987
|
+
//#endregion
|
|
3988
|
+
//#region src/domains/merge/merge.client.d.ts
|
|
3989
|
+
/**
|
|
3990
|
+
* merge 域端点工厂,注入传输实现后取得全部端点函数
|
|
3991
|
+
*
|
|
3992
|
+
* @param transport - 传输实现,由产品仓注入
|
|
3993
|
+
* @returns 全部端点函数集合
|
|
3994
|
+
*/
|
|
3995
|
+
declare function createMergeEndpoints(transport: ApiTransport): {
|
|
3996
|
+
/**
|
|
3997
|
+
* 创建合并任务
|
|
3998
|
+
*/
|
|
3999
|
+
createMergeTask: (args: CreateMergeTaskArgs) => Promise<{
|
|
4000
|
+
id: string;
|
|
4001
|
+
sourceGraphIds: string[];
|
|
4002
|
+
targetGraphId: string;
|
|
4003
|
+
strategy: "auto" | "exact_match" | "fuzzy_match" | "manual";
|
|
4004
|
+
conflictResolution: "keep_first" | "keep_last" | "merge" | "skip";
|
|
4005
|
+
status: "completed" | "failed" | "pending" | "running";
|
|
4006
|
+
statistics?: {
|
|
4007
|
+
totalNodes: number;
|
|
4008
|
+
mergedNodes: number;
|
|
4009
|
+
totalEdges: number;
|
|
4010
|
+
mergedEdges: number;
|
|
4011
|
+
conflicts: number;
|
|
4012
|
+
resolutions: number;
|
|
4013
|
+
} | undefined;
|
|
4014
|
+
tenantId?: string | undefined;
|
|
4015
|
+
createdAt: string;
|
|
4016
|
+
updatedAt: string;
|
|
4017
|
+
completedAt?: string | undefined;
|
|
4018
|
+
}>;
|
|
4019
|
+
/**
|
|
4020
|
+
* 获取单个合并任务
|
|
4021
|
+
*/
|
|
4022
|
+
getMergeTask: (args: GetMergeTaskArgs) => Promise<{
|
|
4023
|
+
id: string;
|
|
4024
|
+
sourceGraphIds: string[];
|
|
4025
|
+
targetGraphId: string;
|
|
4026
|
+
strategy: "auto" | "exact_match" | "fuzzy_match" | "manual";
|
|
4027
|
+
conflictResolution: "keep_first" | "keep_last" | "merge" | "skip";
|
|
4028
|
+
status: "completed" | "failed" | "pending" | "running";
|
|
4029
|
+
statistics?: {
|
|
4030
|
+
totalNodes: number;
|
|
4031
|
+
mergedNodes: number;
|
|
4032
|
+
totalEdges: number;
|
|
4033
|
+
mergedEdges: number;
|
|
4034
|
+
conflicts: number;
|
|
4035
|
+
resolutions: number;
|
|
4036
|
+
} | undefined;
|
|
4037
|
+
tenantId?: string | undefined;
|
|
4038
|
+
createdAt: string;
|
|
4039
|
+
updatedAt: string;
|
|
4040
|
+
completedAt?: string | undefined;
|
|
4041
|
+
} | null>;
|
|
4042
|
+
/**
|
|
4043
|
+
* 获取合并任务列表
|
|
4044
|
+
*/
|
|
4045
|
+
listMergeTasks: (args: ListMergeTasksArgs) => Promise<{
|
|
4046
|
+
items: {
|
|
4047
|
+
id: string;
|
|
4048
|
+
sourceGraphIds: string[];
|
|
4049
|
+
targetGraphId: string;
|
|
4050
|
+
strategy: "auto" | "exact_match" | "fuzzy_match" | "manual";
|
|
4051
|
+
conflictResolution: "keep_first" | "keep_last" | "merge" | "skip";
|
|
4052
|
+
status: "completed" | "failed" | "pending" | "running";
|
|
4053
|
+
statistics?: {
|
|
4054
|
+
totalNodes: number;
|
|
4055
|
+
mergedNodes: number;
|
|
4056
|
+
totalEdges: number;
|
|
4057
|
+
mergedEdges: number;
|
|
4058
|
+
conflicts: number;
|
|
4059
|
+
resolutions: number;
|
|
4060
|
+
} | undefined;
|
|
4061
|
+
tenantId?: string | undefined;
|
|
4062
|
+
createdAt: string;
|
|
4063
|
+
updatedAt: string;
|
|
4064
|
+
completedAt?: string | undefined;
|
|
4065
|
+
}[];
|
|
4066
|
+
total: number;
|
|
4067
|
+
page: number;
|
|
4068
|
+
pageSize: number;
|
|
4069
|
+
}>;
|
|
4070
|
+
/**
|
|
4071
|
+
* 删除合并任务
|
|
4072
|
+
*/
|
|
4073
|
+
deleteMergeTask: (args: DeleteMergeTaskArgs) => Promise<null>;
|
|
4074
|
+
};
|
|
4075
|
+
//#endregion
|
|
4076
|
+
//#region src/domains/merge-execution/merge-execution.dto.d.ts
|
|
4077
|
+
/**
|
|
4078
|
+
* 域公共枚举定义:MergeConflictType
|
|
4079
|
+
*/
|
|
4080
|
+
declare const MergeConflictTypeSchema: z.ZodEnum<{
|
|
4081
|
+
ambiguity: "ambiguity";
|
|
4082
|
+
contradiction: "contradiction";
|
|
4083
|
+
duplicate: "duplicate";
|
|
4084
|
+
}>;
|
|
4085
|
+
/**
|
|
4086
|
+
* MergeConflictType 的推断类型
|
|
4087
|
+
*/
|
|
4088
|
+
type MergeConflictType = z.infer<typeof MergeConflictTypeSchema>;
|
|
4089
|
+
/**
|
|
4090
|
+
* 域公共枚举常量:MergeConflictType
|
|
4091
|
+
*/
|
|
4092
|
+
declare const MergeConflictType: {
|
|
4093
|
+
readonly duplicate: 'duplicate';
|
|
4094
|
+
readonly contradiction: 'contradiction';
|
|
4095
|
+
readonly ambiguity: 'ambiguity';
|
|
4096
|
+
};
|
|
4097
|
+
/**
|
|
4098
|
+
* 域公共枚举定义:EntityMatchType
|
|
4099
|
+
*/
|
|
4100
|
+
declare const EntityMatchTypeSchema: z.ZodEnum<{
|
|
4101
|
+
exact: "exact";
|
|
4102
|
+
fuzzy: "fuzzy";
|
|
4103
|
+
manual: "manual";
|
|
4104
|
+
}>;
|
|
4105
|
+
/**
|
|
4106
|
+
* EntityMatchType 的推断类型
|
|
4107
|
+
*/
|
|
4108
|
+
type EntityMatchType = z.infer<typeof EntityMatchTypeSchema>;
|
|
4109
|
+
/**
|
|
4110
|
+
* 域公共枚举常量:EntityMatchType
|
|
4111
|
+
*/
|
|
4112
|
+
declare const EntityMatchType: {
|
|
4113
|
+
readonly exact: 'exact';
|
|
4114
|
+
readonly fuzzy: 'fuzzy';
|
|
4115
|
+
readonly manual: 'manual';
|
|
4116
|
+
};
|
|
4117
|
+
/**
|
|
4118
|
+
* 域公共数据契约:MergeConflict
|
|
4119
|
+
*
|
|
4120
|
+
* 记录合并过程中检测到的冲突及其解决情况
|
|
4121
|
+
*/
|
|
4122
|
+
declare const MergeConflictSchema: z.ZodObject<{
|
|
4123
|
+
id: z.ZodString;
|
|
4124
|
+
sourceNodeId: z.ZodString;
|
|
4125
|
+
targetNodeId: z.ZodString;
|
|
4126
|
+
nodeLabel: z.ZodString;
|
|
4127
|
+
conflictType: z.ZodEnum<{
|
|
4128
|
+
ambiguity: "ambiguity";
|
|
4129
|
+
contradiction: "contradiction";
|
|
4130
|
+
duplicate: "duplicate";
|
|
4131
|
+
}>;
|
|
4132
|
+
resolution: z.ZodOptional<z.ZodEnum<{
|
|
4133
|
+
keep_first: "keep_first";
|
|
4134
|
+
keep_last: "keep_last";
|
|
4135
|
+
merge: "merge";
|
|
4136
|
+
skip: "skip";
|
|
4137
|
+
}>>;
|
|
4138
|
+
resolvedAt: z.ZodOptional<z.ZodString>;
|
|
4139
|
+
}, z.core.$strip>;
|
|
4140
|
+
/**
|
|
4141
|
+
* MergeConflict 的推断类型
|
|
4142
|
+
*/
|
|
4143
|
+
type MergeConflict = z.infer<typeof MergeConflictSchema>;
|
|
4144
|
+
/**
|
|
4145
|
+
* 域公共数据契约:MergeResult
|
|
4146
|
+
*
|
|
4147
|
+
* 一次合并任务执行后的完整产出物,含统计信息与冲突列表
|
|
4148
|
+
*/
|
|
4149
|
+
declare const MergeResultSchema: z.ZodObject<{
|
|
4150
|
+
id: z.ZodString;
|
|
4151
|
+
taskId: z.ZodString;
|
|
4152
|
+
targetGraphId: z.ZodString;
|
|
4153
|
+
statistics: z.ZodObject<{
|
|
4154
|
+
totalNodes: z.ZodInt;
|
|
4155
|
+
mergedNodes: z.ZodInt;
|
|
4156
|
+
totalEdges: z.ZodInt;
|
|
4157
|
+
mergedEdges: z.ZodInt;
|
|
4158
|
+
conflicts: z.ZodInt;
|
|
4159
|
+
resolutions: z.ZodInt;
|
|
4160
|
+
}, z.core.$strip>;
|
|
4161
|
+
conflicts: z.ZodArray<z.ZodObject<{
|
|
4162
|
+
id: z.ZodString;
|
|
4163
|
+
sourceNodeId: z.ZodString;
|
|
4164
|
+
targetNodeId: z.ZodString;
|
|
4165
|
+
nodeLabel: z.ZodString;
|
|
4166
|
+
conflictType: z.ZodEnum<{
|
|
4167
|
+
ambiguity: "ambiguity";
|
|
4168
|
+
contradiction: "contradiction";
|
|
4169
|
+
duplicate: "duplicate";
|
|
4170
|
+
}>;
|
|
4171
|
+
resolution: z.ZodOptional<z.ZodEnum<{
|
|
4172
|
+
keep_first: "keep_first";
|
|
4173
|
+
keep_last: "keep_last";
|
|
4174
|
+
merge: "merge";
|
|
4175
|
+
skip: "skip";
|
|
4176
|
+
}>>;
|
|
4177
|
+
resolvedAt: z.ZodOptional<z.ZodString>;
|
|
4178
|
+
}, z.core.$strip>>;
|
|
4179
|
+
createdAt: z.ZodString;
|
|
4180
|
+
}, z.core.$strip>;
|
|
4181
|
+
/**
|
|
4182
|
+
* MergeResult 的推断类型
|
|
4183
|
+
*/
|
|
4184
|
+
type MergeResult = z.infer<typeof MergeResultSchema>;
|
|
4185
|
+
/**
|
|
4186
|
+
* 域公共数据契约:EntityResolution
|
|
4187
|
+
*
|
|
4188
|
+
* 记录一组源节点合并为一个目标节点的消解结果
|
|
4189
|
+
*/
|
|
4190
|
+
declare const EntityResolutionSchema: z.ZodObject<{
|
|
4191
|
+
id: z.ZodString;
|
|
4192
|
+
taskId: z.ZodString;
|
|
4193
|
+
sourceNodeIds: z.ZodArray<z.ZodString>;
|
|
4194
|
+
targetNodeId: z.ZodString;
|
|
4195
|
+
matchType: z.ZodEnum<{
|
|
4196
|
+
exact: "exact";
|
|
4197
|
+
fuzzy: "fuzzy";
|
|
4198
|
+
manual: "manual";
|
|
4199
|
+
}>;
|
|
4200
|
+
confidence: z.ZodNumber;
|
|
4201
|
+
createdAt: z.ZodString;
|
|
4202
|
+
}, z.core.$strip>;
|
|
4203
|
+
/**
|
|
4204
|
+
* EntityResolution 的推断类型
|
|
4205
|
+
*/
|
|
4206
|
+
type EntityResolution = z.infer<typeof EntityResolutionSchema>;
|
|
4207
|
+
//#endregion
|
|
4208
|
+
//#region src/domains/merge-execution/merge-execution.schema.d.ts
|
|
4209
|
+
/**
|
|
4210
|
+
* 路由常量:POST /api/merge/tasks/:id/execute
|
|
4211
|
+
*/
|
|
4212
|
+
declare const ExecuteMergeRoute: {
|
|
4213
|
+
readonly method: 'POST';
|
|
4214
|
+
readonly path: '/api/merge/tasks/:id/execute';
|
|
4215
|
+
readonly paramNames: readonly ['id'];
|
|
4216
|
+
};
|
|
4217
|
+
/**
|
|
4218
|
+
* 响应 schema,POST /api/merge/tasks/:id/execute
|
|
4219
|
+
*
|
|
4220
|
+
* 端口执行合并返回完整合并结果实体
|
|
4221
|
+
*/
|
|
4222
|
+
declare const ExecuteMergeResponseSchema: z.ZodObject<{
|
|
4223
|
+
id: z.ZodString;
|
|
4224
|
+
taskId: z.ZodString;
|
|
4225
|
+
targetGraphId: z.ZodString;
|
|
4226
|
+
statistics: z.ZodObject<{
|
|
4227
|
+
totalNodes: z.ZodInt;
|
|
4228
|
+
mergedNodes: z.ZodInt;
|
|
4229
|
+
totalEdges: z.ZodInt;
|
|
4230
|
+
mergedEdges: z.ZodInt;
|
|
4231
|
+
conflicts: z.ZodInt;
|
|
4232
|
+
resolutions: z.ZodInt;
|
|
4233
|
+
}, z.core.$strip>;
|
|
4234
|
+
conflicts: z.ZodArray<z.ZodObject<{
|
|
4235
|
+
id: z.ZodString;
|
|
4236
|
+
sourceNodeId: z.ZodString;
|
|
4237
|
+
targetNodeId: z.ZodString;
|
|
4238
|
+
nodeLabel: z.ZodString;
|
|
4239
|
+
conflictType: z.ZodEnum<{
|
|
4240
|
+
ambiguity: "ambiguity";
|
|
4241
|
+
contradiction: "contradiction";
|
|
4242
|
+
duplicate: "duplicate";
|
|
4243
|
+
}>;
|
|
4244
|
+
resolution: z.ZodOptional<z.ZodEnum<{
|
|
4245
|
+
keep_first: "keep_first";
|
|
4246
|
+
keep_last: "keep_last";
|
|
4247
|
+
merge: "merge";
|
|
4248
|
+
skip: "skip";
|
|
4249
|
+
}>>;
|
|
4250
|
+
resolvedAt: z.ZodOptional<z.ZodString>;
|
|
4251
|
+
}, z.core.$strip>>;
|
|
4252
|
+
createdAt: z.ZodString;
|
|
4253
|
+
}, z.core.$strip>;
|
|
4254
|
+
/**
|
|
4255
|
+
* ExecuteMergeResponse 的推断类型
|
|
4256
|
+
*/
|
|
4257
|
+
type ExecuteMergeResponse = z.infer<typeof ExecuteMergeResponseSchema>;
|
|
4258
|
+
/**
|
|
4259
|
+
* 端点参数契约:执行合并任务
|
|
4260
|
+
*/
|
|
4261
|
+
type ExecuteMergeArgs = {
|
|
4262
|
+
/**
|
|
4263
|
+
* 路径参数
|
|
4264
|
+
*/
|
|
4265
|
+
readonly params: z.infer<typeof MergeTaskIdParamsSchema>;
|
|
4266
|
+
};
|
|
4267
|
+
/**
|
|
4268
|
+
* 路由常量:POST /api/merge/tasks/:id/conflicts/resolve
|
|
4269
|
+
*/
|
|
4270
|
+
declare const ResolveConflictRoute: {
|
|
4271
|
+
readonly method: 'POST';
|
|
4272
|
+
readonly path: '/api/merge/tasks/:id/conflicts/resolve';
|
|
4273
|
+
readonly paramNames: readonly ['id'];
|
|
4274
|
+
};
|
|
4275
|
+
/**
|
|
4276
|
+
* 请求 schema:请求体,POST /api/merge/tasks/:id/conflicts/resolve
|
|
4277
|
+
*/
|
|
4278
|
+
declare const ResolveConflictBodySchema: z.ZodObject<{
|
|
4279
|
+
conflictId: z.ZodString;
|
|
4280
|
+
resolution: z.ZodEnum<{
|
|
4281
|
+
keep_first: "keep_first";
|
|
4282
|
+
keep_last: "keep_last";
|
|
4283
|
+
merge: "merge";
|
|
4284
|
+
skip: "skip";
|
|
4285
|
+
}>;
|
|
4286
|
+
}, z.core.$strip>;
|
|
4287
|
+
/**
|
|
4288
|
+
* ResolveConflictBody 的推断类型
|
|
4289
|
+
*/
|
|
4290
|
+
type ResolveConflictBody = z.infer<typeof ResolveConflictBodySchema>;
|
|
4291
|
+
/**
|
|
4292
|
+
* 响应 schema,POST /api/merge/tasks/:id/conflicts/resolve
|
|
4293
|
+
*
|
|
4294
|
+
* 端口解决冲突返回解决后的合并冲突对象
|
|
4295
|
+
*/
|
|
4296
|
+
declare const ResolveConflictResponseSchema: z.ZodObject<{
|
|
4297
|
+
id: z.ZodString;
|
|
4298
|
+
sourceNodeId: z.ZodString;
|
|
4299
|
+
targetNodeId: z.ZodString;
|
|
4300
|
+
nodeLabel: z.ZodString;
|
|
4301
|
+
conflictType: z.ZodEnum<{
|
|
4302
|
+
ambiguity: "ambiguity";
|
|
4303
|
+
contradiction: "contradiction";
|
|
4304
|
+
duplicate: "duplicate";
|
|
4305
|
+
}>;
|
|
4306
|
+
resolution: z.ZodOptional<z.ZodEnum<{
|
|
4307
|
+
keep_first: "keep_first";
|
|
4308
|
+
keep_last: "keep_last";
|
|
4309
|
+
merge: "merge";
|
|
4310
|
+
skip: "skip";
|
|
4311
|
+
}>>;
|
|
4312
|
+
resolvedAt: z.ZodOptional<z.ZodString>;
|
|
4313
|
+
}, z.core.$strip>;
|
|
4314
|
+
/**
|
|
4315
|
+
* ResolveConflictResponse 的推断类型
|
|
4316
|
+
*/
|
|
4317
|
+
type ResolveConflictResponse = z.infer<typeof ResolveConflictResponseSchema>;
|
|
4318
|
+
/**
|
|
4319
|
+
* 端点参数契约:解决合并冲突
|
|
4320
|
+
*/
|
|
4321
|
+
type ResolveConflictArgs = {
|
|
4322
|
+
/**
|
|
4323
|
+
* 路径参数
|
|
4324
|
+
*/
|
|
4325
|
+
readonly params: z.infer<typeof MergeTaskIdParamsSchema>;
|
|
4326
|
+
/**
|
|
4327
|
+
* 请求体
|
|
4328
|
+
*/
|
|
4329
|
+
readonly body?: ResolveConflictBody;
|
|
4330
|
+
};
|
|
4331
|
+
/**
|
|
4332
|
+
* 路由常量:GET /api/merge/tasks/:id/result
|
|
4333
|
+
*/
|
|
4334
|
+
declare const GetMergeResultRoute: {
|
|
4335
|
+
readonly method: 'GET';
|
|
4336
|
+
readonly path: '/api/merge/tasks/:id/result';
|
|
4337
|
+
readonly paramNames: readonly ['id'];
|
|
4338
|
+
};
|
|
4339
|
+
/**
|
|
4340
|
+
* 响应 schema,GET /api/merge/tasks/:id/result
|
|
4341
|
+
*
|
|
4342
|
+
* 端口结果查询可空,任务未产生结果时返回 null
|
|
4343
|
+
*/
|
|
4344
|
+
declare const GetMergeResultResponseSchema: z.ZodNullable<z.ZodObject<{
|
|
4345
|
+
id: z.ZodString;
|
|
4346
|
+
taskId: z.ZodString;
|
|
4347
|
+
targetGraphId: z.ZodString;
|
|
4348
|
+
statistics: z.ZodObject<{
|
|
4349
|
+
totalNodes: z.ZodInt;
|
|
4350
|
+
mergedNodes: z.ZodInt;
|
|
4351
|
+
totalEdges: z.ZodInt;
|
|
4352
|
+
mergedEdges: z.ZodInt;
|
|
4353
|
+
conflicts: z.ZodInt;
|
|
4354
|
+
resolutions: z.ZodInt;
|
|
4355
|
+
}, z.core.$strip>;
|
|
4356
|
+
conflicts: z.ZodArray<z.ZodObject<{
|
|
4357
|
+
id: z.ZodString;
|
|
4358
|
+
sourceNodeId: z.ZodString;
|
|
4359
|
+
targetNodeId: z.ZodString;
|
|
4360
|
+
nodeLabel: z.ZodString;
|
|
4361
|
+
conflictType: z.ZodEnum<{
|
|
4362
|
+
ambiguity: "ambiguity";
|
|
4363
|
+
contradiction: "contradiction";
|
|
4364
|
+
duplicate: "duplicate";
|
|
4365
|
+
}>;
|
|
4366
|
+
resolution: z.ZodOptional<z.ZodEnum<{
|
|
4367
|
+
keep_first: "keep_first";
|
|
4368
|
+
keep_last: "keep_last";
|
|
4369
|
+
merge: "merge";
|
|
4370
|
+
skip: "skip";
|
|
4371
|
+
}>>;
|
|
4372
|
+
resolvedAt: z.ZodOptional<z.ZodString>;
|
|
4373
|
+
}, z.core.$strip>>;
|
|
4374
|
+
createdAt: z.ZodString;
|
|
4375
|
+
}, z.core.$strip>>;
|
|
4376
|
+
/**
|
|
4377
|
+
* GetMergeResultResponse 的推断类型
|
|
4378
|
+
*/
|
|
4379
|
+
type GetMergeResultResponse = z.infer<typeof GetMergeResultResponseSchema>;
|
|
4380
|
+
/**
|
|
4381
|
+
* 端点参数契约:获取合并结果
|
|
4382
|
+
*/
|
|
4383
|
+
type GetMergeResultArgs = {
|
|
4384
|
+
/**
|
|
4385
|
+
* 路径参数
|
|
4386
|
+
*/
|
|
4387
|
+
readonly params: z.infer<typeof MergeTaskIdParamsSchema>;
|
|
4388
|
+
};
|
|
4389
|
+
/**
|
|
4390
|
+
* 路由常量:GET /api/merge/tasks/:id/resolutions
|
|
4391
|
+
*/
|
|
4392
|
+
declare const GetEntityResolutionsRoute: {
|
|
4393
|
+
readonly method: 'GET';
|
|
4394
|
+
readonly path: '/api/merge/tasks/:id/resolutions';
|
|
4395
|
+
readonly paramNames: readonly ['id'];
|
|
4396
|
+
};
|
|
4397
|
+
/**
|
|
4398
|
+
* 响应 schema,GET /api/merge/tasks/:id/resolutions
|
|
4399
|
+
*
|
|
4400
|
+
* 端口按裸数组返回实体消解记录列表
|
|
4401
|
+
*/
|
|
4402
|
+
declare const GetEntityResolutionsResponseSchema: z.ZodArray<z.ZodObject<{
|
|
4403
|
+
id: z.ZodString;
|
|
4404
|
+
taskId: z.ZodString;
|
|
4405
|
+
sourceNodeIds: z.ZodArray<z.ZodString>;
|
|
4406
|
+
targetNodeId: z.ZodString;
|
|
4407
|
+
matchType: z.ZodEnum<{
|
|
4408
|
+
exact: "exact";
|
|
4409
|
+
fuzzy: "fuzzy";
|
|
4410
|
+
manual: "manual";
|
|
4411
|
+
}>;
|
|
4412
|
+
confidence: z.ZodNumber;
|
|
4413
|
+
createdAt: z.ZodString;
|
|
4414
|
+
}, z.core.$strip>>;
|
|
4415
|
+
/**
|
|
4416
|
+
* GetEntityResolutionsResponse 的推断类型
|
|
4417
|
+
*/
|
|
4418
|
+
type GetEntityResolutionsResponse = z.infer<typeof GetEntityResolutionsResponseSchema>;
|
|
4419
|
+
/**
|
|
4420
|
+
* 端点参数契约:获取实体消解记录
|
|
4421
|
+
*/
|
|
4422
|
+
type GetEntityResolutionsArgs = {
|
|
4423
|
+
/**
|
|
4424
|
+
* 路径参数
|
|
4425
|
+
*/
|
|
4426
|
+
readonly params: z.infer<typeof MergeTaskIdParamsSchema>;
|
|
4427
|
+
};
|
|
4428
|
+
//#endregion
|
|
4429
|
+
//#region src/domains/merge-execution/merge-execution.client.d.ts
|
|
4430
|
+
/**
|
|
4431
|
+
* merge-execution 域端点工厂,注入传输实现后取得全部端点函数
|
|
4432
|
+
*
|
|
4433
|
+
* @param transport - 传输实现,由产品仓注入
|
|
4434
|
+
* @returns 全部端点函数集合
|
|
4435
|
+
*/
|
|
4436
|
+
declare function createMergeExecutionEndpoints(transport: ApiTransport): {
|
|
4437
|
+
/**
|
|
4438
|
+
* 执行合并任务
|
|
4439
|
+
*/
|
|
4440
|
+
executeMerge: (args: ExecuteMergeArgs) => Promise<{
|
|
4441
|
+
id: string;
|
|
4442
|
+
taskId: string;
|
|
4443
|
+
targetGraphId: string;
|
|
4444
|
+
statistics: {
|
|
4445
|
+
totalNodes: number;
|
|
4446
|
+
mergedNodes: number;
|
|
4447
|
+
totalEdges: number;
|
|
4448
|
+
mergedEdges: number;
|
|
4449
|
+
conflicts: number;
|
|
4450
|
+
resolutions: number;
|
|
4451
|
+
};
|
|
4452
|
+
conflicts: {
|
|
4453
|
+
id: string;
|
|
4454
|
+
sourceNodeId: string;
|
|
4455
|
+
targetNodeId: string;
|
|
4456
|
+
nodeLabel: string;
|
|
4457
|
+
conflictType: "ambiguity" | "contradiction" | "duplicate";
|
|
4458
|
+
resolution?: "keep_first" | "keep_last" | "merge" | "skip" | undefined;
|
|
4459
|
+
resolvedAt?: string | undefined;
|
|
4460
|
+
}[];
|
|
4461
|
+
createdAt: string;
|
|
4462
|
+
}>;
|
|
4463
|
+
/**
|
|
4464
|
+
* 解决合并冲突
|
|
4465
|
+
*/
|
|
4466
|
+
resolveConflict: (args: ResolveConflictArgs) => Promise<{
|
|
4467
|
+
id: string;
|
|
4468
|
+
sourceNodeId: string;
|
|
4469
|
+
targetNodeId: string;
|
|
4470
|
+
nodeLabel: string;
|
|
4471
|
+
conflictType: "ambiguity" | "contradiction" | "duplicate";
|
|
4472
|
+
resolution?: "keep_first" | "keep_last" | "merge" | "skip" | undefined;
|
|
4473
|
+
resolvedAt?: string | undefined;
|
|
4474
|
+
}>;
|
|
4475
|
+
/**
|
|
4476
|
+
* 获取合并结果
|
|
4477
|
+
*/
|
|
4478
|
+
getMergeResult: (args: GetMergeResultArgs) => Promise<{
|
|
4479
|
+
id: string;
|
|
4480
|
+
taskId: string;
|
|
4481
|
+
targetGraphId: string;
|
|
4482
|
+
statistics: {
|
|
4483
|
+
totalNodes: number;
|
|
4484
|
+
mergedNodes: number;
|
|
4485
|
+
totalEdges: number;
|
|
4486
|
+
mergedEdges: number;
|
|
4487
|
+
conflicts: number;
|
|
4488
|
+
resolutions: number;
|
|
4489
|
+
};
|
|
4490
|
+
conflicts: {
|
|
4491
|
+
id: string;
|
|
4492
|
+
sourceNodeId: string;
|
|
4493
|
+
targetNodeId: string;
|
|
4494
|
+
nodeLabel: string;
|
|
4495
|
+
conflictType: "ambiguity" | "contradiction" | "duplicate";
|
|
4496
|
+
resolution?: "keep_first" | "keep_last" | "merge" | "skip" | undefined;
|
|
4497
|
+
resolvedAt?: string | undefined;
|
|
4498
|
+
}[];
|
|
4499
|
+
createdAt: string;
|
|
4500
|
+
} | null>;
|
|
4501
|
+
/**
|
|
4502
|
+
* 获取实体消解记录
|
|
4503
|
+
*/
|
|
4504
|
+
getEntityResolutions: (args: GetEntityResolutionsArgs) => Promise<{
|
|
4505
|
+
id: string;
|
|
4506
|
+
taskId: string;
|
|
4507
|
+
sourceNodeIds: string[];
|
|
4508
|
+
targetNodeId: string;
|
|
4509
|
+
matchType: "exact" | "fuzzy" | "manual";
|
|
4510
|
+
confidence: number;
|
|
4511
|
+
createdAt: string;
|
|
4512
|
+
}[]>;
|
|
4513
|
+
};
|
|
4514
|
+
//#endregion
|
|
4515
|
+
export { AddNodeToLayerArgs, AddNodeToLayerBody, AddNodeToLayerBodySchema, AddNodeToLayerResponse, AddNodeToLayerResponseSchema, AddNodeToLayerRoute, ApiContractError, ApiContractErrorDetails, ApiContractPart, ApiHttpMethod, ApiTransport, ApiTransportRequest, ConflictResolution, ConflictResolutionSchema, CreateEdgeArgs, CreateEdgeBody, CreateEdgeBodySchema, CreateEdgeResponse, CreateEdgeResponseSchema, CreateEdgeRoute, CreateGraphArgs, CreateGraphBody, CreateGraphBodySchema, CreateGraphResponse, CreateGraphResponseSchema, CreateGraphRoute, CreateLayerArgs, CreateLayerBody, CreateLayerBodySchema, CreateLayerResponse, CreateLayerResponseSchema, CreateLayerRoute, CreateMergeTaskArgs, CreateMergeTaskBody, CreateMergeTaskBodySchema, CreateMergeTaskResponse, CreateMergeTaskResponseSchema, CreateMergeTaskRoute, CreateNodeArgs, CreateNodeBody, CreateNodeBodySchema, CreateNodeResponse, CreateNodeResponseSchema, CreateNodeRoute, CrossLayerResult, CrossLayerResultSchema, DeleteEdgeArgs, DeleteEdgeResponse, DeleteEdgeResponseSchema, DeleteEdgeRoute, DeleteGraphArgs, DeleteGraphParamsSchema, DeleteGraphResponse, DeleteGraphResponseSchema, DeleteGraphRoute, DeleteLayerArgs, DeleteLayerResponse, DeleteLayerResponseSchema, DeleteLayerRoute, DeleteMergeTaskArgs, DeleteMergeTaskResponse, DeleteMergeTaskResponseSchema, DeleteMergeTaskRoute, DeleteNodeArgs, DeleteNodeResponse, DeleteNodeResponseSchema, DeleteNodeRoute, Edge, EdgeListData, EdgeListDataSchema, EdgeSchema, EdgeType, EdgeTypeSchema, EntityMatchType, EntityMatchTypeSchema, EntityResolution, EntityResolutionSchema, ExecuteMergeArgs, ExecuteMergeResponse, ExecuteMergeResponseSchema, ExecuteMergeRoute, ExportGraphBundleArgs, ExportGraphBundleParamsSchema, ExportGraphBundleResponse, ExportGraphBundleResponseSchema, ExportGraphBundleRoute, FindCrossLayerArgs, FindCrossLayerBody, FindCrossLayerBodySchema, FindCrossLayerResponse, FindCrossLayerResponseSchema, FindCrossLayerRoute, GetAncestorsArgs, GetAncestorsResponse, GetAncestorsResponseSchema, GetAncestorsRoute, GetDescendantsArgs, GetDescendantsResponse, GetDescendantsResponseSchema, GetDescendantsRoute, GetEdgeArgs, GetEdgeResponse, GetEdgeResponseSchema, GetEdgeRoute, GetEntityResolutionsArgs, GetEntityResolutionsResponse, GetEntityResolutionsResponseSchema, GetEntityResolutionsRoute, GetGraphArgs, GetGraphParamsSchema, GetGraphResponse, GetGraphResponseSchema, GetGraphRoute, GetGroupFoldArgs, GetGroupFoldQuerySchema, GetGroupFoldResponse, GetGroupFoldResponseSchema, GetGroupFoldRoute, GetLayerArgs, GetLayerNodesArgs, GetLayerNodesResponse, GetLayerNodesResponseSchema, GetLayerNodesRoute, GetLayerRelationsArgs, GetLayerRelationsQuery, GetLayerRelationsQuerySchema, GetLayerRelationsResponse, GetLayerRelationsResponseSchema, GetLayerRelationsRoute, GetLayerResponse, GetLayerResponseSchema, GetLayerRoute, GetLearningPathArgs, GetLearningPathBody, GetLearningPathBodySchema, GetLearningPathResponse, GetLearningPathResponseSchema, GetLearningPathRoute, GetMergeResultArgs, GetMergeResultResponse, GetMergeResultResponseSchema, GetMergeResultRoute, GetMergeTaskArgs, GetMergeTaskResponse, GetMergeTaskResponseSchema, GetMergeTaskRoute, GetNeighborsArgs, GetNeighborsResponse, GetNeighborsResponseSchema, GetNeighborsRoute, GetNodeArgs, GetNodeResponse, GetNodeResponseSchema, GetNodeRoute, GetSubgraphArgs, GetSubgraphBody, GetSubgraphBodySchema, GetSubgraphResponse, GetSubgraphResponseSchema, GetSubgraphRoute, GetTopologicalOrderArgs, GetTopologicalOrderQuerySchema, GetTopologicalOrderResponse, GetTopologicalOrderResponseSchema, GetTopologicalOrderRoute, GetTransitiveReductionArgs, GetTransitiveReductionBody, GetTransitiveReductionBodySchema, GetTransitiveReductionResponse, GetTransitiveReductionResponseSchema, GetTransitiveReductionRoute, Graph, GraphBundle, GraphBundleSchema, GraphKind, GraphKindSchema, GraphListData, GraphListDataSchema, GraphProfile, GraphProfileSchema, GraphQueryParamsWireSchema, GraphSchema, GraphScopedIdParamsSchema, GraphScopedParamsSchema, GraphSliceData, GraphSliceDataSchema, GroupAxisParamsSchema, GroupFoldAxis, GroupFoldAxisSchema, GroupFoldData, GroupFoldDataSchema, IdListData, IdListDataSchema, ImportGraphBundleArgs, ImportGraphBundleBody, ImportGraphBundleBodySchema, ImportGraphBundleResponse, ImportGraphBundleResponseSchema, ImportGraphBundleRoute, Layer, LayerIdParamsSchema, LayerListData, LayerListDataSchema, LayerNode, LayerNodeParamsSchema, LayerNodeSchema, LayerRelation, LayerRelationIdParamsSchema, LayerRelationSchema, LayerSchema, LayerScopedParamsSchema, LayerType, LayerTypeSchema, LinkLayersArgs, LinkLayersBody, LinkLayersBodySchema, LinkLayersResponse, LinkLayersResponseSchema, LinkLayersRoute, ListEdgesArgs, ListEdgesQuery, ListEdgesQuerySchema, ListEdgesResponse, ListEdgesResponseSchema, ListEdgesRoute, ListGraphsArgs, ListGraphsQuery, ListGraphsQuerySchema, ListGraphsResponse, ListGraphsResponseSchema, ListGraphsRoute, ListLayersArgs, ListLayersQuery, ListLayersQuerySchema, ListLayersResponse, ListLayersResponseSchema, ListLayersRoute, ListMergeTasksArgs, ListMergeTasksQuery, ListMergeTasksQuerySchema, ListMergeTasksResponse, ListMergeTasksResponseSchema, ListMergeTasksRoute, ListNodesArgs, ListNodesQuery, ListNodesQuerySchema, ListNodesResponse, ListNodesResponseSchema, ListNodesRoute, MergeConflict, MergeConflictSchema, MergeConflictType, MergeConflictTypeSchema, MergeResult, MergeResultSchema, MergeStatistics, MergeStatisticsSchema, MergeStrategy, MergeStrategySchema, MergeTask, MergeTaskIdParamsSchema, MergeTaskListData, MergeTaskListDataSchema, MergeTaskSchema, MergeTaskStatus, MergeTaskStatusSchema, NeighborsData, NeighborsDataSchema, Node, NodeListData, NodeListDataSchema, NodeSchema, NodeType, NodeTypeSchema, NullResult, NullResultSchema, RemoveNodeFromLayerArgs, RemoveNodeFromLayerResponse, RemoveNodeFromLayerResponseSchema, RemoveNodeFromLayerRoute, ResolveConflictArgs, ResolveConflictBody, ResolveConflictBodySchema, ResolveConflictResponse, ResolveConflictResponseSchema, ResolveConflictRoute, TraverseData, TraverseDataSchema, TraverseDirection, TraverseDirectionSchema, TraverseGraphArgs, TraverseGraphBody, TraverseGraphBodySchema, TraverseGraphResponse, TraverseGraphResponseSchema, TraverseGraphRoute, TraverseNode, TraverseNodeSchema, UnlinkLayersArgs, UnlinkLayersResponse, UnlinkLayersResponseSchema, UnlinkLayersRoute, UpdateEdgeArgs, UpdateEdgeBody, UpdateEdgeBodySchema, UpdateEdgeResponse, UpdateEdgeResponseSchema, UpdateEdgeRoute, UpdateGraphArgs, UpdateGraphBody, UpdateGraphBodySchema, UpdateGraphParamsSchema, UpdateGraphResponse, UpdateGraphResponseSchema, UpdateGraphRoute, UpdateLayerArgs, UpdateLayerBody, UpdateLayerBodySchema, UpdateLayerResponse, UpdateLayerResponseSchema, UpdateLayerRoute, UpdateNodeArgs, UpdateNodeBody, UpdateNodeBodySchema, UpdateNodeResponse, UpdateNodeResponseSchema, UpdateNodeRoute, buildApiPath, createGraphEdgeEndpoints, createGraphEndpoints, createGraphNodeEndpoints, createGraphQueryEndpoints, createLayerCrossEndpoints, createLayerEndpoints, createLayerNodeEndpoints, createLayerRelationEndpoints, createMergeEndpoints, createMergeExecutionEndpoints };
|