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.

179 lines (174 loc) 4.64 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'; /** * IMAP server search options * @export * @interface ImapServerSearchOptions */ export interface ImapServerSearchOptions { /** * * @type {string} * @memberof ImapServerSearchOptions */ seqNum?: string | null; /** * * @type {string} * @memberof ImapServerSearchOptions */ uid?: string | null; /** * * @type {Date} * @memberof ImapServerSearchOptions */ since?: Date | null; /** * * @type {Date} * @memberof ImapServerSearchOptions */ before?: Date | null; /** * * @type {Date} * @memberof ImapServerSearchOptions */ sentSince?: Date | null; /** * * @type {Date} * @memberof ImapServerSearchOptions */ sentBefore?: Date | null; /** * * @type {{ [key: string]: Array<string>; }} * @memberof ImapServerSearchOptions */ header?: { [key: string]: Array<string> } | null; /** * * @type {Array<string>} * @memberof ImapServerSearchOptions */ body?: Array<string> | null; /** * * @type {Array<string>} * @memberof ImapServerSearchOptions */ text?: Array<string> | null; /** * * @type {Array<string>} * @memberof ImapServerSearchOptions */ withFlags?: Array<string> | null; /** * * @type {Array<string>} * @memberof ImapServerSearchOptions */ withoutFlags?: Array<string> | null; } export function ImapServerSearchOptionsFromJSON( json: any ): ImapServerSearchOptions { return ImapServerSearchOptionsFromJSONTyped(json, false); } export function ImapServerSearchOptionsFromJSONTyped( json: any, ignoreDiscriminator: boolean ): ImapServerSearchOptions { if (json === undefined || json === null) { return json; } return { seqNum: !exists(json, 'seqNum') ? undefined : json['seqNum'], uid: !exists(json, 'uid') ? undefined : json['uid'], since: !exists(json, 'since') ? undefined : json['since'] === null ? null : new Date(json['since']), before: !exists(json, 'before') ? undefined : json['before'] === null ? null : new Date(json['before']), sentSince: !exists(json, 'sentSince') ? undefined : json['sentSince'] === null ? null : new Date(json['sentSince']), sentBefore: !exists(json, 'sentBefore') ? undefined : json['sentBefore'] === null ? null : new Date(json['sentBefore']), header: !exists(json, 'header') ? undefined : json['header'], body: !exists(json, 'body') ? undefined : json['body'], text: !exists(json, 'text') ? undefined : json['text'], withFlags: !exists(json, 'withFlags') ? undefined : json['withFlags'], withoutFlags: !exists(json, 'withoutFlags') ? undefined : json['withoutFlags'], }; } export function ImapServerSearchOptionsToJSON( value?: ImapServerSearchOptions | null ): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { seqNum: value.seqNum, uid: value.uid, since: value.since === undefined ? undefined : value.since === null ? null : value.since.toISOString(), before: value.before === undefined ? undefined : value.before === null ? null : value.before.toISOString(), sentSince: value.sentSince === undefined ? undefined : value.sentSince === null ? null : value.sentSince.toISOString(), sentBefore: value.sentBefore === undefined ? undefined : value.sentBefore === null ? null : value.sentBefore.toISOString(), header: value.header, body: value.body, text: value.text, withFlags: value.withFlags, withoutFlags: value.withoutFlags, }; }