abckit 0.0.11 → 0.0.13
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.
|
@@ -1,171 +1,74 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
message?: string | undefined;
|
|
16
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
17
|
-
};
|
|
18
|
-
} & {
|
|
19
|
-
admin: {
|
|
20
|
-
getUser: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
|
|
21
|
-
id: string;
|
|
22
|
-
}> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
23
|
-
query: {
|
|
24
|
-
id: string;
|
|
1
|
+
/**
|
|
2
|
+
* Main authentication composable for Better Auth
|
|
3
|
+
*/
|
|
4
|
+
export declare function useAuth(): {
|
|
5
|
+
session: Readonly<import("vue").Ref<{
|
|
6
|
+
readonly data: {
|
|
7
|
+
readonly user: {
|
|
8
|
+
readonly id: string;
|
|
9
|
+
readonly createdAt: Date;
|
|
10
|
+
readonly updatedAt: Date;
|
|
11
|
+
readonly email: string;
|
|
12
|
+
readonly emailVerified: boolean;
|
|
13
|
+
readonly name: string;
|
|
14
|
+
readonly image?: string | null | undefined;
|
|
25
15
|
};
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}, {
|
|
36
|
-
code?: string | undefined;
|
|
37
|
-
message?: string | undefined;
|
|
38
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
39
|
-
};
|
|
40
|
-
} & {
|
|
41
|
-
admin: {
|
|
42
|
-
createUser: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
43
|
-
email: string;
|
|
44
|
-
password: string;
|
|
45
|
-
name: string;
|
|
46
|
-
role?: "user" | "admin" | ("user" | "admin")[] | undefined;
|
|
47
|
-
data?: Record<string, any> | undefined;
|
|
48
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
49
|
-
email: string;
|
|
50
|
-
password: string;
|
|
51
|
-
name: string;
|
|
52
|
-
role?: "user" | "admin" | ("user" | "admin")[] | undefined;
|
|
53
|
-
data?: Record<string, any> | undefined;
|
|
54
|
-
} & {
|
|
55
|
-
fetchOptions?: FetchOptions | undefined;
|
|
56
|
-
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
57
|
-
user: import("better-auth/client/plugins").UserWithRole;
|
|
58
|
-
}, {
|
|
59
|
-
code?: string | undefined;
|
|
60
|
-
message?: string | undefined;
|
|
61
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
62
|
-
};
|
|
63
|
-
} & {
|
|
64
|
-
admin: {
|
|
65
|
-
updateUser: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
66
|
-
userId: unknown;
|
|
67
|
-
data: Record<any, any>;
|
|
68
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
69
|
-
userId: unknown;
|
|
70
|
-
data: Record<any, any>;
|
|
71
|
-
} & {
|
|
72
|
-
fetchOptions?: FetchOptions | undefined;
|
|
73
|
-
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<import("better-auth/client/plugins").UserWithRole, {
|
|
74
|
-
code?: string | undefined;
|
|
75
|
-
message?: string | undefined;
|
|
76
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
77
|
-
};
|
|
78
|
-
} & {
|
|
79
|
-
admin: {
|
|
80
|
-
listUsers: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
|
|
81
|
-
searchValue?: string | undefined;
|
|
82
|
-
searchField?: "name" | "email" | undefined;
|
|
83
|
-
searchOperator?: "contains" | "starts_with" | "ends_with" | undefined;
|
|
84
|
-
limit?: string | number | undefined;
|
|
85
|
-
offset?: string | number | undefined;
|
|
86
|
-
sortBy?: string | undefined;
|
|
87
|
-
sortDirection?: "asc" | "desc" | undefined;
|
|
88
|
-
filterField?: string | undefined;
|
|
89
|
-
filterValue?: string | number | boolean | undefined;
|
|
90
|
-
filterOperator?: "contains" | "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | undefined;
|
|
91
|
-
}> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
92
|
-
query: {
|
|
93
|
-
searchValue?: string | undefined;
|
|
94
|
-
searchField?: "name" | "email" | undefined;
|
|
95
|
-
searchOperator?: "contains" | "starts_with" | "ends_with" | undefined;
|
|
96
|
-
limit?: string | number | undefined;
|
|
97
|
-
offset?: string | number | undefined;
|
|
98
|
-
sortBy?: string | undefined;
|
|
99
|
-
sortDirection?: "asc" | "desc" | undefined;
|
|
100
|
-
filterField?: string | undefined;
|
|
101
|
-
filterValue?: string | number | boolean | undefined;
|
|
102
|
-
filterOperator?: "contains" | "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | undefined;
|
|
16
|
+
readonly session: {
|
|
17
|
+
readonly id: string;
|
|
18
|
+
readonly createdAt: Date;
|
|
19
|
+
readonly updatedAt: Date;
|
|
20
|
+
readonly userId: string;
|
|
21
|
+
readonly expiresAt: Date;
|
|
22
|
+
readonly token: string;
|
|
23
|
+
readonly ipAddress?: string | null | undefined;
|
|
24
|
+
readonly userAgent?: string | null | undefined;
|
|
103
25
|
};
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
} & Record<string, any>;
|
|
151
|
-
}, {
|
|
152
|
-
code?: string | undefined;
|
|
153
|
-
message?: string | undefined;
|
|
154
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
155
|
-
};
|
|
156
|
-
} & {
|
|
157
|
-
admin: {
|
|
158
|
-
banUser: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
159
|
-
userId: unknown;
|
|
160
|
-
banReason?: string | undefined;
|
|
161
|
-
banExpiresIn?: number | undefined;
|
|
162
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
163
|
-
userId: unknown;
|
|
164
|
-
banReason?: string | undefined;
|
|
165
|
-
banExpiresIn?: number | undefined;
|
|
166
|
-
} & {
|
|
167
|
-
fetchOptions?: FetchOptions | undefined;
|
|
168
|
-
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
26
|
+
} | null;
|
|
27
|
+
readonly isPending: boolean;
|
|
28
|
+
readonly isRefetching: boolean;
|
|
29
|
+
readonly error: import("better-auth/vue").BetterFetchError | null;
|
|
30
|
+
}, {
|
|
31
|
+
readonly data: {
|
|
32
|
+
readonly user: {
|
|
33
|
+
readonly id: string;
|
|
34
|
+
readonly createdAt: Date;
|
|
35
|
+
readonly updatedAt: Date;
|
|
36
|
+
readonly email: string;
|
|
37
|
+
readonly emailVerified: boolean;
|
|
38
|
+
readonly name: string;
|
|
39
|
+
readonly image?: string | null | undefined;
|
|
40
|
+
};
|
|
41
|
+
readonly session: {
|
|
42
|
+
readonly id: string;
|
|
43
|
+
readonly createdAt: Date;
|
|
44
|
+
readonly updatedAt: Date;
|
|
45
|
+
readonly userId: string;
|
|
46
|
+
readonly expiresAt: Date;
|
|
47
|
+
readonly token: string;
|
|
48
|
+
readonly ipAddress?: string | null | undefined;
|
|
49
|
+
readonly userAgent?: string | null | undefined;
|
|
50
|
+
};
|
|
51
|
+
} | null;
|
|
52
|
+
readonly isPending: boolean;
|
|
53
|
+
readonly isRefetching: boolean;
|
|
54
|
+
readonly error: import("better-auth/vue").BetterFetchError | null;
|
|
55
|
+
}>>;
|
|
56
|
+
isLoading: import("vue").ComputedRef<boolean>;
|
|
57
|
+
isAuthenticated: import("vue").ComputedRef<boolean>;
|
|
58
|
+
user: import("vue").ComputedRef<{
|
|
59
|
+
readonly id: string;
|
|
60
|
+
readonly createdAt: Date;
|
|
61
|
+
readonly updatedAt: Date;
|
|
62
|
+
readonly email: string;
|
|
63
|
+
readonly emailVerified: boolean;
|
|
64
|
+
readonly name: string;
|
|
65
|
+
readonly image?: string | null | undefined;
|
|
66
|
+
} | null>;
|
|
67
|
+
login: (returnTo?: string) => void;
|
|
68
|
+
register: (returnTo?: string) => void;
|
|
69
|
+
logout: () => Promise<void>;
|
|
70
|
+
refreshSession: () => Promise<{
|
|
71
|
+
data: {
|
|
169
72
|
user: {
|
|
170
73
|
id: string;
|
|
171
74
|
createdAt: Date;
|
|
@@ -174,21 +77,7 @@ declare const authClient: {
|
|
|
174
77
|
emailVerified: boolean;
|
|
175
78
|
name: string;
|
|
176
79
|
image?: string | null | undefined;
|
|
177
|
-
}
|
|
178
|
-
}, {
|
|
179
|
-
code?: string | undefined;
|
|
180
|
-
message?: string | undefined;
|
|
181
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
182
|
-
};
|
|
183
|
-
} & {
|
|
184
|
-
admin: {
|
|
185
|
-
impersonateUser: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
186
|
-
userId: unknown;
|
|
187
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
188
|
-
userId: unknown;
|
|
189
|
-
} & {
|
|
190
|
-
fetchOptions?: FetchOptions | undefined;
|
|
191
|
-
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
80
|
+
};
|
|
192
81
|
session: {
|
|
193
82
|
id: string;
|
|
194
83
|
createdAt: Date;
|
|
@@ -199,78 +88,201 @@ declare const authClient: {
|
|
|
199
88
|
ipAddress?: string | null | undefined;
|
|
200
89
|
userAgent?: string | null | undefined;
|
|
201
90
|
};
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
91
|
+
} | null;
|
|
92
|
+
error: null;
|
|
93
|
+
} | {
|
|
94
|
+
data: null;
|
|
95
|
+
error: {
|
|
96
|
+
code?: string | undefined | undefined;
|
|
97
|
+
message?: string | undefined | undefined;
|
|
98
|
+
status: number;
|
|
99
|
+
statusText: string;
|
|
100
|
+
};
|
|
101
|
+
}>;
|
|
102
|
+
authClient: {
|
|
103
|
+
signIn: {
|
|
104
|
+
social: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
105
|
+
provider: "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel" | (string & {});
|
|
106
|
+
callbackURL?: string | undefined;
|
|
107
|
+
newUserCallbackURL?: string | undefined;
|
|
108
|
+
errorCallbackURL?: string | undefined;
|
|
109
|
+
disableRedirect?: boolean | undefined;
|
|
110
|
+
idToken?: {
|
|
111
|
+
token: string;
|
|
112
|
+
nonce?: string | undefined;
|
|
113
|
+
accessToken?: string | undefined;
|
|
114
|
+
refreshToken?: string | undefined;
|
|
115
|
+
expiresAt?: number | undefined;
|
|
116
|
+
} | undefined;
|
|
117
|
+
scopes?: string[] | undefined;
|
|
118
|
+
requestSignUp?: boolean | undefined;
|
|
119
|
+
loginHint?: string | undefined;
|
|
120
|
+
additionalData?: Record<string, any> | undefined;
|
|
121
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
122
|
+
provider: "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel" | (string & {});
|
|
123
|
+
callbackURL?: string | undefined;
|
|
124
|
+
newUserCallbackURL?: string | undefined;
|
|
125
|
+
errorCallbackURL?: string | undefined;
|
|
126
|
+
disableRedirect?: boolean | undefined;
|
|
127
|
+
idToken?: {
|
|
128
|
+
token: string;
|
|
129
|
+
nonce?: string | undefined;
|
|
130
|
+
accessToken?: string | undefined;
|
|
131
|
+
refreshToken?: string | undefined;
|
|
132
|
+
expiresAt?: number | undefined;
|
|
133
|
+
} | undefined;
|
|
134
|
+
scopes?: string[] | undefined;
|
|
135
|
+
requestSignUp?: boolean | undefined;
|
|
136
|
+
loginHint?: string | undefined;
|
|
137
|
+
additionalData?: Record<string, any> | undefined;
|
|
138
|
+
} & {
|
|
139
|
+
fetchOptions?: FetchOptions | undefined;
|
|
140
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<NonNullable<{
|
|
141
|
+
redirect: boolean;
|
|
142
|
+
url: string;
|
|
143
|
+
} | {
|
|
144
|
+
redirect: boolean;
|
|
145
|
+
token: string;
|
|
146
|
+
url: undefined;
|
|
147
|
+
user: {
|
|
148
|
+
id: string;
|
|
149
|
+
createdAt: Date;
|
|
150
|
+
updatedAt: Date;
|
|
151
|
+
email: string;
|
|
152
|
+
emailVerified: boolean;
|
|
153
|
+
name: string;
|
|
154
|
+
image?: string | null | undefined | undefined;
|
|
155
|
+
};
|
|
156
|
+
}>, {
|
|
157
|
+
code?: string | undefined;
|
|
158
|
+
message?: string | undefined;
|
|
159
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
160
|
+
};
|
|
161
|
+
} & {
|
|
162
|
+
signOut: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
|
|
211
163
|
query?: Record<string, any> | undefined;
|
|
212
164
|
fetchOptions?: FetchOptions | undefined;
|
|
213
165
|
}> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
214
|
-
session: import("better-auth").Session & Record<string, any>;
|
|
215
|
-
user: import("better-auth").User & Record<string, any>;
|
|
216
|
-
}, {
|
|
217
|
-
code?: string | undefined;
|
|
218
|
-
message?: string | undefined;
|
|
219
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
220
|
-
};
|
|
221
|
-
} & {
|
|
222
|
-
admin: {
|
|
223
|
-
revokeUserSession: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
224
|
-
sessionToken: string;
|
|
225
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
226
|
-
sessionToken: string;
|
|
227
|
-
} & {
|
|
228
|
-
fetchOptions?: FetchOptions | undefined;
|
|
229
|
-
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
230
166
|
success: boolean;
|
|
231
167
|
}, {
|
|
232
168
|
code?: string | undefined;
|
|
233
169
|
message?: string | undefined;
|
|
234
170
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
171
|
+
} & {
|
|
172
|
+
signUp: {
|
|
173
|
+
email: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
174
|
+
name: string;
|
|
175
|
+
email: string;
|
|
176
|
+
password: string;
|
|
177
|
+
image?: string | undefined;
|
|
178
|
+
callbackURL?: string | undefined;
|
|
179
|
+
rememberMe?: boolean | undefined;
|
|
180
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
181
|
+
email: string;
|
|
182
|
+
name: string;
|
|
183
|
+
password: string;
|
|
184
|
+
image?: string | undefined;
|
|
185
|
+
callbackURL?: string | undefined;
|
|
186
|
+
fetchOptions?: FetchOptions | undefined;
|
|
187
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<NonNullable<{
|
|
188
|
+
token: null;
|
|
189
|
+
user: {
|
|
190
|
+
id: string;
|
|
191
|
+
createdAt: Date;
|
|
192
|
+
updatedAt: Date;
|
|
193
|
+
email: string;
|
|
194
|
+
emailVerified: boolean;
|
|
195
|
+
name: string;
|
|
196
|
+
image?: string | null | undefined | undefined;
|
|
197
|
+
};
|
|
198
|
+
} | {
|
|
199
|
+
token: string;
|
|
200
|
+
user: {
|
|
201
|
+
id: string;
|
|
202
|
+
createdAt: Date;
|
|
203
|
+
updatedAt: Date;
|
|
204
|
+
email: string;
|
|
205
|
+
emailVerified: boolean;
|
|
206
|
+
name: string;
|
|
207
|
+
image?: string | null | undefined | undefined;
|
|
208
|
+
};
|
|
209
|
+
}>, {
|
|
210
|
+
code?: string | undefined;
|
|
211
|
+
message?: string | undefined;
|
|
212
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
213
|
+
};
|
|
214
|
+
} & {
|
|
215
|
+
signIn: {
|
|
216
|
+
email: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
217
|
+
email: string;
|
|
218
|
+
password: string;
|
|
219
|
+
callbackURL?: string | undefined;
|
|
220
|
+
rememberMe?: boolean | undefined;
|
|
221
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
222
|
+
email: string;
|
|
223
|
+
password: string;
|
|
224
|
+
callbackURL?: string | undefined;
|
|
225
|
+
rememberMe?: boolean | undefined;
|
|
226
|
+
} & {
|
|
227
|
+
fetchOptions?: FetchOptions | undefined;
|
|
228
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
229
|
+
redirect: boolean;
|
|
230
|
+
token: string;
|
|
231
|
+
url?: string | undefined;
|
|
232
|
+
user: {
|
|
233
|
+
id: string;
|
|
234
|
+
createdAt: Date;
|
|
235
|
+
updatedAt: Date;
|
|
236
|
+
email: string;
|
|
237
|
+
emailVerified: boolean;
|
|
238
|
+
name: string;
|
|
239
|
+
image?: string | null | undefined | undefined;
|
|
240
|
+
};
|
|
241
|
+
}, {
|
|
242
|
+
code?: string | undefined;
|
|
243
|
+
message?: string | undefined;
|
|
244
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
245
|
+
};
|
|
246
|
+
} & {
|
|
247
|
+
resetPassword: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
248
|
+
newPassword: string;
|
|
249
|
+
token?: string | undefined;
|
|
250
|
+
}> & Record<string, any>, Partial<{
|
|
251
|
+
token?: string | undefined;
|
|
252
|
+
}> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
253
|
+
newPassword: string;
|
|
254
|
+
token?: string | undefined;
|
|
242
255
|
} & {
|
|
243
256
|
fetchOptions?: FetchOptions | undefined;
|
|
244
257
|
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
245
|
-
|
|
258
|
+
status: boolean;
|
|
246
259
|
}, {
|
|
247
260
|
code?: string | undefined;
|
|
248
261
|
message?: string | undefined;
|
|
249
262
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
263
|
+
} & {
|
|
264
|
+
verifyEmail: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
|
|
265
|
+
token: string;
|
|
266
|
+
callbackURL?: string | undefined;
|
|
267
|
+
}> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
268
|
+
query: {
|
|
269
|
+
token: string;
|
|
270
|
+
callbackURL?: string | undefined;
|
|
271
|
+
};
|
|
258
272
|
fetchOptions?: FetchOptions | undefined;
|
|
259
|
-
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
260
|
-
|
|
261
|
-
}
|
|
273
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<NonNullable<void | {
|
|
274
|
+
status: boolean;
|
|
275
|
+
}>, {
|
|
262
276
|
code?: string | undefined;
|
|
263
277
|
message?: string | undefined;
|
|
264
278
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
newPassword: string;
|
|
270
|
-
userId: unknown;
|
|
279
|
+
} & {
|
|
280
|
+
sendVerificationEmail: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
281
|
+
email: string;
|
|
282
|
+
callbackURL?: string | undefined;
|
|
271
283
|
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
272
|
-
|
|
273
|
-
|
|
284
|
+
email: string;
|
|
285
|
+
callbackURL?: string | undefined;
|
|
274
286
|
} & {
|
|
275
287
|
fetchOptions?: FetchOptions | undefined;
|
|
276
288
|
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
@@ -279,727 +291,321 @@ declare const authClient: {
|
|
|
279
291
|
code?: string | undefined;
|
|
280
292
|
message?: string | undefined;
|
|
281
293
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
permissions?: never | undefined;
|
|
291
|
-
} | {
|
|
292
|
-
permissions: {
|
|
293
|
-
readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
|
|
294
|
-
readonly session?: ("list" | "delete" | "revoke")[] | undefined;
|
|
295
|
-
};
|
|
296
|
-
permission?: never | undefined;
|
|
297
|
-
}) & {
|
|
298
|
-
userId?: string | undefined;
|
|
299
|
-
role?: "user" | "admin" | undefined;
|
|
300
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<(({
|
|
301
|
-
permission: {
|
|
302
|
-
readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
|
|
303
|
-
readonly session?: ("list" | "delete" | "revoke")[] | undefined;
|
|
304
|
-
};
|
|
305
|
-
permissions?: never | undefined;
|
|
306
|
-
} | {
|
|
307
|
-
permissions: {
|
|
308
|
-
readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
|
|
309
|
-
readonly session?: ("list" | "delete" | "revoke")[] | undefined;
|
|
310
|
-
};
|
|
311
|
-
permission?: never | undefined;
|
|
312
|
-
}) & {
|
|
313
|
-
userId?: string | undefined;
|
|
314
|
-
role?: "user" | "admin" | undefined;
|
|
315
|
-
}) & {
|
|
294
|
+
} & {
|
|
295
|
+
changeEmail: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
296
|
+
newEmail: string;
|
|
297
|
+
callbackURL?: string | undefined;
|
|
298
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
299
|
+
newEmail: string;
|
|
300
|
+
callbackURL?: string | undefined;
|
|
301
|
+
} & {
|
|
316
302
|
fetchOptions?: FetchOptions | undefined;
|
|
317
303
|
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
318
|
-
|
|
319
|
-
success: boolean;
|
|
304
|
+
status: boolean;
|
|
320
305
|
}, {
|
|
321
306
|
code?: string | undefined;
|
|
322
307
|
message?: string | undefined;
|
|
323
308
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
callbackURL?: string | undefined;
|
|
330
|
-
newUserCallbackURL?: string | undefined;
|
|
331
|
-
errorCallbackURL?: string | undefined;
|
|
332
|
-
disableRedirect?: boolean | undefined;
|
|
333
|
-
idToken?: {
|
|
334
|
-
token: string;
|
|
335
|
-
nonce?: string | undefined;
|
|
336
|
-
accessToken?: string | undefined;
|
|
337
|
-
refreshToken?: string | undefined;
|
|
338
|
-
expiresAt?: number | undefined;
|
|
339
|
-
} | undefined;
|
|
340
|
-
scopes?: string[] | undefined;
|
|
341
|
-
requestSignUp?: boolean | undefined;
|
|
342
|
-
loginHint?: string | undefined;
|
|
343
|
-
additionalData?: Record<string, any> | undefined;
|
|
309
|
+
} & {
|
|
310
|
+
changePassword: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
311
|
+
newPassword: string;
|
|
312
|
+
currentPassword: string;
|
|
313
|
+
revokeOtherSessions?: boolean | undefined;
|
|
344
314
|
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
errorCallbackURL?: string | undefined;
|
|
349
|
-
disableRedirect?: boolean | undefined;
|
|
350
|
-
idToken?: {
|
|
351
|
-
token: string;
|
|
352
|
-
nonce?: string | undefined;
|
|
353
|
-
accessToken?: string | undefined;
|
|
354
|
-
refreshToken?: string | undefined;
|
|
355
|
-
expiresAt?: number | undefined;
|
|
356
|
-
} | undefined;
|
|
357
|
-
scopes?: string[] | undefined;
|
|
358
|
-
requestSignUp?: boolean | undefined;
|
|
359
|
-
loginHint?: string | undefined;
|
|
360
|
-
additionalData?: Record<string, any> | undefined;
|
|
315
|
+
newPassword: string;
|
|
316
|
+
currentPassword: string;
|
|
317
|
+
revokeOtherSessions?: boolean | undefined;
|
|
361
318
|
} & {
|
|
362
319
|
fetchOptions?: FetchOptions | undefined;
|
|
363
|
-
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<
|
|
364
|
-
|
|
365
|
-
url: string;
|
|
366
|
-
} | {
|
|
367
|
-
redirect: boolean;
|
|
368
|
-
token: string;
|
|
369
|
-
url: undefined;
|
|
320
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
321
|
+
token: string | null;
|
|
370
322
|
user: {
|
|
371
323
|
id: string;
|
|
372
|
-
createdAt: Date;
|
|
373
|
-
updatedAt: Date;
|
|
374
324
|
email: string;
|
|
375
|
-
emailVerified: boolean;
|
|
376
325
|
name: string;
|
|
377
|
-
image
|
|
326
|
+
image: string | null | undefined;
|
|
327
|
+
emailVerified: boolean;
|
|
328
|
+
createdAt: Date;
|
|
329
|
+
updatedAt: Date;
|
|
378
330
|
};
|
|
379
|
-
}
|
|
331
|
+
}, {
|
|
380
332
|
code?: string | undefined;
|
|
381
333
|
message?: string | undefined;
|
|
382
334
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
383
|
-
}
|
|
384
|
-
} & {
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
}, {
|
|
391
|
-
code?: string | undefined;
|
|
392
|
-
message?: string | undefined;
|
|
393
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
394
|
-
} & {
|
|
395
|
-
signUp: {
|
|
396
|
-
email: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
397
|
-
name: string;
|
|
398
|
-
email: string;
|
|
399
|
-
password: string;
|
|
400
|
-
image?: string | undefined;
|
|
401
|
-
callbackURL?: string | undefined;
|
|
402
|
-
rememberMe?: boolean | undefined;
|
|
403
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
404
|
-
email: string;
|
|
405
|
-
name: string;
|
|
406
|
-
password: string;
|
|
407
|
-
image?: string | undefined;
|
|
408
|
-
callbackURL?: string | undefined;
|
|
335
|
+
} & {
|
|
336
|
+
updateUser: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<Partial<{}> & {
|
|
337
|
+
name?: string | undefined;
|
|
338
|
+
image?: string | undefined | null;
|
|
339
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
|
|
340
|
+
image?: (string | null) | undefined;
|
|
341
|
+
name?: string | undefined;
|
|
409
342
|
fetchOptions?: FetchOptions | undefined;
|
|
410
|
-
} & {}
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
id: string;
|
|
414
|
-
createdAt: Date;
|
|
415
|
-
updatedAt: Date;
|
|
416
|
-
email: string;
|
|
417
|
-
emailVerified: boolean;
|
|
418
|
-
name: string;
|
|
419
|
-
image?: string | null | undefined | undefined;
|
|
420
|
-
};
|
|
421
|
-
} | {
|
|
422
|
-
token: string;
|
|
423
|
-
user: {
|
|
424
|
-
id: string;
|
|
425
|
-
createdAt: Date;
|
|
426
|
-
updatedAt: Date;
|
|
427
|
-
email: string;
|
|
428
|
-
emailVerified: boolean;
|
|
429
|
-
name: string;
|
|
430
|
-
image?: string | null | undefined | undefined;
|
|
431
|
-
};
|
|
432
|
-
}>, {
|
|
343
|
+
} & Partial<{}>> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
344
|
+
status: boolean;
|
|
345
|
+
}, {
|
|
433
346
|
code?: string | undefined;
|
|
434
347
|
message?: string | undefined;
|
|
435
348
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
signIn: {
|
|
439
|
-
email: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
440
|
-
email: string;
|
|
441
|
-
password: string;
|
|
349
|
+
} & {
|
|
350
|
+
deleteUser: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
442
351
|
callbackURL?: string | undefined;
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
password: string;
|
|
352
|
+
password?: string | undefined;
|
|
353
|
+
token?: string | undefined;
|
|
354
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
|
|
447
355
|
callbackURL?: string | undefined;
|
|
448
|
-
|
|
356
|
+
password?: string | undefined;
|
|
357
|
+
token?: string | undefined;
|
|
358
|
+
} & {
|
|
359
|
+
fetchOptions?: FetchOptions | undefined;
|
|
360
|
+
}> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
361
|
+
success: boolean;
|
|
362
|
+
message: string;
|
|
363
|
+
}, {
|
|
364
|
+
code?: string | undefined;
|
|
365
|
+
message?: string | undefined;
|
|
366
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
367
|
+
} & {
|
|
368
|
+
requestPasswordReset: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
369
|
+
email: string;
|
|
370
|
+
redirectTo?: string | undefined;
|
|
371
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
372
|
+
email: string;
|
|
373
|
+
redirectTo?: string | undefined;
|
|
449
374
|
} & {
|
|
450
375
|
fetchOptions?: FetchOptions | undefined;
|
|
451
376
|
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
url?: string | undefined;
|
|
455
|
-
user: {
|
|
456
|
-
id: string;
|
|
457
|
-
createdAt: Date;
|
|
458
|
-
updatedAt: Date;
|
|
459
|
-
email: string;
|
|
460
|
-
emailVerified: boolean;
|
|
461
|
-
name: string;
|
|
462
|
-
image?: string | null | undefined | undefined;
|
|
463
|
-
};
|
|
377
|
+
status: boolean;
|
|
378
|
+
message: string;
|
|
464
379
|
}, {
|
|
465
380
|
code?: string | undefined;
|
|
466
381
|
message?: string | undefined;
|
|
467
382
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
468
|
-
};
|
|
469
|
-
} & {
|
|
470
|
-
resetPassword: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
471
|
-
newPassword: string;
|
|
472
|
-
token?: string | undefined;
|
|
473
|
-
}> & Record<string, any>, Partial<{
|
|
474
|
-
token?: string | undefined;
|
|
475
|
-
}> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
476
|
-
newPassword: string;
|
|
477
|
-
token?: string | undefined;
|
|
478
383
|
} & {
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
callbackURL?: string | undefined;
|
|
384
|
+
resetPassword: {
|
|
385
|
+
":token": <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
|
|
386
|
+
callbackURL: string;
|
|
387
|
+
}> & Record<string, any>, {
|
|
388
|
+
token: string;
|
|
389
|
+
}>>(data_0: import("better-auth").Prettify<{
|
|
390
|
+
query: {
|
|
391
|
+
callbackURL: string;
|
|
392
|
+
};
|
|
393
|
+
fetchOptions?: FetchOptions | undefined;
|
|
394
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<never, {
|
|
395
|
+
code?: string | undefined;
|
|
396
|
+
message?: string | undefined;
|
|
397
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
494
398
|
};
|
|
495
|
-
fetchOptions?: FetchOptions | undefined;
|
|
496
|
-
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<NonNullable<void | {
|
|
497
|
-
status: boolean;
|
|
498
|
-
}>, {
|
|
499
|
-
code?: string | undefined;
|
|
500
|
-
message?: string | undefined;
|
|
501
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
502
|
-
} & {
|
|
503
|
-
sendVerificationEmail: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
504
|
-
email: string;
|
|
505
|
-
callbackURL?: string | undefined;
|
|
506
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
507
|
-
email: string;
|
|
508
|
-
callbackURL?: string | undefined;
|
|
509
399
|
} & {
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
code?: string | undefined;
|
|
515
|
-
message?: string | undefined;
|
|
516
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
517
|
-
} & {
|
|
518
|
-
changeEmail: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
519
|
-
newEmail: string;
|
|
520
|
-
callbackURL?: string | undefined;
|
|
521
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
522
|
-
newEmail: string;
|
|
523
|
-
callbackURL?: string | undefined;
|
|
524
|
-
} & {
|
|
525
|
-
fetchOptions?: FetchOptions | undefined;
|
|
526
|
-
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
527
|
-
status: boolean;
|
|
528
|
-
}, {
|
|
529
|
-
code?: string | undefined;
|
|
530
|
-
message?: string | undefined;
|
|
531
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
532
|
-
} & {
|
|
533
|
-
changePassword: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
534
|
-
newPassword: string;
|
|
535
|
-
currentPassword: string;
|
|
536
|
-
revokeOtherSessions?: boolean | undefined;
|
|
537
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
538
|
-
newPassword: string;
|
|
539
|
-
currentPassword: string;
|
|
540
|
-
revokeOtherSessions?: boolean | undefined;
|
|
541
|
-
} & {
|
|
542
|
-
fetchOptions?: FetchOptions | undefined;
|
|
543
|
-
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
544
|
-
token: string | null;
|
|
545
|
-
user: {
|
|
400
|
+
listSessions: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
|
|
401
|
+
query?: Record<string, any> | undefined;
|
|
402
|
+
fetchOptions?: FetchOptions | undefined;
|
|
403
|
+
}> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<import("better-auth").Prettify<{
|
|
546
404
|
id: string;
|
|
547
|
-
email: string;
|
|
548
|
-
name: string;
|
|
549
|
-
image: string | null | undefined;
|
|
550
|
-
emailVerified: boolean;
|
|
551
405
|
createdAt: Date;
|
|
552
406
|
updatedAt: Date;
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
code?: string | undefined;
|
|
556
|
-
message?: string | undefined;
|
|
557
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
558
|
-
} & {
|
|
559
|
-
updateUser: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<Partial<{}> & {
|
|
560
|
-
name?: string | undefined;
|
|
561
|
-
image?: string | undefined | null;
|
|
562
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
|
|
563
|
-
image?: (string | null) | undefined;
|
|
564
|
-
name?: string | undefined;
|
|
565
|
-
fetchOptions?: FetchOptions | undefined;
|
|
566
|
-
} & Partial<{} & {}>> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
567
|
-
status: boolean;
|
|
568
|
-
}, {
|
|
569
|
-
code?: string | undefined;
|
|
570
|
-
message?: string | undefined;
|
|
571
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
572
|
-
} & {
|
|
573
|
-
deleteUser: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
574
|
-
callbackURL?: string | undefined;
|
|
575
|
-
password?: string | undefined;
|
|
576
|
-
token?: string | undefined;
|
|
577
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
|
|
578
|
-
callbackURL?: string | undefined;
|
|
579
|
-
password?: string | undefined;
|
|
580
|
-
token?: string | undefined;
|
|
581
|
-
} & {
|
|
582
|
-
fetchOptions?: FetchOptions | undefined;
|
|
583
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
584
|
-
success: boolean;
|
|
585
|
-
message: string;
|
|
586
|
-
}, {
|
|
587
|
-
code?: string | undefined;
|
|
588
|
-
message?: string | undefined;
|
|
589
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
590
|
-
} & {
|
|
591
|
-
requestPasswordReset: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
592
|
-
email: string;
|
|
593
|
-
redirectTo?: string | undefined;
|
|
594
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
595
|
-
email: string;
|
|
596
|
-
redirectTo?: string | undefined;
|
|
597
|
-
} & {
|
|
598
|
-
fetchOptions?: FetchOptions | undefined;
|
|
599
|
-
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
600
|
-
status: boolean;
|
|
601
|
-
message: string;
|
|
602
|
-
}, {
|
|
603
|
-
code?: string | undefined;
|
|
604
|
-
message?: string | undefined;
|
|
605
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
606
|
-
} & {
|
|
607
|
-
resetPassword: {
|
|
608
|
-
":token": <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
|
|
609
|
-
callbackURL: string;
|
|
610
|
-
}> & Record<string, any>, {
|
|
407
|
+
userId: string;
|
|
408
|
+
expiresAt: Date;
|
|
611
409
|
token: string;
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
};
|
|
616
|
-
fetchOptions?: FetchOptions | undefined;
|
|
617
|
-
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<never, {
|
|
410
|
+
ipAddress?: string | null | undefined | undefined;
|
|
411
|
+
userAgent?: string | null | undefined | undefined;
|
|
412
|
+
}>[], {
|
|
618
413
|
code?: string | undefined;
|
|
619
414
|
message?: string | undefined;
|
|
620
415
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
621
|
-
};
|
|
622
|
-
} & {
|
|
623
|
-
listSessions: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
|
|
624
|
-
query?: Record<string, any> | undefined;
|
|
625
|
-
fetchOptions?: FetchOptions | undefined;
|
|
626
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<import("better-auth").Prettify<{
|
|
627
|
-
id: string;
|
|
628
|
-
createdAt: Date;
|
|
629
|
-
updatedAt: Date;
|
|
630
|
-
userId: string;
|
|
631
|
-
expiresAt: Date;
|
|
632
|
-
token: string;
|
|
633
|
-
ipAddress?: string | null | undefined | undefined;
|
|
634
|
-
userAgent?: string | null | undefined | undefined;
|
|
635
|
-
}>[], {
|
|
636
|
-
code?: string | undefined;
|
|
637
|
-
message?: string | undefined;
|
|
638
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
639
|
-
} & {
|
|
640
|
-
revokeSession: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
641
|
-
token: string;
|
|
642
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
643
|
-
token: string;
|
|
644
416
|
} & {
|
|
645
|
-
|
|
646
|
-
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
647
|
-
status: boolean;
|
|
648
|
-
}, {
|
|
649
|
-
code?: string | undefined;
|
|
650
|
-
message?: string | undefined;
|
|
651
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
652
|
-
} & {
|
|
653
|
-
revokeSessions: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
|
|
654
|
-
query?: Record<string, any> | undefined;
|
|
655
|
-
fetchOptions?: FetchOptions | undefined;
|
|
656
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
657
|
-
status: boolean;
|
|
658
|
-
}, {
|
|
659
|
-
code?: string | undefined;
|
|
660
|
-
message?: string | undefined;
|
|
661
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
662
|
-
} & {
|
|
663
|
-
revokeOtherSessions: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
|
|
664
|
-
query?: Record<string, any> | undefined;
|
|
665
|
-
fetchOptions?: FetchOptions | undefined;
|
|
666
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
667
|
-
status: boolean;
|
|
668
|
-
}, {
|
|
669
|
-
code?: string | undefined;
|
|
670
|
-
message?: string | undefined;
|
|
671
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
672
|
-
} & {
|
|
673
|
-
linkSocial: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
674
|
-
provider: unknown;
|
|
675
|
-
callbackURL?: string | undefined;
|
|
676
|
-
idToken?: {
|
|
417
|
+
revokeSession: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
677
418
|
token: string;
|
|
678
|
-
|
|
679
|
-
accessToken?: string | undefined;
|
|
680
|
-
refreshToken?: string | undefined;
|
|
681
|
-
scopes?: string[] | undefined;
|
|
682
|
-
} | undefined;
|
|
683
|
-
requestSignUp?: boolean | undefined;
|
|
684
|
-
scopes?: string[] | undefined;
|
|
685
|
-
errorCallbackURL?: string | undefined;
|
|
686
|
-
disableRedirect?: boolean | undefined;
|
|
687
|
-
additionalData?: Record<string, any> | undefined;
|
|
688
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
689
|
-
provider: unknown;
|
|
690
|
-
callbackURL?: string | undefined;
|
|
691
|
-
idToken?: {
|
|
419
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
692
420
|
token: string;
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
}
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
disableRedirect?: boolean | undefined;
|
|
702
|
-
additionalData?: Record<string, any> | undefined;
|
|
421
|
+
} & {
|
|
422
|
+
fetchOptions?: FetchOptions | undefined;
|
|
423
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
424
|
+
status: boolean;
|
|
425
|
+
}, {
|
|
426
|
+
code?: string | undefined;
|
|
427
|
+
message?: string | undefined;
|
|
428
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
703
429
|
} & {
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
}
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
message?: string | undefined;
|
|
727
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
728
|
-
} & {
|
|
729
|
-
deleteUser: {
|
|
730
|
-
callback: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
|
|
731
|
-
token: string;
|
|
430
|
+
revokeSessions: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
|
|
431
|
+
query?: Record<string, any> | undefined;
|
|
432
|
+
fetchOptions?: FetchOptions | undefined;
|
|
433
|
+
}> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
434
|
+
status: boolean;
|
|
435
|
+
}, {
|
|
436
|
+
code?: string | undefined;
|
|
437
|
+
message?: string | undefined;
|
|
438
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
439
|
+
} & {
|
|
440
|
+
revokeOtherSessions: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
|
|
441
|
+
query?: Record<string, any> | undefined;
|
|
442
|
+
fetchOptions?: FetchOptions | undefined;
|
|
443
|
+
}> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
444
|
+
status: boolean;
|
|
445
|
+
}, {
|
|
446
|
+
code?: string | undefined;
|
|
447
|
+
message?: string | undefined;
|
|
448
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
449
|
+
} & {
|
|
450
|
+
linkSocial: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
451
|
+
provider: unknown;
|
|
732
452
|
callbackURL?: string | undefined;
|
|
733
|
-
|
|
734
|
-
query: {
|
|
453
|
+
idToken?: {
|
|
735
454
|
token: string;
|
|
736
|
-
|
|
737
|
-
|
|
455
|
+
nonce?: string | undefined;
|
|
456
|
+
accessToken?: string | undefined;
|
|
457
|
+
refreshToken?: string | undefined;
|
|
458
|
+
scopes?: string[] | undefined;
|
|
459
|
+
} | undefined;
|
|
460
|
+
requestSignUp?: boolean | undefined;
|
|
461
|
+
scopes?: string[] | undefined;
|
|
462
|
+
errorCallbackURL?: string | undefined;
|
|
463
|
+
disableRedirect?: boolean | undefined;
|
|
464
|
+
additionalData?: Record<string, any> | undefined;
|
|
465
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
466
|
+
provider: unknown;
|
|
467
|
+
callbackURL?: string | undefined;
|
|
468
|
+
idToken?: {
|
|
469
|
+
token: string;
|
|
470
|
+
nonce?: string | undefined;
|
|
471
|
+
accessToken?: string | undefined;
|
|
472
|
+
refreshToken?: string | undefined;
|
|
473
|
+
scopes?: string[] | undefined;
|
|
474
|
+
} | undefined;
|
|
475
|
+
requestSignUp?: boolean | undefined;
|
|
476
|
+
scopes?: string[] | undefined;
|
|
477
|
+
errorCallbackURL?: string | undefined;
|
|
478
|
+
disableRedirect?: boolean | undefined;
|
|
479
|
+
additionalData?: Record<string, any> | undefined;
|
|
480
|
+
} & {
|
|
738
481
|
fetchOptions?: FetchOptions | undefined;
|
|
739
482
|
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
740
|
-
|
|
741
|
-
|
|
483
|
+
url: string;
|
|
484
|
+
redirect: boolean;
|
|
742
485
|
}, {
|
|
743
486
|
code?: string | undefined;
|
|
744
487
|
message?: string | undefined;
|
|
745
488
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
746
|
-
};
|
|
747
|
-
} & {
|
|
748
|
-
unlinkAccount: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
749
|
-
providerId: string;
|
|
750
|
-
accountId?: string | undefined;
|
|
751
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
752
|
-
providerId: string;
|
|
753
|
-
accountId?: string | undefined;
|
|
754
|
-
} & {
|
|
755
|
-
fetchOptions?: FetchOptions | undefined;
|
|
756
|
-
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
757
|
-
status: boolean;
|
|
758
|
-
}, {
|
|
759
|
-
code?: string | undefined;
|
|
760
|
-
message?: string | undefined;
|
|
761
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
762
|
-
} & {
|
|
763
|
-
refreshToken: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
764
|
-
providerId: string;
|
|
765
|
-
accountId?: string | undefined;
|
|
766
|
-
userId?: string | undefined;
|
|
767
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
768
|
-
providerId: string;
|
|
769
|
-
accountId?: string | undefined;
|
|
770
|
-
userId?: string | undefined;
|
|
771
489
|
} & {
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
}
|
|
787
|
-
getAccessToken: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
788
|
-
providerId: string;
|
|
789
|
-
accountId?: string | undefined;
|
|
790
|
-
userId?: string | undefined;
|
|
791
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
792
|
-
providerId: string;
|
|
793
|
-
accountId?: string | undefined;
|
|
794
|
-
userId?: string | undefined;
|
|
490
|
+
listAccounts: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
|
|
491
|
+
query?: Record<string, any> | undefined;
|
|
492
|
+
fetchOptions?: FetchOptions | undefined;
|
|
493
|
+
}> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
494
|
+
id: string;
|
|
495
|
+
providerId: string;
|
|
496
|
+
createdAt: Date;
|
|
497
|
+
updatedAt: Date;
|
|
498
|
+
accountId: string;
|
|
499
|
+
userId: string;
|
|
500
|
+
scopes: string[];
|
|
501
|
+
}[], {
|
|
502
|
+
code?: string | undefined;
|
|
503
|
+
message?: string | undefined;
|
|
504
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
795
505
|
} & {
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
}, {
|
|
803
|
-
code?: string | undefined;
|
|
804
|
-
message?: string | undefined;
|
|
805
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
806
|
-
} & {
|
|
807
|
-
accountInfo: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
|
|
808
|
-
accountId?: string | undefined;
|
|
809
|
-
}> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
|
|
810
|
-
query?: {
|
|
811
|
-
accountId?: string | undefined;
|
|
812
|
-
} | undefined;
|
|
813
|
-
fetchOptions?: FetchOptions | undefined;
|
|
814
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
815
|
-
user: import("better-auth").OAuth2UserInfo;
|
|
816
|
-
data: Record<string, any>;
|
|
817
|
-
}, {
|
|
818
|
-
code?: string | undefined;
|
|
819
|
-
message?: string | undefined;
|
|
820
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
821
|
-
} & {
|
|
822
|
-
getSession: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
|
|
823
|
-
disableCookieCache?: unknown;
|
|
824
|
-
disableRefresh?: unknown;
|
|
825
|
-
}> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
|
|
826
|
-
query?: {
|
|
827
|
-
disableCookieCache?: unknown;
|
|
828
|
-
disableRefresh?: unknown;
|
|
829
|
-
} | undefined;
|
|
830
|
-
fetchOptions?: FetchOptions | undefined;
|
|
831
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
832
|
-
user: {
|
|
833
|
-
id: string;
|
|
834
|
-
createdAt: Date;
|
|
835
|
-
updatedAt: Date;
|
|
836
|
-
email: string;
|
|
837
|
-
emailVerified: boolean;
|
|
838
|
-
name: string;
|
|
839
|
-
image?: string | null | undefined;
|
|
840
|
-
banned: boolean | null | undefined;
|
|
841
|
-
role?: string | null | undefined;
|
|
842
|
-
banReason?: string | null | undefined;
|
|
843
|
-
banExpires?: Date | null | undefined;
|
|
844
|
-
};
|
|
845
|
-
session: {
|
|
846
|
-
id: string;
|
|
847
|
-
createdAt: Date;
|
|
848
|
-
updatedAt: Date;
|
|
849
|
-
userId: string;
|
|
850
|
-
expiresAt: Date;
|
|
851
|
-
token: string;
|
|
852
|
-
ipAddress?: string | null | undefined;
|
|
853
|
-
userAgent?: string | null | undefined;
|
|
854
|
-
impersonatedBy?: string | null | undefined;
|
|
855
|
-
};
|
|
856
|
-
} | null, {
|
|
857
|
-
code?: string | undefined;
|
|
858
|
-
message?: string | undefined;
|
|
859
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
860
|
-
} & {
|
|
861
|
-
admin: {
|
|
862
|
-
checkRolePermission: <R extends "user" | "admin">(data: ({
|
|
863
|
-
permission: {
|
|
864
|
-
readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
|
|
865
|
-
readonly session?: ("list" | "delete" | "revoke")[] | undefined;
|
|
866
|
-
};
|
|
867
|
-
permissions?: never | undefined;
|
|
868
|
-
} | {
|
|
869
|
-
permissions: {
|
|
870
|
-
readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
|
|
871
|
-
readonly session?: ("list" | "delete" | "revoke")[] | undefined;
|
|
872
|
-
};
|
|
873
|
-
permission?: never | undefined;
|
|
874
|
-
}) & {
|
|
875
|
-
role: R;
|
|
876
|
-
}) => boolean;
|
|
877
|
-
};
|
|
878
|
-
} & {
|
|
879
|
-
useSession: {
|
|
880
|
-
(): Readonly<import("vue").Ref<{
|
|
881
|
-
readonly data: {
|
|
882
|
-
readonly user: {
|
|
883
|
-
readonly id: string;
|
|
884
|
-
readonly createdAt: Date;
|
|
885
|
-
readonly updatedAt: Date;
|
|
886
|
-
readonly email: string;
|
|
887
|
-
readonly emailVerified: boolean;
|
|
888
|
-
readonly name: string;
|
|
889
|
-
readonly image?: string | null | undefined;
|
|
890
|
-
readonly banned: boolean | null | undefined;
|
|
891
|
-
readonly role?: string | null | undefined;
|
|
892
|
-
readonly banReason?: string | null | undefined;
|
|
893
|
-
readonly banExpires?: Date | null | undefined;
|
|
894
|
-
};
|
|
895
|
-
readonly session: {
|
|
896
|
-
readonly id: string;
|
|
897
|
-
readonly createdAt: Date;
|
|
898
|
-
readonly updatedAt: Date;
|
|
899
|
-
readonly userId: string;
|
|
900
|
-
readonly expiresAt: Date;
|
|
901
|
-
readonly token: string;
|
|
902
|
-
readonly ipAddress?: string | null | undefined;
|
|
903
|
-
readonly userAgent?: string | null | undefined;
|
|
904
|
-
readonly impersonatedBy?: string | null | undefined;
|
|
905
|
-
};
|
|
906
|
-
} | null;
|
|
907
|
-
readonly isPending: boolean;
|
|
908
|
-
readonly isRefetching: boolean;
|
|
909
|
-
readonly error: import("better-auth/vue").BetterFetchError | null;
|
|
910
|
-
}, {
|
|
911
|
-
readonly data: {
|
|
912
|
-
readonly user: {
|
|
913
|
-
readonly id: string;
|
|
914
|
-
readonly createdAt: Date;
|
|
915
|
-
readonly updatedAt: Date;
|
|
916
|
-
readonly email: string;
|
|
917
|
-
readonly emailVerified: boolean;
|
|
918
|
-
readonly name: string;
|
|
919
|
-
readonly image?: string | null | undefined;
|
|
920
|
-
readonly banned: boolean | null | undefined;
|
|
921
|
-
readonly role?: string | null | undefined;
|
|
922
|
-
readonly banReason?: string | null | undefined;
|
|
923
|
-
readonly banExpires?: Date | null | undefined;
|
|
924
|
-
};
|
|
925
|
-
readonly session: {
|
|
926
|
-
readonly id: string;
|
|
927
|
-
readonly createdAt: Date;
|
|
928
|
-
readonly updatedAt: Date;
|
|
929
|
-
readonly userId: string;
|
|
930
|
-
readonly expiresAt: Date;
|
|
931
|
-
readonly token: string;
|
|
932
|
-
readonly ipAddress?: string | null | undefined;
|
|
933
|
-
readonly userAgent?: string | null | undefined;
|
|
934
|
-
readonly impersonatedBy?: string | null | undefined;
|
|
935
|
-
};
|
|
936
|
-
} | null;
|
|
937
|
-
readonly isPending: boolean;
|
|
938
|
-
readonly isRefetching: boolean;
|
|
939
|
-
readonly error: import("better-auth/vue").BetterFetchError | null;
|
|
940
|
-
}>>;
|
|
941
|
-
<F extends (...args: any) => any>(useFetch: F): Promise<{
|
|
942
|
-
data: import("vue").Ref<{
|
|
943
|
-
user: {
|
|
944
|
-
id: string;
|
|
945
|
-
createdAt: Date;
|
|
946
|
-
updatedAt: Date;
|
|
947
|
-
email: string;
|
|
948
|
-
emailVerified: boolean;
|
|
949
|
-
name: string;
|
|
950
|
-
image?: string | null | undefined;
|
|
951
|
-
banned: boolean | null | undefined;
|
|
952
|
-
role?: string | null | undefined;
|
|
953
|
-
banReason?: string | null | undefined;
|
|
954
|
-
banExpires?: Date | null | undefined;
|
|
955
|
-
};
|
|
956
|
-
session: {
|
|
957
|
-
id: string;
|
|
958
|
-
createdAt: Date;
|
|
959
|
-
updatedAt: Date;
|
|
960
|
-
userId: string;
|
|
961
|
-
expiresAt: Date;
|
|
962
|
-
token: string;
|
|
963
|
-
ipAddress?: string | null | undefined;
|
|
964
|
-
userAgent?: string | null | undefined;
|
|
965
|
-
impersonatedBy?: string | null | undefined;
|
|
966
|
-
};
|
|
967
|
-
} | null, {
|
|
968
|
-
user: {
|
|
969
|
-
id: string;
|
|
970
|
-
createdAt: Date;
|
|
971
|
-
updatedAt: Date;
|
|
972
|
-
email: string;
|
|
973
|
-
emailVerified: boolean;
|
|
974
|
-
name: string;
|
|
975
|
-
image?: string | null | undefined;
|
|
976
|
-
banned: boolean | null | undefined;
|
|
977
|
-
role?: string | null | undefined;
|
|
978
|
-
banReason?: string | null | undefined;
|
|
979
|
-
banExpires?: Date | null | undefined;
|
|
980
|
-
};
|
|
981
|
-
session: {
|
|
982
|
-
id: string;
|
|
983
|
-
createdAt: Date;
|
|
984
|
-
updatedAt: Date;
|
|
985
|
-
userId: string;
|
|
986
|
-
expiresAt: Date;
|
|
506
|
+
deleteUser: {
|
|
507
|
+
callback: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
|
|
508
|
+
token: string;
|
|
509
|
+
callbackURL?: string | undefined;
|
|
510
|
+
}> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
511
|
+
query: {
|
|
987
512
|
token: string;
|
|
988
|
-
|
|
989
|
-
userAgent?: string | null | undefined;
|
|
990
|
-
impersonatedBy?: string | null | undefined;
|
|
513
|
+
callbackURL?: string | undefined;
|
|
991
514
|
};
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
515
|
+
fetchOptions?: FetchOptions | undefined;
|
|
516
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
517
|
+
success: boolean;
|
|
518
|
+
message: string;
|
|
519
|
+
}, {
|
|
520
|
+
code?: string | undefined;
|
|
995
521
|
message?: string | undefined;
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
522
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
523
|
+
};
|
|
524
|
+
} & {
|
|
525
|
+
unlinkAccount: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
526
|
+
providerId: string;
|
|
527
|
+
accountId?: string | undefined;
|
|
528
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
529
|
+
providerId: string;
|
|
530
|
+
accountId?: string | undefined;
|
|
531
|
+
} & {
|
|
532
|
+
fetchOptions?: FetchOptions | undefined;
|
|
533
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
534
|
+
status: boolean;
|
|
535
|
+
}, {
|
|
536
|
+
code?: string | undefined;
|
|
537
|
+
message?: string | undefined;
|
|
538
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
539
|
+
} & {
|
|
540
|
+
refreshToken: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
541
|
+
providerId: string;
|
|
542
|
+
accountId?: string | undefined;
|
|
543
|
+
userId?: string | undefined;
|
|
544
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
545
|
+
providerId: string;
|
|
546
|
+
accountId?: string | undefined;
|
|
547
|
+
userId?: string | undefined;
|
|
548
|
+
} & {
|
|
549
|
+
fetchOptions?: FetchOptions | undefined;
|
|
550
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
551
|
+
accessToken: string | undefined;
|
|
552
|
+
refreshToken: string | undefined;
|
|
553
|
+
accessTokenExpiresAt: Date | undefined;
|
|
554
|
+
refreshTokenExpiresAt: Date | undefined;
|
|
555
|
+
scope: string | null | undefined;
|
|
556
|
+
idToken: string | null | undefined;
|
|
557
|
+
providerId: string;
|
|
558
|
+
accountId: string;
|
|
559
|
+
}, {
|
|
560
|
+
code?: string | undefined;
|
|
561
|
+
message?: string | undefined;
|
|
562
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
563
|
+
} & {
|
|
564
|
+
getAccessToken: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
565
|
+
providerId: string;
|
|
566
|
+
accountId?: string | undefined;
|
|
567
|
+
userId?: string | undefined;
|
|
568
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
569
|
+
providerId: string;
|
|
570
|
+
accountId?: string | undefined;
|
|
571
|
+
userId?: string | undefined;
|
|
572
|
+
} & {
|
|
573
|
+
fetchOptions?: FetchOptions | undefined;
|
|
574
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
575
|
+
accessToken: string;
|
|
576
|
+
accessTokenExpiresAt: Date | undefined;
|
|
577
|
+
scopes: string[];
|
|
578
|
+
idToken: string | undefined;
|
|
579
|
+
}, {
|
|
580
|
+
code?: string | undefined;
|
|
581
|
+
message?: string | undefined;
|
|
582
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
583
|
+
} & {
|
|
584
|
+
accountInfo: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
|
|
585
|
+
accountId?: string | undefined;
|
|
586
|
+
}> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
|
|
587
|
+
query?: {
|
|
588
|
+
accountId?: string | undefined;
|
|
589
|
+
} | undefined;
|
|
590
|
+
fetchOptions?: FetchOptions | undefined;
|
|
591
|
+
}> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
592
|
+
user: import("better-auth").OAuth2UserInfo;
|
|
593
|
+
data: Record<string, any>;
|
|
594
|
+
}, {
|
|
595
|
+
code?: string | undefined;
|
|
596
|
+
message?: string | undefined;
|
|
597
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
598
|
+
} & {
|
|
599
|
+
getSession: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
|
|
600
|
+
disableCookieCache?: unknown;
|
|
601
|
+
disableRefresh?: unknown;
|
|
602
|
+
}> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
|
|
603
|
+
query?: {
|
|
604
|
+
disableCookieCache?: unknown;
|
|
605
|
+
disableRefresh?: unknown;
|
|
606
|
+
} | undefined;
|
|
607
|
+
fetchOptions?: FetchOptions | undefined;
|
|
608
|
+
}> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
1003
609
|
user: {
|
|
1004
610
|
id: string;
|
|
1005
611
|
createdAt: Date;
|
|
@@ -1008,10 +614,6 @@ declare const authClient: {
|
|
|
1008
614
|
emailVerified: boolean;
|
|
1009
615
|
name: string;
|
|
1010
616
|
image?: string | null | undefined;
|
|
1011
|
-
banned: boolean | null | undefined;
|
|
1012
|
-
role?: string | null | undefined;
|
|
1013
|
-
banReason?: string | null | undefined;
|
|
1014
|
-
banExpires?: Date | null | undefined;
|
|
1015
617
|
};
|
|
1016
618
|
session: {
|
|
1017
619
|
id: string;
|
|
@@ -1022,211 +624,282 @@ declare const authClient: {
|
|
|
1022
624
|
token: string;
|
|
1023
625
|
ipAddress?: string | null | undefined;
|
|
1024
626
|
userAgent?: string | null | undefined;
|
|
1025
|
-
impersonatedBy?: string | null | undefined;
|
|
1026
627
|
};
|
|
1027
|
-
}
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
628
|
+
} | null, {
|
|
629
|
+
code?: string | undefined;
|
|
630
|
+
message?: string | undefined;
|
|
631
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
632
|
+
} & {
|
|
633
|
+
useSession: {
|
|
634
|
+
(): Readonly<import("vue").Ref<{
|
|
635
|
+
readonly data: {
|
|
636
|
+
readonly user: {
|
|
637
|
+
readonly id: string;
|
|
638
|
+
readonly createdAt: Date;
|
|
639
|
+
readonly updatedAt: Date;
|
|
640
|
+
readonly email: string;
|
|
641
|
+
readonly emailVerified: boolean;
|
|
642
|
+
readonly name: string;
|
|
643
|
+
readonly image?: string | null | undefined;
|
|
644
|
+
};
|
|
645
|
+
readonly session: {
|
|
646
|
+
readonly id: string;
|
|
647
|
+
readonly createdAt: Date;
|
|
648
|
+
readonly updatedAt: Date;
|
|
649
|
+
readonly userId: string;
|
|
650
|
+
readonly expiresAt: Date;
|
|
651
|
+
readonly token: string;
|
|
652
|
+
readonly ipAddress?: string | null | undefined;
|
|
653
|
+
readonly userAgent?: string | null | undefined;
|
|
654
|
+
};
|
|
655
|
+
} | null;
|
|
656
|
+
readonly isPending: boolean;
|
|
657
|
+
readonly isRefetching: boolean;
|
|
658
|
+
readonly error: import("better-auth/vue").BetterFetchError | null;
|
|
659
|
+
}, {
|
|
660
|
+
readonly data: {
|
|
661
|
+
readonly user: {
|
|
662
|
+
readonly id: string;
|
|
663
|
+
readonly createdAt: Date;
|
|
664
|
+
readonly updatedAt: Date;
|
|
665
|
+
readonly email: string;
|
|
666
|
+
readonly emailVerified: boolean;
|
|
667
|
+
readonly name: string;
|
|
668
|
+
readonly image?: string | null | undefined;
|
|
669
|
+
};
|
|
670
|
+
readonly session: {
|
|
671
|
+
readonly id: string;
|
|
672
|
+
readonly createdAt: Date;
|
|
673
|
+
readonly updatedAt: Date;
|
|
674
|
+
readonly userId: string;
|
|
675
|
+
readonly expiresAt: Date;
|
|
676
|
+
readonly token: string;
|
|
677
|
+
readonly ipAddress?: string | null | undefined;
|
|
678
|
+
readonly userAgent?: string | null | undefined;
|
|
679
|
+
};
|
|
680
|
+
} | null;
|
|
681
|
+
readonly isPending: boolean;
|
|
682
|
+
readonly isRefetching: boolean;
|
|
683
|
+
readonly error: import("better-auth/vue").BetterFetchError | null;
|
|
684
|
+
}>>;
|
|
685
|
+
<F extends (...args: any) => any>(useFetch: F): Promise<{
|
|
686
|
+
data: import("vue").Ref<{
|
|
687
|
+
user: {
|
|
688
|
+
id: string;
|
|
689
|
+
createdAt: Date;
|
|
690
|
+
updatedAt: Date;
|
|
691
|
+
email: string;
|
|
692
|
+
emailVerified: boolean;
|
|
693
|
+
name: string;
|
|
694
|
+
image?: string | null | undefined;
|
|
695
|
+
};
|
|
696
|
+
session: {
|
|
697
|
+
id: string;
|
|
698
|
+
createdAt: Date;
|
|
699
|
+
updatedAt: Date;
|
|
700
|
+
userId: string;
|
|
701
|
+
expiresAt: Date;
|
|
702
|
+
token: string;
|
|
703
|
+
ipAddress?: string | null | undefined;
|
|
704
|
+
userAgent?: string | null | undefined;
|
|
705
|
+
};
|
|
706
|
+
} | null, {
|
|
707
|
+
user: {
|
|
708
|
+
id: string;
|
|
709
|
+
createdAt: Date;
|
|
710
|
+
updatedAt: Date;
|
|
711
|
+
email: string;
|
|
712
|
+
emailVerified: boolean;
|
|
713
|
+
name: string;
|
|
714
|
+
image?: string | null | undefined;
|
|
715
|
+
};
|
|
716
|
+
session: {
|
|
717
|
+
id: string;
|
|
718
|
+
createdAt: Date;
|
|
719
|
+
updatedAt: Date;
|
|
720
|
+
userId: string;
|
|
721
|
+
expiresAt: Date;
|
|
722
|
+
token: string;
|
|
723
|
+
ipAddress?: string | null | undefined;
|
|
724
|
+
userAgent?: string | null | undefined;
|
|
725
|
+
};
|
|
726
|
+
} | null>;
|
|
727
|
+
isPending: false;
|
|
728
|
+
error: import("vue").Ref<{
|
|
729
|
+
message?: string | undefined;
|
|
730
|
+
status: number;
|
|
731
|
+
statusText: string;
|
|
732
|
+
}>;
|
|
733
|
+
}>;
|
|
734
|
+
};
|
|
735
|
+
$Infer: {
|
|
736
|
+
Session: {
|
|
737
|
+
user: {
|
|
738
|
+
id: string;
|
|
739
|
+
createdAt: Date;
|
|
740
|
+
updatedAt: Date;
|
|
741
|
+
email: string;
|
|
742
|
+
emailVerified: boolean;
|
|
743
|
+
name: string;
|
|
744
|
+
image?: string | null | undefined;
|
|
745
|
+
};
|
|
746
|
+
session: {
|
|
747
|
+
id: string;
|
|
748
|
+
createdAt: Date;
|
|
749
|
+
updatedAt: Date;
|
|
750
|
+
userId: string;
|
|
751
|
+
expiresAt: Date;
|
|
752
|
+
token: string;
|
|
753
|
+
ipAddress?: string | null | undefined;
|
|
754
|
+
userAgent?: string | null | undefined;
|
|
755
|
+
};
|
|
1044
756
|
};
|
|
1045
|
-
}
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
757
|
+
};
|
|
758
|
+
$fetch: import("better-auth/vue").BetterFetch<{
|
|
759
|
+
plugins: (import("better-auth/vue").BetterFetchPlugin | {
|
|
760
|
+
id: string;
|
|
761
|
+
name: string;
|
|
762
|
+
hooks: {
|
|
763
|
+
onSuccess(context: import("better-auth/vue").SuccessContext<any>): void;
|
|
764
|
+
};
|
|
765
|
+
} | {
|
|
766
|
+
id: string;
|
|
767
|
+
name: string;
|
|
768
|
+
hooks: {
|
|
769
|
+
onSuccess: ((context: import("better-auth/vue").SuccessContext<any>) => Promise<void> | void) | undefined;
|
|
770
|
+
onError: ((context: import("better-auth/vue").ErrorContext) => Promise<void> | void) | undefined;
|
|
771
|
+
onRequest: (<T extends Record<string, any>>(context: import("better-auth/vue").RequestContext<T>) => Promise<import("better-auth/vue").RequestContext | void> | import("better-auth/vue").RequestContext | void) | undefined;
|
|
772
|
+
onResponse: ((context: import("better-auth/vue").ResponseContext) => Promise<Response | void | import("better-auth/vue").ResponseContext> | Response | import("better-auth/vue").ResponseContext | void) | undefined;
|
|
773
|
+
};
|
|
774
|
+
})[];
|
|
775
|
+
cache?: RequestCache | undefined;
|
|
776
|
+
method: string;
|
|
777
|
+
headers?: (HeadersInit & (HeadersInit | {
|
|
778
|
+
accept: "application/json" | "text/plain" | "application/octet-stream";
|
|
779
|
+
"content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
|
|
780
|
+
authorization: "Bearer" | "Basic";
|
|
781
|
+
})) | undefined;
|
|
782
|
+
redirect?: RequestRedirect | undefined;
|
|
783
|
+
credentials?: RequestCredentials;
|
|
784
|
+
integrity?: string | undefined;
|
|
785
|
+
keepalive?: boolean | undefined;
|
|
786
|
+
mode?: RequestMode | undefined;
|
|
787
|
+
priority?: RequestPriority | undefined;
|
|
788
|
+
referrer?: string | undefined;
|
|
789
|
+
referrerPolicy?: ReferrerPolicy | undefined;
|
|
790
|
+
signal?: (AbortSignal | null) | undefined;
|
|
791
|
+
window?: null | undefined;
|
|
792
|
+
onRetry?: ((response: import("better-auth/vue").ResponseContext) => Promise<void> | void) | undefined;
|
|
793
|
+
hookOptions?: {
|
|
794
|
+
cloneResponse?: boolean;
|
|
795
|
+
} | undefined;
|
|
796
|
+
timeout?: number | undefined;
|
|
797
|
+
customFetchImpl: import("better-auth/vue").FetchEsque;
|
|
798
|
+
baseURL: string;
|
|
799
|
+
throw?: boolean | undefined;
|
|
800
|
+
auth?: ({
|
|
801
|
+
type: "Bearer";
|
|
802
|
+
token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
|
|
803
|
+
} | {
|
|
804
|
+
type: "Basic";
|
|
805
|
+
username: string | (() => string | undefined) | undefined;
|
|
806
|
+
password: string | (() => string | undefined) | undefined;
|
|
807
|
+
} | {
|
|
808
|
+
type: "Custom";
|
|
809
|
+
prefix: string | (() => string | undefined) | undefined;
|
|
810
|
+
value: string | (() => string | undefined) | undefined;
|
|
811
|
+
}) | undefined;
|
|
812
|
+
body?: any;
|
|
813
|
+
query?: any;
|
|
814
|
+
params?: any;
|
|
815
|
+
duplex?: "full" | "half" | undefined;
|
|
816
|
+
jsonParser: (text: string) => Promise<any> | any;
|
|
817
|
+
retry?: import("better-auth/vue").RetryOptions | undefined;
|
|
818
|
+
retryAttempt?: number | undefined;
|
|
819
|
+
output?: (import("better-auth/vue").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
|
|
820
|
+
errorSchema?: import("better-auth/vue").StandardSchemaV1 | undefined;
|
|
821
|
+
disableValidation?: boolean | undefined;
|
|
822
|
+
disableSignal?: boolean | undefined;
|
|
823
|
+
}, unknown, unknown, {}>;
|
|
824
|
+
$store: {
|
|
825
|
+
notify: (signal?: (Omit<string, "$sessionSignal"> | "$sessionSignal") | undefined) => void;
|
|
826
|
+
listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
|
|
827
|
+
atoms: Record<string, import("better-auth/vue").WritableAtom<any>>;
|
|
828
|
+
};
|
|
829
|
+
$ERROR_CODES: {
|
|
830
|
+
readonly USER_NOT_FOUND: "User not found";
|
|
831
|
+
readonly FAILED_TO_CREATE_USER: "Failed to create user";
|
|
832
|
+
readonly FAILED_TO_CREATE_SESSION: "Failed to create session";
|
|
833
|
+
readonly FAILED_TO_UPDATE_USER: "Failed to update user";
|
|
834
|
+
readonly FAILED_TO_GET_SESSION: "Failed to get session";
|
|
835
|
+
readonly INVALID_PASSWORD: "Invalid password";
|
|
836
|
+
readonly INVALID_EMAIL: "Invalid email";
|
|
837
|
+
readonly INVALID_EMAIL_OR_PASSWORD: "Invalid email or password";
|
|
838
|
+
readonly SOCIAL_ACCOUNT_ALREADY_LINKED: "Social account already linked";
|
|
839
|
+
readonly PROVIDER_NOT_FOUND: "Provider not found";
|
|
840
|
+
readonly INVALID_TOKEN: "Invalid token";
|
|
841
|
+
readonly ID_TOKEN_NOT_SUPPORTED: "id_token not supported";
|
|
842
|
+
readonly FAILED_TO_GET_USER_INFO: "Failed to get user info";
|
|
843
|
+
readonly USER_EMAIL_NOT_FOUND: "User email not found";
|
|
844
|
+
readonly EMAIL_NOT_VERIFIED: "Email not verified";
|
|
845
|
+
readonly PASSWORD_TOO_SHORT: "Password too short";
|
|
846
|
+
readonly PASSWORD_TOO_LONG: "Password too long";
|
|
847
|
+
readonly USER_ALREADY_EXISTS: "User already exists.";
|
|
848
|
+
readonly USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: "User already exists. Use another email.";
|
|
849
|
+
readonly EMAIL_CAN_NOT_BE_UPDATED: "Email can not be updated";
|
|
850
|
+
readonly CREDENTIAL_ACCOUNT_NOT_FOUND: "Credential account not found";
|
|
851
|
+
readonly SESSION_EXPIRED: "Session expired. Re-authenticate to perform this action.";
|
|
852
|
+
readonly FAILED_TO_UNLINK_LAST_ACCOUNT: "You can't unlink your last account";
|
|
853
|
+
readonly ACCOUNT_NOT_FOUND: "Account not found";
|
|
854
|
+
readonly USER_ALREADY_HAS_PASSWORD: "User already has a password. Provide that to delete the account.";
|
|
855
|
+
};
|
|
1143
856
|
};
|
|
1144
857
|
};
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
readonly role?: string | null | undefined;
|
|
1191
|
-
readonly banReason?: string | null | undefined;
|
|
1192
|
-
readonly banExpires?: Date | null | undefined;
|
|
1193
|
-
};
|
|
1194
|
-
readonly session: {
|
|
1195
|
-
readonly id: string;
|
|
1196
|
-
readonly createdAt: Date;
|
|
1197
|
-
readonly updatedAt: Date;
|
|
1198
|
-
readonly userId: string;
|
|
1199
|
-
readonly expiresAt: Date;
|
|
1200
|
-
readonly token: string;
|
|
1201
|
-
readonly ipAddress?: string | null | undefined;
|
|
1202
|
-
readonly userAgent?: string | null | undefined;
|
|
1203
|
-
readonly impersonatedBy?: string | null | undefined;
|
|
1204
|
-
};
|
|
1205
|
-
} | null;
|
|
1206
|
-
readonly isPending: boolean;
|
|
1207
|
-
readonly isRefetching: boolean;
|
|
1208
|
-
readonly error: import("better-auth/vue").BetterFetchError | null;
|
|
1209
|
-
}>>;
|
|
1210
|
-
isLoading: import("vue").ComputedRef<boolean>;
|
|
1211
|
-
isAuthenticated: import("vue").ComputedRef<boolean>;
|
|
1212
|
-
user: import("vue").ComputedRef<{
|
|
1213
|
-
readonly id: string;
|
|
1214
|
-
readonly createdAt: Date;
|
|
1215
|
-
readonly updatedAt: Date;
|
|
1216
|
-
readonly email: string;
|
|
1217
|
-
readonly emailVerified: boolean;
|
|
1218
|
-
readonly name: string;
|
|
1219
|
-
readonly image?: string | null | undefined;
|
|
1220
|
-
readonly banned: boolean | null | undefined;
|
|
1221
|
-
readonly role?: string | null | undefined;
|
|
1222
|
-
readonly banReason?: string | null | undefined;
|
|
1223
|
-
readonly banExpires?: Date | null | undefined;
|
|
1224
|
-
} | null>;
|
|
1225
|
-
login: (returnTo?: string) => void;
|
|
1226
|
-
register: (returnTo?: string) => void;
|
|
1227
|
-
logout: () => Promise<void>;
|
|
1228
|
-
refreshSession: () => Promise<{
|
|
1229
|
-
data: {
|
|
858
|
+
export declare function getAuthClientExports(): {
|
|
859
|
+
signIn: {
|
|
860
|
+
social: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
861
|
+
provider: "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel" | (string & {});
|
|
862
|
+
callbackURL?: string | undefined;
|
|
863
|
+
newUserCallbackURL?: string | undefined;
|
|
864
|
+
errorCallbackURL?: string | undefined;
|
|
865
|
+
disableRedirect?: boolean | undefined;
|
|
866
|
+
idToken?: {
|
|
867
|
+
token: string;
|
|
868
|
+
nonce?: string | undefined;
|
|
869
|
+
accessToken?: string | undefined;
|
|
870
|
+
refreshToken?: string | undefined;
|
|
871
|
+
expiresAt?: number | undefined;
|
|
872
|
+
} | undefined;
|
|
873
|
+
scopes?: string[] | undefined;
|
|
874
|
+
requestSignUp?: boolean | undefined;
|
|
875
|
+
loginHint?: string | undefined;
|
|
876
|
+
additionalData?: Record<string, any> | undefined;
|
|
877
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
878
|
+
provider: "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel" | (string & {});
|
|
879
|
+
callbackURL?: string | undefined;
|
|
880
|
+
newUserCallbackURL?: string | undefined;
|
|
881
|
+
errorCallbackURL?: string | undefined;
|
|
882
|
+
disableRedirect?: boolean | undefined;
|
|
883
|
+
idToken?: {
|
|
884
|
+
token: string;
|
|
885
|
+
nonce?: string | undefined;
|
|
886
|
+
accessToken?: string | undefined;
|
|
887
|
+
refreshToken?: string | undefined;
|
|
888
|
+
expiresAt?: number | undefined;
|
|
889
|
+
} | undefined;
|
|
890
|
+
scopes?: string[] | undefined;
|
|
891
|
+
requestSignUp?: boolean | undefined;
|
|
892
|
+
loginHint?: string | undefined;
|
|
893
|
+
additionalData?: Record<string, any> | undefined;
|
|
894
|
+
} & {
|
|
895
|
+
fetchOptions?: FetchOptions | undefined;
|
|
896
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<NonNullable<{
|
|
897
|
+
redirect: boolean;
|
|
898
|
+
url: string;
|
|
899
|
+
} | {
|
|
900
|
+
redirect: boolean;
|
|
901
|
+
token: string;
|
|
902
|
+
url: undefined;
|
|
1230
903
|
user: {
|
|
1231
904
|
id: string;
|
|
1232
905
|
createdAt: Date;
|
|
@@ -1234,362 +907,233 @@ export declare function useAuth(): {
|
|
|
1234
907
|
email: string;
|
|
1235
908
|
emailVerified: boolean;
|
|
1236
909
|
name: string;
|
|
1237
|
-
image?: string | null | undefined;
|
|
1238
|
-
banned: boolean | null | undefined;
|
|
1239
|
-
role?: string | null | undefined;
|
|
1240
|
-
banReason?: string | null | undefined;
|
|
1241
|
-
banExpires?: Date | null | undefined;
|
|
1242
|
-
};
|
|
1243
|
-
session: {
|
|
1244
|
-
id: string;
|
|
1245
|
-
createdAt: Date;
|
|
1246
|
-
updatedAt: Date;
|
|
1247
|
-
userId: string;
|
|
1248
|
-
expiresAt: Date;
|
|
1249
|
-
token: string;
|
|
1250
|
-
ipAddress?: string | null | undefined;
|
|
1251
|
-
userAgent?: string | null | undefined;
|
|
1252
|
-
impersonatedBy?: string | null | undefined;
|
|
910
|
+
image?: string | null | undefined | undefined;
|
|
1253
911
|
};
|
|
1254
|
-
}
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
error: {
|
|
1259
|
-
code?: string | undefined | undefined;
|
|
1260
|
-
message?: string | undefined | undefined;
|
|
1261
|
-
status: number;
|
|
1262
|
-
statusText: string;
|
|
1263
|
-
};
|
|
1264
|
-
}>;
|
|
1265
|
-
authClient: {
|
|
1266
|
-
admin: {
|
|
1267
|
-
setRole: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
1268
|
-
userId: string;
|
|
1269
|
-
role: "user" | "admin" | ("user" | "admin")[];
|
|
1270
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
1271
|
-
userId: string;
|
|
1272
|
-
role: "user" | "admin" | ("user" | "admin")[];
|
|
1273
|
-
} & {
|
|
1274
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1275
|
-
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
1276
|
-
user: import("better-auth/client/plugins").UserWithRole;
|
|
1277
|
-
}, {
|
|
1278
|
-
code?: string | undefined;
|
|
1279
|
-
message?: string | undefined;
|
|
1280
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
1281
|
-
};
|
|
912
|
+
}>, {
|
|
913
|
+
code?: string | undefined;
|
|
914
|
+
message?: string | undefined;
|
|
915
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
1282
916
|
} & {
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
917
|
+
email: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
918
|
+
email: string;
|
|
919
|
+
password: string;
|
|
920
|
+
callbackURL?: string | undefined;
|
|
921
|
+
rememberMe?: boolean | undefined;
|
|
922
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
923
|
+
email: string;
|
|
924
|
+
password: string;
|
|
925
|
+
callbackURL?: string | undefined;
|
|
926
|
+
rememberMe?: boolean | undefined;
|
|
927
|
+
} & {
|
|
928
|
+
fetchOptions?: FetchOptions | undefined;
|
|
929
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
930
|
+
redirect: boolean;
|
|
931
|
+
token: string;
|
|
932
|
+
url?: string | undefined;
|
|
933
|
+
user: {
|
|
1292
934
|
id: string;
|
|
1293
935
|
createdAt: Date;
|
|
1294
936
|
updatedAt: Date;
|
|
1295
937
|
email: string;
|
|
1296
938
|
emailVerified: boolean;
|
|
1297
939
|
name: string;
|
|
1298
|
-
image?: string | null | undefined;
|
|
1299
|
-
}
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
}
|
|
1304
|
-
}
|
|
1305
|
-
|
|
1306
|
-
|
|
940
|
+
image?: string | null | undefined | undefined;
|
|
941
|
+
};
|
|
942
|
+
}, {
|
|
943
|
+
code?: string | undefined;
|
|
944
|
+
message?: string | undefined;
|
|
945
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
946
|
+
};
|
|
947
|
+
signUp: {
|
|
948
|
+
email: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
949
|
+
name: string;
|
|
950
|
+
email: string;
|
|
951
|
+
password: string;
|
|
952
|
+
image?: string | undefined;
|
|
953
|
+
callbackURL?: string | undefined;
|
|
954
|
+
rememberMe?: boolean | undefined;
|
|
955
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
956
|
+
email: string;
|
|
957
|
+
name: string;
|
|
958
|
+
password: string;
|
|
959
|
+
image?: string | undefined;
|
|
960
|
+
callbackURL?: string | undefined;
|
|
961
|
+
fetchOptions?: FetchOptions | undefined;
|
|
962
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<NonNullable<{
|
|
963
|
+
token: null;
|
|
964
|
+
user: {
|
|
965
|
+
id: string;
|
|
966
|
+
createdAt: Date;
|
|
967
|
+
updatedAt: Date;
|
|
1307
968
|
email: string;
|
|
1308
|
-
|
|
969
|
+
emailVerified: boolean;
|
|
1309
970
|
name: string;
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
971
|
+
image?: string | null | undefined | undefined;
|
|
972
|
+
};
|
|
973
|
+
} | {
|
|
974
|
+
token: string;
|
|
975
|
+
user: {
|
|
976
|
+
id: string;
|
|
977
|
+
createdAt: Date;
|
|
978
|
+
updatedAt: Date;
|
|
1313
979
|
email: string;
|
|
1314
|
-
|
|
980
|
+
emailVerified: boolean;
|
|
1315
981
|
name: string;
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
admin: {
|
|
1344
|
-
listUsers: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
|
|
1345
|
-
searchValue?: string | undefined;
|
|
1346
|
-
searchField?: "name" | "email" | undefined;
|
|
1347
|
-
searchOperator?: "contains" | "starts_with" | "ends_with" | undefined;
|
|
1348
|
-
limit?: string | number | undefined;
|
|
1349
|
-
offset?: string | number | undefined;
|
|
1350
|
-
sortBy?: string | undefined;
|
|
1351
|
-
sortDirection?: "asc" | "desc" | undefined;
|
|
1352
|
-
filterField?: string | undefined;
|
|
1353
|
-
filterValue?: string | number | boolean | undefined;
|
|
1354
|
-
filterOperator?: "contains" | "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | undefined;
|
|
1355
|
-
}> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
1356
|
-
query: {
|
|
1357
|
-
searchValue?: string | undefined;
|
|
1358
|
-
searchField?: "name" | "email" | undefined;
|
|
1359
|
-
searchOperator?: "contains" | "starts_with" | "ends_with" | undefined;
|
|
1360
|
-
limit?: string | number | undefined;
|
|
1361
|
-
offset?: string | number | undefined;
|
|
1362
|
-
sortBy?: string | undefined;
|
|
1363
|
-
sortDirection?: "asc" | "desc" | undefined;
|
|
1364
|
-
filterField?: string | undefined;
|
|
1365
|
-
filterValue?: string | number | boolean | undefined;
|
|
1366
|
-
filterOperator?: "contains" | "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | undefined;
|
|
982
|
+
image?: string | null | undefined | undefined;
|
|
983
|
+
};
|
|
984
|
+
}>, {
|
|
985
|
+
code?: string | undefined;
|
|
986
|
+
message?: string | undefined;
|
|
987
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
988
|
+
};
|
|
989
|
+
signOut: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
|
|
990
|
+
query?: Record<string, any> | undefined;
|
|
991
|
+
fetchOptions?: FetchOptions | undefined;
|
|
992
|
+
}> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
993
|
+
success: boolean;
|
|
994
|
+
}, {
|
|
995
|
+
code?: string | undefined;
|
|
996
|
+
message?: string | undefined;
|
|
997
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
998
|
+
useSession: {
|
|
999
|
+
(): Readonly<import("vue").Ref<{
|
|
1000
|
+
readonly data: {
|
|
1001
|
+
readonly user: {
|
|
1002
|
+
readonly id: string;
|
|
1003
|
+
readonly createdAt: Date;
|
|
1004
|
+
readonly updatedAt: Date;
|
|
1005
|
+
readonly email: string;
|
|
1006
|
+
readonly emailVerified: boolean;
|
|
1007
|
+
readonly name: string;
|
|
1008
|
+
readonly image?: string | null | undefined;
|
|
1367
1009
|
};
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
}>, {
|
|
1378
|
-
code?: string | undefined;
|
|
1379
|
-
message?: string | undefined;
|
|
1380
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
1381
|
-
};
|
|
1382
|
-
} & {
|
|
1383
|
-
admin: {
|
|
1384
|
-
listUserSessions: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
1385
|
-
userId: unknown;
|
|
1386
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
1387
|
-
userId: unknown;
|
|
1388
|
-
} & {
|
|
1389
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1390
|
-
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
1391
|
-
sessions: import("better-auth/client/plugins").SessionWithImpersonatedBy[];
|
|
1392
|
-
}, {
|
|
1393
|
-
code?: string | undefined;
|
|
1394
|
-
message?: string | undefined;
|
|
1395
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
1396
|
-
};
|
|
1397
|
-
} & {
|
|
1398
|
-
admin: {
|
|
1399
|
-
unbanUser: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
1400
|
-
userId: unknown;
|
|
1401
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
1402
|
-
userId: unknown;
|
|
1403
|
-
} & {
|
|
1404
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1405
|
-
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
1406
|
-
user: {
|
|
1407
|
-
id: string;
|
|
1408
|
-
createdAt: Date;
|
|
1409
|
-
updatedAt: Date;
|
|
1410
|
-
email: string;
|
|
1411
|
-
emailVerified: boolean;
|
|
1412
|
-
name: string;
|
|
1413
|
-
image?: string | null | undefined;
|
|
1414
|
-
} & Record<string, any>;
|
|
1415
|
-
}, {
|
|
1416
|
-
code?: string | undefined;
|
|
1417
|
-
message?: string | undefined;
|
|
1418
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
1419
|
-
};
|
|
1420
|
-
} & {
|
|
1421
|
-
admin: {
|
|
1422
|
-
banUser: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
1423
|
-
userId: unknown;
|
|
1424
|
-
banReason?: string | undefined;
|
|
1425
|
-
banExpiresIn?: number | undefined;
|
|
1426
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
1427
|
-
userId: unknown;
|
|
1428
|
-
banReason?: string | undefined;
|
|
1429
|
-
banExpiresIn?: number | undefined;
|
|
1430
|
-
} & {
|
|
1431
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1432
|
-
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
1433
|
-
user: {
|
|
1434
|
-
id: string;
|
|
1435
|
-
createdAt: Date;
|
|
1436
|
-
updatedAt: Date;
|
|
1437
|
-
email: string;
|
|
1438
|
-
emailVerified: boolean;
|
|
1439
|
-
name: string;
|
|
1440
|
-
image?: string | null | undefined;
|
|
1441
|
-
} & Record<string, any>;
|
|
1442
|
-
}, {
|
|
1443
|
-
code?: string | undefined;
|
|
1444
|
-
message?: string | undefined;
|
|
1445
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
1446
|
-
};
|
|
1447
|
-
} & {
|
|
1448
|
-
admin: {
|
|
1449
|
-
impersonateUser: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
1450
|
-
userId: unknown;
|
|
1451
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
1452
|
-
userId: unknown;
|
|
1453
|
-
} & {
|
|
1454
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1455
|
-
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
1456
|
-
session: {
|
|
1457
|
-
id: string;
|
|
1458
|
-
createdAt: Date;
|
|
1459
|
-
updatedAt: Date;
|
|
1460
|
-
userId: string;
|
|
1461
|
-
expiresAt: Date;
|
|
1462
|
-
token: string;
|
|
1463
|
-
ipAddress?: string | null | undefined;
|
|
1464
|
-
userAgent?: string | null | undefined;
|
|
1010
|
+
readonly session: {
|
|
1011
|
+
readonly id: string;
|
|
1012
|
+
readonly createdAt: Date;
|
|
1013
|
+
readonly updatedAt: Date;
|
|
1014
|
+
readonly userId: string;
|
|
1015
|
+
readonly expiresAt: Date;
|
|
1016
|
+
readonly token: string;
|
|
1017
|
+
readonly ipAddress?: string | null | undefined;
|
|
1018
|
+
readonly userAgent?: string | null | undefined;
|
|
1465
1019
|
};
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
sessionToken: string;
|
|
1491
|
-
} & {
|
|
1492
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1493
|
-
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
1494
|
-
success: boolean;
|
|
1495
|
-
}, {
|
|
1496
|
-
code?: string | undefined;
|
|
1497
|
-
message?: string | undefined;
|
|
1498
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
1499
|
-
};
|
|
1500
|
-
} & {
|
|
1501
|
-
admin: {
|
|
1502
|
-
revokeUserSessions: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
1503
|
-
userId: unknown;
|
|
1504
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
1505
|
-
userId: unknown;
|
|
1506
|
-
} & {
|
|
1507
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1508
|
-
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
1509
|
-
success: boolean;
|
|
1510
|
-
}, {
|
|
1511
|
-
code?: string | undefined;
|
|
1512
|
-
message?: string | undefined;
|
|
1513
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
1514
|
-
};
|
|
1515
|
-
} & {
|
|
1516
|
-
admin: {
|
|
1517
|
-
removeUser: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
1518
|
-
userId: unknown;
|
|
1519
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
1520
|
-
userId: unknown;
|
|
1521
|
-
} & {
|
|
1522
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1523
|
-
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
1524
|
-
success: boolean;
|
|
1525
|
-
}, {
|
|
1526
|
-
code?: string | undefined;
|
|
1527
|
-
message?: string | undefined;
|
|
1528
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
1529
|
-
};
|
|
1530
|
-
} & {
|
|
1531
|
-
admin: {
|
|
1532
|
-
setUserPassword: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
1533
|
-
newPassword: string;
|
|
1534
|
-
userId: unknown;
|
|
1535
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
1536
|
-
newPassword: string;
|
|
1537
|
-
userId: unknown;
|
|
1538
|
-
} & {
|
|
1539
|
-
fetchOptions?: FetchOptions | undefined;
|
|
1540
|
-
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
1541
|
-
status: boolean;
|
|
1542
|
-
}, {
|
|
1543
|
-
code?: string | undefined;
|
|
1544
|
-
message?: string | undefined;
|
|
1545
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
1546
|
-
};
|
|
1547
|
-
} & {
|
|
1548
|
-
admin: {
|
|
1549
|
-
hasPermission: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<({
|
|
1550
|
-
permission: {
|
|
1551
|
-
readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
|
|
1552
|
-
readonly session?: ("list" | "delete" | "revoke")[] | undefined;
|
|
1020
|
+
} | null;
|
|
1021
|
+
readonly isPending: boolean;
|
|
1022
|
+
readonly isRefetching: boolean;
|
|
1023
|
+
readonly error: import("better-auth/vue").BetterFetchError | null;
|
|
1024
|
+
}, {
|
|
1025
|
+
readonly data: {
|
|
1026
|
+
readonly user: {
|
|
1027
|
+
readonly id: string;
|
|
1028
|
+
readonly createdAt: Date;
|
|
1029
|
+
readonly updatedAt: Date;
|
|
1030
|
+
readonly email: string;
|
|
1031
|
+
readonly emailVerified: boolean;
|
|
1032
|
+
readonly name: string;
|
|
1033
|
+
readonly image?: string | null | undefined;
|
|
1034
|
+
};
|
|
1035
|
+
readonly session: {
|
|
1036
|
+
readonly id: string;
|
|
1037
|
+
readonly createdAt: Date;
|
|
1038
|
+
readonly updatedAt: Date;
|
|
1039
|
+
readonly userId: string;
|
|
1040
|
+
readonly expiresAt: Date;
|
|
1041
|
+
readonly token: string;
|
|
1042
|
+
readonly ipAddress?: string | null | undefined;
|
|
1043
|
+
readonly userAgent?: string | null | undefined;
|
|
1553
1044
|
};
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1045
|
+
} | null;
|
|
1046
|
+
readonly isPending: boolean;
|
|
1047
|
+
readonly isRefetching: boolean;
|
|
1048
|
+
readonly error: import("better-auth/vue").BetterFetchError | null;
|
|
1049
|
+
}>>;
|
|
1050
|
+
<F extends (...args: any) => any>(useFetch: F): Promise<{
|
|
1051
|
+
data: import("vue").Ref<{
|
|
1052
|
+
user: {
|
|
1053
|
+
id: string;
|
|
1054
|
+
createdAt: Date;
|
|
1055
|
+
updatedAt: Date;
|
|
1056
|
+
email: string;
|
|
1057
|
+
emailVerified: boolean;
|
|
1058
|
+
name: string;
|
|
1059
|
+
image?: string | null | undefined;
|
|
1559
1060
|
};
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1061
|
+
session: {
|
|
1062
|
+
id: string;
|
|
1063
|
+
createdAt: Date;
|
|
1064
|
+
updatedAt: Date;
|
|
1065
|
+
userId: string;
|
|
1066
|
+
expiresAt: Date;
|
|
1067
|
+
token: string;
|
|
1068
|
+
ipAddress?: string | null | undefined;
|
|
1069
|
+
userAgent?: string | null | undefined;
|
|
1568
1070
|
};
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1071
|
+
} | null, {
|
|
1072
|
+
user: {
|
|
1073
|
+
id: string;
|
|
1074
|
+
createdAt: Date;
|
|
1075
|
+
updatedAt: Date;
|
|
1076
|
+
email: string;
|
|
1077
|
+
emailVerified: boolean;
|
|
1078
|
+
name: string;
|
|
1079
|
+
image?: string | null | undefined;
|
|
1574
1080
|
};
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1081
|
+
session: {
|
|
1082
|
+
id: string;
|
|
1083
|
+
createdAt: Date;
|
|
1084
|
+
updatedAt: Date;
|
|
1085
|
+
userId: string;
|
|
1086
|
+
expiresAt: Date;
|
|
1087
|
+
token: string;
|
|
1088
|
+
ipAddress?: string | null | undefined;
|
|
1089
|
+
userAgent?: string | null | undefined;
|
|
1090
|
+
};
|
|
1091
|
+
} | null>;
|
|
1092
|
+
isPending: false;
|
|
1093
|
+
error: import("vue").Ref<{
|
|
1586
1094
|
message?: string | undefined;
|
|
1587
|
-
|
|
1095
|
+
status: number;
|
|
1096
|
+
statusText: string;
|
|
1097
|
+
}>;
|
|
1098
|
+
}>;
|
|
1099
|
+
};
|
|
1100
|
+
getSession: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
|
|
1101
|
+
disableCookieCache?: unknown;
|
|
1102
|
+
disableRefresh?: unknown;
|
|
1103
|
+
}> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
|
|
1104
|
+
query?: {
|
|
1105
|
+
disableCookieCache?: unknown;
|
|
1106
|
+
disableRefresh?: unknown;
|
|
1107
|
+
} | undefined;
|
|
1108
|
+
fetchOptions?: FetchOptions | undefined;
|
|
1109
|
+
}> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
1110
|
+
user: {
|
|
1111
|
+
id: string;
|
|
1112
|
+
createdAt: Date;
|
|
1113
|
+
updatedAt: Date;
|
|
1114
|
+
email: string;
|
|
1115
|
+
emailVerified: boolean;
|
|
1116
|
+
name: string;
|
|
1117
|
+
image?: string | null | undefined;
|
|
1588
1118
|
};
|
|
1589
|
-
|
|
1119
|
+
session: {
|
|
1120
|
+
id: string;
|
|
1121
|
+
createdAt: Date;
|
|
1122
|
+
updatedAt: Date;
|
|
1123
|
+
userId: string;
|
|
1124
|
+
expiresAt: Date;
|
|
1125
|
+
token: string;
|
|
1126
|
+
ipAddress?: string | null | undefined;
|
|
1127
|
+
userAgent?: string | null | undefined;
|
|
1128
|
+
};
|
|
1129
|
+
} | null, {
|
|
1130
|
+
code?: string | undefined;
|
|
1131
|
+
message?: string | undefined;
|
|
1132
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
1133
|
+
authClient: {
|
|
1590
1134
|
signIn: {
|
|
1591
1135
|
social: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
1592
|
-
provider:
|
|
1136
|
+
provider: "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel" | (string & {});
|
|
1593
1137
|
callbackURL?: string | undefined;
|
|
1594
1138
|
newUserCallbackURL?: string | undefined;
|
|
1595
1139
|
errorCallbackURL?: string | undefined;
|
|
@@ -1606,7 +1150,7 @@ export declare function useAuth(): {
|
|
|
1606
1150
|
loginHint?: string | undefined;
|
|
1607
1151
|
additionalData?: Record<string, any> | undefined;
|
|
1608
1152
|
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
1609
|
-
provider:
|
|
1153
|
+
provider: "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel" | (string & {});
|
|
1610
1154
|
callbackURL?: string | undefined;
|
|
1611
1155
|
newUserCallbackURL?: string | undefined;
|
|
1612
1156
|
errorCallbackURL?: string | undefined;
|
|
@@ -1671,7 +1215,7 @@ export declare function useAuth(): {
|
|
|
1671
1215
|
image?: string | undefined;
|
|
1672
1216
|
callbackURL?: string | undefined;
|
|
1673
1217
|
fetchOptions?: FetchOptions | undefined;
|
|
1674
|
-
}
|
|
1218
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<NonNullable<{
|
|
1675
1219
|
token: null;
|
|
1676
1220
|
user: {
|
|
1677
1221
|
id: string;
|
|
@@ -1827,7 +1371,7 @@ export declare function useAuth(): {
|
|
|
1827
1371
|
image?: (string | null) | undefined;
|
|
1828
1372
|
name?: string | undefined;
|
|
1829
1373
|
fetchOptions?: FetchOptions | undefined;
|
|
1830
|
-
} & Partial<{}
|
|
1374
|
+
} & Partial<{}>> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
1831
1375
|
status: boolean;
|
|
1832
1376
|
}, {
|
|
1833
1377
|
code?: string | undefined;
|
|
@@ -2101,10 +1645,6 @@ export declare function useAuth(): {
|
|
|
2101
1645
|
emailVerified: boolean;
|
|
2102
1646
|
name: string;
|
|
2103
1647
|
image?: string | null | undefined;
|
|
2104
|
-
banned: boolean | null | undefined;
|
|
2105
|
-
role?: string | null | undefined;
|
|
2106
|
-
banReason?: string | null | undefined;
|
|
2107
|
-
banExpires?: Date | null | undefined;
|
|
2108
1648
|
};
|
|
2109
1649
|
session: {
|
|
2110
1650
|
id: string;
|
|
@@ -2115,30 +1655,11 @@ export declare function useAuth(): {
|
|
|
2115
1655
|
token: string;
|
|
2116
1656
|
ipAddress?: string | null | undefined;
|
|
2117
1657
|
userAgent?: string | null | undefined;
|
|
2118
|
-
impersonatedBy?: string | null | undefined;
|
|
2119
1658
|
};
|
|
2120
1659
|
} | null, {
|
|
2121
1660
|
code?: string | undefined;
|
|
2122
1661
|
message?: string | undefined;
|
|
2123
1662
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
2124
|
-
} & {
|
|
2125
|
-
admin: {
|
|
2126
|
-
checkRolePermission: <R extends "user" | "admin">(data: ({
|
|
2127
|
-
permission: {
|
|
2128
|
-
readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
|
|
2129
|
-
readonly session?: ("list" | "delete" | "revoke")[] | undefined;
|
|
2130
|
-
};
|
|
2131
|
-
permissions?: never | undefined;
|
|
2132
|
-
} | {
|
|
2133
|
-
permissions: {
|
|
2134
|
-
readonly user?: ("create" | "list" | "set-role" | "ban" | "impersonate" | "delete" | "set-password" | "get" | "update")[] | undefined;
|
|
2135
|
-
readonly session?: ("list" | "delete" | "revoke")[] | undefined;
|
|
2136
|
-
};
|
|
2137
|
-
permission?: never | undefined;
|
|
2138
|
-
}) & {
|
|
2139
|
-
role: R;
|
|
2140
|
-
}) => boolean;
|
|
2141
|
-
};
|
|
2142
1663
|
} & {
|
|
2143
1664
|
useSession: {
|
|
2144
1665
|
(): Readonly<import("vue").Ref<{
|
|
@@ -2151,10 +1672,6 @@ export declare function useAuth(): {
|
|
|
2151
1672
|
readonly emailVerified: boolean;
|
|
2152
1673
|
readonly name: string;
|
|
2153
1674
|
readonly image?: string | null | undefined;
|
|
2154
|
-
readonly banned: boolean | null | undefined;
|
|
2155
|
-
readonly role?: string | null | undefined;
|
|
2156
|
-
readonly banReason?: string | null | undefined;
|
|
2157
|
-
readonly banExpires?: Date | null | undefined;
|
|
2158
1675
|
};
|
|
2159
1676
|
readonly session: {
|
|
2160
1677
|
readonly id: string;
|
|
@@ -2165,7 +1682,6 @@ export declare function useAuth(): {
|
|
|
2165
1682
|
readonly token: string;
|
|
2166
1683
|
readonly ipAddress?: string | null | undefined;
|
|
2167
1684
|
readonly userAgent?: string | null | undefined;
|
|
2168
|
-
readonly impersonatedBy?: string | null | undefined;
|
|
2169
1685
|
};
|
|
2170
1686
|
} | null;
|
|
2171
1687
|
readonly isPending: boolean;
|
|
@@ -2181,10 +1697,6 @@ export declare function useAuth(): {
|
|
|
2181
1697
|
readonly emailVerified: boolean;
|
|
2182
1698
|
readonly name: string;
|
|
2183
1699
|
readonly image?: string | null | undefined;
|
|
2184
|
-
readonly banned: boolean | null | undefined;
|
|
2185
|
-
readonly role?: string | null | undefined;
|
|
2186
|
-
readonly banReason?: string | null | undefined;
|
|
2187
|
-
readonly banExpires?: Date | null | undefined;
|
|
2188
1700
|
};
|
|
2189
1701
|
readonly session: {
|
|
2190
1702
|
readonly id: string;
|
|
@@ -2195,7 +1707,6 @@ export declare function useAuth(): {
|
|
|
2195
1707
|
readonly token: string;
|
|
2196
1708
|
readonly ipAddress?: string | null | undefined;
|
|
2197
1709
|
readonly userAgent?: string | null | undefined;
|
|
2198
|
-
readonly impersonatedBy?: string | null | undefined;
|
|
2199
1710
|
};
|
|
2200
1711
|
} | null;
|
|
2201
1712
|
readonly isPending: boolean;
|
|
@@ -2212,10 +1723,6 @@ export declare function useAuth(): {
|
|
|
2212
1723
|
emailVerified: boolean;
|
|
2213
1724
|
name: string;
|
|
2214
1725
|
image?: string | null | undefined;
|
|
2215
|
-
banned: boolean | null | undefined;
|
|
2216
|
-
role?: string | null | undefined;
|
|
2217
|
-
banReason?: string | null | undefined;
|
|
2218
|
-
banExpires?: Date | null | undefined;
|
|
2219
1726
|
};
|
|
2220
1727
|
session: {
|
|
2221
1728
|
id: string;
|
|
@@ -2226,7 +1733,6 @@ export declare function useAuth(): {
|
|
|
2226
1733
|
token: string;
|
|
2227
1734
|
ipAddress?: string | null | undefined;
|
|
2228
1735
|
userAgent?: string | null | undefined;
|
|
2229
|
-
impersonatedBy?: string | null | undefined;
|
|
2230
1736
|
};
|
|
2231
1737
|
} | null, {
|
|
2232
1738
|
user: {
|
|
@@ -2237,10 +1743,6 @@ export declare function useAuth(): {
|
|
|
2237
1743
|
emailVerified: boolean;
|
|
2238
1744
|
name: string;
|
|
2239
1745
|
image?: string | null | undefined;
|
|
2240
|
-
banned: boolean | null | undefined;
|
|
2241
|
-
role?: string | null | undefined;
|
|
2242
|
-
banReason?: string | null | undefined;
|
|
2243
|
-
banExpires?: Date | null | undefined;
|
|
2244
1746
|
};
|
|
2245
1747
|
session: {
|
|
2246
1748
|
id: string;
|
|
@@ -2251,7 +1753,6 @@ export declare function useAuth(): {
|
|
|
2251
1753
|
token: string;
|
|
2252
1754
|
ipAddress?: string | null | undefined;
|
|
2253
1755
|
userAgent?: string | null | undefined;
|
|
2254
|
-
impersonatedBy?: string | null | undefined;
|
|
2255
1756
|
};
|
|
2256
1757
|
} | null>;
|
|
2257
1758
|
isPending: false;
|
|
@@ -2272,10 +1773,6 @@ export declare function useAuth(): {
|
|
|
2272
1773
|
emailVerified: boolean;
|
|
2273
1774
|
name: string;
|
|
2274
1775
|
image?: string | null | undefined;
|
|
2275
|
-
banned: boolean | null | undefined;
|
|
2276
|
-
role?: string | null | undefined;
|
|
2277
|
-
banReason?: string | null | undefined;
|
|
2278
|
-
banExpires?: Date | null | undefined;
|
|
2279
1776
|
};
|
|
2280
1777
|
session: {
|
|
2281
1778
|
id: string;
|
|
@@ -2286,7 +1783,6 @@ export declare function useAuth(): {
|
|
|
2286
1783
|
token: string;
|
|
2287
1784
|
ipAddress?: string | null | undefined;
|
|
2288
1785
|
userAgent?: string | null | undefined;
|
|
2289
|
-
impersonatedBy?: string | null | undefined;
|
|
2290
1786
|
};
|
|
2291
1787
|
};
|
|
2292
1788
|
};
|
|
@@ -2362,27 +1858,8 @@ export declare function useAuth(): {
|
|
|
2362
1858
|
atoms: Record<string, import("better-auth/vue").WritableAtom<any>>;
|
|
2363
1859
|
};
|
|
2364
1860
|
$ERROR_CODES: {
|
|
2365
|
-
readonly FAILED_TO_CREATE_USER: "Failed to create user";
|
|
2366
|
-
readonly USER_ALREADY_EXISTS: "User already exists.";
|
|
2367
|
-
readonly USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: "User already exists. Use another email.";
|
|
2368
|
-
readonly YOU_CANNOT_BAN_YOURSELF: "You cannot ban yourself";
|
|
2369
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE: "You are not allowed to change users role";
|
|
2370
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS: "You are not allowed to create users";
|
|
2371
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_LIST_USERS: "You are not allowed to list users";
|
|
2372
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS: "You are not allowed to list users sessions";
|
|
2373
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_BAN_USERS: "You are not allowed to ban users";
|
|
2374
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS: "You are not allowed to impersonate users";
|
|
2375
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS: "You are not allowed to revoke users sessions";
|
|
2376
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS: "You are not allowed to delete users";
|
|
2377
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD: "You are not allowed to set users password";
|
|
2378
|
-
readonly BANNED_USER: "You have been banned from this application";
|
|
2379
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_GET_USER: "You are not allowed to get user";
|
|
2380
|
-
readonly NO_DATA_TO_UPDATE: "No data to update";
|
|
2381
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS: "You are not allowed to update users";
|
|
2382
|
-
readonly YOU_CANNOT_REMOVE_YOURSELF: "You cannot remove yourself";
|
|
2383
|
-
readonly YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE: "You are not allowed to set a non-existent role value";
|
|
2384
|
-
readonly YOU_CANNOT_IMPERSONATE_ADMINS: "You cannot impersonate admins";
|
|
2385
1861
|
readonly USER_NOT_FOUND: "User not found";
|
|
1862
|
+
readonly FAILED_TO_CREATE_USER: "Failed to create user";
|
|
2386
1863
|
readonly FAILED_TO_CREATE_SESSION: "Failed to create session";
|
|
2387
1864
|
readonly FAILED_TO_UPDATE_USER: "Failed to update user";
|
|
2388
1865
|
readonly FAILED_TO_GET_SESSION: "Failed to get session";
|
|
@@ -2398,6 +1875,8 @@ export declare function useAuth(): {
|
|
|
2398
1875
|
readonly EMAIL_NOT_VERIFIED: "Email not verified";
|
|
2399
1876
|
readonly PASSWORD_TOO_SHORT: "Password too short";
|
|
2400
1877
|
readonly PASSWORD_TOO_LONG: "Password too long";
|
|
1878
|
+
readonly USER_ALREADY_EXISTS: "User already exists.";
|
|
1879
|
+
readonly USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: "User already exists. Use another email.";
|
|
2401
1880
|
readonly EMAIL_CAN_NOT_BE_UPDATED: "Email can not be updated";
|
|
2402
1881
|
readonly CREDENTIAL_ACCOUNT_NOT_FOUND: "Credential account not found";
|
|
2403
1882
|
readonly SESSION_EXPIRED: "Session expired. Re-authenticate to perform this action.";
|
|
@@ -2407,299 +1886,3 @@ export declare function useAuth(): {
|
|
|
2407
1886
|
};
|
|
2408
1887
|
};
|
|
2409
1888
|
};
|
|
2410
|
-
export declare const signIn: {
|
|
2411
|
-
social: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
2412
|
-
provider: (string & {}) | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel";
|
|
2413
|
-
callbackURL?: string | undefined;
|
|
2414
|
-
newUserCallbackURL?: string | undefined;
|
|
2415
|
-
errorCallbackURL?: string | undefined;
|
|
2416
|
-
disableRedirect?: boolean | undefined;
|
|
2417
|
-
idToken?: {
|
|
2418
|
-
token: string;
|
|
2419
|
-
nonce?: string | undefined;
|
|
2420
|
-
accessToken?: string | undefined;
|
|
2421
|
-
refreshToken?: string | undefined;
|
|
2422
|
-
expiresAt?: number | undefined;
|
|
2423
|
-
} | undefined;
|
|
2424
|
-
scopes?: string[] | undefined;
|
|
2425
|
-
requestSignUp?: boolean | undefined;
|
|
2426
|
-
loginHint?: string | undefined;
|
|
2427
|
-
additionalData?: Record<string, any> | undefined;
|
|
2428
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
2429
|
-
provider: (string & {}) | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel";
|
|
2430
|
-
callbackURL?: string | undefined;
|
|
2431
|
-
newUserCallbackURL?: string | undefined;
|
|
2432
|
-
errorCallbackURL?: string | undefined;
|
|
2433
|
-
disableRedirect?: boolean | undefined;
|
|
2434
|
-
idToken?: {
|
|
2435
|
-
token: string;
|
|
2436
|
-
nonce?: string | undefined;
|
|
2437
|
-
accessToken?: string | undefined;
|
|
2438
|
-
refreshToken?: string | undefined;
|
|
2439
|
-
expiresAt?: number | undefined;
|
|
2440
|
-
} | undefined;
|
|
2441
|
-
scopes?: string[] | undefined;
|
|
2442
|
-
requestSignUp?: boolean | undefined;
|
|
2443
|
-
loginHint?: string | undefined;
|
|
2444
|
-
additionalData?: Record<string, any> | undefined;
|
|
2445
|
-
} & {
|
|
2446
|
-
fetchOptions?: FetchOptions | undefined;
|
|
2447
|
-
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<NonNullable<{
|
|
2448
|
-
redirect: boolean;
|
|
2449
|
-
url: string;
|
|
2450
|
-
} | {
|
|
2451
|
-
redirect: boolean;
|
|
2452
|
-
token: string;
|
|
2453
|
-
url: undefined;
|
|
2454
|
-
user: {
|
|
2455
|
-
id: string;
|
|
2456
|
-
createdAt: Date;
|
|
2457
|
-
updatedAt: Date;
|
|
2458
|
-
email: string;
|
|
2459
|
-
emailVerified: boolean;
|
|
2460
|
-
name: string;
|
|
2461
|
-
image?: string | null | undefined | undefined;
|
|
2462
|
-
};
|
|
2463
|
-
}>, {
|
|
2464
|
-
code?: string | undefined;
|
|
2465
|
-
message?: string | undefined;
|
|
2466
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
2467
|
-
} & {
|
|
2468
|
-
email: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
2469
|
-
email: string;
|
|
2470
|
-
password: string;
|
|
2471
|
-
callbackURL?: string | undefined;
|
|
2472
|
-
rememberMe?: boolean | undefined;
|
|
2473
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
2474
|
-
email: string;
|
|
2475
|
-
password: string;
|
|
2476
|
-
callbackURL?: string | undefined;
|
|
2477
|
-
rememberMe?: boolean | undefined;
|
|
2478
|
-
} & {
|
|
2479
|
-
fetchOptions?: FetchOptions | undefined;
|
|
2480
|
-
}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
2481
|
-
redirect: boolean;
|
|
2482
|
-
token: string;
|
|
2483
|
-
url?: string | undefined;
|
|
2484
|
-
user: {
|
|
2485
|
-
id: string;
|
|
2486
|
-
createdAt: Date;
|
|
2487
|
-
updatedAt: Date;
|
|
2488
|
-
email: string;
|
|
2489
|
-
emailVerified: boolean;
|
|
2490
|
-
name: string;
|
|
2491
|
-
image?: string | null | undefined | undefined;
|
|
2492
|
-
};
|
|
2493
|
-
}, {
|
|
2494
|
-
code?: string | undefined;
|
|
2495
|
-
message?: string | undefined;
|
|
2496
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
2497
|
-
}, signUp: {
|
|
2498
|
-
email: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
2499
|
-
name: string;
|
|
2500
|
-
email: string;
|
|
2501
|
-
password: string;
|
|
2502
|
-
image?: string | undefined;
|
|
2503
|
-
callbackURL?: string | undefined;
|
|
2504
|
-
rememberMe?: boolean | undefined;
|
|
2505
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth").Prettify<{
|
|
2506
|
-
email: string;
|
|
2507
|
-
name: string;
|
|
2508
|
-
password: string;
|
|
2509
|
-
image?: string | undefined;
|
|
2510
|
-
callbackURL?: string | undefined;
|
|
2511
|
-
fetchOptions?: FetchOptions | undefined;
|
|
2512
|
-
} & {} & {}>, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<NonNullable<{
|
|
2513
|
-
token: null;
|
|
2514
|
-
user: {
|
|
2515
|
-
id: string;
|
|
2516
|
-
createdAt: Date;
|
|
2517
|
-
updatedAt: Date;
|
|
2518
|
-
email: string;
|
|
2519
|
-
emailVerified: boolean;
|
|
2520
|
-
name: string;
|
|
2521
|
-
image?: string | null | undefined | undefined;
|
|
2522
|
-
};
|
|
2523
|
-
} | {
|
|
2524
|
-
token: string;
|
|
2525
|
-
user: {
|
|
2526
|
-
id: string;
|
|
2527
|
-
createdAt: Date;
|
|
2528
|
-
updatedAt: Date;
|
|
2529
|
-
email: string;
|
|
2530
|
-
emailVerified: boolean;
|
|
2531
|
-
name: string;
|
|
2532
|
-
image?: string | null | undefined | undefined;
|
|
2533
|
-
};
|
|
2534
|
-
}>, {
|
|
2535
|
-
code?: string | undefined;
|
|
2536
|
-
message?: string | undefined;
|
|
2537
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
2538
|
-
}, signOut: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
|
|
2539
|
-
query?: Record<string, any> | undefined;
|
|
2540
|
-
fetchOptions?: FetchOptions | undefined;
|
|
2541
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
2542
|
-
success: boolean;
|
|
2543
|
-
}, {
|
|
2544
|
-
code?: string | undefined;
|
|
2545
|
-
message?: string | undefined;
|
|
2546
|
-
}, FetchOptions["throw"] extends true ? true : false>>, useSession: {
|
|
2547
|
-
(): Readonly<import("vue").Ref<{
|
|
2548
|
-
readonly data: {
|
|
2549
|
-
readonly user: {
|
|
2550
|
-
readonly id: string;
|
|
2551
|
-
readonly createdAt: Date;
|
|
2552
|
-
readonly updatedAt: Date;
|
|
2553
|
-
readonly email: string;
|
|
2554
|
-
readonly emailVerified: boolean;
|
|
2555
|
-
readonly name: string;
|
|
2556
|
-
readonly image?: string | null | undefined;
|
|
2557
|
-
readonly banned: boolean | null | undefined;
|
|
2558
|
-
readonly role?: string | null | undefined;
|
|
2559
|
-
readonly banReason?: string | null | undefined;
|
|
2560
|
-
readonly banExpires?: Date | null | undefined;
|
|
2561
|
-
};
|
|
2562
|
-
readonly session: {
|
|
2563
|
-
readonly id: string;
|
|
2564
|
-
readonly createdAt: Date;
|
|
2565
|
-
readonly updatedAt: Date;
|
|
2566
|
-
readonly userId: string;
|
|
2567
|
-
readonly expiresAt: Date;
|
|
2568
|
-
readonly token: string;
|
|
2569
|
-
readonly ipAddress?: string | null | undefined;
|
|
2570
|
-
readonly userAgent?: string | null | undefined;
|
|
2571
|
-
readonly impersonatedBy?: string | null | undefined;
|
|
2572
|
-
};
|
|
2573
|
-
} | null;
|
|
2574
|
-
readonly isPending: boolean;
|
|
2575
|
-
readonly isRefetching: boolean;
|
|
2576
|
-
readonly error: import("better-auth/vue").BetterFetchError | null;
|
|
2577
|
-
}, {
|
|
2578
|
-
readonly data: {
|
|
2579
|
-
readonly user: {
|
|
2580
|
-
readonly id: string;
|
|
2581
|
-
readonly createdAt: Date;
|
|
2582
|
-
readonly updatedAt: Date;
|
|
2583
|
-
readonly email: string;
|
|
2584
|
-
readonly emailVerified: boolean;
|
|
2585
|
-
readonly name: string;
|
|
2586
|
-
readonly image?: string | null | undefined;
|
|
2587
|
-
readonly banned: boolean | null | undefined;
|
|
2588
|
-
readonly role?: string | null | undefined;
|
|
2589
|
-
readonly banReason?: string | null | undefined;
|
|
2590
|
-
readonly banExpires?: Date | null | undefined;
|
|
2591
|
-
};
|
|
2592
|
-
readonly session: {
|
|
2593
|
-
readonly id: string;
|
|
2594
|
-
readonly createdAt: Date;
|
|
2595
|
-
readonly updatedAt: Date;
|
|
2596
|
-
readonly userId: string;
|
|
2597
|
-
readonly expiresAt: Date;
|
|
2598
|
-
readonly token: string;
|
|
2599
|
-
readonly ipAddress?: string | null | undefined;
|
|
2600
|
-
readonly userAgent?: string | null | undefined;
|
|
2601
|
-
readonly impersonatedBy?: string | null | undefined;
|
|
2602
|
-
};
|
|
2603
|
-
} | null;
|
|
2604
|
-
readonly isPending: boolean;
|
|
2605
|
-
readonly isRefetching: boolean;
|
|
2606
|
-
readonly error: import("better-auth/vue").BetterFetchError | null;
|
|
2607
|
-
}>>;
|
|
2608
|
-
<F extends (...args: any) => any>(useFetch: F): Promise<{
|
|
2609
|
-
data: import("vue").Ref<{
|
|
2610
|
-
user: {
|
|
2611
|
-
id: string;
|
|
2612
|
-
createdAt: Date;
|
|
2613
|
-
updatedAt: Date;
|
|
2614
|
-
email: string;
|
|
2615
|
-
emailVerified: boolean;
|
|
2616
|
-
name: string;
|
|
2617
|
-
image?: string | null | undefined;
|
|
2618
|
-
banned: boolean | null | undefined;
|
|
2619
|
-
role?: string | null | undefined;
|
|
2620
|
-
banReason?: string | null | undefined;
|
|
2621
|
-
banExpires?: Date | null | undefined;
|
|
2622
|
-
};
|
|
2623
|
-
session: {
|
|
2624
|
-
id: string;
|
|
2625
|
-
createdAt: Date;
|
|
2626
|
-
updatedAt: Date;
|
|
2627
|
-
userId: string;
|
|
2628
|
-
expiresAt: Date;
|
|
2629
|
-
token: string;
|
|
2630
|
-
ipAddress?: string | null | undefined;
|
|
2631
|
-
userAgent?: string | null | undefined;
|
|
2632
|
-
impersonatedBy?: string | null | undefined;
|
|
2633
|
-
};
|
|
2634
|
-
} | null, {
|
|
2635
|
-
user: {
|
|
2636
|
-
id: string;
|
|
2637
|
-
createdAt: Date;
|
|
2638
|
-
updatedAt: Date;
|
|
2639
|
-
email: string;
|
|
2640
|
-
emailVerified: boolean;
|
|
2641
|
-
name: string;
|
|
2642
|
-
image?: string | null | undefined;
|
|
2643
|
-
banned: boolean | null | undefined;
|
|
2644
|
-
role?: string | null | undefined;
|
|
2645
|
-
banReason?: string | null | undefined;
|
|
2646
|
-
banExpires?: Date | null | undefined;
|
|
2647
|
-
};
|
|
2648
|
-
session: {
|
|
2649
|
-
id: string;
|
|
2650
|
-
createdAt: Date;
|
|
2651
|
-
updatedAt: Date;
|
|
2652
|
-
userId: string;
|
|
2653
|
-
expiresAt: Date;
|
|
2654
|
-
token: string;
|
|
2655
|
-
ipAddress?: string | null | undefined;
|
|
2656
|
-
userAgent?: string | null | undefined;
|
|
2657
|
-
impersonatedBy?: string | null | undefined;
|
|
2658
|
-
};
|
|
2659
|
-
} | null>;
|
|
2660
|
-
isPending: false;
|
|
2661
|
-
error: import("vue").Ref<{
|
|
2662
|
-
message?: string | undefined;
|
|
2663
|
-
status: number;
|
|
2664
|
-
statusText: string;
|
|
2665
|
-
}>;
|
|
2666
|
-
}>;
|
|
2667
|
-
}, getSession: <FetchOptions extends import("better-auth").ClientFetchOption<never, Partial<{
|
|
2668
|
-
disableCookieCache?: unknown;
|
|
2669
|
-
disableRefresh?: unknown;
|
|
2670
|
-
}> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth").Prettify<{
|
|
2671
|
-
query?: {
|
|
2672
|
-
disableCookieCache?: unknown;
|
|
2673
|
-
disableRefresh?: unknown;
|
|
2674
|
-
} | undefined;
|
|
2675
|
-
fetchOptions?: FetchOptions | undefined;
|
|
2676
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<import("better-auth/vue").BetterFetchResponse<{
|
|
2677
|
-
user: {
|
|
2678
|
-
id: string;
|
|
2679
|
-
createdAt: Date;
|
|
2680
|
-
updatedAt: Date;
|
|
2681
|
-
email: string;
|
|
2682
|
-
emailVerified: boolean;
|
|
2683
|
-
name: string;
|
|
2684
|
-
image?: string | null | undefined;
|
|
2685
|
-
banned: boolean | null | undefined;
|
|
2686
|
-
role?: string | null | undefined;
|
|
2687
|
-
banReason?: string | null | undefined;
|
|
2688
|
-
banExpires?: Date | null | undefined;
|
|
2689
|
-
};
|
|
2690
|
-
session: {
|
|
2691
|
-
id: string;
|
|
2692
|
-
createdAt: Date;
|
|
2693
|
-
updatedAt: Date;
|
|
2694
|
-
userId: string;
|
|
2695
|
-
expiresAt: Date;
|
|
2696
|
-
token: string;
|
|
2697
|
-
ipAddress?: string | null | undefined;
|
|
2698
|
-
userAgent?: string | null | undefined;
|
|
2699
|
-
impersonatedBy?: string | null | undefined;
|
|
2700
|
-
};
|
|
2701
|
-
} | null, {
|
|
2702
|
-
code?: string | undefined;
|
|
2703
|
-
message?: string | undefined;
|
|
2704
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
2705
|
-
export { authClient };
|