@ekairos/domain 1.8.10-beta.0 → 1.9.0

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.
@@ -1,3 +1,227 @@
1
- declare const instantSchema: any;
1
+ declare const instantSchema: import("@instantdb/core").InstantSchemaDef<import("@instantdb/core").EntitiesWithLinks<{
2
+ $users: import("@instantdb/core").EntityDef<any, any, any>;
3
+ $files: import("@instantdb/core").EntityDef<any, any, any>;
4
+ organizations: import("@instantdb/core").EntityDef<{
5
+ clerkOrgId: import("@instantdb/core").DataAttrDef<string, true, true>;
6
+ name: import("@instantdb/core").DataAttrDef<string, true, false>;
7
+ timezone: import("@instantdb/core").DataAttrDef<string, false, false>;
8
+ createdAt: import("@instantdb/core").DataAttrDef<Date, true, false>;
9
+ }, {}, void>;
10
+ transactions: import("@instantdb/core").EntityDef<{
11
+ provider: import("@instantdb/core").DataAttrDef<string, true, true>;
12
+ externalId: import("@instantdb/core").DataAttrDef<string, true, true>;
13
+ amount: import("@instantdb/core").DataAttrDef<number, true, false>;
14
+ currency: import("@instantdb/core").DataAttrDef<string, false, false>;
15
+ status: import("@instantdb/core").DataAttrDef<string, true, true>;
16
+ description: import("@instantdb/core").DataAttrDef<string, false, false>;
17
+ createdAt: import("@instantdb/core").DataAttrDef<Date, true, true>;
18
+ updatedAt: import("@instantdb/core").DataAttrDef<Date, false, true>;
19
+ }, {}, void>;
20
+ payments: import("@instantdb/core").EntityDef<{
21
+ provider: import("@instantdb/core").DataAttrDef<string, true, true>;
22
+ externalPaymentId: import("@instantdb/core").DataAttrDef<string, true, true>;
23
+ amount: import("@instantdb/core").DataAttrDef<number, true, false>;
24
+ currency: import("@instantdb/core").DataAttrDef<string, false, false>;
25
+ status: import("@instantdb/core").DataAttrDef<string, true, true>;
26
+ method: import("@instantdb/core").DataAttrDef<string, false, false>;
27
+ createdAt: import("@instantdb/core").DataAttrDef<Date, true, false>;
28
+ }, {}, void>;
29
+ projects: import("@instantdb/core").EntityDef<{
30
+ name: import("@instantdb/core").DataAttrDef<string, true, false>;
31
+ description: import("@instantdb/core").DataAttrDef<string, false, false>;
32
+ status: import("@instantdb/core").DataAttrDef<string, true, false>;
33
+ createdAt: import("@instantdb/core").DataAttrDef<Date, true, false>;
34
+ updatedAt: import("@instantdb/core").DataAttrDef<Date, true, false>;
35
+ }, {}, void>;
36
+ tasks: import("@instantdb/core").EntityDef<{
37
+ title: import("@instantdb/core").DataAttrDef<string, true, false>;
38
+ description: import("@instantdb/core").DataAttrDef<string, false, false>;
39
+ status: import("@instantdb/core").DataAttrDef<string, true, false>;
40
+ priority: import("@instantdb/core").DataAttrDef<string, false, false>;
41
+ createdAt: import("@instantdb/core").DataAttrDef<Date, true, false>;
42
+ updatedAt: import("@instantdb/core").DataAttrDef<Date, true, false>;
43
+ }, {}, void>;
44
+ app_settings: import("@instantdb/core").EntityDef<{
45
+ key: import("@instantdb/core").DataAttrDef<string, true, true>;
46
+ value: import("@instantdb/core").DataAttrDef<any, true, false>;
47
+ createdAt: import("@instantdb/core").DataAttrDef<Date, true, false>;
48
+ updatedAt: import("@instantdb/core").DataAttrDef<Date, true, false>;
49
+ }, {}, void>;
50
+ notifications: import("@instantdb/core").EntityDef<{
51
+ type: import("@instantdb/core").DataAttrDef<string, true, false>;
52
+ message: import("@instantdb/core").DataAttrDef<string, true, false>;
53
+ read: import("@instantdb/core").DataAttrDef<boolean, false, false>;
54
+ createdAt: import("@instantdb/core").DataAttrDef<Date, true, false>;
55
+ }, {}, void>;
56
+ }, {
57
+ transactionOrganization: {
58
+ readonly forward: {
59
+ readonly on: "transactions";
60
+ readonly has: "one";
61
+ readonly label: "organization";
62
+ };
63
+ readonly reverse: {
64
+ readonly on: "organizations";
65
+ readonly has: "many";
66
+ readonly label: "transactions";
67
+ };
68
+ };
69
+ transactionUser: {
70
+ readonly forward: {
71
+ readonly on: "transactions";
72
+ readonly has: "one";
73
+ readonly label: "createdBy";
74
+ };
75
+ readonly reverse: {
76
+ readonly on: "$users";
77
+ readonly has: "many";
78
+ readonly label: "transactions";
79
+ };
80
+ };
81
+ paymentFiles: {
82
+ readonly forward: {
83
+ readonly on: "payments";
84
+ readonly has: "many";
85
+ readonly label: "$files";
86
+ };
87
+ readonly reverse: {
88
+ readonly on: "$files";
89
+ readonly has: "one";
90
+ readonly label: "payment";
91
+ };
92
+ };
93
+ transactionPayment: {
94
+ readonly forward: {
95
+ readonly on: "transactions";
96
+ readonly has: "one";
97
+ readonly label: "payment";
98
+ };
99
+ readonly reverse: {
100
+ readonly on: "payments";
101
+ readonly has: "one";
102
+ readonly label: "transaction";
103
+ };
104
+ };
105
+ projectOrganization: {
106
+ readonly forward: {
107
+ readonly on: "projects";
108
+ readonly has: "one";
109
+ readonly label: "organization";
110
+ };
111
+ readonly reverse: {
112
+ readonly on: "organizations";
113
+ readonly has: "many";
114
+ readonly label: "projects";
115
+ };
116
+ };
117
+ taskAssignee: {
118
+ readonly forward: {
119
+ readonly on: "tasks";
120
+ readonly has: "one";
121
+ readonly label: "assignee";
122
+ };
123
+ readonly reverse: {
124
+ readonly on: "$users";
125
+ readonly has: "many";
126
+ readonly label: "assignedTasks";
127
+ };
128
+ };
129
+ taskCreator: {
130
+ readonly forward: {
131
+ readonly on: "tasks";
132
+ readonly has: "one";
133
+ readonly label: "creator";
134
+ };
135
+ readonly reverse: {
136
+ readonly on: "$users";
137
+ readonly has: "many";
138
+ readonly label: "createdTasks";
139
+ };
140
+ };
141
+ projectTasks: {
142
+ readonly forward: {
143
+ readonly on: "projects";
144
+ readonly has: "many";
145
+ readonly label: "tasks";
146
+ };
147
+ readonly reverse: {
148
+ readonly on: "tasks";
149
+ readonly has: "one";
150
+ readonly label: "project";
151
+ };
152
+ };
153
+ projectFiles: {
154
+ readonly forward: {
155
+ readonly on: "projects";
156
+ readonly has: "many";
157
+ readonly label: "$files";
158
+ };
159
+ readonly reverse: {
160
+ readonly on: "$files";
161
+ readonly has: "one";
162
+ readonly label: "project";
163
+ };
164
+ };
165
+ organizationMembers: {
166
+ readonly forward: {
167
+ readonly on: "organizations";
168
+ readonly has: "many";
169
+ readonly label: "members";
170
+ };
171
+ readonly reverse: {
172
+ readonly on: "$users";
173
+ readonly has: "many";
174
+ readonly label: "organizations";
175
+ };
176
+ };
177
+ settingsOrganization: {
178
+ readonly forward: {
179
+ readonly on: "app_settings";
180
+ readonly has: "one";
181
+ readonly label: "organization";
182
+ };
183
+ readonly reverse: {
184
+ readonly on: "organizations";
185
+ readonly has: "many";
186
+ readonly label: "settings";
187
+ };
188
+ };
189
+ notificationUser: {
190
+ readonly forward: {
191
+ readonly on: "notifications";
192
+ readonly has: "one";
193
+ readonly label: "user";
194
+ };
195
+ readonly reverse: {
196
+ readonly on: "$users";
197
+ readonly has: "many";
198
+ readonly label: "notifications";
199
+ };
200
+ };
201
+ notificationTransaction: {
202
+ readonly forward: {
203
+ readonly on: "notifications";
204
+ readonly has: "one";
205
+ readonly label: "relatedTransaction";
206
+ };
207
+ readonly reverse: {
208
+ readonly on: "transactions";
209
+ readonly has: "many";
210
+ readonly label: "notifications";
211
+ };
212
+ };
213
+ notificationProject: {
214
+ readonly forward: {
215
+ readonly on: "notifications";
216
+ readonly has: "one";
217
+ readonly label: "relatedProject";
218
+ };
219
+ readonly reverse: {
220
+ readonly on: "projects";
221
+ readonly has: "many";
222
+ readonly label: "notifications";
223
+ };
224
+ };
225
+ }>, import("@instantdb/core").LinksDef<any>, import("@instantdb/core").RoomsDef>;
2
226
  export default instantSchema;
