Path: blob/master/src/packages/next/lib/api/schema/accounts/set-email-address.ts
1451 views
import { z } from "../../framework";12import {3FailedAPIOperationSchema,4SuccessfulAPIOperationSchema,5} from "../common";67import { AccountEmailSchema } from "./common";89// OpenAPI spec10//11export const SetAccountEmailAddressInputSchema = z12.object({13email_address: AccountEmailSchema,14password: z.string().describe("The password for the account."),15})16.describe(17`Set email address of an account. The password must also be provided. If the18email address is already set in the database, then \`password\` must be the current19correct password. If the email address is NOT set, then a new email address and20password are set.`,21);2223export const SetAccountEmailAddressOutputSchema = z.union([24FailedAPIOperationSchema,25SuccessfulAPIOperationSchema,26]);2728export type SetAccountEmailAddressInput = z.infer<29typeof SetAccountEmailAddressInputSchema30>;31export type SetAccountEmailAddressOutput = z.infer<32typeof SetAccountEmailAddressOutputSchema33>;343536