@daocloud-proto/ghippo 0.21.0-dev5 → 0.21.0-dev7

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.21.0-dev5",
3
+ "version":"0.21.0-dev7",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -0,0 +1,30 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ /*
4
+ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
+ */
6
+
7
+ import * as fm from "../fetch.pb"
8
+
9
+ export enum FeatureGateID {
10
+ CreateUserInWorkspace = "CreateUserInWorkspace",
11
+ }
12
+
13
+ export type FeatureGateInfo = {
14
+ id?: FeatureGateID
15
+ description?: string
16
+ enabled?: boolean
17
+ }
18
+
19
+ export type ListFeatureGatesRequest = {
20
+ }
21
+
22
+ export type ListFeatureGatesResponse = {
23
+ items?: FeatureGateInfo[]
24
+ }
25
+
26
+ export class FeatureGate {
27
+ static ListFeatureGates(req: ListFeatureGatesRequest, initReq?: fm.InitReq): Promise<ListFeatureGatesResponse> {
28
+ return fm.fetchReq<ListFeatureGatesRequest, ListFeatureGatesResponse>(`/apis/ghippo.io/v1alpha1/feature-gate?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
29
+ }
30
+ }
@@ -326,6 +326,13 @@ export type ListSharedResourceTypesResponse = {
326
326
  items?: string[]
327
327
  }
328
328
 
329
+ export type GetSharedResourceTypeRequest = {
330
+ }
331
+
332
+ export type GetSharedResourceTypeResponse = {
333
+ sharedResource?: string
334
+ }
335
+
329
336
  export type SetQuotaHardForWorkspaceSharedResourceRequest = {
330
337
  workspaceResourceId?: number
331
338
  quotaHard?: {[key: string]: string}
@@ -498,6 +505,38 @@ export type MoverWorkspaceFolder = {
498
505
  parentAlias?: string
499
506
  }
500
507
 
508
+ export type WorkspaceCreateUserRequest = {
509
+ name?: string
510
+ password?: string
511
+ description?: string
512
+ temporary?: boolean
513
+ roleName?: string
514
+ workspaceId?: number
515
+ }
516
+
517
+ export type WorkspaceCreateUserResponse = {
518
+ }
519
+
520
+ export type WorkspaceDeleteUserRequest = {
521
+ userId?: string
522
+ workspaceId?: number
523
+ }
524
+
525
+ export type WorkspaceDeleteUserResponse = {
526
+ }
527
+
528
+ export type WorkspaceListUsersRequest = {
529
+ search?: string
530
+ pageSize?: number
531
+ page?: number
532
+ workspaceId?: number
533
+ }
534
+
535
+ export type WorkspaceListUsersResponse = {
536
+ items?: User[]
537
+ pagination?: Pagination
538
+ }
539
+
501
540
  export class Workspace {
502
541
  static ListWorkspaces(req: ListWorkspacesRequest, initReq?: fm.InitReq): Promise<ListWorkspacesResponse> {
503
542
  return fm.fetchReq<ListWorkspacesRequest, ListWorkspacesResponse>(`/apis/ghippo.io/v1alpha1/workspaces?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -571,6 +610,9 @@ export class Workspace {
571
610
  static ListSharedResourceTypes(req: ListSharedResourceTypesRequest, initReq?: fm.InitReq): Promise<ListSharedResourceTypesResponse> {
572
611
  return fm.fetchReq<ListSharedResourceTypesRequest, ListSharedResourceTypesResponse>(`/apis/ghippo.io/v1alpha1/sharedresource-types?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
573
612
  }
613
+ static GetSharedResourceType(req: GetSharedResourceTypeRequest, initReq?: fm.InitReq): Promise<GetSharedResourceTypeResponse> {
614
+ return fm.fetchReq<GetSharedResourceTypeRequest, GetSharedResourceTypeResponse>(`/apis/ghippo.io/v1alpha1/sharedresource-type?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
615
+ }
574
616
  static BindSharedResourceAndSetQuotaHardToWorkspace(req: BindSharedResourceAndSetQuotaHardToWorkspaceRequest, initReq?: fm.InitReq): Promise<BindSharedResourceAndSetQuotaHardToWorkspaceResponse> {
575
617
  return fm.fetchReq<BindSharedResourceAndSetQuotaHardToWorkspaceRequest, BindSharedResourceAndSetQuotaHardToWorkspaceResponse>(`/apis/ghippo.io/v1alpha1/workspaces/${req["workspaceId"]}/bind-sharedresource-setquota`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
576
618
  }
@@ -601,4 +643,13 @@ export class Workspace {
601
643
  static MoveWorkspaceFolderList(req: MoveWorkspaceFolderListRequest, initReq?: fm.InitReq): Promise<MoveWorkspaceFolderListResponse> {
602
644
  return fm.fetchReq<MoveWorkspaceFolderListRequest, MoveWorkspaceFolderListResponse>(`/apis/ghippo.io/v1alpha1/workspaces/${req["workspaceId"]}/move-folders?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
603
645
  }
646
+ static WorkspaceCreateUser(req: WorkspaceCreateUserRequest, initReq?: fm.InitReq): Promise<WorkspaceCreateUserResponse> {
647
+ return fm.fetchReq<WorkspaceCreateUserRequest, WorkspaceCreateUserResponse>(`/apis/ghippo.io/v1alpha1/workspaces/${req["workspaceId"]}/users`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
648
+ }
649
+ static WorkspaceDeleteUser(req: WorkspaceDeleteUserRequest, initReq?: fm.InitReq): Promise<WorkspaceDeleteUserResponse> {
650
+ return fm.fetchReq<WorkspaceDeleteUserRequest, WorkspaceDeleteUserResponse>(`/apis/ghippo.io/v1alpha1/workspaces/${req["workspaceId"]}/users/${req["userId"]}`, {...initReq, method: "DELETE"})
651
+ }
652
+ static WorkspaceListUsers(req: WorkspaceListUsersRequest, initReq?: fm.InitReq): Promise<WorkspaceListUsersResponse> {
653
+ return fm.fetchReq<WorkspaceListUsersRequest, WorkspaceListUsersResponse>(`/apis/ghippo.io/v1alpha1/workspaces/${req["workspaceId"]}/users?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
654
+ }
604
655
  }