UNPKG

@gravitywelluk/aws

Version:

Library of commonly used AWS wrapper functions to communicate with the AWS SDK

24 lines (23 loc) 754 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.createEmailTemplate = void 0; const sesv2_configure_1 = require("./sesv2-configure"); const aws_error_1 = require("../utils/aws-error"); /** * Creates a template * * @param fileName string * @param body any * @returns promise with the output * @memberof AwsSESService */ const createEmailTemplate = async (createTemplateParams, configOverrides = {}) => { const ses = (0, sesv2_configure_1.sesV2Configure)(configOverrides); try { return await ses.createEmailTemplate(createTemplateParams).promise(); } catch (error) { throw new aws_error_1.AwsError(error); } }; exports.createEmailTemplate = createEmailTemplate;