UNPKG

@dscodotco/theme-cli

Version:

A CLI tool for developing Shopify themes

53 lines (52 loc) 1.39 kB
export interface ShopifyCredentials { storeName: string; apiKey: string; password: string; } export interface ShopifyTheme { id: number; name: string; role: string; theme_store_id?: number; previewable: boolean; processing: boolean; admin_graphql_api_id: string; created_at: string; updated_at: string; } /** * Manages Shopify themes through the Admin API */ export declare class ThemeManager { private credentials; private baseUrl; private apiUrl; private isAccessToken; /** * Creates a new ThemeManager instance * @param credentials Shopify store credentials */ constructor(credentials: ShopifyCredentials); /** * Gets the appropriate authentication configuration for Shopify API calls * @returns Authentication config object */ getAuthConfig: () => any; /** * Lists all themes in the store * @returns Promise containing array of themes */ listThemes(): Promise<ShopifyTheme[]>; /** * Creates a new development theme * @param name The name for the new theme * @returns The created theme */ createDevelopmentTheme(name?: string): Promise<ShopifyTheme>; /** * Gets the preview URL for a theme * @param themeId The theme ID * @returns The preview URL */ getThemePreviewUrl(themeId: number): string; }