Path: blob/master/src/packages/next/lib/api/schema/accounts/set-name.ts
1451 views
import { z } from "../../framework";12import {3FailedAPIOperationSchema,4SuccessfulAPIOperationSchema,5} from "../common";67import { AccountIdSchema } from "./common";89// OpenAPI spec10//11export const SetAccountNameInputSchema = z12.object({13account_id: AccountIdSchema.optional().describe(14`**Administrators only**. Optional account id to set name(s) for. If this field is15not provided, it is assumed that this operation pertains to the account id of the16user making the request.`,17),18username: z.string().describe("Unique username.").optional(),19first_name: z.string().max(254).describe("First name").optional(),20last_name: z.string().max(254).describe("Last name").optional(),21})22.describe(23`Set the username, first name, and/or last name for a user account. Only non-empty24field values are allowed; everything else will be omitted from the update query.`,25);2627export const SetAccountNameOutputSchema = z.union([28FailedAPIOperationSchema,29SuccessfulAPIOperationSchema,30]);3132export type SetAccountNameInput = z.infer<typeof SetAccountNameInputSchema>;33export type SetAccountNameOutput = z.infer<typeof SetAccountNameOutputSchema>;343536