/* tslint:disable */
/**
 * This file was automatically generated by json-schema-to-typescript.
 * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
 * and run json-schema-to-typescript to regenerate this file.
 */

export type IWorkspaceParameters =
  | {
      CreateWorkspace: CreateWorkspace;
    }
  | {
      GetWorkspace: GetWorkspace;
    }
  | {
      GetWorkspaces: GetWorkspaces;
    }
  | {
      GetWorkspacesResult: GetWorkspacesResult;
    }
  | {
      UpdateWorkspace: UpdateWorkspace;
    }
  | {
      CreateWorkspaceResult: CreateWorkspaceResult;
    };
export type PermissionType = null | null | null | null;
export type WorkspaceType = null | null;

export interface CreateWorkspace {
  /**
   * only set name, avatar is update in datacenter to yDoc directly
   */
  name: string;
  user_id: number;
  [k: string]: unknown;
}
export interface GetWorkspace {
  id: string;
  [k: string]: unknown;
}
export interface GetWorkspaces {
  user_id: number;
  [k: string]: unknown;
}
export interface GetWorkspacesResult {
  workspaces: WorkspaceWithPermission[];
  [k: string]: unknown;
}
export interface WorkspaceWithPermission {
  created_at: number;
  id: string;
  permission: PermissionType;
  public: boolean;
  type: WorkspaceType;
  [k: string]: unknown;
}
export interface UpdateWorkspace {
  id: number;
  public: boolean;
  [k: string]: unknown;
}
export interface CreateWorkspaceResult {
  id: string;
  name: string;
  [k: string]: unknown;
}
