chore: fix hono types

Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
Innei 2024-12-07 16:42:44 +08:00
parent 05f5477139
commit 1d00865da3
No known key found for this signature in database
GPG Key ID: 0F62D33977F021F7
1 changed files with 112 additions and 144 deletions

View File

@ -24,7 +24,12 @@ declare const authPlugins: ({
method: "GET";
}> | undefined)?]>(...ctx: C): Promise<C extends [{
asResponse: true;
}] ? Response : any>;
}] ? Response : {
[k: string]: {
id: string;
name: string;
};
}>;
path: "/get-providers";
options: {
method: "GET";
@ -4730,10 +4735,10 @@ declare const user: drizzle_orm_pg_core.PgTableWithColumns<{
emailVerified: drizzle_orm_pg_core.PgColumn<{
name: "emailVerified";
tableName: "user";
dataType: "boolean";
columnType: "PgBoolean";
data: boolean;
driverParam: boolean;
dataType: "date";
columnType: "PgTimestamp";
data: Date;
driverParam: string;
notNull: false;
hasDefault: false;
isPrimaryKey: false;
@ -4873,10 +4878,10 @@ declare const users: drizzle_orm_pg_core.PgTableWithColumns<{
emailVerified: drizzle_orm_pg_core.PgColumn<{
name: "emailVerified";
tableName: "user";
dataType: "boolean";
columnType: "PgBoolean";
data: boolean;
driverParam: boolean;
dataType: "date";
columnType: "PgTimestamp";
data: Date;
driverParam: string;
notNull: false;
hasDefault: false;
isPrimaryKey: false;
@ -4963,7 +4968,7 @@ declare const usersOpenApiSchema: z.ZodObject<Omit<{
id: z.ZodString;
name: z.ZodNullable<z.ZodString>;
email: z.ZodString;
emailVerified: z.ZodNullable<z.ZodBoolean>;
emailVerified: z.ZodNullable<z.ZodString>;
image: z.ZodNullable<z.ZodString>;
handle: z.ZodNullable<z.ZodString>;
createdAt: z.ZodDate;
@ -4971,7 +4976,7 @@ declare const usersOpenApiSchema: z.ZodObject<Omit<{
}, "email">, z.UnknownKeysParam, z.ZodTypeAny, {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: Date;
@ -4979,7 +4984,7 @@ declare const usersOpenApiSchema: z.ZodObject<Omit<{
}, {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: Date;
@ -6537,13 +6542,10 @@ declare const auth: {
method: "GET";
query: zod.ZodOptional<zod.ZodObject<{
disableCookieCache: zod.ZodOptional<zod.ZodBoolean>;
disableRefresh: zod.ZodOptional<zod.ZodBoolean>;
}, "strip", zod.ZodTypeAny, {
disableCookieCache?: boolean | undefined;
disableRefresh?: boolean | undefined;
}, {
disableCookieCache?: boolean | undefined;
disableRefresh?: boolean | undefined;
}>>;
requireHeaders: true;
metadata: {
@ -6597,7 +6599,12 @@ declare const auth: {
method: "GET";
}> | undefined)?]>(...ctx: C): Promise<C extends [{
asResponse: true;
}] ? Response : any>;
}] ? Response : {
[k: string]: {
id: string;
name: string;
};
}>;
path: "/get-providers";
options: {
method: "GET";
@ -6715,28 +6722,6 @@ declare const auth: {
}>]>(...ctx: C): Promise<C extends [{
asResponse: true;
}] ? Response : {
session: {
id: string;
userId: string;
createdAt: Date;
updatedAt: Date;
expiresAt: Date;
token: string;
ipAddress?: string | null | undefined;
userAgent?: string | null | undefined;
};
user: {
id: string;
createdAt: Date;
updatedAt: Date;
email: string;
emailVerified: boolean;
name: string;
image?: string | null | undefined;
};
url: undefined;
redirect: boolean;
} | {
url: string;
redirect: boolean;
}>;
@ -8004,20 +7989,20 @@ declare const auth: {
<C extends [better_call.Context<"/update-user", {
method: "POST";
body: zod.ZodObject<{
name: zod.ZodOptional<zod.ZodString>;
image: zod.ZodOptional<zod.ZodString>;
}, zod.UnknownKeysParam, zod.ZodTypeAny, {
name?: string | undefined;
image?: string | undefined;
}, {
name?: string | undefined;
image?: string | undefined;
}> & zod.ZodObject<{
handle: zod.ZodString;
}, zod.UnknownKeysParam, zod.ZodTypeAny, {
handle: string;
}, {
handle: string;
}> & zod.ZodObject<{
name: zod.ZodOptional<zod.ZodString>;
image: zod.ZodOptional<zod.ZodString | zod.ZodNull>;
}, zod.UnknownKeysParam, zod.ZodTypeAny, {
name?: string | undefined;
image?: string | null | undefined;
}, {
name?: string | undefined;
image?: string | null | undefined;
}>;
use: better_call.Endpoint<better_call.Handler<string, better_call.EndpointOptions, {
session: {
@ -8092,20 +8077,20 @@ declare const auth: {
options: {
method: "POST";
body: zod.ZodObject<{
name: zod.ZodOptional<zod.ZodString>;
image: zod.ZodOptional<zod.ZodString>;
}, zod.UnknownKeysParam, zod.ZodTypeAny, {
name?: string | undefined;
image?: string | undefined;
}, {
name?: string | undefined;
image?: string | undefined;
}> & zod.ZodObject<{
handle: zod.ZodString;
}, zod.UnknownKeysParam, zod.ZodTypeAny, {
handle: string;
}, {
handle: string;
}> & zod.ZodObject<{
name: zod.ZodOptional<zod.ZodString>;
image: zod.ZodOptional<zod.ZodString | zod.ZodNull>;
}, zod.UnknownKeysParam, zod.ZodTypeAny, {
name?: string | undefined;
image?: string | null | undefined;
}, {
name?: string | undefined;
image?: string | null | undefined;
}>;
use: better_call.Endpoint<better_call.Handler<string, better_call.EndpointOptions, {
session: {
@ -8176,8 +8161,15 @@ declare const auth: {
headers: Headers;
};
deleteUser: {
<C extends [(better_call.Context<"/delete-user", {
<C extends [better_call.Context<"/delete-user", {
method: "POST";
body: zod.ZodObject<{
password: zod.ZodString;
}, "strip", zod.ZodTypeAny, {
password: string;
}, {
password: string;
}>;
use: better_call.Endpoint<better_call.Handler<string, better_call.EndpointOptions, {
session: {
session: Record<string, any> & {
@ -8218,15 +8210,19 @@ declare const auth: {
};
};
};
}> | undefined)?]>(...ctx: C): Promise<C extends [{
}>]>(...ctx: C): Promise<C extends [{
asResponse: true;
}] ? Response : {
success: boolean;
message: string;
}>;
}] ? Response : null>;
path: "/delete-user";
options: {
method: "POST";
body: zod.ZodObject<{
password: zod.ZodString;
}, "strip", zod.ZodTypeAny, {
password: string;
}, {
password: string;
}>;
use: better_call.Endpoint<better_call.Handler<string, better_call.EndpointOptions, {
session: {
session: Record<string, any> & {
@ -9075,36 +9071,6 @@ declare const auth: {
method: better_call.Method | better_call.Method[];
headers: Headers;
};
deleteUserCallback: {
<C extends [better_call.Context<"/delete-user/callback", {
method: "GET";
query: zod.ZodObject<{
token: zod.ZodString;
}, "strip", zod.ZodTypeAny, {
token: string;
}, {
token: string;
}>;
}>]>(...ctx: C): Promise<C extends [{
asResponse: true;
}] ? Response : {
success: boolean;
message: string;
}>;
path: "/delete-user/callback";
options: {
method: "GET";
query: zod.ZodObject<{
token: zod.ZodString;
}, "strip", zod.ZodTypeAny, {
token: string;
}, {
token: string;
}>;
};
method: better_call.Method | better_call.Method[];
headers: Headers;
};
};
options: {
appName: string;
@ -9150,6 +9116,7 @@ declare const auth: {
}): Promise<any>;
options: better_auth_adapters_drizzle.DrizzleAdapterConfig;
};
baseUrl: string | undefined;
basePath: string;
trustedOrigins: string[];
user: {
@ -9159,29 +9126,25 @@ declare const auth: {
};
};
};
account: {
accounts: {
accountLinking: {
enabled: true;
trustedProviders: ("github" | "apple" | "google")[];
enabled: boolean;
trustedProviders: string[];
};
};
socialProviders: {
google: {
clientId: string;
clientSecret: string;
redirectURI: string;
};
github: {
clientId: string;
clientSecret: string;
redirectURI: string;
};
apple: {
enabled: boolean;
clientId: string;
clientSecret: string;
redirectURI: string;
};
} | undefined;
};
plugins: ({
id: "custom-session";
@ -9244,7 +9207,12 @@ declare const auth: {
method: "GET";
}> | undefined)?]>(...ctx: C): Promise<C extends [{
asResponse: true;
}] ? Response : any>;
}] ? Response : {
[k: string]: {
id: string;
name: string;
};
}>;
path: "/get-providers";
options: {
method: "GET";
@ -9758,7 +9726,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
owner?: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;
@ -9767,7 +9735,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
tipUsers?: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;
@ -9798,7 +9766,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
owner?: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;
@ -9807,7 +9775,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
tipUsers?: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;
@ -9818,7 +9786,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
owner?: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;
@ -9960,7 +9928,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
owner?: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;
@ -10054,7 +10022,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
owner?: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;
@ -10213,7 +10181,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
owner?: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;
@ -10222,7 +10190,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
tipUsers?: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;
@ -10316,7 +10284,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
owner?: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;
@ -10325,7 +10293,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
tipUsers?: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;
@ -10461,7 +10429,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
owner?: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;
@ -10470,7 +10438,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
tipUsers?: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;
@ -10546,7 +10514,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
owner?: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;
@ -10555,7 +10523,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
tipUsers?: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;
@ -10681,7 +10649,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
data: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;
@ -10706,7 +10674,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
[x: string]: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;
@ -10872,7 +10840,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
owner?: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;
@ -10881,7 +10849,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
tipUsers?: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;
@ -10894,7 +10862,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
boosters: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;
@ -10931,7 +10899,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
owner?: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;
@ -10940,7 +10908,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
tipUsers?: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;
@ -10951,7 +10919,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
owner?: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;
@ -10979,7 +10947,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
owner?: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;
@ -11216,7 +11184,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
fromUser?: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;
@ -11225,7 +11193,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
toUser?: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;
@ -11245,7 +11213,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
owner?: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;
@ -11254,7 +11222,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
tipUsers?: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;
@ -11372,7 +11340,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
user: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;
@ -11427,7 +11395,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
owner?: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;
@ -11436,7 +11404,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
tipUsers?: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;
@ -11447,7 +11415,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
owner?: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;
@ -11508,7 +11476,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
owner?: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;
@ -11517,7 +11485,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
tipUsers?: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;
@ -11528,7 +11496,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
owner?: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;
@ -11605,7 +11573,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
owner?: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;
@ -11614,7 +11582,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
tipUsers?: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;
@ -11625,7 +11593,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
owner?: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;
@ -11667,7 +11635,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
owner?: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;
@ -11676,7 +11644,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
tipUsers?: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;
@ -11780,7 +11748,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
owner?: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;
@ -11914,7 +11882,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
owner?: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;
@ -12025,7 +11993,7 @@ declare const _routes: hono_hono_base.HonoBase<Env, ({
data: {
name: string | null;
id: string;
emailVerified: boolean | null;
emailVerified: string | null;
image: string | null;
handle: string | null;
createdAt: string;