CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
sagemathinc

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/next/lib/api/schema/accounts/ban.ts
Views: 688
1
import { z } from "../../framework";
2
3
import {
4
FailedAPIOperationSchema,
5
SuccessfulAPIOperationSchema,
6
} from "../common";
7
8
import { AccountIdSchema } from "./common";
9
10
// OpenAPI spec
11
//
12
export const BanAccountInputSchema = z
13
.object({
14
account_id: AccountIdSchema.describe("Account id to ban."),
15
})
16
.describe(
17
"**Administrators only**. Used to ban a user's account from the system.",
18
);
19
20
export const BanAccountOutputSchema = z.union([
21
FailedAPIOperationSchema,
22
SuccessfulAPIOperationSchema,
23
]);
24
25
export type BanAccountInput = z.infer<typeof BanAccountInputSchema>;
26
export type BanAccountOutput = z.infer<typeof BanAccountOutputSchema>;
27
28