@synap-core/types 0.3.1 → 0.3.2
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/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/realtime/index.d.ts +21 -1
- package/package.json +1 -1
- package/src/realtime/index.ts +22 -0
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export { CalendarInboxItem, EmailInboxItem, INBOX_SCHEMAS, InboxItem, InboxItemT
|
|
|
5
5
|
export { CreateWorkspaceInput, InviteMemberInput, UpdateWorkspaceInput, WorkspaceRole, WorkspaceType } from './workspaces/index.js';
|
|
6
6
|
export { CreateViewInput, SaveViewInput, UpdateViewInput, ViewType } from './views/index.js';
|
|
7
7
|
export { Theme, UpdatePreferencesInput } from './preferences/index.js';
|
|
8
|
-
export { CollaborationEvent, CursorUpdate, PresenceInit, PresenceStatus, UserPresence } from './realtime/index.js';
|
|
8
|
+
export { CollaborationEvent, CursorUpdate, PresenceInit, PresenceStatus, UserJoinedEvent, UserLeftEvent, UserPresence } from './realtime/index.js';
|
|
9
9
|
export { AIProposalEvent, AIProposalStatusEvent, ChatMessageEvent, ChatStreamEvent, DocumentUpdatedEvent, DocumentVersionCreatedEvent, DomainClientToServerEvents, DomainEventName, DomainEventNames, DomainServerToClientEvents, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent } from './events/index.js';
|
|
10
10
|
export { Array as YArray, Doc as YDoc, Map as YMap, Text as YText } from 'yjs';
|
|
11
11
|
import 'zod';
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import "./chunk-ZTGPGYVX.js";
|
|
2
2
|
import "./chunk-IZA3UKBT.js";
|
|
3
3
|
import "./chunk-7LKCNZXD.js";
|
|
4
|
-
import {
|
|
5
|
-
DomainEventNames
|
|
6
|
-
} from "./chunk-6OHYLFUB.js";
|
|
7
4
|
import {
|
|
8
5
|
ENTITY_SCHEMAS,
|
|
9
6
|
isEntityOfType,
|
|
@@ -15,6 +12,9 @@ import {
|
|
|
15
12
|
safeValidateEntityMetadata,
|
|
16
13
|
validateEntityMetadata
|
|
17
14
|
} from "./chunk-OPLFDITK.js";
|
|
15
|
+
import {
|
|
16
|
+
DomainEventNames
|
|
17
|
+
} from "./chunk-6OHYLFUB.js";
|
|
18
18
|
import {
|
|
19
19
|
INBOX_SCHEMAS,
|
|
20
20
|
isCalendarInboxItem,
|
package/dist/realtime/index.d.ts
CHANGED
|
@@ -53,5 +53,25 @@ interface CursorUpdate {
|
|
|
53
53
|
y: number;
|
|
54
54
|
viewId: string;
|
|
55
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* User joined event (emitted when user joins a workspace/document)
|
|
58
|
+
*/
|
|
59
|
+
interface UserJoinedEvent {
|
|
60
|
+
userId: string;
|
|
61
|
+
userName: string;
|
|
62
|
+
workspaceId: string;
|
|
63
|
+
documentId?: string;
|
|
64
|
+
color?: string;
|
|
65
|
+
timestamp: number;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* User left event (emitted when user leaves a workspace/document)
|
|
69
|
+
*/
|
|
70
|
+
interface UserLeftEvent {
|
|
71
|
+
userId: string;
|
|
72
|
+
workspaceId: string;
|
|
73
|
+
documentId?: string;
|
|
74
|
+
timestamp: number;
|
|
75
|
+
}
|
|
56
76
|
|
|
57
|
-
export type { CollaborationEvent, CursorUpdate, PresenceInit, PresenceStatus, UserPresence };
|
|
77
|
+
export type { CollaborationEvent, CursorUpdate, PresenceInit, PresenceStatus, UserJoinedEvent, UserLeftEvent, UserPresence };
|
package/package.json
CHANGED
package/src/realtime/index.ts
CHANGED
|
@@ -58,3 +58,25 @@ export interface CursorUpdate {
|
|
|
58
58
|
y: number;
|
|
59
59
|
viewId: string;
|
|
60
60
|
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* User joined event (emitted when user joins a workspace/document)
|
|
64
|
+
*/
|
|
65
|
+
export interface UserJoinedEvent {
|
|
66
|
+
userId: string;
|
|
67
|
+
userName: string;
|
|
68
|
+
workspaceId: string;
|
|
69
|
+
documentId?: string;
|
|
70
|
+
color?: string;
|
|
71
|
+
timestamp: number;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* User left event (emitted when user leaves a workspace/document)
|
|
76
|
+
*/
|
|
77
|
+
export interface UserLeftEvent {
|
|
78
|
+
userId: string;
|
|
79
|
+
workspaceId: string;
|
|
80
|
+
documentId?: string;
|
|
81
|
+
timestamp: number;
|
|
82
|
+
}
|