Path: blob/master/src/packages/next/lib/api/schema/projects/update.ts
1451 views
import { z } from "../../framework";12import { FailedAPIOperationSchema, OkAPIOperationSchema } from "../common";34import { AdminAccountIdSchema } from "../accounts/common";56import {7ProjectDescriptionSchema,8ProjectIdSchema,9ProjectNameSchema,10ProjectTitleSchema,11} from "./common";1213// OpenAPI spec14//15export const UpdateProjectInputSchema = z16.object({17account_id: AdminAccountIdSchema,18project_id: ProjectIdSchema,19title: ProjectTitleSchema.optional(),20description: ProjectDescriptionSchema.optional(),21name: ProjectNameSchema.optional(),22})23.describe(24`Update an existing project's title, name, and/or description. If the API client is an25admin, they may act on any project. Otherwise, the client may only update projects26for which they are listed as collaborators.`,27);2829export const UpdateProjectOutputSchema = z.union([30FailedAPIOperationSchema,31OkAPIOperationSchema,32]);3334export type UpdateProjectInput = z.infer<typeof UpdateProjectInputSchema>;35export type UpdateProjectOutput = z.infer<typeof UpdateProjectOutputSchema>;363738