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.

130 lines (124 loc) 2.98 kB
/* 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'; /** * Rules for inbox * @export * @interface InboxRulesetDto */ export interface InboxRulesetDto { /** * * @type {string} * @memberof InboxRulesetDto */ id: string; /** * * @type {string} * @memberof InboxRulesetDto */ inboxId?: string | null; /** * * @type {string} * @memberof InboxRulesetDto */ scope: InboxRulesetDtoScopeEnum; /** * * @type {string} * @memberof InboxRulesetDto */ action: InboxRulesetDtoActionEnum; /** * * @type {string} * @memberof InboxRulesetDto */ target: string; /** * * @type {string} * @memberof InboxRulesetDto */ handler: InboxRulesetDtoHandlerEnum; /** * * @type {Date} * @memberof InboxRulesetDto */ createdAt: Date; } /** * @export * @enum {string} */ export enum InboxRulesetDtoScopeEnum { RECEIVING_EMAILS = 'RECEIVING_EMAILS', SENDING_EMAILS = 'SENDING_EMAILS', } /** * @export * @enum {string} */ export enum InboxRulesetDtoActionEnum { BLOCK = 'BLOCK', ALLOW = 'ALLOW', FILTER_REMOVE = 'FILTER_REMOVE', } /** * @export * @enum {string} */ export enum InboxRulesetDtoHandlerEnum { EXCEPTION = 'EXCEPTION', } export function InboxRulesetDtoFromJSON(json: any): InboxRulesetDto { return InboxRulesetDtoFromJSONTyped(json, false); } export function InboxRulesetDtoFromJSONTyped( json: any, ignoreDiscriminator: boolean ): InboxRulesetDto { if (json === undefined || json === null) { return json; } return { id: json['id'], inboxId: !exists(json, 'inboxId') ? undefined : json['inboxId'], scope: json['scope'], action: json['action'], target: json['target'], handler: json['handler'], createdAt: new Date(json['createdAt']), }; } export function InboxRulesetDtoToJSON(value?: InboxRulesetDto | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { id: value.id, inboxId: value.inboxId, scope: value.scope, action: value.action, target: value.target, handler: value.handler, createdAt: value.createdAt.toISOString(), }; }