@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/index.js CHANGED
@@ -1,3 +1,35 @@
1
+ import {
2
+ ActivityActionTypeSchema,
3
+ ActivityActorSchema,
4
+ ActivityEventSchema,
5
+ ActivityStreamFilterSchema,
6
+ ActorTypeSchema,
7
+ AgentActorMetadataSchema,
8
+ CRDTSnapshotSchema,
9
+ CursorPositionSchema,
10
+ FieldPresenceSchema,
11
+ LockClaimRequestSchema,
12
+ LockHeartbeatRequestSchema,
13
+ LockReleaseRequestSchema,
14
+ LockStatusSchema,
15
+ OTJsonOpSchema,
16
+ OTJsonOpTypeSchema,
17
+ OTOperationSchema,
18
+ OTRevisionSchema,
19
+ OTTextOpSchema,
20
+ OTTextOpTypeSchema,
21
+ PresenceColorSchema,
22
+ PresenceStateSchema,
23
+ PresenceStatusSchema,
24
+ PresenceUserSchema,
25
+ REALTIME_SUBSCRIBE_STATES,
26
+ RecordLockInfoSchema,
27
+ RecordLockSchema,
28
+ TypingIndicatorSchema,
29
+ ViewingIndicatorSchema,
30
+ ViewportTransformSchema
31
+ } from "./chunk-OHQPRGDT.js";
32
+
1
33
  // src/index.ts
2
34
  import { z } from "zod";
3
35
  var FidelitySchema = z.enum(["outline", "blocked", "shaded", "polished"]);
@@ -1315,247 +1347,6 @@ var DocumentGenerationOptionsSchema = z.object({
1315
1347
  enableSyntaxHighlighting: z.boolean().optional().default(true),
1316
1348
  theme: z.enum(["light", "dark", "corporate", "minimal"]).optional().default("light")
1317
1349
  });
