@synap-core/types 1.4.0 → 1.6.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.
- package/.turbo/turbo-build.log +24 -25
- package/dist/chunk-57QVUVYZ.js +31 -0
- package/dist/{chunk-E4TRCFI3.js → chunk-UB7K27KX.js} +6 -0
- package/dist/{chunk-2WHAWBZ4.js → chunk-VQJVKYGD.js} +811 -335
- package/dist/documents/index.d.ts +3 -122
- package/dist/documents/index.js +1 -1
- package/dist/entities/index.d.ts +43 -22
- package/dist/entities/index.js +3 -21
- package/dist/events/index.d.ts +1 -1
- package/dist/index.d.ts +419 -34
- package/dist/index.js +118 -22
- package/dist/preferences/index.js +1 -1
- package/dist/proposals/index.d.ts +122 -12
- package/dist/proposals/index.js +1 -1
- package/dist/users/index.d.ts +2 -2
- package/dist/views/index.d.ts +36 -4
- package/dist/views/index.js +1 -1
- package/dist/workspaces/index.d.ts +1 -0
- package/package.json +3 -3
- package/src/entities/index.ts +1 -5
- package/src/entities/schemas.ts +7 -145
- package/src/entities/types.ts +47 -92
- package/src/hub-protocol/index.ts +8 -8
- package/src/index.ts +6 -0
- package/src/messages/enums.ts +76 -0
- package/src/messages/index.ts +8 -0
- package/src/messages/types.ts +66 -0
- package/src/profiles/index.ts +94 -0
- package/src/views/index.ts +16 -3
- package/src/views/query.ts +10 -1
- package/src/views/schema.ts +16 -2
- package/src/views/schemas.ts +8 -0
- package/synap-core-types-1.4.0.tgz +0 -0
- package/dist/chunk-DYNDZON6.js +0 -203
- package/dist/types-DEHO6DAD.d.ts +0 -662
- package/src/entities/guards.ts +0 -52
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
> @synap-core/types@1.
|
|
2
|
+
> @synap-core/types@1.5.0 build /Users/antoine/Documents/Code/synap/synap-backend/packages/types
|
|
3
3
|
> tsup
|
|
4
4
|
|
|
5
|
-
CLI Building entry: src/index.ts, src/documents/index.ts, src/
|
|
5
|
+
CLI Building entry: src/index.ts, src/documents/index.ts, src/events/index.ts, src/entities/index.ts, src/inbox/index.ts, src/preferences/index.ts, src/proposals/index.ts, src/realtime/index.ts, src/relations/index.ts, src/users/index.ts, src/views/index.ts, src/workspaces/index.ts
|
|
6
6
|
CLI Using tsconfig: tsconfig.json
|
|
7
7
|
CLI tsup v8.5.1
|
|
8
8
|
CLI Using tsup config: /Users/antoine/Documents/Code/synap/synap-backend/packages/types/tsup.config.ts
|
|
@@ -11,40 +11,39 @@ CLI Cleaning output folder
|
|
|
11
11
|
ESM Build start
|
|
12
12
|
ESM dist/chunk-QAWJ6GM3.js 0 B
|
|
13
13
|
ESM dist/chunk-2N5ZC5EB.js 0 B
|
|
14
|
-
ESM dist/chunk-SAGFDFV4.js 0 B
|
|
15
|
-
ESM dist/chunk-GX24H4PF.js 0 B
|
|
16
14
|
ESM dist/chunk-IZA3UKBT.js 0 B
|
|
15
|
+
ESM dist/chunk-SAGFDFV4.js 0 B
|
|
17
16
|
ESM dist/chunk-BBMRDSWW.js 0 B
|
|
18
17
|
ESM dist/chunk-X5L3VJJZ.js 0 B
|
|
19
|
-
ESM dist/
|
|
20
|
-
ESM dist/
|
|
18
|
+
ESM dist/workspaces/index.js 31.00 B
|
|
19
|
+
ESM dist/chunk-GX24H4PF.js 0 B
|
|
21
20
|
ESM dist/relations/index.js 31.00 B
|
|
22
|
-
ESM dist/chunk-
|
|
23
|
-
ESM dist/index.js
|
|
24
|
-
ESM dist/
|
|
25
|
-
ESM dist/
|
|
26
|
-
ESM dist/chunk-
|
|
21
|
+
ESM dist/chunk-UB7K27KX.js 4.32 KB
|
|
22
|
+
ESM dist/index.js 22.84 KB
|
|
23
|
+
ESM dist/users/index.js 31.00 B
|
|
24
|
+
ESM dist/entities/index.js 82.00 B
|
|
25
|
+
ESM dist/chunk-57QVUVYZ.js 909.00 B
|
|
27
26
|
ESM dist/inbox/index.js 31.00 B
|
|
28
|
-
ESM dist/chunk-46DY5LY3.js 2.29 KB
|
|
29
|
-
ESM dist/documents/index.js 329.00 B
|
|
30
27
|
ESM dist/preferences/index.js 413.00 B
|
|
31
|
-
ESM dist/
|
|
32
|
-
ESM dist/
|
|
28
|
+
ESM dist/events/index.js 405.00 B
|
|
29
|
+
ESM dist/documents/index.js 329.00 B
|
|
30
|
+
ESM dist/chunk-VQJVKYGD.js 76.75 KB
|
|
33
31
|
ESM dist/proposals/index.js 177.00 B
|
|
34
|
-
ESM dist/
|
|
35
|
-
ESM
|
|
32
|
+
ESM dist/views/index.js 642.00 B
|
|
33
|
+
ESM dist/chunk-46DY5LY3.js 2.29 KB
|
|
34
|
+
ESM dist/realtime/index.js 31.00 B
|
|
35
|
+
ESM ⚡️ Build success in 23ms
|
|
36
36
|
DTS Build start
|
|
37
|
-
DTS ⚡️ Build success in
|
|
37
|
+
DTS ⚡️ Build success in 20925ms
|
|
38
38
|
DTS dist/inbox/index.d.ts 13.00 B
|
|
39
39
|
DTS dist/events/index.d.ts 4.12 KB
|
|
40
40
|
DTS dist/realtime/index.d.ts 1.54 KB
|
|
41
|
-
DTS dist/proposals/index.d.ts
|
|
41
|
+
DTS dist/proposals/index.d.ts 22.09 KB
|
|
42
42
|
DTS dist/relations/index.d.ts 6.55 KB
|
|
43
|
-
DTS dist/workspaces/index.d.ts 16.
|
|
43
|
+
DTS dist/workspaces/index.d.ts 16.68 KB
|
|
44
44
|
DTS dist/preferences/index.d.ts 28.77 KB
|
|
45
|
-
DTS dist/views/index.d.ts
|
|
46
|
-
DTS dist/index.d.ts
|
|
47
|
-
DTS dist/documents/index.d.ts
|
|
48
|
-
DTS dist/entities/index.d.ts 1.
|
|
45
|
+
DTS dist/views/index.d.ts 19.90 KB
|
|
46
|
+
DTS dist/index.d.ts 111.79 KB
|
|
47
|
+
DTS dist/documents/index.d.ts 38.31 KB
|
|
48
|
+
DTS dist/entities/index.d.ts 1.79 KB
|
|
49
49
|
DTS dist/users/index.d.ts 23.96 KB
|
|
50
|
-
DTS dist/types-DEHO6DAD.d.ts 22.55 KB
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// src/entities/types.ts
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
var EntitySchema = z.object({
|
|
4
|
+
id: z.string().uuid(),
|
|
5
|
+
userId: z.string(),
|
|
6
|
+
workspaceId: z.string().nullable(),
|
|
7
|
+
type: z.string(),
|
|
8
|
+
// Profile slug (dynamic, not enum)
|
|
9
|
+
profileId: z.string().uuid().nullable(),
|
|
10
|
+
// FK to profiles table
|
|
11
|
+
title: z.string().nullable(),
|
|
12
|
+
preview: z.string().nullable(),
|
|
13
|
+
documentId: z.string().uuid().nullable(),
|
|
14
|
+
properties: z.record(z.string(), z.unknown()),
|
|
15
|
+
// Validated properties (source of truth)
|
|
16
|
+
// metadata field removed - use properties instead
|
|
17
|
+
fileUrl: z.string().nullable(),
|
|
18
|
+
filePath: z.string().nullable(),
|
|
19
|
+
fileSize: z.number().nullable(),
|
|
20
|
+
fileType: z.string().nullable(),
|
|
21
|
+
checksum: z.string().nullable(),
|
|
22
|
+
projectIds: z.array(z.string().uuid()).nullable(),
|
|
23
|
+
version: z.number(),
|
|
24
|
+
createdAt: z.date(),
|
|
25
|
+
updatedAt: z.date(),
|
|
26
|
+
deletedAt: z.date().nullable()
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export {
|
|
30
|
+
EntitySchema
|
|
31
|
+
};
|
|
@@ -50,7 +50,13 @@ var SortRuleSchema = z.object({
|
|
|
50
50
|
direction: z.enum(["asc", "desc"])
|
|
51
51
|
});
|
|
52
52
|
var EntityQuerySchema = z.object({
|
|
53
|
+
/** @deprecated - Profile IDs now stored in views.scopeProfileIds */
|
|
54
|
+
profileIds: z.array(z.string().uuid()).optional(),
|
|
55
|
+
/** @deprecated - Profile slugs now stored in views.scopeProfileIds (resolved to IDs) */
|
|
56
|
+
profileSlugs: z.array(z.string()).optional(),
|
|
57
|
+
/** @deprecated - Use profileSlugs instead, which is also deprecated */
|
|
53
58
|
entityTypes: z.array(z.string()).optional(),
|
|
59
|
+
/** Specific entity IDs (for fixed sets) */
|
|
54
60
|
entityIds: z.array(z.string().uuid()).optional(),
|
|
55
61
|
filters: z.array(EntityFilterSchema).optional(),
|
|
56
62
|
sorts: z.array(SortRuleSchema).optional(),
|