UNPKG

mailslurp-client

Version:

Official client for MailSlurp Email and SMS API. Create email addresses and phone numbers in Javascript without a mail server. Send and receive real emails in applications or tests.

96 lines (90 loc) 2.51 kB
/* tslint:disable */ /* eslint-disable */ /** * MailSlurp API * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It\'s designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository * * The version of the OpenAPI document: 6.5.2 * Contact: contact@mailslurp.dev * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { exists, mapValues } from '../runtime'; import { TemplateVariable, TemplateVariableFromJSON, TemplateVariableFromJSONTyped, TemplateVariableToJSON, } from './'; /** * Email template * @export * @interface TemplateDto */ export interface TemplateDto { /** * ID of template * @type {string} * @memberof TemplateDto */ id: string; /** * Template name * @type {string} * @memberof TemplateDto */ name: string; /** * Variables available in template that can be replaced with values * @type {Array<TemplateVariable>} * @memberof TemplateDto */ variables: Array<TemplateVariable>; /** * Content of the template * @type {string} * @memberof TemplateDto */ content: string; /** * Created at time * @type {Date} * @memberof TemplateDto */ createdAt: Date; } export function TemplateDtoFromJSON(json: any): TemplateDto { return TemplateDtoFromJSONTyped(json, false); } export function TemplateDtoFromJSONTyped( json: any, ignoreDiscriminator: boolean ): TemplateDto { if (json === undefined || json === null) { return json; } return { id: json['id'], name: json['name'], variables: (json['variables'] as Array<any>).map(TemplateVariableFromJSON), content: json['content'], createdAt: new Date(json['createdAt']), }; } export function TemplateDtoToJSON(value?: TemplateDto | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { id: value.id, name: value.name, variables: (value.variables as Array<any>).map(TemplateVariableToJSON), content: value.content, createdAt: value.createdAt.toISOString(), }; }