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/get-email-address.ts
Views: 688
1
import { z } from "../../framework";
2
3
import { FailedAPIOperationSchema } from "../common";
4
5
import { AccountEmailSchema, AccountIdSchema } from "./common";
6
7
// OpenAPI spec
8
//
9
export const GetAccountEmailAddressInputSchema = z
10
.object({
11
account_id: AccountIdSchema,
12
})
13
.describe(
14
`**Administrators only**. Used to fetch the e-mail address associated with an
15
account id.`,
16
);
17
18
export const GetAccountEmailAddressOutputSchema = z.union([
19
FailedAPIOperationSchema,
20
z.object({
21
email_address: AccountEmailSchema,
22
}),
23
]);
24
25
export type GetAccountEmailAddressInput = z.infer<
26
typeof GetAccountEmailAddressInputSchema
27
>;
28
export type GetAccountEmailAddressOutput = z.infer<
29
typeof GetAccountEmailAddressOutputSchema
30
>;
31
32