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