@daocloud-proto/ghippo 0.2.0 → 0.2.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/ghippo",
3
- "version":"0.2.0",
3
+ "version": "v0.2.3",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -4,9 +4,9 @@
4
4
  * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
5
  */
6
6
 
7
- import * as fm from "./fetch.pb"
7
+ import * as fm from "../fetch.pb"
8
8
  export type LoginGetRequest = {
9
- callbackUrl?: string
9
+ callback_url?: string
10
10
  }
11
11
 
12
12
  export type LoginGetResponse = {
@@ -15,12 +15,12 @@ export type LoginGetResponse = {
15
15
  export type LoginPostRequest = {
16
16
  code?: string
17
17
  state?: string
18
- sessionState?: string
19
- callbackUrl?: string
18
+ session_state?: string
19
+ callback_url?: string
20
20
  }
21
21
 
22
22
  export type LoginPostResponse = {
23
- idToken?: string
23
+ id_token?: string
24
24
  username?: string
25
25
  }
26
26
 
@@ -32,12 +32,12 @@ export type LogoutResponse = {
32
32
 
33
33
  export class Login {
34
34
  static RedirectLogin(req: LoginGetRequest, initReq?: fm.InitReq): Promise<LoginGetResponse> {
35
- return fm.fetchReq<LoginGetRequest, LoginGetResponse>(`/login?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
35
+ return fm.fetchReq<LoginGetRequest, LoginGetResponse>(`/apis/ghippo.io/v1alpha1/login?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
36
36
  }
37
37
  static OIDCLogin(req: LoginPostRequest, initReq?: fm.InitReq): Promise<LoginPostResponse> {
38
- return fm.fetchReq<LoginPostRequest, LoginPostResponse>(`/login`, {...initReq, method: "POST", body: JSON.stringify(req)})
38
+ return fm.fetchReq<LoginPostRequest, LoginPostResponse>(`/apis/ghippo.io/v1alpha1/login`, {...initReq, method: "POST", body: JSON.stringify(req)})
39
39
  }
40
40
  static OIDCLogout(req: LogoutRequest, initReq?: fm.InitReq): Promise<LogoutResponse> {
41
- return fm.fetchReq<LogoutRequest, LogoutResponse>(`/logout`, {...initReq, method: "DELETE"})
41
+ return fm.fetchReq<LogoutRequest, LogoutResponse>(`/apis/ghippo.io/v1alpha1/logout`, {...initReq, method: "DELETE"})
42
42
  }
43
43
  }
@@ -4,7 +4,7 @@
4
4
  * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
5
  */
6
6
 
7
- import * as fm from "./fetch.pb"
7
+ import * as fm from "../fetch.pb"
8
8
  export type ProductNavRequest = {
9
9
  }
10
10
 
@@ -21,14 +21,14 @@ export type ProductNavCategory = {
21
21
  export type ProductMenu = {
22
22
  name?: string
23
23
  url?: string
24
- iconName?: string
25
- iconUrl?: string
24
+ icon_name?: string
25
+ icon_url?: string
26
26
  target?: string
27
27
  menus?: ProductMenu[]
28
28
  }
29
29
 
30
30
  export class ProductNavigator {
31
31
  static Info(req: ProductNavRequest, initReq?: fm.InitReq): Promise<ProductNavResponse> {
32
- return fm.fetchReq<ProductNavRequest, ProductNavResponse>(`/product-nav/info?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
32
+ return fm.fetchReq<ProductNavRequest, ProductNavResponse>(`/apis/ghippo.io/v1alpha1/product-nav/info?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
33
33
  }
34
34
  }
@@ -4,21 +4,21 @@
4
4
  * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
5
  */
6
6
 
7
- import * as fm from "./fetch.pb"
7
+ import * as fm from "../fetch.pb"
8
8
  export type TopNavRequest = {
9
9
  }
10
10
 
11
11
  export type TopNavResponse = {
12
- platformName?: string
12
+ platform_name?: string
13
13
  icon?: Uint8Array
14
14
  favicon?: Uint8Array
15
- iconFilename?: string
16
- faviconFilename?: string
17
- portalUrl?: string
15
+ icon_filename?: string
16
+ favicon_filename?: string
17
+ portal_url?: string
18
18
  }
19
19
 
20
20
  export class TopNavigator {
21
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"})
22
+ return fm.fetchReq<TopNavRequest, TopNavResponse>(`/apis/ghippo.io/v1alpha1/top-nav/info?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
23
23
  }
24
24
  }
@@ -0,0 +1,37 @@
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 GetUsersRequest = {
9
+ search?: string
10
+ page_size?: number
11
+ page_no?: number
12
+ }
13
+
14
+ export type GetUsersResponse = {
15
+ total?: string
16
+ data?: User[]
17
+ }
18
+
19
+ export type User = {
20
+ id?: string
21
+ name?: string
22
+ created_at?: string
23
+ updated_at?: string
24
+ }
25
+
26
+ export type GetUserRequest = {
27
+ id?: string
28
+ }
29
+
30
+ export class Users {
31
+ static GetUsers(req: GetUsersRequest, initReq?: fm.InitReq): Promise<GetUsersResponse> {
32
+ return fm.fetchReq<GetUsersRequest, GetUsersResponse>(`/apis/ghippo.io/v1alpha1/users?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
33
+ }
34
+ static GetUser(req: GetUserRequest, initReq?: fm.InitReq): Promise<User> {
35
+ return fm.fetchReq<GetUserRequest, User>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
36
+ }
37
+ }
@@ -4,7 +4,7 @@
4
4
  * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
5
  */
6
6
 
7
- import * as fm from "./fetch.pb"
7
+ import * as fm from "../fetch.pb"
8
8
  export type GetWorkspaceRequest = {
9
9
  id?: string
10
10
  }
@@ -16,6 +16,6 @@ export type GetWorkspaceResponse = {
16
16
 
17
17
  export class Workspace {
18
18
  static GetWorkspace(req: GetWorkspaceRequest, initReq?: fm.InitReq): Promise<GetWorkspaceResponse> {
19
- return fm.fetchReq<GetWorkspaceRequest, GetWorkspaceResponse>(`/workspaces/${req["id"]}?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
19
+ return fm.fetchReq<GetWorkspaceRequest, GetWorkspaceResponse>(`/apis/ghippo.io/v1alpha1/workspaces/${req["id"]}?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
20
20
  }
21
21
  }