@pixerate/schemas 1.13.0 → 1.15.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 +321 -0
- package/dist/index.d.cts +799 -1
- package/dist/index.d.ts +799 -1
- package/dist/index.js +290 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1450,6 +1450,265 @@ 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());
|
|
1621
|
+
var NotificationChannelSchema = z.enum(["in_app", "email", "web_push", "webhook", "sms"]);
|
|
1622
|
+
var NotificationPrioritySchema = z.enum(["low", "normal", "high", "urgent"]);
|
|
1623
|
+
var NotificationCategorySchema = z.enum([
|
|
1624
|
+
"mention",
|
|
1625
|
+
"reply",
|
|
1626
|
+
"team_invite",
|
|
1627
|
+
"fuel_alert",
|
|
1628
|
+
"system",
|
|
1629
|
+
"job_completed",
|
|
1630
|
+
"job_failed",
|
|
1631
|
+
"custom"
|
|
1632
|
+
]);
|
|
1633
|
+
var NotificationStatusSchema = z.enum(["unread", "read", "archived"]);
|
|
1634
|
+
var NotificationDeliveryStateSchema = z.enum(["pending", "sent", "delivered", "failed", "skipped"]);
|
|
1635
|
+
var NotificationActorSchema = z.object({
|
|
1636
|
+
id: z.string(),
|
|
1637
|
+
name: z.string().optional(),
|
|
1638
|
+
email: z.string().optional(),
|
|
1639
|
+
avatarUrl: z.string().optional(),
|
|
1640
|
+
type: z.enum(["user", "agent", "system"]).optional().default("user")
|
|
1641
|
+
});
|
|
1642
|
+
var NotificationSchema = z.object({
|
|
1643
|
+
id: z.string(),
|
|
1644
|
+
recipientId: z.string(),
|
|
1645
|
+
recipientEmail: z.string().optional(),
|
|
1646
|
+
title: z.string(),
|
|
1647
|
+
body: z.string(),
|
|
1648
|
+
richContent: z.string().optional(),
|
|
1649
|
+
category: NotificationCategorySchema.default("system"),
|
|
1650
|
+
priority: NotificationPrioritySchema.default("normal"),
|
|
1651
|
+
channels: z.array(NotificationChannelSchema).default(["in_app"]),
|
|
1652
|
+
status: NotificationStatusSchema.default("unread"),
|
|
1653
|
+
actor: NotificationActorSchema.optional(),
|
|
1654
|
+
targetType: z.string().optional(),
|
|
1655
|
+
targetId: z.string().optional(),
|
|
1656
|
+
actionUrl: z.string().optional(),
|
|
1657
|
+
metadata: z.record(z.unknown()).optional().default({}),
|
|
1658
|
+
createdAt: z.union([z.string(), z.number(), z.date()]).default(() => (/* @__PURE__ */ new Date()).toISOString()),
|
|
1659
|
+
readAt: z.union([z.string(), z.number(), z.date()]).optional(),
|
|
1660
|
+
archivedAt: z.union([z.string(), z.number(), z.date()]).optional()
|
|
1661
|
+
});
|
|
1662
|
+
var NotificationDeliveryRecordSchema = z.object({
|
|
1663
|
+
id: z.string(),
|
|
1664
|
+
notificationId: z.string(),
|
|
1665
|
+
channel: NotificationChannelSchema,
|
|
1666
|
+
state: NotificationDeliveryStateSchema,
|
|
1667
|
+
error: z.string().optional(),
|
|
1668
|
+
sentAt: z.union([z.string(), z.number(), z.date()]).optional(),
|
|
1669
|
+
deliveredAt: z.union([z.string(), z.number(), z.date()]).optional()
|
|
1670
|
+
});
|
|
1671
|
+
var ChannelPreferencesSchema = z.object({
|
|
1672
|
+
in_app: z.boolean().default(true),
|
|
1673
|
+
email: z.boolean().default(true),
|
|
1674
|
+
web_push: z.boolean().default(false),
|
|
1675
|
+
webhook: z.boolean().default(false)
|
|
1676
|
+
});
|
|
1677
|
+
var NotificationPreferencesSchema = z.object({
|
|
1678
|
+
userId: z.string(),
|
|
1679
|
+
channels: z.record(NotificationCategorySchema, ChannelPreferencesSchema).optional().default({}),
|
|
1680
|
+
emailDigest: z.enum(["instant", "hourly", "daily", "weekly", "never"]).default("instant"),
|
|
1681
|
+
quietHours: z.object({
|
|
1682
|
+
enabled: z.boolean().default(false),
|
|
1683
|
+
startHourUtc: z.number().int().min(0).max(23).default(22),
|
|
1684
|
+
endHourUtc: z.number().int().min(0).max(23).default(8)
|
|
1685
|
+
}).optional(),
|
|
1686
|
+
updatedAt: z.union([z.string(), z.number(), z.date()]).default(() => (/* @__PURE__ */ new Date()).toISOString())
|
|
1687
|
+
});
|
|
1688
|
+
var EmailAttachmentSchema = z.object({
|
|
1689
|
+
filename: z.string(),
|
|
1690
|
+
content: z.union([z.string(), z.instanceof(Uint8Array)]),
|
|
1691
|
+
contentType: z.string().optional()
|
|
1692
|
+
});
|
|
1693
|
+
var EmailMessageSchema = z.object({
|
|
1694
|
+
to: z.union([z.string(), z.array(z.string())]),
|
|
1695
|
+
from: z.string().optional(),
|
|
1696
|
+
cc: z.union([z.string(), z.array(z.string())]).optional(),
|
|
1697
|
+
bcc: z.union([z.string(), z.array(z.string())]).optional(),
|
|
1698
|
+
subject: z.string(),
|
|
1699
|
+
text: z.string().optional(),
|
|
1700
|
+
html: z.string().optional(),
|
|
1701
|
+
replyTo: z.string().optional(),
|
|
1702
|
+
headers: z.record(z.string()).optional(),
|
|
1703
|
+
templateId: z.string().optional(),
|
|
1704
|
+
templateVariables: z.record(z.unknown()).optional(),
|
|
1705
|
+
attachments: z.array(EmailAttachmentSchema).optional()
|
|
1706
|
+
});
|
|
1707
|
+
var TaskUnreadSummarySchema = z.object({
|
|
1708
|
+
mentions: z.number().nonnegative().default(0),
|
|
1709
|
+
replies: z.number().nonnegative().default(0),
|
|
1710
|
+
total: z.number().nonnegative().default(0)
|
|
1711
|
+
});
|
|
1453
1712
|
export {
|
|
1454
1713
|
ActivityActionSchema,
|
|
1455
1714
|
ActivityActionTypeSchema,
|
|
@@ -1480,8 +1739,10 @@ export {
|
|
|
1480
1739
|
AudioSilenceTrimOptionsSchema,
|
|
1481
1740
|
AudioVisualizerOptionsSchema,
|
|
1482
1741
|
AudioVisualizerTypeSchema,
|
|
1742
|
+
AuthUserSchema,
|
|
1483
1743
|
AutoFitCaptionSchema,
|
|
1484
1744
|
CRDTSnapshotSchema,
|
|
1745
|
+
ChannelPreferencesSchema,
|
|
1485
1746
|
CodeGenerationSchema,
|
|
1486
1747
|
ComponentDependencySchema,
|
|
1487
1748
|
ComponentDocsSchema,
|
|
@@ -1502,6 +1763,8 @@ export {
|
|
|
1502
1763
|
DisplacementMapSchema,
|
|
1503
1764
|
DocumentGenerationOptionsSchema,
|
|
1504
1765
|
DropShadowSchema,
|
|
1766
|
+
EmailAttachmentSchema,
|
|
1767
|
+
EmailMessageSchema,
|
|
1505
1768
|
ExternalPackageDependencySchema,
|
|
1506
1769
|
FORM_SCHEMA_JSON_SCHEMA,
|
|
1507
1770
|
FidelitySchema,
|
|
@@ -1515,6 +1778,10 @@ export {
|
|
|
1515
1778
|
FormStageSchema,
|
|
1516
1779
|
FormSubmissionPayloadSchema,
|
|
1517
1780
|
FormValidatorSchema,
|
|
1781
|
+
FuelCostMapSchema,
|
|
1782
|
+
FuelPlanSchema,
|
|
1783
|
+
FuelTransactionSchema,
|
|
1784
|
+
FuelTransactionTypeSchema,
|
|
1518
1785
|
GenerateHarnessOptionsSchema,
|
|
1519
1786
|
ImageCompositingSchema,
|
|
1520
1787
|
ImageGenerationSchema,
|
|
@@ -1525,6 +1792,9 @@ export {
|
|
|
1525
1792
|
ImageWatermarkSchema,
|
|
1526
1793
|
IngestionInputSchema,
|
|
1527
1794
|
InternalComponentDependencySchema,
|
|
1795
|
+
InviteSchema,
|
|
1796
|
+
InviteStatusSchema,
|
|
1797
|
+
InviteTargetTypeSchema,
|
|
1528
1798
|
JsonGenerationSchema,
|
|
1529
1799
|
KenBurnsOptionsSchema,
|
|
1530
1800
|
LockClaimRequestSchema,
|
|
@@ -1532,12 +1802,23 @@ export {
|
|
|
1532
1802
|
LockReleaseRequestSchema,
|
|
1533
1803
|
LockStatusSchema,
|
|
1534
1804
|
MediaProbeResultSchema,
|
|
1805
|
+
NotificationActorSchema,
|
|
1806
|
+
NotificationCategorySchema,
|
|
1807
|
+
NotificationChannelSchema,
|
|
1808
|
+
NotificationDeliveryRecordSchema,
|
|
1809
|
+
NotificationDeliveryStateSchema,
|
|
1810
|
+
NotificationPreferencesSchema,
|
|
1811
|
+
NotificationPrioritySchema,
|
|
1812
|
+
NotificationSchema,
|
|
1813
|
+
NotificationStatusSchema,
|
|
1535
1814
|
OTJsonOpSchema,
|
|
1536
1815
|
OTJsonOpTypeSchema,
|
|
1537
1816
|
OTOperationSchema,
|
|
1538
1817
|
OTRevisionSchema,
|
|
1539
1818
|
OTTextOpSchema,
|
|
1540
1819
|
OTTextOpTypeSchema,
|
|
1820
|
+
OrgMemberSchema,
|
|
1821
|
+
OrganizationSchema,
|
|
1541
1822
|
PerceptualHashAlgorithmSchema,
|
|
1542
1823
|
PerceptualHashOptionsSchema,
|
|
1543
1824
|
PerspectiveQuadSchema,
|
|
@@ -1567,6 +1848,11 @@ export {
|
|
|
1567
1848
|
SubmissionScoreSchema,
|
|
1568
1849
|
SubtitleBurnOptionsSchema,
|
|
1569
1850
|
SubtitleFormatSchema,
|
|
1851
|
+
TaskUnreadSummarySchema,
|
|
1852
|
+
TeamMemberDocSchema,
|
|
1853
|
+
TeamMemberSchema,
|
|
1854
|
+
TeamRoleSchema,
|
|
1855
|
+
TeamSchema,
|
|
1570
1856
|
TechnicalFormSchema,
|
|
1571
1857
|
TextAlignmentSchema,
|
|
1572
1858
|
TextOverlayPositionSchema,
|
|
@@ -1584,6 +1870,8 @@ export {
|
|
|
1584
1870
|
UIGenerationOptionsSchema,
|
|
1585
1871
|
UIGenerationResultSchema,
|
|
1586
1872
|
UIValidationResultSchema,
|
|
1873
|
+
UserPreferencesSchema,
|
|
1874
|
+
UserProfileSchema,
|
|
1587
1875
|
VectorTraceOptionsSchema,
|
|
1588
1876
|
VideoAnalysisCategorySchema,
|
|
1589
1877
|
VideoAnalysisSchema,
|
|
@@ -1605,6 +1893,8 @@ export {
|
|
|
1605
1893
|
VideoWatermarkSchema,
|
|
1606
1894
|
ViewingIndicatorSchema,
|
|
1607
1895
|
ViewportTransformSchema,
|
|
1896
|
+
WaitlistEntrySchema,
|
|
1897
|
+
WaitlistStatusSchema,
|
|
1608
1898
|
WatermarkPositionSchema,
|
|
1609
1899
|
WatermarkSchema
|
|
1610
1900
|
};
|