@daocloud-proto/ghippo 0.13.2-dev-1 → 0.13.2-dev-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.13.2-dev-1",
3
+ "version":"0.13.2-dev-3",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -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"})
@@ -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,17 +6,250 @@
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",
12
18
  }
13
19
 
20
+ export type ListAllPermissionsRequest = {
21
+ }
22
+
23
+ export type ListAllPermissionsResponse = {
24
+ gproductPerms?: GProductAllPermissions[]
25
+ }
26
+
27
+ export type GProductAllPermissions = {
28
+ gproduct?: string
29
+ authscopePerms?: AuthScopeAllPermissions[]
30
+ }
31
+
32
+ export type AuthScopeAllPermissions = {
33
+ authScope?: AuthScope
34
+ categoryPerms?: CatogoryAllPermissions[]
35
+ }
36
+
37
+ export type Catogory = {
38
+ name?: string
39
+ displayName?: string
40
+ }
41
+
42
+ export type CatogoryAllPermissions = {
43
+ catogory?: Catogory
44
+ resourcePerms?: ResourceAllPermissions[]
45
+ }
46
+
47
+ export type ResourceType = {
48
+ name?: string
49
+ displayName?: string
50
+ }
51
+
52
+ export type ResourceAllPermissions = {
53
+ resourceType?: ResourceType
54
+ actions?: ResourceActionWithDependancy[]
55
+ }
56
+
57
+ export type ResourceAction = {
58
+ name?: string
59
+ displayName?: string
60
+ }
61
+
62
+ export type ResourceActionWithDependancy = {
63
+ action?: ResourceAction
64
+ dependPerms?: Permission[]
65
+ }
66
+
67
+ export type Permission = {
68
+ action?: string
69
+ resourceType?: string
70
+ gproduct?: string
71
+ }
72
+
73
+ export type RoleInfo = {
74
+ name?: string
75
+ type?: globalRoleType
76
+ description?: string
77
+ scope?: AuthScope
78
+ createdAt?: string
79
+ updatedAt?: string
80
+ }
81
+
82
+ export type ListRolesRequest = {
83
+ search?: string
84
+ pageSize?: number
85
+ page?: number
86
+ }
87
+
88
+ export type ListRolesResponse = {
89
+ items?: RoleInfo[]
90
+ pagination?: Pagination
91
+ }
92
+
14
93
  export type Pagination = {
15
94
  total?: number
16
95
  page?: number
17
96
  pageSize?: number
18
97
  }
19
98
 
