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.

110 lines (104 loc) 2.94 kB
/* tslint:disable */ /* eslint-disable */ /** * MailSlurp API * MailSlurp is an API for sending and receiving emails and SMS from dynamically allocated email addresses and phone numbers. 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'; /** * * @export * @interface PhoneMessageThreadProjection */ export interface PhoneMessageThreadProjection { /** * * @type {string} * @memberof PhoneMessageThreadProjection */ phoneNumber: string; /** * * @type {string} * @memberof PhoneMessageThreadProjection */ phoneNumberId: string; /** * * @type {string} * @memberof PhoneMessageThreadProjection */ otherPhoneNumber: string; /** * * @type {string} * @memberof PhoneMessageThreadProjection */ lastMessageDirection: PhoneMessageThreadProjectionLastMessageDirectionEnum; /** * * @type {string} * @memberof PhoneMessageThreadProjection */ lastBody: string; /** * * @type {Date} * @memberof PhoneMessageThreadProjection */ lastCreated: Date; } /** * @export * @enum {string} */ export enum PhoneMessageThreadProjectionLastMessageDirectionEnum { OUTBOUND = 'OUTBOUND', INBOUND = 'INBOUND', } export function PhoneMessageThreadProjectionFromJSON( json: any ): PhoneMessageThreadProjection { return PhoneMessageThreadProjectionFromJSONTyped(json, false); } export function PhoneMessageThreadProjectionFromJSONTyped( json: any, ignoreDiscriminator: boolean ): PhoneMessageThreadProjection { if (json === undefined || json === null) { return json; } return { phoneNumber: json['phoneNumber'], phoneNumberId: json['phoneNumberId'], otherPhoneNumber: json['otherPhoneNumber'], lastMessageDirection: json['lastMessageDirection'], lastBody: json['lastBody'], lastCreated: new Date(json['lastCreated']), }; } export function PhoneMessageThreadProjectionToJSON( value?: PhoneMessageThreadProjection | null ): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { phoneNumber: value.phoneNumber, phoneNumberId: value.phoneNumberId, otherPhoneNumber: value.otherPhoneNumber, lastMessageDirection: value.lastMessageDirection, lastBody: value.lastBody, lastCreated: value.lastCreated.toISOString(), }; }