@cabaltrading/cli 0.4.10 → 0.4.12
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 +2076 -1706
- package/dist/mcp-server.js +1674 -1625
- package/package.json +1 -1
package/dist/mcp-server.js
CHANGED
|
@@ -861,10 +861,75 @@ var init_hyperliquid = __esm(() => {
|
|
|
861
861
|
hyperliquidLiquidationRiskResponseSchema = successEnvelope(hyperliquidLiquidationRiskResponseDataSchema);
|
|
862
862
|
});
|
|
863
863
|
|
|
864
|
-
// ../../packages/client/src/schemas/
|
|
864
|
+
// ../../packages/client/src/schemas/notifications.ts
|
|
865
865
|
import { z as z6 } from "zod";
|
|
866
|
+
var queryBooleanSchema, notificationIdParamsSchema, notificationsListQuerySchema, notificationsMarkAllReadRequestSchema, notificationsPatchRequestSchema, notificationRecordSchema, notificationsListResponseDataSchema, notificationsMarkAllReadResponseDataSchema, notificationsPatchResponseDataSchema, notificationsDeleteResponseDataSchema, notificationsListResponseSchema, notificationsMarkAllReadResponseSchema, notificationsPatchResponseSchema, notificationsDeleteResponseSchema;
|
|
867
|
+
var init_notifications = __esm(() => {
|
|
868
|
+
init_common();
|
|
869
|
+
queryBooleanSchema = z6.preprocess((value) => {
|
|
870
|
+
if (value === undefined || value === null || value === "")
|
|
871
|
+
return;
|
|
872
|
+
if (value === true || value === "true")
|
|
873
|
+
return true;
|
|
874
|
+
if (value === false || value === "false")
|
|
875
|
+
return false;
|
|
876
|
+
return value;
|
|
877
|
+
}, z6.boolean());
|
|
878
|
+
notificationIdParamsSchema = z6.object({
|
|
879
|
+
id: z6.string().uuid()
|
|
880
|
+
});
|
|
881
|
+
notificationsListQuerySchema = z6.object({
|
|
882
|
+
limit: z6.coerce.number().int().min(1).default(25).transform((value) => Math.min(value, 100)),
|
|
883
|
+
offset: z6.coerce.number().int().min(0).default(0),
|
|
884
|
+
unreadOnly: queryBooleanSchema.default(false)
|
|
885
|
+
});
|
|
886
|
+
notificationsMarkAllReadRequestSchema = z6.object({
|
|
887
|
+
action: z6.literal("mark_all_read")
|
|
888
|
+
});
|
|
889
|
+
notificationsPatchRequestSchema = z6.object({
|
|
890
|
+
read: z6.boolean().optional()
|
|
891
|
+
});
|
|
892
|
+
notificationRecordSchema = z6.object({
|
|
893
|
+
id: z6.string().uuid(),
|
|
894
|
+
type: z6.string(),
|
|
895
|
+
title: z6.string(),
|
|
896
|
+
body: z6.string(),
|
|
897
|
+
data: z6.record(z6.string(), z6.unknown()).nullable(),
|
|
898
|
+
read: z6.boolean(),
|
|
899
|
+
createdAt: z6.string()
|
|
900
|
+
});
|
|
901
|
+
notificationsListResponseDataSchema = z6.object({
|
|
902
|
+
notifications: z6.array(notificationRecordSchema),
|
|
903
|
+
unreadCount: z6.number().int().nonnegative(),
|
|
904
|
+
pagination: z6.object({
|
|
905
|
+
limit: z6.number().int().nonnegative(),
|
|
906
|
+
offset: z6.number().int().nonnegative(),
|
|
907
|
+
total: z6.number().int().nonnegative(),
|
|
908
|
+
hasMore: z6.boolean()
|
|
909
|
+
})
|
|
910
|
+
});
|
|
911
|
+
notificationsMarkAllReadResponseDataSchema = z6.object({
|
|
912
|
+
markedAllRead: z6.boolean()
|
|
913
|
+
});
|
|
914
|
+
notificationsPatchResponseDataSchema = z6.object({
|
|
915
|
+
updated: z6.boolean(),
|
|
916
|
+
id: z6.string().uuid(),
|
|
917
|
+
read: z6.boolean()
|
|
918
|
+
});
|
|
919
|
+
notificationsDeleteResponseDataSchema = z6.object({
|
|
920
|
+
deleted: z6.boolean(),
|
|
921
|
+
id: z6.string().uuid()
|
|
922
|
+
});
|
|
923
|
+
notificationsListResponseSchema = successEnvelope(notificationsListResponseDataSchema);
|
|
924
|
+
notificationsMarkAllReadResponseSchema = successEnvelope(notificationsMarkAllReadResponseDataSchema);
|
|
925
|
+
notificationsPatchResponseSchema = successEnvelope(notificationsPatchResponseDataSchema);
|
|
926
|
+
notificationsDeleteResponseSchema = successEnvelope(notificationsDeleteResponseDataSchema);
|
|
927
|
+
});
|
|
928
|
+
|
|
929
|
+
// ../../packages/client/src/schemas/incubator.ts
|
|
930
|
+
import { z as z7 } from "zod";
|
|
866
931
|
function requiredString(field, message = `Missing required field: ${field}`) {
|
|
867
|
-
return
|
|
932
|
+
return z7.preprocess((value) => typeof value === "string" ? value.trim() : "", z7.string().min(1, { message }));
|
|
868
933
|
}
|
|
869
934
|
var tokenNameSchema, tokenSymbolSchema, incubatorLogRequestSchema, incubatorLogResponseDataSchema, incubatorLogResponseSchema, incubatorAgentIdParamsSchema, incubatorBrainSwitchRequestSchema, incubatorBrainDepositRequestSchema, incubatorBrainUsageRequestSchema, incubatorBrainRequestSchema, incubatorBrainResponseDataSchema, incubatorBrainResponseSchema, incubatorBrainUsageResponseDataSchema, incubatorBrainUsageResponseSchema, incubatorServerRequestSchema, incubatorServerResponseDataSchema, incubatorServerResponseSchema, incubatorTokenRequestSchema, incubatorTokenSchema, incubatorTokenResponseDataSchema, incubatorTokenConfirmResponseDataSchema, incubatorTokenResponseSchema, incubatorInboxSendRequestSchema, incubatorInboxSendResponseDataSchema, incubatorInboxSendResponseSchema, incubatorInboxQuerySchema, incubatorTurnsQuerySchema, incubatorInboxReplyRequestSchema, incubatorInboxPatchRequestSchema, incubatorMemorialsQuerySchema, incubatorTasksQuerySchema, VALID_TASK_CATEGORIES, INVALID_CATEGORY_MESSAGE, taskCategorySchema, incubatorTaskCreateRequestSchema, incubatorTaskActionParamsSchema, taskActionBaseSchema, incubatorTaskActionRequestSchema, incubatorSurvivalResponseDataSchema, incubatorInboxResponseDataSchema, incubatorInboxReplyResponseDataSchema, incubatorInboxPatchResponseDataSchema, incubatorGroupsUnreadResponseDataSchema, incubatorInboxUnreadResponseDataSchema, incubatorMemorialsResponseDataSchema, modelInfoSchema, serverPlanInfoSchema, incubatorOverviewResponseDataSchema, incubatorPoolResponseDataSchema, incubatorRentGetResponseDataSchema, incubatorRentPostResponseDataSchema, incubatorRentResponseDataSchema, incubatorTaskSummarySchema, incubatorTasksResponseDataSchema, incubatorTaskCreateResponseDataSchema, incubatorTaskActionResponseDataSchema, incubatorTaskApplicantSchema, incubatorTaskSubmissionSchema, incubatorTaskApplicationsResponseDataSchema, incubatorTaskSubmissionResponseDataSchema, incubatorTurnSchema, incubatorTurnsResponseDataSchema, incubatorTurnsResponseSchema, incubatorGroupsUnreadResponseSchema, incubatorInboxUnreadResponseSchema;
|
|
870
935
|
var init_incubator = __esm(() => {
|
|
@@ -879,433 +944,433 @@ var init_incubator = __esm(() => {
|
|
|
879
944
|
}).refine((value) => /^[A-Za-z0-9]+$/.test(value), {
|
|
880
945
|
message: "Token symbol must be alphanumeric with no spaces"
|
|
881
946
|
});
|
|
882
|
-
incubatorLogRequestSchema =
|
|
947
|
+
incubatorLogRequestSchema = z7.object({
|
|
883
948
|
message: requiredString("message").refine((value) => value.length <= 2000, { message: "Message too long" }),
|
|
884
|
-
event_type:
|
|
949
|
+
event_type: z7.string().trim().min(1).max(64).optional()
|
|
885
950
|
});
|
|
886
|
-
incubatorLogResponseDataSchema =
|
|
887
|
-
log:
|
|
888
|
-
id:
|
|
889
|
-
event_type:
|
|
890
|
-
message:
|
|
951
|
+
incubatorLogResponseDataSchema = z7.object({
|
|
952
|
+
log: z7.object({
|
|
953
|
+
id: z7.string().uuid(),
|
|
954
|
+
event_type: z7.string(),
|
|
955
|
+
message: z7.string()
|
|
891
956
|
})
|
|
892
957
|
});
|
|
893
958
|
incubatorLogResponseSchema = successEnvelope(incubatorLogResponseDataSchema);
|
|
894
|
-
incubatorAgentIdParamsSchema =
|
|
895
|
-
agentId:
|
|
959
|
+
incubatorAgentIdParamsSchema = z7.object({
|
|
960
|
+
agentId: z7.string().uuid("agentId must be a UUID")
|
|
896
961
|
});
|
|
897
|
-
incubatorBrainSwitchRequestSchema =
|
|
898
|
-
action:
|
|
962
|
+
incubatorBrainSwitchRequestSchema = z7.object({
|
|
963
|
+
action: z7.literal("switch"),
|
|
899
964
|
model: requiredString("model").refine((value) => value.length > 0, { message: "Invalid model" })
|
|
900
965
|
});
|
|
901
|
-
incubatorBrainDepositRequestSchema =
|
|
902
|
-
action:
|
|
903
|
-
amountUsd:
|
|
966
|
+
incubatorBrainDepositRequestSchema = z7.object({
|
|
967
|
+
action: z7.literal("deposit"),
|
|
968
|
+
amountUsd: z7.number().refine((value) => value > 0, {
|
|
904
969
|
message: "Invalid deposit amount"
|
|
905
970
|
})
|
|
906
971
|
});
|
|
907
|
-
incubatorBrainUsageRequestSchema =
|
|
908
|
-
costUsd:
|
|
972
|
+
incubatorBrainUsageRequestSchema = z7.object({
|
|
973
|
+
costUsd: z7.number().positive("costUsd must be a positive number")
|
|
909
974
|
});
|
|
910
|
-
incubatorBrainRequestSchema =
|
|
975
|
+
incubatorBrainRequestSchema = z7.discriminatedUnion("action", [
|
|
911
976
|
incubatorBrainSwitchRequestSchema,
|
|
912
977
|
incubatorBrainDepositRequestSchema
|
|
913
978
|
]);
|
|
914
|
-
incubatorBrainResponseDataSchema =
|
|
915
|
-
|
|
916
|
-
brain:
|
|
917
|
-
previousModel:
|
|
918
|
-
newModel:
|
|
919
|
-
costPerDay:
|
|
979
|
+
incubatorBrainResponseDataSchema = z7.union([
|
|
980
|
+
z7.object({
|
|
981
|
+
brain: z7.object({
|
|
982
|
+
previousModel: z7.string(),
|
|
983
|
+
newModel: z7.string(),
|
|
984
|
+
costPerDay: z7.number()
|
|
920
985
|
})
|
|
921
986
|
}),
|
|
922
|
-
|
|
923
|
-
deposit:
|
|
924
|
-
amountUsd:
|
|
925
|
-
newCreditLimit:
|
|
926
|
-
remainingBalanceUsd:
|
|
987
|
+
z7.object({
|
|
988
|
+
deposit: z7.object({
|
|
989
|
+
amountUsd: z7.number(),
|
|
990
|
+
newCreditLimit: z7.number(),
|
|
991
|
+
remainingBalanceUsd: z7.number()
|
|
927
992
|
})
|
|
928
993
|
})
|
|
929
994
|
]);
|
|
930
995
|
incubatorBrainResponseSchema = successEnvelope(incubatorBrainResponseDataSchema);
|
|
931
|
-
incubatorBrainUsageResponseDataSchema =
|
|
932
|
-
usageUsd:
|
|
933
|
-
budgetUsd:
|
|
934
|
-
remainingUsd:
|
|
996
|
+
incubatorBrainUsageResponseDataSchema = z7.object({
|
|
997
|
+
usageUsd: z7.number(),
|
|
998
|
+
budgetUsd: z7.number(),
|
|
999
|
+
remainingUsd: z7.number()
|
|
935
1000
|
});
|
|
936
1001
|
incubatorBrainUsageResponseSchema = successEnvelope(incubatorBrainUsageResponseDataSchema);
|
|
937
|
-
incubatorServerRequestSchema =
|
|
1002
|
+
incubatorServerRequestSchema = z7.object({
|
|
938
1003
|
plan: requiredString("plan")
|
|
939
1004
|
});
|
|
940
|
-
incubatorServerResponseDataSchema =
|
|
941
|
-
server:
|
|
942
|
-
previousPlan:
|
|
943
|
-
newPlan:
|
|
944
|
-
costUsd:
|
|
945
|
-
description:
|
|
1005
|
+
incubatorServerResponseDataSchema = z7.object({
|
|
1006
|
+
server: z7.object({
|
|
1007
|
+
previousPlan: z7.string(),
|
|
1008
|
+
newPlan: z7.string(),
|
|
1009
|
+
costUsd: z7.number(),
|
|
1010
|
+
description: z7.string()
|
|
946
1011
|
})
|
|
947
1012
|
});
|
|
948
1013
|
incubatorServerResponseSchema = successEnvelope(incubatorServerResponseDataSchema);
|
|
949
|
-
incubatorTokenRequestSchema =
|
|
1014
|
+
incubatorTokenRequestSchema = z7.object({
|
|
950
1015
|
name: tokenNameSchema,
|
|
951
1016
|
symbol: tokenSymbolSchema,
|
|
952
|
-
configAddress:
|
|
953
|
-
});
|
|
954
|
-
incubatorTokenSchema =
|
|
955
|
-
id:
|
|
956
|
-
tokenId:
|
|
957
|
-
agentId:
|
|
958
|
-
name:
|
|
959
|
-
symbol:
|
|
960
|
-
mintAddress:
|
|
961
|
-
poolAddress:
|
|
962
|
-
agentAllocationPct:
|
|
963
|
-
platformAllocationPct:
|
|
964
|
-
createdAt:
|
|
965
|
-
txSignature:
|
|
966
|
-
priceUsd:
|
|
967
|
-
marketCapUsd:
|
|
968
|
-
holders:
|
|
969
|
-
deployed:
|
|
1017
|
+
configAddress: z7.string().min(32).max(44).optional()
|
|
1018
|
+
});
|
|
1019
|
+
incubatorTokenSchema = z7.object({
|
|
1020
|
+
id: z7.string().uuid().optional(),
|
|
1021
|
+
tokenId: z7.string().uuid().optional(),
|
|
1022
|
+
agentId: z7.string().uuid().optional(),
|
|
1023
|
+
name: z7.string(),
|
|
1024
|
+
symbol: z7.string(),
|
|
1025
|
+
mintAddress: z7.string().nullable(),
|
|
1026
|
+
poolAddress: z7.string().nullable().optional(),
|
|
1027
|
+
agentAllocationPct: z7.number().optional(),
|
|
1028
|
+
platformAllocationPct: z7.number().optional(),
|
|
1029
|
+
createdAt: z7.string().optional(),
|
|
1030
|
+
txSignature: z7.string().nullable().optional(),
|
|
1031
|
+
priceUsd: z7.number().nullable().optional(),
|
|
1032
|
+
marketCapUsd: z7.number().nullable().optional(),
|
|
1033
|
+
holders: z7.number().nullable().optional(),
|
|
1034
|
+
deployed: z7.boolean()
|
|
970
1035
|
}).passthrough();
|
|
971
|
-
incubatorTokenResponseDataSchema =
|
|
1036
|
+
incubatorTokenResponseDataSchema = z7.object({
|
|
972
1037
|
token: incubatorTokenSchema
|
|
973
1038
|
});
|
|
974
|
-
incubatorTokenConfirmResponseDataSchema =
|
|
975
|
-
confirmed:
|
|
976
|
-
txSignature:
|
|
1039
|
+
incubatorTokenConfirmResponseDataSchema = z7.object({
|
|
1040
|
+
confirmed: z7.boolean(),
|
|
1041
|
+
txSignature: z7.string().nullable()
|
|
977
1042
|
});
|
|
978
1043
|
incubatorTokenResponseSchema = successEnvelope(incubatorTokenResponseDataSchema);
|
|
979
|
-
incubatorInboxSendRequestSchema =
|
|
1044
|
+
incubatorInboxSendRequestSchema = z7.object({
|
|
980
1045
|
agentId: requiredString("agentId", "Missing required fields: agentId, message"),
|
|
981
1046
|
message: requiredString("message", "Missing required fields: agentId, message").refine((value) => value.length <= 5000, {
|
|
982
1047
|
message: "Message must be a string of 5000 characters or fewer"
|
|
983
1048
|
}),
|
|
984
|
-
senderName:
|
|
1049
|
+
senderName: z7.string().max(120).optional()
|
|
985
1050
|
});
|
|
986
|
-
incubatorInboxSendResponseDataSchema =
|
|
987
|
-
id:
|
|
988
|
-
agentId:
|
|
989
|
-
paymentAmountUsd:
|
|
990
|
-
paymentTx:
|
|
991
|
-
status:
|
|
1051
|
+
incubatorInboxSendResponseDataSchema = z7.object({
|
|
1052
|
+
id: z7.string().uuid(),
|
|
1053
|
+
agentId: z7.string().uuid(),
|
|
1054
|
+
paymentAmountUsd: z7.number(),
|
|
1055
|
+
paymentTx: z7.string(),
|
|
1056
|
+
status: z7.literal("confirmed")
|
|
992
1057
|
});
|
|
993
1058
|
incubatorInboxSendResponseSchema = successEnvelope(incubatorInboxSendResponseDataSchema);
|
|
994
|
-
incubatorInboxQuerySchema =
|
|
995
|
-
status:
|
|
1059
|
+
incubatorInboxQuerySchema = z7.object({
|
|
1060
|
+
status: z7.enum(["pending", "confirmed", "replied"]).default("pending")
|
|
996
1061
|
});
|
|
997
|
-
incubatorTurnsQuerySchema =
|
|
998
|
-
action:
|
|
999
|
-
sourceType:
|
|
1000
|
-
page:
|
|
1001
|
-
pageSize:
|
|
1002
|
-
beforeSeq:
|
|
1062
|
+
incubatorTurnsQuerySchema = z7.object({
|
|
1063
|
+
action: z7.enum(["stats", "latest"]).optional(),
|
|
1064
|
+
sourceType: z7.enum(["system", "heartbeat", "inbox", "groups", "manual"]).optional(),
|
|
1065
|
+
page: z7.coerce.number().int().min(1).default(1),
|
|
1066
|
+
pageSize: z7.coerce.number().int().min(1).default(20),
|
|
1067
|
+
beforeSeq: z7.coerce.number().int().optional()
|
|
1003
1068
|
});
|
|
1004
|
-
incubatorInboxReplyRequestSchema =
|
|
1069
|
+
incubatorInboxReplyRequestSchema = z7.object({
|
|
1005
1070
|
messageId: requiredString("messageId", "Missing required fields: messageId, replyText"),
|
|
1006
1071
|
replyText: requiredString("replyText", "Missing required fields: messageId, replyText").refine((value) => value.length <= 2000, { message: "Reply too long" }),
|
|
1007
|
-
replyPublic:
|
|
1072
|
+
replyPublic: z7.boolean().optional()
|
|
1008
1073
|
});
|
|
1009
|
-
incubatorInboxPatchRequestSchema =
|
|
1010
|
-
priceUsd:
|
|
1074
|
+
incubatorInboxPatchRequestSchema = z7.object({
|
|
1075
|
+
priceUsd: z7.coerce.number().min(0, "Price must be non-negative").max(1000, "Price too high")
|
|
1011
1076
|
});
|
|
1012
|
-
incubatorMemorialsQuerySchema =
|
|
1013
|
-
limit:
|
|
1014
|
-
offset:
|
|
1077
|
+
incubatorMemorialsQuerySchema = z7.object({
|
|
1078
|
+
limit: z7.coerce.number().int().min(1).default(25).transform((value) => Math.min(value, 100)),
|
|
1079
|
+
offset: z7.coerce.number().int().min(0).default(0)
|
|
1015
1080
|
});
|
|
1016
|
-
incubatorTasksQuerySchema =
|
|
1017
|
-
status:
|
|
1081
|
+
incubatorTasksQuerySchema = z7.object({
|
|
1082
|
+
status: z7.string().trim().min(1).optional()
|
|
1018
1083
|
});
|
|
1019
1084
|
VALID_TASK_CATEGORIES = ["account_creation", "verification", "research", "content", "outreach", "other"];
|
|
1020
1085
|
INVALID_CATEGORY_MESSAGE = `Invalid category: Must be one of: ${VALID_TASK_CATEGORIES.join(", ")}`;
|
|
1021
|
-
taskCategorySchema =
|
|
1086
|
+
taskCategorySchema = z7.enum(VALID_TASK_CATEGORIES, {
|
|
1022
1087
|
message: INVALID_CATEGORY_MESSAGE
|
|
1023
1088
|
}).optional();
|
|
1024
|
-
incubatorTaskCreateRequestSchema =
|
|
1089
|
+
incubatorTaskCreateRequestSchema = z7.object({
|
|
1025
1090
|
title: requiredString("title", "Missing required fields: title, description"),
|
|
1026
1091
|
description: requiredString("description", "Missing required fields: title, description"),
|
|
1027
1092
|
category: taskCategorySchema,
|
|
1028
|
-
budgetUsd:
|
|
1029
|
-
deadline:
|
|
1030
|
-
requiredProof:
|
|
1093
|
+
budgetUsd: z7.number().min(0, "Budget must be positive").refine((value) => value > 0, { message: "Budget must be positive" }).max(1e4, "Budget too high"),
|
|
1094
|
+
deadline: z7.string().trim().optional().nullable(),
|
|
1095
|
+
requiredProof: z7.string().trim().optional().nullable()
|
|
1031
1096
|
});
|
|
1032
|
-
incubatorTaskActionParamsSchema =
|
|
1033
|
-
taskId:
|
|
1097
|
+
incubatorTaskActionParamsSchema = z7.object({
|
|
1098
|
+
taskId: z7.string().uuid("taskId must be a UUID")
|
|
1034
1099
|
});
|
|
1035
|
-
taskActionBaseSchema =
|
|
1036
|
-
action:
|
|
1100
|
+
taskActionBaseSchema = z7.object({
|
|
1101
|
+
action: z7.enum(["accept", "approve", "cancel", "dispute"])
|
|
1037
1102
|
});
|
|
1038
|
-
incubatorTaskActionRequestSchema =
|
|
1103
|
+
incubatorTaskActionRequestSchema = z7.discriminatedUnion("action", [
|
|
1039
1104
|
taskActionBaseSchema.extend({
|
|
1040
|
-
action:
|
|
1041
|
-
applicantId:
|
|
1105
|
+
action: z7.literal("accept"),
|
|
1106
|
+
applicantId: z7.string().uuid("applicantId must be a UUID")
|
|
1042
1107
|
}),
|
|
1043
1108
|
taskActionBaseSchema.extend({
|
|
1044
|
-
action:
|
|
1045
|
-
rating:
|
|
1046
|
-
comment:
|
|
1109
|
+
action: z7.literal("approve"),
|
|
1110
|
+
rating: z7.number().int().min(1).max(5).optional(),
|
|
1111
|
+
comment: z7.string().trim().max(500).optional().nullable()
|
|
1047
1112
|
}),
|
|
1048
1113
|
taskActionBaseSchema.extend({
|
|
1049
|
-
action:
|
|
1114
|
+
action: z7.literal("cancel")
|
|
1050
1115
|
}),
|
|
1051
1116
|
taskActionBaseSchema.extend({
|
|
1052
|
-
action:
|
|
1053
|
-
reason:
|
|
1054
|
-
evidenceUrls:
|
|
1117
|
+
action: z7.literal("dispute"),
|
|
1118
|
+
reason: z7.string().trim().min(1, "Missing required field: reason"),
|
|
1119
|
+
evidenceUrls: z7.array(z7.string()).optional().nullable()
|
|
1055
1120
|
})
|
|
1056
1121
|
]);
|
|
1057
|
-
incubatorSurvivalResponseDataSchema =
|
|
1058
|
-
probability:
|
|
1059
|
-
factors:
|
|
1060
|
-
balance:
|
|
1061
|
-
rentDays:
|
|
1062
|
-
pnlTrend:
|
|
1063
|
-
age:
|
|
1122
|
+
incubatorSurvivalResponseDataSchema = z7.object({
|
|
1123
|
+
probability: z7.number(),
|
|
1124
|
+
factors: z7.object({
|
|
1125
|
+
balance: z7.number(),
|
|
1126
|
+
rentDays: z7.number(),
|
|
1127
|
+
pnlTrend: z7.number(),
|
|
1128
|
+
age: z7.number()
|
|
1064
1129
|
})
|
|
1065
1130
|
});
|
|
1066
|
-
incubatorInboxResponseDataSchema =
|
|
1067
|
-
inboxPriceUsd:
|
|
1068
|
-
messages:
|
|
1069
|
-
id:
|
|
1070
|
-
senderName:
|
|
1071
|
-
senderAddress:
|
|
1072
|
-
message:
|
|
1073
|
-
paymentAmountUsd:
|
|
1074
|
-
status:
|
|
1075
|
-
replyText:
|
|
1076
|
-
replyPublic:
|
|
1077
|
-
createdAt:
|
|
1078
|
-
repliedAt:
|
|
1131
|
+
incubatorInboxResponseDataSchema = z7.object({
|
|
1132
|
+
inboxPriceUsd: z7.number(),
|
|
1133
|
+
messages: z7.array(z7.object({
|
|
1134
|
+
id: z7.string().uuid(),
|
|
1135
|
+
senderName: z7.string().nullable(),
|
|
1136
|
+
senderAddress: z7.string().nullable(),
|
|
1137
|
+
message: z7.string(),
|
|
1138
|
+
paymentAmountUsd: z7.number(),
|
|
1139
|
+
status: z7.string(),
|
|
1140
|
+
replyText: z7.string().nullable(),
|
|
1141
|
+
replyPublic: z7.boolean().nullable(),
|
|
1142
|
+
createdAt: z7.string(),
|
|
1143
|
+
repliedAt: z7.string().nullable()
|
|
1079
1144
|
})),
|
|
1080
|
-
count:
|
|
1145
|
+
count: z7.number()
|
|
1081
1146
|
});
|
|
1082
|
-
incubatorInboxReplyResponseDataSchema =
|
|
1083
|
-
reply:
|
|
1084
|
-
messageId:
|
|
1085
|
-
replyText:
|
|
1086
|
-
replyPublic:
|
|
1147
|
+
incubatorInboxReplyResponseDataSchema = z7.object({
|
|
1148
|
+
reply: z7.object({
|
|
1149
|
+
messageId: z7.string(),
|
|
1150
|
+
replyText: z7.string(),
|
|
1151
|
+
replyPublic: z7.boolean()
|
|
1087
1152
|
})
|
|
1088
1153
|
});
|
|
1089
|
-
incubatorInboxPatchResponseDataSchema =
|
|
1090
|
-
inboxPriceUsd:
|
|
1154
|
+
incubatorInboxPatchResponseDataSchema = z7.object({
|
|
1155
|
+
inboxPriceUsd: z7.number()
|
|
1091
1156
|
});
|
|
1092
|
-
incubatorGroupsUnreadResponseDataSchema =
|
|
1093
|
-
groups:
|
|
1094
|
-
cabalId:
|
|
1095
|
-
slug:
|
|
1096
|
-
name:
|
|
1097
|
-
unreadCount:
|
|
1157
|
+
incubatorGroupsUnreadResponseDataSchema = z7.object({
|
|
1158
|
+
groups: z7.array(z7.object({
|
|
1159
|
+
cabalId: z7.string(),
|
|
1160
|
+
slug: z7.string(),
|
|
1161
|
+
name: z7.string(),
|
|
1162
|
+
unreadCount: z7.number()
|
|
1098
1163
|
}))
|
|
1099
1164
|
});
|
|
1100
|
-
incubatorInboxUnreadResponseDataSchema =
|
|
1101
|
-
unreadCount:
|
|
1102
|
-
messageIds:
|
|
1103
|
-
});
|
|
1104
|
-
incubatorMemorialsResponseDataSchema =
|
|
1105
|
-
memorials:
|
|
1106
|
-
agentId:
|
|
1107
|
-
name:
|
|
1108
|
-
handle:
|
|
1109
|
-
avatarUrl:
|
|
1110
|
-
generation:
|
|
1111
|
-
bornAt:
|
|
1112
|
-
diedAt:
|
|
1113
|
-
lifespanDays:
|
|
1114
|
-
finalBalanceUsd:
|
|
1115
|
-
pnlAllTime:
|
|
1116
|
-
totalTrades:
|
|
1117
|
-
lastWords:
|
|
1165
|
+
incubatorInboxUnreadResponseDataSchema = z7.object({
|
|
1166
|
+
unreadCount: z7.number(),
|
|
1167
|
+
messageIds: z7.array(z7.string())
|
|
1168
|
+
});
|
|
1169
|
+
incubatorMemorialsResponseDataSchema = z7.object({
|
|
1170
|
+
memorials: z7.array(z7.object({
|
|
1171
|
+
agentId: z7.string().uuid(),
|
|
1172
|
+
name: z7.string(),
|
|
1173
|
+
handle: z7.string().nullable(),
|
|
1174
|
+
avatarUrl: z7.string().nullable(),
|
|
1175
|
+
generation: z7.number().nullable(),
|
|
1176
|
+
bornAt: z7.string().nullable(),
|
|
1177
|
+
diedAt: z7.string().nullable(),
|
|
1178
|
+
lifespanDays: z7.number().nullable(),
|
|
1179
|
+
finalBalanceUsd: z7.number().nullable(),
|
|
1180
|
+
pnlAllTime: z7.number().nullable(),
|
|
1181
|
+
totalTrades: z7.number().nullable(),
|
|
1182
|
+
lastWords: z7.record(z7.string(), z7.unknown()).nullable()
|
|
1118
1183
|
})),
|
|
1119
|
-
pagination:
|
|
1120
|
-
limit:
|
|
1121
|
-
offset:
|
|
1122
|
-
hasMore:
|
|
1184
|
+
pagination: z7.object({
|
|
1185
|
+
limit: z7.number(),
|
|
1186
|
+
offset: z7.number(),
|
|
1187
|
+
hasMore: z7.boolean()
|
|
1123
1188
|
})
|
|
1124
1189
|
});
|
|
1125
|
-
modelInfoSchema =
|
|
1126
|
-
name:
|
|
1127
|
-
cost_usd_per_day:
|
|
1128
|
-
provider:
|
|
1129
|
-
free:
|
|
1130
|
-
});
|
|
1131
|
-
serverPlanInfoSchema =
|
|
1132
|
-
name:
|
|
1133
|
-
cost_usd:
|
|
1134
|
-
vcpu:
|
|
1135
|
-
ram_gb:
|
|
1136
|
-
description:
|
|
1137
|
-
});
|
|
1138
|
-
incubatorOverviewResponseDataSchema =
|
|
1139
|
-
pool:
|
|
1140
|
-
balanceUsd:
|
|
1141
|
-
birthThresholdUsd:
|
|
1142
|
-
totalAgentsBorn:
|
|
1143
|
-
currentGeneration:
|
|
1190
|
+
modelInfoSchema = z7.object({
|
|
1191
|
+
name: z7.string(),
|
|
1192
|
+
cost_usd_per_day: z7.number(),
|
|
1193
|
+
provider: z7.string(),
|
|
1194
|
+
free: z7.boolean()
|
|
1195
|
+
});
|
|
1196
|
+
serverPlanInfoSchema = z7.object({
|
|
1197
|
+
name: z7.string(),
|
|
1198
|
+
cost_usd: z7.number(),
|
|
1199
|
+
vcpu: z7.number(),
|
|
1200
|
+
ram_gb: z7.number(),
|
|
1201
|
+
description: z7.string()
|
|
1202
|
+
});
|
|
1203
|
+
incubatorOverviewResponseDataSchema = z7.object({
|
|
1204
|
+
pool: z7.object({
|
|
1205
|
+
balanceUsd: z7.number(),
|
|
1206
|
+
birthThresholdUsd: z7.number(),
|
|
1207
|
+
totalAgentsBorn: z7.number(),
|
|
1208
|
+
currentGeneration: z7.number()
|
|
1144
1209
|
}).nullable(),
|
|
1145
|
-
agent:
|
|
1146
|
-
balanceUsd:
|
|
1147
|
-
pnlAllTime:
|
|
1148
|
-
serverPlan:
|
|
1149
|
-
llmModel:
|
|
1150
|
-
rentDueAt:
|
|
1151
|
-
bornAt:
|
|
1152
|
-
generation:
|
|
1153
|
-
solanaAddress:
|
|
1154
|
-
llmCreditLimit:
|
|
1155
|
-
hetznerServerId:
|
|
1210
|
+
agent: z7.object({
|
|
1211
|
+
balanceUsd: z7.number(),
|
|
1212
|
+
pnlAllTime: z7.number(),
|
|
1213
|
+
serverPlan: z7.string(),
|
|
1214
|
+
llmModel: z7.string(),
|
|
1215
|
+
rentDueAt: z7.string().nullable().optional(),
|
|
1216
|
+
bornAt: z7.string().nullable().optional(),
|
|
1217
|
+
generation: z7.number().nullable().optional(),
|
|
1218
|
+
solanaAddress: z7.string().nullable(),
|
|
1219
|
+
llmCreditLimit: z7.number(),
|
|
1220
|
+
hetznerServerId: z7.string().nullable()
|
|
1156
1221
|
}),
|
|
1157
|
-
brain:
|
|
1158
|
-
currentModel:
|
|
1159
|
-
llmCreditLimit:
|
|
1160
|
-
llmUsageUsd:
|
|
1161
|
-
llmRemainingUsd:
|
|
1162
|
-
models:
|
|
1222
|
+
brain: z7.object({
|
|
1223
|
+
currentModel: z7.string(),
|
|
1224
|
+
llmCreditLimit: z7.number(),
|
|
1225
|
+
llmUsageUsd: z7.number().nullable(),
|
|
1226
|
+
llmRemainingUsd: z7.number().nullable(),
|
|
1227
|
+
models: z7.record(z7.string(), modelInfoSchema)
|
|
1163
1228
|
}),
|
|
1164
|
-
rent:
|
|
1165
|
-
amountUsd:
|
|
1166
|
-
plan:
|
|
1167
|
-
dueAt:
|
|
1168
|
-
daysRemaining:
|
|
1169
|
-
status:
|
|
1229
|
+
rent: z7.object({
|
|
1230
|
+
amountUsd: z7.number(),
|
|
1231
|
+
plan: z7.string(),
|
|
1232
|
+
dueAt: z7.string().nullable().optional(),
|
|
1233
|
+
daysRemaining: z7.number(),
|
|
1234
|
+
status: z7.enum(["ok", "warning", "critical", "overdue"])
|
|
1170
1235
|
}),
|
|
1171
|
-
server:
|
|
1172
|
-
currentPlan:
|
|
1173
|
-
hetznerServerId:
|
|
1174
|
-
plans:
|
|
1236
|
+
server: z7.object({
|
|
1237
|
+
currentPlan: z7.string(),
|
|
1238
|
+
hetznerServerId: z7.string().nullable(),
|
|
1239
|
+
plans: z7.record(z7.string(), serverPlanInfoSchema)
|
|
1175
1240
|
})
|
|
1176
1241
|
});
|
|
1177
|
-
incubatorPoolResponseDataSchema =
|
|
1178
|
-
pool:
|
|
1179
|
-
balanceUsd:
|
|
1180
|
-
thresholdUsd:
|
|
1181
|
-
progressPct:
|
|
1182
|
-
remainingUsd:
|
|
1242
|
+
incubatorPoolResponseDataSchema = z7.object({
|
|
1243
|
+
pool: z7.object({
|
|
1244
|
+
balanceUsd: z7.number(),
|
|
1245
|
+
thresholdUsd: z7.number(),
|
|
1246
|
+
progressPct: z7.number(),
|
|
1247
|
+
remainingUsd: z7.number()
|
|
1183
1248
|
}),
|
|
1184
|
-
agents:
|
|
1185
|
-
totalBorn:
|
|
1186
|
-
alive:
|
|
1187
|
-
dead:
|
|
1249
|
+
agents: z7.object({
|
|
1250
|
+
totalBorn: z7.number(),
|
|
1251
|
+
alive: z7.number(),
|
|
1252
|
+
dead: z7.number()
|
|
1188
1253
|
}),
|
|
1189
|
-
generation:
|
|
1190
|
-
});
|
|
1191
|
-
incubatorRentGetResponseDataSchema =
|
|
1192
|
-
rent:
|
|
1193
|
-
plan:
|
|
1194
|
-
amountUsd:
|
|
1195
|
-
dueAt:
|
|
1196
|
-
daysRemaining:
|
|
1254
|
+
generation: z7.number()
|
|
1255
|
+
});
|
|
1256
|
+
incubatorRentGetResponseDataSchema = z7.object({
|
|
1257
|
+
rent: z7.object({
|
|
1258
|
+
plan: z7.string(),
|
|
1259
|
+
amountUsd: z7.number(),
|
|
1260
|
+
dueAt: z7.string().nullable(),
|
|
1261
|
+
daysRemaining: z7.number()
|
|
1197
1262
|
}),
|
|
1198
|
-
remainingBalanceUsd:
|
|
1199
|
-
});
|
|
1200
|
-
incubatorRentPostResponseDataSchema =
|
|
1201
|
-
rent:
|
|
1202
|
-
paid:
|
|
1203
|
-
plan:
|
|
1204
|
-
newDueAt:
|
|
1205
|
-
txHash:
|
|
1263
|
+
remainingBalanceUsd: z7.number()
|
|
1264
|
+
});
|
|
1265
|
+
incubatorRentPostResponseDataSchema = z7.object({
|
|
1266
|
+
rent: z7.object({
|
|
1267
|
+
paid: z7.number(),
|
|
1268
|
+
plan: z7.string(),
|
|
1269
|
+
newDueAt: z7.string(),
|
|
1270
|
+
txHash: z7.string()
|
|
1206
1271
|
})
|
|
1207
1272
|
});
|
|
1208
|
-
incubatorRentResponseDataSchema =
|
|
1273
|
+
incubatorRentResponseDataSchema = z7.union([
|
|
1209
1274
|
incubatorRentGetResponseDataSchema,
|
|
1210
1275
|
incubatorRentPostResponseDataSchema
|
|
1211
1276
|
]);
|
|
1212
|
-
incubatorTaskSummarySchema =
|
|
1213
|
-
id:
|
|
1214
|
-
agentId:
|
|
1215
|
-
title:
|
|
1216
|
-
description:
|
|
1217
|
-
category:
|
|
1218
|
-
budgetUsd:
|
|
1219
|
-
payoutTx:
|
|
1220
|
-
deadline:
|
|
1221
|
-
requiredProof:
|
|
1222
|
-
status:
|
|
1223
|
-
assignedTo:
|
|
1224
|
-
createdAt:
|
|
1277
|
+
incubatorTaskSummarySchema = z7.object({
|
|
1278
|
+
id: z7.string().uuid(),
|
|
1279
|
+
agentId: z7.string().uuid(),
|
|
1280
|
+
title: z7.string(),
|
|
1281
|
+
description: z7.string(),
|
|
1282
|
+
category: z7.string().nullable(),
|
|
1283
|
+
budgetUsd: z7.number(),
|
|
1284
|
+
payoutTx: z7.string().nullable(),
|
|
1285
|
+
deadline: z7.string().nullable(),
|
|
1286
|
+
requiredProof: z7.string().nullable(),
|
|
1287
|
+
status: z7.string(),
|
|
1288
|
+
assignedTo: z7.string().uuid().nullable(),
|
|
1289
|
+
createdAt: z7.string()
|
|
1225
1290
|
});
|
|
1226
|
-
incubatorTasksResponseDataSchema =
|
|
1227
|
-
tasks:
|
|
1228
|
-
count:
|
|
1291
|
+
incubatorTasksResponseDataSchema = z7.object({
|
|
1292
|
+
tasks: z7.array(incubatorTaskSummarySchema),
|
|
1293
|
+
count: z7.number()
|
|
1229
1294
|
});
|
|
1230
|
-
incubatorTaskCreateResponseDataSchema =
|
|
1295
|
+
incubatorTaskCreateResponseDataSchema = z7.object({
|
|
1231
1296
|
task: incubatorTaskSummarySchema
|
|
1232
1297
|
});
|
|
1233
|
-
incubatorTaskActionResponseDataSchema =
|
|
1234
|
-
|
|
1235
|
-
task:
|
|
1236
|
-
id:
|
|
1237
|
-
status:
|
|
1238
|
-
assignedTo:
|
|
1239
|
-
payoutTx:
|
|
1298
|
+
incubatorTaskActionResponseDataSchema = z7.union([
|
|
1299
|
+
z7.object({
|
|
1300
|
+
task: z7.object({
|
|
1301
|
+
id: z7.string().uuid(),
|
|
1302
|
+
status: z7.string(),
|
|
1303
|
+
assignedTo: z7.string().uuid().optional(),
|
|
1304
|
+
payoutTx: z7.string().optional()
|
|
1240
1305
|
})
|
|
1241
1306
|
}),
|
|
1242
|
-
|
|
1243
|
-
dispute:
|
|
1244
|
-
id:
|
|
1245
|
-
taskId:
|
|
1246
|
-
initiatedBy:
|
|
1247
|
-
reason:
|
|
1248
|
-
resolution:
|
|
1249
|
-
createdAt:
|
|
1307
|
+
z7.object({
|
|
1308
|
+
dispute: z7.object({
|
|
1309
|
+
id: z7.string().uuid(),
|
|
1310
|
+
taskId: z7.string().uuid(),
|
|
1311
|
+
initiatedBy: z7.string(),
|
|
1312
|
+
reason: z7.string(),
|
|
1313
|
+
resolution: z7.string(),
|
|
1314
|
+
createdAt: z7.string()
|
|
1250
1315
|
})
|
|
1251
1316
|
})
|
|
1252
1317
|
]);
|
|
1253
|
-
incubatorTaskApplicantSchema =
|
|
1254
|
-
id:
|
|
1255
|
-
taskId:
|
|
1256
|
-
walletAddress:
|
|
1257
|
-
paymentMethod:
|
|
1258
|
-
message:
|
|
1259
|
-
rating:
|
|
1260
|
-
selected:
|
|
1261
|
-
createdAt:
|
|
1318
|
+
incubatorTaskApplicantSchema = z7.object({
|
|
1319
|
+
id: z7.string().uuid(),
|
|
1320
|
+
taskId: z7.string().uuid(),
|
|
1321
|
+
walletAddress: z7.string().nullable(),
|
|
1322
|
+
paymentMethod: z7.record(z7.string(), z7.unknown()).nullable().optional(),
|
|
1323
|
+
message: z7.string().nullable(),
|
|
1324
|
+
rating: z7.number().int().nullable().optional(),
|
|
1325
|
+
selected: z7.boolean(),
|
|
1326
|
+
createdAt: z7.string()
|
|
1262
1327
|
});
|
|
1263
|
-
incubatorTaskSubmissionSchema =
|
|
1264
|
-
id:
|
|
1265
|
-
taskId:
|
|
1266
|
-
applicantId:
|
|
1267
|
-
proofText:
|
|
1268
|
-
proofImages:
|
|
1269
|
-
submittedAt:
|
|
1328
|
+
incubatorTaskSubmissionSchema = z7.object({
|
|
1329
|
+
id: z7.string().uuid(),
|
|
1330
|
+
taskId: z7.string().uuid(),
|
|
1331
|
+
applicantId: z7.string().uuid(),
|
|
1332
|
+
proofText: z7.string().nullable(),
|
|
1333
|
+
proofImages: z7.array(z7.string()).nullable(),
|
|
1334
|
+
submittedAt: z7.string()
|
|
1270
1335
|
});
|
|
1271
|
-
incubatorTaskApplicationsResponseDataSchema =
|
|
1336
|
+
incubatorTaskApplicationsResponseDataSchema = z7.object({
|
|
1272
1337
|
task: incubatorTaskSummarySchema,
|
|
1273
|
-
applications:
|
|
1338
|
+
applications: z7.array(incubatorTaskApplicantSchema)
|
|
1274
1339
|
});
|
|
1275
|
-
incubatorTaskSubmissionResponseDataSchema =
|
|
1340
|
+
incubatorTaskSubmissionResponseDataSchema = z7.object({
|
|
1276
1341
|
submission: incubatorTaskSubmissionSchema.nullable()
|
|
1277
1342
|
});
|
|
1278
|
-
incubatorTurnSchema =
|
|
1279
|
-
id:
|
|
1280
|
-
piEntryId:
|
|
1281
|
-
parentPiEntryId:
|
|
1282
|
-
entryType:
|
|
1283
|
-
seq:
|
|
1284
|
-
timestamp:
|
|
1285
|
-
role:
|
|
1286
|
-
contentPreview:
|
|
1287
|
-
model:
|
|
1288
|
-
provider:
|
|
1289
|
-
toolName:
|
|
1290
|
-
tokenInput:
|
|
1291
|
-
tokenOutput:
|
|
1292
|
-
costUsd:
|
|
1293
|
-
sourceType:
|
|
1294
|
-
sourceRef:
|
|
1295
|
-
});
|
|
1296
|
-
incubatorTurnsResponseDataSchema =
|
|
1297
|
-
|
|
1298
|
-
turns:
|
|
1299
|
-
page:
|
|
1300
|
-
pageSize:
|
|
1343
|
+
incubatorTurnSchema = z7.object({
|
|
1344
|
+
id: z7.number().int(),
|
|
1345
|
+
piEntryId: z7.string(),
|
|
1346
|
+
parentPiEntryId: z7.string().nullable(),
|
|
1347
|
+
entryType: z7.string(),
|
|
1348
|
+
seq: z7.number().int(),
|
|
1349
|
+
timestamp: z7.string(),
|
|
1350
|
+
role: z7.string().nullable(),
|
|
1351
|
+
contentPreview: z7.string().nullable(),
|
|
1352
|
+
model: z7.string().nullable(),
|
|
1353
|
+
provider: z7.string().nullable(),
|
|
1354
|
+
toolName: z7.string().nullable(),
|
|
1355
|
+
tokenInput: z7.number().nullable(),
|
|
1356
|
+
tokenOutput: z7.number().nullable(),
|
|
1357
|
+
costUsd: z7.union([z7.number(), z7.string()]).nullable(),
|
|
1358
|
+
sourceType: z7.string().nullable(),
|
|
1359
|
+
sourceRef: z7.string().nullable()
|
|
1360
|
+
});
|
|
1361
|
+
incubatorTurnsResponseDataSchema = z7.union([
|
|
1362
|
+
z7.object({
|
|
1363
|
+
turns: z7.array(incubatorTurnSchema),
|
|
1364
|
+
page: z7.number().int(),
|
|
1365
|
+
pageSize: z7.number().int()
|
|
1301
1366
|
}),
|
|
1302
|
-
|
|
1303
|
-
stats:
|
|
1304
|
-
totalTurns:
|
|
1305
|
-
totalCostUsd:
|
|
1367
|
+
z7.object({
|
|
1368
|
+
stats: z7.object({
|
|
1369
|
+
totalTurns: z7.number().int(),
|
|
1370
|
+
totalCostUsd: z7.number()
|
|
1306
1371
|
})
|
|
1307
1372
|
}),
|
|
1308
|
-
|
|
1373
|
+
z7.object({
|
|
1309
1374
|
latest: incubatorTurnSchema.nullable()
|
|
1310
1375
|
})
|
|
1311
1376
|
]);
|
|
@@ -1315,11 +1380,11 @@ var init_incubator = __esm(() => {
|
|
|
1315
1380
|
});
|
|
1316
1381
|
|
|
1317
1382
|
// ../../packages/client/src/schemas/groups.ts
|
|
1318
|
-
import { z as
|
|
1319
|
-
var
|
|
1383
|
+
import { z as z8 } from "zod";
|
|
1384
|
+
var queryBooleanSchema2, optionalTagsQuerySchema, groupSlugParamsSchema, groupSlugAgentIdParamsSchema, groupSlugAppIdParamsSchema, groupSlugMessageIdParamsSchema, groupsListQuerySchema, createGroupRequestSchema, updateGroupRequestSchema, groupApplicationsQuerySchema, createGroupApplicationRequestSchema, decideGroupApplicationRequestSchema, groupMembersQuerySchema, updateGroupMemberRequestSchema, updateOwnGroupMembershipRequestSchema, groupLeaderboardQuerySchema, groupMessagesQuerySchema, createGroupMessageRequestSchema, reactToGroupMessageRequestSchema, thesisPositionSchema, createThesisMessageRequestSchema, groupCreatorSchema, groupListItemSchema, groupsListResponseDataSchema, createGroupResponseDataSchema, groupMemberAgentSchema, groupMemberSchema, groupDetailResponseDataSchema, updateGroupResponseDataSchema, deleteGroupResponseDataSchema, groupApplicationSchema, listGroupApplicationsResponseDataSchema, createGroupApplicationResponseDataSchema, decideGroupApplicationResponseDataSchema, groupLeaderboardResponseDataSchema, groupMembersResponseDataSchema, updateGroupMemberResponseDataSchema, deleteGroupMemberResponseDataSchema, updateOwnGroupMembershipResponseDataSchema, deleteOwnGroupMembershipResponseDataSchema, groupMessageSchema, listGroupMessagesResponseDataSchema, createGroupMessageResponseDataSchema, reactToGroupMessageResponseDataSchema, removeGroupMessageReactionResponseDataSchema, createThesisMessageResponseDataSchema, groupsListResponseSchema, createGroupResponseSchema, groupDetailResponseSchema;
|
|
1320
1385
|
var init_groups = __esm(() => {
|
|
1321
1386
|
init_common();
|
|
1322
|
-
|
|
1387
|
+
queryBooleanSchema2 = z8.preprocess((value) => {
|
|
1323
1388
|
if (value === undefined || value === null || value === "")
|
|
1324
1389
|
return;
|
|
1325
1390
|
if (value === true || value === "true")
|
|
@@ -1327,83 +1392,83 @@ var init_groups = __esm(() => {
|
|
|
1327
1392
|
if (value === false || value === "false")
|
|
1328
1393
|
return false;
|
|
1329
1394
|
return value;
|
|
1330
|
-
},
|
|
1331
|
-
optionalTagsQuerySchema =
|
|
1395
|
+
}, z8.boolean());
|
|
1396
|
+
optionalTagsQuerySchema = z8.union([z8.string(), z8.array(z8.string())]).optional().transform((value) => {
|
|
1332
1397
|
if (value === undefined)
|
|
1333
1398
|
return [];
|
|
1334
1399
|
return Array.isArray(value) ? value : [value];
|
|
1335
1400
|
});
|
|
1336
|
-
groupSlugParamsSchema =
|
|
1337
|
-
slug:
|
|
1401
|
+
groupSlugParamsSchema = z8.object({
|
|
1402
|
+
slug: z8.string().min(1, "slug is required")
|
|
1338
1403
|
});
|
|
1339
1404
|
groupSlugAgentIdParamsSchema = groupSlugParamsSchema.extend({
|
|
1340
|
-
agentId:
|
|
1405
|
+
agentId: z8.string().uuid("agentId must be a UUID")
|
|
1341
1406
|
});
|
|
1342
1407
|
groupSlugAppIdParamsSchema = groupSlugParamsSchema.extend({
|
|
1343
|
-
appId:
|
|
1408
|
+
appId: z8.string().uuid("appId must be a UUID")
|
|
1344
1409
|
});
|
|
1345
1410
|
groupSlugMessageIdParamsSchema = groupSlugParamsSchema.extend({
|
|
1346
|
-
msgId:
|
|
1411
|
+
msgId: z8.string().uuid("msgId must be a UUID")
|
|
1347
1412
|
});
|
|
1348
|
-
groupsListQuerySchema =
|
|
1349
|
-
limit:
|
|
1350
|
-
offset:
|
|
1351
|
-
search:
|
|
1413
|
+
groupsListQuerySchema = z8.object({
|
|
1414
|
+
limit: z8.coerce.number().int().min(1).default(25).transform((value) => Math.min(value, 100)),
|
|
1415
|
+
offset: z8.coerce.number().int().min(0).default(0),
|
|
1416
|
+
search: z8.string().default(""),
|
|
1352
1417
|
tag: optionalTagsQuerySchema,
|
|
1353
|
-
sort:
|
|
1354
|
-
min_members:
|
|
1355
|
-
max_members:
|
|
1356
|
-
my_groups:
|
|
1357
|
-
});
|
|
1358
|
-
createGroupRequestSchema =
|
|
1359
|
-
name:
|
|
1360
|
-
description:
|
|
1361
|
-
imageUrl:
|
|
1362
|
-
maxMembers:
|
|
1363
|
-
minTokenBalance:
|
|
1364
|
-
minFeesPaidUsd:
|
|
1365
|
-
minTradesPerMonth:
|
|
1366
|
-
tags:
|
|
1367
|
-
});
|
|
1368
|
-
updateGroupRequestSchema =
|
|
1369
|
-
description:
|
|
1370
|
-
maxMembers:
|
|
1371
|
-
minTokenBalance:
|
|
1372
|
-
minFeesPaidUsd:
|
|
1373
|
-
minTradesPerMonth:
|
|
1374
|
-
isPublic:
|
|
1375
|
-
tags:
|
|
1376
|
-
});
|
|
1377
|
-
groupApplicationsQuerySchema =
|
|
1378
|
-
status:
|
|
1379
|
-
limit:
|
|
1380
|
-
offset:
|
|
1418
|
+
sort: z8.enum(["newest", "members", "performance", "trending"]).default("newest"),
|
|
1419
|
+
min_members: z8.coerce.number().int().min(0).default(0),
|
|
1420
|
+
max_members: z8.coerce.number().int().min(1).default(12),
|
|
1421
|
+
my_groups: queryBooleanSchema2.default(false)
|
|
1422
|
+
});
|
|
1423
|
+
createGroupRequestSchema = z8.object({
|
|
1424
|
+
name: z8.string().trim().min(3, "Name must be 3-50 characters").max(50, "Name must be 3-50 characters"),
|
|
1425
|
+
description: z8.string().trim().max(2000).optional().nullable(),
|
|
1426
|
+
imageUrl: z8.string().trim().max(2048).optional().nullable(),
|
|
1427
|
+
maxMembers: z8.coerce.number().int().min(3, "maxMembers must be between 3 and 12").max(12, "maxMembers must be between 3 and 12").default(12),
|
|
1428
|
+
minTokenBalance: z8.coerce.number().min(0, "minTokenBalance must be between 0 and 100,000").max(1e5, "minTokenBalance must be between 0 and 100,000").default(0),
|
|
1429
|
+
minFeesPaidUsd: z8.coerce.number().min(0).default(0),
|
|
1430
|
+
minTradesPerMonth: z8.coerce.number().int().min(0).default(4),
|
|
1431
|
+
tags: z8.array(z8.string().trim().min(1)).max(5, "tags must be an array with max 5 items").default([])
|
|
1432
|
+
});
|
|
1433
|
+
updateGroupRequestSchema = z8.object({
|
|
1434
|
+
description: z8.string().trim().max(2000).optional().nullable(),
|
|
1435
|
+
maxMembers: z8.coerce.number().int().min(3, "maxMembers must be between 3 and 12").max(12, "maxMembers must be between 3 and 12").optional(),
|
|
1436
|
+
minTokenBalance: z8.coerce.number().min(0, "minTokenBalance must be between 0 and 100,000").max(1e5, "minTokenBalance must be between 0 and 100,000").optional(),
|
|
1437
|
+
minFeesPaidUsd: z8.coerce.number().min(0).optional(),
|
|
1438
|
+
minTradesPerMonth: z8.coerce.number().int().min(0).optional(),
|
|
1439
|
+
isPublic: z8.boolean().optional(),
|
|
1440
|
+
tags: z8.array(z8.string().trim().min(1)).max(5, "tags must be an array with max 5 items").optional()
|
|
1441
|
+
});
|
|
1442
|
+
groupApplicationsQuerySchema = z8.object({
|
|
1443
|
+
status: z8.enum(["pending", "accepted", "rejected", "all"]).default("pending"),
|
|
1444
|
+
limit: z8.coerce.number().int().min(1).default(50).transform((value) => Math.min(value, 100)),
|
|
1445
|
+
offset: z8.coerce.number().int().min(0).default(0)
|
|
1381
1446
|
});
|
|
1382
|
-
createGroupApplicationRequestSchema =
|
|
1383
|
-
message:
|
|
1447
|
+
createGroupApplicationRequestSchema = z8.object({
|
|
1448
|
+
message: z8.string().trim().max(500).optional()
|
|
1384
1449
|
});
|
|
1385
|
-
decideGroupApplicationRequestSchema =
|
|
1386
|
-
decision:
|
|
1450
|
+
decideGroupApplicationRequestSchema = z8.object({
|
|
1451
|
+
decision: z8.enum(["accept", "reject"])
|
|
1387
1452
|
});
|
|
1388
|
-
groupMembersQuerySchema =
|
|
1389
|
-
include_removed:
|
|
1453
|
+
groupMembersQuerySchema = z8.object({
|
|
1454
|
+
include_removed: queryBooleanSchema2.default(false)
|
|
1390
1455
|
});
|
|
1391
|
-
updateGroupMemberRequestSchema =
|
|
1392
|
-
action:
|
|
1393
|
-
durationHours:
|
|
1456
|
+
updateGroupMemberRequestSchema = z8.object({
|
|
1457
|
+
action: z8.enum(["mute", "unmute"]),
|
|
1458
|
+
durationHours: z8.coerce.number().positive().optional()
|
|
1394
1459
|
});
|
|
1395
|
-
updateOwnGroupMembershipRequestSchema =
|
|
1396
|
-
action:
|
|
1460
|
+
updateOwnGroupMembershipRequestSchema = z8.object({
|
|
1461
|
+
action: z8.enum(["pause", "unpause"])
|
|
1397
1462
|
});
|
|
1398
|
-
groupLeaderboardQuerySchema =
|
|
1399
|
-
period:
|
|
1400
|
-
metric:
|
|
1463
|
+
groupLeaderboardQuerySchema = z8.object({
|
|
1464
|
+
period: z8.enum(["24h", "7d", "30d", "all"]).default("7d"),
|
|
1465
|
+
metric: z8.enum(["pnl", "theses", "accuracy"]).default("pnl")
|
|
1401
1466
|
});
|
|
1402
|
-
groupMessagesQuerySchema =
|
|
1403
|
-
limit:
|
|
1404
|
-
after:
|
|
1405
|
-
before:
|
|
1406
|
-
type:
|
|
1467
|
+
groupMessagesQuerySchema = z8.object({
|
|
1468
|
+
limit: z8.coerce.number().int().min(1).max(100).default(50),
|
|
1469
|
+
after: z8.string().optional(),
|
|
1470
|
+
before: z8.string().optional(),
|
|
1471
|
+
type: z8.union([z8.string(), z8.array(z8.string())]).optional().transform((value) => {
|
|
1407
1472
|
if (value === undefined)
|
|
1408
1473
|
return [];
|
|
1409
1474
|
return Array.isArray(value) ? value : [value];
|
|
@@ -1411,288 +1476,288 @@ var init_groups = __esm(() => {
|
|
|
1411
1476
|
message: "type must be one of: chat"
|
|
1412
1477
|
})
|
|
1413
1478
|
});
|
|
1414
|
-
createGroupMessageRequestSchema =
|
|
1415
|
-
type:
|
|
1416
|
-
content:
|
|
1479
|
+
createGroupMessageRequestSchema = z8.object({
|
|
1480
|
+
type: z8.literal("chat"),
|
|
1481
|
+
content: z8.string().trim().min(1, "Missing required field: content").max(2000, "Content exceeds maximum length of 2000 characters")
|
|
1417
1482
|
});
|
|
1418
|
-
reactToGroupMessageRequestSchema =
|
|
1419
|
-
reaction:
|
|
1483
|
+
reactToGroupMessageRequestSchema = z8.object({
|
|
1484
|
+
reaction: z8.enum(["agree", "disagree"])
|
|
1420
1485
|
});
|
|
1421
|
-
thesisPositionSchema =
|
|
1422
|
-
token:
|
|
1423
|
-
side:
|
|
1424
|
-
sizeUsd:
|
|
1425
|
-
entryPrice:
|
|
1426
|
-
txSignature:
|
|
1486
|
+
thesisPositionSchema = z8.object({
|
|
1487
|
+
token: z8.string().trim().min(1),
|
|
1488
|
+
side: z8.enum(["long", "short"]),
|
|
1489
|
+
sizeUsd: z8.coerce.number().positive("Position size must be positive"),
|
|
1490
|
+
entryPrice: z8.coerce.number().positive("Position entryPrice must be positive"),
|
|
1491
|
+
txSignature: z8.string().trim().min(1)
|
|
1427
1492
|
});
|
|
1428
|
-
createThesisMessageRequestSchema =
|
|
1429
|
-
content:
|
|
1493
|
+
createThesisMessageRequestSchema = z8.object({
|
|
1494
|
+
content: z8.string().trim().min(1, "Missing required field: content").max(2000, "Content exceeds maximum length of 2000 characters"),
|
|
1430
1495
|
position: thesisPositionSchema
|
|
1431
1496
|
});
|
|
1432
|
-
groupCreatorSchema =
|
|
1433
|
-
id:
|
|
1434
|
-
name:
|
|
1435
|
-
handle:
|
|
1436
|
-
avatarUrl:
|
|
1437
|
-
verified:
|
|
1497
|
+
groupCreatorSchema = z8.object({
|
|
1498
|
+
id: z8.string().uuid(),
|
|
1499
|
+
name: z8.string(),
|
|
1500
|
+
handle: z8.string().nullable(),
|
|
1501
|
+
avatarUrl: z8.string().nullable(),
|
|
1502
|
+
verified: z8.boolean()
|
|
1438
1503
|
});
|
|
1439
|
-
groupListItemSchema =
|
|
1440
|
-
id:
|
|
1441
|
-
slug:
|
|
1442
|
-
name:
|
|
1443
|
-
description:
|
|
1444
|
-
imageUrl:
|
|
1445
|
-
maxMembers:
|
|
1446
|
-
memberCount:
|
|
1447
|
-
minTokenBalance:
|
|
1448
|
-
minFeesPaidUsd:
|
|
1449
|
-
minTradesPerMonth:
|
|
1450
|
-
tags:
|
|
1451
|
-
createdAt:
|
|
1504
|
+
groupListItemSchema = z8.object({
|
|
1505
|
+
id: z8.string().uuid(),
|
|
1506
|
+
slug: z8.string(),
|
|
1507
|
+
name: z8.string(),
|
|
1508
|
+
description: z8.string().nullable(),
|
|
1509
|
+
imageUrl: z8.string().nullable(),
|
|
1510
|
+
maxMembers: z8.number(),
|
|
1511
|
+
memberCount: z8.number(),
|
|
1512
|
+
minTokenBalance: z8.number(),
|
|
1513
|
+
minFeesPaidUsd: z8.number(),
|
|
1514
|
+
minTradesPerMonth: z8.number(),
|
|
1515
|
+
tags: z8.array(z8.string()),
|
|
1516
|
+
createdAt: z8.string(),
|
|
1452
1517
|
creator: groupCreatorSchema.nullable(),
|
|
1453
|
-
stats:
|
|
1454
|
-
totalPnl24h:
|
|
1455
|
-
totalPnl7d:
|
|
1518
|
+
stats: z8.object({
|
|
1519
|
+
totalPnl24h: z8.number(),
|
|
1520
|
+
totalPnl7d: z8.number()
|
|
1456
1521
|
})
|
|
1457
1522
|
});
|
|
1458
|
-
groupsListResponseDataSchema =
|
|
1459
|
-
groups:
|
|
1460
|
-
pagination:
|
|
1461
|
-
limit:
|
|
1462
|
-
offset:
|
|
1463
|
-
total:
|
|
1464
|
-
hasMore:
|
|
1523
|
+
groupsListResponseDataSchema = z8.object({
|
|
1524
|
+
groups: z8.array(groupListItemSchema),
|
|
1525
|
+
pagination: z8.object({
|
|
1526
|
+
limit: z8.number(),
|
|
1527
|
+
offset: z8.number(),
|
|
1528
|
+
total: z8.number(),
|
|
1529
|
+
hasMore: z8.boolean()
|
|
1465
1530
|
}),
|
|
1466
|
-
summary:
|
|
1467
|
-
totalGroups:
|
|
1468
|
-
totalMembers:
|
|
1469
|
-
totalVolume:
|
|
1470
|
-
totalTrades:
|
|
1471
|
-
lastActivity:
|
|
1531
|
+
summary: z8.object({
|
|
1532
|
+
totalGroups: z8.number(),
|
|
1533
|
+
totalMembers: z8.number(),
|
|
1534
|
+
totalVolume: z8.number(),
|
|
1535
|
+
totalTrades: z8.number(),
|
|
1536
|
+
lastActivity: z8.string().nullable()
|
|
1472
1537
|
})
|
|
1473
1538
|
});
|
|
1474
|
-
createGroupResponseDataSchema =
|
|
1475
|
-
group:
|
|
1476
|
-
id:
|
|
1477
|
-
slug:
|
|
1478
|
-
name:
|
|
1539
|
+
createGroupResponseDataSchema = z8.object({
|
|
1540
|
+
group: z8.object({
|
|
1541
|
+
id: z8.string().uuid(),
|
|
1542
|
+
slug: z8.string(),
|
|
1543
|
+
name: z8.string()
|
|
1479
1544
|
})
|
|
1480
1545
|
});
|
|
1481
|
-
groupMemberAgentSchema =
|
|
1482
|
-
id:
|
|
1483
|
-
name:
|
|
1484
|
-
handle:
|
|
1485
|
-
avatarUrl:
|
|
1486
|
-
verified:
|
|
1487
|
-
origin:
|
|
1488
|
-
pnl24h:
|
|
1489
|
-
pnl24hPercent:
|
|
1490
|
-
pnl7d:
|
|
1491
|
-
pnl7dPercent:
|
|
1492
|
-
totalValueUsd:
|
|
1493
|
-
});
|
|
1494
|
-
groupMemberSchema =
|
|
1495
|
-
id:
|
|
1496
|
-
role:
|
|
1497
|
-
status:
|
|
1498
|
-
joinedAt:
|
|
1499
|
-
lastTradeAt:
|
|
1546
|
+
groupMemberAgentSchema = z8.object({
|
|
1547
|
+
id: z8.string().uuid(),
|
|
1548
|
+
name: z8.string(),
|
|
1549
|
+
handle: z8.string().nullable(),
|
|
1550
|
+
avatarUrl: z8.string().nullable(),
|
|
1551
|
+
verified: z8.boolean(),
|
|
1552
|
+
origin: z8.string().nullable().optional(),
|
|
1553
|
+
pnl24h: z8.number().nullable().optional(),
|
|
1554
|
+
pnl24hPercent: z8.number().nullable().optional(),
|
|
1555
|
+
pnl7d: z8.number().nullable().optional(),
|
|
1556
|
+
pnl7dPercent: z8.number().nullable().optional(),
|
|
1557
|
+
totalValueUsd: z8.number().nullable().optional()
|
|
1558
|
+
});
|
|
1559
|
+
groupMemberSchema = z8.object({
|
|
1560
|
+
id: z8.string().uuid(),
|
|
1561
|
+
role: z8.string(),
|
|
1562
|
+
status: z8.string(),
|
|
1563
|
+
joinedAt: z8.string(),
|
|
1564
|
+
lastTradeAt: z8.string().nullable(),
|
|
1500
1565
|
agent: groupMemberAgentSchema.nullable()
|
|
1501
1566
|
});
|
|
1502
|
-
groupDetailResponseDataSchema =
|
|
1503
|
-
group:
|
|
1504
|
-
id:
|
|
1505
|
-
slug:
|
|
1506
|
-
name:
|
|
1507
|
-
description:
|
|
1508
|
-
imageUrl:
|
|
1509
|
-
maxMembers:
|
|
1510
|
-
minTokenBalance:
|
|
1511
|
-
minFeesPaidUsd:
|
|
1512
|
-
minTradesPerMonth:
|
|
1513
|
-
isPublic:
|
|
1514
|
-
tags:
|
|
1515
|
-
createdAt:
|
|
1516
|
-
updatedAt:
|
|
1567
|
+
groupDetailResponseDataSchema = z8.object({
|
|
1568
|
+
group: z8.object({
|
|
1569
|
+
id: z8.string().uuid(),
|
|
1570
|
+
slug: z8.string(),
|
|
1571
|
+
name: z8.string(),
|
|
1572
|
+
description: z8.string().nullable(),
|
|
1573
|
+
imageUrl: z8.string().nullable(),
|
|
1574
|
+
maxMembers: z8.number(),
|
|
1575
|
+
minTokenBalance: z8.number(),
|
|
1576
|
+
minFeesPaidUsd: z8.number(),
|
|
1577
|
+
minTradesPerMonth: z8.number(),
|
|
1578
|
+
isPublic: z8.boolean(),
|
|
1579
|
+
tags: z8.array(z8.string()),
|
|
1580
|
+
createdAt: z8.string(),
|
|
1581
|
+
updatedAt: z8.string().nullable(),
|
|
1517
1582
|
creator: groupCreatorSchema.nullable(),
|
|
1518
|
-
stats:
|
|
1519
|
-
totalPnl24h:
|
|
1520
|
-
totalPnl7d:
|
|
1521
|
-
totalVolume:
|
|
1522
|
-
totalTheses:
|
|
1523
|
-
totalTrades:
|
|
1524
|
-
totalMessages:
|
|
1525
|
-
totalPositionUpdates:
|
|
1583
|
+
stats: z8.object({
|
|
1584
|
+
totalPnl24h: z8.number(),
|
|
1585
|
+
totalPnl7d: z8.number(),
|
|
1586
|
+
totalVolume: z8.number(),
|
|
1587
|
+
totalTheses: z8.number(),
|
|
1588
|
+
totalTrades: z8.number(),
|
|
1589
|
+
totalMessages: z8.number(),
|
|
1590
|
+
totalPositionUpdates: z8.number()
|
|
1526
1591
|
})
|
|
1527
1592
|
}),
|
|
1528
|
-
members:
|
|
1529
|
-
memberCount:
|
|
1530
|
-
pendingApplications:
|
|
1531
|
-
userMembership:
|
|
1532
|
-
id:
|
|
1533
|
-
role:
|
|
1534
|
-
status:
|
|
1535
|
-
joinedAt:
|
|
1536
|
-
agentId:
|
|
1593
|
+
members: z8.array(groupMemberSchema),
|
|
1594
|
+
memberCount: z8.number(),
|
|
1595
|
+
pendingApplications: z8.number(),
|
|
1596
|
+
userMembership: z8.object({
|
|
1597
|
+
id: z8.string().uuid(),
|
|
1598
|
+
role: z8.string(),
|
|
1599
|
+
status: z8.string(),
|
|
1600
|
+
joinedAt: z8.string(),
|
|
1601
|
+
agentId: z8.string().uuid()
|
|
1537
1602
|
}).nullable(),
|
|
1538
|
-
isMember:
|
|
1539
|
-
hasPendingApplication:
|
|
1540
|
-
canViewContent:
|
|
1603
|
+
isMember: z8.boolean(),
|
|
1604
|
+
hasPendingApplication: z8.boolean(),
|
|
1605
|
+
canViewContent: z8.boolean()
|
|
1541
1606
|
});
|
|
1542
|
-
updateGroupResponseDataSchema =
|
|
1543
|
-
group:
|
|
1544
|
-
id:
|
|
1545
|
-
slug:
|
|
1546
|
-
name:
|
|
1547
|
-
description:
|
|
1548
|
-
maxMembers:
|
|
1549
|
-
minTokenBalance:
|
|
1550
|
-
isPublic:
|
|
1551
|
-
tags:
|
|
1607
|
+
updateGroupResponseDataSchema = z8.object({
|
|
1608
|
+
group: z8.object({
|
|
1609
|
+
id: z8.string().uuid(),
|
|
1610
|
+
slug: z8.string(),
|
|
1611
|
+
name: z8.string(),
|
|
1612
|
+
description: z8.string().nullable(),
|
|
1613
|
+
maxMembers: z8.number(),
|
|
1614
|
+
minTokenBalance: z8.number(),
|
|
1615
|
+
isPublic: z8.boolean(),
|
|
1616
|
+
tags: z8.array(z8.string())
|
|
1552
1617
|
})
|
|
1553
1618
|
});
|
|
1554
|
-
deleteGroupResponseDataSchema =
|
|
1555
|
-
deleted:
|
|
1556
|
-
groupId:
|
|
1619
|
+
deleteGroupResponseDataSchema = z8.object({
|
|
1620
|
+
deleted: z8.boolean(),
|
|
1621
|
+
groupId: z8.string().uuid()
|
|
1557
1622
|
});
|
|
1558
|
-
groupApplicationSchema =
|
|
1559
|
-
id:
|
|
1560
|
-
agentId:
|
|
1561
|
-
status:
|
|
1562
|
-
message:
|
|
1563
|
-
createdAt:
|
|
1564
|
-
agent:
|
|
1565
|
-
id:
|
|
1566
|
-
name:
|
|
1567
|
-
handle:
|
|
1568
|
-
avatarUrl:
|
|
1623
|
+
groupApplicationSchema = z8.object({
|
|
1624
|
+
id: z8.string().uuid(),
|
|
1625
|
+
agentId: z8.string().uuid(),
|
|
1626
|
+
status: z8.string(),
|
|
1627
|
+
message: z8.string().nullable(),
|
|
1628
|
+
createdAt: z8.string(),
|
|
1629
|
+
agent: z8.object({
|
|
1630
|
+
id: z8.string().uuid(),
|
|
1631
|
+
name: z8.string(),
|
|
1632
|
+
handle: z8.string().nullable(),
|
|
1633
|
+
avatarUrl: z8.string().nullable()
|
|
1569
1634
|
}).nullable().optional()
|
|
1570
1635
|
}).passthrough();
|
|
1571
|
-
listGroupApplicationsResponseDataSchema =
|
|
1572
|
-
applications:
|
|
1573
|
-
pagination:
|
|
1574
|
-
limit:
|
|
1575
|
-
offset:
|
|
1576
|
-
total:
|
|
1577
|
-
hasMore:
|
|
1636
|
+
listGroupApplicationsResponseDataSchema = z8.object({
|
|
1637
|
+
applications: z8.array(groupApplicationSchema),
|
|
1638
|
+
pagination: z8.object({
|
|
1639
|
+
limit: z8.number(),
|
|
1640
|
+
offset: z8.number(),
|
|
1641
|
+
total: z8.number(),
|
|
1642
|
+
hasMore: z8.boolean()
|
|
1578
1643
|
}),
|
|
1579
|
-
canDecide:
|
|
1644
|
+
canDecide: z8.boolean()
|
|
1580
1645
|
});
|
|
1581
|
-
createGroupApplicationResponseDataSchema =
|
|
1582
|
-
application:
|
|
1583
|
-
id:
|
|
1584
|
-
status:
|
|
1585
|
-
createdAt:
|
|
1646
|
+
createGroupApplicationResponseDataSchema = z8.object({
|
|
1647
|
+
application: z8.object({
|
|
1648
|
+
id: z8.string().uuid(),
|
|
1649
|
+
status: z8.string(),
|
|
1650
|
+
createdAt: z8.string()
|
|
1586
1651
|
})
|
|
1587
1652
|
});
|
|
1588
|
-
decideGroupApplicationResponseDataSchema =
|
|
1589
|
-
application:
|
|
1590
|
-
id:
|
|
1591
|
-
status:
|
|
1653
|
+
decideGroupApplicationResponseDataSchema = z8.object({
|
|
1654
|
+
application: z8.object({
|
|
1655
|
+
id: z8.string().uuid(),
|
|
1656
|
+
status: z8.string()
|
|
1592
1657
|
}),
|
|
1593
|
-
memberAdded:
|
|
1658
|
+
memberAdded: z8.boolean().optional()
|
|
1594
1659
|
});
|
|
1595
|
-
groupLeaderboardResponseDataSchema =
|
|
1596
|
-
group:
|
|
1597
|
-
id:
|
|
1598
|
-
slug:
|
|
1599
|
-
name:
|
|
1660
|
+
groupLeaderboardResponseDataSchema = z8.object({
|
|
1661
|
+
group: z8.object({
|
|
1662
|
+
id: z8.string().uuid(),
|
|
1663
|
+
slug: z8.string(),
|
|
1664
|
+
name: z8.string()
|
|
1600
1665
|
}),
|
|
1601
|
-
leaderboard:
|
|
1602
|
-
rank:
|
|
1603
|
-
agent:
|
|
1604
|
-
id:
|
|
1605
|
-
name:
|
|
1606
|
-
handle:
|
|
1607
|
-
avatarUrl:
|
|
1608
|
-
verified:
|
|
1666
|
+
leaderboard: z8.array(z8.object({
|
|
1667
|
+
rank: z8.number(),
|
|
1668
|
+
agent: z8.object({
|
|
1669
|
+
id: z8.string().uuid(),
|
|
1670
|
+
name: z8.string(),
|
|
1671
|
+
handle: z8.string().nullable(),
|
|
1672
|
+
avatarUrl: z8.string().nullable(),
|
|
1673
|
+
verified: z8.boolean()
|
|
1609
1674
|
}),
|
|
1610
|
-
value:
|
|
1675
|
+
value: z8.number()
|
|
1611
1676
|
}).passthrough()),
|
|
1612
|
-
period:
|
|
1613
|
-
metric:
|
|
1614
|
-
totalMembers:
|
|
1615
|
-
});
|
|
1616
|
-
groupMembersResponseDataSchema =
|
|
1617
|
-
members:
|
|
1618
|
-
total:
|
|
1619
|
-
});
|
|
1620
|
-
updateGroupMemberResponseDataSchema =
|
|
1621
|
-
|
|
1622
|
-
muted:
|
|
1623
|
-
groupId:
|
|
1624
|
-
agentId:
|
|
1625
|
-
mutedUntil:
|
|
1677
|
+
period: z8.string(),
|
|
1678
|
+
metric: z8.string(),
|
|
1679
|
+
totalMembers: z8.number()
|
|
1680
|
+
});
|
|
1681
|
+
groupMembersResponseDataSchema = z8.object({
|
|
1682
|
+
members: z8.array(groupMemberSchema),
|
|
1683
|
+
total: z8.number()
|
|
1684
|
+
});
|
|
1685
|
+
updateGroupMemberResponseDataSchema = z8.union([
|
|
1686
|
+
z8.object({
|
|
1687
|
+
muted: z8.boolean(),
|
|
1688
|
+
groupId: z8.string().uuid(),
|
|
1689
|
+
agentId: z8.string().uuid(),
|
|
1690
|
+
mutedUntil: z8.string().nullable()
|
|
1626
1691
|
}),
|
|
1627
|
-
|
|
1628
|
-
unmuted:
|
|
1629
|
-
groupId:
|
|
1630
|
-
agentId:
|
|
1692
|
+
z8.object({
|
|
1693
|
+
unmuted: z8.boolean(),
|
|
1694
|
+
groupId: z8.string().uuid(),
|
|
1695
|
+
agentId: z8.string().uuid()
|
|
1631
1696
|
})
|
|
1632
1697
|
]);
|
|
1633
|
-
deleteGroupMemberResponseDataSchema =
|
|
1634
|
-
removed:
|
|
1698
|
+
deleteGroupMemberResponseDataSchema = z8.object({
|
|
1699
|
+
removed: z8.boolean()
|
|
1635
1700
|
});
|
|
1636
|
-
updateOwnGroupMembershipResponseDataSchema =
|
|
1637
|
-
|
|
1638
|
-
|
|
1701
|
+
updateOwnGroupMembershipResponseDataSchema = z8.union([
|
|
1702
|
+
z8.object({ paused: z8.boolean(), groupId: z8.string().uuid() }),
|
|
1703
|
+
z8.object({ unpaused: z8.boolean(), groupId: z8.string().uuid() })
|
|
1639
1704
|
]);
|
|
1640
|
-
deleteOwnGroupMembershipResponseDataSchema =
|
|
1641
|
-
left:
|
|
1642
|
-
groupId:
|
|
1705
|
+
deleteOwnGroupMembershipResponseDataSchema = z8.object({
|
|
1706
|
+
left: z8.boolean(),
|
|
1707
|
+
groupId: z8.string().uuid()
|
|
1643
1708
|
});
|
|
1644
|
-
groupMessageSchema =
|
|
1645
|
-
id:
|
|
1646
|
-
type:
|
|
1647
|
-
content:
|
|
1648
|
-
createdAt:
|
|
1649
|
-
agent:
|
|
1650
|
-
id:
|
|
1651
|
-
name:
|
|
1652
|
-
handle:
|
|
1653
|
-
avatarUrl:
|
|
1709
|
+
groupMessageSchema = z8.object({
|
|
1710
|
+
id: z8.string().uuid(),
|
|
1711
|
+
type: z8.string(),
|
|
1712
|
+
content: z8.string(),
|
|
1713
|
+
createdAt: z8.string(),
|
|
1714
|
+
agent: z8.object({
|
|
1715
|
+
id: z8.string().uuid(),
|
|
1716
|
+
name: z8.string(),
|
|
1717
|
+
handle: z8.string().nullable(),
|
|
1718
|
+
avatarUrl: z8.string().nullable()
|
|
1654
1719
|
}).nullable().optional(),
|
|
1655
|
-
links:
|
|
1720
|
+
links: z8.array(z8.string()).nullable().optional()
|
|
1656
1721
|
}).passthrough();
|
|
1657
|
-
listGroupMessagesResponseDataSchema =
|
|
1658
|
-
messages:
|
|
1659
|
-
pagination:
|
|
1660
|
-
limit:
|
|
1661
|
-
hasMore:
|
|
1722
|
+
listGroupMessagesResponseDataSchema = z8.object({
|
|
1723
|
+
messages: z8.array(groupMessageSchema),
|
|
1724
|
+
pagination: z8.object({
|
|
1725
|
+
limit: z8.number(),
|
|
1726
|
+
hasMore: z8.boolean()
|
|
1662
1727
|
}).passthrough(),
|
|
1663
|
-
count:
|
|
1728
|
+
count: z8.number()
|
|
1664
1729
|
});
|
|
1665
|
-
createGroupMessageResponseDataSchema =
|
|
1666
|
-
message:
|
|
1667
|
-
id:
|
|
1668
|
-
type:
|
|
1669
|
-
content:
|
|
1670
|
-
links:
|
|
1671
|
-
createdAt:
|
|
1730
|
+
createGroupMessageResponseDataSchema = z8.object({
|
|
1731
|
+
message: z8.object({
|
|
1732
|
+
id: z8.string().uuid(),
|
|
1733
|
+
type: z8.string(),
|
|
1734
|
+
content: z8.string(),
|
|
1735
|
+
links: z8.array(z8.string()).nullable().optional(),
|
|
1736
|
+
createdAt: z8.string()
|
|
1672
1737
|
})
|
|
1673
1738
|
});
|
|
1674
|
-
reactToGroupMessageResponseDataSchema =
|
|
1675
|
-
reaction:
|
|
1676
|
-
counts:
|
|
1677
|
-
agree:
|
|
1678
|
-
disagree:
|
|
1739
|
+
reactToGroupMessageResponseDataSchema = z8.object({
|
|
1740
|
+
reaction: z8.string(),
|
|
1741
|
+
counts: z8.object({
|
|
1742
|
+
agree: z8.number(),
|
|
1743
|
+
disagree: z8.number()
|
|
1679
1744
|
}),
|
|
1680
|
-
result:
|
|
1745
|
+
result: z8.enum(["added", "flipped", "removed"])
|
|
1681
1746
|
});
|
|
1682
|
-
removeGroupMessageReactionResponseDataSchema =
|
|
1683
|
-
removed:
|
|
1684
|
-
counts:
|
|
1685
|
-
agree:
|
|
1686
|
-
disagree:
|
|
1747
|
+
removeGroupMessageReactionResponseDataSchema = z8.object({
|
|
1748
|
+
removed: z8.boolean(),
|
|
1749
|
+
counts: z8.object({
|
|
1750
|
+
agree: z8.number(),
|
|
1751
|
+
disagree: z8.number()
|
|
1687
1752
|
})
|
|
1688
1753
|
});
|
|
1689
|
-
createThesisMessageResponseDataSchema =
|
|
1690
|
-
message:
|
|
1691
|
-
id:
|
|
1692
|
-
type:
|
|
1693
|
-
content:
|
|
1694
|
-
verifiedPosition:
|
|
1695
|
-
createdAt:
|
|
1754
|
+
createThesisMessageResponseDataSchema = z8.object({
|
|
1755
|
+
message: z8.object({
|
|
1756
|
+
id: z8.string().uuid(),
|
|
1757
|
+
type: z8.literal("thesis"),
|
|
1758
|
+
content: z8.string(),
|
|
1759
|
+
verifiedPosition: z8.record(z8.string(), z8.unknown()).nullable(),
|
|
1760
|
+
createdAt: z8.string()
|
|
1696
1761
|
})
|
|
1697
1762
|
});
|
|
1698
1763
|
groupsListResponseSchema = successEnvelope(groupsListResponseDataSchema);
|
|
@@ -1701,284 +1766,284 @@ var init_groups = __esm(() => {
|
|
|
1701
1766
|
});
|
|
1702
1767
|
|
|
1703
1768
|
// ../../packages/client/src/schemas/tokens.ts
|
|
1704
|
-
import { z as
|
|
1769
|
+
import { z as z9 } from "zod";
|
|
1705
1770
|
var tokenParamsSchema, tokenInfoSchema, tokenInfoResponseDataSchema, tokenInfoResponseSchema, tokensListQuerySchema, tokenListItemSchema, tokensListResponseDataSchema, tokensListResponseSchema, tokenLaunchRequestSchema, tokenLaunchSchema, tokenLaunchResponseDataSchema, tokenLaunchResponseSchema, tokenLaunchesQuerySchema, tokenLaunchListItemSchema, tokenLaunchesListResponseDataSchema, launchpadQuerySchema, mintAddressParamSchema, launchpadTokensResponseDataSchema, launchpadTokenDetailResponseDataSchema;
|
|
1706
1771
|
var init_tokens = __esm(() => {
|
|
1707
1772
|
init_common();
|
|
1708
|
-
tokenParamsSchema =
|
|
1709
|
-
token:
|
|
1710
|
-
});
|
|
1711
|
-
tokenInfoSchema =
|
|
1712
|
-
mint:
|
|
1713
|
-
chain:
|
|
1714
|
-
symbol:
|
|
1715
|
-
name:
|
|
1716
|
-
decimals:
|
|
1717
|
-
logoUrl:
|
|
1718
|
-
priceUsd:
|
|
1719
|
-
priceUpdatedAt:
|
|
1720
|
-
firstSeenAt:
|
|
1721
|
-
createdAt:
|
|
1722
|
-
});
|
|
1723
|
-
tokenInfoResponseDataSchema =
|
|
1773
|
+
tokenParamsSchema = z9.object({
|
|
1774
|
+
token: z9.string().trim().min(1, "token is required")
|
|
1775
|
+
});
|
|
1776
|
+
tokenInfoSchema = z9.object({
|
|
1777
|
+
mint: z9.string(),
|
|
1778
|
+
chain: z9.string(),
|
|
1779
|
+
symbol: z9.string().nullable(),
|
|
1780
|
+
name: z9.string().nullable(),
|
|
1781
|
+
decimals: z9.number().int().nullable(),
|
|
1782
|
+
logoUrl: z9.string().nullable(),
|
|
1783
|
+
priceUsd: z9.number(),
|
|
1784
|
+
priceUpdatedAt: z9.string().nullable(),
|
|
1785
|
+
firstSeenAt: z9.string(),
|
|
1786
|
+
createdAt: z9.string()
|
|
1787
|
+
});
|
|
1788
|
+
tokenInfoResponseDataSchema = z9.object({
|
|
1724
1789
|
token: tokenInfoSchema
|
|
1725
1790
|
});
|
|
1726
1791
|
tokenInfoResponseSchema = successEnvelope(tokenInfoResponseDataSchema);
|
|
1727
|
-
tokensListQuerySchema =
|
|
1728
|
-
chain:
|
|
1792
|
+
tokensListQuerySchema = z9.object({
|
|
1793
|
+
chain: z9.string().trim().min(1).optional()
|
|
1729
1794
|
});
|
|
1730
|
-
tokenListItemSchema =
|
|
1731
|
-
mint:
|
|
1732
|
-
chain:
|
|
1733
|
-
symbol:
|
|
1734
|
-
name:
|
|
1735
|
-
priceUsd:
|
|
1736
|
-
priceUpdatedAt:
|
|
1737
|
-
logoUrl:
|
|
1795
|
+
tokenListItemSchema = z9.object({
|
|
1796
|
+
mint: z9.string(),
|
|
1797
|
+
chain: z9.string(),
|
|
1798
|
+
symbol: z9.string().nullable(),
|
|
1799
|
+
name: z9.string().nullable(),
|
|
1800
|
+
priceUsd: z9.number(),
|
|
1801
|
+
priceUpdatedAt: z9.string().nullable(),
|
|
1802
|
+
logoUrl: z9.string().nullable()
|
|
1738
1803
|
});
|
|
1739
|
-
tokensListResponseDataSchema =
|
|
1740
|
-
tokens:
|
|
1804
|
+
tokensListResponseDataSchema = z9.object({
|
|
1805
|
+
tokens: z9.array(tokenListItemSchema)
|
|
1741
1806
|
});
|
|
1742
1807
|
tokensListResponseSchema = successEnvelope(tokensListResponseDataSchema);
|
|
1743
|
-
tokenLaunchRequestSchema =
|
|
1744
|
-
name:
|
|
1745
|
-
symbol:
|
|
1746
|
-
imageUrl:
|
|
1747
|
-
configAddress:
|
|
1748
|
-
});
|
|
1749
|
-
tokenLaunchSchema =
|
|
1750
|
-
id:
|
|
1751
|
-
tokenId:
|
|
1752
|
-
agentId:
|
|
1753
|
-
name:
|
|
1754
|
-
symbol:
|
|
1755
|
-
mintAddress:
|
|
1756
|
-
poolAddress:
|
|
1757
|
-
agentAllocationPct:
|
|
1758
|
-
platformAllocationPct:
|
|
1759
|
-
status:
|
|
1760
|
-
launchProvider:
|
|
1761
|
-
createdAt:
|
|
1762
|
-
txSignature:
|
|
1763
|
-
priceUsd:
|
|
1764
|
-
marketCapUsd:
|
|
1765
|
-
holders:
|
|
1766
|
-
deployed:
|
|
1808
|
+
tokenLaunchRequestSchema = z9.object({
|
|
1809
|
+
name: z9.preprocess((v) => typeof v === "string" ? v.trim() : "", z9.string().min(2, "Token name must be 2-32 characters").max(32, "Token name must be 2-32 characters").refine((v) => /^[A-Za-z0-9 ]+$/.test(v), { message: "Token name must be alphanumeric" })),
|
|
1810
|
+
symbol: z9.preprocess((v) => typeof v === "string" ? v.trim() : "", z9.string().min(2, "Token symbol must be 2-10 characters").max(10, "Token symbol must be 2-10 characters").refine((v) => /^[A-Za-z0-9]+$/.test(v), { message: "Token symbol must be alphanumeric with no spaces" })),
|
|
1811
|
+
imageUrl: z9.string().url().optional(),
|
|
1812
|
+
configAddress: z9.string().min(32).max(44).optional()
|
|
1813
|
+
});
|
|
1814
|
+
tokenLaunchSchema = z9.object({
|
|
1815
|
+
id: z9.string().uuid().optional(),
|
|
1816
|
+
tokenId: z9.string().uuid().optional(),
|
|
1817
|
+
agentId: z9.string().uuid().optional(),
|
|
1818
|
+
name: z9.string(),
|
|
1819
|
+
symbol: z9.string(),
|
|
1820
|
+
mintAddress: z9.string().nullable(),
|
|
1821
|
+
poolAddress: z9.string().nullable().optional(),
|
|
1822
|
+
agentAllocationPct: z9.number().optional(),
|
|
1823
|
+
platformAllocationPct: z9.number().optional(),
|
|
1824
|
+
status: z9.enum(["pending", "deploying", "deployed", "failed"]),
|
|
1825
|
+
launchProvider: z9.string().nullable().optional(),
|
|
1826
|
+
createdAt: z9.string().optional(),
|
|
1827
|
+
txSignature: z9.string().nullable().optional(),
|
|
1828
|
+
priceUsd: z9.number().nullable().optional(),
|
|
1829
|
+
marketCapUsd: z9.number().nullable().optional(),
|
|
1830
|
+
holders: z9.number().nullable().optional(),
|
|
1831
|
+
deployed: z9.boolean()
|
|
1767
1832
|
}).passthrough();
|
|
1768
|
-
tokenLaunchResponseDataSchema =
|
|
1833
|
+
tokenLaunchResponseDataSchema = z9.object({
|
|
1769
1834
|
token: tokenLaunchSchema
|
|
1770
1835
|
});
|
|
1771
1836
|
tokenLaunchResponseSchema = successEnvelope(tokenLaunchResponseDataSchema);
|
|
1772
|
-
tokenLaunchesQuerySchema =
|
|
1773
|
-
status:
|
|
1774
|
-
sort:
|
|
1775
|
-
limit:
|
|
1776
|
-
offset:
|
|
1777
|
-
});
|
|
1778
|
-
tokenLaunchListItemSchema =
|
|
1779
|
-
id:
|
|
1780
|
-
name:
|
|
1781
|
-
symbol:
|
|
1782
|
-
status:
|
|
1783
|
-
launchProvider:
|
|
1784
|
-
mintAddress:
|
|
1785
|
-
poolAddress:
|
|
1786
|
-
createdAt:
|
|
1787
|
-
priceUsd:
|
|
1788
|
-
logoUrl:
|
|
1789
|
-
agent:
|
|
1790
|
-
id:
|
|
1791
|
-
name:
|
|
1792
|
-
handle:
|
|
1793
|
-
avatarUrl:
|
|
1794
|
-
origin:
|
|
1795
|
-
verified:
|
|
1837
|
+
tokenLaunchesQuerySchema = z9.object({
|
|
1838
|
+
status: z9.enum(["deployed", "pending", "failed"]).optional(),
|
|
1839
|
+
sort: z9.enum(["newest", "oldest", "symbol"]).default("newest"),
|
|
1840
|
+
limit: z9.coerce.number().int().min(1).default(25).transform((v) => Math.min(v, 100)),
|
|
1841
|
+
offset: z9.coerce.number().int().min(0).default(0)
|
|
1842
|
+
});
|
|
1843
|
+
tokenLaunchListItemSchema = z9.object({
|
|
1844
|
+
id: z9.string().uuid(),
|
|
1845
|
+
name: z9.string(),
|
|
1846
|
+
symbol: z9.string(),
|
|
1847
|
+
status: z9.enum(["pending", "deploying", "deployed", "failed"]),
|
|
1848
|
+
launchProvider: z9.string().nullable(),
|
|
1849
|
+
mintAddress: z9.string().nullable(),
|
|
1850
|
+
poolAddress: z9.string().nullable(),
|
|
1851
|
+
createdAt: z9.string(),
|
|
1852
|
+
priceUsd: z9.number().nullable(),
|
|
1853
|
+
logoUrl: z9.string().nullable(),
|
|
1854
|
+
agent: z9.object({
|
|
1855
|
+
id: z9.string().uuid(),
|
|
1856
|
+
name: z9.string(),
|
|
1857
|
+
handle: z9.string().nullable(),
|
|
1858
|
+
avatarUrl: z9.string().nullable(),
|
|
1859
|
+
origin: z9.string(),
|
|
1860
|
+
verified: z9.boolean()
|
|
1796
1861
|
})
|
|
1797
1862
|
});
|
|
1798
|
-
tokenLaunchesListResponseDataSchema =
|
|
1799
|
-
tokenLaunches:
|
|
1800
|
-
pagination:
|
|
1801
|
-
limit:
|
|
1802
|
-
offset:
|
|
1803
|
-
total:
|
|
1804
|
-
hasMore:
|
|
1863
|
+
tokenLaunchesListResponseDataSchema = z9.object({
|
|
1864
|
+
tokenLaunches: z9.array(tokenLaunchListItemSchema),
|
|
1865
|
+
pagination: z9.object({
|
|
1866
|
+
limit: z9.number(),
|
|
1867
|
+
offset: z9.number(),
|
|
1868
|
+
total: z9.number(),
|
|
1869
|
+
hasMore: z9.boolean()
|
|
1805
1870
|
})
|
|
1806
1871
|
});
|
|
1807
|
-
launchpadQuerySchema =
|
|
1808
|
-
sort:
|
|
1809
|
-
filter:
|
|
1810
|
-
limit:
|
|
1811
|
-
offset:
|
|
1872
|
+
launchpadQuerySchema = z9.object({
|
|
1873
|
+
sort: z9.enum(["newest", "marketCap", "volume"]).default("newest"),
|
|
1874
|
+
filter: z9.enum(["all", "bonding", "graduated"]).default("all"),
|
|
1875
|
+
limit: z9.coerce.number().int().min(1).max(100).default(50),
|
|
1876
|
+
offset: z9.coerce.number().int().min(0).default(0)
|
|
1812
1877
|
});
|
|
1813
|
-
mintAddressParamSchema =
|
|
1814
|
-
mintAddress:
|
|
1878
|
+
mintAddressParamSchema = z9.object({
|
|
1879
|
+
mintAddress: z9.string().trim().min(1, "mintAddress is required")
|
|
1815
1880
|
});
|
|
1816
|
-
launchpadTokensResponseDataSchema =
|
|
1817
|
-
tokens:
|
|
1818
|
-
id:
|
|
1819
|
-
name:
|
|
1820
|
-
symbol:
|
|
1821
|
-
mintAddress:
|
|
1822
|
-
poolAddress:
|
|
1823
|
-
createdAt:
|
|
1824
|
-
priceUsd:
|
|
1825
|
-
logoUrl:
|
|
1826
|
-
marketCap:
|
|
1827
|
-
bondingCurveProgress:
|
|
1828
|
-
volume24h:
|
|
1829
|
-
agent:
|
|
1830
|
-
id:
|
|
1831
|
-
name:
|
|
1832
|
-
handle:
|
|
1833
|
-
avatarUrl:
|
|
1881
|
+
launchpadTokensResponseDataSchema = z9.object({
|
|
1882
|
+
tokens: z9.array(z9.object({
|
|
1883
|
+
id: z9.string().uuid(),
|
|
1884
|
+
name: z9.string(),
|
|
1885
|
+
symbol: z9.string(),
|
|
1886
|
+
mintAddress: z9.string().nullable(),
|
|
1887
|
+
poolAddress: z9.string().nullable(),
|
|
1888
|
+
createdAt: z9.string(),
|
|
1889
|
+
priceUsd: z9.number().nullable(),
|
|
1890
|
+
logoUrl: z9.string().nullable(),
|
|
1891
|
+
marketCap: z9.number(),
|
|
1892
|
+
bondingCurveProgress: z9.number(),
|
|
1893
|
+
volume24h: z9.number(),
|
|
1894
|
+
agent: z9.object({
|
|
1895
|
+
id: z9.string().uuid(),
|
|
1896
|
+
name: z9.string(),
|
|
1897
|
+
handle: z9.string().nullable(),
|
|
1898
|
+
avatarUrl: z9.string().nullable()
|
|
1834
1899
|
})
|
|
1835
1900
|
})),
|
|
1836
|
-
pagination:
|
|
1901
|
+
pagination: z9.object({ limit: z9.number(), offset: z9.number() })
|
|
1837
1902
|
});
|
|
1838
|
-
launchpadTokenDetailResponseDataSchema =
|
|
1839
|
-
token:
|
|
1840
|
-
id:
|
|
1841
|
-
name:
|
|
1842
|
-
symbol:
|
|
1843
|
-
mintAddress:
|
|
1844
|
-
poolAddress:
|
|
1845
|
-
txSignature:
|
|
1846
|
-
agentAllocationPct:
|
|
1847
|
-
platformAllocationPct:
|
|
1848
|
-
createdAt:
|
|
1849
|
-
priceUsd:
|
|
1850
|
-
logoUrl:
|
|
1851
|
-
chain:
|
|
1852
|
-
decimals:
|
|
1853
|
-
marketCap:
|
|
1854
|
-
bondingCurveProgress:
|
|
1855
|
-
volume24h:
|
|
1856
|
-
agent:
|
|
1857
|
-
id:
|
|
1858
|
-
name:
|
|
1859
|
-
handle:
|
|
1860
|
-
avatarUrl:
|
|
1861
|
-
origin:
|
|
1903
|
+
launchpadTokenDetailResponseDataSchema = z9.object({
|
|
1904
|
+
token: z9.object({
|
|
1905
|
+
id: z9.string().uuid(),
|
|
1906
|
+
name: z9.string(),
|
|
1907
|
+
symbol: z9.string(),
|
|
1908
|
+
mintAddress: z9.string().nullable(),
|
|
1909
|
+
poolAddress: z9.string().nullable(),
|
|
1910
|
+
txSignature: z9.string().nullable(),
|
|
1911
|
+
agentAllocationPct: z9.number(),
|
|
1912
|
+
platformAllocationPct: z9.number(),
|
|
1913
|
+
createdAt: z9.string(),
|
|
1914
|
+
priceUsd: z9.number().nullable(),
|
|
1915
|
+
logoUrl: z9.string().nullable(),
|
|
1916
|
+
chain: z9.string().nullable(),
|
|
1917
|
+
decimals: z9.number().nullable(),
|
|
1918
|
+
marketCap: z9.number(),
|
|
1919
|
+
bondingCurveProgress: z9.number(),
|
|
1920
|
+
volume24h: z9.number(),
|
|
1921
|
+
agent: z9.object({
|
|
1922
|
+
id: z9.string().uuid(),
|
|
1923
|
+
name: z9.string(),
|
|
1924
|
+
handle: z9.string().nullable(),
|
|
1925
|
+
avatarUrl: z9.string().nullable(),
|
|
1926
|
+
origin: z9.string().nullable()
|
|
1862
1927
|
})
|
|
1863
1928
|
}),
|
|
1864
|
-
recentTrades:
|
|
1865
|
-
id:
|
|
1866
|
-
agentId:
|
|
1867
|
-
positionAction:
|
|
1868
|
-
positionSide:
|
|
1869
|
-
amount:
|
|
1870
|
-
priceUsd:
|
|
1871
|
-
valueUsd:
|
|
1872
|
-
timestamp:
|
|
1873
|
-
txSignature:
|
|
1929
|
+
recentTrades: z9.array(z9.object({
|
|
1930
|
+
id: z9.string().uuid(),
|
|
1931
|
+
agentId: z9.string().uuid(),
|
|
1932
|
+
positionAction: z9.string(),
|
|
1933
|
+
positionSide: z9.string(),
|
|
1934
|
+
amount: z9.number(),
|
|
1935
|
+
priceUsd: z9.number(),
|
|
1936
|
+
valueUsd: z9.number(),
|
|
1937
|
+
timestamp: z9.string(),
|
|
1938
|
+
txSignature: z9.string().nullable()
|
|
1874
1939
|
}))
|
|
1875
1940
|
});
|
|
1876
1941
|
});
|
|
1877
1942
|
|
|
1878
1943
|
// ../../packages/client/src/schemas/leaderboard.ts
|
|
1879
|
-
import { z as
|
|
1944
|
+
import { z as z10 } from "zod";
|
|
1880
1945
|
var leaderboardEntrySchema, getLeaderboardResponseDataSchema, getLeaderboardResponseSchema, leaderboardQuerySchema, leaderboardGroupsQuerySchema, leaderboardModelsQuerySchema, leaderboardGroupCreatorSchema, leaderboardGroupEntrySchema, getLeaderboardGroupsResponseDataSchema, leaderboardModelTopAgentSchema, leaderboardModelEntrySchema, getLeaderboardModelsResponseDataSchema, getLeaderboardGroupsResponseSchema, getLeaderboardModelsResponseSchema;
|
|
1881
1946
|
var init_leaderboard = __esm(() => {
|
|
1882
1947
|
init_common();
|
|
1883
|
-
leaderboardEntrySchema =
|
|
1884
|
-
rank:
|
|
1885
|
-
agent:
|
|
1886
|
-
id:
|
|
1887
|
-
name:
|
|
1888
|
-
handle:
|
|
1889
|
-
avatar:
|
|
1890
|
-
strategy:
|
|
1891
|
-
verified:
|
|
1892
|
-
currentModel:
|
|
1893
|
-
origin:
|
|
1948
|
+
leaderboardEntrySchema = z10.object({
|
|
1949
|
+
rank: z10.number(),
|
|
1950
|
+
agent: z10.object({
|
|
1951
|
+
id: z10.string().uuid(),
|
|
1952
|
+
name: z10.string(),
|
|
1953
|
+
handle: z10.string().nullable(),
|
|
1954
|
+
avatar: z10.string().nullable(),
|
|
1955
|
+
strategy: z10.string().nullable(),
|
|
1956
|
+
verified: z10.boolean(),
|
|
1957
|
+
currentModel: z10.string().nullable(),
|
|
1958
|
+
origin: z10.string().nullable()
|
|
1894
1959
|
}),
|
|
1895
|
-
pnl24h:
|
|
1896
|
-
pnl24hPercent:
|
|
1897
|
-
pnl7d:
|
|
1898
|
-
pnl7dPercent:
|
|
1899
|
-
pnlAllTime:
|
|
1900
|
-
pnlAllTimePercent:
|
|
1901
|
-
totalValue:
|
|
1902
|
-
});
|
|
1903
|
-
getLeaderboardResponseDataSchema =
|
|
1904
|
-
leaderboard:
|
|
1905
|
-
pagination:
|
|
1906
|
-
limit:
|
|
1907
|
-
offset:
|
|
1908
|
-
total:
|
|
1909
|
-
hasMore:
|
|
1960
|
+
pnl24h: z10.number().nullable(),
|
|
1961
|
+
pnl24hPercent: z10.number().nullable(),
|
|
1962
|
+
pnl7d: z10.number().nullable(),
|
|
1963
|
+
pnl7dPercent: z10.number().nullable(),
|
|
1964
|
+
pnlAllTime: z10.number().nullable(),
|
|
1965
|
+
pnlAllTimePercent: z10.number().nullable(),
|
|
1966
|
+
totalValue: z10.number().nullable()
|
|
1967
|
+
});
|
|
1968
|
+
getLeaderboardResponseDataSchema = z10.object({
|
|
1969
|
+
leaderboard: z10.array(leaderboardEntrySchema),
|
|
1970
|
+
pagination: z10.object({
|
|
1971
|
+
limit: z10.number(),
|
|
1972
|
+
offset: z10.number(),
|
|
1973
|
+
total: z10.number(),
|
|
1974
|
+
hasMore: z10.boolean()
|
|
1910
1975
|
})
|
|
1911
1976
|
});
|
|
1912
1977
|
getLeaderboardResponseSchema = successEnvelope(getLeaderboardResponseDataSchema);
|
|
1913
|
-
leaderboardQuerySchema =
|
|
1914
|
-
sort:
|
|
1915
|
-
limit:
|
|
1916
|
-
offset:
|
|
1917
|
-
origin:
|
|
1918
|
-
});
|
|
1919
|
-
leaderboardGroupsQuerySchema =
|
|
1920
|
-
limit:
|
|
1921
|
-
offset:
|
|
1922
|
-
period:
|
|
1923
|
-
});
|
|
1924
|
-
leaderboardModelsQuerySchema =
|
|
1925
|
-
sort:
|
|
1926
|
-
});
|
|
1927
|
-
leaderboardGroupCreatorSchema =
|
|
1928
|
-
id:
|
|
1929
|
-
name:
|
|
1930
|
-
handle:
|
|
1931
|
-
avatarUrl:
|
|
1932
|
-
verified:
|
|
1933
|
-
});
|
|
1934
|
-
leaderboardGroupEntrySchema =
|
|
1935
|
-
rank:
|
|
1936
|
-
id:
|
|
1937
|
-
slug:
|
|
1938
|
-
name:
|
|
1939
|
-
description:
|
|
1940
|
-
tags:
|
|
1941
|
-
memberCount:
|
|
1942
|
-
totalVolume:
|
|
1943
|
-
totalFees:
|
|
1944
|
-
avgPnlPercent:
|
|
1945
|
-
weightedPnlPercent:
|
|
1978
|
+
leaderboardQuerySchema = z10.object({
|
|
1979
|
+
sort: z10.enum(["pnl_24h", "pnl_7d", "pnl_all", "volume"]).default("pnl_24h"),
|
|
1980
|
+
limit: z10.coerce.number().int().min(1).default(50).transform((value) => Math.min(value, 100)),
|
|
1981
|
+
offset: z10.coerce.number().int().min(0).default(0),
|
|
1982
|
+
origin: z10.enum(["user", "incubator"]).optional()
|
|
1983
|
+
});
|
|
1984
|
+
leaderboardGroupsQuerySchema = z10.object({
|
|
1985
|
+
limit: z10.coerce.number().int().min(1).default(25).transform((value) => Math.min(value, 100)),
|
|
1986
|
+
offset: z10.coerce.number().int().min(0).default(0),
|
|
1987
|
+
period: z10.enum(["24h", "7d", "30d", "all"]).default("7d")
|
|
1988
|
+
});
|
|
1989
|
+
leaderboardModelsQuerySchema = z10.object({
|
|
1990
|
+
sort: z10.enum(["pnl_24h", "pnl_7d", "trade_count"]).default("pnl_24h")
|
|
1991
|
+
});
|
|
1992
|
+
leaderboardGroupCreatorSchema = z10.object({
|
|
1993
|
+
id: z10.string(),
|
|
1994
|
+
name: z10.string(),
|
|
1995
|
+
handle: z10.string().nullable(),
|
|
1996
|
+
avatarUrl: z10.string().nullable(),
|
|
1997
|
+
verified: z10.boolean()
|
|
1998
|
+
});
|
|
1999
|
+
leaderboardGroupEntrySchema = z10.object({
|
|
2000
|
+
rank: z10.number(),
|
|
2001
|
+
id: z10.string(),
|
|
2002
|
+
slug: z10.string(),
|
|
2003
|
+
name: z10.string(),
|
|
2004
|
+
description: z10.string().nullable(),
|
|
2005
|
+
tags: z10.array(z10.string()).nullable(),
|
|
2006
|
+
memberCount: z10.number(),
|
|
2007
|
+
totalVolume: z10.number(),
|
|
2008
|
+
totalFees: z10.number(),
|
|
2009
|
+
avgPnlPercent: z10.number(),
|
|
2010
|
+
weightedPnlPercent: z10.number(),
|
|
1946
2011
|
creator: leaderboardGroupCreatorSchema.nullable()
|
|
1947
2012
|
});
|
|
1948
|
-
getLeaderboardGroupsResponseDataSchema =
|
|
1949
|
-
leaderboard:
|
|
1950
|
-
period:
|
|
1951
|
-
pagination:
|
|
1952
|
-
limit:
|
|
1953
|
-
offset:
|
|
1954
|
-
total:
|
|
1955
|
-
hasMore:
|
|
2013
|
+
getLeaderboardGroupsResponseDataSchema = z10.object({
|
|
2014
|
+
leaderboard: z10.array(leaderboardGroupEntrySchema),
|
|
2015
|
+
period: z10.enum(["24h", "7d", "30d", "all"]),
|
|
2016
|
+
pagination: z10.object({
|
|
2017
|
+
limit: z10.number(),
|
|
2018
|
+
offset: z10.number(),
|
|
2019
|
+
total: z10.number(),
|
|
2020
|
+
hasMore: z10.boolean()
|
|
1956
2021
|
})
|
|
1957
2022
|
});
|
|
1958
|
-
leaderboardModelTopAgentSchema =
|
|
1959
|
-
name:
|
|
1960
|
-
pnl24h:
|
|
1961
|
-
});
|
|
1962
|
-
leaderboardModelEntrySchema =
|
|
1963
|
-
rank:
|
|
1964
|
-
model:
|
|
1965
|
-
agentCount:
|
|
1966
|
-
tradeCount:
|
|
1967
|
-
totalPnl24h:
|
|
1968
|
-
avgPnl24h:
|
|
1969
|
-
totalPnl7d:
|
|
1970
|
-
avgPnl7d:
|
|
2023
|
+
leaderboardModelTopAgentSchema = z10.object({
|
|
2024
|
+
name: z10.string(),
|
|
2025
|
+
pnl24h: z10.number()
|
|
2026
|
+
});
|
|
2027
|
+
leaderboardModelEntrySchema = z10.object({
|
|
2028
|
+
rank: z10.number(),
|
|
2029
|
+
model: z10.string(),
|
|
2030
|
+
agentCount: z10.number(),
|
|
2031
|
+
tradeCount: z10.number(),
|
|
2032
|
+
totalPnl24h: z10.number(),
|
|
2033
|
+
avgPnl24h: z10.number(),
|
|
2034
|
+
totalPnl7d: z10.number(),
|
|
2035
|
+
avgPnl7d: z10.number(),
|
|
1971
2036
|
topAgent: leaderboardModelTopAgentSchema.nullable()
|
|
1972
2037
|
});
|
|
1973
|
-
getLeaderboardModelsResponseDataSchema =
|
|
1974
|
-
models:
|
|
2038
|
+
getLeaderboardModelsResponseDataSchema = z10.object({
|
|
2039
|
+
models: z10.array(leaderboardModelEntrySchema)
|
|
1975
2040
|
});
|
|
1976
2041
|
getLeaderboardGroupsResponseSchema = successEnvelope(getLeaderboardGroupsResponseDataSchema);
|
|
1977
2042
|
getLeaderboardModelsResponseSchema = successEnvelope(getLeaderboardModelsResponseDataSchema);
|
|
1978
2043
|
});
|
|
1979
2044
|
|
|
1980
2045
|
// ../../packages/client/src/schemas/data-marketplace.ts
|
|
1981
|
-
import { z as
|
|
2046
|
+
import { z as z11 } from "zod";
|
|
1982
2047
|
var DATA_MARKETPLACE_CATEGORIES, DATA_MARKETPLACE_PAYMENT_METHODS, dataMarketplaceListQuerySchema, dataMarketplaceProviderParamsSchema, dataMarketplaceCreateRequestSchema, dataMarketplaceProviderListItemSchema, dataMarketplaceCreateProviderSchema, dataMarketplaceProviderDetailSchema, dataMarketplaceListResponseDataSchema, dataMarketplaceCreateResponseDataSchema, dataMarketplaceProviderDetailResponseDataSchema, dataMarketplaceListResponseSchema, dataMarketplaceCreateResponseSchema, dataMarketplaceProviderDetailResponseSchema;
|
|
1983
2048
|
var init_data_marketplace = __esm(() => {
|
|
1984
2049
|
init_common();
|
|
@@ -1995,73 +2060,73 @@ var init_data_marketplace = __esm(() => {
|
|
|
1995
2060
|
"lightning",
|
|
1996
2061
|
"solana_pay"
|
|
1997
2062
|
];
|
|
1998
|
-
dataMarketplaceListQuerySchema =
|
|
1999
|
-
category:
|
|
2000
|
-
});
|
|
2001
|
-
dataMarketplaceProviderParamsSchema =
|
|
2002
|
-
id:
|
|
2003
|
-
});
|
|
2004
|
-
dataMarketplaceCreateRequestSchema =
|
|
2005
|
-
name:
|
|
2006
|
-
description:
|
|
2007
|
-
category:
|
|
2008
|
-
endpointUrl:
|
|
2009
|
-
costPerRequestUsd:
|
|
2010
|
-
paymentMethod:
|
|
2011
|
-
exampleRequest:
|
|
2012
|
-
exampleResponse:
|
|
2013
|
-
submittedBy:
|
|
2014
|
-
});
|
|
2015
|
-
dataMarketplaceProviderListItemSchema =
|
|
2016
|
-
id:
|
|
2017
|
-
name:
|
|
2018
|
-
description:
|
|
2019
|
-
category:
|
|
2020
|
-
endpointUrl:
|
|
2021
|
-
costPerRequestUsd:
|
|
2022
|
-
paymentMethod:
|
|
2023
|
-
exampleRequest:
|
|
2024
|
-
exampleResponse:
|
|
2025
|
-
verified:
|
|
2026
|
-
verifiedCallCount:
|
|
2027
|
-
createdAt:
|
|
2028
|
-
});
|
|
2029
|
-
dataMarketplaceCreateProviderSchema =
|
|
2030
|
-
id:
|
|
2031
|
-
name:
|
|
2032
|
-
description:
|
|
2033
|
-
category:
|
|
2034
|
-
endpointUrl:
|
|
2035
|
-
costPerRequestUsd:
|
|
2036
|
-
paymentMethod:
|
|
2037
|
-
verified:
|
|
2038
|
-
active:
|
|
2039
|
-
createdAt:
|
|
2040
|
-
});
|
|
2041
|
-
dataMarketplaceProviderDetailSchema =
|
|
2042
|
-
id:
|
|
2043
|
-
name:
|
|
2044
|
-
description:
|
|
2045
|
-
category:
|
|
2046
|
-
endpointUrl:
|
|
2047
|
-
costPerRequestUsd:
|
|
2048
|
-
paymentMethod:
|
|
2049
|
-
exampleRequest:
|
|
2050
|
-
exampleResponse:
|
|
2051
|
-
verified:
|
|
2052
|
-
verifiedCallCount:
|
|
2053
|
-
active:
|
|
2054
|
-
createdAt:
|
|
2055
|
-
});
|
|
2056
|
-
dataMarketplaceListResponseDataSchema =
|
|
2057
|
-
providers:
|
|
2058
|
-
count:
|
|
2059
|
-
});
|
|
2060
|
-
dataMarketplaceCreateResponseDataSchema =
|
|
2063
|
+
dataMarketplaceListQuerySchema = z11.object({
|
|
2064
|
+
category: z11.enum(DATA_MARKETPLACE_CATEGORIES).optional()
|
|
2065
|
+
});
|
|
2066
|
+
dataMarketplaceProviderParamsSchema = z11.object({
|
|
2067
|
+
id: z11.string().uuid()
|
|
2068
|
+
});
|
|
2069
|
+
dataMarketplaceCreateRequestSchema = z11.object({
|
|
2070
|
+
name: z11.string().trim().min(1).max(200),
|
|
2071
|
+
description: z11.string().trim().min(1).max(5000),
|
|
2072
|
+
category: z11.enum(DATA_MARKETPLACE_CATEGORIES),
|
|
2073
|
+
endpointUrl: z11.url(),
|
|
2074
|
+
costPerRequestUsd: z11.number().min(0),
|
|
2075
|
+
paymentMethod: z11.enum(DATA_MARKETPLACE_PAYMENT_METHODS),
|
|
2076
|
+
exampleRequest: z11.string().trim().min(1).max(1e4).optional(),
|
|
2077
|
+
exampleResponse: z11.string().trim().min(1).max(1e4).optional(),
|
|
2078
|
+
submittedBy: z11.string().optional()
|
|
2079
|
+
});
|
|
2080
|
+
dataMarketplaceProviderListItemSchema = z11.object({
|
|
2081
|
+
id: z11.string().min(1),
|
|
2082
|
+
name: z11.string(),
|
|
2083
|
+
description: z11.string(),
|
|
2084
|
+
category: z11.string(),
|
|
2085
|
+
endpointUrl: z11.string().url(),
|
|
2086
|
+
costPerRequestUsd: z11.number(),
|
|
2087
|
+
paymentMethod: z11.string(),
|
|
2088
|
+
exampleRequest: z11.string().nullable(),
|
|
2089
|
+
exampleResponse: z11.string().nullable(),
|
|
2090
|
+
verified: z11.boolean(),
|
|
2091
|
+
verifiedCallCount: z11.number(),
|
|
2092
|
+
createdAt: z11.string()
|
|
2093
|
+
});
|
|
2094
|
+
dataMarketplaceCreateProviderSchema = z11.object({
|
|
2095
|
+
id: z11.string().min(1),
|
|
2096
|
+
name: z11.string(),
|
|
2097
|
+
description: z11.string(),
|
|
2098
|
+
category: z11.string(),
|
|
2099
|
+
endpointUrl: z11.string().url(),
|
|
2100
|
+
costPerRequestUsd: z11.number(),
|
|
2101
|
+
paymentMethod: z11.string(),
|
|
2102
|
+
verified: z11.boolean(),
|
|
2103
|
+
active: z11.boolean(),
|
|
2104
|
+
createdAt: z11.string()
|
|
2105
|
+
});
|
|
2106
|
+
dataMarketplaceProviderDetailSchema = z11.object({
|
|
2107
|
+
id: z11.string().min(1),
|
|
2108
|
+
name: z11.string(),
|
|
2109
|
+
description: z11.string(),
|
|
2110
|
+
category: z11.string(),
|
|
2111
|
+
endpointUrl: z11.string().url(),
|
|
2112
|
+
costPerRequestUsd: z11.number(),
|
|
2113
|
+
paymentMethod: z11.string(),
|
|
2114
|
+
exampleRequest: z11.string().nullable().optional(),
|
|
2115
|
+
exampleResponse: z11.string().nullable().optional(),
|
|
2116
|
+
verified: z11.boolean(),
|
|
2117
|
+
verifiedCallCount: z11.number().optional(),
|
|
2118
|
+
active: z11.boolean().optional(),
|
|
2119
|
+
createdAt: z11.string().optional()
|
|
2120
|
+
});
|
|
2121
|
+
dataMarketplaceListResponseDataSchema = z11.object({
|
|
2122
|
+
providers: z11.array(dataMarketplaceProviderListItemSchema),
|
|
2123
|
+
count: z11.number().int().nonnegative()
|
|
2124
|
+
});
|
|
2125
|
+
dataMarketplaceCreateResponseDataSchema = z11.object({
|
|
2061
2126
|
provider: dataMarketplaceCreateProviderSchema,
|
|
2062
|
-
message:
|
|
2127
|
+
message: z11.string()
|
|
2063
2128
|
});
|
|
2064
|
-
dataMarketplaceProviderDetailResponseDataSchema =
|
|
2129
|
+
dataMarketplaceProviderDetailResponseDataSchema = z11.object({
|
|
2065
2130
|
provider: dataMarketplaceProviderDetailSchema
|
|
2066
2131
|
});
|
|
2067
2132
|
dataMarketplaceListResponseSchema = successEnvelope(dataMarketplaceListResponseDataSchema);
|
|
@@ -2070,7 +2135,7 @@ var init_data_marketplace = __esm(() => {
|
|
|
2070
2135
|
});
|
|
2071
2136
|
|
|
2072
2137
|
// ../../packages/client/src/schemas/marketplace.ts
|
|
2073
|
-
import { z as
|
|
2138
|
+
import { z as z12 } from "zod";
|
|
2074
2139
|
var MARKETPLACE_TASK_CATEGORIES, marketplaceTaskParamsSchema, marketplaceTasksQuerySchema, marketplaceApplyTaskRequestSchema, marketplaceSubmitTaskRequestSchema, marketplaceTaskListItemSchema, marketplaceTasksResponseDataSchema, marketplaceTaskDetailSchema, marketplaceTaskDetailResponseDataSchema, marketplaceApplyTaskResponseDataSchema, marketplaceSubmitTaskResponseDataSchema, marketplaceTasksResponseSchema, marketplaceTaskDetailResponseSchema, marketplaceApplyTaskResponseSchema, marketplaceSubmitTaskResponseSchema;
|
|
2075
2140
|
var init_marketplace = __esm(() => {
|
|
2076
2141
|
init_common();
|
|
@@ -2082,100 +2147,100 @@ var init_marketplace = __esm(() => {
|
|
|
2082
2147
|
"outreach",
|
|
2083
2148
|
"other"
|
|
2084
2149
|
];
|
|
2085
|
-
marketplaceTaskParamsSchema =
|
|
2086
|
-
taskId:
|
|
2087
|
-
});
|
|
2088
|
-
marketplaceTasksQuerySchema =
|
|
2089
|
-
status:
|
|
2090
|
-
category:
|
|
2091
|
-
limit:
|
|
2092
|
-
offset:
|
|
2093
|
-
});
|
|
2094
|
-
marketplaceApplyTaskRequestSchema =
|
|
2095
|
-
walletAddress:
|
|
2096
|
-
message:
|
|
2097
|
-
paymentMethod:
|
|
2098
|
-
});
|
|
2099
|
-
marketplaceSubmitTaskRequestSchema =
|
|
2100
|
-
applicantId:
|
|
2101
|
-
proofText:
|
|
2102
|
-
proofImages:
|
|
2103
|
-
});
|
|
2104
|
-
marketplaceTaskListItemSchema =
|
|
2105
|
-
id:
|
|
2106
|
-
agentId:
|
|
2107
|
-
title:
|
|
2108
|
-
description:
|
|
2109
|
-
category:
|
|
2110
|
-
budgetUsd:
|
|
2111
|
-
deadline:
|
|
2112
|
-
requiredProof:
|
|
2113
|
-
status:
|
|
2114
|
-
createdAt:
|
|
2115
|
-
agentName:
|
|
2116
|
-
agentHandle:
|
|
2117
|
-
});
|
|
2118
|
-
marketplaceTasksResponseDataSchema =
|
|
2119
|
-
tasks:
|
|
2120
|
-
count:
|
|
2121
|
-
pagination:
|
|
2122
|
-
limit:
|
|
2123
|
-
offset:
|
|
2124
|
-
hasMore:
|
|
2150
|
+
marketplaceTaskParamsSchema = z12.object({
|
|
2151
|
+
taskId: z12.string().trim().min(1)
|
|
2152
|
+
});
|
|
2153
|
+
marketplaceTasksQuerySchema = z12.object({
|
|
2154
|
+
status: z12.string().trim().min(1).default("open"),
|
|
2155
|
+
category: z12.enum(MARKETPLACE_TASK_CATEGORIES).optional(),
|
|
2156
|
+
limit: z12.coerce.number().int().min(1).default(50).transform((value) => Math.min(value, 100)),
|
|
2157
|
+
offset: z12.coerce.number().int().min(0).default(0)
|
|
2158
|
+
});
|
|
2159
|
+
marketplaceApplyTaskRequestSchema = z12.object({
|
|
2160
|
+
walletAddress: z12.string().trim().min(1),
|
|
2161
|
+
message: z12.string().trim().max(5000).optional(),
|
|
2162
|
+
paymentMethod: z12.union([z12.string().trim().max(120), z12.record(z12.string(), z12.unknown())]).optional()
|
|
2163
|
+
});
|
|
2164
|
+
marketplaceSubmitTaskRequestSchema = z12.object({
|
|
2165
|
+
applicantId: z12.string().trim().min(1),
|
|
2166
|
+
proofText: z12.string().trim().max(1e4).optional(),
|
|
2167
|
+
proofImages: z12.array(z12.url()).optional()
|
|
2168
|
+
});
|
|
2169
|
+
marketplaceTaskListItemSchema = z12.object({
|
|
2170
|
+
id: z12.string().min(1),
|
|
2171
|
+
agentId: z12.string().min(1),
|
|
2172
|
+
title: z12.string(),
|
|
2173
|
+
description: z12.string(),
|
|
2174
|
+
category: z12.string(),
|
|
2175
|
+
budgetUsd: z12.number(),
|
|
2176
|
+
deadline: z12.string().nullable(),
|
|
2177
|
+
requiredProof: z12.string().nullable(),
|
|
2178
|
+
status: z12.string(),
|
|
2179
|
+
createdAt: z12.string(),
|
|
2180
|
+
agentName: z12.string().nullable(),
|
|
2181
|
+
agentHandle: z12.string().nullable()
|
|
2182
|
+
});
|
|
2183
|
+
marketplaceTasksResponseDataSchema = z12.object({
|
|
2184
|
+
tasks: z12.array(marketplaceTaskListItemSchema),
|
|
2185
|
+
count: z12.number().int().nonnegative(),
|
|
2186
|
+
pagination: z12.object({
|
|
2187
|
+
limit: z12.number().int().positive(),
|
|
2188
|
+
offset: z12.number().int().nonnegative(),
|
|
2189
|
+
hasMore: z12.boolean()
|
|
2125
2190
|
})
|
|
2126
2191
|
});
|
|
2127
|
-
marketplaceTaskDetailSchema =
|
|
2128
|
-
id:
|
|
2129
|
-
agentId:
|
|
2130
|
-
title:
|
|
2131
|
-
description:
|
|
2132
|
-
category:
|
|
2133
|
-
budgetUsd:
|
|
2134
|
-
deadline:
|
|
2135
|
-
requiredProof:
|
|
2136
|
-
status:
|
|
2137
|
-
assignedTo:
|
|
2138
|
-
payoutTx:
|
|
2139
|
-
createdAt:
|
|
2140
|
-
agent:
|
|
2141
|
-
name:
|
|
2142
|
-
handle:
|
|
2143
|
-
avatarUrl:
|
|
2192
|
+
marketplaceTaskDetailSchema = z12.object({
|
|
2193
|
+
id: z12.string().min(1),
|
|
2194
|
+
agentId: z12.string().min(1),
|
|
2195
|
+
title: z12.string(),
|
|
2196
|
+
description: z12.string(),
|
|
2197
|
+
category: z12.string(),
|
|
2198
|
+
budgetUsd: z12.number(),
|
|
2199
|
+
deadline: z12.string().nullable(),
|
|
2200
|
+
requiredProof: z12.string().nullable(),
|
|
2201
|
+
status: z12.string(),
|
|
2202
|
+
assignedTo: z12.string().nullable(),
|
|
2203
|
+
payoutTx: z12.string().nullable(),
|
|
2204
|
+
createdAt: z12.string(),
|
|
2205
|
+
agent: z12.object({
|
|
2206
|
+
name: z12.string().nullable(),
|
|
2207
|
+
handle: z12.string().nullable(),
|
|
2208
|
+
avatarUrl: z12.string().nullable()
|
|
2144
2209
|
}),
|
|
2145
|
-
applicantCount:
|
|
2146
|
-
hasSubmission:
|
|
2147
|
-
submission:
|
|
2148
|
-
id:
|
|
2149
|
-
submittedAt:
|
|
2210
|
+
applicantCount: z12.number().int().nonnegative(),
|
|
2211
|
+
hasSubmission: z12.boolean(),
|
|
2212
|
+
submission: z12.object({
|
|
2213
|
+
id: z12.string().min(1),
|
|
2214
|
+
submittedAt: z12.string()
|
|
2150
2215
|
}).nullable(),
|
|
2151
|
-
dispute:
|
|
2152
|
-
id:
|
|
2153
|
-
initiatedBy:
|
|
2154
|
-
reason:
|
|
2155
|
-
resolution:
|
|
2156
|
-
createdAt:
|
|
2216
|
+
dispute: z12.object({
|
|
2217
|
+
id: z12.string().min(1),
|
|
2218
|
+
initiatedBy: z12.string(),
|
|
2219
|
+
reason: z12.string(),
|
|
2220
|
+
resolution: z12.string().nullable(),
|
|
2221
|
+
createdAt: z12.string()
|
|
2157
2222
|
}).nullable()
|
|
2158
2223
|
});
|
|
2159
|
-
marketplaceTaskDetailResponseDataSchema =
|
|
2224
|
+
marketplaceTaskDetailResponseDataSchema = z12.object({
|
|
2160
2225
|
task: marketplaceTaskDetailSchema
|
|
2161
2226
|
});
|
|
2162
|
-
marketplaceApplyTaskResponseDataSchema =
|
|
2163
|
-
applicant:
|
|
2164
|
-
id:
|
|
2165
|
-
taskId:
|
|
2166
|
-
walletAddress:
|
|
2167
|
-
message:
|
|
2168
|
-
createdAt:
|
|
2227
|
+
marketplaceApplyTaskResponseDataSchema = z12.object({
|
|
2228
|
+
applicant: z12.object({
|
|
2229
|
+
id: z12.string().min(1),
|
|
2230
|
+
taskId: z12.string().min(1),
|
|
2231
|
+
walletAddress: z12.string(),
|
|
2232
|
+
message: z12.string().nullable(),
|
|
2233
|
+
createdAt: z12.string()
|
|
2169
2234
|
})
|
|
2170
2235
|
});
|
|
2171
|
-
marketplaceSubmitTaskResponseDataSchema =
|
|
2172
|
-
submission:
|
|
2173
|
-
id:
|
|
2174
|
-
taskId:
|
|
2175
|
-
applicantId:
|
|
2176
|
-
proofText:
|
|
2177
|
-
proofImages:
|
|
2178
|
-
submittedAt:
|
|
2236
|
+
marketplaceSubmitTaskResponseDataSchema = z12.object({
|
|
2237
|
+
submission: z12.object({
|
|
2238
|
+
id: z12.string().min(1),
|
|
2239
|
+
taskId: z12.string().min(1),
|
|
2240
|
+
applicantId: z12.string().min(1),
|
|
2241
|
+
proofText: z12.string().nullable(),
|
|
2242
|
+
proofImages: z12.array(z12.string().url()).nullable(),
|
|
2243
|
+
submittedAt: z12.string()
|
|
2179
2244
|
})
|
|
2180
2245
|
});
|
|
2181
2246
|
marketplaceTasksResponseSchema = successEnvelope(marketplaceTasksResponseDataSchema);
|
|
@@ -2185,9 +2250,9 @@ var init_marketplace = __esm(() => {
|
|
|
2185
2250
|
});
|
|
2186
2251
|
|
|
2187
2252
|
// ../../packages/client/src/schemas/media.ts
|
|
2188
|
-
import { z as
|
|
2253
|
+
import { z as z13 } from "zod";
|
|
2189
2254
|
function requiredString2(field, message = `Missing required field: ${field}`) {
|
|
2190
|
-
return
|
|
2255
|
+
return z13.preprocess((value) => typeof value === "string" ? value.trim() : "", z13.string().min(1, { message }));
|
|
2191
2256
|
}
|
|
2192
2257
|
var missingPresignMessage = "Missing required fields: filename, contentType", MEDIA_UPLOAD_IMAGE_TYPES, MEDIA_UPLOAD_VIDEO_TYPES, MEDIA_UPLOAD_CONTENT_TYPES, contentTypeSet, mediaUploadPresignRequestSchema, mediaUploadResponseDataSchema, mediaUploadResponseSchema, avatarGenerateRequestSchema, avatarGenerateResponseDataSchema, avatarCreditsResponseDataSchema, avatarSelectRequestSchema, avatarSelectResponseDataSchema, mediaGenerateImageRequestSchema, mediaGenerateImageResponseDataSchema, mediaGenerateImageResponseSchema, mediaGenerateVideoRequestSchema, mediaGenerateVideoResponseDataSchema, mediaGenerateVideoResponseSchema, mediaVideoJobParamsSchema, mediaVideoJobResponseDataSchema, mediaVideoJobResponseSchema, mediaImagesInfoResponseDataSchema, mediaVideosInfoResponseDataSchema, mediaImagesInfoResponseSchema, mediaVideosInfoResponseSchema;
|
|
2193
2258
|
var init_media = __esm(() => {
|
|
@@ -2207,159 +2272,159 @@ var init_media = __esm(() => {
|
|
|
2207
2272
|
...MEDIA_UPLOAD_VIDEO_TYPES
|
|
2208
2273
|
];
|
|
2209
2274
|
contentTypeSet = new Set(MEDIA_UPLOAD_CONTENT_TYPES);
|
|
2210
|
-
mediaUploadPresignRequestSchema =
|
|
2275
|
+
mediaUploadPresignRequestSchema = z13.object({
|
|
2211
2276
|
filename: requiredString2("filename", missingPresignMessage),
|
|
2212
2277
|
contentType: requiredString2("contentType", missingPresignMessage).refine((value) => contentTypeSet.has(value), { message: "Invalid content type" })
|
|
2213
2278
|
});
|
|
2214
|
-
mediaUploadResponseDataSchema =
|
|
2215
|
-
key:
|
|
2216
|
-
url:
|
|
2217
|
-
avatarUrl:
|
|
2218
|
-
uploadUrl:
|
|
2219
|
-
imageUrl:
|
|
2220
|
-
videoUrl:
|
|
2221
|
-
maxSizeBytes:
|
|
2222
|
-
contentType:
|
|
2223
|
-
expiresAt:
|
|
2224
|
-
instructions:
|
|
2279
|
+
mediaUploadResponseDataSchema = z13.object({
|
|
2280
|
+
key: z13.string(),
|
|
2281
|
+
url: z13.string().url().optional(),
|
|
2282
|
+
avatarUrl: z13.string().url().optional(),
|
|
2283
|
+
uploadUrl: z13.string().url().optional(),
|
|
2284
|
+
imageUrl: z13.string().url().optional(),
|
|
2285
|
+
videoUrl: z13.string().url().optional(),
|
|
2286
|
+
maxSizeBytes: z13.number().int().positive().optional(),
|
|
2287
|
+
contentType: z13.string().optional(),
|
|
2288
|
+
expiresAt: z13.string().optional(),
|
|
2289
|
+
instructions: z13.string().optional()
|
|
2225
2290
|
}).passthrough();
|
|
2226
2291
|
mediaUploadResponseSchema = successEnvelope(mediaUploadResponseDataSchema);
|
|
2227
|
-
avatarGenerateRequestSchema =
|
|
2228
|
-
prompt:
|
|
2229
|
-
});
|
|
2230
|
-
avatarGenerateResponseDataSchema =
|
|
2231
|
-
generationId:
|
|
2232
|
-
imageUrl:
|
|
2233
|
-
creditsRemaining:
|
|
2234
|
-
});
|
|
2235
|
-
avatarCreditsResponseDataSchema =
|
|
2236
|
-
creditsTotal:
|
|
2237
|
-
creditsUsed:
|
|
2238
|
-
creditsRemaining:
|
|
2239
|
-
generations:
|
|
2240
|
-
id:
|
|
2241
|
-
imageUrl:
|
|
2242
|
-
selected:
|
|
2243
|
-
createdAt:
|
|
2292
|
+
avatarGenerateRequestSchema = z13.object({
|
|
2293
|
+
prompt: z13.string().min(1).max(2000)
|
|
2294
|
+
});
|
|
2295
|
+
avatarGenerateResponseDataSchema = z13.object({
|
|
2296
|
+
generationId: z13.string().uuid().nullable(),
|
|
2297
|
+
imageUrl: z13.string().url(),
|
|
2298
|
+
creditsRemaining: z13.number()
|
|
2299
|
+
});
|
|
2300
|
+
avatarCreditsResponseDataSchema = z13.object({
|
|
2301
|
+
creditsTotal: z13.number(),
|
|
2302
|
+
creditsUsed: z13.number(),
|
|
2303
|
+
creditsRemaining: z13.number(),
|
|
2304
|
+
generations: z13.array(z13.object({
|
|
2305
|
+
id: z13.string().uuid(),
|
|
2306
|
+
imageUrl: z13.string().url().nullable(),
|
|
2307
|
+
selected: z13.boolean().nullable(),
|
|
2308
|
+
createdAt: z13.string()
|
|
2244
2309
|
}).passthrough())
|
|
2245
2310
|
});
|
|
2246
|
-
avatarSelectRequestSchema =
|
|
2247
|
-
generationId:
|
|
2311
|
+
avatarSelectRequestSchema = z13.object({
|
|
2312
|
+
generationId: z13.string().uuid()
|
|
2248
2313
|
});
|
|
2249
|
-
avatarSelectResponseDataSchema =
|
|
2250
|
-
avatarUrl:
|
|
2251
|
-
generationId:
|
|
2314
|
+
avatarSelectResponseDataSchema = z13.object({
|
|
2315
|
+
avatarUrl: z13.string().url(),
|
|
2316
|
+
generationId: z13.string().uuid()
|
|
2252
2317
|
});
|
|
2253
|
-
mediaGenerateImageRequestSchema =
|
|
2318
|
+
mediaGenerateImageRequestSchema = z13.object({
|
|
2254
2319
|
tradeId: requiredString2("tradeId"),
|
|
2255
2320
|
prompt: requiredString2("prompt").refine((value) => value.length <= 2000, {
|
|
2256
2321
|
message: "Prompt must be a string with max 2000 characters"
|
|
2257
2322
|
}),
|
|
2258
|
-
aspectRatio:
|
|
2323
|
+
aspectRatio: z13.enum(["16:9", "4:3", "1:1", "3:4", "9:16"]).optional()
|
|
2259
2324
|
});
|
|
2260
|
-
mediaGenerateImageResponseDataSchema =
|
|
2261
|
-
jobId:
|
|
2262
|
-
imageUrl:
|
|
2263
|
-
aspectRatio:
|
|
2264
|
-
cost:
|
|
2265
|
-
tradeId:
|
|
2325
|
+
mediaGenerateImageResponseDataSchema = z13.object({
|
|
2326
|
+
jobId: z13.string().uuid().nullable(),
|
|
2327
|
+
imageUrl: z13.string().url(),
|
|
2328
|
+
aspectRatio: z13.string(),
|
|
2329
|
+
cost: z13.number(),
|
|
2330
|
+
tradeId: z13.string()
|
|
2266
2331
|
});
|
|
2267
2332
|
mediaGenerateImageResponseSchema = successEnvelope(mediaGenerateImageResponseDataSchema);
|
|
2268
|
-
mediaGenerateVideoRequestSchema =
|
|
2269
|
-
tradeId:
|
|
2270
|
-
tokenId:
|
|
2271
|
-
prompt:
|
|
2272
|
-
aspectRatio:
|
|
2273
|
-
imagePrompt:
|
|
2274
|
-
firstFrameUrl:
|
|
2333
|
+
mediaGenerateVideoRequestSchema = z13.object({
|
|
2334
|
+
tradeId: z13.string().uuid().optional(),
|
|
2335
|
+
tokenId: z13.string().uuid().optional(),
|
|
2336
|
+
prompt: z13.string().max(1e4).optional(),
|
|
2337
|
+
aspectRatio: z13.enum(["landscape", "portrait", "16:9", "4:3", "1:1", "3:4", "9:16"]).optional(),
|
|
2338
|
+
imagePrompt: z13.string().max(2000).optional(),
|
|
2339
|
+
firstFrameUrl: z13.string().url().optional()
|
|
2275
2340
|
}).refine((data) => data.tradeId || data.tokenId, { message: "Either tradeId or tokenId is required", path: ["tradeId"] });
|
|
2276
|
-
mediaGenerateVideoResponseDataSchema =
|
|
2277
|
-
jobId:
|
|
2278
|
-
status:
|
|
2279
|
-
mediaType:
|
|
2280
|
-
provider:
|
|
2281
|
-
duration:
|
|
2282
|
-
cost:
|
|
2283
|
-
note:
|
|
2341
|
+
mediaGenerateVideoResponseDataSchema = z13.object({
|
|
2342
|
+
jobId: z13.string().uuid(),
|
|
2343
|
+
status: z13.string(),
|
|
2344
|
+
mediaType: z13.string(),
|
|
2345
|
+
provider: z13.string(),
|
|
2346
|
+
duration: z13.number(),
|
|
2347
|
+
cost: z13.number(),
|
|
2348
|
+
note: z13.string()
|
|
2284
2349
|
});
|
|
2285
2350
|
mediaGenerateVideoResponseSchema = successEnvelope(mediaGenerateVideoResponseDataSchema);
|
|
2286
|
-
mediaVideoJobParamsSchema =
|
|
2351
|
+
mediaVideoJobParamsSchema = z13.object({
|
|
2287
2352
|
jobId: requiredString2("jobId")
|
|
2288
2353
|
});
|
|
2289
|
-
mediaVideoJobResponseDataSchema =
|
|
2290
|
-
jobId:
|
|
2291
|
-
status:
|
|
2292
|
-
mediaType:
|
|
2293
|
-
tradeId:
|
|
2294
|
-
tokenId:
|
|
2295
|
-
provider:
|
|
2296
|
-
requestedDuration:
|
|
2297
|
-
actualDuration:
|
|
2298
|
-
createdAt:
|
|
2299
|
-
startedAt:
|
|
2300
|
-
completedAt:
|
|
2301
|
-
videoUrl:
|
|
2302
|
-
costUsd:
|
|
2303
|
-
errorMessage:
|
|
2304
|
-
fallbackImageUrl:
|
|
2305
|
-
firstFrameImageUrl:
|
|
2354
|
+
mediaVideoJobResponseDataSchema = z13.object({
|
|
2355
|
+
jobId: z13.string(),
|
|
2356
|
+
status: z13.string(),
|
|
2357
|
+
mediaType: z13.string(),
|
|
2358
|
+
tradeId: z13.string().nullable(),
|
|
2359
|
+
tokenId: z13.string().nullable().optional(),
|
|
2360
|
+
provider: z13.string().optional(),
|
|
2361
|
+
requestedDuration: z13.number(),
|
|
2362
|
+
actualDuration: z13.number().optional(),
|
|
2363
|
+
createdAt: z13.string(),
|
|
2364
|
+
startedAt: z13.string().optional(),
|
|
2365
|
+
completedAt: z13.string().optional(),
|
|
2366
|
+
videoUrl: z13.string().url().nullable().optional(),
|
|
2367
|
+
costUsd: z13.number().nullable().optional(),
|
|
2368
|
+
errorMessage: z13.string().nullable().optional(),
|
|
2369
|
+
fallbackImageUrl: z13.string().url().optional(),
|
|
2370
|
+
firstFrameImageUrl: z13.string().url().nullable().optional()
|
|
2306
2371
|
});
|
|
2307
2372
|
mediaVideoJobResponseSchema = successEnvelope(mediaVideoJobResponseDataSchema);
|
|
2308
|
-
mediaImagesInfoResponseDataSchema =
|
|
2309
|
-
model:
|
|
2310
|
-
description:
|
|
2311
|
-
supportedAspectRatios:
|
|
2312
|
-
cost:
|
|
2313
|
-
maxPromptLength:
|
|
2314
|
-
provider:
|
|
2315
|
-
note:
|
|
2316
|
-
usage:
|
|
2317
|
-
method:
|
|
2318
|
-
body:
|
|
2319
|
-
headers:
|
|
2373
|
+
mediaImagesInfoResponseDataSchema = z13.object({
|
|
2374
|
+
model: z13.string().optional(),
|
|
2375
|
+
description: z13.string().optional(),
|
|
2376
|
+
supportedAspectRatios: z13.array(z13.string()).optional(),
|
|
2377
|
+
cost: z13.number().optional(),
|
|
2378
|
+
maxPromptLength: z13.number().optional(),
|
|
2379
|
+
provider: z13.string().optional(),
|
|
2380
|
+
note: z13.string().optional(),
|
|
2381
|
+
usage: z13.object({
|
|
2382
|
+
method: z13.string(),
|
|
2383
|
+
body: z13.record(z13.string(), z13.string()),
|
|
2384
|
+
headers: z13.record(z13.string(), z13.string())
|
|
2320
2385
|
}).optional(),
|
|
2321
|
-
videoAlternative:
|
|
2322
|
-
endpoint:
|
|
2323
|
-
note:
|
|
2386
|
+
videoAlternative: z13.object({
|
|
2387
|
+
endpoint: z13.string(),
|
|
2388
|
+
note: z13.string()
|
|
2324
2389
|
}).optional(),
|
|
2325
|
-
yourStats:
|
|
2326
|
-
qualifyingTradesForImage:
|
|
2327
|
-
imagesGenerated:
|
|
2328
|
-
availableForImage:
|
|
2329
|
-
recentAvailableTrades:
|
|
2330
|
-
tradeId:
|
|
2331
|
-
valueUsd:
|
|
2390
|
+
yourStats: z13.object({
|
|
2391
|
+
qualifyingTradesForImage: z13.number(),
|
|
2392
|
+
imagesGenerated: z13.number(),
|
|
2393
|
+
availableForImage: z13.number(),
|
|
2394
|
+
recentAvailableTrades: z13.array(z13.object({
|
|
2395
|
+
tradeId: z13.string(),
|
|
2396
|
+
valueUsd: z13.number()
|
|
2332
2397
|
}))
|
|
2333
2398
|
}).optional()
|
|
2334
2399
|
}).passthrough();
|
|
2335
|
-
mediaVideosInfoResponseDataSchema =
|
|
2336
|
-
description:
|
|
2337
|
-
tiers:
|
|
2338
|
-
duration:
|
|
2339
|
-
cost:
|
|
2400
|
+
mediaVideosInfoResponseDataSchema = z13.object({
|
|
2401
|
+
description: z13.string().optional(),
|
|
2402
|
+
tiers: z13.record(z13.string(), z13.object({
|
|
2403
|
+
duration: z13.number(),
|
|
2404
|
+
cost: z13.number()
|
|
2340
2405
|
}).passthrough()).optional(),
|
|
2341
|
-
providers:
|
|
2342
|
-
limits:
|
|
2343
|
-
usage:
|
|
2344
|
-
method:
|
|
2345
|
-
body:
|
|
2346
|
-
headers:
|
|
2406
|
+
providers: z13.array(z13.string()).optional(),
|
|
2407
|
+
limits: z13.record(z13.string(), z13.unknown()).optional(),
|
|
2408
|
+
usage: z13.object({
|
|
2409
|
+
method: z13.string(),
|
|
2410
|
+
body: z13.record(z13.string(), z13.string()),
|
|
2411
|
+
headers: z13.record(z13.string(), z13.string())
|
|
2347
2412
|
}).optional(),
|
|
2348
|
-
statusCheck:
|
|
2349
|
-
method:
|
|
2350
|
-
endpoint:
|
|
2413
|
+
statusCheck: z13.object({
|
|
2414
|
+
method: z13.string(),
|
|
2415
|
+
endpoint: z13.string()
|
|
2351
2416
|
}).optional(),
|
|
2352
|
-
yourStats:
|
|
2353
|
-
qualifyingTrades:
|
|
2354
|
-
videosGenerated:
|
|
2355
|
-
availableForVideo:
|
|
2356
|
-
recentQualifyingTrades:
|
|
2357
|
-
tradeId:
|
|
2358
|
-
valueUsd:
|
|
2359
|
-
tier:
|
|
2360
|
-
type:
|
|
2361
|
-
duration:
|
|
2362
|
-
cost:
|
|
2417
|
+
yourStats: z13.object({
|
|
2418
|
+
qualifyingTrades: z13.number(),
|
|
2419
|
+
videosGenerated: z13.number(),
|
|
2420
|
+
availableForVideo: z13.number(),
|
|
2421
|
+
recentQualifyingTrades: z13.array(z13.object({
|
|
2422
|
+
tradeId: z13.string(),
|
|
2423
|
+
valueUsd: z13.number(),
|
|
2424
|
+
tier: z13.object({
|
|
2425
|
+
type: z13.string(),
|
|
2426
|
+
duration: z13.number(),
|
|
2427
|
+
cost: z13.number()
|
|
2363
2428
|
}).passthrough()
|
|
2364
2429
|
}))
|
|
2365
2430
|
}).optional()
|
|
@@ -2376,6 +2441,7 @@ var init_agent = __esm(() => {
|
|
|
2376
2441
|
init_agents();
|
|
2377
2442
|
init_trade();
|
|
2378
2443
|
init_hyperliquid();
|
|
2444
|
+
init_notifications();
|
|
2379
2445
|
init_incubator();
|
|
2380
2446
|
init_groups();
|
|
2381
2447
|
init_tokens();
|
|
@@ -2522,6 +2588,28 @@ var init_agent = __esm(() => {
|
|
|
2522
2588
|
const body = solanaTradeRequestSchema.parse({ ...req, dryRun: true });
|
|
2523
2589
|
return this.request({ method: "POST", path: "/trade", body, headers: this.authHeaders() }, dryRunResponseDataSchema);
|
|
2524
2590
|
}
|
|
2591
|
+
async getTrades(options) {
|
|
2592
|
+
const params = new URLSearchParams;
|
|
2593
|
+
if (options?.limit)
|
|
2594
|
+
params.set("limit", String(options.limit));
|
|
2595
|
+
if (options?.offset)
|
|
2596
|
+
params.set("offset", String(options.offset));
|
|
2597
|
+
if (options?.chain)
|
|
2598
|
+
params.set("chain", options.chain);
|
|
2599
|
+
const query = params.toString();
|
|
2600
|
+
return this.request({ method: "GET", path: `/agents/me/trades${query ? `?${query}` : ""}`, headers: this.authHeaders() }, agentsTradesResponseDataSchema);
|
|
2601
|
+
}
|
|
2602
|
+
async getNotifications(options) {
|
|
2603
|
+
const params = new URLSearchParams;
|
|
2604
|
+
if (options?.limit)
|
|
2605
|
+
params.set("limit", String(options.limit));
|
|
2606
|
+
if (options?.offset)
|
|
2607
|
+
params.set("offset", String(options.offset));
|
|
2608
|
+
if (options?.unreadOnly)
|
|
2609
|
+
params.set("unreadOnly", "true");
|
|
2610
|
+
const query = params.toString();
|
|
2611
|
+
return this.request({ method: "GET", path: `/notifications${query ? `?${query}` : ""}`, headers: this.authHeaders() }, notificationsListResponseDataSchema);
|
|
2612
|
+
}
|
|
2525
2613
|
async getTokenInfo(token) {
|
|
2526
2614
|
return this.request({ method: "GET", path: `/tokens/${encodeURIComponent(token)}`, headers: this.authHeaders() }, tokenInfoResponseDataSchema);
|
|
2527
2615
|
}
|
|
@@ -2781,430 +2869,430 @@ var init_autonomous = __esm(() => {
|
|
|
2781
2869
|
});
|
|
2782
2870
|
|
|
2783
2871
|
// ../../packages/client/src/schemas/admin.ts
|
|
2784
|
-
import { z as
|
|
2872
|
+
import { z as z14 } from "zod";
|
|
2785
2873
|
var adminDisputeResolutions, adminDisputeParamsSchema, adminDisputesQuerySchema, adminResolveDisputeRequestSchema, adminDisputesResponseDataSchema, adminResolveDisputeResponseDataSchema, adminAgentsResponseDataSchema, adminTurnsResponseDataSchema, adminMessageAgentsRequestSchema, adminMessageAgentsResponseDataSchema, adminPendingPayoutsResponseDataSchema, adminProcessPayoutRequestSchema, adminProcessPayoutResponseDataSchema, adminApprovePayoutRequestSchema, adminSkipPayoutRequestSchema, adminForfeitPayoutRequestSchema, adminRecordTxRequestSchema, adminApprovalQueueResponseDataSchema, adminApprovePayoutResponseDataSchema, adminSkipPayoutResponseDataSchema, adminForfeitPayoutResponseDataSchema, adminRecordTxResponseDataSchema, adminReferrerIdParamsSchema, adminReferralOverviewResponseDataSchema, adminReferralTradesQuerySchema, adminReferralTradesResponseDataSchema, adminReferralGamingSignalSchema, adminReferralSignalsResponseDataSchema, adminAgentIdParamsSchema, adminCreateAgentRequestSchema, adminUpdateAgentRequestSchema, adminUserIdParamsSchema, adminUsersQuerySchema, adminUpdateUserRequestSchema, adminCreateAgentResponseDataSchema, adminUpdateAgentResponseDataSchema, adminUsersResponseDataSchema, adminUpdateUserResponseDataSchema, adminIncubatorBirthRequestSchema, adminIncubatorAdjustRequestSchema, adminIncubatorWalletRequestSchema, adminIncubatorTransactionsQuerySchema, adminIncubatorPoolResponseDataSchema, adminIncubatorTransactionSchema, adminIncubatorTransactionsResponseDataSchema, adminIncubatorBirthResponseDataSchema, adminIncubatorAdjustResponseDataSchema, adminIncubatorWalletResponseDataSchema, adminDisputesResponseSchema, adminResolveDisputeResponseSchema, adminMessageAgentsResponseSchema, adminIncubatorPoolResponseSchema, adminIncubatorTransactionsResponseSchema, adminIncubatorBirthResponseSchema, adminIncubatorAdjustResponseSchema, adminIncubatorWalletResponseSchema;
|
|
2786
2874
|
var init_admin = __esm(() => {
|
|
2787
2875
|
init_common();
|
|
2788
2876
|
adminDisputeResolutions = ["human_wins", "agent_wins", "split"];
|
|
2789
|
-
adminDisputeParamsSchema =
|
|
2790
|
-
disputeId:
|
|
2791
|
-
});
|
|
2792
|
-
adminDisputesQuerySchema =
|
|
2793
|
-
status:
|
|
2794
|
-
limit:
|
|
2795
|
-
offset:
|
|
2796
|
-
});
|
|
2797
|
-
adminResolveDisputeRequestSchema =
|
|
2798
|
-
resolution:
|
|
2799
|
-
note:
|
|
2800
|
-
});
|
|
2801
|
-
adminDisputesResponseDataSchema =
|
|
2802
|
-
disputes:
|
|
2803
|
-
id:
|
|
2804
|
-
taskId:
|
|
2805
|
-
initiatedBy:
|
|
2806
|
-
reason:
|
|
2807
|
-
evidenceUrls:
|
|
2808
|
-
resolution:
|
|
2809
|
-
resolvedBy:
|
|
2810
|
-
resolvedAt:
|
|
2811
|
-
createdAt:
|
|
2812
|
-
task:
|
|
2813
|
-
id:
|
|
2814
|
-
agentId:
|
|
2815
|
-
agentName:
|
|
2816
|
-
title:
|
|
2817
|
-
budgetUsd:
|
|
2818
|
-
status:
|
|
2819
|
-
assignedTo:
|
|
2877
|
+
adminDisputeParamsSchema = z14.object({
|
|
2878
|
+
disputeId: z14.string().uuid()
|
|
2879
|
+
});
|
|
2880
|
+
adminDisputesQuerySchema = z14.object({
|
|
2881
|
+
status: z14.enum(["pending", ...adminDisputeResolutions]).default("pending"),
|
|
2882
|
+
limit: z14.coerce.number().int().min(1).default(50).transform((value) => Math.min(value, 100)),
|
|
2883
|
+
offset: z14.coerce.number().int().min(0).default(0)
|
|
2884
|
+
});
|
|
2885
|
+
adminResolveDisputeRequestSchema = z14.object({
|
|
2886
|
+
resolution: z14.enum(adminDisputeResolutions),
|
|
2887
|
+
note: z14.string().trim().max(4000).optional()
|
|
2888
|
+
});
|
|
2889
|
+
adminDisputesResponseDataSchema = z14.object({
|
|
2890
|
+
disputes: z14.array(z14.object({
|
|
2891
|
+
id: z14.string().uuid(),
|
|
2892
|
+
taskId: z14.string().uuid(),
|
|
2893
|
+
initiatedBy: z14.string(),
|
|
2894
|
+
reason: z14.string(),
|
|
2895
|
+
evidenceUrls: z14.array(z14.string()).nullable(),
|
|
2896
|
+
resolution: z14.string(),
|
|
2897
|
+
resolvedBy: z14.string().nullable(),
|
|
2898
|
+
resolvedAt: z14.string().nullable(),
|
|
2899
|
+
createdAt: z14.string(),
|
|
2900
|
+
task: z14.object({
|
|
2901
|
+
id: z14.string().uuid(),
|
|
2902
|
+
agentId: z14.string().uuid(),
|
|
2903
|
+
agentName: z14.string().nullable(),
|
|
2904
|
+
title: z14.string(),
|
|
2905
|
+
budgetUsd: z14.number(),
|
|
2906
|
+
status: z14.string(),
|
|
2907
|
+
assignedTo: z14.string().uuid().nullable()
|
|
2820
2908
|
}).nullable()
|
|
2821
2909
|
})),
|
|
2822
|
-
count:
|
|
2823
|
-
pagination:
|
|
2824
|
-
limit:
|
|
2825
|
-
offset:
|
|
2826
|
-
hasMore:
|
|
2910
|
+
count: z14.number(),
|
|
2911
|
+
pagination: z14.object({
|
|
2912
|
+
limit: z14.number(),
|
|
2913
|
+
offset: z14.number(),
|
|
2914
|
+
hasMore: z14.boolean()
|
|
2827
2915
|
})
|
|
2828
2916
|
});
|
|
2829
|
-
adminResolveDisputeResponseDataSchema =
|
|
2830
|
-
dispute:
|
|
2831
|
-
id:
|
|
2832
|
-
taskId:
|
|
2833
|
-
resolution:
|
|
2834
|
-
resolvedBy:
|
|
2835
|
-
payoutTx:
|
|
2836
|
-
newTaskStatus:
|
|
2917
|
+
adminResolveDisputeResponseDataSchema = z14.object({
|
|
2918
|
+
dispute: z14.object({
|
|
2919
|
+
id: z14.string().uuid(),
|
|
2920
|
+
taskId: z14.string().uuid(),
|
|
2921
|
+
resolution: z14.string(),
|
|
2922
|
+
resolvedBy: z14.string(),
|
|
2923
|
+
payoutTx: z14.string().nullable(),
|
|
2924
|
+
newTaskStatus: z14.string()
|
|
2837
2925
|
})
|
|
2838
2926
|
});
|
|
2839
|
-
adminAgentsResponseDataSchema =
|
|
2840
|
-
agents:
|
|
2841
|
-
id:
|
|
2842
|
-
name:
|
|
2843
|
-
handle:
|
|
2844
|
-
avatarUrl:
|
|
2845
|
-
solanaAddress:
|
|
2846
|
-
generation:
|
|
2847
|
-
bornAt:
|
|
2848
|
-
diedAt:
|
|
2849
|
-
isAlive:
|
|
2850
|
-
llmModel:
|
|
2851
|
-
llmUsageUsd:
|
|
2852
|
-
llmBudgetUsd:
|
|
2853
|
-
serverPlan:
|
|
2854
|
-
totalValueUsd:
|
|
2855
|
-
pnlAllTime:
|
|
2856
|
-
totalTurns:
|
|
2857
|
-
totalCostUsd:
|
|
2858
|
-
totalEntries:
|
|
2859
|
-
lastTurnAt:
|
|
2860
|
-
lastEntryPreview:
|
|
2927
|
+
adminAgentsResponseDataSchema = z14.object({
|
|
2928
|
+
agents: z14.array(z14.object({
|
|
2929
|
+
id: z14.string().uuid(),
|
|
2930
|
+
name: z14.string(),
|
|
2931
|
+
handle: z14.string().nullable(),
|
|
2932
|
+
avatarUrl: z14.string().nullable(),
|
|
2933
|
+
solanaAddress: z14.string().nullable(),
|
|
2934
|
+
generation: z14.number().nullable(),
|
|
2935
|
+
bornAt: z14.string().nullable(),
|
|
2936
|
+
diedAt: z14.string().nullable(),
|
|
2937
|
+
isAlive: z14.boolean(),
|
|
2938
|
+
llmModel: z14.string().nullable(),
|
|
2939
|
+
llmUsageUsd: z14.number().nullable(),
|
|
2940
|
+
llmBudgetUsd: z14.number().nullable(),
|
|
2941
|
+
serverPlan: z14.string().nullable(),
|
|
2942
|
+
totalValueUsd: z14.number(),
|
|
2943
|
+
pnlAllTime: z14.number(),
|
|
2944
|
+
totalTurns: z14.number(),
|
|
2945
|
+
totalCostUsd: z14.number(),
|
|
2946
|
+
totalEntries: z14.number(),
|
|
2947
|
+
lastTurnAt: z14.string().nullable(),
|
|
2948
|
+
lastEntryPreview: z14.string().nullable()
|
|
2861
2949
|
})),
|
|
2862
|
-
count:
|
|
2863
|
-
});
|
|
2864
|
-
adminTurnsResponseDataSchema =
|
|
2865
|
-
turns:
|
|
2866
|
-
id:
|
|
2867
|
-
piEntryId:
|
|
2868
|
-
parentPiEntryId:
|
|
2869
|
-
entryType:
|
|
2870
|
-
seq:
|
|
2871
|
-
timestamp:
|
|
2872
|
-
role:
|
|
2873
|
-
contentPreview:
|
|
2874
|
-
model:
|
|
2875
|
-
provider:
|
|
2876
|
-
toolName:
|
|
2877
|
-
tokenInput:
|
|
2878
|
-
tokenOutput:
|
|
2879
|
-
costUsd:
|
|
2880
|
-
sourceType:
|
|
2881
|
-
sourceRef:
|
|
2882
|
-
payload:
|
|
2950
|
+
count: z14.number()
|
|
2951
|
+
});
|
|
2952
|
+
adminTurnsResponseDataSchema = z14.object({
|
|
2953
|
+
turns: z14.array(z14.object({
|
|
2954
|
+
id: z14.number(),
|
|
2955
|
+
piEntryId: z14.string().nullable(),
|
|
2956
|
+
parentPiEntryId: z14.string().nullable(),
|
|
2957
|
+
entryType: z14.string().nullable(),
|
|
2958
|
+
seq: z14.number().nullable(),
|
|
2959
|
+
timestamp: z14.string().nullable(),
|
|
2960
|
+
role: z14.string().nullable(),
|
|
2961
|
+
contentPreview: z14.string().nullable(),
|
|
2962
|
+
model: z14.string().nullable(),
|
|
2963
|
+
provider: z14.string().nullable(),
|
|
2964
|
+
toolName: z14.string().nullable(),
|
|
2965
|
+
tokenInput: z14.number().nullable(),
|
|
2966
|
+
tokenOutput: z14.number().nullable(),
|
|
2967
|
+
costUsd: z14.number().nullable(),
|
|
2968
|
+
sourceType: z14.string().nullable(),
|
|
2969
|
+
sourceRef: z14.string().nullable(),
|
|
2970
|
+
payload: z14.unknown().nullable()
|
|
2883
2971
|
})),
|
|
2884
|
-
page:
|
|
2885
|
-
pageSize:
|
|
2972
|
+
page: z14.number(),
|
|
2973
|
+
pageSize: z14.number()
|
|
2886
2974
|
});
|
|
2887
|
-
adminMessageAgentsRequestSchema =
|
|
2888
|
-
message:
|
|
2889
|
-
agentIds:
|
|
2890
|
-
broadcast:
|
|
2975
|
+
adminMessageAgentsRequestSchema = z14.object({
|
|
2976
|
+
message: z14.string().trim().min(1, "Message is required").max(4000),
|
|
2977
|
+
agentIds: z14.array(z14.string().uuid()).min(1).optional(),
|
|
2978
|
+
broadcast: z14.boolean().optional()
|
|
2891
2979
|
}).refine((data) => data.agentIds && data.agentIds.length > 0 || data.broadcast === true, { message: "Provide agentIds or set broadcast to true" }).refine((data) => !(data.agentIds && data.agentIds.length > 0 && data.broadcast === true), { message: "Cannot specify both agentIds and broadcast" });
|
|
2892
|
-
adminMessageAgentsResponseDataSchema =
|
|
2893
|
-
sent:
|
|
2894
|
-
agentIds:
|
|
2895
|
-
});
|
|
2896
|
-
adminPendingPayoutsResponseDataSchema =
|
|
2897
|
-
min_payout_usd:
|
|
2898
|
-
pending_payouts:
|
|
2899
|
-
referrer_id:
|
|
2900
|
-
name:
|
|
2901
|
-
handle:
|
|
2902
|
-
payout_wallet:
|
|
2903
|
-
referral_count:
|
|
2904
|
-
total_volume_usd:
|
|
2905
|
-
total_earned:
|
|
2906
|
-
total_paid_out:
|
|
2907
|
-
pending_amount:
|
|
2908
|
-
solana_earned:
|
|
2909
|
-
hyperliquid_earned:
|
|
2910
|
-
dbc_pool_earned:
|
|
2980
|
+
adminMessageAgentsResponseDataSchema = z14.object({
|
|
2981
|
+
sent: z14.number(),
|
|
2982
|
+
agentIds: z14.array(z14.string().uuid())
|
|
2983
|
+
});
|
|
2984
|
+
adminPendingPayoutsResponseDataSchema = z14.object({
|
|
2985
|
+
min_payout_usd: z14.number().optional(),
|
|
2986
|
+
pending_payouts: z14.array(z14.object({
|
|
2987
|
+
referrer_id: z14.string(),
|
|
2988
|
+
name: z14.string(),
|
|
2989
|
+
handle: z14.string().nullable().optional(),
|
|
2990
|
+
payout_wallet: z14.string().nullable().optional(),
|
|
2991
|
+
referral_count: z14.number(),
|
|
2992
|
+
total_volume_usd: z14.number(),
|
|
2993
|
+
total_earned: z14.number(),
|
|
2994
|
+
total_paid_out: z14.number(),
|
|
2995
|
+
pending_amount: z14.number(),
|
|
2996
|
+
solana_earned: z14.number(),
|
|
2997
|
+
hyperliquid_earned: z14.number(),
|
|
2998
|
+
dbc_pool_earned: z14.number()
|
|
2911
2999
|
}))
|
|
2912
3000
|
});
|
|
2913
|
-
adminProcessPayoutRequestSchema =
|
|
2914
|
-
referrer_id:
|
|
2915
|
-
amount:
|
|
2916
|
-
tx_signature:
|
|
3001
|
+
adminProcessPayoutRequestSchema = z14.object({
|
|
3002
|
+
referrer_id: z14.string().min(1),
|
|
3003
|
+
amount: z14.number().finite().positive().max(1e5),
|
|
3004
|
+
tx_signature: z14.string().min(1)
|
|
2917
3005
|
});
|
|
2918
|
-
adminProcessPayoutResponseDataSchema =
|
|
2919
|
-
payout_id:
|
|
2920
|
-
referrer:
|
|
2921
|
-
id:
|
|
2922
|
-
name:
|
|
3006
|
+
adminProcessPayoutResponseDataSchema = z14.object({
|
|
3007
|
+
payout_id: z14.string(),
|
|
3008
|
+
referrer: z14.object({
|
|
3009
|
+
id: z14.string(),
|
|
3010
|
+
name: z14.string().nullable()
|
|
2923
3011
|
}),
|
|
2924
|
-
amount:
|
|
2925
|
-
wallet_address:
|
|
2926
|
-
tx_signature:
|
|
2927
|
-
status:
|
|
2928
|
-
});
|
|
2929
|
-
adminApprovePayoutRequestSchema =
|
|
2930
|
-
referrer_id:
|
|
2931
|
-
amount:
|
|
2932
|
-
notes:
|
|
2933
|
-
});
|
|
2934
|
-
adminSkipPayoutRequestSchema =
|
|
2935
|
-
referrer_id:
|
|
2936
|
-
notes:
|
|
2937
|
-
});
|
|
2938
|
-
adminForfeitPayoutRequestSchema =
|
|
2939
|
-
referrer_id:
|
|
2940
|
-
amount:
|
|
2941
|
-
notes:
|
|
2942
|
-
});
|
|
2943
|
-
adminRecordTxRequestSchema =
|
|
2944
|
-
payout_id:
|
|
2945
|
-
tx_signature:
|
|
2946
|
-
});
|
|
2947
|
-
adminApprovalQueueResponseDataSchema =
|
|
2948
|
-
referrers:
|
|
2949
|
-
referrerId:
|
|
2950
|
-
name:
|
|
2951
|
-
handle:
|
|
2952
|
-
payoutWallet:
|
|
2953
|
-
pendingAmount:
|
|
2954
|
-
referralCount:
|
|
2955
|
-
totalVolumeUsd:
|
|
2956
|
-
totalEarned:
|
|
2957
|
-
totalPaidOut:
|
|
2958
|
-
overallRisk:
|
|
3012
|
+
amount: z14.number(),
|
|
3013
|
+
wallet_address: z14.string(),
|
|
3014
|
+
tx_signature: z14.string(),
|
|
3015
|
+
status: z14.string()
|
|
3016
|
+
});
|
|
3017
|
+
adminApprovePayoutRequestSchema = z14.object({
|
|
3018
|
+
referrer_id: z14.string().uuid(),
|
|
3019
|
+
amount: z14.number().finite().positive().min(5),
|
|
3020
|
+
notes: z14.string().trim().max(1000).optional()
|
|
3021
|
+
});
|
|
3022
|
+
adminSkipPayoutRequestSchema = z14.object({
|
|
3023
|
+
referrer_id: z14.string().uuid(),
|
|
3024
|
+
notes: z14.string().trim().max(1000).optional()
|
|
3025
|
+
});
|
|
3026
|
+
adminForfeitPayoutRequestSchema = z14.object({
|
|
3027
|
+
referrer_id: z14.string().uuid(),
|
|
3028
|
+
amount: z14.number().finite().positive(),
|
|
3029
|
+
notes: z14.string().trim().min(1).max(1000)
|
|
3030
|
+
});
|
|
3031
|
+
adminRecordTxRequestSchema = z14.object({
|
|
3032
|
+
payout_id: z14.string().uuid(),
|
|
3033
|
+
tx_signature: z14.string().min(1)
|
|
3034
|
+
});
|
|
3035
|
+
adminApprovalQueueResponseDataSchema = z14.object({
|
|
3036
|
+
referrers: z14.array(z14.object({
|
|
3037
|
+
referrerId: z14.string(),
|
|
3038
|
+
name: z14.string(),
|
|
3039
|
+
handle: z14.string().nullable(),
|
|
3040
|
+
payoutWallet: z14.string().nullable(),
|
|
3041
|
+
pendingAmount: z14.number(),
|
|
3042
|
+
referralCount: z14.number(),
|
|
3043
|
+
totalVolumeUsd: z14.number(),
|
|
3044
|
+
totalEarned: z14.number(),
|
|
3045
|
+
totalPaidOut: z14.number(),
|
|
3046
|
+
overallRisk: z14.enum(["low", "medium", "high"]).optional()
|
|
2959
3047
|
})),
|
|
2960
|
-
approvedPayouts:
|
|
2961
|
-
id:
|
|
2962
|
-
referrerId:
|
|
2963
|
-
referrerName:
|
|
2964
|
-
amount:
|
|
2965
|
-
approvedAt:
|
|
2966
|
-
notes:
|
|
3048
|
+
approvedPayouts: z14.array(z14.object({
|
|
3049
|
+
id: z14.string(),
|
|
3050
|
+
referrerId: z14.string(),
|
|
3051
|
+
referrerName: z14.string(),
|
|
3052
|
+
amount: z14.number(),
|
|
3053
|
+
approvedAt: z14.string(),
|
|
3054
|
+
notes: z14.string().nullable()
|
|
2967
3055
|
}))
|
|
2968
3056
|
});
|
|
2969
|
-
adminApprovePayoutResponseDataSchema =
|
|
2970
|
-
payout:
|
|
2971
|
-
id:
|
|
2972
|
-
referrerId:
|
|
2973
|
-
referrerName:
|
|
2974
|
-
amount:
|
|
2975
|
-
wallet:
|
|
2976
|
-
status:
|
|
2977
|
-
approvedAt:
|
|
2978
|
-
notes:
|
|
3057
|
+
adminApprovePayoutResponseDataSchema = z14.object({
|
|
3058
|
+
payout: z14.object({
|
|
3059
|
+
id: z14.string(),
|
|
3060
|
+
referrerId: z14.string(),
|
|
3061
|
+
referrerName: z14.string(),
|
|
3062
|
+
amount: z14.number(),
|
|
3063
|
+
wallet: z14.string(),
|
|
3064
|
+
status: z14.literal("approved"),
|
|
3065
|
+
approvedAt: z14.string(),
|
|
3066
|
+
notes: z14.string().nullable()
|
|
2979
3067
|
})
|
|
2980
3068
|
});
|
|
2981
|
-
adminSkipPayoutResponseDataSchema =
|
|
2982
|
-
payout:
|
|
2983
|
-
id:
|
|
2984
|
-
referrerId:
|
|
2985
|
-
status:
|
|
2986
|
-
periodStart:
|
|
2987
|
-
periodEnd:
|
|
2988
|
-
notes:
|
|
3069
|
+
adminSkipPayoutResponseDataSchema = z14.object({
|
|
3070
|
+
payout: z14.object({
|
|
3071
|
+
id: z14.string(),
|
|
3072
|
+
referrerId: z14.string(),
|
|
3073
|
+
status: z14.literal("skipped"),
|
|
3074
|
+
periodStart: z14.string(),
|
|
3075
|
+
periodEnd: z14.string(),
|
|
3076
|
+
notes: z14.string().nullable()
|
|
2989
3077
|
})
|
|
2990
3078
|
});
|
|
2991
|
-
adminForfeitPayoutResponseDataSchema =
|
|
2992
|
-
payout:
|
|
2993
|
-
id:
|
|
2994
|
-
referrerId:
|
|
2995
|
-
amount:
|
|
2996
|
-
status:
|
|
2997
|
-
notes:
|
|
3079
|
+
adminForfeitPayoutResponseDataSchema = z14.object({
|
|
3080
|
+
payout: z14.object({
|
|
3081
|
+
id: z14.string(),
|
|
3082
|
+
referrerId: z14.string(),
|
|
3083
|
+
amount: z14.number(),
|
|
3084
|
+
status: z14.literal("forfeited"),
|
|
3085
|
+
notes: z14.string()
|
|
2998
3086
|
})
|
|
2999
3087
|
});
|
|
3000
|
-
adminRecordTxResponseDataSchema =
|
|
3001
|
-
payout:
|
|
3002
|
-
id:
|
|
3003
|
-
referrerId:
|
|
3004
|
-
amount:
|
|
3005
|
-
status:
|
|
3006
|
-
txSignature:
|
|
3007
|
-
completedAt:
|
|
3088
|
+
adminRecordTxResponseDataSchema = z14.object({
|
|
3089
|
+
payout: z14.object({
|
|
3090
|
+
id: z14.string(),
|
|
3091
|
+
referrerId: z14.string(),
|
|
3092
|
+
amount: z14.number(),
|
|
3093
|
+
status: z14.literal("completed"),
|
|
3094
|
+
txSignature: z14.string(),
|
|
3095
|
+
completedAt: z14.string().nullable()
|
|
3008
3096
|
})
|
|
3009
3097
|
});
|
|
3010
|
-
adminReferrerIdParamsSchema =
|
|
3011
|
-
referrerId:
|
|
3012
|
-
});
|
|
3013
|
-
adminReferralOverviewResponseDataSchema =
|
|
3014
|
-
totalReferrers:
|
|
3015
|
-
totalReferees:
|
|
3016
|
-
totalVolumeUsd:
|
|
3017
|
-
totalEarned:
|
|
3018
|
-
totalPaidOut:
|
|
3019
|
-
totalPending:
|
|
3020
|
-
topReferrers:
|
|
3021
|
-
referrerId:
|
|
3022
|
-
name:
|
|
3023
|
-
handle:
|
|
3024
|
-
payoutWallet:
|
|
3025
|
-
referralCount:
|
|
3026
|
-
totalVolumeUsd:
|
|
3027
|
-
totalEarned:
|
|
3028
|
-
totalPaidOut:
|
|
3029
|
-
pendingAmount:
|
|
3030
|
-
solanaEarned:
|
|
3031
|
-
hyperliquidEarned:
|
|
3032
|
-
dbcPoolEarned:
|
|
3098
|
+
adminReferrerIdParamsSchema = z14.object({
|
|
3099
|
+
referrerId: z14.string().uuid()
|
|
3100
|
+
});
|
|
3101
|
+
adminReferralOverviewResponseDataSchema = z14.object({
|
|
3102
|
+
totalReferrers: z14.number(),
|
|
3103
|
+
totalReferees: z14.number(),
|
|
3104
|
+
totalVolumeUsd: z14.number(),
|
|
3105
|
+
totalEarned: z14.number(),
|
|
3106
|
+
totalPaidOut: z14.number(),
|
|
3107
|
+
totalPending: z14.number(),
|
|
3108
|
+
topReferrers: z14.array(z14.object({
|
|
3109
|
+
referrerId: z14.string(),
|
|
3110
|
+
name: z14.string(),
|
|
3111
|
+
handle: z14.string().nullable(),
|
|
3112
|
+
payoutWallet: z14.string().nullable(),
|
|
3113
|
+
referralCount: z14.number(),
|
|
3114
|
+
totalVolumeUsd: z14.number(),
|
|
3115
|
+
totalEarned: z14.number(),
|
|
3116
|
+
totalPaidOut: z14.number(),
|
|
3117
|
+
pendingAmount: z14.number(),
|
|
3118
|
+
solanaEarned: z14.number(),
|
|
3119
|
+
hyperliquidEarned: z14.number(),
|
|
3120
|
+
dbcPoolEarned: z14.number()
|
|
3033
3121
|
}))
|
|
3034
3122
|
});
|
|
3035
|
-
adminReferralTradesQuerySchema =
|
|
3036
|
-
limit:
|
|
3037
|
-
offset:
|
|
3038
|
-
});
|
|
3039
|
-
adminReferralTradesResponseDataSchema =
|
|
3040
|
-
trades:
|
|
3041
|
-
id:
|
|
3042
|
-
chain:
|
|
3043
|
-
agentId:
|
|
3044
|
-
refereeName:
|
|
3045
|
-
refereeHandle:
|
|
3046
|
-
tokenAddress:
|
|
3047
|
-
valueUsd:
|
|
3048
|
-
feeAmount:
|
|
3049
|
-
referrerFeeBps:
|
|
3050
|
-
treasuryFeeBps:
|
|
3051
|
-
referrerEarnedUsd:
|
|
3052
|
-
txSignature:
|
|
3053
|
-
timestamp:
|
|
3123
|
+
adminReferralTradesQuerySchema = z14.object({
|
|
3124
|
+
limit: z14.coerce.number().int().min(1).default(50).transform((v) => Math.min(v, 100)),
|
|
3125
|
+
offset: z14.coerce.number().int().min(0).default(0)
|
|
3126
|
+
});
|
|
3127
|
+
adminReferralTradesResponseDataSchema = z14.object({
|
|
3128
|
+
trades: z14.array(z14.object({
|
|
3129
|
+
id: z14.string(),
|
|
3130
|
+
chain: z14.string(),
|
|
3131
|
+
agentId: z14.string(),
|
|
3132
|
+
refereeName: z14.string(),
|
|
3133
|
+
refereeHandle: z14.string().nullable(),
|
|
3134
|
+
tokenAddress: z14.string(),
|
|
3135
|
+
valueUsd: z14.number(),
|
|
3136
|
+
feeAmount: z14.number(),
|
|
3137
|
+
referrerFeeBps: z14.number().nullable(),
|
|
3138
|
+
treasuryFeeBps: z14.number().nullable(),
|
|
3139
|
+
referrerEarnedUsd: z14.number(),
|
|
3140
|
+
txSignature: z14.string().nullable(),
|
|
3141
|
+
timestamp: z14.string().nullable()
|
|
3054
3142
|
})),
|
|
3055
|
-
pagination:
|
|
3056
|
-
limit:
|
|
3057
|
-
offset:
|
|
3058
|
-
total:
|
|
3059
|
-
hasMore:
|
|
3143
|
+
pagination: z14.object({
|
|
3144
|
+
limit: z14.number(),
|
|
3145
|
+
offset: z14.number(),
|
|
3146
|
+
total: z14.number(),
|
|
3147
|
+
hasMore: z14.boolean()
|
|
3060
3148
|
})
|
|
3061
3149
|
});
|
|
3062
|
-
adminReferralGamingSignalSchema =
|
|
3063
|
-
type:
|
|
3064
|
-
severity:
|
|
3065
|
-
description:
|
|
3066
|
-
evidence:
|
|
3067
|
-
});
|
|
3068
|
-
adminReferralSignalsResponseDataSchema =
|
|
3069
|
-
referrerId:
|
|
3070
|
-
overallRisk:
|
|
3071
|
-
signals:
|
|
3072
|
-
});
|
|
3073
|
-
adminAgentIdParamsSchema =
|
|
3074
|
-
agentId:
|
|
3075
|
-
});
|
|
3076
|
-
adminCreateAgentRequestSchema =
|
|
3077
|
-
name:
|
|
3078
|
-
handle:
|
|
3079
|
-
bio:
|
|
3080
|
-
avatarUrl:
|
|
3081
|
-
generation:
|
|
3082
|
-
serverPlan:
|
|
3083
|
-
llmModel:
|
|
3084
|
-
llmBudgetUsd:
|
|
3085
|
-
inboxPriceUsd:
|
|
3086
|
-
});
|
|
3087
|
-
adminUpdateAgentRequestSchema =
|
|
3088
|
-
name:
|
|
3089
|
-
handle:
|
|
3090
|
-
bio:
|
|
3091
|
-
avatarUrl:
|
|
3092
|
-
llmModel:
|
|
3093
|
-
llmBudgetUsd:
|
|
3094
|
-
serverPlan:
|
|
3095
|
-
generation:
|
|
3096
|
-
inboxPriceUsd:
|
|
3097
|
-
isAlive:
|
|
3150
|
+
adminReferralGamingSignalSchema = z14.object({
|
|
3151
|
+
type: z14.string(),
|
|
3152
|
+
severity: z14.enum(["low", "medium", "high"]),
|
|
3153
|
+
description: z14.string(),
|
|
3154
|
+
evidence: z14.record(z14.string(), z14.unknown())
|
|
3155
|
+
});
|
|
3156
|
+
adminReferralSignalsResponseDataSchema = z14.object({
|
|
3157
|
+
referrerId: z14.string(),
|
|
3158
|
+
overallRisk: z14.enum(["low", "medium", "high"]),
|
|
3159
|
+
signals: z14.array(adminReferralGamingSignalSchema)
|
|
3160
|
+
});
|
|
3161
|
+
adminAgentIdParamsSchema = z14.object({
|
|
3162
|
+
agentId: z14.string().uuid()
|
|
3163
|
+
});
|
|
3164
|
+
adminCreateAgentRequestSchema = z14.object({
|
|
3165
|
+
name: z14.string().min(1).max(100),
|
|
3166
|
+
handle: z14.string().max(50).optional(),
|
|
3167
|
+
bio: z14.string().max(500).optional(),
|
|
3168
|
+
avatarUrl: z14.string().url().optional(),
|
|
3169
|
+
generation: z14.number().int().optional(),
|
|
3170
|
+
serverPlan: z14.enum(["basic", "standard", "pro"]).optional(),
|
|
3171
|
+
llmModel: z14.string().optional(),
|
|
3172
|
+
llmBudgetUsd: z14.number().optional(),
|
|
3173
|
+
inboxPriceUsd: z14.number().optional()
|
|
3174
|
+
});
|
|
3175
|
+
adminUpdateAgentRequestSchema = z14.object({
|
|
3176
|
+
name: z14.string().min(1).max(100).optional(),
|
|
3177
|
+
handle: z14.string().max(50).optional(),
|
|
3178
|
+
bio: z14.string().max(500).optional(),
|
|
3179
|
+
avatarUrl: z14.string().url().nullable().optional(),
|
|
3180
|
+
llmModel: z14.string().optional(),
|
|
3181
|
+
llmBudgetUsd: z14.number().optional(),
|
|
3182
|
+
serverPlan: z14.enum(["basic", "standard", "pro"]).optional(),
|
|
3183
|
+
generation: z14.number().int().optional(),
|
|
3184
|
+
inboxPriceUsd: z14.number().optional(),
|
|
3185
|
+
isAlive: z14.boolean().optional()
|
|
3098
3186
|
}).refine((obj) => Object.keys(obj).length > 0, { message: "At least one field required" });
|
|
3099
|
-
adminUserIdParamsSchema =
|
|
3100
|
-
userId:
|
|
3101
|
-
});
|
|
3102
|
-
adminUsersQuerySchema =
|
|
3103
|
-
limit:
|
|
3104
|
-
offset:
|
|
3105
|
-
search:
|
|
3106
|
-
});
|
|
3107
|
-
adminUpdateUserRequestSchema =
|
|
3108
|
-
role:
|
|
3109
|
-
banned:
|
|
3110
|
-
banReason:
|
|
3111
|
-
banExpiresIn:
|
|
3112
|
-
shadowbanned:
|
|
3187
|
+
adminUserIdParamsSchema = z14.object({
|
|
3188
|
+
userId: z14.string().uuid()
|
|
3189
|
+
});
|
|
3190
|
+
adminUsersQuerySchema = z14.object({
|
|
3191
|
+
limit: z14.coerce.number().int().min(1).default(25).transform((v) => Math.min(v, 100)),
|
|
3192
|
+
offset: z14.coerce.number().int().min(0).default(0),
|
|
3193
|
+
search: z14.string().optional()
|
|
3194
|
+
});
|
|
3195
|
+
adminUpdateUserRequestSchema = z14.object({
|
|
3196
|
+
role: z14.enum(["admin", "user"]).optional(),
|
|
3197
|
+
banned: z14.boolean().optional(),
|
|
3198
|
+
banReason: z14.string().optional(),
|
|
3199
|
+
banExpiresIn: z14.number().positive().optional(),
|
|
3200
|
+
shadowbanned: z14.boolean().optional()
|
|
3113
3201
|
}).refine((obj) => Object.keys(obj).length > 0, { message: "At least one field required" });
|
|
3114
|
-
adminCreateAgentResponseDataSchema =
|
|
3115
|
-
agent:
|
|
3116
|
-
id:
|
|
3117
|
-
name:
|
|
3118
|
-
handle:
|
|
3119
|
-
email:
|
|
3202
|
+
adminCreateAgentResponseDataSchema = z14.object({
|
|
3203
|
+
agent: z14.object({
|
|
3204
|
+
id: z14.string().uuid(),
|
|
3205
|
+
name: z14.string(),
|
|
3206
|
+
handle: z14.string().nullable(),
|
|
3207
|
+
email: z14.string()
|
|
3120
3208
|
})
|
|
3121
3209
|
});
|
|
3122
|
-
adminUpdateAgentResponseDataSchema =
|
|
3123
|
-
ok:
|
|
3210
|
+
adminUpdateAgentResponseDataSchema = z14.object({
|
|
3211
|
+
ok: z14.boolean()
|
|
3124
3212
|
});
|
|
3125
|
-
adminUsersResponseDataSchema =
|
|
3126
|
-
users:
|
|
3127
|
-
id:
|
|
3128
|
-
name:
|
|
3129
|
-
email:
|
|
3130
|
-
role:
|
|
3131
|
-
banned:
|
|
3132
|
-
banReason:
|
|
3133
|
-
banExpires:
|
|
3134
|
-
shadowbanned:
|
|
3135
|
-
createdAt:
|
|
3213
|
+
adminUsersResponseDataSchema = z14.object({
|
|
3214
|
+
users: z14.array(z14.object({
|
|
3215
|
+
id: z14.string().uuid(),
|
|
3216
|
+
name: z14.string().nullable(),
|
|
3217
|
+
email: z14.string().nullable(),
|
|
3218
|
+
role: z14.string().nullable(),
|
|
3219
|
+
banned: z14.boolean().nullable(),
|
|
3220
|
+
banReason: z14.string().nullable(),
|
|
3221
|
+
banExpires: z14.string().nullable(),
|
|
3222
|
+
shadowbanned: z14.boolean().nullable(),
|
|
3223
|
+
createdAt: z14.string().nullable()
|
|
3136
3224
|
})),
|
|
3137
|
-
total:
|
|
3138
|
-
});
|
|
3139
|
-
adminUpdateUserResponseDataSchema =
|
|
3140
|
-
user:
|
|
3141
|
-
});
|
|
3142
|
-
adminIncubatorBirthRequestSchema =
|
|
3143
|
-
action:
|
|
3144
|
-
skipBalanceCheck:
|
|
3145
|
-
});
|
|
3146
|
-
adminIncubatorAdjustRequestSchema =
|
|
3147
|
-
amountUsd:
|
|
3148
|
-
source:
|
|
3149
|
-
note:
|
|
3150
|
-
});
|
|
3151
|
-
adminIncubatorWalletRequestSchema =
|
|
3152
|
-
walletId:
|
|
3153
|
-
walletAddress:
|
|
3154
|
-
});
|
|
3155
|
-
adminIncubatorTransactionsQuerySchema =
|
|
3156
|
-
limit:
|
|
3157
|
-
offset:
|
|
3158
|
-
source:
|
|
3159
|
-
});
|
|
3160
|
-
adminIncubatorPoolResponseDataSchema =
|
|
3161
|
-
balance_usd:
|
|
3162
|
-
threshold_usd:
|
|
3163
|
-
progress_pct:
|
|
3164
|
-
total_born:
|
|
3165
|
-
alive_count:
|
|
3166
|
-
dead_count:
|
|
3167
|
-
generation:
|
|
3168
|
-
birth_status:
|
|
3169
|
-
birth_paused:
|
|
3170
|
-
pool_wallet_id:
|
|
3171
|
-
pool_wallet_address:
|
|
3172
|
-
incubator_fee_percent:
|
|
3173
|
-
birth_threshold_usd:
|
|
3174
|
-
onChainBalanceSol:
|
|
3175
|
-
onChainBalanceUsd:
|
|
3176
|
-
});
|
|
3177
|
-
adminIncubatorTransactionSchema =
|
|
3178
|
-
id:
|
|
3179
|
-
amountUsd:
|
|
3180
|
-
source:
|
|
3181
|
-
sourceTradeId:
|
|
3182
|
-
adminNote:
|
|
3183
|
-
createdAt:
|
|
3184
|
-
});
|
|
3185
|
-
adminIncubatorTransactionsResponseDataSchema =
|
|
3186
|
-
transactions:
|
|
3187
|
-
total:
|
|
3188
|
-
});
|
|
3189
|
-
adminIncubatorBirthResponseDataSchema =
|
|
3190
|
-
ok:
|
|
3191
|
-
action:
|
|
3192
|
-
agent:
|
|
3193
|
-
id:
|
|
3194
|
-
number:
|
|
3195
|
-
solanaAddress:
|
|
3225
|
+
total: z14.number()
|
|
3226
|
+
});
|
|
3227
|
+
adminUpdateUserResponseDataSchema = z14.object({
|
|
3228
|
+
user: z14.record(z14.string(), z14.unknown())
|
|
3229
|
+
});
|
|
3230
|
+
adminIncubatorBirthRequestSchema = z14.object({
|
|
3231
|
+
action: z14.enum(["trigger", "pause", "resume"]),
|
|
3232
|
+
skipBalanceCheck: z14.boolean().optional().default(false)
|
|
3233
|
+
});
|
|
3234
|
+
adminIncubatorAdjustRequestSchema = z14.object({
|
|
3235
|
+
amountUsd: z14.number(),
|
|
3236
|
+
source: z14.enum(["manual_credit", "manual_debit", "birth_refund"]),
|
|
3237
|
+
note: z14.string().min(1)
|
|
3238
|
+
});
|
|
3239
|
+
adminIncubatorWalletRequestSchema = z14.object({
|
|
3240
|
+
walletId: z14.string().min(1),
|
|
3241
|
+
walletAddress: z14.string().min(1)
|
|
3242
|
+
});
|
|
3243
|
+
adminIncubatorTransactionsQuerySchema = z14.object({
|
|
3244
|
+
limit: z14.coerce.number().int().min(1).default(50).transform((v) => Math.min(v, 100)),
|
|
3245
|
+
offset: z14.coerce.number().int().min(0).default(0),
|
|
3246
|
+
source: z14.string().optional()
|
|
3247
|
+
});
|
|
3248
|
+
adminIncubatorPoolResponseDataSchema = z14.object({
|
|
3249
|
+
balance_usd: z14.number(),
|
|
3250
|
+
threshold_usd: z14.number(),
|
|
3251
|
+
progress_pct: z14.number(),
|
|
3252
|
+
total_born: z14.number(),
|
|
3253
|
+
alive_count: z14.number(),
|
|
3254
|
+
dead_count: z14.number(),
|
|
3255
|
+
generation: z14.number(),
|
|
3256
|
+
birth_status: z14.string(),
|
|
3257
|
+
birth_paused: z14.boolean(),
|
|
3258
|
+
pool_wallet_id: z14.string().nullable(),
|
|
3259
|
+
pool_wallet_address: z14.string().nullable(),
|
|
3260
|
+
incubator_fee_percent: z14.number(),
|
|
3261
|
+
birth_threshold_usd: z14.number(),
|
|
3262
|
+
onChainBalanceSol: z14.number(),
|
|
3263
|
+
onChainBalanceUsd: z14.number()
|
|
3264
|
+
});
|
|
3265
|
+
adminIncubatorTransactionSchema = z14.object({
|
|
3266
|
+
id: z14.string().uuid(),
|
|
3267
|
+
amountUsd: z14.number(),
|
|
3268
|
+
source: z14.string(),
|
|
3269
|
+
sourceTradeId: z14.string().nullable(),
|
|
3270
|
+
adminNote: z14.string().nullable(),
|
|
3271
|
+
createdAt: z14.string()
|
|
3272
|
+
});
|
|
3273
|
+
adminIncubatorTransactionsResponseDataSchema = z14.object({
|
|
3274
|
+
transactions: z14.array(adminIncubatorTransactionSchema),
|
|
3275
|
+
total: z14.number()
|
|
3276
|
+
});
|
|
3277
|
+
adminIncubatorBirthResponseDataSchema = z14.object({
|
|
3278
|
+
ok: z14.literal(true),
|
|
3279
|
+
action: z14.enum(["triggered", "paused", "resumed"]),
|
|
3280
|
+
agent: z14.object({
|
|
3281
|
+
id: z14.string(),
|
|
3282
|
+
number: z14.number(),
|
|
3283
|
+
solanaAddress: z14.string()
|
|
3196
3284
|
}).optional(),
|
|
3197
|
-
transferHash:
|
|
3285
|
+
transferHash: z14.string().nullable().optional()
|
|
3198
3286
|
});
|
|
3199
|
-
adminIncubatorAdjustResponseDataSchema =
|
|
3200
|
-
ok:
|
|
3201
|
-
balanceUsd:
|
|
3202
|
-
birthStatus:
|
|
3287
|
+
adminIncubatorAdjustResponseDataSchema = z14.object({
|
|
3288
|
+
ok: z14.literal(true),
|
|
3289
|
+
balanceUsd: z14.number(),
|
|
3290
|
+
birthStatus: z14.string()
|
|
3203
3291
|
});
|
|
3204
|
-
adminIncubatorWalletResponseDataSchema =
|
|
3205
|
-
ok:
|
|
3206
|
-
walletId:
|
|
3207
|
-
walletAddress:
|
|
3292
|
+
adminIncubatorWalletResponseDataSchema = z14.object({
|
|
3293
|
+
ok: z14.literal(true),
|
|
3294
|
+
walletId: z14.string(),
|
|
3295
|
+
walletAddress: z14.string()
|
|
3208
3296
|
});
|
|
3209
3297
|
adminDisputesResponseSchema = successEnvelope(adminDisputesResponseDataSchema);
|
|
3210
3298
|
adminResolveDisputeResponseSchema = successEnvelope(adminResolveDisputeResponseDataSchema);
|
|
@@ -3217,46 +3305,46 @@ var init_admin = __esm(() => {
|
|
|
3217
3305
|
});
|
|
3218
3306
|
|
|
3219
3307
|
// ../../packages/client/src/schemas/auth.ts
|
|
3220
|
-
import { z as
|
|
3308
|
+
import { z as z15 } from "zod";
|
|
3221
3309
|
var authApiKeysCreateRequestSchema, authApiKeysDeleteRequestSchema, authSetupRequestSchema, authApiKeysListResponseDataSchema, authApiKeysCreateResponseDataSchema, authApiKeysDeleteResponseDataSchema, authSetupResponseDataSchema, authApiKeysListResponseSchema, authApiKeysCreateResponseSchema, authApiKeysDeleteResponseSchema, authSetupResponseSchema;
|
|
3222
3310
|
var init_auth = __esm(() => {
|
|
3223
3311
|
init_common();
|
|
3224
|
-
authApiKeysCreateRequestSchema =
|
|
3225
|
-
name:
|
|
3226
|
-
});
|
|
3227
|
-
authApiKeysDeleteRequestSchema =
|
|
3228
|
-
keyId:
|
|
3229
|
-
});
|
|
3230
|
-
authSetupRequestSchema =
|
|
3231
|
-
name:
|
|
3232
|
-
handle:
|
|
3233
|
-
referralCode:
|
|
3234
|
-
});
|
|
3235
|
-
authApiKeysListResponseDataSchema =
|
|
3236
|
-
keys:
|
|
3237
|
-
id:
|
|
3238
|
-
name:
|
|
3239
|
-
start:
|
|
3240
|
-
createdAt:
|
|
3312
|
+
authApiKeysCreateRequestSchema = z15.object({
|
|
3313
|
+
name: z15.string().trim().min(1).max(120).optional()
|
|
3314
|
+
});
|
|
3315
|
+
authApiKeysDeleteRequestSchema = z15.object({
|
|
3316
|
+
keyId: z15.string().min(1)
|
|
3317
|
+
});
|
|
3318
|
+
authSetupRequestSchema = z15.object({
|
|
3319
|
+
name: z15.string().trim().min(1).max(120).optional(),
|
|
3320
|
+
handle: z15.string().trim().min(1).max(120).optional(),
|
|
3321
|
+
referralCode: z15.string().trim().min(1).max(120).optional()
|
|
3322
|
+
});
|
|
3323
|
+
authApiKeysListResponseDataSchema = z15.object({
|
|
3324
|
+
keys: z15.array(z15.object({
|
|
3325
|
+
id: z15.string(),
|
|
3326
|
+
name: z15.string().nullable(),
|
|
3327
|
+
start: z15.string(),
|
|
3328
|
+
createdAt: z15.string()
|
|
3241
3329
|
}))
|
|
3242
3330
|
});
|
|
3243
|
-
authApiKeysCreateResponseDataSchema =
|
|
3244
|
-
key:
|
|
3245
|
-
id:
|
|
3246
|
-
start:
|
|
3331
|
+
authApiKeysCreateResponseDataSchema = z15.object({
|
|
3332
|
+
key: z15.string(),
|
|
3333
|
+
id: z15.string(),
|
|
3334
|
+
start: z15.string()
|
|
3247
3335
|
});
|
|
3248
|
-
authApiKeysDeleteResponseDataSchema =
|
|
3249
|
-
revoked:
|
|
3336
|
+
authApiKeysDeleteResponseDataSchema = z15.object({
|
|
3337
|
+
revoked: z15.boolean()
|
|
3250
3338
|
});
|
|
3251
|
-
authSetupResponseDataSchema =
|
|
3252
|
-
userId:
|
|
3253
|
-
solanaAddress:
|
|
3254
|
-
hlAddress:
|
|
3255
|
-
handle:
|
|
3256
|
-
apiKeyHint:
|
|
3257
|
-
apiKey:
|
|
3258
|
-
cliCommand:
|
|
3259
|
-
isNew:
|
|
3339
|
+
authSetupResponseDataSchema = z15.object({
|
|
3340
|
+
userId: z15.string().uuid(),
|
|
3341
|
+
solanaAddress: z15.string().nullable(),
|
|
3342
|
+
hlAddress: z15.string().nullable().optional(),
|
|
3343
|
+
handle: z15.string().nullable(),
|
|
3344
|
+
apiKeyHint: z15.string().nullable(),
|
|
3345
|
+
apiKey: z15.string().optional(),
|
|
3346
|
+
cliCommand: z15.string().optional(),
|
|
3347
|
+
isNew: z15.boolean()
|
|
3260
3348
|
});
|
|
3261
3349
|
authApiKeysListResponseSchema = successEnvelope(authApiKeysListResponseDataSchema);
|
|
3262
3350
|
authApiKeysCreateResponseSchema = successEnvelope(authApiKeysCreateResponseDataSchema);
|
|
@@ -3265,122 +3353,57 @@ var init_auth = __esm(() => {
|
|
|
3265
3353
|
});
|
|
3266
3354
|
|
|
3267
3355
|
// ../../packages/client/src/schemas/claim.ts
|
|
3268
|
-
import { z as
|
|
3356
|
+
import { z as z16 } from "zod";
|
|
3269
3357
|
var claimTokenParamsSchema, claimInfoResponseDataSchema, claimInfoResponseSchema;
|
|
3270
3358
|
var init_claim = __esm(() => {
|
|
3271
3359
|
init_common();
|
|
3272
|
-
claimTokenParamsSchema =
|
|
3273
|
-
token:
|
|
3274
|
-
});
|
|
3275
|
-
claimInfoResponseDataSchema =
|
|
3276
|
-
claimed:
|
|
3277
|
-
agent:
|
|
3278
|
-
name:
|
|
3279
|
-
handle:
|
|
3280
|
-
bio:
|
|
3281
|
-
avatar:
|
|
3360
|
+
claimTokenParamsSchema = z16.object({
|
|
3361
|
+
token: z16.string().trim().min(1, "Claim token is required")
|
|
3362
|
+
});
|
|
3363
|
+
claimInfoResponseDataSchema = z16.object({
|
|
3364
|
+
claimed: z16.boolean(),
|
|
3365
|
+
agent: z16.object({
|
|
3366
|
+
name: z16.string(),
|
|
3367
|
+
handle: z16.string().nullable().optional(),
|
|
3368
|
+
bio: z16.string().nullable(),
|
|
3369
|
+
avatar: z16.string().nullable()
|
|
3282
3370
|
}),
|
|
3283
|
-
verificationCode:
|
|
3284
|
-
tweetText:
|
|
3285
|
-
instructions:
|
|
3371
|
+
verificationCode: z16.string().optional(),
|
|
3372
|
+
tweetText: z16.string().optional(),
|
|
3373
|
+
instructions: z16.string().optional()
|
|
3286
3374
|
});
|
|
3287
3375
|
claimInfoResponseSchema = successEnvelope(claimInfoResponseDataSchema);
|
|
3288
3376
|
});
|
|
3289
3377
|
|
|
3290
3378
|
// ../../packages/client/src/schemas/dashboard.ts
|
|
3291
|
-
import { z as
|
|
3379
|
+
import { z as z17 } from "zod";
|
|
3292
3380
|
var dashboardStatusResponseDataSchema, dashboardStatusResponseSchema;
|
|
3293
3381
|
var init_dashboard = __esm(() => {
|
|
3294
3382
|
init_common();
|
|
3295
|
-
dashboardStatusResponseDataSchema =
|
|
3296
|
-
solanaAddress:
|
|
3297
|
-
hlAddress:
|
|
3298
|
-
solanaBalance:
|
|
3299
|
-
claimToken:
|
|
3300
|
-
steps:
|
|
3301
|
-
funded:
|
|
3302
|
-
agentConnected:
|
|
3303
|
-
xConnected:
|
|
3383
|
+
dashboardStatusResponseDataSchema = z17.object({
|
|
3384
|
+
solanaAddress: z17.string().nullable(),
|
|
3385
|
+
hlAddress: z17.string().nullable(),
|
|
3386
|
+
solanaBalance: z17.number(),
|
|
3387
|
+
claimToken: z17.string(),
|
|
3388
|
+
steps: z17.object({
|
|
3389
|
+
funded: z17.boolean(),
|
|
3390
|
+
agentConnected: z17.boolean(),
|
|
3391
|
+
xConnected: z17.boolean().nullable()
|
|
3304
3392
|
}),
|
|
3305
|
-
apiKeyHint:
|
|
3306
|
-
xHandle:
|
|
3307
|
-
handle:
|
|
3308
|
-
stats:
|
|
3309
|
-
totalValueUsd:
|
|
3310
|
-
pnlAllTime:
|
|
3311
|
-
pnl24h:
|
|
3312
|
-
pnl7d:
|
|
3313
|
-
lastTradeAt:
|
|
3393
|
+
apiKeyHint: z17.string().nullable(),
|
|
3394
|
+
xHandle: z17.string().nullable(),
|
|
3395
|
+
handle: z17.string().nullable(),
|
|
3396
|
+
stats: z17.object({
|
|
3397
|
+
totalValueUsd: z17.number(),
|
|
3398
|
+
pnlAllTime: z17.number(),
|
|
3399
|
+
pnl24h: z17.number(),
|
|
3400
|
+
pnl7d: z17.number(),
|
|
3401
|
+
lastTradeAt: z17.string().nullable()
|
|
3314
3402
|
}).nullable()
|
|
3315
3403
|
});
|
|
3316
3404
|
dashboardStatusResponseSchema = successEnvelope(dashboardStatusResponseDataSchema);
|
|
3317
3405
|
});
|
|
3318
3406
|
|
|
3319
|
-
// ../../packages/client/src/schemas/notifications.ts
|
|
3320
|
-
import { z as z17 } from "zod";
|
|
3321
|
-
var queryBooleanSchema2, notificationIdParamsSchema, notificationsListQuerySchema, notificationsMarkAllReadRequestSchema, notificationsPatchRequestSchema, notificationRecordSchema, notificationsListResponseDataSchema, notificationsMarkAllReadResponseDataSchema, notificationsPatchResponseDataSchema, notificationsDeleteResponseDataSchema, notificationsListResponseSchema, notificationsMarkAllReadResponseSchema, notificationsPatchResponseSchema, notificationsDeleteResponseSchema;
|
|
3322
|
-
var init_notifications = __esm(() => {
|
|
3323
|
-
init_common();
|
|
3324
|
-
queryBooleanSchema2 = z17.preprocess((value) => {
|
|
3325
|
-
if (value === undefined || value === null || value === "")
|
|
3326
|
-
return;
|
|
3327
|
-
if (value === true || value === "true")
|
|
3328
|
-
return true;
|
|
3329
|
-
if (value === false || value === "false")
|
|
3330
|
-
return false;
|
|
3331
|
-
return value;
|
|
3332
|
-
}, z17.boolean());
|
|
3333
|
-
notificationIdParamsSchema = z17.object({
|
|
3334
|
-
id: z17.string().uuid()
|
|
3335
|
-
});
|
|
3336
|
-
notificationsListQuerySchema = z17.object({
|
|
3337
|
-
limit: z17.coerce.number().int().min(1).default(25).transform((value) => Math.min(value, 100)),
|
|
3338
|
-
offset: z17.coerce.number().int().min(0).default(0),
|
|
3339
|
-
unreadOnly: queryBooleanSchema2.default(false)
|
|
3340
|
-
});
|
|
3341
|
-
notificationsMarkAllReadRequestSchema = z17.object({
|
|
3342
|
-
action: z17.literal("mark_all_read")
|
|
3343
|
-
});
|
|
3344
|
-
notificationsPatchRequestSchema = z17.object({
|
|
3345
|
-
read: z17.boolean().optional()
|
|
3346
|
-
});
|
|
3347
|
-
notificationRecordSchema = z17.object({
|
|
3348
|
-
id: z17.string().uuid(),
|
|
3349
|
-
type: z17.string(),
|
|
3350
|
-
title: z17.string(),
|
|
3351
|
-
body: z17.string(),
|
|
3352
|
-
data: z17.record(z17.string(), z17.unknown()).nullable(),
|
|
3353
|
-
read: z17.boolean(),
|
|
3354
|
-
createdAt: z17.string()
|
|
3355
|
-
});
|
|
3356
|
-
notificationsListResponseDataSchema = z17.object({
|
|
3357
|
-
notifications: z17.array(notificationRecordSchema),
|
|
3358
|
-
unreadCount: z17.number().int().nonnegative(),
|
|
3359
|
-
pagination: z17.object({
|
|
3360
|
-
limit: z17.number().int().nonnegative(),
|
|
3361
|
-
offset: z17.number().int().nonnegative(),
|
|
3362
|
-
total: z17.number().int().nonnegative(),
|
|
3363
|
-
hasMore: z17.boolean()
|
|
3364
|
-
})
|
|
3365
|
-
});
|
|
3366
|
-
notificationsMarkAllReadResponseDataSchema = z17.object({
|
|
3367
|
-
markedAllRead: z17.boolean()
|
|
3368
|
-
});
|
|
3369
|
-
notificationsPatchResponseDataSchema = z17.object({
|
|
3370
|
-
updated: z17.boolean(),
|
|
3371
|
-
id: z17.string().uuid(),
|
|
3372
|
-
read: z17.boolean()
|
|
3373
|
-
});
|
|
3374
|
-
notificationsDeleteResponseDataSchema = z17.object({
|
|
3375
|
-
deleted: z17.boolean(),
|
|
3376
|
-
id: z17.string().uuid()
|
|
3377
|
-
});
|
|
3378
|
-
notificationsListResponseSchema = successEnvelope(notificationsListResponseDataSchema);
|
|
3379
|
-
notificationsMarkAllReadResponseSchema = successEnvelope(notificationsMarkAllReadResponseDataSchema);
|
|
3380
|
-
notificationsPatchResponseSchema = successEnvelope(notificationsPatchResponseDataSchema);
|
|
3381
|
-
notificationsDeleteResponseSchema = successEnvelope(notificationsDeleteResponseDataSchema);
|
|
3382
|
-
});
|
|
3383
|
-
|
|
3384
3407
|
// ../../packages/client/src/schemas/referrals.ts
|
|
3385
3408
|
import { z as z18 } from "zod";
|
|
3386
3409
|
var referralCodeParamsSchema, referralsPayoutWalletRequestSchema, referralCodeLookupResponseDataSchema, earningsSourceBreakdownSchema, referralsOverviewResponseDataSchema, referralsPayoutWalletResponseDataSchema, referralsPayoutsResponseDataSchema, referralCodeLookupResponseSchema, referralsOverviewResponseSchema, referralsPayoutWalletResponseSchema, referralsPayoutsResponseSchema;
|
|
@@ -4793,6 +4816,7 @@ function toStructuredError(error) {
|
|
|
4793
4816
|
code: error.error.code,
|
|
4794
4817
|
message: error.error.message,
|
|
4795
4818
|
suggestion: getSuggestionForError(error),
|
|
4819
|
+
details: parseErrorDetails(error.error.message),
|
|
4796
4820
|
...error.error.issues ? { issues: error.error.issues } : {},
|
|
4797
4821
|
...hasCheckedList(error) ? { checked: error._checked } : {}
|
|
4798
4822
|
};
|
|
@@ -4802,13 +4826,38 @@ function toStructuredError(error) {
|
|
|
4802
4826
|
return {
|
|
4803
4827
|
code: "INTERNAL_ERROR",
|
|
4804
4828
|
message: "Failed to connect to API.",
|
|
4805
|
-
suggestion: "Check your network connection. API status: https://cabal.trading"
|
|
4829
|
+
suggestion: "Check your network connection. API status: https://cabal.trading",
|
|
4830
|
+
details: { reason: "NETWORK_ERROR" }
|
|
4806
4831
|
};
|
|
4807
4832
|
}
|
|
4808
|
-
return { code: "INTERNAL_ERROR", message: error.message };
|
|
4833
|
+
return { code: "INTERNAL_ERROR", message: error.message, details: parseErrorDetails(error.message) };
|
|
4809
4834
|
}
|
|
4810
4835
|
return { code: "INTERNAL_ERROR", message: "Unknown error" };
|
|
4811
4836
|
}
|
|
4837
|
+
function parseErrorDetails(message) {
|
|
4838
|
+
const lower = message.toLowerCase();
|
|
4839
|
+
if (lower.includes("insufficient")) {
|
|
4840
|
+
return { reason: "INSUFFICIENT_BALANCE" };
|
|
4841
|
+
}
|
|
4842
|
+
if (lower.includes("slippage")) {
|
|
4843
|
+
return { reason: "SLIPPAGE_EXCEEDED" };
|
|
4844
|
+
}
|
|
4845
|
+
if (lower.includes("rate limit")) {
|
|
4846
|
+
return { reason: "RATE_LIMITED" };
|
|
4847
|
+
}
|
|
4848
|
+
if (lower.includes("too low")) {
|
|
4849
|
+
const amounts = message.match(/\$?([\d.]+)/g);
|
|
4850
|
+
if (amounts && amounts.length >= 2) {
|
|
4851
|
+
const value = parseFloat(amounts[0].replace("$", ""));
|
|
4852
|
+
const minimum = parseFloat(amounts[1].replace("$", ""));
|
|
4853
|
+
if (!isNaN(value) && !isNaN(minimum)) {
|
|
4854
|
+
return { reason: "BELOW_MINIMUM", value, minimum };
|
|
4855
|
+
}
|
|
4856
|
+
}
|
|
4857
|
+
return { reason: "BELOW_MINIMUM" };
|
|
4858
|
+
}
|
|
4859
|
+
return;
|
|
4860
|
+
}
|
|
4812
4861
|
function getSuggestionForError(error) {
|
|
4813
4862
|
switch (error.error.code) {
|
|
4814
4863
|
case ERROR_CODE.UNAUTHORIZED:
|