import type { INodeComponent } from '../../composables/useNode'; import type { ITemplateDetails } from '../../stores/template'; /** * Get all drafts and published template of specified business * @param businessId * @returns */ declare function getAllTemplates(businessId: string): Promise; /** * Get template by template ID * @param businessId * @param draftsOrActive * @param templateId * @returns */ declare function getTemplateById(businessId: string, draftsOrActive: 'drafts' | 'active', templateId: string): Promise; /** * Upload template * @param businessId * @param draftsOrActive * @param template * @param schema * @returns */ declare function uploadTemplate(businessId: string, draftsOrActive: 'drafts' | 'active', template: ITemplateDetails, schema: INodeComponent[]): Promise; /** * Set specified template to be the main template of current business * @param businessId * @param templateId * @returns */ declare function setMainPageTemplateId(businessId: string, templateId: string, type?: 'member'): Promise; /** * Get current business's mainpage template ID * @param businessId * @returns Mainpage template ID */ declare function getMainTemplateId(businessId: string, type?: 'member'): Promise; /** * Check if template exists in specified `draftsOrActive` state * @param businessId * @param draftsOrActive * @param templateId * @returns {boolean} */ declare function headTemplateById(businessId: string, draftsOrActive: string, templateId: string): Promise; /** * Rename template alias * @param businessId * @param templateId * @param alias * @returns */ declare function renameTemplate(businessId: string, templateId: string, alias: string): Promise; /** * Delete template in specified `draftsOrActive` state * @param businessId * @param draftsOrActive * @param templateId * @returns */ declare function deleteTemplateById(businessId: string, draftsOrActive: 'drafts' | 'active', templateId: string): Promise; export declare const TemplateApi: { getAllTemplates: typeof getAllTemplates; getTemplateById: typeof getTemplateById; uploadTemplate: typeof uploadTemplate; setMainPageTemplateId: typeof setMainPageTemplateId; getMainTemplateId: typeof getMainTemplateId; renameTemplate: typeof renameTemplate; deleteTemplateById: typeof deleteTemplateById; headTemplateById: typeof headTemplateById; }; export {};