File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,6 +14,21 @@ type DbRef = {
1414// Generalized reference
1515export type Ref = LocalRef | DbRef ;
1616
17+ type SpaceRef = DbRef | { url : string ; sourceApp : Enums < "Platform" > } ;
18+
19+ // A potentially cross-space reference
20+ export type LocalOrRemoteRef =
21+ | LocalRef
22+ | {
23+ localId : string ;
24+ // infer space from context if absent.
25+ space ?: SpaceRef ;
26+ }
27+ | {
28+ // A string that contains combined space and localId
29+ rid : string ;
30+ } ;
31+
1732// Common attributes for most types
1833export type CrossAppBase = LocalRef & {
1934 createdAt : Date ;
@@ -85,3 +100,10 @@ export type CrossAppNode = CrossAppBase & {
85100 full : InlineCrossAppTypedContent ;
86101 } ;
87102} ;
103+
104+ // A relation instance
105+ export type CrossAppRelation = CrossAppBase & {
106+ relationType : Ref ;
107+ source : LocalOrRemoteRef ;
108+ destination : LocalOrRemoteRef ;
109+ } ;
You can’t perform that action at this time.
0 commit comments