@daocloud-proto/ghippo 0.9.0 → 0.9.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.9.0",
3
+ "version":"0.9.3",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -71,6 +71,7 @@ export type CreateAuditResponse = {
71
71
  export type ExportAuditUrlRequest = {
72
72
  start?: string
73
73
  end?: string
74
+ sort?: string
74
75
  }
75
76
 
76
77
  export type ExportAuditUrlResponse = {
@@ -18,13 +18,11 @@ export enum ClientAuthMethod {
18
18
  }
19
19
 
20
20
  export type CreateIDPRequest = {
21
- alias?: string
22
21
  displayName?: string
23
22
  clientId?: string
24
23
  clientSecret?: string
25
24
  clientAuthMethod?: ClientAuthMethod
26
25
  providerId?: ProviderType
27
- enabled?: boolean
28
26
  authorizationUrl?: string
29
27
  userInfoUrl?: string
30
28
  tokenUrl?: string
@@ -36,17 +34,14 @@ export type CreateIDPResponse = {
36
34
  }
37
35
 
38
36
  export type GetIDPRequest = {
39
- alias?: string
40
37
  }
41
38
 
42
39
  export type GetIDPResponse = {
43
- alias?: string
44
40
  displayName?: string
45
41
  clientId?: string
46
42
  clientSecret?: string
47
43
  clientAuthMethod?: ClientAuthMethod
48
44
  providerId?: ProviderType
49
- enabled?: boolean
50
45
  authorizationUrl?: string
51
46
  userInfoUrl?: string
52
47
  tokenUrl?: string
@@ -54,21 +49,25 @@ export type GetIDPResponse = {
54
49
  enableAutoLinkFlow?: boolean
55
50
  }
56
51
 
52
+ export type GetRedirectUrlRequest = {
53
+ }
54
+
55
+ export type GetRedirectUrlResponse = {
56
+ url?: string
57
+ }
58
+
57
59
  export type DeleteIDPRequest = {
58
- alias?: string
59
60
  }
60
61
 
61
62
  export type DeleteIDPResponse = {
62
63
  }
63
64
 
64
65
  export type UpdateIDPRequest = {
65
- alias?: string
66
66
  displayName?: string
67
67
  clientId?: string
68
68
  clientSecret?: string
69
69
  clientAuthMethod?: ClientAuthMethod
70
70
  providerId?: ProviderType
71
- enabled?: boolean
72
71
  authorizationUrl?: string
73
72
  userInfoUrl?: string
74
73
  tokenUrl?: string
@@ -84,10 +83,13 @@ export class IDP {
84
83
  return fm.fetchReq<CreateIDPRequest, CreateIDPResponse>(`/apis/ghippo.io/v1alpha1/idp`, {...initReq, method: "POST", body: JSON.stringify(req)})
85
84
  }
86
85
  static GetIDP(req: GetIDPRequest, initReq?: fm.InitReq): Promise<GetIDPResponse> {
87
- return fm.fetchReq<GetIDPRequest, GetIDPResponse>(`/apis/ghippo.io/v1alpha1/idp/${req["alias"]}?${fm.renderURLSearchParams(req, ["alias"])}`, {...initReq, method: "GET"})
86
+ return fm.fetchReq<GetIDPRequest, GetIDPResponse>(`/apis/ghippo.io/v1alpha1/idp?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
87
+ }
88
+ static GetRedirectUrl(req: GetRedirectUrlRequest, initReq?: fm.InitReq): Promise<GetRedirectUrlResponse> {
89
+ return fm.fetchReq<GetRedirectUrlRequest, GetRedirectUrlResponse>(`/apis/ghippo.io/v1alpha1/idp/redirect-url?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
88
90
  }
89
91
  static DeleteIDP(req: DeleteIDPRequest, initReq?: fm.InitReq): Promise<DeleteIDPResponse> {
90
- return fm.fetchReq<DeleteIDPRequest, DeleteIDPResponse>(`/apis/ghippo.io/v1alpha1/idp/${req["alias"]}`, {...initReq, method: "DELETE"})
92
+ return fm.fetchReq<DeleteIDPRequest, DeleteIDPResponse>(`/apis/ghippo.io/v1alpha1/idp`, {...initReq, method: "DELETE"})
91
93
  }
92
94
  static UpdateIDP(req: UpdateIDPRequest, initReq?: fm.InitReq): Promise<UpdateIDPResponse> {
93
95
  return fm.fetchReq<UpdateIDPRequest, UpdateIDPResponse>(`/apis/ghippo.io/v1alpha1/idp`, {...initReq, method: "PUT", body: JSON.stringify(req)})
@@ -35,6 +35,12 @@ export type UpdateLoginPageInfoRequest = {
35
35
  export type UpdateLoginPageInfoResponse = {
36
36
  }
37
37
 
38
+ export type ResetLoginPageInfoRequest = {
39
+ }
40
+
41
+ export type ResetLoginPageInfoResponse = {
42
+ }
43
+
38
44
  export class LoginPage {
39
45
  static GetInfo(req: GetLoginPageInfoRequest, initReq?: fm.InitReq): Promise<GetLoginPageInfoResponse> {
40
46
  return fm.fetchReq<GetLoginPageInfoRequest, GetLoginPageInfoResponse>(`/apis/ghippo.io/v1alpha1/login-page/info?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -45,4 +51,7 @@ export class LoginPage {
45
51
  static UpdateInfo(req: UpdateLoginPageInfoRequest, initReq?: fm.InitReq): Promise<UpdateLoginPageInfoResponse> {
46
52
  return fm.fetchReq<UpdateLoginPageInfoRequest, UpdateLoginPageInfoResponse>(`/apis/ghippo.io/v1alpha1/login-page/info`, {...initReq, method: "PUT", body: JSON.stringify(req)})
47
53
  }
54
+ static ResetInfo(req: ResetLoginPageInfoRequest, initReq?: fm.InitReq): Promise<ResetLoginPageInfoResponse> {
55
+ return fm.fetchReq<ResetLoginPageInfoRequest, ResetLoginPageInfoResponse>(`/apis/ghippo.io/v1alpha1/login-page/reset`, {...initReq, method: "POST"})
56
+ }
48
57
  }
@@ -221,6 +221,17 @@ export type DeauthorizeRequest = {
221
221
  export type DeauthorizeResponse = {
222
222
  }
223
223
 
224
+ export type ReauthorizeRequest = {
225
+ folderId?: number
226
+ oldRoleName?: string
227
+ newRoleName?: string
228
+ memberName?: string
229
+ memberType?: string
230
+ }
231
+
232
+ export type ReauthorizeResponse = {
233
+ }
234
+
224
235
  export type MemberRoleFolderInfo = {
225
236
  memberName?: string
226
237
  memberType?: string
@@ -357,6 +368,49 @@ export type BindSharedResourceAndSetQuotaHardToWorkspaceRequest = {
357
368
  export type BindSharedResourceAndSetQuotaHardToWorkspaceResponse = {
358
369
  }
359
370
 
371
+ export type FolderListUsersRequest = {
372
+ search?: string
373
+ pageSize?: number
374
+ page?: number
375
+ folderId?: number
376
+ }
377
+
378
+ export type FolderListUsersResponse = {
379
+ items?: User[]
380
+ pagination?: Pagination
381
+ }
382
+
383
+ export type User = {
384
+ id?: string
385
+ name?: string
386
+ email?: string
387
+ description?: string
388
+ firstname?: string
389
+ lastname?: string
390
+ source?: string
391
+ enabled?: boolean
392
+ }
393
+
394
+ export type FolderListGroupsRequest = {
395
+ search?: string
396
+ page?: number
397
+ pageSize?: number
398
+ folderId?: number
399
+ }
400
+
401
+ export type FolderListGroupsResponse = {
402
+ items?: Group[]
403
+ pagination?: Pagination
404
+ }
405
+
406
+ export type Group = {
407
+ id?: string
408
+ name?: string
409
+ userCount?: number
410
+ description?: string
411
+ createdAt?: string
412
+ }
413
+
360
414
  export class Workspace {
361
415
  static ListWorkspaces(req: ListWorkspacesRequest, initReq?: fm.InitReq): Promise<ListWorkspacesResponse> {
362
416
  return fm.fetchReq<ListWorkspacesRequest, ListWorkspacesResponse>(`/apis/ghippo.io/v1alpha1/workspaces?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -412,6 +466,9 @@ export class Workspace {
412
466
  static Deauthorize(req: DeauthorizeRequest, initReq?: fm.InitReq): Promise<DeauthorizeResponse> {
413
467
  return fm.fetchReq<DeauthorizeRequest, DeauthorizeResponse>(`/apis/ghippo.io/v1alpha1/folders/${req["folderId"]}/deauthorize`, {...initReq, method: "PUT", body: JSON.stringify(req)})
414
468
  }
469
+ static Reauthorize(req: ReauthorizeRequest, initReq?: fm.InitReq): Promise<ReauthorizeResponse> {
470
+ return fm.fetchReq<ReauthorizeRequest, ReauthorizeResponse>(`/apis/ghippo.io/v1alpha1/folders/${req["folderId"]}/reauthorize`, {...initReq, method: "PUT", body: JSON.stringify(req)})
471
+ }
415
472
  static ListMembersRolesByFolder(req: ListMembersRolesByFolderRequest, initReq?: fm.InitReq): Promise<ListMembersRolesByFolderResponse> {
416
473
  return fm.fetchReq<ListMembersRolesByFolderRequest, ListMembersRolesByFolderResponse>(`/apis/ghippo.io/v1alpha1/folders/${req["folderId"]}/members-roles?${fm.renderURLSearchParams(req, ["folderId"])}`, {...initReq, method: "GET"})
417
474
  }
@@ -442,4 +499,10 @@ export class Workspace {
442
499
  static UpdateQuotaCheck(req: UpdateQuotaCheckRequest, initReq?: fm.InitReq): Promise<UpdateQuotaCheckResponse> {
443
500
  return fm.fetchReq<UpdateQuotaCheckRequest, UpdateQuotaCheckResponse>(`/apis/ghippo.io/v1alpha1/update-quota-check`, {...initReq, method: "POST", body: JSON.stringify(req)})
444
501
  }
502
+ static FolderListUsers(req: FolderListUsersRequest, initReq?: fm.InitReq): Promise<FolderListUsersResponse> {
503
+ return fm.fetchReq<FolderListUsersRequest, FolderListUsersResponse>(`/apis/ghippo.io/v1alpha1/folders/${req["folderId"]}/users?${fm.renderURLSearchParams(req, ["folderId"])}`, {...initReq, method: "GET"})
504
+ }
505
+ static FolderListGroups(req: FolderListGroupsRequest, initReq?: fm.InitReq): Promise<FolderListGroupsResponse> {
506
+ return fm.fetchReq<FolderListGroupsRequest, FolderListGroupsResponse>(`/apis/ghippo.io/v1alpha1/folders/${req["folderId"]}/groups?${fm.renderURLSearchParams(req, ["folderId"])}`, {...initReq, method: "GET"})
507
+ }
445
508
  }