@pixerate/schemas 1.13.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.cjs +204 -0
- package/dist/index.d.cts +483 -1
- package/dist/index.d.ts +483 -1
- package/dist/index.js +186 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1450,6 +1450,174 @@ var CRDTSnapshotSchema = z.object({
|
|
|
1450
1450
|
state: z.record(z.unknown()).default({}),
|
|
1451
1451
|
updatedAt: z.number().int().positive().default(() => Date.now())
|
|
1452
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());
|
|
1453
1621
|
export {
|
|
1454
1622
|
ActivityActionSchema,
|
|
1455
1623
|
ActivityActionTypeSchema,
|
|
@@ -1480,6 +1648,7 @@ export {
|
|
|
1480
1648
|
AudioSilenceTrimOptionsSchema,
|
|
1481
1649
|
AudioVisualizerOptionsSchema,
|
|
1482
1650
|
AudioVisualizerTypeSchema,
|
|
1651
|
+
AuthUserSchema,
|
|
1483
1652
|
AutoFitCaptionSchema,
|
|
1484
1653
|
CRDTSnapshotSchema,
|
|
1485
1654
|
CodeGenerationSchema,
|
|
@@ -1515,6 +1684,10 @@ export {
|
|
|
1515
1684
|
FormStageSchema,
|
|
1516
1685
|
FormSubmissionPayloadSchema,
|
|
1517
1686
|
FormValidatorSchema,
|
|
1687
|
+
FuelCostMapSchema,
|
|
1688
|
+
FuelPlanSchema,
|
|
1689
|
+
FuelTransactionSchema,
|
|
1690
|
+
FuelTransactionTypeSchema,
|
|
1518
1691
|
GenerateHarnessOptionsSchema,
|
|
1519
1692
|
ImageCompositingSchema,
|
|
1520
1693
|
ImageGenerationSchema,
|
|
@@ -1525,6 +1698,9 @@ export {
|
|
|
1525
1698
|
ImageWatermarkSchema,
|
|
1526
1699
|
IngestionInputSchema,
|
|
1527
1700
|
InternalComponentDependencySchema,
|
|
1701
|
+
InviteSchema,
|
|
1702
|
+
InviteStatusSchema,
|
|
1703
|
+
InviteTargetTypeSchema,
|
|
1528
1704
|
JsonGenerationSchema,
|
|
1529
1705
|
KenBurnsOptionsSchema,
|
|
1530
1706
|
LockClaimRequestSchema,
|
|
@@ -1538,6 +1714,8 @@ export {
|
|
|
1538
1714
|
OTRevisionSchema,
|
|
1539
1715
|
OTTextOpSchema,
|
|
1540
1716
|
OTTextOpTypeSchema,
|
|
1717
|
+
OrgMemberSchema,
|
|
1718
|
+
OrganizationSchema,
|
|
1541
1719
|
PerceptualHashAlgorithmSchema,
|
|
1542
1720
|
PerceptualHashOptionsSchema,
|
|
1543
1721
|
PerspectiveQuadSchema,
|
|
@@ -1567,6 +1745,10 @@ export {
|
|
|
1567
1745
|
SubmissionScoreSchema,
|
|
1568
1746
|
SubtitleBurnOptionsSchema,
|
|
1569
1747
|
SubtitleFormatSchema,
|
|
1748
|
+
TeamMemberDocSchema,
|
|
1749
|
+
TeamMemberSchema,
|
|
1750
|
+
TeamRoleSchema,
|
|
1751
|
+
TeamSchema,
|
|
1570
1752
|
TechnicalFormSchema,
|
|
1571
1753
|
TextAlignmentSchema,
|
|
1572
1754
|
TextOverlayPositionSchema,
|
|
@@ -1584,6 +1766,8 @@ export {
|
|
|
1584
1766
|
UIGenerationOptionsSchema,
|
|
1585
1767
|
UIGenerationResultSchema,
|
|
1586
1768
|
UIValidationResultSchema,
|
|
1769
|
+
UserPreferencesSchema,
|
|
1770
|
+
UserProfileSchema,
|
|
1587
1771
|
VectorTraceOptionsSchema,
|
|
1588
1772
|
VideoAnalysisCategorySchema,
|
|
1589
1773
|
VideoAnalysisSchema,
|
|
@@ -1605,6 +1789,8 @@ export {
|
|
|
1605
1789
|
VideoWatermarkSchema,
|
|
1606
1790
|
ViewingIndicatorSchema,
|
|
1607
1791
|
ViewportTransformSchema,
|
|
1792
|
+
WaitlistEntrySchema,
|
|
1793
|
+
WaitlistStatusSchema,
|
|
1608
1794
|
WatermarkPositionSchema,
|
|
1609
1795
|
WatermarkSchema
|
|
1610
1796
|
};
|