@pixerate/schemas 1.12.0 → 1.14.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
@@ -365,6 +365,25 @@ var GenerateHarnessOptionsSchema = z.object({
365
365
  componentName: z.string(),
366
366
  docsProps: z.array(ComponentPropDocSchema).optional()
367
367
  });
368
+ var InternalComponentDependencySchema = z.object({
369
+ type: z.literal("surreal"),
370
+ componentTypeId: z.string().describe("Slug of target component type (e.g. 'button')"),
371
+ aestheticId: z.string().optional().describe("Aesthetic style ID (e.g. 'glassmorphism')"),
372
+ variantId: z.string().optional().describe("Variant ID (e.g. 'glass-action-button')"),
373
+ versionRange: z.string().default("^1.0.0").describe("Semver range required"),
374
+ importedAs: z.string().describe("Local identifier name (e.g. 'Button')")
375
+ });
376
+ var ExternalPackageDependencySchema = z.object({
377
+ type: z.literal("npm"),
378
+ packageName: z.string().describe("NPM package name (e.g. 'bits-ui', '@radix-ui/react-dialog')"),
379
+ versionRange: z.string().default("^1.0.0").describe("Semver range (e.g. '^1.0.0', '^1.1.2')"),
380
+ isPeerDependency: z.boolean().default(false),
381
+ importSpecifiers: z.array(z.string()).optional()
382
+ });
383
+ var ComponentDependencySchema = z.discriminatedUnion("type", [
384
+ InternalComponentDependencySchema,
385
+ ExternalPackageDependencySchema
386
+ ]);
368
387
  var ComponentSynthesisSchema = z.object({
369
388
  title: z.string().describe("Title of the synthesized component"),
370
389
  description: z.string().describe("Detailed description of the component"),
@@ -379,6 +398,11 @@ var ComponentSynthesisSchema = z.object({
379
398
  react: PreviewHarnessSchema,
380
399
  webcomponent: PreviewHarnessSchema
381
400
  }).optional(),
401
+ dependencies: z.object({
402
+ svelte: z.array(ComponentDependencySchema).default([]),
403
+ react: z.array(ComponentDependencySchema).default([]),
404
+ webcomponent: z.array(ComponentDependencySchema).default([])
405
+ }).optional(),
382
406
  docs: ComponentDocsSchema
383
407
  });
