@daocloud-proto/ghippo 0.39.0-dev1 → 0.39.0-dev2
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/account.pb.ts +60 -3
- package/v1alpha1/currentuser.pb.ts +1 -0
package/package.json
CHANGED
package/v1alpha1/account.pb.ts
CHANGED
|
@@ -39,12 +39,15 @@ export type GetSubAccountResponse = {
|
|
|
39
39
|
updatedAt?: string
|
|
40
40
|
lastLoginAt?: string
|
|
41
41
|
canAuthorize?: boolean
|
|
42
|
+
phoneNumber?: string
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
export type CreateSubAccountRequest = {
|
|
45
46
|
name?: string
|
|
47
|
+
firstName?: string
|
|
46
48
|
password?: string
|
|
47
49
|
description?: string
|
|
50
|
+
email?: string
|
|
48
51
|
temporary?: boolean
|
|
49
52
|
}
|
|
50
53
|
|
|
@@ -122,7 +125,7 @@ export type ResetSubAccountMFAResponse = {
|
|
|
122
125
|
}
|
|
123
126
|
|
|
124
127
|
export type VerifySubAccountSSHPublicKeyRequest = {
|
|
125
|
-
|
|
128
|
+
id?: string
|
|
126
129
|
publicKey?: Uint8Array
|
|
127
130
|
}
|
|
128
131
|
|
|
@@ -135,6 +138,51 @@ export type TransferToMainAccountRequest = {
|
|
|
135
138
|
export type TransferToMainAccountResponse = {
|
|
136
139
|
}
|
|
137
140
|
|
|
141
|
+
export type CreateSubAccountSSHKeyRequest = {
|
|
142
|
+
id?: string
|
|
143
|
+
sshKeyName?: string
|
|
144
|
+
publicKey?: string
|
|
145
|
+
expiredAt?: string
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export type CreateSubAccountSSHKeyResponse = {
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export type UpdateSubAccountSSHKeyRequest = {
|
|
152
|
+
id?: string
|
|
153
|
+
sshkeyId?: number
|
|
154
|
+
sshKeyName?: string
|
|
155
|
+
publicKey?: string
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export type UpdateSubAccountSSHKeyResponse = {
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export type DeleteSubAccountSSHKeyRequest = {
|
|
162
|
+
id?: string
|
|
163
|
+
sshkeyId?: number
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export type DeleteSubAccountSSHKeyResponse = {
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export type ListSubAccountSSHKeysRequest = {
|
|
170
|
+
id?: string
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export type ListSubAccountSSHKeysResponse = {
|
|
174
|
+
items?: SSHKey[]
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export type SSHKey = {
|
|
178
|
+
id?: number
|
|
179
|
+
sshKeyName?: string
|
|
180
|
+
publicKey?: string
|
|
181
|
+
updatedAt?: string
|
|
182
|
+
createdAt?: string
|
|
183
|
+
expiredAt?: string
|
|
184
|
+
}
|
|
185
|
+
|
|
138
186
|
export class Accounts {
|
|
139
187
|
static TransferToMainAccount(req: TransferToMainAccountRequest, initReq?: fm.InitReq): Promise<TransferToMainAccountResponse> {
|
|
140
188
|
return fm.fetchReq<TransferToMainAccountRequest, TransferToMainAccountResponse>(`/apis/ghippo.io/v1alpha1/accounts/transfer-main`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
@@ -169,7 +217,16 @@ export class Accounts {
|
|
|
169
217
|
static DeleteSubAccountAccessToken(req: DeleteSubAccountAccessTokenRequest, initReq?: fm.InitReq): Promise<DeleteSubAccountAccessTokenResponse> {
|
|
170
218
|
return fm.fetchReq<DeleteSubAccountAccessTokenRequest, DeleteSubAccountAccessTokenResponse>(`/apis/ghippo.io/v1alpha1/sub-accounts/${req["id"]}/accesstokens/${req["aid"]}`, {...initReq, method: "DELETE"})
|
|
171
219
|
}
|
|
172
|
-
static
|
|
173
|
-
return fm.fetchReq<
|
|
220
|
+
static CreateSubAccountSSHKey(req: CreateSubAccountSSHKeyRequest, initReq?: fm.InitReq): Promise<CreateSubAccountSSHKeyResponse> {
|
|
221
|
+
return fm.fetchReq<CreateSubAccountSSHKeyRequest, CreateSubAccountSSHKeyResponse>(`/apis/ghippo.io/v1alpha1/sub-accounts/${req["id"]}/sshkeys`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
222
|
+
}
|
|
223
|
+
static UpdateSubAccountSSHKey(req: UpdateSubAccountSSHKeyRequest, initReq?: fm.InitReq): Promise<UpdateSubAccountSSHKeyResponse> {
|
|
224
|
+
return fm.fetchReq<UpdateSubAccountSSHKeyRequest, UpdateSubAccountSSHKeyResponse>(`/apis/ghippo.io/v1alpha1/sub-accounts/${req["id"]}/sshkeys/${req["sshkeyId"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
225
|
+
}
|
|
226
|
+
static DeleteSubAccountSSHKey(req: DeleteSubAccountSSHKeyRequest, initReq?: fm.InitReq): Promise<DeleteSubAccountSSHKeyResponse> {
|
|
227
|
+
return fm.fetchReq<DeleteSubAccountSSHKeyRequest, DeleteSubAccountSSHKeyResponse>(`/apis/ghippo.io/v1alpha1/sub-accounts/${req["id"]}/sshkeys/${req["sshkeyId"]}`, {...initReq, method: "DELETE"})
|
|
228
|
+
}
|
|
229
|
+
static ListSubAccountSSHKeys(req: ListSubAccountSSHKeysRequest, initReq?: fm.InitReq): Promise<ListSubAccountSSHKeysResponse> {
|
|
230
|
+
return fm.fetchReq<ListSubAccountSSHKeysRequest, ListSubAccountSSHKeysResponse>(`/apis/ghippo.io/v1alpha1/sub-accounts/${req["id"]}/sshkeys?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
|
|
174
231
|
}
|
|
175
232
|
}
|