3
227
  //# sourceMappingURL=instant-schema-example.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"instant-schema-example.d.ts","sourceRoot":"","sources":["../../src/__type_tests__/instant-schema-example.ts"],"names":[],"mappings":"AAyKA,QAAA,MAAM,aAAa,KAA8B,CAAC;AAIlD,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"instant-schema-example.d.ts","sourceRoot":"","sources":["../../src/__type_tests__/instant-schema-example.ts"],"names":[],"mappings":"AAyKA,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gFAA8B,CAAC;AAIlD,eAAe,aAAa,CAAC"}
@@ -1,4 +1,191 @@
1
- export declare const instantSchema: import("@instantdb/core").InstantSchemaDef<import("@instantdb/core").EntitiesWithLinks<import("@instantdb/core").EntitiesDef, import("@instantdb/core").LinksDef<import("@instantdb/core").EntitiesDef>>, import("@instantdb/core").LinksDef<any>, import("@instantdb/core").RoomsDef>;
1
+ export declare const instantSchema: import("@instantdb/core").InstantSchemaDef<import("@instantdb/core").EntitiesWithLinks<import("@instantdb/core").EntitiesWithLinks<{
2
+ $users: import("@instantdb/core").EntityDef<any, any, any>;
3
+ $files: import("@instantdb/core").EntityDef<any, any, any>;
4
+ organizations: import("@instantdb/core").EntityDef<{
5
+ clerkOrgId: import("@instantdb/core").DataAttrDef<string, true, true>;
6
+ name: import("@instantdb/core").DataAttrDef<string, true, false>;
7
+ timezone: import("@instantdb/core").DataAttrDef<string, false, false>;
8
+ }, {}, void>;
9
+ transactions: import("@instantdb/core").EntityDef<{
10
+ provider: import("@instantdb/core").DataAttrDef<string, true, true>;
11
+ externalId: import("@instantdb/core").DataAttrDef<string, true, true>;
12
+ amount: import("@instantdb/core").DataAttrDef<number, true, false>;
13
+ currency: import("@instantdb/core").DataAttrDef<string, false, false>;
14
+ status: import("@instantdb/core").DataAttrDef<string, true, true>;
15
+ description: import("@instantdb/core").DataAttrDef<string, false, false>;
16
+ createdAt: import("@instantdb/core").DataAttrDef<Date, true, true>;
17
+ updatedAt: import("@instantdb/core").DataAttrDef<Date, false, true>;
18
+ }, {}, void>;
19
+ payments: import("@instantdb/core").EntityDef<{
20
+ provider: import("@instantdb/core").DataAttrDef<string, true, true>;
21
+ externalPaymentId: import("@instantdb/core").DataAttrDef<string, true, true>;
22
+ amount: import("@instantdb/core").DataAttrDef<number, true, false>;
23
+ currency: import("@instantdb/core").DataAttrDef<string, false, false>;
24
+ status: import("@instantdb/core").DataAttrDef<string, true, true>;
25
+ method: import("@instantdb/core").DataAttrDef<string, false, false>;
26
+ createdAt: import("@instantdb/core").DataAttrDef<Date, true, false>;
27
+ }, {}, void>;
28
+ projects: import("@instantdb/core").EntityDef<{
29
+ name: import("@instantdb/core").DataAttrDef<string, true, false>;
30
+ description: import("@instantdb/core").DataAttrDef<string, false, false>;
31
+ status: import("@instantdb/core").DataAttrDef<string, true, false>;
32
+ createdAt: import("@instantdb/core").DataAttrDef<Date, true, false>;
33
+ updatedAt: import("@instantdb/core").DataAttrDef<Date, true, false>;
34
+ }, {}, void>;
35
+ tasks: import("@instantdb/core").EntityDef<{
36
+ title: import("@instantdb/core").DataAttrDef<string, true, false>;
37
+ description: import("@instantdb/core").DataAttrDef<string, false, false>;
38
+ status: import("@instantdb/core").DataAttrDef<string, true, false>;
39
+ priority: import("@instantdb/core").DataAttrDef<string, false, false>;
40
+ createdAt: import("@instantdb/core").DataAttrDef<Date, true, false>;
41
+ updatedAt: import("@instantdb/core").DataAttrDef<Date, true, false>;
42
+ }, {}, void>;
43
+ app_settings: import("@instantdb/core").EntityDef<{
44
+ key: import("@instantdb/core").DataAttrDef<string, true, true>;
45
+ value: import("@instantdb/core").DataAttrDef<any, true, false>;
46
+ createdAt: import("@instantdb/core").DataAttrDef<Date, true, false>;
47
+ updatedAt: import("@instantdb/core").DataAttrDef<Date, true, false>;
48
+ }, {}, void>;
49
+ notifications: import("@instantdb/core").EntityDef<{
50
+ type: import("@instantdb/core").DataAttrDef<string, true, false>;
51
+ message: import("@instantdb/core").DataAttrDef<string, true, false>;
52
+ read: import("@instantdb/core").DataAttrDef<boolean, false, false>;
53
+ createdAt: import("@instantdb/core").DataAttrDef<Date, true, false>;
54
+ }, {}, void>;
55
+ }, {
56
+ transactionOrganization: {
57
+ readonly forward: {
58
+ readonly on: "transactions";
59
+ readonly has: "one";
60
+ readonly label: "organization";
61
+ };
62
+ readonly reverse: {
63
+ readonly on: "organizations";
64
+ readonly has: "many";
65
+ readonly label: "transactions";
66
+ };
67
+ };
68
+ transactionUser: {
69
+ readonly forward: {
70
+ readonly on: "transactions";
71
+ readonly has: "one";
72
+ readonly label: "createdBy";
73
+ };
74
+ readonly reverse: {
75
+ readonly on: "$users";
76
+ readonly has: "many";
77
+ readonly label: "transactions";
78
+ };
79
+ };
80
+ transactionPayment: {
81
+ readonly forward: {
82
+ readonly on: "transactions";
83
+ readonly has: "one";
84
+ readonly label: "payment";
85
+ };
86
+ readonly reverse: {
87
+ readonly on: "payments";
88
+ readonly has: "one";
89
+ readonly label: "transaction";
90
+ };
91
+ };
92
+ projectOrganization: {
93
+ readonly forward: {
94
+ readonly on: "projects";
95
+ readonly has: "one";
96
+ readonly label: "organization";
97
+ };
98
+ readonly reverse: {
99
+ readonly on: "organizations";
100
+ readonly has: "many";
101
+ readonly label: "projects";
102
+ };
103
+ };
104
+ taskAssignee: {
105
+ readonly forward: {
106
+ readonly on: "tasks";
107
+ readonly has: "one";
108
+ readonly label: "assignee";
109
+ };
110
+ readonly reverse: {
111
+ readonly on: "$users";
112
+ readonly has: "many";
113
+ readonly label: "assignedTasks";
114
+ };
115
+ };
116
+ projectTasks: {
117
+ readonly forward: {
118
+ readonly on: "projects";
119
+ readonly has: "many";
120
+ readonly label: "tasks";
121
+ };
122
+ readonly reverse: {
123
+ readonly on: "tasks";
124
+ readonly has: "one";
125
+ readonly label: "project";
126
+ };
127
+ };
128
+ organizationMembers: {
129
+ readonly forward: {
130
+ readonly on: "organizations";
131
+ readonly has: "many";
132
+ readonly label: "members";
133
+ };
134
+ readonly reverse: {
135
+ readonly on: "$users";
136
+ readonly has: "many";
137
+ readonly label: "organizations";
138
+ };
139
+ };
140
+ settingsOrganization: {
141
+ readonly forward: {
142
+ readonly on: "app_settings";
143
+ readonly has: "one";
144
+ readonly label: "organization";
145
+ };
146
+ readonly reverse: {
147
+ readonly on: "organizations";
148
+ readonly has: "many";
149
+ readonly label: "settings";
150
+ };
151
+ };
152
+ notificationUser: {
153
+ readonly forward: {
154
+ readonly on: "notifications";
155
+ readonly has: "one";
156
+ readonly label: "user";
157
+ };
158
+ readonly reverse: {
159
+ readonly on: "$users";
160
+ readonly has: "many";
161
+ readonly label: "notifications";
162
+ };
163
+ };
164
+ notificationTransaction: {
165
+ readonly forward: {
166
+ readonly on: "notifications";
167
+ readonly has: "one";
168
+ readonly label: "relatedTransaction";
169
+ };
170
+ readonly reverse: {
171
+ readonly on: "transactions";
172
+ readonly has: "many";
173
+ readonly label: "notifications";
174
+ };
175
+ };
176
+ notificationProject: {
177
+ readonly forward: {
178
+ readonly on: "notifications";
179
+ readonly has: "one";
180
+ readonly label: "relatedProject";
181
+ };
182
+ readonly reverse: {
183
+ readonly on: "projects";
184
+ readonly has: "many";
185
+ readonly label: "notifications";
186
+ };
187
+ };
188
+ }>, import("@instantdb/core").LinksDef<any>>, import("@instantdb/core").LinksDef<any>, import("@instantdb/core").RoomsDef>;
2
189
  export type AppSchema = typeof instantSchema;
