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/set-password.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 SetAccountPasswordInputSchema = z
11
.object({
12
currentPassword: z
13
.string()
14
.describe("The current password for the account."),
15
newPassword: z.string().describe("The new password for the account."),
16
})
17
.describe("Set password for an existing account.");
18
19
export const SetAccountPasswordOutputSchema = z.union([
20
FailedAPIOperationSchema,
21
SuccessfulAPIOperationSchema,
22
]);
23
24
export type SetAccountPasswordInput = z.infer<
25
typeof SetAccountPasswordInputSchema
26
>;
27
export type SetAccountPasswordOutput = z.infer<
28
typeof SetAccountPasswordOutputSchema
29
>;
30
31