Skip to main content
Glama
zod-schemas.ts182 kB
import { makeApi, Zodios, type ZodiosOptions } from "@zodios/core"; import { z } from "zod"; type ThreadedComment = { app_url: string; entity_type: string; deleted: boolean; mention_ids: Array<string>; author_id: string; member_mention_ids: Array<string>; comments: Array<ThreadedComment>; updated_at: string; group_mention_ids: Array<string>; external_id: string | null; id: number; created_at: string; text: string; }; const Category = z.object({ archived: z.boolean(), entity_type: z.string(), color: z .string() .min(1) .regex(/^#[a-fA-F0-9]{6}$/) .nullable(), name: z.string(), global_id: z.string(), type: z.string(), updated_at: z.string().datetime({ offset: true }), external_id: z.string().nullable(), id: z.number().int(), created_at: z.string().datetime({ offset: true }), }); const CreateCategory = z.object({ name: z.string().min(1).max(128), color: z .string() .min(1) .regex(/^#[a-fA-F0-9]{6}$/) .optional(), external_id: z.string().min(1).max(128).optional(), type: z.unknown().optional(), }); const UpdateCategory = z .object({ name: z.string().min(1), color: z .string() .min(1) .regex(/^#[a-fA-F0-9]{6}$/) .nullable(), archived: z.boolean(), }) .partial(); const MilestoneStats = z.object({ average_cycle_time: z.number().int().optional(), average_lead_time: z.number().int().optional(), num_related_documents: z.number().int(), }); const Milestone = z.object({ app_url: z.string(), description: z.string(), archived: z.boolean(), started: z.boolean(), entity_type: z.string(), completed_at_override: z.string().datetime({ offset: true }).nullable(), started_at: z.string().datetime({ offset: true }).nullable(), completed_at: z.string().datetime({ offset: true }).nullable(), name: z.string(), global_id: z.string(), completed: z.boolean(), state: z.string(), started_at_override: z.string().datetime({ offset: true }).nullable(), updated_at: z.string().datetime({ offset: true }), categories: z.array(Category), id: z.number().int(), key_result_ids: z.array(z.string().uuid()), position: z.number().int(), stats: MilestoneStats, created_at: z.string().datetime({ offset: true }), }); const CustomFieldEnumValue = z.object({ id: z.string().uuid(), value: z.string().min(1).max(63), position: z.number().int(), color_key: z.string().nullable(), entity_type: z.literal("custom-field-enum-value"), enabled: z.boolean(), }); const CustomField = z.object({ description: z.string().min(1).max(512).optional(), icon_set_identifier: z.string().min(1).max(63).optional(), entity_type: z.literal("custom-field"), story_types: z.array(z.string()).optional(), name: z.string().min(1).max(63), fixed_position: z.boolean().optional(), updated_at: z.string().datetime({ offset: true }), id: z.string().uuid(), values: z.array(CustomFieldEnumValue).optional(), field_type: z.literal("enum"), position: z.number().int(), canonical_name: z.string().optional(), enabled: z.boolean(), created_at: z.string().datetime({ offset: true }), }); const UpdateCustomFieldEnumValue = z .object({ id: z.string().uuid(), value: z.string().min(1).max(63), color_key: z.string().nullable(), enabled: z.boolean(), }) .partial(); const UpdateCustomField = z .object({ enabled: z.boolean(), name: z.string().min(1).max(63), values: z.array(UpdateCustomFieldEnumValue), icon_set_identifier: z.string().min(1).max(63), description: z.string(), before_id: z.string().uuid(), after_id: z.string().uuid(), }) .partial(); const DataConflictError = z.object({ error: z.literal("data-conflict-error"), message: z.string(), }); const DocSlim = z.object({ id: z.string().uuid(), title: z.string().nullable(), }); const DisabledFeatureError = z.object({ feature_tag: z.string(), message: z.string(), }); const CreateDoc = z.object({ title: z.string().min(1).max(256), content: z.string(), }); const LabelSlim = z.object({ app_url: z.string(), description: z.string().nullable(), archived: z.boolean(), entity_type: z.string(), color: z .string() .min(1) .regex(/^#[a-fA-F0-9]{6}$/) .nullable(), name: z.string(), global_id: z.string(), updated_at: z.string().datetime({ offset: true }).nullable(), external_id: z.string().nullable(), id: z.number().int(), created_at: z.string().datetime({ offset: true }).nullable(), }); const CustomFieldValueParams = z.object({ field_id: z.string().uuid(), value_id: z.string().uuid(), value: z.string().optional(), }); const LinkedFile = z.object({ description: z.string().nullable(), entity_type: z.string(), story_ids: z.array(z.number().int()), mention_ids: z.array(z.string().uuid()), member_mention_ids: z.array(z.string().uuid()), name: z.string(), thumbnail_url: z.string().nullable(), type: z.string(), size: z.number().int().nullable(), uploader_id: z.string().uuid(), content_type: z.string().nullable(), updated_at: z.string().datetime({ offset: true }), group_mention_ids: z.array(z.string().uuid()), id: z.number().int(), url: z.string(), created_at: z.string().datetime({ offset: true }), }); const CreateSubTaskParams = z.object({ name: z.string().min(1).max(512), owner_ids: z.array(z.string().uuid()).optional(), workflow_state_id: z.number().int().optional(), }); const StoryContentsTask = z.object({ description: z.string(), position: z.number().int().optional(), complete: z.boolean().optional(), owner_ids: z.array(z.string().uuid()).optional(), external_id: z.string().nullish(), }); const UploadedFile = z.object({ description: z.string().nullable(), entity_type: z.string(), story_ids: z.array(z.number().int()), mention_ids: z.array(z.string().uuid()), member_mention_ids: z.array(z.string().uuid()), name: z.string(), thumbnail_url: z.string().nullable(), size: z.number().int(), uploader_id: z.string().uuid(), content_type: z.string(), updated_at: z.string().datetime({ offset: true }).nullable(), filename: z.string(), group_mention_ids: z.array(z.string().uuid()), external_id: z.string().nullable(), id: z.number().int(), url: z.string().nullable(), created_at: z.string().datetime({ offset: true }), }); const StoryContents = z .object({ description: z.string(), entity_type: z.string(), labels: z.array(LabelSlim), story_type: z.string(), custom_fields: z.array(CustomFieldValueParams), linked_files: z.array(LinkedFile), name: z.string(), epic_id: z.number().int(), external_links: z.array(z.string()), sub_tasks: z.array(CreateSubTaskParams), iteration_id: z.number().int(), tasks: z.array(StoryContentsTask), label_ids: z.array(z.number().int()), group_id: z.string().uuid(), workflow_state_id: z.number().int(), follower_ids: z.array(z.string().uuid()), owner_ids: z.array(z.string().uuid()), estimate: z.number().int(), files: z.array(UploadedFile), project_id: z.number().int(), deadline: z.string().datetime({ offset: true }), }) .partial(); const EntityTemplate = z.object({ entity_type: z.string(), id: z.string().uuid(), created_at: z.string().datetime({ offset: true }), updated_at: z.string().datetime({ offset: true }), name: z.string(), author_id: z.string().uuid(), last_used_at: z.string().datetime({ offset: true }), story_contents: StoryContents, }); const CreateLabelParams = z.object({ name: z.string().min(1).max(128), description: z.string().max(1024).optional(), color: z .string() .min(1) .regex(/^#[a-fA-F0-9]{6}$/) .optional(), external_id: z.string().min(1).max(128).optional(), }); const BaseTaskParams = z.object({ description: z.string().min(1).max(2048), complete: z.boolean().optional(), owner_ids: z.array(z.string().uuid()).optional(), external_id: z.string().max(128).optional(), }); const CreateStoryContents = z .object({ description: z.string(), labels: z.array(CreateLabelParams), story_type: z.string(), custom_fields: z.array(CustomFieldValueParams), file_ids: z.array(z.number().int()), name: z.string().max(512), epic_id: z.number().int().nullable(), external_links: z.array(z.string()), sub_tasks: z.array(CreateSubTaskParams), iteration_id: z.number().int().nullable(), tasks: z.array(BaseTaskParams), group_id: z.string().uuid().nullable(), workflow_state_id: z.number().int().nullable(), follower_ids: z.array(z.string().uuid()), owner_ids: z.array(z.string().uuid()), estimate: z.number().int().nullable(), project_id: z.number().int(), linked_file_ids: z.array(z.number().int()), deadline: z.string().datetime({ offset: true }).nullable(), }) .partial(); const CreateEntityTemplate = z.object({ name: z.string().min(1).max(128), author_id: z.string().uuid().optional(), story_contents: CreateStoryContents, }); const UpdateStoryContents = z .object({ description: z.string(), labels: z.array(CreateLabelParams), story_type: z.string(), custom_fields: z.array(CustomFieldValueParams), file_ids: z.array(z.number().int()), name: z.string(), epic_id: z.number().int().nullable(), external_links: z.array(z.string()), sub_tasks: z.array(CreateSubTaskParams), iteration_id: z.number().int().nullable(), tasks: z.array(BaseTaskParams), group_id: z.string().uuid().nullable(), workflow_state_id: z.number().int().nullable(), follower_ids: z.array(z.string().uuid()), owner_ids: z.array(z.string().uuid()), estimate: z.number().int().nullable(), project_id: z.number().int().nullable(), linked_file_ids: z.array(z.number().int()), deadline: z.string().datetime({ offset: true }).nullable(), }) .partial(); const UpdateEntityTemplate = z .object({ name: z.string().min(1).max(128), story_contents: UpdateStoryContents, }) .partial(); const EpicState = z.object({ description: z.string(), entity_type: z.string(), color: z .string() .min(1) .regex(/^#[a-fA-F0-9]{6}$/) .optional(), name: z.string(), global_id: z.string(), type: z.string(), updated_at: z.string().datetime({ offset: true }), id: z.number().int(), position: z.number().int(), created_at: z.string().datetime({ offset: true }), }); const EpicWorkflow = z.object({ entity_type: z.string(), id: z.number().int(), created_at: z.string().datetime({ offset: true }), updated_at: z.string().datetime({ offset: true }), default_epic_state_id: z.number().int(), epic_states: z.array(EpicState), }); const EpicAssociatedGroup = z.object({ group_id: z.string().uuid(), associated_stories_count: z.number().int().optional(), }); const EpicStats = z.object({ num_points_done: z.number().int(), num_related_documents: z.number().int(), num_stories_unstarted: z.number().int(), num_stories_total: z.number().int(), last_story_update: z.string().datetime({ offset: true }).nullable(), num_points_started: z.number().int(), num_points_unstarted: z.number().int(), num_stories_started: z.number().int(), num_stories_unestimated: z.number().int(), num_stories_backlog: z.number().int(), num_points_backlog: z.number().int(), num_points: z.number().int(), num_stories_done: z.number().int(), }); const EpicSlim = z.object({ app_url: z.string(), description: z.string().optional(), archived: z.boolean(), started: z.boolean(), entity_type: z.string(), labels: z.array(LabelSlim), mention_ids: z.array(z.string().uuid()), member_mention_ids: z.array(z.string().uuid()), associated_groups: z.array(EpicAssociatedGroup), project_ids: z.array(z.number().int()), stories_without_projects: z.number().int(), completed_at_override: z.string().datetime({ offset: true }).nullable(), productboard_plugin_id: z.string().uuid().nullable(), started_at: z.string().datetime({ offset: true }).nullable(), completed_at: z.string().datetime({ offset: true }).nullable(), objective_ids: z.array(z.number().int()), name: z.string(), global_id: z.string(), completed: z.boolean(), productboard_url: z.string().nullable(), planned_start_date: z.string().datetime({ offset: true }).nullable(), state: z.string(), milestone_id: z.number().int().nullable(), requested_by_id: z.string().uuid(), epic_state_id: z.number().int(), label_ids: z.array(z.number().int()), started_at_override: z.string().datetime({ offset: true }).nullable(), group_id: z.string().uuid().nullable(), updated_at: z.string().datetime({ offset: true }).nullable(), group_mention_ids: z.array(z.string().uuid()), productboard_id: z.string().uuid().nullable(), follower_ids: z.array(z.string().uuid()), group_ids: z.array(z.string().uuid()), owner_ids: z.array(z.string().uuid()), external_id: z.string().nullable(), id: z.number().int(), position: z.number().int(), productboard_name: z.string().nullable(), deadline: z.string().datetime({ offset: true }).nullable(), stats: EpicStats, created_at: z.string().datetime({ offset: true }).nullable(), }); const CreateEpic = z.object({ description: z.string().max(100000).optional(), labels: z.array(CreateLabelParams).optional(), completed_at_override: z.string().datetime({ offset: true }).optional(), objective_ids: z.array(z.number().int()).optional(), name: z.string().min(1).max(256), planned_start_date: z.string().datetime({ offset: true }).nullish(), state: z.enum(["in progress", "to do", "done"]).optional(), milestone_id: z.number().int().nullish(), requested_by_id: z.string().uuid().optional(), epic_state_id: z.number().int().optional(), started_at_override: z.string().datetime({ offset: true }).optional(), group_id: z.string().uuid().nullish(), updated_at: z.string().datetime({ offset: true }).optional(), follower_ids: z.array(z.string().uuid()).optional(), group_ids: z.array(z.string().uuid()).optional(), converted_from_story_id: z.number().int().nullish(), owner_ids: z.array(z.string().uuid()).optional(), external_id: z.string().max(128).optional(), deadline: z.string().datetime({ offset: true }).nullish(), created_at: z.string().datetime({ offset: true }).optional(), }); const ThreadedComment: z.ZodType<ThreadedComment> = z.lazy(() => z.object({ app_url: z.string(), entity_type: z.string(), deleted: z.boolean(), mention_ids: z.array(z.string().uuid()), author_id: z.string().uuid(), member_mention_ids: z.array(z.string().uuid()), comments: z.array(ThreadedComment), updated_at: z.string().datetime({ offset: true }), group_mention_ids: z.array(z.string().uuid()), external_id: z.string().nullable(), id: z.number().int(), created_at: z.string().datetime({ offset: true }), text: z.string(), }) ); const Health = z.object({ entity_type: z.string(), author_id: z.string().uuid().optional(), epic_id: z.number().int().optional(), objective_id: z.number().int().optional(), updated_at: z.string().datetime({ offset: true }).optional(), status: z.enum(["At Risk", "On Track", "Off Track", "No Health"]), id: z.string().uuid().nullable(), created_at: z.string().datetime({ offset: true }).optional(), text: z.string().optional(), }); const Epic = z.object({ app_url: z.string(), description: z.string(), archived: z.boolean(), started: z.boolean(), entity_type: z.string(), labels: z.array(LabelSlim), mention_ids: z.array(z.string().uuid()), member_mention_ids: z.array(z.string().uuid()), associated_groups: z.array(EpicAssociatedGroup), project_ids: z.array(z.number().int()), stories_without_projects: z.number().int(), completed_at_override: z.string().datetime({ offset: true }).nullable(), productboard_plugin_id: z.string().uuid().nullable(), started_at: z.string().datetime({ offset: true }).nullable(), completed_at: z.string().datetime({ offset: true }).nullable(), objective_ids: z.array(z.number().int()), name: z.string(), global_id: z.string(), completed: z.boolean(), comments: z.array(ThreadedComment), productboard_url: z.string().nullable(), planned_start_date: z.string().datetime({ offset: true }).nullable(), state: z.string(), milestone_id: z.number().int().nullable(), requested_by_id: z.string().uuid(), epic_state_id: z.number().int(), label_ids: z.array(z.number().int()), started_at_override: z.string().datetime({ offset: true }).nullable(), group_id: z.string().uuid().nullable(), updated_at: z.string().datetime({ offset: true }).nullable(), group_mention_ids: z.array(z.string().uuid()), productboard_id: z.string().uuid().nullable(), follower_ids: z.array(z.string().uuid()), group_ids: z.array(z.string().uuid()), owner_ids: z.array(z.string().uuid()), external_id: z.string().nullable(), id: z.number().int(), health: Health.optional(), position: z.number().int(), productboard_name: z.string().nullable(), deadline: z.string().datetime({ offset: true }).nullable(), stats: EpicStats, created_at: z.string().datetime({ offset: true }).nullable(), }); const EpicPaginatedResults = z.object({ data: z.array(EpicSlim), next: z.number().int().nullable(), total: z.number().int(), }); const UpdateEpic = z .object({ description: z.string().max(100000), archived: z.boolean(), labels: z.array(CreateLabelParams), completed_at_override: z.string().datetime({ offset: true }).nullable(), objective_ids: z.array(z.number().int()), name: z.string().min(1).max(256), planned_start_date: z.string().datetime({ offset: true }).nullable(), state: z.enum(["in progress", "to do", "done"]), milestone_id: z.number().int().nullable(), requested_by_id: z.string().uuid(), epic_state_id: z.number().int(), started_at_override: z.string().datetime({ offset: true }).nullable(), group_id: z.string().uuid().nullable(), follower_ids: z.array(z.string().uuid()), group_ids: z.array(z.string().uuid()), owner_ids: z.array(z.string().uuid()), external_id: z.string().max(128), before_id: z.number().int(), after_id: z.number().int(), deadline: z.string().datetime({ offset: true }).nullable(), }) .partial(); const CreateEpicComment = z.object({ text: z.string().min(1).max(100000), author_id: z.string().uuid().optional(), created_at: z.string().datetime({ offset: true }).optional(), updated_at: z.string().datetime({ offset: true }).optional(), external_id: z.string().max(128).optional(), }); const CreateCommentComment = z.object({ text: z.string().min(1).max(100000), author_id: z.string().uuid().optional(), created_at: z.string().datetime({ offset: true }).optional(), updated_at: z.string().datetime({ offset: true }).optional(), external_id: z.string().max(128).optional(), }); const UpdateComment = z.object({ text: z.string() }); const CreateEpicHealth = z.object({ status: z.enum(["At Risk", "On Track", "Off Track", "No Health"]), text: z.string().optional(), }); const TypedStoryLink = z.object({ entity_type: z.string(), object_id: z.number().int(), verb: z.string(), type: z.string(), updated_at: z.string().datetime({ offset: true }), id: z.number().int(), subject_id: z.number().int(), subject_workflow_state_id: z.number().int(), created_at: z.string().datetime({ offset: true }), }); const SyncedItem = z.object({ external_id: z.string(), url: z.string() }); const StoryCustomField = z.object({ field_id: z.string().uuid(), value_id: z.string().uuid(), value: z.string(), }); const StoryStats = z.object({ num_related_documents: z.number().int() }); const StorySlim = z.object({ app_url: z.string(), description: z.string().optional(), archived: z.boolean(), started: z.boolean(), story_links: z.array(TypedStoryLink), entity_type: z.string(), labels: z.array(LabelSlim), task_ids: z.array(z.number().int()), mention_ids: z.array(z.string().uuid()), synced_item: SyncedItem.optional(), member_mention_ids: z.array(z.string().uuid()), story_type: z.string(), custom_fields: z.array(StoryCustomField).optional(), file_ids: z.array(z.number().int()), num_tasks_completed: z.number().int(), workflow_id: z.number().int(), completed_at_override: z.string().datetime({ offset: true }).nullable(), started_at: z.string().datetime({ offset: true }).nullable(), completed_at: z.string().datetime({ offset: true }).nullable(), name: z.string(), global_id: z.string(), completed: z.boolean(), blocker: z.boolean(), epic_id: z.number().int().nullable(), story_template_id: z.string().uuid().nullable(), external_links: z.array(z.string()), previous_iteration_ids: z.array(z.number().int()), requested_by_id: z.string().uuid(), iteration_id: z.number().int().nullable(), sub_task_story_ids: z.array(z.number().int()).optional(), formatted_vcs_branch_name: z.string().nullish(), label_ids: z.array(z.number().int()), started_at_override: z.string().datetime({ offset: true }).nullable(), group_id: z.string().uuid().nullable(), workflow_state_id: z.number().int(), updated_at: z.string().datetime({ offset: true }).nullable(), group_mention_ids: z.array(z.string().uuid()), follower_ids: z.array(z.string().uuid()), owner_ids: z.array(z.string().uuid()), external_id: z.string().nullable(), id: z.number().int(), lead_time: z.number().int().optional(), parent_story_id: z.number().int().nullish(), estimate: z.number().int().nullable(), position: z.number().int(), blocked: z.boolean(), project_id: z.number().int().nullable(), linked_file_ids: z.array(z.number().int()), deadline: z.string().datetime({ offset: true }).nullable(), stats: StoryStats, comment_ids: z.array(z.number().int()), cycle_time: z.number().int().optional(), created_at: z.string().datetime({ offset: true }), moved_at: z.string().datetime({ offset: true }).nullable(), }); const uploadFiles_Body = z .object({ story_id: z.number().int().optional(), file0: z.instanceof(File), file1: z.instanceof(File).optional(), file2: z.instanceof(File).optional(), file3: z.instanceof(File).optional(), }) .passthrough(); const UpdateFile = z .object({ description: z.string().max(4096), created_at: z.string().datetime({ offset: true }), updated_at: z.string().datetime({ offset: true }), name: z.string().min(1).max(1024), uploader_id: z.string().uuid(), external_id: z.string().max(128), }) .partial(); const Icon = z.object({ entity_type: z.string(), id: z.string().uuid(), created_at: z.string().datetime({ offset: true }), updated_at: z.string().datetime({ offset: true }), url: z.string(), }); const Group = z.object({ app_url: z.string(), description: z.string(), archived: z.boolean(), entity_type: z.string(), color: z .string() .min(1) .regex(/^#[a-fA-F0-9]{6}$/) .nullable(), num_stories_started: z.number().int(), mention_name: z .string() .min(1) .regex(/^[a-z0-9\-\_\.]+$/), name: z.string(), global_id: z.string(), color_key: z .enum([ "blue", "purple", "midnight-blue", "orange", "yellow-green", "brass", "gray", "fuchsia", "yellow", "pink", "sky-blue", "green", "red", "black", "slate", "turquoise", ]) .nullable(), num_stories: z.number().int(), num_epics_started: z.number().int(), num_stories_backlog: z.number().int(), id: z.string().uuid(), display_icon: Icon, default_workflow_id: z.number().int().nullish(), member_ids: z.array(z.string().uuid()), workflow_ids: z.array(z.number().int()), }); const CreateGroup = z.object({ description: z.string().max(4096).optional(), member_ids: z.array(z.string().uuid()).optional(), workflow_ids: z.array(z.number().int()).optional(), name: z.string().min(1).max(63), mention_name: z.string().min(1).max(63), color: z .string() .min(1) .regex(/^#[a-fA-F0-9]{6}$/) .optional(), color_key: z .enum([ "blue", "purple", "midnight-blue", "orange", "yellow-green", "brass", "gray", "fuchsia", "yellow", "pink", "sky-blue", "green", "red", "black", "slate", "turquoise", ]) .optional(), display_icon_id: z.string().uuid().optional(), }); const UnusableEntitlementError = z.object({ reason_tag: z.literal("entitlement-violation"), entitlement_tag: z.string().min(1).max(63), message: z.string().min(1).max(256), }); const UpdateGroup = z .object({ description: z.string().max(4096), archived: z.boolean().nullable(), color: z .string() .min(1) .regex(/^#[a-fA-F0-9]{6}$/) .nullable(), display_icon_id: z.string().uuid().nullable(), mention_name: z.string().min(1).max(63), name: z.string().min(1).max(63), color_key: z.enum([ "blue", "purple", "midnight-blue", "orange", "yellow-green", "brass", "gray", "fuchsia", "yellow", "pink", "sky-blue", "green", "red", "black", "slate", "turquoise", ]), default_workflow_id: z.number().int().nullable(), member_ids: z.array(z.string().uuid()), workflow_ids: z.array(z.number().int()), }) .partial(); const UpdateHealth = z .object({ status: z.enum(["At Risk", "On Track", "Off Track", "No Health"]), text: z.string(), }) .partial(); const CreateGenericIntegration = z.object({ webhook_url: z .string() .max(2048) .regex(/^https?:\/\/.+$/), secret: z.string().min(1).max(128).optional(), }); const LabelStats = z.object({ num_related_documents: z.number().int(), num_epics: z.number().int(), num_stories_unstarted: z.number().int(), num_stories_total: z.number().int(), num_epics_unstarted: z.number().int(), num_epics_in_progress: z.number().int(), num_points_unstarted: z.number().int(), num_stories_unestimated: z.number().int(), num_points_in_progress: z.number().int(), num_epics_total: z.number().int(), num_stories_completed: z.number().int(), num_points_completed: z.number().int(), num_stories_backlog: z.number().int(), num_points_total: z.number().int(), num_stories_in_progress: z.number().int(), num_points_backlog: z.number().int(), num_epics_completed: z.number().int(), }); const Label = z.object({ app_url: z.string(), description: z.string().nullable(), archived: z.boolean(), entity_type: z.string(), color: z .string() .min(1) .regex(/^#[a-fA-F0-9]{6}$/) .nullable(), name: z.string(), global_id: z.string(), updated_at: z.string().datetime({ offset: true }).nullable(), external_id: z.string().nullable(), id: z.number().int(), stats: LabelStats.optional(), created_at: z.string().datetime({ offset: true }).nullable(), }); const IterationAssociatedGroup = z.object({ group_id: z.string().uuid(), associated_stories_count: z.number().int().optional(), }); const IterationStats = z.object({ num_points_done: z.number().int(), num_related_documents: z.number().int(), average_cycle_time: z.number().int().optional(), num_stories_unstarted: z.number().int(), num_points_started: z.number().int(), num_points_unstarted: z.number().int(), num_stories_started: z.number().int(), num_stories_unestimated: z.number().int(), num_stories_backlog: z.number().int(), average_lead_time: z.number().int().optional(), num_points_backlog: z.number().int(), num_points: z.number().int(), num_stories_done: z.number().int(), }); const IterationSlim = z.object({ app_url: z.string(), entity_type: z.string(), labels: z.array(Label), mention_ids: z.array(z.string().uuid()), member_mention_ids: z.array(z.string().uuid()), associated_groups: z.array(IterationAssociatedGroup), name: z.string(), global_id: z.string(), label_ids: z.array(z.number().int()), updated_at: z.string().datetime({ offset: true }), group_mention_ids: z.array(z.string().uuid()), end_date: z.string().datetime({ offset: true }), follower_ids: z.array(z.string().uuid()), group_ids: z.array(z.string().uuid()), start_date: z.string().datetime({ offset: true }), status: z.string(), id: z.number().int(), stats: IterationStats, created_at: z.string().datetime({ offset: true }), }); const CreateIteration = z.object({ follower_ids: z.array(z.string().uuid()).optional(), group_ids: z.array(z.string().uuid()).optional(), labels: z.array(CreateLabelParams).optional(), description: z.string().max(100000).optional(), name: z.string().min(1).max(256), start_date: z.string().min(1), end_date: z.string().min(1), }); const Iteration = z.object({ app_url: z.string(), description: z.string(), entity_type: z.string(), labels: z.array(Label), mention_ids: z.array(z.string().uuid()), member_mention_ids: z.array(z.string().uuid()), associated_groups: z.array(IterationAssociatedGroup), name: z.string(), global_id: z.string(), label_ids: z.array(z.number().int()), updated_at: z.string().datetime({ offset: true }), group_mention_ids: z.array(z.string().uuid()), end_date: z.string().datetime({ offset: true }), follower_ids: z.array(z.string().uuid()), group_ids: z.array(z.string().uuid()), start_date: z.string().datetime({ offset: true }), status: z.string(), id: z.number().int(), stats: IterationStats, created_at: z.string().datetime({ offset: true }), }); const UpdateIteration = z .object({ follower_ids: z.array(z.string().uuid()), group_ids: z.array(z.string().uuid()), labels: z.array(CreateLabelParams), description: z.string().max(100000), name: z.string().min(1).max(256), start_date: z.string().min(1), end_date: z.string().min(1), }) .partial(); const KeyResultValue = z .object({ numeric_value: z.string(), boolean_value: z.boolean() }) .partial(); const KeyResult = z.object({ id: z.string().uuid(), name: z.string(), objective_id: z.number().int(), type: z.enum(["percent", "boolean", "numeric"]), initial_observed_value: KeyResultValue, current_observed_value: KeyResultValue, current_target_value: KeyResultValue, progress: z.number().int(), }); const UpdateKeyResult = z .object({ name: z.string().max(1024), initial_observed_value: KeyResultValue, observed_value: KeyResultValue, target_value: KeyResultValue, }) .partial(); const UpdateLabel = z .object({ name: z.string().min(1).max(128), description: z.string().max(1024), color: z .string() .min(1) .regex(/^#[a-fA-F0-9]{6}$/) .nullable(), archived: z.boolean(), }) .partial(); const CreateLinkedFile = z.object({ description: z.string().max(512).optional(), story_id: z.number().int().optional(), name: z.string().min(1).max(256), thumbnail_url: z .string() .max(2048) .regex(/^https?:\/\/.+$/) .optional(), type: z.enum(["google", "url", "dropbox", "box", "onedrive"]), size: z.number().int().optional(), uploader_id: z.string().uuid().optional(), content_type: z.string().max(128).optional(), url: z .string() .max(2048) .regex(/^https?:\/\/.+$/), }); const UpdateLinkedFile = z .object({ description: z.string().max(512), story_id: z.number().int(), name: z.string().min(1), thumbnail_url: z .string() .max(2048) .regex(/^https?:\/\/.+$/), type: z.enum(["google", "url", "dropbox", "box", "onedrive"]), size: z.number().int(), uploader_id: z.string().uuid(), url: z .string() .max(2048) .regex(/^https?:\/\/.+$/), }) .partial(); const BasicWorkspaceInfo = z.object({ id: z.string().uuid(), created_at: z.string().datetime({ offset: true }), default_workflow_id: z.number().int(), estimate_scale: z.array(z.number().int()), name: z.string(), url_slug: z.string(), utc_offset: z.string(), }); const MemberInfoOrganization2 = z.object({ id: z.string().uuid() }); const MemberInfo = z.object({ id: z.string().uuid(), is_owner: z.boolean(), mention_name: z.string(), name: z.string(), role: z.string(), workspace2: BasicWorkspaceInfo, organization2: MemberInfoOrganization2, }); const Profile = z.object({ entity_type: z.string(), deactivated: z.boolean(), two_factor_auth_activated: z.boolean().optional(), mention_name: z.string(), name: z.string().nullable(), is_agent: z.boolean().optional(), gravatar_hash: z.string().nullable(), id: z.string().uuid(), display_icon: Icon, is_owner: z.boolean(), email_address: z.string().nullable(), }); const Member = z.object({ role: z.string(), entity_type: z.string(), disabled: z.boolean(), global_id: z.string(), state: z.enum(["partial", "full", "disabled", "imported"]), updated_at: z.string().datetime({ offset: true }).nullable(), created_without_invite: z.boolean(), group_ids: z.array(z.string().uuid()), id: z.string().uuid(), profile: Profile, created_at: z.string().datetime({ offset: true }).nullable(), replaced_by: z.string().uuid().optional(), }); const CreateCategoryParams = z.object({ name: z.string().min(1).max(128), color: z .string() .min(1) .regex(/^#[a-fA-F0-9]{6}$/) .optional(), external_id: z.string().min(1).max(128).optional(), }); const CreateMilestone = z.object({ name: z.string().min(1).max(256), description: z.string().max(100000).optional(), state: z.enum(["in progress", "to do", "done"]).optional(), started_at_override: z.string().datetime({ offset: true }).optional(), completed_at_override: z.string().datetime({ offset: true }).optional(), categories: z.array(CreateCategoryParams).optional(), }); const UpdateMilestone = z .object({ description: z.string().max(100000), archived: z.boolean(), completed_at_override: z.string().datetime({ offset: true }).nullable(), name: z.string().min(1).max(256), state: z.enum(["in progress", "to do", "done"]), started_at_override: z.string().datetime({ offset: true }).nullable(), categories: z.array(CreateCategoryParams), before_id: z.number().int(), after_id: z.number().int(), }) .partial(); const ObjectiveStats = z.object({ average_cycle_time: z.number().int().optional(), average_lead_time: z.number().int().optional(), num_related_documents: z.number().int(), }); const Objective = z.object({ app_url: z.string(), description: z.string(), archived: z.boolean(), started: z.boolean(), entity_type: z.string(), completed_at_override: z.string().datetime({ offset: true }).nullable(), started_at: z.string().datetime({ offset: true }).nullable(), completed_at: z.string().datetime({ offset: true }).nullable(), name: z.string(), global_id: z.string(), completed: z.boolean(), state: z.string(), started_at_override: z.string().datetime({ offset: true }).nullable(), updated_at: z.string().datetime({ offset: true }), categories: z.array(Category), id: z.number().int(), key_result_ids: z.array(z.string().uuid()), position: z.number().int(), stats: ObjectiveStats, created_at: z.string().datetime({ offset: true }), }); const CreateObjective = z.object({ name: z.string().min(1).max(256), description: z.string().max(100000).optional(), state: z.enum(["in progress", "to do", "done"]).optional(), started_at_override: z.string().datetime({ offset: true }).optional(), completed_at_override: z.string().datetime({ offset: true }).optional(), categories: z.array(CreateCategoryParams).optional(), }); const UpdateObjective = z .object({ description: z.string().max(100000), archived: z.boolean(), completed_at_override: z.string().datetime({ offset: true }).nullable(), name: z.string().min(1).max(256), state: z.enum(["in progress", "to do", "done"]), started_at_override: z.string().datetime({ offset: true }).nullable(), categories: z.array(CreateCategoryParams), before_id: z.number().int(), after_id: z.number().int(), }) .partial(); const ProjectStats = z.object({ num_stories: z.number().int(), num_points: z.number().int(), num_related_documents: z.number().int(), }); const Project = z.object({ app_url: z.string(), description: z.string().nullable(), archived: z.boolean(), entity_type: z.string(), days_to_thermometer: z.number().int(), color: z .string() .min(1) .regex(/^#[a-fA-F0-9]{6}$/) .nullable(), workflow_id: z.number().int(), name: z.string(), global_id: z.string(), start_time: z.string().datetime({ offset: true }), updated_at: z.string().datetime({ offset: true }).nullable(), follower_ids: z.array(z.string().uuid()), external_id: z.string().nullable(), id: z.number().int(), show_thermometer: z.boolean(), team_id: z.number().int(), iteration_length: z.number().int(), abbreviation: z.string().nullable(), stats: ProjectStats, created_at: z.string().datetime({ offset: true }).nullable(), }); const CreateProject = z.object({ description: z.string().max(100000).optional(), color: z .string() .min(1) .regex(/^#[a-fA-F0-9]{6}$/) .optional(), name: z.string().min(1).max(128), start_time: z.string().datetime({ offset: true }).optional(), updated_at: z.string().datetime({ offset: true }).optional(), follower_ids: z.array(z.string().uuid()).optional(), external_id: z.string().max(128).optional(), team_id: z.number().int(), iteration_length: z.number().int().optional(), abbreviation: z.string().max(63).optional(), created_at: z.string().datetime({ offset: true }).optional(), }); const UpdateProject = z .object({ description: z.string().max(100000), archived: z.boolean(), days_to_thermometer: z.number().int(), color: z .string() .min(1) .regex(/^#[a-fA-F0-9]{6}$/), name: z.string().min(1).max(128), follower_ids: z.array(z.string().uuid()), show_thermometer: z.boolean(), team_id: z.number().int(), abbreviation: z.string(), }) .partial(); const Repository = z.object({ entity_type: z.string(), name: z.string().nullable(), type: z.enum(["github", "gitlab", "bitbucket"]), updated_at: z.string().datetime({ offset: true }).nullable(), external_id: z.string().nullable(), id: z.number().int().nullable(), url: z.string().nullable(), full_name: z.string().nullable(), created_at: z.string().datetime({ offset: true }).nullable(), }); const EpicSearchResult = z.object({ app_url: z.string(), description: z.string().optional(), archived: z.boolean(), started: z.boolean(), entity_type: z.string(), labels: z.array(LabelSlim), mention_ids: z.array(z.string().uuid()), member_mention_ids: z.array(z.string().uuid()), associated_groups: z.array(EpicAssociatedGroup), project_ids: z.array(z.number().int()), stories_without_projects: z.number().int(), completed_at_override: z.string().datetime({ offset: true }).nullable(), productboard_plugin_id: z.string().uuid().nullable(), started_at: z.string().datetime({ offset: true }).nullable(), completed_at: z.string().datetime({ offset: true }).nullable(), objective_ids: z.array(z.number().int()), name: z.string(), global_id: z.string(), completed: z.boolean(), comments: z.array(ThreadedComment).optional(), productboard_url: z.string().nullable(), planned_start_date: z.string().datetime({ offset: true }).nullable(), state: z.string(), milestone_id: z.number().int().nullable(), requested_by_id: z.string().uuid(), epic_state_id: z.number().int(), label_ids: z.array(z.number().int()), started_at_override: z.string().datetime({ offset: true }).nullable(), group_id: z.string().uuid().nullable(), updated_at: z.string().datetime({ offset: true }).nullable(), group_mention_ids: z.array(z.string().uuid()), productboard_id: z.string().uuid().nullable(), follower_ids: z.array(z.string().uuid()), group_ids: z.array(z.string().uuid()), owner_ids: z.array(z.string().uuid()), external_id: z.string().nullable(), id: z.number().int(), health: Health.optional(), position: z.number().int(), productboard_name: z.string().nullable(), deadline: z.string().datetime({ offset: true }).nullable(), stats: EpicStats, created_at: z.string().datetime({ offset: true }).nullable(), }); const EpicSearchResults = z.object({ total: z.number().int(), data: z.array(EpicSearchResult), next: z.string().nullable(), }); const StoryReaction = z.object({ emoji: z.string(), permission_ids: z.array(z.string().uuid()), }); const StoryComment = z.object({ app_url: z.string(), entity_type: z.string(), deleted: z.boolean(), story_id: z.number().int(), mention_ids: z.array(z.string().uuid()), author_id: z.string().uuid().nullable(), member_mention_ids: z.array(z.string().uuid()), blocker: z.boolean().optional(), linked_to_slack: z.boolean(), updated_at: z.string().datetime({ offset: true }).nullable(), group_mention_ids: z.array(z.string().uuid()), external_id: z.string().nullable(), parent_id: z.number().int().nullish(), id: z.number().int(), position: z.number().int(), unblocks_parent: z.boolean().optional(), reactions: z.array(StoryReaction), created_at: z.string().datetime({ offset: true }), text: z.string().nullable(), }); const PullRequestLabel = z.object({ entity_type: z.string(), id: z.number().int(), color: z .string() .min(1) .regex(/^#[a-fA-F0-9]{6}$/), description: z.string().nullish(), name: z.string(), }); const PullRequest = z.object({ entity_type: z.string(), closed: z.boolean(), merged: z.boolean(), num_added: z.number().int(), branch_id: z.number().int(), overlapping_stories: z.array(z.number().int()).optional(), number: z.number().int(), branch_name: z.string(), target_branch_name: z.string(), num_commits: z.number().int().nullable(), title: z.string(), updated_at: z.string().datetime({ offset: true }), has_overlapping_stories: z.boolean(), draft: z.boolean(), id: z.number().int(), vcs_labels: z.array(PullRequestLabel).nullish(), url: z.string(), num_removed: z.number().int(), review_status: z.string().optional(), num_modified: z.number().int().nullable(), build_status: z.string().optional(), target_branch_id: z.number().int(), repository_id: z.number().int(), created_at: z.string().datetime({ offset: true }), }); const Branch = z.object({ entity_type: z.string(), deleted: z.boolean(), name: z.string(), persistent: z.boolean(), updated_at: z.string().datetime({ offset: true }).nullable(), pull_requests: z.array(PullRequest), merged_branch_ids: z.array(z.number().int()), id: z.number().int().nullable(), url: z.string(), repository_id: z.number().int(), created_at: z.string().datetime({ offset: true }).nullable(), }); const Task = z.object({ description: z.string(), entity_type: z.string(), story_id: z.number().int(), mention_ids: z.array(z.string().uuid()), member_mention_ids: z.array(z.string().uuid()), completed_at: z.string().datetime({ offset: true }).nullable(), global_id: z.string(), updated_at: z.string().datetime({ offset: true }).nullable(), group_mention_ids: z.array(z.string().uuid()), owner_ids: z.array(z.string().uuid()), external_id: z.string().nullable(), id: z.number().int(), position: z.number().int(), complete: z.boolean(), created_at: z.string().datetime({ offset: true }), }); const Identity = z.object({ entity_type: z.string(), name: z.string().nullable(), type: z.enum(["slack", "github", "gitlab", "bitbucket"]).nullable(), }); const Commit = z.object({ entity_type: z.string(), author_id: z.string().uuid().nullable(), hash: z.string(), updated_at: z.string().datetime({ offset: true }).nullable(), id: z.number().int().nullable(), url: z.string(), author_email: z.string(), timestamp: z.string().datetime({ offset: true }), author_identity: Identity, repository_id: z.number().int().nullable(), created_at: z.string().datetime({ offset: true }), message: z.string(), }); const StorySearchResult = z.object({ app_url: z.string(), description: z.string().optional(), archived: z.boolean(), started: z.boolean(), story_links: z.array(TypedStoryLink), entity_type: z.string(), labels: z.array(LabelSlim), task_ids: z.array(z.number().int()).optional(), mention_ids: z.array(z.string().uuid()), synced_item: SyncedItem.optional(), member_mention_ids: z.array(z.string().uuid()), story_type: z.string(), custom_fields: z.array(StoryCustomField).optional(), linked_files: z.array(LinkedFile).optional(), file_ids: z.array(z.number().int()).optional(), num_tasks_completed: z.number().int().optional(), workflow_id: z.number().int(), completed_at_override: z.string().datetime({ offset: true }).nullable(), started_at: z.string().datetime({ offset: true }).nullable(), completed_at: z.string().datetime({ offset: true }).nullable(), name: z.string(), global_id: z.string(), completed: z.boolean(), comments: z.array(StoryComment).optional(), blocker: z.boolean(), branches: z.array(Branch).optional(), epic_id: z.number().int().nullable(), story_template_id: z.string().uuid().nullable(), external_links: z.array(z.string()), previous_iteration_ids: z.array(z.number().int()), requested_by_id: z.string().uuid(), iteration_id: z.number().int().nullable(), sub_task_story_ids: z.array(z.number().int()).optional(), tasks: z.array(Task).optional(), formatted_vcs_branch_name: z.string().nullish(), label_ids: z.array(z.number().int()), started_at_override: z.string().datetime({ offset: true }).nullable(), group_id: z.string().uuid().nullable(), workflow_state_id: z.number().int(), updated_at: z.string().datetime({ offset: true }).nullable(), pull_requests: z.array(PullRequest).optional(), group_mention_ids: z.array(z.string().uuid()), follower_ids: z.array(z.string().uuid()), owner_ids: z.array(z.string().uuid()), external_id: z.string().nullable(), id: z.number().int(), lead_time: z.number().int().optional(), parent_story_id: z.number().int().nullish(), estimate: z.number().int().nullable(), commits: z.array(Commit).optional(), files: z.array(UploadedFile).optional(), position: z.number().int(), blocked: z.boolean(), project_id: z.number().int().nullable(), linked_file_ids: z.array(z.number().int()).optional(), deadline: z.string().datetime({ offset: true }).nullable(), stats: StoryStats, comment_ids: z.array(z.number().int()).optional(), cycle_time: z.number().int().optional(), created_at: z.string().datetime({ offset: true }), moved_at: z.string().datetime({ offset: true }).nullable(), }); const StorySearchResults = z.object({ total: z.number().int(), data: z.array(StorySearchResult), next: z.string().nullable(), }); const IterationSearchResults = z.object({ total: z.number().int(), data: z.array(IterationSlim), next: z.string().nullable(), }); const ObjectiveSearchResult = z.object({ app_url: z.string(), description: z.string().optional(), archived: z.boolean(), started: z.boolean(), entity_type: z.string(), completed_at_override: z.string().datetime({ offset: true }).nullable(), started_at: z.string().datetime({ offset: true }).nullable(), completed_at: z.string().datetime({ offset: true }).nullable(), name: z.string(), global_id: z.string(), completed: z.boolean(), state: z.string(), started_at_override: z.string().datetime({ offset: true }).nullable(), updated_at: z.string().datetime({ offset: true }), categories: z.array(Category), id: z.number().int(), key_result_ids: z.array(z.string().uuid()), position: z.number().int(), stats: MilestoneStats, created_at: z.string().datetime({ offset: true }), }); const ObjectiveSearchResults = z.object({ total: z.number().int(), data: z.array(ObjectiveSearchResult), next: z.string().nullable(), }); const SearchResults = z .object({ epics: EpicSearchResults, stories: StorySearchResults, iterations: IterationSearchResults, milestones: ObjectiveSearchResults, }) .partial(); const MaxSearchResultsExceededError = z.object({ error: z.literal("maximum-results-exceeded"), message: z.string(), "maximum-results": z.literal(1000), }); const CreateStoryLinkParams = z.object({ subject_id: z.number().int().optional(), verb: z.enum(["blocks", "duplicates", "relates to"]), object_id: z.number().int().optional(), }); const CreateStoryCommentParams = z.object({ text: z.string().max(100000), author_id: z.string().uuid().optional(), created_at: z.string().datetime({ offset: true }).optional(), updated_at: z.string().datetime({ offset: true }).optional(), external_id: z.string().max(1024).optional(), parent_id: z.number().int().nullish(), }); const LinkSubTaskParams = z.object({ story_id: z.number().int() }); const CreateTaskParams = z.object({ description: z.string().min(1).max(2048), complete: z.boolean().optional(), owner_ids: z.array(z.string().uuid()).optional(), external_id: z.string().max(128).optional(), created_at: z.string().datetime({ offset: true }).optional(), updated_at: z.string().datetime({ offset: true }).optional(), }); const CreateStoryParams = z.object({ description: z.string().max(100000).optional(), archived: z.boolean().optional(), story_links: z.array(CreateStoryLinkParams).optional(), labels: z.array(CreateLabelParams).optional(), story_type: z.enum(["feature", "chore", "bug"]).optional(), custom_fields: z.array(CustomFieldValueParams).optional(), move_to: z.enum(["last", "first"]).optional(), file_ids: z.array(z.number().int()).optional(), source_task_id: z.number().int().nullish(), completed_at_override: z.string().datetime({ offset: true }).optional(), name: z.string().min(1).max(512), comments: z.array(CreateStoryCommentParams).optional(), epic_id: z.number().int().nullish(), story_template_id: z.string().uuid().nullish(), external_links: z.array(z.string()).optional(), sub_tasks: z .array(z.union([LinkSubTaskParams, CreateSubTaskParams])) .optional(), requested_by_id: z.string().uuid().optional(), iteration_id: z.number().int().nullish(), tasks: z.array(CreateTaskParams).optional(), started_at_override: z.string().datetime({ offset: true }).optional(), group_id: z.string().uuid().nullish(), workflow_state_id: z.number().int().optional(), updated_at: z.string().datetime({ offset: true }).optional(), follower_ids: z.array(z.string().uuid()).optional(), owner_ids: z.array(z.string().uuid()).optional(), external_id: z.string().max(1024).optional(), parent_story_id: z.number().int().nullish(), estimate: z.number().int().nullish(), project_id: z.number().int().nullish(), linked_file_ids: z.array(z.number().int()).optional(), deadline: z.string().datetime({ offset: true }).nullish(), created_at: z.string().datetime({ offset: true }).optional(), }); const Story = z.object({ app_url: z.string(), description: z.string(), archived: z.boolean(), started: z.boolean(), story_links: z.array(TypedStoryLink), entity_type: z.string(), labels: z.array(LabelSlim), mention_ids: z.array(z.string().uuid()), synced_item: SyncedItem.optional(), member_mention_ids: z.array(z.string().uuid()), story_type: z.string(), custom_fields: z.array(StoryCustomField).optional(), linked_files: z.array(LinkedFile), workflow_id: z.number().int(), completed_at_override: z.string().datetime({ offset: true }).nullable(), started_at: z.string().datetime({ offset: true }).nullable(), completed_at: z.string().datetime({ offset: true }).nullable(), name: z.string(), global_id: z.string(), completed: z.boolean(), comments: z.array(StoryComment), blocker: z.boolean(), branches: z.array(Branch), epic_id: z.number().int().nullable(), story_template_id: z.string().uuid().nullable(), external_links: z.array(z.string()), previous_iteration_ids: z.array(z.number().int()), requested_by_id: z.string().uuid(), iteration_id: z.number().int().nullable(), sub_task_story_ids: z.array(z.number().int()).optional(), tasks: z.array(Task), formatted_vcs_branch_name: z.string().nullish(), label_ids: z.array(z.number().int()), started_at_override: z.string().datetime({ offset: true }).nullable(), group_id: z.string().uuid().nullable(), workflow_state_id: z.number().int(), updated_at: z.string().datetime({ offset: true }).nullable(), pull_requests: z.array(PullRequest), group_mention_ids: z.array(z.string().uuid()), follower_ids: z.array(z.string().uuid()), owner_ids: z.array(z.string().uuid()), external_id: z.string().nullable(), id: z.number().int(), lead_time: z.number().int().optional(), parent_story_id: z.number().int().nullish(), estimate: z.number().int().nullable(), commits: z.array(Commit), files: z.array(UploadedFile), position: z.number().int(), blocked: z.boolean(), project_id: z.number().int().nullable(), deadline: z.string().datetime({ offset: true }).nullable(), stats: StoryStats, cycle_time: z.number().int().optional(), created_at: z.string().datetime({ offset: true }), moved_at: z.string().datetime({ offset: true }).nullable(), }); const CreateStories = z.object({ stories: z.array(CreateStoryParams) }); const UpdateStories = z.object({ archived: z.boolean().optional(), story_ids: z.array(z.number().int()), story_type: z.enum(["feature", "chore", "bug"]).optional(), move_to: z.enum(["last", "first"]).optional(), follower_ids_add: z.array(z.string().uuid()).optional(), epic_id: z.number().int().nullish(), external_links: z.array(z.string()).optional(), follower_ids_remove: z.array(z.string().uuid()).optional(), requested_by_id: z.string().uuid().optional(), iteration_id: z.number().int().nullish(), custom_fields_remove: z.array(CustomFieldValueParams).optional(), labels_add: z.array(CreateLabelParams).optional(), group_id: z.string().uuid().nullish(), workflow_state_id: z.number().int().optional(), before_id: z.number().int().optional(), estimate: z.number().int().nullish(), after_id: z.number().int().optional(), owner_ids_remove: z.array(z.string().uuid()).optional(), custom_fields_add: z.array(CustomFieldValueParams).optional(), project_id: z.number().int().nullish(), labels_remove: z.array(CreateLabelParams).optional(), deadline: z.string().datetime({ offset: true }).nullish(), owner_ids_add: z.array(z.string().uuid()).optional(), }); const DeleteStories = z.object({ story_ids: z.array(z.number().int()) }); const RemoveCustomFieldParams = z.object({ field_id: z.string().uuid() }); const RemoveLabelParams = z.object({ name: z.string().min(1).max(128) }); const CreateStoryFromTemplateParams = z.object({ description: z.string().max(100000).optional(), archived: z.boolean().optional(), story_links: z.array(CreateStoryLinkParams).optional(), labels: z.array(CreateLabelParams).optional(), external_links_add: z.array(z.string()).optional(), story_type: z.enum(["feature", "chore", "bug"]).optional(), custom_fields: z.array(CustomFieldValueParams).optional(), move_to: z.enum(["last", "first"]).optional(), file_ids: z.array(z.number().int()).optional(), source_task_id: z.number().int().nullish(), completed_at_override: z.string().datetime({ offset: true }).optional(), name: z.string().min(1).max(512).optional(), file_ids_add: z.array(z.number().int()).optional(), file_ids_remove: z.array(z.number().int()).optional(), comments: z.array(CreateStoryCommentParams).optional(), follower_ids_add: z.array(z.string().uuid()).optional(), epic_id: z.number().int().nullish(), story_template_id: z.string().uuid(), external_links: z.array(z.string()).optional(), follower_ids_remove: z.array(z.string().uuid()).optional(), sub_tasks: z .array(z.union([LinkSubTaskParams, CreateSubTaskParams])) .optional(), linked_file_ids_remove: z.array(z.number().int()).optional(), requested_by_id: z.string().uuid().optional(), iteration_id: z.number().int().nullish(), custom_fields_remove: z.array(RemoveCustomFieldParams).optional(), tasks: z.array(CreateTaskParams).optional(), started_at_override: z.string().datetime({ offset: true }).optional(), labels_add: z.array(CreateLabelParams).optional(), group_id: z.string().uuid().nullish(), workflow_state_id: z.number().int().optional(), updated_at: z.string().datetime({ offset: true }).optional(), follower_ids: z.array(z.string().uuid()).optional(), owner_ids: z.array(z.string().uuid()).optional(), external_id: z.string().max(1024).optional(), parent_story_id: z.number().int().nullish(), estimate: z.number().int().nullish(), owner_ids_remove: z.array(z.string().uuid()).optional(), custom_fields_add: z.array(CustomFieldValueParams).optional(), project_id: z.number().int().nullish(), linked_file_ids_add: z.array(z.number().int()).optional(), linked_file_ids: z.array(z.number().int()).optional(), labels_remove: z.array(RemoveLabelParams).optional(), deadline: z.string().datetime({ offset: true }).nullish(), owner_ids_add: z.array(z.string().uuid()).optional(), created_at: z.string().datetime({ offset: true }).optional(), external_links_remove: z.array(z.string()).optional(), }); const SearchStories = z .object({ archived: z.boolean(), owner_id: z.string().uuid().nullable(), story_type: z.enum(["feature", "chore", "bug"]), epic_ids: z.array(z.number().int()), project_ids: z.array(z.number().int().nullable()), updated_at_end: z.string().datetime({ offset: true }), completed_at_end: z.string().datetime({ offset: true }), workflow_state_types: z.array( z.enum(["started", "backlog", "unstarted", "done"]) ), deadline_end: z.string().datetime({ offset: true }), created_at_start: z.string().datetime({ offset: true }), epic_id: z.number().int().nullable(), label_name: z.string().min(1), requested_by_id: z.string().uuid(), iteration_id: z.number().int().nullable(), label_ids: z.array(z.number().int()), group_id: z.string().uuid().nullable(), workflow_state_id: z.number().int(), iteration_ids: z.array(z.number().int()), created_at_end: z.string().datetime({ offset: true }), deadline_start: z.string().datetime({ offset: true }), group_ids: z.array(z.string().uuid()), owner_ids: z.array(z.string().uuid()), external_id: z.string().max(1024), includes_description: z.boolean(), estimate: z.number().int(), project_id: z.number().int().nullable(), completed_at_start: z.string().datetime({ offset: true }), updated_at_start: z.string().datetime({ offset: true }), }) .partial(); const UpdateStory = z .object({ description: z.string().max(100000), archived: z.boolean(), labels: z.array(CreateLabelParams), pull_request_ids: z.array(z.number().int()), story_type: z.enum(["feature", "chore", "bug"]), custom_fields: z.array(CustomFieldValueParams), move_to: z.enum(["last", "first"]), file_ids: z.array(z.number().int()), completed_at_override: z.string().datetime({ offset: true }).nullable(), name: z.string().min(1).max(512), epic_id: z.number().int().nullable(), external_links: z.array(z.string()), branch_ids: z.array(z.number().int()), commit_ids: z.array(z.number().int()), requested_by_id: z.string().uuid(), iteration_id: z.number().int().nullable(), started_at_override: z.string().datetime({ offset: true }).nullable(), group_id: z.string().uuid().nullable(), workflow_state_id: z.number().int(), follower_ids: z.array(z.string().uuid()), owner_ids: z.array(z.string().uuid()), parent_story_id: z.number().int().nullable(), before_id: z.number().int(), estimate: z.number().int().nullable(), after_id: z.number().int(), project_id: z.number().int().nullable(), linked_file_ids: z.array(z.number().int()), deadline: z.string().datetime({ offset: true }).nullable(), }) .partial(); const CreateStoryComment = z.object({ text: z.string().max(100000), author_id: z.string().uuid().optional(), created_at: z.string().datetime({ offset: true }).optional(), updated_at: z.string().datetime({ offset: true }).optional(), external_id: z.string().max(1024).optional(), parent_id: z.number().int().nullish(), }); const UpdateStoryComment = z.object({ text: z.string().max(100000) }); const CreateOrDeleteStoryReaction = z.object({ emoji: z.string() }); const HistoryReferenceBranch = z.object({ id: z.union([z.number(), z.string()]), entity_type: z.string(), name: z.string(), url: z .string() .max(2048) .regex(/^https?:\/\/.+$/), }); const HistoryReferenceCommit = z.object({ id: z.union([z.number(), z.string()]), entity_type: z.string(), message: z.string(), url: z .string() .max(2048) .regex(/^https?:\/\/.+$/), }); const HistoryReferenceEpic = z.object({ id: z.union([z.number(), z.string()]), entity_type: z.string(), app_url: z .string() .max(2048) .regex(/^https?:\/\/.+$/), name: z.string(), }); const HistoryReferenceGroup = z.object({ id: z.string().uuid(), entity_type: z.string(), name: z.string(), }); const HistoryReferenceIteration = z.object({ id: z.union([z.number(), z.string()]), entity_type: z.string(), app_url: z .string() .max(2048) .regex(/^https?:\/\/.+$/), name: z.string(), }); const HistoryReferenceLabel = z.object({ id: z.union([z.number(), z.string()]), entity_type: z.string(), app_url: z .string() .max(2048) .regex(/^https?:\/\/.+$/), name: z.string(), }); const HistoryReferenceProject = z.object({ id: z.union([z.number(), z.string()]), entity_type: z.string(), app_url: z .string() .max(2048) .regex(/^https?:\/\/.+$/), name: z.string(), }); const HistoryReferenceStory = z.object({ id: z.union([z.number(), z.string()]), entity_type: z.string(), app_url: z .string() .max(2048) .regex(/^https?:\/\/.+$/), name: z.string(), story_type: z.enum(["feature", "chore", "bug"]), }); const HistoryReferenceStoryTask = z.object({ id: z.union([z.number(), z.string()]), entity_type: z.string(), description: z.string(), }); const HistoryReferenceCustomFieldEnumValue = z.object({ id: z.union([z.number(), z.string()]), entity_type: z.string(), string_value: z.string().nullable(), enum_value_enabled: z.boolean().nullable(), field_id: z.string().uuid(), field_type: z.string(), field_name: z.string(), field_enabled: z.boolean(), }); const HistoryReferenceWorkflowState = z.object({ id: z.union([z.number(), z.string()]), entity_type: z.string(), type: z.enum(["started", "backlog", "unstarted", "done"]), name: z.string(), }); const HistoryReferenceGeneral = z.object({ id: z.union([z.number(), z.string()]), entity_type: z.string(), name: z.string(), }); const HistoryActionBranchCreate = z.object({ id: z.number().int(), entity_type: z.string(), name: z.string(), url: z.string(), action: z.literal("create"), }); const HistoryActionBranchMerge = z.object({ id: z.number().int(), entity_type: z.string(), name: z.string(), url: z.string(), action: z.literal("merge"), }); const HistoryActionBranchPush = z.object({ id: z.number().int(), entity_type: z.string(), name: z.string(), url: z.string(), action: z.literal("push"), }); const HistoryActionLabelCreate = z.object({ id: z.number().int(), entity_type: z.string(), action: z.literal("create"), app_url: z .string() .max(2048) .regex(/^https?:\/\/.+$/), name: z.string(), }); const HistoryActionLabelUpdate = z.object({ id: z.number().int(), entity_type: z.string(), action: z.literal("update"), }); const HistoryActionLabelDelete = z.object({ id: z.number().int(), entity_type: z.string(), action: z.literal("delete"), name: z.string(), }); const HistoryActionProjectUpdate = z.object({ id: z.number().int(), entity_type: z.string(), action: z.literal("update"), app_url: z .string() .max(2048) .regex(/^https?:\/\/.+$/), name: z.string(), }); const HistoryActionPullRequest = z.object({ id: z.number().int(), entity_type: z.string(), action: z.enum(["open", "update", "reopen", "close", "sync", "comment"]), number: z.number().int(), title: z.string(), url: z .string() .max(2048) .regex(/^https?:\/\/.+$/), }); const HistoryActionStoryCreate = z.object({ app_url: z .string() .max(2048) .regex(/^https?:\/\/.+$/), description: z.string().optional(), started: z.boolean().optional(), entity_type: z.string(), task_ids: z.array(z.number().int()).optional(), story_type: z.enum(["feature", "chore", "bug"]), name: z.string(), completed: z.boolean().optional(), blocker: z.boolean().optional(), epic_id: z.number().int().optional(), requested_by_id: z.string().uuid().optional(), iteration_id: z.number().int().nullish(), label_ids: z.array(z.number().int()).optional(), group_id: z.string().uuid().optional(), workflow_state_id: z.number().int().optional(), object_story_link_ids: z.array(z.number().int()).optional(), follower_ids: z.array(z.string().uuid()).optional(), owner_ids: z.array(z.string().uuid()).optional(), custom_field_value_ids: z.array(z.string().uuid()).optional(), id: z.number().int(), estimate: z.number().int().optional(), subject_story_link_ids: z.array(z.number().int()).optional(), action: z.literal("create"), blocked: z.boolean().optional(), project_id: z.number().int().optional(), deadline: z.string().optional(), }); const StoryHistoryChangeOldNewStr = z .object({ old: z.string().nullable(), new: z.string() }) .partial(); const StoryHistoryChangeOldNewBool = z .object({ old: z.boolean(), new: z.boolean() }) .partial(); const StoryHistoryChangeAddsRemovesInt = z .object({ adds: z.array(z.number().int()), removes: z.array(z.number().int()), }) .partial(); const StoryHistoryChangeAddsRemovesUuid = z .object({ adds: z.array(z.string().uuid()), removes: z.array(z.string().uuid()), }) .partial(); const StoryHistoryChangeOldNewInt = z .object({ old: z.number().int(), new: z.number().int() }) .partial(); const StoryHistoryChangeOldNewUuid = z .object({ old: z.string().uuid(), new: z.string().uuid() }) .partial(); const HistoryChangesStory = z .object({ description: StoryHistoryChangeOldNewStr, archived: StoryHistoryChangeOldNewBool, started: StoryHistoryChangeOldNewBool, task_ids: StoryHistoryChangeAddsRemovesInt, mention_ids: StoryHistoryChangeAddsRemovesUuid, story_type: StoryHistoryChangeOldNewStr, name: StoryHistoryChangeOldNewStr, completed: StoryHistoryChangeOldNewBool, blocker: StoryHistoryChangeOldNewBool, epic_id: StoryHistoryChangeOldNewInt, branch_ids: StoryHistoryChangeAddsRemovesInt, commit_ids: StoryHistoryChangeAddsRemovesInt, requested_by_id: StoryHistoryChangeOldNewUuid, iteration_id: StoryHistoryChangeOldNewInt, label_ids: StoryHistoryChangeAddsRemovesInt, group_id: StoryHistoryChangeOldNewUuid, workflow_state_id: StoryHistoryChangeOldNewInt, object_story_link_ids: StoryHistoryChangeAddsRemovesInt, follower_ids: StoryHistoryChangeAddsRemovesUuid, owner_ids: StoryHistoryChangeAddsRemovesUuid, custom_field_value_ids: StoryHistoryChangeAddsRemovesUuid, estimate: StoryHistoryChangeOldNewInt, subject_story_link_ids: StoryHistoryChangeAddsRemovesInt, blocked: StoryHistoryChangeOldNewBool, project_id: StoryHistoryChangeOldNewInt, deadline: StoryHistoryChangeOldNewStr, }) .partial(); const HistoryActionStoryUpdate = z.object({ id: z.number().int(), entity_type: z.string(), action: z.literal("update"), app_url: z .string() .max(2048) .regex(/^https?:\/\/.+$/), changes: HistoryChangesStory.optional(), name: z.string(), story_type: z.enum(["feature", "chore", "bug"]), }); const HistoryActionStoryDelete = z.object({ id: z.number().int(), entity_type: z.string(), action: z.literal("delete"), name: z.string(), story_type: z.enum(["feature", "chore", "bug"]), }); const HistoryActionStoryCommentCreate = z.object({ id: z.number().int(), entity_type: z.string(), action: z.literal("create"), app_url: z .string() .max(2048) .regex(/^https?:\/\/.+$/), text: z.string(), author_id: z.string().uuid(), }); const HistoryActionStoryLinkCreate = z.object({ id: z.number().int(), entity_type: z.string(), action: z.literal("create"), verb: z.enum(["blocks", "duplicates", "relates to"]), subject_id: z.number().int(), object_id: z.number().int(), }); const HistoryChangesStoryLink = z .object({ verb: StoryHistoryChangeOldNewStr, object_id: StoryHistoryChangeOldNewInt, subject_id: StoryHistoryChangeOldNewInt, }) .partial(); const HistoryActionStoryLinkUpdate = z.object({ id: z.number().int(), entity_type: z.string(), action: z.literal("update"), verb: z.enum(["blocks", "duplicates", "relates to"]), subject_id: z.number().int(), object_id: z.number().int(), changes: HistoryChangesStoryLink, }); const HistoryActionStoryLinkDelete = z.object({ id: z.number().int(), entity_type: z.string(), action: z.literal("delete"), verb: z.enum(["blocks", "duplicates", "relates to"]), subject_id: z.number().int().nullable(), object_id: z.number().int().nullable(), }); const HistoryActionTaskCreate = z.object({ description: z.string(), entity_type: z.string(), mention_ids: z.array(z.string().uuid()).optional(), group_mention_ids: z.array(z.string().uuid()).optional(), owner_ids: z.array(z.string().uuid()).optional(), id: z.number().int(), action: z.literal("create"), complete: z.boolean(), deadline: z.string().optional(), }); const HistoryChangesTask = z .object({ complete: StoryHistoryChangeOldNewBool, description: StoryHistoryChangeOldNewStr, mention_ids: StoryHistoryChangeAddsRemovesUuid, owner_ids: StoryHistoryChangeAddsRemovesUuid, }) .partial(); const HistoryActionTaskUpdate = z.object({ id: z.number().int(), entity_type: z.string(), action: z.literal("update"), changes: HistoryChangesTask, complete: z.boolean().optional(), description: z.string(), story_id: z.number().int(), }); const HistoryActionTaskDelete = z.object({ id: z.number().int(), entity_type: z.string(), action: z.literal("delete"), description: z.string(), }); const HistoryActionWorkspace2BulkUpdate = z.object({ id: z.string().uuid(), entity_type: z.string(), action: z.literal("bulk-update"), name: z.string(), }); const History = z.object({ actor_name: z.string().optional(), changed_at: z.string(), primary_id: z.union([z.number(), z.string()]).optional(), references: z .array( z.union([ HistoryReferenceBranch, HistoryReferenceCommit, HistoryReferenceEpic, HistoryReferenceGroup, HistoryReferenceIteration, HistoryReferenceLabel, HistoryReferenceProject, HistoryReferenceStory, HistoryReferenceStoryTask, HistoryReferenceCustomFieldEnumValue, HistoryReferenceWorkflowState, HistoryReferenceGeneral, ]) ) .optional(), actions: z.array( z.union([ HistoryActionBranchCreate, HistoryActionBranchMerge, HistoryActionBranchPush, HistoryActionLabelCreate, HistoryActionLabelUpdate, HistoryActionLabelDelete, HistoryActionProjectUpdate, HistoryActionPullRequest, HistoryActionStoryCreate, HistoryActionStoryUpdate, HistoryActionStoryDelete, HistoryActionStoryCommentCreate, HistoryActionStoryLinkCreate, HistoryActionStoryLinkUpdate, HistoryActionStoryLinkDelete, HistoryActionTaskCreate, HistoryActionTaskUpdate, HistoryActionTaskDelete, HistoryActionWorkspace2BulkUpdate, ]) ), member_id: z.string().uuid().optional(), external_id: z.string().optional(), id: z.string().uuid(), version: z.literal("v1"), webhook_id: z.string().nullish(), automation_id: z.string().uuid().optional(), }); const CreateTask = z.object({ description: z.string().min(1).max(2048), complete: z.boolean().optional(), owner_ids: z.array(z.string().uuid()).optional(), external_id: z.string().max(128).optional(), created_at: z.string().datetime({ offset: true }).optional(), updated_at: z.string().datetime({ offset: true }).optional(), }); const UpdateTask = z .object({ description: z.string().min(1).max(2048), owner_ids: z.array(z.string().uuid()), complete: z.boolean(), before_id: z.number().int(), after_id: z.number().int(), }) .partial(); const CreateStoryLink = z.object({ verb: z.enum(["blocks", "duplicates", "relates to"]), subject_id: z.number().int(), object_id: z.number().int(), }); const StoryLink = z.object({ entity_type: z.string(), id: z.number().int(), subject_id: z.number().int(), subject_workflow_state_id: z.number().int(), verb: z.string(), object_id: z.number().int(), created_at: z.string().datetime({ offset: true }), updated_at: z.string().datetime({ offset: true }), }); const UpdateStoryLink = z .object({ verb: z.enum(["blocks", "duplicates", "relates to"]), subject_id: z.number().int(), object_id: z.number().int(), }) .partial(); const WorkflowState = z.object({ description: z.string(), entity_type: z.string(), color: z .string() .min(1) .regex(/^#[a-fA-F0-9]{6}$/) .optional(), verb: z.string().nullable(), name: z.string(), global_id: z.string(), num_stories: z.number().int(), type: z.string(), updated_at: z.string().datetime({ offset: true }), id: z.number().int(), num_story_templates: z.number().int(), position: z.number().int(), created_at: z.string().datetime({ offset: true }), }); const Workflow = z.object({ description: z.string(), entity_type: z.string(), project_ids: z.array(z.number()), states: z.array(WorkflowState), name: z.string(), updated_at: z.string().datetime({ offset: true }), auto_assign_owner: z.boolean(), id: z.number().int(), team_id: z.number().int(), created_at: z.string().datetime({ offset: true }), default_state_id: z.number().int(), }); export const schemas = { Category, CreateCategory, UpdateCategory, MilestoneStats, Milestone, CustomFieldEnumValue, CustomField, UpdateCustomFieldEnumValue, UpdateCustomField, DataConflictError, DocSlim, DisabledFeatureError, CreateDoc, LabelSlim, CustomFieldValueParams, LinkedFile, CreateSubTaskParams, StoryContentsTask, UploadedFile, StoryContents, EntityTemplate, CreateLabelParams, BaseTaskParams, CreateStoryContents, CreateEntityTemplate, UpdateStoryContents, UpdateEntityTemplate, EpicState, EpicWorkflow, EpicAssociatedGroup, EpicStats, EpicSlim, CreateEpic, ThreadedComment, Health, Epic, EpicPaginatedResults, UpdateEpic, CreateEpicComment, CreateCommentComment, UpdateComment, CreateEpicHealth, TypedStoryLink, SyncedItem, StoryCustomField, StoryStats, StorySlim, uploadFiles_Body, UpdateFile, Icon, Group, CreateGroup, UnusableEntitlementError, UpdateGroup, UpdateHealth, CreateGenericIntegration, LabelStats, Label, IterationAssociatedGroup, IterationStats, IterationSlim, CreateIteration, Iteration, UpdateIteration, KeyResultValue, KeyResult, UpdateKeyResult, UpdateLabel, CreateLinkedFile, UpdateLinkedFile, BasicWorkspaceInfo, MemberInfoOrganization2, MemberInfo, Profile, Member, CreateCategoryParams, CreateMilestone, UpdateMilestone, ObjectiveStats, Objective, CreateObjective, UpdateObjective, ProjectStats, Project, CreateProject, UpdateProject, Repository, EpicSearchResult, EpicSearchResults, StoryReaction, StoryComment, PullRequestLabel, PullRequest, Branch, Task, Identity, Commit, StorySearchResult, StorySearchResults, IterationSearchResults, ObjectiveSearchResult, ObjectiveSearchResults, SearchResults, MaxSearchResultsExceededError, CreateStoryLinkParams, CreateStoryCommentParams, LinkSubTaskParams, CreateTaskParams, CreateStoryParams, Story, CreateStories, UpdateStories, DeleteStories, RemoveCustomFieldParams, RemoveLabelParams, CreateStoryFromTemplateParams, SearchStories, UpdateStory, CreateStoryComment, UpdateStoryComment, CreateOrDeleteStoryReaction, HistoryReferenceBranch, HistoryReferenceCommit, HistoryReferenceEpic, HistoryReferenceGroup, HistoryReferenceIteration, HistoryReferenceLabel, HistoryReferenceProject, HistoryReferenceStory, HistoryReferenceStoryTask, HistoryReferenceCustomFieldEnumValue, HistoryReferenceWorkflowState, HistoryReferenceGeneral, HistoryActionBranchCreate, HistoryActionBranchMerge, HistoryActionBranchPush, HistoryActionLabelCreate, HistoryActionLabelUpdate, HistoryActionLabelDelete, HistoryActionProjectUpdate, HistoryActionPullRequest, HistoryActionStoryCreate, StoryHistoryChangeOldNewStr, StoryHistoryChangeOldNewBool, StoryHistoryChangeAddsRemovesInt, StoryHistoryChangeAddsRemovesUuid, StoryHistoryChangeOldNewInt, StoryHistoryChangeOldNewUuid, HistoryChangesStory, HistoryActionStoryUpdate, HistoryActionStoryDelete, HistoryActionStoryCommentCreate, HistoryActionStoryLinkCreate, HistoryChangesStoryLink, HistoryActionStoryLinkUpdate, HistoryActionStoryLinkDelete, HistoryActionTaskCreate, HistoryChangesTask, HistoryActionTaskUpdate, HistoryActionTaskDelete, HistoryActionWorkspace2BulkUpdate, History, CreateTask, UpdateTask, CreateStoryLink, StoryLink, UpdateStoryLink, WorkflowState, Workflow, }; const endpoints = makeApi([ { method: "get", path: "/api/v3/categories", alias: "listCategories", description: `List Categories returns a list of all Categories and their attributes.`, requestFormat: "json", response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "post", path: "/api/v3/categories", alias: "createCategory", description: `Create Category allows you to create a new Category in Shortcut.`, requestFormat: "json", parameters: [ { name: "body", type: "Body", schema: CreateCategory, }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/categories/:categoryPublicId", alias: "getCategory", description: `Get Category returns information about the selected Category.`, requestFormat: "json", parameters: [ { name: "categoryPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "put", path: "/api/v3/categories/:categoryPublicId", alias: "updateCategory", description: `Update Category allows you to replace a Category name with another name. If you try to name a Category something that already exists, you will receive a 422 response.`, requestFormat: "json", parameters: [ { name: "body", type: "Body", schema: UpdateCategory, }, { name: "categoryPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "delete", path: "/api/v3/categories/:categoryPublicId", alias: "deleteCategory", description: `Delete Category can be used to delete any Category.`, requestFormat: "json", parameters: [ { name: "categoryPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/categories/:categoryPublicId/milestones", alias: "listCategoryMilestones", description: `List Category Milestones returns a list of all Milestones with the Category.`, requestFormat: "json", parameters: [ { name: "categoryPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/categories/:categoryPublicId/objectives", alias: "listCategoryObjectives", description: `Returns a list of all Objectives with the Category.`, requestFormat: "json", parameters: [ { name: "categoryPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/custom-fields", alias: "listCustomFields", requestFormat: "json", response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/custom-fields/:customFieldPublicId", alias: "getCustomField", requestFormat: "json", parameters: [ { name: "customFieldPublicId", type: "Path", schema: z.string().uuid(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "put", path: "/api/v3/custom-fields/:customFieldPublicId", alias: "updateCustomField", description: `Update Custom Field can be used to update the definition of a Custom Field. The order of items in the &#x27;values&#x27; collection is interpreted to be their ascending sort order.To delete an existing enum value, simply omit it from the &#x27;values&#x27; collection. New enum values may be created inline by including an object in the &#x27;values&#x27; collection having a &#x27;value&#x27; entry with no &#x27;id&#x27; (eg. {&#x27;value&#x27;: &#x27;myNewValue&#x27;, &#x27;color_key&#x27;: &#x27;green&#x27;}).`, requestFormat: "json", parameters: [ { name: "body", type: "Body", schema: UpdateCustomField, }, { name: "customFieldPublicId", type: "Path", schema: z.string().uuid(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 409, schema: DataConflictError, }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "delete", path: "/api/v3/custom-fields/:customFieldPublicId", alias: "deleteCustomField", requestFormat: "json", parameters: [ { name: "customFieldPublicId", type: "Path", schema: z.string().uuid(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/documents", alias: "listDocs", description: `List Docs returns a list of Doc that the current user can read.`, requestFormat: "json", response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 403, schema: DisabledFeatureError, }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "post", path: "/api/v3/documents", alias: "createDoc", description: `Creates a new Doc.`, requestFormat: "json", parameters: [ { name: "body", type: "Body", schema: CreateDoc, }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 403, schema: DisabledFeatureError, }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/entity-templates", alias: "listEntityTemplates", description: `List all the entity templates for the Workspace.`, requestFormat: "json", response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "post", path: "/api/v3/entity-templates", alias: "createEntityTemplate", description: `Create a new entity template for the Workspace.`, requestFormat: "json", parameters: [ { name: "body", description: `Request parameters for creating an entirely new entity template.`, type: "Body", schema: CreateEntityTemplate, }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/entity-templates/:entityTemplatePublicId", alias: "getEntityTemplate", description: `Get Entity Template returns information about a given entity template.`, requestFormat: "json", parameters: [ { name: "entityTemplatePublicId", type: "Path", schema: z.string().uuid(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "put", path: "/api/v3/entity-templates/:entityTemplatePublicId", alias: "updateEntityTemplate", description: `Update an entity template&#x27;s name or its contents.`, requestFormat: "json", parameters: [ { name: "body", description: `Request parameters for changing either a template&#x27;s name or any of the attributes it is designed to pre-populate.`, type: "Body", schema: UpdateEntityTemplate, }, { name: "entityTemplatePublicId", type: "Path", schema: z.string().uuid(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "delete", path: "/api/v3/entity-templates/:entityTemplatePublicId", alias: "deleteEntityTemplate", requestFormat: "json", parameters: [ { name: "entityTemplatePublicId", type: "Path", schema: z.string().uuid(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "put", path: "/api/v3/entity-templates/disable", alias: "disableStoryTemplates", description: `Disables the Story Template feature for the Workspace.`, requestFormat: "json", response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "put", path: "/api/v3/entity-templates/enable", alias: "enableStoryTemplates", description: `Enables the Story Template feature for the Workspace.`, requestFormat: "json", response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/epic-workflow", alias: "getEpicWorkflow", description: `Returns the Epic Workflow for the Workspace.`, requestFormat: "json", response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/epics", alias: "listEpics", description: `List Epics returns a list of all Epics and their attributes.`, requestFormat: "json", parameters: [ { name: "includes_description", type: "Query", schema: z.boolean().optional(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "post", path: "/api/v3/epics", alias: "createEpic", description: `Create Epic allows you to create a new Epic in Shortcut.`, requestFormat: "json", parameters: [ { name: "body", type: "Body", schema: CreateEpic, }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/epics/:epicPublicId", alias: "getEpic", description: `Get Epic returns information about the selected Epic.`, requestFormat: "json", parameters: [ { name: "epicPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "put", path: "/api/v3/epics/:epicPublicId", alias: "updateEpic", description: `Update Epic can be used to update numerous fields in the Epic. The only required parameter is Epic ID, which can be found in the Shortcut UI.`, requestFormat: "json", parameters: [ { name: "body", type: "Body", schema: UpdateEpic, }, { name: "epicPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "delete", path: "/api/v3/epics/:epicPublicId", alias: "deleteEpic", description: `Delete Epic can be used to delete the Epic. The only required parameter is Epic ID.`, requestFormat: "json", parameters: [ { name: "epicPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/epics/:epicPublicId/comments", alias: "listEpicComments", description: `Get a list of all Comments on an Epic.`, requestFormat: "json", parameters: [ { name: "epicPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "post", path: "/api/v3/epics/:epicPublicId/comments", alias: "createEpicComment", description: `This endpoint allows you to create a threaded Comment on an Epic.`, requestFormat: "json", parameters: [ { name: "body", type: "Body", schema: CreateEpicComment, }, { name: "epicPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "post", path: "/api/v3/epics/:epicPublicId/comments/:commentPublicId", alias: "createEpicCommentComment", description: `This endpoint allows you to create a nested Comment reply to an existing Epic Comment.`, requestFormat: "json", parameters: [ { name: "body", type: "Body", schema: CreateCommentComment, }, { name: "epicPublicId", type: "Path", schema: z.number().int(), }, { name: "commentPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/epics/:epicPublicId/comments/:commentPublicId", alias: "getEpicComment", description: `This endpoint returns information about the selected Epic Comment.`, requestFormat: "json", parameters: [ { name: "epicPublicId", type: "Path", schema: z.number().int(), }, { name: "commentPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "put", path: "/api/v3/epics/:epicPublicId/comments/:commentPublicId", alias: "updateEpicComment", description: `This endpoint allows you to update a threaded Comment on an Epic.`, requestFormat: "json", parameters: [ { name: "body", type: "Body", schema: z.object({ text: z.string() }), }, { name: "epicPublicId", type: "Path", schema: z.number().int(), }, { name: "commentPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "delete", path: "/api/v3/epics/:epicPublicId/comments/:commentPublicId", alias: "deleteEpicComment", description: `This endpoint allows you to delete a Comment from an Epic.`, requestFormat: "json", parameters: [ { name: "epicPublicId", type: "Path", schema: z.number().int(), }, { name: "commentPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/epics/:epicPublicId/health", alias: "getEpicHealth", description: `Get the current health for the specified Epic.`, requestFormat: "json", parameters: [ { name: "epicPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "post", path: "/api/v3/epics/:epicPublicId/health", alias: "createEpicHealth", description: `Create a new health status for the specified Epic.`, requestFormat: "json", parameters: [ { name: "body", type: "Body", schema: CreateEpicHealth, }, { name: "epicPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/epics/:epicPublicId/health-history", alias: "listEpicHealths", description: `List the history of health statuses for the specified Epic, most recent first.`, requestFormat: "json", parameters: [ { name: "epicPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/epics/:epicPublicId/stories", alias: "listEpicStories", description: `Get a list of all Stories in an Epic.`, requestFormat: "json", parameters: [ { name: "epicPublicId", type: "Path", schema: z.number().int(), }, { name: "includes_description", type: "Query", schema: z.boolean().optional(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "post", path: "/api/v3/epics/:epicPublicId/unlink-productboard", alias: "unlinkProductboardFromEpic", description: `This endpoint allows you to unlink a productboard epic.`, requestFormat: "json", parameters: [ { name: "epicPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/epics/paginated", alias: "listEpicsPaginated", description: `List Epics with pagination returns a paginated list of Epics and their attributes.`, requestFormat: "json", parameters: [ { name: "includes_description", type: "Query", schema: z.boolean().optional(), }, { name: "page", type: "Query", schema: z.number().int().optional(), }, { name: "page_size", type: "Query", schema: z.number().int().optional(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/external-link/stories", alias: "getExternalLinkStories", description: `Get Stories which have a given External Link associated with them.`, requestFormat: "json", parameters: [ { name: "external_link", type: "Query", schema: z .string() .max(2048) .regex(/^https?:\/\/.+$/), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/files", alias: "listFiles", description: `List Files returns a list of all UploadedFiles in the workspace.`, requestFormat: "json", response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "post", path: "/api/v3/files", alias: "uploadFiles", description: `Upload Files uploads one or many files and optionally associates them with a story. Use the multipart/form-data content-type to upload. Each &#x60;file&#x60; key should contain a separate file. Each UploadedFile&#x27;s name comes from the Content-Disposition header &quot;filename&quot; directive for that field.`, requestFormat: "form-data", parameters: [ { name: "body", type: "Body", schema: uploadFiles_Body, }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/files/:filePublicId", alias: "getFile", description: `Get File returns information about the selected UploadedFile.`, requestFormat: "json", parameters: [ { name: "filePublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "put", path: "/api/v3/files/:filePublicId", alias: "updateFile", description: `Update File updates the properties of an UploadedFile (but not its content).`, requestFormat: "json", parameters: [ { name: "body", type: "Body", schema: UpdateFile, }, { name: "filePublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "delete", path: "/api/v3/files/:filePublicId", alias: "deleteFile", description: `Delete File deletes a previously uploaded file.`, requestFormat: "json", parameters: [ { name: "filePublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/groups", alias: "listGroups", description: `A group in our API maps to a &quot;Team&quot; within the Shortcut Product. A Team is a collection of Users that can be associated to Stories, Epics, and Iterations within Shortcut.`, requestFormat: "json", response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "post", path: "/api/v3/groups", alias: "createGroup", requestFormat: "json", parameters: [ { name: "body", type: "Body", schema: CreateGroup, }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 403, schema: UnusableEntitlementError, }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/groups/:groupPublicId", alias: "getGroup", requestFormat: "json", parameters: [ { name: "groupPublicId", type: "Path", schema: z.string().uuid(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "put", path: "/api/v3/groups/:groupPublicId", alias: "updateGroup", requestFormat: "json", parameters: [ { name: "body", type: "Body", schema: UpdateGroup, }, { name: "groupPublicId", type: "Path", schema: z.string().uuid(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 403, schema: UnusableEntitlementError, }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/groups/:groupPublicId/stories", alias: "listGroupStories", description: `List the Stories assigned to the Group. (By default, limited to 1,000).`, requestFormat: "json", parameters: [ { name: "groupPublicId", type: "Path", schema: z.string().uuid(), }, { name: "limit", type: "Query", schema: z.number().int().optional(), }, { name: "offset", type: "Query", schema: z.number().int().optional(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "put", path: "/api/v3/health/:healthPublicId", alias: "updateHealth", description: `Update an existing health status by its ID.`, requestFormat: "json", parameters: [ { name: "body", type: "Body", schema: UpdateHealth, }, { name: "healthPublicId", type: "Path", schema: z.string().uuid(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "post", path: "/api/v3/integrations/webhook", alias: "createGenericIntegration", requestFormat: "json", parameters: [ { name: "body", type: "Body", schema: CreateGenericIntegration, }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/integrations/webhook/:integrationPublicId", alias: "getGenericIntegration", requestFormat: "json", parameters: [ { name: "integrationPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "delete", path: "/api/v3/integrations/webhook/:integrationPublicId", alias: "deleteGenericIntegration", requestFormat: "json", parameters: [ { name: "integrationPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/iterations", alias: "listIterations", requestFormat: "json", response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "post", path: "/api/v3/iterations", alias: "createIteration", requestFormat: "json", parameters: [ { name: "body", type: "Body", schema: CreateIteration, }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/iterations/:iterationPublicId", alias: "getIteration", requestFormat: "json", parameters: [ { name: "iterationPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "put", path: "/api/v3/iterations/:iterationPublicId", alias: "updateIteration", requestFormat: "json", parameters: [ { name: "body", type: "Body", schema: UpdateIteration, }, { name: "iterationPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "delete", path: "/api/v3/iterations/:iterationPublicId", alias: "deleteIteration", requestFormat: "json", parameters: [ { name: "iterationPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/iterations/:iterationPublicId/stories", alias: "listIterationStories", description: `Get a list of all Stories in an Iteration.`, requestFormat: "json", parameters: [ { name: "iterationPublicId", type: "Path", schema: z.number().int(), }, { name: "includes_description", type: "Query", schema: z.boolean().optional(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "put", path: "/api/v3/iterations/disable", alias: "disableIterations", description: `Disables Iterations for the current workspace`, requestFormat: "json", response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "put", path: "/api/v3/iterations/enable", alias: "enableIterations", description: `Enables Iterations for the current workspace`, requestFormat: "json", response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/key-results/:keyResultPublicId", alias: "getKeyResult", description: `Get Key Result returns information about a chosen Key Result.`, requestFormat: "json", parameters: [ { name: "keyResultPublicId", type: "Path", schema: z.string().uuid(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "put", path: "/api/v3/key-results/:keyResultPublicId", alias: "updateKeyResult", description: `Update Key Result allows updating a Key Result&#x27;s name or initial, observed, or target values.`, requestFormat: "json", parameters: [ { name: "body", type: "Body", schema: UpdateKeyResult, }, { name: "keyResultPublicId", type: "Path", schema: z.string().uuid(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/labels", alias: "listLabels", description: `List Labels returns a list of all Labels and their attributes.`, requestFormat: "json", parameters: [ { name: "slim", type: "Query", schema: z.boolean().optional(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "post", path: "/api/v3/labels", alias: "createLabel", description: `Create Label allows you to create a new Label in Shortcut.`, requestFormat: "json", parameters: [ { name: "body", description: `Request parameters for creating a Label on a Shortcut Story.`, type: "Body", schema: CreateLabelParams, }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/labels/:labelPublicId", alias: "getLabel", description: `Get Label returns information about the selected Label.`, requestFormat: "json", parameters: [ { name: "labelPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "put", path: "/api/v3/labels/:labelPublicId", alias: "updateLabel", description: `Update Label allows you to replace a Label name with another name. If you try to name a Label something that already exists, you will receive a 422 response.`, requestFormat: "json", parameters: [ { name: "body", type: "Body", schema: UpdateLabel, }, { name: "labelPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "delete", path: "/api/v3/labels/:labelPublicId", alias: "deleteLabel", description: `Delete Label can be used to delete any Label.`, requestFormat: "json", parameters: [ { name: "labelPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/labels/:labelPublicId/epics", alias: "listLabelEpics", description: `List all of the Epics with the Label.`, requestFormat: "json", parameters: [ { name: "labelPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/labels/:labelPublicId/stories", alias: "listLabelStories", description: `List all of the Stories with the Label.`, requestFormat: "json", parameters: [ { name: "labelPublicId", type: "Path", schema: z.number().int(), }, { name: "includes_description", type: "Query", schema: z.boolean().optional(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/linked-files", alias: "listLinkedFiles", description: `List Linked Files returns a list of all Linked-Files and their attributes.`, requestFormat: "json", response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "post", path: "/api/v3/linked-files", alias: "createLinkedFile", description: `Create Linked File allows you to create a new Linked File in Shortcut.`, requestFormat: "json", parameters: [ { name: "body", type: "Body", schema: CreateLinkedFile, }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/linked-files/:linkedFilePublicId", alias: "getLinkedFile", description: `Get File returns information about the selected Linked File.`, requestFormat: "json", parameters: [ { name: "linkedFilePublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "put", path: "/api/v3/linked-files/:linkedFilePublicId", alias: "updateLinkedFile", description: `Updated Linked File allows you to update properties of a previously attached Linked-File.`, requestFormat: "json", parameters: [ { name: "body", type: "Body", schema: UpdateLinkedFile, }, { name: "linkedFilePublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "delete", path: "/api/v3/linked-files/:linkedFilePublicId", alias: "deleteLinkedFile", description: `Delete Linked File can be used to delete any previously attached Linked-File.`, requestFormat: "json", parameters: [ { name: "linkedFilePublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/member", alias: "getCurrentMemberInfo", description: `Returns information about the authenticated member.`, requestFormat: "json", response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/members", alias: "listMembers", description: `Returns information about members of the Workspace.`, requestFormat: "json", parameters: [ { name: "org-public-id", type: "Query", schema: z.string().uuid().optional(), }, { name: "disabled", type: "Query", schema: z.boolean().optional(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/members/:memberPublicId", alias: "getMember", description: `Returns information about a Member.`, requestFormat: "json", parameters: [ { name: "memberPublicId", type: "Path", schema: z.string().uuid(), }, { name: "org-public-id", type: "Query", schema: z.string().uuid().optional(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/milestones", alias: "listMilestones", description: `(Deprecated: Use &#x27;List Objectives&#x27;) List Milestones returns a list of all Milestones and their attributes.`, requestFormat: "json", response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "post", path: "/api/v3/milestones", alias: "createMilestone", description: `(Deprecated: Use &#x27;Create Objective&#x27;) Create Milestone allows you to create a new Milestone in Shortcut.`, requestFormat: "json", parameters: [ { name: "body", type: "Body", schema: CreateMilestone, }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 403, schema: UnusableEntitlementError, }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/milestones/:milestonePublicId", alias: "getMilestone", description: `(Deprecated: Use &#x27;Get Objective&#x27;) Get Milestone returns information about a chosen Milestone.`, requestFormat: "json", parameters: [ { name: "milestonePublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "put", path: "/api/v3/milestones/:milestonePublicId", alias: "updateMilestone", description: `(Deprecated: Use &#x27;Update Objective&#x27;) Update Milestone can be used to update Milestone properties.`, requestFormat: "json", parameters: [ { name: "body", type: "Body", schema: UpdateMilestone, }, { name: "milestonePublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "delete", path: "/api/v3/milestones/:milestonePublicId", alias: "deleteMilestone", description: `(Deprecated: Use &#x27;Delete Objective&#x27;) Delete Milestone can be used to delete any Milestone.`, requestFormat: "json", parameters: [ { name: "milestonePublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/milestones/:milestonePublicId/epics", alias: "listMilestoneEpics", description: `(Deprecated: Use &#x27;List Objective Epics&#x27;) List all of the Epics within the Milestone.`, requestFormat: "json", parameters: [ { name: "milestonePublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/objectives", alias: "listObjectives", description: `List Objectives returns a list of all Objectives and their attributes.`, requestFormat: "json", response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "post", path: "/api/v3/objectives", alias: "createObjective", description: `Create Objective allows you to create a new Objective in Shortcut.`, requestFormat: "json", parameters: [ { name: "body", type: "Body", schema: CreateObjective, }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 403, schema: UnusableEntitlementError, }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/objectives/:objectivePublicId", alias: "getObjective", description: `Get Objective returns information about a chosen Objective.`, requestFormat: "json", parameters: [ { name: "objectivePublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "put", path: "/api/v3/objectives/:objectivePublicId", alias: "updateObjective", description: `Update Objective can be used to update Objective properties.`, requestFormat: "json", parameters: [ { name: "body", type: "Body", schema: UpdateObjective, }, { name: "objectivePublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "delete", path: "/api/v3/objectives/:objectivePublicId", alias: "deleteObjective", description: `Delete Objective can be used to delete any Objective.`, requestFormat: "json", parameters: [ { name: "objectivePublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/objectives/:objectivePublicId/epics", alias: "listObjectiveEpics", description: `List all of the Epics within the Objective.`, requestFormat: "json", parameters: [ { name: "objectivePublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/projects", alias: "listProjects", description: `List Projects returns a list of all Projects and their attributes.`, requestFormat: "json", response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "post", path: "/api/v3/projects", alias: "createProject", description: `Create Project is used to create a new Shortcut Project.`, requestFormat: "json", parameters: [ { name: "body", type: "Body", schema: CreateProject, }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/projects/:projectPublicId", alias: "getProject", description: `Get Project returns information about the selected Project.`, requestFormat: "json", parameters: [ { name: "projectPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "put", path: "/api/v3/projects/:projectPublicId", alias: "updateProject", description: `Update Project can be used to change properties of a Project.`, requestFormat: "json", parameters: [ { name: "body", type: "Body", schema: UpdateProject, }, { name: "projectPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "delete", path: "/api/v3/projects/:projectPublicId", alias: "deleteProject", description: `Delete Project can be used to delete a Project. Projects can only be deleted if all associated Stories are moved or deleted. In the case that the Project cannot be deleted, you will receive a 422 response.`, requestFormat: "json", parameters: [ { name: "projectPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/projects/:projectPublicId/stories", alias: "listStories", description: `List Stories returns a list of all Stories in a selected Project and their attributes.`, requestFormat: "json", parameters: [ { name: "projectPublicId", type: "Path", schema: z.number().int(), }, { name: "includes_description", type: "Query", schema: z.boolean().optional(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/repositories", alias: "listRepositories", description: `List Repositories returns a list of all Repositories and their attributes.`, requestFormat: "json", response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/repositories/:repoPublicId", alias: "getRepository", description: `Get Repository returns information about the selected Repository.`, requestFormat: "json", parameters: [ { name: "repoPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/search", alias: "search", description: `Search lets you search Epics and Stories based on desired parameters. Since ordering of the results can change over time (due to search ranking decay, new Epics and Stories being created), the &#x60;next&#x60; value from the previous response can be used as the path and query string for the next page to ensure stable ordering.`, requestFormat: "json", parameters: [ { name: "query", type: "Query", schema: z.string().min(1), }, { name: "page_size", type: "Query", schema: z.number().int().optional(), }, { name: "detail", type: "Query", schema: z.enum(["full", "slim"]).optional(), }, { name: "next", type: "Query", schema: z.string().optional(), }, { name: "entity_types", type: "Query", schema: z .array( z.enum(["story", "milestone", "epic", "iteration", "objective"]) ) .optional(), }, ], response: z.void(), errors: [ { status: 400, description: `**Either:** (1) Schema mismatch **or** (2) Maximum of 1000 search results exceeded `, schema: MaxSearchResultsExceededError, }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/search/epics", alias: "searchEpics", description: `Search Epics lets you search Epics based on desired parameters. Since ordering of stories can change over time (due to search ranking decay, new Epics being created), the &#x60;next&#x60; value from the previous response can be used as the path and query string for the next page to ensure stable ordering.`, requestFormat: "json", parameters: [ { name: "query", type: "Query", schema: z.string().min(1), }, { name: "page_size", type: "Query", schema: z.number().int().optional(), }, { name: "detail", type: "Query", schema: z.enum(["full", "slim"]).optional(), }, { name: "next", type: "Query", schema: z.string().optional(), }, { name: "entity_types", type: "Query", schema: z .array( z.enum(["story", "milestone", "epic", "iteration", "objective"]) ) .optional(), }, ], response: z.void(), errors: [ { status: 400, description: `**Either:** (1) Schema mismatch **or** (2) Maximum of 1000 search results exceeded `, schema: MaxSearchResultsExceededError, }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/search/iterations", alias: "searchIterations", description: `Search Iterations lets you search Iterations based on desired parameters. Since ordering of results can change over time (due to search ranking decay, new Iterations being created), the &#x60;next&#x60; value from the previous response can be used as the path and query string for the next page to ensure stable ordering.`, requestFormat: "json", parameters: [ { name: "query", type: "Query", schema: z.string().min(1), }, { name: "page_size", type: "Query", schema: z.number().int().optional(), }, { name: "detail", type: "Query", schema: z.enum(["full", "slim"]).optional(), }, { name: "next", type: "Query", schema: z.string().optional(), }, { name: "entity_types", type: "Query", schema: z .array( z.enum(["story", "milestone", "epic", "iteration", "objective"]) ) .optional(), }, ], response: z.void(), errors: [ { status: 400, description: `**Either:** (1) Schema mismatch **or** (2) Maximum of 1000 search results exceeded `, schema: MaxSearchResultsExceededError, }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/search/milestones", alias: "searchMilestones", description: `Search Milestones lets you search Milestones based on desired parameters. Since ordering of results can change over time (due to search ranking decay, new Milestones being created), the &#x60;next&#x60; value from the previous response can be used as the path and query string for the next page to ensure stable ordering.`, requestFormat: "json", parameters: [ { name: "query", type: "Query", schema: z.string().min(1), }, { name: "page_size", type: "Query", schema: z.number().int().optional(), }, { name: "detail", type: "Query", schema: z.enum(["full", "slim"]).optional(), }, { name: "next", type: "Query", schema: z.string().optional(), }, { name: "entity_types", type: "Query", schema: z .array( z.enum(["story", "milestone", "epic", "iteration", "objective"]) ) .optional(), }, ], response: z.void(), errors: [ { status: 400, description: `**Either:** (1) Schema mismatch **or** (2) Maximum of 1000 search results exceeded `, schema: MaxSearchResultsExceededError, }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/search/objectives", alias: "searchObjectives", description: `Search Objectives lets you search Objectives based on desired parameters. Since ordering of results can change over time (due to search ranking decay, new Objectives being created), the &#x60;next&#x60; value from the previous response can be used as the path and query string for the next page to ensure stable ordering.`, requestFormat: "json", parameters: [ { name: "query", type: "Query", schema: z.string().min(1), }, { name: "page_size", type: "Query", schema: z.number().int().optional(), }, { name: "detail", type: "Query", schema: z.enum(["full", "slim"]).optional(), }, { name: "next", type: "Query", schema: z.string().optional(), }, { name: "entity_types", type: "Query", schema: z .array( z.enum(["story", "milestone", "epic", "iteration", "objective"]) ) .optional(), }, ], response: z.void(), errors: [ { status: 400, description: `**Either:** (1) Schema mismatch **or** (2) Maximum of 1000 search results exceeded `, schema: MaxSearchResultsExceededError, }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/search/stories", alias: "searchStories", description: `Search Stories lets you search Stories based on desired parameters. Since ordering of stories can change over time (due to search ranking decay, new stories being created), the &#x60;next&#x60; value from the previous response can be used as the path and query string for the next page to ensure stable ordering.`, requestFormat: "json", parameters: [ { name: "query", type: "Query", schema: z.string().min(1), }, { name: "page_size", type: "Query", schema: z.number().int().optional(), }, { name: "detail", type: "Query", schema: z.enum(["full", "slim"]).optional(), }, { name: "next", type: "Query", schema: z.string().optional(), }, { name: "entity_types", type: "Query", schema: z .array( z.enum(["story", "milestone", "epic", "iteration", "objective"]) ) .optional(), }, ], response: z.void(), errors: [ { status: 400, description: `**Either:** (1) Schema mismatch **or** (2) Maximum of 1000 search results exceeded `, schema: MaxSearchResultsExceededError, }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "post", path: "/api/v3/stories", alias: "createStory", description: `Create Story is used to add a new story to your Shortcut Workspace. This endpoint requires that either **workflow_state_id** or **project_id** be provided, but will reject the request if both or neither are specified. The workflow_state_id has been marked as required and is the recommended field to specify because we are in the process of sunsetting Projects in Shortcut.`, requestFormat: "json", parameters: [ { name: "body", description: `Request parameters for creating a story.`, type: "Body", schema: CreateStoryParams, }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/stories/:storyPublicId", alias: "getStory", description: `Get Story returns information about a chosen Story.`, requestFormat: "json", parameters: [ { name: "storyPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "put", path: "/api/v3/stories/:storyPublicId", alias: "updateStory", description: `Update Story can be used to update Story properties.`, requestFormat: "json", parameters: [ { name: "body", type: "Body", schema: UpdateStory, }, { name: "storyPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "delete", path: "/api/v3/stories/:storyPublicId", alias: "deleteStory", description: `Delete Story can be used to delete any Story.`, requestFormat: "json", parameters: [ { name: "storyPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/stories/:storyPublicId/comments", alias: "listStoryComment", description: `Lists Comments associated with a Story`, requestFormat: "json", parameters: [ { name: "storyPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "post", path: "/api/v3/stories/:storyPublicId/comments", alias: "createStoryComment", description: `Create Comment allows you to create a Comment on any Story.`, requestFormat: "json", parameters: [ { name: "body", type: "Body", schema: CreateStoryComment, }, { name: "storyPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/stories/:storyPublicId/comments/:commentPublicId", alias: "getStoryComment", description: `Get Comment is used to get Comment information.`, requestFormat: "json", parameters: [ { name: "storyPublicId", type: "Path", schema: z.number().int(), }, { name: "commentPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "put", path: "/api/v3/stories/:storyPublicId/comments/:commentPublicId", alias: "updateStoryComment", description: `Update Comment replaces the text of the existing Comment.`, requestFormat: "json", parameters: [ { name: "body", type: "Body", schema: z.object({ text: z.string().max(100000) }), }, { name: "storyPublicId", type: "Path", schema: z.number().int(), }, { name: "commentPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "delete", path: "/api/v3/stories/:storyPublicId/comments/:commentPublicId", alias: "deleteStoryComment", description: `Delete a Comment from any story.`, requestFormat: "json", parameters: [ { name: "storyPublicId", type: "Path", schema: z.number().int(), }, { name: "commentPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "post", path: "/api/v3/stories/:storyPublicId/comments/:commentPublicId/reactions", alias: "createStoryReaction", description: `Create a reaction to a story comment.`, requestFormat: "json", parameters: [ { name: "body", type: "Body", schema: z.object({ emoji: z.string() }), }, { name: "storyPublicId", type: "Path", schema: z.number().int(), }, { name: "commentPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "delete", path: "/api/v3/stories/:storyPublicId/comments/:commentPublicId/reactions", alias: "deleteStoryReaction", description: `Delete a reaction from any story comment.`, requestFormat: "json", parameters: [ { name: "body", type: "Body", schema: z.object({ emoji: z.string() }), }, { name: "storyPublicId", type: "Path", schema: z.number().int(), }, { name: "commentPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "post", path: "/api/v3/stories/:storyPublicId/comments/:commentPublicId/unlink-from-slack", alias: "unlinkCommentThreadFromSlack", description: `Unlinks a Comment from its linked Slack thread (Comment replies and Slack replies will no longer be synced)`, requestFormat: "json", parameters: [ { name: "storyPublicId", type: "Path", schema: z.number().int(), }, { name: "commentPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/stories/:storyPublicId/history", alias: "storyHistory", requestFormat: "json", parameters: [ { name: "storyPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "post", path: "/api/v3/stories/:storyPublicId/tasks", alias: "createTask", description: `Create Task is used to create a new task in a Story.`, requestFormat: "json", parameters: [ { name: "body", type: "Body", schema: CreateTask, }, { name: "storyPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/stories/:storyPublicId/tasks/:taskPublicId", alias: "getTask", description: `Returns information about a chosen Task.`, requestFormat: "json", parameters: [ { name: "storyPublicId", type: "Path", schema: z.number().int(), }, { name: "taskPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "put", path: "/api/v3/stories/:storyPublicId/tasks/:taskPublicId", alias: "updateTask", description: `Update Task can be used to update Task properties.`, requestFormat: "json", parameters: [ { name: "body", type: "Body", schema: UpdateTask, }, { name: "storyPublicId", type: "Path", schema: z.number().int(), }, { name: "taskPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "delete", path: "/api/v3/stories/:storyPublicId/tasks/:taskPublicId", alias: "deleteTask", description: `Delete Task can be used to delete any previously created Task on a Story.`, requestFormat: "json", parameters: [ { name: "storyPublicId", type: "Path", schema: z.number().int(), }, { name: "taskPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "post", path: "/api/v3/stories/bulk", alias: "createMultipleStories", description: `Create Multiple Stories allows you to create multiple stories in a single request using the same syntax as [Create Story](https://developer.shortcut.com/api/rest/v3#create-story).`, requestFormat: "json", parameters: [ { name: "body", type: "Body", schema: CreateStories, }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "put", path: "/api/v3/stories/bulk", alias: "updateMultipleStories", description: `Update Multiple Stories allows you to make changes to numerous stories at once.`, requestFormat: "json", parameters: [ { name: "body", type: "Body", schema: UpdateStories, }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "delete", path: "/api/v3/stories/bulk", alias: "deleteMultipleStories", description: `Delete Multiple Stories allows you to delete multiple archived stories at once.`, requestFormat: "json", parameters: [ { name: "body", type: "Body", schema: DeleteStories, }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "post", path: "/api/v3/stories/from-template", alias: "createStoryFromTemplate", description: `Create Story From Template is used to add a new story derived from a template to your Shortcut Workspace.`, requestFormat: "json", parameters: [ { name: "body", description: `Request parameters for creating a story from a story template. These parameters are merged with the values derived from the template.`, type: "Body", schema: CreateStoryFromTemplateParams, }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "post", path: "/api/v3/stories/search", alias: "searchStoriesOld", description: `Search Stories lets you search Stories based on desired parameters.`, requestFormat: "json", parameters: [ { name: "body", type: "Body", schema: SearchStories, }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "post", path: "/api/v3/story-links", alias: "createStoryLink", description: `Story Links (called Story Relationships in the UI) allow you create semantic relationships between two stories. The parameters read like an active voice grammatical sentence: subject -&gt; verb -&gt; object. The subject story acts on the object Story; the object story is the direct object of the sentence. The subject story &quot;blocks&quot;, &quot;duplicates&quot;, or &quot;relates to&quot; the object story. Examples: - &quot;story 5 blocks story 6” -- story 6 is now &quot;blocked&quot; until story 5 is moved to a Done workflow state. - &quot;story 2 duplicates story 1” -- Story 2 represents the same body of work as Story 1 (and should probably be archived). - &quot;story 7 relates to story 3”`, requestFormat: "json", parameters: [ { name: "body", type: "Body", schema: CreateStoryLink, }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/story-links/:storyLinkPublicId", alias: "getStoryLink", description: `Returns the stories and their relationship for the given Story Link.`, requestFormat: "json", parameters: [ { name: "storyLinkPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "put", path: "/api/v3/story-links/:storyLinkPublicId", alias: "updateStoryLink", description: `Updates the stories and/or the relationship for the given Story Link.`, requestFormat: "json", parameters: [ { name: "body", type: "Body", schema: UpdateStoryLink, }, { name: "storyLinkPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "delete", path: "/api/v3/story-links/:storyLinkPublicId", alias: "deleteStoryLink", description: `Removes the relationship between the stories for the given Story Link.`, requestFormat: "json", parameters: [ { name: "storyLinkPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/workflows", alias: "listWorkflows", description: `Returns a list of all Workflows in the Workspace.`, requestFormat: "json", response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, { method: "get", path: "/api/v3/workflows/:workflowPublicId", alias: "getWorkflow", description: `Get Workflow returns information about a chosen Workflow.`, requestFormat: "json", parameters: [ { name: "workflowPublicId", type: "Path", schema: z.number().int(), }, ], response: z.void(), errors: [ { status: 400, description: `Schema mismatch`, schema: z.void(), }, { status: 404, description: `Resource does not exist`, schema: z.void(), }, { status: 422, description: `Unprocessable`, schema: z.void(), }, ], }, ]); export const api = new Zodios(endpoints); export function createApiClient(baseUrl: string, options?: ZodiosOptions) { return new Zodios(baseUrl, endpoints, options); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/currentspace/shortcut_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server