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.

133 lines (128 loc) 3.5 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'; /** * Email attachment data * @export * @interface AttachmentProjection */ export interface AttachmentProjection { /** * * @type {string} * @memberof AttachmentProjection */ userId: string; /** * Inbox ID * @type {string} * @memberof AttachmentProjection */ inboxId?: string; /** * * @type {Date} * @memberof AttachmentProjection */ updatedAt: Date; /** * * @type {Date} * @memberof AttachmentProjection */ createdAt: Date; /** * Content ID of attachment. * @type {string} * @memberof AttachmentProjection */ contentId?: string | null; /** * Attachment ID * @type {string} * @memberof AttachmentProjection */ attachmentId: string; /** * * @type {string} * @memberof AttachmentProjection */ name?: string | null; /** * ID * @type {string} * @memberof AttachmentProjection */ id: string; /** * Content length of attachment in bytes * @type {number} * @memberof AttachmentProjection */ contentLength?: number | null; /** * Content type of attachment. * @type {string} * @memberof AttachmentProjection */ contentType?: string | null; } export function AttachmentProjectionFromJSON(json: any): AttachmentProjection { return AttachmentProjectionFromJSONTyped(json, false); } export function AttachmentProjectionFromJSONTyped( json: any, ignoreDiscriminator: boolean ): AttachmentProjection { if (json === undefined || json === null) { return json; } return { userId: json['userId'], inboxId: !exists(json, 'inboxId') ? undefined : json['inboxId'], updatedAt: new Date(json['updatedAt']), createdAt: new Date(json['createdAt']), contentId: !exists(json, 'contentId') ? undefined : json['contentId'], attachmentId: json['attachmentId'], name: !exists(json, 'name') ? undefined : json['name'], id: json['id'], contentLength: !exists(json, 'contentLength') ? undefined : json['contentLength'], contentType: !exists(json, 'contentType') ? undefined : json['contentType'], }; } export function AttachmentProjectionToJSON( value?: AttachmentProjection | null ): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { userId: value.userId, inboxId: value.inboxId, updatedAt: value.updatedAt.toISOString(), createdAt: value.createdAt.toISOString(), contentId: value.contentId, attachmentId: value.attachmentId, name: value.name, id: value.id, contentLength: value.contentLength, contentType: value.contentType, }; }