@pixerate/schemas 1.1.13 → 1.3.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
@@ -14,13 +14,34 @@ var AspectRatioSchema = z.enum([
14
14
  "21:9"
15
15
  ]);
16
16
  var VideoAspectRatioSchema = z.enum(["9:16", "16:9"]);
17
+ var VideoResolutionSchema = z.enum(["720p", "1080p", "4k", "720P", "1080P", "4K"]);
18
+ var VideoFrameImageSchema = z.union([
19
+ z.string(),
20
+ z.object({
21
+ bytesBase64Encoded: z.string().optional(),
22
+ data: z.string().optional(),
23
+ mimeType: z.string().optional()
24
+ })
25
+ ]);
17
26
  var VideoGenerationSchema = z.object({
18
27
  prompt: z.string(),
19
28
  aspectRatio: VideoAspectRatioSchema.optional(),
20
29
  durationSeconds: z.number().int().optional(),
21
30
  generateAudio: z.boolean().optional(),
22
31
  modelName: z.string().optional(),
23
- resolution: z.string().optional()
32
+ resolution: VideoResolutionSchema.optional(),
33
+ fps: z.number().optional(),
34
+ isMultimedia: z.boolean().optional(),
35
+ multimedia: z.boolean().optional(),
36
+ firstFrame: VideoFrameImageSchema.optional(),
37
+ lastFrame: VideoFrameImageSchema.optional()
38
+ });
39
+ var VideoUpscaleSchema = z.object({
40
+ video: z.string().optional(),
41
+ mimeType: z.string().optional(),
42
+ prompt: z.string().optional(),
43
+ targetResolution: z.enum(["1080p", "4k", "1080P", "4K"]).default("1080p"),
44
+ modelName: z.string().optional()
24
45
  });
