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.
105 lines (104 loc) • 4.5 kB
JavaScript
;
/* 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.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.ConnectorDtoToJSON = exports.ConnectorDtoFromJSONTyped = exports.ConnectorDtoFromJSON = exports.ConnectorDtoSyncScheduleTypeEnum = exports.ConnectorDtoConnectorAuthTypeEnum = exports.ConnectorDtoConnectorTypeEnum = void 0;
var runtime_1 = require("../runtime");
/**
* @export
* @enum {string}
*/
var ConnectorDtoConnectorTypeEnum;
(function (ConnectorDtoConnectorTypeEnum) {
ConnectorDtoConnectorTypeEnum["IMAP"] = "IMAP";
})(ConnectorDtoConnectorTypeEnum = exports.ConnectorDtoConnectorTypeEnum || (exports.ConnectorDtoConnectorTypeEnum = {}));
/**
* @export
* @enum {string}
*/
var ConnectorDtoConnectorAuthTypeEnum;
(function (ConnectorDtoConnectorAuthTypeEnum) {
ConnectorDtoConnectorAuthTypeEnum["PLAIN_TEXT"] = "PLAIN_TEXT";
})(ConnectorDtoConnectorAuthTypeEnum = exports.ConnectorDtoConnectorAuthTypeEnum || (exports.ConnectorDtoConnectorAuthTypeEnum = {}));
/**
* @export
* @enum {string}
*/
var ConnectorDtoSyncScheduleTypeEnum;
(function (ConnectorDtoSyncScheduleTypeEnum) {
ConnectorDtoSyncScheduleTypeEnum["INTERVAL"] = "INTERVAL";
})(ConnectorDtoSyncScheduleTypeEnum = exports.ConnectorDtoSyncScheduleTypeEnum || (exports.ConnectorDtoSyncScheduleTypeEnum = {}));
function ConnectorDtoFromJSON(json) {
return ConnectorDtoFromJSONTyped(json, false);
}
exports.ConnectorDtoFromJSON = ConnectorDtoFromJSON;
function ConnectorDtoFromJSONTyped(json, ignoreDiscriminator) {
if (json === undefined || json === null) {
return json;
}
return {
id: json['id'],
enabled: json['enabled'],
userId: json['userId'],
connectorType: json['connectorType'],
connectorAuthType: json['connectorAuthType'],
syncEnabled: json['syncEnabled'],
syncScheduleType: json['syncScheduleType'],
syncInterval: !(0, runtime_1.exists)(json, 'syncInterval')
? undefined
: json['syncInterval'],
imapHost: !(0, runtime_1.exists)(json, 'imapHost') ? undefined : json['imapHost'],
imapPort: !(0, runtime_1.exists)(json, 'imapPort') ? undefined : json['imapPort'],
imapUsername: !(0, runtime_1.exists)(json, 'imapUsername')
? undefined
: json['imapUsername'],
imapPassword: !(0, runtime_1.exists)(json, 'imapPassword')
? undefined
: json['imapPassword'],
imapSsl: !(0, runtime_1.exists)(json, 'imapSsl') ? undefined : json['imapSsl'],
selectFolder: !(0, runtime_1.exists)(json, 'selectFolder')
? undefined
: json['selectFolder'],
searchTerms: !(0, runtime_1.exists)(json, 'searchTerms') ? undefined : json['searchTerms'],
createdAt: new Date(json['createdAt']),
};
}
exports.ConnectorDtoFromJSONTyped = ConnectorDtoFromJSONTyped;
function ConnectorDtoToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
enabled: value.enabled,
userId: value.userId,
connectorType: value.connectorType,
connectorAuthType: value.connectorAuthType,
syncEnabled: value.syncEnabled,
syncScheduleType: value.syncScheduleType,
syncInterval: value.syncInterval,
imapHost: value.imapHost,
imapPort: value.imapPort,
imapUsername: value.imapUsername,
imapPassword: value.imapPassword,
imapSsl: value.imapSsl,
selectFolder: value.selectFolder,
searchTerms: value.searchTerms,
createdAt: value.createdAt.toISOString(),
};
}
exports.ConnectorDtoToJSON = ConnectorDtoToJSON;