Import the committed KnowledgeFS snapshot dc4072ee302317145612087ce7440851dc329fd0 under knowledge-fs/ without its Git history, local IDE settings, or build artifacts.
22 lines
643 B
TypeScript
22 lines
643 B
TypeScript
import type { AdminGraphEntity, AdminGraphRelation } from "./api-client";
|
|
|
|
export function adminRowKey(scope: string, id: string, index: number): string {
|
|
return [scope, id, index].join(":");
|
|
}
|
|
|
|
export function graphEntityRowKey(entity: AdminGraphEntity, index: number): string {
|
|
return ["entity", entity.id, entity.depth, entity.canonicalKey, entity.type, index].join(":");
|
|
}
|
|
|
|
export function graphRelationRowKey(relation: AdminGraphRelation, index: number): string {
|
|
return [
|
|
"relation",
|
|
relation.id,
|
|
relation.depth,
|
|
relation.subjectEntityId,
|
|
relation.type,
|
|
relation.objectEntityId,
|
|
index,
|
|
].join(":");
|
|
}
|