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.
137 lines (131 loc) • 3.37 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';
/**
* ConnectorEventProjection
* @export
* @interface ConnectorEventProjection
*/
export interface ConnectorEventProjection {
/**
*
* @type {string}
* @memberof ConnectorEventProjection
*/
eventType: ConnectorEventProjectionEventTypeEnum;
/**
*
* @type {Date}
* @memberof ConnectorEventProjection
*/
createdAt: Date;
/**
*
* @type {string}
* @memberof ConnectorEventProjection
*/
connectorId: string;
/**
*
* @type {boolean}
* @memberof ConnectorEventProjection
*/
seen?: boolean;
/**
*
* @type {string}
* @memberof ConnectorEventProjection
*/
message?: string;
/**
*
* @type {string}
* @memberof ConnectorEventProjection
*/
id?: string;
/**
*
* @type {number}
* @memberof ConnectorEventProjection
*/
size: number;
/**
*
* @type {string}
* @memberof ConnectorEventProjection
*/
status: ConnectorEventProjectionStatusEnum;
}
/**
* @export
* @enum {string}
*/
export enum ConnectorEventProjectionEventTypeEnum {
SEND = 'SEND',
SYNC = 'SYNC',
}
/**
* @export
* @enum {string}
*/
export enum ConnectorEventProjectionStatusEnum {
SUCCESS = 'SUCCESS',
INTERNAL_ERROR = 'INTERNAL_ERROR',
SUBSCRIPTION_ERROR = 'SUBSCRIPTION_ERROR',
CONNECTION_ERROR = 'CONNECTION_ERROR',
NOT_FOUND = 'NOT_FOUND',
}
export function ConnectorEventProjectionFromJSON(
json: any
): ConnectorEventProjection {
return ConnectorEventProjectionFromJSONTyped(json, false);
}
export function ConnectorEventProjectionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ConnectorEventProjection {
if (json === undefined || json === null) {
return json;
}
return {
eventType: json['eventType'],
createdAt: new Date(json['createdAt']),
connectorId: json['connectorId'],
seen: !exists(json, 'seen') ? undefined : json['seen'],
message: !exists(json, 'message') ? undefined : json['message'],
id: !exists(json, 'id') ? undefined : json['id'],
size: json['size'],
status: json['status'],
};
}
export function ConnectorEventProjectionToJSON(
value?: ConnectorEventProjection | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
eventType: value.eventType,
createdAt: value.createdAt.toISOString(),
connectorId: value.connectorId,
seen: value.seen,
message: value.message,
id: value.id,
size: value.size,
status: value.status,
};
}