@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.
@@ -1,8 +1,8 @@
1
1
 
2
- > @synap-core/types@1.3.0 build /Users/antoine/Documents/Code/synap/synap-backend/packages/types
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/entities/index.ts, src/events/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
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/views/index.js 642.00 B
20
- ESM dist/users/index.js 31.00 B
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-E4TRCFI3.js 3.94 KB
23
- ESM dist/index.js 19.09 KB
24
- ESM dist/entities/index.js 372.00 B
25
- ESM dist/events/index.js 405.00 B
26
- ESM dist/chunk-DYNDZON6.js 5.78 KB
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/realtime/index.js 31.00 B
32
- ESM dist/chunk-2WHAWBZ4.js 58.65 KB
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/workspaces/index.js 31.00 B
35
- ESM ⚡️ Build success in 27ms
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 38324ms
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 18.73 KB
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.65 KB
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 18.33 KB
46
- DTS dist/index.d.ts 99.35 KB
47
- DTS dist/documents/index.d.ts 41.91 KB
48
- DTS dist/entities/index.d.ts 1.25 KB
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(),