Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/src/packages/next/lib/api/schema/accounts/common.ts
Views: 688
import { z } from "../../framework";12export const AccountIdSchema = z.string().uuid().describe("Account id.");34export type AccountId = z.infer<typeof AccountIdSchema>;56export const AdminAccountIdSchema = AccountIdSchema.optional().describe(7`**Administrators only**. Optional account id to set name(s) for. If this field is8not provided, it is assumed that this operation pertains to the account id of the9user making the request.`,10);1112export type AdminAccountId = z.infer<typeof AdminAccountIdSchema>;1314export const AccountEmailSchema = z15.string()16.describe("The account e-mail address.");1718export type AccountEmail = z.infer<typeof AccountEmailSchema>;1920export const AccountUserSchema = z21.object({22account_id: AccountIdSchema,23first_name: z.string().describe("User's first name.").nullish(),24last_name: z.string().describe("User's last name.").nullish(),25name: z.string().describe("Customizable username").nullish(),26last_active: z27.number()28.min(0)29.nullable()30.describe(31"UNIX timestamp indicating time at which the account was last active.",32),33created: z34.number()35.min(0)36.describe(37"UNIX timestamp indicating time at which the account was created.",38),39banned: z40.boolean()41.optional()42.describe("**Administrators only**. True if this user has been banned."),43email_address_verified: z44.boolean()45.nullish()46.describe("Set to `true` once the user's e-mail has been verified."),47email_address: AccountEmailSchema.optional().describe(48`The account e-mail address.4950*Note*: For security reasons, the email_address *only* occurs in search queries51that are by \`email_address\` (or for admins); email addresses of users queried52by substring searches are not revealed.`,53),54})55.describe("User account.");5657export type AccountUser = z.infer<typeof AccountUserSchema>;585960