UNPKG

sb-mig

Version:

CLI to rule the world. (and handle stuff related to Storyblok CMS)

35 lines (34 loc) 1.25 kB
import type { ApiClient } from "../client.js"; import type { CopyProgress, CopyResult, StoryTreeNode } from "./types.js"; import type { ExtendedISbStoriesParams } from "../../api/stories/stories.types.js"; /** * Get all stories from a space */ export declare function getAllStories(client: ApiClient, options?: ExtendedISbStoriesParams): Promise<any[]>; /** * Get a single story by ID */ export declare function getStoryById(client: ApiClient, storyId: number | string): Promise<any>; /** * Get a story by slug */ export declare function getStoryBySlug(client: ApiClient, slug: string): Promise<any>; /** * Create a story in a space */ export declare function createStory(client: ApiClient, content: any): Promise<any>; /** * Fetch all stories and build a tree structure */ export declare function fetchStories(client: ApiClient, options?: ExtendedISbStoriesParams): Promise<{ stories: any[]; tree: StoryTreeNode[]; total: number; }>; /** * Copy stories from source space to target space */ export declare function copyStories(sourceClient: ApiClient, targetClient: ApiClient, options: { storyIds: number[]; destinationParentId?: number | null; }, onProgress?: (progress: CopyProgress) => void): Promise<CopyResult>;