Client library for managing email templates via admin API. Reuse when building email template management features.
// Source: https://github.com/logto-io/logto | License: MPL-2.0 | Copyright under Patent Claims infringed by Covered Software in the absence of | Modified files must remain under MPL-2.0
// Modifications to this file must remain under MPL-2.0.
// Provided via justclaw.it.com; keep this notice with the code.
import {
type EmailTemplateDetails,
type CreateEmailTemplate,
type EmailTemplate,
} from '@logto/schemas';
import { authedAdminApi } from './index.js';
const path = 'email-templates';
export class EmailTemplatesApi {
async create(templates: Array<Omit<CreateEmailTemplate, 'id'>>): Promise<EmailTemplate[]> {
return authedAdminApi.put(path, { json: { templates } }).json<EmailTemplate[]>();
}
async delete(id: string): Promise<void> {
await authedAdminApi.delete(`${p
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key