Skip to main content

Templates API

Templates API

import { CodeBoltClient } from '@codebolt/clientsdk';

const client = new CodeBoltClient();

Quick Reference

MethodDescription
getAllRetrieves all available templates.
listLists templates with optional filtering.

Methods


getAll

client.templates.getAll(): Promise<Template[]>

Retrieves all available templates.

Returns every template in the system regardless of type or category. Use this for comprehensive template browsing or to populate a full template gallery.

No parameters.

Returns: Promise<Template[]> — A promise that resolves to an array of Template objects

Full reference →


list

client.templates.list(params?: TemplateListParams): Promise<Template[]>

Lists templates with optional filtering.

Returns templates matching the provided query parameters. This is useful for finding templates by type, category, or other criteria without loading the entire template catalog.

ParameterTypeRequiredDescription
paramsTemplateListParamsNoOptional query parameters for filtering templates

Returns: Promise<Template[]> — A promise that resolves to an array of matching Template objects

Full reference →