@agentrix/shared 2.32.0 → 2.34.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/{errors-Br-r7N--.d.cts → errors-CG2gbkBJ.d.cts} +57 -36
- package/dist/index.cjs +291 -120
- package/dist/index.d.cts +460 -18
- package/dist/node.d.cts +2 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1056,7 +1056,7 @@ const CloudSchema = zod.z.object({
|
|
|
1056
1056
|
type: zod.z.enum(["public", "private"]),
|
|
1057
1057
|
status: zod.z.enum(["active", "suspended"]),
|
|
1058
1058
|
role: CloudRoleSchema.optional(),
|
|
1059
|
-
userStatus: zod.z.enum(["active", "pending", "revoked"]).optional(),
|
|
1059
|
+
userStatus: zod.z.enum(["active", "pending", "revoked", "suspended"]).optional(),
|
|
1060
1060
|
maxMachineCount: zod.z.number().int().nonnegative().nullable().optional(),
|
|
1061
1061
|
maxMemberCount: zod.z.number().int().nonnegative().nullable().optional(),
|
|
1062
1062
|
machineCount: zod.z.number().int().nonnegative().optional(),
|
|
@@ -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({
|
|
@@ -1547,6 +1510,8 @@ const UserEntitlementSchema = zod.z.object({
|
|
|
1547
1510
|
source: UserEntitlementSourceSchema,
|
|
1548
1511
|
subscriptionId: IdSchema.nullable(),
|
|
1549
1512
|
planId: IdSchema.nullable(),
|
|
1513
|
+
privateCloudEnabled: zod.z.boolean(),
|
|
1514
|
+
maxPrivateClouds: zod.z.number().int().nonnegative(),
|
|
1550
1515
|
maxOnlineLocalMachines: zod.z.number().int().nonnegative(),
|
|
1551
1516
|
createdAt: DateSchema,
|
|
1552
1517
|
updatedAt: DateSchema
|
|
@@ -1656,6 +1621,208 @@ const ListSubscriptionPlansResponseSchema = zod.z.object({
|
|
|
1656
1621
|
plans: zod.z.array(SubscriptionPlanSchema)
|
|
1657
1622
|
});
|
|
1658
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
|
+
|
|
1659
1826
|
const PrivateCloudEntitlementSchema = zod.z.object({
|
|
1660
1827
|
enabled: zod.z.boolean(),
|
|
1661
1828
|
maxPrivateClouds: zod.z.number().int().nonnegative(),
|
|
@@ -1709,7 +1876,7 @@ const PrivateCloudMemberSchema = zod.z.object({
|
|
|
1709
1876
|
username: zod.z.string().nullable(),
|
|
1710
1877
|
avatar: zod.z.string().nullable(),
|
|
1711
1878
|
role: CloudRoleSchema,
|
|
1712
|
-
status: zod.z.enum(["active", "pending", "revoked"]),
|
|
1879
|
+
status: zod.z.enum(["active", "pending", "revoked", "suspended"]),
|
|
1713
1880
|
createdAt: DateSchema
|
|
1714
1881
|
});
|
|
1715
1882
|
const ListPrivateCloudMembersResponseSchema = zod.z.object({
|
|
@@ -1718,6 +1885,7 @@ const ListPrivateCloudMembersResponseSchema = zod.z.object({
|
|
|
1718
1885
|
const ListPrivateCloudMachinesResponseSchema = zod.z.object({
|
|
1719
1886
|
machines: zod.z.array(CloudMachineSchema)
|
|
1720
1887
|
});
|
|
1888
|
+
const UnbindPrivateCloudMachineResponseSchema = SimpleSuccessSchema;
|
|
1721
1889
|
const RemovePrivateCloudMemberResponseSchema = SimpleSuccessSchema;
|
|
1722
1890
|
const UpdatePrivateCloudMemberRoleRequestSchema = zod.z.object({
|
|
1723
1891
|
role: zod.z.enum(["admin", "member"])
|
|
@@ -1868,51 +2036,6 @@ const CancelCiRunResponseSchema = zod.z.object({
|
|
|
1868
2036
|
runId: zod.z.string().min(1)
|
|
1869
2037
|
});
|
|
1870
2038
|
|
|
1871
|
-
const ApiKeySchema = zod.z.object({
|
|
1872
|
-
id: zod.z.string().min(1),
|
|
1873
|
-
name: zod.z.string().min(1).max(100),
|
|
1874
|
-
keyPrefix: zod.z.string().min(1),
|
|
1875
|
-
enabled: zod.z.boolean(),
|
|
1876
|
-
quota: zod.z.number().nullable(),
|
|
1877
|
-
lastUsedAt: zod.z.string().datetime().nullable(),
|
|
1878
|
-
expiresAt: zod.z.string().datetime().nullable(),
|
|
1879
|
-
createdAt: zod.z.string().datetime()
|
|
1880
|
-
});
|
|
1881
|
-
const CreateApiKeyRequestSchema = zod.z.object({
|
|
1882
|
-
name: zod.z.string().min(1).max(100),
|
|
1883
|
-
expiresInDays: zod.z.number().int().positive().optional()
|
|
1884
|
-
});
|
|
1885
|
-
const CreateApiKeyResponseSchema = zod.z.object({
|
|
1886
|
-
apiKey: zod.z.string().min(1),
|
|
1887
|
-
id: zod.z.string().min(1),
|
|
1888
|
-
name: zod.z.string().min(1).max(100),
|
|
1889
|
-
keyPrefix: zod.z.string().min(1),
|
|
1890
|
-
expiresAt: zod.z.string().datetime().nullable(),
|
|
1891
|
-
createdAt: zod.z.string().datetime()
|
|
1892
|
-
});
|
|
1893
|
-
const ListApiKeysQuerySchema = zod.z.object({
|
|
1894
|
-
includeDisabled: zod.z.string().optional().transform((val) => val === "true"),
|
|
1895
|
-
page: zod.z.string().optional().transform((val) => val ? parseInt(val, 10) : 1).refine((val) => val > 0, "Page must be positive"),
|
|
1896
|
-
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")
|
|
1897
|
-
});
|
|
1898
|
-
const ListApiKeysResponseSchema = zod.z.object({
|
|
1899
|
-
items: zod.z.array(ApiKeySchema),
|
|
1900
|
-
total: zod.z.number().int().nonnegative(),
|
|
1901
|
-
page: zod.z.number().int().positive(),
|
|
1902
|
-
limit: zod.z.number().int().positive(),
|
|
1903
|
-
totalPages: zod.z.number().int().nonnegative()
|
|
1904
|
-
});
|
|
1905
|
-
const UpdateApiKeyRequestSchema = zod.z.object({
|
|
1906
|
-
name: zod.z.string().min(1).max(100).optional(),
|
|
1907
|
-
expiresInDays: zod.z.number().int().positive().optional()
|
|
1908
|
-
});
|
|
1909
|
-
const ToggleApiKeyRequestSchema = zod.z.object({
|
|
1910
|
-
enabled: zod.z.boolean()
|
|
1911
|
-
});
|
|
1912
|
-
const DeleteApiKeyResponseSchema = zod.z.object({
|
|
1913
|
-
success: zod.z.literal(true)
|
|
1914
|
-
});
|
|
1915
|
-
|
|
1916
2039
|
const ResourceMetadataSchema = zod.z.object({
|
|
1917
2040
|
platform: zod.z.enum(["mac", "windows", "linux"]).optional(),
|
|
1918
2041
|
arch: zod.z.enum(["arm64", "x64", "universal"]).optional(),
|
|
@@ -3291,10 +3414,20 @@ const PrStateChangedSchema = zod.z.object({
|
|
|
3291
3414
|
changedAt: zod.z.string()
|
|
3292
3415
|
// ISO 8601 string
|
|
3293
3416
|
});
|
|
3417
|
+
const ResourceLimitsUpdatedSchema = zod.z.object({
|
|
3418
|
+
reason: zod.z.enum([
|
|
3419
|
+
"subscription_changed",
|
|
3420
|
+
"subscription_cancelled",
|
|
3421
|
+
"entitlement_initialized",
|
|
3422
|
+
"quota_reapply"
|
|
3423
|
+
]),
|
|
3424
|
+
entitlementId: IdSchema
|
|
3425
|
+
});
|
|
3294
3426
|
const SystemMessageSchema = EventBaseSchema.extend({
|
|
3295
3427
|
type: zod.z.enum([
|
|
3296
3428
|
"machine-online",
|
|
3297
3429
|
"machine-offline",
|
|
3430
|
+
"resource-limits-updated",
|
|
3298
3431
|
"chat-added",
|
|
3299
3432
|
"chat-removed",
|
|
3300
3433
|
"chat-member-added",
|
|
@@ -3320,6 +3453,8 @@ const SystemMessageSchema = EventBaseSchema.extend({
|
|
|
3320
3453
|
// repo-added
|
|
3321
3454
|
PrStateChangedSchema,
|
|
3322
3455
|
// pr-state-changed
|
|
3456
|
+
ResourceLimitsUpdatedSchema,
|
|
3457
|
+
// resource-limits-updated
|
|
3323
3458
|
DraftAgentSchema,
|
|
3324
3459
|
// draft-agent-added
|
|
3325
3460
|
AgentSchema,
|
|
@@ -3345,6 +3480,7 @@ const DaemonGitlabRequestSchema = EventBaseSchema.extend({
|
|
|
3345
3480
|
userId: zod.z.string(),
|
|
3346
3481
|
gitServerId: zod.z.string(),
|
|
3347
3482
|
operation: DaemonGitlabOperationSchema,
|
|
3483
|
+
accessToken: zod.z.string().optional(),
|
|
3348
3484
|
payload: zod.z.record(zod.z.string(), zod.z.unknown()),
|
|
3349
3485
|
ttlMs: zod.z.number(),
|
|
3350
3486
|
nonce: zod.z.string()
|
|
@@ -3554,6 +3690,21 @@ function workerAuth(token, machineId, taskId) {
|
|
|
3554
3690
|
};
|
|
3555
3691
|
}
|
|
3556
3692
|
|
|
3693
|
+
const SocketAuthErrorCodeSchema = zod.z.enum([
|
|
3694
|
+
"local_machine_limit_reached",
|
|
3695
|
+
"machine_limited",
|
|
3696
|
+
"machine_binding_revoked",
|
|
3697
|
+
"machine_token_invalid",
|
|
3698
|
+
"cloud_machine_device_required",
|
|
3699
|
+
"cloud_machine_not_found",
|
|
3700
|
+
"machine_auth_failed"
|
|
3701
|
+
]);
|
|
3702
|
+
const SocketAuthErrorDataSchema = zod.z.object({
|
|
3703
|
+
code: SocketAuthErrorCodeSchema,
|
|
3704
|
+
message: zod.z.string().min(1),
|
|
3705
|
+
action: zod.z.string().min(1).optional()
|
|
3706
|
+
});
|
|
3707
|
+
|
|
3557
3708
|
const AGENTRIX_DEV_INIT_FEATURE = "agentrix-dev-init";
|
|
3558
3709
|
|
|
3559
3710
|
const CompanionWorkspaceFileSchema = zod.z.object({
|
|
@@ -4080,6 +4231,21 @@ exports.CompanionMemoryOrganizationResponseSchema = CompanionMemoryOrganizationR
|
|
|
4080
4231
|
exports.CompanionWorkspaceFileSchema = CompanionWorkspaceFileSchema;
|
|
4081
4232
|
exports.ConfirmUploadRequestSchema = ConfirmUploadRequestSchema;
|
|
4082
4233
|
exports.ConfirmUploadResponseSchema = ConfirmUploadResponseSchema;
|
|
4234
|
+
exports.ConsoleApiKeyMetadataSchema = ConsoleApiKeyMetadataSchema;
|
|
4235
|
+
exports.ConsoleApiKeySummarySchema = ConsoleApiKeySummarySchema;
|
|
4236
|
+
exports.ConsoleBillingModuleErrorSchema = ConsoleBillingModuleErrorSchema;
|
|
4237
|
+
exports.ConsoleStripeRechargeOrderSchema = ConsoleStripeRechargeOrderSchema;
|
|
4238
|
+
exports.ConsoleSubscriptionRenewalStatusSchema = ConsoleSubscriptionRenewalStatusSchema;
|
|
4239
|
+
exports.ConsoleSubscriptionSummarySchema = ConsoleSubscriptionSummarySchema;
|
|
4240
|
+
exports.ConsoleUserApiKeysResponseSchema = ConsoleUserApiKeysResponseSchema;
|
|
4241
|
+
exports.ConsoleUserBillingResponseSchema = ConsoleUserBillingResponseSchema;
|
|
4242
|
+
exports.ConsoleUserListItemSchema = ConsoleUserListItemSchema;
|
|
4243
|
+
exports.ConsoleUserMachinesResponseSchema = ConsoleUserMachinesResponseSchema;
|
|
4244
|
+
exports.ConsoleUserOverviewResponseSchema = ConsoleUserOverviewResponseSchema;
|
|
4245
|
+
exports.ConsoleUserProfileSchema = ConsoleUserProfileSchema;
|
|
4246
|
+
exports.ConsoleUserRoleSchema = ConsoleUserRoleSchema;
|
|
4247
|
+
exports.ConsoleUserSubscriptionResponseSchema = ConsoleUserSubscriptionResponseSchema;
|
|
4248
|
+
exports.ConsoleUsersListQuerySchema = ConsoleUsersListQuerySchema;
|
|
4083
4249
|
exports.ConsumeTransactionSchema = ConsumeTransactionSchema;
|
|
4084
4250
|
exports.ContactCandidateSchema = ContactCandidateSchema;
|
|
4085
4251
|
exports.ContactSchema = ContactSchema;
|
|
@@ -4215,6 +4381,7 @@ exports.ListChatMembersResponseSchema = ListChatMembersResponseSchema;
|
|
|
4215
4381
|
exports.ListChatTasksResponseSchema = ListChatTasksResponseSchema;
|
|
4216
4382
|
exports.ListChatsQuerySchema = ListChatsQuerySchema;
|
|
4217
4383
|
exports.ListChatsResponseSchema = ListChatsResponseSchema;
|
|
4384
|
+
exports.ListConsoleUsersResponseSchema = ListConsoleUsersResponseSchema;
|
|
4218
4385
|
exports.ListContactsResponseSchema = ListContactsResponseSchema;
|
|
4219
4386
|
exports.ListFilesQuerySchema = ListFilesQuerySchema;
|
|
4220
4387
|
exports.ListFilesResponseSchema = ListFilesResponseSchema;
|
|
@@ -4345,6 +4512,7 @@ exports.SendTaskMessageResponseSchema = SendTaskMessageResponseSchema;
|
|
|
4345
4512
|
exports.SenderTypeSchema = SenderTypeSchema;
|
|
4346
4513
|
exports.SeqSyncRequestEventDataSchema = SeqSyncRequestEventDataSchema;
|
|
4347
4514
|
exports.SeqSyncResponseEventDataSchema = SeqSyncResponseEventDataSchema;
|
|
4515
|
+
exports.SetConsoleUserRoleRequestSchema = SetConsoleUserRoleRequestSchema;
|
|
4348
4516
|
exports.SetEnvironmentVariablesRequestSchema = SetEnvironmentVariablesRequestSchema;
|
|
4349
4517
|
exports.ShareAuthQuerySchema = ShareAuthQuerySchema;
|
|
4350
4518
|
exports.ShareAuthResponseSchema = ShareAuthResponseSchema;
|
|
@@ -4353,6 +4521,8 @@ exports.ShowModalRequestSchema = ShowModalRequestSchema;
|
|
|
4353
4521
|
exports.ShowModalResponseSchema = ShowModalResponseSchema;
|
|
4354
4522
|
exports.ShutdownMachineSchema = ShutdownMachineSchema;
|
|
4355
4523
|
exports.SimpleSuccessSchema = SimpleSuccessSchema;
|
|
4524
|
+
exports.SocketAuthErrorCodeSchema = SocketAuthErrorCodeSchema;
|
|
4525
|
+
exports.SocketAuthErrorDataSchema = SocketAuthErrorDataSchema;
|
|
4356
4526
|
exports.StartTaskRequestSchema = StartTaskRequestSchema;
|
|
4357
4527
|
exports.StartTaskResponseSchema = StartTaskResponseSchema;
|
|
4358
4528
|
exports.StatsQuerySchema = StatsQuerySchema;
|
|
@@ -4401,6 +4571,7 @@ exports.ToggleOAuthServerResponseSchema = ToggleOAuthServerResponseSchema;
|
|
|
4401
4571
|
exports.TransactionSchema = TransactionSchema;
|
|
4402
4572
|
exports.UnarchiveTaskRequestSchema = UnarchiveTaskRequestSchema;
|
|
4403
4573
|
exports.UnarchiveTaskResponseSchema = UnarchiveTaskResponseSchema;
|
|
4574
|
+
exports.UnbindPrivateCloudMachineResponseSchema = UnbindPrivateCloudMachineResponseSchema;
|
|
4404
4575
|
exports.UpdateAgentInfoEventSchema = UpdateAgentInfoEventSchema;
|
|
4405
4576
|
exports.UpdateAgentRequestSchema = UpdateAgentRequestSchema;
|
|
4406
4577
|
exports.UpdateAgentResponseSchema = UpdateAgentResponseSchema;
|