@@ -20,12 +20,12 @@ export const scanWorkspace = new lc.NotificationType<ScanWorkspaceParams>(
20
20
"semgrep/scanWorkspace" ,
21
21
) ;
22
22
23
- export interface LoginParams {
23
+ export interface LoginStartResponse {
24
24
url : string ;
25
25
sessionId : string ;
26
26
}
27
27
28
- export interface LoginStatusParams {
28
+ export interface LoginStatusResponse {
29
29
loggedIn : boolean ;
30
30
}
31
31
@@ -55,13 +55,15 @@ export interface LspErrorParams {
55
55
stack : string ;
56
56
}
57
57
58
- export const login = new lc . RequestType0 < LoginParams | null , void > (
59
- "semgrep/login " ,
58
+ export const loginStart = new lc . RequestType0 < LoginStartResponse | null , void > (
59
+ "semgrep/loginStart " ,
60
60
) ;
61
61
62
- export const loginFinish = new lc . NotificationType < LoginParams > (
63
- "semgrep/loginFinish" ,
64
- ) ;
62
+ export const loginFinish = new lc . RequestType <
63
+ LoginStartResponse ,
64
+ LoginStatusResponse ,
65
+ void
66
+ > ( "semgrep/loginFinish" ) ;
65
67
66
68
export const logout = new lc . NotificationType ( "semgrep/logout" ) ;
67
69
@@ -75,9 +77,10 @@ export const workspaceRules = new lc.RequestType0<any[], void>(
75
77
"semgrep/workspaceRules" ,
76
78
) ;
77
79
78
- export const loginStatus = new lc . RequestType0 < LoginStatusParams | null , void > (
79
- "semgrep/loginStatus" ,
80
- ) ;
80
+ export const loginStatus = new lc . RequestType0 <
81
+ LoginStatusResponse | null ,
82
+ void
83
+ > ( "semgrep/loginStatus" ) ;
81
84
82
85
export const search = new lc . RequestType < LspSearchParams , SearchResults , void > (
83
86
"semgrep/search" ,
0 commit comments