@pixerate/schemas 1.9.0 → 1.10.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
@@ -1171,10 +1171,250 @@ var DocumentGenerationOptionsSchema = z.object({
1171
1171
  enableSyntaxHighlighting: z.boolean().optional().default(true),
1172
1172
  theme: z.enum(["light", "dark", "corporate", "minimal"]).optional().default("light")
1173
1173
  });
1174
+ var PresenceColorSchema = z.enum([
1175
+ "slate",
1176
+ "gray",
1177
+ "zinc",
1178
+ "neutral",
1179
+ "stone",
1180
+ "red",
1181
+ "orange",
1182
+ "amber",
1183
+ "yellow",
1184
+ "lime",
1185
+ "green",
1186
+ "emerald",
1187
+ "teal",
1188
+ "cyan",
1189
+ "sky",
1190
+ "blue",
1191
+ "indigo",
1192
+ "violet",
1193
+ "purple",
1194
+ "fuchsia",
1195
+ "pink",
1196
+ "rose"
1197
+ ]);
1198
+ var PresenceStatusSchema = z.enum([
1199
+ "online",
1200
+ "idle",
1201
+ "away",
1202
+ "busy",
1203
+ "offline",
1204
+ "planning",
1205
+ "thinking",
1206
+ "executing_tool",
1207
+ "waiting_for_input",
1208
+ "waiting_for_agent",
1209
+ "streaming",
1210
+ "paused",
1211
+ "error"
1212
+ ]);
1213
+ var ActorTypeSchema = z.enum(["human", "agent", "system"]);
1214
+ var AgentActorMetadataSchema = z.object({
1215
+ role: z.string().optional(),
1216
+ parentAgentId: z.string().optional(),
1217
+ runId: z.string().optional(),
1218
+ currentTask: z.string().optional()
1219
+ });
1220
+ var PresenceUserSchema = z.object({
1221
+ id: z.string(),
1222
+ username: z.string().optional(),
1223
+ email: z.string().optional(),
1224
+ avatarUrl: z.string().optional(),
1225
+ actorType: ActorTypeSchema.optional(),
1226
+ color: PresenceColorSchema.optional().default("blue"),
1227
+ status: PresenceStatusSchema.optional().default("online"),
1228
+ agent: AgentActorMetadataSchema.optional(),
1229
+ lastSeen: z.number().int().positive().optional().default(() => Date.now()),
1230
+ metadata: z.record(z.unknown()).optional().default({})
1231
+ });
1232
+ var ViewportTransformSchema = z.object({
1233
+ zoom: z.number().default(1),
1234
+ panX: z.number().default(0),
1235
+ panY: z.number().default(0)
1236
+ });
1237
+ var CursorPositionSchema = z.object({
1238
+ userId: z.string(),
1239
+ x: z.number(),
1240
+ y: z.number(),
1241
+ lastUpdate: z.number().int().positive().default(() => Date.now()),
1242
+ username: z.string().optional(),
1243
+ avatarUrl: z.string().optional(),
1244
+ color: PresenceColorSchema.optional(),
1245
+ viewport: ViewportTransformSchema.optional()
1246
+ });
1247
+ var PresenceStateSchema = z.object({
1248
+ roomId: z.string(),
1249
+ presences: z.record(PresenceUserSchema).default({}),
1250
+ cursors: z.record(CursorPositionSchema).default({})
1251
+ });
1252
+ var ViewingIndicatorSchema = z.object({
1253
+ userId: z.string(),
1254
+ resourceId: z.string(),
1255
+ resourceType: z.enum(["board", "document", "item", "node", "canvas", "page", "field"]).default("board"),
1256
+ username: z.string().optional(),
1257
+ avatarUrl: z.string().optional(),
1258
+ color: PresenceColorSchema.optional(),
1259
+ lastSeen: z.number().int().positive().default(() => Date.now())
1260
+ });
1261
+ var TypingIndicatorSchema = z.object({
1262
+ userId: z.string(),
1263
+ resourceId: z.string(),
1264
+ fieldName: z.string().optional(),
1265
+ username: z.string().optional(),
1266
+ avatarUrl: z.string().optional(),
1267
+ color: PresenceColorSchema.optional(),
1268
+ isTyping: z.boolean().default(true),
1269
+ timestamp: z.number().int().positive().default(() => Date.now())
1270
+ });
1271
+ var FieldPresenceSchema = z.object({
1272
+ fieldId: z.string(),
1273
+ focusedBy: z.array(PresenceUserSchema).default([]),
1274
+ typingUsers: z.array(TypingIndicatorSchema).default([])
1275
+ });
1276
+ var LockStatusSchema = z.enum(["unlocked", "locked", "expired", "claimed"]);
1277
+ var RecordLockInfoSchema = z.object({
1278
+ userId: z.string(),
1279
+ username: z.string().optional(),
1280
+ clientId: z.string().optional(),
1281
+ avatarUrl: z.string().optional()
1282
+ });
1283
+ var RecordLockSchema = z.object({
1284
+ id: z.string(),
1285
+ resourceId: z.string(),
1286
+ resourceType: z.string().default("record"),
1287
+ lockedBy: RecordLockInfoSchema,
1288
+ lockedAt: z.number().int().positive(),
1289
+ expiresAt: z.number().int().positive(),
1290
+ leaseDurationSeconds: z.number().int().positive().default(60),
1291
+ status: LockStatusSchema.default("locked"),
1292
+ metadata: z.record(z.unknown()).optional().default({})
1293
+ });
1294
+ var LockClaimRequestSchema = z.object({
1295
+ resourceId: z.string(),
1296
+ resourceType: z.string().default("record"),
1297
+ userId: z.string(),
1298
+ username: z.string().optional(),
1299
+ clientId: z.string().optional(),
1300
+ avatarUrl: z.string().optional(),
1301
+ leaseDurationSeconds: z.number().int().positive().optional().default(60),
1302
+ force: z.boolean().optional().default(false),
1303
+ metadata: z.record(z.unknown()).optional().default({})
1304
+ });
1305
+ var LockReleaseRequestSchema = z.object({
1306
+ resourceId: z.string(),
1307
+ resourceType: z.string().default("record"),
1308
+ userId: z.string(),
1309
+ clientId: z.string().optional(),
1310
+ force: z.boolean().optional().default(false)
1311
+ });
1312
+ var LockHeartbeatRequestSchema = z.object({
1313
+ resourceId: z.string(),
1314
+ resourceType: z.string().default("record"),
1315
+ userId: z.string(),
1316
+ clientId: z.string().optional(),
1317
+ leaseDurationSeconds: z.number().int().positive().optional().default(60)
1318
+ });
1319
+ var ActivityActionTypeSchema = z.enum([
1320
+ "join",
1321
+ "leave",
1322
+ "create",
1323
+ "update",
1324
+ "delete",
1325
+ "lock",
1326
+ "unlock",
1327
+ "claim",
1328
+ "comment",
1329
+ "generate",
1330
+ "star",
1331
+ "unstar",
1332
+ "custom",
1333
+ "agent:thought",
1334
+ "agent:plan_updated",
1335
+ "agent:tool_start",
1336
+ "agent:tool_end",
1337
+ "agent:approval_requested",
1338
+ "agent:approval_resolved",
1339
+ "agent:error"
1340
+ ]);
1341
+ var ActivityActorSchema = z.object({
1342
+ userId: z.string(),
1343
+ username: z.string().optional(),
1344
+ avatarUrl: z.string().optional(),
1345
+ actorType: ActorTypeSchema.optional(),
1346
+ role: z.string().optional(),
1347
+ color: PresenceColorSchema.optional()
1348
+ });
1349
+ var ActivityEventSchema = z.object({
1350
+ id: z.string(),
1351
+ roomId: z.string().optional(),
1352
+ entityId: z.string().optional(),
1353
+ entityType: z.string().optional(),
1354
+ action: ActivityActionTypeSchema,
1355
+ actor: ActivityActorSchema,
1356
+ title: z.string().optional(),
1357
+ description: z.string().optional(),
1358
+ payload: z.record(z.unknown()).optional(),
1359
+ timestamp: z.number().int().positive().default(() => Date.now()),
1360
+ metadata: z.record(z.unknown()).optional()
1361
+ });
1362
+ var ActivityStreamFilterSchema = z.object({
1363
+ roomId: z.string().optional(),
1364
+ entityId: z.string().optional(),
1365
+ entityType: z.string().optional(),
1366
+ actorId: z.string().optional(),
1367
+ action: z.union([ActivityActionTypeSchema, z.array(ActivityActionTypeSchema)]).optional(),
1368
+ since: z.number().int().positive().optional(),
1369
+ limit: z.number().int().positive().optional().default(50)
1370
+ });
1371
+ var OTTextOpTypeSchema = z.enum(["retain", "insert", "delete"]);
1372
+ var OTTextOpSchema = z.object({
1373
+ type: OTTextOpTypeSchema,
1374
+ count: z.number().int().nonnegative().optional(),
1375
+ text: z.string().optional(),
1376
+ attributes: z.record(z.unknown()).optional()
1377
+ });
1378
+ var OTJsonOpTypeSchema = z.enum(["set", "delete", "insert", "move", "replace"]);
1379
+ var OTJsonOpSchema = z.object({
1380
+ path: z.array(z.union([z.string(), z.number()])),
1381
+ type: OTJsonOpTypeSchema,
1382
+ value: z.unknown().optional(),
1383
+ prevValue: z.unknown().optional()
1384
+ });
1385
+ var OTOperationSchema = z.object({
1386
+ id: z.string(),
1387
+ docId: z.string(),
1388
+ revision: z.number().int().nonnegative(),
1389
+ authorId: z.string(),
1390
+ textOps: z.array(OTTextOpSchema).optional(),
1391
+ jsonOps: z.array(OTJsonOpSchema).optional(),
1392
+ timestamp: z.number().int().positive().default(() => Date.now()),
1393
+ metadata: z.record(z.unknown()).optional().default({})
1394
+ });
1395
+ var OTRevisionSchema = z.object({
1396
+ docId: z.string(),
1397
+ revision: z.number().int().nonnegative(),
1398
+ snapshot: z.unknown(),
1399
+ appliedOps: z.array(OTOperationSchema).default([]),
1400
+ updatedAt: z.number().int().positive().default(() => Date.now())
1401
+ });
1402
+ var CRDTSnapshotSchema = z.object({
1403
+ docId: z.string(),
1404
+ vectorClock: z.record(z.number().int().nonnegative()).default({}),
1405
+ state: z.record(z.unknown()).default({}),
1406
+ updatedAt: z.number().int().positive().default(() => Date.now())
1407
+ });
1174
1408
  export {
1175
1409
  ActivityActionSchema,
1410
+ ActivityActionTypeSchema,
1411
+ ActivityActorSchema,
1412
+ ActivityEventSchema,
1176
1413
  ActivityLogSchema,
1414
+ ActivityStreamFilterSchema,
1415
+ ActorTypeSchema,
1177
1416
  AestheticSchema,
1417
+ AgentActorMetadataSchema,
1178
1418
  AgentConfigSchema,
1179
1419
  AgentDocumentAttachmentSchema,
1180
1420
  AgentEnvironmentSchema,
@@ -1196,6 +1436,7 @@ export {
1196
1436
  AudioVisualizerOptionsSchema,
1197
1437
  AudioVisualizerTypeSchema,
1198
1438
  AutoFitCaptionSchema,
1439
+ CRDTSnapshotSchema,
1199
1440
  CodeGenerationSchema,
1200
1441
  ComponentDocsSchema,
1201
1442
  ComponentPackageSchema,
@@ -1208,6 +1449,7 @@ export {
1208
1449
  ConditionOperatorSchema,
1209
1450
  ConditionSchema,
1210
1451
  ControlValidationSchema,
1452
+ CursorPositionSchema,
1211
1453
  DecisionGateKindSchema,
1212
1454
  DecisionGateSchema,
1213
1455
  DimensionScoreSchema,
@@ -1216,6 +1458,7 @@ export {
1216
1458
  DropShadowSchema,
1217
1459
  FORM_SCHEMA_JSON_SCHEMA,
1218
1460
  FidelitySchema,
1461
+ FieldPresenceSchema,
1219
1462
  FormControlSchema,
1220
1463
  FormControlTypeSchema,
1221
1464
  FormHandoffActionSchema,
@@ -1236,17 +1479,33 @@ export {
1236
1479
  IngestionInputSchema,
1237
1480
  JsonGenerationSchema,
1238
1481
  KenBurnsOptionsSchema,
1482
+ LockClaimRequestSchema,
1483
+ LockHeartbeatRequestSchema,
1484
+ LockReleaseRequestSchema,
1485
+ LockStatusSchema,
1239
1486
  MediaProbeResultSchema,
1487
+ OTJsonOpSchema,
1488
+ OTJsonOpTypeSchema,
1489
+ OTOperationSchema,
1490
+ OTRevisionSchema,
1491
+ OTTextOpSchema,
1492
+ OTTextOpTypeSchema,
1240
1493
  PerceptualHashAlgorithmSchema,
1241
1494
  PerceptualHashOptionsSchema,
1242
1495
  PerspectiveQuadSchema,
1243
1496
  PerspectiveWarpSchema,
1244
1497
  PlatformLanguageSchema,
1245
1498
  Point2DSchema,
1499
+ PresenceColorSchema,
1500
+ PresenceStateSchema,
1501
+ PresenceStatusSchema,
1502
+ PresenceUserSchema,
1246
1503
  PreviewHarnessSchema,
1247
1504
  QueueJobSchema,
1248
1505
  QueueJobStatusSchema,
1249
1506
  QueueJobTypeSchema,
1507
+ RecordLockInfoSchema,
1508
+ RecordLockSchema,
1250
1509
  ReferenceDataSourceSchema,
1251
1510
  ScoreBandSchema,
1252
1511
  ScoringConfigSchema,
@@ -1271,6 +1530,7 @@ export {
1271
1530
  ThemeSupportSchema,
1272
1531
  ThemeTokensSchema,
1273
1532
  ThemeTypographyTokensSchema,
1533
+ TypingIndicatorSchema,
1274
1534
  UIComponentTypeSchema,
1275
1535
  UIExtractionResultSchema,
1276
1536
  UIGenerationOptionsSchema,
@@ -1294,6 +1554,8 @@ export {
1294
1554
  VideoTranscodeSchema,
1295
1555
  VideoUpscaleSchema,
1296
1556
  VideoWatermarkSchema,
1557
+ ViewingIndicatorSchema,
1558
+ ViewportTransformSchema,
1297
1559
  WatermarkPositionSchema,
1298
1560
  WatermarkSchema
1299
1561
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixerate/schemas",
3
- "version": "1.9.0",
3
+ "version": "1.10.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",