@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,32 @@
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 FeatureGateID {
10
+ CreateUserInWorkspace = "CreateUserInWorkspace",
11
+ IsCSP = "IsCSP",
12
+ UserCertify = "UserCertify",
13
+ }
14
+
15
+ export type FeatureGateInfo = {
16
+ id?: FeatureGateID
17
+ description?: string
18
+ enabled?: boolean
19
+ }
20
+
21
+ export type ListFeatureGatesRequest = {
22
+ }
23
+
24
+ export type ListFeatureGatesResponse = {
25
+ items?: FeatureGateInfo[]
26
+ }
27
+
28
+ export class FeatureGate {
29
+ static ListFeatureGates(req: ListFeatureGatesRequest, initReq?: fm.InitReq): Promise<ListFeatureGatesResponse> {
30
+ return fm.fetchReq<ListFeatureGatesRequest, ListFeatureGatesResponse>(`/apis/ghippo.io/v1alpha1/feature-gate?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
31
+ }
32
+ }
@@ -0,0 +1,28 @@
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 ListGProductsRequest = {
9
+ }
10
+
11
+ export type ListGProductsResponse = {
12
+ data?: GProduct[]
13
+ }
14
+
15
+ export type GProduct = {
16
+ id?: string
17
+ title?: string
18
+ url?: string
19
+ uiAssetsUrl?: string
20
+ needImportLicense?: boolean
21
+ needUpdateExpiredLicense?: boolean
22
+ }
23
+
24
+ export class GProducts {
25
+ static ListGProducts(req: ListGProductsRequest, initReq?: fm.InitReq): Promise<ListGProductsResponse> {
26
+ return fm.fetchReq<ListGProductsRequest, ListGProductsResponse>(`/apis/ghippo.io/v1alpha1/gproducts?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
27
+ }
28
+ }
@@ -0,0 +1,109 @@
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 ListGProductLicensesRequest = {
9
+ }
10
+
11
+ export type ListGProductLicensesResponse = {
12
+ licenses?: GProductLicense[]
13
+ }
14
+
15
+ export type GetGProductLicensesRequest = {
16
+ id?: string
17
+ }
18
+
19
+ export type GetGProductLicensesResponse = {
20
+ license?: GProductLicenseInfo
21
+ }
22
+
23
+ export type UpdateGProductLicensesRequest = {
24
+ yaml?: string
25
+ }
26
+
27
+ export type UpdateGProductLicensesResponse = {
28
+ message?: string
29
+ licenses?: GProductLicense[]
30
+ }
31
+
32
+ export type GetGProductLicenseYamlRequest = {
33
+ }
34
+
35
+ export type GetGProductLicenseYamlResponse = {
36
+ yaml?: string
37
+ }
38
+
39
+ export type DeleteProductLicensesRequest = {
40
+ id?: string
41
+ }
42
+
43
+ export type DeleteProductLicensesResponse = {
44
+ }
45
+
46
+ export type GetGProductLicensesESNRequest = {
47
+ }
48
+
49
+ export type GetGProductLicensesESNResponse = {
50
+ esn?: string
51
+ }
52
+
53
+ export type GetGProductLicensesOverQuotaRequest = {
54
+ }
55
+
56
+ export type GetGProductLicensesOverQuotaResponse = {
57
+ expireSoonLicenses?: GProductLicense[]
58
+ expiredLicenses?: GProductLicense[]
59
+ }
60
+
61
+ export type GProductLicense = {
62
+ id?: string
63
+ name?: string
64
+ module?: string
65
+ level?: string
66
+ status?: string
67
+ expiredAt?: string
68
+ }
69
+
70
+ export type GProductLicenseInfo = {
71
+ id?: string
72
+ name?: string
73
+ module?: string
74
+ licenseKey?: string
75
+ licenseLevel?: string
76
+ physicalUsedCpu?: string
77
+ physicalMaxCpu?: string
78
+ virtualUsedCpu?: string
79
+ virtualMaxCpu?: string
80
+ expiredAt?: string
81
+ usedNode?: string
82
+ maxNode?: string
83
+ physicalUsedGpu?: string
84
+ physicalMaxGpu?: string
85
+ }
86
+
87
+ export class GProductLicenses {
88
+ static ListGProductLicenses(req: ListGProductLicensesRequest, initReq?: fm.InitReq): Promise<ListGProductLicensesResponse> {
89
+ return fm.fetchReq<ListGProductLicensesRequest, ListGProductLicensesResponse>(`/apis/ghippo.io/v1alpha1/gproduct-licenses?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
90
+ }
91
+ static GetGProductLicenses(req: GetGProductLicensesRequest, initReq?: fm.InitReq): Promise<GetGProductLicensesResponse> {
92
+ return fm.fetchReq<GetGProductLicensesRequest, GetGProductLicensesResponse>(`/apis/ghippo.io/v1alpha1/gproduct-licenses/${req["id"]}?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
93
+ }
94
+ static UpdateGProductLicenses(req: UpdateGProductLicensesRequest, initReq?: fm.InitReq): Promise<UpdateGProductLicensesResponse> {
95
+ return fm.fetchReq<UpdateGProductLicensesRequest, UpdateGProductLicensesResponse>(`/apis/ghippo.io/v1alpha1/gproduct-licenses`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
96
+ }
97
+ static GetGProductLicensesYaml(req: GetGProductLicenseYamlRequest, initReq?: fm.InitReq): Promise<GetGProductLicenseYamlResponse> {
98
+ return fm.fetchReq<GetGProductLicenseYamlRequest, GetGProductLicenseYamlResponse>(`/apis/ghippo.io/v1alpha1/gproduct-licenses/yaml?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
99
+ }
100
+ static DeleteGProductLicenses(req: DeleteProductLicensesRequest, initReq?: fm.InitReq): Promise<DeleteProductLicensesResponse> {
101
+ return fm.fetchReq<DeleteProductLicensesRequest, DeleteProductLicensesResponse>(`/apis/ghippo.io/v1alpha1/gproduct-licenses/${req["id"]}`, {...initReq, method: "DELETE"})
102
+ }
103
+ static GetGProductLicensesESN(req: GetGProductLicensesESNRequest, initReq?: fm.InitReq): Promise<GetGProductLicensesESNResponse> {
104
+ return fm.fetchReq<GetGProductLicensesESNRequest, GetGProductLicensesESNResponse>(`/apis/ghippo.io/v1alpha1/gproduct-licenses/esn?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
105
+ }
106
+ static GetGProductLicensesOverQuota(req: GetGProductLicensesOverQuotaRequest, initReq?: fm.InitReq): Promise<GetGProductLicensesOverQuotaResponse> {
107
+ return fm.fetchReq<GetGProductLicensesOverQuotaRequest, GetGProductLicensesOverQuotaResponse>(`/apis/ghippo.io/v1alpha1/gproduct-licenses/over-quota?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
108
+ }
109
+ }
@@ -0,0 +1,187 @@
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 CreateGroupRequest = {
9
+ name?: string
10
+ description?: string
11
+ }
12
+
13
+ export type CreateGroupResponse = {
14
+ id?: string
15
+ }
16
+
17
+ export type ListGroupsRequest = {
18
+ search?: string
19
+ page?: number
20
+ pageSize?: number
21
+ }
22
+
23
+ export type ListGroupsResponse = {
24
+ pagination?: Pagination
25
+ items?: GroupInfo[]
26
+ }
27
+
28
+ export type Pagination = {
29
+ page?: number
30
+ pageSize?: number
31
+ total?: number
32
+ }
33
+
34
+ export type GroupInfo = {
35
+ id?: string
36
+ name?: string
37
+ userCount?: number
38
+ description?: string
39
+ createdAt?: string
40
+ canAuthorize?: boolean
41
+ }
42
+
43
+ export type GroupRequest = {
44
+ id?: string
45
+ }
46
+
47
+ export type GetGroupResponse = {
48
+ group?: GroupInfo
49
+ }
50
+
51
+ export type DeleteGroupResponse = {
52
+ }
53
+
54
+ export type GroupMembersRequest = {
55
+ id?: string
56
+ search?: string
57
+ page?: number
58
+ pageSize?: number
59
+ }
60
+
61
+ export type GroupMembersResponse = {
62
+ pagination?: Pagination
63
+ items?: User[]
64
+ }
65
+
66
+ export type User = {
67
+ id?: string
68
+ name?: string
69
+ email?: string
70
+ description?: string
71
+ createdAt?: string
72
+ updatedAt?: string
73
+ }
74
+
75
+ export type AddUserToGroupRequest = {
76
+ id?: string
77
+ userId?: string
78
+ }
79
+
80
+ export type AddUserToGroupResponse = {
81
+ }
82
+
83
+ export type DeleteUserFromGroupRequest = {
84
+ id?: string
85
+ userId?: string
86
+ }
87
+
88
+ export type DeleteUserFromGroupResponse = {
89
+ }
90
+
91
+ export type UpdateGroupRequest = {
92
+ id?: string
93
+ name?: string
94
+ description?: string
95
+ }
96
+
97
+ export type UpdateGroupResponse = {
98
+ }
99
+
100
+ export type ListGroupRolesRequest = {
101
+ id?: string
102
+ search?: string
103
+ page?: number
104
+ pageSize?: number
105
+ type?: string
106
+ authorized?: boolean
107
+ }
108
+
109
+ export type ListGroupRolesResponse = {
110
+ pagination?: Pagination
111
+ authorizedCount?: number
112
+ items?: RoleInfo[]
113
+ }
114
+
115
+ export type ListGroupSubjectRequest = {
116
+ id?: string
117
+ search?: string
118
+ page?: number
119
+ pageSize?: number
120
+ }
121
+
122
+ export type ListGroupSubjectResponse = {
123
+ pagination?: Pagination
124
+ items?: GroupSubject[]
125
+ }
126
+
127
+ export type GroupSubject = {
128
+ id?: string
129
+ roleId?: string
130
+ type?: string
131
+ roleName?: string
132
+ subjectName?: string
133
+ }
134
+
135
+ export type UpdateGroupRolesRequest = {
136
+ id?: string
137
+ addRoles?: string[]
138
+ removeRoles?: string[]
139
+ }
140
+
141
+ export type UpdateGroupRolesResponse = {
142
+ }
143
+
144
+ export type RoleInfo = {
145
+ name?: string
146
+ type?: string
147
+ description?: string
148
+ createdAt?: string
149
+ updatedAt?: string
150
+ authorized?: boolean
151
+ }
152
+
153
+ export class Group {
154
+ static CreateGroup(req: CreateGroupRequest, initReq?: fm.InitReq): Promise<CreateGroupResponse> {
155
+ return fm.fetchReq<CreateGroupRequest, CreateGroupResponse>(`/apis/ghippo.io/v1alpha1/groups`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
156
+ }
157
+ static ListGroups(req: ListGroupsRequest, initReq?: fm.InitReq): Promise<ListGroupsResponse> {
158
+ return fm.fetchReq<ListGroupsRequest, ListGroupsResponse>(`/apis/ghippo.io/v1alpha1/groups?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
159
+ }
160
+ static GetGroup(req: GroupRequest, initReq?: fm.InitReq): Promise<GetGroupResponse> {
161
+ return fm.fetchReq<GroupRequest, GetGroupResponse>(`/apis/ghippo.io/v1alpha1/groups/${req["id"]}?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
162
+ }
163
+ static DeleteGroup(req: GroupRequest, initReq?: fm.InitReq): Promise<DeleteGroupResponse> {
164
+ return fm.fetchReq<GroupRequest, DeleteGroupResponse>(`/apis/ghippo.io/v1alpha1/groups/${req["id"]}`, {...initReq, method: "DELETE"})
165
+ }
166
+ static UpdateGroup(req: UpdateGroupRequest, initReq?: fm.InitReq): Promise<UpdateGroupResponse> {
167
+ return fm.fetchReq<UpdateGroupRequest, UpdateGroupResponse>(`/apis/ghippo.io/v1alpha1/groups/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
168
+ }
169
+ static GroupMembers(req: GroupMembersRequest, initReq?: fm.InitReq): Promise<GroupMembersResponse> {
170
+ return fm.fetchReq<GroupMembersRequest, GroupMembersResponse>(`/apis/ghippo.io/v1alpha1/groups/${req["id"]}/members?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
171
+ }
172
+ static AddUserToGroup(req: AddUserToGroupRequest, initReq?: fm.InitReq): Promise<AddUserToGroupResponse> {
173
+ return fm.fetchReq<AddUserToGroupRequest, AddUserToGroupResponse>(`/apis/ghippo.io/v1alpha1/groups/${req["id"]}/members/${req["userId"]}`, {...initReq, method: "POST"})
174
+ }
175
+ static DeleteUserFromGroup(req: DeleteUserFromGroupRequest, initReq?: fm.InitReq): Promise<DeleteUserFromGroupResponse> {
176
+ return fm.fetchReq<DeleteUserFromGroupRequest, DeleteUserFromGroupResponse>(`/apis/ghippo.io/v1alpha1/groups/${req["id"]}/members/${req["userId"]}`, {...initReq, method: "DELETE"})
177
+ }
178
+ static ListGroupRoles(req: ListGroupRolesRequest, initReq?: fm.InitReq): Promise<ListGroupRolesResponse> {
179
+ return fm.fetchReq<ListGroupRolesRequest, ListGroupRolesResponse>(`/apis/ghippo.io/v1alpha1/groups/${req["id"]}/roles?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
180
+ }
181
+ static ListGroupSubjects(req: ListGroupSubjectRequest, initReq?: fm.InitReq): Promise<ListGroupSubjectResponse> {
182
+ return fm.fetchReq<ListGroupSubjectRequest, ListGroupSubjectResponse>(`/apis/ghippo.io/v1alpha1/groups/${req["id"]}/subjects?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
183
+ }
184
+ static UpdateGroupRoles(req: UpdateGroupRolesRequest, initReq?: fm.InitReq): Promise<UpdateGroupRolesResponse> {
185
+ return fm.fetchReq<UpdateGroupRolesRequest, UpdateGroupRolesResponse>(`/apis/ghippo.io/v1alpha1/groups/${req["id"]}/roles`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
186
+ }
187
+ }
@@ -0,0 +1,131 @@
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
+ oidc = "oidc",
11
+ }
12
+
13
+ export enum ClientAuthentications {
14
+ client_secret_post = "client_secret_post",
15
+ client_secret_basic = "client_secret_basic",
16
+ client_secret_jwt = "client_secret_jwt",
17
+ private_key_jwt = "private_key_jwt",
18
+ }
19
+
20
+ export type CreateIDPRequest = {
21
+ displayName?: string
22
+ clientId?: string
23
+ clientSecret?: string
24
+ clientAuthentications?: ClientAuthentications
25
+ providerId?: ProviderType
26
+ authorizationUrl?: string
27
+ userInfoUrl?: string
28
+ tokenUrl?: string
29
+ logoutUrl?: string
30
+ enableAutoLinkFlow?: boolean
31
+ alias?: string
32
+ enabled?: boolean
33
+ }
34
+
35
+ export type CreateIDPResponse = {
36
+ }
37
+
38
+ export type IDPInfo = {
39
+ displayName?: string
40
+ clientId?: string
41
+ clientSecret?: string
42
+ clientAuthentications?: ClientAuthentications
43
+ providerId?: ProviderType
44
+ authorizationUrl?: string
45
+ userInfoUrl?: string
46
+ tokenUrl?: string
47
+ logoutUrl?: string
48
+ enableAutoLinkFlow?: boolean
49
+ alias?: string
50
+ enabled?: boolean
51
+ }
52
+
53
+ export type GetIDPRequest = {
54
+ alias?: string
55
+ }
56
+
57
+ export type GetIDPResponse = {
58
+ idpInfo?: IDPInfo
59
+ }
60
+
61
+ export type ListIDPsRequest = {
62
+ }
63
+
64
+ export type ListIDPsResponse = {
65
+ items?: IDPInfo[]
66
+ }
67
+
68
+ export type GetRedirectUrlRequest = {
69
+ alias?: string
70
+ }
71
+
72
+ export type GetRedirectUrlResponse = {
73
+ url?: string
74
+ }
75
+
76
+ export type DeleteIDPRequest = {
77
+ alias?: string
78
+ }
79
+
80
+ export type DeleteIDPResponse = {
81
+ }
82
+
83
+ export type UpdateIDPRequest = {
84
+ displayName?: string
85
+ clientId?: string
86
+ clientSecret?: string
87
+ clientAuthentications?: ClientAuthentications
88
+ providerId?: ProviderType
89
+ authorizationUrl?: string
90
+ userInfoUrl?: string
91
+ tokenUrl?: string
92
+ logoutUrl?: string
93
+ enableAutoLinkFlow?: boolean
94
+ alias?: string
95
+ enabled?: boolean
96
+ }
97
+
98
+ export type UpdateIDPResponse = {
99
+ alias?: string
100
+ }
101
+
102
+ export type GetWellKnownUrlRequest = {
103
+ }
104
+
105
+ export type GetWellKnownUrlResponse = {
106
+ url?: string
107
+ }
108
+
109
+ export class IDP {
110
+ static CreateIDP(req: CreateIDPRequest, initReq?: fm.InitReq): Promise<CreateIDPResponse> {
111
+ return fm.fetchReq<CreateIDPRequest, CreateIDPResponse>(`/apis/ghippo.io/v1alpha1/idp`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
112
+ }
113
+ static GetIDP(req: GetIDPRequest, initReq?: fm.InitReq): Promise<GetIDPResponse> {
114
+ return fm.fetchReq<GetIDPRequest, GetIDPResponse>(`/apis/ghippo.io/v1alpha1/idp/${req["alias"]}?${fm.renderURLSearchParams(req, ["alias"])}`, {...initReq, method: "GET"})
115
+ }
116
+ static ListIDPs(req: ListIDPsRequest, initReq?: fm.InitReq): Promise<ListIDPsResponse> {
117
+ return fm.fetchReq<ListIDPsRequest, ListIDPsResponse>(`/apis/ghippo.io/v1alpha1/idp?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
118
+ }
119
+ static GetRedirectUrl(req: GetRedirectUrlRequest, initReq?: fm.InitReq): Promise<GetRedirectUrlResponse> {
120
+ return fm.fetchReq<GetRedirectUrlRequest, GetRedirectUrlResponse>(`/apis/ghippo.io/v1alpha1/idp/${req["alias"]}/redirect-url?${fm.renderURLSearchParams(req, ["alias"])}`, {...initReq, method: "GET"})
121
+ }
122
+ static DeleteIDP(req: DeleteIDPRequest, initReq?: fm.InitReq): Promise<DeleteIDPResponse> {
123
+ return fm.fetchReq<DeleteIDPRequest, DeleteIDPResponse>(`/apis/ghippo.io/v1alpha1/idp/${req["alias"]}`, {...initReq, method: "DELETE"})
124
+ }
125
+ static UpdateIDP(req: UpdateIDPRequest, initReq?: fm.InitReq): Promise<UpdateIDPResponse> {
126
+ return fm.fetchReq<UpdateIDPRequest, UpdateIDPResponse>(`/apis/ghippo.io/v1alpha1/idp/${req["alias"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
127
+ }
128
+ static GetWellKnownUrl(req: GetWellKnownUrlRequest, initReq?: fm.InitReq): Promise<GetWellKnownUrlResponse> {
129
+ return fm.fetchReq<GetWellKnownUrlRequest, GetWellKnownUrlResponse>(`/apis/ghippo.io/v1alpha1/idp/wellknown-url?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
130
+ }
131
+ }
@@ -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 AuthDetails = {
9
+ clientId?: string
10
+ ipAddress?: string
11
+ realmId?: string
12
+ userId?: string
13
+ username?: string
14
+ sessionId?: string
15
+ }
16
+
17
+ export type KeycloakEventRequest = {
18
+ realmId?: string
19
+ resourceType?: string
20
+ operationType?: string
21
+ resourcePath?: string
22
+ representation?: string
23
+ uid?: string
24
+ authDetails?: AuthDetails
25
+ type?: string
26
+ details?: {[key: string]: string}
27
+ error?: string
28
+ }
29
+
30
+ export type KeycloakEventResponse = {
31
+ }
32
+
33
+ export class KeycloakEvent {
34
+ static KeycloakEvent(req: KeycloakEventRequest, initReq?: fm.InitReq): Promise<KeycloakEventResponse> {
35
+ return fm.fetchReq<KeycloakEventRequest, KeycloakEventResponse>(`/apis/ghippo.io/v1alpha1/keycloak-event`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
36
+ }
37
+ }
@@ -0,0 +1,82 @@
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
+ useSso?: string
21
+ }
22
+
23
+ export type LoginPostResponse = {
24
+ idToken?: string
25
+ refreshToken?: string
26
+ username?: string
27
+ }
28
+
29
+ export type AuthenticateWithPasswordRequest = {
30
+ username?: string
31
+ password?: string
32
+ }
33
+
34
+ export type AuthenticateWithPasswordResponse = {
35
+ idToken?: string
36
+ refreshToken?: string
37
+ username?: string
38
+ }
39
+
40
+ export type LogoutRequest = {
41
+ }
42
+
43
+ export type LogoutResponse = {
44
+ externalLogoutUrl?: string
45
+ }
46
+
47
+ export type RefreshTokenRequest = {
48
+ refreshToken?: string
49
+ }
50
+
51
+ export type RefreshTokenResponse = {
52
+ idToken?: string
53
+ refreshToken?: string
54
+ }
55
+
56
+ export type CheckSessionLimitRequest = {
57
+ username?: string
58
+ }
59
+
60
+ export type CheckSessionLimitResponse = {
61
+ }
62
+
63
+ export class Login {
64
+ static RedirectLogin(req: LoginGetRequest, initReq?: fm.InitReq): Promise<LoginGetResponse> {
65
+ return fm.fetchReq<LoginGetRequest, LoginGetResponse>(`/apis/ghippo.io/v1alpha1/login?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
66
+ }
67
+ static OIDCLogin(req: LoginPostRequest, initReq?: fm.InitReq): Promise<LoginPostResponse> {
68
+ return fm.fetchReq<LoginPostRequest, LoginPostResponse>(`/apis/ghippo.io/v1alpha1/login`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
69
+ }
70
+ static OIDCLogout(req: LogoutRequest, initReq?: fm.InitReq): Promise<LogoutResponse> {
71
+ return fm.fetchReq<LogoutRequest, LogoutResponse>(`/apis/ghippo.io/v1alpha1/logout`, {...initReq, method: "DELETE"})
72
+ }
73
+ static RefreshToken(req: RefreshTokenRequest, initReq?: fm.InitReq): Promise<RefreshTokenResponse> {
74
+ return fm.fetchReq<RefreshTokenRequest, RefreshTokenResponse>(`/apis/ghippo.io/v1alpha1/refresh-token`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
75
+ }
76
+ static CheckSessionLimit(req: CheckSessionLimitRequest, initReq?: fm.InitReq): Promise<CheckSessionLimitResponse> {
77
+ return fm.fetchReq<CheckSessionLimitRequest, CheckSessionLimitResponse>(`/apis/ghippo.io/v1alpha1/session-limit`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
78
+ }
79
+ static AuthenticateWithPassword(req: AuthenticateWithPasswordRequest, initReq?: fm.InitReq): Promise<AuthenticateWithPasswordResponse> {
80
+ return fm.fetchReq<AuthenticateWithPasswordRequest, AuthenticateWithPasswordResponse>(`/apis/ghippo.io/v1alpha1/authenticate-with-password`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
81
+ }
82
+ }
@@ -0,0 +1,62 @@
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 GetLoginPageInfoRequest = {
9
+ }
10
+
11
+ export type GetLoginPageInfoResponse = {
12
+ version?: number
13
+ platformName?: string
14
+ copyright?: string
15
+ tabName?: string
16
+ icon?: string
17
+ favicon?: string
18
+ background?: string
19
+ customBg?: boolean
20
+ isVideo?: boolean
21
+ }
22
+
23
+ export type GetLoginPageVersionRequest = {
24
+ }
25
+
26
+ export type GetLoginPageVersionResponse = {
27
+ version?: number
28
+ }
29
+
30
+ export type UpdateLoginPageInfoRequest = {
31
+ platformName?: string
32
+ copyright?: string
33
+ tabName?: string
34
+ icon?: string
35
+ favicon?: string
36
+ background?: string
37
+ isVideo?: boolean
38
+ }
39
+
40
+ export type UpdateLoginPageInfoResponse = {
41
+ }
42
+
43
+ export type ResetLoginPageInfoRequest = {
44
+ }
45
+
46
+ export type ResetLoginPageInfoResponse = {
47
+ }
48
+
49
+ export class LoginPage {
50
+ static GetInfo(req: GetLoginPageInfoRequest, initReq?: fm.InitReq): Promise<GetLoginPageInfoResponse> {
51
+ return fm.fetchReq<GetLoginPageInfoRequest, GetLoginPageInfoResponse>(`/apis/ghippo.io/v1alpha1/login-page/info?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
52
+ }
53
+ static GetVersion(req: GetLoginPageVersionRequest, initReq?: fm.InitReq): Promise<GetLoginPageVersionResponse> {
54
+ return fm.fetchReq<GetLoginPageVersionRequest, GetLoginPageVersionResponse>(`/apis/ghippo.io/v1alpha1/login-page/version?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
55
+ }
56
+ static UpdateInfo(req: UpdateLoginPageInfoRequest, initReq?: fm.InitReq): Promise<UpdateLoginPageInfoResponse> {
57
+ return fm.fetchReq<UpdateLoginPageInfoRequest, UpdateLoginPageInfoResponse>(`/apis/ghippo.io/v1alpha1/login-page/info`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
58
+ }
59
+ static ResetInfo(req: ResetLoginPageInfoRequest, initReq?: fm.InitReq): Promise<ResetLoginPageInfoResponse> {
60
+ return fm.fetchReq<ResetLoginPageInfoRequest, ResetLoginPageInfoResponse>(`/apis/ghippo.io/v1alpha1/login-page/reset`, {...initReq, method: "POST"})
61
+ }
62
+ }