@daocloud-proto/ghippo 0.13.1 → 0.13.2-openapi
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 +1 -1
- package/v1alpha1/currentuser.pb.ts +20 -30
- package/v1alpha1/openapi.pb.ts +9 -2
- package/v1alpha1/user.pb.ts +21 -32
package/package.json
CHANGED
|
@@ -74,43 +74,36 @@ export type GetUserResponse = {
|
|
|
74
74
|
locale?: string
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
export type
|
|
77
|
+
export type ListAccessTokensRequest = {
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
export type
|
|
81
|
-
items?:
|
|
80
|
+
export type ListAccessTokensResponse = {
|
|
81
|
+
items?: AccessToken[]
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
export type
|
|
84
|
+
export type AccessToken = {
|
|
85
85
|
id?: string
|
|
86
|
-
|
|
87
|
-
enabled?: boolean
|
|
88
|
-
createdAt?: string
|
|
86
|
+
name?: string
|
|
89
87
|
updatedAt?: string
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
export type CreateSecretRequest = {
|
|
94
|
-
enabled?: boolean
|
|
88
|
+
createdAt?: string
|
|
89
|
+
expiredAt?: string
|
|
95
90
|
}
|
|
96
91
|
|
|
97
|
-
export type
|
|
98
|
-
|
|
92
|
+
export type CreateAccessTokenRequest = {
|
|
93
|
+
name?: string
|
|
94
|
+
expiredAt?: string
|
|
99
95
|
}
|
|
100
96
|
|
|
101
|
-
export type
|
|
97
|
+
export type CreateAccessTokenResponse = {
|
|
102
98
|
id?: string
|
|
103
|
-
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export type UpdateSecretResponse = {
|
|
99
|
+
token?: string
|
|
107
100
|
}
|
|
108
101
|
|
|
109
|
-
export type
|
|
102
|
+
export type DeleteAccessTokenRequest = {
|
|
110
103
|
id?: string
|
|
111
104
|
}
|
|
112
105
|
|
|
113
|
-
export type
|
|
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
|
|
137
|
-
return fm.fetchReq<
|
|
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
|
|
143
|
-
return fm.fetchReq<
|
|
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:
|
|
146
|
-
return fm.fetchReq<
|
|
135
|
+
static DeleteSecret(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"})
|
package/v1alpha1/openapi.pb.ts
CHANGED
|
@@ -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
|
|
39
|
-
return fm.fetchReq<
|
|
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
|
}
|
package/v1alpha1/user.pb.ts
CHANGED
|
@@ -156,47 +156,39 @@ export type UpdateUserRolesRequest = {
|
|
|
156
156
|
export type UpdateUserRolesResponse = {
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
-
export type
|
|
159
|
+
export type ListUserAccessTokensRequest = {
|
|
160
160
|
id?: string
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
export type
|
|
164
|
-
items?:
|
|
163
|
+
export type ListUserAccessTokensResponse = {
|
|
164
|
+
items?: AccessToken[]
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
-
export type
|
|
167
|
+
export type AccessToken = {
|
|
168
168
|
id?: string
|
|
169
|
-
|
|
170
|
-
enabled?: boolean
|
|
171
|
-
createdAt?: string
|
|
169
|
+
name?: string
|
|
172
170
|
updatedAt?: string
|
|
173
|
-
|
|
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
|
|
175
|
+
export type CreateUserAccessTokenRequest = {
|
|
182
176
|
id?: string
|
|
177
|
+
name?: string
|
|
178
|
+
expiredAt?: string
|
|
183
179
|
}
|
|
184
180
|
|
|
185
|
-
export type
|
|
181
|
+
export type CreateUserAccessTokenResponse = {
|
|
186
182
|
id?: string
|
|
187
|
-
|
|
188
|
-
enabled?: boolean
|
|
183
|
+
token?: string
|
|
189
184
|
}
|
|
190
185
|
|
|
191
|
-
export type
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
export type DeleteUserSecretRequest = {
|
|
186
|
+
export type DeleteUserAccessTokenRequest = {
|
|
195
187
|
id?: string
|
|
196
|
-
|
|
188
|
+
aid?: string
|
|
197
189
|
}
|
|
198
190
|
|
|
199
|
-
export type
|
|
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
|
|
237
|
-
return fm.fetchReq<
|
|
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
|
|
243
|
-
return fm.fetchReq<
|
|
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
|
|
246
|
-
return fm.fetchReq<
|
|
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
|
}
|