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.

142 lines (136 loc) 3.32 kB
/* 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'; /** * Rules for an inbox or phone number. Rulesets can be used to block, allow, filter, or bounce emails or SMS when sending or receiving. * @export * @interface RulesetDto */ export interface RulesetDto { /** * * @type {string} * @memberof RulesetDto */ id: string; /** * * @type {string} * @memberof RulesetDto */ inboxId?: string | null; /** * * @type {string} * @memberof RulesetDto */ phoneId?: string | null; /** * * @type {string} * @memberof RulesetDto */ scope: RulesetDtoScopeEnum; /** * * @type {string} * @memberof RulesetDto */ action: RulesetDtoActionEnum; /** * * @type {string} * @memberof RulesetDto */ target: string; /** * * @type {string} * @memberof RulesetDto */ handler: RulesetDtoHandlerEnum; /** * * @type {Date} * @memberof RulesetDto */ createdAt: Date; } /** * @export * @enum {string} */ export enum RulesetDtoScopeEnum { RECEIVING_EMAILS = 'RECEIVING_EMAILS', SENDING_EMAILS = 'SENDING_EMAILS', RECEIVING_SMS = 'RECEIVING_SMS', SENDING_SMS = 'SENDING_SMS', } /** * @export * @enum {string} */ export enum RulesetDtoActionEnum { BLOCK = 'BLOCK', ALLOW = 'ALLOW', FILTER_REMOVE = 'FILTER_REMOVE', BOUNCE_SOFT = 'BOUNCE_SOFT', BOUNCE_HARD = 'BOUNCE_HARD', } /** * @export * @enum {string} */ export enum RulesetDtoHandlerEnum { EXCEPTION = 'EXCEPTION', } export function RulesetDtoFromJSON(json: any): RulesetDto { return RulesetDtoFromJSONTyped(json, false); } export function RulesetDtoFromJSONTyped( json: any, ignoreDiscriminator: boolean ): RulesetDto { if (json === undefined || json === null) { return json; } return { id: json['id'], inboxId: !exists(json, 'inboxId') ? undefined : json['inboxId'], phoneId: !exists(json, 'phoneId') ? undefined : json['phoneId'], scope: json['scope'], action: json['action'], target: json['target'], handler: json['handler'], createdAt: new Date(json['createdAt']), }; } export function RulesetDtoToJSON(value?: RulesetDto | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { id: value.id, inboxId: value.inboxId, phoneId: value.phoneId, scope: value.scope, action: value.action, target: value.target, handler: value.handler, createdAt: value.createdAt.toISOString(), }; }