@agentrix/shared 2.33.0 → 2.34.1
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/{errors-CmTesmvL.d.cts → errors-DxB8EzbU.d.cts} +54 -36
- package/dist/index.cjs +282 -118
- package/dist/index.d.cts +447 -18
- package/dist/node.d.cts +2 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1332,61 +1332,50 @@ const CreateCloudResponseSchema = zod.z.object({
|
|
|
1332
1332
|
updatedAt: DateSchema
|
|
1333
1333
|
});
|
|
1334
1334
|
|
|
1335
|
-
const
|
|
1336
|
-
id:
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
avatar: zod.z.string().optional(),
|
|
1340
|
-
authorizeUrl: zod.z.string().url(),
|
|
1341
|
-
tokenUrl: zod.z.string().url(),
|
|
1342
|
-
userInfoUrl: zod.z.string().url(),
|
|
1343
|
-
clientId: zod.z.string(),
|
|
1344
|
-
clientSecret: zod.z.string(),
|
|
1345
|
-
callbackUrl: zod.z.string().url(),
|
|
1346
|
-
scopes: zod.z.array(zod.z.string()).default([]),
|
|
1347
|
-
userInfoMapping: zod.z.record(zod.z.string(), zod.z.string()),
|
|
1335
|
+
const ApiKeySchema = zod.z.object({
|
|
1336
|
+
id: zod.z.string().min(1),
|
|
1337
|
+
name: zod.z.string().min(1).max(100),
|
|
1338
|
+
keyPrefix: zod.z.string().min(1),
|
|
1348
1339
|
enabled: zod.z.boolean(),
|
|
1349
|
-
|
|
1350
|
-
|
|
1340
|
+
quota: zod.z.number().nullable(),
|
|
1341
|
+
lastUsedAt: zod.z.string().datetime().nullable(),
|
|
1342
|
+
expiresAt: zod.z.string().datetime().nullable(),
|
|
1343
|
+
createdAt: zod.z.string().datetime()
|
|
1351
1344
|
});
|
|
1352
|
-
const
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
displayName: zod.z.string(),
|
|
1356
|
-
avatar: zod.z.string().optional(),
|
|
1357
|
-
enabled: zod.z.boolean(),
|
|
1358
|
-
createdAt: zod.z.union([DateSchema, zod.z.date().transform((d) => d.toISOString())]),
|
|
1359
|
-
updatedAt: zod.z.union([DateSchema, zod.z.date().transform((d) => d.toISOString())])
|
|
1345
|
+
const CreateApiKeyRequestSchema = zod.z.object({
|
|
1346
|
+
name: zod.z.string().min(1).max(100),
|
|
1347
|
+
expiresInDays: zod.z.number().int().positive().optional()
|
|
1360
1348
|
});
|
|
1361
|
-
const
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
clientId: zod.z.string().min(1),
|
|
1369
|
-
clientSecret: zod.z.string().min(1),
|
|
1370
|
-
scopes: zod.z.array(zod.z.string()).optional().default([]),
|
|
1371
|
-
userInfoMapping: zod.z.record(zod.z.string(), zod.z.string()).optional(),
|
|
1372
|
-
enabled: zod.z.boolean().default(true)
|
|
1349
|
+
const CreateApiKeyResponseSchema = zod.z.object({
|
|
1350
|
+
apiKey: zod.z.string().min(1),
|
|
1351
|
+
id: zod.z.string().min(1),
|
|
1352
|
+
name: zod.z.string().min(1).max(100),
|
|
1353
|
+
keyPrefix: zod.z.string().min(1),
|
|
1354
|
+
expiresAt: zod.z.string().datetime().nullable(),
|
|
1355
|
+
createdAt: zod.z.string().datetime()
|
|
1373
1356
|
});
|
|
1374
|
-
const
|
|
1375
|
-
|
|
1376
|
-
|
|
1357
|
+
const ListApiKeysQuerySchema = zod.z.object({
|
|
1358
|
+
includeDisabled: zod.z.string().optional().transform((val) => val === "true"),
|
|
1359
|
+
page: zod.z.string().optional().transform((val) => val ? parseInt(val, 10) : 1).refine((val) => val > 0, "Page must be positive"),
|
|
1360
|
+
limit: zod.z.string().optional().transform((val) => val ? parseInt(val, 10) : 10).refine((val) => val > 0 && val <= 100, "Limit must be between 1 and 100")
|
|
1377
1361
|
});
|
|
1378
|
-
const
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1362
|
+
const ListApiKeysResponseSchema = zod.z.object({
|
|
1363
|
+
items: zod.z.array(ApiKeySchema),
|
|
1364
|
+
total: zod.z.number().int().nonnegative(),
|
|
1365
|
+
page: zod.z.number().int().positive(),
|
|
1366
|
+
limit: zod.z.number().int().positive(),
|
|
1367
|
+
totalPages: zod.z.number().int().nonnegative()
|
|
1384
1368
|
});
|
|
1385
|
-
const
|
|
1369
|
+
const UpdateApiKeyRequestSchema = zod.z.object({
|
|
1370
|
+
name: zod.z.string().min(1).max(100).optional(),
|
|
1371
|
+
expiresInDays: zod.z.number().int().positive().optional()
|
|
1372
|
+
});
|
|
1373
|
+
const ToggleApiKeyRequestSchema = zod.z.object({
|
|
1386
1374
|
enabled: zod.z.boolean()
|
|
1387
1375
|
});
|
|
1388
|
-
const
|
|
1389
|
-
|
|
1376
|
+
const DeleteApiKeyResponseSchema = zod.z.object({
|
|
1377
|
+
success: zod.z.literal(true)
|
|
1378
|
+
});
|
|
1390
1379
|
|
|
1391
1380
|
const StripeCheckoutClientSchema = zod.z.enum(["android", "ios", "web"]);
|
|
1392
1381
|
const RechargeResponseSchema = zod.z.object({
|
|
@@ -1494,32 +1483,6 @@ const BillingStatsResponseSchema = zod.z.object({
|
|
|
1494
1483
|
transactionCount: zod.z.number().int().nonnegative()
|
|
1495
1484
|
});
|
|
1496
1485
|
|
|
1497
|
-
const GitServerSchema = zod.z.object({
|
|
1498
|
-
id: IdSchema,
|
|
1499
|
-
// id = slug (e.g., "github", "gitlab")
|
|
1500
|
-
type: zod.z.string(),
|
|
1501
|
-
name: zod.z.string(),
|
|
1502
|
-
baseUrl: zod.z.string().url(),
|
|
1503
|
-
apiUrl: zod.z.string().url(),
|
|
1504
|
-
oauthServerId: zod.z.string().nullable(),
|
|
1505
|
-
ownerId: zod.z.string().nullable(),
|
|
1506
|
-
// null = shared/public Git server config, userId = private config
|
|
1507
|
-
authModeDefault: zod.z.string().default("oauth"),
|
|
1508
|
-
// "oauth" | "local_pat"
|
|
1509
|
-
executionMode: zod.z.string().default("server"),
|
|
1510
|
-
// "server" | "daemon_proxy"
|
|
1511
|
-
syncMode: zod.z.string().default("polling_only"),
|
|
1512
|
-
// "polling_only" | "hybrid" | "webhook_only"
|
|
1513
|
-
networkMode: zod.z.string().default("direct"),
|
|
1514
|
-
// "direct" | "tunnel"
|
|
1515
|
-
githubAppName: zod.z.string().nullable(),
|
|
1516
|
-
enabled: zod.z.boolean(),
|
|
1517
|
-
createdAt: zod.z.union([DateSchema, zod.z.date().transform((d) => d.toISOString())]),
|
|
1518
|
-
updatedAt: zod.z.union([DateSchema, zod.z.date().transform((d) => d.toISOString())])
|
|
1519
|
-
});
|
|
1520
|
-
const ListGitServersResponseSchema = zod.z.array(GitServerSchema);
|
|
1521
|
-
const GetGitServerResponseSchema = GitServerSchema;
|
|
1522
|
-
|
|
1523
1486
|
const CurrentSubscriptionPlanTypeSchema = zod.z.enum(["free", "plus", "pro", "enterprise"]);
|
|
1524
1487
|
const SubscriptionPlanTypeSchema = zod.z.enum(["free", "plus", "pro", "enterprise", "lite", "max"]);
|
|
1525
1488
|
const SubscriptionPlanSchema = zod.z.object({
|
|
@@ -1658,6 +1621,208 @@ const ListSubscriptionPlansResponseSchema = zod.z.object({
|
|
|
1658
1621
|
plans: zod.z.array(SubscriptionPlanSchema)
|
|
1659
1622
|
});
|
|
1660
1623
|
|
|
1624
|
+
const ConsoleUserRoleSchema = zod.z.enum(["user", "admin"]);
|
|
1625
|
+
const SetConsoleUserRoleRequestSchema = zod.z.object({
|
|
1626
|
+
role: ConsoleUserRoleSchema
|
|
1627
|
+
});
|
|
1628
|
+
const ConsoleUsersListQuerySchema = zod.z.object({
|
|
1629
|
+
q: zod.z.string().trim().optional(),
|
|
1630
|
+
role: ConsoleUserRoleSchema.optional(),
|
|
1631
|
+
subscriptionStatus: zod.z.string().trim().optional(),
|
|
1632
|
+
planType: zod.z.string().trim().optional(),
|
|
1633
|
+
page: zod.z.string().optional().transform((value) => value ? parseInt(value, 10) : 1).refine((value) => Number.isInteger(value) && value > 0, "Page must be positive"),
|
|
1634
|
+
limit: zod.z.string().optional().transform((value) => value ? parseInt(value, 10) : 25).refine((value) => Number.isInteger(value) && value > 0 && value <= 100, "Limit must be between 1 and 100")
|
|
1635
|
+
});
|
|
1636
|
+
const ConsoleSubscriptionSummarySchema = zod.z.object({
|
|
1637
|
+
status: zod.z.string().nullable(),
|
|
1638
|
+
planType: zod.z.string().nullable(),
|
|
1639
|
+
planName: zod.z.string().nullable(),
|
|
1640
|
+
currentPeriodEnd: DateSchema.nullable(),
|
|
1641
|
+
cancelAtPeriodEnd: zod.z.boolean().nullable()
|
|
1642
|
+
});
|
|
1643
|
+
const ConsoleApiKeySummarySchema = zod.z.object({
|
|
1644
|
+
total: zod.z.number().int().nonnegative(),
|
|
1645
|
+
enabled: zod.z.number().int().nonnegative(),
|
|
1646
|
+
disabled: zod.z.number().int().nonnegative(),
|
|
1647
|
+
lastUsedAt: DateSchema.nullable()
|
|
1648
|
+
});
|
|
1649
|
+
const ConsoleUserListItemSchema = zod.z.object({
|
|
1650
|
+
id: IdSchema,
|
|
1651
|
+
username: zod.z.string(),
|
|
1652
|
+
email: zod.z.string().email().nullable(),
|
|
1653
|
+
avatar: zod.z.string().url().nullable(),
|
|
1654
|
+
role: zod.z.string(),
|
|
1655
|
+
stripeCustomerId: zod.z.string().nullable(),
|
|
1656
|
+
createdAt: DateSchema,
|
|
1657
|
+
updatedAt: DateSchema,
|
|
1658
|
+
subscriptionSummary: ConsoleSubscriptionSummarySchema,
|
|
1659
|
+
apiKeySummary: ConsoleApiKeySummarySchema
|
|
1660
|
+
});
|
|
1661
|
+
const ListConsoleUsersResponseSchema = zod.z.object({
|
|
1662
|
+
items: zod.z.array(ConsoleUserListItemSchema),
|
|
1663
|
+
total: zod.z.number().int().nonnegative(),
|
|
1664
|
+
page: zod.z.number().int().positive(),
|
|
1665
|
+
limit: zod.z.number().int().positive(),
|
|
1666
|
+
totalPages: zod.z.number().int().nonnegative()
|
|
1667
|
+
});
|
|
1668
|
+
const ConsoleUserProfileSchema = zod.z.object({
|
|
1669
|
+
id: IdSchema,
|
|
1670
|
+
username: zod.z.string(),
|
|
1671
|
+
email: zod.z.string().email().nullable(),
|
|
1672
|
+
avatar: zod.z.string().url().nullable(),
|
|
1673
|
+
role: zod.z.string(),
|
|
1674
|
+
stripeCustomerId: zod.z.string().nullable(),
|
|
1675
|
+
createdAt: DateSchema,
|
|
1676
|
+
updatedAt: DateSchema
|
|
1677
|
+
});
|
|
1678
|
+
const ConsoleUserOverviewResponseSchema = zod.z.object({
|
|
1679
|
+
user: ConsoleUserProfileSchema,
|
|
1680
|
+
oauthAccounts: zod.z.array(OAuthAccountInfoSchema),
|
|
1681
|
+
gitServerAccounts: zod.z.array(GitServerAccountInfoSchema)
|
|
1682
|
+
});
|
|
1683
|
+
const ConsoleBillingModuleErrorSchema = zod.z.object({
|
|
1684
|
+
error: zod.z.string(),
|
|
1685
|
+
message: zod.z.string()
|
|
1686
|
+
});
|
|
1687
|
+
const ConsoleStripeRechargeOrderSchema = zod.z.object({
|
|
1688
|
+
id: IdSchema,
|
|
1689
|
+
stripeCustomerId: zod.z.string(),
|
|
1690
|
+
stripeCheckoutSessionId: zod.z.string().nullable(),
|
|
1691
|
+
stripePaymentIntentId: zod.z.string().nullable(),
|
|
1692
|
+
amountUsd: zod.z.number().nonnegative(),
|
|
1693
|
+
credits: zod.z.number().nonnegative(),
|
|
1694
|
+
paymentStatus: zod.z.string(),
|
|
1695
|
+
creditStatus: zod.z.string(),
|
|
1696
|
+
creditedTransactionId: zod.z.string().nullable(),
|
|
1697
|
+
createdAt: DateSchema,
|
|
1698
|
+
updatedAt: DateSchema
|
|
1699
|
+
});
|
|
1700
|
+
const ConsoleUserBillingResponseSchema = zod.z.discriminatedUnion("status", [
|
|
1701
|
+
zod.z.object({
|
|
1702
|
+
status: zod.z.literal("available"),
|
|
1703
|
+
balance: UserBalanceResponseSchema,
|
|
1704
|
+
creditsBuckets: zod.z.array(CreditsBucketSchema),
|
|
1705
|
+
transactions: zod.z.array(TransactionSchema),
|
|
1706
|
+
stripeRechargeOrders: zod.z.array(ConsoleStripeRechargeOrderSchema)
|
|
1707
|
+
}),
|
|
1708
|
+
zod.z.object({
|
|
1709
|
+
status: zod.z.literal("unavailable"),
|
|
1710
|
+
error: ConsoleBillingModuleErrorSchema
|
|
1711
|
+
})
|
|
1712
|
+
]);
|
|
1713
|
+
const ConsoleSubscriptionRenewalStatusSchema = zod.z.enum([
|
|
1714
|
+
"none",
|
|
1715
|
+
"renews",
|
|
1716
|
+
"cancels_at_period_end",
|
|
1717
|
+
"canceled",
|
|
1718
|
+
"expired"
|
|
1719
|
+
]);
|
|
1720
|
+
const ConsoleUserSubscriptionResponseSchema = zod.z.object({
|
|
1721
|
+
subscription: SubscriptionSchema.nullable(),
|
|
1722
|
+
effectivePlan: SubscriptionPlanSchema.nullable(),
|
|
1723
|
+
effectiveEntitlement: UserEntitlementSchema.nullable(),
|
|
1724
|
+
renewalStatus: ConsoleSubscriptionRenewalStatusSchema
|
|
1725
|
+
});
|
|
1726
|
+
const ConsoleApiKeyMetadataSchema = ApiKeySchema.pick({
|
|
1727
|
+
id: true,
|
|
1728
|
+
name: true,
|
|
1729
|
+
keyPrefix: true,
|
|
1730
|
+
enabled: true,
|
|
1731
|
+
lastUsedAt: true,
|
|
1732
|
+
expiresAt: true,
|
|
1733
|
+
createdAt: true
|
|
1734
|
+
});
|
|
1735
|
+
const ConsoleUserApiKeysResponseSchema = zod.z.object({
|
|
1736
|
+
items: zod.z.array(ConsoleApiKeyMetadataSchema),
|
|
1737
|
+
total: zod.z.number().int().nonnegative()
|
|
1738
|
+
});
|
|
1739
|
+
const ConsoleUserMachinesResponseSchema = zod.z.object({
|
|
1740
|
+
localMachines: zod.z.array(LocalMachineSchema.omit({ dataEncryptionKey: true })),
|
|
1741
|
+
privateClouds: zod.z.array(CloudSchema)
|
|
1742
|
+
});
|
|
1743
|
+
|
|
1744
|
+
const OAuthServerSchema = zod.z.object({
|
|
1745
|
+
id: IdSchema,
|
|
1746
|
+
provider: zod.z.string(),
|
|
1747
|
+
displayName: zod.z.string(),
|
|
1748
|
+
avatar: zod.z.string().optional(),
|
|
1749
|
+
authorizeUrl: zod.z.string().url(),
|
|
1750
|
+
tokenUrl: zod.z.string().url(),
|
|
1751
|
+
userInfoUrl: zod.z.string().url(),
|
|
1752
|
+
clientId: zod.z.string(),
|
|
1753
|
+
clientSecret: zod.z.string(),
|
|
1754
|
+
callbackUrl: zod.z.string().url(),
|
|
1755
|
+
scopes: zod.z.array(zod.z.string()).default([]),
|
|
1756
|
+
userInfoMapping: zod.z.record(zod.z.string(), zod.z.string()),
|
|
1757
|
+
enabled: zod.z.boolean(),
|
|
1758
|
+
createdAt: zod.z.union([DateSchema, zod.z.date().transform((d) => d.toISOString())]),
|
|
1759
|
+
updatedAt: zod.z.union([DateSchema, zod.z.date().transform((d) => d.toISOString())])
|
|
1760
|
+
});
|
|
1761
|
+
const OAuthServerPublicSchema = zod.z.object({
|
|
1762
|
+
id: IdSchema,
|
|
1763
|
+
provider: zod.z.string(),
|
|
1764
|
+
displayName: zod.z.string(),
|
|
1765
|
+
avatar: zod.z.string().optional(),
|
|
1766
|
+
enabled: zod.z.boolean(),
|
|
1767
|
+
createdAt: zod.z.union([DateSchema, zod.z.date().transform((d) => d.toISOString())]),
|
|
1768
|
+
updatedAt: zod.z.union([DateSchema, zod.z.date().transform((d) => d.toISOString())])
|
|
1769
|
+
});
|
|
1770
|
+
const CreateOAuthServerRequestSchema = zod.z.object({
|
|
1771
|
+
provider: zod.z.string().min(1).regex(/^[a-z0-9-]+$/),
|
|
1772
|
+
displayName: zod.z.string().min(1),
|
|
1773
|
+
avatar: zod.z.string().optional(),
|
|
1774
|
+
authorizeUrl: zod.z.string().url(),
|
|
1775
|
+
tokenUrl: zod.z.string().url(),
|
|
1776
|
+
userInfoUrl: zod.z.string().url(),
|
|
1777
|
+
clientId: zod.z.string().min(1),
|
|
1778
|
+
clientSecret: zod.z.string().min(1),
|
|
1779
|
+
scopes: zod.z.array(zod.z.string()).optional().default([]),
|
|
1780
|
+
userInfoMapping: zod.z.record(zod.z.string(), zod.z.string()).optional(),
|
|
1781
|
+
enabled: zod.z.boolean().default(true)
|
|
1782
|
+
});
|
|
1783
|
+
const CreateOAuthServerResponseSchema = OAuthServerSchema;
|
|
1784
|
+
const ListOAuthServersQuerySchema = zod.z.object({
|
|
1785
|
+
enabled: zod.z.string().optional().transform((val) => val === "true" ? true : val === "false" ? false : void 0)
|
|
1786
|
+
});
|
|
1787
|
+
const ListOAuthServersResponseSchema = zod.z.array(OAuthServerSchema);
|
|
1788
|
+
const GetOAuthServerResponseSchema = OAuthServerSchema;
|
|
1789
|
+
const UpdateOAuthServerRequestSchema = CreateOAuthServerRequestSchema.partial();
|
|
1790
|
+
const UpdateOAuthServerResponseSchema = OAuthServerSchema;
|
|
1791
|
+
const DeleteOAuthServerResponseSchema = zod.z.object({
|
|
1792
|
+
success: zod.z.literal(true)
|
|
1793
|
+
});
|
|
1794
|
+
const ToggleOAuthServerRequestSchema = zod.z.object({
|
|
1795
|
+
enabled: zod.z.boolean()
|
|
1796
|
+
});
|
|
1797
|
+
const ToggleOAuthServerResponseSchema = OAuthServerSchema;
|
|
1798
|
+
const ListOAuthServersPublicResponseSchema = zod.z.array(OAuthServerPublicSchema);
|
|
1799
|
+
|
|
1800
|
+
const GitServerSchema = zod.z.object({
|
|
1801
|
+
id: IdSchema,
|
|
1802
|
+
// id = slug (e.g., "github", "gitlab")
|
|
1803
|
+
type: zod.z.string(),
|
|
1804
|
+
name: zod.z.string(),
|
|
1805
|
+
baseUrl: zod.z.string().url(),
|
|
1806
|
+
apiUrl: zod.z.string().url(),
|
|
1807
|
+
oauthServerId: zod.z.string().nullable(),
|
|
1808
|
+
ownerId: zod.z.string().nullable(),
|
|
1809
|
+
// null = shared/public Git server config, userId = private config
|
|
1810
|
+
authModeDefault: zod.z.string().default("oauth"),
|
|
1811
|
+
// "oauth" | "local_pat"
|
|
1812
|
+
executionMode: zod.z.string().default("server"),
|
|
1813
|
+
// "server" | "daemon_proxy"
|
|
1814
|
+
syncMode: zod.z.string().default("polling_only"),
|
|
1815
|
+
// "polling_only" | "hybrid" | "webhook_only"
|
|
1816
|
+
networkMode: zod.z.string().default("direct"),
|
|
1817
|
+
// "direct" | "tunnel"
|
|
1818
|
+
githubAppName: zod.z.string().nullable(),
|
|
1819
|
+
enabled: zod.z.boolean(),
|
|
1820
|
+
createdAt: zod.z.union([DateSchema, zod.z.date().transform((d) => d.toISOString())]),
|
|
1821
|
+
updatedAt: zod.z.union([DateSchema, zod.z.date().transform((d) => d.toISOString())])
|
|
1822
|
+
});
|
|
1823
|
+
const ListGitServersResponseSchema = zod.z.array(GitServerSchema);
|
|
1824
|
+
const GetGitServerResponseSchema = GitServerSchema;
|
|
1825
|
+
|
|
1661
1826
|
const PrivateCloudEntitlementSchema = zod.z.object({
|
|
1662
1827
|
enabled: zod.z.boolean(),
|
|
1663
1828
|
maxPrivateClouds: zod.z.number().int().nonnegative(),
|
|
@@ -1720,6 +1885,7 @@ const ListPrivateCloudMembersResponseSchema = zod.z.object({
|
|
|
1720
1885
|
const ListPrivateCloudMachinesResponseSchema = zod.z.object({
|
|
1721
1886
|
machines: zod.z.array(CloudMachineSchema)
|
|
1722
1887
|
});
|
|
1888
|
+
const UnbindPrivateCloudMachineResponseSchema = SimpleSuccessSchema;
|
|
1723
1889
|
const RemovePrivateCloudMemberResponseSchema = SimpleSuccessSchema;
|
|
1724
1890
|
const UpdatePrivateCloudMemberRoleRequestSchema = zod.z.object({
|
|
1725
1891
|
role: zod.z.enum(["admin", "member"])
|
|
@@ -1870,51 +2036,6 @@ const CancelCiRunResponseSchema = zod.z.object({
|
|
|
1870
2036
|
runId: zod.z.string().min(1)
|
|
1871
2037
|
});
|
|
1872
2038
|
|
|
1873
|
-
const ApiKeySchema = zod.z.object({
|
|
1874
|
-
id: zod.z.string().min(1),
|
|
1875
|
-
name: zod.z.string().min(1).max(100),
|
|
1876
|
-
keyPrefix: zod.z.string().min(1),
|
|
1877
|
-
enabled: zod.z.boolean(),
|
|
1878
|
-
quota: zod.z.number().nullable(),
|
|
1879
|
-
lastUsedAt: zod.z.string().datetime().nullable(),
|
|
1880
|
-
expiresAt: zod.z.string().datetime().nullable(),
|
|
1881
|
-
createdAt: zod.z.string().datetime()
|
|
1882
|
-
});
|
|
1883
|
-
const CreateApiKeyRequestSchema = zod.z.object({
|
|
1884
|
-
name: zod.z.string().min(1).max(100),
|
|
1885
|
-
expiresInDays: zod.z.number().int().positive().optional()
|
|
1886
|
-
});
|
|
1887
|
-
const CreateApiKeyResponseSchema = zod.z.object({
|
|
1888
|
-
apiKey: zod.z.string().min(1),
|
|
1889
|
-
id: zod.z.string().min(1),
|
|
1890
|
-
name: zod.z.string().min(1).max(100),
|
|
1891
|
-
keyPrefix: zod.z.string().min(1),
|
|
1892
|
-
expiresAt: zod.z.string().datetime().nullable(),
|
|
1893
|
-
createdAt: zod.z.string().datetime()
|
|
1894
|
-
});
|
|
1895
|
-
const ListApiKeysQuerySchema = zod.z.object({
|
|
1896
|
-
includeDisabled: zod.z.string().optional().transform((val) => val === "true"),
|
|
1897
|
-
page: zod.z.string().optional().transform((val) => val ? parseInt(val, 10) : 1).refine((val) => val > 0, "Page must be positive"),
|
|
1898
|
-
limit: zod.z.string().optional().transform((val) => val ? parseInt(val, 10) : 10).refine((val) => val > 0 && val <= 100, "Limit must be between 1 and 100")
|
|
1899
|
-
});
|
|
1900
|
-
const ListApiKeysResponseSchema = zod.z.object({
|
|
1901
|
-
items: zod.z.array(ApiKeySchema),
|
|
1902
|
-
total: zod.z.number().int().nonnegative(),
|
|
1903
|
-
page: zod.z.number().int().positive(),
|
|
1904
|
-
limit: zod.z.number().int().positive(),
|
|
1905
|
-
totalPages: zod.z.number().int().nonnegative()
|
|
1906
|
-
});
|
|
1907
|
-
const UpdateApiKeyRequestSchema = zod.z.object({
|
|
1908
|
-
name: zod.z.string().min(1).max(100).optional(),
|
|
1909
|
-
expiresInDays: zod.z.number().int().positive().optional()
|
|
1910
|
-
});
|
|
1911
|
-
const ToggleApiKeyRequestSchema = zod.z.object({
|
|
1912
|
-
enabled: zod.z.boolean()
|
|
1913
|
-
});
|
|
1914
|
-
const DeleteApiKeyResponseSchema = zod.z.object({
|
|
1915
|
-
success: zod.z.literal(true)
|
|
1916
|
-
});
|
|
1917
|
-
|
|
1918
2039
|
const ResourceMetadataSchema = zod.z.object({
|
|
1919
2040
|
platform: zod.z.enum(["mac", "windows", "linux"]).optional(),
|
|
1920
2041
|
arch: zod.z.enum(["arm64", "x64", "universal"]).optional(),
|
|
@@ -3302,11 +3423,16 @@ const ResourceLimitsUpdatedSchema = zod.z.object({
|
|
|
3302
3423
|
]),
|
|
3303
3424
|
entitlementId: IdSchema
|
|
3304
3425
|
});
|
|
3426
|
+
const GitServerUserUpdatedSchema = zod.z.object({
|
|
3427
|
+
gitServerId: zod.z.string(),
|
|
3428
|
+
action: zod.z.enum(["upserted", "removed"])
|
|
3429
|
+
});
|
|
3305
3430
|
const SystemMessageSchema = EventBaseSchema.extend({
|
|
3306
3431
|
type: zod.z.enum([
|
|
3307
3432
|
"machine-online",
|
|
3308
3433
|
"machine-offline",
|
|
3309
3434
|
"resource-limits-updated",
|
|
3435
|
+
"git-server-user-updated",
|
|
3310
3436
|
"chat-added",
|
|
3311
3437
|
"chat-removed",
|
|
3312
3438
|
"chat-member-added",
|
|
@@ -3334,6 +3460,8 @@ const SystemMessageSchema = EventBaseSchema.extend({
|
|
|
3334
3460
|
// pr-state-changed
|
|
3335
3461
|
ResourceLimitsUpdatedSchema,
|
|
3336
3462
|
// resource-limits-updated
|
|
3463
|
+
GitServerUserUpdatedSchema,
|
|
3464
|
+
// git-server-user-updated
|
|
3337
3465
|
DraftAgentSchema,
|
|
3338
3466
|
// draft-agent-added
|
|
3339
3467
|
AgentSchema,
|
|
@@ -3359,6 +3487,7 @@ const DaemonGitlabRequestSchema = EventBaseSchema.extend({
|
|
|
3359
3487
|
userId: zod.z.string(),
|
|
3360
3488
|
gitServerId: zod.z.string(),
|
|
3361
3489
|
operation: DaemonGitlabOperationSchema,
|
|
3490
|
+
accessToken: zod.z.string().optional(),
|
|
3362
3491
|
payload: zod.z.record(zod.z.string(), zod.z.unknown()),
|
|
3363
3492
|
ttlMs: zod.z.number(),
|
|
3364
3493
|
nonce: zod.z.string()
|
|
@@ -3568,6 +3697,21 @@ function workerAuth(token, machineId, taskId) {
|
|
|
3568
3697
|
};
|
|
3569
3698
|
}
|
|
3570
3699
|
|
|
3700
|
+
const SocketAuthErrorCodeSchema = zod.z.enum([
|
|
3701
|
+
"local_machine_limit_reached",
|
|
3702
|
+
"machine_limited",
|
|
3703
|
+
"machine_binding_revoked",
|
|
3704
|
+
"machine_token_invalid",
|
|
3705
|
+
"cloud_machine_device_required",
|
|
3706
|
+
"cloud_machine_not_found",
|
|
3707
|
+
"machine_auth_failed"
|
|
3708
|
+
]);
|
|
3709
|
+
const SocketAuthErrorDataSchema = zod.z.object({
|
|
3710
|
+
code: SocketAuthErrorCodeSchema,
|
|
3711
|
+
message: zod.z.string().min(1),
|
|
3712
|
+
action: zod.z.string().min(1).optional()
|
|
3713
|
+
});
|
|
3714
|
+
|
|
3571
3715
|
const AGENTRIX_DEV_INIT_FEATURE = "agentrix-dev-init";
|
|
3572
3716
|
|
|
3573
3717
|
const CompanionWorkspaceFileSchema = zod.z.object({
|
|
@@ -4094,6 +4238,21 @@ exports.CompanionMemoryOrganizationResponseSchema = CompanionMemoryOrganizationR
|
|
|
4094
4238
|
exports.CompanionWorkspaceFileSchema = CompanionWorkspaceFileSchema;
|
|
4095
4239
|
exports.ConfirmUploadRequestSchema = ConfirmUploadRequestSchema;
|
|
4096
4240
|
exports.ConfirmUploadResponseSchema = ConfirmUploadResponseSchema;
|
|
4241
|
+
exports.ConsoleApiKeyMetadataSchema = ConsoleApiKeyMetadataSchema;
|
|
4242
|
+
exports.ConsoleApiKeySummarySchema = ConsoleApiKeySummarySchema;
|
|
4243
|
+
exports.ConsoleBillingModuleErrorSchema = ConsoleBillingModuleErrorSchema;
|
|
4244
|
+
exports.ConsoleStripeRechargeOrderSchema = ConsoleStripeRechargeOrderSchema;
|
|
4245
|
+
exports.ConsoleSubscriptionRenewalStatusSchema = ConsoleSubscriptionRenewalStatusSchema;
|
|
4246
|
+
exports.ConsoleSubscriptionSummarySchema = ConsoleSubscriptionSummarySchema;
|
|
4247
|
+
exports.ConsoleUserApiKeysResponseSchema = ConsoleUserApiKeysResponseSchema;
|
|
4248
|
+
exports.ConsoleUserBillingResponseSchema = ConsoleUserBillingResponseSchema;
|
|
4249
|
+
exports.ConsoleUserListItemSchema = ConsoleUserListItemSchema;
|
|
4250
|
+
exports.ConsoleUserMachinesResponseSchema = ConsoleUserMachinesResponseSchema;
|
|
4251
|
+
exports.ConsoleUserOverviewResponseSchema = ConsoleUserOverviewResponseSchema;
|
|
4252
|
+
exports.ConsoleUserProfileSchema = ConsoleUserProfileSchema;
|
|
4253
|
+
exports.ConsoleUserRoleSchema = ConsoleUserRoleSchema;
|
|
4254
|
+
exports.ConsoleUserSubscriptionResponseSchema = ConsoleUserSubscriptionResponseSchema;
|
|
4255
|
+
exports.ConsoleUsersListQuerySchema = ConsoleUsersListQuerySchema;
|
|
4097
4256
|
exports.ConsumeTransactionSchema = ConsumeTransactionSchema;
|
|
4098
4257
|
exports.ContactCandidateSchema = ContactCandidateSchema;
|
|
4099
4258
|
exports.ContactSchema = ContactSchema;
|
|
@@ -4229,6 +4388,7 @@ exports.ListChatMembersResponseSchema = ListChatMembersResponseSchema;
|
|
|
4229
4388
|
exports.ListChatTasksResponseSchema = ListChatTasksResponseSchema;
|
|
4230
4389
|
exports.ListChatsQuerySchema = ListChatsQuerySchema;
|
|
4231
4390
|
exports.ListChatsResponseSchema = ListChatsResponseSchema;
|
|
4391
|
+
exports.ListConsoleUsersResponseSchema = ListConsoleUsersResponseSchema;
|
|
4232
4392
|
exports.ListContactsResponseSchema = ListContactsResponseSchema;
|
|
4233
4393
|
exports.ListFilesQuerySchema = ListFilesQuerySchema;
|
|
4234
4394
|
exports.ListFilesResponseSchema = ListFilesResponseSchema;
|
|
@@ -4359,6 +4519,7 @@ exports.SendTaskMessageResponseSchema = SendTaskMessageResponseSchema;
|
|
|
4359
4519
|
exports.SenderTypeSchema = SenderTypeSchema;
|
|
4360
4520
|
exports.SeqSyncRequestEventDataSchema = SeqSyncRequestEventDataSchema;
|
|
4361
4521
|
exports.SeqSyncResponseEventDataSchema = SeqSyncResponseEventDataSchema;
|
|
4522
|
+
exports.SetConsoleUserRoleRequestSchema = SetConsoleUserRoleRequestSchema;
|
|
4362
4523
|
exports.SetEnvironmentVariablesRequestSchema = SetEnvironmentVariablesRequestSchema;
|
|
4363
4524
|
exports.ShareAuthQuerySchema = ShareAuthQuerySchema;
|
|
4364
4525
|
exports.ShareAuthResponseSchema = ShareAuthResponseSchema;
|
|
@@ -4367,6 +4528,8 @@ exports.ShowModalRequestSchema = ShowModalRequestSchema;
|
|
|
4367
4528
|
exports.ShowModalResponseSchema = ShowModalResponseSchema;
|
|
4368
4529
|
exports.ShutdownMachineSchema = ShutdownMachineSchema;
|
|
4369
4530
|
exports.SimpleSuccessSchema = SimpleSuccessSchema;
|
|
4531
|
+
exports.SocketAuthErrorCodeSchema = SocketAuthErrorCodeSchema;
|
|
4532
|
+
exports.SocketAuthErrorDataSchema = SocketAuthErrorDataSchema;
|
|
4370
4533
|
exports.StartTaskRequestSchema = StartTaskRequestSchema;
|
|
4371
4534
|
exports.StartTaskResponseSchema = StartTaskResponseSchema;
|
|
4372
4535
|
exports.StatsQuerySchema = StatsQuerySchema;
|
|
@@ -4415,6 +4578,7 @@ exports.ToggleOAuthServerResponseSchema = ToggleOAuthServerResponseSchema;
|
|
|
4415
4578
|
exports.TransactionSchema = TransactionSchema;
|
|
4416
4579
|
exports.UnarchiveTaskRequestSchema = UnarchiveTaskRequestSchema;
|
|
4417
4580
|
exports.UnarchiveTaskResponseSchema = UnarchiveTaskResponseSchema;
|
|
4581
|
+
exports.UnbindPrivateCloudMachineResponseSchema = UnbindPrivateCloudMachineResponseSchema;
|
|
4418
4582
|
exports.UpdateAgentInfoEventSchema = UpdateAgentInfoEventSchema;
|
|
4419
4583
|
exports.UpdateAgentRequestSchema = UpdateAgentRequestSchema;
|
|
4420
4584
|
exports.UpdateAgentResponseSchema = UpdateAgentResponseSchema;
|