@daocloud-proto/ghippo 0.7.12 → 0.7.15

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.7.12",
3
+ "version":"0.7.15",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -13,7 +13,7 @@ export type ListGProductLicensesResponse = {
13
13
  }
14
14
 
15
15
  export type GetGProductLicensesRequest = {
16
- name?: string
16
+ id?: string
17
17
  }
18
18
 
19
19
  export type GetGProductLicensesResponse = {
@@ -29,7 +29,6 @@ export type UpdateGProductLicensesResponse = {
29
29
  }
30
30
 
31
31
  export type GetGProductLicenseYamlRequest = {
32
- name?: string
33
32
  }
34
33
 
35
34
  export type GetGProductLicenseYamlResponse = {
@@ -37,7 +36,7 @@ export type GetGProductLicenseYamlResponse = {
37
36
  }
38
37
 
39
38
  export type DeleteProductLicensesRequest = {
40
- name?: string
39
+ id?: string
41
40
  }
42
41
 
43
42
  export type DeleteProductLicensesResponse = {
@@ -58,6 +57,7 @@ export type GetGProductLicensesOverQuotaResponse = {
58
57
  }
59
58
 
60
59
  export type GProductLicense = {
60
+ id?: string
61
61
  name?: string
62
62
  module?: string
63
63
  level?: string
@@ -66,6 +66,7 @@ export type GProductLicense = {
66
66
  }
67
67
 
68
68
  export type GProductLicenseInfo = {
69
+ id?: string
69
70
  name?: string
70
71
  module?: string
71
72
  licenseKey?: string
@@ -82,7 +83,7 @@ export class GProducts {
82
83
  return fm.fetchReq<ListGProductLicensesRequest, ListGProductLicensesResponse>(`/apis/ghippo.io/v1alpha1/gproduct-licenses?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
83
84
  }
84
85
  static GetGProductLicenses(req: GetGProductLicensesRequest, initReq?: fm.InitReq): Promise<GetGProductLicensesResponse> {
85
- return fm.fetchReq<GetGProductLicensesRequest, GetGProductLicensesResponse>(`/apis/ghippo.io/v1alpha1/gproduct-licenses/${req["name"]}?${fm.renderURLSearchParams(req, ["name"])}`, {...initReq, method: "GET"})
86
+ return fm.fetchReq<GetGProductLicensesRequest, GetGProductLicensesResponse>(`/apis/ghippo.io/v1alpha1/gproduct-licenses/${req["id"]}?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
86
87
  }
87
88
  static UpdateGProductLicenses(req: UpdateGProductLicensesRequest, initReq?: fm.InitReq): Promise<UpdateGProductLicensesResponse> {
88
89
  return fm.fetchReq<UpdateGProductLicensesRequest, UpdateGProductLicensesResponse>(`/apis/ghippo.io/v1alpha1/gproduct-licenses`, {...initReq, method: "PUT", body: JSON.stringify(req)})
@@ -91,7 +92,7 @@ export class GProducts {
91
92
  return fm.fetchReq<GetGProductLicenseYamlRequest, GetGProductLicenseYamlResponse>(`/apis/ghippo.io/v1alpha1/gproduct-licenses/yaml?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
92
93
  }
93
94
  static DeleteGProductLicenses(req: DeleteProductLicensesRequest, initReq?: fm.InitReq): Promise<DeleteProductLicensesResponse> {
94
- return fm.fetchReq<DeleteProductLicensesRequest, DeleteProductLicensesResponse>(`/apis/ghippo.io/v1alpha1/gproduct-licenses/${req["name"]}`, {...initReq, method: "DELETE"})
95
+ return fm.fetchReq<DeleteProductLicensesRequest, DeleteProductLicensesResponse>(`/apis/ghippo.io/v1alpha1/gproduct-licenses/${req["id"]}`, {...initReq, method: "DELETE"})
95
96
  }
96
97
  static GetGProductLicensesESN(req: GetGProductLicensesESNRequest, initReq?: fm.InitReq): Promise<GetGProductLicensesESNResponse> {
97
98
  return fm.fetchReq<GetGProductLicensesESNRequest, GetGProductLicensesESNResponse>(`/apis/ghippo.io/v1alpha1/gproduct-licenses/esn?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -11,7 +11,7 @@ export type GetLdapRequest = {
11
11
  export type GetLdapResponse = {
12
12
  id?: string
13
13
  name?: string
14
- providerType?: string
14
+ vendor?: string
15
15
  startTls?: string
16
16
  ldapProtocol?: string
17
17
  ldapHost?: string
@@ -24,7 +24,7 @@ export type GetLdapResponse = {
24
24
  }
25
25
 
26
26
  export type CreateLdapRequest = {
27
- providerType?: string
27
+ vendor?: string
28
28
  startTls?: string
29
29
  ldapProtocol?: string
30
30
  ldapHost?: string
@@ -56,7 +56,7 @@ export type TestLdapConnectionResponse = {
56
56
 
57
57
  export type UpdateLdapRequest = {
58
58
  id?: string
59
- providerType?: string
59
+ vendor?: string
60
60
  startTls?: string
61
61
  ldapProtocol?: string
62
62
  ldapHost?: string
@@ -75,7 +75,7 @@ export type SyncUsersRequest = {
75
75
  id?: string
76
76
  }
77
77
 
78
- export type SyncUserResponse = {
78
+ export type SyncUsersResponse = {
79
79
  ignored?: boolean
80
80
  added?: number
81
81
  updated?: number
@@ -91,6 +91,61 @@ export type DeleteLdapRequest = {
91
91
  export type DeleteLdapResponse = {
92
92
  }
93
93
 
94
+ export type GetLdapGroupRequest = {
95
+ id?: string
96
+ }
97
+
98
+ export type GetLdapGroupResponse = {
99
+ id?: string
100
+ groupDn?: string
101
+ groupObjectClasses?: string
102
+ groupNameLdapAttribute?: string
103
+ }
104
+
105
+ export type CreateLdapGroupRequest = {
106
+ id?: string
107
+ groupDn?: string
108
+ groupObjectClasses?: string
109
+ groupNameLdapAttribute?: string
110
+ }
111
+
112
+ export type CreateLdapGroupResponse = {
113
+ id?: string
114
+ }
115
+
116
+ export type UpdateLdapGroupRequest = {
117
+ ldapId?: string
118
+ id?: string
119
+ groupDn?: string
120
+ groupObjectClasses?: string
121
+ groupNameLdapAttribute?: string
122
+ }
123
+
124
+ export type UpdateLdapGroupResponse = {
125
+ }
126
+
127
+ export type DeleteLdapGroupRequest = {
128
+ ldapId?: string
129
+ id?: string
130
+ }
131
+
132
+ export type DeleteLdapGroupResponse = {
133
+ }
134
+
135
+ export type SyncLdapGroupsRequest = {
136
+ ldapId?: string
137
+ id?: string
138
+ }
139
+
140
+ export type SyncLdapGroupsResponse = {
141
+ ignored?: boolean
142
+ added?: number
143
+ updated?: number
144
+ removed?: number
145
+ failed?: number
146
+ status?: string
147
+ }
148
+
94
149
  export class Ldap {
95
150
  static GetLdap(req: GetLdapRequest, initReq?: fm.InitReq): Promise<GetLdapResponse> {
96
151
  return fm.fetchReq<GetLdapRequest, GetLdapResponse>(`/apis/ghippo.io/v1alpha1/ldap?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -104,10 +159,25 @@ export class Ldap {
104
159
  static UpdateLdap(req: UpdateLdapRequest, initReq?: fm.InitReq): Promise<UpdateLdapResponse> {
105
160
  return fm.fetchReq<UpdateLdapRequest, UpdateLdapResponse>(`/apis/ghippo.io/v1alpha1/ldap/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
106
161
  }
107
- static SyncUsers(req: SyncUsersRequest, initReq?: fm.InitReq): Promise<SyncUserResponse> {
108
- return fm.fetchReq<SyncUsersRequest, SyncUserResponse>(`/apis/ghippo.io/v1alpha1/ldap/${req["id"]}/sync?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
162
+ static SyncUsers(req: SyncUsersRequest, initReq?: fm.InitReq): Promise<SyncUsersResponse> {
163
+ return fm.fetchReq<SyncUsersRequest, SyncUsersResponse>(`/apis/ghippo.io/v1alpha1/ldap/${req["id"]}/sync?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
109
164
  }
110
165
  static DeleteLdap(req: DeleteLdapRequest, initReq?: fm.InitReq): Promise<DeleteLdapResponse> {
111
166
  return fm.fetchReq<DeleteLdapRequest, DeleteLdapResponse>(`/apis/ghippo.io/v1alpha1/ldap/${req["id"]}`, {...initReq, method: "DELETE"})
112
167
  }
168
+ static GetLdapGroup(req: GetLdapGroupRequest, initReq?: fm.InitReq): Promise<GetLdapGroupResponse> {
169
+ return fm.fetchReq<GetLdapGroupRequest, GetLdapGroupResponse>(`/apis/ghippo.io/v1alpha1/ldap/${req["id"]}/group?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
170
+ }
171
+ static CreateLdapGroup(req: CreateLdapGroupRequest, initReq?: fm.InitReq): Promise<CreateLdapGroupResponse> {
172
+ return fm.fetchReq<CreateLdapGroupRequest, CreateLdapGroupResponse>(`/apis/ghippo.io/v1alpha1/ldap/${req["id"]}/group`, {...initReq, method: "POST", body: JSON.stringify(req)})
173
+ }
174
+ static UpdateLdapGroup(req: UpdateLdapGroupRequest, initReq?: fm.InitReq): Promise<UpdateLdapGroupResponse> {
175
+ return fm.fetchReq<UpdateLdapGroupRequest, UpdateLdapGroupResponse>(`/apis/ghippo.io/v1alpha1/ldap/${req["ldapId"]}/group/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
176
+ }
177
+ static DeleteLdapGroup(req: DeleteLdapGroupRequest, initReq?: fm.InitReq): Promise<DeleteLdapGroupResponse> {
178
+ return fm.fetchReq<DeleteLdapGroupRequest, DeleteLdapGroupResponse>(`/apis/ghippo.io/v1alpha1/ldap/${req["ldapId"]}/group/${req["id"]}`, {...initReq, method: "DELETE"})
179
+ }
180
+ static SyncLdapGroups(req: SyncLdapGroupsRequest, initReq?: fm.InitReq): Promise<SyncLdapGroupsResponse> {
181
+ return fm.fetchReq<SyncLdapGroupsRequest, SyncLdapGroupsResponse>(`/apis/ghippo.io/v1alpha1/ldap/${req["ldapId"]}/group/${req["id"]}/sync?${fm.renderURLSearchParams(req, ["ldapId", "id"])}`, {...initReq, method: "GET"})
182
+ }
113
183
  }
@@ -27,7 +27,7 @@ export type ListWorkspacesResponse = {
27
27
  pagination?: Pagination
28
28
  }
29
29
 
30
- export type ResourceInfo = {
30
+ export type WorkspacesResourceInfo = {
31
31
  resourceName?: string
32
32
  resourceType?: string
33
33
  resourceScope?: string
@@ -35,15 +35,15 @@ export type ResourceInfo = {
35
35
  workspaceId?: number
36
36
  }
37
37
 
38
- export type ListResourcesRequest = {
38
+ export type ListWorkspacesResourcesRequest = {
39
39
  page?: number
40
40
  pageSize?: number
41
41
  workspaceId?: number
42
42
  gproduct?: string
43
43
  }
44
44
 
45
- export type ListResourcesResponse = {
46
- items?: ResourceInfo[]
45
+ export type ListWorkspacesResourcesResponse = {
46
+ items?: WorkspacesResourceInfo[]
47
47
  pagination?: Pagination
48
48
  }
49
49
 
@@ -54,7 +54,7 @@ export type ListExclusiveResourcesByWorkspaceRequest = {
54
54
  }
55
55
 
56
56
  export type ListExclusiveResourcesByWorkspaceResponse = {
57
- items?: ResourceInfo[]
57
+ items?: WorkspacesResourceInfo[]
58
58
  pagination?: Pagination
59
59
  }
60
60
 
@@ -65,7 +65,7 @@ export type ListSharedResourcesByWorkspaceRequest = {
65
65
  }
66
66
 
67
67
  export type ListSharedResourcesByWorkspaceResponse = {
68
- items?: ResourceInfo[]
68
+ items?: WorkspacesResourceInfo[]
69
69
  pagination?: Pagination
70
70
  }
71
71
 
@@ -253,19 +253,19 @@ export type ListMembersRolesResourcesResponse = {
253
253
  pagination?: Pagination
254
254
  }
255
255
 
256
- export type ProductSubResourceInfo = {
256
+ export type SubResourceInfo = {
257
257
  type?: string
258
258
  names?: string[]
259
259
  }
260
260
 
261
- export type ProductResourceInfo = {
261
+ export type ResourceInfo = {
262
262
  name?: string
263
263
  type?: string
264
264
  gproduct?: string
265
- subresource?: ProductSubResourceInfo
265
+ subresource?: SubResourceInfo
266
266
  }
267
267
 
268
- export type ListProductResourcesRequest = {
268
+ export type ListResourcesRequest = {
269
269
  page?: number
270
270
  pageSize?: number
271
271
  name?: string
@@ -273,12 +273,12 @@ export type ListProductResourcesRequest = {
273
273
  type?: string
274
274
  }
275
275
 
276
- export type ListProductResourcesResponse = {
277
- items?: ProductResourceInfo[]
276
+ export type ListResourcesResponse = {
277
+ items?: ResourceInfo[]
278
278
  pagination?: Pagination
279
279
  }
280
280
 
281
- export type ProductResourceType = {
281
+ export type ResourceType = {
282
282
  parent?: boolean
283
283
  name?: string
284
284
  }
@@ -287,7 +287,7 @@ export type ListResourceTypesRequest = {
287
287
  }
288
288
 
289
289
  export type ListResourceTypesResponse = {
290
- items?: ProductResourceType[]
290
+ items?: ResourceType[]
291
291
  pagination?: Pagination
292
292
  }
293
293
 
@@ -295,7 +295,7 @@ export type ListExclusiveResourceTypesRequest = {
295
295
  }
296
296
 
297
297
  export type ListExclusiveResourceTypesResponse = {
298
- items?: ProductResourceType[]
298
+ items?: ResourceType[]
299
299
  pagination?: Pagination
300
300
  }
301
301
 
@@ -303,48 +303,68 @@ export type ListSharedResourceTypesRequest = {
303
303
  }
304
304
 
305
305
  export type ListSharedResourceTypesResponse = {
306
- items?: ProductResourceType[]
306
+ items?: ResourceType[]
307
307
  pagination?: Pagination
308
308
  }
309
309
 
310
+ export type Resource = {
311
+ resourceName?: string
312
+ resourceType?: string
313
+ resourceScope?: string
314
+ gproduct?: string
315
+ }
316
+
317
+ export type QuotaHard = {
318
+ limits?: QuotaResource
319
+ requests?: QuotaResource
320
+ }
321
+
322
+ export type QuotaResource = {
323
+ cpu?: string
324
+ memory?: string
325
+ }
326
+
310
327
  export type BindResourceAndSetQuotaHardToWorkspaceRequest = {
311
- workspaceId?: number
312
328
  resourceName?: string
329
+ resourceType?: string
330
+ gproduct?: string
331
+ workspaceId?: number
332
+ quotaHard?: QuotaHard
313
333
  }
314
334
 
315
335
  export type BindResourceAndSetQuotaHardToWorkspaceResponse = {
316
336
  }
317
337
 
318
338
  export type SetQuotaHardForWorkspaceResourceRequest = {
339
+ workspaceResourceId?: number
340
+ quotaHard?: QuotaHard
319
341
  }
320
342
 
321
343
  export type SetQuotaHardForWorkspaceResourceResponse = {
322
344
  }
323
345
 
324
346
  export type GetWorkspaceResourceQuotaUsedRequest = {
347
+ workspaceId?: number
348
+ cluster?: string
325
349
  }
326
350
 
327
351
  export type GetWorkspaceResourceQuotaUsedResponse = {
328
- }
329
-
330
- export type GetWorkspaceResourceQuotaAllocatableRequest = {
331
- }
332
-
333
- export type GetWorkspaceResourceQuotaAllocatableResponse = {
352
+ quota?: {[key: string]: string}
334
353
  }
335
354
 
336
355
  export type ListResourceQuotaTypesRequest = {
337
356
  }
338
357
 
339
358
  export type ListResourceQuotaTypesResponse = {
359
+ items?: string[]
340
360
  }
341
361
 
342
362
  export class Workspace {
343
363
  static ListWorkspaces(req: ListWorkspacesRequest, initReq?: fm.InitReq): Promise<ListWorkspacesResponse> {
344
364
  return fm.fetchReq<ListWorkspacesRequest, ListWorkspacesResponse>(`/apis/ghippo.io/v1alpha1/workspaces?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
345
365
  }
346
- static ListResources(req: ListResourcesRequest, initReq?: fm.InitReq): Promise<ListResourcesResponse> {
347
- return fm.fetchReq<ListResourcesRequest, ListResourcesResponse>(`/apis/ghippo.io/v1alpha1/resources?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
366
+ static ListWorkspacesResources(req: ListWorkspacesResourcesRequest, initReq?: fm.InitReq): Promise<ListWorkspacesResourcesResponse> {
367
+ return fm.fetchReq<ListWorkspacesResourcesRequest, ListWorkspacesResourcesResponse>(`/apis/ghippo.io/v1alpha1/workspacesresources?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
348
368
  }
349
369
  static ListExclusiveResourcesByWorkspace(req: ListExclusiveResourcesByWorkspaceRequest, initReq?: fm.InitReq): Promise<ListExclusiveResourcesByWorkspaceResponse> {
350
370
  return fm.fetchReq<ListExclusiveResourcesByWorkspaceRequest, ListExclusiveResourcesByWorkspaceResponse>(`/apis/ghippo.io/v1alpha1/workspaces/${req["workspaceId"]}/exclusiveresources?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
@@ -400,8 +420,8 @@ export class Workspace {
400
420
  static ListMembersRolesResources(req: ListMembersRolesResourcesRequest, initReq?: fm.InitReq): Promise<ListMembersRolesResourcesResponse> {
401
421
  return fm.fetchReq<ListMembersRolesResourcesRequest, ListMembersRolesResourcesResponse>(`/apis/ghippo.io/v1alpha1/resources/members-roles?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
402
422
  }
403
- static ListProductResources(req: ListProductResourcesRequest, initReq?: fm.InitReq): Promise<ListProductResourcesResponse> {
404
- return fm.fetchReq<ListProductResourcesRequest, ListProductResourcesResponse>(`/apis/ghippo.io/v1alpha1/product-resources?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
423
+ static ListResources(req: ListResourcesRequest, initReq?: fm.InitReq): Promise<ListResourcesResponse> {
424
+ return fm.fetchReq<ListResourcesRequest, ListResourcesResponse>(`/apis/ghippo.io/v1alpha1/resources?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
405
425
  }
406
426
  static ListResourceTypes(req: ListResourceTypesRequest, initReq?: fm.InitReq): Promise<ListResourceTypesResponse> {
407
427
  return fm.fetchReq<ListResourceTypesRequest, ListResourceTypesResponse>(`/apis/ghippo.io/v1alpha1/resource-types?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -421,9 +441,6 @@ export class Workspace {
421
441
  static GetWorkspaceResourceQuotaUsed(req: GetWorkspaceResourceQuotaUsedRequest, initReq?: fm.InitReq): Promise<GetWorkspaceResourceQuotaUsedResponse> {
422
442
  return fm.fetchReq<GetWorkspaceResourceQuotaUsedRequest, GetWorkspaceResourceQuotaUsedResponse>(`/apis/ghippo.io/v1alpha1/workspaceresource-quota-used?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
423
443
  }
424
- static GetWorkspaceResourceQuotaAllocatable(req: GetWorkspaceResourceQuotaAllocatableRequest, initReq?: fm.InitReq): Promise<GetWorkspaceResourceQuotaAllocatableResponse> {
425
- return fm.fetchReq<GetWorkspaceResourceQuotaAllocatableRequest, GetWorkspaceResourceQuotaAllocatableResponse>(`/apis/ghippo.io/v1alpha1/workspaceresource-quota-allocatable?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
426
- }
427
444
  static ListResourceQuotaTypes(req: ListResourceQuotaTypesRequest, initReq?: fm.InitReq): Promise<ListResourceQuotaTypesResponse> {
428
445
  return fm.fetchReq<ListResourceQuotaTypesRequest, ListResourceQuotaTypesResponse>(`/apis/ghippo.io/v1alpha1/resourcequota-types?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
429
446
  }