File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import type {
22 ListApiKeys ,
33 ListDeviceSessions ,
4+ ListSessions ,
45 ListUserAccounts ,
56 Session ,
67} from '@deepcrawl/auth/types' ;
@@ -30,7 +31,7 @@ export async function getSession(): Promise<Session | null> {
3031 * Auth Client API Call:
3132 * all active sessions for the current user
3233 */
33- export async function listSessions ( ) : Promise < Session [ 'session' ] [ ] > {
34+ export async function listSessions ( ) : Promise < ListSessions > {
3435 const { data : sessions , error } = await authClient . listSessions ( ) ;
3536
3637 if ( error ) {
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { auth } from '@deepcrawl/auth/lib/auth';
44import type {
55 ListApiKeys ,
66 ListDeviceSessions ,
7+ ListSessions ,
78 ListUserAccounts ,
89 Session ,
910} from '@deepcrawl/auth/types' ;
@@ -29,7 +30,7 @@ export async function authGetSession(): Promise<Session | null> {
2930 * Auth Server API Call:
3031 * all active sessions for the current user
3132 */
32- export async function authListSessions ( ) : Promise < Session [ 'session' ] [ ] > {
33+ export async function authListSessions ( ) : Promise < ListSessions > {
3334 const requestHeaders = await headers ( ) ;
3435
3536 try {
Original file line number Diff line number Diff line change @@ -4,6 +4,11 @@ import type { auth } from '@deepcrawl/auth/lib/auth';
44export type Auth = typeof auth ;
55export type Session = typeof auth . $Infer . Session ;
66
7+ /**
8+ * The type for listSessions
9+ */
10+ export type ListSessions = Awaited < ReturnType < typeof auth . api . listSessions > > ;
11+
712/**
813 * The type for listUserAccounts
914 */
You can’t perform that action at this time.
0 commit comments