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.
145 lines (140 loc) • 3.95 kB
text/typescript
/* 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 ImapMailboxStatus
*/
export interface ImapMailboxStatus {
/**
* The mailbox name.
* @type {string}
* @memberof ImapMailboxStatus
*/
name: string;
/**
* True if the mailbox is open in read-only mode.
* @type {boolean}
* @memberof ImapMailboxStatus
*/
readOnly: boolean;
/**
* Results map
* @type {object}
* @memberof ImapMailboxStatus
*/
items: object | null;
/**
* The mailbox flags.
* @type {Array<string>}
* @memberof ImapMailboxStatus
*/
flags: Array<string> | null;
/**
* The mailbox permanent flags.
* @type {Array<string>}
* @memberof ImapMailboxStatus
*/
permanentFlags: Array<string> | null;
/**
* The sequence number of the first unseen message in the mailbox.
* @type {number}
* @memberof ImapMailboxStatus
*/
unseenSeqNum: number;
/**
* The number of messages in this mailbox.
* @type {number}
* @memberof ImapMailboxStatus
*/
messages: number;
/**
* The number of messages not seen since the last time the mailbox was opened.
* @type {number}
* @memberof ImapMailboxStatus
*/
recent: number;
/**
* The number of unread messages.
* @type {number}
* @memberof ImapMailboxStatus
*/
unseen: number;
/**
* The next UID.
* @type {number}
* @memberof ImapMailboxStatus
*/
uidNext: number;
/**
* Together with a UID, it is a unique identifier for a message. Must be greater than or equal to 1.
* @type {number}
* @memberof ImapMailboxStatus
*/
uidValidity: number;
/**
* Per-mailbox limit of message size. Set only if server supports the APPENDLIMIT extension
* @type {number}
* @memberof ImapMailboxStatus
*/
appendLimit?: number | null;
}
export function ImapMailboxStatusFromJSON(json: any): ImapMailboxStatus {
return ImapMailboxStatusFromJSONTyped(json, false);
}
export function ImapMailboxStatusFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ImapMailboxStatus {
if (json === undefined || json === null) {
return json;
}
return {
name: json['name'],
readOnly: json['readOnly'],
items: json['items'],
flags: json['flags'],
permanentFlags: json['permanentFlags'],
unseenSeqNum: json['unseenSeqNum'],
messages: json['messages'],
recent: json['recent'],
unseen: json['unseen'],
uidNext: json['uidNext'],
uidValidity: json['uidValidity'],
appendLimit: !exists(json, 'appendLimit') ? undefined : json['appendLimit'],
};
}
export function ImapMailboxStatusToJSON(value?: ImapMailboxStatus | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
name: value.name,
readOnly: value.readOnly,
items: value.items,
flags: value.flags,
permanentFlags: value.permanentFlags,
unseenSeqNum: value.unseenSeqNum,
messages: value.messages,
recent: value.recent,
unseen: value.unseen,
uidNext: value.uidNext,
uidValidity: value.uidValidity,
appendLimit: value.appendLimit,
};
}