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.
128 lines (122 loc) • 3.5 kB
text/typescript
/* 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';
/**
* Options for exporting user data
* @export
* @interface ExportOptions
*/
export interface ExportOptions {
/**
*
* @type {string}
* @memberof ExportOptions
*/
outputFormat: ExportOptionsOutputFormatEnum;
/**
*
* @type {boolean}
* @memberof ExportOptions
*/
excludePreviouslyExported?: boolean | null;
/**
*
* @type {Date}
* @memberof ExportOptions
*/
createdEarliestTime?: Date | null;
/**
*
* @type {Date}
* @memberof ExportOptions
*/
createdOldestTime?: Date | null;
/**
*
* @type {string}
* @memberof ExportOptions
*/
filter?: string | null;
/**
*
* @type {string}
* @memberof ExportOptions
*/
listSeparatorToken?: string | null;
}
/**
* @export
* @enum {string}
*/
export enum ExportOptionsOutputFormatEnum {
DEFAULT = 'CSV_DEFAULT',
EXCEL = 'CSV_EXCEL',
}
export function ExportOptionsFromJSON(json: any): ExportOptions {
return ExportOptionsFromJSONTyped(json, false);
}
export function ExportOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ExportOptions {
if (json === undefined || json === null) {
return json;
}
return {
outputFormat: json['outputFormat'],
excludePreviouslyExported: !exists(json, 'excludePreviouslyExported')
? undefined
: json['excludePreviouslyExported'],
createdEarliestTime: !exists(json, 'createdEarliestTime')
? undefined
: json['createdEarliestTime'] === null
? null
: new Date(json['createdEarliestTime']),
createdOldestTime: !exists(json, 'createdOldestTime')
? undefined
: json['createdOldestTime'] === null
? null
: new Date(json['createdOldestTime']),
filter: !exists(json, 'filter') ? undefined : json['filter'],
listSeparatorToken: !exists(json, 'listSeparatorToken')
? undefined
: json['listSeparatorToken'],
};
}
export function ExportOptionsToJSON(value?: ExportOptions | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
outputFormat: value.outputFormat,
excludePreviouslyExported: value.excludePreviouslyExported,
createdEarliestTime:
value.createdEarliestTime === undefined
? undefined
: value.createdEarliestTime === null
? null
: value.createdEarliestTime.toISOString(),
createdOldestTime:
value.createdOldestTime === undefined
? undefined
: value.createdOldestTime === null
? null
: value.createdOldestTime.toISOString(),
filter: value.filter,
listSeparatorToken: value.listSeparatorToken,
};
}