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/sign-out.ts
Views: 688
1
import { z } from "../../framework";
2
3
import {
4
FailedAPIOperationSchema,
5
SuccessfulAPIOperationSchema,
6
} from "../common";
7
8
// OpenAPI spec
9
//
10
export const AccountSignOutInputSchema = z
11
.object({
12
all: z
13
.boolean()
14
.nullable()
15
.describe("If `true`, all sessions for the user will be signed out."),
16
})
17
.describe(
18
`Sign out of the current session or all sessions. This invalidates 1 or more "Remember
19
Me" cookies for the account that is making the API request.`,
20
);
21
22
export const AccountSignOutOutputSchema = z.union([
23
FailedAPIOperationSchema,
24
SuccessfulAPIOperationSchema,
25
]);
26
27
export type AccountSignOutInput = z.infer<typeof AccountSignOutInputSchema>;
28
export type AccountSignOutOutput = z.infer<typeof AccountSignOutOutputSchema>;
29
30