3
190
  export default instantSchema;
4
191
  //# sourceMappingURL=instant-schema-migration-example.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"instant-schema-migration-example.d.ts","sourceRoot":"","sources":["../../src/__type_tests__/instant-schema-migration-example.ts"],"names":[],"mappings":"AAoKA,eAAO,MAAM,aAAa,wRAAwC,CAAC;AASnE,MAAM,MAAM,SAAS,GAAG,OAAO,aAAa,CAAC;AAC7C,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"instant-schema-migration-example.d.ts","sourceRoot":"","sources":["../../src/__type_tests__/instant-schema-migration-example.ts"],"names":[],"mappings":"AAoKA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0HAAwC,CAAC;AASnE,MAAM,MAAM,SAAS,GAAG,OAAO,aAAa,CAAC;AAC7C,eAAe,aAAa,CAAC"}
@@ -0,0 +1,95 @@
1
+ declare const schema: import("@instantdb/core").InstantSchemaDef<import("@instantdb/core").EntitiesWithLinks<{
2
+ $users: import("@instantdb/core").EntityDef<any, any, any>;
3
+ $files: import("@instantdb/core").EntityDef<any, any, any>;
4
+ test_a_items: import("@instantdb/core").EntityDef<{
5
+ name: import("@instantdb/core").DataAttrDef<string, true, false>;
6
+ value: import("@instantdb/core").DataAttrDef<number, true, false>;
7
+ createdAt: import("@instantdb/core").DataAttrDef<Date, true, false>;
8
+ }, {}, void>;
9
+ test_b_items: import("@instantdb/core").EntityDef<{
10
+ title: import("@instantdb/core").DataAttrDef<string, true, false>;
11
+ status: import("@instantdb/core").DataAttrDef<string, true, false>;
12
+ createdAt: import("@instantdb/core").DataAttrDef<Date, true, false>;
13
+ }, {}, void>;
14
+ combined_items: import("@instantdb/core").EntityDef<{
15
+ description: import("@instantdb/core").DataAttrDef<string, true, false>;
16
+ priority: import("@instantdb/core").DataAttrDef<number, false, false>;
17
+ createdAt: import("@instantdb/core").DataAttrDef<Date, true, false>;
18
+ }, {}, void>;
19
+ }, {
20
+ testAItemsOwner: {
21
+ readonly forward: {
22
+ readonly on: "test_a_items";
23
+ readonly has: "one";
24
+ readonly label: "owner";
25
+ };
26
+ readonly reverse: {
27
+ readonly on: "$users";
28
+ readonly has: "many";
29
+ readonly label: "owned_test_a_items";
30
+ };
31
+ };
32
+ testBItemsCreator: {
33
+ readonly forward: {
34
+ readonly on: "test_b_items";
35
+ readonly has: "one";
36
+ readonly label: "creator";
37
+ };
38
+ readonly reverse: {
39
+ readonly on: "$users";
40
+ readonly has: "many";
41
+ readonly label: "created_test_b_items";
42
+ };
43
+ };
44
+ testBItemsRelated: {
45
+ readonly forward: {
46
+ readonly on: "test_b_items";
47
+ readonly has: "one";
48
+ readonly label: "related";
49
+ };
50
+ readonly reverse: {
51
+ readonly on: "test_a_items";
52
+ readonly has: "many";
53
+ readonly label: "test_b_items";
54
+ };
55
+ };
56
+ combinedItemsParent: {
57
+ readonly forward: {
58
+ readonly on: "combined_items";
59
+ readonly has: "one";
60
+ readonly label: "parent";
61
+ };
62
+ readonly reverse: {
63
+ readonly on: "test_b_items";
64
+ readonly has: "many";
65
+ readonly label: "combined_items";
66
+ };
67
+ };
68
+ combinedItemsOwner: {
69
+ readonly forward: {
70
+ readonly on: "combined_items";
71
+ readonly has: "one";
72
+ readonly label: "owner";
73
+ };
74
+ readonly reverse: {
75
+ readonly on: "$users";
76
+ readonly has: "many";
77
+ readonly label: "owned_combined_items";
78
+ };
79
+ };
80
+ combinedItemsFiles: {
81
+ readonly forward: {
82
+ readonly on: "combined_items";
83
+ readonly has: "many";
84
+ readonly label: "files";
85
+ };
86
+ readonly reverse: {
87
+ readonly on: "$files";
88
+ readonly has: "one";
89
+ readonly label: "combined_item";
90
+ };
91
+ };
92
+ }>, import("@instantdb/core").LinksDef<any>, import("@instantdb/core").RoomsDef>;
93
+ export type TestSchema = typeof schema;
94
+ export default schema;
95
+ //# sourceMappingURL=test.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test.schema.d.ts","sourceRoot":"","sources":["../../src/__type_tests__/test.schema.ts"],"names":[],"mappings":"AAqFA,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gFAAuC,CAAC;AAEpD,MAAM,MAAM,UAAU,GAAG,OAAO,MAAM,CAAC;AACvC,eAAe,MAAM,CAAC"}
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // Schema file for testing with instant-cli push
4
+ // This schema demonstrates all domain builder features:
5
+ // - Multiple domains with includes
6
+ // - Cross-domain links
7
+ // - Links to base entities ($users, $files)
8
+ // - Complex entity relationships
9
+ const index_1 = require("../index");
10
+ const core_1 = require("@instantdb/core");
11
+ // Domain A: Core entities
12
+ const testDomainA = (0, index_1.domain)("testA").schema({
13
+ entities: {
14
+ test_a_items: core_1.i.entity({
15
+ name: core_1.i.string(),
16
+ value: core_1.i.number(),
17
+ createdAt: core_1.i.date(),
18
+ }),
19
+ },
20
+ links: {
21
+ testAItemsOwner: {
22
+ forward: { on: "test_a_items", has: "one", label: "owner" },
23
+ reverse: { on: "$users", has: "many", label: "owned_test_a_items" },
24
+ },
25
+ },
26
+ rooms: {},
27
+ });
28
+ // Domain B: Includes Domain A and adds its own entities with cross-domain links
29
+ const testDomainB = (0, index_1.domain)("testB")
30
+ .includes(testDomainA)
31
+ .schema({
32
+ entities: {
33
+ test_b_items: core_1.i.entity({
34
+ title: core_1.i.string(),
35
+ status: core_1.i.string(),
36
+ createdAt: core_1.i.date(),
37
+ }),
38
+ },
39
+ links: {
40
+ testBItemsCreator: {
41
+ forward: { on: "test_b_items", has: "one", label: "creator" },
42
+ reverse: { on: "$users", has: "many", label: "created_test_b_items" },
43
+ },
44
+ // Cross-domain link: references test_a_items from included domain
45
+ testBItemsRelated: {
46
+ forward: { on: "test_b_items", has: "one", label: "related" },
47
+ reverse: { on: "test_a_items", has: "many", label: "test_b_items" },
48
+ },
49
+ },
50
+ rooms: {},
51
+ });
52
+ // Combined schema: Includes both domains and adds final entities
53
+ // This demonstrates the full power of domain composition
54
+ const combinedTestSchema = (0, index_1.domain)("combined")
55
+ .includes(testDomainA)
56
+ .includes(testDomainB)
57
+ .schema({
58
+ entities: {
59
+ combined_items: core_1.i.entity({
60
+ description: core_1.i.string(),
61
+ priority: core_1.i.number().optional(),
62
+ createdAt: core_1.i.date(),
63
+ }),
64
+ },
65
+ links: {
66
+ // Link to entities from included domains
67
+ combinedItemsParent: {
68
+ forward: { on: "combined_items", has: "one", label: "parent" },
69
+ reverse: { on: "test_b_items", has: "many", label: "combined_items" },
70
+ },
71
+ // Link to base entities
72
+ combinedItemsOwner: {
73
+ forward: { on: "combined_items", has: "one", label: "owner" },
74
+ reverse: { on: "$users", has: "many", label: "owned_combined_items" },
75
+ },
76
+ // Link to files (base entity)
77
+ combinedItemsFiles: {
78
+ forward: { on: "combined_items", has: "many", label: "files" },
79
+ reverse: { on: "$files", has: "one", label: "combined_item" },
80
+ },
81
+ },
82
+ rooms: {},
83
+ });
84
+ const schema = combinedTestSchema.toInstantSchema();
85
+ exports.default = schema;
86
+ //# sourceMappingURL=test.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test.schema.js","sourceRoot":"","sources":["../../src/__type_tests__/test.schema.ts"],"names":[],"mappings":";;AAAA,gDAAgD;AAChD,wDAAwD;AACxD,mCAAmC;AACnC,uBAAuB;AACvB,4CAA4C;AAC5C,iCAAiC;AACjC,oCAAkC;AAClC,0CAAoC;AAEpC,0BAA0B;AAC1B,MAAM,WAAW,GAAG,IAAA,cAAM,EAAC,OAAO,CAAC,CAAC,MAAM,CAAC;IACzC,QAAQ,EAAE;QACR,YAAY,EAAE,QAAC,CAAC,MAAM,CAAC;YACrB,IAAI,EAAE,QAAC,CAAC,MAAM,EAAE;YAChB,KAAK,EAAE,QAAC,CAAC,MAAM,EAAE;YACjB,SAAS,EAAE,QAAC,CAAC,IAAI,EAAE;SACpB,CAAC;KACH;IACD,KAAK,EAAE;QACL,eAAe,EAAE;YACf,OAAO,EAAE,EAAE,EAAE,EAAE,cAAc,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE;YAC3D,OAAO,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAA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