384
408
  var ComponentTransformationResultSchema = z.object({
@@ -387,6 +411,11 @@ var ComponentTransformationResultSchema = z.object({
387
411
  tags: z.array(z.string()),
388
412
  platforms: z.record(PlatformLanguageSchema, z.string()),
389
413
  harnesses: z.record(PlatformLanguageSchema, PreviewHarnessSchema),
414
+ dependencies: z.object({
415
+ svelte: z.array(ComponentDependencySchema).default([]),
416
+ react: z.array(ComponentDependencySchema).default([]),
417
+ webcomponent: z.array(ComponentDependencySchema).default([])
418
+ }).optional(),
390
419
  docs: ComponentDocsSchema,
391
420
  detectedLanguage: PlatformLanguageSchema,
392
421
  themeSupport: ThemeSupportSchema
@@ -398,6 +427,7 @@ var ComponentPackageSchema = z.object({
398
427
  screenshot: z.string().describe("Data URI or URL of actual rendered component"),
399
428
  themeSupport: ThemeSupportSchema,
400
429
  tags: z.array(z.string()),
430
+ dependencies: z.array(ComponentDependencySchema).default([]),
401
431
  previewHarness: PreviewHarnessSchema.optional()
402
432
  });
403
433
  var UIComponentTypeSchema = z.object({
@@ -1420,6 +1450,174 @@ var CRDTSnapshotSchema = z.object({
1420
1450
  state: z.record(z.unknown()).default({}),
1421
1451
  updatedAt: z.number().int().positive().default(() => Date.now())
1422
1452
  });
1453
+ var AuthUserSchema = z.object({
1454
+ id: z.string(),
1455
+ email: z.string().email(),
1456
+ displayName: z.string().optional(),
1457
+ photoURL: z.string().url().optional().nullable(),
1458
+ emailVerified: z.boolean().default(false),
1459
+ provider: z.string().default("password"),
1460
+ createdAt: z.union([z.string(), z.number(), z.date()]).optional(),
1461
+ metadata: z.record(z.unknown()).optional().default({})
1462
+ });
1463
+ var UserPreferencesSchema = z.record(z.unknown()).default({});
1464
+ var UserProfileSchema = z.object({
1465
+ id: z.string(),
1466
+ displayName: z.string().default(""),
1467
+ photoURL: z.string().url().optional().nullable(),
1468
+ email: z.string().email().optional(),
1469
+ defaultOrgId: z.string().optional(),
1470
+ defaultTeamId: z.string().optional(),
1471
+ orgIds: z.array(z.string()).default([]),
1472
+ teamIds: z.array(z.string()).default([]),
1473
+ preferences: UserPreferencesSchema,
1474
+ onboarding: z.object({
1475
+ completed: z.boolean().default(false),
1476
+ rolePreference: z.string().optional(),
1477
+ milestones: z.array(z.string()).default([]),
1478
+ skipped: z.boolean().default(false)
1479
+ }).optional(),
1480
+ createdAt: z.union([z.string(), z.number(), z.date()]).optional(),
1481
+ updatedAt: z.union([z.string(), z.number(), z.date()]).optional()
1482
+ });
1483
+ var TeamRoleSchema = z.enum(["owner", "admin", "editor", "viewer", "member"]);
1484
+ var OrgMemberSchema = z.object({
1485
+ id: z.string(),
1486
+ orgId: z.string(),
1487
+ userId: z.string(),
1488
+ email: z.string().email(),
1489
+ role: TeamRoleSchema.default("member"),
1490
+ status: z.enum(["active", "invited", "suspended"]).default("active"),
1491
+ teamIds: z.array(z.string()).default([]),
1492
+ joinedAt: z.union([z.string(), z.number(), z.date()]).optional(),
1493
+ invitedBy: z.string().optional()
1494
+ });
1495
+ var OrganizationSchema = z.object({
1496
+ id: z.string(),
1497
+ name: z.string(),
1498
+ slug: z.string(),
1499
+ description: z.string().optional(),
1500
+ ownerId: z.string(),
1501
+ memberIds: z.array(z.string()).default([]),
1502
+ planId: z.string().default("free"),
1503
+ fuelBalance: z.number().default(0),
1504
+ stripeCustomerId: z.string().optional(),
1505
+ stripeSubscriptionId: z.string().optional(),
1506
+ cancelAtPeriodEnd: z.boolean().optional(),
1507
+ billingPeriodStart: z.union([z.string(), z.number(), z.date()]).optional(),
1508
+ billingPeriodEnd: z.union([z.string(), z.number(), z.date()]).optional(),
1509
+ metadata: z.record(z.unknown()).optional().default({}),
1510
+ createdAt: z.union([z.string(), z.number(), z.date()]).optional(),
1511
+ updatedAt: z.union([z.string(), z.number(), z.date()]).optional()
1512
+ });
1513
+ var TeamMemberDocSchema = z.object({
1514
+ role: TeamRoleSchema.default("member"),
1515
+ status: z.enum(["active", "invited", "suspended"]).default("active"),
1516
+ email: z.string().email().optional(),
1517
+ joinedAt: z.union([z.string(), z.number(), z.date()]).optional(),
1518
+ invitedBy: z.string().optional()
1519
+ });
1520
+ var TeamMemberSchema = TeamMemberDocSchema.extend({
1521
+ id: z.string(),
1522
+ userId: z.string(),
1523
+ teamId: z.string(),
1524
+ displayName: z.string().optional(),
1525
+ photoURL: z.string().url().optional().nullable()
1526
+ });
1527
+ var TeamSchema = z.object({
1528
+ id: z.string(),
1529
+ orgId: z.string().optional(),
1530
+ name: z.string(),
1531
+ slug: z.string().optional(),
1532
+ description: z.string().optional(),
1533
+ ownerId: z.string(),
1534
+ memberIds: z.array(z.string()).default([]),
1535
+ planId: z.string().optional().default("free"),
1536
+ fuelBalance: z.number().optional().default(0),
1537
+ metadata: z.record(z.unknown()).optional().default({}),
1538
+ createdAt: z.union([z.string(), z.number(), z.date()]).optional(),
1539
+ updatedAt: z.union([z.string(), z.number(), z.date()]).optional()
1540
+ });
1541
+ var InviteTargetTypeSchema = z.enum(["organization", "team"]);
1542
+ var InviteStatusSchema = z.enum(["pending", "accepted", "revoked", "expired"]);
1543
+ var InviteSchema = z.object({
1544
+ id: z.string(),
1545
+ token: z.string(),
1546
+ targetType: InviteTargetTypeSchema,
1547
+ targetId: z.string(),
1548
+ email: z.string().email().optional().nullable(),
1549
+ role: TeamRoleSchema.default("member"),
1550
+ invitedBy: z.string(),
1551
+ status: InviteStatusSchema.default("pending"),
1552
+ maxUses: z.number().int().positive().default(1),
1553
+ useCount: z.number().int().nonnegative().default(0),
1554
+ acceptedBy: z.array(z.string()).default([]),
1555
+ expiresAt: z.union([z.string(), z.number(), z.date()]),
1556
+ metadata: z.record(z.unknown()).optional().default({}),
1557
+ createdAt: z.union([z.string(), z.number(), z.date()]).optional(),
1558
+ updatedAt: z.union([z.string(), z.number(), z.date()]).optional()
1559
+ });
1560
+ var WaitlistStatusSchema = z.enum(["pending", "approved", "rejected", "onboarded"]);
1561
+ var WaitlistEntrySchema = z.object({
1562
+ id: z.string(),
1563
+ email: z.string().email(),
1564
+ name: z.string().optional(),
1565
+ status: WaitlistStatusSchema.default("pending"),
1566
+ referralCode: z.string().optional(),
1567
+ referredBy: z.string().optional(),
1568
+ referralCount: z.number().int().nonnegative().default(0),
1569
+ position: z.number().int().positive().optional(),
1570
+ priorityScore: z.number().default(0),
1571
+ metadata: z.record(z.unknown()).optional().default({}),
1572
+ approvedAt: z.union([z.string(), z.number(), z.date()]).optional(),
1573
+ onboardedAt: z.union([z.string(), z.number(), z.date()]).optional(),
1574
+ createdAt: z.union([z.string(), z.number(), z.date()]).optional(),
1575
+ updatedAt: z.union([z.string(), z.number(), z.date()]).optional()
1576
+ });
1577
+ var FuelTransactionTypeSchema = z.enum([
1578
+ "usage",
1579
+ "consumption",
1580
+ "top_up",
1581
+ "topup",
1582
+ "proration",
1583
+ "adjustment",
1584
+ "allocation",
1585
+ "bonus",
1586
+ "refund"
1587
+ ]);
1588
+ var FuelTransactionSchema = z.object({
1589
+ id: z.string(),
1590
+ orgId: z.string().optional(),
1591
+ teamId: z.string().optional(),
1592
+ targetType: z.enum(["organization", "team", "user"]).optional(),
1593
+ targetId: z.string().optional(),
1594
+ userId: z.string().optional().nullable(),
1595
+ amount: z.number(),
1596
+ balanceAfter: z.number().optional(),
1597
+ type: FuelTransactionTypeSchema,
1598
+ reason: z.string().optional(),
1599
+ description: z.string().optional(),
1600
+ resultType: z.string().optional(),
1601
+ resultId: z.string().optional(),
1602
+ client: z.string().optional().default("unknown"),
1603
+ metadata: z.record(z.unknown()).optional().default({}),
1604
+ createdAt: z.union([z.string(), z.number(), z.date()]).default(() => /* @__PURE__ */ new Date())
1605
+ });
1606
+ var FuelPlanSchema = z.object({
1607
+ id: z.string(),
1608
+ name: z.string(),
1609
+ monthlyAllocation: z.number().nonnegative().optional(),
1610
+ monthlyFuel: z.number().nonnegative().optional(),
1611
+ allowRollover: z.boolean().optional().default(false),
1612
+ rolloverFuel: z.boolean().optional().default(false),
1613
+ maxRolloverFuel: z.number().nonnegative().optional(),
1614
+ maxTeamMembers: z.number().int().positive().optional(),
1615
+ priceMonthlyCents: z.number().int().nonnegative().optional(),
1616
+ features: z.array(z.string()).default([]),
1617
+ stripePriceId: z.string().optional(),
1618
+ rateLimits: z.record(z.number()).optional()
1619
+ });
1620
+ var FuelCostMapSchema = z.record(z.number().nonnegative());
1423
1621
  export {
1424
1622
  ActivityActionSchema,
1425
1623
  ActivityActionTypeSchema,
@@ -1450,9 +1648,11 @@ export {
1450
1648
  AudioSilenceTrimOptionsSchema,
1451
1649
  AudioVisualizerOptionsSchema,
1452
1650
  AudioVisualizerTypeSchema,
1651
+ AuthUserSchema,
1453
1652
  AutoFitCaptionSchema,
1454
1653
  CRDTSnapshotSchema,
1455
1654
  CodeGenerationSchema,
1655
+ ComponentDependencySchema,
1456
1656
  ComponentDocsSchema,
1457
1657
  ComponentPackageSchema,
1458
1658
  ComponentPropDefinitionSchema,
@@ -1471,6 +1671,7 @@ export {
1471
1671
  DisplacementMapSchema,
1472
1672
  DocumentGenerationOptionsSchema,
1473
1673
  DropShadowSchema,
1674
+ ExternalPackageDependencySchema,
1474
1675
  FORM_SCHEMA_JSON_SCHEMA,
1475
1676
  FidelitySchema,
1476
1677
  FieldPresenceSchema,
@@ -1483,6 +1684,10 @@ export {
1483
1684
  FormStageSchema,
1484
1685
  FormSubmissionPayloadSchema,
1485
1686
  FormValidatorSchema,
1687
+ FuelCostMapSchema,
1688
+ FuelPlanSchema,
1689
+ FuelTransactionSchema,
1690
+ FuelTransactionTypeSchema,
1486
1691
  GenerateHarnessOptionsSchema,
1487
1692
  ImageCompositingSchema,
1488
1693
  ImageGenerationSchema,
@@ -1492,6 +1697,10 @@ export {
1492
1697
  ImageTransformationSchema,
1493
1698
  ImageWatermarkSchema,
1494
1699
  IngestionInputSchema,
1700
+ InternalComponentDependencySchema,
1701
+ InviteSchema,
1702
+ InviteStatusSchema,
1703
+ InviteTargetTypeSchema,
1495
1704
  JsonGenerationSchema,
1496
1705
  KenBurnsOptionsSchema,
1497
1706
  LockClaimRequestSchema,
@@ -1505,6 +1714,8 @@ export {
1505
1714
  OTRevisionSchema,
1506
1715
  OTTextOpSchema,
1507
1716
  OTTextOpTypeSchema,
1717
+ OrgMemberSchema,
1718
+ OrganizationSchema,
1508
1719
  PerceptualHashAlgorithmSchema,
1509
1720
  PerceptualHashOptionsSchema,
1510
1721
  PerspectiveQuadSchema,
@@ -1534,6 +1745,10 @@ export {
1534
1745
  SubmissionScoreSchema,
1535
1746
  SubtitleBurnOptionsSchema,
1536
1747
  SubtitleFormatSchema,
1748
+ TeamMemberDocSchema,
1749
+ TeamMemberSchema,
1750
+ TeamRoleSchema,
1751
+ TeamSchema,
1537
1752
  TechnicalFormSchema,
1538
1753
  TextAlignmentSchema,
1539
1754
  TextOverlayPositionSchema,
@@ -1551,6 +1766,8 @@ export {
1551
1766
  UIGenerationOptionsSchema,
1552
1767
  UIGenerationResultSchema,
1553
1768
  UIValidationResultSchema,
1769
+ UserPreferencesSchema,
1770
+ UserProfileSchema,
1554
1771
  VectorTraceOptionsSchema,
1555
1772
  VideoAnalysisCategorySchema,
1556
1773
  VideoAnalysisSchema,
@@ -1572,6 +1789,8 @@ export {
1572
1789
  VideoWatermarkSchema,
1573
1790
  ViewingIndicatorSchema,
1574
1791
  ViewportTransformSchema,
1792
+ WaitlistEntrySchema,
1793
+ WaitlistStatusSchema,
1575
1794
  WatermarkPositionSchema,
1576
1795
  WatermarkSchema
1577
1796
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixerate/schemas",
3
- "version": "1.12.0",
3
+ "version": "1.14.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",