We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 562c561 commit 0b40e6cCopy full SHA for 0b40e6c
1 file changed
packages/database/src/crossAppContracts.ts
@@ -21,6 +21,20 @@ type CrossAppBase = LocalRef & {
21
author: Ref;
22
};
23
24
+type SpaceRef = DbRef | { url: string; sourceApp: Enums<"Platform"> };
25
+
26
+export type LocalOrRemoteRef =
27
+ | LocalRef
28
+ | {
29
+ localId: string;
30
+ // infer space from context if absent.
31
+ space?: SpaceRef;
32
+ }
33
34
+ // A string that contains combined space and localId
35
+ rid: string;
36
+ };
37
38
// A node schema
39
export type CrossAppNodeSchema = CrossAppBase & {
40
label: string;
@@ -72,3 +86,10 @@ export type CrossAppNode = CrossAppBase & {
72
86
full: InlineCrossAppTypedContent;
73
87
74
88
89
90
+// A relation instance
91
+export type CrossAppRelation = CrossAppBase & {
92
+ relationType: Ref;
93
+ source: LocalOrRemoteRef;
94
+ destination: LocalOrRemoteRef;
95
+};
0 commit comments