@nexusts/auth 0.7.5 → 0.7.7

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.
@@ -33,45 +33,74 @@ export declare class AuthController {
33
33
  * GET /api/auth/session
34
34
  * Returns the current session (or null if unauthenticated).
35
35
  */
36
- session(c: Context): Promise<any>;
36
+ session(c: Context): Promise<Response & import("hono").TypedResponse<{
37
+ user: {
38
+ [x: string]: import("hono/utils/types").JSONValue;
39
+ id: string;
40
+ email: string;
41
+ emailVerified: boolean;
42
+ name: string;
43
+ image?: string | null;
44
+ createdAt: string;
45
+ updatedAt: string;
46
+ };
47
+ session: {
48
+ [x: string]: import("hono/utils/types").JSONValue;
49
+ id: string;
50
+ userId: string;
51
+ token: string;
52
+ expiresAt: string;
53
+ ipAddress?: string | null;
54
+ userAgent?: string | null;
55
+ createdAt: string;
56
+ updatedAt: string;
57
+ };
58
+ }, import("hono/utils/http-status").ContentfulStatusCode, "json">>;
37
59
  /**
38
60
  * POST /api/auth/sign-up/email
39
61
  * Body: { email, password, name, callbackURL? }
40
62
  */
41
- signUpEmail(c: Context, body: any): Promise<any>;
63
+ signUpEmail(c: Context, body: any): Promise<Response & import("hono").TypedResponse<any, 201, "json">>;
42
64
  /**
43
65
  * POST /api/auth/sign-in/email
44
66
  * Body: { email, password, callbackURL? }
45
67
  */
46
- signInEmail(c: Context, body: any): Promise<any>;
68
+ signInEmail(c: Context, body: any): Promise<Response & import("hono").TypedResponse<any, import("hono/utils/http-status").ContentfulStatusCode, "json">>;
47
69
  /**
48
70
  * POST /api/auth/sign-out
49
71
  */
50
- signOut(c: Context, _res: Response): Promise<any>;
72
+ signOut(c: Context, _res: Response): Promise<Response & import("hono").TypedResponse<{
73
+ ok: true;
74
+ }, import("hono/utils/http-status").ContentfulStatusCode, "json">>;
51
75
  /**
52
76
  * GET /api/auth/sign-in/:provider
53
77
  * Returns a redirect to the social provider's auth page.
54
78
  */
55
- socialSignIn(c: Context, _body: never): Promise<any>;
79
+ socialSignIn(c: Context, _body: never): Promise<Response & import("hono").TypedResponse<any, import("hono/utils/http-status").ContentfulStatusCode, "json">>;
56
80
  /**
57
81
  * GET /api/auth/callback/:provider
58
82
  * Social provider redirect target. The better-auth handler does the
59
83
  * real work; this is a passthrough for `route:list` visibility.
60
84
  */
61
- oauthCallback(c: Context): Promise<any>;
85
+ oauthCallback(c: Context): Promise<Response & import("hono").TypedResponse<any, import("hono/utils/http-status").ContentfulStatusCode, "json">>;
62
86
  /**
63
87
  * POST /api/auth/jwt
64
88
  * Issues a JWT for the current user. Requires the JWT plugin.
65
89
  */
66
- issueJwt(c: Context): Promise<any>;
90
+ issueJwt(c: Context): Promise<(Response & import("hono").TypedResponse<{
91
+ error: string;
92
+ }, 401, "json">) | (Response & import("hono").TypedResponse<{
93
+ token: string;
94
+ expiresAt: string;
95
+ }, import("hono/utils/http-status").ContentfulStatusCode, "json">)>;
67
96
  /**
68
97
  * POST /api/auth/passkey/register
69
98
  * Start passkey registration. Requires the passkey plugin.
70
99
  */
71
- passkeyRegister(c: Context): Promise<any>;
100
+ passkeyRegister(c: Context): Promise<Response & import("hono").TypedResponse<import("hono/utils/types").JSONValue, import("hono/utils/http-status").ContentfulStatusCode, "json">>;
72
101
  /**
73
102
  * POST /api/auth/passkey/authenticate
74
103
  * Body: passkey assertion
75
104
  */
76
- passkeyAuthenticate(c: Context, body: any): Promise<any>;
105
+ passkeyAuthenticate(c: Context, body: any): Promise<Response & import("hono").TypedResponse<import("hono/utils/types").JSONValue, import("hono/utils/http-status").ContentfulStatusCode, "json">>;
77
106
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nexusts/auth",
3
- "version": "0.7.5",
3
+ "version": "0.7.7",
4
4
  "description": "Authentication via better-auth integration",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -34,6 +34,6 @@
34
34
  }
35
35
  },
36
36
  "dependencies": {
37
- "@nexusts/core": "^0.7.5"
37
+ "@nexusts/core": "^0.7.7"
38
38
  }
39
39
  }