Path: blob/master/src/packages/next/lib/api/schema/projects/get.ts
1451 views
import { z } from "../../framework";12import { FailedAPIOperationSchema } from "../common";34import { AdminAccountIdSchema } from "../accounts/common";56import { ProjectIdSchema } from "./common";78// OpenAPI spec9//10export const GetAccountProjectsInputSchema = z11.object({12account_id: AdminAccountIdSchema,13limit: z14.number()15.default(50)16.describe("Upper bound on the number of projects to return.")17.nullish(),18})19.describe("Gets projects for a particular account.");2021export const GetAccountProjectsOutputSchema = z.union([22FailedAPIOperationSchema,23z24.array(25z.object({26project_id: ProjectIdSchema,27title: ProjectIdSchema,28}),29)30.describe("An array of projects corresponding to a particular account."),31]);3233export type GetAccountProjectsInput = z.infer<34typeof GetAccountProjectsInputSchema35>;36export type GetAccountProjectsOutput = z.infer<37typeof GetAccountProjectsOutputSchema38>;394041