/** * Shortcut API wrapper using the official @shortcut/client library. * Provides a simplified interface for dex integration. */ import { type Story, type StorySearchResult, type Workflow, type Label, type MemberInfo, type CreateStoryParams, type UpdateStory, type WorkflowState, type StoryLink } from "@shortcut/client"; export type { Story, StorySearchResult, Workflow, WorkflowState, Label, MemberInfo, StoryLink, }; export interface ShortcutTeam { id: string; name: string; mention_name: string; workflow_ids: number[]; } export interface SearchStoriesResponse { data: StorySearchResult[]; next?: string; total: number; } /** * Shortcut API wrapper for dex integration. * Uses the official @shortcut/client library. */ export declare class ShortcutApi { private client; private workspaceSlug; constructor(token: string, workspace?: string); /** * Get the current member info (includes workspace slug). */ getCurrentMember(): Promise; /** * Get or fetch the workspace slug. */ getWorkspaceSlug(): Promise; /** * Create a new story. */ createStory(data: CreateStoryParams): Promise; /** * Update an existing story. */ updateStory(storyId: number, data: UpdateStory): Promise; /** * Get a story by ID. */ getStory(storyId: number): Promise; /** * Search for stories. */ searchStories(query: string): Promise; /** * Create a subtask (story with parent relationship). * Creates a story with parent_story_id to link it as a Shortcut Sub-task. */ createSubtask(parentStoryId: number, data: CreateStoryParams): Promise; /** * Convert an existing story into a subtask of another story. */ convertToSubtask(parentStoryId: number, subtaskStoryId: number): Promise; /** * Remove a story from its parent (convert subtask to regular story). */ removeFromParent(subtaskStoryId: number): Promise; /** * Create a "blocks" relationship between two stories. * The subject story blocks the object story. */ createBlocksLink(blockerStoryId: number, blockedStoryId: number): Promise; /** * Get all story links for a story. */ getStoryLinks(storyId: number): Promise; /** * Get a workflow by ID. */ getWorkflow(workflowId: number): Promise; /** * List all workflows. */ listWorkflows(): Promise; /** * List all teams (groups in Shortcut API). */ listTeams(): Promise; /** * Get a team by ID. */ getTeam(teamId: string): Promise; /** * Find a team by mention name. */ findTeamByMentionName(mentionName: string): Promise; /** * List all labels. */ listLabels(): Promise; /** * Create a label if it doesn't exist. */ ensureLabel(name: string): Promise