File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import type { ContentType } from "@repo/content-model" ;
2- import { Enums } from "./dbTypes" ;
2+ import { Enums , type Json } from "./dbTypes" ;
33
44export type LocalRef = {
55 // This localId is expected to be unique within the current space
@@ -21,6 +21,42 @@ export type CrossAppBase = LocalRef & {
2121 author : Ref ;
2222} ;
2323
24+ export type CrossAppSchemaBase = CrossAppBase & {
25+ metadata ?: Json ;
26+ } ;
27+
28+ // A node schema
29+ export type CrossAppNodeSchema = CrossAppSchemaBase & {
30+ label : string ;
31+ template ?: string ;
32+ templateTitle ?: string ;
33+ } ;
34+
35+ // A relation type schema
36+ export type CrossAppRelationTypeSchema = CrossAppSchemaBase & {
37+ label : string ;
38+ complement : string ;
39+ // should we add colour? format?
40+ } ;
41+
42+ // A relation triple schema
43+ export type CrossAppRelationTripleSchema = CrossAppSchemaBase &
44+ (
45+ | {
46+ label : string ;
47+ complement : string ;
48+ relation ?: never ;
49+ }
50+ | {
51+ relation : Ref ;
52+ label ?: never ;
53+ complement ?: never ;
54+ }
55+ ) & {
56+ sourceType : Ref ;
57+ destinationType : Ref ;
58+ } ;
59+
2460// An inline vector semantic embedding
2561export type CrossAppEmbedding = {
2662 value : number [ ] ;
You can’t perform that action at this time.
0 commit comments