/** * Shared Shortcut API mocking utilities for tests. * Used by both CLI and core module tests. */ import nock from "nock"; export interface ShortcutStoryFixture { id: number; name: string; description?: string; completed: boolean; app_url: string; labels: Array<{ name: string; }>; workflow_state_id?: number; sub_task_ids?: number[]; } export interface ShortcutWorkflowFixture { id: number; name: string; states: Array<{ id: number; name: string; type: "unstarted" | "started" | "done"; }>; } export interface ShortcutTeamFixture { id: string; name: string; mention_name: string; workflow_ids: number[]; } export interface ShortcutMemberFixture { id: string; profile: { name: string; }; workspace2: { url_slug: string; }; } export interface ShortcutStoryLinkFixture { id: number; subject_id: number; object_id: number; verb: "blocks" | "duplicates" | "relates to"; } export interface ShortcutMock { scope: nock.Scope; getCurrentMember: (response: ShortcutMemberFixture) => void; getStory: (storyId: number, response: ShortcutStoryFixture) => void; getStory404: (storyId: number) => void; getStory401: (storyId: number) => void; getStory500: (storyId: number) => void; getStoryWithLinks: (storyId: number, response: ShortcutStoryFixture, storyLinks: ShortcutStoryLinkFixture[]) => void; searchStories: (response: ShortcutStoryFixture[]) => void; searchStories401: () => void; searchStories500: () => void; createStory: (response: ShortcutStoryFixture) => void; createStory401: () => void; createStory500: () => void; updateStory: (storyId: number, response: ShortcutStoryFixture) => void; updateStory401: (storyId: number) => void; updateStory500: (storyId: number) => void; createStoryLink: (response: ShortcutStoryLinkFixture) => void; getWorkflow: (workflowId: number, response: ShortcutWorkflowFixture) => void; listWorkflows: (response: ShortcutWorkflowFixture[]) => void; getGroup: (groupId: string, response: ShortcutTeamFixture) => void; listGroups: (response: ShortcutTeamFixture[]) => void; listLabels: (response: Array<{ id: number; name: string; }>) => void; createLabel: (response: { id: number; name: string; }) => void; done: () => void; } /** * Set up nock interceptors for Shortcut API. * Call mock.done() in afterEach to verify all expected requests were made. */ export declare function setupShortcutMock(): ShortcutMock; /** * Clean up all nock interceptors for Shortcut. * Call in afterEach to reset state between tests. */ export declare function cleanupShortcutMock(): void; /** * Create a minimal Shortcut story fixture. */ export declare function createStoryFixture(overrides: Partial & { id: number; }): ShortcutStoryFixture; /** * Create a minimal Shortcut workflow fixture. */ export declare function createWorkflowFixture(overrides: Partial & { id: number; }): ShortcutWorkflowFixture; /** * Create a minimal Shortcut team fixture. */ export declare function createTeamFixture(overrides?: Partial): ShortcutTeamFixture; /** * Create a minimal Shortcut member fixture. */ export declare function createMemberFixture(overrides?: Partial): ShortcutMemberFixture; //# sourceMappingURL=shortcut-mock.d.ts.map