Path: blob/master/src/packages/next/lib/api/schema/accounts/search.ts
1451 views
import { z } from "../../framework";12import { FailedAPIOperationSchema } from "../common";3import { AccountUserSchema } from "./common";45// OpenAPI spec6//7export const AccountSearchInputSchema = z8.object({9query: z.string()10.describe(`Comma- or space-delimited list of account e-mail addresses, account ids,11and/or first/last names to query for an account by.`),12})13.describe(14`Search for accounts matching a given query. If user is signed in, then their15account id is used to prioritize the search.`,16);1718export const AccountSearchOutputSchema = z.union([19FailedAPIOperationSchema,20z21.array(AccountUserSchema)22.describe(23"List of matching accounts, sorted by last active and/or account creation date.",24),25]);2627export type AccountSearchInput = z.infer<typeof AccountSearchInputSchema>;28export type AccountSearchOutput = z.infer<typeof AccountSearchOutputSchema>;293031