99
+ export type GetRoleRequest = {
100
+ name?: string
101
+ }
102
+
103
+ export type GetRoleResponse = {
104
+ name?: string
105
+ type?: globalRoleType
106
+ description?: string
107
+ scope?: AuthScope
108
+ createdAt?: string
109
+ updatedAt?: string
110
+ gproductPerms?: GProductPermissions[]
111
+ }
112
+
113
+ export type GProductPermissions = {
114
+ gproduct?: string
115
+ categoryPerms?: CategoryPermissions[]
116
+ }
117
+
118
+ export type CategoryPermissions = {
119
+ catogory?: Catogory
120
+ resourcePerms?: ResourcePermissions[]
121
+ }
122
+
123
+ export type ResourcePermissions = {
124
+ resourceType?: ResourceType
125
+ actions?: ResourceAction[]
126
+ }
127
+
128
+ export type CreateRoleRequest = {
129
+ name?: string
130
+ type?: globalRoleType
131
+ description?: string
132
+ scope?: AuthScope
133
+ perms?: Permission[]
134
+ }
135
+
136
+ export type CreateRoleResponse = {
137
+ }
138
+
139
+ export type UpdateRoleRequest = {
140
+ name?: string
141
+ type?: globalRoleType
142
+ description?: string
143
+ scope?: AuthScope
144
+ perms?: Permission[]
145
+ }
146
+
147
+ export type UpdateRoleResponse = {
148
+ }
149
+
150
+ export type DeleteRoleRequest = {
151
+ name?: string
152
+ }
153
+
154
+ export type DeleteRoleResponse = {
155
+ }
156
+
157
+ export type RoleName = {
158
+ name?: string
159
+ authScope?: AuthScope
160
+ }
161
+
162
+ export type ListPlatformRoleNamesRequest = {
163
+ page?: number
164
+ pageSize?: number
165
+ search?: string
166
+ }
167
+
168
+ export type ListPlatformRoleNamesResponse = {
169
+ items?: RoleName[]
170
+ pagination?: Pagination
171
+ }
172
+
173
+ export type ListFolderRoleNamesRequest = {
174
+ page?: number
175
+ pageSize?: number
176
+ search?: string
177
+ }
178
+
179
+ export type ListFolderRoleNamesResponse = {
180
+ items?: RoleName[]
181
+ pagination?: Pagination
182
+ }
183
+
184
+ export type ListWorkspaceRoleNamesRequest = {
185
+ page?: number
186
+ pageSize?: number
187
+ search?: string
188
+ }
189
+
190
+ export type ListWorkspaceRoleNamesResponse = {
191
+ items?: RoleName[]
192
+ pagination?: Pagination
193
+ }
194
+
195
+ export type ListMembersByPlatformRoleRequest = {
196
+ page?: number
197
+ pageSize?: number
198
+ name?: string
199
+ search?: string
200
+ }
201
+
202
+ export type ListMembersByPlatformRoleResponse = {
203
+ items?: Member[]
204
+ pagination?: Pagination
205
+ }
206
+
207
+ export type Member = {
208
+ id?: string
209
+ name?: string
210
+ type?: string
211
+ }
212
+
213
+ export type ListMembersFoldersByFolderRoleRequest = {
214
+ page?: number
215
+ pageSize?: number
216
+ name?: string
217
+ search?: string
218
+ }
219
+
220
+ export type ListMembersFoldersByFolderRoleResponse = {
221
+ items?: MemberFolder[]
222
+ pagination?: Pagination
223
+ }
224
+
225
+ export type MemberFolder = {
226
+ memberId?: string
227
+ memberName?: string
228
+ memberType?: string
229
+ folderId?: string
230
+ folderAlias?: string
231
+ }
232
+
233
+ export type ListMembersWorkspacesByWorkspaceRoleRequest = {
234
+ page?: number
235
+ pageSize?: number
236
+ name?: string
237
+ search?: string
238
+ }
239
+
240
+ export type ListMembersWorkspacesByWorkspaceRoleResponse = {
241
+ items?: MemberWorkspace[]
242
+ pagination?: Pagination
243
+ }
244
+
245
+ export type MemberWorkspace = {
246
+ memberId?: string
247
+ memberName?: string
248
+ memberType?: string
249
+ workspaceId?: string
250
+ workspaceAlias?: string
251
+ }
252
+
20
253
  export type GlobalRoleInfo = {
21
254
  name?: string
22
255
  type?: globalRoleType
@@ -101,6 +334,42 @@ export type ListFolderRolesResponse = {
101
334
  }
102
335
 
103
336
  export class Role {
337
+ static ListAllPermissions(req: ListAllPermissionsRequest, initReq?: fm.InitReq): Promise<ListAllPermissionsResponse> {
338
+ return fm.fetchReq<ListAllPermissionsRequest, ListAllPermissionsResponse>(`/apis/ghippo.io/v1alpha1/permissions?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
339
+ }
340
+ static ListRoles(req: ListRolesRequest, initReq?: fm.InitReq): Promise<ListRolesResponse> {
341
+ return fm.fetchReq<ListRolesRequest, ListRolesResponse>(`/apis/ghippo.io/v1alpha1/roles?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
342
+ }
343
+ static GetRole(req: GetRoleRequest, initReq?: fm.InitReq): Promise<GetRoleResponse> {
344
+ return fm.fetchReq<GetRoleRequest, GetRoleResponse>(`/apis/ghippo.io/v1alpha1/roles/${req["name"]}?${fm.renderURLSearchParams(req, ["name"])}`, {...initReq, method: "GET"})
345
+ }
346
+ static CreateRole(req: CreateRoleRequest, initReq?: fm.InitReq): Promise<CreateRoleResponse> {
347
+ return fm.fetchReq<CreateRoleRequest, CreateRoleResponse>(`/apis/ghippo.io/v1alpha1/roles`, {...initReq, method: "POST", body: JSON.stringify(req)})
348
+ }
349
+ static UpdateRole(req: UpdateRoleRequest, initReq?: fm.InitReq): Promise<UpdateRoleResponse> {
350
+ return fm.fetchReq<UpdateRoleRequest, UpdateRoleResponse>(`/apis/ghippo.io/v1alpha1/roles/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
351
+ }
352
+ static DeleteRole(req: DeleteRoleRequest, initReq?: fm.InitReq): Promise<DeleteRoleResponse> {
353
+ return fm.fetchReq<DeleteRoleRequest, DeleteRoleResponse>(`/apis/ghippo.io/v1alpha1/roles/${req["name"]}`, {...initReq, method: "DELETE"})
354
+ }
355
+ static ListPlatformRoleNames(req: ListPlatformRoleNamesRequest, initReq?: fm.InitReq): Promise<ListPlatformRoleNamesResponse> {
356
+ return fm.fetchReq<ListPlatformRoleNamesRequest, ListPlatformRoleNamesResponse>(`/apis/ghippo.io/v1alpha1/platformrolenames?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
357
+ }
358
+ static ListFolderRoleNames(req: ListFolderRoleNamesRequest, initReq?: fm.InitReq): Promise<ListFolderRoleNamesResponse> {
359
+ return fm.fetchReq<ListFolderRoleNamesRequest, ListFolderRoleNamesResponse>(`/apis/ghippo.io/v1alpha1/folderrolenames?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
360
+ }
361
+ static ListWorkspaceRoleNames(req: ListWorkspaceRoleNamesRequest, initReq?: fm.InitReq): Promise<ListWorkspaceRoleNamesResponse> {
362
+ return fm.fetchReq<ListWorkspaceRoleNamesRequest, ListWorkspaceRoleNamesResponse>(`/apis/ghippo.io/v1alpha1/workspacerolenames?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
363
+ }
364
+ static ListMembersByPlatformRole(req: ListMembersByPlatformRoleRequest, initReq?: fm.InitReq): Promise<ListMembersByPlatformRoleResponse> {
365
+ return fm.fetchReq<ListMembersByPlatformRoleRequest, ListMembersByPlatformRoleResponse>(`/apis/ghippo.io/v1alpha1/platformroles/${req["name"]}/members?${fm.renderURLSearchParams(req, ["name"])}`, {...initReq, method: "GET"})
366
+ }
367
+ static ListMembersWorkspacesByWorkspaceRole(req: ListMembersWorkspacesByWorkspaceRoleRequest, initReq?: fm.InitReq): Promise<ListMembersWorkspacesByWorkspaceRoleResponse> {
368
+ return fm.fetchReq<ListMembersWorkspacesByWorkspaceRoleRequest, ListMembersWorkspacesByWorkspaceRoleResponse>(`/apis/ghippo.io/v1alpha1/workspaceroles/${req["name"]}/members-workspaces?${fm.renderURLSearchParams(req, ["name"])}`, {...initReq, method: "GET"})
369
+ }
370
+ static ListMembersFoldersByFolderRole(req: ListMembersFoldersByFolderRoleRequest, initReq?: fm.InitReq): Promise<ListMembersFoldersByFolderRoleResponse> {
371
+ return fm.fetchReq<ListMembersFoldersByFolderRoleRequest, ListMembersFoldersByFolderRoleResponse>(`/apis/ghippo.io/v1alpha1/folderroles/${req["name"]}/members-folders?${fm.renderURLSearchParams(req, ["name"])}`, {...initReq, method: "GET"})
372
+ }
104
373
  static ListGlobalRoles(req: ListGlobalRolesRequest, initReq?: fm.InitReq): Promise<ListGlobalRolesResponse> {
105
374
  return fm.fetchReq<ListGlobalRolesRequest, ListGlobalRolesResponse>(`/apis/ghippo.io/v1alpha1/globalroles?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
106
375
  }
@@ -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
  }