@daocloud-proto/ghippo 0.1.0 → 0.1.2

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.
@@ -0,0 +1,114 @@
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
+
9
+ export enum ReadType {
10
+ all = "all",
11
+ read = "read",
12
+ unread = "unread",
13
+ }
14
+
15
+ export type ListMessagesRequest = {
16
+ unreadCount?: boolean
17
+ search?: string
18
+ read?: ReadType
19
+ page?: number
20
+ pageSize?: number
21
+ }
22
+
23
+ export type ListMessagesResponse = {
24
+ items?: MessageInfo[]
25
+ pagination?: Pagination
26
+ }
27
+
28
+ export type Pagination = {
29
+ total?: number
30
+ page?: number
31
+ pageSize?: number
32
+ }
33
+
34
+ export type MessageInfo = {
35
+ id?: number
36
+ type?: string
37
+ subject?: string
38
+ message?: string
39
+ read?: ReadType
40
+ createdAt?: string
41
+ }
42
+
43
+ export type GetMessageRequest = {
44
+ id?: number
45
+ }
46
+
47
+ export type ToggleUnreadMessageRequest = {
48
+ id?: number
49
+ next?: boolean
50
+ }
51
+
52
+ export type ToggleUnreadMessageResponse = {
53
+ message?: MessageInfo
54
+ }
55
+
56
+ export type GetMessageResponse = {
57
+ message?: MessageInfo
58
+ }
59
+
60
+ export type DeleteMessagesRequest = {
61
+ ids?: number[]
62
+ }
63
+
64
+ export type DeleteMessagesResponse = {
65
+ }
66
+
67
+ export type SetReadMessagesRequest = {
68
+ all?: boolean
69
+ ids?: number[]
70
+ }
71
+
72
+ export type SetReadMessagesResponse = {
73
+ }
74
+
75
+ export type GetMessagesCountRequest = {
76
+ }
77
+
78
+ export type GetMessagesCountResponse = {
79
+ total?: number
80
+ readTotal?: number
81
+ unreadTotal?: number
82
+ }
83
+
84
+ export type GetSystemMessageRequest = {
85
+ }
86
+
87
+ export type GetSystemMessageResponse = {
88
+ message?: string
89
+ show?: boolean
90
+ }
91
+
92
+ export class Message {
93
+ static ListMessages(req: ListMessagesRequest, initReq?: fm.InitReq): Promise<ListMessagesResponse> {
94
+ return fm.fetchReq<ListMessagesRequest, ListMessagesResponse>(`/apis/ghippo.io/v1alpha1/messages?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
95
+ }
96
+ static GetMessage(req: GetMessageRequest, initReq?: fm.InitReq): Promise<GetMessageResponse> {
97
+ return fm.fetchReq<GetMessageRequest, GetMessageResponse>(`/apis/ghippo.io/v1alpha1/messages/${req["id"]}?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
98
+ }
99
+ static GetSystemMessage(req: GetSystemMessageRequest, initReq?: fm.InitReq): Promise<GetSystemMessageResponse> {
100
+ return fm.fetchReq<GetSystemMessageRequest, GetSystemMessageResponse>(`/apis/ghippo.io/v1alpha1/messages/system/system-message?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
101
+ }
102
+ static ToggleUnreadMessage(req: ToggleUnreadMessageRequest, initReq?: fm.InitReq): Promise<ToggleUnreadMessageResponse> {
103
+ return fm.fetchReq<ToggleUnreadMessageRequest, ToggleUnreadMessageResponse>(`/apis/ghippo.io/v1alpha1/messages/toggle-unread?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
104
+ }
105
+ static DeleteMessages(req: DeleteMessagesRequest, initReq?: fm.InitReq): Promise<DeleteMessagesResponse> {
106
+ return fm.fetchReq<DeleteMessagesRequest, DeleteMessagesResponse>(`/apis/ghippo.io/v1alpha1/messages/delete`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
107
+ }
108
+ static SetReadMessages(req: SetReadMessagesRequest, initReq?: fm.InitReq): Promise<SetReadMessagesResponse> {
109
+ return fm.fetchReq<SetReadMessagesRequest, SetReadMessagesResponse>(`/apis/ghippo.io/v1alpha1/read-messages`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
110
+ }
111
+ static GetMessagesCount(req: GetMessagesCountRequest, initReq?: fm.InitReq): Promise<GetMessagesCountResponse> {
112
+ return fm.fetchReq<GetMessagesCountRequest, GetMessagesCountResponse>(`/apis/ghippo.io/v1alpha1/messages/count?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
113
+ }
114
+ }
@@ -0,0 +1,76 @@
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
+
9
+ export enum ProviderType {
10
+ wechatwork = "wechatwork",
11
+ }
12
+
13
+ export type GetOauth2RedirectDomainRequest = {
14
+ }
15
+
16
+ export type GetOauth2RedirectDomainResponse = {
17
+ redirectDomain?: string
18
+ }
19
+
20
+ export type GetOauth2Request = {
21
+ }
22
+
23
+ export type GetOauth2Response = {
24
+ providerType?: ProviderType
25
+ displayName?: string
26
+ clientId?: string
27
+ clientSecret?: string
28
+ agentId?: string
29
+ }
30
+
31
+ export type CreateOauth2Request = {
32
+ providerType?: ProviderType
33
+ displayName?: string
34
+ clientId?: string
35
+ clientSecret?: string
36
+ agentId?: string
37
+ }
38
+
39
+ export type CreateOauth2Response = {
40
+ }
41
+
42
+ export type UpdateOauth2Request = {
43
+ providerType?: ProviderType
44
+ displayName?: string
45
+ clientId?: string
46
+ clientSecret?: string
47
+ agentId?: string
48
+ }
49
+
50
+ export type UpdateOauth2Response = {
51
+ }
52
+
53
+ export type DeleteOauth2Request = {
54
+ providerType?: ProviderType
55
+ }
56
+
57
+ export type DeleteOauth2Response = {
58
+ }
59
+
60
+ export class Oauth2 {
61
+ static GetOauth2RedirectDomain(req: GetOauth2RedirectDomainRequest, initReq?: fm.InitReq): Promise<GetOauth2RedirectDomainResponse> {
62
+ return fm.fetchReq<GetOauth2RedirectDomainRequest, GetOauth2RedirectDomainResponse>(`/apis/ghippo.io/v1alpha1/oauth2/redirect-domain?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
63
+ }
64
+ static GetOauth2(req: GetOauth2Request, initReq?: fm.InitReq): Promise<GetOauth2Response> {
65
+ return fm.fetchReq<GetOauth2Request, GetOauth2Response>(`/apis/ghippo.io/v1alpha1/oauth2?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
66
+ }
67
+ static CreateOauth2(req: CreateOauth2Request, initReq?: fm.InitReq): Promise<CreateOauth2Response> {
68
+ return fm.fetchReq<CreateOauth2Request, CreateOauth2Response>(`/apis/ghippo.io/v1alpha1/oauth2`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
69
+ }
70
+ static UpdateOauth2(req: UpdateOauth2Request, initReq?: fm.InitReq): Promise<UpdateOauth2Response> {
71
+ return fm.fetchReq<UpdateOauth2Request, UpdateOauth2Response>(`/apis/ghippo.io/v1alpha1/oauth2`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
72
+ }
73
+ static DeleteOauth2(req: DeleteOauth2Request, initReq?: fm.InitReq): Promise<DeleteOauth2Response> {
74
+ return fm.fetchReq<DeleteOauth2Request, DeleteOauth2Response>(`/apis/ghippo.io/v1alpha1/oauth2`, {...initReq, method: "DELETE"})
75
+ }
76
+ }
@@ -0,0 +1,100 @@
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 OIDCTokenRequest = {
9
+ clientId?: string
10
+ grantType?: string
11
+ clientSecret?: string
12
+ code?: string
13
+ redirectUri?: string
14
+ username?: string
15
+ password?: string
16
+ refreshToken?: string
17
+ scope?: string
18
+ }
19
+
20
+ export type OIDCTokenResponse = {
21
+ accessToken?: string
22
+ idToken?: string
23
+ expiresIn?: number
24
+ refreshExpiresIn?: number
25
+ refreshToken?: string
26
+ tokenType?: string
27
+ notBeforePolicy?: number
28
+ sessionState?: string
29
+ scope?: string
30
+ }
31
+
32
+ export type WellKnownRequest = {
33
+ }
34
+
35
+ export type WellKnownResponse = {
36
+ issuer?: string
37
+ authorizationEndpoint?: string
38
+ tokenEndpoint?: string
39
+ jwksUri?: string
40
+ userinfoEndpoint?: string
41
+ introspectionEndpoint?: string
42
+ idTokenSigningAlgValuesSupported?: string[]
43
+ endSessionEndpoint?: string
44
+ }
45
+
46
+ export type OIDCUserInfoRequest = {
47
+ }
48
+
49
+ export type OIDCUserInfoResponse = {
50
+ sub?: string
51
+ preferredUsername?: string
52
+ email?: string
53
+ locale?: string
54
+ }
55
+
56
+ export type OIDCLogoutRequest = {
57
+ }
58
+
59
+ export type OIDCLogoutResponse = {
60
+ }
61
+
62
+ export type RedirectFrontendLogoutRequest = {
63
+ }
64
+
65
+ export type RedirectFrontendLogoutResponse = {
66
+ }
67
+
68
+ export type GhippoClientConfigRequest = {
69
+ }
70
+
71
+ export type GhippoClientConfigResponse = {
72
+ clientId?: string
73
+ endpoint?: string
74
+ groupsClaim?: string
75
+ name?: string
76
+ scope?: string
77
+ userClaim?: string
78
+ clientSecret?: string
79
+ }
80
+
81
+ export class OIDC {
82
+ static OIDCToken(req: OIDCTokenRequest, initReq?: fm.InitReq): Promise<OIDCTokenResponse> {
83
+ return fm.fetchReq<OIDCTokenRequest, OIDCTokenResponse>(`/apis/ghippo.io/v1alpha1/oidc/token`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
84
+ }
85
+ static WellKnown(req: WellKnownRequest, initReq?: fm.InitReq): Promise<WellKnownResponse> {
86
+ return fm.fetchReq<WellKnownRequest, WellKnownResponse>(`/apis/ghippo.io/v1alpha1/.well-known/openid-configuration?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
87
+ }
88
+ static OIDCUserInfo(req: OIDCUserInfoRequest, initReq?: fm.InitReq): Promise<OIDCUserInfoResponse> {
89
+ return fm.fetchReq<OIDCUserInfoRequest, OIDCUserInfoResponse>(`/apis/ghippo.io/v1alpha1/oidc/userinfo?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
90
+ }
91
+ static OIDCLogout(req: OIDCLogoutRequest, initReq?: fm.InitReq): Promise<OIDCLogoutResponse> {
92
+ return fm.fetchReq<OIDCLogoutRequest, OIDCLogoutResponse>(`/apis/ghippo.io/v1alpha1/oidc/logout`, {...initReq, method: "DELETE"})
93
+ }
94
+ static RedirectFrontendLogout(req: RedirectFrontendLogoutRequest, initReq?: fm.InitReq): Promise<RedirectFrontendLogoutResponse> {
95
+ return fm.fetchReq<RedirectFrontendLogoutRequest, RedirectFrontendLogoutResponse>(`/apis/ghippo.io/v1alpha1/oidc/logout?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
96
+ }
97
+ static GhippoClientConfig(req: GhippoClientConfigRequest, initReq?: fm.InitReq): Promise<GhippoClientConfigResponse> {
98
+ return fm.fetchReq<GhippoClientConfigRequest, GhippoClientConfigResponse>(`/apis/ghippo.io/v1alpha1/oidc/ghippo-client-config?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
99
+ }
100
+ }
@@ -0,0 +1,48 @@
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 CertsRequest = {
9
+ }
10
+
11
+ export type CertsResponse = {
12
+ keys?: Key[]
13
+ }
14
+
15
+ export type Key = {
16
+ kid?: string
17
+ kty?: string
18
+ e?: string
19
+ n?: string
20
+ alg?: string
21
+ use?: string
22
+ }
23
+
24
+ export type GetTokenRequest = {
25
+ ak?: string
26
+ sk?: string
27
+ cycle?: number
28
+ }
29
+
30
+ export type GetTokenResponse = {
31
+ token?: string
32
+ }
33
+
34
+ export type AuthTokenRequest = {
35
+ }
36
+
37
+ export type AuthTokenResponse = {
38
+ message?: string
39
+ }
40
+
41
+ export class Openapi {
42
+ static Certs(req: CertsRequest, initReq?: fm.InitReq): Promise<CertsResponse> {
43
+ return fm.fetchReq<CertsRequest, CertsResponse>(`/apis/ghippo.io/v1alpha1/certs?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
44
+ }
45
+ static AuthToken(req: AuthTokenRequest, initReq?: fm.InitReq): Promise<AuthTokenResponse> {
46
+ return fm.fetchReq<AuthTokenRequest, AuthTokenResponse>(`/apis/ghippo.io/v1alpha1/auth-token?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
47
+ }
48
+ }
@@ -4,31 +4,36 @@
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
 
11
11
  export type ProductNavResponse = {
12
12
  categories?: ProductNavCategory[]
13
+ shortcutMenus?: ShortcutMenus
13
14
  }
14
15
 
15
16
  export type ProductNavCategory = {
16
17
  name?: string
17
- locale?: string
18
18
  menus?: ProductMenu[]
19
19
  }
20
20
 
21
21
  export type ProductMenu = {
22
22
  name?: string
23
23
  url?: string
24
- iconName?: string
25
24
  iconUrl?: string
26
25
  target?: string
27
26
  menus?: ProductMenu[]
27
+ order?: number
28
+ }
29
+
30
+ export type ShortcutMenus = {
31
+ left?: ProductMenu[]
32
+ right?: ProductMenu[]
28
33
  }
29
34
 
30
35
  export class ProductNavigator {
31
36
  static Info(req: ProductNavRequest, initReq?: fm.InitReq): Promise<ProductNavResponse> {
32
- return fm.fetchReq<ProductNavRequest, ProductNavResponse>(`/product-nav/info?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
37
+ return fm.fetchReq<ProductNavRequest, ProductNavResponse>(`/apis/ghippo.io/v1alpha1/product-nav/info?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
33
38
  }
34
39
  }
@@ -0,0 +1,23 @@
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 PublishMessageRequest = {
9
+ userId?: string
10
+ type?: string
11
+ subject?: string
12
+ message?: string
13
+ messageUid?: string
14
+ }
15
+
16
+ export type PublishMessageResponse = {
17
+ }
18
+
19
+ export class Publish {
20
+ static PublishMessage(req: PublishMessageRequest, initReq?: fm.InitReq): Promise<PublishMessageResponse> {
21
+ return fm.fetchReq<PublishMessageRequest, PublishMessageResponse>(`/apis/ghippo.io/v1alpha1/publish/messages`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
22
+ }
23
+ }
@@ -0,0 +1,58 @@
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 GetRecordFilingRequest = {
9
+ }
10
+
11
+ export type GetRecordFilingResponse = {
12
+ enabled?: boolean
13
+ icps?: icps
14
+ polices?: polices
15
+ }
16
+
17
+ export type icps = {
18
+ url?: string
19
+ copyright?: string
20
+ names?: name[]
21
+ }
22
+
23
+ export type polices = {
24
+ url?: string
25
+ names?: name[]
26
+ }
27
+
28
+ export type name = {
29
+ name?: string
30
+ link?: boolean
31
+ }
32
+
33
+ export type UpdateRecordFilingRequest = {
34
+ enabled?: boolean
35
+ icps?: icps
36
+ polices?: polices
37
+ }
38
+
39
+ export type UpdateRecordFilingResponse = {
40
+ }
41
+
42
+ export type ResetRecordFilingRequest = {
43
+ }
44
+
45
+ export type ResetRecordFilingResponse = {
46
+ }
47
+
48
+ export class RecordFiling {
49
+ static GetRecordFiling(req: GetRecordFilingRequest, initReq?: fm.InitReq): Promise<GetRecordFilingResponse> {
50
+ return fm.fetchReq<GetRecordFilingRequest, GetRecordFilingResponse>(`/apis/ghippo.io/v1alpha1/record_filing?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
51
+ }
52
+ static UpdateRecordFiling(req: UpdateRecordFilingRequest, initReq?: fm.InitReq): Promise<UpdateRecordFilingResponse> {
53
+ return fm.fetchReq<UpdateRecordFilingRequest, UpdateRecordFilingResponse>(`/apis/ghippo.io/v1alpha1/record_filing`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
54
+ }
55
+ static ResetRecordFiling(req: ResetRecordFilingRequest, initReq?: fm.InitReq): Promise<ResetRecordFilingResponse> {
56
+ return fm.fetchReq<ResetRecordFilingRequest, ResetRecordFilingResponse>(`/apis/ghippo.io/v1alpha1/record_filing/reset`, {...initReq, method: "POST"})
57
+ }
58
+ }