@daocloud-proto/ghippo 0.0.1-1 → 0.2.0
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.
- package/login.pb.ts +43 -0
- package/package.json +1 -1
- package/topnav.pb.ts +24 -0
package/login.pb.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
/*
|
|
4
|
+
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import * as fm from "./fetch.pb"
|
|
8
|
+
export type LoginGetRequest = {
|
|
9
|
+
callbackUrl?: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type LoginGetResponse = {
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type LoginPostRequest = {
|
|
16
|
+
code?: string
|
|
17
|
+
state?: string
|
|
18
|
+
sessionState?: string
|
|
19
|
+
callbackUrl?: string
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type LoginPostResponse = {
|
|
23
|
+
idToken?: string
|
|
24
|
+
username?: string
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export type LogoutRequest = {
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type LogoutResponse = {
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export class Login {
|
|
34
|
+
static RedirectLogin(req: LoginGetRequest, initReq?: fm.InitReq): Promise<LoginGetResponse> {
|
|
35
|
+
return fm.fetchReq<LoginGetRequest, LoginGetResponse>(`/login?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
36
|
+
}
|
|
37
|
+
static OIDCLogin(req: LoginPostRequest, initReq?: fm.InitReq): Promise<LoginPostResponse> {
|
|
38
|
+
return fm.fetchReq<LoginPostRequest, LoginPostResponse>(`/login`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
39
|
+
}
|
|
40
|
+
static OIDCLogout(req: LogoutRequest, initReq?: fm.InitReq): Promise<LogoutResponse> {
|
|
41
|
+
return fm.fetchReq<LogoutRequest, LogoutResponse>(`/logout`, {...initReq, method: "DELETE"})
|
|
42
|
+
}
|
|
43
|
+
}
|
package/package.json
CHANGED
package/topnav.pb.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
/*
|
|
4
|
+
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import * as fm from "./fetch.pb"
|
|
8
|
+
export type TopNavRequest = {
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export type TopNavResponse = {
|
|
12
|
+
platformName?: string
|
|
13
|
+
icon?: Uint8Array
|
|
14
|
+
favicon?: Uint8Array
|
|
15
|
+
iconFilename?: string
|
|
16
|
+
faviconFilename?: string
|
|
17
|
+
portalUrl?: string
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export class TopNavigator {
|
|
21
|
+
static Info(req: TopNavRequest, initReq?: fm.InitReq): Promise<TopNavResponse> {
|
|
22
|
+
return fm.fetchReq<TopNavRequest, TopNavResponse>(`/top-nav/info?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
23
|
+
}
|
|
24
|
+
}
|