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/profile.ts
Views: 688
import { z } from "../../framework";12import { FailedAPIOperationSchema } from "../common";34import { AccountIdSchema } from "./common";5import { RequestNoCacheSchema } from "../common";67// OpenAPI spec8//9export const AccountProfileInputSchema = z10.object({11account_id: AccountIdSchema.optional(),12noCache: RequestNoCacheSchema.optional(),13})14.describe(15`Get the *public* profile for a given account or the private profile of the user16making the request. This is public information if user the user knows the account_id.17It is the color, the name, and the image.`,18);1920export const AccountProfileOutputSchema = z.union([21FailedAPIOperationSchema,22z.object({23profile: z24.object({25account_id: AccountIdSchema,26first_name: z.string().describe("First name of account holder."),27last_name: z.string().describe("Last name of account holder."),28image: z29.string()30.describe(31`Account avatar image. This value may be used directly in the \`src\`32attribute of an HTML \`image\` tag`,33)34.optional(),35color: z36.string()37.describe(38`Background color for account avatar if an image is not provided.`,39)40.optional(),41name: z42.union([z.string().describe("Account username"), z.null()])43.describe(44`Account username. This is used to provide a nice URL for public content45associated with this account.`,46),47is_admin: z48.boolean()49.describe("_Included when the full profile is returned.")50.optional(),51is_partner: z52.boolean()53.describe("_Included when the full profile is returned.")54.optional(),55is_anonymous: z56.boolean()57.describe("_Included when the full profile is returned.")58.optional(),59email_address: z.string().describe("The account e-mail address."),60})61.describe("An object containing account profile information."),62}),63]);6465export type AccountProfileInput = z.infer<typeof AccountProfileInputSchema>;66export type AccountProfileOutput = z.infer<typeof AccountProfileOutputSchema>;676869