@daocloud-proto/ghippo 0.13.2 → 0.14.0-dev-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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/ghippo",
3
- "version":"0.13.2",
3
+ "version":"0.14.0-dev-2",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -12,6 +12,11 @@ export enum StatusType {
12
12
  failed = "failed",
13
13
  }
14
14
 
15
+ export enum SearchType {
16
+ fuzzy = "fuzzy",
17
+ exact = "exact",
18
+ }
19
+
15
20
  export enum ExternalType {
16
21
  loginFailed = "loginFailed",
17
22
  forgetPassword = "forgetPassword",
@@ -25,7 +30,9 @@ export type Disposition = {
25
30
  export type ListAuditRequest = {
26
31
  sourceType?: string
27
32
  sourceName?: string
33
+ clusterName?: string
28
34
  status?: StatusType
35
+ searchType?: SearchType
29
36
  searchUser?: string
30
37
  start?: string
31
38
  end?: string
@@ -43,6 +50,7 @@ export type AuditInfo = {
43
50
  auditName?: string
44
51
  resourceType?: string
45
52
  resourceName?: string
53
+ clusterName?: string
46
54
  status?: StatusType
47
55
  user?: string
48
56
  client?: string
@@ -74,43 +74,36 @@ export type GetUserResponse = {
74
74
  locale?: string
75
75
  }
76
76
 
77
- export type ListSecretsRequest = {
77
+ export type ListAccessTokensRequest = {
78
78
  }
79
79
 
80
- export type ListSecretsResponse = {
81
- items?: Secret[]
80
+ export type ListAccessTokensResponse = {
81
+ items?: AccessToken[]
82
82
  }
83
83
 
84
- export type Secret = {
84
+ export type AccessToken = {
85
85
  id?: string
86
- secret?: string
87
- enabled?: boolean
88
- createdAt?: string
86
+ name?: string
89
87
  updatedAt?: string
90
- lastUsedAt?: string
91
- }
92
-
93
- export type CreateSecretRequest = {
94
- enabled?: boolean
88
+ createdAt?: string
89
+ expiredAt?: string
95
90
  }
96
91
 
97
- export type CreateSecretResponse = {
98
- id?: string
92
+ export type CreateAccessTokenRequest = {
93
+ name?: string
94
+ expiredAt?: string
99
95
  }
100
96
 
101
- export type UpdateSecretRequest = {
97
+ export type CreateAccessTokenResponse = {
102
98
  id?: string
103
- enabled?: boolean
104
- }
105
-
106
- export type UpdateSecretResponse = {
99
+ token?: string
107
100
  }
108
101
 
109
- export type DeleteSecretRequest = {
102
+ export type DeleteAccessTokenRequest = {
110
103
  id?: string
111
104
  }
112
105
 
113
- export type DeleteSecretResponse = {
106
+ export type DeleteAccessTokenResponse = {
114
107
  }
115
108
 
116
109
  export type GetGlobalPermissionsRequest = {
@@ -133,17 +126,14 @@ export class Account {
133
126
  static GetUser(req: GetUserRequest, initReq?: fm.InitReq): Promise<GetUserResponse> {
134
127
  return fm.fetchReq<GetUserRequest, GetUserResponse>(`/apis/ghippo.io/v1alpha1/current-user?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
135
128
  }
136
- static ListSecrets(req: ListSecretsRequest, initReq?: fm.InitReq): Promise<ListSecretsResponse> {
137
- return fm.fetchReq<ListSecretsRequest, ListSecretsResponse>(`/apis/ghippo.io/v1alpha1/current-user/secrets?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
138
- }
139
- static CreateSecret(req: CreateSecretRequest, initReq?: fm.InitReq): Promise<CreateSecretResponse> {
140
- return fm.fetchReq<CreateSecretRequest, CreateSecretResponse>(`/apis/ghippo.io/v1alpha1/current-user/secrets`, {...initReq, method: "POST", body: JSON.stringify(req)})
129
+ static ListAccessTokens(req: ListAccessTokensRequest, initReq?: fm.InitReq): Promise<ListAccessTokensResponse> {
130
+ return fm.fetchReq<ListAccessTokensRequest, ListAccessTokensResponse>(`/apis/ghippo.io/v1alpha1/current-user/accesstokens?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
141
131
  }
142
- static UpdateSecret(req: UpdateSecretRequest, initReq?: fm.InitReq): Promise<UpdateSecretResponse> {
143
- return fm.fetchReq<UpdateSecretRequest, UpdateSecretResponse>(`/apis/ghippo.io/v1alpha1/current-user/secrets/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
132
+ static CreateAccessToken(req: CreateAccessTokenRequest, initReq?: fm.InitReq): Promise<CreateAccessTokenResponse> {
133
+ return fm.fetchReq<CreateAccessTokenRequest, CreateAccessTokenResponse>(`/apis/ghippo.io/v1alpha1/current-user/accesstoken`, {...initReq, method: "POST", body: JSON.stringify(req)})
144
134
  }
145
- static DeleteSecret(req: DeleteSecretRequest, initReq?: fm.InitReq): Promise<DeleteSecretResponse> {
146
- return fm.fetchReq<DeleteSecretRequest, DeleteSecretResponse>(`/apis/ghippo.io/v1alpha1/current-user/secrets/${req["id"]}`, {...initReq, method: "DELETE"})
135
+ static DeleteAccessToken(req: DeleteAccessTokenRequest, initReq?: fm.InitReq): Promise<DeleteAccessTokenResponse> {
136
+ return fm.fetchReq<DeleteAccessTokenRequest, DeleteAccessTokenResponse>(`/apis/ghippo.io/v1alpha1/current-user/accesstokens/${req["id"]}`, {...initReq, method: "DELETE"})
147
137
  }
148
138
  static GetGlobalPermissions(req: GetGlobalPermissionsRequest, initReq?: fm.InitReq): Promise<GetGlobalPermissionsResponse> {
149
139
  return fm.fetchReq<GetGlobalPermissionsRequest, GetGlobalPermissionsResponse>(`/apis/ghippo.io/v1alpha1/current-user/global-permissions?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -81,7 +81,7 @@ export type GProductLicenseInfo = {
81
81
  maxNode?: string
82
82
  }
83
83
 
84
- export class GProducts {
84
+ export class GProductLicenses {
85
85
  static ListGProductLicenses(req: ListGProductLicensesRequest, initReq?: fm.InitReq): Promise<ListGProductLicensesResponse> {
86
86
  return fm.fetchReq<ListGProductLicensesRequest, ListGProductLicensesResponse>(`/apis/ghippo.io/v1alpha1/gproduct-licenses?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
87
87
  }
@@ -65,6 +65,19 @@ export type RedirectFrontendLogoutRequest = {
65
65
  export type RedirectFrontendLogoutResponse = {
66
66
  }
67
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
+
68
81
  export class OIDC {
69
82
  static OIDCToken(req: OIDCTokenRequest, initReq?: fm.InitReq): Promise<OIDCTokenResponse> {
70
83
  return fm.fetchReq<OIDCTokenRequest, OIDCTokenResponse>(`/apis/ghippo.io/v1alpha1/oidc/token`, {...initReq, method: "POST", body: JSON.stringify(req)})
@@ -81,4 +94,7 @@ export class OIDC {
81
94
  static RedirectFrontendLogout(req: RedirectFrontendLogoutRequest, initReq?: fm.InitReq): Promise<RedirectFrontendLogoutResponse> {
82
95
  return fm.fetchReq<RedirectFrontendLogoutRequest, RedirectFrontendLogoutResponse>(`/apis/ghippo.io/v1alpha1/oidc/logout?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
83
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
+ }
84
100
  }
@@ -31,11 +31,18 @@ export type GetTokenResponse = {
31
31
  token?: string
32
32
  }
33
33
 
34
+ export type AuthTokenRequest = {
35
+ }
36
+
37
+ export type AuthTokenResponse = {
38
+ message?: string
39
+ }
40
+
34
41
  export class Openapi {
35
42
  static Certs(req: CertsRequest, initReq?: fm.InitReq): Promise<CertsResponse> {
36
43
  return fm.fetchReq<CertsRequest, CertsResponse>(`/apis/ghippo.io/v1alpha1/certs?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
37
44
  }
38
- static GetToken(req: GetTokenRequest, initReq?: fm.InitReq): Promise<GetTokenResponse> {
39
- return fm.fetchReq<GetTokenRequest, GetTokenResponse>(`/apis/ghippo.io/v1alpha1/token?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
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"})
40
47
  }
41
48
  }
@@ -6,9 +6,96 @@
6
6
 
7
7
  import * as fm from "../fetch.pb"
8
8
 
9
+ export enum AuthScope {
10
+ platform = "platform",
11
+ folder = "folder",
12
+ workspace = "workspace",
13
+ }
14
+
9
15
  export enum globalRoleType {
10
16
  system = "system",
11
17
  custom = "custom",
18
+ unknown = "unknown",
19
+ }
20
+
21
+ export type ListAllPermissionsRequest = {
22
+ }
23
+
24
+ export type ListAllPermissionsResponse = {
25
+ gproductPerms?: GProductAllPermissions[]
26
+ }
27
+
28
+ export type GProduct = {
29
+ gproduct?: string
30
+ localizedName?: string
31
+ }
32
+
33
+ export type GProductAllPermissions = {
34
+ gproduct?: GProduct
35
+ authscopePerms?: AuthScopeAllPermissions[]
36
+ }
37
+
38
+ export type AuthScopeAllPermissions = {
39
+ authScope?: AuthScope
40
+ categoryPerms?: CatogoryAllPermissions[]
41
+ }
42
+
43
+ export type Catogory = {
44
+ name?: string
45
+ localizedName?: string
46
+ }
47
+
48
+ export type CatogoryAllPermissions = {
49
+ catogory?: Catogory
50
+ resourcePerms?: ResourceAllPermissions[]
51
+ }
52
+
53
+ export type ResourceType = {
54
+ name?: string
55
+ localizedName?: string
56
+ }
57
+
58
+ export type ResourceAllPermissions = {
59
+ resourceType?: ResourceType
60
+ actions?: ResourceActionWithDependancy[]
61
+ }
62
+
63
+ export type ResourceAction = {
64
+ name?: string
65
+ localizedName?: string
66
+ }
67
+
68
+ export type ResourceActionWithDependancy = {
69
+ action?: ResourceAction
70
+ dependPerms?: Permission[]
71
+ }
72
+
73
+ export type Permission = {
74
+ action?: string
75
+ resourceType?: string
76
+ gproduct?: string
77
+ }
78
+
79
+ export type RoleInfo = {
80
+ name?: string
81
+ type?: globalRoleType
82
+ description?: string
83
+ scope?: AuthScope
84
+ createdAt?: string
85
+ updatedAt?: string
86
+ alias?: string
87
+ }
88
+
89
+ export type ListRolesRequest = {
90
+ search?: string
91
+ pageSize?: number
92
+ page?: number
93
+ roleType?: globalRoleType
94
+ }
95
+
96
+ export type ListRolesResponse = {
97
+ items?: RoleInfo[]
98
+ pagination?: Pagination
12
99
  }
13
100
 
14
101
  export type Pagination = {
@@ -17,6 +104,160 @@ export type Pagination = {
17
104
  pageSize?: number
18
105
  }
19
106
 
107
+ export type GetRoleRequest = {
108
+ name?: string
109
+ }
110
+
111
+ export type GetRoleResponse = {
112
+ name?: string
113
+ type?: globalRoleType
114
+ description?: string
115
+ scope?: AuthScope
116
+ createdAt?: string
117
+ updatedAt?: string
118
+ gproductPerms?: GProductPermissions[]
119
+ alias?: string
120
+ }
121
+
122
+ export type GProductPermissions = {
123
+ gproduct?: string
124
+ categoryPerms?: CategoryPermissions[]
125
+ }
126
+
127
+ export type CategoryPermissions = {
128
+ catogory?: Catogory
129
+ resourcePerms?: ResourcePermissions[]
130
+ }
131
+
132
+ export type ResourcePermissions = {
133
+ resourceType?: ResourceType
134
+ actions?: ResourceAction[]
135
+ }
136
+
137
+ export type CreateRoleRequest = {
138
+ name?: string
139
+ gproduct?: string
140
+ description?: string
141
+ scope?: AuthScope
142
+ perms?: Permission[]
143
+ alias?: string
144
+ }
145
+
146
+ export type CreateRoleResponse = {
147
+ }
148
+
149
+ export type UpdateRoleRequest = {
150
+ name?: string
151
+ description?: string
152
+ scope?: AuthScope
153
+ perms?: Permission[]
154
+ alias?: string
155
+ }
156
+
157
+ export type UpdateRoleResponse = {
158
+ }
159
+
160
+ export type DeleteRoleRequest = {
161
+ name?: string
162
+ }
163
+
164
+ export type DeleteRoleResponse = {
165
+ }
166
+
167
+ export type RoleName = {
168
+ name?: string
169
+ authScope?: AuthScope
170
+ }
171
+
172
+ export type ListPlatformRoleNamesRequest = {
173
+ page?: number
174
+ pageSize?: number
175
+ search?: string
176
+ }
177
+
178
+ export type ListPlatformRoleNamesResponse = {
179
+ items?: RoleName[]
180
+ pagination?: Pagination
181
+ }
182
+
183
+ export type ListFolderRoleNamesRequest = {
184
+ page?: number
185
+ pageSize?: number
186
+ search?: string
187
+ }
188
+
189
+ export type ListFolderRoleNamesResponse = {
190
+ items?: RoleName[]
191
+ pagination?: Pagination
192
+ }
193
+
194
+ export type ListWorkspaceRoleNamesRequest = {
195
+ page?: number
196
+ pageSize?: number
197
+ search?: string
198
+ }
199
+
200
+ export type ListWorkspaceRoleNamesResponse = {
201
+ items?: RoleName[]
202
+ pagination?: Pagination
203
+ }
204
+
205
+ export type ListMembersByPlatformRoleRequest = {
206
+ page?: number
207
+ pageSize?: number
208
+ name?: string
209
+ search?: string
210
+ }
211
+
212
+ export type ListMembersByPlatformRoleResponse = {
213
+ items?: Member[]
214
+ pagination?: Pagination
215
+ }
216
+
217
+ export type Member = {
218
+ id?: string
219
+ name?: string
220
+ type?: string
221
+ }
222
+
223
+ export type ListMembersFoldersByFolderRoleRequest = {
224
+ page?: number
225
+ pageSize?: number
226
+ name?: string
227
+ search?: string
228
+ }
229
+
230
+ export type ListMembersFoldersByFolderRoleResponse = {
231
+ items?: MemberFolder[]
232
+ pagination?: Pagination
233
+ }
234
+
235
+ export type MemberFolder = {
236
+ memberName?: string
237
+ memberType?: string
238
+ folderId?: number
239
+ folderAlias?: string
240
+ }
241
+
242
+ export type ListMembersWorkspacesByWorkspaceRoleRequest = {
243
+ page?: number
244
+ pageSize?: number
245
+ name?: string
246
+ search?: string
247
+ }
248
+
249
+ export type ListMembersWorkspacesByWorkspaceRoleResponse = {
250
+ items?: MemberWorkspace[]
251
+ pagination?: Pagination
252
+ }
253
+
254
+ export type MemberWorkspace = {
255
+ memberName?: string
256
+ memberType?: string
257
+ workspaceId?: number
258
+ workspaceAlias?: string
259
+ }
260
+
20
261
  export type GlobalRoleInfo = {
21
262
  name?: string
22
263
  type?: globalRoleType
@@ -101,6 +342,42 @@ export type ListFolderRolesResponse = {
101
342
  }
102
343
 
103
344
  export class Role {
345
+ static ListAllPermissions(req: ListAllPermissionsRequest, initReq?: fm.InitReq): Promise<ListAllPermissionsResponse> {
346
+ return fm.fetchReq<ListAllPermissionsRequest, ListAllPermissionsResponse>(`/apis/ghippo.io/v1alpha1/permissions?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
347
+ }
348
+ static ListRoles(req: ListRolesRequest, initReq?: fm.InitReq): Promise<ListRolesResponse> {
349
+ return fm.fetchReq<ListRolesRequest, ListRolesResponse>(`/apis/ghippo.io/v1alpha1/roles?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
350
+ }
351
+ static GetRole(req: GetRoleRequest, initReq?: fm.InitReq): Promise<GetRoleResponse> {
352
+ return fm.fetchReq<GetRoleRequest, GetRoleResponse>(`/apis/ghippo.io/v1alpha1/roles/${req["name"]}?${fm.renderURLSearchParams(req, ["name"])}`, {...initReq, method: "GET"})
353
+ }
354
+ static CreateRole(req: CreateRoleRequest, initReq?: fm.InitReq): Promise<CreateRoleResponse> {
355
+ return fm.fetchReq<CreateRoleRequest, CreateRoleResponse>(`/apis/ghippo.io/v1alpha1/roles`, {...initReq, method: "POST", body: JSON.stringify(req)})
356
+ }
357
+ static UpdateRole(req: UpdateRoleRequest, initReq?: fm.InitReq): Promise<UpdateRoleResponse> {
358
+ return fm.fetchReq<UpdateRoleRequest, UpdateRoleResponse>(`/apis/ghippo.io/v1alpha1/roles/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
359
+ }
360
+ static DeleteRole(req: DeleteRoleRequest, initReq?: fm.InitReq): Promise<DeleteRoleResponse> {
361
+ return fm.fetchReq<DeleteRoleRequest, DeleteRoleResponse>(`/apis/ghippo.io/v1alpha1/roles/${req["name"]}`, {...initReq, method: "DELETE"})
362
+ }
363
+ static ListPlatformRoleNames(req: ListPlatformRoleNamesRequest, initReq?: fm.InitReq): Promise<ListPlatformRoleNamesResponse> {
364
+ return fm.fetchReq<ListPlatformRoleNamesRequest, ListPlatformRoleNamesResponse>(`/apis/ghippo.io/v1alpha1/platformrolenames?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
365
+ }
366
+ static ListFolderRoleNames(req: ListFolderRoleNamesRequest, initReq?: fm.InitReq): Promise<ListFolderRoleNamesResponse> {
367
+ return fm.fetchReq<ListFolderRoleNamesRequest, ListFolderRoleNamesResponse>(`/apis/ghippo.io/v1alpha1/folderrolenames?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
368
+ }
369
+ static ListWorkspaceRoleNames(req: ListWorkspaceRoleNamesRequest, initReq?: fm.InitReq): Promise<ListWorkspaceRoleNamesResponse> {
370
+ return fm.fetchReq<ListWorkspaceRoleNamesRequest, ListWorkspaceRoleNamesResponse>(`/apis/ghippo.io/v1alpha1/workspacerolenames?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
371
+ }
372
+ static ListMembersByPlatformRole(req: ListMembersByPlatformRoleRequest, initReq?: fm.InitReq): Promise<ListMembersByPlatformRoleResponse> {
373
+ return fm.fetchReq<ListMembersByPlatformRoleRequest, ListMembersByPlatformRoleResponse>(`/apis/ghippo.io/v1alpha1/platformroles/${req["name"]}/members?${fm.renderURLSearchParams(req, ["name"])}`, {...initReq, method: "GET"})
374
+ }
375
+ static ListMembersWorkspacesByWorkspaceRole(req: ListMembersWorkspacesByWorkspaceRoleRequest, initReq?: fm.InitReq): Promise<ListMembersWorkspacesByWorkspaceRoleResponse> {
376
+ return fm.fetchReq<ListMembersWorkspacesByWorkspaceRoleRequest, ListMembersWorkspacesByWorkspaceRoleResponse>(`/apis/ghippo.io/v1alpha1/workspaceroles/${req["name"]}/members-workspaces?${fm.renderURLSearchParams(req, ["name"])}`, {...initReq, method: "GET"})
377
+ }
378
+ static ListMembersFoldersByFolderRole(req: ListMembersFoldersByFolderRoleRequest, initReq?: fm.InitReq): Promise<ListMembersFoldersByFolderRoleResponse> {
379
+ return fm.fetchReq<ListMembersFoldersByFolderRoleRequest, ListMembersFoldersByFolderRoleResponse>(`/apis/ghippo.io/v1alpha1/folderroles/${req["name"]}/members-folders?${fm.renderURLSearchParams(req, ["name"])}`, {...initReq, method: "GET"})
380
+ }
104
381
  static ListGlobalRoles(req: ListGlobalRolesRequest, initReq?: fm.InitReq): Promise<ListGlobalRolesResponse> {
105
382
  return fm.fetchReq<ListGlobalRolesRequest, ListGlobalRolesResponse>(`/apis/ghippo.io/v1alpha1/globalroles?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
106
383
  }
@@ -0,0 +1,88 @@
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
+ import * as GoogleApiHttpbody from "../google/api/httpbody.pb"
9
+ export type GetThemeCSSRequest = {
10
+ }
11
+
12
+ export type GetThemeConfigRequest = {
13
+ }
14
+
15
+ export type GetThemeConfigResponse = {
16
+ id?: string
17
+ name?: string
18
+ css?: string
19
+ createdAt?: string
20
+ updatedAt?: string
21
+ }
22
+
23
+ export type SetThemeConfigRequest = {
24
+ css?: string
25
+ }
26
+
27
+ export type SetThemeConfigResponse = {
28
+ }
29
+
30
+ export type ResetThemeConfigRequest = {
31
+ }
32
+
33
+ export type ResetThemeConfigResponse = {
34
+ }
35
+
36
+ export type GetLoginThemeCSSRequest = {
37
+ }
38
+
39
+ export type GetLoginThemeConfigRequest = {
40
+ }
41
+
42
+ export type GetLoginThemeConfigResponse = {
43
+ id?: string
44
+ name?: string
45
+ css?: string
46
+ createdAt?: string
47
+ updatedAt?: string
48
+ }
49
+
50
+ export type SetLoginThemeConfigRequest = {
51
+ css?: string
52
+ }
53
+
54
+ export type SetLoginThemeConfigResponse = {
55
+ }
56
+
57
+ export type ResetLoginThemeConfigRequest = {
58
+ }
59
+
60
+ export type ResetLoginThemeConfigResponse = {
61
+ }
62
+
63
+ export class Theme {
64
+ static GetThemeCSS(req: GetThemeCSSRequest, initReq?: fm.InitReq): Promise<GoogleApiHttpbody.HttpBody> {
65
+ return fm.fetchReq<GetThemeCSSRequest, GoogleApiHttpbody.HttpBody>(`/apis/ghippo.io/v1alpha1/themes/theme.css?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
66
+ }
67
+ static GetThemeConfig(req: GetThemeConfigRequest, initReq?: fm.InitReq): Promise<GetThemeConfigResponse> {
68
+ return fm.fetchReq<GetThemeConfigRequest, GetThemeConfigResponse>(`/apis/ghippo.io/v1alpha1/themes/theme?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
69
+ }
70
+ static SetThemeConfig(req: SetThemeConfigRequest, initReq?: fm.InitReq): Promise<SetThemeConfigResponse> {
71
+ return fm.fetchReq<SetThemeConfigRequest, SetThemeConfigResponse>(`/apis/ghippo.io/v1alpha1/themes/theme`, {...initReq, method: "POST", body: JSON.stringify(req)})
72
+ }
73
+ static ResetThemeConfig(req: ResetThemeConfigRequest, initReq?: fm.InitReq): Promise<ResetThemeConfigResponse> {
74
+ return fm.fetchReq<ResetThemeConfigRequest, ResetThemeConfigResponse>(`/apis/ghippo.io/v1alpha1/themes/theme/reset`, {...initReq, method: "POST"})
75
+ }
76
+ static GetLoginThemeCSS(req: GetLoginThemeCSSRequest, initReq?: fm.InitReq): Promise<GoogleApiHttpbody.HttpBody> {
77
+ return fm.fetchReq<GetLoginThemeCSSRequest, GoogleApiHttpbody.HttpBody>(`/apis/ghippo.io/v1alpha1/themes/login_page.css?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
78
+ }
79
+ static GetLoginThemeConfig(req: GetLoginThemeConfigRequest, initReq?: fm.InitReq): Promise<GetLoginThemeConfigResponse> {
80
+ return fm.fetchReq<GetLoginThemeConfigRequest, GetLoginThemeConfigResponse>(`/apis/ghippo.io/v1alpha1/themes/login_page?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
81
+ }
82
+ static SetLoginThemeConfig(req: SetLoginThemeConfigRequest, initReq?: fm.InitReq): Promise<SetLoginThemeConfigResponse> {
83
+ return fm.fetchReq<SetLoginThemeConfigRequest, SetLoginThemeConfigResponse>(`/apis/ghippo.io/v1alpha1/themes/login_page`, {...initReq, method: "POST", body: JSON.stringify(req)})
84
+ }
85
+ static ResetLoginThemeConfig(req: ResetLoginThemeConfigRequest, initReq?: fm.InitReq): Promise<ResetLoginThemeConfigResponse> {
86
+ return fm.fetchReq<ResetLoginThemeConfigRequest, ResetLoginThemeConfigResponse>(`/apis/ghippo.io/v1alpha1/themes/login_page/reset`, {...initReq, method: "POST"})
87
+ }
88
+ }
@@ -156,47 +156,39 @@ export type UpdateUserRolesRequest = {
156
156
  export type UpdateUserRolesResponse = {
157
157
  }
158
158
 
159
- export type ListUserSecretsRequest = {
159
+ export type ListUserAccessTokensRequest = {
160
160
  id?: string
161
161
  }
162
162
 
163
- export type ListUserSecretsResponse = {
164
- items?: Secret[]
163
+ export type ListUserAccessTokensResponse = {
164
+ items?: AccessToken[]
165
165
  }
166
166
 
167
- export type Secret = {
167
+ export type AccessToken = {
168
168
  id?: string
169
- secret?: string
170
- enabled?: boolean
171
- createdAt?: string
169
+ name?: string
172
170
  updatedAt?: string
173
- lastUsedAt?: string
174
- }
175
-
176
- export type CreateUserSecretRequest = {
177
- id?: string
178
- enabled?: boolean
171
+ createdAt?: string
172
+ expiredAt?: string
179
173
  }
180
174
 
181
- export type CreateUserSecretResponse = {
175
+ export type CreateUserAccessTokenRequest = {
182
176
  id?: string
177
+ name?: string
178
+ expiredAt?: string
183
179
  }
184
180
 
185
- export type UpdateUserSecretRequest = {
181
+ export type CreateUserAccessTokenResponse = {
186
182
  id?: string
187
- sid?: string
188
- enabled?: boolean
183
+ token?: string
189
184
  }
190
185
 
191
- export type UpdateUserSecretResponse = {
192
- }
193
-
194
- export type DeleteUserSecretRequest = {
186
+ export type DeleteUserAccessTokenRequest = {
195
187
  id?: string
196
- sid?: string
188
+ aid?: string
197
189
  }
198
190
 
199
- export type DeleteUserSecretResponse = {
191
+ export type DeleteUserAccessTokenResponse = {
200
192
  }
201
193
 
202
194
  export class Users {
@@ -233,16 +225,13 @@ export class Users {
233
225
  static UpdateUserRoles(req: UpdateUserRolesRequest, initReq?: fm.InitReq): Promise<UpdateUserRolesResponse> {
234
226
  return fm.fetchReq<UpdateUserRolesRequest, UpdateUserRolesResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/roles`, {...initReq, method: "PUT", body: JSON.stringify(req)})
235
227
  }
236
- static ListUserSecrets(req: ListUserSecretsRequest, initReq?: fm.InitReq): Promise<ListUserSecretsResponse> {
237
- return fm.fetchReq<ListUserSecretsRequest, ListUserSecretsResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/secrets?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
238
- }
239
- static CreateUserSecret(req: CreateUserSecretRequest, initReq?: fm.InitReq): Promise<CreateUserSecretResponse> {
240
- return fm.fetchReq<CreateUserSecretRequest, CreateUserSecretResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/secrets`, {...initReq, method: "POST", body: JSON.stringify(req)})
228
+ static ListUserAccessTokens(req: ListUserAccessTokensRequest, initReq?: fm.InitReq): Promise<ListUserAccessTokensResponse> {
229
+ return fm.fetchReq<ListUserAccessTokensRequest, ListUserAccessTokensResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/accesstokens?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
241
230
  }
242
- static UpdateUserSecret(req: UpdateUserSecretRequest, initReq?: fm.InitReq): Promise<UpdateUserSecretResponse> {
243
- return fm.fetchReq<UpdateUserSecretRequest, UpdateUserSecretResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/secrets/${req["sid"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
231
+ static CreateUserAccessToken(req: CreateUserAccessTokenRequest, initReq?: fm.InitReq): Promise<CreateUserAccessTokenResponse> {
232
+ return fm.fetchReq<CreateUserAccessTokenRequest, CreateUserAccessTokenResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/accesstoken`, {...initReq, method: "POST", body: JSON.stringify(req)})
244
233
  }
245
- static DeleteUserSecret(req: DeleteUserSecretRequest, initReq?: fm.InitReq): Promise<DeleteUserSecretResponse> {
246
- return fm.fetchReq<DeleteUserSecretRequest, DeleteUserSecretResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/secrets/${req["sid"]}`, {...initReq, method: "DELETE"})
234
+ static DeleteUserAccessToken(req: DeleteUserAccessTokenRequest, initReq?: fm.InitReq): Promise<DeleteUserAccessTokenResponse> {
235
+ return fm.fetchReq<DeleteUserAccessTokenRequest, DeleteUserAccessTokenResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/accesstokens/${req["aid"]}`, {...initReq, method: "DELETE"})
247
236
  }
248
237
  }