import { Base } from "./Base"; import { User } from "./UserService"; import type { Team, TeamEntity } from "./TeamService"; import type { K8sCluster } from "./K8sCluster"; import type { Invitation, InvitationEntity } from "./InvitationService"; import type { BillingPlan } from "./BillingPlan"; import type { InvitationDomain, InvitationDomainEntity } from "./InvitationDomain"; import type { MapToEntity } from "./types/types"; import type { Except } from "type-fest"; export declare const spaceKinds: readonly ["Personal", "Team"]; export type SpaceKind = typeof spaceKinds[number]; export declare const spaceFeatures: readonly string[]; export type SpaceFeature = typeof spaceFeatures[number]; /** * * @remarks * This interface should be generated using OpenAPI generator in the future. * * @alpha */ export interface Space { id?: string; name: string; description?: string; displayName?: string; website?: string; createdById?: string; createdAt?: string; updatedAt?: string; kind?: SpaceKind; features?: SpaceFeature[]; users?: User[]; teams?: Team[]; invitations?: Invitation[]; invitationDomains?: InvitationDomain[]; } export type SpaceEntity = Except, "teams" | "invitations" | "invitationDomains"> & { teams?: TeamEntity[]; invitations?: InvitationEntity[]; invitationDomains?: InvitationDomainEntity[]; }; /** * * The class for consuming all `space` resources. * * @remarks * This class should be generated using OpenAPI generator in the future. * * @alpha */ declare class SpaceService extends Base { /** * Get one space by space name */ getOne({ name, queryString }: { name: string; queryString?: string; }): Promise; /** * Get spaces */ getMany(queryString?: string): Promise; /** * Create one space */ createOne(space: Space): Promise; /** * Add feature to users' Personal Spaces. * @param feature - Feature to add * @param users - Array of usernames or email addresses */ addSpaceFeature(feature: SpaceFeature, users: string[]): Promise>; /** * Remove feature from users' Personal Spaces. * @param feature - Feature remove add * @param users - Array of usernames or email addresses */ removeSpaceFeature(feature: SpaceFeature, users: string[]): Promise>; /** * Update one space */ updateOne(spaceName: string, space: Space): Promise; /** * Delete one space by space name */ deleteOne({ name }: { name: string; }): Promise; /** * Get bored-secret by space name and cluster id */ getBoredSecret({ name, clusterId, }: { name: string; clusterId: string; }): Promise<{ token: string; }>; /** * Get cluster token by space name and cluster id */ getClusterToken({ name, clusterId, }: { name: string; clusterId: string; }): Promise<{ token: string; }>; /** * Create a kubeconfig by space name and cluster id */ createKubeConfig({ name, clusterId, kubeconfig, }: { name: string; clusterId: string; kubeconfig: string; }): Promise<{ value: string; id: string; }>; /** * Get kubeconfig by space name and cluster id */ getKubeConfig({ name, clusterId, }: { name: string; clusterId: string; }): Promise<{ value: string; id: string; }>; /** * Update existing kubeconfig by space name, cluster id and kubeconfig id */ updateKubeConfig({ name, clusterId, kubeconfigId, kubeconfig, }: { name: string; clusterId: string; kubeconfigId: string; kubeconfig: string; }): Promise<{ id: string; value: string; }>; /** * Get all clusters in one space by space name */ getClusters({ name }: { name: string; }): Promise; /** * Get all invitation domains in one space by space name */ getInvitationDomains({ name }: { name: string; }): Promise; /** * Add one invitation domain in a Space by space name */ addInvitationDomain({ name, domain, }: { name: Space["name"]; domain: InvitationDomain["domain"]; }): Promise; /** * Delete one invitation domain in a Space by space name and invitation domain id */ deleteInvitationDomain({ name, invitationDomainId, }: { name: Space["name"]; invitationDomainId: InvitationDomain["id"]; }): Promise; /** * Get one cluster by cluster id in one space by space name */ getOneCluster({ clusterId, name, }: { clusterId: string; name: string; }): Promise; /** * Create a cluster in one space by space name */ createOneCluster({ cluster, name, }: { cluster: K8sCluster; name: string; }): Promise; /** * Update a cluster */ updateOneCluster({ cluster }: { cluster: K8sCluster; }): Promise; /** * Replace a cluster */ replaceOneCluster({ cluster }: { cluster: K8sCluster; }): Promise; /** * Delete a cluster by cluster id in one space by space name */ deleteOneCluster({ clusterId, name }: { clusterId: string; name: string; }): Promise; /** * Remove one user by username from a space by space name * @throws SpaceNotFoundException, UserNameNotFoundException, ForbiddenException, CantRemoveOwnerFromSpaceException */ removeOneUser({ username, name }: { username: string; name: string; }): Promise; /** * Get billing plan of space by space name */ getBillingPlan({ name }: { name: string; }): Promise; /** * Downgrades the billing plan of space by space name */ downgradeBillingPlan({ name }: { name: string; }): Promise; } export { SpaceService };