@pixerate/schemas 1.26.0 → 1.27.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/dist/chunk-OHQPRGDT.js +275 -0
- package/dist/index.cjs +1578 -1573
- package/dist/index.d.cts +41 -1257
- package/dist/index.d.ts +41 -1257
- package/dist/index.js +32 -241
- package/dist/realtime.cjs +327 -0
- package/dist/realtime.d.cts +1236 -0
- package/dist/realtime.d.ts +1236 -0
- package/dist/realtime.js +62 -0
- package/package.json +8 -2
|
@@ -0,0 +1,1236 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Realtime collaboration contracts used by @pixerate/realtime: presence, cursors,
|
|
5
|
+
* indicators, record locks, activity, OT/CRDT, channels and grid events.
|
|
6
|
+
*
|
|
7
|
+
* Also available as the `@pixerate/schemas/realtime` entry point, which client bundles
|
|
8
|
+
* should prefer: it doesn't pull in the rest of the schemas.
|
|
9
|
+
*/
|
|
10
|
+
declare const PresenceColorSchema: z.ZodEnum<["slate", "gray", "zinc", "neutral", "stone", "red", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "fuchsia", "pink", "rose"]>;
|
|
11
|
+
type PresenceColor = z.infer<typeof PresenceColorSchema>;
|
|
12
|
+
declare const PresenceStatusSchema: z.ZodEnum<["online", "idle", "away", "busy", "offline", "planning", "thinking", "executing_tool", "waiting_for_input", "waiting_for_agent", "streaming", "paused", "error"]>;
|
|
13
|
+
type PresenceStatus = z.infer<typeof PresenceStatusSchema>;
|
|
14
|
+
declare const ActorTypeSchema: z.ZodEnum<["human", "agent", "system"]>;
|
|
15
|
+
type ActorType = z.infer<typeof ActorTypeSchema>;
|
|
16
|
+
declare const AgentActorMetadataSchema: z.ZodObject<{
|
|
17
|
+
role: z.ZodOptional<z.ZodString>;
|
|
18
|
+
parentAgentId: z.ZodOptional<z.ZodString>;
|
|
19
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
20
|
+
currentTask: z.ZodOptional<z.ZodString>;
|
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
role?: string | undefined;
|
|
23
|
+
parentAgentId?: string | undefined;
|
|
24
|
+
runId?: string | undefined;
|
|
25
|
+
currentTask?: string | undefined;
|
|
26
|
+
}, {
|
|
27
|
+
role?: string | undefined;
|
|
28
|
+
parentAgentId?: string | undefined;
|
|
29
|
+
runId?: string | undefined;
|
|
30
|
+
currentTask?: string | undefined;
|
|
31
|
+
}>;
|
|
32
|
+
type AgentActorMetadata = z.infer<typeof AgentActorMetadataSchema>;
|
|
33
|
+
declare const PresenceUserSchema: z.ZodObject<{
|
|
34
|
+
id: z.ZodString;
|
|
35
|
+
username: z.ZodOptional<z.ZodString>;
|
|
36
|
+
email: z.ZodOptional<z.ZodString>;
|
|
37
|
+
avatarUrl: z.ZodOptional<z.ZodString>;
|
|
38
|
+
actorType: z.ZodOptional<z.ZodEnum<["human", "agent", "system"]>>;
|
|
39
|
+
color: z.ZodDefault<z.ZodOptional<z.ZodEnum<["slate", "gray", "zinc", "neutral", "stone", "red", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "fuchsia", "pink", "rose"]>>>;
|
|
40
|
+
status: z.ZodDefault<z.ZodOptional<z.ZodEnum<["online", "idle", "away", "busy", "offline", "planning", "thinking", "executing_tool", "waiting_for_input", "waiting_for_agent", "streaming", "paused", "error"]>>>;
|
|
41
|
+
agent: z.ZodOptional<z.ZodObject<{
|
|
42
|
+
role: z.ZodOptional<z.ZodString>;
|
|
43
|
+
parentAgentId: z.ZodOptional<z.ZodString>;
|
|
44
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
45
|
+
currentTask: z.ZodOptional<z.ZodString>;
|
|
46
|
+
}, "strip", z.ZodTypeAny, {
|
|
47
|
+
role?: string | undefined;
|
|
48
|
+
parentAgentId?: string | undefined;
|
|
49
|
+
runId?: string | undefined;
|
|
50
|
+
currentTask?: string | undefined;
|
|
51
|
+
}, {
|
|
52
|
+
role?: string | undefined;
|
|
53
|
+
parentAgentId?: string | undefined;
|
|
54
|
+
runId?: string | undefined;
|
|
55
|
+
currentTask?: string | undefined;
|
|
56
|
+
}>>;
|
|
57
|
+
lastSeen: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
58
|
+
metadata: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
59
|
+
}, "strip", z.ZodTypeAny, {
|
|
60
|
+
status: "error" | "online" | "idle" | "away" | "busy" | "offline" | "planning" | "thinking" | "executing_tool" | "waiting_for_input" | "waiting_for_agent" | "streaming" | "paused";
|
|
61
|
+
color: "neutral" | "gray" | "slate" | "zinc" | "stone" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose";
|
|
62
|
+
id: string;
|
|
63
|
+
metadata: Record<string, unknown>;
|
|
64
|
+
lastSeen: number;
|
|
65
|
+
email?: string | undefined;
|
|
66
|
+
agent?: {
|
|
67
|
+
role?: string | undefined;
|
|
68
|
+
parentAgentId?: string | undefined;
|
|
69
|
+
runId?: string | undefined;
|
|
70
|
+
currentTask?: string | undefined;
|
|
71
|
+
} | undefined;
|
|
72
|
+
avatarUrl?: string | undefined;
|
|
73
|
+
username?: string | undefined;
|
|
74
|
+
actorType?: "agent" | "system" | "human" | undefined;
|
|
75
|
+
}, {
|
|
76
|
+
id: string;
|
|
77
|
+
status?: "error" | "online" | "idle" | "away" | "busy" | "offline" | "planning" | "thinking" | "executing_tool" | "waiting_for_input" | "waiting_for_agent" | "streaming" | "paused" | undefined;
|
|
78
|
+
color?: "neutral" | "gray" | "slate" | "zinc" | "stone" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose" | undefined;
|
|
79
|
+
email?: string | undefined;
|
|
80
|
+
agent?: {
|
|
81
|
+
role?: string | undefined;
|
|
82
|
+
parentAgentId?: string | undefined;
|
|
83
|
+
runId?: string | undefined;
|
|
84
|
+
currentTask?: string | undefined;
|
|
85
|
+
} | undefined;
|
|
86
|
+
metadata?: Record<string, unknown> | undefined;
|
|
87
|
+
avatarUrl?: string | undefined;
|
|
88
|
+
username?: string | undefined;
|
|
89
|
+
actorType?: "agent" | "system" | "human" | undefined;
|
|
90
|
+
lastSeen?: number | undefined;
|
|
91
|
+
}>;
|
|
92
|
+
type PresenceUser = z.infer<typeof PresenceUserSchema>;
|
|
93
|
+
declare const ViewportTransformSchema: z.ZodObject<{
|
|
94
|
+
zoom: z.ZodDefault<z.ZodNumber>;
|
|
95
|
+
panX: z.ZodDefault<z.ZodNumber>;
|
|
96
|
+
panY: z.ZodDefault<z.ZodNumber>;
|
|
97
|
+
}, "strip", z.ZodTypeAny, {
|
|
98
|
+
zoom: number;
|
|
99
|
+
panX: number;
|
|
100
|
+
panY: number;
|
|
101
|
+
}, {
|
|
102
|
+
zoom?: number | undefined;
|
|
103
|
+
panX?: number | undefined;
|
|
104
|
+
panY?: number | undefined;
|
|
105
|
+
}>;
|
|
106
|
+
type ViewportTransform = z.infer<typeof ViewportTransformSchema>;
|
|
107
|
+
declare const CursorPositionSchema: z.ZodObject<{
|
|
108
|
+
userId: z.ZodString;
|
|
109
|
+
x: z.ZodNumber;
|
|
110
|
+
y: z.ZodNumber;
|
|
111
|
+
lastUpdate: z.ZodDefault<z.ZodNumber>;
|
|
112
|
+
username: z.ZodOptional<z.ZodString>;
|
|
113
|
+
avatarUrl: z.ZodOptional<z.ZodString>;
|
|
114
|
+
color: z.ZodOptional<z.ZodEnum<["slate", "gray", "zinc", "neutral", "stone", "red", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "fuchsia", "pink", "rose"]>>;
|
|
115
|
+
viewport: z.ZodOptional<z.ZodObject<{
|
|
116
|
+
zoom: z.ZodDefault<z.ZodNumber>;
|
|
117
|
+
panX: z.ZodDefault<z.ZodNumber>;
|
|
118
|
+
panY: z.ZodDefault<z.ZodNumber>;
|
|
119
|
+
}, "strip", z.ZodTypeAny, {
|
|
120
|
+
zoom: number;
|
|
121
|
+
panX: number;
|
|
122
|
+
panY: number;
|
|
123
|
+
}, {
|
|
124
|
+
zoom?: number | undefined;
|
|
125
|
+
panX?: number | undefined;
|
|
126
|
+
panY?: number | undefined;
|
|
127
|
+
}>>;
|
|
128
|
+
}, "strip", z.ZodTypeAny, {
|
|
129
|
+
x: number;
|
|
130
|
+
y: number;
|
|
131
|
+
userId: string;
|
|
132
|
+
lastUpdate: number;
|
|
133
|
+
color?: "neutral" | "gray" | "slate" | "zinc" | "stone" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose" | undefined;
|
|
134
|
+
avatarUrl?: string | undefined;
|
|
135
|
+
username?: string | undefined;
|
|
136
|
+
viewport?: {
|
|
137
|
+
zoom: number;
|
|
138
|
+
panX: number;
|
|
139
|
+
panY: number;
|
|
140
|
+
} | undefined;
|
|
141
|
+
}, {
|
|
142
|
+
x: number;
|
|
143
|
+
y: number;
|
|
144
|
+
userId: string;
|
|
145
|
+
color?: "neutral" | "gray" | "slate" | "zinc" | "stone" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose" | undefined;
|
|
146
|
+
avatarUrl?: string | undefined;
|
|
147
|
+
username?: string | undefined;
|
|
148
|
+
lastUpdate?: number | undefined;
|
|
149
|
+
viewport?: {
|
|
150
|
+
zoom?: number | undefined;
|
|
151
|
+
panX?: number | undefined;
|
|
152
|
+
panY?: number | undefined;
|
|
153
|
+
} | undefined;
|
|
154
|
+
}>;
|
|
155
|
+
type CursorPosition = z.infer<typeof CursorPositionSchema>;
|
|
156
|
+
declare const PresenceStateSchema: z.ZodObject<{
|
|
157
|
+
roomId: z.ZodString;
|
|
158
|
+
presences: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
159
|
+
id: z.ZodString;
|
|
160
|
+
username: z.ZodOptional<z.ZodString>;
|
|
161
|
+
email: z.ZodOptional<z.ZodString>;
|
|
162
|
+
avatarUrl: z.ZodOptional<z.ZodString>;
|
|
163
|
+
actorType: z.ZodOptional<z.ZodEnum<["human", "agent", "system"]>>;
|
|
164
|
+
color: z.ZodDefault<z.ZodOptional<z.ZodEnum<["slate", "gray", "zinc", "neutral", "stone", "red", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "fuchsia", "pink", "rose"]>>>;
|
|
165
|
+
status: z.ZodDefault<z.ZodOptional<z.ZodEnum<["online", "idle", "away", "busy", "offline", "planning", "thinking", "executing_tool", "waiting_for_input", "waiting_for_agent", "streaming", "paused", "error"]>>>;
|
|
166
|
+
agent: z.ZodOptional<z.ZodObject<{
|
|
167
|
+
role: z.ZodOptional<z.ZodString>;
|
|
168
|
+
parentAgentId: z.ZodOptional<z.ZodString>;
|
|
169
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
170
|
+
currentTask: z.ZodOptional<z.ZodString>;
|
|
171
|
+
}, "strip", z.ZodTypeAny, {
|
|
172
|
+
role?: string | undefined;
|
|
173
|
+
parentAgentId?: string | undefined;
|
|
174
|
+
runId?: string | undefined;
|
|
175
|
+
currentTask?: string | undefined;
|
|
176
|
+
}, {
|
|
177
|
+
role?: string | undefined;
|
|
178
|
+
parentAgentId?: string | undefined;
|
|
179
|
+
runId?: string | undefined;
|
|
180
|
+
currentTask?: string | undefined;
|
|
181
|
+
}>>;
|
|
182
|
+
lastSeen: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
183
|
+
metadata: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
184
|
+
}, "strip", z.ZodTypeAny, {
|
|
185
|
+
status: "error" | "online" | "idle" | "away" | "busy" | "offline" | "planning" | "thinking" | "executing_tool" | "waiting_for_input" | "waiting_for_agent" | "streaming" | "paused";
|
|
186
|
+
color: "neutral" | "gray" | "slate" | "zinc" | "stone" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose";
|
|
187
|
+
id: string;
|
|
188
|
+
metadata: Record<string, unknown>;
|
|
189
|
+
lastSeen: number;
|
|
190
|
+
email?: string | undefined;
|
|
191
|
+
agent?: {
|
|
192
|
+
role?: string | undefined;
|
|
193
|
+
parentAgentId?: string | undefined;
|
|
194
|
+
runId?: string | undefined;
|
|
195
|
+
currentTask?: string | undefined;
|
|
196
|
+
} | undefined;
|
|
197
|
+
avatarUrl?: string | undefined;
|
|
198
|
+
username?: string | undefined;
|
|
199
|
+
actorType?: "agent" | "system" | "human" | undefined;
|
|
200
|
+
}, {
|
|
201
|
+
id: string;
|
|
202
|
+
status?: "error" | "online" | "idle" | "away" | "busy" | "offline" | "planning" | "thinking" | "executing_tool" | "waiting_for_input" | "waiting_for_agent" | "streaming" | "paused" | undefined;
|
|
203
|
+
color?: "neutral" | "gray" | "slate" | "zinc" | "stone" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose" | undefined;
|
|
204
|
+
email?: string | undefined;
|
|
205
|
+
agent?: {
|
|
206
|
+
role?: string | undefined;
|
|
207
|
+
parentAgentId?: string | undefined;
|
|
208
|
+
runId?: string | undefined;
|
|
209
|
+
currentTask?: string | undefined;
|
|
210
|
+
} | undefined;
|
|
211
|
+
metadata?: Record<string, unknown> | undefined;
|
|
212
|
+
avatarUrl?: string | undefined;
|
|
213
|
+
username?: string | undefined;
|
|
214
|
+
actorType?: "agent" | "system" | "human" | undefined;
|
|
215
|
+
lastSeen?: number | undefined;
|
|
216
|
+
}>>>;
|
|
217
|
+
cursors: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
218
|
+
userId: z.ZodString;
|
|
219
|
+
x: z.ZodNumber;
|
|
220
|
+
y: z.ZodNumber;
|
|
221
|
+
lastUpdate: z.ZodDefault<z.ZodNumber>;
|
|
222
|
+
username: z.ZodOptional<z.ZodString>;
|
|
223
|
+
avatarUrl: z.ZodOptional<z.ZodString>;
|
|
224
|
+
color: z.ZodOptional<z.ZodEnum<["slate", "gray", "zinc", "neutral", "stone", "red", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "fuchsia", "pink", "rose"]>>;
|
|
225
|
+
viewport: z.ZodOptional<z.ZodObject<{
|
|
226
|
+
zoom: z.ZodDefault<z.ZodNumber>;
|
|
227
|
+
panX: z.ZodDefault<z.ZodNumber>;
|
|
228
|
+
panY: z.ZodDefault<z.ZodNumber>;
|
|
229
|
+
}, "strip", z.ZodTypeAny, {
|
|
230
|
+
zoom: number;
|
|
231
|
+
panX: number;
|
|
232
|
+
panY: number;
|
|
233
|
+
}, {
|
|
234
|
+
zoom?: number | undefined;
|
|
235
|
+
panX?: number | undefined;
|
|
236
|
+
panY?: number | undefined;
|
|
237
|
+
}>>;
|
|
238
|
+
}, "strip", z.ZodTypeAny, {
|
|
239
|
+
x: number;
|
|
240
|
+
y: number;
|
|
241
|
+
userId: string;
|
|
242
|
+
lastUpdate: number;
|
|
243
|
+
color?: "neutral" | "gray" | "slate" | "zinc" | "stone" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose" | undefined;
|
|
244
|
+
avatarUrl?: string | undefined;
|
|
245
|
+
username?: string | undefined;
|
|
246
|
+
viewport?: {
|
|
247
|
+
zoom: number;
|
|
248
|
+
panX: number;
|
|
249
|
+
panY: number;
|
|
250
|
+
} | undefined;
|
|
251
|
+
}, {
|
|
252
|
+
x: number;
|
|
253
|
+
y: number;
|
|
254
|
+
userId: string;
|
|
255
|
+
color?: "neutral" | "gray" | "slate" | "zinc" | "stone" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose" | undefined;
|
|
256
|
+
avatarUrl?: string | undefined;
|
|
257
|
+
username?: string | undefined;
|
|
258
|
+
lastUpdate?: number | undefined;
|
|
259
|
+
viewport?: {
|
|
260
|
+
zoom?: number | undefined;
|
|
261
|
+
panX?: number | undefined;
|
|
262
|
+
panY?: number | undefined;
|
|
263
|
+
} | undefined;
|
|
264
|
+
}>>>;
|
|
265
|
+
}, "strip", z.ZodTypeAny, {
|
|
266
|
+
roomId: string;
|
|
267
|
+
presences: Record<string, {
|
|
268
|
+
status: "error" | "online" | "idle" | "away" | "busy" | "offline" | "planning" | "thinking" | "executing_tool" | "waiting_for_input" | "waiting_for_agent" | "streaming" | "paused";
|
|
269
|
+
color: "neutral" | "gray" | "slate" | "zinc" | "stone" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose";
|
|
270
|
+
id: string;
|
|
271
|
+
metadata: Record<string, unknown>;
|
|
272
|
+
lastSeen: number;
|
|
273
|
+
email?: string | undefined;
|
|
274
|
+
agent?: {
|
|
275
|
+
role?: string | undefined;
|
|
276
|
+
parentAgentId?: string | undefined;
|
|
277
|
+
runId?: string | undefined;
|
|
278
|
+
currentTask?: string | undefined;
|
|
279
|
+
} | undefined;
|
|
280
|
+
avatarUrl?: string | undefined;
|
|
281
|
+
username?: string | undefined;
|
|
282
|
+
actorType?: "agent" | "system" | "human" | undefined;
|
|
283
|
+
}>;
|
|
284
|
+
cursors: Record<string, {
|
|
285
|
+
x: number;
|
|
286
|
+
y: number;
|
|
287
|
+
userId: string;
|
|
288
|
+
lastUpdate: number;
|
|
289
|
+
color?: "neutral" | "gray" | "slate" | "zinc" | "stone" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose" | undefined;
|
|
290
|
+
avatarUrl?: string | undefined;
|
|
291
|
+
username?: string | undefined;
|
|
292
|
+
viewport?: {
|
|
293
|
+
zoom: number;
|
|
294
|
+
panX: number;
|
|
295
|
+
panY: number;
|
|
296
|
+
} | undefined;
|
|
297
|
+
}>;
|
|
298
|
+
}, {
|
|
299
|
+
roomId: string;
|
|
300
|
+
presences?: Record<string, {
|
|
301
|
+
id: string;
|
|
302
|
+
status?: "error" | "online" | "idle" | "away" | "busy" | "offline" | "planning" | "thinking" | "executing_tool" | "waiting_for_input" | "waiting_for_agent" | "streaming" | "paused" | undefined;
|
|
303
|
+
color?: "neutral" | "gray" | "slate" | "zinc" | "stone" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose" | undefined;
|
|
304
|
+
email?: string | undefined;
|
|
305
|
+
agent?: {
|
|
306
|
+
role?: string | undefined;
|
|
307
|
+
parentAgentId?: string | undefined;
|
|
308
|
+
runId?: string | undefined;
|
|
309
|
+
currentTask?: string | undefined;
|
|
310
|
+
} | undefined;
|
|
311
|
+
metadata?: Record<string, unknown> | undefined;
|
|
312
|
+
avatarUrl?: string | undefined;
|
|
313
|
+
username?: string | undefined;
|
|
314
|
+
actorType?: "agent" | "system" | "human" | undefined;
|
|
315
|
+
lastSeen?: number | undefined;
|
|
316
|
+
}> | undefined;
|
|
317
|
+
cursors?: Record<string, {
|
|
318
|
+
x: number;
|
|
319
|
+
y: number;
|
|
320
|
+
userId: string;
|
|
321
|
+
color?: "neutral" | "gray" | "slate" | "zinc" | "stone" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose" | undefined;
|
|
322
|
+
avatarUrl?: string | undefined;
|
|
323
|
+
username?: string | undefined;
|
|
324
|
+
lastUpdate?: number | undefined;
|
|
325
|
+
viewport?: {
|
|
326
|
+
zoom?: number | undefined;
|
|
327
|
+
panX?: number | undefined;
|
|
328
|
+
panY?: number | undefined;
|
|
329
|
+
} | undefined;
|
|
330
|
+
}> | undefined;
|
|
331
|
+
}>;
|
|
332
|
+
type PresenceState = z.infer<typeof PresenceStateSchema>;
|
|
333
|
+
interface PresenceJoinEvent {
|
|
334
|
+
key: string;
|
|
335
|
+
newPresences: PresenceUser[];
|
|
336
|
+
}
|
|
337
|
+
interface PresenceLeaveEvent {
|
|
338
|
+
key: string;
|
|
339
|
+
leftPresences: PresenceUser[];
|
|
340
|
+
}
|
|
341
|
+
interface CursorUpdateEvent {
|
|
342
|
+
userId: string;
|
|
343
|
+
x: number;
|
|
344
|
+
y: number;
|
|
345
|
+
username?: string;
|
|
346
|
+
avatarUrl?: string;
|
|
347
|
+
color?: PresenceColor;
|
|
348
|
+
viewport?: ViewportTransform;
|
|
349
|
+
lastUpdate: number;
|
|
350
|
+
}
|
|
351
|
+
interface PresenceHeartbeat {
|
|
352
|
+
userId: string;
|
|
353
|
+
timestamp: number;
|
|
354
|
+
status: PresenceStatus;
|
|
355
|
+
}
|
|
356
|
+
declare const ViewingIndicatorSchema: z.ZodObject<{
|
|
357
|
+
userId: z.ZodString;
|
|
358
|
+
resourceId: z.ZodString;
|
|
359
|
+
resourceType: z.ZodDefault<z.ZodEnum<["board", "document", "item", "node", "canvas", "page", "field"]>>;
|
|
360
|
+
username: z.ZodOptional<z.ZodString>;
|
|
361
|
+
avatarUrl: z.ZodOptional<z.ZodString>;
|
|
362
|
+
color: z.ZodOptional<z.ZodEnum<["slate", "gray", "zinc", "neutral", "stone", "red", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "fuchsia", "pink", "rose"]>>;
|
|
363
|
+
lastSeen: z.ZodDefault<z.ZodNumber>;
|
|
364
|
+
}, "strip", z.ZodTypeAny, {
|
|
365
|
+
userId: string;
|
|
366
|
+
lastSeen: number;
|
|
367
|
+
resourceId: string;
|
|
368
|
+
resourceType: "field" | "board" | "document" | "item" | "node" | "canvas" | "page";
|
|
369
|
+
color?: "neutral" | "gray" | "slate" | "zinc" | "stone" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose" | undefined;
|
|
370
|
+
avatarUrl?: string | undefined;
|
|
371
|
+
username?: string | undefined;
|
|
372
|
+
}, {
|
|
373
|
+
userId: string;
|
|
374
|
+
resourceId: string;
|
|
375
|
+
color?: "neutral" | "gray" | "slate" | "zinc" | "stone" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose" | undefined;
|
|
376
|
+
avatarUrl?: string | undefined;
|
|
377
|
+
username?: string | undefined;
|
|
378
|
+
lastSeen?: number | undefined;
|
|
379
|
+
resourceType?: "field" | "board" | "document" | "item" | "node" | "canvas" | "page" | undefined;
|
|
380
|
+
}>;
|
|
381
|
+
type ViewingIndicator = z.infer<typeof ViewingIndicatorSchema>;
|
|
382
|
+
declare const TypingIndicatorSchema: z.ZodObject<{
|
|
383
|
+
userId: z.ZodString;
|
|
384
|
+
resourceId: z.ZodString;
|
|
385
|
+
fieldName: z.ZodOptional<z.ZodString>;
|
|
386
|
+
username: z.ZodOptional<z.ZodString>;
|
|
387
|
+
avatarUrl: z.ZodOptional<z.ZodString>;
|
|
388
|
+
color: z.ZodOptional<z.ZodEnum<["slate", "gray", "zinc", "neutral", "stone", "red", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "fuchsia", "pink", "rose"]>>;
|
|
389
|
+
isTyping: z.ZodDefault<z.ZodBoolean>;
|
|
390
|
+
timestamp: z.ZodDefault<z.ZodNumber>;
|
|
391
|
+
}, "strip", z.ZodTypeAny, {
|
|
392
|
+
timestamp: number;
|
|
393
|
+
userId: string;
|
|
394
|
+
resourceId: string;
|
|
395
|
+
isTyping: boolean;
|
|
396
|
+
color?: "neutral" | "gray" | "slate" | "zinc" | "stone" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose" | undefined;
|
|
397
|
+
avatarUrl?: string | undefined;
|
|
398
|
+
username?: string | undefined;
|
|
399
|
+
fieldName?: string | undefined;
|
|
400
|
+
}, {
|
|
401
|
+
userId: string;
|
|
402
|
+
resourceId: string;
|
|
403
|
+
color?: "neutral" | "gray" | "slate" | "zinc" | "stone" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose" | undefined;
|
|
404
|
+
timestamp?: number | undefined;
|
|
405
|
+
avatarUrl?: string | undefined;
|
|
406
|
+
username?: string | undefined;
|
|
407
|
+
fieldName?: string | undefined;
|
|
408
|
+
isTyping?: boolean | undefined;
|
|
409
|
+
}>;
|
|
410
|
+
type TypingIndicator = z.infer<typeof TypingIndicatorSchema>;
|
|
411
|
+
declare const FieldPresenceSchema: z.ZodObject<{
|
|
412
|
+
fieldId: z.ZodString;
|
|
413
|
+
focusedBy: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
414
|
+
id: z.ZodString;
|
|
415
|
+
username: z.ZodOptional<z.ZodString>;
|
|
416
|
+
email: z.ZodOptional<z.ZodString>;
|
|
417
|
+
avatarUrl: z.ZodOptional<z.ZodString>;
|
|
418
|
+
actorType: z.ZodOptional<z.ZodEnum<["human", "agent", "system"]>>;
|
|
419
|
+
color: z.ZodDefault<z.ZodOptional<z.ZodEnum<["slate", "gray", "zinc", "neutral", "stone", "red", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "fuchsia", "pink", "rose"]>>>;
|
|
420
|
+
status: z.ZodDefault<z.ZodOptional<z.ZodEnum<["online", "idle", "away", "busy", "offline", "planning", "thinking", "executing_tool", "waiting_for_input", "waiting_for_agent", "streaming", "paused", "error"]>>>;
|
|
421
|
+
agent: z.ZodOptional<z.ZodObject<{
|
|
422
|
+
role: z.ZodOptional<z.ZodString>;
|
|
423
|
+
parentAgentId: z.ZodOptional<z.ZodString>;
|
|
424
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
425
|
+
currentTask: z.ZodOptional<z.ZodString>;
|
|
426
|
+
}, "strip", z.ZodTypeAny, {
|
|
427
|
+
role?: string | undefined;
|
|
428
|
+
parentAgentId?: string | undefined;
|
|
429
|
+
runId?: string | undefined;
|
|
430
|
+
currentTask?: string | undefined;
|
|
431
|
+
}, {
|
|
432
|
+
role?: string | undefined;
|
|
433
|
+
parentAgentId?: string | undefined;
|
|
434
|
+
runId?: string | undefined;
|
|
435
|
+
currentTask?: string | undefined;
|
|
436
|
+
}>>;
|
|
437
|
+
lastSeen: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
438
|
+
metadata: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
439
|
+
}, "strip", z.ZodTypeAny, {
|
|
440
|
+
status: "error" | "online" | "idle" | "away" | "busy" | "offline" | "planning" | "thinking" | "executing_tool" | "waiting_for_input" | "waiting_for_agent" | "streaming" | "paused";
|
|
441
|
+
color: "neutral" | "gray" | "slate" | "zinc" | "stone" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose";
|
|
442
|
+
id: string;
|
|
443
|
+
metadata: Record<string, unknown>;
|
|
444
|
+
lastSeen: number;
|
|
445
|
+
email?: string | undefined;
|
|
446
|
+
agent?: {
|
|
447
|
+
role?: string | undefined;
|
|
448
|
+
parentAgentId?: string | undefined;
|
|
449
|
+
runId?: string | undefined;
|
|
450
|
+
currentTask?: string | undefined;
|
|
451
|
+
} | undefined;
|
|
452
|
+
avatarUrl?: string | undefined;
|
|
453
|
+
username?: string | undefined;
|
|
454
|
+
actorType?: "agent" | "system" | "human" | undefined;
|
|
455
|
+
}, {
|
|
456
|
+
id: string;
|
|
457
|
+
status?: "error" | "online" | "idle" | "away" | "busy" | "offline" | "planning" | "thinking" | "executing_tool" | "waiting_for_input" | "waiting_for_agent" | "streaming" | "paused" | undefined;
|
|
458
|
+
color?: "neutral" | "gray" | "slate" | "zinc" | "stone" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose" | undefined;
|
|
459
|
+
email?: string | undefined;
|
|
460
|
+
agent?: {
|
|
461
|
+
role?: string | undefined;
|
|
462
|
+
parentAgentId?: string | undefined;
|
|
463
|
+
runId?: string | undefined;
|
|
464
|
+
currentTask?: string | undefined;
|
|
465
|
+
} | undefined;
|
|
466
|
+
metadata?: Record<string, unknown> | undefined;
|
|
467
|
+
avatarUrl?: string | undefined;
|
|
468
|
+
username?: string | undefined;
|
|
469
|
+
actorType?: "agent" | "system" | "human" | undefined;
|
|
470
|
+
lastSeen?: number | undefined;
|
|
471
|
+
}>, "many">>;
|
|
472
|
+
typingUsers: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
473
|
+
userId: z.ZodString;
|
|
474
|
+
resourceId: z.ZodString;
|
|
475
|
+
fieldName: z.ZodOptional<z.ZodString>;
|
|
476
|
+
username: z.ZodOptional<z.ZodString>;
|
|
477
|
+
avatarUrl: z.ZodOptional<z.ZodString>;
|
|
478
|
+
color: z.ZodOptional<z.ZodEnum<["slate", "gray", "zinc", "neutral", "stone", "red", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "fuchsia", "pink", "rose"]>>;
|
|
479
|
+
isTyping: z.ZodDefault<z.ZodBoolean>;
|
|
480
|
+
timestamp: z.ZodDefault<z.ZodNumber>;
|
|
481
|
+
}, "strip", z.ZodTypeAny, {
|
|
482
|
+
timestamp: number;
|
|
483
|
+
userId: string;
|
|
484
|
+
resourceId: string;
|
|
485
|
+
isTyping: boolean;
|
|
486
|
+
color?: "neutral" | "gray" | "slate" | "zinc" | "stone" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose" | undefined;
|
|
487
|
+
avatarUrl?: string | undefined;
|
|
488
|
+
username?: string | undefined;
|
|
489
|
+
fieldName?: string | undefined;
|
|
490
|
+
}, {
|
|
491
|
+
userId: string;
|
|
492
|
+
resourceId: string;
|
|
493
|
+
color?: "neutral" | "gray" | "slate" | "zinc" | "stone" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose" | undefined;
|
|
494
|
+
timestamp?: number | undefined;
|
|
495
|
+
avatarUrl?: string | undefined;
|
|
496
|
+
username?: string | undefined;
|
|
497
|
+
fieldName?: string | undefined;
|
|
498
|
+
isTyping?: boolean | undefined;
|
|
499
|
+
}>, "many">>;
|
|
500
|
+
}, "strip", z.ZodTypeAny, {
|
|
501
|
+
fieldId: string;
|
|
502
|
+
focusedBy: {
|
|
503
|
+
status: "error" | "online" | "idle" | "away" | "busy" | "offline" | "planning" | "thinking" | "executing_tool" | "waiting_for_input" | "waiting_for_agent" | "streaming" | "paused";
|
|
504
|
+
color: "neutral" | "gray" | "slate" | "zinc" | "stone" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose";
|
|
505
|
+
id: string;
|
|
506
|
+
metadata: Record<string, unknown>;
|
|
507
|
+
lastSeen: number;
|
|
508
|
+
email?: string | undefined;
|
|
509
|
+
agent?: {
|
|
510
|
+
role?: string | undefined;
|
|
511
|
+
parentAgentId?: string | undefined;
|
|
512
|
+
runId?: string | undefined;
|
|
513
|
+
currentTask?: string | undefined;
|
|
514
|
+
} | undefined;
|
|
515
|
+
avatarUrl?: string | undefined;
|
|
516
|
+
username?: string | undefined;
|
|
517
|
+
actorType?: "agent" | "system" | "human" | undefined;
|
|
518
|
+
}[];
|
|
519
|
+
typingUsers: {
|
|
520
|
+
timestamp: number;
|
|
521
|
+
userId: string;
|
|
522
|
+
resourceId: string;
|
|
523
|
+
isTyping: boolean;
|
|
524
|
+
color?: "neutral" | "gray" | "slate" | "zinc" | "stone" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose" | undefined;
|
|
525
|
+
avatarUrl?: string | undefined;
|
|
526
|
+
username?: string | undefined;
|
|
527
|
+
fieldName?: string | undefined;
|
|
528
|
+
}[];
|
|
529
|
+
}, {
|
|
530
|
+
fieldId: string;
|
|
531
|
+
focusedBy?: {
|
|
532
|
+
id: string;
|
|
533
|
+
status?: "error" | "online" | "idle" | "away" | "busy" | "offline" | "planning" | "thinking" | "executing_tool" | "waiting_for_input" | "waiting_for_agent" | "streaming" | "paused" | undefined;
|
|
534
|
+
color?: "neutral" | "gray" | "slate" | "zinc" | "stone" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose" | undefined;
|
|
535
|
+
email?: string | undefined;
|
|
536
|
+
agent?: {
|
|
537
|
+
role?: string | undefined;
|
|
538
|
+
parentAgentId?: string | undefined;
|
|
539
|
+
runId?: string | undefined;
|
|
540
|
+
currentTask?: string | undefined;
|
|
541
|
+
} | undefined;
|
|
542
|
+
metadata?: Record<string, unknown> | undefined;
|
|
543
|
+
avatarUrl?: string | undefined;
|
|
544
|
+
username?: string | undefined;
|
|
545
|
+
actorType?: "agent" | "system" | "human" | undefined;
|
|
546
|
+
lastSeen?: number | undefined;
|
|
547
|
+
}[] | undefined;
|
|
548
|
+
typingUsers?: {
|
|
549
|
+
userId: string;
|
|
550
|
+
resourceId: string;
|
|
551
|
+
color?: "neutral" | "gray" | "slate" | "zinc" | "stone" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose" | undefined;
|
|
552
|
+
timestamp?: number | undefined;
|
|
553
|
+
avatarUrl?: string | undefined;
|
|
554
|
+
username?: string | undefined;
|
|
555
|
+
fieldName?: string | undefined;
|
|
556
|
+
isTyping?: boolean | undefined;
|
|
557
|
+
}[] | undefined;
|
|
558
|
+
}>;
|
|
559
|
+
type FieldPresence = z.infer<typeof FieldPresenceSchema>;
|
|
560
|
+
interface ViewingChangeEvent {
|
|
561
|
+
resourceId: string;
|
|
562
|
+
resourceType: string;
|
|
563
|
+
viewers: ViewingIndicator[];
|
|
564
|
+
}
|
|
565
|
+
interface TypingChangeEvent {
|
|
566
|
+
resourceId: string;
|
|
567
|
+
fieldName?: string;
|
|
568
|
+
typingUsers: TypingIndicator[];
|
|
569
|
+
}
|
|
570
|
+
declare const LockStatusSchema: z.ZodEnum<["unlocked", "locked", "expired", "claimed"]>;
|
|
571
|
+
type LockStatus = z.infer<typeof LockStatusSchema>;
|
|
572
|
+
declare const RecordLockInfoSchema: z.ZodObject<{
|
|
573
|
+
userId: z.ZodString;
|
|
574
|
+
username: z.ZodOptional<z.ZodString>;
|
|
575
|
+
clientId: z.ZodOptional<z.ZodString>;
|
|
576
|
+
avatarUrl: z.ZodOptional<z.ZodString>;
|
|
577
|
+
}, "strip", z.ZodTypeAny, {
|
|
578
|
+
userId: string;
|
|
579
|
+
avatarUrl?: string | undefined;
|
|
580
|
+
username?: string | undefined;
|
|
581
|
+
clientId?: string | undefined;
|
|
582
|
+
}, {
|
|
583
|
+
userId: string;
|
|
584
|
+
avatarUrl?: string | undefined;
|
|
585
|
+
username?: string | undefined;
|
|
586
|
+
clientId?: string | undefined;
|
|
587
|
+
}>;
|
|
588
|
+
type RecordLockInfo = z.infer<typeof RecordLockInfoSchema>;
|
|
589
|
+
declare const RecordLockSchema: z.ZodObject<{
|
|
590
|
+
id: z.ZodString;
|
|
591
|
+
resourceId: z.ZodString;
|
|
592
|
+
resourceType: z.ZodDefault<z.ZodString>;
|
|
593
|
+
lockedBy: z.ZodObject<{
|
|
594
|
+
userId: z.ZodString;
|
|
595
|
+
username: z.ZodOptional<z.ZodString>;
|
|
596
|
+
clientId: z.ZodOptional<z.ZodString>;
|
|
597
|
+
avatarUrl: z.ZodOptional<z.ZodString>;
|
|
598
|
+
}, "strip", z.ZodTypeAny, {
|
|
599
|
+
userId: string;
|
|
600
|
+
avatarUrl?: string | undefined;
|
|
601
|
+
username?: string | undefined;
|
|
602
|
+
clientId?: string | undefined;
|
|
603
|
+
}, {
|
|
604
|
+
userId: string;
|
|
605
|
+
avatarUrl?: string | undefined;
|
|
606
|
+
username?: string | undefined;
|
|
607
|
+
clientId?: string | undefined;
|
|
608
|
+
}>;
|
|
609
|
+
lockedAt: z.ZodNumber;
|
|
610
|
+
expiresAt: z.ZodNumber;
|
|
611
|
+
leaseDurationSeconds: z.ZodDefault<z.ZodNumber>;
|
|
612
|
+
status: z.ZodDefault<z.ZodEnum<["unlocked", "locked", "expired", "claimed"]>>;
|
|
613
|
+
metadata: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
614
|
+
}, "strip", z.ZodTypeAny, {
|
|
615
|
+
status: "expired" | "unlocked" | "locked" | "claimed";
|
|
616
|
+
id: string;
|
|
617
|
+
metadata: Record<string, unknown>;
|
|
618
|
+
expiresAt: number;
|
|
619
|
+
resourceId: string;
|
|
620
|
+
resourceType: string;
|
|
621
|
+
lockedBy: {
|
|
622
|
+
userId: string;
|
|
623
|
+
avatarUrl?: string | undefined;
|
|
624
|
+
username?: string | undefined;
|
|
625
|
+
clientId?: string | undefined;
|
|
626
|
+
};
|
|
627
|
+
lockedAt: number;
|
|
628
|
+
leaseDurationSeconds: number;
|
|
629
|
+
}, {
|
|
630
|
+
id: string;
|
|
631
|
+
expiresAt: number;
|
|
632
|
+
resourceId: string;
|
|
633
|
+
lockedBy: {
|
|
634
|
+
userId: string;
|
|
635
|
+
avatarUrl?: string | undefined;
|
|
636
|
+
username?: string | undefined;
|
|
637
|
+
clientId?: string | undefined;
|
|
638
|
+
};
|
|
639
|
+
lockedAt: number;
|
|
640
|
+
status?: "expired" | "unlocked" | "locked" | "claimed" | undefined;
|
|
641
|
+
metadata?: Record<string, unknown> | undefined;
|
|
642
|
+
resourceType?: string | undefined;
|
|
643
|
+
leaseDurationSeconds?: number | undefined;
|
|
644
|
+
}>;
|
|
645
|
+
type RecordLock = z.infer<typeof RecordLockSchema>;
|
|
646
|
+
declare const LockClaimRequestSchema: z.ZodObject<{
|
|
647
|
+
resourceId: z.ZodString;
|
|
648
|
+
resourceType: z.ZodDefault<z.ZodString>;
|
|
649
|
+
userId: z.ZodString;
|
|
650
|
+
username: z.ZodOptional<z.ZodString>;
|
|
651
|
+
clientId: z.ZodOptional<z.ZodString>;
|
|
652
|
+
avatarUrl: z.ZodOptional<z.ZodString>;
|
|
653
|
+
leaseDurationSeconds: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
654
|
+
force: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
655
|
+
metadata: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
656
|
+
}, "strip", z.ZodTypeAny, {
|
|
657
|
+
metadata: Record<string, unknown>;
|
|
658
|
+
userId: string;
|
|
659
|
+
resourceId: string;
|
|
660
|
+
resourceType: string;
|
|
661
|
+
leaseDurationSeconds: number;
|
|
662
|
+
force: boolean;
|
|
663
|
+
avatarUrl?: string | undefined;
|
|
664
|
+
username?: string | undefined;
|
|
665
|
+
clientId?: string | undefined;
|
|
666
|
+
}, {
|
|
667
|
+
userId: string;
|
|
668
|
+
resourceId: string;
|
|
669
|
+
metadata?: Record<string, unknown> | undefined;
|
|
670
|
+
avatarUrl?: string | undefined;
|
|
671
|
+
username?: string | undefined;
|
|
672
|
+
resourceType?: string | undefined;
|
|
673
|
+
clientId?: string | undefined;
|
|
674
|
+
leaseDurationSeconds?: number | undefined;
|
|
675
|
+
force?: boolean | undefined;
|
|
676
|
+
}>;
|
|
677
|
+
type LockClaimRequest = z.infer<typeof LockClaimRequestSchema>;
|
|
678
|
+
declare const LockReleaseRequestSchema: z.ZodObject<{
|
|
679
|
+
resourceId: z.ZodString;
|
|
680
|
+
resourceType: z.ZodDefault<z.ZodString>;
|
|
681
|
+
userId: z.ZodString;
|
|
682
|
+
clientId: z.ZodOptional<z.ZodString>;
|
|
683
|
+
force: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
684
|
+
}, "strip", z.ZodTypeAny, {
|
|
685
|
+
userId: string;
|
|
686
|
+
resourceId: string;
|
|
687
|
+
resourceType: string;
|
|
688
|
+
force: boolean;
|
|
689
|
+
clientId?: string | undefined;
|
|
690
|
+
}, {
|
|
691
|
+
userId: string;
|
|
692
|
+
resourceId: string;
|
|
693
|
+
resourceType?: string | undefined;
|
|
694
|
+
clientId?: string | undefined;
|
|
695
|
+
force?: boolean | undefined;
|
|
696
|
+
}>;
|
|
697
|
+
type LockReleaseRequest = z.infer<typeof LockReleaseRequestSchema>;
|
|
698
|
+
declare const LockHeartbeatRequestSchema: z.ZodObject<{
|
|
699
|
+
resourceId: z.ZodString;
|
|
700
|
+
resourceType: z.ZodDefault<z.ZodString>;
|
|
701
|
+
userId: z.ZodString;
|
|
702
|
+
clientId: z.ZodOptional<z.ZodString>;
|
|
703
|
+
leaseDurationSeconds: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
704
|
+
}, "strip", z.ZodTypeAny, {
|
|
705
|
+
userId: string;
|
|
706
|
+
resourceId: string;
|
|
707
|
+
resourceType: string;
|
|
708
|
+
leaseDurationSeconds: number;
|
|
709
|
+
clientId?: string | undefined;
|
|
710
|
+
}, {
|
|
711
|
+
userId: string;
|
|
712
|
+
resourceId: string;
|
|
713
|
+
resourceType?: string | undefined;
|
|
714
|
+
clientId?: string | undefined;
|
|
715
|
+
leaseDurationSeconds?: number | undefined;
|
|
716
|
+
}>;
|
|
717
|
+
type LockHeartbeatRequest = z.infer<typeof LockHeartbeatRequestSchema>;
|
|
718
|
+
interface LockAcquisitionResult {
|
|
719
|
+
success: boolean;
|
|
720
|
+
acquired?: boolean;
|
|
721
|
+
lock?: RecordLock;
|
|
722
|
+
conflict?: RecordLock;
|
|
723
|
+
existingLock?: RecordLock;
|
|
724
|
+
reason?: "already_locked" | "unauthorized" | "channel_error" | "network_error";
|
|
725
|
+
error?: string;
|
|
726
|
+
}
|
|
727
|
+
interface LockChangeEvent {
|
|
728
|
+
resourceId: string;
|
|
729
|
+
resourceType: string;
|
|
730
|
+
status: LockStatus;
|
|
731
|
+
lock?: RecordLock;
|
|
732
|
+
}
|
|
733
|
+
declare const ActivityActionTypeSchema: z.ZodEnum<["join", "leave", "create", "update", "delete", "lock", "unlock", "claim", "comment", "generate", "star", "unstar", "custom", "agent:thought", "agent:plan_updated", "agent:tool_start", "agent:tool_end", "agent:approval_requested", "agent:approval_resolved", "agent:error"]>;
|
|
734
|
+
type ActivityActionType = z.infer<typeof ActivityActionTypeSchema>;
|
|
735
|
+
declare const ActivityActorSchema: z.ZodObject<{
|
|
736
|
+
userId: z.ZodString;
|
|
737
|
+
username: z.ZodOptional<z.ZodString>;
|
|
738
|
+
avatarUrl: z.ZodOptional<z.ZodString>;
|
|
739
|
+
actorType: z.ZodOptional<z.ZodEnum<["human", "agent", "system"]>>;
|
|
740
|
+
role: z.ZodOptional<z.ZodString>;
|
|
741
|
+
color: z.ZodOptional<z.ZodEnum<["slate", "gray", "zinc", "neutral", "stone", "red", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "fuchsia", "pink", "rose"]>>;
|
|
742
|
+
}, "strip", z.ZodTypeAny, {
|
|
743
|
+
userId: string;
|
|
744
|
+
color?: "neutral" | "gray" | "slate" | "zinc" | "stone" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose" | undefined;
|
|
745
|
+
role?: string | undefined;
|
|
746
|
+
avatarUrl?: string | undefined;
|
|
747
|
+
username?: string | undefined;
|
|
748
|
+
actorType?: "agent" | "system" | "human" | undefined;
|
|
749
|
+
}, {
|
|
750
|
+
userId: string;
|
|
751
|
+
color?: "neutral" | "gray" | "slate" | "zinc" | "stone" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose" | undefined;
|
|
752
|
+
role?: string | undefined;
|
|
753
|
+
avatarUrl?: string | undefined;
|
|
754
|
+
username?: string | undefined;
|
|
755
|
+
actorType?: "agent" | "system" | "human" | undefined;
|
|
756
|
+
}>;
|
|
757
|
+
type ActivityActor = z.infer<typeof ActivityActorSchema>;
|
|
758
|
+
declare const ActivityEventSchema: z.ZodObject<{
|
|
759
|
+
id: z.ZodString;
|
|
760
|
+
roomId: z.ZodOptional<z.ZodString>;
|
|
761
|
+
entityId: z.ZodOptional<z.ZodString>;
|
|
762
|
+
entityType: z.ZodOptional<z.ZodString>;
|
|
763
|
+
action: z.ZodEnum<["join", "leave", "create", "update", "delete", "lock", "unlock", "claim", "comment", "generate", "star", "unstar", "custom", "agent:thought", "agent:plan_updated", "agent:tool_start", "agent:tool_end", "agent:approval_requested", "agent:approval_resolved", "agent:error"]>;
|
|
764
|
+
actor: z.ZodObject<{
|
|
765
|
+
userId: z.ZodString;
|
|
766
|
+
username: z.ZodOptional<z.ZodString>;
|
|
767
|
+
avatarUrl: z.ZodOptional<z.ZodString>;
|
|
768
|
+
actorType: z.ZodOptional<z.ZodEnum<["human", "agent", "system"]>>;
|
|
769
|
+
role: z.ZodOptional<z.ZodString>;
|
|
770
|
+
color: z.ZodOptional<z.ZodEnum<["slate", "gray", "zinc", "neutral", "stone", "red", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "fuchsia", "pink", "rose"]>>;
|
|
771
|
+
}, "strip", z.ZodTypeAny, {
|
|
772
|
+
userId: string;
|
|
773
|
+
color?: "neutral" | "gray" | "slate" | "zinc" | "stone" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose" | undefined;
|
|
774
|
+
role?: string | undefined;
|
|
775
|
+
avatarUrl?: string | undefined;
|
|
776
|
+
username?: string | undefined;
|
|
777
|
+
actorType?: "agent" | "system" | "human" | undefined;
|
|
778
|
+
}, {
|
|
779
|
+
userId: string;
|
|
780
|
+
color?: "neutral" | "gray" | "slate" | "zinc" | "stone" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose" | undefined;
|
|
781
|
+
role?: string | undefined;
|
|
782
|
+
avatarUrl?: string | undefined;
|
|
783
|
+
username?: string | undefined;
|
|
784
|
+
actorType?: "agent" | "system" | "human" | undefined;
|
|
785
|
+
}>;
|
|
786
|
+
title: z.ZodOptional<z.ZodString>;
|
|
787
|
+
description: z.ZodOptional<z.ZodString>;
|
|
788
|
+
payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
789
|
+
timestamp: z.ZodDefault<z.ZodNumber>;
|
|
790
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
791
|
+
}, "strip", z.ZodTypeAny, {
|
|
792
|
+
id: string;
|
|
793
|
+
action: "join" | "custom" | "leave" | "create" | "update" | "delete" | "lock" | "unlock" | "claim" | "comment" | "generate" | "star" | "unstar" | "agent:thought" | "agent:plan_updated" | "agent:tool_start" | "agent:tool_end" | "agent:approval_requested" | "agent:approval_resolved" | "agent:error";
|
|
794
|
+
timestamp: number;
|
|
795
|
+
actor: {
|
|
796
|
+
userId: string;
|
|
797
|
+
color?: "neutral" | "gray" | "slate" | "zinc" | "stone" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose" | undefined;
|
|
798
|
+
role?: string | undefined;
|
|
799
|
+
avatarUrl?: string | undefined;
|
|
800
|
+
username?: string | undefined;
|
|
801
|
+
actorType?: "agent" | "system" | "human" | undefined;
|
|
802
|
+
};
|
|
803
|
+
title?: string | undefined;
|
|
804
|
+
description?: string | undefined;
|
|
805
|
+
metadata?: Record<string, unknown> | undefined;
|
|
806
|
+
payload?: Record<string, unknown> | undefined;
|
|
807
|
+
roomId?: string | undefined;
|
|
808
|
+
entityId?: string | undefined;
|
|
809
|
+
entityType?: string | undefined;
|
|
810
|
+
}, {
|
|
811
|
+
id: string;
|
|
812
|
+
action: "join" | "custom" | "leave" | "create" | "update" | "delete" | "lock" | "unlock" | "claim" | "comment" | "generate" | "star" | "unstar" | "agent:thought" | "agent:plan_updated" | "agent:tool_start" | "agent:tool_end" | "agent:approval_requested" | "agent:approval_resolved" | "agent:error";
|
|
813
|
+
actor: {
|
|
814
|
+
userId: string;
|
|
815
|
+
color?: "neutral" | "gray" | "slate" | "zinc" | "stone" | "red" | "orange" | "amber" | "yellow" | "lime" | "green" | "emerald" | "teal" | "cyan" | "sky" | "blue" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose" | undefined;
|
|
816
|
+
role?: string | undefined;
|
|
817
|
+
avatarUrl?: string | undefined;
|
|
818
|
+
username?: string | undefined;
|
|
819
|
+
actorType?: "agent" | "system" | "human" | undefined;
|
|
820
|
+
};
|
|
821
|
+
title?: string | undefined;
|
|
822
|
+
description?: string | undefined;
|
|
823
|
+
timestamp?: number | undefined;
|
|
824
|
+
metadata?: Record<string, unknown> | undefined;
|
|
825
|
+
payload?: Record<string, unknown> | undefined;
|
|
826
|
+
roomId?: string | undefined;
|
|
827
|
+
entityId?: string | undefined;
|
|
828
|
+
entityType?: string | undefined;
|
|
829
|
+
}>;
|
|
830
|
+
type ActivityEvent = z.infer<typeof ActivityEventSchema>;
|
|
831
|
+
declare const ActivityStreamFilterSchema: z.ZodObject<{
|
|
832
|
+
roomId: z.ZodOptional<z.ZodString>;
|
|
833
|
+
entityId: z.ZodOptional<z.ZodString>;
|
|
834
|
+
entityType: z.ZodOptional<z.ZodString>;
|
|
835
|
+
actorId: z.ZodOptional<z.ZodString>;
|
|
836
|
+
action: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["join", "leave", "create", "update", "delete", "lock", "unlock", "claim", "comment", "generate", "star", "unstar", "custom", "agent:thought", "agent:plan_updated", "agent:tool_start", "agent:tool_end", "agent:approval_requested", "agent:approval_resolved", "agent:error"]>, z.ZodArray<z.ZodEnum<["join", "leave", "create", "update", "delete", "lock", "unlock", "claim", "comment", "generate", "star", "unstar", "custom", "agent:thought", "agent:plan_updated", "agent:tool_start", "agent:tool_end", "agent:approval_requested", "agent:approval_resolved", "agent:error"]>, "many">]>>;
|
|
837
|
+
since: z.ZodOptional<z.ZodNumber>;
|
|
838
|
+
limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
839
|
+
}, "strip", z.ZodTypeAny, {
|
|
840
|
+
limit: number;
|
|
841
|
+
action?: "join" | "custom" | "leave" | "create" | "update" | "delete" | "lock" | "unlock" | "claim" | "comment" | "generate" | "star" | "unstar" | "agent:thought" | "agent:plan_updated" | "agent:tool_start" | "agent:tool_end" | "agent:approval_requested" | "agent:approval_resolved" | "agent:error" | ("join" | "custom" | "leave" | "create" | "update" | "delete" | "lock" | "unlock" | "claim" | "comment" | "generate" | "star" | "unstar" | "agent:thought" | "agent:plan_updated" | "agent:tool_start" | "agent:tool_end" | "agent:approval_requested" | "agent:approval_resolved" | "agent:error")[] | undefined;
|
|
842
|
+
roomId?: string | undefined;
|
|
843
|
+
entityId?: string | undefined;
|
|
844
|
+
entityType?: string | undefined;
|
|
845
|
+
actorId?: string | undefined;
|
|
846
|
+
since?: number | undefined;
|
|
847
|
+
}, {
|
|
848
|
+
action?: "join" | "custom" | "leave" | "create" | "update" | "delete" | "lock" | "unlock" | "claim" | "comment" | "generate" | "star" | "unstar" | "agent:thought" | "agent:plan_updated" | "agent:tool_start" | "agent:tool_end" | "agent:approval_requested" | "agent:approval_resolved" | "agent:error" | ("join" | "custom" | "leave" | "create" | "update" | "delete" | "lock" | "unlock" | "claim" | "comment" | "generate" | "star" | "unstar" | "agent:thought" | "agent:plan_updated" | "agent:tool_start" | "agent:tool_end" | "agent:approval_requested" | "agent:approval_resolved" | "agent:error")[] | undefined;
|
|
849
|
+
roomId?: string | undefined;
|
|
850
|
+
entityId?: string | undefined;
|
|
851
|
+
entityType?: string | undefined;
|
|
852
|
+
actorId?: string | undefined;
|
|
853
|
+
since?: number | undefined;
|
|
854
|
+
limit?: number | undefined;
|
|
855
|
+
}>;
|
|
856
|
+
type ActivityStreamFilter = z.infer<typeof ActivityStreamFilterSchema>;
|
|
857
|
+
interface ActivitySubscriptionOptions {
|
|
858
|
+
roomId?: string;
|
|
859
|
+
entityId?: string;
|
|
860
|
+
limit?: number;
|
|
861
|
+
since?: number;
|
|
862
|
+
}
|
|
863
|
+
declare const OTTextOpTypeSchema: z.ZodEnum<["retain", "insert", "delete"]>;
|
|
864
|
+
type OTTextOpType = z.infer<typeof OTTextOpTypeSchema>;
|
|
865
|
+
declare const OTTextOpSchema: z.ZodObject<{
|
|
866
|
+
type: z.ZodEnum<["retain", "insert", "delete"]>;
|
|
867
|
+
count: z.ZodOptional<z.ZodNumber>;
|
|
868
|
+
text: z.ZodOptional<z.ZodString>;
|
|
869
|
+
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
870
|
+
}, "strip", z.ZodTypeAny, {
|
|
871
|
+
type: "delete" | "retain" | "insert";
|
|
872
|
+
text?: string | undefined;
|
|
873
|
+
count?: number | undefined;
|
|
874
|
+
attributes?: Record<string, unknown> | undefined;
|
|
875
|
+
}, {
|
|
876
|
+
type: "delete" | "retain" | "insert";
|
|
877
|
+
text?: string | undefined;
|
|
878
|
+
count?: number | undefined;
|
|
879
|
+
attributes?: Record<string, unknown> | undefined;
|
|
880
|
+
}>;
|
|
881
|
+
type OTTextOp = z.infer<typeof OTTextOpSchema>;
|
|
882
|
+
declare const OTJsonOpTypeSchema: z.ZodEnum<["set", "delete", "insert", "move", "replace"]>;
|
|
883
|
+
type OTJsonOpType = z.infer<typeof OTJsonOpTypeSchema>;
|
|
884
|
+
declare const OTJsonOpSchema: z.ZodObject<{
|
|
885
|
+
path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
|
|
886
|
+
type: z.ZodEnum<["set", "delete", "insert", "move", "replace"]>;
|
|
887
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
888
|
+
prevValue: z.ZodOptional<z.ZodUnknown>;
|
|
889
|
+
}, "strip", z.ZodTypeAny, {
|
|
890
|
+
path: (string | number)[];
|
|
891
|
+
type: "set" | "delete" | "insert" | "move" | "replace";
|
|
892
|
+
value?: unknown;
|
|
893
|
+
prevValue?: unknown;
|
|
894
|
+
}, {
|
|
895
|
+
path: (string | number)[];
|
|
896
|
+
type: "set" | "delete" | "insert" | "move" | "replace";
|
|
897
|
+
value?: unknown;
|
|
898
|
+
prevValue?: unknown;
|
|
899
|
+
}>;
|
|
900
|
+
type OTJsonOp = z.infer<typeof OTJsonOpSchema>;
|
|
901
|
+
declare const OTOperationSchema: z.ZodObject<{
|
|
902
|
+
id: z.ZodString;
|
|
903
|
+
docId: z.ZodString;
|
|
904
|
+
revision: z.ZodNumber;
|
|
905
|
+
authorId: z.ZodString;
|
|
906
|
+
textOps: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
907
|
+
type: z.ZodEnum<["retain", "insert", "delete"]>;
|
|
908
|
+
count: z.ZodOptional<z.ZodNumber>;
|
|
909
|
+
text: z.ZodOptional<z.ZodString>;
|
|
910
|
+
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
911
|
+
}, "strip", z.ZodTypeAny, {
|
|
912
|
+
type: "delete" | "retain" | "insert";
|
|
913
|
+
text?: string | undefined;
|
|
914
|
+
count?: number | undefined;
|
|
915
|
+
attributes?: Record<string, unknown> | undefined;
|
|
916
|
+
}, {
|
|
917
|
+
type: "delete" | "retain" | "insert";
|
|
918
|
+
text?: string | undefined;
|
|
919
|
+
count?: number | undefined;
|
|
920
|
+
attributes?: Record<string, unknown> | undefined;
|
|
921
|
+
}>, "many">>;
|
|
922
|
+
jsonOps: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
923
|
+
path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
|
|
924
|
+
type: z.ZodEnum<["set", "delete", "insert", "move", "replace"]>;
|
|
925
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
926
|
+
prevValue: z.ZodOptional<z.ZodUnknown>;
|
|
927
|
+
}, "strip", z.ZodTypeAny, {
|
|
928
|
+
path: (string | number)[];
|
|
929
|
+
type: "set" | "delete" | "insert" | "move" | "replace";
|
|
930
|
+
value?: unknown;
|
|
931
|
+
prevValue?: unknown;
|
|
932
|
+
}, {
|
|
933
|
+
path: (string | number)[];
|
|
934
|
+
type: "set" | "delete" | "insert" | "move" | "replace";
|
|
935
|
+
value?: unknown;
|
|
936
|
+
prevValue?: unknown;
|
|
937
|
+
}>, "many">>;
|
|
938
|
+
timestamp: z.ZodDefault<z.ZodNumber>;
|
|
939
|
+
metadata: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
940
|
+
}, "strip", z.ZodTypeAny, {
|
|
941
|
+
id: string;
|
|
942
|
+
timestamp: number;
|
|
943
|
+
metadata: Record<string, unknown>;
|
|
944
|
+
docId: string;
|
|
945
|
+
revision: number;
|
|
946
|
+
authorId: string;
|
|
947
|
+
textOps?: {
|
|
948
|
+
type: "delete" | "retain" | "insert";
|
|
949
|
+
text?: string | undefined;
|
|
950
|
+
count?: number | undefined;
|
|
951
|
+
attributes?: Record<string, unknown> | undefined;
|
|
952
|
+
}[] | undefined;
|
|
953
|
+
jsonOps?: {
|
|
954
|
+
path: (string | number)[];
|
|
955
|
+
type: "set" | "delete" | "insert" | "move" | "replace";
|
|
956
|
+
value?: unknown;
|
|
957
|
+
prevValue?: unknown;
|
|
958
|
+
}[] | undefined;
|
|
959
|
+
}, {
|
|
960
|
+
id: string;
|
|
961
|
+
docId: string;
|
|
962
|
+
revision: number;
|
|
963
|
+
authorId: string;
|
|
964
|
+
timestamp?: number | undefined;
|
|
965
|
+
metadata?: Record<string, unknown> | undefined;
|
|
966
|
+
textOps?: {
|
|
967
|
+
type: "delete" | "retain" | "insert";
|
|
968
|
+
text?: string | undefined;
|
|
969
|
+
count?: number | undefined;
|
|
970
|
+
attributes?: Record<string, unknown> | undefined;
|
|
971
|
+
}[] | undefined;
|
|
972
|
+
jsonOps?: {
|
|
973
|
+
path: (string | number)[];
|
|
974
|
+
type: "set" | "delete" | "insert" | "move" | "replace";
|
|
975
|
+
value?: unknown;
|
|
976
|
+
prevValue?: unknown;
|
|
977
|
+
}[] | undefined;
|
|
978
|
+
}>;
|
|
979
|
+
type OTOperation = z.infer<typeof OTOperationSchema>;
|
|
980
|
+
declare const OTRevisionSchema: z.ZodObject<{
|
|
981
|
+
docId: z.ZodString;
|
|
982
|
+
revision: z.ZodNumber;
|
|
983
|
+
snapshot: z.ZodUnknown;
|
|
984
|
+
appliedOps: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
985
|
+
id: z.ZodString;
|
|
986
|
+
docId: z.ZodString;
|
|
987
|
+
revision: z.ZodNumber;
|
|
988
|
+
authorId: z.ZodString;
|
|
989
|
+
textOps: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
990
|
+
type: z.ZodEnum<["retain", "insert", "delete"]>;
|
|
991
|
+
count: z.ZodOptional<z.ZodNumber>;
|
|
992
|
+
text: z.ZodOptional<z.ZodString>;
|
|
993
|
+
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
994
|
+
}, "strip", z.ZodTypeAny, {
|
|
995
|
+
type: "delete" | "retain" | "insert";
|
|
996
|
+
text?: string | undefined;
|
|
997
|
+
count?: number | undefined;
|
|
998
|
+
attributes?: Record<string, unknown> | undefined;
|
|
999
|
+
}, {
|
|
1000
|
+
type: "delete" | "retain" | "insert";
|
|
1001
|
+
text?: string | undefined;
|
|
1002
|
+
count?: number | undefined;
|
|
1003
|
+
attributes?: Record<string, unknown> | undefined;
|
|
1004
|
+
}>, "many">>;
|
|
1005
|
+
jsonOps: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1006
|
+
path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
|
|
1007
|
+
type: z.ZodEnum<["set", "delete", "insert", "move", "replace"]>;
|
|
1008
|
+
value: z.ZodOptional<z.ZodUnknown>;
|
|
1009
|
+
prevValue: z.ZodOptional<z.ZodUnknown>;
|
|
1010
|
+
}, "strip", z.ZodTypeAny, {
|
|
1011
|
+
path: (string | number)[];
|
|
1012
|
+
type: "set" | "delete" | "insert" | "move" | "replace";
|
|
1013
|
+
value?: unknown;
|
|
1014
|
+
prevValue?: unknown;
|
|
1015
|
+
}, {
|
|
1016
|
+
path: (string | number)[];
|
|
1017
|
+
type: "set" | "delete" | "insert" | "move" | "replace";
|
|
1018
|
+
value?: unknown;
|
|
1019
|
+
prevValue?: unknown;
|
|
1020
|
+
}>, "many">>;
|
|
1021
|
+
timestamp: z.ZodDefault<z.ZodNumber>;
|
|
1022
|
+
metadata: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
1023
|
+
}, "strip", z.ZodTypeAny, {
|
|
1024
|
+
id: string;
|
|
1025
|
+
timestamp: number;
|
|
1026
|
+
metadata: Record<string, unknown>;
|
|
1027
|
+
docId: string;
|
|
1028
|
+
revision: number;
|
|
1029
|
+
authorId: string;
|
|
1030
|
+
textOps?: {
|
|
1031
|
+
type: "delete" | "retain" | "insert";
|
|
1032
|
+
text?: string | undefined;
|
|
1033
|
+
count?: number | undefined;
|
|
1034
|
+
attributes?: Record<string, unknown> | undefined;
|
|
1035
|
+
}[] | undefined;
|
|
1036
|
+
jsonOps?: {
|
|
1037
|
+
path: (string | number)[];
|
|
1038
|
+
type: "set" | "delete" | "insert" | "move" | "replace";
|
|
1039
|
+
value?: unknown;
|
|
1040
|
+
prevValue?: unknown;
|
|
1041
|
+
}[] | undefined;
|
|
1042
|
+
}, {
|
|
1043
|
+
id: string;
|
|
1044
|
+
docId: string;
|
|
1045
|
+
revision: number;
|
|
1046
|
+
authorId: string;
|
|
1047
|
+
timestamp?: number | undefined;
|
|
1048
|
+
metadata?: Record<string, unknown> | undefined;
|
|
1049
|
+
textOps?: {
|
|
1050
|
+
type: "delete" | "retain" | "insert";
|
|
1051
|
+
text?: string | undefined;
|
|
1052
|
+
count?: number | undefined;
|
|
1053
|
+
attributes?: Record<string, unknown> | undefined;
|
|
1054
|
+
}[] | undefined;
|
|
1055
|
+
jsonOps?: {
|
|
1056
|
+
path: (string | number)[];
|
|
1057
|
+
type: "set" | "delete" | "insert" | "move" | "replace";
|
|
1058
|
+
value?: unknown;
|
|
1059
|
+
prevValue?: unknown;
|
|
1060
|
+
}[] | undefined;
|
|
1061
|
+
}>, "many">>;
|
|
1062
|
+
updatedAt: z.ZodDefault<z.ZodNumber>;
|
|
1063
|
+
}, "strip", z.ZodTypeAny, {
|
|
1064
|
+
updatedAt: number;
|
|
1065
|
+
docId: string;
|
|
1066
|
+
revision: number;
|
|
1067
|
+
appliedOps: {
|
|
1068
|
+
id: string;
|
|
1069
|
+
timestamp: number;
|
|
1070
|
+
metadata: Record<string, unknown>;
|
|
1071
|
+
docId: string;
|
|
1072
|
+
revision: number;
|
|
1073
|
+
authorId: string;
|
|
1074
|
+
textOps?: {
|
|
1075
|
+
type: "delete" | "retain" | "insert";
|
|
1076
|
+
text?: string | undefined;
|
|
1077
|
+
count?: number | undefined;
|
|
1078
|
+
attributes?: Record<string, unknown> | undefined;
|
|
1079
|
+
}[] | undefined;
|
|
1080
|
+
jsonOps?: {
|
|
1081
|
+
path: (string | number)[];
|
|
1082
|
+
type: "set" | "delete" | "insert" | "move" | "replace";
|
|
1083
|
+
value?: unknown;
|
|
1084
|
+
prevValue?: unknown;
|
|
1085
|
+
}[] | undefined;
|
|
1086
|
+
}[];
|
|
1087
|
+
snapshot?: unknown;
|
|
1088
|
+
}, {
|
|
1089
|
+
docId: string;
|
|
1090
|
+
revision: number;
|
|
1091
|
+
updatedAt?: number | undefined;
|
|
1092
|
+
snapshot?: unknown;
|
|
1093
|
+
appliedOps?: {
|
|
1094
|
+
id: string;
|
|
1095
|
+
docId: string;
|
|
1096
|
+
revision: number;
|
|
1097
|
+
authorId: string;
|
|
1098
|
+
timestamp?: number | undefined;
|
|
1099
|
+
metadata?: Record<string, unknown> | undefined;
|
|
1100
|
+
textOps?: {
|
|
1101
|
+
type: "delete" | "retain" | "insert";
|
|
1102
|
+
text?: string | undefined;
|
|
1103
|
+
count?: number | undefined;
|
|
1104
|
+
attributes?: Record<string, unknown> | undefined;
|
|
1105
|
+
}[] | undefined;
|
|
1106
|
+
jsonOps?: {
|
|
1107
|
+
path: (string | number)[];
|
|
1108
|
+
type: "set" | "delete" | "insert" | "move" | "replace";
|
|
1109
|
+
value?: unknown;
|
|
1110
|
+
prevValue?: unknown;
|
|
1111
|
+
}[] | undefined;
|
|
1112
|
+
}[] | undefined;
|
|
1113
|
+
}>;
|
|
1114
|
+
type OTRevision = z.infer<typeof OTRevisionSchema>;
|
|
1115
|
+
declare const CRDTSnapshotSchema: z.ZodObject<{
|
|
1116
|
+
docId: z.ZodString;
|
|
1117
|
+
vectorClock: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
1118
|
+
state: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1119
|
+
updatedAt: z.ZodDefault<z.ZodNumber>;
|
|
1120
|
+
}, "strip", z.ZodTypeAny, {
|
|
1121
|
+
updatedAt: number;
|
|
1122
|
+
state: Record<string, unknown>;
|
|
1123
|
+
docId: string;
|
|
1124
|
+
vectorClock: Record<string, number>;
|
|
1125
|
+
}, {
|
|
1126
|
+
docId: string;
|
|
1127
|
+
updatedAt?: number | undefined;
|
|
1128
|
+
state?: Record<string, unknown> | undefined;
|
|
1129
|
+
vectorClock?: Record<string, number> | undefined;
|
|
1130
|
+
}>;
|
|
1131
|
+
type CRDTSnapshot = z.infer<typeof CRDTSnapshotSchema>;
|
|
1132
|
+
interface OTTransformResult {
|
|
1133
|
+
op1Prime: OTTextOp[];
|
|
1134
|
+
op2Prime: OTTextOp[];
|
|
1135
|
+
}
|
|
1136
|
+
interface VectorClock {
|
|
1137
|
+
[clientOrUserId: string]: number;
|
|
1138
|
+
}
|
|
1139
|
+
type Topic = string;
|
|
1140
|
+
declare enum REALTIME_SUBSCRIBE_STATES {
|
|
1141
|
+
SUBSCRIBED = "SUBSCRIBED",
|
|
1142
|
+
CLOSED = "CLOSED",
|
|
1143
|
+
TIMED_OUT = "TIMED_OUT",
|
|
1144
|
+
CHANNEL_ERROR = "CHANNEL_ERROR"
|
|
1145
|
+
}
|
|
1146
|
+
type ChannelCallback = (status: REALTIME_SUBSCRIBE_STATES, error?: Error) => void;
|
|
1147
|
+
interface RealtimeMessage<T = unknown> {
|
|
1148
|
+
type: string;
|
|
1149
|
+
event: string;
|
|
1150
|
+
payload: T;
|
|
1151
|
+
}
|
|
1152
|
+
interface IRealtimeChannel {
|
|
1153
|
+
topic: string;
|
|
1154
|
+
state: "joined" | "joining" | "closed";
|
|
1155
|
+
on(type: string, filter: {
|
|
1156
|
+
event: string;
|
|
1157
|
+
}, callback: (payload: any) => void): this;
|
|
1158
|
+
/**
|
|
1159
|
+
* Remove a listener registered with `on()`. Omitting `callback` removes every listener for
|
|
1160
|
+
* that type/event pair. Optional so existing adapters keep compiling.
|
|
1161
|
+
*/
|
|
1162
|
+
off?(type: string, filter: {
|
|
1163
|
+
event: string;
|
|
1164
|
+
}, callback?: (payload: any) => void): this;
|
|
1165
|
+
subscribe(callback?: ChannelCallback): this;
|
|
1166
|
+
unsubscribe(): Promise<"ok" | "error">;
|
|
1167
|
+
track(presence: any): void;
|
|
1168
|
+
untrack(): void;
|
|
1169
|
+
presenceState(): Record<string, any[]>;
|
|
1170
|
+
send(message: RealtimeMessage): Promise<void>;
|
|
1171
|
+
}
|
|
1172
|
+
interface RealtimeHandlerConfig {
|
|
1173
|
+
inactiveTabTimeoutSeconds?: number;
|
|
1174
|
+
autoReconnect?: boolean;
|
|
1175
|
+
heartbeatIntervalMs?: number;
|
|
1176
|
+
}
|
|
1177
|
+
interface RemoteCellPresence {
|
|
1178
|
+
rowId: string;
|
|
1179
|
+
colId: string;
|
|
1180
|
+
user: PresenceUser;
|
|
1181
|
+
isEditing?: boolean;
|
|
1182
|
+
draftValue?: string;
|
|
1183
|
+
focusedAt: number;
|
|
1184
|
+
}
|
|
1185
|
+
interface GridCellSelectEvent {
|
|
1186
|
+
rowId: string;
|
|
1187
|
+
colId: string;
|
|
1188
|
+
user: PresenceUser;
|
|
1189
|
+
}
|
|
1190
|
+
interface GridCellEditStartEvent {
|
|
1191
|
+
rowId: string;
|
|
1192
|
+
colId: string;
|
|
1193
|
+
user: PresenceUser;
|
|
1194
|
+
initialValue?: string;
|
|
1195
|
+
}
|
|
1196
|
+
interface GridCellDraftEvent {
|
|
1197
|
+
rowId: string;
|
|
1198
|
+
colId: string;
|
|
1199
|
+
userId: string;
|
|
1200
|
+
draftValue: string;
|
|
1201
|
+
}
|
|
1202
|
+
interface GridCellBlurEvent {
|
|
1203
|
+
rowId: string;
|
|
1204
|
+
colId: string;
|
|
1205
|
+
userId: string;
|
|
1206
|
+
}
|
|
1207
|
+
type GridOTOp = {
|
|
1208
|
+
type: "set_cell";
|
|
1209
|
+
rowId: string;
|
|
1210
|
+
colId: string;
|
|
1211
|
+
raw: string;
|
|
1212
|
+
prevRaw?: string;
|
|
1213
|
+
} | {
|
|
1214
|
+
type: "batch_cells";
|
|
1215
|
+
cells: Array<{
|
|
1216
|
+
rowId: string;
|
|
1217
|
+
colId: string;
|
|
1218
|
+
raw: string;
|
|
1219
|
+
}>;
|
|
1220
|
+
} | {
|
|
1221
|
+
type: "insert_col";
|
|
1222
|
+
index: number;
|
|
1223
|
+
column: any;
|
|
1224
|
+
} | {
|
|
1225
|
+
type: "delete_col";
|
|
1226
|
+
colId: string;
|
|
1227
|
+
} | {
|
|
1228
|
+
type: "insert_row";
|
|
1229
|
+
index: number;
|
|
1230
|
+
row: any;
|
|
1231
|
+
} | {
|
|
1232
|
+
type: "delete_row";
|
|
1233
|
+
rowId: string;
|
|
1234
|
+
};
|
|
1235
|
+
|
|
1236
|
+
export { type ActivityActionType, ActivityActionTypeSchema, type ActivityActor, ActivityActorSchema, type ActivityEvent, ActivityEventSchema, type ActivityStreamFilter, ActivityStreamFilterSchema, type ActivitySubscriptionOptions, type ActorType, ActorTypeSchema, type AgentActorMetadata, AgentActorMetadataSchema, type CRDTSnapshot, CRDTSnapshotSchema, type ChannelCallback, type CursorPosition, CursorPositionSchema, type CursorUpdateEvent, type FieldPresence, FieldPresenceSchema, type GridCellBlurEvent, type GridCellDraftEvent, type GridCellEditStartEvent, type GridCellSelectEvent, type GridOTOp, type IRealtimeChannel, type LockAcquisitionResult, type LockChangeEvent, type LockClaimRequest, LockClaimRequestSchema, type LockHeartbeatRequest, LockHeartbeatRequestSchema, type LockReleaseRequest, LockReleaseRequestSchema, type LockStatus, LockStatusSchema, type OTJsonOp, OTJsonOpSchema, type OTJsonOpType, OTJsonOpTypeSchema, type OTOperation, OTOperationSchema, type OTRevision, OTRevisionSchema, type OTTextOp, OTTextOpSchema, type OTTextOpType, OTTextOpTypeSchema, type OTTransformResult, type PresenceColor, PresenceColorSchema, type PresenceHeartbeat, type PresenceJoinEvent, type PresenceLeaveEvent, type PresenceState, PresenceStateSchema, type PresenceStatus, PresenceStatusSchema, type PresenceUser, PresenceUserSchema, REALTIME_SUBSCRIBE_STATES, type RealtimeHandlerConfig, type RealtimeMessage, type RecordLock, type RecordLockInfo, RecordLockInfoSchema, RecordLockSchema, type RemoteCellPresence, type Topic, type TypingChangeEvent, type TypingIndicator, TypingIndicatorSchema, type VectorClock, type ViewingChangeEvent, type ViewingIndicator, ViewingIndicatorSchema, type ViewportTransform, ViewportTransformSchema };
|