-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathauth.ts
More file actions
88 lines (79 loc) · 1.48 KB
/
auth.ts
File metadata and controls
88 lines (79 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
export enum UserRole {
USER = 'user',
ADMIN = 'admin',
}
export interface TwitterProfile {
followersCount: number;
verified: boolean;
}
export interface UserProfile {
username?: string;
userId?: string;
agentname?: string;
email?: string;
avatar?: string;
bio?: string | string[];
walletAddress?: string;
level: number;
experience: number;
nextLevelExp: number;
points: number;
tweetFrequency: {
dailyLimit: number;
currentCount: number;
lastTweetTime?: number;
};
stats: {
totalTweets: number;
successfulTweets: number;
failedTweets: number;
};
style?: {
all: string[];
chat: string[];
post: string[];
};
adjectives?: string[];
lore?: string[];
knowledge?: string[];
topics?: string[];
}
export interface LoginForm {
username: string;
password: string;
email: string;
}
export interface AgentConfig {
styles: string[];
kols: string[];
quote: string;
}
export interface ProfileUpdateRequest {
agentId: string;
profile: UserProfile;
}
export interface ProfileUpdateResponse {
success: boolean;
message: string;
data?: {
profile: UserProfile;
};
}
export interface ProfileQueryResponse {
success: boolean;
profile?: UserProfile;
error?: string;
}
export interface LoginResponse {
success: boolean;
message: string;
data?: {
profile: UserProfile;
twitterProfile: TwitterProfile;
};
}
export interface ApiResponse<T> {
success: boolean;
message: string;
data?: T;
}