25
46
  var VideoOverlayStyleSchema = z.enum([
26
47
  "neubrutalist",
@@ -235,7 +256,7 @@ var AgentInteractionResultSchema = z.object({
235
256
  createdAt: z.string().optional(),
236
257
  updatedAt: z.string().optional()
237
258
  });
238
- var QueueJobTypeSchema = z.enum(["text", "image", "video", "analysis", "audio", "agent", "code", "component"]);
259
+ var QueueJobTypeSchema = z.enum(["text", "image", "video", "analysis", "audio", "agent", "code", "component", "upscale"]);
239
260
  var QueueJobStatusSchema = z.enum(["queued", "processing", "completed", "failed"]);
240
261
  var QueueJobSchema = z.object({
241
262
  id: z.string(),
@@ -246,6 +267,215 @@ var QueueJobSchema = z.object({
246
267
  createdAt: z.any().optional(),
247
268
  updatedAt: z.any().optional()
248
269
  });
270
+ var ConditionOperatorSchema = z.enum([
271
+ "equals",
272
+ "notEquals",
273
+ "not_equals",
274
+ "includes",
275
+ "contains",
276
+ "greaterThan",
277
+ "greater_than",
278
+ "lessThan",
279
+ "less_than",
280
+ "exists"
281
+ ]);
282
+ var ConditionSchema = z.object({
283
+ field: z.string().optional(),
284
+ fieldId: z.string().optional(),
285
+ operator: ConditionOperatorSchema,
286
+ value: z.union([z.string(), z.number(), z.boolean()]).optional()
287
+ });
288
+ var ControlValidationSchema = z.object({
289
+ min: z.number().optional(),
290
+ max: z.number().optional(),
291
+ minLength: z.number().optional(),
292
+ maxLength: z.number().optional(),
293
+ pattern: z.string().optional(),
294
+ message: z.string().optional(),
295
+ unit: z.string().optional()
296
+ });
297
+ var FormOptionSchema = z.object({
298
+ label: z.string(),
299
+ value: z.string()
300
+ });
301
+ var ReferenceDataSourceSchema = z.enum(["companies", "users"]);
302
+ var FormControlTypeSchema = z.enum([
303
+ "text",
304
+ "textarea",
305
+ "number",
306
+ "select",
307
+ "multiselect",
308
+ "radio",
309
+ "checkbox",
310
+ "date",
311
+ "file",
312
+ "company",
313
+ "user",
314
+ "slider",
315
+ "computed",
316
+ "repeater"
317
+ ]);
318
+ var FormControlSchema = z.lazy(
319
+ () => z.object({
320
+ id: z.string(),
321
+ type: FormControlTypeSchema,
322
+ label: z.string(),
323
+ description: z.string().optional(),
324
+ helperText: z.string().optional(),
325
+ placeholder: z.string().optional(),
326
+ required: z.boolean().optional(),
327
+ defaultValue: z.any().optional(),
328
+ options: z.array(FormOptionSchema).optional(),
329
+ dataSource: ReferenceDataSourceSchema.optional(),
330
+ validation: ControlValidationSchema.optional(),
331
+ pattern: z.string().optional(),
332
+ min: z.number().optional(),
333
+ max: z.number().optional(),
334
+ step: z.number().optional(),
335
+ minItems: z.number().optional(),
336
+ maxItems: z.number().optional(),
337
+ formula: z.string().optional(),
338
+ computed: z.object({ formula: z.string().optional() }).optional(),
339
+ visibleWhen: ConditionSchema.optional(),
340
+ condition: ConditionSchema.optional(),
341
+ itemControls: z.array(FormControlSchema).optional(),
342
+ controls: z.array(FormControlSchema).optional()
343
+ })
344
+ );
345
+ var FormSectionSchema = z.object({
346
+ id: z.string(),
347
+ title: z.string(),
348
+ description: z.string().optional(),
349
+ controls: z.array(FormControlSchema),
350
+ visibleWhen: ConditionSchema.optional(),
351
+ condition: ConditionSchema.optional()
352
+ });
353
+ var FormStageSchema = z.object({
354
+ id: z.string(),
355
+ title: z.string(),
356
+ description: z.string().optional(),
357
+ sections: z.array(FormSectionSchema),
358
+ gate: z.string().optional()
359
+ });
360
+ var DecisionGateKindSchema = z.enum(["approval", "review", "decision"]);
361
+ var DecisionGateSchema = z.object({
362
+ id: z.string(),
363
+ title: z.string(),
364
+ description: z.string().optional(),
365
+ stageId: z.string(),
366
+ kind: DecisionGateKindSchema.optional(),
367
+ trigger: z.string().optional(),
368
+ requiredAction: z.string().optional(),
369
+ consequence: z.string().optional(),
370
+ condition: z.union([ConditionSchema, z.string()]).optional(),
371
+ blocking: z.boolean(),
372
+ reviewerRole: z.string().optional()
373
+ });
374
+ var ScoringRuleSchema = z.object({
375
+ field: z.string(),
376
+ optionPoints: z.record(z.number()).optional(),
377
+ ranges: z.array(
378
+ z.object({
379
+ min: z.number().optional(),
380
+ max: z.number().optional(),
381
+ points: z.number()
382
+ })
383
+ ).optional(),
384
+ multiplier: z.number().optional(),
385
+ truePoints: z.number().optional(),
386
+ falsePoints: z.number().optional()
387
+ });
388
+ var ScoringDimensionSchema = z.object({
389
+ id: z.string(),
390
+ label: z.string(),
391
+ description: z.string().optional(),
392
+ weight: z.number().optional(),
393
+ rules: z.array(ScoringRuleSchema)
394
+ });
395
+ var ScoreBandSchema = z.object({
396
+ id: z.string(),
397
+ label: z.string(),
398
+ min: z.number(),
399
+ max: z.number().optional()
400
+ });
401
+ var ScoringConfigSchema = z.object({
402
+ description: z.string().optional(),
403
+ dimensions: z.array(ScoringDimensionSchema),
404
+ bands: z.array(ScoreBandSchema).optional()
405
+ });
406
+ var DimensionScoreSchema = z.object({
407
+ dimensionId: z.string(),
408
+ label: z.string(),
409
+ points: z.number(),
410
+ weight: z.number(),
411
+ weighted: z.number()
412
+ });
413
+ var SubmissionScoreSchema = z.object({
414
+ total: z.number(),
415
+ dimensions: z.array(DimensionScoreSchema),
416
+ band: z.object({ id: z.string(), label: z.string() }).optional(),
417
+ calculatedAt: z.string(),
418
+ schemaVersion: z.union([z.string(), z.number()])
419
+ });
420
+ var FormValidatorSchema = z.object({
421
+ id: z.string(),
422
+ description: z.string().optional(),
423
+ fields: z.array(z.string()).optional(),
424
+ severity: z.union([z.enum(["error", "warning"]), z.string()]).optional(),
425
+ type: z.string().optional(),
426
+ config: z.any().optional()
427
+ });
428
+ var FormHandoffActionSchema = z.object({
429
+ id: z.string().optional(),
430
+ label: z.string().optional(),
431
+ destination: z.string().optional(),
432
+ condition: z.union([ConditionSchema, z.string()]).optional(),
433
+ payloadFields: z.array(z.string()).optional(),
434
+ type: z.string().optional(),
435
+ config: z.any().optional()
436
+ });
437
+ var FormReviewMetaSchema = z.object({
438
+ humanReviewRequired: z.boolean(),
439
+ reviewAreas: z.array(z.string())
440
+ });
441
+ var TechnicalFormSchema = z.object({
442
+ id: z.string().optional(),
443
+ title: z.string().optional(),
444
+ description: z.string().optional(),
445
+ version: z.union([z.string(), z.number()]),
446
+ stages: z.array(FormStageSchema),
447
+ decisionGates: z.array(DecisionGateSchema).optional(),
448
+ validators: z.array(FormValidatorSchema).optional(),
449
+ handoffActions: z.array(FormHandoffActionSchema).optional(),
450
+ review: FormReviewMetaSchema.optional(),
451
+ reviewMetadata: z.object({
452
+ approvers: z.array(z.string()),
453
+ requirements: z.array(z.string())
454
+ }).optional(),
455
+ scoring: ScoringConfigSchema.optional()
456
+ });
457
+ var SemanticReviewStatusSchema = z.enum(["pass", "flagged", "unavailable"]);
458
+ var SemanticReviewIssueSchema = z.object({
459
+ id: z.string(),
460
+ severity: z.enum(["warning", "error"]),
461
+ message: z.string(),
462
+ fieldId: z.string().optional(),
463
+ fieldLabel: z.string().optional(),
464
+ suggestion: z.string().optional()
465
+ });
466
+ var SemanticReviewResultSchema = z.object({
467
+ status: SemanticReviewStatusSchema,
468
+ summary: z.string().optional(),
469
+ issues: z.array(SemanticReviewIssueSchema)
470
+ });
471
+ var FormSubmissionPayloadSchema = z.object({
472
+ id: z.string().optional(),
473
+ answers: z.record(z.any()),
474
+ stageReviews: z.array(z.any()).optional(),
475
+ gateDecisions: z.array(z.any()).optional(),
476
+ submittedAt: z.string().optional(),
477
+ score: SubmissionScoreSchema.optional()
478
+ });
249
479
  export {
250
480
  AgentConfigSchema,
251
481
  AgentDocumentAttachmentSchema,
@@ -261,8 +491,23 @@ export {
261
491
  CodeGenerationSchema,
262
492
  ComponentPropDefinitionSchema,
263
493
  ComponentSynthesisSchema,
494
+ ConditionOperatorSchema,
495
+ ConditionSchema,
496
+ ControlValidationSchema,
497
+ DecisionGateKindSchema,
498
+ DecisionGateSchema,
499
+ DimensionScoreSchema,
264
500
  DropShadowSchema,
265
501
  FidelitySchema,
502
+ FormControlSchema,
503
+ FormControlTypeSchema,
504
+ FormHandoffActionSchema,
505
+ FormOptionSchema,
506
+ FormReviewMetaSchema,
507
+ FormSectionSchema,
508
+ FormStageSchema,
509
+ FormSubmissionPayloadSchema,
510
+ FormValidatorSchema,
266
511
  ImageCompositingSchema,
267
512
  ImageGenerationSchema,
268
513
  ImageTextOverlaySchema,
@@ -272,16 +517,29 @@ export {
272
517
  QueueJobSchema,
273
518
  QueueJobStatusSchema,
274
519
  QueueJobTypeSchema,
520
+ ReferenceDataSourceSchema,
521
+ ScoreBandSchema,
522
+ ScoringConfigSchema,
523
+ ScoringDimensionSchema,
524
+ ScoringRuleSchema,
525
+ SemanticReviewIssueSchema,
526
+ SemanticReviewResultSchema,
527
+ SemanticReviewStatusSchema,
275
528
  ServiceClientSchema,
276
529
  SocialVideoGenerationSchema,
530
+ SubmissionScoreSchema,
531
+ TechnicalFormSchema,
277
532
  TextAlignmentSchema,
278
533
  TextOverlayPositionSchema,
279
534
  VideoAnalysisCategorySchema,
280
535
  VideoAnalysisSchema,
281
536
  VideoAspectRatioSchema,
537
+ VideoFrameImageSchema,
282
538
  VideoGenerationSchema,
283
539
  VideoOverlayStyleSchema,
540
+ VideoResolutionSchema,
284
541
  VideoTextOverlaySchema,
542
+ VideoUpscaleSchema,
285
543
  VideoWatermarkSchema,
286
544
  WatermarkPositionSchema
287
545
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixerate/schemas",
3
- "version": "1.1.13",
3
+ "version": "1.3.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",