1318
- var PresenceColorSchema = z.enum([
1319
- "slate",
1320
- "gray",
1321
- "zinc",
1322
- "neutral",
1323
- "stone",
1324
- "red",
1325
- "orange",
1326
- "amber",
1327
- "yellow",
1328
- "lime",
1329
- "green",
1330
- "emerald",
1331
- "teal",
1332
- "cyan",
1333
- "sky",
1334
- "blue",
1335
- "indigo",
1336
- "violet",
1337
- "purple",
1338
- "fuchsia",
1339
- "pink",
1340
- "rose"
1341
- ]);
1342
- var PresenceStatusSchema = z.enum([
1343
- "online",
1344
- "idle",
1345
- "away",
1346
- "busy",
1347
- "offline",
1348
- "planning",
1349
- "thinking",
1350
- "executing_tool",
1351
- "waiting_for_input",
1352
- "waiting_for_agent",
1353
- "streaming",
1354
- "paused",
1355
- "error"
1356
- ]);
1357
- var ActorTypeSchema = z.enum(["human", "agent", "system"]);
1358
- var AgentActorMetadataSchema = z.object({
1359
- role: z.string().optional(),
1360
- parentAgentId: z.string().optional(),
1361
- runId: z.string().optional(),
1362
- currentTask: z.string().optional()
1363
- });
1364
- var PresenceUserSchema = z.object({
1365
- id: z.string(),
1366
- username: z.string().optional(),
1367
- email: z.string().optional(),
1368
- avatarUrl: z.string().optional(),
1369
- actorType: ActorTypeSchema.optional(),
1370
- color: PresenceColorSchema.optional().default("blue"),
1371
- status: PresenceStatusSchema.optional().default("online"),
1372
- agent: AgentActorMetadataSchema.optional(),
1373
- lastSeen: z.number().int().positive().optional().default(() => Date.now()),
1374
- metadata: z.record(z.unknown()).optional().default({})
1375
- });
1376
- var ViewportTransformSchema = z.object({
1377
- zoom: z.number().default(1),
1378
- panX: z.number().default(0),
1379
- panY: z.number().default(0)
1380
- });
1381
- var CursorPositionSchema = z.object({
1382
- userId: z.string(),
1383
- x: z.number(),
1384
- y: z.number(),
1385
- lastUpdate: z.number().int().positive().default(() => Date.now()),
1386
- username: z.string().optional(),
1387
- avatarUrl: z.string().optional(),
1388
- color: PresenceColorSchema.optional(),
1389
- viewport: ViewportTransformSchema.optional()
1390
- });
1391
- var PresenceStateSchema = z.object({
1392
- roomId: z.string(),
1393
- presences: z.record(PresenceUserSchema).default({}),
1394
- cursors: z.record(CursorPositionSchema).default({})
1395
- });
1396
- var ViewingIndicatorSchema = z.object({
1397
- userId: z.string(),
1398
- resourceId: z.string(),
1399
- resourceType: z.enum(["board", "document", "item", "node", "canvas", "page", "field"]).default("board"),
1400
- username: z.string().optional(),
1401
- avatarUrl: z.string().optional(),
1402
- color: PresenceColorSchema.optional(),
1403
- lastSeen: z.number().int().positive().default(() => Date.now())
1404
- });
1405
- var TypingIndicatorSchema = z.object({
1406
- userId: z.string(),
1407
- resourceId: z.string(),
1408
- fieldName: z.string().optional(),
1409
- username: z.string().optional(),
1410
- avatarUrl: z.string().optional(),
1411
- color: PresenceColorSchema.optional(),
1412
- isTyping: z.boolean().default(true),
1413
- timestamp: z.number().int().positive().default(() => Date.now())
1414
- });
1415
- var FieldPresenceSchema = z.object({
1416
- fieldId: z.string(),
1417
- focusedBy: z.array(PresenceUserSchema).default([]),
1418
- typingUsers: z.array(TypingIndicatorSchema).default([])
1419
- });
1420
- var LockStatusSchema = z.enum(["unlocked", "locked", "expired", "claimed"]);
1421
- var RecordLockInfoSchema = z.object({
1422
- userId: z.string(),
1423
- username: z.string().optional(),
1424
- clientId: z.string().optional(),
1425
- avatarUrl: z.string().optional()
1426
- });
1427
- var RecordLockSchema = z.object({
1428
- id: z.string(),
1429
- resourceId: z.string(),
1430
- resourceType: z.string().default("record"),
1431
- lockedBy: RecordLockInfoSchema,
1432
- lockedAt: z.number().int().positive(),
1433
- expiresAt: z.number().int().positive(),
1434
- leaseDurationSeconds: z.number().int().positive().default(60),
1435
- status: LockStatusSchema.default("locked"),
1436
- metadata: z.record(z.unknown()).optional().default({})
1437
- });
1438
- var LockClaimRequestSchema = z.object({
1439
- resourceId: z.string(),
1440
- resourceType: z.string().default("record"),
1441
- userId: z.string(),
1442
- username: z.string().optional(),
1443
- clientId: z.string().optional(),
1444
- avatarUrl: z.string().optional(),
1445
- leaseDurationSeconds: z.number().int().positive().optional().default(60),
1446
- force: z.boolean().optional().default(false),
1447
- metadata: z.record(z.unknown()).optional().default({})
1448
- });
1449
- var LockReleaseRequestSchema = z.object({
1450
- resourceId: z.string(),
1451
- resourceType: z.string().default("record"),
1452
- userId: z.string(),
1453
- clientId: z.string().optional(),
1454
- force: z.boolean().optional().default(false)
1455
- });
1456
- var LockHeartbeatRequestSchema = z.object({
1457
- resourceId: z.string(),
1458
- resourceType: z.string().default("record"),
1459
- userId: z.string(),
1460
- clientId: z.string().optional(),
1461
- leaseDurationSeconds: z.number().int().positive().optional().default(60)
1462
- });
1463
- var ActivityActionTypeSchema = z.enum([
1464
- "join",
1465
- "leave",
1466
- "create",
1467
- "update",
1468
- "delete",
1469
- "lock",
1470
- "unlock",
1471
- "claim",
1472
- "comment",
1473
- "generate",
1474
- "star",
1475
- "unstar",
1476
- "custom",
1477
- "agent:thought",
1478
- "agent:plan_updated",
1479
- "agent:tool_start",
1480
- "agent:tool_end",
1481
- "agent:approval_requested",
1482
- "agent:approval_resolved",
1483
- "agent:error"
1484
- ]);
1485
- var ActivityActorSchema = z.object({
1486
- userId: z.string(),
1487
- username: z.string().optional(),
1488
- avatarUrl: z.string().optional(),
1489
- actorType: ActorTypeSchema.optional(),
1490
- role: z.string().optional(),
1491
- color: PresenceColorSchema.optional()
1492
- });
1493
- var ActivityEventSchema = z.object({
1494
- id: z.string(),
1495
- roomId: z.string().optional(),
1496
- entityId: z.string().optional(),
1497
- entityType: z.string().optional(),
1498
- action: ActivityActionTypeSchema,
1499
- actor: ActivityActorSchema,
1500
- title: z.string().optional(),
1501
- description: z.string().optional(),
1502
- payload: z.record(z.unknown()).optional(),
1503
- timestamp: z.number().int().positive().default(() => Date.now()),
1504
- metadata: z.record(z.unknown()).optional()
1505
- });
1506
- var ActivityStreamFilterSchema = z.object({
1507
- roomId: z.string().optional(),
1508
- entityId: z.string().optional(),
1509
- entityType: z.string().optional(),
1510
- actorId: z.string().optional(),
1511
- action: z.union([ActivityActionTypeSchema, z.array(ActivityActionTypeSchema)]).optional(),
1512
- since: z.number().int().positive().optional(),
1513
- limit: z.number().int().positive().optional().default(50)
1514
- });
1515
- var OTTextOpTypeSchema = z.enum(["retain", "insert", "delete"]);
1516
- var OTTextOpSchema = z.object({
1517
- type: OTTextOpTypeSchema,
1518
- count: z.number().int().nonnegative().optional(),
1519
- text: z.string().optional(),
1520
- attributes: z.record(z.unknown()).optional()
1521
- });
1522
- var OTJsonOpTypeSchema = z.enum(["set", "delete", "insert", "move", "replace"]);
1523
- var OTJsonOpSchema = z.object({
1524
- path: z.array(z.union([z.string(), z.number()])),
1525
- type: OTJsonOpTypeSchema,
1526
- value: z.unknown().optional(),
1527
- prevValue: z.unknown().optional()
1528
- });
1529
- var OTOperationSchema = z.object({
1530
- id: z.string(),
1531
- docId: z.string(),
1532
- revision: z.number().int().nonnegative(),
1533
- authorId: z.string(),
1534
- textOps: z.array(OTTextOpSchema).optional(),
1535
- jsonOps: z.array(OTJsonOpSchema).optional(),
1536
- timestamp: z.number().int().positive().default(() => Date.now()),
1537
- metadata: z.record(z.unknown()).optional().default({})
1538
- });
1539
- var OTRevisionSchema = z.object({
1540
- docId: z.string(),
1541
- revision: z.number().int().nonnegative(),
1542
- snapshot: z.unknown(),
1543
- appliedOps: z.array(OTOperationSchema).default([]),
1544
- updatedAt: z.number().int().positive().default(() => Date.now())
1545
- });
1546
- var CRDTSnapshotSchema = z.object({
1547
- docId: z.string(),
1548
- vectorClock: z.record(z.number().int().nonnegative()).default({}),
1549
- state: z.record(z.unknown()).default({}),
1550
- updatedAt: z.number().int().positive().default(() => Date.now())
1551
- });
1552
- var REALTIME_SUBSCRIBE_STATES = /* @__PURE__ */ ((REALTIME_SUBSCRIBE_STATES2) => {
1553
- REALTIME_SUBSCRIBE_STATES2["SUBSCRIBED"] = "SUBSCRIBED";
1554
- REALTIME_SUBSCRIBE_STATES2["CLOSED"] = "CLOSED";
1555
- REALTIME_SUBSCRIBE_STATES2["TIMED_OUT"] = "TIMED_OUT";
1556
- REALTIME_SUBSCRIBE_STATES2["CHANNEL_ERROR"] = "CHANNEL_ERROR";
1557
- return REALTIME_SUBSCRIBE_STATES2;
1558
- })(REALTIME_SUBSCRIBE_STATES || {});
1559
1350
  var AuthUserSchema = z.object({
1560
1351
  id: z.string(),
1561
1352
  email: z.string().email(),
@@ -0,0 +1,327 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/realtime.ts
21
+ var realtime_exports = {};
22
+ __export(realtime_exports, {
23
+ ActivityActionTypeSchema: () => ActivityActionTypeSchema,
24
+ ActivityActorSchema: () => ActivityActorSchema,
25
+ ActivityEventSchema: () => ActivityEventSchema,
26
+ ActivityStreamFilterSchema: () => ActivityStreamFilterSchema,
27
+ ActorTypeSchema: () => ActorTypeSchema,
28
+ AgentActorMetadataSchema: () => AgentActorMetadataSchema,
29
+ CRDTSnapshotSchema: () => CRDTSnapshotSchema,
30
+ CursorPositionSchema: () => CursorPositionSchema,
31
+ FieldPresenceSchema: () => FieldPresenceSchema,
32
+ LockClaimRequestSchema: () => LockClaimRequestSchema,
33
+ LockHeartbeatRequestSchema: () => LockHeartbeatRequestSchema,
34
+ LockReleaseRequestSchema: () => LockReleaseRequestSchema,
35
+ LockStatusSchema: () => LockStatusSchema,
36
+ OTJsonOpSchema: () => OTJsonOpSchema,
37
+ OTJsonOpTypeSchema: () => OTJsonOpTypeSchema,
38
+ OTOperationSchema: () => OTOperationSchema,
39
+ OTRevisionSchema: () => OTRevisionSchema,
40
+ OTTextOpSchema: () => OTTextOpSchema,
41
+ OTTextOpTypeSchema: () => OTTextOpTypeSchema,
42
+ PresenceColorSchema: () => PresenceColorSchema,
43
+ PresenceStateSchema: () => PresenceStateSchema,
44
+ PresenceStatusSchema: () => PresenceStatusSchema,
45
+ PresenceUserSchema: () => PresenceUserSchema,
46
+ REALTIME_SUBSCRIBE_STATES: () => REALTIME_SUBSCRIBE_STATES,
47
+ RecordLockInfoSchema: () => RecordLockInfoSchema,
48
+ RecordLockSchema: () => RecordLockSchema,
49
+ TypingIndicatorSchema: () => TypingIndicatorSchema,
50
+ ViewingIndicatorSchema: () => ViewingIndicatorSchema,
51
+ ViewportTransformSchema: () => ViewportTransformSchema
52
+ });
53
+ module.exports = __toCommonJS(realtime_exports);
54
+ var import_zod = require("zod");
55
+ var PresenceColorSchema = import_zod.z.enum([
56
+ "slate",
57
+ "gray",
58
+ "zinc",
59
+ "neutral",
60
+ "stone",
61
+ "red",
62
+ "orange",
63
+ "amber",
64
+ "yellow",
65
+ "lime",
66
+ "green",
67
+ "emerald",
68
+ "teal",
69
+ "cyan",
70
+ "sky",
71
+ "blue",
72
+ "indigo",
73
+ "violet",
74
+ "purple",
75
+ "fuchsia",
76
+ "pink",
77
+ "rose"
78
+ ]);
79
+ var PresenceStatusSchema = import_zod.z.enum([
80
+ "online",
81
+ "idle",
82
+ "away",
83
+ "busy",
84
+ "offline",
85
+ "planning",
86
+ "thinking",
87
+ "executing_tool",
88
+ "waiting_for_input",
89
+ "waiting_for_agent",
90
+ "streaming",
91
+ "paused",
92
+ "error"
93
+ ]);
94
+ var ActorTypeSchema = import_zod.z.enum(["human", "agent", "system"]);
95
+ var AgentActorMetadataSchema = import_zod.z.object({
96
+ role: import_zod.z.string().optional(),
97
+ parentAgentId: import_zod.z.string().optional(),
98
+ runId: import_zod.z.string().optional(),
99
+ currentTask: import_zod.z.string().optional()
100
+ });
101
+ var PresenceUserSchema = import_zod.z.object({
102
+ id: import_zod.z.string(),
103
+ username: import_zod.z.string().optional(),
104
+ email: import_zod.z.string().optional(),
105
+ avatarUrl: import_zod.z.string().optional(),
106
+ actorType: ActorTypeSchema.optional(),
107
+ color: PresenceColorSchema.optional().default("blue"),
108
+ status: PresenceStatusSchema.optional().default("online"),
109
+ agent: AgentActorMetadataSchema.optional(),
110
+ lastSeen: import_zod.z.number().int().positive().optional().default(() => Date.now()),
111
+ metadata: import_zod.z.record(import_zod.z.unknown()).optional().default({})
112
+ });
113
+ var ViewportTransformSchema = import_zod.z.object({
114
+ zoom: import_zod.z.number().default(1),
115
+ panX: import_zod.z.number().default(0),
116
+ panY: import_zod.z.number().default(0)
117
+ });
118
+ var CursorPositionSchema = import_zod.z.object({
119
+ userId: import_zod.z.string(),
120
+ x: import_zod.z.number(),
121
+ y: import_zod.z.number(),
122
+ lastUpdate: import_zod.z.number().int().positive().default(() => Date.now()),
123
+ username: import_zod.z.string().optional(),
124
+ avatarUrl: import_zod.z.string().optional(),
125
+ color: PresenceColorSchema.optional(),
126
+ viewport: ViewportTransformSchema.optional()
127
+ });
128
+ var PresenceStateSchema = import_zod.z.object({
129
+ roomId: import_zod.z.string(),
130
+ presences: import_zod.z.record(PresenceUserSchema).default({}),
131
+ cursors: import_zod.z.record(CursorPositionSchema).default({})
132
+ });
133
+ var ViewingIndicatorSchema = import_zod.z.object({
134
+ userId: import_zod.z.string(),
135
+ resourceId: import_zod.z.string(),
136
+ resourceType: import_zod.z.enum(["board", "document", "item", "node", "canvas", "page", "field"]).default("board"),
137
+ username: import_zod.z.string().optional(),
138
+ avatarUrl: import_zod.z.string().optional(),
139
+ color: PresenceColorSchema.optional(),
140
+ lastSeen: import_zod.z.number().int().positive().default(() => Date.now())
141
+ });
142
+ var TypingIndicatorSchema = import_zod.z.object({
143
+ userId: import_zod.z.string(),
144
+ resourceId: import_zod.z.string(),
145
+ fieldName: import_zod.z.string().optional(),
146
+ username: import_zod.z.string().optional(),
147
+ avatarUrl: import_zod.z.string().optional(),
148
+ color: PresenceColorSchema.optional(),
149
+ isTyping: import_zod.z.boolean().default(true),
150
+ timestamp: import_zod.z.number().int().positive().default(() => Date.now())
151
+ });
152
+ var FieldPresenceSchema = import_zod.z.object({
153
+ fieldId: import_zod.z.string(),
154
+ focusedBy: import_zod.z.array(PresenceUserSchema).default([]),
155
+ typingUsers: import_zod.z.array(TypingIndicatorSchema).default([])
156
+ });
157
+ var LockStatusSchema = import_zod.z.enum(["unlocked", "locked", "expired", "claimed"]);
158
+ var RecordLockInfoSchema = import_zod.z.object({
159
+ userId: import_zod.z.string(),
160
+ username: import_zod.z.string().optional(),
161
+ clientId: import_zod.z.string().optional(),
162
+ avatarUrl: import_zod.z.string().optional()
163
+ });
164
+ var RecordLockSchema = import_zod.z.object({
165
+ id: import_zod.z.string(),
166
+ resourceId: import_zod.z.string(),
167
+ resourceType: import_zod.z.string().default("record"),
168
+ lockedBy: RecordLockInfoSchema,
169
+ lockedAt: import_zod.z.number().int().positive(),
170
+ expiresAt: import_zod.z.number().int().positive(),
171
+ leaseDurationSeconds: import_zod.z.number().int().positive().default(60),
172
+ status: LockStatusSchema.default("locked"),
173
+ metadata: import_zod.z.record(import_zod.z.unknown()).optional().default({})
174
+ });
175
+ var LockClaimRequestSchema = import_zod.z.object({
176
+ resourceId: import_zod.z.string(),
177
+ resourceType: import_zod.z.string().default("record"),
178
+ userId: import_zod.z.string(),
179
+ username: import_zod.z.string().optional(),
180
+ clientId: import_zod.z.string().optional(),
181
+ avatarUrl: import_zod.z.string().optional(),
182
+ leaseDurationSeconds: import_zod.z.number().int().positive().optional().default(60),
183
+ force: import_zod.z.boolean().optional().default(false),
184
+ metadata: import_zod.z.record(import_zod.z.unknown()).optional().default({})
185
+ });
186
+ var LockReleaseRequestSchema = import_zod.z.object({
187
+ resourceId: import_zod.z.string(),
188
+ resourceType: import_zod.z.string().default("record"),
189
+ userId: import_zod.z.string(),
190
+ clientId: import_zod.z.string().optional(),
191
+ force: import_zod.z.boolean().optional().default(false)
192
+ });
193
+ var LockHeartbeatRequestSchema = import_zod.z.object({
194
+ resourceId: import_zod.z.string(),
195
+ resourceType: import_zod.z.string().default("record"),
196
+ userId: import_zod.z.string(),
197
+ clientId: import_zod.z.string().optional(),
198
+ leaseDurationSeconds: import_zod.z.number().int().positive().optional().default(60)
199
+ });
200
+ var ActivityActionTypeSchema = import_zod.z.enum([
201
+ "join",
202
+ "leave",
203
+ "create",
204
+ "update",
205
+ "delete",
206
+ "lock",
207
+ "unlock",
208
+ "claim",
209
+ "comment",
210
+ "generate",
211
+ "star",
212
+ "unstar",
213
+ "custom",
214
+ "agent:thought",
215
+ "agent:plan_updated",
216
+ "agent:tool_start",
217
+ "agent:tool_end",
218
+ "agent:approval_requested",
219
+ "agent:approval_resolved",
220
+ "agent:error"
221
+ ]);
222
+ var ActivityActorSchema = import_zod.z.object({
223
+ userId: import_zod.z.string(),
224
+ username: import_zod.z.string().optional(),
225
+ avatarUrl: import_zod.z.string().optional(),
226
+ actorType: ActorTypeSchema.optional(),
227
+ role: import_zod.z.string().optional(),
228
+ color: PresenceColorSchema.optional()
229
+ });
230
+ var ActivityEventSchema = import_zod.z.object({
231
+ id: import_zod.z.string(),
232
+ roomId: import_zod.z.string().optional(),
233
+ entityId: import_zod.z.string().optional(),
234
+ entityType: import_zod.z.string().optional(),
235
+ action: ActivityActionTypeSchema,
236
+ actor: ActivityActorSchema,
237
+ title: import_zod.z.string().optional(),
238
+ description: import_zod.z.string().optional(),
239
+ payload: import_zod.z.record(import_zod.z.unknown()).optional(),
240
+ timestamp: import_zod.z.number().int().positive().default(() => Date.now()),
241
+ metadata: import_zod.z.record(import_zod.z.unknown()).optional()
242
+ });
243
+ var ActivityStreamFilterSchema = import_zod.z.object({
244
+ roomId: import_zod.z.string().optional(),
245
+ entityId: import_zod.z.string().optional(),
246
+ entityType: import_zod.z.string().optional(),
247
+ actorId: import_zod.z.string().optional(),
248
+ action: import_zod.z.union([ActivityActionTypeSchema, import_zod.z.array(ActivityActionTypeSchema)]).optional(),
249
+ since: import_zod.z.number().int().positive().optional(),
250
+ limit: import_zod.z.number().int().positive().optional().default(50)
251
+ });
252
+ var OTTextOpTypeSchema = import_zod.z.enum(["retain", "insert", "delete"]);
253
+ var OTTextOpSchema = import_zod.z.object({
254
+ type: OTTextOpTypeSchema,
255
+ count: import_zod.z.number().int().nonnegative().optional(),
256
+ text: import_zod.z.string().optional(),
257
+ attributes: import_zod.z.record(import_zod.z.unknown()).optional()
258
+ });
259
+ var OTJsonOpTypeSchema = import_zod.z.enum(["set", "delete", "insert", "move", "replace"]);
260
+ var OTJsonOpSchema = import_zod.z.object({
261
+ path: import_zod.z.array(import_zod.z.union([import_zod.z.string(), import_zod.z.number()])),
262
+ type: OTJsonOpTypeSchema,
263
+ value: import_zod.z.unknown().optional(),
264
+ prevValue: import_zod.z.unknown().optional()
265
+ });
266
+ var OTOperationSchema = import_zod.z.object({
267
+ id: import_zod.z.string(),
268
+ docId: import_zod.z.string(),
269
+ revision: import_zod.z.number().int().nonnegative(),
270
+ authorId: import_zod.z.string(),
271
+ textOps: import_zod.z.array(OTTextOpSchema).optional(),
272
+ jsonOps: import_zod.z.array(OTJsonOpSchema).optional(),
273
+ timestamp: import_zod.z.number().int().positive().default(() => Date.now()),
274
+ metadata: import_zod.z.record(import_zod.z.unknown()).optional().default({})
275
+ });
276
+ var OTRevisionSchema = import_zod.z.object({
277
+ docId: import_zod.z.string(),
278
+ revision: import_zod.z.number().int().nonnegative(),
279
+ snapshot: import_zod.z.unknown(),
280
+ appliedOps: import_zod.z.array(OTOperationSchema).default([]),
281
+ updatedAt: import_zod.z.number().int().positive().default(() => Date.now())
282
+ });
283
+ var CRDTSnapshotSchema = import_zod.z.object({
284
+ docId: import_zod.z.string(),
285
+ vectorClock: import_zod.z.record(import_zod.z.number().int().nonnegative()).default({}),
286
+ state: import_zod.z.record(import_zod.z.unknown()).default({}),
287
+ updatedAt: import_zod.z.number().int().positive().default(() => Date.now())
288
+ });
289
+ var REALTIME_SUBSCRIBE_STATES = /* @__PURE__ */ ((REALTIME_SUBSCRIBE_STATES2) => {
290
+ REALTIME_SUBSCRIBE_STATES2["SUBSCRIBED"] = "SUBSCRIBED";
291
+ REALTIME_SUBSCRIBE_STATES2["CLOSED"] = "CLOSED";
292
+ REALTIME_SUBSCRIBE_STATES2["TIMED_OUT"] = "TIMED_OUT";
293
+ REALTIME_SUBSCRIBE_STATES2["CHANNEL_ERROR"] = "CHANNEL_ERROR";
294
+ return REALTIME_SUBSCRIBE_STATES2;
295
+ })(REALTIME_SUBSCRIBE_STATES || {});
296
+ // Annotate the CommonJS export names for ESM import in node:
297
+ 0 && (module.exports = {
298
+ ActivityActionTypeSchema,
299
+ ActivityActorSchema,
300
+ ActivityEventSchema,
301
+ ActivityStreamFilterSchema,
302
+ ActorTypeSchema,
303
+ AgentActorMetadataSchema,
304
+ CRDTSnapshotSchema,
305
+ CursorPositionSchema,
306
+ FieldPresenceSchema,
307
+ LockClaimRequestSchema,
308
+ LockHeartbeatRequestSchema,
309
+ LockReleaseRequestSchema,
310
+ LockStatusSchema,
311
+ OTJsonOpSchema,
312
+ OTJsonOpTypeSchema,
313
+ OTOperationSchema,
314
+ OTRevisionSchema,
315
+ OTTextOpSchema,
316
+ OTTextOpTypeSchema,
317
+ PresenceColorSchema,
318
+ PresenceStateSchema,
319
+ PresenceStatusSchema,
320
+ PresenceUserSchema,
321
+ REALTIME_SUBSCRIBE_STATES,
322
+ RecordLockInfoSchema,
323
+ RecordLockSchema,
324
+ TypingIndicatorSchema,
325
+ ViewingIndicatorSchema,
326
+ ViewportTransformSchema
327
+ });