https://github.com/mailslurp/mailslurp-client
// @ts-ignore
import InboxTypeEnum = CreateInboxDto.InboxTypeEnum;
require('es6-promise').polyfill();
require('cross-fetch/polyfill');
import {
AliasControllerApi,
UserControllerApi,
AttachmentControllerApi,
AttachmentMetaData,
BounceControllerApi,
BulkActionsControllerApi,
CommonActionsControllerApi,
Configuration,
ContactControllerApi,
CreateInboxDto,
CreateInboxInboxTypeEnum,
DomainControllerApi,
Email,
EmailControllerApi,
EmailPreview,
EmailVerificationControllerApi,
FetchAPI,
FormControllerApi,
GetAllInboxesSortEnum,
GetEmailsPaginatedSortEnum,
GetEmailsSortEnum,
GroupControllerApi,
ImapSmtpAccessDetails,
InboxControllerApi,
InboxDto,
InboxForwarderControllerApi,
InboxRulesetControllerApi,
MailServerControllerApi,
MatchOptions,
MissedEmailControllerApi,
PageInboxProjection,
PhoneControllerApi,
SendEmailOptions,
SentEmailDto,
SentEmailsControllerApi,
SmsControllerApi,
TemplateControllerApi,
TrackingControllerApi,
UploadAttachmentOptions,
WaitForControllerApi,
WebhookControllerApi,
InboxReplierControllerApi,
} from './generated';
export * from './generated';
type SortEnum = 'ASC' | 'DESC';
/**
* MailSlurp config
*
* @remarks
* [Obtain your API Key](https://app.mailslurp.com) in your dashboard.
*/
export type Config = {
// obtain an apiKey at https://app.mailslurp.com
apiKey: string;
// optional attribution id (see sales)
attribution?: string;
// optional api base path
basePath?: string;
// optional fetch override
fetchApi?: FetchAPI;
// optional request headers map
headers?: { [key: string]: string };
};
/**
* The official MailSlurp Javascript library. A wrapper around the [MailSlurp REST API](https://docs.mailslurp.com/api/docs/Apis/).
*
* Create an instance of this class to call MailSlurp API methods. Contains top level convenience functions. Access the full API controllers as properties on the instance.
*
* ## Create instance
* You must provide a configuration object with [your API Key](https://app.mailslurp.com) as the `apiKey` property
* when creating a new instance.
*
* ```javascript
* const MailSlurp = require('mailslurp-client').default;
* const mailslurp = new MailSlurp({
* apiKey: 'xxxx'
* })
* ```
* ## Call methods
* Most methods are asynchronous and return Promises. You can `await` the results or use `.then(result => {})`
* Common controllers include the [InboxController](https://mailslurp.github.io/mailslurp-client/classes/InboxControllerApi.html), [EmailController](https://mailslurp.github.io/mailslurp-client/classes/EmailControllerApi.html), [SMSController](https://mailslurp.github.io/mailslurp-client/classes/SmsControllerApi.html) and the [WaitForController](https://mailslurp.github.io/mailslurp-client/classes/WaitForControllerApi.html) for receiving emails.
*
* ```javascript
* // call convenience functions
* const email = await mailslurp.waitForLatestEmail(...args)
*
* // call controllers to access full API methods
* const alias = await mailslurp.aliasController.createAlias(...args)
*
* // or create a controller
* const inboxController = mailslurp.inboxController
* const inbox = await inboxController.createInbox()
*
* // use Promises methods if you prefer
* mailslurp.getEmails(inbox.id).then(emails => {
* // handle emails
* console.log(emails))
* }
* ```
*/
export class MailSlurp {
public readonly emailController: EmailControllerApi;
public readonly emailVerificationController: EmailVerificationControllerApi;
public readonly inboxController: InboxControllerApi;
public readonly userController: UserControllerApi;
public readonly phoneController: PhoneControllerApi;
public readonly smsController: SmsControllerApi;
public readonly sentController: SentEmailsControllerApi;
public readonly inboxReplierController: InboxReplierControllerApi;
public readonly attachmentController: AttachmentControllerApi;
public readonly commonController: CommonActionsControllerApi;
public readonly bulkController: BulkActionsControllerApi;
public readonly waitController: WaitForControllerApi;
public readonly aliasController: AliasControllerApi;
public readonly formController: FormControllerApi;
public readonly domainController: DomainControllerApi;
public readonly contactController: ContactControllerApi;
public readonly groupController: GroupControllerApi;
public readonly templateController: TemplateControllerApi;
public readonly webhookController: WebhookControllerApi;
public readonly mailServerController: MailServerControllerApi;
public readonly missedEmailController: MissedEmailControllerApi;
public readonly inboxRulesetController: InboxRulesetControllerApi;
public readonly inboxForwarderController: InboxForwarderControllerApi;
public readonly trackingController: TrackingControllerApi;
public readonly bounceController: BounceControllerApi;
/**
* Create a new MailSlurp instance.
*
* Contains top level convenience functions. Access the full API controllers as properties on the instance.
*
* ```javascript
* const MailSlurp = require('mailslurp-client').default
* const mailslurp = new MailSlurp({ apiKey })
* ```
* @param opts
*/
constructor(opts: Config) {
// check options
if (!opts.apiKey) {
throw 'Missing apiKey config parameter';
}
const _fetch: any = opts.fetchApi || fetch;
// create credentials
const clientConfiguration = new Configuration({
apiKey: opts.apiKey,
basePath: opts.basePath || 'https://javascript.api.mailslurp.com',
headers: opts.headers || undefined,
});
const args = [clientConfiguration, clientConfiguration.basePath, _fetch];
// instantiate api clients
this.emailVerificationController = new EmailVerificationControllerApi(
...args
);
this.phoneController = new PhoneControllerApi(...args);
this.smsController = new SmsControllerApi(...args);
this.userController = new UserControllerApi(...args);
this.emailController = new EmailControllerApi(...args);
this.inboxController = new InboxControllerApi(...args);
this.attachmentController = new AttachmentControllerApi(...args);
this.domainController = new DomainControllerApi(...args);
this.sentController = new SentEmailsControllerApi(...args);
this.aliasController = new AliasControllerApi(...args);
this.formController = new FormControllerApi(...args);
this.contactController = new ContactControllerApi(...args);
this.groupController = new GroupControllerApi(...args);
this.templateController = new TemplateControllerApi(...args);
this.webhookController = new WebhookControllerApi(...args);
this.commonController = new CommonActionsControllerApi(...args);
this.bulkController = new BulkActionsControllerApi(...args);
this.waitController = new WaitForControllerApi(...args);
this.mailServerController = new MailServerControllerApi(...args);
this.missedEmailController = new MissedEmailControllerApi(...args);
this.inboxRulesetController = new InboxRulesetControllerApi(...args);
this.inboxForwarderController = new InboxForwarderControllerApi(...args);
this.inboxReplierController = new InboxReplierControllerApi(...args);
this.trackingController = new TrackingControllerApi(...args);
this.bounceController = new BounceControllerApi(...args);
}
/**
* Create a new inbox and with a randomized email address to send and receive from. Pass emailAddress parameter if you wish to use a specific email address. Creating an inbox is required before sending or receiving emails. If writing tests it is recommended that you create a new inbox during each test method so that it is unique and empty.
* @summary Create an Inbox (email address)
* @param {string} [description] Optional description for an inbox.
* @param {string} [emailAddress] Optional email address including domain you wish inbox to use (eg: test123@mydomain.com). Only supports domains that you have registered and verified with MailSlurp using dashboard or `createDomain` method.
* @param {Date} [expiresAt] Optional expires at timestamp. If your plan supports this feature you can specify when an inbox should expire. If left empty inbox will exist permanently or expire when your plan dictates
* @param {boolean} [favourite] Is inbox favourited.
* @param {string} [name] Optional name for an inbox.
* @param {Array<string>} [tags] Optional tags for an inbox. Can be used for searching and filtering inboxes.
* @param {boolean} [teamAccess] Optional flag to allow team access to inbox.
* @param {number} [expiresIn] Optional number of milliseconds to expire inbox after.
* @param {boolean} [useDomainPool] Optional flag to use the MailSlurp domain pool for domain endings.
* @param {string} inboxType Optional inbox type HTTP or SMTP
*/
async createInbox(
emailAddress?: string,
name?: string,
description?: string,
expiresAt?: Date,
favourite?: boolean,
tags?: Array<string>,
teamAccess?: boolean,
expiresIn?: number,
useDomainPool?: boolean,
inboxType?: 'HTTP_INBOX' | 'SMTP_INBOX'
): Promise<InboxDto> {
return wrapCall('createInbox', () =>
this.inboxController.createInbox({
description,
emailAddress,
expiresAt,
expiresIn,
favourite,
inboxType: inboxType
? inboxType === 'HTTP_INBOX'
? CreateInboxInboxTypeEnum.HTTP_INBOX
: CreateInboxInboxTypeEnum.SMTP_INBOX
: undefined,
name,
tags,
useDomainPool,
})
);
}
/**
* Create an inbox using CreateInboxDto options. More convenient that `createInbox` in some cases.
* @param createInboxOptions
*/
async createInboxWithOptions(
createInboxOptions: CreateInboxDto
): Promise<InboxDto> {
return wrapCall('createInbox', () =>
this.inboxController.createInboxWithOptions({
createInboxDto: createInboxOptions,
})
);
}
async getImapSmtpAccessDetails(
inboxId?: string
): Promise<ImapSmtpAccessDetails> {
return wrapCall('createInbox', () =>
this.inboxController.getImapSmtpAccess({ inboxId })
);
}
/**
* Permanently delete an inbox and associated email address as well as all emails within the given inbox. This action cannot be undone. Note: deleting an inbox will not affect your account usage. Monthly inbox usage is based on how many inboxes you create within 30 days, not how many exist at time of request.
* @summary Delete inbox
* @param {string} inboxId inboxId
*/
async deleteInbox(inboxId: string): Promise<void> {
return wrapCall('deleteInbox', () =>
this.inboxController.deleteInbox({ inboxId })
);
}
/**
* Deletes all emails
* @summary Delete all emails in an inbox
* @param {string} inboxId inboxId
*/
async emptyInbox(inboxId: string): Promise<void> {
return wrapCall('emptyInbox', () =>
this.commonController.emptyInbox({ inboxId })
);
}
/**
* Returns an inbox's properties, including its email address and ID.
* @summary Get Inbox
* @param {string} inboxId inboxId
*/
async getInbox(inboxId: string): Promise<InboxDto> {
return wrapCall('getInbox', () =>
this.inboxController.getInbox({ inboxId })
);
}
/**
* List the inboxes you have created
* @summary List Inboxes / Email Addresses
*/
async getInboxes(): Promise<InboxDto[]> {
return wrapCall('getInboxes', () => this.inboxController.getInboxes({}));
}
/**
* List inboxes in paginated form. Allows for page index, page size, and sort direction. Can also filter by favourited or email address like pattern.
* @summary List Inboxes Paginated
* @param {boolean} [favourite] Optionally filter results for favourites only
* @param {number} [page] Optional page index in inbox list pagination
* @param {string} [search] Optionally filter by search words partial matching ID, tags, name, and email address
* @param {number} [size] Optional page size in inbox list pagination
* @param {'ASC' | 'DESC'} [sort] Optional createdAt sort direction ASC or DESC
* @param {string} [tag] Optionally filter by tag
*/
async getAllInboxes(
page?: number,
size?: number,
favourite?: boolean,
search?: string,
sort?: SortEnum,
tag?: string
): Promise<PageInboxProjection> {
return wrapCall('getAllInboxes', () =>
this.inboxController.getAllInboxes({
favourite,
page,
search,
size,
sort: sort
? sort == 'ASC'
? GetAllInboxesSortEnum.ASC
: GetAllInboxesSortEnum.DESC
: undefined,
tag,
})
);
}
// waitFor methods
/**
* Will return either the last received email or wait for an email to arrive and return that. If you need to wait for an email for a non-empty inbox see the other receive methods such as waitForNthEmail or waitForEmailCount.
* @summary Fetch inbox's latest email or if empty wait for an email to arrive
* @param {string} [inboxId] Id of the inbox we are fetching emails from
* @param {number} [timeout] Max milliseconds to wait
* @param {boolean} [unreadOnly] Optional filter for unread only
*/
async waitForLatestEmail(
inboxId?: string,
timeout?: number,
unreadOnly?: boolean
): Promise<Email> {
return wrapCall('waitForLatestEmail', () =>
this.waitController.waitForLatestEmail({
inboxId,
timeout,
unreadOnly,
})
);
}
/**
* If nth email is already present in inbox then return it. If not hold the connection open until timeout expires or the nth email is received and returned.
* @summary Wait for or fetch the email with a given index in the inbox specified
* @param {string} [inboxId] Id of the inbox you are fetching emails from
* @param {number} [index] Zero based index of the email to wait for. If an inbox has 1 email already and you want to wait for the 2nd email pass index=1
* @param {number} [timeout] Max milliseconds to wait for the nth email if not already present
* @param {boolean} [unreadOnly] Optional filter for unread only
*/
async waitForNthEmail(
inboxId: string,
index: number,
timeout?: number,
unreadOnly?: boolean
): Promise<Email> {
return wrapCall('waitForNthEmail', () =>
this.waitController.waitForNthEmail({
inboxId,
index,
timeout,
unreadOnly,
})
);
}
/**
* Perform a search of emails in an inbox with the given patterns. If results match expected count then return or else retry the search until results are found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options.
* @summary Wait or return list of emails that match simple matching patterns
* @param {MatchOptions} matchOptions matchOptions
* @param {number} [count] Number of emails to wait for. Must be greater that 1
* @param {string} [inboxId] Id of the inbox we are fetching emails from
* @param {number} [timeout] Max milliseconds to wait
* @param {boolean} [unreadOnly] Optional filter for unread only
*/
async waitForMatchingEmails(
matchOptions: MatchOptions,
count?: number,
inboxId?: string,
timeout?: number,
unreadOnly?: boolean
): Promise<EmailPreview[]> {
return wrapCall('waitForMatchingEmail', () =>
this.waitController.waitForMatchingEmails({
matchOptions,
count,
inboxId,
timeout,
unreadOnly,
})
);
}
/**
* If inbox contains count or more emails at time of request then return count worth of emails. If not wait until the count is reached and return those or return an error if timeout is exceeded.
* @summary Wait for and return count number of emails
* @param {number} [count] Number of emails to wait for. Must be greater that 1
* @param {string} [inboxId] Id of the inbox we are fetching emails from
* @param {number} [timeout] Max milliseconds to wait
* @param {boolean} [unreadOnly] Optional filter for unread only
*/
async waitForEmailCount(
count?: number,
inboxId?: string,
timeout?: number,
unreadOnly?: boolean
): Promise<EmailPreview[]> {
return wrapCall('waitForEmailCount', () =>
this.waitController.waitForEmailCount({
count,
inboxId,
timeout,
unreadOnly,
})
);
}
/**
* Deletes an email and removes it from the inbox. Deleted emails cannot be recovered.
* @summary Delete an email
* @param {string} emailId emailId
*/
async deleteEmail(emailId: string): Promise<void> {
return wrapCall('deleteEmail', () =>
this.emailController.deleteEmail({ emailId })
);
}
/**
* By default returns all emails across all inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages
* @summary Get all emails
* @param {Array<string>} [inboxId] Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account.
* @param {number} [page] Optional page index in email list pagination
* @param {number} [size] Optional page size in email list pagination
* @param {'ASC' | 'DESC'} [sort] Optional createdAt sort direction ASC or DESC
* @param {boolean} [unreadOnly] Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly
* @param searchFilter Optional search filter
*/
async getAllEmails(
page?: number,
size?: number,
inboxId?: Array<string>,
sort?: SortEnum,
unreadOnly?: boolean,
searchFilter?: string
) {
return wrapCall('getAllEmails', () =>
this.emailController.getEmailsPaginated({
inboxId,
page,
searchFilter,
size,
sort: sort
? sort === 'DESC'
? GetEmailsPaginatedSortEnum.DESC
: GetEmailsPaginatedSortEnum.ASC
: undefined,
unreadOnly,
})
);
}
/**
* List emails that an inbox has received. Only emails that are sent to the inbox's email address will appear in the inbox. It may take several seconds for any email you send to an inbox's email address to appear in the inbox. To make this endpoint wait for a minimum number of emails use the `minCount` parameter. The server will retry the inbox database until the `minCount` is satisfied or the `retryTimeout` is reached
* @summary Get emails in an Inbox
* @param {string} inboxId Id of inbox that emails belongs to
* @param {Object} GetMessagesOptions see `GetMessagesOptions` details
*/
async getEmails(
inboxId: string,
args: GetMessagesOptions = {}
): Promise<EmailPreview[]> {
return wrapCall('getEmails', () =>
this.inboxController.getEmails({
inboxId,
limit: args.limit,
minCount: args.minCount,
retryTimeout: args.retryTimeout,
since: args.since,
size: args.size,
sort: args.sort
? args.sort === 'DESC'
? GetEmailsSortEnum.DESC
: GetEmailsSortEnum.ASC
: undefined,
})
);
}
/**
* Returns an EmailDto object with headers and content. To retrieve the raw unparsed email use the getRawEmail endpoints
* @summary Get email content
* @param {string} emailId emailId
*/
async getEmail(emailId: string): Promise<Email> {
return wrapCall('getEmail', () =>
this.emailController.getEmail({ emailId })
);
}
/**
* Returns a raw, unparsed, and unprocessed email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawEmailJson endpoint
* @summary Get raw email string
* @param {string} emailId emailId
*/
async getRawEmail(emailId: string): Promise<string> {
return wrapCall(
'getRawEmail',
() => this.emailController.getRawEmailContents({ emailId }) as any
);
}
/**
* Send an email from an inbox's email address. The request body should contain the `SendEmailOptions` that include recipients, attachments, body etc. See `SendEmailOptions` for all available properties. Note the `inboxId` refers to the inbox's id not the inbox's email address. See https://www.mailslurp.com/guides/ for more information on how to send emails.
* @summary Send Email
* @param {string} inboxId ID of the inbox you want to send the email from
* @param {SendEmailOptions} [sendEmailOptions] Options for the email
*/
async sendEmail(
inboxId: string,
sendEmailOptions: SendEmailOptions
): Promise<SentEmailDto> {
return wrapCall('sendEmail', () =>
this.inboxController.sendEmailAndConfirm({ inboxId, sendEmailOptions })
);
}
/**
* Returns the specified attachment for a given email as a byte stream (file download). You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream.
* @summary Get email attachment bytes
* @param {string} emailId emailId
* @param {string} attachmentId attachmentId
*/
async downloadAttachment(
emailId: string,
attachmentId: string
): Promise<String> {
return wrapCall('downloadAttachment', () =>
this.emailController.downloadAttachment({ attachmentId, emailId })
);
}
/**
* Upload an attachment for use in email sending. Attachment contents must be a base64 encoded string.
* When sending emails with attachments first upload each attachment with this endpoint.
* Record the returned attachment IDs. Then use these attachment IDs in the SendEmailOptions when sending an email.
* This means that attachments can easily be reused.
* @summary Upload an attachment for sending
* @param {UploadAttachmentOptions} uploadOptions uploadOptions
*/
async uploadAttachment(
options: UploadAttachmentOptions
): Promise<Array<String>> {
return wrapCall('uploadAttachment', () =>
this.attachmentController.uploadAttachment({
uploadAttachmentOptions: options,
})
);
}
/**
* Get attachment MetaData
*
* MetaData includes name, size (bytes) and content-type.
* @summary Get email attachment metadata
* @param {string} attachmentId attachmentId
* @param {string} emailId emailId
*/
async getAttachmentMetaData(
attachmentId: string,
emailId: string
): Promise<AttachmentMetaData> {
return wrapCall('getAttachmentMetaData', () =>
this.emailController.getAttachmentMetaData({ attachmentId, emailId })
);
}
}
/**
* Options for advanced message fetching
*
* @remarks
* For more control over fetching. See also Webhook endpoints
*/
export type GetMessagesOptions = {
// max emails to return
limit?: number;
// minimum number of emails to expect.
// when give, server will retry databases until this number is met or the retry timeout is exceeded
minCount?: number;
// maximum time to wait for conditions to be met
retryTimeout?: number;
// ignore emails received before this ISO-8601 date time
since?: Date;
// sort direction
sort?: SortEnum;
// page size of results
size?: number;
};
// helper
async function wrapCall<T>(tag: String, fn: () => Promise<T>): Promise<T> {
try {
return await fn();
} catch (e) {
throw e.json ? await e.json() : e;
}
}
export async function wrapException<T>(fn: () => Promise<T>): Promise<T> {
return wrapCall('wrapped exception', fn);
}
export interface Result<T> {
content?: T;
error?: {
statusCode: number;
message: string;
};
}
export async function wrapResult<T>(fn: () => Promise<T>): Promise<Result<T>> {
try {
const content = await fn();
return {
content,
};
} catch (e) {
const statusCode = e.status ? e.status : 500;
const message = e.json ? await e.json() : e;
return {
error: {
statusCode,
message,
},
};
}
}
export default MailSlurp;
/* 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.
*/
export const BASE_PATH = 'https://api.mailslurp.com'.replace(/\/+$/, '');
const isBlob = (value: any) =>
typeof Blob !== 'undefined' && value instanceof Blob;
/**
* This is the base class for all generated API classes.
*/
export class BaseAPI {
private middleware: Middleware[];
constructor(protected configuration = new Configuration()) {
this.middleware = configuration.middleware;
}
withMiddleware<T extends BaseAPI>(this: T, ...middlewares: Middleware[]) {
const next = this.clone<T>();
next.middleware = next.middleware.concat(...middlewares);
return next;
}
withPreMiddleware<T extends BaseAPI>(
this: T,
...preMiddlewares: Array<Middleware['pre']>
) {
const middlewares = preMiddlewares.map((pre) => ({ pre }));
return this.withMiddleware<T>(...middlewares);
}
withPostMiddleware<T extends BaseAPI>(
this: T,
...postMiddlewares: Array<Middleware['post']>
) {
const middlewares = postMiddlewares.map((post) => ({ post }));
return this.withMiddleware<T>(...middlewares);
}
protected async request(
context: RequestOpts,
initOverrides?: RequestInit
): Promise<Response> {
const { url, init } = this.createFetchParams(context, initOverrides);
const response = await this.fetchApi(url, init);
if (response.status >= 200 && response.status < 300) {
return response;
}
throw response;
}
private createFetchParams(context: RequestOpts, initOverrides?: RequestInit) {
let url = this.configuration.basePath + context.path;
if (
context.query !== undefined &&
Object.keys(context.query).length !== 0
) {
// only add the querystring to the URL if there are query parameters.
// this is done to avoid urls ending with a "?" character which buggy webservers
// do not handle correctly sometimes.
url += '?' + this.configuration.queryParamsStringify(context.query);
}
const body =
(typeof FormData !== 'undefined' && context.body instanceof FormData) ||
context.body instanceof URLSearchParams ||
isBlob(context.body)
? context.body
: JSON.stringify(context.body);
const headers = Object.assign(
{},
this.configuration.headers,
context.headers
);
const init = {
method: context.method,
headers: headers,
body,
credentials: this.configuration.credentials,
...initOverrides,
};
return { url, init };
}
private fetchApi = async (url: string, init: RequestInit) => {
let fetchParams = { url, init };
for (const middleware of this.middleware) {
if (middleware.pre) {
fetchParams =
(await middleware.pre({
fetch: this.fetchApi,
...fetchParams,
})) || fetchParams;
}
}
let response = await (this.configuration.fetchApi || fetch)(
fetchParams.url,
fetchParams.init
);
for (const middleware of this.middleware) {
if (middleware.post) {
response =
(await middleware.post({
fetch: this.fetchApi,
url: fetchParams.url,
init: fetchParams.init,
response: response.clone(),
})) || response;
}
}
return response;
};
/**
* Create a shallow clone of `this` by constructing a new instance
* and then shallow cloning data members.
*/
private clone<T extends BaseAPI>(this: T): T {
const constructor = this.constructor as any;
const next = new constructor(this.configuration);
next.middleware = this.middleware.slice();
return next;
}
}
export class RequiredError extends Error {
name: 'RequiredError' = 'RequiredError';
constructor(public field: string, msg?: string) {
super(msg);
}
}
export const COLLECTION_FORMATS = {
csv: ',',
ssv: ' ',
tsv: '\t',
pipes: '|',
};
export type FetchAPI = WindowOrWorkerGlobalScope['fetch'];
export interface ConfigurationParameters {
basePath?: string; // override base path
fetchApi?: FetchAPI; // override for fetch implementation
middleware?: Middleware[]; // middleware to apply before/after fetch requests
queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings
username?: string; // parameter for basic security
password?: string; // parameter for basic security
apiKey?: string | ((name: string) => string); // parameter for apiKey security
accessToken?:
| string
| Promise<string>
| ((name?: string, scopes?: string[]) => string | Promise<string>); // parameter for oauth2 security
headers?: HTTPHeaders; //header params we want to use on every request
credentials?: RequestCredentials; //value for the credentials param we want to use on each request
}
export class Configuration {
constructor(private configuration: ConfigurationParameters = {}) {}
get basePath(): string {
return this.configuration.basePath != null
? this.configuration.basePath
: BASE_PATH;
}
get fetchApi(): FetchAPI {
return this.configuration.fetchApi;
}
get middleware(): Middleware[] {
return this.configuration.middleware || [];
}
get queryParamsStringify(): (params: HTTPQuery) => string {
return this.configuration.queryParamsStringify || querystring;
}
get username(): string | undefined {
return this.configuration.username;
}
get password(): string | undefined {
return this.configuration.password;
}
get apiKey(): ((name: string) => string) | undefined {
const apiKey = this.configuration.apiKey;
if (apiKey) {
return typeof apiKey === 'function' ? apiKey : () => apiKey;
}
return undefined;
}
get accessToken():
| ((name?: string, scopes?: string[]) => string | Promise<string>)
| undefined {
const accessToken = this.configuration.accessToken;
if (accessToken) {
return typeof accessToken === 'function'
? accessToken
: async () => accessToken;
}
return undefined;
}
get headers(): HTTPHeaders | undefined {
return this.configuration.headers;
}
get credentials(): RequestCredentials | undefined {
return this.configuration.credentials;
}
}
export type Json = any;
export type HTTPMethod =
| 'GET'
| 'POST'
| 'PUT'
| 'PATCH'
| 'DELETE'
| 'OPTIONS'
| 'HEAD';
export type HTTPHeaders = { [key: string]: string };
export type HTTPQuery = {
[key: string]:
| string
| number
| null
| boolean
| Array<string | number | null | boolean>
| HTTPQuery;
};
export type HTTPBody = Json | FormData | URLSearchParams;
export type ModelPropertyNaming =
| 'camelCase'
| 'snake_case'
| 'PascalCase'
| 'original';
export interface FetchParams {
url: string;
init: RequestInit;
}
export interface RequestOpts {
path: string;
method: HTTPMethod;
headers: HTTPHeaders;
query?: HTTPQuery;
body?: HTTPBody;
}
export function exists(json: any, key: string) {
const value = json[key];
return value !== null && value !== undefined;
}
export function querystring(params: HTTPQuery, prefix: string = ''): string {
return Object.keys(params)
.map((key) => {
const fullKey = prefix + (prefix.length ? `[${key}]` : key);
const value = params[key];
if (value instanceof Array) {
const multiValue = value
.map((singleValue) => encodeURIComponent(String(singleValue)))
.join(`&${encodeURIComponent(fullKey)}=`);
return `${encodeURIComponent(fullKey)}=${multiValue}`;
}
if (value instanceof Date) {
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(
value.toISOString()
)}`;
}
if (value instanceof Object) {
return querystring(value as HTTPQuery, fullKey);
}
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(
String(value)
)}`;
})
.filter((part) => part.length > 0)
.join('&');
}
export function mapValues(data: any, fn: (item: any) => any) {
return Object.keys(data).reduce(
(acc, key) => ({ ...acc, [key]: fn(data[key]) }),
{}
);
}
export function canConsumeForm(consumes: Consume[]): boolean {
for (const consume of consumes) {
if ('multipart/form-data' === consume.contentType) {
return true;
}
}
return false;
}
export interface Consume {
contentType: string;
}
export interface RequestContext {
fetch: FetchAPI;
url: string;
init: RequestInit;
}
export interface ResponseContext {
fetch: FetchAPI;
url: string;
init: RequestInit;
response: Response;
}
export interface Middleware {
pre?(context: RequestContext): Promise<FetchParams | void>;
post?(context: ResponseContext): Promise<Response | void>;
}
export interface ApiResponse<T> {
raw: Response;
value(): Promise<T>;
}
export interface ResponseTransformer<T> {
(json: any): T;
}
export class JSONApiResponse<T> {
constructor(
public raw: Response,
private transformer: ResponseTransformer<T> = (jsonValue: any) => jsonValue
) {}
async value(): Promise<T> {
return this.transformer(await this.raw.json());
}
}
export class VoidApiResponse {
constructor(public raw: Response) {}
async value(): Promise<void> {
return undefined;
}
}
export class BlobApiResponse {
constructor(public raw: Response) {}
async value(): Promise<Blob> {
return await this.raw.blob();
}
}
export class TextApiResponse {
constructor(public raw: Response) {}
async value(): Promise<string> {
return await this.raw.text();
}
}
/* tslint:disable */
/* eslint-disable */
export * from './runtime';
export * from './apis';
export * from './models';
/* tslint:disable */
/* eslint-disable */
export * from './AbstractWebhookPayload';
export * from './AccountBounceBlockDto';
export * from './AliasDto';
export * from './AliasProjection';
export * from './AttachmentEntity';
export * from './AttachmentMetaData';
export * from './AttachmentProjection';
export * from './BasicAuthOptions';
export * from './BounceProjection';
export * from './BounceRecipientProjection';
export * from './BouncedEmailDto';
export * from './BouncedRecipientDto';
export * from './BulkSendEmailOptions';
export * from './CanSendEmailResults';
export * from './CheckEmailBodyFeatureSupportResults';
export * from './CheckEmailBodyResults';
export * from './CheckEmailClientSupportOptions';
export * from './CheckEmailClientSupportResults';
export * from './CheckEmailFeaturesClientSupportOptions';
export * from './CheckEmailFeaturesClientSupportResults';
export * from './Complaint';
export * from './ConditionOption';
export * from './ConnectorDto';
export * from './ConnectorImapConnectionDto';
export * from './ConnectorProjection';
export * from './ConnectorSmtpConnectionDto';
export * from './ConnectorSyncEventDto';
export * from './ConnectorSyncEventProjection';
export * from './ConnectorSyncRequestResult';
export * from './ConnectorSyncRequestResultException';
export * from './ConnectorSyncRequestResultExceptionCause';
export * from './ConnectorSyncRequestResultExceptionCauseStackTrace';
export * from './ConnectorSyncResult';
export * from './ContactDto';
export * from './ContactProjection';
export * from './ContentMatchOptions';
export * from './CountDto';
export * from './CreateAliasOptions';
export * from './CreateConnectorImapConnectionOptions';
export * from './CreateConnectorOptions';
export * from './CreateConnectorSmtpConnectionOptions';
export * from './CreateContactOptions';
export * from './CreateDomainOptions';
export * from './CreateEmergencyAddressOptions';
export * from './CreateGroupOptions';
export * from './CreateInboxDto';
export * from './CreateInboxForwarderOptions';
export * from './CreateInboxReplierOptions';
export * from './CreateInboxRulesetOptions';
export * from './CreateTemplateOptions';
export * from './CreateTrackingPixelOptions';
export * from './CreateWebhookOptions';
export * from './DNSLookupOptions';
export * from './DNSLookupResult';
export * from './DNSLookupResults';
export * from './DNSLookupsOptions';
export * from './DeliveryStatusDto';
export * from './DescribeDomainOptions';
export * from './DescribeMailServerDomainResult';
export * from './DomainDto';
export * from './DomainGroup';
export * from './DomainGroupsDto';
export * from './DomainInformation';
export * from './DomainIssuesDto';
export * from './DomainNameRecord';
export * from './DomainPreview';
export * from './DownloadAttachmentDto';
export * from './Email';
export * from './EmailAnalysis';
export * from './EmailContentMatchResult';
export * from './EmailContentPartResult';
export * from './EmailFeatureCategoryName';
export * from './EmailFeatureFamilyName';
export * from './EmailFeatureFamilyStatistics';
export * from './EmailFeatureNames';
export * from './EmailFeatureOverview';
export * from './EmailFeaturePlatformName';
export * from './EmailFeaturePlatformStatistics';
export * from './EmailFeatureSupportFlags';
export * from './EmailFeatureSupportResult';
export * from './EmailFeatureSupportStatusPercentage';
export * from './EmailFeatureVersionStatistics';
export * from './EmailHtmlDto';
export * from './EmailLinksResult';
export * from './EmailPreview';
export * from './EmailPreviewUrls';
export * from './EmailProjection';
export * from './EmailRecipients';
export * from './EmailScreenshotResult';
export * from './EmailTextLinesResult';
export * from './EmailValidationRequestDto';
export * from './EmailVerificationResult';
export * from './EmergencyAddress';
export * from './EmergencyAddressDto';
export * from './EmptyResponseDto';
export * from './ExpirationDefaults';
export * from './ExpiredInboxDto';
export * from './ExpiredInboxRecordProjection';
export * from './ExportLink';
export * from './ExportOptions';
export * from './FakeEmailDto';
export * from './FakeEmailPreview';
export * from './FakeEmailResult';
export * from './FilterBouncedRecipientsOptions';
export * from './FilterBouncedRecipientsResult';
export * from './FlushExpiredInboxesResult';
export * from './ForwardEmailOptions';
export * from './GenerateBimiRecordOptions';
export * from './GenerateBimiRecordResults';
export * from './GenerateDmarcRecordOptions';
export * from './GenerateDmarcRecordResults';
export * from './GenerateMtaStsRecordOptions';
export * from './GenerateMtaStsRecordResults';
export * from './GenerateTlsReportingRecordOptions';
export * from './GenerateTlsReportingRecordResults';
export * from './GetEmailScreenshotOptions';
export * from './GravatarUrl';
export * from './GroupContactsDto';
export * from './GroupDto';
export * from './GroupProjection';
export * from './HTMLValidationResult';
export * from './IPAddressResult';
export * from './ImageIssue';
export * from './ImapAccessDetails';
export * from './ImapEmailProjection';
export * from './ImapFlagOperationOptions';
export * from './ImapMailboxStatus';
export * from './ImapServerFetchItem';
export * from './ImapServerFetchResult';
export * from './ImapServerGetResult';
export * from './ImapServerListOptions';
export * from './ImapServerListResult';
export * from './ImapServerSearchOptions';
export * from './ImapServerSearchResult';
export * from './ImapServerStatusOptions';
export * from './ImapServerStatusResult';
export * from './ImapSmtpAccessDetails';
export * from './ImapSmtpAccessServers';
export * from './ImapUpdateFlagsOptions';
export * from './InboxByEmailAddressResult';
export * from './InboxByNameResult';
export * from './InboxDto';
export * from './InboxExistsDto';
export * from './InboxForwarderDto';
export * from './InboxForwarderEventDto';
export * from './InboxForwarderEventProjection';
export * from './InboxForwarderTestOptions';
export * from './InboxForwarderTestResult';
export * from './InboxIdItem';
export * from './InboxIdsResult';
export * from './InboxPreview';
export * from './InboxReplierDto';
export * from './InboxReplierEventProjection';
export * from './InboxRulesetDto';
export * from './InboxRulesetTestOptions';
export * from './InboxRulesetTestResult';
export * from './InlineObject';
export * from './JSONSchemaDto';
export * from './LinkIssue';
export * from './ListUnsubscribeRecipientProjection';
export * from './LookupBimiDomainOptions';
export * from './LookupBimiDomainResults';
export * from './LookupDmarcDomainOptions';
export * from './LookupDmarcDomainResults';
export * from './LookupMtaStsDomainOptions';
export * from './LookupMtaStsDomainResults';
export * from './LookupTlsReportingDomainOptions';
export * from './LookupTlsReportingDomainResults';
export * from './MatchOption';
export * from './MatchOptions';
export * from './MissedEmailDto';
export * from './MissedEmailProjection';
export * from './NameServerRecord';
export * from './NewFakeEmailAddressResult';
export * from './OrganizationInboxProjection';
export * from './PageAlias';
export * from './PageAttachmentEntity';
export * from './PageBouncedEmail';
export * from './PageBouncedRecipients';
export * from './PageComplaint';
export * from './PageConnector';
export * from './PageConnectorSyncEvents';
export * from './PageContactProjection';
export * from './PageDeliveryStatus';
export * from './PageEmailPreview';
export * from './PageEmailProjection';
export * from './PageEmailValidationRequest';
export * from './PageExpiredInboxRecordProjection';
export * from './PageGroupProjection';
export * from './PageInboxForwarderDto';
export * from './PageInboxForwarderEvents';
export * from './PageInboxProjection';
export * from './PageInboxReplierDto';
export * from './PageInboxReplierEvents';
export * from './PageInboxRulesetDto';
export * from './PageListUnsubscribeRecipients';
export * from './PageMissedEmailProjection';
export * from './PageOrganizationInboxProjection';
export * from './PagePhoneNumberProjection';
export * from './PageScheduledJobs';
export * from './PageSentEmailProjection';
export * from './PageSentEmailWithQueueProjection';
export * from './PageSmsProjection';
export * from './PageTemplateProjection';
export * from './PageThreadProjection';
export * from './PageTrackingPixelProjection';
export * from './PageUnknownMissedEmailProjection';
export * from './PageWebhookProjection';
export * from './PageWebhookResult';
export * from './PageableObject';
export * from './PhoneNumberDto';
export * from './PhoneNumberProjection';
export * from './PhonePlanDto';
export * from './RawEmailJson';
export * from './Recipient';
export * from './ReplyForSms';
export * from './ReplyToAliasEmailOptions';
export * from './ReplyToEmailOptions';
export * from './ScheduledJob';
export * from './ScheduledJobDto';
export * from './SearchEmailsOptions';
export * from './SearchInboxesOptions';
export * from './SendEmailBodyPart';
export * from './SendEmailOptions';
export * from './SendSMTPEnvelopeOptions';
export * from './SendWithQueueResult';
export * from './Sender';
export * from './SentEmailDto';
export * from './SentEmailProjection';
export * from './SentSmsDto';
export * from './ServerEndpoints';
export * from './SetInboxFavouritedOptions';
export * from './SimpleSendEmailOptions';
export * from './SmsDto';
export * from './SmsMatchOption';
export * from './SmsPreview';
export * from './SmsProjection';
export * from './SmsReplyOptions';
export * from './SmtpAccessDetails';
export * from './SortObject';
export * from './SpellingIssue';
export * from './TemplateDto';
export * from './TemplatePreview';
export * from './TemplateProjection';
export * from './TemplateVariable';
export * from './TestInboxRulesetReceivingOptions';
export * from './TestInboxRulesetReceivingResult';
export * from './TestInboxRulesetSendingOptions';
export * from './TestInboxRulesetSendingResult';
export * from './TestNewInboxForwarderOptions';
export * from './TestNewInboxRulesetOptions';
export * from './TestPhoneNumberOptions';
export * from './ThreadProjection';
export * from './TrackingPixelDto';
export * from './TrackingPixelProjection';
export * from './UnknownMissedEmailProjection';
export * from './UnreadCount';
export * from './UnseenErrorCountDto';
export * from './UpdateAliasOptions';
export * from './UpdateDomainOptions';
export * from './UpdateGroupContacts';
export * from './UpdateInboxOptions';
export * from './UpdateInboxReplierOptions';
export * from './UploadAttachmentOptions';
export * from './UserInfoDto';
export * from './ValidateEmailAddressListOptions';
export * from './ValidateEmailAddressListResult';
export * from './ValidationDto';
export * from './ValidationMessage';
export * from './VerifyEmailAddressOptions';
export * from './VerifyWebhookSignatureOptions';
export * from './VerifyWebhookSignatureResults';
export * from './WaitForConditions';
export * from './WaitForSingleSmsOptions';
export * from './WaitForSmsConditions';
export * from './WebhookBouncePayload';
export * from './WebhookBounceRecipientPayload';
export * from './WebhookDeliveryStatusPayload';
export * from './WebhookDto';
export * from './WebhookEmailOpenedPayload';
export * from './WebhookEmailReadPayload';
export * from './WebhookHeaderNameValue';
export * from './WebhookHeaders';
export * from './WebhookNewAttachmentPayload';
export * from './WebhookNewContactPayload';
export * from './WebhookNewEmailPayload';
export * from './WebhookNewSmsPayload';
export * from './WebhookProjection';
export * from './WebhookRedriveAllResult';
export * from './WebhookRedriveResult';
export * from './WebhookResultDto';
export * from './WebhookTestRequest';
export * from './WebhookTestResponse';
export * from './WebhookTestResult';
/* 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';
import {
WebhookTestRequest,
WebhookTestRequestFromJSON,
WebhookTestRequestFromJSONTyped,
WebhookTestRequestToJSON,
WebhookTestResponse,
WebhookTestResponseFromJSON,
WebhookTestResponseFromJSONTyped,
WebhookTestResponseToJSON,
} from './';
/**
* Results of testing a webhook
* @export
* @interface WebhookTestResult
*/
export interface WebhookTestResult {
/**
*
* @type {string}
* @memberof WebhookTestResult
*/
message?: string | null;
/**
*
* @type {WebhookTestResponse}
* @memberof WebhookTestResult
*/
response: WebhookTestResponse;
/**
*
* @type {WebhookTestRequest}
* @memberof WebhookTestResult
*/
request: WebhookTestRequest;
}
export function WebhookTestResultFromJSON(json: any): WebhookTestResult {
return WebhookTestResultFromJSONTyped(json, false);
}
export function WebhookTestResultFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): WebhookTestResult {
if (json === undefined || json === null) {
return json;
}
return {
message: !exists(json, 'message') ? undefined : json['message'],
response: WebhookTestResponseFromJSON(json['response']),
request: WebhookTestRequestFromJSON(json['request']),
};
}
export function WebhookTestResultToJSON(value?: WebhookTestResult | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
message: value.message,
response: WebhookTestResponseToJSON(value.response),
request: WebhookTestRequestToJSON(value.request),
};
}
/* 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';
/**
* Response from webhook test request
* @export
* @interface WebhookTestResponse
*/
export interface WebhookTestResponse {
/**
*
* @type {number}
* @memberof WebhookTestResponse
*/
statusCode?: number | null;
/**
*
* @type {string}
* @memberof WebhookTestResponse
*/
message?: string | null;
}
export function WebhookTestResponseFromJSON(json: any): WebhookTestResponse {
return WebhookTestResponseFromJSONTyped(json, false);
}
export function WebhookTestResponseFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): WebhookTestResponse {
if (json === undefined || json === null) {
return json;
}
return {
statusCode: !exists(json, 'statusCode') ? undefined : json['statusCode'],
message: !exists(json, 'message') ? undefined : json['message'],
};
}
export function WebhookTestResponseToJSON(
value?: WebhookTestResponse | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
statusCode: value.statusCode,
message: value.message,
};
}
/* 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';
/**
* Result of webhook test request
* @export
* @interface WebhookTestRequest
*/
export interface WebhookTestRequest {
/**
*
* @type {string}
* @memberof WebhookTestRequest
*/
url: string;
/**
*
* @type {string}
* @memberof WebhookTestRequest
*/
method: WebhookTestRequestMethodEnum;
/**
*
* @type {{ [key: string]: string; }}
* @memberof WebhookTestRequest
*/
headers: { [key: string]: string };
/**
*
* @type {string}
* @memberof WebhookTestRequest
*/
payload?: string | null;
}
/**
* @export
* @enum {string}
*/
export enum WebhookTestRequestMethodEnum {
POST = 'POST',
DELETE = 'DELETE',
GET = 'GET',
PUT = 'PUT',
PATCH = 'PATCH',
HEAD = 'HEAD',
OPTIONS = 'OPTIONS',
TRACE = 'TRACE',
}
export function WebhookTestRequestFromJSON(json: any): WebhookTestRequest {
return WebhookTestRequestFromJSONTyped(json, false);
}
export function WebhookTestRequestFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): WebhookTestRequest {
if (json === undefined || json === null) {
return json;
}
return {
url: json['url'],
method: json['method'],
headers: json['headers'],
payload: !exists(json, 'payload') ? undefined : json['payload'],
};
}
export function WebhookTestRequestToJSON(
value?: WebhookTestRequest | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
url: value.url,
method: value.method,
headers: value.headers,
payload: value.payload,
};
}
/* 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';
/**
* Result of a webhook notification
* @export
* @interface WebhookResultDto
*/
export interface WebhookResultDto {
/**
*
* @type {string}
* @memberof WebhookResultDto
*/
id?: string | null;
/**
*
* @type {string}
* @memberof WebhookResultDto
*/
userId: string;
/**
*
* @type {string}
* @memberof WebhookResultDto
*/
webhookId: string;
/**
*
* @type {string}
* @memberof WebhookResultDto
*/
webhookUrl: string;
/**
*
* @type {string}
* @memberof WebhookResultDto
*/
messageId: string;
/**
*
* @type {string}
* @memberof WebhookResultDto
*/
redriveId?: string | null;
/**
*
* @type {string}
* @memberof WebhookResultDto
*/
httpMethod: WebhookResultDtoHttpMethodEnum;
/**
*
* @type {string}
* @memberof WebhookResultDto
*/
webhookEvent: WebhookResultDtoWebhookEventEnum;
/**
*
* @type {number}
* @memberof WebhookResultDto
*/
responseStatus?: number | null;
/**
*
* @type {number}
* @memberof WebhookResultDto
*/
responseTimeMillis: number;
/**
*
* @type {string}
* @memberof WebhookResultDto
*/
responseBodyExtract?: string | null;
/**
*
* @type {string}
* @memberof WebhookResultDto
*/
resultType?: WebhookResultDtoResultTypeEnum;
/**
*
* @type {Date}
* @memberof WebhookResultDto
*/
createdAt: Date;
/**
*
* @type {Date}
* @memberof WebhookResultDto
*/
updatedAt: Date;
/**
*
* @type {boolean}
* @memberof WebhookResultDto
*/
seen: boolean;
/**
*
* @type {string}
* @memberof WebhookResultDto
*/
inboxId?: string | null;
/**
*
* @type {string}
* @memberof WebhookResultDto
*/
emailId?: string | null;
/**
*
* @type {string}
* @memberof WebhookResultDto
*/
attachmentId?: string | null;
/**
*
* @type {string}
* @memberof WebhookResultDto
*/
phoneId?: string | null;
/**
*
* @type {string}
* @memberof WebhookResultDto
*/
smsId?: string | null;
}
/**
* @export
* @enum {string}
*/
export enum WebhookResultDtoHttpMethodEnum {
POST = 'POST',
DELETE = 'DELETE',
GET = 'GET',
PUT = 'PUT',
PATCH = 'PATCH',
HEAD = 'HEAD',
OPTIONS = 'OPTIONS',
TRACE = 'TRACE',
}
/**
* @export
* @enum {string}
*/
export enum WebhookResultDtoWebhookEventEnum {
EMAIL_RECEIVED = 'EMAIL_RECEIVED',
NEW_EMAIL = 'NEW_EMAIL',
NEW_CONTACT = 'NEW_CONTACT',
NEW_ATTACHMENT = 'NEW_ATTACHMENT',
EMAIL_OPENED = 'EMAIL_OPENED',
EMAIL_READ = 'EMAIL_READ',
DELIVERY_STATUS = 'DELIVERY_STATUS',
BOUNCE = 'BOUNCE',
BOUNCE_RECIPIENT = 'BOUNCE_RECIPIENT',
NEW_SMS = 'NEW_SMS',
}
/**
* @export
* @enum {string}
*/
export enum WebhookResultDtoResultTypeEnum {
BAD_RESPONSE = 'BAD_RESPONSE',
EXCEPTION = 'EXCEPTION',
SUCCESS = 'SUCCESS',
REDRIVEN = 'REDRIVEN',
}
export function WebhookResultDtoFromJSON(json: any): WebhookResultDto {
return WebhookResultDtoFromJSONTyped(json, false);
}
export function WebhookResultDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): WebhookResultDto {
if (json === undefined || json === null) {
return json;
}
return {
id: !exists(json, 'id') ? undefined : json['id'],
userId: json['userId'],
webhookId: json['webhookId'],
webhookUrl: json['webhookUrl'],
messageId: json['messageId'],
redriveId: !exists(json, 'redriveId') ? undefined : json['redriveId'],
httpMethod: json['httpMethod'],
webhookEvent: json['webhookEvent'],
responseStatus: !exists(json, 'responseStatus')
? undefined
: json['responseStatus'],
responseTimeMillis: json['responseTimeMillis'],
responseBodyExtract: !exists(json, 'responseBodyExtract')
? undefined
: json['responseBodyExtract'],
resultType: !exists(json, 'resultType') ? undefined : json['resultType'],
createdAt: new Date(json['createdAt']),
updatedAt: new Date(json['updatedAt']),
seen: json['seen'],
inboxId: !exists(json, 'inboxId') ? undefined : json['inboxId'],
emailId: !exists(json, 'emailId') ? undefined : json['emailId'],
attachmentId: !exists(json, 'attachmentId')
? undefined
: json['attachmentId'],
phoneId: !exists(json, 'phoneId') ? undefined : json['phoneId'],
smsId: !exists(json, 'smsId') ? undefined : json['smsId'],
};
}
export function WebhookResultDtoToJSON(value?: WebhookResultDto | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
userId: value.userId,
webhookId: value.webhookId,
webhookUrl: value.webhookUrl,
messageId: value.messageId,
redriveId: value.redriveId,
httpMethod: value.httpMethod,
webhookEvent: value.webhookEvent,
responseStatus: value.responseStatus,
responseTimeMillis: value.responseTimeMillis,
responseBodyExtract: value.responseBodyExtract,
resultType: value.resultType,
createdAt: value.createdAt.toISOString(),
updatedAt: value.updatedAt.toISOString(),
seen: value.seen,
inboxId: value.inboxId,
emailId: value.emailId,
attachmentId: value.attachmentId,
phoneId: value.phoneId,
smsId: value.smsId,
};
}
/* 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';
/**
* Result of retrying webhook
* @export
* @interface WebhookRedriveResult
*/
export interface WebhookRedriveResult {
/**
*
* @type {string}
* @memberof WebhookRedriveResult
*/
webhookResultId: string;
/**
*
* @type {boolean}
* @memberof WebhookRedriveResult
*/
success: boolean;
/**
*
* @type {string}
* @memberof WebhookRedriveResult
*/
message?: string | null;
}
export function WebhookRedriveResultFromJSON(json: any): WebhookRedriveResult {
return WebhookRedriveResultFromJSONTyped(json, false);
}
export function WebhookRedriveResultFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): WebhookRedriveResult {
if (json === undefined || json === null) {
return json;
}
return {
webhookResultId: json['webhookResultId'],
success: json['success'],
message: !exists(json, 'message') ? undefined : json['message'],
};
}
export function WebhookRedriveResultToJSON(
value?: WebhookRedriveResult | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
webhookResultId: value.webhookResultId,
success: value.success,
message: value.message,
};
}
/* 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';
/**
* Result of retrying all failed webhook
* @export
* @interface WebhookRedriveAllResult
*/
export interface WebhookRedriveAllResult {
/**
*
* @type {boolean}
* @memberof WebhookRedriveAllResult
*/
success: boolean;
/**
*
* @type {string}
* @memberof WebhookRedriveAllResult
*/
message?: string | null;
}
export function WebhookRedriveAllResultFromJSON(
json: any
): WebhookRedriveAllResult {
return WebhookRedriveAllResultFromJSONTyped(json, false);
}
export function WebhookRedriveAllResultFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): WebhookRedriveAllResult {
if (json === undefined || json === null) {
return json;
}
return {
success: json['success'],
message: !exists(json, 'message') ? undefined : json['message'],
};
}
export function WebhookRedriveAllResultToJSON(
value?: WebhookRedriveAllResult | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
success: value.success,
message: value.message,
};
}
/* 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';
/**
* Representation of a webhook
* @export
* @interface WebhookProjection
*/
export interface WebhookProjection {
/**
*
* @type {Date}
* @memberof WebhookProjection
*/
createdAt: Date;
/**
*
* @type {Date}
* @memberof WebhookProjection
*/
updatedAt: Date;
/**
*
* @type {string}
* @memberof WebhookProjection
*/
url: string;
/**
*
* @type {string}
* @memberof WebhookProjection
*/
inboxId?: string;
/**
*
* @type {string}
* @memberof WebhookProjection
*/
eventName?: WebhookProjectionEventNameEnum;
/**
*
* @type {string}
* @memberof WebhookProjection
*/
phoneNumberId?: string;
/**
*
* @type {string}
* @memberof WebhookProjection
*/
name?: string;
/**
*
* @type {string}
* @memberof WebhookProjection
*/
id: string;
}
/**
* @export
* @enum {string}
*/
export enum WebhookProjectionEventNameEnum {
EMAIL_RECEIVED = 'EMAIL_RECEIVED',
NEW_EMAIL = 'NEW_EMAIL',
NEW_CONTACT = 'NEW_CONTACT',
NEW_ATTACHMENT = 'NEW_ATTACHMENT',
EMAIL_OPENED = 'EMAIL_OPENED',
EMAIL_READ = 'EMAIL_READ',
DELIVERY_STATUS = 'DELIVERY_STATUS',
BOUNCE = 'BOUNCE',
BOUNCE_RECIPIENT = 'BOUNCE_RECIPIENT',
NEW_SMS = 'NEW_SMS',
}
export function WebhookProjectionFromJSON(json: any): WebhookProjection {
return WebhookProjectionFromJSONTyped(json, false);
}
export function WebhookProjectionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): WebhookProjection {
if (json === undefined || json === null) {
return json;
}
return {
createdAt: new Date(json['createdAt']),
updatedAt: new Date(json['updatedAt']),
url: json['url'],
inboxId: !exists(json, 'inboxId') ? undefined : json['inboxId'],
eventName: !exists(json, 'eventName') ? undefined : json['eventName'],
phoneNumberId: !exists(json, 'phoneNumberId')
? undefined
: json['phoneNumberId'],
name: !exists(json, 'name') ? undefined : json['name'],
id: json['id'],
};
}
export function WebhookProjectionToJSON(value?: WebhookProjection | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
createdAt: value.createdAt.toISOString(),
updatedAt: value.updatedAt.toISOString(),
url: value.url,
inboxId: value.inboxId,
eventName: value.eventName,
phoneNumberId: value.phoneNumberId,
name: value.name,
id: value.id,
};
}
/* 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';
/**
* NEW_SMS webhook payload. Sent to your webhook url endpoint via HTTP POST when an sms is received by the phone number that your webhook is attached to. Use the SMS ID to fetch the full SMS details.
* @export
* @interface WebhookNewSmsPayload
*/
export interface WebhookNewSmsPayload {
/**
* Idempotent message ID. Store this ID locally or in a database to prevent message duplication.
* @type {string}
* @memberof WebhookNewSmsPayload
*/
messageId: string;
/**
* ID of webhook entity being triggered
* @type {string}
* @memberof WebhookNewSmsPayload
*/
webhookId: string;
/**
* Name of the event type webhook is being triggered for.
* @type {string}
* @memberof WebhookNewSmsPayload
*/
eventName: WebhookNewSmsPayloadEventNameEnum;
/**
* Name of the webhook being triggered
* @type {string}
* @memberof WebhookNewSmsPayload
*/
webhookName?: string | null;
/**
* ID of SMS message
* @type {string}
* @memberof WebhookNewSmsPayload
*/
smsId: string;
/**
* User ID of event
* @type {string}
* @memberof WebhookNewSmsPayload
*/
userId: string;
/**
* ID of phone number receiving SMS
* @type {string}
* @memberof WebhookNewSmsPayload
*/
phoneNumber: string;
/**
* Recipient phone number
* @type {string}
* @memberof WebhookNewSmsPayload
*/
toNumber: string;
/**
* Sender phone number
* @type {string}
* @memberof WebhookNewSmsPayload
*/
fromNumber: string;
/**
* SMS message body
* @type {string}
* @memberof WebhookNewSmsPayload
*/
body: string;
/**
* SMS has been read
* @type {boolean}
* @memberof WebhookNewSmsPayload
*/
read: boolean;
}
/**
* @export
* @enum {string}
*/
export enum WebhookNewSmsPayloadEventNameEnum {
EMAIL_RECEIVED = 'EMAIL_RECEIVED',
NEW_EMAIL = 'NEW_EMAIL',
NEW_CONTACT = 'NEW_CONTACT',
NEW_ATTACHMENT = 'NEW_ATTACHMENT',
EMAIL_OPENED = 'EMAIL_OPENED',
EMAIL_READ = 'EMAIL_READ',
DELIVERY_STATUS = 'DELIVERY_STATUS',
BOUNCE = 'BOUNCE',
BOUNCE_RECIPIENT = 'BOUNCE_RECIPIENT',
NEW_SMS = 'NEW_SMS',
}
export function WebhookNewSmsPayloadFromJSON(json: any): WebhookNewSmsPayload {
return WebhookNewSmsPayloadFromJSONTyped(json, false);
}
export function WebhookNewSmsPayloadFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): WebhookNewSmsPayload {
if (json === undefined || json === null) {
return json;
}
return {
messageId: json['messageId'],
webhookId: json['webhookId'],
eventName: json['eventName'],
webhookName: !exists(json, 'webhookName') ? undefined : json['webhookName'],
smsId: json['smsId'],
userId: json['userId'],
phoneNumber: json['phoneNumber'],
toNumber: json['toNumber'],
fromNumber: json['fromNumber'],
body: json['body'],
read: json['read'],
};
}
export function WebhookNewSmsPayloadToJSON(
value?: WebhookNewSmsPayload | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
messageId: value.messageId,
webhookId: value.webhookId,
eventName: value.eventName,
webhookName: value.webhookName,
smsId: value.smsId,
userId: value.userId,
phoneNumber: value.phoneNumber,
toNumber: value.toNumber,
fromNumber: value.fromNumber,
body: value.body,
read: value.read,
};
}
/* 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';
import {
AttachmentMetaData,
AttachmentMetaDataFromJSON,
AttachmentMetaDataFromJSONTyped,
AttachmentMetaDataToJSON,
} from './';
/**
* NEW_EMAIL webhook payload. Sent to your webhook url endpoint via HTTP POST when an email is received by the inbox that your webhook is attached to. Use the email ID to fetch the full email body or attachments.
* @export
* @interface WebhookNewEmailPayload
*/
export interface WebhookNewEmailPayload {
/**
* Idempotent message ID. Store this ID locally or in a database to prevent message duplication.
* @type {string}
* @memberof WebhookNewEmailPayload
*/
messageId: string;
/**
* ID of webhook entity being triggered
* @type {string}
* @memberof WebhookNewEmailPayload
*/
webhookId: string;
/**
* Name of the event type webhook is being triggered for.
* @type {string}
* @memberof WebhookNewEmailPayload
*/
eventName: WebhookNewEmailPayloadEventNameEnum;
/**
* Name of the webhook being triggered
* @type {string}
* @memberof WebhookNewEmailPayload
*/
webhookName?: string | null;
/**
* Id of the inbox
* @type {string}
* @memberof WebhookNewEmailPayload
*/
inboxId: string;
/**
* Id of the domain that received an email
* @type {string}
* @memberof WebhookNewEmailPayload
*/
domainId?: string | null;
/**
* ID of the email that was received. Use this ID for fetching the email with the `EmailController`.
* @type {string}
* @memberof WebhookNewEmailPayload
*/
emailId: string;
/**
* Date time of event creation
* @type {Date}
* @memberof WebhookNewEmailPayload
*/
createdAt: Date;
/**
* List of `To` recipient email addresses that the email was addressed to. See recipients object for names.
* @type {Array<string>}
* @memberof WebhookNewEmailPayload
*/
to: Array<string>;
/**
* Who the email was sent from. An email address - see fromName for the sender name.
* @type {string}
* @memberof WebhookNewEmailPayload
*/
from: string;
/**
* List of `CC` recipients email addresses that the email was addressed to. See recipients object for names.
* @type {Array<string>}
* @memberof WebhookNewEmailPayload
*/
cc: Array<string>;
/**
* List of `BCC` recipients email addresses that the email was addressed to. See recipients object for names.
* @type {Array<string>}
* @memberof WebhookNewEmailPayload
*/
bcc: Array<string>;
/**
* The subject line of the email message as specified by SMTP subject header
* @type {string}
* @memberof WebhookNewEmailPayload
*/
subject?: string | null;
/**
* List of attachment meta data objects if attachments present
* @type {Array<AttachmentMetaData>}
* @memberof WebhookNewEmailPayload
*/
attachmentMetaDatas: Array<AttachmentMetaData>;
}
/**
* @export
* @enum {string}
*/
export enum WebhookNewEmailPayloadEventNameEnum {
EMAIL_RECEIVED = 'EMAIL_RECEIVED',
NEW_EMAIL = 'NEW_EMAIL',
NEW_CONTACT = 'NEW_CONTACT',
NEW_ATTACHMENT = 'NEW_ATTACHMENT',
EMAIL_OPENED = 'EMAIL_OPENED',
EMAIL_READ = 'EMAIL_READ',
DELIVERY_STATUS = 'DELIVERY_STATUS',
BOUNCE = 'BOUNCE',
BOUNCE_RECIPIENT = 'BOUNCE_RECIPIENT',
NEW_SMS = 'NEW_SMS',
}
export function WebhookNewEmailPayloadFromJSON(
json: any
): WebhookNewEmailPayload {
return WebhookNewEmailPayloadFromJSONTyped(json, false);
}
export function WebhookNewEmailPayloadFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): WebhookNewEmailPayload {
if (json === undefined || json === null) {
return json;
}
return {
messageId: json['messageId'],
webhookId: json['webhookId'],
eventName: json['eventName'],
webhookName: !exists(json, 'webhookName') ? undefined : json['webhookName'],
inboxId: json['inboxId'],
domainId: !exists(json, 'domainId') ? undefined : json['domainId'],
emailId: json['emailId'],
createdAt: new Date(json['createdAt']),
to: json['to'],
from: json['from'],
cc: json['cc'],
bcc: json['bcc'],
subject: !exists(json, 'subject') ? undefined : json['subject'],
attachmentMetaDatas: (json['attachmentMetaDatas'] as Array<any>).map(
AttachmentMetaDataFromJSON
),
};
}
export function WebhookNewEmailPayloadToJSON(
value?: WebhookNewEmailPayload | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
messageId: value.messageId,
webhookId: value.webhookId,
eventName: value.eventName,
webhookName: value.webhookName,
inboxId: value.inboxId,
domainId: value.domainId,
emailId: value.emailId,
createdAt: value.createdAt.toISOString(),
to: value.to,
from: value.from,
cc: value.cc,
bcc: value.bcc,
subject: value.subject,
attachmentMetaDatas: (value.attachmentMetaDatas as Array<any>).map(
AttachmentMetaDataToJSON
),
};
}
/* 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';
/**
* NEW_CONTACT webhook payload. Sent to your webhook url endpoint via HTTP POST when an email is received by the inbox that your webhook is attached to that contains a recipient that has not been saved as a contact.
* @export
* @interface WebhookNewContactPayload
*/
export interface WebhookNewContactPayload {
/**
* Idempotent message ID. Store this ID locally or in a database to prevent message duplication.
* @type {string}
* @memberof WebhookNewContactPayload
*/
messageId: string;
/**
* ID of webhook entity being triggered
* @type {string}
* @memberof WebhookNewContactPayload
*/
webhookId: string;
/**
* Name of the webhook being triggered
* @type {string}
* @memberof WebhookNewContactPayload
*/
webhookName?: string | null;
/**
* Name of the event type webhook is being triggered for.
* @type {string}
* @memberof WebhookNewContactPayload
*/
eventName: WebhookNewContactPayloadEventNameEnum;
/**
* Contact ID
* @type {string}
* @memberof WebhookNewContactPayload
*/
contactId: string;
/**
* Contact group ID
* @type {string}
* @memberof WebhookNewContactPayload
*/
groupId?: string | null;
/**
* Contact first name
* @type {string}
* @memberof WebhookNewContactPayload
*/
firstName?: string | null;
/**
* Contact last name
* @type {string}
* @memberof WebhookNewContactPayload
*/
lastName?: string | null;
/**
* Contact company name
* @type {string}
* @memberof WebhookNewContactPayload
*/
company?: string | null;
/**
* Primary email address for contact
* @type {string}
* @memberof WebhookNewContactPayload
*/
primaryEmailAddress?: string | null;
/**
* Email addresses for contact
* @type {Array<string>}
* @memberof WebhookNewContactPayload
*/
emailAddresses: Array<string>;
/**
* Tags for contact
* @type {Array<string>}
* @memberof WebhookNewContactPayload
*/
tags: Array<string>;
/**
*
* @type {object}
* @memberof WebhookNewContactPayload
*/
metaData?: object | null;
/**
* Has contact opted out of emails
* @type {boolean}
* @memberof WebhookNewContactPayload
*/
optOut: boolean;
/**
* Date time of event creation
* @type {Date}
* @memberof WebhookNewContactPayload
*/
createdAt: Date;
}
/**
* @export
* @enum {string}
*/
export enum WebhookNewContactPayloadEventNameEnum {
EMAIL_RECEIVED = 'EMAIL_RECEIVED',
NEW_EMAIL = 'NEW_EMAIL',
NEW_CONTACT = 'NEW_CONTACT',
NEW_ATTACHMENT = 'NEW_ATTACHMENT',
EMAIL_OPENED = 'EMAIL_OPENED',
EMAIL_READ = 'EMAIL_READ',
DELIVERY_STATUS = 'DELIVERY_STATUS',
BOUNCE = 'BOUNCE',
BOUNCE_RECIPIENT = 'BOUNCE_RECIPIENT',
NEW_SMS = 'NEW_SMS',
}
export function WebhookNewContactPayloadFromJSON(
json: any
): WebhookNewContactPayload {
return WebhookNewContactPayloadFromJSONTyped(json, false);
}
export function WebhookNewContactPayloadFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): WebhookNewContactPayload {
if (json === undefined || json === null) {
return json;
}
return {
messageId: json['messageId'],
webhookId: json['webhookId'],
webhookName: !exists(json, 'webhookName') ? undefined : json['webhookName'],
eventName: json['eventName'],
contactId: json['contactId'],
groupId: !exists(json, 'groupId') ? undefined : json['groupId'],
firstName: !exists(json, 'firstName') ? undefined : json['firstName'],
lastName: !exists(json, 'lastName') ? undefined : json['lastName'],
company: !exists(json, 'company') ? undefined : json['company'],
primaryEmailAddress: !exists(json, 'primaryEmailAddress')
? undefined
: json['primaryEmailAddress'],
emailAddresses: json['emailAddresses'],
tags: json['tags'],
metaData: !exists(json, 'metaData') ? undefined : json['metaData'],
optOut: json['optOut'],
createdAt: new Date(json['createdAt']),
};
}
export function WebhookNewContactPayloadToJSON(
value?: WebhookNewContactPayload | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
messageId: value.messageId,
webhookId: value.webhookId,
webhookName: value.webhookName,
eventName: value.eventName,
contactId: value.contactId,
groupId: value.groupId,
firstName: value.firstName,
lastName: value.lastName,
company: value.company,
primaryEmailAddress: value.primaryEmailAddress,
emailAddresses: value.emailAddresses,
tags: value.tags,
metaData: value.metaData,
optOut: value.optOut,
createdAt: value.createdAt.toISOString(),
};
}
/* 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';
/**
* NEW_ATTACHMENT webhook payload. Sent to your webhook url endpoint via HTTP POST when an email is received by the inbox that your webhook is attached to that contains an attachment. You can use the attachmentId to download the attachment.
* @export
* @interface WebhookNewAttachmentPayload
*/
export interface WebhookNewAttachmentPayload {
/**
* Idempotent message ID. Store this ID locally or in a database to prevent message duplication.
* @type {string}
* @memberof WebhookNewAttachmentPayload
*/
messageId: string;
/**
* ID of webhook entity being triggered
* @type {string}
* @memberof WebhookNewAttachmentPayload
*/
webhookId: string;
/**
* Name of the webhook being triggered
* @type {string}
* @memberof WebhookNewAttachmentPayload
*/
webhookName?: string | null;
/**
* Name of the event type webhook is being triggered for.
* @type {string}
* @memberof WebhookNewAttachmentPayload
*/
eventName: WebhookNewAttachmentPayloadEventNameEnum;
/**
* ID of attachment. Use the `AttachmentController` to
* @type {string}
* @memberof WebhookNewAttachmentPayload
*/
attachmentId: string;
/**
* Filename of the attachment if present
* @type {string}
* @memberof WebhookNewAttachmentPayload
*/
name: string;
/**
* Content type of attachment such as 'image/png' or 'application/pdf
* @type {string}
* @memberof WebhookNewAttachmentPayload
*/
contentType: string;
/**
* Size of attachment in bytes
* @type {number}
* @memberof WebhookNewAttachmentPayload
*/
contentLength: number;
}
/**
* @export
* @enum {string}
*/
export enum WebhookNewAttachmentPayloadEventNameEnum {
EMAIL_RECEIVED = 'EMAIL_RECEIVED',
NEW_EMAIL = 'NEW_EMAIL',
NEW_CONTACT = 'NEW_CONTACT',
NEW_ATTACHMENT = 'NEW_ATTACHMENT',
EMAIL_OPENED = 'EMAIL_OPENED',
EMAIL_READ = 'EMAIL_READ',
DELIVERY_STATUS = 'DELIVERY_STATUS',
BOUNCE = 'BOUNCE',
BOUNCE_RECIPIENT = 'BOUNCE_RECIPIENT',
NEW_SMS = 'NEW_SMS',
}
export function WebhookNewAttachmentPayloadFromJSON(
json: any
): WebhookNewAttachmentPayload {
return WebhookNewAttachmentPayloadFromJSONTyped(json, false);
}
export function WebhookNewAttachmentPayloadFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): WebhookNewAttachmentPayload {
if (json === undefined || json === null) {
return json;
}
return {
messageId: json['messageId'],
webhookId: json['webhookId'],
webhookName: !exists(json, 'webhookName') ? undefined : json['webhookName'],
eventName: json['eventName'],
attachmentId: json['attachmentId'],
name: json['name'],
contentType: json['contentType'],
contentLength: json['contentLength'],
};
}
export function WebhookNewAttachmentPayloadToJSON(
value?: WebhookNewAttachmentPayload | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
messageId: value.messageId,
webhookId: value.webhookId,
webhookName: value.webhookName,
eventName: value.eventName,
attachmentId: value.attachmentId,
name: value.name,
contentType: value.contentType,
contentLength: value.contentLength,
};
}
/* 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';
import {
WebhookHeaderNameValue,
WebhookHeaderNameValueFromJSON,
WebhookHeaderNameValueFromJSONTyped,
WebhookHeaderNameValueToJSON,
} from './';
/**
* Webhook HTTP headers to include with each request from MailSlurp to your server
* @export
* @interface WebhookHeaders
*/
export interface WebhookHeaders {
/**
* List of header name value pairs to include with webhook requests
* @type {Array<WebhookHeaderNameValue>}
* @memberof WebhookHeaders
*/
headers: Array<WebhookHeaderNameValue>;
}
export function WebhookHeadersFromJSON(json: any): WebhookHeaders {
return WebhookHeadersFromJSONTyped(json, false);
}
export function WebhookHeadersFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): WebhookHeaders {
if (json === undefined || json === null) {
return json;
}
return {
headers: (json['headers'] as Array<any>).map(
WebhookHeaderNameValueFromJSON
),
};
}
export function WebhookHeadersToJSON(value?: WebhookHeaders | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
headers: (value.headers as Array<any>).map(WebhookHeaderNameValueToJSON),
};
}
/* 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';
/**
* Name value pair for webhook header
* @export
* @interface WebhookHeaderNameValue
*/
export interface WebhookHeaderNameValue {
/**
* Name of header
* @type {string}
* @memberof WebhookHeaderNameValue
*/
name: string;
/**
* Value of header
* @type {string}
* @memberof WebhookHeaderNameValue
*/
value: string;
}
export function WebhookHeaderNameValueFromJSON(
json: any
): WebhookHeaderNameValue {
return WebhookHeaderNameValueFromJSONTyped(json, false);
}
export function WebhookHeaderNameValueFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): WebhookHeaderNameValue {
if (json === undefined || json === null) {
return json;
}
return {
name: json['name'],
value: json['value'],
};
}
export function WebhookHeaderNameValueToJSON(
value?: WebhookHeaderNameValue | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
name: value.name,
value: value.value,
};
}
/* 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';
/**
* EMAIL_READ webhook payload. Sent to your webhook url endpoint via HTTP POST when an email is read. This happens when an email is requested in full from the API or a user views the email in the dashboard.
* @export
* @interface WebhookEmailReadPayload
*/
export interface WebhookEmailReadPayload {
/**
* Idempotent message ID. Store this ID locally or in a database to prevent message duplication.
* @type {string}
* @memberof WebhookEmailReadPayload
*/
messageId: string;
/**
* ID of webhook entity being triggered
* @type {string}
* @memberof WebhookEmailReadPayload
*/
webhookId: string;
/**
* Name of the event type webhook is being triggered for.
* @type {string}
* @memberof WebhookEmailReadPayload
*/
eventName: WebhookEmailReadPayloadEventNameEnum;
/**
* Name of the webhook being triggered
* @type {string}
* @memberof WebhookEmailReadPayload
*/
webhookName?: string | null;
/**
* ID of the email that was received. Use this ID for fetching the email with the `EmailController`.
* @type {string}
* @memberof WebhookEmailReadPayload
*/
emailId: string;
/**
* Id of the inbox
* @type {string}
* @memberof WebhookEmailReadPayload
*/
inboxId: string;
/**
* Is the email read
* @type {boolean}
* @memberof WebhookEmailReadPayload
*/
emailIsRead: boolean;
/**
* Date time of event creation
* @type {Date}
* @memberof WebhookEmailReadPayload
*/
createdAt: Date;
}
/**
* @export
* @enum {string}
*/
export enum WebhookEmailReadPayloadEventNameEnum {
EMAIL_RECEIVED = 'EMAIL_RECEIVED',
NEW_EMAIL = 'NEW_EMAIL',
NEW_CONTACT = 'NEW_CONTACT',
NEW_ATTACHMENT = 'NEW_ATTACHMENT',
EMAIL_OPENED = 'EMAIL_OPENED',
EMAIL_READ = 'EMAIL_READ',
DELIVERY_STATUS = 'DELIVERY_STATUS',
BOUNCE = 'BOUNCE',
BOUNCE_RECIPIENT = 'BOUNCE_RECIPIENT',
NEW_SMS = 'NEW_SMS',
}
export function WebhookEmailReadPayloadFromJSON(
json: any
): WebhookEmailReadPayload {
return WebhookEmailReadPayloadFromJSONTyped(json, false);
}
export function WebhookEmailReadPayloadFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): WebhookEmailReadPayload {
if (json === undefined || json === null) {
return json;
}
return {
messageId: json['messageId'],
webhookId: json['webhookId'],
eventName: json['eventName'],
webhookName: !exists(json, 'webhookName') ? undefined : json['webhookName'],
emailId: json['emailId'],
inboxId: json['inboxId'],
emailIsRead: json['emailIsRead'],
createdAt: new Date(json['createdAt']),
};
}
export function WebhookEmailReadPayloadToJSON(
value?: WebhookEmailReadPayload | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
messageId: value.messageId,
webhookId: value.webhookId,
eventName: value.eventName,
webhookName: value.webhookName,
emailId: value.emailId,
inboxId: value.inboxId,
emailIsRead: value.emailIsRead,
createdAt: value.createdAt.toISOString(),
};
}
/* 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';
/**
* EMAIL_OPENED webhook payload. Sent to your webhook url endpoint via HTTP POST when an email containing a tracking pixel is opened and the pixel image is loaded by a reader.
* @export
* @interface WebhookEmailOpenedPayload
*/
export interface WebhookEmailOpenedPayload {
/**
* Idempotent message ID. Store this ID locally or in a database to prevent message duplication.
* @type {string}
* @memberof WebhookEmailOpenedPayload
*/
messageId: string;
/**
* ID of webhook entity being triggered
* @type {string}
* @memberof WebhookEmailOpenedPayload
*/
webhookId: string;
/**
* Name of the event type webhook is being triggered for.
* @type {string}
* @memberof WebhookEmailOpenedPayload
*/
eventName: WebhookEmailOpenedPayloadEventNameEnum;
/**
* Name of the webhook being triggered
* @type {string}
* @memberof WebhookEmailOpenedPayload
*/
webhookName?: string | null;
/**
* Id of the inbox
* @type {string}
* @memberof WebhookEmailOpenedPayload
*/
inboxId: string;
/**
* ID of the tracking pixel
* @type {string}
* @memberof WebhookEmailOpenedPayload
*/
pixelId: string;
/**
* ID of sent email
* @type {string}
* @memberof WebhookEmailOpenedPayload
*/
sentEmailId: string;
/**
* Email address for the recipient of the tracking pixel
* @type {string}
* @memberof WebhookEmailOpenedPayload
*/
recipient: string;
/**
* Date time of event creation
* @type {Date}
* @memberof WebhookEmailOpenedPayload
*/
createdAt: Date;
}
/**
* @export
* @enum {string}
*/
export enum WebhookEmailOpenedPayloadEventNameEnum {
EMAIL_RECEIVED = 'EMAIL_RECEIVED',
NEW_EMAIL = 'NEW_EMAIL',
NEW_CONTACT = 'NEW_CONTACT',
NEW_ATTACHMENT = 'NEW_ATTACHMENT',
EMAIL_OPENED = 'EMAIL_OPENED',
EMAIL_READ = 'EMAIL_READ',
DELIVERY_STATUS = 'DELIVERY_STATUS',
BOUNCE = 'BOUNCE',
BOUNCE_RECIPIENT = 'BOUNCE_RECIPIENT',
NEW_SMS = 'NEW_SMS',
}
export function WebhookEmailOpenedPayloadFromJSON(
json: any
): WebhookEmailOpenedPayload {
return WebhookEmailOpenedPayloadFromJSONTyped(json, false);
}
export function WebhookEmailOpenedPayloadFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): WebhookEmailOpenedPayload {
if (json === undefined || json === null) {
return json;
}
return {
messageId: json['messageId'],
webhookId: json['webhookId'],
eventName: json['eventName'],
webhookName: !exists(json, 'webhookName') ? undefined : json['webhookName'],
inboxId: json['inboxId'],
pixelId: json['pixelId'],
sentEmailId: json['sentEmailId'],
recipient: json['recipient'],
createdAt: new Date(json['createdAt']),
};
}
export function WebhookEmailOpenedPayloadToJSON(
value?: WebhookEmailOpenedPayload | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
messageId: value.messageId,
webhookId: value.webhookId,
eventName: value.eventName,
webhookName: value.webhookName,
inboxId: value.inboxId,
pixelId: value.pixelId,
sentEmailId: value.sentEmailId,
recipient: value.recipient,
createdAt: value.createdAt.toISOString(),
};
}
/* 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';
import {
WebhookHeaders,
WebhookHeadersFromJSON,
WebhookHeadersFromJSONTyped,
WebhookHeadersToJSON,
} from './';
/**
* Representation of a webhook for an inbox. The URL specified will be using by MailSlurp whenever an email is received by the attached inbox. A webhook entity should have a URL that points to your server. Your server should accept HTTP/S POST requests and return a success 200. MailSlurp will retry your webhooks if they fail. See https://api.mailslurp.com/schemas/webhook-payload for the payload schema.
* @export
* @interface WebhookDto
*/
export interface WebhookDto {
/**
* ID of the Webhook
* @type {string}
* @memberof WebhookDto
*/
id: string;
/**
* User ID of the Webhook
* @type {string}
* @memberof WebhookDto
*/
userId: string;
/**
* Does webhook expect basic authentication? If true it means you created this webhook with a username and password. MailSlurp will use these in the URL to authenticate itself.
* @type {boolean}
* @memberof WebhookDto
*/
basicAuth: boolean;
/**
* Name of the webhook
* @type {string}
* @memberof WebhookDto
*/
name?: string | null;
/**
* The phoneNumberId that the Webhook will be triggered by. If null then webhook triggered at account level or inbox level if inboxId set
* @type {string}
* @memberof WebhookDto
*/
phoneId?: string | null;
/**
* The inbox that the Webhook will be triggered by. If null then webhook triggered at account level or phone level if phoneId set
* @type {string}
* @memberof WebhookDto
*/
inboxId?: string | null;
/**
* Request body template for HTTP request that will be sent for the webhook. Use Moustache style template variables to insert values from the original event payload.
* @type {string}
* @memberof WebhookDto
*/
requestBodyTemplate?: string | null;
/**
* URL of your server that the webhook will be sent to. The schema of the JSON that is sent is described by the payloadJsonSchema.
* @type {string}
* @memberof WebhookDto
*/
url: string;
/**
* HTTP method that your server endpoint must listen for
* @type {string}
* @memberof WebhookDto
*/
method: WebhookDtoMethodEnum;
/**
* Deprecated. Fetch JSON Schema for webhook using the getJsonSchemaForWebhookPayload method
* @type {string}
* @memberof WebhookDto
*/
payloadJsonSchema: string;
/**
* When the webhook was created
* @type {Date}
* @memberof WebhookDto
*/
createdAt: Date | null;
/**
*
* @type {Date}
* @memberof WebhookDto
*/
updatedAt: Date;
/**
* Webhook trigger event name
* @type {string}
* @memberof WebhookDto
*/
eventName?: WebhookDtoEventNameEnum;
/**
*
* @type {WebhookHeaders}
* @memberof WebhookDto
*/
requestHeaders?: WebhookHeaders;
/**
* Should notifier ignore insecure SSL certificates
* @type {boolean}
* @memberof WebhookDto
*/
ignoreInsecureSslCertificates?: boolean | null;
/**
* Should notifier use static IP range when sending webhook payload
* @type {boolean}
* @memberof WebhookDto
*/
useStaticIpRange?: boolean | null;
}
/**
* @export
* @enum {string}
*/
export enum WebhookDtoMethodEnum {
POST = 'POST',
DELETE = 'DELETE',
GET = 'GET',
PUT = 'PUT',
PATCH = 'PATCH',
HEAD = 'HEAD',
OPTIONS = 'OPTIONS',
TRACE = 'TRACE',
}
/**
* @export
* @enum {string}
*/
export enum WebhookDtoEventNameEnum {
EMAIL_RECEIVED = 'EMAIL_RECEIVED',
NEW_EMAIL = 'NEW_EMAIL',
NEW_CONTACT = 'NEW_CONTACT',
NEW_ATTACHMENT = 'NEW_ATTACHMENT',
EMAIL_OPENED = 'EMAIL_OPENED',
EMAIL_READ = 'EMAIL_READ',
DELIVERY_STATUS = 'DELIVERY_STATUS',
BOUNCE = 'BOUNCE',
BOUNCE_RECIPIENT = 'BOUNCE_RECIPIENT',
NEW_SMS = 'NEW_SMS',
}
export function WebhookDtoFromJSON(json: any): WebhookDto {
return WebhookDtoFromJSONTyped(json, false);
}
export function WebhookDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): WebhookDto {
if (json === undefined || json === null) {
return json;
}
return {
id: json['id'],
userId: json['userId'],
basicAuth: json['basicAuth'],
name: !exists(json, 'name') ? undefined : json['name'],
phoneId: !exists(json, 'phoneId') ? undefined : json['phoneId'],
inboxId: !exists(json, 'inboxId') ? undefined : json['inboxId'],
requestBodyTemplate: !exists(json, 'requestBodyTemplate')
? undefined
: json['requestBodyTemplate'],
url: json['url'],
method: json['method'],
payloadJsonSchema: json['payloadJsonSchema'],
createdAt: json['createdAt'] === null ? null : new Date(json['createdAt']),
updatedAt: new Date(json['updatedAt']),
eventName: !exists(json, 'eventName') ? undefined : json['eventName'],
requestHeaders: !exists(json, 'requestHeaders')
? undefined
: WebhookHeadersFromJSON(json['requestHeaders']),
ignoreInsecureSslCertificates: !exists(
json,
'ignoreInsecureSslCertificates'
)
? undefined
: json['ignoreInsecureSslCertificates'],
useStaticIpRange: !exists(json, 'useStaticIpRange')
? undefined
: json['useStaticIpRange'],
};
}
export function WebhookDtoToJSON(value?: WebhookDto | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
userId: value.userId,
basicAuth: value.basicAuth,
name: value.name,
phoneId: value.phoneId,
inboxId: value.inboxId,
requestBodyTemplate: value.requestBodyTemplate,
url: value.url,
method: value.method,
payloadJsonSchema: value.payloadJsonSchema,
createdAt: value.createdAt === null ? null : value.createdAt.toISOString(),
updatedAt: value.updatedAt.toISOString(),
eventName: value.eventName,
requestHeaders: WebhookHeadersToJSON(value.requestHeaders),
ignoreInsecureSslCertificates: value.ignoreInsecureSslCertificates,
useStaticIpRange: value.useStaticIpRange,
};
}
/* 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';
/**
* DELIVERY_STATUS webhook payload. Sent to your webhook url endpoint via HTTP POST when an email delivery status is created. This could be a successful delivery or a delivery failure.
* @export
* @interface WebhookDeliveryStatusPayload
*/
export interface WebhookDeliveryStatusPayload {
/**
* Idempotent message ID. Store this ID locally or in a database to prevent message duplication.
* @type {string}
* @memberof WebhookDeliveryStatusPayload
*/
messageId: string;
/**
* ID of webhook entity being triggered
* @type {string}
* @memberof WebhookDeliveryStatusPayload
*/
webhookId: string;
/**
* Name of the event type webhook is being triggered for.
* @type {string}
* @memberof WebhookDeliveryStatusPayload
*/
eventName: WebhookDeliveryStatusPayloadEventNameEnum;
/**
* Name of the webhook being triggered
* @type {string}
* @memberof WebhookDeliveryStatusPayload
*/
webhookName?: string | null;
/**
* ID of delivery status
* @type {string}
* @memberof WebhookDeliveryStatusPayload
*/
id: string;
/**
* User ID of event
* @type {string}
* @memberof WebhookDeliveryStatusPayload
*/
userId: string;
/**
* ID of sent email
* @type {string}
* @memberof WebhookDeliveryStatusPayload
*/
sentId?: string | null;
/**
* IP address of the remote Mail Transfer Agent
* @type {string}
* @memberof WebhookDeliveryStatusPayload
*/
remoteMtaIp?: string | null;
/**
* Id of the inbox
* @type {string}
* @memberof WebhookDeliveryStatusPayload
*/
inboxId?: string | null;
/**
* Mail Transfer Agent reporting delivery status
* @type {string}
* @memberof WebhookDeliveryStatusPayload
*/
reportingMta?: string | null;
/**
* Recipients for delivery
* @type {Array<string>}
* @memberof WebhookDeliveryStatusPayload
*/
recipients?: Array<string> | null;
/**
* SMTP server response message
* @type {string}
* @memberof WebhookDeliveryStatusPayload
*/
smtpResponse?: string | null;
/**
* SMTP server status
* @type {number}
* @memberof WebhookDeliveryStatusPayload
*/
smtpStatusCode?: number | null;
/**
* Time in milliseconds for delivery processing
* @type {number}
* @memberof WebhookDeliveryStatusPayload
*/
processingTimeMillis?: number | null;
/**
* Time event was received
* @type {Date}
* @memberof WebhookDeliveryStatusPayload
*/
received?: Date | null;
/**
* Email subject
* @type {string}
* @memberof WebhookDeliveryStatusPayload
*/
subject?: string | null;
}
/**
* @export
* @enum {string}
*/
export enum WebhookDeliveryStatusPayloadEventNameEnum {
EMAIL_RECEIVED = 'EMAIL_RECEIVED',
NEW_EMAIL = 'NEW_EMAIL',
NEW_CONTACT = 'NEW_CONTACT',
NEW_ATTACHMENT = 'NEW_ATTACHMENT',
EMAIL_OPENED = 'EMAIL_OPENED',
EMAIL_READ = 'EMAIL_READ',
DELIVERY_STATUS = 'DELIVERY_STATUS',
BOUNCE = 'BOUNCE',
BOUNCE_RECIPIENT = 'BOUNCE_RECIPIENT',
NEW_SMS = 'NEW_SMS',
}
export function WebhookDeliveryStatusPayloadFromJSON(
json: any
): WebhookDeliveryStatusPayload {
return WebhookDeliveryStatusPayloadFromJSONTyped(json, false);
}
export function WebhookDeliveryStatusPayloadFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): WebhookDeliveryStatusPayload {
if (json === undefined || json === null) {
return json;
}
return {
messageId: json['messageId'],
webhookId: json['webhookId'],
eventName: json['eventName'],
webhookName: !exists(json, 'webhookName') ? undefined : json['webhookName'],
id: json['id'],
userId: json['userId'],
sentId: !exists(json, 'sentId') ? undefined : json['sentId'],
remoteMtaIp: !exists(json, 'remoteMtaIp') ? undefined : json['remoteMtaIp'],
inboxId: !exists(json, 'inboxId') ? undefined : json['inboxId'],
reportingMta: !exists(json, 'reportingMta')
? undefined
: json['reportingMta'],
recipients: !exists(json, 'recipients') ? undefined : json['recipients'],
smtpResponse: !exists(json, 'smtpResponse')
? undefined
: json['smtpResponse'],
smtpStatusCode: !exists(json, 'smtpStatusCode')
? undefined
: json['smtpStatusCode'],
processingTimeMillis: !exists(json, 'processingTimeMillis')
? undefined
: json['processingTimeMillis'],
received: !exists(json, 'received')
? undefined
: json['received'] === null
? null
: new Date(json['received']),
subject: !exists(json, 'subject') ? undefined : json['subject'],
};
}
export function WebhookDeliveryStatusPayloadToJSON(
value?: WebhookDeliveryStatusPayload | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
messageId: value.messageId,
webhookId: value.webhookId,
eventName: value.eventName,
webhookName: value.webhookName,
id: value.id,
userId: value.userId,
sentId: value.sentId,
remoteMtaIp: value.remoteMtaIp,
inboxId: value.inboxId,
reportingMta: value.reportingMta,
recipients: value.recipients,
smtpResponse: value.smtpResponse,
smtpStatusCode: value.smtpStatusCode,
processingTimeMillis: value.processingTimeMillis,
received:
value.received === undefined
? undefined
: value.received === null
? null
: value.received.toISOString(),
subject: value.subject,
};
}
/* 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';
/**
* BOUNCE_RECIPIENT webhook payload. Sent to your webhook url endpoint via HTTP POST when an email caused a bounce to occur for a recipient. Save the recipient to a ban list of your server and avoid email them again.
* @export
* @interface WebhookBounceRecipientPayload
*/
export interface WebhookBounceRecipientPayload {
/**
* Idempotent message ID. Store this ID locally or in a database to prevent message duplication.
* @type {string}
* @memberof WebhookBounceRecipientPayload
*/
messageId: string;
/**
* ID of webhook entity being triggered
* @type {string}
* @memberof WebhookBounceRecipientPayload
*/
webhookId: string;
/**
* Name of the event type webhook is being triggered for.
* @type {string}
* @memberof WebhookBounceRecipientPayload
*/
eventName: WebhookBounceRecipientPayloadEventNameEnum;
/**
* Name of the webhook being triggered
* @type {string}
* @memberof WebhookBounceRecipientPayload
*/
webhookName?: string | null;
/**
* Email address that caused a bounce. Make note of the address and try not to message it again to preserve your reputation.
* @type {string}
* @memberof WebhookBounceRecipientPayload
*/
recipient: string;
}
/**
* @export
* @enum {string}
*/
export enum WebhookBounceRecipientPayloadEventNameEnum {
EMAIL_RECEIVED = 'EMAIL_RECEIVED',
NEW_EMAIL = 'NEW_EMAIL',
NEW_CONTACT = 'NEW_CONTACT',
NEW_ATTACHMENT = 'NEW_ATTACHMENT',
EMAIL_OPENED = 'EMAIL_OPENED',
EMAIL_READ = 'EMAIL_READ',
DELIVERY_STATUS = 'DELIVERY_STATUS',
BOUNCE = 'BOUNCE',
BOUNCE_RECIPIENT = 'BOUNCE_RECIPIENT',
NEW_SMS = 'NEW_SMS',
}
export function WebhookBounceRecipientPayloadFromJSON(
json: any
): WebhookBounceRecipientPayload {
return WebhookBounceRecipientPayloadFromJSONTyped(json, false);
}
export function WebhookBounceRecipientPayloadFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): WebhookBounceRecipientPayload {
if (json === undefined || json === null) {
return json;
}
return {
messageId: json['messageId'],
webhookId: json['webhookId'],
eventName: json['eventName'],
webhookName: !exists(json, 'webhookName') ? undefined : json['webhookName'],
recipient: json['recipient'],
};
}
export function WebhookBounceRecipientPayloadToJSON(
value?: WebhookBounceRecipientPayload | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
messageId: value.messageId,
webhookId: value.webhookId,
eventName: value.eventName,
webhookName: value.webhookName,
recipient: value.recipient,
};
}
/* 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';
/**
* BOUNCE webhook payload. Sent to your webhook url endpoint via HTTP POST when an email bounced or was rejected by a recipient. Save the recipients to a ban list on your server and avoid emailing them again. It is recommended you also listen to the BOUNCE_RECIPIENT payload.
* @export
* @interface WebhookBouncePayload
*/
export interface WebhookBouncePayload {
/**
* Idempotent message ID. Store this ID locally or in a database to prevent message duplication.
* @type {string}
* @memberof WebhookBouncePayload
*/
messageId: string;
/**
* ID of webhook entity being triggered
* @type {string}
* @memberof WebhookBouncePayload
*/
webhookId: string;
/**
* Name of the event type webhook is being triggered for.
* @type {string}
* @memberof WebhookBouncePayload
*/
eventName: WebhookBouncePayloadEventNameEnum;
/**
* Name of the webhook being triggered
* @type {string}
* @memberof WebhookBouncePayload
*/
webhookName?: string | null;
/**
* ID of the bounce email record. Use the ID with the bounce controller to view more information
* @type {string}
* @memberof WebhookBouncePayload
*/
bounceId: string;
/**
* Email sent to recipients
* @type {Array<string>}
* @memberof WebhookBouncePayload
*/
sentToRecipients?: Array<string> | null;
/**
* Sender causing bounce
* @type {string}
* @memberof WebhookBouncePayload
*/
sender: string;
/**
* Email addresses that resulted in a bounce or email being rejected. Please save these recipients and avoid emailing them in the future to maintain your reputation.
* @type {Array<string>}
* @memberof WebhookBouncePayload
*/
bounceRecipients?: Array<string> | null;
}
/**
* @export
* @enum {string}
*/
export enum WebhookBouncePayloadEventNameEnum {
EMAIL_RECEIVED = 'EMAIL_RECEIVED',
NEW_EMAIL = 'NEW_EMAIL',
NEW_CONTACT = 'NEW_CONTACT',
NEW_ATTACHMENT = 'NEW_ATTACHMENT',
EMAIL_OPENED = 'EMAIL_OPENED',
EMAIL_READ = 'EMAIL_READ',
DELIVERY_STATUS = 'DELIVERY_STATUS',
BOUNCE = 'BOUNCE',
BOUNCE_RECIPIENT = 'BOUNCE_RECIPIENT',
NEW_SMS = 'NEW_SMS',
}
export function WebhookBouncePayloadFromJSON(json: any): WebhookBouncePayload {
return WebhookBouncePayloadFromJSONTyped(json, false);
}
export function WebhookBouncePayloadFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): WebhookBouncePayload {
if (json === undefined || json === null) {
return json;
}
return {
messageId: json['messageId'],
webhookId: json['webhookId'],
eventName: json['eventName'],
webhookName: !exists(json, 'webhookName') ? undefined : json['webhookName'],
bounceId: json['bounceId'],
sentToRecipients: !exists(json, 'sentToRecipients')
? undefined
: json['sentToRecipients'],
sender: json['sender'],
bounceRecipients: !exists(json, 'bounceRecipients')
? undefined
: json['bounceRecipients'],
};
}
export function WebhookBouncePayloadToJSON(
value?: WebhookBouncePayload | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
messageId: value.messageId,
webhookId: value.webhookId,
eventName: value.eventName,
webhookName: value.webhookName,
bounceId: value.bounceId,
sentToRecipients: value.sentToRecipients,
sender: value.sender,
bounceRecipients: value.bounceRecipients,
};
}
/* 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';
import {
SmsMatchOption,
SmsMatchOptionFromJSON,
SmsMatchOptionFromJSONTyped,
SmsMatchOptionToJSON,
} from './';
/**
* Conditions to apply to emails that you are waiting for
* @export
* @interface WaitForSmsConditions
*/
export interface WaitForSmsConditions {
/**
* ID of phone number to search within and apply conditions to. Essentially filtering the SMS found to give a count.
* @type {string}
* @memberof WaitForSmsConditions
*/
phoneNumberId: string;
/**
* Limit results
* @type {number}
* @memberof WaitForSmsConditions
*/
limit?: number | null;
/**
* Number of results that should match conditions. Either exactly or at least this amount based on the `countType`. If count condition is not met and the timeout has not been reached the `waitFor` method will retry the operation.
* @type {number}
* @memberof WaitForSmsConditions
*/
count: number;
/**
* Max time in milliseconds to wait between retries if a `timeout` is specified.
* @type {number}
* @memberof WaitForSmsConditions
*/
delayTimeout?: number | null;
/**
* Max time in milliseconds to retry the `waitFor` operation until conditions are met.
* @type {number}
* @memberof WaitForSmsConditions
*/
timeout: number;
/**
* Apply conditions only to **unread** SMS. All SMS messages begin with `read=false`. An SMS is marked `read=true` when an `SMS` has been returned to the user at least once. For example you have called `getSms` or `waitForSms` etc., or you have viewed the SMS in the dashboard.
* @type {boolean}
* @memberof WaitForSmsConditions
*/
unreadOnly?: boolean | null;
/**
* How result size should be compared with the expected size. Exactly or at-least matching result?
* @type {string}
* @memberof WaitForSmsConditions
*/
countType?: WaitForSmsConditionsCountTypeEnum;
/**
* Conditions that should be matched for an SMS to qualify for results. Each condition will be applied in order to each SMS within a phone number to filter a result list of matching SMSs you are waiting for.
* @type {Array<SmsMatchOption>}
* @memberof WaitForSmsConditions
*/
matches?: Array<SmsMatchOption> | null;
/**
* Direction to sort matching SMSs by created time
* @type {string}
* @memberof WaitForSmsConditions
*/
sortDirection?: WaitForSmsConditionsSortDirectionEnum;
/**
* ISO Date Time earliest time of SMS to consider. Filter for matching SMSs that were received after this date
* @type {Date}
* @memberof WaitForSmsConditions
*/
since?: Date | null;
/**
* ISO Date Time latest time of SMS to consider. Filter for matching SMSs that were received before this date
* @type {Date}
* @memberof WaitForSmsConditions
*/
before?: Date | null;
}
/**
* @export
* @enum {string}
*/
export enum WaitForSmsConditionsCountTypeEnum {
EXACTLY = 'EXACTLY',
ATLEAST = 'ATLEAST',
}
/**
* @export
* @enum {string}
*/
export enum WaitForSmsConditionsSortDirectionEnum {
ASC = 'ASC',
DESC = 'DESC',
}
export function WaitForSmsConditionsFromJSON(json: any): WaitForSmsConditions {
return WaitForSmsConditionsFromJSONTyped(json, false);
}
export function WaitForSmsConditionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): WaitForSmsConditions {
if (json === undefined || json === null) {
return json;
}
return {
phoneNumberId: json['phoneNumberId'],
limit: !exists(json, 'limit') ? undefined : json['limit'],
count: json['count'],
delayTimeout: !exists(json, 'delayTimeout')
? undefined
: json['delayTimeout'],
timeout: json['timeout'],
unreadOnly: !exists(json, 'unreadOnly') ? undefined : json['unreadOnly'],
countType: !exists(json, 'countType') ? undefined : json['countType'],
matches: !exists(json, 'matches')
? undefined
: json['matches'] === null
? null
: (json['matches'] as Array<any>).map(SmsMatchOptionFromJSON),
sortDirection: !exists(json, 'sortDirection')
? undefined
: json['sortDirection'],
since: !exists(json, 'since')
? undefined
: json['since'] === null
? null
: new Date(json['since']),
before: !exists(json, 'before')
? undefined
: json['before'] === null
? null
: new Date(json['before']),
};
}
export function WaitForSmsConditionsToJSON(
value?: WaitForSmsConditions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
phoneNumberId: value.phoneNumberId,
limit: value.limit,
count: value.count,
delayTimeout: value.delayTimeout,
timeout: value.timeout,
unreadOnly: value.unreadOnly,
countType: value.countType,
matches:
value.matches === undefined
? undefined
: value.matches === null
? null
: (value.matches as Array<any>).map(SmsMatchOptionToJSON),
sortDirection: value.sortDirection,
since:
value.since === undefined
? undefined
: value.since === null
? null
: value.since.toISOString(),
before:
value.before === undefined
? undefined
: value.before === null
? null
: value.before.toISOString(),
};
}
/* 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';
/**
*
* @export
* @interface WaitForSingleSmsOptions
*/
export interface WaitForSingleSmsOptions {
/**
*
* @type {string}
* @memberof WaitForSingleSmsOptions
*/
phoneNumberId: string;
/**
*
* @type {number}
* @memberof WaitForSingleSmsOptions
*/
timeout: number;
/**
*
* @type {boolean}
* @memberof WaitForSingleSmsOptions
*/
unreadOnly?: boolean;
/**
*
* @type {Date}
* @memberof WaitForSingleSmsOptions
*/
before?: Date;
/**
*
* @type {Date}
* @memberof WaitForSingleSmsOptions
*/
since?: Date;
/**
*
* @type {string}
* @memberof WaitForSingleSmsOptions
*/
sortDirection?: WaitForSingleSmsOptionsSortDirectionEnum;
/**
*
* @type {number}
* @memberof WaitForSingleSmsOptions
*/
delay?: number;
}
/**
* @export
* @enum {string}
*/
export enum WaitForSingleSmsOptionsSortDirectionEnum {
ASC = 'ASC',
DESC = 'DESC',
}
export function WaitForSingleSmsOptionsFromJSON(
json: any
): WaitForSingleSmsOptions {
return WaitForSingleSmsOptionsFromJSONTyped(json, false);
}
export function WaitForSingleSmsOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): WaitForSingleSmsOptions {
if (json === undefined || json === null) {
return json;
}
return {
phoneNumberId: json['phoneNumberId'],
timeout: json['timeout'],
unreadOnly: !exists(json, 'unreadOnly') ? undefined : json['unreadOnly'],
before: !exists(json, 'before') ? undefined : new Date(json['before']),
since: !exists(json, 'since') ? undefined : new Date(json['since']),
sortDirection: !exists(json, 'sortDirection')
? undefined
: json['sortDirection'],
delay: !exists(json, 'delay') ? undefined : json['delay'],
};
}
export function WaitForSingleSmsOptionsToJSON(
value?: WaitForSingleSmsOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
phoneNumberId: value.phoneNumberId,
timeout: value.timeout,
unreadOnly: value.unreadOnly,
before: value.before === undefined ? undefined : value.before.toISOString(),
since: value.since === undefined ? undefined : value.since.toISOString(),
sortDirection: value.sortDirection,
delay: value.delay,
};
}
/* 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';
import {
MatchOption,
MatchOptionFromJSON,
MatchOptionFromJSONTyped,
MatchOptionToJSON,
} from './';
/**
* Conditions to apply to emails that you are waiting for
* @export
* @interface WaitForConditions
*/
export interface WaitForConditions {
/**
* ID of inbox to search within and apply conditions to. Essentially filtering the emails found to give a count.
* @type {string}
* @memberof WaitForConditions
*/
inboxId: string;
/**
* Number of results that should match conditions. Either exactly or at least this amount based on the `countType`. If count condition is not met and the timeout has not been reached the `waitFor` method will retry the operation.
* @type {number}
* @memberof WaitForConditions
*/
count?: number | null;
/**
* Max time in milliseconds to wait between retries if a `timeout` is specified.
* @type {number}
* @memberof WaitForConditions
*/
delayTimeout?: number | null;
/**
* Max time in milliseconds to retry the `waitFor` operation until conditions are met.
* @type {number}
* @memberof WaitForConditions
*/
timeout: number;
/**
* Apply conditions only to **unread** emails. All emails begin with `read=false`. An email is marked `read=true` when an `EmailDto` representation of it has been returned to the user at least once. For example you have called `getEmail` or `waitForLatestEmail` etc., or you have viewed the email in the dashboard.
* @type {boolean}
* @memberof WaitForConditions
*/
unreadOnly?: boolean | null;
/**
* How result size should be compared with the expected size. Exactly or at-least matching result?
* @type {string}
* @memberof WaitForConditions
*/
countType?: WaitForConditionsCountTypeEnum;
/**
* Conditions that should be matched for an email to qualify for results. Each condition will be applied in order to each email within an inbox to filter a result list of matching emails you are waiting for.
* @type {Array<MatchOption>}
* @memberof WaitForConditions
*/
matches?: Array<MatchOption> | null;
/**
* Direction to sort matching emails by created time
* @type {string}
* @memberof WaitForConditions
*/
sortDirection?: WaitForConditionsSortDirectionEnum;
/**
* ISO Date Time earliest time of email to consider. Filter for matching emails that were received after this date
* @type {Date}
* @memberof WaitForConditions
*/
since?: Date | null;
/**
* ISO Date Time latest time of email to consider. Filter for matching emails that were received before this date
* @type {Date}
* @memberof WaitForConditions
*/
before?: Date | null;
}
/**
* @export
* @enum {string}
*/
export enum WaitForConditionsCountTypeEnum {
EXACTLY = 'EXACTLY',
ATLEAST = 'ATLEAST',
}
/**
* @export
* @enum {string}
*/
export enum WaitForConditionsSortDirectionEnum {
ASC = 'ASC',
DESC = 'DESC',
}
export function WaitForConditionsFromJSON(json: any): WaitForConditions {
return WaitForConditionsFromJSONTyped(json, false);
}
export function WaitForConditionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): WaitForConditions {
if (json === undefined || json === null) {
return json;
}
return {
inboxId: json['inboxId'],
count: !exists(json, 'count') ? undefined : json['count'],
delayTimeout: !exists(json, 'delayTimeout')
? undefined
: json['delayTimeout'],
timeout: json['timeout'],
unreadOnly: !exists(json, 'unreadOnly') ? undefined : json['unreadOnly'],
countType: !exists(json, 'countType') ? undefined : json['countType'],
matches: !exists(json, 'matches')
? undefined
: json['matches'] === null
? null
: (json['matches'] as Array<any>).map(MatchOptionFromJSON),
sortDirection: !exists(json, 'sortDirection')
? undefined
: json['sortDirection'],
since: !exists(json, 'since')
? undefined
: json['since'] === null
? null
: new Date(json['since']),
before: !exists(json, 'before')
? undefined
: json['before'] === null
? null
: new Date(json['before']),
};
}
export function WaitForConditionsToJSON(value?: WaitForConditions | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
inboxId: value.inboxId,
count: value.count,
delayTimeout: value.delayTimeout,
timeout: value.timeout,
unreadOnly: value.unreadOnly,
countType: value.countType,
matches:
value.matches === undefined
? undefined
: value.matches === null
? null
: (value.matches as Array<any>).map(MatchOptionToJSON),
sortDirection: value.sortDirection,
since:
value.since === undefined
? undefined
: value.since === null
? null
: value.since.toISOString(),
before:
value.before === undefined
? undefined
: value.before === null
? null
: value.before.toISOString(),
};
}
/* 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';
/**
*
* @export
* @interface VerifyWebhookSignatureResults
*/
export interface VerifyWebhookSignatureResults {
/**
*
* @type {boolean}
* @memberof VerifyWebhookSignatureResults
*/
isValid: boolean;
}
export function VerifyWebhookSignatureResultsFromJSON(
json: any
): VerifyWebhookSignatureResults {
return VerifyWebhookSignatureResultsFromJSONTyped(json, false);
}
export function VerifyWebhookSignatureResultsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): VerifyWebhookSignatureResults {
if (json === undefined || json === null) {
return json;
}
return {
isValid: json['isValid'],
};
}
export function VerifyWebhookSignatureResultsToJSON(
value?: VerifyWebhookSignatureResults | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
isValid: value.isValid,
};
}
/* 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';
/**
*
* @export
* @interface VerifyWebhookSignatureOptions
*/
export interface VerifyWebhookSignatureOptions {
/**
*
* @type {string}
* @memberof VerifyWebhookSignatureOptions
*/
messageId: string;
/**
*
* @type {string}
* @memberof VerifyWebhookSignatureOptions
*/
signature: string;
}
export function VerifyWebhookSignatureOptionsFromJSON(
json: any
): VerifyWebhookSignatureOptions {
return VerifyWebhookSignatureOptionsFromJSONTyped(json, false);
}
export function VerifyWebhookSignatureOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): VerifyWebhookSignatureOptions {
if (json === undefined || json === null) {
return json;
}
return {
messageId: json['messageId'],
signature: json['signature'],
};
}
export function VerifyWebhookSignatureOptionsToJSON(
value?: VerifyWebhookSignatureOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
messageId: value.messageId,
signature: value.signature,
};
}
/* 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 verifying that an email address exists at a remote mail server.
* @export
* @interface VerifyEmailAddressOptions
*/
export interface VerifyEmailAddressOptions {
/**
*
* @type {string}
* @memberof VerifyEmailAddressOptions
*/
mailServerDomain?: string | null;
/**
*
* @type {string}
* @memberof VerifyEmailAddressOptions
*/
emailAddress: string;
/**
*
* @type {string}
* @memberof VerifyEmailAddressOptions
*/
senderEmailAddress?: string | null;
/**
*
* @type {number}
* @memberof VerifyEmailAddressOptions
*/
port?: number | null;
}
export function VerifyEmailAddressOptionsFromJSON(
json: any
): VerifyEmailAddressOptions {
return VerifyEmailAddressOptionsFromJSONTyped(json, false);
}
export function VerifyEmailAddressOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): VerifyEmailAddressOptions {
if (json === undefined || json === null) {
return json;
}
return {
mailServerDomain: !exists(json, 'mailServerDomain')
? undefined
: json['mailServerDomain'],
emailAddress: json['emailAddress'],
senderEmailAddress: !exists(json, 'senderEmailAddress')
? undefined
: json['senderEmailAddress'],
port: !exists(json, 'port') ? undefined : json['port'],
};
}
export function VerifyEmailAddressOptionsToJSON(
value?: VerifyEmailAddressOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
mailServerDomain: value.mailServerDomain,
emailAddress: value.emailAddress,
senderEmailAddress: value.senderEmailAddress,
port: value.port,
};
}
/* 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';
/**
* Optional warnings resulting from HTML validation
* @export
* @interface ValidationMessage
*/
export interface ValidationMessage {
/**
*
* @type {number}
* @memberof ValidationMessage
*/
lineNumber: number;
/**
*
* @type {string}
* @memberof ValidationMessage
*/
message?: string;
}
export function ValidationMessageFromJSON(json: any): ValidationMessage {
return ValidationMessageFromJSONTyped(json, false);
}
export function ValidationMessageFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ValidationMessage {
if (json === undefined || json === null) {
return json;
}
return {
lineNumber: json['lineNumber'],
message: !exists(json, 'message') ? undefined : json['message'],
};
}
export function ValidationMessageToJSON(value?: ValidationMessage | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
lineNumber: value.lineNumber,
message: value.message,
};
}
/* 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';
import {
HTMLValidationResult,
HTMLValidationResultFromJSON,
HTMLValidationResultFromJSONTyped,
HTMLValidationResultToJSON,
} from './';
/**
* Response object for email validation operation
* @export
* @interface ValidationDto
*/
export interface ValidationDto {
/**
* ID of the email validated
* @type {string}
* @memberof ValidationDto
*/
emailId: string;
/**
*
* @type {HTMLValidationResult}
* @memberof ValidationDto
*/
html: HTMLValidationResult;
}
export function ValidationDtoFromJSON(json: any): ValidationDto {
return ValidationDtoFromJSONTyped(json, false);
}
export function ValidationDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ValidationDto {
if (json === undefined || json === null) {
return json;
}
return {
emailId: json['emailId'],
html: HTMLValidationResultFromJSON(json['html']),
};
}
export function ValidationDtoToJSON(value?: ValidationDto | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
emailId: value.emailId,
html: HTMLValidationResultToJSON(value.html),
};
}
/* 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';
/**
* Result of validating a list of email addresses
* @export
* @interface ValidateEmailAddressListResult
*/
export interface ValidateEmailAddressListResult {
/**
*
* @type {Array<string>}
* @memberof ValidateEmailAddressListResult
*/
validEmailAddresses: Array<string>;
/**
*
* @type {Array<string>}
* @memberof ValidateEmailAddressListResult
*/
invalidEmailAddresses: Array<string>;
/**
*
* @type {{ [key: string]: boolean; }}
* @memberof ValidateEmailAddressListResult
*/
resultMapEmailAddressIsValid: { [key: string]: boolean };
}
export function ValidateEmailAddressListResultFromJSON(
json: any
): ValidateEmailAddressListResult {
return ValidateEmailAddressListResultFromJSONTyped(json, false);
}
export function ValidateEmailAddressListResultFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ValidateEmailAddressListResult {
if (json === undefined || json === null) {
return json;
}
return {
validEmailAddresses: json['validEmailAddresses'],
invalidEmailAddresses: json['invalidEmailAddresses'],
resultMapEmailAddressIsValid: json['resultMapEmailAddressIsValid'],
};
}
export function ValidateEmailAddressListResultToJSON(
value?: ValidateEmailAddressListResult | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
validEmailAddresses: value.validEmailAddresses,
invalidEmailAddresses: value.invalidEmailAddresses,
resultMapEmailAddressIsValid: value.resultMapEmailAddressIsValid,
};
}
/* 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 validating a list of email addresses
* @export
* @interface ValidateEmailAddressListOptions
*/
export interface ValidateEmailAddressListOptions {
/**
*
* @type {Array<string>}
* @memberof ValidateEmailAddressListOptions
*/
emailAddressList: Array<string>;
/**
*
* @type {boolean}
* @memberof ValidateEmailAddressListOptions
*/
ignoreOldResults?: boolean | null;
}
export function ValidateEmailAddressListOptionsFromJSON(
json: any
): ValidateEmailAddressListOptions {
return ValidateEmailAddressListOptionsFromJSONTyped(json, false);
}
export function ValidateEmailAddressListOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ValidateEmailAddressListOptions {
if (json === undefined || json === null) {
return json;
}
return {
emailAddressList: json['emailAddressList'],
ignoreOldResults: !exists(json, 'ignoreOldResults')
? undefined
: json['ignoreOldResults'],
};
}
export function ValidateEmailAddressListOptionsToJSON(
value?: ValidateEmailAddressListOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
emailAddressList: value.emailAddressList,
ignoreOldResults: value.ignoreOldResults,
};
}
/* 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';
/**
*
* @export
* @interface UserInfoDto
*/
export interface UserInfoDto {
/**
*
* @type {string}
* @memberof UserInfoDto
*/
id: string;
/**
*
* @type {string}
* @memberof UserInfoDto
*/
emailAddress: string;
/**
*
* @type {string}
* @memberof UserInfoDto
*/
accountState: UserInfoDtoAccountStateEnum;
/**
*
* @type {string}
* @memberof UserInfoDto
*/
subscriptionType?: UserInfoDtoSubscriptionTypeEnum;
/**
*
* @type {string}
* @memberof UserInfoDto
*/
accountType: UserInfoDtoAccountTypeEnum;
/**
*
* @type {Date}
* @memberof UserInfoDto
*/
createdAt: Date;
}
/**
* @export
* @enum {string}
*/
export enum UserInfoDtoAccountStateEnum {
FROZEN = 'FROZEN',
ACTIVE = 'ACTIVE',
}
/**
* @export
* @enum {string}
*/
export enum UserInfoDtoSubscriptionTypeEnum {
PRO_MONTHLY = 'PRO_MONTHLY',
STARTER = 'STARTER',
PRO = 'PRO',
TEAM = 'TEAM',
ENTERPRISE = 'ENTERPRISE',
}
/**
* @export
* @enum {string}
*/
export enum UserInfoDtoAccountTypeEnum {
SOLO = 'SOLO',
CHILD_SOLO = 'CHILD_SOLO',
CHILD_TEAM = 'CHILD_TEAM',
CHILD_ADMIN = 'CHILD_ADMIN',
}
export function UserInfoDtoFromJSON(json: any): UserInfoDto {
return UserInfoDtoFromJSONTyped(json, false);
}
export function UserInfoDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): UserInfoDto {
if (json === undefined || json === null) {
return json;
}
return {
id: json['id'],
emailAddress: json['emailAddress'],
accountState: json['accountState'],
subscriptionType: !exists(json, 'subscriptionType')
? undefined
: json['subscriptionType'],
accountType: json['accountType'],
createdAt: new Date(json['createdAt']),
};
}
export function UserInfoDtoToJSON(value?: UserInfoDto | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
emailAddress: value.emailAddress,
accountState: value.accountState,
subscriptionType: value.subscriptionType,
accountType: value.accountType,
createdAt: value.createdAt.toISOString(),
};
}
/* 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 uploading files for attachments. When sending emails with the API that require attachments first upload each attachment. Then use the returned attachment ID in your `SendEmailOptions` when sending an email. This way you can use attachments multiple times once they have been uploaded.
* @export
* @interface UploadAttachmentOptions
*/
export interface UploadAttachmentOptions {
/**
* Optional contentId for file.
* @type {string}
* @memberof UploadAttachmentOptions
*/
contentId?: string | null;
/**
* Optional contentType for file. For instance `application/pdf`
* @type {string}
* @memberof UploadAttachmentOptions
*/
contentType?: string | null;
/**
* Optional filename to save upload with. Will be the name that is shown in email clients
* @type {string}
* @memberof UploadAttachmentOptions
*/
filename?: string | null;
/**
* Base64 encoded string of file contents. Typically this means reading the bytes or string content of a file and then converting that to a base64 encoded string. For examples of how to do this see https://www.mailslurp.com/guides/base64-file-uploads/
* @type {string}
* @memberof UploadAttachmentOptions
*/
base64Contents: string;
}
export function UploadAttachmentOptionsFromJSON(
json: any
): UploadAttachmentOptions {
return UploadAttachmentOptionsFromJSONTyped(json, false);
}
export function UploadAttachmentOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): UploadAttachmentOptions {
if (json === undefined || json === null) {
return json;
}
return {
contentId: !exists(json, 'contentId') ? undefined : json['contentId'],
contentType: !exists(json, 'contentType') ? undefined : json['contentType'],
filename: !exists(json, 'filename') ? undefined : json['filename'],
base64Contents: json['base64Contents'],
};
}
export function UploadAttachmentOptionsToJSON(
value?: UploadAttachmentOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
contentId: value.contentId,
contentType: value.contentType,
filename: value.filename,
base64Contents: value.base64Contents,
};
}
/* 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 updating an inbox replier
* @export
* @interface UpdateInboxReplierOptions
*/
export interface UpdateInboxReplierOptions {
/**
* Inbox ID to attach replier to
* @type {string}
* @memberof UpdateInboxReplierOptions
*/
inboxId: string;
/**
* Name for replier
* @type {string}
* @memberof UpdateInboxReplierOptions
*/
name?: string | null;
/**
* Field to match against to trigger inbox replier for inbound email
* @type {string}
* @memberof UpdateInboxReplierOptions
*/
field: UpdateInboxReplierOptionsFieldEnum;
/**
* String or wildcard style match for field specified when evaluating reply rules
* @type {string}
* @memberof UpdateInboxReplierOptions
*/
match: string;
/**
* Reply-to email address when sending replying
* @type {string}
* @memberof UpdateInboxReplierOptions
*/
replyTo?: string | null;
/**
* Subject override when replying to email
* @type {string}
* @memberof UpdateInboxReplierOptions
*/
subject?: string | null;
/**
* Send email from address
* @type {string}
* @memberof UpdateInboxReplierOptions
*/
from?: string | null;
/**
* Email reply charset
* @type {string}
* @memberof UpdateInboxReplierOptions
*/
charset?: string | null;
/**
* Send HTML email
* @type {boolean}
* @memberof UpdateInboxReplierOptions
*/
isHTML?: boolean | null;
/**
* Ignore sender replyTo when responding. Send directly to the sender if enabled.
* @type {boolean}
* @memberof UpdateInboxReplierOptions
*/
ignoreReplyTo?: boolean | null;
/**
* Email body for reply
* @type {string}
* @memberof UpdateInboxReplierOptions
*/
body?: string | null;
/**
* ID of template to use when sending a reply
* @type {string}
* @memberof UpdateInboxReplierOptions
*/
templateId?: string | null;
/**
* Template variable values
* @type {{ [key: string]: object; }}
* @memberof UpdateInboxReplierOptions
*/
templateVariables?: { [key: string]: object } | null;
}
/**
* @export
* @enum {string}
*/
export enum UpdateInboxReplierOptionsFieldEnum {
RECIPIENTS = 'RECIPIENTS',
SENDER = 'SENDER',
SUBJECT = 'SUBJECT',
ATTACHMENTS = 'ATTACHMENTS',
}
export function UpdateInboxReplierOptionsFromJSON(
json: any
): UpdateInboxReplierOptions {
return UpdateInboxReplierOptionsFromJSONTyped(json, false);
}
export function UpdateInboxReplierOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): UpdateInboxReplierOptions {
if (json === undefined || json === null) {
return json;
}
return {
inboxId: json['inboxId'],
name: !exists(json, 'name') ? undefined : json['name'],
field: json['field'],
match: json['match'],
replyTo: !exists(json, 'replyTo') ? undefined : json['replyTo'],
subject: !exists(json, 'subject') ? undefined : json['subject'],
from: !exists(json, 'from') ? undefined : json['from'],
charset: !exists(json, 'charset') ? undefined : json['charset'],
isHTML: !exists(json, 'isHTML') ? undefined : json['isHTML'],
ignoreReplyTo: !exists(json, 'ignoreReplyTo')
? undefined
: json['ignoreReplyTo'],
body: !exists(json, 'body') ? undefined : json['body'],
templateId: !exists(json, 'templateId') ? undefined : json['templateId'],
templateVariables: !exists(json, 'templateVariables')
? undefined
: json['templateVariables'],
};
}
export function UpdateInboxReplierOptionsToJSON(
value?: UpdateInboxReplierOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
inboxId: value.inboxId,
name: value.name,
field: value.field,
match: value.match,
replyTo: value.replyTo,
subject: value.subject,
from: value.from,
charset: value.charset,
isHTML: value.isHTML,
ignoreReplyTo: value.ignoreReplyTo,
body: value.body,
templateId: value.templateId,
templateVariables: value.templateVariables,
};
}
/* 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 updating inbox properties
* @export
* @interface UpdateInboxOptions
*/
export interface UpdateInboxOptions {
/**
* Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search
* @type {string}
* @memberof UpdateInboxOptions
*/
name?: string | null;
/**
* Description of an inbox for labelling and searching purposes
* @type {string}
* @memberof UpdateInboxOptions
*/
description?: string | null;
/**
* Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI.
* @type {Array<string>}
* @memberof UpdateInboxOptions
*/
tags?: Array<string> | null;
/**
* Inbox expiration time. When, if ever, the inbox should expire and be deleted. If null then this inbox is permanent and the emails in it won't be deleted. This is the default behavior unless expiration date is set. If an expiration date is set and the time is reached MailSlurp will expire the inbox and move it to an expired inbox entity. You can still access the emails belonging to it but it can no longer send or receive email.
* @type {Date}
* @memberof UpdateInboxOptions
*/
expiresAt?: Date | null;
/**
* Is the inbox a favorite inbox. Make an inbox a favorite is typically done in the dashboard for quick access or filtering
* @type {boolean}
* @memberof UpdateInboxOptions
*/
favourite?: boolean | null;
}
export function UpdateInboxOptionsFromJSON(json: any): UpdateInboxOptions {
return UpdateInboxOptionsFromJSONTyped(json, false);
}
export function UpdateInboxOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): UpdateInboxOptions {
if (json === undefined || json === null) {
return json;
}
return {
name: !exists(json, 'name') ? undefined : json['name'],
description: !exists(json, 'description') ? undefined : json['description'],
tags: !exists(json, 'tags') ? undefined : json['tags'],
expiresAt: !exists(json, 'expiresAt')
? undefined
: json['expiresAt'] === null
? null
: new Date(json['expiresAt']),
favourite: !exists(json, 'favourite') ? undefined : json['favourite'],
};
}
export function UpdateInboxOptionsToJSON(
value?: UpdateInboxOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
name: value.name,
description: value.description,
tags: value.tags,
expiresAt:
value.expiresAt === undefined
? undefined
: value.expiresAt === null
? null
: value.expiresAt.toISOString(),
favourite: value.favourite,
};
}
/* 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';
/**
* Update group contacts options. Pass a list of contact ids to replace existing group contacts.
* @export
* @interface UpdateGroupContacts
*/
export interface UpdateGroupContacts {
/**
*
* @type {Array<string>}
* @memberof UpdateGroupContacts
*/
contactIds: Array<string>;
}
export function UpdateGroupContactsFromJSON(json: any): UpdateGroupContacts {
return UpdateGroupContactsFromJSONTyped(json, false);
}
export function UpdateGroupContactsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): UpdateGroupContacts {
if (json === undefined || json === null) {
return json;
}
return {
contactIds: json['contactIds'],
};
}
export function UpdateGroupContactsToJSON(
value?: UpdateGroupContacts | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
contactIds: value.contactIds,
};
}
/* 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 creating a domain to use with MailSlurp. You must have ownership access to this domain in order to verify it. Domains will not functionally currently until the domain has been verified. See https://www.mailslurp.com/guides/custom-domains for help.
* @export
* @interface UpdateDomainOptions
*/
export interface UpdateDomainOptions {
/**
*
* @type {string}
* @memberof UpdateDomainOptions
*/
catchAllInboxId?: string | null;
}
export function UpdateDomainOptionsFromJSON(json: any): UpdateDomainOptions {
return UpdateDomainOptionsFromJSONTyped(json, false);
}
export function UpdateDomainOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): UpdateDomainOptions {
if (json === undefined || json === null) {
return json;
}
return {
catchAllInboxId: !exists(json, 'catchAllInboxId')
? undefined
: json['catchAllInboxId'],
};
}
export function UpdateDomainOptionsToJSON(
value?: UpdateDomainOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
catchAllInboxId: value.catchAllInboxId,
};
}
/* 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';
/**
* Update an email alias
* @export
* @interface UpdateAliasOptions
*/
export interface UpdateAliasOptions {
/**
* Optional name for alias
* @type {string}
* @memberof UpdateAliasOptions
*/
name?: string | null;
}
export function UpdateAliasOptionsFromJSON(json: any): UpdateAliasOptions {
return UpdateAliasOptionsFromJSONTyped(json, false);
}
export function UpdateAliasOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): UpdateAliasOptions {
if (json === undefined || json === null) {
return json;
}
return {
name: !exists(json, 'name') ? undefined : json['name'],
};
}
export function UpdateAliasOptionsToJSON(
value?: UpdateAliasOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
name: value.name,
};
}
/* 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';
/**
* Number of unseen errors
* @export
* @interface UnseenErrorCountDto
*/
export interface UnseenErrorCountDto {
/**
*
* @type {number}
* @memberof UnseenErrorCountDto
*/
count: number;
}
export function UnseenErrorCountDtoFromJSON(json: any): UnseenErrorCountDto {
return UnseenErrorCountDtoFromJSONTyped(json, false);
}
export function UnseenErrorCountDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): UnseenErrorCountDto {
if (json === undefined || json === null) {
return json;
}
return {
count: json['count'],
};
}
export function UnseenErrorCountDtoToJSON(
value?: UnseenErrorCountDto | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
count: value.count,
};
}
/* 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';
/**
* Number of unread entities
* @export
* @interface UnreadCount
*/
export interface UnreadCount {
/**
*
* @type {number}
* @memberof UnreadCount
*/
count: number;
}
export function UnreadCountFromJSON(json: any): UnreadCount {
return UnreadCountFromJSONTyped(json, false);
}
export function UnreadCountFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): UnreadCount {
if (json === undefined || json === null) {
return json;
}
return {
count: json['count'],
};
}
export function UnreadCountToJSON(value?: UnreadCount | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
count: value.count,
};
}
/* 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';
/**
* Unknown missed email projection
* @export
* @interface UnknownMissedEmailProjection
*/
export interface UnknownMissedEmailProjection {
/**
*
* @type {Date}
* @memberof UnknownMissedEmailProjection
*/
createdAt: Date;
/**
*
* @type {Array<string>}
* @memberof UnknownMissedEmailProjection
*/
to?: Array<string>;
/**
*
* @type {string}
* @memberof UnknownMissedEmailProjection
*/
subject?: string;
/**
*
* @type {string}
* @memberof UnknownMissedEmailProjection
*/
id: string;
/**
*
* @type {string}
* @memberof UnknownMissedEmailProjection
*/
from?: string;
}
export function UnknownMissedEmailProjectionFromJSON(
json: any
): UnknownMissedEmailProjection {
return UnknownMissedEmailProjectionFromJSONTyped(json, false);
}
export function UnknownMissedEmailProjectionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): UnknownMissedEmailProjection {
if (json === undefined || json === null) {
return json;
}
return {
createdAt: new Date(json['createdAt']),
to: !exists(json, 'to') ? undefined : json['to'],
subject: !exists(json, 'subject') ? undefined : json['subject'],
id: json['id'],
from: !exists(json, 'from') ? undefined : json['from'],
};
}
export function UnknownMissedEmailProjectionToJSON(
value?: UnknownMissedEmailProjection | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
createdAt: value.createdAt.toISOString(),
to: value.to,
subject: value.subject,
id: value.id,
from: value.from,
};
}
/* 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';
/**
* Tracking pixel data
* @export
* @interface TrackingPixelProjection
*/
export interface TrackingPixelProjection {
/**
*
* @type {Date}
* @memberof TrackingPixelProjection
*/
createdAt: Date;
/**
*
* @type {string}
* @memberof TrackingPixelProjection
*/
inboxId?: string;
/**
*
* @type {string}
* @memberof TrackingPixelProjection
*/
userId: string;
/**
*
* @type {string}
* @memberof TrackingPixelProjection
*/
sentEmailId?: string;
/**
*
* @type {string}
* @memberof TrackingPixelProjection
*/
recipient?: string;
/**
*
* @type {boolean}
* @memberof TrackingPixelProjection
*/
seen: boolean;
/**
*
* @type {Date}
* @memberof TrackingPixelProjection
*/
seenAt?: Date;
/**
*
* @type {string}
* @memberof TrackingPixelProjection
*/
name?: string;
/**
*
* @type {string}
* @memberof TrackingPixelProjection
*/
id: string;
}
export function TrackingPixelProjectionFromJSON(
json: any
): TrackingPixelProjection {
return TrackingPixelProjectionFromJSONTyped(json, false);
}
export function TrackingPixelProjectionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): TrackingPixelProjection {
if (json === undefined || json === null) {
return json;
}
return {
createdAt: new Date(json['createdAt']),
inboxId: !exists(json, 'inboxId') ? undefined : json['inboxId'],
userId: json['userId'],
sentEmailId: !exists(json, 'sentEmailId') ? undefined : json['sentEmailId'],
recipient: !exists(json, 'recipient') ? undefined : json['recipient'],
seen: json['seen'],
seenAt: !exists(json, 'seenAt') ? undefined : new Date(json['seenAt']),
name: !exists(json, 'name') ? undefined : json['name'],
id: json['id'],
};
}
export function TrackingPixelProjectionToJSON(
value?: TrackingPixelProjection | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
createdAt: value.createdAt.toISOString(),
inboxId: value.inboxId,
userId: value.userId,
sentEmailId: value.sentEmailId,
recipient: value.recipient,
seen: value.seen,
seenAt: value.seenAt === undefined ? undefined : value.seenAt.toISOString(),
name: value.name,
id: value.id,
};
}
/* 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';
/**
* Tracking pixel
* @export
* @interface TrackingPixelDto
*/
export interface TrackingPixelDto {
/**
*
* @type {string}
* @memberof TrackingPixelDto
*/
id: string;
/**
*
* @type {boolean}
* @memberof TrackingPixelDto
*/
seen: boolean;
/**
*
* @type {string}
* @memberof TrackingPixelDto
*/
recipient?: string | null;
/**
*
* @type {string}
* @memberof TrackingPixelDto
*/
html: string;
/**
*
* @type {string}
* @memberof TrackingPixelDto
*/
url: string;
/**
*
* @type {string}
* @memberof TrackingPixelDto
*/
inboxId?: string | null;
/**
*
* @type {string}
* @memberof TrackingPixelDto
*/
sentEmailId?: string | null;
/**
*
* @type {Date}
* @memberof TrackingPixelDto
*/
seenAt?: Date | null;
/**
*
* @type {Date}
* @memberof TrackingPixelDto
*/
createdAt: Date;
}
export function TrackingPixelDtoFromJSON(json: any): TrackingPixelDto {
return TrackingPixelDtoFromJSONTyped(json, false);
}
export function TrackingPixelDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): TrackingPixelDto {
if (json === undefined || json === null) {
return json;
}
return {
id: json['id'],
seen: json['seen'],
recipient: !exists(json, 'recipient') ? undefined : json['recipient'],
html: json['html'],
url: json['url'],
inboxId: !exists(json, 'inboxId') ? undefined : json['inboxId'],
sentEmailId: !exists(json, 'sentEmailId') ? undefined : json['sentEmailId'],
seenAt: !exists(json, 'seenAt')
? undefined
: json['seenAt'] === null
? null
: new Date(json['seenAt']),
createdAt: new Date(json['createdAt']),
};
}
export function TrackingPixelDtoToJSON(value?: TrackingPixelDto | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
seen: value.seen,
recipient: value.recipient,
html: value.html,
url: value.url,
inboxId: value.inboxId,
sentEmailId: value.sentEmailId,
seenAt:
value.seenAt === undefined
? undefined
: value.seenAt === null
? null
: value.seenAt.toISOString(),
createdAt: value.createdAt.toISOString(),
};
}
/* 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';
/**
* A thread is a message thread created for a message received by an alias
* @export
* @interface ThreadProjection
*/
export interface ThreadProjection {
/**
* Created at DateTime
* @type {Date}
* @memberof ThreadProjection
*/
createdAt: Date;
/**
* Updated at DateTime
* @type {Date}
* @memberof ThreadProjection
*/
updatedAt: Date;
/**
* Inbox ID
* @type {string}
* @memberof ThreadProjection
*/
inboxId: string;
/**
* User ID
* @type {string}
* @memberof ThreadProjection
*/
userId: string;
/**
* To recipients
* @type {Array<string>}
* @memberof ThreadProjection
*/
to: Array<string>;
/**
* BCC recipients
* @type {Array<string>}
* @memberof ThreadProjection
*/
bcc?: Array<string>;
/**
* CC recipients
* @type {Array<string>}
* @memberof ThreadProjection
*/
cc?: Array<string>;
/**
* Alias ID
* @type {string}
* @memberof ThreadProjection
*/
aliasId: string;
/**
* Thread subject
* @type {string}
* @memberof ThreadProjection
*/
subject?: string;
/**
* Name of thread
* @type {string}
* @memberof ThreadProjection
*/
name?: string;
/**
* ID of email thread
* @type {string}
* @memberof ThreadProjection
*/
id: string;
}
export function ThreadProjectionFromJSON(json: any): ThreadProjection {
return ThreadProjectionFromJSONTyped(json, false);
}
export function ThreadProjectionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ThreadProjection {
if (json === undefined || json === null) {
return json;
}
return {
createdAt: new Date(json['createdAt']),
updatedAt: new Date(json['updatedAt']),
inboxId: json['inboxId'],
userId: json['userId'],
to: json['to'],
bcc: !exists(json, 'bcc') ? undefined : json['bcc'],
cc: !exists(json, 'cc') ? undefined : json['cc'],
aliasId: json['aliasId'],
subject: !exists(json, 'subject') ? undefined : json['subject'],
name: !exists(json, 'name') ? undefined : json['name'],
id: json['id'],
};
}
export function ThreadProjectionToJSON(value?: ThreadProjection | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
createdAt: value.createdAt.toISOString(),
updatedAt: value.updatedAt.toISOString(),
inboxId: value.inboxId,
userId: value.userId,
to: value.to,
bcc: value.bcc,
cc: value.cc,
aliasId: value.aliasId,
subject: value.subject,
name: value.name,
id: value.id,
};
}
/* 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';
/**
*
* @export
* @interface TestPhoneNumberOptions
*/
export interface TestPhoneNumberOptions {
/**
*
* @type {string}
* @memberof TestPhoneNumberOptions
*/
message: string;
}
export function TestPhoneNumberOptionsFromJSON(
json: any
): TestPhoneNumberOptions {
return TestPhoneNumberOptionsFromJSONTyped(json, false);
}
export function TestPhoneNumberOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): TestPhoneNumberOptions {
if (json === undefined || json === null) {
return json;
}
return {
message: json['message'],
};
}
export function TestPhoneNumberOptionsToJSON(
value?: TestPhoneNumberOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
message: value.message,
};
}
/* 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';
import {
CreateInboxRulesetOptions,
CreateInboxRulesetOptionsFromJSON,
CreateInboxRulesetOptionsFromJSONTyped,
CreateInboxRulesetOptionsToJSON,
InboxRulesetTestOptions,
InboxRulesetTestOptionsFromJSON,
InboxRulesetTestOptionsFromJSONTyped,
InboxRulesetTestOptionsToJSON,
} from './';
/**
* Test inbox ruleset options
* @export
* @interface TestNewInboxRulesetOptions
*/
export interface TestNewInboxRulesetOptions {
/**
*
* @type {InboxRulesetTestOptions}
* @memberof TestNewInboxRulesetOptions
*/
inboxRulesetTestOptions: InboxRulesetTestOptions;
/**
*
* @type {CreateInboxRulesetOptions}
* @memberof TestNewInboxRulesetOptions
*/
createInboxRulesetOptions: CreateInboxRulesetOptions;
}
export function TestNewInboxRulesetOptionsFromJSON(
json: any
): TestNewInboxRulesetOptions {
return TestNewInboxRulesetOptionsFromJSONTyped(json, false);
}
export function TestNewInboxRulesetOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): TestNewInboxRulesetOptions {
if (json === undefined || json === null) {
return json;
}
return {
inboxRulesetTestOptions: InboxRulesetTestOptionsFromJSON(
json['inboxRulesetTestOptions']
),
createInboxRulesetOptions: CreateInboxRulesetOptionsFromJSON(
json['createInboxRulesetOptions']
),
};
}
export function TestNewInboxRulesetOptionsToJSON(
value?: TestNewInboxRulesetOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
inboxRulesetTestOptions: InboxRulesetTestOptionsToJSON(
value.inboxRulesetTestOptions
),
createInboxRulesetOptions: CreateInboxRulesetOptionsToJSON(
value.createInboxRulesetOptions
),
};
}
/* 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';
import {
CreateInboxForwarderOptions,
CreateInboxForwarderOptionsFromJSON,
CreateInboxForwarderOptionsFromJSONTyped,
CreateInboxForwarderOptionsToJSON,
InboxForwarderTestOptions,
InboxForwarderTestOptionsFromJSON,
InboxForwarderTestOptionsFromJSONTyped,
InboxForwarderTestOptionsToJSON,
} from './';
/**
* Options for testing new inbox forwarder rules
* @export
* @interface TestNewInboxForwarderOptions
*/
export interface TestNewInboxForwarderOptions {
/**
*
* @type {InboxForwarderTestOptions}
* @memberof TestNewInboxForwarderOptions
*/
inboxForwarderTestOptions: InboxForwarderTestOptions;
/**
*
* @type {CreateInboxForwarderOptions}
* @memberof TestNewInboxForwarderOptions
*/
createInboxForwarderOptions: CreateInboxForwarderOptions;
}
export function TestNewInboxForwarderOptionsFromJSON(
json: any
): TestNewInboxForwarderOptions {
return TestNewInboxForwarderOptionsFromJSONTyped(json, false);
}
export function TestNewInboxForwarderOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): TestNewInboxForwarderOptions {
if (json === undefined || json === null) {
return json;
}
return {
inboxForwarderTestOptions: InboxForwarderTestOptionsFromJSON(
json['inboxForwarderTestOptions']
),
createInboxForwarderOptions: CreateInboxForwarderOptionsFromJSON(
json['createInboxForwarderOptions']
),
};
}
export function TestNewInboxForwarderOptionsToJSON(
value?: TestNewInboxForwarderOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
inboxForwarderTestOptions: InboxForwarderTestOptionsToJSON(
value.inboxForwarderTestOptions
),
createInboxForwarderOptions: CreateInboxForwarderOptionsToJSON(
value.createInboxForwarderOptions
),
};
}
/* 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';
/**
*
* @export
* @interface TestInboxRulesetSendingResult
*/
export interface TestInboxRulesetSendingResult {
/**
*
* @type {boolean}
* @memberof TestInboxRulesetSendingResult
*/
canSend: boolean;
}
export function TestInboxRulesetSendingResultFromJSON(
json: any
): TestInboxRulesetSendingResult {
return TestInboxRulesetSendingResultFromJSONTyped(json, false);
}
export function TestInboxRulesetSendingResultFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): TestInboxRulesetSendingResult {
if (json === undefined || json === null) {
return json;
}
return {
canSend: json['canSend'],
};
}
export function TestInboxRulesetSendingResultToJSON(
value?: TestInboxRulesetSendingResult | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
canSend: value.canSend,
};
}
/* 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';
/**
* Test options for inbox ruleset sending test
* @export
* @interface TestInboxRulesetSendingOptions
*/
export interface TestInboxRulesetSendingOptions {
/**
*
* @type {string}
* @memberof TestInboxRulesetSendingOptions
*/
inboxId: string;
/**
*
* @type {string}
* @memberof TestInboxRulesetSendingOptions
*/
recipient: string;
}
export function TestInboxRulesetSendingOptionsFromJSON(
json: any
): TestInboxRulesetSendingOptions {
return TestInboxRulesetSendingOptionsFromJSONTyped(json, false);
}
export function TestInboxRulesetSendingOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): TestInboxRulesetSendingOptions {
if (json === undefined || json === null) {
return json;
}
return {
inboxId: json['inboxId'],
recipient: json['recipient'],
};
}
export function TestInboxRulesetSendingOptionsToJSON(
value?: TestInboxRulesetSendingOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
inboxId: value.inboxId,
recipient: value.recipient,
};
}
/* 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';
/**
*
* @export
* @interface TestInboxRulesetReceivingResult
*/
export interface TestInboxRulesetReceivingResult {
/**
*
* @type {boolean}
* @memberof TestInboxRulesetReceivingResult
*/
canReceive: boolean;
}
export function TestInboxRulesetReceivingResultFromJSON(
json: any
): TestInboxRulesetReceivingResult {
return TestInboxRulesetReceivingResultFromJSONTyped(json, false);
}
export function TestInboxRulesetReceivingResultFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): TestInboxRulesetReceivingResult {
if (json === undefined || json === null) {
return json;
}
return {
canReceive: json['canReceive'],
};
}
export function TestInboxRulesetReceivingResultToJSON(
value?: TestInboxRulesetReceivingResult | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
canReceive: value.canReceive,
};
}
/* 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';
/**
* Test options for inbox ruleset receiving test
* @export
* @interface TestInboxRulesetReceivingOptions
*/
export interface TestInboxRulesetReceivingOptions {
/**
*
* @type {string}
* @memberof TestInboxRulesetReceivingOptions
*/
inboxId: string;
/**
*
* @type {string}
* @memberof TestInboxRulesetReceivingOptions
*/
fromSender: string;
}
export function TestInboxRulesetReceivingOptionsFromJSON(
json: any
): TestInboxRulesetReceivingOptions {
return TestInboxRulesetReceivingOptionsFromJSONTyped(json, false);
}
export function TestInboxRulesetReceivingOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): TestInboxRulesetReceivingOptions {
if (json === undefined || json === null) {
return json;
}
return {
inboxId: json['inboxId'],
fromSender: json['fromSender'],
};
}
export function TestInboxRulesetReceivingOptionsToJSON(
value?: TestInboxRulesetReceivingOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
inboxId: value.inboxId,
fromSender: value.fromSender,
};
}
/* 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';
/**
* Variable for use with email template
* @export
* @interface TemplateVariable
*/
export interface TemplateVariable {
/**
* Name of variable. This can be used in a template as {{name}}
* @type {string}
* @memberof TemplateVariable
*/
name: string;
/**
* The type of variable
* @type {string}
* @memberof TemplateVariable
*/
variableType: TemplateVariableVariableTypeEnum;
}
/**
* @export
* @enum {string}
*/
export enum TemplateVariableVariableTypeEnum {
STRING = 'STRING',
}
export function TemplateVariableFromJSON(json: any): TemplateVariable {
return TemplateVariableFromJSONTyped(json, false);
}
export function TemplateVariableFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): TemplateVariable {
if (json === undefined || json === null) {
return json;
}
return {
name: json['name'],
variableType: json['variableType'],
};
}
export function TemplateVariableToJSON(value?: TemplateVariable | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
name: value.name,
variableType: value.variableType,
};
}
/* 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';
/**
* Email template data
* @export
* @interface TemplateProjection
*/
export interface TemplateProjection {
/**
*
* @type {Date}
* @memberof TemplateProjection
*/
createdAt: Date;
/**
*
* @type {Date}
* @memberof TemplateProjection
*/
updatedAt: Date;
/**
*
* @type {Array<string>}
* @memberof TemplateProjection
*/
variables: Array<string>;
/**
*
* @type {string}
* @memberof TemplateProjection
*/
name: string;
/**
*
* @type {string}
* @memberof TemplateProjection
*/
id: string;
}
export function TemplateProjectionFromJSON(json: any): TemplateProjection {
return TemplateProjectionFromJSONTyped(json, false);
}
export function TemplateProjectionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): TemplateProjection {
if (json === undefined || json === null) {
return json;
}
return {
createdAt: new Date(json['createdAt']),
updatedAt: new Date(json['updatedAt']),
variables: json['variables'],
name: json['name'],
id: json['id'],
};
}
export function TemplateProjectionToJSON(
value?: TemplateProjection | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
createdAt: value.createdAt.toISOString(),
updatedAt: value.updatedAt.toISOString(),
variables: value.variables,
name: value.name,
id: value.id,
};
}
/* 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';
/**
*
* @export
* @interface TemplatePreview
*/
export interface TemplatePreview {
/**
*
* @type {string}
* @memberof TemplatePreview
*/
preview: string;
}
export function TemplatePreviewFromJSON(json: any): TemplatePreview {
return TemplatePreviewFromJSONTyped(json, false);
}
export function TemplatePreviewFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): TemplatePreview {
if (json === undefined || json === null) {
return json;
}
return {
preview: json['preview'],
};
}
export function TemplatePreviewToJSON(value?: TemplatePreview | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
preview: value.preview,
};
}
/* 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';
import {
TemplateVariable,
TemplateVariableFromJSON,
TemplateVariableFromJSONTyped,
TemplateVariableToJSON,
} from './';
/**
* Email template
* @export
* @interface TemplateDto
*/
export interface TemplateDto {
/**
* ID of template
* @type {string}
* @memberof TemplateDto
*/
id: string;
/**
* Template name
* @type {string}
* @memberof TemplateDto
*/
name: string;
/**
* Variables available in template that can be replaced with values
* @type {Array<TemplateVariable>}
* @memberof TemplateDto
*/
variables: Array<TemplateVariable>;
/**
* Content of the template
* @type {string}
* @memberof TemplateDto
*/
content: string;
/**
* Created at time
* @type {Date}
* @memberof TemplateDto
*/
createdAt: Date;
}
export function TemplateDtoFromJSON(json: any): TemplateDto {
return TemplateDtoFromJSONTyped(json, false);
}
export function TemplateDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): TemplateDto {
if (json === undefined || json === null) {
return json;
}
return {
id: json['id'],
name: json['name'],
variables: (json['variables'] as Array<any>).map(TemplateVariableFromJSON),
content: json['content'],
createdAt: new Date(json['createdAt']),
};
}
export function TemplateDtoToJSON(value?: TemplateDto | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
name: value.name,
variables: (value.variables as Array<any>).map(TemplateVariableToJSON),
content: value.content,
createdAt: value.createdAt.toISOString(),
};
}
/* 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';
/**
*
* @export
* @interface SpellingIssue
*/
export interface SpellingIssue {
/**
*
* @type {string}
* @memberof SpellingIssue
*/
group: string;
/**
*
* @type {string}
* @memberof SpellingIssue
*/
suggestion: string;
/**
*
* @type {string}
* @memberof SpellingIssue
*/
severity: SpellingIssueSeverityEnum;
/**
*
* @type {string}
* @memberof SpellingIssue
*/
message: string;
}
/**
* @export
* @enum {string}
*/
export enum SpellingIssueSeverityEnum {
Warning = 'Warning',
Error = 'Error',
}
export function SpellingIssueFromJSON(json: any): SpellingIssue {
return SpellingIssueFromJSONTyped(json, false);
}
export function SpellingIssueFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): SpellingIssue {
if (json === undefined || json === null) {
return json;
}
return {
group: json['group'],
suggestion: json['suggestion'],
severity: json['severity'],
message: json['message'],
};
}
export function SpellingIssueToJSON(value?: SpellingIssue | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
group: value.group,
suggestion: value.suggestion,
severity: value.severity,
message: value.message,
};
}
/* 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';
/**
*
* @export
* @interface SortObject
*/
export interface SortObject {
/**
*
* @type {boolean}
* @memberof SortObject
*/
sorted?: boolean;
/**
*
* @type {boolean}
* @memberof SortObject
*/
unsorted?: boolean;
/**
*
* @type {boolean}
* @memberof SortObject
*/
empty?: boolean;
}
export function SortObjectFromJSON(json: any): SortObject {
return SortObjectFromJSONTyped(json, false);
}
export function SortObjectFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): SortObject {
if (json === undefined || json === null) {
return json;
}
return {
sorted: !exists(json, 'sorted') ? undefined : json['sorted'],
unsorted: !exists(json, 'unsorted') ? undefined : json['unsorted'],
empty: !exists(json, 'empty') ? undefined : json['empty'],
};
}
export function SortObjectToJSON(value?: SortObject | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
sorted: value.sorted,
unsorted: value.unsorted,
empty: value.empty,
};
}
/* 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';
/**
* Access details for inbox using SMTP
* @export
* @interface SmtpAccessDetails
*/
export interface SmtpAccessDetails {
/**
* Secure TLS SMTP server host domain
* @type {string}
* @memberof SmtpAccessDetails
*/
secureSmtpServerHost: string;
/**
* Secure TLS SMTP server host port
* @type {number}
* @memberof SmtpAccessDetails
*/
secureSmtpServerPort: number;
/**
* Secure TLS SMTP username for login
* @type {string}
* @memberof SmtpAccessDetails
*/
secureSmtpUsername: string;
/**
* Secure TLS SMTP password for login
* @type {string}
* @memberof SmtpAccessDetails
*/
secureSmtpPassword: string;
/**
* SMTP server host domain
* @type {string}
* @memberof SmtpAccessDetails
*/
smtpServerHost: string;
/**
* SMTP server host port
* @type {number}
* @memberof SmtpAccessDetails
*/
smtpServerPort: number;
/**
* SMTP username for login
* @type {string}
* @memberof SmtpAccessDetails
*/
smtpUsername: string;
/**
* SMTP password for login
* @type {string}
* @memberof SmtpAccessDetails
*/
smtpPassword: string;
/**
* Mail from domain or SMTP HELO value
* @type {string}
* @memberof SmtpAccessDetails
*/
mailFromDomain?: string | null;
}
export function SmtpAccessDetailsFromJSON(json: any): SmtpAccessDetails {
return SmtpAccessDetailsFromJSONTyped(json, false);
}
export function SmtpAccessDetailsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): SmtpAccessDetails {
if (json === undefined || json === null) {
return json;
}
return {
secureSmtpServerHost: json['secureSmtpServerHost'],
secureSmtpServerPort: json['secureSmtpServerPort'],
secureSmtpUsername: json['secureSmtpUsername'],
secureSmtpPassword: json['secureSmtpPassword'],
smtpServerHost: json['smtpServerHost'],
smtpServerPort: json['smtpServerPort'],
smtpUsername: json['smtpUsername'],
smtpPassword: json['smtpPassword'],
mailFromDomain: !exists(json, 'mailFromDomain')
? undefined
: json['mailFromDomain'],
};
}
export function SmtpAccessDetailsToJSON(value?: SmtpAccessDetails | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
secureSmtpServerHost: value.secureSmtpServerHost,
secureSmtpServerPort: value.secureSmtpServerPort,
secureSmtpUsername: value.secureSmtpUsername,
secureSmtpPassword: value.secureSmtpPassword,
smtpServerHost: value.smtpServerHost,
smtpServerPort: value.smtpServerPort,
smtpUsername: value.smtpUsername,
smtpPassword: value.smtpPassword,
mailFromDomain: value.mailFromDomain,
};
}
/* 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';
/**
*
* @export
* @interface SmsReplyOptions
*/
export interface SmsReplyOptions {
/**
*
* @type {string}
* @memberof SmsReplyOptions
*/
body: string;
}
export function SmsReplyOptionsFromJSON(json: any): SmsReplyOptions {
return SmsReplyOptionsFromJSONTyped(json, false);
}
export function SmsReplyOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): SmsReplyOptions {
if (json === undefined || json === null) {
return json;
}
return {
body: json['body'],
};
}
export function SmsReplyOptionsToJSON(value?: SmsReplyOptions | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
body: value.body,
};
}
/* 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';
/**
* SMS projection
* @export
* @interface SmsProjection
*/
export interface SmsProjection {
/**
*
* @type {string}
* @memberof SmsProjection
*/
body: string;
/**
*
* @type {Date}
* @memberof SmsProjection
*/
createdAt: Date;
/**
*
* @type {string}
* @memberof SmsProjection
*/
userId: string;
/**
*
* @type {string}
* @memberof SmsProjection
*/
phoneNumber: string;
/**
*
* @type {string}
* @memberof SmsProjection
*/
fromNumber: string;
/**
*
* @type {boolean}
* @memberof SmsProjection
*/
read: boolean;
/**
*
* @type {string}
* @memberof SmsProjection
*/
id: string;
}
export function SmsProjectionFromJSON(json: any): SmsProjection {
return SmsProjectionFromJSONTyped(json, false);
}
export function SmsProjectionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): SmsProjection {
if (json === undefined || json === null) {
return json;
}
return {
body: json['body'],
createdAt: new Date(json['createdAt']),
userId: json['userId'],
phoneNumber: json['phoneNumber'],
fromNumber: json['fromNumber'],
read: json['read'],
id: json['id'],
};
}
export function SmsProjectionToJSON(value?: SmsProjection | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
body: value.body,
createdAt: value.createdAt.toISOString(),
userId: value.userId,
phoneNumber: value.phoneNumber,
fromNumber: value.fromNumber,
read: value.read,
id: value.id,
};
}
/* 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';
/**
*
* @export
* @interface SmsPreview
*/
export interface SmsPreview {
/**
*
* @type {string}
* @memberof SmsPreview
*/
id: string;
/**
*
* @type {string}
* @memberof SmsPreview
*/
userId: string;
/**
*
* @type {string}
* @memberof SmsPreview
*/
body: string;
/**
*
* @type {string}
* @memberof SmsPreview
*/
phoneNumber: string;
/**
*
* @type {string}
* @memberof SmsPreview
*/
fromNumber: string;
/**
*
* @type {Date}
* @memberof SmsPreview
*/
createdAt: Date;
}
export function SmsPreviewFromJSON(json: any): SmsPreview {
return SmsPreviewFromJSONTyped(json, false);
}
export function SmsPreviewFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): SmsPreview {
if (json === undefined || json === null) {
return json;
}
return {
id: json['id'],
userId: json['userId'],
body: json['body'],
phoneNumber: json['phoneNumber'],
fromNumber: json['fromNumber'],
createdAt: new Date(json['createdAt']),
};
}
export function SmsPreviewToJSON(value?: SmsPreview | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
userId: value.userId,
body: value.body,
phoneNumber: value.phoneNumber,
fromNumber: value.fromNumber,
createdAt: value.createdAt.toISOString(),
};
}
/* 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 matching SMS messages in a phone number. Each match option object contains a `field`, `should` and `value` property. Together they form logical conditions such as `BODY` should `CONTAIN` value.
* @export
* @interface SmsMatchOption
*/
export interface SmsMatchOption {
/**
* Fields of an SMS object that can be used to filter results
* @type {string}
* @memberof SmsMatchOption
*/
field: SmsMatchOptionFieldEnum;
/**
* How the value of the email field specified should be compared to the value given in the match options.
* @type {string}
* @memberof SmsMatchOption
*/
should: SmsMatchOptionShouldEnum;
/**
* The value you wish to compare with the value of the field specified using the `should` value passed. For example `BODY` should `CONTAIN` a value passed.
* @type {string}
* @memberof SmsMatchOption
*/
value: string;
}
/**
* @export
* @enum {string}
*/
export enum SmsMatchOptionFieldEnum {
BODY = 'BODY',
FROM = 'FROM',
}
/**
* @export
* @enum {string}
*/
export enum SmsMatchOptionShouldEnum {
MATCH = 'MATCH',
CONTAIN = 'CONTAIN',
EQUAL = 'EQUAL',
}
export function SmsMatchOptionFromJSON(json: any): SmsMatchOption {
return SmsMatchOptionFromJSONTyped(json, false);
}
export function SmsMatchOptionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): SmsMatchOption {
if (json === undefined || json === null) {
return json;
}
return {
field: json['field'],
should: json['should'],
value: json['value'],
};
}
export function SmsMatchOptionToJSON(value?: SmsMatchOption | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
field: value.field,
should: value.should,
value: value.value,
};
}
/* 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';
/**
*
* @export
* @interface SmsDto
*/
export interface SmsDto {
/**
*
* @type {string}
* @memberof SmsDto
*/
id: string;
/**
*
* @type {string}
* @memberof SmsDto
*/
userId: string;
/**
*
* @type {string}
* @memberof SmsDto
*/
phoneNumber: string;
/**
*
* @type {string}
* @memberof SmsDto
*/
fromNumber: string;
/**
*
* @type {string}
* @memberof SmsDto
*/
body: string;
/**
*
* @type {boolean}
* @memberof SmsDto
*/
read: boolean;
/**
*
* @type {Date}
* @memberof SmsDto
*/
createdAt: Date;
/**
*
* @type {Date}
* @memberof SmsDto
*/
updatedAt: Date;
}
export function SmsDtoFromJSON(json: any): SmsDto {
return SmsDtoFromJSONTyped(json, false);
}
export function SmsDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): SmsDto {
if (json === undefined || json === null) {
return json;
}
return {
id: json['id'],
userId: json['userId'],
phoneNumber: json['phoneNumber'],
fromNumber: json['fromNumber'],
body: json['body'],
read: json['read'],
createdAt: new Date(json['createdAt']),
updatedAt: new Date(json['updatedAt']),
};
}
export function SmsDtoToJSON(value?: SmsDto | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
userId: value.userId,
phoneNumber: value.phoneNumber,
fromNumber: value.fromNumber,
body: value.body,
read: value.read,
createdAt: value.createdAt.toISOString(),
updatedAt: value.updatedAt.toISOString(),
};
}
/* 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';
/**
* Simplified send email options
* @export
* @interface SimpleSendEmailOptions
*/
export interface SimpleSendEmailOptions {
/**
* ID of inbox to send from. If null an inbox will be created for sending
* @type {string}
* @memberof SimpleSendEmailOptions
*/
senderId?: string | null;
/**
* Email address to send to
* @type {string}
* @memberof SimpleSendEmailOptions
*/
to: string;
/**
* Body of the email message. Supports HTML
* @type {string}
* @memberof SimpleSendEmailOptions
*/
body?: string | null;
/**
* Subject line of the email
* @type {string}
* @memberof SimpleSendEmailOptions
*/
subject?: string | null;
}
export function SimpleSendEmailOptionsFromJSON(
json: any
): SimpleSendEmailOptions {
return SimpleSendEmailOptionsFromJSONTyped(json, false);
}
export function SimpleSendEmailOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): SimpleSendEmailOptions {
if (json === undefined || json === null) {
return json;
}
return {
senderId: !exists(json, 'senderId') ? undefined : json['senderId'],
to: json['to'],
body: !exists(json, 'body') ? undefined : json['body'],
subject: !exists(json, 'subject') ? undefined : json['subject'],
};
}
export function SimpleSendEmailOptionsToJSON(
value?: SimpleSendEmailOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
senderId: value.senderId,
to: value.to,
body: value.body,
subject: value.subject,
};
}
/* 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 setting inbox favourite state
* @export
* @interface SetInboxFavouritedOptions
*/
export interface SetInboxFavouritedOptions {
/**
* Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering
* @type {boolean}
* @memberof SetInboxFavouritedOptions
*/
state: boolean;
}
export function SetInboxFavouritedOptionsFromJSON(
json: any
): SetInboxFavouritedOptions {
return SetInboxFavouritedOptionsFromJSONTyped(json, false);
}
export function SetInboxFavouritedOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): SetInboxFavouritedOptions {
if (json === undefined || json === null) {
return json;
}
return {
state: json['state'],
};
}
export function SetInboxFavouritedOptionsToJSON(
value?: SetInboxFavouritedOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
state: value.state,
};
}
/* 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';
/**
*
* @export
* @interface ServerEndpoints
*/
export interface ServerEndpoints {
/**
*
* @type {string}
* @memberof ServerEndpoints
*/
host: string;
/**
*
* @type {number}
* @memberof ServerEndpoints
*/
port: number;
/**
*
* @type {boolean}
* @memberof ServerEndpoints
*/
tls: boolean;
/**
*
* @type {Array<number>}
* @memberof ServerEndpoints
*/
altPorts: Array<number>;
}
export function ServerEndpointsFromJSON(json: any): ServerEndpoints {
return ServerEndpointsFromJSONTyped(json, false);
}
export function ServerEndpointsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ServerEndpoints {
if (json === undefined || json === null) {
return json;
}
return {
host: json['host'],
port: json['port'],
tls: json['tls'],
altPorts: json['altPorts'],
};
}
export function ServerEndpointsToJSON(value?: ServerEndpoints | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
host: value.host,
port: value.port,
tls: value.tls,
altPorts: value.altPorts,
};
}
/* 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';
/**
*
* @export
* @interface SentSmsDto
*/
export interface SentSmsDto {
/**
*
* @type {string}
* @memberof SentSmsDto
*/
id: string;
/**
*
* @type {string}
* @memberof SentSmsDto
*/
userId: string;
/**
*
* @type {string}
* @memberof SentSmsDto
*/
phoneNumber: string;
/**
*
* @type {string}
* @memberof SentSmsDto
*/
fromNumber: string;
/**
*
* @type {string}
* @memberof SentSmsDto
*/
toNumber: string;
/**
*
* @type {string}
* @memberof SentSmsDto
*/
body: string;
/**
*
* @type {string}
* @memberof SentSmsDto
*/
sid: string;
/**
*
* @type {string}
* @memberof SentSmsDto
*/
replyToSid: string;
/**
*
* @type {string}
* @memberof SentSmsDto
*/
replyToId: string;
/**
*
* @type {Date}
* @memberof SentSmsDto
*/
createdAt: Date;
/**
*
* @type {Date}
* @memberof SentSmsDto
*/
updatedAt: Date;
}
export function SentSmsDtoFromJSON(json: any): SentSmsDto {
return SentSmsDtoFromJSONTyped(json, false);
}
export function SentSmsDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): SentSmsDto {
if (json === undefined || json === null) {
return json;
}
return {
id: json['id'],
userId: json['userId'],
phoneNumber: json['phoneNumber'],
fromNumber: json['fromNumber'],
toNumber: json['toNumber'],
body: json['body'],
sid: json['sid'],
replyToSid: json['replyToSid'],
replyToId: json['replyToId'],
createdAt: new Date(json['createdAt']),
updatedAt: new Date(json['updatedAt']),
};
}
export function SentSmsDtoToJSON(value?: SentSmsDto | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
userId: value.userId,
phoneNumber: value.phoneNumber,
fromNumber: value.fromNumber,
toNumber: value.toNumber,
body: value.body,
sid: value.sid,
replyToSid: value.replyToSid,
replyToId: value.replyToId,
createdAt: value.createdAt.toISOString(),
updatedAt: value.updatedAt.toISOString(),
};
}
/* 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';
/**
*
* @export
* @interface SentEmailProjection
*/
export interface SentEmailProjection {
/**
*
* @type {Date}
* @memberof SentEmailProjection
*/
createdAt: Date;
/**
*
* @type {string}
* @memberof SentEmailProjection
*/
id: string;
/**
*
* @type {Array<string>}
* @memberof SentEmailProjection
*/
bcc: Array<string>;
/**
*
* @type {Array<string>}
* @memberof SentEmailProjection
*/
cc: Array<string>;
/**
*
* @type {boolean}
* @memberof SentEmailProjection
*/
virtualSend: boolean;
/**
*
* @type {string}
* @memberof SentEmailProjection
*/
from?: string;
/**
*
* @type {string}
* @memberof SentEmailProjection
*/
subject?: string;
/**
*
* @type {string}
* @memberof SentEmailProjection
*/
inboxId: string;
/**
*
* @type {string}
* @memberof SentEmailProjection
*/
userId: string;
/**
*
* @type {Array<string>}
* @memberof SentEmailProjection
*/
attachments: Array<string>;
/**
*
* @type {Array<string>}
* @memberof SentEmailProjection
*/
to: Array<string>;
/**
*
* @type {string}
* @memberof SentEmailProjection
*/
bodyMD5Hash?: string;
}
export function SentEmailProjectionFromJSON(json: any): SentEmailProjection {
return SentEmailProjectionFromJSONTyped(json, false);
}
export function SentEmailProjectionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): SentEmailProjection {
if (json === undefined || json === null) {
return json;
}
return {
createdAt: new Date(json['createdAt']),
id: json['id'],
bcc: json['bcc'],
cc: json['cc'],
virtualSend: json['virtualSend'],
from: !exists(json, 'from') ? undefined : json['from'],
subject: !exists(json, 'subject') ? undefined : json['subject'],
inboxId: json['inboxId'],
userId: json['userId'],
attachments: json['attachments'],
to: json['to'],
bodyMD5Hash: !exists(json, 'bodyMD5Hash') ? undefined : json['bodyMD5Hash'],
};
}
export function SentEmailProjectionToJSON(
value?: SentEmailProjection | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
createdAt: value.createdAt.toISOString(),
id: value.id,
bcc: value.bcc,
cc: value.cc,
virtualSend: value.virtualSend,
from: value.from,
subject: value.subject,
inboxId: value.inboxId,
userId: value.userId,
attachments: value.attachments,
to: value.to,
bodyMD5Hash: value.bodyMD5Hash,
};
}
/* 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';
/**
* Sent email details
* @export
* @interface SentEmailDto
*/
export interface SentEmailDto {
/**
* ID of sent email
* @type {string}
* @memberof SentEmailDto
*/
id: string;
/**
* User ID
* @type {string}
* @memberof SentEmailDto
*/
userId: string;
/**
* Inbox ID email was sent from
* @type {string}
* @memberof SentEmailDto
*/
inboxId: string;
/**
* Domain ID
* @type {string}
* @memberof SentEmailDto
*/
domainId?: string | null;
/**
* Recipients email was sent to
* @type {Array<string>}
* @memberof SentEmailDto
*/
to?: Array<string> | null;
/**
* Sent from address
* @type {string}
* @memberof SentEmailDto
*/
from?: string | null;
/**
*
* @type {string}
* @memberof SentEmailDto
*/
replyTo?: string | null;
/**
*
* @type {Array<string>}
* @memberof SentEmailDto
*/
cc?: Array<string> | null;
/**
*
* @type {Array<string>}
* @memberof SentEmailDto
*/
bcc?: Array<string> | null;
/**
* Array of IDs of attachments that were sent with this email
* @type {Array<string>}
* @memberof SentEmailDto
*/
attachments?: Array<string> | null;
/**
*
* @type {string}
* @memberof SentEmailDto
*/
subject?: string | null;
/**
* MD5 Hash
* @type {string}
* @memberof SentEmailDto
*/
bodyMD5Hash?: string | null;
/**
* Sent email body
* @type {string}
* @memberof SentEmailDto
*/
body?: string | null;
/**
*
* @type {Array<string>}
* @memberof SentEmailDto
*/
toContacts?: Array<string> | null;
/**
*
* @type {string}
* @memberof SentEmailDto
*/
toGroup?: string | null;
/**
*
* @type {string}
* @memberof SentEmailDto
*/
charset?: string | null;
/**
*
* @type {boolean}
* @memberof SentEmailDto
*/
isHTML?: boolean | null;
/**
*
* @type {Date}
* @memberof SentEmailDto
*/
sentAt: Date;
/**
*
* @type {Array<string>}
* @memberof SentEmailDto
*/
pixelIds?: Array<string> | null;
/**
*
* @type {string}
* @memberof SentEmailDto
*/
messageId?: string | null;
/**
*
* @type {Array<string>}
* @memberof SentEmailDto
*/
messageIds?: Array<string> | null;
/**
*
* @type {boolean}
* @memberof SentEmailDto
*/
virtualSend?: boolean | null;
/**
*
* @type {string}
* @memberof SentEmailDto
*/
templateId?: string | null;
/**
*
* @type {{ [key: string]: object; }}
* @memberof SentEmailDto
*/
templateVariables?: { [key: string]: object } | null;
/**
*
* @type {{ [key: string]: string; }}
* @memberof SentEmailDto
*/
headers?: { [key: string]: string } | null;
/**
*
* @type {boolean}
* @memberof SentEmailDto
*/
html?: boolean;
}
export function SentEmailDtoFromJSON(json: any): SentEmailDto {
return SentEmailDtoFromJSONTyped(json, false);
}
export function SentEmailDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): SentEmailDto {
if (json === undefined || json === null) {
return json;
}
return {
id: json['id'],
userId: json['userId'],
inboxId: json['inboxId'],
domainId: !exists(json, 'domainId') ? undefined : json['domainId'],
to: !exists(json, 'to') ? undefined : json['to'],
from: !exists(json, 'from') ? undefined : json['from'],
replyTo: !exists(json, 'replyTo') ? undefined : json['replyTo'],
cc: !exists(json, 'cc') ? undefined : json['cc'],
bcc: !exists(json, 'bcc') ? undefined : json['bcc'],
attachments: !exists(json, 'attachments') ? undefined : json['attachments'],
subject: !exists(json, 'subject') ? undefined : json['subject'],
bodyMD5Hash: !exists(json, 'bodyMD5Hash') ? undefined : json['bodyMD5Hash'],
body: !exists(json, 'body') ? undefined : json['body'],
toContacts: !exists(json, 'toContacts') ? undefined : json['toContacts'],
toGroup: !exists(json, 'toGroup') ? undefined : json['toGroup'],
charset: !exists(json, 'charset') ? undefined : json['charset'],
isHTML: !exists(json, 'isHTML') ? undefined : json['isHTML'],
sentAt: new Date(json['sentAt']),
pixelIds: !exists(json, 'pixelIds') ? undefined : json['pixelIds'],
messageId: !exists(json, 'messageId') ? undefined : json['messageId'],
messageIds: !exists(json, 'messageIds') ? undefined : json['messageIds'],
virtualSend: !exists(json, 'virtualSend') ? undefined : json['virtualSend'],
templateId: !exists(json, 'templateId') ? undefined : json['templateId'],
templateVariables: !exists(json, 'templateVariables')
? undefined
: json['templateVariables'],
headers: !exists(json, 'headers') ? undefined : json['headers'],
html: !exists(json, 'html') ? undefined : json['html'],
};
}
export function SentEmailDtoToJSON(value?: SentEmailDto | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
userId: value.userId,
inboxId: value.inboxId,
domainId: value.domainId,
to: value.to,
from: value.from,
replyTo: value.replyTo,
cc: value.cc,
bcc: value.bcc,
attachments: value.attachments,
subject: value.subject,
bodyMD5Hash: value.bodyMD5Hash,
body: value.body,
toContacts: value.toContacts,
toGroup: value.toGroup,
charset: value.charset,
isHTML: value.isHTML,
sentAt: value.sentAt.toISOString(),
pixelIds: value.pixelIds,
messageId: value.messageId,
messageIds: value.messageIds,
virtualSend: value.virtualSend,
templateId: value.templateId,
templateVariables: value.templateVariables,
headers: value.headers,
html: value.html,
};
}
/* 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';
/**
* Sender object containing from email address and from personal name if provided in address
* @export
* @interface Sender
*/
export interface Sender {
/**
*
* @type {string}
* @memberof Sender
*/
rawValue: string;
/**
*
* @type {string}
* @memberof Sender
*/
emailAddress: string;
/**
*
* @type {string}
* @memberof Sender
*/
name?: string;
}
export function SenderFromJSON(json: any): Sender {
return SenderFromJSONTyped(json, false);
}
export function SenderFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): Sender {
if (json === undefined || json === null) {
return json;
}
return {
rawValue: json['rawValue'],
emailAddress: json['emailAddress'],
name: !exists(json, 'name') ? undefined : json['name'],
};
}
export function SenderToJSON(value?: Sender | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
rawValue: value.rawValue,
emailAddress: value.emailAddress,
name: value.name,
};
}
/* 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';
/**
*
* @export
* @interface SendWithQueueResult
*/
export interface SendWithQueueResult {
/**
*
* @type {string}
* @memberof SendWithQueueResult
*/
id: string;
/**
*
* @type {string}
* @memberof SendWithQueueResult
*/
userId: string;
/**
*
* @type {string}
* @memberof SendWithQueueResult
*/
subject?: string;
/**
*
* @type {string}
* @memberof SendWithQueueResult
*/
inboxId?: string;
/**
*
* @type {string}
* @memberof SendWithQueueResult
*/
headerId: string;
/**
*
* @type {boolean}
* @memberof SendWithQueueResult
*/
delivered: boolean;
/**
*
* @type {string}
* @memberof SendWithQueueResult
*/
exceptionName?: string;
/**
*
* @type {string}
* @memberof SendWithQueueResult
*/
message?: string;
/**
*
* @type {Date}
* @memberof SendWithQueueResult
*/
createdAt: Date;
/**
*
* @type {Date}
* @memberof SendWithQueueResult
*/
updatedAt: Date;
}
export function SendWithQueueResultFromJSON(json: any): SendWithQueueResult {
return SendWithQueueResultFromJSONTyped(json, false);
}
export function SendWithQueueResultFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): SendWithQueueResult {
if (json === undefined || json === null) {
return json;
}
return {
id: json['id'],
userId: json['userId'],
subject: !exists(json, 'subject') ? undefined : json['subject'],
inboxId: !exists(json, 'inboxId') ? undefined : json['inboxId'],
headerId: json['headerId'],
delivered: json['delivered'],
exceptionName: !exists(json, 'exceptionName')
? undefined
: json['exceptionName'],
message: !exists(json, 'message') ? undefined : json['message'],
createdAt: new Date(json['createdAt']),
updatedAt: new Date(json['updatedAt']),
};
}
export function SendWithQueueResultToJSON(
value?: SendWithQueueResult | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
userId: value.userId,
subject: value.subject,
inboxId: value.inboxId,
headerId: value.headerId,
delivered: value.delivered,
exceptionName: value.exceptionName,
message: value.message,
createdAt: value.createdAt.toISOString(),
updatedAt: value.updatedAt.toISOString(),
};
}
/* 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 the email envelope
* @export
* @interface SendSMTPEnvelopeOptions
*/
export interface SendSMTPEnvelopeOptions {
/**
*
* @type {Array<string>}
* @memberof SendSMTPEnvelopeOptions
*/
rcptTo: Array<string>;
/**
*
* @type {string}
* @memberof SendSMTPEnvelopeOptions
*/
mailFrom: string;
/**
*
* @type {string}
* @memberof SendSMTPEnvelopeOptions
*/
data: string;
}
export function SendSMTPEnvelopeOptionsFromJSON(
json: any
): SendSMTPEnvelopeOptions {
return SendSMTPEnvelopeOptionsFromJSONTyped(json, false);
}
export function SendSMTPEnvelopeOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): SendSMTPEnvelopeOptions {
if (json === undefined || json === null) {
return json;
}
return {
rcptTo: json['rcptTo'],
mailFrom: json['mailFrom'],
data: json['data'],
};
}
export function SendSMTPEnvelopeOptionsToJSON(
value?: SendSMTPEnvelopeOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
rcptTo: value.rcptTo,
mailFrom: value.mailFrom,
data: value.data,
};
}
/* 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';
import {
SendEmailBodyPart,
SendEmailBodyPartFromJSON,
SendEmailBodyPartFromJSONTyped,
SendEmailBodyPartToJSON,
} from './';
/**
* Options for the email to be sent
* @export
* @interface SendEmailOptions
*/
export interface SendEmailOptions {
/**
* Optional list of contact IDs to send email to. Manage your contacts via the API or dashboard. When contacts are used the email is sent to each contact separately so they will not see other recipients.
* @type {Array<string>}
* @memberof SendEmailOptions
*/
toContacts?: Array<string> | null;
/**
* Optional contact group ID to send email to. You can create contacts and contact groups in the API or dashboard and use them for email campaigns. When contact groups are used the email is sent to each contact separately so they will not see other recipients
* @type {string}
* @memberof SendEmailOptions
*/
toGroup?: string | null;
/**
* List of destination email addresses. Each email address must be RFC 5322 format. Even single recipients must be in array form. Maximum recipients per email depends on your plan. If you need to send many emails try using contacts or contact groups or use a non standard sendStrategy to ensure that spam filters are not triggered (many recipients in one email can affect your spam rating). Be cautious when sending emails that your recipients exist. High bounce rates (meaning a high percentage of emails cannot be delivered because an address does not exist) can result in account freezing.
* @type {Array<string>}
* @memberof SendEmailOptions
*/
to?: Array<string> | null;
/**
* Optional from address. Email address is RFC 5322 format and may include a display name and email in angle brackets (`my@address.com` or `My inbox <my@address.com>`). If no sender is set the source inbox address will be used for this field. If you set `useInboxName` to `true` the from field will include the inbox name as a display name: `inbox_name <inbox@address.com>`. For this to work use the name field when creating an inbox. Beware of potential spam penalties when setting the from field to an address not used by the inbox. Your emails may get blocked by services if you impersonate another address. To use a custom email addresses use a custom domain. You can create domains with the DomainController. The domain must be verified in the dashboard before it can be used.
* @type {string}
* @memberof SendEmailOptions
*/
from?: string | null;
/**
* Optional list of cc destination email addresses
* @type {Array<string>}
* @memberof SendEmailOptions
*/
cc?: Array<string> | null;
/**
* Optional list of bcc destination email addresses
* @type {Array<string>}
* @memberof SendEmailOptions
*/
bcc?: Array<string> | null;
/**
* Optional email subject line
* @type {string}
* @memberof SendEmailOptions
*/
subject?: string | null;
/**
* Optional replyTo header
* @type {string}
* @memberof SendEmailOptions
*/
replyTo?: string | null;
/**
* Optional custom headers
* @type {{ [key: string]: string; }}
* @memberof SendEmailOptions
*/
customHeaders?: { [key: string]: string } | null;
/**
* Optional contents of email. If body contains HTML then set `isHTML` to true to ensure that email clients render it correctly. You can use moustache template syntax in the email body in conjunction with `toGroup` contact variables or `templateVariables` data. If you need more templating control consider creating a template and using the `template` property instead of the body.
* @type {string}
* @memberof SendEmailOptions
*/
body?: string | null;
/**
* Optional HTML flag to indicate that contents is HTML. Set's a `content-type: text/html` for email. (Deprecated: use `isHTML` instead.)
* @type {boolean}
* @memberof SendEmailOptions
*/
html?: boolean | null;
/**
* Optional HTML flag. If true the `content-type` of the email will be `text/html`. Set to true when sending HTML to ensure proper rending on email clients
* @type {boolean}
* @memberof SendEmailOptions
*/
isHTML?: boolean | null;
/**
* Optional charset
* @type {string}
* @memberof SendEmailOptions
*/
charset?: string | null;
/**
* Optional list of attachment IDs to send with this email. You must first upload each attachment separately via method call or dashboard in order to obtain attachment IDs. This way you can reuse attachments with different emails once uploaded. There are several ways to upload that support `multi-part form`, `base64 file encoding`, and octet stream binary uploads. See the `UploadController` for available methods.
* @type {Array<string>}
* @memberof SendEmailOptions
*/
attachments?: Array<string> | null;
/**
* Optional map of template variables. Will replace moustache syntax variables in subject and body or template with the associated values if found.
* @type {{ [key: string]: object; }}
* @memberof SendEmailOptions
*/
templateVariables?: { [key: string]: object } | null;
/**
* Optional template ID to use for body. Will override body if provided. When using a template make sure you pass the corresponding map of `templateVariables`. You can find which variables are needed by fetching the template itself or viewing it in the dashboard.
* @type {string}
* @memberof SendEmailOptions
*/
template?: string | null;
/**
* How an email should be sent based on its recipients
* @type {string}
* @memberof SendEmailOptions
*/
sendStrategy?: SendEmailOptionsSendStrategyEnum;
/**
* Use name of inbox as sender email address name. Will construct RFC 5322 email address with `Inbox name <inbox@address.com>` if the inbox has a name.
* @type {boolean}
* @memberof SendEmailOptions
*/
useInboxName?: boolean | null;
/**
* Add tracking pixel to email
* @type {boolean}
* @memberof SendEmailOptions
*/
addTrackingPixel?: boolean | null;
/**
* Filter recipients to remove any bounced recipients from to, bcc, and cc before sending
* @type {boolean}
* @memberof SendEmailOptions
*/
filterBouncedRecipients?: boolean | null;
/**
* Validate recipient email addresses before sending
* @type {string}
* @memberof SendEmailOptions
*/
validateEmailAddresses?: SendEmailOptionsValidateEmailAddressesEnum;
/**
* Ignore empty recipients after validation removes all recipients as invalid and fail silently
* @type {boolean}
* @memberof SendEmailOptions
*/
ignoreEmptyRecipients?: boolean | null;
/**
* Is content AMP4EMAIL compatible. If set will send as x-amp-html part.
* @type {boolean}
* @memberof SendEmailOptions
*/
isXAmpHtml?: boolean | null;
/**
* Email body content parts for multipart mime message. Will override body.
* @type {Array<SendEmailBodyPart>}
* @memberof SendEmailOptions
*/
bodyParts?: Array<SendEmailBodyPart> | null;
}
/**
* @export
* @enum {string}
*/
export enum SendEmailOptionsSendStrategyEnum {
SINGLE_MESSAGE = 'SINGLE_MESSAGE',
}
/**
* @export
* @enum {string}
*/
export enum SendEmailOptionsValidateEmailAddressesEnum {
VALIDATE_FILTER_REMOVE_INVALID = 'VALIDATE_FILTER_REMOVE_INVALID',
VALIDATE_ERROR_IF_INVALID = 'VALIDATE_ERROR_IF_INVALID',
NO_VALIDATION = 'NO_VALIDATION',
}
export function SendEmailOptionsFromJSON(json: any): SendEmailOptions {
return SendEmailOptionsFromJSONTyped(json, false);
}
export function SendEmailOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): SendEmailOptions {
if (json === undefined || json === null) {
return json;
}
return {
toContacts: !exists(json, 'toContacts') ? undefined : json['toContacts'],
toGroup: !exists(json, 'toGroup') ? undefined : json['toGroup'],
to: !exists(json, 'to') ? undefined : json['to'],
from: !exists(json, 'from') ? undefined : json['from'],
cc: !exists(json, 'cc') ? undefined : json['cc'],
bcc: !exists(json, 'bcc') ? undefined : json['bcc'],
subject: !exists(json, 'subject') ? undefined : json['subject'],
replyTo: !exists(json, 'replyTo') ? undefined : json['replyTo'],
customHeaders: !exists(json, 'customHeaders')
? undefined
: json['customHeaders'],
body: !exists(json, 'body') ? undefined : json['body'],
html: !exists(json, 'html') ? undefined : json['html'],
isHTML: !exists(json, 'isHTML') ? undefined : json['isHTML'],
charset: !exists(json, 'charset') ? undefined : json['charset'],
attachments: !exists(json, 'attachments') ? undefined : json['attachments'],
templateVariables: !exists(json, 'templateVariables')
? undefined
: json['templateVariables'],
template: !exists(json, 'template') ? undefined : json['template'],
sendStrategy: !exists(json, 'sendStrategy')
? undefined
: json['sendStrategy'],
useInboxName: !exists(json, 'useInboxName')
? undefined
: json['useInboxName'],
addTrackingPixel: !exists(json, 'addTrackingPixel')
? undefined
: json['addTrackingPixel'],
filterBouncedRecipients: !exists(json, 'filterBouncedRecipients')
? undefined
: json['filterBouncedRecipients'],
validateEmailAddresses: !exists(json, 'validateEmailAddresses')
? undefined
: json['validateEmailAddresses'],
ignoreEmptyRecipients: !exists(json, 'ignoreEmptyRecipients')
? undefined
: json['ignoreEmptyRecipients'],
isXAmpHtml: !exists(json, 'isXAmpHtml') ? undefined : json['isXAmpHtml'],
bodyParts: !exists(json, 'bodyParts')
? undefined
: json['bodyParts'] === null
? null
: (json['bodyParts'] as Array<any>).map(SendEmailBodyPartFromJSON),
};
}
export function SendEmailOptionsToJSON(value?: SendEmailOptions | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
toContacts: value.toContacts,
toGroup: value.toGroup,
to: value.to,
from: value.from,
cc: value.cc,
bcc: value.bcc,
subject: value.subject,
replyTo: value.replyTo,
customHeaders: value.customHeaders,
body: value.body,
html: value.html,
isHTML: value.isHTML,
charset: value.charset,
attachments: value.attachments,
templateVariables: value.templateVariables,
template: value.template,
sendStrategy: value.sendStrategy,
useInboxName: value.useInboxName,
addTrackingPixel: value.addTrackingPixel,
filterBouncedRecipients: value.filterBouncedRecipients,
validateEmailAddresses: value.validateEmailAddresses,
ignoreEmptyRecipients: value.ignoreEmptyRecipients,
isXAmpHtml: value.isXAmpHtml,
bodyParts:
value.bodyParts === undefined
? undefined
: value.bodyParts === null
? null
: (value.bodyParts as Array<any>).map(SendEmailBodyPartToJSON),
};
}
/* 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';
/**
* Email body content parts for multipart mime message. Will override body.
* @export
* @interface SendEmailBodyPart
*/
export interface SendEmailBodyPart {
/**
*
* @type {string}
* @memberof SendEmailBodyPart
*/
contentType: string;
/**
*
* @type {string}
* @memberof SendEmailBodyPart
*/
contentBody: string;
}
export function SendEmailBodyPartFromJSON(json: any): SendEmailBodyPart {
return SendEmailBodyPartFromJSONTyped(json, false);
}
export function SendEmailBodyPartFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): SendEmailBodyPart {
if (json === undefined || json === null) {
return json;
}
return {
contentType: json['contentType'],
contentBody: json['contentBody'],
};
}
export function SendEmailBodyPartToJSON(value?: SendEmailBodyPart | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
contentType: value.contentType,
contentBody: value.contentBody,
};
}
/* 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';
/**
*
* @export
* @interface SearchInboxesOptions
*/
export interface SearchInboxesOptions {
/**
* Optional page index in list pagination
* @type {number}
* @memberof SearchInboxesOptions
*/
pageIndex?: number | null;
/**
* Optional page size in list pagination
* @type {number}
* @memberof SearchInboxesOptions
*/
pageSize?: number | null;
/**
* Optional createdAt sort direction ASC or DESC
* @type {string}
* @memberof SearchInboxesOptions
*/
sortDirection?: SearchInboxesOptionsSortDirectionEnum;
/**
* Optionally filter results for favourites only
* @type {boolean}
* @memberof SearchInboxesOptions
*/
favourite?: boolean | null;
/**
* Optionally filter by search words partial matching ID, tags, name, and email address
* @type {string}
* @memberof SearchInboxesOptions
*/
search?: string | null;
/**
* Optionally filter by tags. Will return inboxes that include given tags
* @type {string}
* @memberof SearchInboxesOptions
*/
tag?: string | null;
/**
* Optional filter by created after given date time
* @type {Date}
* @memberof SearchInboxesOptions
*/
since?: Date | null;
/**
* Optional filter by created before given date time
* @type {Date}
* @memberof SearchInboxesOptions
*/
before?: Date | null;
/**
* Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send).
* @type {string}
* @memberof SearchInboxesOptions
*/
inboxType?: SearchInboxesOptionsInboxTypeEnum;
/**
* Optional filter by inbox function
* @type {string}
* @memberof SearchInboxesOptions
*/
inboxFunction?: SearchInboxesOptionsInboxFunctionEnum;
/**
* Optional domain ID filter
* @type {string}
* @memberof SearchInboxesOptions
*/
domainId?: string | null;
}
/**
* @export
* @enum {string}
*/
export enum SearchInboxesOptionsSortDirectionEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum SearchInboxesOptionsInboxTypeEnum {
HTTP_INBOX = 'HTTP_INBOX',
SMTP_INBOX = 'SMTP_INBOX',
}
/**
* @export
* @enum {string}
*/
export enum SearchInboxesOptionsInboxFunctionEnum {
ALIAS = 'ALIAS',
THREAD = 'THREAD',
CATCH_ALL = 'CATCH_ALL',
CONNECTOR = 'CONNECTOR',
}
export function SearchInboxesOptionsFromJSON(json: any): SearchInboxesOptions {
return SearchInboxesOptionsFromJSONTyped(json, false);
}
export function SearchInboxesOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): SearchInboxesOptions {
if (json === undefined || json === null) {
return json;
}
return {
pageIndex: !exists(json, 'pageIndex') ? undefined : json['pageIndex'],
pageSize: !exists(json, 'pageSize') ? undefined : json['pageSize'],
sortDirection: !exists(json, 'sortDirection')
? undefined
: json['sortDirection'],
favourite: !exists(json, 'favourite') ? undefined : json['favourite'],
search: !exists(json, 'search') ? undefined : json['search'],
tag: !exists(json, 'tag') ? undefined : json['tag'],
since: !exists(json, 'since')
? undefined
: json['since'] === null
? null
: new Date(json['since']),
before: !exists(json, 'before')
? undefined
: json['before'] === null
? null
: new Date(json['before']),
inboxType: !exists(json, 'inboxType') ? undefined : json['inboxType'],
inboxFunction: !exists(json, 'inboxFunction')
? undefined
: json['inboxFunction'],
domainId: !exists(json, 'domainId') ? undefined : json['domainId'],
};
}
export function SearchInboxesOptionsToJSON(
value?: SearchInboxesOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
pageIndex: value.pageIndex,
pageSize: value.pageSize,
sortDirection: value.sortDirection,
favourite: value.favourite,
search: value.search,
tag: value.tag,
since:
value.since === undefined
? undefined
: value.since === null
? null
: value.since.toISOString(),
before:
value.before === undefined
? undefined
: value.before === null
? null
: value.before.toISOString(),
inboxType: value.inboxType,
inboxFunction: value.inboxFunction,
domainId: value.domainId,
};
}
/* 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';
/**
*
* @export
* @interface SearchEmailsOptions
*/
export interface SearchEmailsOptions {
/**
* Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account.
* @type {Array<string>}
* @memberof SearchEmailsOptions
*/
inboxIds?: Array<string>;
/**
* Optional page index in email list pagination
* @type {number}
* @memberof SearchEmailsOptions
*/
pageIndex?: number;
/**
* Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results
* @type {number}
* @memberof SearchEmailsOptions
*/
pageSize?: number;
/**
* Optional createdAt sort direction ASC or DESC
* @type {string}
* @memberof SearchEmailsOptions
*/
sortDirection?: SearchEmailsOptionsSortDirectionEnum;
/**
* Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly
* @type {boolean}
* @memberof SearchEmailsOptions
*/
unreadOnly?: boolean;
/**
* Optional search filter. Searches email recipients, sender, subject, email address and ID. Does not search email body
* @type {string}
* @memberof SearchEmailsOptions
*/
searchFilter?: string;
/**
* Optional filter emails received after given date time
* @type {Date}
* @memberof SearchEmailsOptions
*/
since?: Date;
/**
* Optional filter emails received before given date time
* @type {Date}
* @memberof SearchEmailsOptions
*/
before?: Date;
}
/**
* @export
* @enum {string}
*/
export enum SearchEmailsOptionsSortDirectionEnum {
ASC = 'ASC',
DESC = 'DESC',
}
export function SearchEmailsOptionsFromJSON(json: any): SearchEmailsOptions {
return SearchEmailsOptionsFromJSONTyped(json, false);
}
export function SearchEmailsOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): SearchEmailsOptions {
if (json === undefined || json === null) {
return json;
}
return {
inboxIds: !exists(json, 'inboxIds') ? undefined : json['inboxIds'],
pageIndex: !exists(json, 'pageIndex') ? undefined : json['pageIndex'],
pageSize: !exists(json, 'pageSize') ? undefined : json['pageSize'],
sortDirection: !exists(json, 'sortDirection')
? undefined
: json['sortDirection'],
unreadOnly: !exists(json, 'unreadOnly') ? undefined : json['unreadOnly'],
searchFilter: !exists(json, 'searchFilter')
? undefined
: json['searchFilter'],
since: !exists(json, 'since') ? undefined : new Date(json['since']),
before: !exists(json, 'before') ? undefined : new Date(json['before']),
};
}
export function SearchEmailsOptionsToJSON(
value?: SearchEmailsOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
inboxIds: value.inboxIds,
pageIndex: value.pageIndex,
pageSize: value.pageSize,
sortDirection: value.sortDirection,
unreadOnly: value.unreadOnly,
searchFilter: value.searchFilter,
since: value.since === undefined ? undefined : value.since.toISOString(),
before: value.before === undefined ? undefined : value.before.toISOString(),
};
}
/* 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';
/**
*
* @export
* @interface ScheduledJobDto
*/
export interface ScheduledJobDto {
/**
*
* @type {string}
* @memberof ScheduledJobDto
*/
id: string;
/**
*
* @type {string}
* @memberof ScheduledJobDto
*/
userId: string;
/**
*
* @type {string}
* @memberof ScheduledJobDto
*/
inboxId: string;
/**
*
* @type {string}
* @memberof ScheduledJobDto
*/
jobId: string;
/**
*
* @type {string}
* @memberof ScheduledJobDto
*/
groupId: string;
/**
*
* @type {string}
* @memberof ScheduledJobDto
*/
triggerId: string;
/**
*
* @type {string}
* @memberof ScheduledJobDto
*/
status: ScheduledJobDtoStatusEnum;
/**
*
* @type {Date}
* @memberof ScheduledJobDto
*/
sendAtTimestamp: Date;
/**
*
* @type {Date}
* @memberof ScheduledJobDto
*/
createdAt: Date;
/**
*
* @type {Date}
* @memberof ScheduledJobDto
*/
updatedAt: Date;
}
/**
* @export
* @enum {string}
*/
export enum ScheduledJobDtoStatusEnum {
SUBMITTED = 'SUBMITTED',
COMPLETED = 'COMPLETED',
ABORTED = 'ABORTED',
FAILED = 'FAILED',
CANCELLED = 'CANCELLED',
}
export function ScheduledJobDtoFromJSON(json: any): ScheduledJobDto {
return ScheduledJobDtoFromJSONTyped(json, false);
}
export function ScheduledJobDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ScheduledJobDto {
if (json === undefined || json === null) {
return json;
}
return {
id: json['id'],
userId: json['userId'],
inboxId: json['inboxId'],
jobId: json['jobId'],
groupId: json['groupId'],
triggerId: json['triggerId'],
status: json['status'],
sendAtTimestamp: new Date(json['sendAtTimestamp']),
createdAt: new Date(json['createdAt']),
updatedAt: new Date(json['updatedAt']),
};
}
export function ScheduledJobDtoToJSON(value?: ScheduledJobDto | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
userId: value.userId,
inboxId: value.inboxId,
jobId: value.jobId,
groupId: value.groupId,
triggerId: value.triggerId,
status: value.status,
sendAtTimestamp: value.sendAtTimestamp.toISOString(),
createdAt: value.createdAt.toISOString(),
updatedAt: value.updatedAt.toISOString(),
};
}
/* 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';
/**
*
* @export
* @interface ScheduledJob
*/
export interface ScheduledJob {
/**
*
* @type {string}
* @memberof ScheduledJob
*/
id: string;
/**
*
* @type {string}
* @memberof ScheduledJob
*/
userId: string;
/**
*
* @type {string}
* @memberof ScheduledJob
*/
inboxId: string;
/**
*
* @type {string}
* @memberof ScheduledJob
*/
jobId: string;
/**
*
* @type {string}
* @memberof ScheduledJob
*/
groupId: string;
/**
*
* @type {string}
* @memberof ScheduledJob
*/
triggerId: string;
/**
*
* @type {string}
* @memberof ScheduledJob
*/
status: ScheduledJobStatusEnum;
/**
*
* @type {Date}
* @memberof ScheduledJob
*/
sendAtTimestamp: Date;
/**
*
* @type {Date}
* @memberof ScheduledJob
*/
createdAt: Date;
/**
*
* @type {Date}
* @memberof ScheduledJob
*/
updatedAt: Date;
}
/**
* @export
* @enum {string}
*/
export enum ScheduledJobStatusEnum {
SUBMITTED = 'SUBMITTED',
COMPLETED = 'COMPLETED',
ABORTED = 'ABORTED',
FAILED = 'FAILED',
CANCELLED = 'CANCELLED',
}
export function ScheduledJobFromJSON(json: any): ScheduledJob {
return ScheduledJobFromJSONTyped(json, false);
}
export function ScheduledJobFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ScheduledJob {
if (json === undefined || json === null) {
return json;
}
return {
id: json['id'],
userId: json['userId'],
inboxId: json['inboxId'],
jobId: json['jobId'],
groupId: json['groupId'],
triggerId: json['triggerId'],
status: json['status'],
sendAtTimestamp: new Date(json['sendAtTimestamp']),
createdAt: new Date(json['createdAt']),
updatedAt: new Date(json['updatedAt']),
};
}
export function ScheduledJobToJSON(value?: ScheduledJob | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
userId: value.userId,
inboxId: value.inboxId,
jobId: value.jobId,
groupId: value.groupId,
triggerId: value.triggerId,
status: value.status,
sendAtTimestamp: value.sendAtTimestamp.toISOString(),
createdAt: value.createdAt.toISOString(),
updatedAt: value.updatedAt.toISOString(),
};
}
/* 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 replying to email with API
* @export
* @interface ReplyToEmailOptions
*/
export interface ReplyToEmailOptions {
/**
* Body of the reply email you want to send
* @type {string}
* @memberof ReplyToEmailOptions
*/
body: string;
/**
* Is the reply HTML
* @type {boolean}
* @memberof ReplyToEmailOptions
*/
isHTML: boolean;
/**
* The from header that should be used. Optional
* @type {string}
* @memberof ReplyToEmailOptions
*/
from?: string | null;
/**
* The replyTo header that should be used. Optional
* @type {string}
* @memberof ReplyToEmailOptions
*/
replyTo?: string | null;
/**
* Optional custom headers
* @type {{ [key: string]: string; }}
* @memberof ReplyToEmailOptions
*/
customHeaders?: { [key: string]: string } | null;
/**
* The charset that your message should be sent with. Optional. Default is UTF-8
* @type {string}
* @memberof ReplyToEmailOptions
*/
charset?: string | null;
/**
* List of uploaded attachments to send with the reply. Optional.
* @type {Array<string>}
* @memberof ReplyToEmailOptions
*/
attachments?: Array<string> | null;
/**
* Template variables if using a template
* @type {{ [key: string]: object; }}
* @memberof ReplyToEmailOptions
*/
templateVariables?: { [key: string]: object } | null;
/**
* Template ID to use instead of body. Will use template variable map to fill defined variable slots.
* @type {string}
* @memberof ReplyToEmailOptions
*/
template?: string | null;
/**
* How an email should be sent based on its recipients
* @type {string}
* @memberof ReplyToEmailOptions
*/
sendStrategy?: ReplyToEmailOptionsSendStrategyEnum;
/**
* Optionally use inbox name as display name for sender email address
* @type {boolean}
* @memberof ReplyToEmailOptions
*/
useInboxName?: boolean | null;
/**
*
* @type {boolean}
* @memberof ReplyToEmailOptions
*/
html?: boolean;
}
/**
* @export
* @enum {string}
*/
export enum ReplyToEmailOptionsSendStrategyEnum {
SINGLE_MESSAGE = 'SINGLE_MESSAGE',
}
export function ReplyToEmailOptionsFromJSON(json: any): ReplyToEmailOptions {
return ReplyToEmailOptionsFromJSONTyped(json, false);
}
export function ReplyToEmailOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ReplyToEmailOptions {
if (json === undefined || json === null) {
return json;
}
return {
body: json['body'],
isHTML: json['isHTML'],
from: !exists(json, 'from') ? undefined : json['from'],
replyTo: !exists(json, 'replyTo') ? undefined : json['replyTo'],
customHeaders: !exists(json, 'customHeaders')
? undefined
: json['customHeaders'],
charset: !exists(json, 'charset') ? undefined : json['charset'],
attachments: !exists(json, 'attachments') ? undefined : json['attachments'],
templateVariables: !exists(json, 'templateVariables')
? undefined
: json['templateVariables'],
template: !exists(json, 'template') ? undefined : json['template'],
sendStrategy: !exists(json, 'sendStrategy')
? undefined
: json['sendStrategy'],
useInboxName: !exists(json, 'useInboxName')
? undefined
: json['useInboxName'],
html: !exists(json, 'html') ? undefined : json['html'],
};
}
export function ReplyToEmailOptionsToJSON(
value?: ReplyToEmailOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
body: value.body,
isHTML: value.isHTML,
from: value.from,
replyTo: value.replyTo,
customHeaders: value.customHeaders,
charset: value.charset,
attachments: value.attachments,
templateVariables: value.templateVariables,
template: value.template,
sendStrategy: value.sendStrategy,
useInboxName: value.useInboxName,
html: value.html,
};
}
/* 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 replying to an alias email using the alias inbox
* @export
* @interface ReplyToAliasEmailOptions
*/
export interface ReplyToAliasEmailOptions {
/**
* Body of the reply email you want to send
* @type {string}
* @memberof ReplyToAliasEmailOptions
*/
body: string;
/**
* Is the reply HTML
* @type {boolean}
* @memberof ReplyToAliasEmailOptions
*/
isHTML: boolean;
/**
* The charset that your message should be sent with. Optional. Default is UTF-8
* @type {string}
* @memberof ReplyToAliasEmailOptions
*/
charset?: string | null;
/**
* List of uploaded attachments to send with the reply. Optional.
* @type {Array<string>}
* @memberof ReplyToAliasEmailOptions
*/
attachments?: Array<string> | null;
/**
* Template variables if using a template
* @type {{ [key: string]: object; }}
* @memberof ReplyToAliasEmailOptions
*/
templateVariables?: { [key: string]: object } | null;
/**
* Template ID to use instead of body. Will use template variable map to fill defined variable slots.
* @type {string}
* @memberof ReplyToAliasEmailOptions
*/
template?: string | null;
/**
* How an email should be sent based on its recipients
* @type {string}
* @memberof ReplyToAliasEmailOptions
*/
sendStrategy?: ReplyToAliasEmailOptionsSendStrategyEnum;
/**
* Optional custom headers
* @type {{ [key: string]: string; }}
* @memberof ReplyToAliasEmailOptions
*/
customHeaders?: { [key: string]: string } | null;
/**
* Optionally use inbox name as display name for sender email address
* @type {boolean}
* @memberof ReplyToAliasEmailOptions
*/
useInboxName?: boolean | null;
/**
*
* @type {boolean}
* @memberof ReplyToAliasEmailOptions
*/
html?: boolean;
}
/**
* @export
* @enum {string}
*/
export enum ReplyToAliasEmailOptionsSendStrategyEnum {
SINGLE_MESSAGE = 'SINGLE_MESSAGE',
}
export function ReplyToAliasEmailOptionsFromJSON(
json: any
): ReplyToAliasEmailOptions {
return ReplyToAliasEmailOptionsFromJSONTyped(json, false);
}
export function ReplyToAliasEmailOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ReplyToAliasEmailOptions {
if (json === undefined || json === null) {
return json;
}
return {
body: json['body'],
isHTML: json['isHTML'],
charset: !exists(json, 'charset') ? undefined : json['charset'],
attachments: !exists(json, 'attachments') ? undefined : json['attachments'],
templateVariables: !exists(json, 'templateVariables')
? undefined
: json['templateVariables'],
template: !exists(json, 'template') ? undefined : json['template'],
sendStrategy: !exists(json, 'sendStrategy')
? undefined
: json['sendStrategy'],
customHeaders: !exists(json, 'customHeaders')
? undefined
: json['customHeaders'],
useInboxName: !exists(json, 'useInboxName')
? undefined
: json['useInboxName'],
html: !exists(json, 'html') ? undefined : json['html'],
};
}
export function ReplyToAliasEmailOptionsToJSON(
value?: ReplyToAliasEmailOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
body: value.body,
isHTML: value.isHTML,
charset: value.charset,
attachments: value.attachments,
templateVariables: value.templateVariables,
template: value.template,
sendStrategy: value.sendStrategy,
customHeaders: value.customHeaders,
useInboxName: value.useInboxName,
html: value.html,
};
}
/* 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';
import {
SentSmsDto,
SentSmsDtoFromJSON,
SentSmsDtoFromJSONTyped,
SentSmsDtoToJSON,
} from './';
/**
*
* @export
* @interface ReplyForSms
*/
export interface ReplyForSms {
/**
*
* @type {SentSmsDto}
* @memberof ReplyForSms
*/
reply?: SentSmsDto;
}
export function ReplyForSmsFromJSON(json: any): ReplyForSms {
return ReplyForSmsFromJSONTyped(json, false);
}
export function ReplyForSmsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ReplyForSms {
if (json === undefined || json === null) {
return json;
}
return {
reply: !exists(json, 'reply')
? undefined
: SentSmsDtoFromJSON(json['reply']),
};
}
export function ReplyForSmsToJSON(value?: ReplyForSms | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
reply: SentSmsDtoToJSON(value.reply),
};
}
/* 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';
/**
* Email recipient
* @export
* @interface Recipient
*/
export interface Recipient {
/**
*
* @type {string}
* @memberof Recipient
*/
rawValue: string;
/**
*
* @type {string}
* @memberof Recipient
*/
emailAddress: string;
/**
*
* @type {string}
* @memberof Recipient
*/
name?: string | null;
}
export function RecipientFromJSON(json: any): Recipient {
return RecipientFromJSONTyped(json, false);
}
export function RecipientFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): Recipient {
if (json === undefined || json === null) {
return json;
}
return {
rawValue: json['rawValue'],
emailAddress: json['emailAddress'],
name: !exists(json, 'name') ? undefined : json['name'],
};
}
export function RecipientToJSON(value?: Recipient | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
rawValue: value.rawValue,
emailAddress: value.emailAddress,
name: value.name,
};
}
/* 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';
/**
* Content in raw format
* @export
* @interface RawEmailJson
*/
export interface RawEmailJson {
/**
*
* @type {string}
* @memberof RawEmailJson
*/
content: string;
}
export function RawEmailJsonFromJSON(json: any): RawEmailJson {
return RawEmailJsonFromJSONTyped(json, false);
}
export function RawEmailJsonFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): RawEmailJson {
if (json === undefined || json === null) {
return json;
}
return {
content: json['content'],
};
}
export function RawEmailJsonToJSON(value?: RawEmailJson | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
content: value.content,
};
}
/* 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';
/**
*
* @export
* @interface PhonePlanDto
*/
export interface PhonePlanDto {
/**
*
* @type {string}
* @memberof PhonePlanDto
*/
id: string;
/**
*
* @type {string}
* @memberof PhonePlanDto
*/
userId: string;
/**
*
* @type {string}
* @memberof PhonePlanDto
*/
phoneCountry: PhonePlanDtoPhoneCountryEnum;
/**
*
* @type {Date}
* @memberof PhonePlanDto
*/
createdAt: Date;
}
/**
* @export
* @enum {string}
*/
export enum PhonePlanDtoPhoneCountryEnum {
US = 'US',
GB = 'GB',
AU = 'AU',
}
export function PhonePlanDtoFromJSON(json: any): PhonePlanDto {
return PhonePlanDtoFromJSONTyped(json, false);
}
export function PhonePlanDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): PhonePlanDto {
if (json === undefined || json === null) {
return json;
}
return {
id: json['id'],
userId: json['userId'],
phoneCountry: json['phoneCountry'],
createdAt: new Date(json['createdAt']),
};
}
export function PhonePlanDtoToJSON(value?: PhonePlanDto | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
userId: value.userId,
phoneCountry: value.phoneCountry,
createdAt: value.createdAt.toISOString(),
};
}
/* 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';
/**
* Phone number projection
* @export
* @interface PhoneNumberProjection
*/
export interface PhoneNumberProjection {
/**
*
* @type {Date}
* @memberof PhoneNumberProjection
*/
createdAt: Date;
/**
*
* @type {string}
* @memberof PhoneNumberProjection
*/
userId: string;
/**
*
* @type {string}
* @memberof PhoneNumberProjection
*/
phoneNumber: string;
/**
*
* @type {string}
* @memberof PhoneNumberProjection
*/
phoneCountry: PhoneNumberProjectionPhoneCountryEnum;
/**
*
* @type {string}
* @memberof PhoneNumberProjection
*/
id: string;
}
/**
* @export
* @enum {string}
*/
export enum PhoneNumberProjectionPhoneCountryEnum {
US = 'US',
GB = 'GB',
AU = 'AU',
}
export function PhoneNumberProjectionFromJSON(
json: any
): PhoneNumberProjection {
return PhoneNumberProjectionFromJSONTyped(json, false);
}
export function PhoneNumberProjectionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): PhoneNumberProjection {
if (json === undefined || json === null) {
return json;
}
return {
createdAt: new Date(json['createdAt']),
userId: json['userId'],
phoneNumber: json['phoneNumber'],
phoneCountry: json['phoneCountry'],
id: json['id'],
};
}
export function PhoneNumberProjectionToJSON(
value?: PhoneNumberProjection | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
createdAt: value.createdAt.toISOString(),
userId: value.userId,
phoneNumber: value.phoneNumber,
phoneCountry: value.phoneCountry,
id: value.id,
};
}
/* 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';
/**
*
* @export
* @interface PhoneNumberDto
*/
export interface PhoneNumberDto {
/**
*
* @type {string}
* @memberof PhoneNumberDto
*/
id: string;
/**
*
* @type {string}
* @memberof PhoneNumberDto
*/
userId: string;
/**
*
* @type {string}
* @memberof PhoneNumberDto
*/
complianceAddress?: string;
/**
*
* @type {string}
* @memberof PhoneNumberDto
*/
emergencyAddress?: string;
/**
*
* @type {string}
* @memberof PhoneNumberDto
*/
phoneNumber: string;
/**
*
* @type {string}
* @memberof PhoneNumberDto
*/
phoneCountry: PhoneNumberDtoPhoneCountryEnum;
/**
*
* @type {string}
* @memberof PhoneNumberDto
*/
phonePlan: string;
/**
*
* @type {Date}
* @memberof PhoneNumberDto
*/
createdAt: Date;
/**
*
* @type {Date}
* @memberof PhoneNumberDto
*/
updatedAt: Date;
}
/**
* @export
* @enum {string}
*/
export enum PhoneNumberDtoPhoneCountryEnum {
US = 'US',
GB = 'GB',
AU = 'AU',
}
export function PhoneNumberDtoFromJSON(json: any): PhoneNumberDto {
return PhoneNumberDtoFromJSONTyped(json, false);
}
export function PhoneNumberDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): PhoneNumberDto {
if (json === undefined || json === null) {
return json;
}
return {
id: json['id'],
userId: json['userId'],
complianceAddress: !exists(json, 'complianceAddress')
? undefined
: json['complianceAddress'],
emergencyAddress: !exists(json, 'emergencyAddress')
? undefined
: json['emergencyAddress'],
phoneNumber: json['phoneNumber'],
phoneCountry: json['phoneCountry'],
phonePlan: json['phonePlan'],
createdAt: new Date(json['createdAt']),
updatedAt: new Date(json['updatedAt']),
};
}
export function PhoneNumberDtoToJSON(value?: PhoneNumberDto | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
userId: value.userId,
complianceAddress: value.complianceAddress,
emergencyAddress: value.emergencyAddress,
phoneNumber: value.phoneNumber,
phoneCountry: value.phoneCountry,
phonePlan: value.phonePlan,
createdAt: value.createdAt.toISOString(),
updatedAt: value.updatedAt.toISOString(),
};
}
/* 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';
import {
SortObject,
SortObjectFromJSON,
SortObjectFromJSONTyped,
SortObjectToJSON,
} from './';
/**
*
* @export
* @interface PageableObject
*/
export interface PageableObject {
/**
*
* @type {number}
* @memberof PageableObject
*/
pageNumber?: number;
/**
*
* @type {number}
* @memberof PageableObject
*/
pageSize?: number;
/**
*
* @type {boolean}
* @memberof PageableObject
*/
paged?: boolean;
/**
*
* @type {boolean}
* @memberof PageableObject
*/
unpaged?: boolean;
/**
*
* @type {number}
* @memberof PageableObject
*/
offset?: number;
/**
*
* @type {SortObject}
* @memberof PageableObject
*/
sort?: SortObject;
}
export function PageableObjectFromJSON(json: any): PageableObject {
return PageableObjectFromJSONTyped(json, false);
}
export function PageableObjectFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): PageableObject {
if (json === undefined || json === null) {
return json;
}
return {
pageNumber: !exists(json, 'pageNumber') ? undefined : json['pageNumber'],
pageSize: !exists(json, 'pageSize') ? undefined : json['pageSize'],
paged: !exists(json, 'paged') ? undefined : json['paged'],
unpaged: !exists(json, 'unpaged') ? undefined : json['unpaged'],
offset: !exists(json, 'offset') ? undefined : json['offset'],
sort: !exists(json, 'sort') ? undefined : SortObjectFromJSON(json['sort']),
};
}
export function PageableObjectToJSON(value?: PageableObject | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
pageNumber: value.pageNumber,
pageSize: value.pageSize,
paged: value.paged,
unpaged: value.unpaged,
offset: value.offset,
sort: SortObjectToJSON(value.sort),
};
}
/* 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';
import {
PageableObject,
PageableObjectFromJSON,
PageableObjectFromJSONTyped,
PageableObjectToJSON,
SortObject,
SortObjectFromJSON,
SortObjectFromJSONTyped,
SortObjectToJSON,
WebhookResultDto,
WebhookResultDtoFromJSON,
WebhookResultDtoFromJSONTyped,
WebhookResultDtoToJSON,
} from './';
/**
* Paginated webhook results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls.
* @export
* @interface PageWebhookResult
*/
export interface PageWebhookResult {
/**
*
* @type {Array<WebhookResultDto>}
* @memberof PageWebhookResult
*/
content?: Array<WebhookResultDto>;
/**
*
* @type {PageableObject}
* @memberof PageWebhookResult
*/
pageable?: PageableObject;
/**
*
* @type {number}
* @memberof PageWebhookResult
*/
totalPages: number;
/**
*
* @type {number}
* @memberof PageWebhookResult
*/
totalElements: number;
/**
*
* @type {boolean}
* @memberof PageWebhookResult
*/
last?: boolean;
/**
*
* @type {number}
* @memberof PageWebhookResult
*/
numberOfElements?: number;
/**
*
* @type {boolean}
* @memberof PageWebhookResult
*/
first?: boolean;
/**
*
* @type {number}
* @memberof PageWebhookResult
*/
size?: number;
/**
*
* @type {number}
* @memberof PageWebhookResult
*/
number?: number;
/**
*
* @type {SortObject}
* @memberof PageWebhookResult
*/
sort?: SortObject;
/**
*
* @type {boolean}
* @memberof PageWebhookResult
*/
empty?: boolean;
}
export function PageWebhookResultFromJSON(json: any): PageWebhookResult {
return PageWebhookResultFromJSONTyped(json, false);
}
export function PageWebhookResultFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): PageWebhookResult {
if (json === undefined || json === null) {
return json;
}
return {
content: !exists(json, 'content')
? undefined
: (json['content'] as Array<any>).map(WebhookResultDtoFromJSON),
pageable: !exists(json, 'pageable')
? undefined
: PageableObjectFromJSON(json['pageable']),
totalPages: json['totalPages'],
totalElements: json['totalElements'],
last: !exists(json, 'last') ? undefined : json['last'],
numberOfElements: !exists(json, 'numberOfElements')
? undefined
: json['numberOfElements'],
first: !exists(json, 'first') ? undefined : json['first'],
size: !exists(json, 'size') ? undefined : json['size'],
number: !exists(json, 'number') ? undefined : json['number'],
sort: !exists(json, 'sort') ? undefined : SortObjectFromJSON(json['sort']),
empty: !exists(json, 'empty') ? undefined : json['empty'],
};
}
export function PageWebhookResultToJSON(value?: PageWebhookResult | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
content:
value.content === undefined
? undefined
: (value.content as Array<any>).map(WebhookResultDtoToJSON),
pageable: PageableObjectToJSON(value.pageable),
totalPages: value.totalPages,
totalElements: value.totalElements,
last: value.last,
numberOfElements: value.numberOfElements,
first: value.first,
size: value.size,
number: value.number,
sort: SortObjectToJSON(value.sort),
empty: value.empty,
};
}
/* 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';
import {
PageableObject,
PageableObjectFromJSON,
PageableObjectFromJSONTyped,
PageableObjectToJSON,
SortObject,
SortObjectFromJSON,
SortObjectFromJSONTyped,
SortObjectToJSON,
WebhookProjection,
WebhookProjectionFromJSON,
WebhookProjectionFromJSONTyped,
WebhookProjectionToJSON,
} from './';
/**
* Paginated webhook entity. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls.
* @export
* @interface PageWebhookProjection
*/
export interface PageWebhookProjection {
/**
*
* @type {Array<WebhookProjection>}
* @memberof PageWebhookProjection
*/
content?: Array<WebhookProjection>;
/**
*
* @type {PageableObject}
* @memberof PageWebhookProjection
*/
pageable?: PageableObject;
/**
*
* @type {number}
* @memberof PageWebhookProjection
*/
totalPages: number;
/**
*
* @type {number}
* @memberof PageWebhookProjection
*/
totalElements: number;
/**
*
* @type {boolean}
* @memberof PageWebhookProjection
*/
last?: boolean;
/**
*
* @type {number}
* @memberof PageWebhookProjection
*/
numberOfElements?: number;
/**
*
* @type {boolean}
* @memberof PageWebhookProjection
*/
first?: boolean;
/**
*
* @type {number}
* @memberof PageWebhookProjection
*/
size?: number;
/**
*
* @type {number}
* @memberof PageWebhookProjection
*/
number?: number;
/**
*
* @type {SortObject}
* @memberof PageWebhookProjection
*/
sort?: SortObject;
/**
*
* @type {boolean}
* @memberof PageWebhookProjection
*/
empty?: boolean;
}
export function PageWebhookProjectionFromJSON(
json: any
): PageWebhookProjection {
return PageWebhookProjectionFromJSONTyped(json, false);
}
export function PageWebhookProjectionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): PageWebhookProjection {
if (json === undefined || json === null) {
return json;
}
return {
content: !exists(json, 'content')
? undefined
: (json['content'] as Array<any>).map(WebhookProjectionFromJSON),
pageable: !exists(json, 'pageable')
? undefined
: PageableObjectFromJSON(json['pageable']),
totalPages: json['totalPages'],
totalElements: json['totalElements'],
last: !exists(json, 'last') ? undefined : json['last'],
numberOfElements: !exists(json, 'numberOfElements')
? undefined
: json['numberOfElements'],
first: !exists(json, 'first') ? undefined : json['first'],
size: !exists(json, 'size') ? undefined : json['size'],
number: !exists(json, 'number') ? undefined : json['number'],
sort: !exists(json, 'sort') ? undefined : SortObjectFromJSON(json['sort']),
empty: !exists(json, 'empty') ? undefined : json['empty'],
};
}
export function PageWebhookProjectionToJSON(
value?: PageWebhookProjection | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
content:
value.content === undefined
? undefined
: (value.content as Array<any>).map(WebhookProjectionToJSON),
pageable: PageableObjectToJSON(value.pageable),
totalPages: value.totalPages,
totalElements: value.totalElements,
last: value.last,
numberOfElements: value.numberOfElements,
first: value.first,
size: value.size,
number: value.number,
sort: SortObjectToJSON(value.sort),
empty: value.empty,
};
}
/* 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';
import {
PageableObject,
PageableObjectFromJSON,
PageableObjectFromJSONTyped,
PageableObjectToJSON,
SortObject,
SortObjectFromJSON,
SortObjectFromJSONTyped,
SortObjectToJSON,
UnknownMissedEmailProjection,
UnknownMissedEmailProjectionFromJSON,
UnknownMissedEmailProjectionFromJSONTyped,
UnknownMissedEmailProjectionToJSON,
} from './';
/**
* Paginated unknown MissedEmail results. Unknown missed emails are emails that were sent to MailSlurp /Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls.
* @export
* @interface PageUnknownMissedEmailProjection
*/
export interface PageUnknownMissedEmailProjection {
/**
*
* @type {Array<UnknownMissedEmailProjection>}
* @memberof PageUnknownMissedEmailProjection
*/
content?: Array<UnknownMissedEmailProjection>;
/**
*
* @type {PageableObject}
* @memberof PageUnknownMissedEmailProjection
*/
pageable?: PageableObject;
/**
*
* @type {number}
* @memberof PageUnknownMissedEmailProjection
*/
totalPages: number;
/**
*
* @type {number}
* @memberof PageUnknownMissedEmailProjection
*/
totalElements: number;
/**
*
* @type {boolean}
* @memberof PageUnknownMissedEmailProjection
*/
last?: boolean;
/**
*
* @type {number}
* @memberof PageUnknownMissedEmailProjection
*/
numberOfElements?: number;
/**
*
* @type {boolean}
* @memberof PageUnknownMissedEmailProjection
*/
first?: boolean;
/**
*
* @type {number}
* @memberof PageUnknownMissedEmailProjection
*/
size?: number;
/**
*
* @type {number}
* @memberof PageUnknownMissedEmailProjection
*/
number?: number;
/**
*
* @type {SortObject}
* @memberof PageUnknownMissedEmailProjection
*/
sort?: SortObject;
/**
*
* @type {boolean}
* @memberof PageUnknownMissedEmailProjection
*/
empty?: boolean;
}
export function PageUnknownMissedEmailProjectionFromJSON(
json: any
): PageUnknownMissedEmailProjection {
return PageUnknownMissedEmailProjectionFromJSONTyped(json, false);
}
export function PageUnknownMissedEmailProjectionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): PageUnknownMissedEmailProjection {
if (json === undefined || json === null) {
return json;
}
return {
content: !exists(json, 'content')
? undefined
: (json['content'] as Array<any>).map(
UnknownMissedEmailProjectionFromJSON
),
pageable: !exists(json, 'pageable')
? undefined
: PageableObjectFromJSON(json['pageable']),
totalPages: json['totalPages'],
totalElements: json['totalElements'],
last: !exists(json, 'last') ? undefined : json['last'],
numberOfElements: !exists(json, 'numberOfElements')
? undefined
: json['numberOfElements'],
first: !exists(json, 'first') ? undefined : json['first'],
size: !exists(json, 'size') ? undefined : json['size'],
number: !exists(json, 'number') ? undefined : json['number'],
sort: !exists(json, 'sort') ? undefined : SortObjectFromJSON(json['sort']),
empty: !exists(json, 'empty') ? undefined : json['empty'],
};
}
export function PageUnknownMissedEmailProjectionToJSON(
value?: PageUnknownMissedEmailProjection | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
content:
value.content === undefined
? undefined
: (value.content as Array<any>).map(UnknownMissedEmailProjectionToJSON),
pageable: PageableObjectToJSON(value.pageable),
totalPages: value.totalPages,
totalElements: value.totalElements,
last: value.last,
numberOfElements: value.numberOfElements,
first: value.first,
size: value.size,
number: value.number,
sort: SortObjectToJSON(value.sort),
empty: value.empty,
};
}
/* 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';
import {
PageableObject,
PageableObjectFromJSON,
PageableObjectFromJSONTyped,
PageableObjectToJSON,
SortObject,
SortObjectFromJSON,
SortObjectFromJSONTyped,
SortObjectToJSON,
TrackingPixelProjection,
TrackingPixelProjectionFromJSON,
TrackingPixelProjectionFromJSONTyped,
TrackingPixelProjectionToJSON,
} from './';
/**
* Paginated TrackingPixel results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls.
* @export
* @interface PageTrackingPixelProjection
*/
export interface PageTrackingPixelProjection {
/**
*
* @type {Array<TrackingPixelProjection>}
* @memberof PageTrackingPixelProjection
*/
content?: Array<TrackingPixelProjection>;
/**
*
* @type {PageableObject}
* @memberof PageTrackingPixelProjection
*/
pageable?: PageableObject;
/**
*
* @type {number}
* @memberof PageTrackingPixelProjection
*/
totalPages: number;
/**
*
* @type {number}
* @memberof PageTrackingPixelProjection
*/
totalElements: number;
/**
*
* @type {boolean}
* @memberof PageTrackingPixelProjection
*/
last?: boolean;
/**
*
* @type {number}
* @memberof PageTrackingPixelProjection
*/
numberOfElements?: number;
/**
*
* @type {boolean}
* @memberof PageTrackingPixelProjection
*/
first?: boolean;
/**
*
* @type {number}
* @memberof PageTrackingPixelProjection
*/
size?: number;
/**
*
* @type {number}
* @memberof PageTrackingPixelProjection
*/
number?: number;
/**
*
* @type {SortObject}
* @memberof PageTrackingPixelProjection
*/
sort?: SortObject;
/**
*
* @type {boolean}
* @memberof PageTrackingPixelProjection
*/
empty?: boolean;
}
export function PageTrackingPixelProjectionFromJSON(
json: any
): PageTrackingPixelProjection {
return PageTrackingPixelProjectionFromJSONTyped(json, false);
}
export function PageTrackingPixelProjectionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): PageTrackingPixelProjection {
if (json === undefined || json === null) {
return json;
}
return {
content: !exists(json, 'content')
? undefined
: (json['content'] as Array<any>).map(TrackingPixelProjectionFromJSON),
pageable: !exists(json, 'pageable')
? undefined
: PageableObjectFromJSON(json['pageable']),
totalPages: json['totalPages'],
totalElements: json['totalElements'],
last: !exists(json, 'last') ? undefined : json['last'],
numberOfElements: !exists(json, 'numberOfElements')
? undefined
: json['numberOfElements'],
first: !exists(json, 'first') ? undefined : json['first'],
size: !exists(json, 'size') ? undefined : json['size'],
number: !exists(json, 'number') ? undefined : json['number'],
sort: !exists(json, 'sort') ? undefined : SortObjectFromJSON(json['sort']),
empty: !exists(json, 'empty') ? undefined : json['empty'],
};
}
export function PageTrackingPixelProjectionToJSON(
value?: PageTrackingPixelProjection | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
content:
value.content === undefined
? undefined
: (value.content as Array<any>).map(TrackingPixelProjectionToJSON),
pageable: PageableObjectToJSON(value.pageable),
totalPages: value.totalPages,
totalElements: value.totalElements,
last: value.last,
numberOfElements: value.numberOfElements,
first: value.first,
size: value.size,
number: value.number,
sort: SortObjectToJSON(value.sort),
empty: value.empty,
};
}
/* 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';
import {
PageableObject,
PageableObjectFromJSON,
PageableObjectFromJSONTyped,
PageableObjectToJSON,
SortObject,
SortObjectFromJSON,
SortObjectFromJSONTyped,
SortObjectToJSON,
ThreadProjection,
ThreadProjectionFromJSON,
ThreadProjectionFromJSONTyped,
ThreadProjectionToJSON,
} from './';
/**
* Paginated email projection results. EmailProjections and EmailPreviews are essentially the same but have legacy naming issues. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full email entity use the projection ID with individual method calls. For emails there are several methods for fetching message bodies and attachments.
* @export
* @interface PageThreadProjection
*/
export interface PageThreadProjection {
/**
*
* @type {Array<ThreadProjection>}
* @memberof PageThreadProjection
*/
content?: Array<ThreadProjection>;
/**
*
* @type {PageableObject}
* @memberof PageThreadProjection
*/
pageable?: PageableObject;
/**
*
* @type {number}
* @memberof PageThreadProjection
*/
totalPages: number;
/**
*
* @type {number}
* @memberof PageThreadProjection
*/
totalElements: number;
/**
*
* @type {boolean}
* @memberof PageThreadProjection
*/
last?: boolean;
/**
*
* @type {number}
* @memberof PageThreadProjection
*/
numberOfElements?: number;
/**
*
* @type {boolean}
* @memberof PageThreadProjection
*/
first?: boolean;
/**
*
* @type {number}
* @memberof PageThreadProjection
*/
size?: number;
/**
*
* @type {number}
* @memberof PageThreadProjection
*/
number?: number;
/**
*
* @type {SortObject}
* @memberof PageThreadProjection
*/
sort?: SortObject;
/**
*
* @type {boolean}
* @memberof PageThreadProjection
*/
empty?: boolean;
}
export function PageThreadProjectionFromJSON(json: any): PageThreadProjection {
return PageThreadProjectionFromJSONTyped(json, false);
}
export function PageThreadProjectionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): PageThreadProjection {
if (json === undefined || json === null) {
return json;
}
return {
content: !exists(json, 'content')
? undefined
: (json['content'] as Array<any>).map(ThreadProjectionFromJSON),
pageable: !exists(json, 'pageable')
? undefined
: PageableObjectFromJSON(json['pageable']),
totalPages: json['totalPages'],
totalElements: json['totalElements'],
last: !exists(json, 'last') ? undefined : json['last'],
numberOfElements: !exists(json, 'numberOfElements')
? undefined
: json['numberOfElements'],
first: !exists(json, 'first') ? undefined : json['first'],
size: !exists(json, 'size') ? undefined : json['size'],
number: !exists(json, 'number') ? undefined : json['number'],
sort: !exists(json, 'sort') ? undefined : SortObjectFromJSON(json['sort']),
empty: !exists(json, 'empty') ? undefined : json['empty'],
};
}
export function PageThreadProjectionToJSON(
value?: PageThreadProjection | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
content:
value.content === undefined
? undefined
: (value.content as Array<any>).map(ThreadProjectionToJSON),
pageable: PageableObjectToJSON(value.pageable),
totalPages: value.totalPages,
totalElements: value.totalElements,
last: value.last,
numberOfElements: value.numberOfElements,
first: value.first,
size: value.size,
number: value.number,
sort: SortObjectToJSON(value.sort),
empty: value.empty,
};
}
/* 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';
import {
PageableObject,
PageableObjectFromJSON,
PageableObjectFromJSONTyped,
PageableObjectToJSON,
SortObject,
SortObjectFromJSON,
SortObjectFromJSONTyped,
SortObjectToJSON,
TemplateProjection,
TemplateProjectionFromJSON,
TemplateProjectionFromJSONTyped,
TemplateProjectionToJSON,
} from './';
/**
* Paginated email template results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls.
* @export
* @interface PageTemplateProjection
*/
export interface PageTemplateProjection {
/**
*
* @type {Array<TemplateProjection>}
* @memberof PageTemplateProjection
*/
content?: Array<TemplateProjection>;
/**
*
* @type {PageableObject}
* @memberof PageTemplateProjection
*/
pageable?: PageableObject;
/**
*
* @type {number}
* @memberof PageTemplateProjection
*/
totalPages: number;
/**
*
* @type {number}
* @memberof PageTemplateProjection
*/
totalElements: number;
/**
*
* @type {boolean}
* @memberof PageTemplateProjection
*/
last?: boolean;
/**
*
* @type {number}
* @memberof PageTemplateProjection
*/
numberOfElements?: number;
/**
*
* @type {boolean}
* @memberof PageTemplateProjection
*/
first?: boolean;
/**
*
* @type {number}
* @memberof PageTemplateProjection
*/
size?: number;
/**
*
* @type {number}
* @memberof PageTemplateProjection
*/
number?: number;
/**
*
* @type {SortObject}
* @memberof PageTemplateProjection
*/
sort?: SortObject;
/**
*
* @type {boolean}
* @memberof PageTemplateProjection
*/
empty?: boolean;
}
export function PageTemplateProjectionFromJSON(
json: any
): PageTemplateProjection {
return PageTemplateProjectionFromJSONTyped(json, false);
}
export function PageTemplateProjectionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): PageTemplateProjection {
if (json === undefined || json === null) {
return json;
}
return {
content: !exists(json, 'content')
? undefined
: (json['content'] as Array<any>).map(TemplateProjectionFromJSON),
pageable: !exists(json, 'pageable')
? undefined
: PageableObjectFromJSON(json['pageable']),
totalPages: json['totalPages'],
totalElements: json['totalElements'],
last: !exists(json, 'last') ? undefined : json['last'],
numberOfElements: !exists(json, 'numberOfElements')
? undefined
: json['numberOfElements'],
first: !exists(json, 'first') ? undefined : json['first'],
size: !exists(json, 'size') ? undefined : json['size'],
number: !exists(json, 'number') ? undefined : json['number'],
sort: !exists(json, 'sort') ? undefined : SortObjectFromJSON(json['sort']),
empty: !exists(json, 'empty') ? undefined : json['empty'],
};
}
export function PageTemplateProjectionToJSON(
value?: PageTemplateProjection | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
content:
value.content === undefined
? undefined
: (value.content as Array<any>).map(TemplateProjectionToJSON),
pageable: PageableObjectToJSON(value.pageable),
totalPages: value.totalPages,
totalElements: value.totalElements,
last: value.last,
numberOfElements: value.numberOfElements,
first: value.first,
size: value.size,
number: value.number,
sort: SortObjectToJSON(value.sort),
empty: value.empty,
};
}
/* 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';
import {
PageableObject,
PageableObjectFromJSON,
PageableObjectFromJSONTyped,
PageableObjectToJSON,
SmsProjection,
SmsProjectionFromJSON,
SmsProjectionFromJSONTyped,
SmsProjectionToJSON,
SortObject,
SortObjectFromJSON,
SortObjectFromJSONTyped,
SortObjectToJSON,
} from './';
/**
* Paginated SMS messages. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls.
* @export
* @interface PageSmsProjection
*/
export interface PageSmsProjection {
/**
*
* @type {Array<SmsProjection>}
* @memberof PageSmsProjection
*/
content?: Array<SmsProjection>;
/**
*
* @type {PageableObject}
* @memberof PageSmsProjection
*/
pageable?: PageableObject;
/**
*
* @type {number}
* @memberof PageSmsProjection
*/
totalPages: number;
/**
*
* @type {number}
* @memberof PageSmsProjection
*/
totalElements: number;
/**
*
* @type {boolean}
* @memberof PageSmsProjection
*/
last?: boolean;
/**
*
* @type {number}
* @memberof PageSmsProjection
*/
numberOfElements?: number;
/**
*
* @type {boolean}
* @memberof PageSmsProjection
*/
first?: boolean;
/**
*
* @type {number}
* @memberof PageSmsProjection
*/
size?: number;
/**
*
* @type {number}
* @memberof PageSmsProjection
*/
number?: number;
/**
*
* @type {SortObject}
* @memberof PageSmsProjection
*/
sort?: SortObject;
/**
*
* @type {boolean}
* @memberof PageSmsProjection
*/
empty?: boolean;
}
export function PageSmsProjectionFromJSON(json: any): PageSmsProjection {
return PageSmsProjectionFromJSONTyped(json, false);
}
export function PageSmsProjectionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): PageSmsProjection {
if (json === undefined || json === null) {
return json;
}
return {
content: !exists(json, 'content')
? undefined
: (json['content'] as Array<any>).map(SmsProjectionFromJSON),
pageable: !exists(json, 'pageable')
? undefined
: PageableObjectFromJSON(json['pageable']),
totalPages: json['totalPages'],
totalElements: json['totalElements'],
last: !exists(json, 'last') ? undefined : json['last'],
numberOfElements: !exists(json, 'numberOfElements')
? undefined
: json['numberOfElements'],
first: !exists(json, 'first') ? undefined : json['first'],
size: !exists(json, 'size') ? undefined : json['size'],
number: !exists(json, 'number') ? undefined : json['number'],
sort: !exists(json, 'sort') ? undefined : SortObjectFromJSON(json['sort']),
empty: !exists(json, 'empty') ? undefined : json['empty'],
};
}
export function PageSmsProjectionToJSON(value?: PageSmsProjection | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
content:
value.content === undefined
? undefined
: (value.content as Array<any>).map(SmsProjectionToJSON),
pageable: PageableObjectToJSON(value.pageable),
totalPages: value.totalPages,
totalElements: value.totalElements,
last: value.last,
numberOfElements: value.numberOfElements,
first: value.first,
size: value.size,
number: value.number,
sort: SortObjectToJSON(value.sort),
empty: value.empty,
};
}
/* 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';
import {
PageableObject,
PageableObjectFromJSON,
PageableObjectFromJSONTyped,
PageableObjectToJSON,
SendWithQueueResult,
SendWithQueueResultFromJSON,
SendWithQueueResultFromJSONTyped,
SendWithQueueResultToJSON,
SortObject,
SortObjectFromJSON,
SortObjectFromJSONTyped,
SortObjectToJSON,
} from './';
/**
* Paginated sent email results for emails sent with queue. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full sent email entity use the projection ID with individual method calls.
* @export
* @interface PageSentEmailWithQueueProjection
*/
export interface PageSentEmailWithQueueProjection {
/**
*
* @type {Array<SendWithQueueResult>}
* @memberof PageSentEmailWithQueueProjection
*/
content?: Array<SendWithQueueResult>;
/**
*
* @type {PageableObject}
* @memberof PageSentEmailWithQueueProjection
*/
pageable?: PageableObject;
/**
*
* @type {number}
* @memberof PageSentEmailWithQueueProjection
*/
totalPages: number;
/**
*
* @type {number}
* @memberof PageSentEmailWithQueueProjection
*/
totalElements: number;
/**
*
* @type {boolean}
* @memberof PageSentEmailWithQueueProjection
*/
last?: boolean;
/**
*
* @type {number}
* @memberof PageSentEmailWithQueueProjection
*/
numberOfElements?: number;
/**
*
* @type {boolean}
* @memberof PageSentEmailWithQueueProjection
*/
first?: boolean;
/**
*
* @type {number}
* @memberof PageSentEmailWithQueueProjection
*/
size?: number;
/**
*
* @type {number}
* @memberof PageSentEmailWithQueueProjection
*/
number?: number;
/**
*
* @type {SortObject}
* @memberof PageSentEmailWithQueueProjection
*/
sort?: SortObject;
/**
*
* @type {boolean}
* @memberof PageSentEmailWithQueueProjection
*/
empty?: boolean;
}
export function PageSentEmailWithQueueProjectionFromJSON(
json: any
): PageSentEmailWithQueueProjection {
return PageSentEmailWithQueueProjectionFromJSONTyped(json, false);
}
export function PageSentEmailWithQueueProjectionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): PageSentEmailWithQueueProjection {
if (json === undefined || json === null) {
return json;
}
return {
content: !exists(json, 'content')
? undefined
: (json['content'] as Array<any>).map(SendWithQueueResultFromJSON),
pageable: !exists(json, 'pageable')
? undefined
: PageableObjectFromJSON(json['pageable']),
totalPages: json['totalPages'],
totalElements: json['totalElements'],
last: !exists(json, 'last') ? undefined : json['last'],
numberOfElements: !exists(json, 'numberOfElements')
? undefined
: json['numberOfElements'],
first: !exists(json, 'first') ? undefined : json['first'],
size: !exists(json, 'size') ? undefined : json['size'],
number: !exists(json, 'number') ? undefined : json['number'],
sort: !exists(json, 'sort') ? undefined : SortObjectFromJSON(json['sort']),
empty: !exists(json, 'empty') ? undefined : json['empty'],
};
}
export function PageSentEmailWithQueueProjectionToJSON(
value?: PageSentEmailWithQueueProjection | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
content:
value.content === undefined
? undefined
: (value.content as Array<any>).map(SendWithQueueResultToJSON),
pageable: PageableObjectToJSON(value.pageable),
totalPages: value.totalPages,
totalElements: value.totalElements,
last: value.last,
numberOfElements: value.numberOfElements,
first: value.first,
size: value.size,
number: value.number,
sort: SortObjectToJSON(value.sort),
empty: value.empty,
};
}
/* 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';
import {
PageableObject,
PageableObjectFromJSON,
PageableObjectFromJSONTyped,
PageableObjectToJSON,
SentEmailProjection,
SentEmailProjectionFromJSON,
SentEmailProjectionFromJSONTyped,
SentEmailProjectionToJSON,
SortObject,
SortObjectFromJSON,
SortObjectFromJSONTyped,
SortObjectToJSON,
} from './';
/**
* Paginated sent email results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full sent email entity use the projection ID with individual method calls.
* @export
* @interface PageSentEmailProjection
*/
export interface PageSentEmailProjection {
/**
*
* @type {Array<SentEmailProjection>}
* @memberof PageSentEmailProjection
*/
content?: Array<SentEmailProjection>;
/**
*
* @type {PageableObject}
* @memberof PageSentEmailProjection
*/
pageable?: PageableObject;
/**
*
* @type {number}
* @memberof PageSentEmailProjection
*/
totalPages: number;
/**
*
* @type {number}
* @memberof PageSentEmailProjection
*/
totalElements: number;
/**
*
* @type {boolean}
* @memberof PageSentEmailProjection
*/
last?: boolean;
/**
*
* @type {number}
* @memberof PageSentEmailProjection
*/
numberOfElements?: number;
/**
*
* @type {boolean}
* @memberof PageSentEmailProjection
*/
first?: boolean;
/**
*
* @type {number}
* @memberof PageSentEmailProjection
*/
size?: number;
/**
*
* @type {number}
* @memberof PageSentEmailProjection
*/
number?: number;
/**
*
* @type {SortObject}
* @memberof PageSentEmailProjection
*/
sort?: SortObject;
/**
*
* @type {boolean}
* @memberof PageSentEmailProjection
*/
empty?: boolean;
}
export function PageSentEmailProjectionFromJSON(
json: any
): PageSentEmailProjection {
return PageSentEmailProjectionFromJSONTyped(json, false);
}
export function PageSentEmailProjectionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): PageSentEmailProjection {
if (json === undefined || json === null) {
return json;
}
return {
content: !exists(json, 'content')
? undefined
: (json['content'] as Array<any>).map(SentEmailProjectionFromJSON),
pageable: !exists(json, 'pageable')
? undefined
: PageableObjectFromJSON(json['pageable']),
totalPages: json['totalPages'],
totalElements: json['totalElements'],
last: !exists(json, 'last') ? undefined : json['last'],
numberOfElements: !exists(json, 'numberOfElements')
? undefined
: json['numberOfElements'],
first: !exists(json, 'first') ? undefined : json['first'],
size: !exists(json, 'size') ? undefined : json['size'],
number: !exists(json, 'number') ? undefined : json['number'],
sort: !exists(json, 'sort') ? undefined : SortObjectFromJSON(json['sort']),
empty: !exists(json, 'empty') ? undefined : json['empty'],
};
}
export function PageSentEmailProjectionToJSON(
value?: PageSentEmailProjection | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
content:
value.content === undefined
? undefined
: (value.content as Array<any>).map(SentEmailProjectionToJSON),
pageable: PageableObjectToJSON(value.pageable),
totalPages: value.totalPages,
totalElements: value.totalElements,
last: value.last,
numberOfElements: value.numberOfElements,
first: value.first,
size: value.size,
number: value.number,
sort: SortObjectToJSON(value.sort),
empty: value.empty,
};
}
/* 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';
import {
PageableObject,
PageableObjectFromJSON,
PageableObjectFromJSONTyped,
PageableObjectToJSON,
ScheduledJob,
ScheduledJobFromJSON,
ScheduledJobFromJSONTyped,
ScheduledJobToJSON,
SortObject,
SortObjectFromJSON,
SortObjectFromJSONTyped,
SortObjectToJSON,
} from './';
/**
* Paginated scheduled jobs results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls.
* @export
* @interface PageScheduledJobs
*/
export interface PageScheduledJobs {
/**
*
* @type {Array<ScheduledJob>}
* @memberof PageScheduledJobs
*/
content?: Array<ScheduledJob>;
/**
*
* @type {PageableObject}
* @memberof PageScheduledJobs
*/
pageable?: PageableObject;
/**
*
* @type {number}
* @memberof PageScheduledJobs
*/
totalPages: number;
/**
*
* @type {number}
* @memberof PageScheduledJobs
*/
totalElements: number;
/**
*
* @type {boolean}
* @memberof PageScheduledJobs
*/
last?: boolean;
/**
*
* @type {number}
* @memberof PageScheduledJobs
*/
numberOfElements?: number;
/**
*
* @type {boolean}
* @memberof PageScheduledJobs
*/
first?: boolean;
/**
*
* @type {number}
* @memberof PageScheduledJobs
*/
size?: number;
/**
*
* @type {number}
* @memberof PageScheduledJobs
*/
number?: number;
/**
*
* @type {SortObject}
* @memberof PageScheduledJobs
*/
sort?: SortObject;
/**
*
* @type {boolean}
* @memberof PageScheduledJobs
*/
empty?: boolean;
}
export function PageScheduledJobsFromJSON(json: any): PageScheduledJobs {
return PageScheduledJobsFromJSONTyped(json, false);
}
export function PageScheduledJobsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): PageScheduledJobs {
if (json === undefined || json === null) {
return json;
}
return {
content: !exists(json, 'content')
? undefined
: (json['content'] as Array<any>).map(ScheduledJobFromJSON),
pageable: !exists(json, 'pageable')
? undefined
: PageableObjectFromJSON(json['pageable']),
totalPages: json['totalPages'],
totalElements: json['totalElements'],
last: !exists(json, 'last') ? undefined : json['last'],
numberOfElements: !exists(json, 'numberOfElements')
? undefined
: json['numberOfElements'],
first: !exists(json, 'first') ? undefined : json['first'],
size: !exists(json, 'size') ? undefined : json['size'],
number: !exists(json, 'number') ? undefined : json['number'],
sort: !exists(json, 'sort') ? undefined : SortObjectFromJSON(json['sort']),
empty: !exists(json, 'empty') ? undefined : json['empty'],
};
}
export function PageScheduledJobsToJSON(value?: PageScheduledJobs | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
content:
value.content === undefined
? undefined
: (value.content as Array<any>).map(ScheduledJobToJSON),
pageable: PageableObjectToJSON(value.pageable),
totalPages: value.totalPages,
totalElements: value.totalElements,
last: value.last,
numberOfElements: value.numberOfElements,
first: value.first,
size: value.size,
number: value.number,
sort: SortObjectToJSON(value.sort),
empty: value.empty,
};
}
/* 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';
import {
PageableObject,
PageableObjectFromJSON,
PageableObjectFromJSONTyped,
PageableObjectToJSON,
PhoneNumberProjection,
PhoneNumberProjectionFromJSON,
PhoneNumberProjectionFromJSONTyped,
PhoneNumberProjectionToJSON,
SortObject,
SortObjectFromJSON,
SortObjectFromJSONTyped,
SortObjectToJSON,
} from './';
/**
* Paginated phone numbers. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls.
* @export
* @interface PagePhoneNumberProjection
*/
export interface PagePhoneNumberProjection {
/**
*
* @type {Array<PhoneNumberProjection>}
* @memberof PagePhoneNumberProjection
*/
content?: Array<PhoneNumberProjection>;
/**
*
* @type {PageableObject}
* @memberof PagePhoneNumberProjection
*/
pageable?: PageableObject;
/**
*
* @type {number}
* @memberof PagePhoneNumberProjection
*/
totalPages: number;
/**
*
* @type {number}
* @memberof PagePhoneNumberProjection
*/
totalElements: number;
/**
*
* @type {boolean}
* @memberof PagePhoneNumberProjection
*/
last?: boolean;
/**
*
* @type {number}
* @memberof PagePhoneNumberProjection
*/
numberOfElements?: number;
/**
*
* @type {boolean}
* @memberof PagePhoneNumberProjection
*/
first?: boolean;
/**
*
* @type {number}
* @memberof PagePhoneNumberProjection
*/
size?: number;
/**
*
* @type {number}
* @memberof PagePhoneNumberProjection
*/
number?: number;
/**
*
* @type {SortObject}
* @memberof PagePhoneNumberProjection
*/
sort?: SortObject;
/**
*
* @type {boolean}
* @memberof PagePhoneNumberProjection
*/
empty?: boolean;
}
export function PagePhoneNumberProjectionFromJSON(
json: any
): PagePhoneNumberProjection {
return PagePhoneNumberProjectionFromJSONTyped(json, false);
}
export function PagePhoneNumberProjectionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): PagePhoneNumberProjection {
if (json === undefined || json === null) {
return json;
}
return {
content: !exists(json, 'content')
? undefined
: (json['content'] as Array<any>).map(PhoneNumberProjectionFromJSON),
pageable: !exists(json, 'pageable')
? undefined
: PageableObjectFromJSON(json['pageable']),
totalPages: json['totalPages'],
totalElements: json['totalElements'],
last: !exists(json, 'last') ? undefined : json['last'],
numberOfElements: !exists(json, 'numberOfElements')
? undefined
: json['numberOfElements'],
first: !exists(json, 'first') ? undefined : json['first'],
size: !exists(json, 'size') ? undefined : json['size'],
number: !exists(json, 'number') ? undefined : json['number'],
sort: !exists(json, 'sort') ? undefined : SortObjectFromJSON(json['sort']),
empty: !exists(json, 'empty') ? undefined : json['empty'],
};
}
export function PagePhoneNumberProjectionToJSON(
value?: PagePhoneNumberProjection | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
content:
value.content === undefined
? undefined
: (value.content as Array<any>).map(PhoneNumberProjectionToJSON),
pageable: PageableObjectToJSON(value.pageable),
totalPages: value.totalPages,
totalElements: value.totalElements,
last: value.last,
numberOfElements: value.numberOfElements,
first: value.first,
size: value.size,
number: value.number,
sort: SortObjectToJSON(value.sort),
empty: value.empty,
};
}
/* 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';
import {
OrganizationInboxProjection,
OrganizationInboxProjectionFromJSON,
OrganizationInboxProjectionFromJSONTyped,
OrganizationInboxProjectionToJSON,
PageableObject,
PageableObjectFromJSON,
PageableObjectFromJSONTyped,
PageableObjectToJSON,
SortObject,
SortObjectFromJSON,
SortObjectFromJSONTyped,
SortObjectToJSON,
} from './';
/**
* Paginated organization inbox results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls.
* @export
* @interface PageOrganizationInboxProjection
*/
export interface PageOrganizationInboxProjection {
/**
*
* @type {Array<OrganizationInboxProjection>}
* @memberof PageOrganizationInboxProjection
*/
content?: Array<OrganizationInboxProjection>;
/**
*
* @type {PageableObject}
* @memberof PageOrganizationInboxProjection
*/
pageable?: PageableObject;
/**
*
* @type {number}
* @memberof PageOrganizationInboxProjection
*/
totalPages: number;
/**
*
* @type {number}
* @memberof PageOrganizationInboxProjection
*/
totalElements: number;
/**
*
* @type {boolean}
* @memberof PageOrganizationInboxProjection
*/
last?: boolean;
/**
*
* @type {number}
* @memberof PageOrganizationInboxProjection
*/
numberOfElements?: number;
/**
*
* @type {boolean}
* @memberof PageOrganizationInboxProjection
*/
first?: boolean;
/**
*
* @type {number}
* @memberof PageOrganizationInboxProjection
*/
size?: number;
/**
*
* @type {number}
* @memberof PageOrganizationInboxProjection
*/
number?: number;
/**
*
* @type {SortObject}
* @memberof PageOrganizationInboxProjection
*/
sort?: SortObject;
/**
*
* @type {boolean}
* @memberof PageOrganizationInboxProjection
*/
empty?: boolean;
}
export function PageOrganizationInboxProjectionFromJSON(
json: any
): PageOrganizationInboxProjection {
return PageOrganizationInboxProjectionFromJSONTyped(json, false);
}
export function PageOrganizationInboxProjectionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): PageOrganizationInboxProjection {
if (json === undefined || json === null) {
return json;
}
return {
content: !exists(json, 'content')
? undefined
: (json['content'] as Array<any>).map(
OrganizationInboxProjectionFromJSON
),
pageable: !exists(json, 'pageable')
? undefined
: PageableObjectFromJSON(json['pageable']),
totalPages: json['totalPages'],
totalElements: json['totalElements'],
last: !exists(json, 'last') ? undefined : json['last'],
numberOfElements: !exists(json, 'numberOfElements')
? undefined
: json['numberOfElements'],
first: !exists(json, 'first') ? undefined : json['first'],
size: !exists(json, 'size') ? undefined : json['size'],
number: !exists(json, 'number') ? undefined : json['number'],
sort: !exists(json, 'sort') ? undefined : SortObjectFromJSON(json['sort']),
empty: !exists(json, 'empty') ? undefined : json['empty'],
};
}
export function PageOrganizationInboxProjectionToJSON(
value?: PageOrganizationInboxProjection | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
content:
value.content === undefined
? undefined
: (value.content as Array<any>).map(OrganizationInboxProjectionToJSON),
pageable: PageableObjectToJSON(value.pageable),
totalPages: value.totalPages,
totalElements: value.totalElements,
last: value.last,
numberOfElements: value.numberOfElements,
first: value.first,
size: value.size,
number: value.number,
sort: SortObjectToJSON(value.sort),
empty: value.empty,
};
}
/* 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';
import {
MissedEmailProjection,
MissedEmailProjectionFromJSON,
MissedEmailProjectionFromJSONTyped,
MissedEmailProjectionToJSON,
PageableObject,
PageableObjectFromJSON,
PageableObjectFromJSONTyped,
PageableObjectToJSON,
SortObject,
SortObjectFromJSON,
SortObjectFromJSONTyped,
SortObjectToJSON,
} from './';
/**
* Paginated MissedEmail results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls.
* @export
* @interface PageMissedEmailProjection
*/
export interface PageMissedEmailProjection {
/**
*
* @type {Array<MissedEmailProjection>}
* @memberof PageMissedEmailProjection
*/
content?: Array<MissedEmailProjection>;
/**
*
* @type {PageableObject}
* @memberof PageMissedEmailProjection
*/
pageable?: PageableObject;
/**
*
* @type {number}
* @memberof PageMissedEmailProjection
*/
totalPages: number;
/**
*
* @type {number}
* @memberof PageMissedEmailProjection
*/
totalElements: number;
/**
*
* @type {boolean}
* @memberof PageMissedEmailProjection
*/
last?: boolean;
/**
*
* @type {number}
* @memberof PageMissedEmailProjection
*/
numberOfElements?: number;
/**
*
* @type {boolean}
* @memberof PageMissedEmailProjection
*/
first?: boolean;
/**
*
* @type {number}
* @memberof PageMissedEmailProjection
*/
size?: number;
/**
*
* @type {number}
* @memberof PageMissedEmailProjection
*/
number?: number;
/**
*
* @type {SortObject}
* @memberof PageMissedEmailProjection
*/
sort?: SortObject;
/**
*
* @type {boolean}
* @memberof PageMissedEmailProjection
*/
empty?: boolean;
}
export function PageMissedEmailProjectionFromJSON(
json: any
): PageMissedEmailProjection {
return PageMissedEmailProjectionFromJSONTyped(json, false);
}
export function PageMissedEmailProjectionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): PageMissedEmailProjection {
if (json === undefined || json === null) {
return json;
}
return {
content: !exists(json, 'content')
? undefined
: (json['content'] as Array<any>).map(MissedEmailProjectionFromJSON),
pageable: !exists(json, 'pageable')
? undefined
: PageableObjectFromJSON(json['pageable']),
totalPages: json['totalPages'],
totalElements: json['totalElements'],
last: !exists(json, 'last') ? undefined : json['last'],
numberOfElements: !exists(json, 'numberOfElements')
? undefined
: json['numberOfElements'],
first: !exists(json, 'first') ? undefined : json['first'],
size: !exists(json, 'size') ? undefined : json['size'],
number: !exists(json, 'number') ? undefined : json['number'],
sort: !exists(json, 'sort') ? undefined : SortObjectFromJSON(json['sort']),
empty: !exists(json, 'empty') ? undefined : json['empty'],
};
}
export function PageMissedEmailProjectionToJSON(
value?: PageMissedEmailProjection | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
content:
value.content === undefined
? undefined
: (value.content as Array<any>).map(MissedEmailProjectionToJSON),
pageable: PageableObjectToJSON(value.pageable),
totalPages: value.totalPages,
totalElements: value.totalElements,
last: value.last,
numberOfElements: value.numberOfElements,
first: value.first,
size: value.size,
number: value.number,
sort: SortObjectToJSON(value.sort),
empty: value.empty,
};
}
/* 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';
import {
ListUnsubscribeRecipientProjection,
ListUnsubscribeRecipientProjectionFromJSON,
ListUnsubscribeRecipientProjectionFromJSONTyped,
ListUnsubscribeRecipientProjectionToJSON,
PageableObject,
PageableObjectFromJSON,
PageableObjectFromJSONTyped,
PageableObjectToJSON,
SortObject,
SortObjectFromJSON,
SortObjectFromJSONTyped,
SortObjectToJSON,
} from './';
/**
* Paginated list unsubscribe recipients. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls.
* @export
* @interface PageListUnsubscribeRecipients
*/
export interface PageListUnsubscribeRecipients {
/**
*
* @type {Array<ListUnsubscribeRecipientProjection>}
* @memberof PageListUnsubscribeRecipients
*/
content?: Array<ListUnsubscribeRecipientProjection>;
/**
*
* @type {PageableObject}
* @memberof PageListUnsubscribeRecipients
*/
pageable?: PageableObject;
/**
*
* @type {number}
* @memberof PageListUnsubscribeRecipients
*/
totalPages: number;
/**
*
* @type {number}
* @memberof PageListUnsubscribeRecipients
*/
totalElements: number;
/**
*
* @type {boolean}
* @memberof PageListUnsubscribeRecipients
*/
last?: boolean;
/**
*
* @type {number}
* @memberof PageListUnsubscribeRecipients
*/
numberOfElements?: number;
/**
*
* @type {boolean}
* @memberof PageListUnsubscribeRecipients
*/
first?: boolean;
/**
*
* @type {number}
* @memberof PageListUnsubscribeRecipients
*/
size?: number;
/**
*
* @type {number}
* @memberof PageListUnsubscribeRecipients
*/
number?: number;
/**
*
* @type {SortObject}
* @memberof PageListUnsubscribeRecipients
*/
sort?: SortObject;
/**
*
* @type {boolean}
* @memberof PageListUnsubscribeRecipients
*/
empty?: boolean;
}
export function PageListUnsubscribeRecipientsFromJSON(
json: any
): PageListUnsubscribeRecipients {
return PageListUnsubscribeRecipientsFromJSONTyped(json, false);
}
export function PageListUnsubscribeRecipientsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): PageListUnsubscribeRecipients {
if (json === undefined || json === null) {
return json;
}
return {
content: !exists(json, 'content')
? undefined
: (json['content'] as Array<any>).map(
ListUnsubscribeRecipientProjectionFromJSON
),
pageable: !exists(json, 'pageable')
? undefined
: PageableObjectFromJSON(json['pageable']),
totalPages: json['totalPages'],
totalElements: json['totalElements'],
last: !exists(json, 'last') ? undefined : json['last'],
numberOfElements: !exists(json, 'numberOfElements')
? undefined
: json['numberOfElements'],
first: !exists(json, 'first') ? undefined : json['first'],
size: !exists(json, 'size') ? undefined : json['size'],
number: !exists(json, 'number') ? undefined : json['number'],
sort: !exists(json, 'sort') ? undefined : SortObjectFromJSON(json['sort']),
empty: !exists(json, 'empty') ? undefined : json['empty'],
};
}
export function PageListUnsubscribeRecipientsToJSON(
value?: PageListUnsubscribeRecipients | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
content:
value.content === undefined
? undefined
: (value.content as Array<any>).map(
ListUnsubscribeRecipientProjectionToJSON
),
pageable: PageableObjectToJSON(value.pageable),
totalPages: value.totalPages,
totalElements: value.totalElements,
last: value.last,
numberOfElements: value.numberOfElements,
first: value.first,
size: value.size,
number: value.number,
sort: SortObjectToJSON(value.sort),
empty: value.empty,
};
}
/* 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';
import {
InboxRulesetDto,
InboxRulesetDtoFromJSON,
InboxRulesetDtoFromJSONTyped,
InboxRulesetDtoToJSON,
PageableObject,
PageableObjectFromJSON,
PageableObjectFromJSONTyped,
PageableObjectToJSON,
SortObject,
SortObjectFromJSON,
SortObjectFromJSONTyped,
SortObjectToJSON,
} from './';
/**
* Paginated inbox ruleset results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls.
* @export
* @interface PageInboxRulesetDto
*/
export interface PageInboxRulesetDto {
/**
*
* @type {Array<InboxRulesetDto>}
* @memberof PageInboxRulesetDto
*/
content?: Array<InboxRulesetDto>;
/**
*
* @type {PageableObject}
* @memberof PageInboxRulesetDto
*/
pageable?: PageableObject;
/**
*
* @type {number}
* @memberof PageInboxRulesetDto
*/
totalPages: number;
/**
*
* @type {number}
* @memberof PageInboxRulesetDto
*/
totalElements: number;
/**
*
* @type {boolean}
* @memberof PageInboxRulesetDto
*/
last?: boolean;
/**
*
* @type {number}
* @memberof PageInboxRulesetDto
*/
numberOfElements?: number;
/**
*
* @type {boolean}
* @memberof PageInboxRulesetDto
*/
first?: boolean;
/**
*
* @type {number}
* @memberof PageInboxRulesetDto
*/
size?: number;
/**
*
* @type {number}
* @memberof PageInboxRulesetDto
*/
number?: number;
/**
*
* @type {SortObject}
* @memberof PageInboxRulesetDto
*/
sort?: SortObject;
/**
*
* @type {boolean}
* @memberof PageInboxRulesetDto
*/
empty?: boolean;
}
export function PageInboxRulesetDtoFromJSON(json: any): PageInboxRulesetDto {
return PageInboxRulesetDtoFromJSONTyped(json, false);
}
export function PageInboxRulesetDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): PageInboxRulesetDto {
if (json === undefined || json === null) {
return json;
}
return {
content: !exists(json, 'content')
? undefined
: (json['content'] as Array<any>).map(InboxRulesetDtoFromJSON),
pageable: !exists(json, 'pageable')
? undefined
: PageableObjectFromJSON(json['pageable']),
totalPages: json['totalPages'],
totalElements: json['totalElements'],
last: !exists(json, 'last') ? undefined : json['last'],
numberOfElements: !exists(json, 'numberOfElements')
? undefined
: json['numberOfElements'],
first: !exists(json, 'first') ? undefined : json['first'],
size: !exists(json, 'size') ? undefined : json['size'],
number: !exists(json, 'number') ? undefined : json['number'],
sort: !exists(json, 'sort') ? undefined : SortObjectFromJSON(json['sort']),
empty: !exists(json, 'empty') ? undefined : json['empty'],
};
}
export function PageInboxRulesetDtoToJSON(
value?: PageInboxRulesetDto | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
content:
value.content === undefined
? undefined
: (value.content as Array<any>).map(InboxRulesetDtoToJSON),
pageable: PageableObjectToJSON(value.pageable),
totalPages: value.totalPages,
totalElements: value.totalElements,
last: value.last,
numberOfElements: value.numberOfElements,
first: value.first,
size: value.size,
number: value.number,
sort: SortObjectToJSON(value.sort),
empty: value.empty,
};
}
/* 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';
import {
InboxReplierEventProjection,
InboxReplierEventProjectionFromJSON,
InboxReplierEventProjectionFromJSONTyped,
InboxReplierEventProjectionToJSON,
PageableObject,
PageableObjectFromJSON,
PageableObjectFromJSONTyped,
PageableObjectToJSON,
SortObject,
SortObjectFromJSON,
SortObjectFromJSONTyped,
SortObjectToJSON,
} from './';
/**
* Paginated inbox replier events. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls.
* @export
* @interface PageInboxReplierEvents
*/
export interface PageInboxReplierEvents {
/**
*
* @type {Array<InboxReplierEventProjection>}
* @memberof PageInboxReplierEvents
*/
content?: Array<InboxReplierEventProjection>;
/**
*
* @type {PageableObject}
* @memberof PageInboxReplierEvents
*/
pageable?: PageableObject;
/**
*
* @type {number}
* @memberof PageInboxReplierEvents
*/
totalPages: number;
/**
*
* @type {number}
* @memberof PageInboxReplierEvents
*/
totalElements: number;
/**
*
* @type {boolean}
* @memberof PageInboxReplierEvents
*/
last?: boolean;
/**
*
* @type {number}
* @memberof PageInboxReplierEvents
*/
numberOfElements?: number;
/**
*
* @type {boolean}
* @memberof PageInboxReplierEvents
*/
first?: boolean;
/**
*
* @type {number}
* @memberof PageInboxReplierEvents
*/
size?: number;
/**
*
* @type {number}
* @memberof PageInboxReplierEvents
*/
number?: number;
/**
*
* @type {SortObject}
* @memberof PageInboxReplierEvents
*/
sort?: SortObject;
/**
*
* @type {boolean}
* @memberof PageInboxReplierEvents
*/
empty?: boolean;
}
export function PageInboxReplierEventsFromJSON(
json: any
): PageInboxReplierEvents {
return PageInboxReplierEventsFromJSONTyped(json, false);
}
export function PageInboxReplierEventsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): PageInboxReplierEvents {
if (json === undefined || json === null) {
return json;
}
return {
content: !exists(json, 'content')
? undefined
: (json['content'] as Array<any>).map(
InboxReplierEventProjectionFromJSON
),
pageable: !exists(json, 'pageable')
? undefined
: PageableObjectFromJSON(json['pageable']),
totalPages: json['totalPages'],
totalElements: json['totalElements'],
last: !exists(json, 'last') ? undefined : json['last'],
numberOfElements: !exists(json, 'numberOfElements')
? undefined
: json['numberOfElements'],
first: !exists(json, 'first') ? undefined : json['first'],
size: !exists(json, 'size') ? undefined : json['size'],
number: !exists(json, 'number') ? undefined : json['number'],
sort: !exists(json, 'sort') ? undefined : SortObjectFromJSON(json['sort']),
empty: !exists(json, 'empty') ? undefined : json['empty'],
};
}
export function PageInboxReplierEventsToJSON(
value?: PageInboxReplierEvents | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
content:
value.content === undefined
? undefined
: (value.content as Array<any>).map(InboxReplierEventProjectionToJSON),
pageable: PageableObjectToJSON(value.pageable),
totalPages: value.totalPages,
totalElements: value.totalElements,
last: value.last,
numberOfElements: value.numberOfElements,
first: value.first,
size: value.size,
number: value.number,
sort: SortObjectToJSON(value.sort),
empty: value.empty,
};
}
/* 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';
import {
InboxReplierDto,
InboxReplierDtoFromJSON,
InboxReplierDtoFromJSONTyped,
InboxReplierDtoToJSON,
PageableObject,
PageableObjectFromJSON,
PageableObjectFromJSONTyped,
PageableObjectToJSON,
SortObject,
SortObjectFromJSON,
SortObjectFromJSONTyped,
SortObjectToJSON,
} from './';
/**
* Paginated inbox replier results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls.
* @export
* @interface PageInboxReplierDto
*/
export interface PageInboxReplierDto {
/**
*
* @type {Array<InboxReplierDto>}
* @memberof PageInboxReplierDto
*/
content?: Array<InboxReplierDto>;
/**
*
* @type {PageableObject}
* @memberof PageInboxReplierDto
*/
pageable?: PageableObject;
/**
*
* @type {number}
* @memberof PageInboxReplierDto
*/
totalPages: number;
/**
*
* @type {number}
* @memberof PageInboxReplierDto
*/
totalElements: number;
/**
*
* @type {boolean}
* @memberof PageInboxReplierDto
*/
last?: boolean;
/**
*
* @type {number}
* @memberof PageInboxReplierDto
*/
numberOfElements?: number;
/**
*
* @type {boolean}
* @memberof PageInboxReplierDto
*/
first?: boolean;
/**
*
* @type {number}
* @memberof PageInboxReplierDto
*/
size?: number;
/**
*
* @type {number}
* @memberof PageInboxReplierDto
*/
number?: number;
/**
*
* @type {SortObject}
* @memberof PageInboxReplierDto
*/
sort?: SortObject;
/**
*
* @type {boolean}
* @memberof PageInboxReplierDto
*/
empty?: boolean;
}
export function PageInboxReplierDtoFromJSON(json: any): PageInboxReplierDto {
return PageInboxReplierDtoFromJSONTyped(json, false);
}
export function PageInboxReplierDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): PageInboxReplierDto {
if (json === undefined || json === null) {
return json;
}
return {
content: !exists(json, 'content')
? undefined
: (json['content'] as Array<any>).map(InboxReplierDtoFromJSON),
pageable: !exists(json, 'pageable')
? undefined
: PageableObjectFromJSON(json['pageable']),
totalPages: json['totalPages'],
totalElements: json['totalElements'],
last: !exists(json, 'last') ? undefined : json['last'],
numberOfElements: !exists(json, 'numberOfElements')
? undefined
: json['numberOfElements'],
first: !exists(json, 'first') ? undefined : json['first'],
size: !exists(json, 'size') ? undefined : json['size'],
number: !exists(json, 'number') ? undefined : json['number'],
sort: !exists(json, 'sort') ? undefined : SortObjectFromJSON(json['sort']),
empty: !exists(json, 'empty') ? undefined : json['empty'],
};
}
export function PageInboxReplierDtoToJSON(
value?: PageInboxReplierDto | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
content:
value.content === undefined
? undefined
: (value.content as Array<any>).map(InboxReplierDtoToJSON),
pageable: PageableObjectToJSON(value.pageable),
totalPages: value.totalPages,
totalElements: value.totalElements,
last: value.last,
numberOfElements: value.numberOfElements,
first: value.first,
size: value.size,
number: value.number,
sort: SortObjectToJSON(value.sort),
empty: value.empty,
};
}
/* 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';
import {
InboxPreview,
InboxPreviewFromJSON,
InboxPreviewFromJSONTyped,
InboxPreviewToJSON,
PageableObject,
PageableObjectFromJSON,
PageableObjectFromJSONTyped,
PageableObjectToJSON,
SortObject,
SortObjectFromJSON,
SortObjectFromJSONTyped,
SortObjectToJSON,
} from './';
/**
* Paginated inbox results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls.
* @export
* @interface PageInboxProjection
*/
export interface PageInboxProjection {
/**
*
* @type {Array<InboxPreview>}
* @memberof PageInboxProjection
*/
content?: Array<InboxPreview>;
/**
*
* @type {PageableObject}
* @memberof PageInboxProjection
*/
pageable?: PageableObject;
/**
*
* @type {number}
* @memberof PageInboxProjection
*/
totalPages: number;
/**
*
* @type {number}
* @memberof PageInboxProjection
*/
totalElements: number;
/**
*
* @type {boolean}
* @memberof PageInboxProjection
*/
last?: boolean;
/**
*
* @type {number}
* @memberof PageInboxProjection
*/
numberOfElements?: number;
/**
*
* @type {boolean}
* @memberof PageInboxProjection
*/
first?: boolean;
/**
*
* @type {number}
* @memberof PageInboxProjection
*/
size?: number;
/**
*
* @type {number}
* @memberof PageInboxProjection
*/
number?: number;
/**
*
* @type {SortObject}
* @memberof PageInboxProjection
*/
sort?: SortObject;
/**
*
* @type {boolean}
* @memberof PageInboxProjection
*/
empty?: boolean;
}
export function PageInboxProjectionFromJSON(json: any): PageInboxProjection {
return PageInboxProjectionFromJSONTyped(json, false);
}
export function PageInboxProjectionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): PageInboxProjection {
if (json === undefined || json === null) {
return json;
}
return {
content: !exists(json, 'content')
? undefined
: (json['content'] as Array<any>).map(InboxPreviewFromJSON),
pageable: !exists(json, 'pageable')
? undefined
: PageableObjectFromJSON(json['pageable']),
totalPages: json['totalPages'],
totalElements: json['totalElements'],
last: !exists(json, 'last') ? undefined : json['last'],
numberOfElements: !exists(json, 'numberOfElements')
? undefined
: json['numberOfElements'],
first: !exists(json, 'first') ? undefined : json['first'],
size: !exists(json, 'size') ? undefined : json['size'],
number: !exists(json, 'number') ? undefined : json['number'],
sort: !exists(json, 'sort') ? undefined : SortObjectFromJSON(json['sort']),
empty: !exists(json, 'empty') ? undefined : json['empty'],
};
}
export function PageInboxProjectionToJSON(
value?: PageInboxProjection | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
content:
value.content === undefined
? undefined
: (value.content as Array<any>).map(InboxPreviewToJSON),
pageable: PageableObjectToJSON(value.pageable),
totalPages: value.totalPages,
totalElements: value.totalElements,
last: value.last,
numberOfElements: value.numberOfElements,
first: value.first,
size: value.size,
number: value.number,
sort: SortObjectToJSON(value.sort),
empty: value.empty,
};
}
/* 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';
import {
InboxForwarderEventProjection,
InboxForwarderEventProjectionFromJSON,
InboxForwarderEventProjectionFromJSONTyped,
InboxForwarderEventProjectionToJSON,
PageableObject,
PageableObjectFromJSON,
PageableObjectFromJSONTyped,
PageableObjectToJSON,
SortObject,
SortObjectFromJSON,
SortObjectFromJSONTyped,
SortObjectToJSON,
} from './';
/**
* Paginated inbox forwarder events. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls.
* @export
* @interface PageInboxForwarderEvents
*/
export interface PageInboxForwarderEvents {
/**
*
* @type {Array<InboxForwarderEventProjection>}
* @memberof PageInboxForwarderEvents
*/
content?: Array<InboxForwarderEventProjection>;
/**
*
* @type {PageableObject}
* @memberof PageInboxForwarderEvents
*/
pageable?: PageableObject;
/**
*
* @type {number}
* @memberof PageInboxForwarderEvents
*/
totalPages: number;
/**
*
* @type {number}
* @memberof PageInboxForwarderEvents
*/
totalElements: number;
/**
*
* @type {boolean}
* @memberof PageInboxForwarderEvents
*/
last?: boolean;
/**
*
* @type {number}
* @memberof PageInboxForwarderEvents
*/
numberOfElements?: number;
/**
*
* @type {boolean}
* @memberof PageInboxForwarderEvents
*/
first?: boolean;
/**
*
* @type {number}
* @memberof PageInboxForwarderEvents
*/
size?: number;
/**
*
* @type {number}
* @memberof PageInboxForwarderEvents
*/
number?: number;
/**
*
* @type {SortObject}
* @memberof PageInboxForwarderEvents
*/
sort?: SortObject;
/**
*
* @type {boolean}
* @memberof PageInboxForwarderEvents
*/
empty?: boolean;
}
export function PageInboxForwarderEventsFromJSON(
json: any
): PageInboxForwarderEvents {
return PageInboxForwarderEventsFromJSONTyped(json, false);
}
export function PageInboxForwarderEventsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): PageInboxForwarderEvents {
if (json === undefined || json === null) {
return json;
}
return {
content: !exists(json, 'content')
? undefined
: (json['content'] as Array<any>).map(
InboxForwarderEventProjectionFromJSON
),
pageable: !exists(json, 'pageable')
? undefined
: PageableObjectFromJSON(json['pageable']),
totalPages: json['totalPages'],
totalElements: json['totalElements'],
last: !exists(json, 'last') ? undefined : json['last'],
numberOfElements: !exists(json, 'numberOfElements')
? undefined
: json['numberOfElements'],
first: !exists(json, 'first') ? undefined : json['first'],
size: !exists(json, 'size') ? undefined : json['size'],
number: !exists(json, 'number') ? undefined : json['number'],
sort: !exists(json, 'sort') ? undefined : SortObjectFromJSON(json['sort']),
empty: !exists(json, 'empty') ? undefined : json['empty'],
};
}
export function PageInboxForwarderEventsToJSON(
value?: PageInboxForwarderEvents | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
content:
value.content === undefined
? undefined
: (value.content as Array<any>).map(
InboxForwarderEventProjectionToJSON
),
pageable: PageableObjectToJSON(value.pageable),
totalPages: value.totalPages,
totalElements: value.totalElements,
last: value.last,
numberOfElements: value.numberOfElements,
first: value.first,
size: value.size,
number: value.number,
sort: SortObjectToJSON(value.sort),
empty: value.empty,
};
}
/* 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';
import {
InboxForwarderDto,
InboxForwarderDtoFromJSON,
InboxForwarderDtoFromJSONTyped,
InboxForwarderDtoToJSON,
PageableObject,
PageableObjectFromJSON,
PageableObjectFromJSONTyped,
PageableObjectToJSON,
SortObject,
SortObjectFromJSON,
SortObjectFromJSONTyped,
SortObjectToJSON,
} from './';
/**
* Paginated inbox forwarder results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls.
* @export
* @interface PageInboxForwarderDto
*/
export interface PageInboxForwarderDto {
/**
*
* @type {Array<InboxForwarderDto>}
* @memberof PageInboxForwarderDto
*/
content?: Array<InboxForwarderDto>;
/**
*
* @type {PageableObject}
* @memberof PageInboxForwarderDto
*/
pageable?: PageableObject;
/**
*
* @type {number}
* @memberof PageInboxForwarderDto
*/
totalPages: number;
/**
*
* @type {number}
* @memberof PageInboxForwarderDto
*/
totalElements: number;
/**
*
* @type {boolean}
* @memberof PageInboxForwarderDto
*/
last?: boolean;
/**
*
* @type {number}
* @memberof PageInboxForwarderDto
*/
numberOfElements?: number;
/**
*
* @type {boolean}
* @memberof PageInboxForwarderDto
*/
first?: boolean;
/**
*
* @type {number}
* @memberof PageInboxForwarderDto
*/
size?: number;
/**
*
* @type {number}
* @memberof PageInboxForwarderDto
*/
number?: number;
/**
*
* @type {SortObject}
* @memberof PageInboxForwarderDto
*/
sort?: SortObject;
/**
*
* @type {boolean}
* @memberof PageInboxForwarderDto
*/
empty?: boolean;
}
export function PageInboxForwarderDtoFromJSON(
json: any
): PageInboxForwarderDto {
return PageInboxForwarderDtoFromJSONTyped(json, false);
}
export function PageInboxForwarderDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): PageInboxForwarderDto {
if (json === undefined || json === null) {
return json;
}
return {
content: !exists(json, 'content')
? undefined
: (json['content'] as Array<any>).map(InboxForwarderDtoFromJSON),
pageable: !exists(json, 'pageable')
? undefined
: PageableObjectFromJSON(json['pageable']),
totalPages: json['totalPages'],
totalElements: json['totalElements'],
last: !exists(json, 'last') ? undefined : json['last'],
numberOfElements: !exists(json, 'numberOfElements')
? undefined
: json['numberOfElements'],
first: !exists(json, 'first') ? undefined : json['first'],
size: !exists(json, 'size') ? undefined : json['size'],
number: !exists(json, 'number') ? undefined : json['number'],
sort: !exists(json, 'sort') ? undefined : SortObjectFromJSON(json['sort']),
empty: !exists(json, 'empty') ? undefined : json['empty'],
};
}
export function PageInboxForwarderDtoToJSON(
value?: PageInboxForwarderDto | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
content:
value.content === undefined
? undefined
: (value.content as Array<any>).map(InboxForwarderDtoToJSON),
pageable: PageableObjectToJSON(value.pageable),
totalPages: value.totalPages,
totalElements: value.totalElements,
last: value.last,
numberOfElements: value.numberOfElements,
first: value.first,
size: value.size,
number: value.number,
sort: SortObjectToJSON(value.sort),
empty: value.empty,
};
}
/* 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';
import {
GroupProjection,
GroupProjectionFromJSON,
GroupProjectionFromJSONTyped,
GroupProjectionToJSON,
PageableObject,
PageableObjectFromJSON,
PageableObjectFromJSONTyped,
PageableObjectToJSON,
SortObject,
SortObjectFromJSON,
SortObjectFromJSONTyped,
SortObjectToJSON,
} from './';
/**
* Paginated missed email results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls.
* @export
* @interface PageGroupProjection
*/
export interface PageGroupProjection {
/**
*
* @type {Array<GroupProjection>}
* @memberof PageGroupProjection
*/
content?: Array<GroupProjection>;
/**
*
* @type {PageableObject}
* @memberof PageGroupProjection
*/
pageable?: PageableObject;
/**
*
* @type {number}
* @memberof PageGroupProjection
*/
totalPages: number;
/**
*
* @type {number}
* @memberof PageGroupProjection
*/
totalElements: number;
/**
*
* @type {boolean}
* @memberof PageGroupProjection
*/
last?: boolean;
/**
*
* @type {number}
* @memberof PageGroupProjection
*/
numberOfElements?: number;
/**
*
* @type {boolean}
* @memberof PageGroupProjection
*/
first?: boolean;
/**
*
* @type {number}
* @memberof PageGroupProjection
*/
size?: number;
/**
*
* @type {number}
* @memberof PageGroupProjection
*/
number?: number;
/**
*
* @type {SortObject}
* @memberof PageGroupProjection
*/
sort?: SortObject;
/**
*
* @type {boolean}
* @memberof PageGroupProjection
*/
empty?: boolean;
}
export function PageGroupProjectionFromJSON(json: any): PageGroupProjection {
return PageGroupProjectionFromJSONTyped(json, false);
}
export function PageGroupProjectionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): PageGroupProjection {
if (json === undefined || json === null) {
return json;
}
return {
content: !exists(json, 'content')
? undefined
: (json['content'] as Array<any>).map(GroupProjectionFromJSON),
pageable: !exists(json, 'pageable')
? undefined
: PageableObjectFromJSON(json['pageable']),
totalPages: json['totalPages'],
totalElements: json['totalElements'],
last: !exists(json, 'last') ? undefined : json['last'],
numberOfElements: !exists(json, 'numberOfElements')
? undefined
: json['numberOfElements'],
first: !exists(json, 'first') ? undefined : json['first'],
size: !exists(json, 'size') ? undefined : json['size'],
number: !exists(json, 'number') ? undefined : json['number'],
sort: !exists(json, 'sort') ? undefined : SortObjectFromJSON(json['sort']),
empty: !exists(json, 'empty') ? undefined : json['empty'],
};
}
export function PageGroupProjectionToJSON(
value?: PageGroupProjection | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
content:
value.content === undefined
? undefined
: (value.content as Array<any>).map(GroupProjectionToJSON),
pageable: PageableObjectToJSON(value.pageable),
totalPages: value.totalPages,
totalElements: value.totalElements,
last: value.last,
numberOfElements: value.numberOfElements,
first: value.first,
size: value.size,
number: value.number,
sort: SortObjectToJSON(value.sort),
empty: value.empty,
};
}
/* 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';
import {
ExpiredInboxRecordProjection,
ExpiredInboxRecordProjectionFromJSON,
ExpiredInboxRecordProjectionFromJSONTyped,
ExpiredInboxRecordProjectionToJSON,
PageableObject,
PageableObjectFromJSON,
PageableObjectFromJSONTyped,
PageableObjectToJSON,
SortObject,
SortObjectFromJSON,
SortObjectFromJSONTyped,
SortObjectToJSON,
} from './';
/**
* Paginated expired inbox results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls.
* @export
* @interface PageExpiredInboxRecordProjection
*/
export interface PageExpiredInboxRecordProjection {
/**
*
* @type {Array<ExpiredInboxRecordProjection>}
* @memberof PageExpiredInboxRecordProjection
*/
content?: Array<ExpiredInboxRecordProjection>;
/**
*
* @type {PageableObject}
* @memberof PageExpiredInboxRecordProjection
*/
pageable?: PageableObject;
/**
*
* @type {number}
* @memberof PageExpiredInboxRecordProjection
*/
totalPages: number;
/**
*
* @type {number}
* @memberof PageExpiredInboxRecordProjection
*/
totalElements: number;
/**
*
* @type {boolean}
* @memberof PageExpiredInboxRecordProjection
*/
last?: boolean;
/**
*
* @type {number}
* @memberof PageExpiredInboxRecordProjection
*/
numberOfElements?: number;
/**
*
* @type {boolean}
* @memberof PageExpiredInboxRecordProjection
*/
first?: boolean;
/**
*
* @type {number}
* @memberof PageExpiredInboxRecordProjection
*/
size?: number;
/**
*
* @type {number}
* @memberof PageExpiredInboxRecordProjection
*/
number?: number;
/**
*
* @type {SortObject}
* @memberof PageExpiredInboxRecordProjection
*/
sort?: SortObject;
/**
*
* @type {boolean}
* @memberof PageExpiredInboxRecordProjection
*/
empty?: boolean;
}
export function PageExpiredInboxRecordProjectionFromJSON(
json: any
): PageExpiredInboxRecordProjection {
return PageExpiredInboxRecordProjectionFromJSONTyped(json, false);
}
export function PageExpiredInboxRecordProjectionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): PageExpiredInboxRecordProjection {
if (json === undefined || json === null) {
return json;
}
return {
content: !exists(json, 'content')
? undefined
: (json['content'] as Array<any>).map(
ExpiredInboxRecordProjectionFromJSON
),
pageable: !exists(json, 'pageable')
? undefined
: PageableObjectFromJSON(json['pageable']),
totalPages: json['totalPages'],
totalElements: json['totalElements'],
last: !exists(json, 'last') ? undefined : json['last'],
numberOfElements: !exists(json, 'numberOfElements')
? undefined
: json['numberOfElements'],
first: !exists(json, 'first') ? undefined : json['first'],
size: !exists(json, 'size') ? undefined : json['size'],
number: !exists(json, 'number') ? undefined : json['number'],
sort: !exists(json, 'sort') ? undefined : SortObjectFromJSON(json['sort']),
empty: !exists(json, 'empty') ? undefined : json['empty'],
};
}
export function PageExpiredInboxRecordProjectionToJSON(
value?: PageExpiredInboxRecordProjection | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
content:
value.content === undefined
? undefined
: (value.content as Array<any>).map(ExpiredInboxRecordProjectionToJSON),
pageable: PageableObjectToJSON(value.pageable),
totalPages: value.totalPages,
totalElements: value.totalElements,
last: value.last,
numberOfElements: value.numberOfElements,
first: value.first,
size: value.size,
number: value.number,
sort: SortObjectToJSON(value.sort),
empty: value.empty,
};
}
/* 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';
import {
EmailValidationRequestDto,
EmailValidationRequestDtoFromJSON,
EmailValidationRequestDtoFromJSONTyped,
EmailValidationRequestDtoToJSON,
PageableObject,
PageableObjectFromJSON,
PageableObjectFromJSONTyped,
PageableObjectToJSON,
SortObject,
SortObjectFromJSON,
SortObjectFromJSONTyped,
SortObjectToJSON,
} from './';
/**
* Paginated email validation request records. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls.
* @export
* @interface PageEmailValidationRequest
*/
export interface PageEmailValidationRequest {
/**
*
* @type {Array<EmailValidationRequestDto>}
* @memberof PageEmailValidationRequest
*/
content?: Array<EmailValidationRequestDto>;
/**
*
* @type {PageableObject}
* @memberof PageEmailValidationRequest
*/
pageable?: PageableObject;
/**
*
* @type {number}
* @memberof PageEmailValidationRequest
*/
totalPages: number;
/**
*
* @type {number}
* @memberof PageEmailValidationRequest
*/
totalElements: number;
/**
*
* @type {boolean}
* @memberof PageEmailValidationRequest
*/
last?: boolean;
/**
*
* @type {number}
* @memberof PageEmailValidationRequest
*/
numberOfElements?: number;
/**
*
* @type {boolean}
* @memberof PageEmailValidationRequest
*/
first?: boolean;
/**
*
* @type {number}
* @memberof PageEmailValidationRequest
*/
size?: number;
/**
*
* @type {number}
* @memberof PageEmailValidationRequest
*/
number?: number;
/**
*
* @type {SortObject}
* @memberof PageEmailValidationRequest
*/
sort?: SortObject;
/**
*
* @type {boolean}
* @memberof PageEmailValidationRequest
*/
empty?: boolean;
}
export function PageEmailValidationRequestFromJSON(
json: any
): PageEmailValidationRequest {
return PageEmailValidationRequestFromJSONTyped(json, false);
}
export function PageEmailValidationRequestFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): PageEmailValidationRequest {
if (json === undefined || json === null) {
return json;
}
return {
content: !exists(json, 'content')
? undefined
: (json['content'] as Array<any>).map(EmailValidationRequestDtoFromJSON),
pageable: !exists(json, 'pageable')
? undefined
: PageableObjectFromJSON(json['pageable']),
totalPages: json['totalPages'],
totalElements: json['totalElements'],
last: !exists(json, 'last') ? undefined : json['last'],
numberOfElements: !exists(json, 'numberOfElements')
? undefined
: json['numberOfElements'],
first: !exists(json, 'first') ? undefined : json['first'],
size: !exists(json, 'size') ? undefined : json['size'],
number: !exists(json, 'number') ? undefined : json['number'],
sort: !exists(json, 'sort') ? undefined : SortObjectFromJSON(json['sort']),
empty: !exists(json, 'empty') ? undefined : json['empty'],
};
}
export function PageEmailValidationRequestToJSON(
value?: PageEmailValidationRequest | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
content:
value.content === undefined
? undefined
: (value.content as Array<any>).map(EmailValidationRequestDtoToJSON),
pageable: PageableObjectToJSON(value.pageable),
totalPages: value.totalPages,
totalElements: value.totalElements,
last: value.last,
numberOfElements: value.numberOfElements,
first: value.first,
size: value.size,
number: value.number,
sort: SortObjectToJSON(value.sort),
empty: value.empty,
};
}
/* 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';
import {
EmailProjection,
EmailProjectionFromJSON,
EmailProjectionFromJSONTyped,
EmailProjectionToJSON,
PageableObject,
PageableObjectFromJSON,
PageableObjectFromJSONTyped,
PageableObjectToJSON,
SortObject,
SortObjectFromJSON,
SortObjectFromJSONTyped,
SortObjectToJSON,
} from './';
/**
* Paginated email projection results. EmailProjections and EmailPreviews are essentially the same but have legacy naming issues. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full email entity use the projection ID with individual method calls. For emails there are several methods for fetching message bodies and attachments.
* @export
* @interface PageEmailProjection
*/
export interface PageEmailProjection {
/**
*
* @type {Array<EmailProjection>}
* @memberof PageEmailProjection
*/
content?: Array<EmailProjection>;
/**
*
* @type {PageableObject}
* @memberof PageEmailProjection
*/
pageable?: PageableObject;
/**
*
* @type {number}
* @memberof PageEmailProjection
*/
totalPages: number;
/**
*
* @type {number}
* @memberof PageEmailProjection
*/
totalElements: number;
/**
*
* @type {boolean}
* @memberof PageEmailProjection
*/
last?: boolean;
/**
*
* @type {number}
* @memberof PageEmailProjection
*/
numberOfElements?: number;
/**
*
* @type {boolean}
* @memberof PageEmailProjection
*/
first?: boolean;
/**
*
* @type {number}
* @memberof PageEmailProjection
*/
size?: number;
/**
*
* @type {number}
* @memberof PageEmailProjection
*/
number?: number;
/**
*
* @type {SortObject}
* @memberof PageEmailProjection
*/
sort?: SortObject;
/**
*
* @type {boolean}
* @memberof PageEmailProjection
*/
empty?: boolean;
}
export function PageEmailProjectionFromJSON(json: any): PageEmailProjection {
return PageEmailProjectionFromJSONTyped(json, false);
}
export function PageEmailProjectionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): PageEmailProjection {
if (json === undefined || json === null) {
return json;
}
return {
content: !exists(json, 'content')
? undefined
: (json['content'] as Array<any>).map(EmailProjectionFromJSON),
pageable: !exists(json, 'pageable')
? undefined
: PageableObjectFromJSON(json['pageable']),
totalPages: json['totalPages'],
totalElements: json['totalElements'],
last: !exists(json, 'last') ? undefined : json['last'],
numberOfElements: !exists(json, 'numberOfElements')
? undefined
: json['numberOfElements'],
first: !exists(json, 'first') ? undefined : json['first'],
size: !exists(json, 'size') ? undefined : json['size'],
number: !exists(json, 'number') ? undefined : json['number'],
sort: !exists(json, 'sort') ? undefined : SortObjectFromJSON(json['sort']),
empty: !exists(json, 'empty') ? undefined : json['empty'],
};
}
export function PageEmailProjectionToJSON(
value?: PageEmailProjection | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
content:
value.content === undefined
? undefined
: (value.content as Array<any>).map(EmailProjectionToJSON),
pageable: PageableObjectToJSON(value.pageable),
totalPages: value.totalPages,
totalElements: value.totalElements,
last: value.last,
numberOfElements: value.numberOfElements,
first: value.first,
size: value.size,
number: value.number,
sort: SortObjectToJSON(value.sort),
empty: value.empty,
};
}
/* 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';
import {
EmailPreview,
EmailPreviewFromJSON,
EmailPreviewFromJSONTyped,
EmailPreviewToJSON,
PageableObject,
PageableObjectFromJSON,
PageableObjectFromJSONTyped,
PageableObjectToJSON,
SortObject,
SortObjectFromJSON,
SortObjectFromJSONTyped,
SortObjectToJSON,
} from './';
/**
* Paginated email preview results. EmailProjections and EmailPreviews are essentially the same but have legacy naming issues. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. For emails there are several methods for fetching message bodies and attachments.
* @export
* @interface PageEmailPreview
*/
export interface PageEmailPreview {
/**
*
* @type {Array<EmailPreview>}
* @memberof PageEmailPreview
*/
content?: Array<EmailPreview>;
/**
*
* @type {PageableObject}
* @memberof PageEmailPreview
*/
pageable?: PageableObject;
/**
*
* @type {number}
* @memberof PageEmailPreview
*/
totalPages: number;
/**
*
* @type {number}
* @memberof PageEmailPreview
*/
totalElements: number;
/**
*
* @type {boolean}
* @memberof PageEmailPreview
*/
last?: boolean;
/**
*
* @type {number}
* @memberof PageEmailPreview
*/
numberOfElements?: number;
/**
*
* @type {boolean}
* @memberof PageEmailPreview
*/
first?: boolean;
/**
*
* @type {number}
* @memberof PageEmailPreview
*/
size?: number;
/**
*
* @type {number}
* @memberof PageEmailPreview
*/
number?: number;
/**
*
* @type {SortObject}
* @memberof PageEmailPreview
*/
sort?: SortObject;
/**
*
* @type {boolean}
* @memberof PageEmailPreview
*/
empty?: boolean;
}
export function PageEmailPreviewFromJSON(json: any): PageEmailPreview {
return PageEmailPreviewFromJSONTyped(json, false);
}
export function PageEmailPreviewFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): PageEmailPreview {
if (json === undefined || json === null) {
return json;
}
return {
content: !exists(json, 'content')
? undefined
: (json['content'] as Array<any>).map(EmailPreviewFromJSON),
pageable: !exists(json, 'pageable')
? undefined
: PageableObjectFromJSON(json['pageable']),
totalPages: json['totalPages'],
totalElements: json['totalElements'],
last: !exists(json, 'last') ? undefined : json['last'],
numberOfElements: !exists(json, 'numberOfElements')
? undefined
: json['numberOfElements'],
first: !exists(json, 'first') ? undefined : json['first'],
size: !exists(json, 'size') ? undefined : json['size'],
number: !exists(json, 'number') ? undefined : json['number'],
sort: !exists(json, 'sort') ? undefined : SortObjectFromJSON(json['sort']),
empty: !exists(json, 'empty') ? undefined : json['empty'],
};
}
export function PageEmailPreviewToJSON(value?: PageEmailPreview | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
content:
value.content === undefined
? undefined
: (value.content as Array<any>).map(EmailPreviewToJSON),
pageable: PageableObjectToJSON(value.pageable),
totalPages: value.totalPages,
totalElements: value.totalElements,
last: value.last,
numberOfElements: value.numberOfElements,
first: value.first,
size: value.size,
number: value.number,
sort: SortObjectToJSON(value.sort),
empty: value.empty,
};
}
/* 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';
import {
DeliveryStatusDto,
DeliveryStatusDtoFromJSON,
DeliveryStatusDtoFromJSONTyped,
DeliveryStatusDtoToJSON,
PageableObject,
PageableObjectFromJSON,
PageableObjectFromJSONTyped,
PageableObjectToJSON,
SortObject,
SortObjectFromJSON,
SortObjectFromJSONTyped,
SortObjectToJSON,
} from './';
/**
* Paginated delivery status results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls.
* @export
* @interface PageDeliveryStatus
*/
export interface PageDeliveryStatus {
/**
*
* @type {Array<DeliveryStatusDto>}
* @memberof PageDeliveryStatus
*/
content?: Array<DeliveryStatusDto>;
/**
*
* @type {PageableObject}
* @memberof PageDeliveryStatus
*/
pageable?: PageableObject;
/**
*
* @type {number}
* @memberof PageDeliveryStatus
*/
totalPages: number;
/**
*
* @type {number}
* @memberof PageDeliveryStatus
*/
totalElements: number;
/**
*
* @type {boolean}
* @memberof PageDeliveryStatus
*/
last?: boolean;
/**
*
* @type {number}
* @memberof PageDeliveryStatus
*/
numberOfElements?: number;
/**
*
* @type {boolean}
* @memberof PageDeliveryStatus
*/
first?: boolean;
/**
*
* @type {number}
* @memberof PageDeliveryStatus
*/
size?: number;
/**
*
* @type {number}
* @memberof PageDeliveryStatus
*/
number?: number;
/**
*
* @type {SortObject}
* @memberof PageDeliveryStatus
*/
sort?: SortObject;
/**
*
* @type {boolean}
* @memberof PageDeliveryStatus
*/
empty?: boolean;
}
export function PageDeliveryStatusFromJSON(json: any): PageDeliveryStatus {
return PageDeliveryStatusFromJSONTyped(json, false);
}
export function PageDeliveryStatusFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): PageDeliveryStatus {
if (json === undefined || json === null) {
return json;
}
return {
content: !exists(json, 'content')
? undefined
: (json['content'] as Array<any>).map(DeliveryStatusDtoFromJSON),
pageable: !exists(json, 'pageable')
? undefined
: PageableObjectFromJSON(json['pageable']),
totalPages: json['totalPages'],
totalElements: json['totalElements'],
last: !exists(json, 'last') ? undefined : json['last'],
numberOfElements: !exists(json, 'numberOfElements')
? undefined
: json['numberOfElements'],
first: !exists(json, 'first') ? undefined : json['first'],
size: !exists(json, 'size') ? undefined : json['size'],
number: !exists(json, 'number') ? undefined : json['number'],
sort: !exists(json, 'sort') ? undefined : SortObjectFromJSON(json['sort']),
empty: !exists(json, 'empty') ? undefined : json['empty'],
};
}
export function PageDeliveryStatusToJSON(
value?: PageDeliveryStatus | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
content:
value.content === undefined
? undefined
: (value.content as Array<any>).map(DeliveryStatusDtoToJSON),
pageable: PageableObjectToJSON(value.pageable),
totalPages: value.totalPages,
totalElements: value.totalElements,
last: value.last,
numberOfElements: value.numberOfElements,
first: value.first,
size: value.size,
number: value.number,
sort: SortObjectToJSON(value.sort),
empty: value.empty,
};
}
/* 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';
import {
ContactProjection,
ContactProjectionFromJSON,
ContactProjectionFromJSONTyped,
ContactProjectionToJSON,
PageableObject,
PageableObjectFromJSON,
PageableObjectFromJSONTyped,
PageableObjectToJSON,
SortObject,
SortObjectFromJSON,
SortObjectFromJSONTyped,
SortObjectToJSON,
} from './';
/**
* Paginated contact results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls.
* @export
* @interface PageContactProjection
*/
export interface PageContactProjection {
/**
*
* @type {Array<ContactProjection>}
* @memberof PageContactProjection
*/
content?: Array<ContactProjection>;
/**
*
* @type {PageableObject}
* @memberof PageContactProjection
*/
pageable?: PageableObject;
/**
*
* @type {number}
* @memberof PageContactProjection
*/
totalPages: number;
/**
*
* @type {number}
* @memberof PageContactProjection
*/
totalElements: number;
/**
*
* @type {boolean}
* @memberof PageContactProjection
*/
last?: boolean;
/**
*
* @type {number}
* @memberof PageContactProjection
*/
numberOfElements?: number;
/**
*
* @type {boolean}
* @memberof PageContactProjection
*/
first?: boolean;
/**
*
* @type {number}
* @memberof PageContactProjection
*/
size?: number;
/**
*
* @type {number}
* @memberof PageContactProjection
*/
number?: number;
/**
*
* @type {SortObject}
* @memberof PageContactProjection
*/
sort?: SortObject;
/**
*
* @type {boolean}
* @memberof PageContactProjection
*/
empty?: boolean;
}
export function PageContactProjectionFromJSON(
json: any
): PageContactProjection {
return PageContactProjectionFromJSONTyped(json, false);
}
export function PageContactProjectionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): PageContactProjection {
if (json === undefined || json === null) {
return json;
}
return {
content: !exists(json, 'content')
? undefined
: (json['content'] as Array<any>).map(ContactProjectionFromJSON),
pageable: !exists(json, 'pageable')
? undefined
: PageableObjectFromJSON(json['pageable']),
totalPages: json['totalPages'],
totalElements: json['totalElements'],
last: !exists(json, 'last') ? undefined : json['last'],
numberOfElements: !exists(json, 'numberOfElements')
? undefined
: json['numberOfElements'],
first: !exists(json, 'first') ? undefined : json['first'],
size: !exists(json, 'size') ? undefined : json['size'],
number: !exists(json, 'number') ? undefined : json['number'],
sort: !exists(json, 'sort') ? undefined : SortObjectFromJSON(json['sort']),
empty: !exists(json, 'empty') ? undefined : json['empty'],
};
}
export function PageContactProjectionToJSON(
value?: PageContactProjection | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
content:
value.content === undefined
? undefined
: (value.content as Array<any>).map(ContactProjectionToJSON),
pageable: PageableObjectToJSON(value.pageable),
totalPages: value.totalPages,
totalElements: value.totalElements,
last: value.last,
numberOfElements: value.numberOfElements,
first: value.first,
size: value.size,
number: value.number,
sort: SortObjectToJSON(value.sort),
empty: value.empty,
};
}
/* 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';
import {
ConnectorSyncEventProjection,
ConnectorSyncEventProjectionFromJSON,
ConnectorSyncEventProjectionFromJSONTyped,
ConnectorSyncEventProjectionToJSON,
PageableObject,
PageableObjectFromJSON,
PageableObjectFromJSONTyped,
PageableObjectToJSON,
SortObject,
SortObjectFromJSON,
SortObjectFromJSONTyped,
SortObjectToJSON,
} from './';
/**
* Paginated inbox connector sync events. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls.
* @export
* @interface PageConnectorSyncEvents
*/
export interface PageConnectorSyncEvents {
/**
*
* @type {Array<ConnectorSyncEventProjection>}
* @memberof PageConnectorSyncEvents
*/
content?: Array<ConnectorSyncEventProjection>;
/**
*
* @type {PageableObject}
* @memberof PageConnectorSyncEvents
*/
pageable?: PageableObject;
/**
*
* @type {number}
* @memberof PageConnectorSyncEvents
*/
totalPages: number;
/**
*
* @type {number}
* @memberof PageConnectorSyncEvents
*/
totalElements: number;
/**
*
* @type {boolean}
* @memberof PageConnectorSyncEvents
*/
last?: boolean;
/**
*
* @type {number}
* @memberof PageConnectorSyncEvents
*/
numberOfElements?: number;
/**
*
* @type {boolean}
* @memberof PageConnectorSyncEvents
*/
first?: boolean;
/**
*
* @type {number}
* @memberof PageConnectorSyncEvents
*/
size?: number;
/**
*
* @type {number}
* @memberof PageConnectorSyncEvents
*/
number?: number;
/**
*
* @type {SortObject}
* @memberof PageConnectorSyncEvents
*/
sort?: SortObject;
/**
*
* @type {boolean}
* @memberof PageConnectorSyncEvents
*/
empty?: boolean;
}
export function PageConnectorSyncEventsFromJSON(
json: any
): PageConnectorSyncEvents {
return PageConnectorSyncEventsFromJSONTyped(json, false);
}
export function PageConnectorSyncEventsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): PageConnectorSyncEvents {
if (json === undefined || json === null) {
return json;
}
return {
content: !exists(json, 'content')
? undefined
: (json['content'] as Array<any>).map(
ConnectorSyncEventProjectionFromJSON
),
pageable: !exists(json, 'pageable')
? undefined
: PageableObjectFromJSON(json['pageable']),
totalPages: json['totalPages'],
totalElements: json['totalElements'],
last: !exists(json, 'last') ? undefined : json['last'],
numberOfElements: !exists(json, 'numberOfElements')
? undefined
: json['numberOfElements'],
first: !exists(json, 'first') ? undefined : json['first'],
size: !exists(json, 'size') ? undefined : json['size'],
number: !exists(json, 'number') ? undefined : json['number'],
sort: !exists(json, 'sort') ? undefined : SortObjectFromJSON(json['sort']),
empty: !exists(json, 'empty') ? undefined : json['empty'],
};
}
export function PageConnectorSyncEventsToJSON(
value?: PageConnectorSyncEvents | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
content:
value.content === undefined
? undefined
: (value.content as Array<any>).map(ConnectorSyncEventProjectionToJSON),
pageable: PageableObjectToJSON(value.pageable),
totalPages: value.totalPages,
totalElements: value.totalElements,
last: value.last,
numberOfElements: value.numberOfElements,
first: value.first,
size: value.size,
number: value.number,
sort: SortObjectToJSON(value.sort),
empty: value.empty,
};
}
/* 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';
import {
ConnectorProjection,
ConnectorProjectionFromJSON,
ConnectorProjectionFromJSONTyped,
ConnectorProjectionToJSON,
PageableObject,
PageableObjectFromJSON,
PageableObjectFromJSONTyped,
PageableObjectToJSON,
SortObject,
SortObjectFromJSON,
SortObjectFromJSONTyped,
SortObjectToJSON,
} from './';
/**
* Paginated inbox connectors. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls.
* @export
* @interface PageConnector
*/
export interface PageConnector {
/**
*
* @type {Array<ConnectorProjection>}
* @memberof PageConnector
*/
content?: Array<ConnectorProjection>;
/**
*
* @type {PageableObject}
* @memberof PageConnector
*/
pageable?: PageableObject;
/**
*
* @type {number}
* @memberof PageConnector
*/
totalPages: number;
/**
*
* @type {number}
* @memberof PageConnector
*/
totalElements: number;
/**
*
* @type {boolean}
* @memberof PageConnector
*/
last?: boolean;
/**
*
* @type {number}
* @memberof PageConnector
*/
numberOfElements?: number;
/**
*
* @type {boolean}
* @memberof PageConnector
*/
first?: boolean;
/**
*
* @type {number}
* @memberof PageConnector
*/
size?: number;
/**
*
* @type {number}
* @memberof PageConnector
*/
number?: number;
/**
*
* @type {SortObject}
* @memberof PageConnector
*/
sort?: SortObject;
/**
*
* @type {boolean}
* @memberof PageConnector
*/
empty?: boolean;
}
export function PageConnectorFromJSON(json: any): PageConnector {
return PageConnectorFromJSONTyped(json, false);
}
export function PageConnectorFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): PageConnector {
if (json === undefined || json === null) {
return json;
}
return {
content: !exists(json, 'content')
? undefined
: (json['content'] as Array<any>).map(ConnectorProjectionFromJSON),
pageable: !exists(json, 'pageable')
? undefined
: PageableObjectFromJSON(json['pageable']),
totalPages: json['totalPages'],
totalElements: json['totalElements'],
last: !exists(json, 'last') ? undefined : json['last'],
numberOfElements: !exists(json, 'numberOfElements')
? undefined
: json['numberOfElements'],
first: !exists(json, 'first') ? undefined : json['first'],
size: !exists(json, 'size') ? undefined : json['size'],
number: !exists(json, 'number') ? undefined : json['number'],
sort: !exists(json, 'sort') ? undefined : SortObjectFromJSON(json['sort']),
empty: !exists(json, 'empty') ? undefined : json['empty'],
};
}
export function PageConnectorToJSON(value?: PageConnector | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
content:
value.content === undefined
? undefined
: (value.content as Array<any>).map(ConnectorProjectionToJSON),
pageable: PageableObjectToJSON(value.pageable),
totalPages: value.totalPages,
totalElements: value.totalElements,
last: value.last,
numberOfElements: value.numberOfElements,
first: value.first,
size: value.size,
number: value.number,
sort: SortObjectToJSON(value.sort),
empty: value.empty,
};
}
/* 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';
import {
Complaint,
ComplaintFromJSON,
ComplaintFromJSONTyped,
ComplaintToJSON,
PageableObject,
PageableObjectFromJSON,
PageableObjectFromJSONTyped,
PageableObjectToJSON,
SortObject,
SortObjectFromJSON,
SortObjectFromJSONTyped,
SortObjectToJSON,
} from './';
/**
* Paginated complaint email. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls.
* @export
* @interface PageComplaint
*/
export interface PageComplaint {
/**
*
* @type {Array<Complaint>}
* @memberof PageComplaint
*/
content?: Array<Complaint>;
/**
*
* @type {PageableObject}
* @memberof PageComplaint
*/
pageable?: PageableObject;
/**
*
* @type {number}
* @memberof PageComplaint
*/
totalPages: number;
/**
*
* @type {number}
* @memberof PageComplaint
*/
totalElements: number;
/**
*
* @type {boolean}
* @memberof PageComplaint
*/
last?: boolean;
/**
*
* @type {number}
* @memberof PageComplaint
*/
numberOfElements?: number;
/**
*
* @type {boolean}
* @memberof PageComplaint
*/
first?: boolean;
/**
*
* @type {number}
* @memberof PageComplaint
*/
size?: number;
/**
*
* @type {number}
* @memberof PageComplaint
*/
number?: number;
/**
*
* @type {SortObject}
* @memberof PageComplaint
*/
sort?: SortObject;
/**
*
* @type {boolean}
* @memberof PageComplaint
*/
empty?: boolean;
}
export function PageComplaintFromJSON(json: any): PageComplaint {
return PageComplaintFromJSONTyped(json, false);
}
export function PageComplaintFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): PageComplaint {
if (json === undefined || json === null) {
return json;
}
return {
content: !exists(json, 'content')
? undefined
: (json['content'] as Array<any>).map(ComplaintFromJSON),
pageable: !exists(json, 'pageable')
? undefined
: PageableObjectFromJSON(json['pageable']),
totalPages: json['totalPages'],
totalElements: json['totalElements'],
last: !exists(json, 'last') ? undefined : json['last'],
numberOfElements: !exists(json, 'numberOfElements')
? undefined
: json['numberOfElements'],
first: !exists(json, 'first') ? undefined : json['first'],
size: !exists(json, 'size') ? undefined : json['size'],
number: !exists(json, 'number') ? undefined : json['number'],
sort: !exists(json, 'sort') ? undefined : SortObjectFromJSON(json['sort']),
empty: !exists(json, 'empty') ? undefined : json['empty'],
};
}
export function PageComplaintToJSON(value?: PageComplaint | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
content:
value.content === undefined
? undefined
: (value.content as Array<any>).map(ComplaintToJSON),
pageable: PageableObjectToJSON(value.pageable),
totalPages: value.totalPages,
totalElements: value.totalElements,
last: value.last,
numberOfElements: value.numberOfElements,
first: value.first,
size: value.size,
number: value.number,
sort: SortObjectToJSON(value.sort),
empty: value.empty,
};
}
/* 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';
import {
BounceRecipientProjection,
BounceRecipientProjectionFromJSON,
BounceRecipientProjectionFromJSONTyped,
BounceRecipientProjectionToJSON,
PageableObject,
PageableObjectFromJSON,
PageableObjectFromJSONTyped,
PageableObjectToJSON,
SortObject,
SortObjectFromJSON,
SortObjectFromJSONTyped,
SortObjectToJSON,
} from './';
/**
* Paginated bounced recipients. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls.
* @export
* @interface PageBouncedRecipients
*/
export interface PageBouncedRecipients {
/**
*
* @type {Array<BounceRecipientProjection>}
* @memberof PageBouncedRecipients
*/
content?: Array<BounceRecipientProjection>;
/**
*
* @type {PageableObject}
* @memberof PageBouncedRecipients
*/
pageable?: PageableObject;
/**
*
* @type {number}
* @memberof PageBouncedRecipients
*/
totalPages: number;
/**
*
* @type {number}
* @memberof PageBouncedRecipients
*/
totalElements: number;
/**
*
* @type {boolean}
* @memberof PageBouncedRecipients
*/
last?: boolean;
/**
*
* @type {number}
* @memberof PageBouncedRecipients
*/
numberOfElements?: number;
/**
*
* @type {boolean}
* @memberof PageBouncedRecipients
*/
first?: boolean;
/**
*
* @type {number}
* @memberof PageBouncedRecipients
*/
size?: number;
/**
*
* @type {number}
* @memberof PageBouncedRecipients
*/
number?: number;
/**
*
* @type {SortObject}
* @memberof PageBouncedRecipients
*/
sort?: SortObject;
/**
*
* @type {boolean}
* @memberof PageBouncedRecipients
*/
empty?: boolean;
}
export function PageBouncedRecipientsFromJSON(
json: any
): PageBouncedRecipients {
return PageBouncedRecipientsFromJSONTyped(json, false);
}
export function PageBouncedRecipientsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): PageBouncedRecipients {
if (json === undefined || json === null) {
return json;
}
return {
content: !exists(json, 'content')
? undefined
: (json['content'] as Array<any>).map(BounceRecipientProjectionFromJSON),
pageable: !exists(json, 'pageable')
? undefined
: PageableObjectFromJSON(json['pageable']),
totalPages: json['totalPages'],
totalElements: json['totalElements'],
last: !exists(json, 'last') ? undefined : json['last'],
numberOfElements: !exists(json, 'numberOfElements')
? undefined
: json['numberOfElements'],
first: !exists(json, 'first') ? undefined : json['first'],
size: !exists(json, 'size') ? undefined : json['size'],
number: !exists(json, 'number') ? undefined : json['number'],
sort: !exists(json, 'sort') ? undefined : SortObjectFromJSON(json['sort']),
empty: !exists(json, 'empty') ? undefined : json['empty'],
};
}
export function PageBouncedRecipientsToJSON(
value?: PageBouncedRecipients | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
content:
value.content === undefined
? undefined
: (value.content as Array<any>).map(BounceRecipientProjectionToJSON),
pageable: PageableObjectToJSON(value.pageable),
totalPages: value.totalPages,
totalElements: value.totalElements,
last: value.last,
numberOfElements: value.numberOfElements,
first: value.first,
size: value.size,
number: value.number,
sort: SortObjectToJSON(value.sort),
empty: value.empty,
};
}
/* 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';
import {
BounceProjection,
BounceProjectionFromJSON,
BounceProjectionFromJSONTyped,
BounceProjectionToJSON,
PageableObject,
PageableObjectFromJSON,
PageableObjectFromJSONTyped,
PageableObjectToJSON,
SortObject,
SortObjectFromJSON,
SortObjectFromJSONTyped,
SortObjectToJSON,
} from './';
/**
* Paginated bounced email. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls.
* @export
* @interface PageBouncedEmail
*/
export interface PageBouncedEmail {
/**
*
* @type {Array<BounceProjection>}
* @memberof PageBouncedEmail
*/
content?: Array<BounceProjection>;
/**
*
* @type {PageableObject}
* @memberof PageBouncedEmail
*/
pageable?: PageableObject;
/**
*
* @type {number}
* @memberof PageBouncedEmail
*/
totalPages: number;
/**
*
* @type {number}
* @memberof PageBouncedEmail
*/
totalElements: number;
/**
*
* @type {boolean}
* @memberof PageBouncedEmail
*/
last?: boolean;
/**
*
* @type {number}
* @memberof PageBouncedEmail
*/
numberOfElements?: number;
/**
*
* @type {boolean}
* @memberof PageBouncedEmail
*/
first?: boolean;
/**
*
* @type {number}
* @memberof PageBouncedEmail
*/
size?: number;
/**
*
* @type {number}
* @memberof PageBouncedEmail
*/
number?: number;
/**
*
* @type {SortObject}
* @memberof PageBouncedEmail
*/
sort?: SortObject;
/**
*
* @type {boolean}
* @memberof PageBouncedEmail
*/
empty?: boolean;
}
export function PageBouncedEmailFromJSON(json: any): PageBouncedEmail {
return PageBouncedEmailFromJSONTyped(json, false);
}
export function PageBouncedEmailFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): PageBouncedEmail {
if (json === undefined || json === null) {
return json;
}
return {
content: !exists(json, 'content')
? undefined
: (json['content'] as Array<any>).map(BounceProjectionFromJSON),
pageable: !exists(json, 'pageable')
? undefined
: PageableObjectFromJSON(json['pageable']),
totalPages: json['totalPages'],
totalElements: json['totalElements'],
last: !exists(json, 'last') ? undefined : json['last'],
numberOfElements: !exists(json, 'numberOfElements')
? undefined
: json['numberOfElements'],
first: !exists(json, 'first') ? undefined : json['first'],
size: !exists(json, 'size') ? undefined : json['size'],
number: !exists(json, 'number') ? undefined : json['number'],
sort: !exists(json, 'sort') ? undefined : SortObjectFromJSON(json['sort']),
empty: !exists(json, 'empty') ? undefined : json['empty'],
};
}
export function PageBouncedEmailToJSON(value?: PageBouncedEmail | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
content:
value.content === undefined
? undefined
: (value.content as Array<any>).map(BounceProjectionToJSON),
pageable: PageableObjectToJSON(value.pageable),
totalPages: value.totalPages,
totalElements: value.totalElements,
last: value.last,
numberOfElements: value.numberOfElements,
first: value.first,
size: value.size,
number: value.number,
sort: SortObjectToJSON(value.sort),
empty: value.empty,
};
}
/* 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';
import {
AttachmentProjection,
AttachmentProjectionFromJSON,
AttachmentProjectionFromJSONTyped,
AttachmentProjectionToJSON,
PageableObject,
PageableObjectFromJSON,
PageableObjectFromJSONTyped,
PageableObjectToJSON,
SortObject,
SortObjectFromJSON,
SortObjectFromJSONTyped,
SortObjectToJSON,
} from './';
/**
* Paginated attachment entity results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls.
* @export
* @interface PageAttachmentEntity
*/
export interface PageAttachmentEntity {
/**
*
* @type {Array<AttachmentProjection>}
* @memberof PageAttachmentEntity
*/
content?: Array<AttachmentProjection>;
/**
*
* @type {PageableObject}
* @memberof PageAttachmentEntity
*/
pageable?: PageableObject;
/**
*
* @type {number}
* @memberof PageAttachmentEntity
*/
totalPages: number;
/**
*
* @type {number}
* @memberof PageAttachmentEntity
*/
totalElements: number;
/**
*
* @type {boolean}
* @memberof PageAttachmentEntity
*/
last?: boolean;
/**
*
* @type {number}
* @memberof PageAttachmentEntity
*/
numberOfElements?: number;
/**
*
* @type {boolean}
* @memberof PageAttachmentEntity
*/
first?: boolean;
/**
*
* @type {number}
* @memberof PageAttachmentEntity
*/
size?: number;
/**
*
* @type {number}
* @memberof PageAttachmentEntity
*/
number?: number;
/**
*
* @type {SortObject}
* @memberof PageAttachmentEntity
*/
sort?: SortObject;
/**
*
* @type {boolean}
* @memberof PageAttachmentEntity
*/
empty?: boolean;
}
export function PageAttachmentEntityFromJSON(json: any): PageAttachmentEntity {
return PageAttachmentEntityFromJSONTyped(json, false);
}
export function PageAttachmentEntityFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): PageAttachmentEntity {
if (json === undefined || json === null) {
return json;
}
return {
content: !exists(json, 'content')
? undefined
: (json['content'] as Array<any>).map(AttachmentProjectionFromJSON),
pageable: !exists(json, 'pageable')
? undefined
: PageableObjectFromJSON(json['pageable']),
totalPages: json['totalPages'],
totalElements: json['totalElements'],
last: !exists(json, 'last') ? undefined : json['last'],
numberOfElements: !exists(json, 'numberOfElements')
? undefined
: json['numberOfElements'],
first: !exists(json, 'first') ? undefined : json['first'],
size: !exists(json, 'size') ? undefined : json['size'],
number: !exists(json, 'number') ? undefined : json['number'],
sort: !exists(json, 'sort') ? undefined : SortObjectFromJSON(json['sort']),
empty: !exists(json, 'empty') ? undefined : json['empty'],
};
}
export function PageAttachmentEntityToJSON(
value?: PageAttachmentEntity | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
content:
value.content === undefined
? undefined
: (value.content as Array<any>).map(AttachmentProjectionToJSON),
pageable: PageableObjectToJSON(value.pageable),
totalPages: value.totalPages,
totalElements: value.totalElements,
last: value.last,
numberOfElements: value.numberOfElements,
first: value.first,
size: value.size,
number: value.number,
sort: SortObjectToJSON(value.sort),
empty: value.empty,
};
}
/* 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';
import {
AliasProjection,
AliasProjectionFromJSON,
AliasProjectionFromJSONTyped,
AliasProjectionToJSON,
PageableObject,
PageableObjectFromJSON,
PageableObjectFromJSONTyped,
PageableObjectToJSON,
SortObject,
SortObjectFromJSON,
SortObjectFromJSONTyped,
SortObjectToJSON,
} from './';
/**
* Paginated email alias results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls.
* @export
* @interface PageAlias
*/
export interface PageAlias {
/**
*
* @type {Array<AliasProjection>}
* @memberof PageAlias
*/
content?: Array<AliasProjection>;
/**
*
* @type {PageableObject}
* @memberof PageAlias
*/
pageable?: PageableObject;
/**
*
* @type {number}
* @memberof PageAlias
*/
totalPages: number;
/**
*
* @type {number}
* @memberof PageAlias
*/
totalElements: number;
/**
*
* @type {boolean}
* @memberof PageAlias
*/
last?: boolean;
/**
*
* @type {number}
* @memberof PageAlias
*/
numberOfElements?: number;
/**
*
* @type {boolean}
* @memberof PageAlias
*/
first?: boolean;
/**
*
* @type {number}
* @memberof PageAlias
*/
size?: number;
/**
*
* @type {number}
* @memberof PageAlias
*/
number?: number;
/**
*
* @type {SortObject}
* @memberof PageAlias
*/
sort?: SortObject;
/**
*
* @type {boolean}
* @memberof PageAlias
*/
empty?: boolean;
}
export function PageAliasFromJSON(json: any): PageAlias {
return PageAliasFromJSONTyped(json, false);
}
export function PageAliasFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): PageAlias {
if (json === undefined || json === null) {
return json;
}
return {
content: !exists(json, 'content')
? undefined
: (json['content'] as Array<any>).map(AliasProjectionFromJSON),
pageable: !exists(json, 'pageable')
? undefined
: PageableObjectFromJSON(json['pageable']),
totalPages: json['totalPages'],
totalElements: json['totalElements'],
last: !exists(json, 'last') ? undefined : json['last'],
numberOfElements: !exists(json, 'numberOfElements')
? undefined
: json['numberOfElements'],
first: !exists(json, 'first') ? undefined : json['first'],
size: !exists(json, 'size') ? undefined : json['size'],
number: !exists(json, 'number') ? undefined : json['number'],
sort: !exists(json, 'sort') ? undefined : SortObjectFromJSON(json['sort']),
empty: !exists(json, 'empty') ? undefined : json['empty'],
};
}
export function PageAliasToJSON(value?: PageAlias | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
content:
value.content === undefined
? undefined
: (value.content as Array<any>).map(AliasProjectionToJSON),
pageable: PageableObjectToJSON(value.pageable),
totalPages: value.totalPages,
totalElements: value.totalElements,
last: value.last,
numberOfElements: value.numberOfElements,
first: value.first,
size: value.size,
number: value.number,
sort: SortObjectToJSON(value.sort),
empty: value.empty,
};
}
/* 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';
/**
* Organization team inbox
* @export
* @interface OrganizationInboxProjection
*/
export interface OrganizationInboxProjection {
/**
* ID of the inbox. The ID is a UUID-V4 format string. Use the inboxId for calls to Inbox and Email Controller endpoints. See the emailAddress property for the email address or the inbox. To get emails in an inbox use the WaitFor and Inbox Controller methods `waitForLatestEmail` and `getEmails` methods respectively. Inboxes can be used with aliases to forward emails automatically.
* @type {string}
* @memberof OrganizationInboxProjection
*/
id: string;
/**
* ID of custom domain used by the inbox if any
* @type {string}
* @memberof OrganizationInboxProjection
*/
domainId?: string | null;
/**
* When the inbox was created. Time stamps are in ISO DateTime Format `yyyy-MM-dd'T'HH:mm:ss.SSSXXX` e.g. `2000-10-31T01:30:00.000-05:00`.
* @type {Date}
* @memberof OrganizationInboxProjection
*/
createdAt: Date;
/**
* Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search
* @type {string}
* @memberof OrganizationInboxProjection
*/
name?: string | null;
/**
* The inbox's email address. Inbox projections and previews may not include the email address. To view the email address fetch the inbox entity directly. Send an email to this address and the inbox will receive and store it for you. Note the email address in MailSlurp match characters exactly and are case sensitive so `+123` additions are considered different addresses. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID.
* @type {string}
* @memberof OrganizationInboxProjection
*/
emailAddress?: string | null;
/**
* Is the inbox a favorite inbox. Make an inbox a favorite is typically done in the dashboard for quick access or filtering
* @type {boolean}
* @memberof OrganizationInboxProjection
*/
favourite: boolean;
/**
* Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI.
* @type {Array<string>}
* @memberof OrganizationInboxProjection
*/
tags?: Array<string> | null;
/**
* Does inbox permit team access for organization team members. If so team users can use inbox and emails associated with it. See the team access guide at https://www.mailslurp.com/guides/team-email-account-sharing/
* @type {boolean}
* @memberof OrganizationInboxProjection
*/
teamAccess: boolean;
/**
* Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send).
* @type {string}
* @memberof OrganizationInboxProjection
*/
inboxType?: OrganizationInboxProjectionInboxTypeEnum;
/**
* Is the inbox readOnly for the caller. Read only means can not be deleted or modified. This flag is present when using team accounts and shared inboxes.
* @type {boolean}
* @memberof OrganizationInboxProjection
*/
readOnly: boolean;
/**
* Virtual inbox can receive email but will not send emails to real recipients. Will save sent email record but never send an actual email. Perfect for testing mail server actions.
* @type {boolean}
* @memberof OrganizationInboxProjection
*/
virtualInbox: boolean;
/**
* Inbox function if used as a primitive for another system.
* @type {string}
* @memberof OrganizationInboxProjection
*/
functionsAs?: OrganizationInboxProjectionFunctionsAsEnum;
}
/**
* @export
* @enum {string}
*/
export enum OrganizationInboxProjectionInboxTypeEnum {
HTTP_INBOX = 'HTTP_INBOX',
SMTP_INBOX = 'SMTP_INBOX',
}
/**
* @export
* @enum {string}
*/
export enum OrganizationInboxProjectionFunctionsAsEnum {
ALIAS = 'ALIAS',
THREAD = 'THREAD',
CATCH_ALL = 'CATCH_ALL',
CONNECTOR = 'CONNECTOR',
}
export function OrganizationInboxProjectionFromJSON(
json: any
): OrganizationInboxProjection {
return OrganizationInboxProjectionFromJSONTyped(json, false);
}
export function OrganizationInboxProjectionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): OrganizationInboxProjection {
if (json === undefined || json === null) {
return json;
}
return {
id: json['id'],
domainId: !exists(json, 'domainId') ? undefined : json['domainId'],
createdAt: new Date(json['createdAt']),
name: !exists(json, 'name') ? undefined : json['name'],
emailAddress: !exists(json, 'emailAddress')
? undefined
: json['emailAddress'],
favourite: json['favourite'],
tags: !exists(json, 'tags') ? undefined : json['tags'],
teamAccess: json['teamAccess'],
inboxType: !exists(json, 'inboxType') ? undefined : json['inboxType'],
readOnly: json['readOnly'],
virtualInbox: json['virtualInbox'],
functionsAs: !exists(json, 'functionsAs') ? undefined : json['functionsAs'],
};
}
export function OrganizationInboxProjectionToJSON(
value?: OrganizationInboxProjection | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
domainId: value.domainId,
createdAt: value.createdAt.toISOString(),
name: value.name,
emailAddress: value.emailAddress,
favourite: value.favourite,
tags: value.tags,
teamAccess: value.teamAccess,
inboxType: value.inboxType,
readOnly: value.readOnly,
virtualInbox: value.virtualInbox,
functionsAs: value.functionsAs,
};
}
/* 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';
/**
*
* @export
* @interface NewFakeEmailAddressResult
*/
export interface NewFakeEmailAddressResult {
/**
*
* @type {string}
* @memberof NewFakeEmailAddressResult
*/
emailAddress: string;
}
export function NewFakeEmailAddressResultFromJSON(
json: any
): NewFakeEmailAddressResult {
return NewFakeEmailAddressResultFromJSONTyped(json, false);
}
export function NewFakeEmailAddressResultFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): NewFakeEmailAddressResult {
if (json === undefined || json === null) {
return json;
}
return {
emailAddress: json['emailAddress'],
};
}
export function NewFakeEmailAddressResultToJSON(
value?: NewFakeEmailAddressResult | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
emailAddress: value.emailAddress,
};
}
/* 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';
/**
* Name Server Record
* @export
* @interface NameServerRecord
*/
export interface NameServerRecord {
/**
*
* @type {string}
* @memberof NameServerRecord
*/
raw: string;
/**
*
* @type {string}
* @memberof NameServerRecord
*/
recordType: string;
/**
*
* @type {string}
* @memberof NameServerRecord
*/
priority: string;
/**
*
* @type {string}
* @memberof NameServerRecord
*/
value: string;
}
export function NameServerRecordFromJSON(json: any): NameServerRecord {
return NameServerRecordFromJSONTyped(json, false);
}
export function NameServerRecordFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): NameServerRecord {
if (json === undefined || json === null) {
return json;
}
return {
raw: json['raw'],
recordType: json['recordType'],
priority: json['priority'],
value: json['value'],
};
}
export function NameServerRecordToJSON(value?: NameServerRecord | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
raw: value.raw,
recordType: value.recordType,
priority: value.priority,
value: value.value,
};
}
/* 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';
/**
* Missed email data
* @export
* @interface MissedEmailProjection
*/
export interface MissedEmailProjection {
/**
*
* @type {Date}
* @memberof MissedEmailProjection
*/
createdAt: Date;
/**
*
* @type {string}
* @memberof MissedEmailProjection
*/
userId?: string | null;
/**
*
* @type {string}
* @memberof MissedEmailProjection
*/
subject?: string | null;
/**
*
* @type {string}
* @memberof MissedEmailProjection
*/
id: string;
/**
*
* @type {string}
* @memberof MissedEmailProjection
*/
from?: string | null;
}
export function MissedEmailProjectionFromJSON(
json: any
): MissedEmailProjection {
return MissedEmailProjectionFromJSONTyped(json, false);
}
export function MissedEmailProjectionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): MissedEmailProjection {
if (json === undefined || json === null) {
return json;
}
return {
createdAt: new Date(json['createdAt']),
userId: !exists(json, 'userId') ? undefined : json['userId'],
subject: !exists(json, 'subject') ? undefined : json['subject'],
id: json['id'],
from: !exists(json, 'from') ? undefined : json['from'],
};
}
export function MissedEmailProjectionToJSON(
value?: MissedEmailProjection | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
createdAt: value.createdAt.toISOString(),
userId: value.userId,
subject: value.subject,
id: value.id,
from: value.from,
};
}
/* 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';
/**
* Missed email
* @export
* @interface MissedEmailDto
*/
export interface MissedEmailDto {
/**
*
* @type {string}
* @memberof MissedEmailDto
*/
id: string;
/**
*
* @type {string}
* @memberof MissedEmailDto
*/
userId?: string | null;
/**
*
* @type {string}
* @memberof MissedEmailDto
*/
subject?: string | null;
/**
*
* @type {string}
* @memberof MissedEmailDto
*/
bodyExcerpt?: string | null;
/**
*
* @type {number}
* @memberof MissedEmailDto
*/
attachmentCount: number;
/**
*
* @type {string}
* @memberof MissedEmailDto
*/
from?: string | null;
/**
*
* @type {string}
* @memberof MissedEmailDto
*/
rawUrl?: string | null;
/**
*
* @type {string}
* @memberof MissedEmailDto
*/
rawKey?: string | null;
/**
*
* @type {string}
* @memberof MissedEmailDto
*/
rawBucket?: string | null;
/**
*
* @type {boolean}
* @memberof MissedEmailDto
*/
canRestore?: boolean | null;
/**
*
* @type {Array<string>}
* @memberof MissedEmailDto
*/
to: Array<string>;
/**
*
* @type {Array<string>}
* @memberof MissedEmailDto
*/
cc: Array<string>;
/**
*
* @type {Array<string>}
* @memberof MissedEmailDto
*/
bcc: Array<string>;
/**
*
* @type {Array<string>}
* @memberof MissedEmailDto
*/
inboxIds: Array<string>;
/**
*
* @type {Date}
* @memberof MissedEmailDto
*/
createdAt: Date;
/**
*
* @type {Date}
* @memberof MissedEmailDto
*/
updatedAt: Date;
}
export function MissedEmailDtoFromJSON(json: any): MissedEmailDto {
return MissedEmailDtoFromJSONTyped(json, false);
}
export function MissedEmailDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): MissedEmailDto {
if (json === undefined || json === null) {
return json;
}
return {
id: json['id'],
userId: !exists(json, 'userId') ? undefined : json['userId'],
subject: !exists(json, 'subject') ? undefined : json['subject'],
bodyExcerpt: !exists(json, 'bodyExcerpt') ? undefined : json['bodyExcerpt'],
attachmentCount: json['attachmentCount'],
from: !exists(json, 'from') ? undefined : json['from'],
rawUrl: !exists(json, 'rawUrl') ? undefined : json['rawUrl'],
rawKey: !exists(json, 'rawKey') ? undefined : json['rawKey'],
rawBucket: !exists(json, 'rawBucket') ? undefined : json['rawBucket'],
canRestore: !exists(json, 'canRestore') ? undefined : json['canRestore'],
to: json['to'],
cc: json['cc'],
bcc: json['bcc'],
inboxIds: json['inboxIds'],
createdAt: new Date(json['createdAt']),
updatedAt: new Date(json['updatedAt']),
};
}
export function MissedEmailDtoToJSON(value?: MissedEmailDto | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
userId: value.userId,
subject: value.subject,
bodyExcerpt: value.bodyExcerpt,
attachmentCount: value.attachmentCount,
from: value.from,
rawUrl: value.rawUrl,
rawKey: value.rawKey,
rawBucket: value.rawBucket,
canRestore: value.canRestore,
to: value.to,
cc: value.cc,
bcc: value.bcc,
inboxIds: value.inboxIds,
createdAt: value.createdAt.toISOString(),
updatedAt: value.updatedAt.toISOString(),
};
}
/* 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';
import {
ConditionOption,
ConditionOptionFromJSON,
ConditionOptionFromJSONTyped,
ConditionOptionToJSON,
MatchOption,
MatchOptionFromJSON,
MatchOptionFromJSONTyped,
MatchOptionToJSON,
} from './';
/**
* Optional filter for matching emails based on fields. For instance filter results to only include emails whose `SUBJECT` value does `CONTAIN` given match value. An example payload would be `{ matches: [{ field: 'SUBJECT', should: 'CONTAIN', value: 'Welcome' }] }`. You can also pass conditions such as `HAS_ATTACHMENT`. If you wish to extract regex matches inside the email content see the `getEmailContentMatch` method in the EmailController.
* @export
* @interface MatchOptions
*/
export interface MatchOptions {
/**
* Zero or more match options such as `{ field: 'SUBJECT', should: 'CONTAIN', value: 'Welcome' }`. Options are additive so if one does not match the email is excluded from results
* @type {Array<MatchOption>}
* @memberof MatchOptions
*/
matches?: Array<MatchOption> | null;
/**
* Zero or more conditions such as `{ condition: 'HAS_ATTACHMENTS', value: 'TRUE' }`. Note the values are the strings `TRUE|FALSE` not booleans.
* @type {Array<ConditionOption>}
* @memberof MatchOptions
*/
conditions?: Array<ConditionOption> | null;
}
export function MatchOptionsFromJSON(json: any): MatchOptions {
return MatchOptionsFromJSONTyped(json, false);
}
export function MatchOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): MatchOptions {
if (json === undefined || json === null) {
return json;
}
return {
matches: !exists(json, 'matches')
? undefined
: json['matches'] === null
? null
: (json['matches'] as Array<any>).map(MatchOptionFromJSON),
conditions: !exists(json, 'conditions')
? undefined
: json['conditions'] === null
? null
: (json['conditions'] as Array<any>).map(ConditionOptionFromJSON),
};
}
export function MatchOptionsToJSON(value?: MatchOptions | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
matches:
value.matches === undefined
? undefined
: value.matches === null
? null
: (value.matches as Array<any>).map(MatchOptionToJSON),
conditions:
value.conditions === undefined
? undefined
: value.conditions === null
? null
: (value.conditions as Array<any>).map(ConditionOptionToJSON),
};
}
/* 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 matching emails in an inbox. Each match option object contains a `field`, `should` and `value` property. Together they form logical conditions such as `SUBJECT` should `CONTAIN` value.
* @export
* @interface MatchOption
*/
export interface MatchOption {
/**
* Fields of an email object that can be used to filter results
* @type {string}
* @memberof MatchOption
*/
field: MatchOptionFieldEnum;
/**
* How the value of the email field specified should be compared to the value given in the match options.
* @type {string}
* @memberof MatchOption
*/
should: MatchOptionShouldEnum;
/**
* The value you wish to compare with the value of the field specified using the `should` value passed. For example `BODY` should `CONTAIN` a value passed.
* @type {string}
* @memberof MatchOption
*/
value: string;
}
/**
* @export
* @enum {string}
*/
export enum MatchOptionFieldEnum {
SUBJECT = 'SUBJECT',
TO = 'TO',
BCC = 'BCC',
CC = 'CC',
FROM = 'FROM',
HEADERS = 'HEADERS',
}
/**
* @export
* @enum {string}
*/
export enum MatchOptionShouldEnum {
MATCH = 'MATCH',
CONTAIN = 'CONTAIN',
EQUAL = 'EQUAL',
}
export function MatchOptionFromJSON(json: any): MatchOption {
return MatchOptionFromJSONTyped(json, false);
}
export function MatchOptionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): MatchOption {
if (json === undefined || json === null) {
return json;
}
return {
field: json['field'],
should: json['should'],
value: json['value'],
};
}
export function MatchOptionToJSON(value?: MatchOption | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
field: value.field,
should: value.should,
value: value.value,
};
}
/* 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';
import {
DNSLookupOptions,
DNSLookupOptionsFromJSON,
DNSLookupOptionsFromJSONTyped,
DNSLookupOptionsToJSON,
DNSLookupResult,
DNSLookupResultFromJSON,
DNSLookupResultFromJSONTyped,
DNSLookupResultToJSON,
} from './';
/**
*
* @export
* @interface LookupTlsReportingDomainResults
*/
export interface LookupTlsReportingDomainResults {
/**
*
* @type {boolean}
* @memberof LookupTlsReportingDomainResults
*/
valid: boolean;
/**
*
* @type {DNSLookupOptions}
* @memberof LookupTlsReportingDomainResults
*/
query: DNSLookupOptions;
/**
*
* @type {Array<DNSLookupResult>}
* @memberof LookupTlsReportingDomainResults
*/
records: Array<DNSLookupResult>;
/**
*
* @type {Array<string>}
* @memberof LookupTlsReportingDomainResults
*/
errors: Array<string>;
/**
*
* @type {Array<string>}
* @memberof LookupTlsReportingDomainResults
*/
warnings: Array<string>;
}
export function LookupTlsReportingDomainResultsFromJSON(
json: any
): LookupTlsReportingDomainResults {
return LookupTlsReportingDomainResultsFromJSONTyped(json, false);
}
export function LookupTlsReportingDomainResultsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): LookupTlsReportingDomainResults {
if (json === undefined || json === null) {
return json;
}
return {
valid: json['valid'],
query: DNSLookupOptionsFromJSON(json['query']),
records: (json['records'] as Array<any>).map(DNSLookupResultFromJSON),
errors: json['errors'],
warnings: json['warnings'],
};
}
export function LookupTlsReportingDomainResultsToJSON(
value?: LookupTlsReportingDomainResults | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
valid: value.valid,
query: DNSLookupOptionsToJSON(value.query),
records: (value.records as Array<any>).map(DNSLookupResultToJSON),
errors: value.errors,
warnings: value.warnings,
};
}
/* 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';
/**
*
* @export
* @interface LookupTlsReportingDomainOptions
*/
export interface LookupTlsReportingDomainOptions {
/**
*
* @type {string}
* @memberof LookupTlsReportingDomainOptions
*/
host: string;
}
export function LookupTlsReportingDomainOptionsFromJSON(
json: any
): LookupTlsReportingDomainOptions {
return LookupTlsReportingDomainOptionsFromJSONTyped(json, false);
}
export function LookupTlsReportingDomainOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): LookupTlsReportingDomainOptions {
if (json === undefined || json === null) {
return json;
}
return {
host: json['host'],
};
}
export function LookupTlsReportingDomainOptionsToJSON(
value?: LookupTlsReportingDomainOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
host: value.host,
};
}
/* 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';
import {
DNSLookupOptions,
DNSLookupOptionsFromJSON,
DNSLookupOptionsFromJSONTyped,
DNSLookupOptionsToJSON,
DNSLookupResult,
DNSLookupResultFromJSON,
DNSLookupResultFromJSONTyped,
DNSLookupResultToJSON,
} from './';
/**
*
* @export
* @interface LookupMtaStsDomainResults
*/
export interface LookupMtaStsDomainResults {
/**
*
* @type {boolean}
* @memberof LookupMtaStsDomainResults
*/
valid: boolean;
/**
*
* @type {DNSLookupOptions}
* @memberof LookupMtaStsDomainResults
*/
query: DNSLookupOptions;
/**
*
* @type {Array<DNSLookupResult>}
* @memberof LookupMtaStsDomainResults
*/
records: Array<DNSLookupResult>;
/**
*
* @type {string}
* @memberof LookupMtaStsDomainResults
*/
wellKnownQuery: string;
/**
*
* @type {boolean}
* @memberof LookupMtaStsDomainResults
*/
wellKnownPresent: boolean;
/**
*
* @type {string}
* @memberof LookupMtaStsDomainResults
*/
wellKnownValue: string;
/**
*
* @type {Array<string>}
* @memberof LookupMtaStsDomainResults
*/
errors: Array<string>;
/**
*
* @type {Array<string>}
* @memberof LookupMtaStsDomainResults
*/
warnings: Array<string>;
}
export function LookupMtaStsDomainResultsFromJSON(
json: any
): LookupMtaStsDomainResults {
return LookupMtaStsDomainResultsFromJSONTyped(json, false);
}
export function LookupMtaStsDomainResultsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): LookupMtaStsDomainResults {
if (json === undefined || json === null) {
return json;
}
return {
valid: json['valid'],
query: DNSLookupOptionsFromJSON(json['query']),
records: (json['records'] as Array<any>).map(DNSLookupResultFromJSON),
wellKnownQuery: json['wellKnownQuery'],
wellKnownPresent: json['wellKnownPresent'],
wellKnownValue: json['wellKnownValue'],
errors: json['errors'],
warnings: json['warnings'],
};
}
export function LookupMtaStsDomainResultsToJSON(
value?: LookupMtaStsDomainResults | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
valid: value.valid,
query: DNSLookupOptionsToJSON(value.query),
records: (value.records as Array<any>).map(DNSLookupResultToJSON),
wellKnownQuery: value.wellKnownQuery,
wellKnownPresent: value.wellKnownPresent,
wellKnownValue: value.wellKnownValue,
errors: value.errors,
warnings: value.warnings,
};
}
/* 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';
/**
*
* @export
* @interface LookupMtaStsDomainOptions
*/
export interface LookupMtaStsDomainOptions {
/**
*
* @type {string}
* @memberof LookupMtaStsDomainOptions
*/
host: string;
}
export function LookupMtaStsDomainOptionsFromJSON(
json: any
): LookupMtaStsDomainOptions {
return LookupMtaStsDomainOptionsFromJSONTyped(json, false);
}
export function LookupMtaStsDomainOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): LookupMtaStsDomainOptions {
if (json === undefined || json === null) {
return json;
}
return {
host: json['host'],
};
}
export function LookupMtaStsDomainOptionsToJSON(
value?: LookupMtaStsDomainOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
host: value.host,
};
}
/* 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';
import {
DNSLookupOptions,
DNSLookupOptionsFromJSON,
DNSLookupOptionsFromJSONTyped,
DNSLookupOptionsToJSON,
DNSLookupResult,
DNSLookupResultFromJSON,
DNSLookupResultFromJSONTyped,
DNSLookupResultToJSON,
} from './';
/**
*
* @export
* @interface LookupDmarcDomainResults
*/
export interface LookupDmarcDomainResults {
/**
*
* @type {boolean}
* @memberof LookupDmarcDomainResults
*/
valid: boolean;
/**
*
* @type {DNSLookupOptions}
* @memberof LookupDmarcDomainResults
*/
query: DNSLookupOptions;
/**
*
* @type {Array<DNSLookupResult>}
* @memberof LookupDmarcDomainResults
*/
records: Array<DNSLookupResult>;
/**
*
* @type {Array<string>}
* @memberof LookupDmarcDomainResults
*/
errors: Array<string>;
/**
*
* @type {Array<string>}
* @memberof LookupDmarcDomainResults
*/
warnings: Array<string>;
}
export function LookupDmarcDomainResultsFromJSON(
json: any
): LookupDmarcDomainResults {
return LookupDmarcDomainResultsFromJSONTyped(json, false);
}
export function LookupDmarcDomainResultsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): LookupDmarcDomainResults {
if (json === undefined || json === null) {
return json;
}
return {
valid: json['valid'],
query: DNSLookupOptionsFromJSON(json['query']),
records: (json['records'] as Array<any>).map(DNSLookupResultFromJSON),
errors: json['errors'],
warnings: json['warnings'],
};
}
export function LookupDmarcDomainResultsToJSON(
value?: LookupDmarcDomainResults | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
valid: value.valid,
query: DNSLookupOptionsToJSON(value.query),
records: (value.records as Array<any>).map(DNSLookupResultToJSON),
errors: value.errors,
warnings: value.warnings,
};
}
/* 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';
/**
*
* @export
* @interface LookupDmarcDomainOptions
*/
export interface LookupDmarcDomainOptions {
/**
*
* @type {string}
* @memberof LookupDmarcDomainOptions
*/
host: string;
}
export function LookupDmarcDomainOptionsFromJSON(
json: any
): LookupDmarcDomainOptions {
return LookupDmarcDomainOptionsFromJSONTyped(json, false);
}
export function LookupDmarcDomainOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): LookupDmarcDomainOptions {
if (json === undefined || json === null) {
return json;
}
return {
host: json['host'],
};
}
export function LookupDmarcDomainOptionsToJSON(
value?: LookupDmarcDomainOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
host: value.host,
};
}
/* 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';
import {
DNSLookupOptions,
DNSLookupOptionsFromJSON,
DNSLookupOptionsFromJSONTyped,
DNSLookupOptionsToJSON,
DNSLookupResult,
DNSLookupResultFromJSON,
DNSLookupResultFromJSONTyped,
DNSLookupResultToJSON,
} from './';
/**
*
* @export
* @interface LookupBimiDomainResults
*/
export interface LookupBimiDomainResults {
/**
*
* @type {boolean}
* @memberof LookupBimiDomainResults
*/
valid: boolean;
/**
*
* @type {DNSLookupOptions}
* @memberof LookupBimiDomainResults
*/
query: DNSLookupOptions;
/**
*
* @type {Array<DNSLookupResult>}
* @memberof LookupBimiDomainResults
*/
records: Array<DNSLookupResult>;
/**
*
* @type {Array<string>}
* @memberof LookupBimiDomainResults
*/
errors: Array<string>;
/**
*
* @type {Array<string>}
* @memberof LookupBimiDomainResults
*/
warnings: Array<string>;
}
export function LookupBimiDomainResultsFromJSON(
json: any
): LookupBimiDomainResults {
return LookupBimiDomainResultsFromJSONTyped(json, false);
}
export function LookupBimiDomainResultsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): LookupBimiDomainResults {
if (json === undefined || json === null) {
return json;
}
return {
valid: json['valid'],
query: DNSLookupOptionsFromJSON(json['query']),
records: (json['records'] as Array<any>).map(DNSLookupResultFromJSON),
errors: json['errors'],
warnings: json['warnings'],
};
}
export function LookupBimiDomainResultsToJSON(
value?: LookupBimiDomainResults | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
valid: value.valid,
query: DNSLookupOptionsToJSON(value.query),
records: (value.records as Array<any>).map(DNSLookupResultToJSON),
errors: value.errors,
warnings: value.warnings,
};
}
/* 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';
/**
*
* @export
* @interface LookupBimiDomainOptions
*/
export interface LookupBimiDomainOptions {
/**
*
* @type {string}
* @memberof LookupBimiDomainOptions
*/
host: string;
}
export function LookupBimiDomainOptionsFromJSON(
json: any
): LookupBimiDomainOptions {
return LookupBimiDomainOptionsFromJSONTyped(json, false);
}
export function LookupBimiDomainOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): LookupBimiDomainOptions {
if (json === undefined || json === null) {
return json;
}
return {
host: json['host'],
};
}
export function LookupBimiDomainOptionsToJSON(
value?: LookupBimiDomainOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
host: value.host,
};
}
/* 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';
/**
* List unsubscribe recipient
* @export
* @interface ListUnsubscribeRecipientProjection
*/
export interface ListUnsubscribeRecipientProjection {
/**
*
* @type {Date}
* @memberof ListUnsubscribeRecipientProjection
*/
createdAt: Date;
/**
*
* @type {string}
* @memberof ListUnsubscribeRecipientProjection
*/
emailAddress: string;
/**
*
* @type {string}
* @memberof ListUnsubscribeRecipientProjection
*/
domainId?: string | null;
/**
*
* @type {string}
* @memberof ListUnsubscribeRecipientProjection
*/
id: string;
}
export function ListUnsubscribeRecipientProjectionFromJSON(
json: any
): ListUnsubscribeRecipientProjection {
return ListUnsubscribeRecipientProjectionFromJSONTyped(json, false);
}
export function ListUnsubscribeRecipientProjectionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ListUnsubscribeRecipientProjection {
if (json === undefined || json === null) {
return json;
}
return {
createdAt: new Date(json['createdAt']),
emailAddress: json['emailAddress'],
domainId: !exists(json, 'domainId') ? undefined : json['domainId'],
id: json['id'],
};
}
export function ListUnsubscribeRecipientProjectionToJSON(
value?: ListUnsubscribeRecipientProjection | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
createdAt: value.createdAt.toISOString(),
emailAddress: value.emailAddress,
domainId: value.domainId,
id: value.id,
};
}
/* 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';
/**
*
* @export
* @interface LinkIssue
*/
export interface LinkIssue {
/**
*
* @type {string}
* @memberof LinkIssue
*/
url: string;
/**
*
* @type {number}
* @memberof LinkIssue
*/
responseStatus?: number;
/**
*
* @type {string}
* @memberof LinkIssue
*/
severity: LinkIssueSeverityEnum;
/**
*
* @type {string}
* @memberof LinkIssue
*/
message: string;
}
/**
* @export
* @enum {string}
*/
export enum LinkIssueSeverityEnum {
Warning = 'Warning',
Error = 'Error',
}
export function LinkIssueFromJSON(json: any): LinkIssue {
return LinkIssueFromJSONTyped(json, false);
}
export function LinkIssueFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): LinkIssue {
if (json === undefined || json === null) {
return json;
}
return {
url: json['url'],
responseStatus: !exists(json, 'responseStatus')
? undefined
: json['responseStatus'],
severity: json['severity'],
message: json['message'],
};
}
export function LinkIssueToJSON(value?: LinkIssue | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
url: value.url,
responseStatus: value.responseStatus,
severity: value.severity,
message: value.message,
};
}
/* 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';
/**
* JSONSchema for payload
* @export
* @interface JSONSchemaDto
*/
export interface JSONSchemaDto {
/**
*
* @type {string}
* @memberof JSONSchemaDto
*/
value: string;
}
export function JSONSchemaDtoFromJSON(json: any): JSONSchemaDto {
return JSONSchemaDtoFromJSONTyped(json, false);
}
export function JSONSchemaDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): JSONSchemaDto {
if (json === undefined || json === null) {
return json;
}
return {
value: json['value'],
};
}
export function JSONSchemaDtoToJSON(value?: JSONSchemaDto | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
value: value.value,
};
}
/* 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';
/**
*
* @export
* @interface InlineObject
*/
export interface InlineObject {
/**
* Optional content type header of attachment
* @type {string}
* @memberof InlineObject
*/
contentTypeHeader?: string;
/**
*
* @type {Blob}
* @memberof InlineObject
*/
file: Blob;
}
export function InlineObjectFromJSON(json: any): InlineObject {
return InlineObjectFromJSONTyped(json, false);
}
export function InlineObjectFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): InlineObject {
if (json === undefined || json === null) {
return json;
}
return {
contentTypeHeader: !exists(json, 'contentTypeHeader')
? undefined
: json['contentTypeHeader'],
file: json['file'],
};
}
export function InlineObjectToJSON(value?: InlineObject | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
contentTypeHeader: value.contentTypeHeader,
file: value.file,
};
}
/* 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';
/**
* Result of test of inbox ruleset
* @export
* @interface InboxRulesetTestResult
*/
export interface InboxRulesetTestResult {
/**
* Map of inbox ruleset ID to boolean of if target matches
* @type {{ [key: string]: boolean; }}
* @memberof InboxRulesetTestResult
*/
rulesetMatches: { [key: string]: boolean };
/**
*
* @type {boolean}
* @memberof InboxRulesetTestResult
*/
matches: boolean;
}
export function InboxRulesetTestResultFromJSON(
json: any
): InboxRulesetTestResult {
return InboxRulesetTestResultFromJSONTyped(json, false);
}
export function InboxRulesetTestResultFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): InboxRulesetTestResult {
if (json === undefined || json === null) {
return json;
}
return {
rulesetMatches: json['rulesetMatches'],
matches: json['matches'],
};
}
export function InboxRulesetTestResultToJSON(
value?: InboxRulesetTestResult | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
rulesetMatches: value.rulesetMatches,
matches: value.matches,
};
}
/* 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';
/**
* Test options for inbox ruleset
* @export
* @interface InboxRulesetTestOptions
*/
export interface InboxRulesetTestOptions {
/**
*
* @type {string}
* @memberof InboxRulesetTestOptions
*/
testTarget: string;
}
export function InboxRulesetTestOptionsFromJSON(
json: any
): InboxRulesetTestOptions {
return InboxRulesetTestOptionsFromJSONTyped(json, false);
}
export function InboxRulesetTestOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): InboxRulesetTestOptions {
if (json === undefined || json === null) {
return json;
}
return {
testTarget: json['testTarget'],
};
}
export function InboxRulesetTestOptionsToJSON(
value?: InboxRulesetTestOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
testTarget: value.testTarget,
};
}
/* 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(),
};
}
/* 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';
/**
* Inbox replier event
* @export
* @interface InboxReplierEventProjection
*/
export interface InboxReplierEventProjection {
/**
*
* @type {Date}
* @memberof InboxReplierEventProjection
*/
createdAt: Date;
/**
*
* @type {Array<string>}
* @memberof InboxReplierEventProjection
*/
recipients?: Array<string> | null;
/**
*
* @type {string}
* @memberof InboxReplierEventProjection
*/
emailId?: string | null;
/**
*
* @type {string}
* @memberof InboxReplierEventProjection
*/
inboxId?: string | null;
/**
*
* @type {string}
* @memberof InboxReplierEventProjection
*/
userId?: string | null;
/**
*
* @type {string}
* @memberof InboxReplierEventProjection
*/
sentId?: string | null;
/**
*
* @type {string}
* @memberof InboxReplierEventProjection
*/
replierId?: string | null;
/**
*
* @type {string}
* @memberof InboxReplierEventProjection
*/
message?: string | null;
/**
*
* @type {string}
* @memberof InboxReplierEventProjection
*/
id?: string | null;
/**
*
* @type {string}
* @memberof InboxReplierEventProjection
*/
status?: InboxReplierEventProjectionStatusEnum;
}
/**
* @export
* @enum {string}
*/
export enum InboxReplierEventProjectionStatusEnum {
SUCCESS = 'SUCCESS',
FAILURE = 'FAILURE',
}
export function InboxReplierEventProjectionFromJSON(
json: any
): InboxReplierEventProjection {
return InboxReplierEventProjectionFromJSONTyped(json, false);
}
export function InboxReplierEventProjectionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): InboxReplierEventProjection {
if (json === undefined || json === null) {
return json;
}
return {
createdAt: new Date(json['createdAt']),
recipients: !exists(json, 'recipients') ? undefined : json['recipients'],
emailId: !exists(json, 'emailId') ? undefined : json['emailId'],
inboxId: !exists(json, 'inboxId') ? undefined : json['inboxId'],
userId: !exists(json, 'userId') ? undefined : json['userId'],
sentId: !exists(json, 'sentId') ? undefined : json['sentId'],
replierId: !exists(json, 'replierId') ? undefined : json['replierId'],
message: !exists(json, 'message') ? undefined : json['message'],
id: !exists(json, 'id') ? undefined : json['id'],
status: !exists(json, 'status') ? undefined : json['status'],
};
}
export function InboxReplierEventProjectionToJSON(
value?: InboxReplierEventProjection | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
createdAt: value.createdAt.toISOString(),
recipients: value.recipients,
emailId: value.emailId,
inboxId: value.inboxId,
userId: value.userId,
sentId: value.sentId,
replierId: value.replierId,
message: value.message,
id: value.id,
status: value.status,
};
}
/* 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';
/**
* Inbox replier. Will automatically reply to inbound emails that match given field for an inbox.
* @export
* @interface InboxReplierDto
*/
export interface InboxReplierDto {
/**
*
* @type {string}
* @memberof InboxReplierDto
*/
id: string;
/**
*
* @type {string}
* @memberof InboxReplierDto
*/
inboxId: string;
/**
*
* @type {string}
* @memberof InboxReplierDto
*/
name?: string | null;
/**
*
* @type {string}
* @memberof InboxReplierDto
*/
field: InboxReplierDtoFieldEnum;
/**
*
* @type {string}
* @memberof InboxReplierDto
*/
match: string;
/**
*
* @type {string}
* @memberof InboxReplierDto
*/
replyTo?: string | null;
/**
*
* @type {string}
* @memberof InboxReplierDto
*/
subject?: string | null;
/**
*
* @type {string}
* @memberof InboxReplierDto
*/
from?: string | null;
/**
*
* @type {string}
* @memberof InboxReplierDto
*/
charset?: string | null;
/**
*
* @type {boolean}
* @memberof InboxReplierDto
*/
isHTML: boolean;
/**
*
* @type {string}
* @memberof InboxReplierDto
*/
templateId?: string | null;
/**
*
* @type {{ [key: string]: object; }}
* @memberof InboxReplierDto
*/
templateVariables?: { [key: string]: object } | null;
/**
*
* @type {boolean}
* @memberof InboxReplierDto
*/
ignoreReplyTo: boolean;
/**
*
* @type {Date}
* @memberof InboxReplierDto
*/
createdAt: Date;
}
/**
* @export
* @enum {string}
*/
export enum InboxReplierDtoFieldEnum {
RECIPIENTS = 'RECIPIENTS',
SENDER = 'SENDER',
SUBJECT = 'SUBJECT',
ATTACHMENTS = 'ATTACHMENTS',
}
export function InboxReplierDtoFromJSON(json: any): InboxReplierDto {
return InboxReplierDtoFromJSONTyped(json, false);
}
export function InboxReplierDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): InboxReplierDto {
if (json === undefined || json === null) {
return json;
}
return {
id: json['id'],
inboxId: json['inboxId'],
name: !exists(json, 'name') ? undefined : json['name'],
field: json['field'],
match: json['match'],
replyTo: !exists(json, 'replyTo') ? undefined : json['replyTo'],
subject: !exists(json, 'subject') ? undefined : json['subject'],
from: !exists(json, 'from') ? undefined : json['from'],
charset: !exists(json, 'charset') ? undefined : json['charset'],
isHTML: json['isHTML'],
templateId: !exists(json, 'templateId') ? undefined : json['templateId'],
templateVariables: !exists(json, 'templateVariables')
? undefined
: json['templateVariables'],
ignoreReplyTo: json['ignoreReplyTo'],
createdAt: new Date(json['createdAt']),
};
}
export function InboxReplierDtoToJSON(value?: InboxReplierDto | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
inboxId: value.inboxId,
name: value.name,
field: value.field,
match: value.match,
replyTo: value.replyTo,
subject: value.subject,
from: value.from,
charset: value.charset,
isHTML: value.isHTML,
templateId: value.templateId,
templateVariables: value.templateVariables,
ignoreReplyTo: value.ignoreReplyTo,
createdAt: value.createdAt.toISOString(),
};
}
/* 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';
/**
* Inbox data preview element.
* @export
* @interface InboxPreview
*/
export interface InboxPreview {
/**
* ID of the inbox. The ID is a UUID-V4 format string. Use the inboxId for calls to Inbox and Email Controller endpoints. See the emailAddress property for the email address or the inbox. To get emails in an inbox use the WaitFor and Inbox Controller methods `waitForLatestEmail` and `getEmails` methods respectively. Inboxes can be used with aliases to forward emails automatically.
* @type {string}
* @memberof InboxPreview
*/
id: string;
/**
* ID of custom domain used by the inbox if any
* @type {string}
* @memberof InboxPreview
*/
domainId?: string | null;
/**
* The inbox's email address. Inbox projections and previews may not include the email address. To view the email address fetch the inbox entity directly. Send an email to this address and the inbox will receive and store it for you. Note the email address in MailSlurp match characters exactly and are case sensitive so `+123` additions are considered different addresses. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID.
* @type {string}
* @memberof InboxPreview
*/
emailAddress?: string | null;
/**
* When the inbox was created. Time stamps are in ISO DateTime Format `yyyy-MM-dd'T'HH:mm:ss.SSSXXX` e.g. `2000-10-31T01:30:00.000-05:00`.
* @type {Date}
* @memberof InboxPreview
*/
createdAt: Date;
/**
* Is the inbox a favorite inbox. Make an inbox a favorite is typically done in the dashboard for quick access or filtering
* @type {boolean}
* @memberof InboxPreview
*/
favourite: boolean;
/**
* Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search
* @type {string}
* @memberof InboxPreview
*/
name?: string | null;
/**
* Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI.
* @type {Array<string>}
* @memberof InboxPreview
*/
tags?: Array<string> | null;
/**
* Does inbox permit team access for organization team members. If so team users can use inbox and emails associated with it. See the team access guide at https://www.mailslurp.com/guides/team-email-account-sharing/
* @type {boolean}
* @memberof InboxPreview
*/
teamAccess: boolean;
/**
* Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send).
* @type {string}
* @memberof InboxPreview
*/
inboxType?: InboxPreviewInboxTypeEnum;
/**
* Virtual inbox can receive email but will not send emails to real recipients. Will save sent email record but never send an actual email. Perfect for testing mail server actions.
* @type {boolean}
* @memberof InboxPreview
*/
virtualInbox: boolean;
/**
* Inbox expiration time. When, if ever, the inbox should expire and be deleted. If null then this inbox is permanent and the emails in it won't be deleted. This is the default behavior unless expiration date is set. If an expiration date is set and the time is reached MailSlurp will expire the inbox and move it to an expired inbox entity. You can still access the emails belonging to it but it can no longer send or receive email.
* @type {string}
* @memberof InboxPreview
*/
expiresAt?: string | null;
/**
* Inbox function if used as a primitive for another system.
* @type {string}
* @memberof InboxPreview
*/
functionsAs?: InboxPreviewFunctionsAsEnum;
}
/**
* @export
* @enum {string}
*/
export enum InboxPreviewInboxTypeEnum {
HTTP_INBOX = 'HTTP_INBOX',
SMTP_INBOX = 'SMTP_INBOX',
}
/**
* @export
* @enum {string}
*/
export enum InboxPreviewFunctionsAsEnum {
ALIAS = 'ALIAS',
THREAD = 'THREAD',
CATCH_ALL = 'CATCH_ALL',
CONNECTOR = 'CONNECTOR',
}
export function InboxPreviewFromJSON(json: any): InboxPreview {
return InboxPreviewFromJSONTyped(json, false);
}
export function InboxPreviewFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): InboxPreview {
if (json === undefined || json === null) {
return json;
}
return {
id: json['id'],
domainId: !exists(json, 'domainId') ? undefined : json['domainId'],
emailAddress: !exists(json, 'emailAddress')
? undefined
: json['emailAddress'],
createdAt: new Date(json['createdAt']),
favourite: json['favourite'],
name: !exists(json, 'name') ? undefined : json['name'],
tags: !exists(json, 'tags') ? undefined : json['tags'],
teamAccess: json['teamAccess'],
inboxType: !exists(json, 'inboxType') ? undefined : json['inboxType'],
virtualInbox: json['virtualInbox'],
expiresAt: !exists(json, 'expiresAt') ? undefined : json['expiresAt'],
functionsAs: !exists(json, 'functionsAs') ? undefined : json['functionsAs'],
};
}
export function InboxPreviewToJSON(value?: InboxPreview | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
domainId: value.domainId,
emailAddress: value.emailAddress,
createdAt: value.createdAt.toISOString(),
favourite: value.favourite,
name: value.name,
tags: value.tags,
teamAccess: value.teamAccess,
inboxType: value.inboxType,
virtualInbox: value.virtualInbox,
expiresAt: value.expiresAt,
functionsAs: value.functionsAs,
};
}
/* 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';
import {
InboxIdItem,
InboxIdItemFromJSON,
InboxIdItemFromJSONTyped,
InboxIdItemToJSON,
} from './';
/**
* List of inbox IDs and email addresses
* @export
* @interface InboxIdsResult
*/
export interface InboxIdsResult {
/**
*
* @type {Array<InboxIdItem>}
* @memberof InboxIdsResult
*/
inboxIds: Array<InboxIdItem>;
}
export function InboxIdsResultFromJSON(json: any): InboxIdsResult {
return InboxIdsResultFromJSONTyped(json, false);
}
export function InboxIdsResultFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): InboxIdsResult {
if (json === undefined || json === null) {
return json;
}
return {
inboxIds: (json['inboxIds'] as Array<any>).map(InboxIdItemFromJSON),
};
}
export function InboxIdsResultToJSON(value?: InboxIdsResult | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
inboxIds: (value.inboxIds as Array<any>).map(InboxIdItemToJSON),
};
}
/* 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';
/**
* Inbox ID and email address pair
* @export
* @interface InboxIdItem
*/
export interface InboxIdItem {
/**
*
* @type {string}
* @memberof InboxIdItem
*/
id: string;
/**
*
* @type {string}
* @memberof InboxIdItem
*/
emailAddress: string;
}
export function InboxIdItemFromJSON(json: any): InboxIdItem {
return InboxIdItemFromJSONTyped(json, false);
}
export function InboxIdItemFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): InboxIdItem {
if (json === undefined || json === null) {
return json;
}
return {
id: json['id'],
emailAddress: json['emailAddress'],
};
}
export function InboxIdItemToJSON(value?: InboxIdItem | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
emailAddress: value.emailAddress,
};
}
/* 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';
/**
* Results of inbox forwarder test
* @export
* @interface InboxForwarderTestResult
*/
export interface InboxForwarderTestResult {
/**
*
* @type {{ [key: string]: boolean; }}
* @memberof InboxForwarderTestResult
*/
matches: { [key: string]: boolean };
/**
*
* @type {boolean}
* @memberof InboxForwarderTestResult
*/
doesMatch: boolean;
}
export function InboxForwarderTestResultFromJSON(
json: any
): InboxForwarderTestResult {
return InboxForwarderTestResultFromJSONTyped(json, false);
}
export function InboxForwarderTestResultFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): InboxForwarderTestResult {
if (json === undefined || json === null) {
return json;
}
return {
matches: json['matches'],
doesMatch: json['doesMatch'],
};
}
export function InboxForwarderTestResultToJSON(
value?: InboxForwarderTestResult | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
matches: value.matches,
doesMatch: value.doesMatch,
};
}
/* 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 testing an inbox forwarder against a value
* @export
* @interface InboxForwarderTestOptions
*/
export interface InboxForwarderTestOptions {
/**
*
* @type {string}
* @memberof InboxForwarderTestOptions
*/
testValue: string;
}
export function InboxForwarderTestOptionsFromJSON(
json: any
): InboxForwarderTestOptions {
return InboxForwarderTestOptionsFromJSONTyped(json, false);
}
export function InboxForwarderTestOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): InboxForwarderTestOptions {
if (json === undefined || json === null) {
return json;
}
return {
testValue: json['testValue'],
};
}
export function InboxForwarderTestOptionsToJSON(
value?: InboxForwarderTestOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
testValue: value.testValue,
};
}
/* 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';
/**
* Inbox forwarder event
* @export
* @interface InboxForwarderEventProjection
*/
export interface InboxForwarderEventProjection {
/**
*
* @type {Date}
* @memberof InboxForwarderEventProjection
*/
createdAt: Date;
/**
*
* @type {string}
* @memberof InboxForwarderEventProjection
*/
emailId?: string | null;
/**
*
* @type {string}
* @memberof InboxForwarderEventProjection
*/
inboxId?: string | null;
/**
*
* @type {string}
* @memberof InboxForwarderEventProjection
*/
userId?: string | null;
/**
*
* @type {string}
* @memberof InboxForwarderEventProjection
*/
forwarderId?: string | null;
/**
*
* @type {string}
* @memberof InboxForwarderEventProjection
*/
message?: string | null;
/**
*
* @type {string}
* @memberof InboxForwarderEventProjection
*/
id?: string | null;
/**
*
* @type {string}
* @memberof InboxForwarderEventProjection
*/
status?: InboxForwarderEventProjectionStatusEnum;
}
/**
* @export
* @enum {string}
*/
export enum InboxForwarderEventProjectionStatusEnum {
SUCCESS = 'SUCCESS',
FAILURE = 'FAILURE',
}
export function InboxForwarderEventProjectionFromJSON(
json: any
): InboxForwarderEventProjection {
return InboxForwarderEventProjectionFromJSONTyped(json, false);
}
export function InboxForwarderEventProjectionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): InboxForwarderEventProjection {
if (json === undefined || json === null) {
return json;
}
return {
createdAt: new Date(json['createdAt']),
emailId: !exists(json, 'emailId') ? undefined : json['emailId'],
inboxId: !exists(json, 'inboxId') ? undefined : json['inboxId'],
userId: !exists(json, 'userId') ? undefined : json['userId'],
forwarderId: !exists(json, 'forwarderId') ? undefined : json['forwarderId'],
message: !exists(json, 'message') ? undefined : json['message'],
id: !exists(json, 'id') ? undefined : json['id'],
status: !exists(json, 'status') ? undefined : json['status'],
};
}
export function InboxForwarderEventProjectionToJSON(
value?: InboxForwarderEventProjection | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
createdAt: value.createdAt.toISOString(),
emailId: value.emailId,
inboxId: value.inboxId,
userId: value.userId,
forwarderId: value.forwarderId,
message: value.message,
id: value.id,
status: value.status,
};
}
/* 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';
/**
* Inbox forwarder event. Describes how an email was handled by an inbox forwarder.
* @export
* @interface InboxForwarderEventDto
*/
export interface InboxForwarderEventDto {
/**
*
* @type {string}
* @memberof InboxForwarderEventDto
*/
id?: string | null;
/**
*
* @type {string}
* @memberof InboxForwarderEventDto
*/
inboxId?: string | null;
/**
*
* @type {string}
* @memberof InboxForwarderEventDto
*/
emailId?: string | null;
/**
*
* @type {string}
* @memberof InboxForwarderEventDto
*/
userId?: string | null;
/**
*
* @type {string}
* @memberof InboxForwarderEventDto
*/
forwarderId?: string | null;
/**
*
* @type {string}
* @memberof InboxForwarderEventDto
*/
message?: string | null;
/**
*
* @type {string}
* @memberof InboxForwarderEventDto
*/
status?: InboxForwarderEventDtoStatusEnum;
/**
*
* @type {Date}
* @memberof InboxForwarderEventDto
*/
createdAt: Date;
}
/**
* @export
* @enum {string}
*/
export enum InboxForwarderEventDtoStatusEnum {
SUCCESS = 'SUCCESS',
FAILURE = 'FAILURE',
}
export function InboxForwarderEventDtoFromJSON(
json: any
): InboxForwarderEventDto {
return InboxForwarderEventDtoFromJSONTyped(json, false);
}
export function InboxForwarderEventDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): InboxForwarderEventDto {
if (json === undefined || json === null) {
return json;
}
return {
id: !exists(json, 'id') ? undefined : json['id'],
inboxId: !exists(json, 'inboxId') ? undefined : json['inboxId'],
emailId: !exists(json, 'emailId') ? undefined : json['emailId'],
userId: !exists(json, 'userId') ? undefined : json['userId'],
forwarderId: !exists(json, 'forwarderId') ? undefined : json['forwarderId'],
message: !exists(json, 'message') ? undefined : json['message'],
status: !exists(json, 'status') ? undefined : json['status'],
createdAt: new Date(json['createdAt']),
};
}
export function InboxForwarderEventDtoToJSON(
value?: InboxForwarderEventDto | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
inboxId: value.inboxId,
emailId: value.emailId,
userId: value.userId,
forwarderId: value.forwarderId,
message: value.message,
status: value.status,
createdAt: value.createdAt.toISOString(),
};
}
/* 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';
/**
* Inbox forwarder. Describes how an inbox will forward matching emails to designated recipients.
* @export
* @interface InboxForwarderDto
*/
export interface InboxForwarderDto {
/**
*
* @type {string}
* @memberof InboxForwarderDto
*/
id: string;
/**
*
* @type {string}
* @memberof InboxForwarderDto
*/
inboxId: string;
/**
* Name of inbox forwarder
* @type {string}
* @memberof InboxForwarderDto
*/
name?: string | null;
/**
* Which field to match against
* @type {string}
* @memberof InboxForwarderDto
*/
field: InboxForwarderDtoFieldEnum;
/**
* Wild-card type pattern to apply to field
* @type {string}
* @memberof InboxForwarderDto
*/
match: string;
/**
* Who to send forwarded email to
* @type {Array<string>}
* @memberof InboxForwarderDto
*/
forwardToRecipients: Array<string>;
/**
*
* @type {Date}
* @memberof InboxForwarderDto
*/
createdAt: Date;
}
/**
* @export
* @enum {string}
*/
export enum InboxForwarderDtoFieldEnum {
RECIPIENTS = 'RECIPIENTS',
SENDER = 'SENDER',
SUBJECT = 'SUBJECT',
ATTACHMENTS = 'ATTACHMENTS',
}
export function InboxForwarderDtoFromJSON(json: any): InboxForwarderDto {
return InboxForwarderDtoFromJSONTyped(json, false);
}
export function InboxForwarderDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): InboxForwarderDto {
if (json === undefined || json === null) {
return json;
}
return {
id: json['id'],
inboxId: json['inboxId'],
name: !exists(json, 'name') ? undefined : json['name'],
field: json['field'],
match: json['match'],
forwardToRecipients: json['forwardToRecipients'],
createdAt: new Date(json['createdAt']),
};
}
export function InboxForwarderDtoToJSON(value?: InboxForwarderDto | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
inboxId: value.inboxId,
name: value.name,
field: value.field,
match: value.match,
forwardToRecipients: value.forwardToRecipients,
createdAt: value.createdAt.toISOString(),
};
}
/* 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';
/**
* Result of email exists query
* @export
* @interface InboxExistsDto
*/
export interface InboxExistsDto {
/**
*
* @type {boolean}
* @memberof InboxExistsDto
*/
_exists: boolean;
}
export function InboxExistsDtoFromJSON(json: any): InboxExistsDto {
return InboxExistsDtoFromJSONTyped(json, false);
}
export function InboxExistsDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): InboxExistsDto {
if (json === undefined || json === null) {
return json;
}
return {
_exists: json['exists'],
};
}
export function InboxExistsDtoToJSON(value?: InboxExistsDto | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
exists: value._exists,
};
}
/* 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';
/**
* Representation of a MailSlurp inbox. An inbox has an ID and a real email address. Emails can be sent to or from this email address. Inboxes are either `SMTP` or `HTTP` mailboxes. The default, `HTTP` inboxes, use AWS SES to process emails and are best suited as test email accounts and do not support IMAP or POP3. `SMTP` inboxes use a custom mail server at `mx.mailslurp.com` and support SMTP login, IMAP and POP3. Use the `EmailController` or the `InboxController` methods to send and receive emails and attachments. Inboxes may have a description, name, and tags for display purposes. You can also favourite an inbox for easier searching.
* @export
* @interface InboxDto
*/
export interface InboxDto {
/**
* ID of the inbox. The ID is a UUID-V4 format string. Use the inboxId for calls to Inbox and Email Controller endpoints. See the emailAddress property for the email address or the inbox. To get emails in an inbox use the WaitFor and Inbox Controller methods `waitForLatestEmail` and `getEmails` methods respectively. Inboxes can be used with aliases to forward emails automatically.
* @type {string}
* @memberof InboxDto
*/
id: string;
/**
* ID of user that inbox belongs to
* @type {string}
* @memberof InboxDto
*/
userId?: string | null;
/**
* When the inbox was created. Time stamps are in ISO DateTime Format `yyyy-MM-dd'T'HH:mm:ss.SSSXXX` e.g. `2000-10-31T01:30:00.000-05:00`.
* @type {Date}
* @memberof InboxDto
*/
createdAt: Date;
/**
* Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search
* @type {string}
* @memberof InboxDto
*/
name?: string | null;
/**
* ID of custom domain used by the inbox if any
* @type {string}
* @memberof InboxDto
*/
domainId?: string | null;
/**
* Description of an inbox for labelling and searching purposes
* @type {string}
* @memberof InboxDto
*/
description?: string | null;
/**
* The inbox's email address. Inbox projections and previews may not include the email address. To view the email address fetch the inbox entity directly. Send an email to this address and the inbox will receive and store it for you. Note the email address in MailSlurp match characters exactly and are case sensitive so `+123` additions are considered different addresses. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID.
* @type {string}
* @memberof InboxDto
*/
emailAddress: string;
/**
* Inbox expiration time. When, if ever, the inbox should expire and be deleted. If null then this inbox is permanent and the emails in it won't be deleted. This is the default behavior unless expiration date is set. If an expiration date is set and the time is reached MailSlurp will expire the inbox and move it to an expired inbox entity. You can still access the emails belonging to it but it can no longer send or receive email.
* @type {string}
* @memberof InboxDto
*/
expiresAt?: string | null;
/**
* Is the inbox a favorite inbox. Make an inbox a favorite is typically done in the dashboard for quick access or filtering
* @type {boolean}
* @memberof InboxDto
*/
favourite: boolean;
/**
* Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI.
* @type {Array<string>}
* @memberof InboxDto
*/
tags?: Array<string> | null;
/**
* Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send).
* @type {string}
* @memberof InboxDto
*/
inboxType?: InboxDtoInboxTypeEnum;
/**
* Is the inbox readOnly for the caller. Read only means can not be deleted or modified. This flag is present when using team accounts and shared inboxes.
* @type {boolean}
* @memberof InboxDto
*/
readOnly: boolean;
/**
* Virtual inbox can receive email but will not send emails to real recipients. Will save sent email record but never send an actual email. Perfect for testing mail server actions.
* @type {boolean}
* @memberof InboxDto
*/
virtualInbox: boolean;
/**
* Inbox function if used as a primitive for another system.
* @type {string}
* @memberof InboxDto
*/
functionsAs?: InboxDtoFunctionsAsEnum;
}
/**
* @export
* @enum {string}
*/
export enum InboxDtoInboxTypeEnum {
HTTP_INBOX = 'HTTP_INBOX',
SMTP_INBOX = 'SMTP_INBOX',
}
/**
* @export
* @enum {string}
*/
export enum InboxDtoFunctionsAsEnum {
ALIAS = 'ALIAS',
THREAD = 'THREAD',
CATCH_ALL = 'CATCH_ALL',
CONNECTOR = 'CONNECTOR',
}
export function InboxDtoFromJSON(json: any): InboxDto {
return InboxDtoFromJSONTyped(json, false);
}
export function InboxDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): InboxDto {
if (json === undefined || json === null) {
return json;
}
return {
id: json['id'],
userId: !exists(json, 'userId') ? undefined : json['userId'],
createdAt: new Date(json['createdAt']),
name: !exists(json, 'name') ? undefined : json['name'],
domainId: !exists(json, 'domainId') ? undefined : json['domainId'],
description: !exists(json, 'description') ? undefined : json['description'],
emailAddress: json['emailAddress'],
expiresAt: !exists(json, 'expiresAt') ? undefined : json['expiresAt'],
favourite: json['favourite'],
tags: !exists(json, 'tags') ? undefined : json['tags'],
inboxType: !exists(json, 'inboxType') ? undefined : json['inboxType'],
readOnly: json['readOnly'],
virtualInbox: json['virtualInbox'],
functionsAs: !exists(json, 'functionsAs') ? undefined : json['functionsAs'],
};
}
export function InboxDtoToJSON(value?: InboxDto | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
userId: value.userId,
createdAt: value.createdAt.toISOString(),
name: value.name,
domainId: value.domainId,
description: value.description,
emailAddress: value.emailAddress,
expiresAt: value.expiresAt,
favourite: value.favourite,
tags: value.tags,
inboxType: value.inboxType,
readOnly: value.readOnly,
virtualInbox: value.virtualInbox,
functionsAs: value.functionsAs,
};
}
/* 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';
/**
* Result of search for inbox by name
* @export
* @interface InboxByNameResult
*/
export interface InboxByNameResult {
/**
*
* @type {string}
* @memberof InboxByNameResult
*/
inboxId?: string | null;
/**
*
* @type {boolean}
* @memberof InboxByNameResult
*/
_exists: boolean;
}
export function InboxByNameResultFromJSON(json: any): InboxByNameResult {
return InboxByNameResultFromJSONTyped(json, false);
}
export function InboxByNameResultFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): InboxByNameResult {
if (json === undefined || json === null) {
return json;
}
return {
inboxId: !exists(json, 'inboxId') ? undefined : json['inboxId'],
_exists: json['exists'],
};
}
export function InboxByNameResultToJSON(value?: InboxByNameResult | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
inboxId: value.inboxId,
exists: value._exists,
};
}
/* 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';
/**
* Result of search for inbox by email address
* @export
* @interface InboxByEmailAddressResult
*/
export interface InboxByEmailAddressResult {
/**
*
* @type {string}
* @memberof InboxByEmailAddressResult
*/
inboxId?: string | null;
/**
*
* @type {boolean}
* @memberof InboxByEmailAddressResult
*/
_exists: boolean;
}
export function InboxByEmailAddressResultFromJSON(
json: any
): InboxByEmailAddressResult {
return InboxByEmailAddressResultFromJSONTyped(json, false);
}
export function InboxByEmailAddressResultFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): InboxByEmailAddressResult {
if (json === undefined || json === null) {
return json;
}
return {
inboxId: !exists(json, 'inboxId') ? undefined : json['inboxId'],
_exists: json['exists'],
};
}
export function InboxByEmailAddressResultToJSON(
value?: InboxByEmailAddressResult | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
inboxId: value.inboxId,
exists: value._exists,
};
}
/* 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';
/**
*
* @export
* @interface ImapUpdateFlagsOptions
*/
export interface ImapUpdateFlagsOptions {
/**
*
* @type {string}
* @memberof ImapUpdateFlagsOptions
*/
operation: string;
/**
*
* @type {Array<string>}
* @memberof ImapUpdateFlagsOptions
*/
flags?: Array<string> | null;
/**
*
* @type {string}
* @memberof ImapUpdateFlagsOptions
*/
uidSet?: string | null;
/**
*
* @type {string}
* @memberof ImapUpdateFlagsOptions
*/
seqSet?: string | null;
}
export function ImapUpdateFlagsOptionsFromJSON(
json: any
): ImapUpdateFlagsOptions {
return ImapUpdateFlagsOptionsFromJSONTyped(json, false);
}
export function ImapUpdateFlagsOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ImapUpdateFlagsOptions {
if (json === undefined || json === null) {
return json;
}
return {
operation: json['operation'],
flags: !exists(json, 'flags') ? undefined : json['flags'],
uidSet: !exists(json, 'uidSet') ? undefined : json['uidSet'],
seqSet: !exists(json, 'seqSet') ? undefined : json['seqSet'],
};
}
export function ImapUpdateFlagsOptionsToJSON(
value?: ImapUpdateFlagsOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
operation: value.operation,
flags: value.flags,
uidSet: value.uidSet,
seqSet: value.seqSet,
};
}
/* 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';
import {
ServerEndpoints,
ServerEndpointsFromJSON,
ServerEndpointsFromJSONTyped,
ServerEndpointsToJSON,
} from './';
/**
* IMAP and SMTP server endpoints for MailSlurp
* @export
* @interface ImapSmtpAccessServers
*/
export interface ImapSmtpAccessServers {
/**
*
* @type {ServerEndpoints}
* @memberof ImapSmtpAccessServers
*/
imapServer: ServerEndpoints;
/**
*
* @type {ServerEndpoints}
* @memberof ImapSmtpAccessServers
*/
secureImapServer: ServerEndpoints;
/**
*
* @type {ServerEndpoints}
* @memberof ImapSmtpAccessServers
*/
smtpServer: ServerEndpoints;
/**
*
* @type {ServerEndpoints}
* @memberof ImapSmtpAccessServers
*/
secureSmtpServer: ServerEndpoints;
}
export function ImapSmtpAccessServersFromJSON(
json: any
): ImapSmtpAccessServers {
return ImapSmtpAccessServersFromJSONTyped(json, false);
}
export function ImapSmtpAccessServersFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ImapSmtpAccessServers {
if (json === undefined || json === null) {
return json;
}
return {
imapServer: ServerEndpointsFromJSON(json['imapServer']),
secureImapServer: ServerEndpointsFromJSON(json['secureImapServer']),
smtpServer: ServerEndpointsFromJSON(json['smtpServer']),
secureSmtpServer: ServerEndpointsFromJSON(json['secureSmtpServer']),
};
}
export function ImapSmtpAccessServersToJSON(
value?: ImapSmtpAccessServers | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
imapServer: ServerEndpointsToJSON(value.imapServer),
secureImapServer: ServerEndpointsToJSON(value.secureImapServer),
smtpServer: ServerEndpointsToJSON(value.smtpServer),
secureSmtpServer: ServerEndpointsToJSON(value.secureSmtpServer),
};
}
/* 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';
/**
* Access details for inbox using SMTP or IMAP
* @export
* @interface ImapSmtpAccessDetails
*/
export interface ImapSmtpAccessDetails {
/**
* Secure TLS SMTP server host domain
* @type {string}
* @memberof ImapSmtpAccessDetails
*/
secureSmtpServerHost: string;
/**
* Secure TLS SMTP server host port
* @type {number}
* @memberof ImapSmtpAccessDetails
*/
secureSmtpServerPort: number;
/**
* Secure TLS SMTP username for login
* @type {string}
* @memberof ImapSmtpAccessDetails
*/
secureSmtpUsername: string;
/**
* Secure TLS SMTP password for login
* @type {string}
* @memberof ImapSmtpAccessDetails
*/
secureSmtpPassword: string;
/**
* SMTP server host domain
* @type {string}
* @memberof ImapSmtpAccessDetails
*/
smtpServerHost: string;
/**
* SMTP server host port
* @type {number}
* @memberof ImapSmtpAccessDetails
*/
smtpServerPort: number;
/**
* SMTP username for login
* @type {string}
* @memberof ImapSmtpAccessDetails
*/
smtpUsername: string;
/**
* SMTP password for login
* @type {string}
* @memberof ImapSmtpAccessDetails
*/
smtpPassword: string;
/**
* Secure TLS IMAP server host domain
* @type {string}
* @memberof ImapSmtpAccessDetails
*/
secureImapServerHost: string;
/**
* Secure TLS IMAP server host port
* @type {number}
* @memberof ImapSmtpAccessDetails
*/
secureImapServerPort: number;
/**
* Secure TLS IMAP username for login
* @type {string}
* @memberof ImapSmtpAccessDetails
*/
secureImapUsername: string;
/**
* Secure TLS IMAP password for login
* @type {string}
* @memberof ImapSmtpAccessDetails
*/
secureImapPassword: string;
/**
* IMAP server host domain
* @type {string}
* @memberof ImapSmtpAccessDetails
*/
imapServerHost: string;
/**
* IMAP server host port
* @type {number}
* @memberof ImapSmtpAccessDetails
*/
imapServerPort: number;
/**
* IMAP username for login
* @type {string}
* @memberof ImapSmtpAccessDetails
*/
imapUsername: string;
/**
* IMAP password for login
* @type {string}
* @memberof ImapSmtpAccessDetails
*/
imapPassword: string;
/**
* IMAP mailbox to SELECT
* @type {string}
* @memberof ImapSmtpAccessDetails
*/
imapMailbox: string;
/**
* Mail from domain or SMTP HELO value
* @type {string}
* @memberof ImapSmtpAccessDetails
*/
mailFromDomain?: string | null;
}
export function ImapSmtpAccessDetailsFromJSON(
json: any
): ImapSmtpAccessDetails {
return ImapSmtpAccessDetailsFromJSONTyped(json, false);
}
export function ImapSmtpAccessDetailsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ImapSmtpAccessDetails {
if (json === undefined || json === null) {
return json;
}
return {
secureSmtpServerHost: json['secureSmtpServerHost'],
secureSmtpServerPort: json['secureSmtpServerPort'],
secureSmtpUsername: json['secureSmtpUsername'],
secureSmtpPassword: json['secureSmtpPassword'],
smtpServerHost: json['smtpServerHost'],
smtpServerPort: json['smtpServerPort'],
smtpUsername: json['smtpUsername'],
smtpPassword: json['smtpPassword'],
secureImapServerHost: json['secureImapServerHost'],
secureImapServerPort: json['secureImapServerPort'],
secureImapUsername: json['secureImapUsername'],
secureImapPassword: json['secureImapPassword'],
imapServerHost: json['imapServerHost'],
imapServerPort: json['imapServerPort'],
imapUsername: json['imapUsername'],
imapPassword: json['imapPassword'],
imapMailbox: json['imapMailbox'],
mailFromDomain: !exists(json, 'mailFromDomain')
? undefined
: json['mailFromDomain'],
};
}
export function ImapSmtpAccessDetailsToJSON(
value?: ImapSmtpAccessDetails | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
secureSmtpServerHost: value.secureSmtpServerHost,
secureSmtpServerPort: value.secureSmtpServerPort,
secureSmtpUsername: value.secureSmtpUsername,
secureSmtpPassword: value.secureSmtpPassword,
smtpServerHost: value.smtpServerHost,
smtpServerPort: value.smtpServerPort,
smtpUsername: value.smtpUsername,
smtpPassword: value.smtpPassword,
secureImapServerHost: value.secureImapServerHost,
secureImapServerPort: value.secureImapServerPort,
secureImapUsername: value.secureImapUsername,
secureImapPassword: value.secureImapPassword,
imapServerHost: value.imapServerHost,
imapServerPort: value.imapServerPort,
imapUsername: value.imapUsername,
imapPassword: value.imapPassword,
imapMailbox: value.imapMailbox,
mailFromDomain: value.mailFromDomain,
};
}
/* 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';
import {
ImapMailboxStatus,
ImapMailboxStatusFromJSON,
ImapMailboxStatusFromJSONTyped,
ImapMailboxStatusToJSON,
} from './';
/**
*
* @export
* @interface ImapServerStatusResult
*/
export interface ImapServerStatusResult {
/**
*
* @type {ImapMailboxStatus}
* @memberof ImapServerStatusResult
*/
result?: ImapMailboxStatus | null;
}
export function ImapServerStatusResultFromJSON(
json: any
): ImapServerStatusResult {
return ImapServerStatusResultFromJSONTyped(json, false);
}
export function ImapServerStatusResultFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ImapServerStatusResult {
if (json === undefined || json === null) {
return json;
}
return {
result: !exists(json, 'result')
? undefined
: ImapMailboxStatusFromJSON(json['result']),
};
}
export function ImapServerStatusResultToJSON(
value?: ImapServerStatusResult | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
result: ImapMailboxStatusToJSON(value.result),
};
}
/* 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';
/**
*
* @export
* @interface ImapServerStatusOptions
*/
export interface ImapServerStatusOptions {
/**
*
* @type {string}
* @memberof ImapServerStatusOptions
*/
name?: string | null;
/**
*
* @type {Array<string>}
* @memberof ImapServerStatusOptions
*/
statusItems?: Array<ImapServerStatusOptionsStatusItemsEnum>;
}
/**
* @export
* @enum {string}
*/
export enum ImapServerStatusOptionsStatusItemsEnum {
MESSAGES = 'MESSAGES',
RECENT = 'RECENT',
UIDNEXT = 'UIDNEXT',
UIDVALIDITY = 'UIDVALIDITY',
UNSEEN = 'UNSEEN',
APPENDLIMIT = 'APPENDLIMIT',
}
export function ImapServerStatusOptionsFromJSON(
json: any
): ImapServerStatusOptions {
return ImapServerStatusOptionsFromJSONTyped(json, false);
}
export function ImapServerStatusOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ImapServerStatusOptions {
if (json === undefined || json === null) {
return json;
}
return {
name: !exists(json, 'name') ? undefined : json['name'],
statusItems: !exists(json, 'statusItems') ? undefined : json['statusItems'],
};
}
export function ImapServerStatusOptionsToJSON(
value?: ImapServerStatusOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
name: value.name,
statusItems: value.statusItems,
};
}
/* 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';
import {
ImapEmailProjection,
ImapEmailProjectionFromJSON,
ImapEmailProjectionFromJSONTyped,
ImapEmailProjectionToJSON,
} from './';
/**
*
* @export
* @interface ImapServerSearchResult
*/
export interface ImapServerSearchResult {
/**
*
* @type {Array<ImapEmailProjection>}
* @memberof ImapServerSearchResult
*/
results: Array<ImapEmailProjection>;
}
export function ImapServerSearchResultFromJSON(
json: any
): ImapServerSearchResult {
return ImapServerSearchResultFromJSONTyped(json, false);
}
export function ImapServerSearchResultFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ImapServerSearchResult {
if (json === undefined || json === null) {
return json;
}
return {
results: (json['results'] as Array<any>).map(ImapEmailProjectionFromJSON),
};
}
export function ImapServerSearchResultToJSON(
value?: ImapServerSearchResult | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
results: (value.results as Array<any>).map(ImapEmailProjectionToJSON),
};
}
/* 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';
/**
* IMAP server search options
* @export
* @interface ImapServerSearchOptions
*/
export interface ImapServerSearchOptions {
/**
*
* @type {string}
* @memberof ImapServerSearchOptions
*/
seqNum?: string | null;
/**
*
* @type {string}
* @memberof ImapServerSearchOptions
*/
uid?: string | null;
/**
*
* @type {Date}
* @memberof ImapServerSearchOptions
*/
since?: Date | null;
/**
*
* @type {Date}
* @memberof ImapServerSearchOptions
*/
before?: Date | null;
/**
*
* @type {Date}
* @memberof ImapServerSearchOptions
*/
sentSince?: Date | null;
/**
*
* @type {Date}
* @memberof ImapServerSearchOptions
*/
sentBefore?: Date | null;
/**
*
* @type {{ [key: string]: Array<string>; }}
* @memberof ImapServerSearchOptions
*/
header?: { [key: string]: Array<string> } | null;
/**
*
* @type {Array<string>}
* @memberof ImapServerSearchOptions
*/
body?: Array<string> | null;
/**
*
* @type {Array<string>}
* @memberof ImapServerSearchOptions
*/
text?: Array<string> | null;
/**
*
* @type {Array<string>}
* @memberof ImapServerSearchOptions
*/
withFlags?: Array<string> | null;
/**
*
* @type {Array<string>}
* @memberof ImapServerSearchOptions
*/
withoutFlags?: Array<string> | null;
}
export function ImapServerSearchOptionsFromJSON(
json: any
): ImapServerSearchOptions {
return ImapServerSearchOptionsFromJSONTyped(json, false);
}
export function ImapServerSearchOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ImapServerSearchOptions {
if (json === undefined || json === null) {
return json;
}
return {
seqNum: !exists(json, 'seqNum') ? undefined : json['seqNum'],
uid: !exists(json, 'uid') ? undefined : json['uid'],
since: !exists(json, 'since')
? undefined
: json['since'] === null
? null
: new Date(json['since']),
before: !exists(json, 'before')
? undefined
: json['before'] === null
? null
: new Date(json['before']),
sentSince: !exists(json, 'sentSince')
? undefined
: json['sentSince'] === null
? null
: new Date(json['sentSince']),
sentBefore: !exists(json, 'sentBefore')
? undefined
: json['sentBefore'] === null
? null
: new Date(json['sentBefore']),
header: !exists(json, 'header') ? undefined : json['header'],
body: !exists(json, 'body') ? undefined : json['body'],
text: !exists(json, 'text') ? undefined : json['text'],
withFlags: !exists(json, 'withFlags') ? undefined : json['withFlags'],
withoutFlags: !exists(json, 'withoutFlags')
? undefined
: json['withoutFlags'],
};
}
export function ImapServerSearchOptionsToJSON(
value?: ImapServerSearchOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
seqNum: value.seqNum,
uid: value.uid,
since:
value.since === undefined
? undefined
: value.since === null
? null
: value.since.toISOString(),
before:
value.before === undefined
? undefined
: value.before === null
? null
: value.before.toISOString(),
sentSince:
value.sentSince === undefined
? undefined
: value.sentSince === null
? null
: value.sentSince.toISOString(),
sentBefore:
value.sentBefore === undefined
? undefined
: value.sentBefore === null
? null
: value.sentBefore.toISOString(),
header: value.header,
body: value.body,
text: value.text,
withFlags: value.withFlags,
withoutFlags: value.withoutFlags,
};
}
/* 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';
import {
ImapEmailProjection,
ImapEmailProjectionFromJSON,
ImapEmailProjectionFromJSONTyped,
ImapEmailProjectionToJSON,
} from './';
/**
*
* @export
* @interface ImapServerListResult
*/
export interface ImapServerListResult {
/**
*
* @type {Array<ImapEmailProjection>}
* @memberof ImapServerListResult
*/
results: Array<ImapEmailProjection>;
}
export function ImapServerListResultFromJSON(json: any): ImapServerListResult {
return ImapServerListResultFromJSONTyped(json, false);
}
export function ImapServerListResultFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ImapServerListResult {
if (json === undefined || json === null) {
return json;
}
return {
results: (json['results'] as Array<any>).map(ImapEmailProjectionFromJSON),
};
}
export function ImapServerListResultToJSON(
value?: ImapServerListResult | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
results: (value.results as Array<any>).map(ImapEmailProjectionToJSON),
};
}
/* 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';
/**
*
* @export
* @interface ImapServerListOptions
*/
export interface ImapServerListOptions {
/**
*
* @type {string}
* @memberof ImapServerListOptions
*/
uidSet?: string | null;
/**
*
* @type {string}
* @memberof ImapServerListOptions
*/
seqSet?: string | null;
}
export function ImapServerListOptionsFromJSON(
json: any
): ImapServerListOptions {
return ImapServerListOptionsFromJSONTyped(json, false);
}
export function ImapServerListOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ImapServerListOptions {
if (json === undefined || json === null) {
return json;
}
return {
uidSet: !exists(json, 'uidSet') ? undefined : json['uidSet'],
seqSet: !exists(json, 'seqSet') ? undefined : json['seqSet'],
};
}
export function ImapServerListOptionsToJSON(
value?: ImapServerListOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
uidSet: value.uidSet,
seqSet: value.seqSet,
};
}
/* 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';
import {
ImapEmailProjection,
ImapEmailProjectionFromJSON,
ImapEmailProjectionFromJSONTyped,
ImapEmailProjectionToJSON,
} from './';
/**
*
* @export
* @interface ImapServerGetResult
*/
export interface ImapServerGetResult {
/**
*
* @type {ImapEmailProjection}
* @memberof ImapServerGetResult
*/
result?: ImapEmailProjection;
}
export function ImapServerGetResultFromJSON(json: any): ImapServerGetResult {
return ImapServerGetResultFromJSONTyped(json, false);
}
export function ImapServerGetResultFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ImapServerGetResult {
if (json === undefined || json === null) {
return json;
}
return {
result: !exists(json, 'result')
? undefined
: ImapEmailProjectionFromJSON(json['result']),
};
}
export function ImapServerGetResultToJSON(
value?: ImapServerGetResult | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
result: ImapEmailProjectionToJSON(value.result),
};
}
/* 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';
import {
ImapServerFetchItem,
ImapServerFetchItemFromJSON,
ImapServerFetchItemFromJSONTyped,
ImapServerFetchItemToJSON,
} from './';
/**
* IMAP fetch email result
* @export
* @interface ImapServerFetchResult
*/
export interface ImapServerFetchResult {
/**
*
* @type {ImapServerFetchItem}
* @memberof ImapServerFetchResult
*/
result?: ImapServerFetchItem | null;
}
export function ImapServerFetchResultFromJSON(
json: any
): ImapServerFetchResult {
return ImapServerFetchResultFromJSONTyped(json, false);
}
export function ImapServerFetchResultFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ImapServerFetchResult {
if (json === undefined || json === null) {
return json;
}
return {
result: !exists(json, 'result')
? undefined
: ImapServerFetchItemFromJSON(json['result']),
};
}
export function ImapServerFetchResultToJSON(
value?: ImapServerFetchResult | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
result: ImapServerFetchItemToJSON(value.result),
};
}
/* 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';
/**
* IMAP fetch content in raw format
* @export
* @interface ImapServerFetchItem
*/
export interface ImapServerFetchItem {
/**
* Content of the email
* @type {string}
* @memberof ImapServerFetchItem
*/
content: string;
/**
* ID of the email
* @type {string}
* @memberof ImapServerFetchItem
*/
id: string;
/**
* UID of the email
* @type {number}
* @memberof ImapServerFetchItem
*/
uid: number;
/**
* Sequence number of the email
* @type {number}
* @memberof ImapServerFetchItem
*/
seqNum: number;
/**
* Read status of the email
* @type {boolean}
* @memberof ImapServerFetchItem
*/
read: boolean;
}
export function ImapServerFetchItemFromJSON(json: any): ImapServerFetchItem {
return ImapServerFetchItemFromJSONTyped(json, false);
}
export function ImapServerFetchItemFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ImapServerFetchItem {
if (json === undefined || json === null) {
return json;
}
return {
content: json['content'],
id: json['id'],
uid: json['uid'],
seqNum: json['seqNum'],
read: json['read'],
};
}
export function ImapServerFetchItemToJSON(
value?: ImapServerFetchItem | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
content: value.content,
id: value.id,
uid: value.uid,
seqNum: value.seqNum,
read: value.read,
};
}
/* 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';
/**
*
* @export
* @interface ImapMailboxStatus
*/
export interface ImapMailboxStatus {
/**
* The mailbox name.
* @type {string}
* @memberof ImapMailboxStatus
*/
name: string;
/**
* True if the mailbox is open in read-only mode.
* @type {boolean}
* @memberof ImapMailboxStatus
*/
readOnly: boolean;
/**
* Results map
* @type {object}
* @memberof ImapMailboxStatus
*/
items: object | null;
/**
* The mailbox flags.
* @type {Array<string>}
* @memberof ImapMailboxStatus
*/
flags: Array<string> | null;
/**
* The mailbox permanent flags.
* @type {Array<string>}
* @memberof ImapMailboxStatus
*/
permanentFlags: Array<string> | null;
/**
* The sequence number of the first unseen message in the mailbox.
* @type {number}
* @memberof ImapMailboxStatus
*/
unseenSeqNum: number;
/**
* The number of messages in this mailbox.
* @type {number}
* @memberof ImapMailboxStatus
*/
messages: number;
/**
* The number of messages not seen since the last time the mailbox was opened.
* @type {number}
* @memberof ImapMailboxStatus
*/
recent: number;
/**
* The number of unread messages.
* @type {number}
* @memberof ImapMailboxStatus
*/
unseen: number;
/**
* The next UID.
* @type {number}
* @memberof ImapMailboxStatus
*/
uidNext: number;
/**
* Together with a UID, it is a unique identifier for a message. Must be greater than or equal to 1.
* @type {number}
* @memberof ImapMailboxStatus
*/
uidValidity: number;
/**
* Per-mailbox limit of message size. Set only if server supports the APPENDLIMIT extension
* @type {number}
* @memberof ImapMailboxStatus
*/
appendLimit?: number | null;
}
export function ImapMailboxStatusFromJSON(json: any): ImapMailboxStatus {
return ImapMailboxStatusFromJSONTyped(json, false);
}
export function ImapMailboxStatusFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ImapMailboxStatus {
if (json === undefined || json === null) {
return json;
}
return {
name: json['name'],
readOnly: json['readOnly'],
items: json['items'],
flags: json['flags'],
permanentFlags: json['permanentFlags'],
unseenSeqNum: json['unseenSeqNum'],
messages: json['messages'],
recent: json['recent'],
unseen: json['unseen'],
uidNext: json['uidNext'],
uidValidity: json['uidValidity'],
appendLimit: !exists(json, 'appendLimit') ? undefined : json['appendLimit'],
};
}
export function ImapMailboxStatusToJSON(value?: ImapMailboxStatus | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
name: value.name,
readOnly: value.readOnly,
items: value.items,
flags: value.flags,
permanentFlags: value.permanentFlags,
unseenSeqNum: value.unseenSeqNum,
messages: value.messages,
recent: value.recent,
unseen: value.unseen,
uidNext: value.uidNext,
uidValidity: value.uidValidity,
appendLimit: value.appendLimit,
};
}
/* 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';
/**
* IMAP operation flags
* @export
* @interface ImapFlagOperationOptions
*/
export interface ImapFlagOperationOptions {
/**
*
* @type {string}
* @memberof ImapFlagOperationOptions
*/
flagOperation: ImapFlagOperationOptionsFlagOperationEnum;
/**
*
* @type {Array<string>}
* @memberof ImapFlagOperationOptions
*/
flags: Array<string>;
}
/**
* @export
* @enum {string}
*/
export enum ImapFlagOperationOptionsFlagOperationEnum {
SET_FLAGS = 'SET_FLAGS',
ADD_FLAGS = 'ADD_FLAGS',
REMOVE_FLAGS = 'REMOVE_FLAGS',
}
export function ImapFlagOperationOptionsFromJSON(
json: any
): ImapFlagOperationOptions {
return ImapFlagOperationOptionsFromJSONTyped(json, false);
}
export function ImapFlagOperationOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ImapFlagOperationOptions {
if (json === undefined || json === null) {
return json;
}
return {
flagOperation: json['flagOperation'],
flags: json['flags'],
};
}
export function ImapFlagOperationOptionsToJSON(
value?: ImapFlagOperationOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
flagOperation: value.flagOperation,
flags: value.flags,
};
}
/* 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';
/**
*
* @export
* @interface ImapEmailProjection
*/
export interface ImapEmailProjection {
/**
*
* @type {Date}
* @memberof ImapEmailProjection
*/
createdAt: Date;
/**
*
* @type {boolean}
* @memberof ImapEmailProjection
*/
read?: boolean | null;
/**
*
* @type {number}
* @memberof ImapEmailProjection
*/
uid: number;
/**
*
* @type {number}
* @memberof ImapEmailProjection
*/
seqNum: number;
/**
*
* @type {string}
* @memberof ImapEmailProjection
*/
id: string;
}
export function ImapEmailProjectionFromJSON(json: any): ImapEmailProjection {
return ImapEmailProjectionFromJSONTyped(json, false);
}
export function ImapEmailProjectionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ImapEmailProjection {
if (json === undefined || json === null) {
return json;
}
return {
createdAt: new Date(json['createdAt']),
read: !exists(json, 'read') ? undefined : json['read'],
uid: json['uid'],
seqNum: json['seqNum'],
id: json['id'],
};
}
export function ImapEmailProjectionToJSON(
value?: ImapEmailProjection | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
createdAt: value.createdAt.toISOString(),
read: value.read,
uid: value.uid,
seqNum: value.seqNum,
id: value.id,
};
}
/* 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';
/**
* Access details for inbox using IMAP
* @export
* @interface ImapAccessDetails
*/
export interface ImapAccessDetails {
/**
* Secure TLS IMAP server host domain
* @type {string}
* @memberof ImapAccessDetails
*/
secureImapServerHost: string;
/**
* Secure TLS IMAP server host port
* @type {number}
* @memberof ImapAccessDetails
*/
secureImapServerPort: number;
/**
* Secure TLS IMAP username for login
* @type {string}
* @memberof ImapAccessDetails
*/
secureImapUsername: string;
/**
* Secure TLS IMAP password for login
* @type {string}
* @memberof ImapAccessDetails
*/
secureImapPassword: string;
/**
* IMAP server host domain
* @type {string}
* @memberof ImapAccessDetails
*/
imapServerHost: string;
/**
* IMAP server host port
* @type {number}
* @memberof ImapAccessDetails
*/
imapServerPort: number;
/**
* IMAP username for login
* @type {string}
* @memberof ImapAccessDetails
*/
imapUsername: string;
/**
* IMAP password for login
* @type {string}
* @memberof ImapAccessDetails
*/
imapPassword: string;
/**
* IMAP mailbox to SELECT
* @type {string}
* @memberof ImapAccessDetails
*/
imapMailbox: string;
}
export function ImapAccessDetailsFromJSON(json: any): ImapAccessDetails {
return ImapAccessDetailsFromJSONTyped(json, false);
}
export function ImapAccessDetailsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ImapAccessDetails {
if (json === undefined || json === null) {
return json;
}
return {
secureImapServerHost: json['secureImapServerHost'],
secureImapServerPort: json['secureImapServerPort'],
secureImapUsername: json['secureImapUsername'],
secureImapPassword: json['secureImapPassword'],
imapServerHost: json['imapServerHost'],
imapServerPort: json['imapServerPort'],
imapUsername: json['imapUsername'],
imapPassword: json['imapPassword'],
imapMailbox: json['imapMailbox'],
};
}
export function ImapAccessDetailsToJSON(value?: ImapAccessDetails | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
secureImapServerHost: value.secureImapServerHost,
secureImapServerPort: value.secureImapServerPort,
secureImapUsername: value.secureImapUsername,
secureImapPassword: value.secureImapPassword,
imapServerHost: value.imapServerHost,
imapServerPort: value.imapServerPort,
imapUsername: value.imapUsername,
imapPassword: value.imapPassword,
imapMailbox: value.imapMailbox,
};
}
/* 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';
/**
*
* @export
* @interface ImageIssue
*/
export interface ImageIssue {
/**
*
* @type {string}
* @memberof ImageIssue
*/
url: string;
/**
*
* @type {number}
* @memberof ImageIssue
*/
responseStatus?: number;
/**
*
* @type {string}
* @memberof ImageIssue
*/
severity: ImageIssueSeverityEnum;
/**
*
* @type {string}
* @memberof ImageIssue
*/
message: string;
}
/**
* @export
* @enum {string}
*/
export enum ImageIssueSeverityEnum {
Warning = 'Warning',
Error = 'Error',
}
export function ImageIssueFromJSON(json: any): ImageIssue {
return ImageIssueFromJSONTyped(json, false);
}
export function ImageIssueFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ImageIssue {
if (json === undefined || json === null) {
return json;
}
return {
url: json['url'],
responseStatus: !exists(json, 'responseStatus')
? undefined
: json['responseStatus'],
severity: json['severity'],
message: json['message'],
};
}
export function ImageIssueToJSON(value?: ImageIssue | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
url: value.url,
responseStatus: value.responseStatus,
severity: value.severity,
message: value.message,
};
}
/* 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';
/**
* IP Address look up result for a given domain / hostname
* @export
* @interface IPAddressResult
*/
export interface IPAddressResult {
/**
*
* @type {string}
* @memberof IPAddressResult
*/
address: string;
/**
*
* @type {string}
* @memberof IPAddressResult
*/
hostname: string;
}
export function IPAddressResultFromJSON(json: any): IPAddressResult {
return IPAddressResultFromJSONTyped(json, false);
}
export function IPAddressResultFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): IPAddressResult {
if (json === undefined || json === null) {
return json;
}
return {
address: json['address'],
hostname: json['hostname'],
};
}
export function IPAddressResultToJSON(value?: IPAddressResult | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
address: value.address,
hostname: value.hostname,
};
}
/* 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';
import {
ValidationMessage,
ValidationMessageFromJSON,
ValidationMessageFromJSONTyped,
ValidationMessageToJSON,
} from './';
/**
* HTML Validation Results
* @export
* @interface HTMLValidationResult
*/
export interface HTMLValidationResult {
/**
* Is HTML validation result valid
* @type {boolean}
* @memberof HTMLValidationResult
*/
isValid: boolean;
/**
* Optional infos resulting from HTML validation
* @type {Array<ValidationMessage>}
* @memberof HTMLValidationResult
*/
infos: Array<ValidationMessage>;
/**
* Optional errors resulting from HTML validation
* @type {Array<ValidationMessage>}
* @memberof HTMLValidationResult
*/
errors: Array<ValidationMessage>;
/**
* Optional warnings resulting from HTML validation
* @type {Array<ValidationMessage>}
* @memberof HTMLValidationResult
*/
warnings: Array<ValidationMessage>;
}
export function HTMLValidationResultFromJSON(json: any): HTMLValidationResult {
return HTMLValidationResultFromJSONTyped(json, false);
}
export function HTMLValidationResultFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): HTMLValidationResult {
if (json === undefined || json === null) {
return json;
}
return {
isValid: json['isValid'],
infos: (json['infos'] as Array<any>).map(ValidationMessageFromJSON),
errors: (json['errors'] as Array<any>).map(ValidationMessageFromJSON),
warnings: (json['warnings'] as Array<any>).map(ValidationMessageFromJSON),
};
}
export function HTMLValidationResultToJSON(
value?: HTMLValidationResult | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
isValid: value.isValid,
infos: (value.infos as Array<any>).map(ValidationMessageToJSON),
errors: (value.errors as Array<any>).map(ValidationMessageToJSON),
warnings: (value.warnings as Array<any>).map(ValidationMessageToJSON),
};
}
/* 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';
/**
* Data for contact group
* @export
* @interface GroupProjection
*/
export interface GroupProjection {
/**
*
* @type {Date}
* @memberof GroupProjection
*/
createdAt: Date;
/**
*
* @type {string}
* @memberof GroupProjection
*/
name: string;
/**
*
* @type {string}
* @memberof GroupProjection
*/
id: string;
/**
*
* @type {string}
* @memberof GroupProjection
*/
description?: string | null;
}
export function GroupProjectionFromJSON(json: any): GroupProjection {
return GroupProjectionFromJSONTyped(json, false);
}
export function GroupProjectionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): GroupProjection {
if (json === undefined || json === null) {
return json;
}
return {
createdAt: new Date(json['createdAt']),
name: json['name'],
id: json['id'],
description: !exists(json, 'description') ? undefined : json['description'],
};
}
export function GroupProjectionToJSON(value?: GroupProjection | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
createdAt: value.createdAt.toISOString(),
name: value.name,
id: value.id,
description: value.description,
};
}
/* 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';
/**
* Contact group data
* @export
* @interface GroupDto
*/
export interface GroupDto {
/**
*
* @type {string}
* @memberof GroupDto
*/
id: string;
/**
*
* @type {string}
* @memberof GroupDto
*/
name: string;
/**
*
* @type {string}
* @memberof GroupDto
*/
description?: string | null;
/**
*
* @type {Date}
* @memberof GroupDto
*/
createdAt: Date;
}
export function GroupDtoFromJSON(json: any): GroupDto {
return GroupDtoFromJSONTyped(json, false);
}
export function GroupDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): GroupDto {
if (json === undefined || json === null) {
return json;
}
return {
id: json['id'],
name: json['name'],
description: !exists(json, 'description') ? undefined : json['description'],
createdAt: new Date(json['createdAt']),
};
}
export function GroupDtoToJSON(value?: GroupDto | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
name: value.name,
description: value.description,
createdAt: value.createdAt.toISOString(),
};
}
/* 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';
import {
ContactDto,
ContactDtoFromJSON,
ContactDtoFromJSONTyped,
ContactDtoToJSON,
GroupDto,
GroupDtoFromJSON,
GroupDtoFromJSONTyped,
GroupDtoToJSON,
} from './';
/**
* Describes contacts attached to a contact group
* @export
* @interface GroupContactsDto
*/
export interface GroupContactsDto {
/**
*
* @type {GroupDto}
* @memberof GroupContactsDto
*/
group: GroupDto;
/**
*
* @type {Array<ContactDto>}
* @memberof GroupContactsDto
*/
contacts: Array<ContactDto>;
}
export function GroupContactsDtoFromJSON(json: any): GroupContactsDto {
return GroupContactsDtoFromJSONTyped(json, false);
}
export function GroupContactsDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): GroupContactsDto {
if (json === undefined || json === null) {
return json;
}
return {
group: GroupDtoFromJSON(json['group']),
contacts: (json['contacts'] as Array<any>).map(ContactDtoFromJSON),
};
}
export function GroupContactsDtoToJSON(value?: GroupContactsDto | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
group: GroupDtoToJSON(value.group),
contacts: (value.contacts as Array<any>).map(ContactDtoToJSON),
};
}
/* 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';
/**
* User image
* @export
* @interface GravatarUrl
*/
export interface GravatarUrl {
/**
*
* @type {string}
* @memberof GravatarUrl
*/
url: string;
/**
*
* @type {string}
* @memberof GravatarUrl
*/
hash: string;
}
export function GravatarUrlFromJSON(json: any): GravatarUrl {
return GravatarUrlFromJSONTyped(json, false);
}
export function GravatarUrlFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): GravatarUrl {
if (json === undefined || json === null) {
return json;
}
return {
url: json['url'],
hash: json['hash'],
};
}
export function GravatarUrlToJSON(value?: GravatarUrl | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
url: value.url,
hash: value.hash,
};
}
/* 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 taking a screenshot capture of a rendered email
* @export
* @interface GetEmailScreenshotOptions
*/
export interface GetEmailScreenshotOptions {
/**
* Window height in pixels
* @type {number}
* @memberof GetEmailScreenshotOptions
*/
height?: number | null;
/**
* Window width in pixels
* @type {number}
* @memberof GetEmailScreenshotOptions
*/
width?: number | null;
}
export function GetEmailScreenshotOptionsFromJSON(
json: any
): GetEmailScreenshotOptions {
return GetEmailScreenshotOptionsFromJSONTyped(json, false);
}
export function GetEmailScreenshotOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): GetEmailScreenshotOptions {
if (json === undefined || json === null) {
return json;
}
return {
height: !exists(json, 'height') ? undefined : json['height'],
width: !exists(json, 'width') ? undefined : json['width'],
};
}
export function GetEmailScreenshotOptionsToJSON(
value?: GetEmailScreenshotOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
height: value.height,
width: value.width,
};
}
/* 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';
/**
*
* @export
* @interface GenerateTlsReportingRecordResults
*/
export interface GenerateTlsReportingRecordResults {
/**
*
* @type {string}
* @memberof GenerateTlsReportingRecordResults
*/
name: string;
/**
* Domain Name Server Record Types
* @type {string}
* @memberof GenerateTlsReportingRecordResults
*/
type: GenerateTlsReportingRecordResultsTypeEnum;
/**
*
* @type {number}
* @memberof GenerateTlsReportingRecordResults
*/
ttl: number;
/**
*
* @type {string}
* @memberof GenerateTlsReportingRecordResults
*/
value: string;
}
/**
* @export
* @enum {string}
*/
export enum GenerateTlsReportingRecordResultsTypeEnum {
A = 'A',
NS = 'NS',
MD = 'MD',
MF = 'MF',
CNAME = 'CNAME',
SOA = 'SOA',
MB = 'MB',
MG = 'MG',
MR = 'MR',
NULL = 'NULL',
WKS = 'WKS',
PTR = 'PTR',
HINFO = 'HINFO',
MINFO = 'MINFO',
MX = 'MX',
TXT = 'TXT',
RP = 'RP',
AFSDB = 'AFSDB',
X25 = 'X25',
ISDN = 'ISDN',
RT = 'RT',
NSAP = 'NSAP',
NSAP_PTR = 'NSAP_PTR',
SIG = 'SIG',
KEY = 'KEY',
PX = 'PX',
GPOS = 'GPOS',
AAAA = 'AAAA',
LOC = 'LOC',
NXT = 'NXT',
EID = 'EID',
NIMLOC = 'NIMLOC',
SRV = 'SRV',
ATMA = 'ATMA',
NAPTR = 'NAPTR',
KX = 'KX',
CERT = 'CERT',
A6 = 'A6',
DNAME = 'DNAME',
SINK = 'SINK',
OPT = 'OPT',
APL = 'APL',
DS = 'DS',
SSHFP = 'SSHFP',
IPSECKEY = 'IPSECKEY',
RRSIG = 'RRSIG',
NSEC = 'NSEC',
DNSKEY = 'DNSKEY',
DHCID = 'DHCID',
NSEC3 = 'NSEC3',
NSEC3PARAM = 'NSEC3PARAM',
TLSA = 'TLSA',
SMIMEA = 'SMIMEA',
HIP = 'HIP',
NINFO = 'NINFO',
RKEY = 'RKEY',
TALINK = 'TALINK',
CDS = 'CDS',
CDNSKEY = 'CDNSKEY',
OPENPGPKEY = 'OPENPGPKEY',
CSYNC = 'CSYNC',
ZONEMD = 'ZONEMD',
SVCB = 'SVCB',
HTTPS = 'HTTPS',
SPF = 'SPF',
UINFO = 'UINFO',
UID = 'UID',
GID = 'GID',
UNSPEC = 'UNSPEC',
NID = 'NID',
L32 = 'L32',
L64 = 'L64',
LP = 'LP',
EUI48 = 'EUI48',
EUI64 = 'EUI64',
TKEY = 'TKEY',
TSIG = 'TSIG',
IXFR = 'IXFR',
AXFR = 'AXFR',
MAILB = 'MAILB',
MAILA = 'MAILA',
ANY = 'ANY',
URI = 'URI',
CAA = 'CAA',
AVC = 'AVC',
DOA = 'DOA',
AMTRELAY = 'AMTRELAY',
TA = 'TA',
DLV = 'DLV',
}
export function GenerateTlsReportingRecordResultsFromJSON(
json: any
): GenerateTlsReportingRecordResults {
return GenerateTlsReportingRecordResultsFromJSONTyped(json, false);
}
export function GenerateTlsReportingRecordResultsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): GenerateTlsReportingRecordResults {
if (json === undefined || json === null) {
return json;
}
return {
name: json['name'],
type: json['type'],
ttl: json['ttl'],
value: json['value'],
};
}
export function GenerateTlsReportingRecordResultsToJSON(
value?: GenerateTlsReportingRecordResults | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
name: value.name,
type: value.type,
ttl: value.ttl,
value: value.value,
};
}
/* 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';
/**
*
* @export
* @interface GenerateTlsReportingRecordOptions
*/
export interface GenerateTlsReportingRecordOptions {
/**
*
* @type {Array<string>}
* @memberof GenerateTlsReportingRecordOptions
*/
reportingAddresses: Array<string>;
/**
*
* @type {string}
* @memberof GenerateTlsReportingRecordOptions
*/
reportingUrl?: string;
/**
*
* @type {string}
* @memberof GenerateTlsReportingRecordOptions
*/
host: string;
/**
*
* @type {string}
* @memberof GenerateTlsReportingRecordOptions
*/
version: GenerateTlsReportingRecordOptionsVersionEnum;
/**
*
* @type {number}
* @memberof GenerateTlsReportingRecordOptions
*/
ttl: number;
}
/**
* @export
* @enum {string}
*/
export enum GenerateTlsReportingRecordOptionsVersionEnum {
TLSRPTv1 = 'TLSRPTv1',
}
export function GenerateTlsReportingRecordOptionsFromJSON(
json: any
): GenerateTlsReportingRecordOptions {
return GenerateTlsReportingRecordOptionsFromJSONTyped(json, false);
}
export function GenerateTlsReportingRecordOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): GenerateTlsReportingRecordOptions {
if (json === undefined || json === null) {
return json;
}
return {
reportingAddresses: json['reportingAddresses'],
reportingUrl: !exists(json, 'reportingUrl')
? undefined
: json['reportingUrl'],
host: json['host'],
version: json['version'],
ttl: json['ttl'],
};
}
export function GenerateTlsReportingRecordOptionsToJSON(
value?: GenerateTlsReportingRecordOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
reportingAddresses: value.reportingAddresses,
reportingUrl: value.reportingUrl,
host: value.host,
version: value.version,
ttl: value.ttl,
};
}
/* 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';
/**
*
* @export
* @interface GenerateMtaStsRecordResults
*/
export interface GenerateMtaStsRecordResults {
/**
*
* @type {string}
* @memberof GenerateMtaStsRecordResults
*/
name: string;
/**
* Domain Name Server Record Types
* @type {string}
* @memberof GenerateMtaStsRecordResults
*/
type: GenerateMtaStsRecordResultsTypeEnum;
/**
*
* @type {number}
* @memberof GenerateMtaStsRecordResults
*/
ttl: number;
/**
*
* @type {string}
* @memberof GenerateMtaStsRecordResults
*/
value: string;
/**
*
* @type {string}
* @memberof GenerateMtaStsRecordResults
*/
wellKnownValue: string;
/**
*
* @type {string}
* @memberof GenerateMtaStsRecordResults
*/
wellKnownUrl: string;
}
/**
* @export
* @enum {string}
*/
export enum GenerateMtaStsRecordResultsTypeEnum {
A = 'A',
NS = 'NS',
MD = 'MD',
MF = 'MF',
CNAME = 'CNAME',
SOA = 'SOA',
MB = 'MB',
MG = 'MG',
MR = 'MR',
NULL = 'NULL',
WKS = 'WKS',
PTR = 'PTR',
HINFO = 'HINFO',
MINFO = 'MINFO',
MX = 'MX',
TXT = 'TXT',
RP = 'RP',
AFSDB = 'AFSDB',
X25 = 'X25',
ISDN = 'ISDN',
RT = 'RT',
NSAP = 'NSAP',
NSAP_PTR = 'NSAP_PTR',
SIG = 'SIG',
KEY = 'KEY',
PX = 'PX',
GPOS = 'GPOS',
AAAA = 'AAAA',
LOC = 'LOC',
NXT = 'NXT',
EID = 'EID',
NIMLOC = 'NIMLOC',
SRV = 'SRV',
ATMA = 'ATMA',
NAPTR = 'NAPTR',
KX = 'KX',
CERT = 'CERT',
A6 = 'A6',
DNAME = 'DNAME',
SINK = 'SINK',
OPT = 'OPT',
APL = 'APL',
DS = 'DS',
SSHFP = 'SSHFP',
IPSECKEY = 'IPSECKEY',
RRSIG = 'RRSIG',
NSEC = 'NSEC',
DNSKEY = 'DNSKEY',
DHCID = 'DHCID',
NSEC3 = 'NSEC3',
NSEC3PARAM = 'NSEC3PARAM',
TLSA = 'TLSA',
SMIMEA = 'SMIMEA',
HIP = 'HIP',
NINFO = 'NINFO',
RKEY = 'RKEY',
TALINK = 'TALINK',
CDS = 'CDS',
CDNSKEY = 'CDNSKEY',
OPENPGPKEY = 'OPENPGPKEY',
CSYNC = 'CSYNC',
ZONEMD = 'ZONEMD',
SVCB = 'SVCB',
HTTPS = 'HTTPS',
SPF = 'SPF',
UINFO = 'UINFO',
UID = 'UID',
GID = 'GID',
UNSPEC = 'UNSPEC',
NID = 'NID',
L32 = 'L32',
L64 = 'L64',
LP = 'LP',
EUI48 = 'EUI48',
EUI64 = 'EUI64',
TKEY = 'TKEY',
TSIG = 'TSIG',
IXFR = 'IXFR',
AXFR = 'AXFR',
MAILB = 'MAILB',
MAILA = 'MAILA',
ANY = 'ANY',
URI = 'URI',
CAA = 'CAA',
AVC = 'AVC',
DOA = 'DOA',
AMTRELAY = 'AMTRELAY',
TA = 'TA',
DLV = 'DLV',
}
export function GenerateMtaStsRecordResultsFromJSON(
json: any
): GenerateMtaStsRecordResults {
return GenerateMtaStsRecordResultsFromJSONTyped(json, false);
}
export function GenerateMtaStsRecordResultsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): GenerateMtaStsRecordResults {
if (json === undefined || json === null) {
return json;
}
return {
name: json['name'],
type: json['type'],
ttl: json['ttl'],
value: json['value'],
wellKnownValue: json['wellKnownValue'],
wellKnownUrl: json['wellKnownUrl'],
};
}
export function GenerateMtaStsRecordResultsToJSON(
value?: GenerateMtaStsRecordResults | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
name: value.name,
type: value.type,
ttl: value.ttl,
value: value.value,
wellKnownValue: value.wellKnownValue,
wellKnownUrl: value.wellKnownUrl,
};
}
/* 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';
/**
*
* @export
* @interface GenerateMtaStsRecordOptions
*/
export interface GenerateMtaStsRecordOptions {
/**
*
* @type {string}
* @memberof GenerateMtaStsRecordOptions
*/
host: string;
/**
*
* @type {string}
* @memberof GenerateMtaStsRecordOptions
*/
version: GenerateMtaStsRecordOptionsVersionEnum;
/**
*
* @type {string}
* @memberof GenerateMtaStsRecordOptions
*/
mode: GenerateMtaStsRecordOptionsModeEnum;
/**
*
* @type {number}
* @memberof GenerateMtaStsRecordOptions
*/
ttl: number;
/**
*
* @type {number}
* @memberof GenerateMtaStsRecordOptions
*/
maxAgeSeconds: number;
/**
*
* @type {Array<string>}
* @memberof GenerateMtaStsRecordOptions
*/
mxRecords: Array<string>;
}
/**
* @export
* @enum {string}
*/
export enum GenerateMtaStsRecordOptionsVersionEnum {
STSv1 = 'STSv1',
}
/**
* @export
* @enum {string}
*/
export enum GenerateMtaStsRecordOptionsModeEnum {
TESTING = 'TESTING',
ENFORCE = 'ENFORCE',
NONE = 'NONE',
}
export function GenerateMtaStsRecordOptionsFromJSON(
json: any
): GenerateMtaStsRecordOptions {
return GenerateMtaStsRecordOptionsFromJSONTyped(json, false);
}
export function GenerateMtaStsRecordOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): GenerateMtaStsRecordOptions {
if (json === undefined || json === null) {
return json;
}
return {
host: json['host'],
version: json['version'],
mode: json['mode'],
ttl: json['ttl'],
maxAgeSeconds: json['maxAgeSeconds'],
mxRecords: json['mxRecords'],
};
}
export function GenerateMtaStsRecordOptionsToJSON(
value?: GenerateMtaStsRecordOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
host: value.host,
version: value.version,
mode: value.mode,
ttl: value.ttl,
maxAgeSeconds: value.maxAgeSeconds,
mxRecords: value.mxRecords,
};
}
/* 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';
/**
*
* @export
* @interface GenerateDmarcRecordResults
*/
export interface GenerateDmarcRecordResults {
/**
*
* @type {string}
* @memberof GenerateDmarcRecordResults
*/
name: string;
/**
* Domain Name Server Record Types
* @type {string}
* @memberof GenerateDmarcRecordResults
*/
type: GenerateDmarcRecordResultsTypeEnum;
/**
*
* @type {number}
* @memberof GenerateDmarcRecordResults
*/
ttl: number;
/**
*
* @type {string}
* @memberof GenerateDmarcRecordResults
*/
value: string;
}
/**
* @export
* @enum {string}
*/
export enum GenerateDmarcRecordResultsTypeEnum {
A = 'A',
NS = 'NS',
MD = 'MD',
MF = 'MF',
CNAME = 'CNAME',
SOA = 'SOA',
MB = 'MB',
MG = 'MG',
MR = 'MR',
NULL = 'NULL',
WKS = 'WKS',
PTR = 'PTR',
HINFO = 'HINFO',
MINFO = 'MINFO',
MX = 'MX',
TXT = 'TXT',
RP = 'RP',
AFSDB = 'AFSDB',
X25 = 'X25',
ISDN = 'ISDN',
RT = 'RT',
NSAP = 'NSAP',
NSAP_PTR = 'NSAP_PTR',
SIG = 'SIG',
KEY = 'KEY',
PX = 'PX',
GPOS = 'GPOS',
AAAA = 'AAAA',
LOC = 'LOC',
NXT = 'NXT',
EID = 'EID',
NIMLOC = 'NIMLOC',
SRV = 'SRV',
ATMA = 'ATMA',
NAPTR = 'NAPTR',
KX = 'KX',
CERT = 'CERT',
A6 = 'A6',
DNAME = 'DNAME',
SINK = 'SINK',
OPT = 'OPT',
APL = 'APL',
DS = 'DS',
SSHFP = 'SSHFP',
IPSECKEY = 'IPSECKEY',
RRSIG = 'RRSIG',
NSEC = 'NSEC',
DNSKEY = 'DNSKEY',
DHCID = 'DHCID',
NSEC3 = 'NSEC3',
NSEC3PARAM = 'NSEC3PARAM',
TLSA = 'TLSA',
SMIMEA = 'SMIMEA',
HIP = 'HIP',
NINFO = 'NINFO',
RKEY = 'RKEY',
TALINK = 'TALINK',
CDS = 'CDS',
CDNSKEY = 'CDNSKEY',
OPENPGPKEY = 'OPENPGPKEY',
CSYNC = 'CSYNC',
ZONEMD = 'ZONEMD',
SVCB = 'SVCB',
HTTPS = 'HTTPS',
SPF = 'SPF',
UINFO = 'UINFO',
UID = 'UID',
GID = 'GID',
UNSPEC = 'UNSPEC',
NID = 'NID',
L32 = 'L32',
L64 = 'L64',
LP = 'LP',
EUI48 = 'EUI48',
EUI64 = 'EUI64',
TKEY = 'TKEY',
TSIG = 'TSIG',
IXFR = 'IXFR',
AXFR = 'AXFR',
MAILB = 'MAILB',
MAILA = 'MAILA',
ANY = 'ANY',
URI = 'URI',
CAA = 'CAA',
AVC = 'AVC',
DOA = 'DOA',
AMTRELAY = 'AMTRELAY',
TA = 'TA',
DLV = 'DLV',
}
export function GenerateDmarcRecordResultsFromJSON(
json: any
): GenerateDmarcRecordResults {
return GenerateDmarcRecordResultsFromJSONTyped(json, false);
}
export function GenerateDmarcRecordResultsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): GenerateDmarcRecordResults {
if (json === undefined || json === null) {
return json;
}
return {
name: json['name'],
type: json['type'],
ttl: json['ttl'],
value: json['value'],
};
}
export function GenerateDmarcRecordResultsToJSON(
value?: GenerateDmarcRecordResults | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
name: value.name,
type: value.type,
ttl: value.ttl,
value: value.value,
};
}
/* 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';
/**
*
* @export
* @interface GenerateDmarcRecordOptions
*/
export interface GenerateDmarcRecordOptions {
/**
*
* @type {string}
* @memberof GenerateDmarcRecordOptions
*/
domain: string;
/**
*
* @type {string}
* @memberof GenerateDmarcRecordOptions
*/
version: GenerateDmarcRecordOptionsVersionEnum;
/**
*
* @type {string}
* @memberof GenerateDmarcRecordOptions
*/
policy: GenerateDmarcRecordOptionsPolicyEnum;
/**
*
* @type {string}
* @memberof GenerateDmarcRecordOptions
*/
subdomainPolicy?: GenerateDmarcRecordOptionsSubdomainPolicyEnum;
/**
*
* @type {Array<string>}
* @memberof GenerateDmarcRecordOptions
*/
reportEmailAddress?: Array<string>;
/**
*
* @type {Array<string>}
* @memberof GenerateDmarcRecordOptions
*/
forensicEmailAddress?: Array<string>;
/**
*
* @type {number}
* @memberof GenerateDmarcRecordOptions
*/
percentage?: number;
/**
*
* @type {string}
* @memberof GenerateDmarcRecordOptions
*/
reportFormat?: GenerateDmarcRecordOptionsReportFormatEnum;
/**
*
* @type {number}
* @memberof GenerateDmarcRecordOptions
*/
secondsBetweenReports?: number;
/**
*
* @type {string}
* @memberof GenerateDmarcRecordOptions
*/
adkim?: GenerateDmarcRecordOptionsAdkimEnum;
/**
*
* @type {string}
* @memberof GenerateDmarcRecordOptions
*/
aspf?: GenerateDmarcRecordOptionsAspfEnum;
/**
*
* @type {string}
* @memberof GenerateDmarcRecordOptions
*/
fo?: GenerateDmarcRecordOptionsFoEnum;
}
/**
* @export
* @enum {string}
*/
export enum GenerateDmarcRecordOptionsVersionEnum {
DMARC1 = 'DMARC1',
}
/**
* @export
* @enum {string}
*/
export enum GenerateDmarcRecordOptionsPolicyEnum {
NONE = 'NONE',
QUARANTINE = 'QUARANTINE',
REJECT = 'REJECT',
}
/**
* @export
* @enum {string}
*/
export enum GenerateDmarcRecordOptionsSubdomainPolicyEnum {
NONE = 'NONE',
QUARANTINE = 'QUARANTINE',
REJECT = 'REJECT',
}
/**
* @export
* @enum {string}
*/
export enum GenerateDmarcRecordOptionsReportFormatEnum {
AFRF = 'AFRF',
}
/**
* @export
* @enum {string}
*/
export enum GenerateDmarcRecordOptionsAdkimEnum {
STRICT = 'STRICT',
RELAXED = 'RELAXED',
}
/**
* @export
* @enum {string}
*/
export enum GenerateDmarcRecordOptionsAspfEnum {
STRICT = 'STRICT',
RELAXED = 'RELAXED',
}
/**
* @export
* @enum {string}
*/
export enum GenerateDmarcRecordOptionsFoEnum {
_0 = 'FO_0',
_1 = 'FO_1',
D = 'FO_D',
S = 'FO_S',
}
export function GenerateDmarcRecordOptionsFromJSON(
json: any
): GenerateDmarcRecordOptions {
return GenerateDmarcRecordOptionsFromJSONTyped(json, false);
}
export function GenerateDmarcRecordOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): GenerateDmarcRecordOptions {
if (json === undefined || json === null) {
return json;
}
return {
domain: json['domain'],
version: json['version'],
policy: json['policy'],
subdomainPolicy: !exists(json, 'subdomainPolicy')
? undefined
: json['subdomainPolicy'],
reportEmailAddress: !exists(json, 'reportEmailAddress')
? undefined
: json['reportEmailAddress'],
forensicEmailAddress: !exists(json, 'forensicEmailAddress')
? undefined
: json['forensicEmailAddress'],
percentage: !exists(json, 'percentage') ? undefined : json['percentage'],
reportFormat: !exists(json, 'reportFormat')
? undefined
: json['reportFormat'],
secondsBetweenReports: !exists(json, 'secondsBetweenReports')
? undefined
: json['secondsBetweenReports'],
adkim: !exists(json, 'adkim') ? undefined : json['adkim'],
aspf: !exists(json, 'aspf') ? undefined : json['aspf'],
fo: !exists(json, 'fo') ? undefined : json['fo'],
};
}
export function GenerateDmarcRecordOptionsToJSON(
value?: GenerateDmarcRecordOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
domain: value.domain,
version: value.version,
policy: value.policy,
subdomainPolicy: value.subdomainPolicy,
reportEmailAddress: value.reportEmailAddress,
forensicEmailAddress: value.forensicEmailAddress,
percentage: value.percentage,
reportFormat: value.reportFormat,
secondsBetweenReports: value.secondsBetweenReports,
adkim: value.adkim,
aspf: value.aspf,
fo: value.fo,
};
}
/* 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';
/**
*
* @export
* @interface GenerateBimiRecordResults
*/
export interface GenerateBimiRecordResults {
/**
*
* @type {string}
* @memberof GenerateBimiRecordResults
*/
name: string;
/**
* Domain Name Server Record Types
* @type {string}
* @memberof GenerateBimiRecordResults
*/
type: GenerateBimiRecordResultsTypeEnum;
/**
*
* @type {number}
* @memberof GenerateBimiRecordResults
*/
ttl: number;
/**
*
* @type {string}
* @memberof GenerateBimiRecordResults
*/
value: string;
}
/**
* @export
* @enum {string}
*/
export enum GenerateBimiRecordResultsTypeEnum {
A = 'A',
NS = 'NS',
MD = 'MD',
MF = 'MF',
CNAME = 'CNAME',
SOA = 'SOA',
MB = 'MB',
MG = 'MG',
MR = 'MR',
NULL = 'NULL',
WKS = 'WKS',
PTR = 'PTR',
HINFO = 'HINFO',
MINFO = 'MINFO',
MX = 'MX',
TXT = 'TXT',
RP = 'RP',
AFSDB = 'AFSDB',
X25 = 'X25',
ISDN = 'ISDN',
RT = 'RT',
NSAP = 'NSAP',
NSAP_PTR = 'NSAP_PTR',
SIG = 'SIG',
KEY = 'KEY',
PX = 'PX',
GPOS = 'GPOS',
AAAA = 'AAAA',
LOC = 'LOC',
NXT = 'NXT',
EID = 'EID',
NIMLOC = 'NIMLOC',
SRV = 'SRV',
ATMA = 'ATMA',
NAPTR = 'NAPTR',
KX = 'KX',
CERT = 'CERT',
A6 = 'A6',
DNAME = 'DNAME',
SINK = 'SINK',
OPT = 'OPT',
APL = 'APL',
DS = 'DS',
SSHFP = 'SSHFP',
IPSECKEY = 'IPSECKEY',
RRSIG = 'RRSIG',
NSEC = 'NSEC',
DNSKEY = 'DNSKEY',
DHCID = 'DHCID',
NSEC3 = 'NSEC3',
NSEC3PARAM = 'NSEC3PARAM',
TLSA = 'TLSA',
SMIMEA = 'SMIMEA',
HIP = 'HIP',
NINFO = 'NINFO',
RKEY = 'RKEY',
TALINK = 'TALINK',
CDS = 'CDS',
CDNSKEY = 'CDNSKEY',
OPENPGPKEY = 'OPENPGPKEY',
CSYNC = 'CSYNC',
ZONEMD = 'ZONEMD',
SVCB = 'SVCB',
HTTPS = 'HTTPS',
SPF = 'SPF',
UINFO = 'UINFO',
UID = 'UID',
GID = 'GID',
UNSPEC = 'UNSPEC',
NID = 'NID',
L32 = 'L32',
L64 = 'L64',
LP = 'LP',
EUI48 = 'EUI48',
EUI64 = 'EUI64',
TKEY = 'TKEY',
TSIG = 'TSIG',
IXFR = 'IXFR',
AXFR = 'AXFR',
MAILB = 'MAILB',
MAILA = 'MAILA',
ANY = 'ANY',
URI = 'URI',
CAA = 'CAA',
AVC = 'AVC',
DOA = 'DOA',
AMTRELAY = 'AMTRELAY',
TA = 'TA',
DLV = 'DLV',
}
export function GenerateBimiRecordResultsFromJSON(
json: any
): GenerateBimiRecordResults {
return GenerateBimiRecordResultsFromJSONTyped(json, false);
}
export function GenerateBimiRecordResultsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): GenerateBimiRecordResults {
if (json === undefined || json === null) {
return json;
}
return {
name: json['name'],
type: json['type'],
ttl: json['ttl'],
value: json['value'],
};
}
export function GenerateBimiRecordResultsToJSON(
value?: GenerateBimiRecordResults | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
name: value.name,
type: value.type,
ttl: value.ttl,
value: value.value,
};
}
/* 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';
/**
*
* @export
* @interface GenerateBimiRecordOptions
*/
export interface GenerateBimiRecordOptions {
/**
*
* @type {string}
* @memberof GenerateBimiRecordOptions
*/
domain: string;
/**
*
* @type {string}
* @memberof GenerateBimiRecordOptions
*/
version: GenerateBimiRecordOptionsVersionEnum;
/**
*
* @type {string}
* @memberof GenerateBimiRecordOptions
*/
logoUrl: string;
/**
*
* @type {string}
* @memberof GenerateBimiRecordOptions
*/
vmcUrl?: string;
}
/**
* @export
* @enum {string}
*/
export enum GenerateBimiRecordOptionsVersionEnum {
BIMI1 = 'BIMI1',
}
export function GenerateBimiRecordOptionsFromJSON(
json: any
): GenerateBimiRecordOptions {
return GenerateBimiRecordOptionsFromJSONTyped(json, false);
}
export function GenerateBimiRecordOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): GenerateBimiRecordOptions {
if (json === undefined || json === null) {
return json;
}
return {
domain: json['domain'],
version: json['version'],
logoUrl: json['logoUrl'],
vmcUrl: !exists(json, 'vmcUrl') ? undefined : json['vmcUrl'],
};
}
export function GenerateBimiRecordOptionsToJSON(
value?: GenerateBimiRecordOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
domain: value.domain,
version: value.version,
logoUrl: value.logoUrl,
vmcUrl: value.vmcUrl,
};
}
/* 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 forwarding an email
* @export
* @interface ForwardEmailOptions
*/
export interface ForwardEmailOptions {
/**
* To recipients for forwarded email
* @type {Array<string>}
* @memberof ForwardEmailOptions
*/
to: Array<string>;
/**
* Subject for forwarded email
* @type {string}
* @memberof ForwardEmailOptions
*/
subject?: string | null;
/**
* Optional cc recipients
* @type {Array<string>}
* @memberof ForwardEmailOptions
*/
cc?: Array<string> | null;
/**
* Optional bcc recipients
* @type {Array<string>}
* @memberof ForwardEmailOptions
*/
bcc?: Array<string> | null;
/**
* Optional from override
* @type {string}
* @memberof ForwardEmailOptions
*/
from?: string | null;
/**
* Optionally use inbox name as display name for sender email address
* @type {boolean}
* @memberof ForwardEmailOptions
*/
useInboxName?: boolean | null;
/**
* Filter recipients to remove any bounced recipients from to, bcc, and cc before sending
* @type {boolean}
* @memberof ForwardEmailOptions
*/
filterBouncedRecipients?: boolean | null;
}
export function ForwardEmailOptionsFromJSON(json: any): ForwardEmailOptions {
return ForwardEmailOptionsFromJSONTyped(json, false);
}
export function ForwardEmailOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ForwardEmailOptions {
if (json === undefined || json === null) {
return json;
}
return {
to: json['to'],
subject: !exists(json, 'subject') ? undefined : json['subject'],
cc: !exists(json, 'cc') ? undefined : json['cc'],
bcc: !exists(json, 'bcc') ? undefined : json['bcc'],
from: !exists(json, 'from') ? undefined : json['from'],
useInboxName: !exists(json, 'useInboxName')
? undefined
: json['useInboxName'],
filterBouncedRecipients: !exists(json, 'filterBouncedRecipients')
? undefined
: json['filterBouncedRecipients'],
};
}
export function ForwardEmailOptionsToJSON(
value?: ForwardEmailOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
to: value.to,
subject: value.subject,
cc: value.cc,
bcc: value.bcc,
from: value.from,
useInboxName: value.useInboxName,
filterBouncedRecipients: value.filterBouncedRecipients,
};
}
/* 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';
/**
* Result from calling expire on any inboxes that have applicable expiration dates given current time.
* @export
* @interface FlushExpiredInboxesResult
*/
export interface FlushExpiredInboxesResult {
/**
* Inbox IDs affected by expiration
* @type {Array<string>}
* @memberof FlushExpiredInboxesResult
*/
inboxIds: Array<string>;
/**
* DateTime to filter inboxes so that those expiring before this time are expired
* @type {Date}
* @memberof FlushExpiredInboxesResult
*/
expireBefore: Date;
}
export function FlushExpiredInboxesResultFromJSON(
json: any
): FlushExpiredInboxesResult {
return FlushExpiredInboxesResultFromJSONTyped(json, false);
}
export function FlushExpiredInboxesResultFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): FlushExpiredInboxesResult {
if (json === undefined || json === null) {
return json;
}
return {
inboxIds: json['inboxIds'],
expireBefore: new Date(json['expireBefore']),
};
}
export function FlushExpiredInboxesResultToJSON(
value?: FlushExpiredInboxesResult | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
inboxIds: value.inboxIds,
expireBefore: value.expireBefore.toISOString(),
};
}
/* 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';
/**
* Remaining recipients that were filtered to remove bounced recipients
* @export
* @interface FilterBouncedRecipientsResult
*/
export interface FilterBouncedRecipientsResult {
/**
*
* @type {Array<string>}
* @memberof FilterBouncedRecipientsResult
*/
filteredRecipients: Array<string>;
}
export function FilterBouncedRecipientsResultFromJSON(
json: any
): FilterBouncedRecipientsResult {
return FilterBouncedRecipientsResultFromJSONTyped(json, false);
}
export function FilterBouncedRecipientsResultFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): FilterBouncedRecipientsResult {
if (json === undefined || json === null) {
return json;
}
return {
filteredRecipients: json['filteredRecipients'],
};
}
export function FilterBouncedRecipientsResultToJSON(
value?: FilterBouncedRecipientsResult | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
filteredRecipients: value.filteredRecipients,
};
}
/* 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 filtering bounced email recipients
* @export
* @interface FilterBouncedRecipientsOptions
*/
export interface FilterBouncedRecipientsOptions {
/**
*
* @type {Array<string>}
* @memberof FilterBouncedRecipientsOptions
*/
emailRecipients: Array<string>;
}
export function FilterBouncedRecipientsOptionsFromJSON(
json: any
): FilterBouncedRecipientsOptions {
return FilterBouncedRecipientsOptionsFromJSONTyped(json, false);
}
export function FilterBouncedRecipientsOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): FilterBouncedRecipientsOptions {
if (json === undefined || json === null) {
return json;
}
return {
emailRecipients: json['emailRecipients'],
};
}
export function FilterBouncedRecipientsOptionsToJSON(
value?: FilterBouncedRecipientsOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
emailRecipients: value.emailRecipients,
};
}
/* 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';
import {
FakeEmailDto,
FakeEmailDtoFromJSON,
FakeEmailDtoFromJSONTyped,
FakeEmailDtoToJSON,
} from './';
/**
*
* @export
* @interface FakeEmailResult
*/
export interface FakeEmailResult {
/**
*
* @type {FakeEmailDto}
* @memberof FakeEmailResult
*/
email?: FakeEmailDto;
}
export function FakeEmailResultFromJSON(json: any): FakeEmailResult {
return FakeEmailResultFromJSONTyped(json, false);
}
export function FakeEmailResultFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): FakeEmailResult {
if (json === undefined || json === null) {
return json;
}
return {
email: !exists(json, 'email')
? undefined
: FakeEmailDtoFromJSON(json['email']),
};
}
export function FakeEmailResultToJSON(value?: FakeEmailResult | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
email: FakeEmailDtoToJSON(value.email),
};
}
/* 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';
import {
EmailRecipients,
EmailRecipientsFromJSON,
EmailRecipientsFromJSONTyped,
EmailRecipientsToJSON,
Sender,
SenderFromJSON,
SenderFromJSONTyped,
SenderToJSON,
} from './';
/**
*
* @export
* @interface FakeEmailPreview
*/
export interface FakeEmailPreview {
/**
*
* @type {string}
* @memberof FakeEmailPreview
*/
id: string;
/**
*
* @type {string}
* @memberof FakeEmailPreview
*/
emailAddress: string;
/**
*
* @type {Sender}
* @memberof FakeEmailPreview
*/
sender?: Sender | null;
/**
*
* @type {EmailRecipients}
* @memberof FakeEmailPreview
*/
recipients?: EmailRecipients | null;
/**
*
* @type {string}
* @memberof FakeEmailPreview
*/
subject?: string;
/**
*
* @type {string}
* @memberof FakeEmailPreview
*/
preview?: string;
/**
*
* @type {Date}
* @memberof FakeEmailPreview
*/
createdAt: Date;
/**
*
* @type {boolean}
* @memberof FakeEmailPreview
*/
seen: boolean;
}
export function FakeEmailPreviewFromJSON(json: any): FakeEmailPreview {
return FakeEmailPreviewFromJSONTyped(json, false);
}
export function FakeEmailPreviewFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): FakeEmailPreview {
if (json === undefined || json === null) {
return json;
}
return {
id: json['id'],
emailAddress: json['emailAddress'],
sender: !exists(json, 'sender')
? undefined
: SenderFromJSON(json['sender']),
recipients: !exists(json, 'recipients')
? undefined
: EmailRecipientsFromJSON(json['recipients']),
subject: !exists(json, 'subject') ? undefined : json['subject'],
preview: !exists(json, 'preview') ? undefined : json['preview'],
createdAt: new Date(json['createdAt']),
seen: json['seen'],
};
}
export function FakeEmailPreviewToJSON(value?: FakeEmailPreview | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
emailAddress: value.emailAddress,
sender: SenderToJSON(value.sender),
recipients: EmailRecipientsToJSON(value.recipients),
subject: value.subject,
preview: value.preview,
createdAt: value.createdAt.toISOString(),
seen: value.seen,
};
}
/* 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';
import {
EmailRecipients,
EmailRecipientsFromJSON,
EmailRecipientsFromJSONTyped,
EmailRecipientsToJSON,
Sender,
SenderFromJSON,
SenderFromJSONTyped,
SenderToJSON,
} from './';
/**
*
* @export
* @interface FakeEmailDto
*/
export interface FakeEmailDto {
/**
*
* @type {string}
* @memberof FakeEmailDto
*/
id: string;
/**
*
* @type {string}
* @memberof FakeEmailDto
*/
emailAddress: string;
/**
*
* @type {Sender}
* @memberof FakeEmailDto
*/
sender?: Sender | null;
/**
*
* @type {EmailRecipients}
* @memberof FakeEmailDto
*/
recipients?: EmailRecipients | null;
/**
*
* @type {string}
* @memberof FakeEmailDto
*/
subject?: string;
/**
*
* @type {string}
* @memberof FakeEmailDto
*/
preview?: string;
/**
*
* @type {string}
* @memberof FakeEmailDto
*/
body: string;
/**
*
* @type {boolean}
* @memberof FakeEmailDto
*/
seen: boolean;
/**
*
* @type {Date}
* @memberof FakeEmailDto
*/
createdAt: Date;
}
export function FakeEmailDtoFromJSON(json: any): FakeEmailDto {
return FakeEmailDtoFromJSONTyped(json, false);
}
export function FakeEmailDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): FakeEmailDto {
if (json === undefined || json === null) {
return json;
}
return {
id: json['id'],
emailAddress: json['emailAddress'],
sender: !exists(json, 'sender')
? undefined
: SenderFromJSON(json['sender']),
recipients: !exists(json, 'recipients')
? undefined
: EmailRecipientsFromJSON(json['recipients']),
subject: !exists(json, 'subject') ? undefined : json['subject'],
preview: !exists(json, 'preview') ? undefined : json['preview'],
body: json['body'],
seen: json['seen'],
createdAt: new Date(json['createdAt']),
};
}
export function FakeEmailDtoToJSON(value?: FakeEmailDto | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
emailAddress: value.emailAddress,
sender: SenderToJSON(value.sender),
recipients: EmailRecipientsToJSON(value.recipients),
subject: value.subject,
preview: value.preview,
body: value.body,
seen: value.seen,
createdAt: value.createdAt.toISOString(),
};
}
/* 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,
};
}
/* 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';
/**
* Export download link
* @export
* @interface ExportLink
*/
export interface ExportLink {
/**
*
* @type {string}
* @memberof ExportLink
*/
downloadLink: string;
}
export function ExportLinkFromJSON(json: any): ExportLink {
return ExportLinkFromJSONTyped(json, false);
}
export function ExportLinkFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ExportLink {
if (json === undefined || json === null) {
return json;
}
return {
downloadLink: json['downloadLink'],
};
}
export function ExportLinkToJSON(value?: ExportLink | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
downloadLink: value.downloadLink,
};
}
/* 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';
/**
* Record of inbox expiration
* @export
* @interface ExpiredInboxRecordProjection
*/
export interface ExpiredInboxRecordProjection {
/**
*
* @type {Date}
* @memberof ExpiredInboxRecordProjection
*/
createdAt: Date;
/**
*
* @type {string}
* @memberof ExpiredInboxRecordProjection
*/
userId: string;
/**
*
* @type {string}
* @memberof ExpiredInboxRecordProjection
*/
emailAddress: string;
/**
*
* @type {string}
* @memberof ExpiredInboxRecordProjection
*/
id: string;
}
export function ExpiredInboxRecordProjectionFromJSON(
json: any
): ExpiredInboxRecordProjection {
return ExpiredInboxRecordProjectionFromJSONTyped(json, false);
}
export function ExpiredInboxRecordProjectionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ExpiredInboxRecordProjection {
if (json === undefined || json === null) {
return json;
}
return {
createdAt: new Date(json['createdAt']),
userId: json['userId'],
emailAddress: json['emailAddress'],
id: json['id'],
};
}
export function ExpiredInboxRecordProjectionToJSON(
value?: ExpiredInboxRecordProjection | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
createdAt: value.createdAt.toISOString(),
userId: value.userId,
emailAddress: value.emailAddress,
id: value.id,
};
}
/* 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';
/**
* Expired inbox
* @export
* @interface ExpiredInboxDto
*/
export interface ExpiredInboxDto {
/**
*
* @type {string}
* @memberof ExpiredInboxDto
*/
id: string;
/**
*
* @type {string}
* @memberof ExpiredInboxDto
*/
inboxId: string;
/**
*
* @type {string}
* @memberof ExpiredInboxDto
*/
emailAddress: string;
}
export function ExpiredInboxDtoFromJSON(json: any): ExpiredInboxDto {
return ExpiredInboxDtoFromJSONTyped(json, false);
}
export function ExpiredInboxDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ExpiredInboxDto {
if (json === undefined || json === null) {
return json;
}
return {
id: json['id'],
inboxId: json['inboxId'],
emailAddress: json['emailAddress'],
};
}
export function ExpiredInboxDtoToJSON(value?: ExpiredInboxDto | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
inboxId: value.inboxId,
emailAddress: value.emailAddress,
};
}
/* 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';
/**
* Expiration defaults for your account
* @export
* @interface ExpirationDefaults
*/
export interface ExpirationDefaults {
/**
*
* @type {number}
* @memberof ExpirationDefaults
*/
defaultExpirationMillis?: number | null;
/**
*
* @type {number}
* @memberof ExpirationDefaults
*/
maxExpirationMillis?: number | null;
/**
*
* @type {Date}
* @memberof ExpirationDefaults
*/
defaultExpiresAt?: Date | null;
/**
*
* @type {boolean}
* @memberof ExpirationDefaults
*/
canPermanentInbox: boolean;
/**
*
* @type {boolean}
* @memberof ExpirationDefaults
*/
nextInboxAllowsPermanent: boolean;
}
export function ExpirationDefaultsFromJSON(json: any): ExpirationDefaults {
return ExpirationDefaultsFromJSONTyped(json, false);
}
export function ExpirationDefaultsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ExpirationDefaults {
if (json === undefined || json === null) {
return json;
}
return {
defaultExpirationMillis: !exists(json, 'defaultExpirationMillis')
? undefined
: json['defaultExpirationMillis'],
maxExpirationMillis: !exists(json, 'maxExpirationMillis')
? undefined
: json['maxExpirationMillis'],
defaultExpiresAt: !exists(json, 'defaultExpiresAt')
? undefined
: json['defaultExpiresAt'] === null
? null
: new Date(json['defaultExpiresAt']),
canPermanentInbox: json['canPermanentInbox'],
nextInboxAllowsPermanent: json['nextInboxAllowsPermanent'],
};
}
export function ExpirationDefaultsToJSON(
value?: ExpirationDefaults | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
defaultExpirationMillis: value.defaultExpirationMillis,
maxExpirationMillis: value.maxExpirationMillis,
defaultExpiresAt:
value.defaultExpiresAt === undefined
? undefined
: value.defaultExpiresAt === null
? null
: value.defaultExpiresAt.toISOString(),
canPermanentInbox: value.canPermanentInbox,
nextInboxAllowsPermanent: value.nextInboxAllowsPermanent,
};
}
/* 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';
/**
*
* @export
* @interface EmptyResponseDto
*/
export interface EmptyResponseDto {
/**
*
* @type {string}
* @memberof EmptyResponseDto
*/
message?: string;
}
export function EmptyResponseDtoFromJSON(json: any): EmptyResponseDto {
return EmptyResponseDtoFromJSONTyped(json, false);
}
export function EmptyResponseDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): EmptyResponseDto {
if (json === undefined || json === null) {
return json;
}
return {
message: !exists(json, 'message') ? undefined : json['message'],
};
}
export function EmptyResponseDtoToJSON(value?: EmptyResponseDto | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
message: value.message,
};
}
/* 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';
/**
*
* @export
* @interface EmergencyAddressDto
*/
export interface EmergencyAddressDto {
/**
*
* @type {string}
* @memberof EmergencyAddressDto
*/
id: string;
/**
*
* @type {string}
* @memberof EmergencyAddressDto
*/
address1: string;
/**
*
* @type {string}
* @memberof EmergencyAddressDto
*/
phoneCountry: EmergencyAddressDtoPhoneCountryEnum;
}
/**
* @export
* @enum {string}
*/
export enum EmergencyAddressDtoPhoneCountryEnum {
US = 'US',
GB = 'GB',
AU = 'AU',
}
export function EmergencyAddressDtoFromJSON(json: any): EmergencyAddressDto {
return EmergencyAddressDtoFromJSONTyped(json, false);
}
export function EmergencyAddressDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): EmergencyAddressDto {
if (json === undefined || json === null) {
return json;
}
return {
id: json['id'],
address1: json['address1'],
phoneCountry: json['phoneCountry'],
};
}
export function EmergencyAddressDtoToJSON(
value?: EmergencyAddressDto | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
address1: value.address1,
phoneCountry: value.phoneCountry,
};
}
/* 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';
/**
*
* @export
* @interface EmergencyAddress
*/
export interface EmergencyAddress {
/**
*
* @type {string}
* @memberof EmergencyAddress
*/
id?: string;
/**
*
* @type {string}
* @memberof EmergencyAddress
*/
sid: string;
/**
*
* @type {string}
* @memberof EmergencyAddress
*/
userId: string;
/**
*
* @type {string}
* @memberof EmergencyAddress
*/
displayName: string;
/**
*
* @type {string}
* @memberof EmergencyAddress
*/
customerName: string;
/**
*
* @type {string}
* @memberof EmergencyAddress
*/
address1: string;
/**
*
* @type {string}
* @memberof EmergencyAddress
*/
city: string;
/**
*
* @type {string}
* @memberof EmergencyAddress
*/
region: string;
/**
*
* @type {string}
* @memberof EmergencyAddress
*/
postalCode: string;
/**
*
* @type {string}
* @memberof EmergencyAddress
*/
phoneCountry: EmergencyAddressPhoneCountryEnum;
/**
*
* @type {string}
* @memberof EmergencyAddress
*/
accountSid: string;
/**
*
* @type {Date}
* @memberof EmergencyAddress
*/
createdAt: Date;
/**
*
* @type {Date}
* @memberof EmergencyAddress
*/
updatedAt: Date;
}
/**
* @export
* @enum {string}
*/
export enum EmergencyAddressPhoneCountryEnum {
US = 'US',
GB = 'GB',
AU = 'AU',
}
export function EmergencyAddressFromJSON(json: any): EmergencyAddress {
return EmergencyAddressFromJSONTyped(json, false);
}
export function EmergencyAddressFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): EmergencyAddress {
if (json === undefined || json === null) {
return json;
}
return {
id: !exists(json, 'id') ? undefined : json['id'],
sid: json['sid'],
userId: json['userId'],
displayName: json['displayName'],
customerName: json['customerName'],
address1: json['address1'],
city: json['city'],
region: json['region'],
postalCode: json['postalCode'],
phoneCountry: json['phoneCountry'],
accountSid: json['accountSid'],
createdAt: new Date(json['createdAt']),
updatedAt: new Date(json['updatedAt']),
};
}
export function EmergencyAddressToJSON(value?: EmergencyAddress | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
sid: value.sid,
userId: value.userId,
displayName: value.displayName,
customerName: value.customerName,
address1: value.address1,
city: value.city,
region: value.region,
postalCode: value.postalCode,
phoneCountry: value.phoneCountry,
accountSid: value.accountSid,
createdAt: value.createdAt.toISOString(),
updatedAt: value.updatedAt.toISOString(),
};
}
/* 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';
/**
* Email verification result. Valid means email address exists according to response from mail server running at the domain and port given.
* @export
* @interface EmailVerificationResult
*/
export interface EmailVerificationResult {
/**
*
* @type {string}
* @memberof EmailVerificationResult
*/
domainName: string;
/**
*
* @type {number}
* @memberof EmailVerificationResult
*/
port: number;
/**
*
* @type {string}
* @memberof EmailVerificationResult
*/
emailAddress: string;
/**
*
* @type {boolean}
* @memberof EmailVerificationResult
*/
isValid: boolean;
/**
*
* @type {string}
* @memberof EmailVerificationResult
*/
error?: string | null;
}
export function EmailVerificationResultFromJSON(
json: any
): EmailVerificationResult {
return EmailVerificationResultFromJSONTyped(json, false);
}
export function EmailVerificationResultFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): EmailVerificationResult {
if (json === undefined || json === null) {
return json;
}
return {
domainName: json['domainName'],
port: json['port'],
emailAddress: json['emailAddress'],
isValid: json['isValid'],
error: !exists(json, 'error') ? undefined : json['error'],
};
}
export function EmailVerificationResultToJSON(
value?: EmailVerificationResult | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
domainName: value.domainName,
port: value.port,
emailAddress: value.emailAddress,
isValid: value.isValid,
error: value.error,
};
}
/* 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';
/**
* Email validation request
* @export
* @interface EmailValidationRequestDto
*/
export interface EmailValidationRequestDto {
/**
*
* @type {string}
* @memberof EmailValidationRequestDto
*/
id: string;
/**
*
* @type {string}
* @memberof EmailValidationRequestDto
*/
userId: string;
/**
*
* @type {string}
* @memberof EmailValidationRequestDto
*/
emailAddress: string;
/**
*
* @type {boolean}
* @memberof EmailValidationRequestDto
*/
isValid: boolean;
/**
*
* @type {Date}
* @memberof EmailValidationRequestDto
*/
createdAt: Date;
/**
*
* @type {Date}
* @memberof EmailValidationRequestDto
*/
updatedAt: Date;
}
export function EmailValidationRequestDtoFromJSON(
json: any
): EmailValidationRequestDto {
return EmailValidationRequestDtoFromJSONTyped(json, false);
}
export function EmailValidationRequestDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): EmailValidationRequestDto {
if (json === undefined || json === null) {
return json;
}
return {
id: json['id'],
userId: json['userId'],
emailAddress: json['emailAddress'],
isValid: json['isValid'],
createdAt: new Date(json['createdAt']),
updatedAt: new Date(json['updatedAt']),
};
}
export function EmailValidationRequestDtoToJSON(
value?: EmailValidationRequestDto | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
userId: value.userId,
emailAddress: value.emailAddress,
isValid: value.isValid,
createdAt: value.createdAt.toISOString(),
updatedAt: value.updatedAt.toISOString(),
};
}
/* 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';
/**
* Parsed text of an email
* @export
* @interface EmailTextLinesResult
*/
export interface EmailTextLinesResult {
/**
*
* @type {Array<string>}
* @memberof EmailTextLinesResult
*/
lines: Array<string>;
/**
*
* @type {string}
* @memberof EmailTextLinesResult
*/
body: string;
}
export function EmailTextLinesResultFromJSON(json: any): EmailTextLinesResult {
return EmailTextLinesResultFromJSONTyped(json, false);
}
export function EmailTextLinesResultFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): EmailTextLinesResult {
if (json === undefined || json === null) {
return json;
}
return {
lines: json['lines'],
body: json['body'],
};
}
export function EmailTextLinesResultToJSON(
value?: EmailTextLinesResult | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
lines: value.lines,
body: value.body,
};
}
/* 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';
/**
*
* @export
* @interface EmailScreenshotResult
*/
export interface EmailScreenshotResult {
/**
*
* @type {string}
* @memberof EmailScreenshotResult
*/
base64EncodedImage: string;
}
export function EmailScreenshotResultFromJSON(
json: any
): EmailScreenshotResult {
return EmailScreenshotResultFromJSONTyped(json, false);
}
export function EmailScreenshotResultFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): EmailScreenshotResult {
if (json === undefined || json === null) {
return json;
}
return {
base64EncodedImage: json['base64EncodedImage'],
};
}
export function EmailScreenshotResultToJSON(
value?: EmailScreenshotResult | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
base64EncodedImage: value.base64EncodedImage,
};
}
/* 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';
import {
Recipient,
RecipientFromJSON,
RecipientFromJSONTyped,
RecipientToJSON,
} from './';
/**
* The `To`,`CC`,`BCC` recipients stored in object form with email address and name accessible.
* @export
* @interface EmailRecipients
*/
export interface EmailRecipients {
/**
*
* @type {Array<Recipient>}
* @memberof EmailRecipients
*/
to?: Array<Recipient>;
/**
*
* @type {Array<Recipient>}
* @memberof EmailRecipients
*/
cc?: Array<Recipient>;
/**
*
* @type {Array<Recipient>}
* @memberof EmailRecipients
*/
bcc?: Array<Recipient>;
}
export function EmailRecipientsFromJSON(json: any): EmailRecipients {
return EmailRecipientsFromJSONTyped(json, false);
}
export function EmailRecipientsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): EmailRecipients {
if (json === undefined || json === null) {
return json;
}
return {
to: !exists(json, 'to')
? undefined
: (json['to'] as Array<any>).map(RecipientFromJSON),
cc: !exists(json, 'cc')
? undefined
: (json['cc'] as Array<any>).map(RecipientFromJSON),
bcc: !exists(json, 'bcc')
? undefined
: (json['bcc'] as Array<any>).map(RecipientFromJSON),
};
}
export function EmailRecipientsToJSON(value?: EmailRecipients | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
to:
value.to === undefined
? undefined
: (value.to as Array<any>).map(RecipientToJSON),
cc:
value.cc === undefined
? undefined
: (value.cc as Array<any>).map(RecipientToJSON),
bcc:
value.bcc === undefined
? undefined
: (value.bcc as Array<any>).map(RecipientToJSON),
};
}
/* 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';
/**
* A compact representation of a full email. Used in list endpoints to keep response sizes low. Body and attachments are not included. To get all fields of the email use the `getEmail` method with the email projection's ID. See `EmailDto` for documentation on projection properties.
* @export
* @interface EmailProjection
*/
export interface EmailProjection {
/**
*
* @type {Date}
* @memberof EmailProjection
*/
createdAt: Date;
/**
*
* @type {string}
* @memberof EmailProjection
*/
inboxId: string;
/**
*
* @type {Array<string>}
* @memberof EmailProjection
*/
attachments?: Array<string> | null;
/**
*
* @type {Array<string>}
* @memberof EmailProjection
*/
to: Array<string>;
/**
*
* @type {string}
* @memberof EmailProjection
*/
domainId?: string | null;
/**
*
* @type {Array<string>}
* @memberof EmailProjection
*/
bcc?: Array<string> | null;
/**
*
* @type {Array<string>}
* @memberof EmailProjection
*/
cc?: Array<string> | null;
/**
*
* @type {boolean}
* @memberof EmailProjection
*/
read: boolean;
/**
*
* @type {string}
* @memberof EmailProjection
*/
bodyExcerpt?: string | null;
/**
*
* @type {boolean}
* @memberof EmailProjection
*/
teamAccess: boolean;
/**
*
* @type {string}
* @memberof EmailProjection
*/
bodyMD5Hash?: string | null;
/**
*
* @type {string}
* @memberof EmailProjection
*/
textExcerpt?: string | null;
/**
*
* @type {string}
* @memberof EmailProjection
*/
subject?: string | null;
/**
*
* @type {string}
* @memberof EmailProjection
*/
id: string;
/**
*
* @type {string}
* @memberof EmailProjection
*/
from?: string | null;
}
export function EmailProjectionFromJSON(json: any): EmailProjection {
return EmailProjectionFromJSONTyped(json, false);
}
export function EmailProjectionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): EmailProjection {
if (json === undefined || json === null) {
return json;
}
return {
createdAt: new Date(json['createdAt']),
inboxId: json['inboxId'],
attachments: !exists(json, 'attachments') ? undefined : json['attachments'],
to: json['to'],
domainId: !exists(json, 'domainId') ? undefined : json['domainId'],
bcc: !exists(json, 'bcc') ? undefined : json['bcc'],
cc: !exists(json, 'cc') ? undefined : json['cc'],
read: json['read'],
bodyExcerpt: !exists(json, 'bodyExcerpt') ? undefined : json['bodyExcerpt'],
teamAccess: json['teamAccess'],
bodyMD5Hash: !exists(json, 'bodyMD5Hash') ? undefined : json['bodyMD5Hash'],
textExcerpt: !exists(json, 'textExcerpt') ? undefined : json['textExcerpt'],
subject: !exists(json, 'subject') ? undefined : json['subject'],
id: json['id'],
from: !exists(json, 'from') ? undefined : json['from'],
};
}
export function EmailProjectionToJSON(value?: EmailProjection | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
createdAt: value.createdAt.toISOString(),
inboxId: value.inboxId,
attachments: value.attachments,
to: value.to,
domainId: value.domainId,
bcc: value.bcc,
cc: value.cc,
read: value.read,
bodyExcerpt: value.bodyExcerpt,
teamAccess: value.teamAccess,
bodyMD5Hash: value.bodyMD5Hash,
textExcerpt: value.textExcerpt,
subject: value.subject,
id: value.id,
from: value.from,
};
}
/* 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';
/**
* URLs for email body
* @export
* @interface EmailPreviewUrls
*/
export interface EmailPreviewUrls {
/**
*
* @type {string}
* @memberof EmailPreviewUrls
*/
rawSmtpMessageUrl: string;
/**
*
* @type {string}
* @memberof EmailPreviewUrls
*/
plainHtmlBodyUrl: string;
/**
*
* @type {string}
* @memberof EmailPreviewUrls
*/
origin: string;
}
export function EmailPreviewUrlsFromJSON(json: any): EmailPreviewUrls {
return EmailPreviewUrlsFromJSONTyped(json, false);
}
export function EmailPreviewUrlsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): EmailPreviewUrls {
if (json === undefined || json === null) {
return json;
}
return {
rawSmtpMessageUrl: json['rawSmtpMessageUrl'],
plainHtmlBodyUrl: json['plainHtmlBodyUrl'],
origin: json['origin'],
};
}
export function EmailPreviewUrlsToJSON(value?: EmailPreviewUrls | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
rawSmtpMessageUrl: value.rawSmtpMessageUrl,
plainHtmlBodyUrl: value.plainHtmlBodyUrl,
origin: value.origin,
};
}
/* 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';
/**
* Preview of an email message. For full message (including body and attachments) call the `getEmail` or other email endpoints with the provided email ID.
* @export
* @interface EmailPreview
*/
export interface EmailPreview {
/**
* ID of the email entity
* @type {string}
* @memberof EmailPreview
*/
id: string;
/**
* ID of the domain that received the email
* @type {string}
* @memberof EmailPreview
*/
domainId?: string | null;
/**
* The subject line of the email message as specified by SMTP subject header
* @type {string}
* @memberof EmailPreview
*/
subject?: string | null;
/**
* List of `To` recipient email addresses that the email was addressed to. See recipients object for names.
* @type {Array<string>}
* @memberof EmailPreview
*/
to: Array<string> | null;
/**
* Who the email was sent from. An email address - see fromName for the sender name.
* @type {string}
* @memberof EmailPreview
*/
from?: string | null;
/**
* List of `BCC` recipients email addresses that the email was addressed to. See recipients object for names.
* @type {Array<string>}
* @memberof EmailPreview
*/
bcc?: Array<string> | null;
/**
* List of `CC` recipients email addresses that the email was addressed to. See recipients object for names.
* @type {Array<string>}
* @memberof EmailPreview
*/
cc?: Array<string> | null;
/**
* When was the email received by MailSlurp
* @type {Date}
* @memberof EmailPreview
*/
createdAt: Date;
/**
* Read flag. Has the email ever been viewed in the dashboard or fetched via the API with a hydrated body? If so the email is marked as read. Paginated results do not affect read status. Read status is different to email opened event as it depends on your own account accessing the email. Email opened is determined by tracking pixels sent to other uses if enable during sending. You can listened for both email read and email opened events using webhooks.
* @type {boolean}
* @memberof EmailPreview
*/
read: boolean;
/**
* List of IDs of attachments found in the email. Use these IDs with the Inbox and Email Controllers to download attachments and attachment meta data such as filesize, name, extension.
* @type {Array<string>}
* @memberof EmailPreview
*/
attachments?: Array<string> | null;
}
export function EmailPreviewFromJSON(json: any): EmailPreview {
return EmailPreviewFromJSONTyped(json, false);
}
export function EmailPreviewFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): EmailPreview {
if (json === undefined || json === null) {
return json;
}
return {
id: json['id'],
domainId: !exists(json, 'domainId') ? undefined : json['domainId'],
subject: !exists(json, 'subject') ? undefined : json['subject'],
to: json['to'],
from: !exists(json, 'from') ? undefined : json['from'],
bcc: !exists(json, 'bcc') ? undefined : json['bcc'],
cc: !exists(json, 'cc') ? undefined : json['cc'],
createdAt: new Date(json['createdAt']),
read: json['read'],
attachments: !exists(json, 'attachments') ? undefined : json['attachments'],
};
}
export function EmailPreviewToJSON(value?: EmailPreview | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
domainId: value.domainId,
subject: value.subject,
to: value.to,
from: value.from,
bcc: value.bcc,
cc: value.cc,
createdAt: value.createdAt.toISOString(),
read: value.read,
attachments: value.attachments,
};
}
/* 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';
/**
* Links found in HTML
* @export
* @interface EmailLinksResult
*/
export interface EmailLinksResult {
/**
*
* @type {Array<string>}
* @memberof EmailLinksResult
*/
links: Array<string>;
/**
*
* @type {string}
* @memberof EmailLinksResult
*/
body: string;
}
export function EmailLinksResultFromJSON(json: any): EmailLinksResult {
return EmailLinksResultFromJSONTyped(json, false);
}
export function EmailLinksResultFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): EmailLinksResult {
if (json === undefined || json === null) {
return json;
}
return {
links: json['links'],
body: json['body'],
};
}
export function EmailLinksResultToJSON(value?: EmailLinksResult | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
links: value.links,
body: value.body,
};
}
/* 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';
/**
*
* @export
* @interface EmailHtmlDto
*/
export interface EmailHtmlDto {
/**
*
* @type {string}
* @memberof EmailHtmlDto
*/
subject?: string;
/**
*
* @type {string}
* @memberof EmailHtmlDto
*/
body?: string;
}
export function EmailHtmlDtoFromJSON(json: any): EmailHtmlDto {
return EmailHtmlDtoFromJSONTyped(json, false);
}
export function EmailHtmlDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): EmailHtmlDto {
if (json === undefined || json === null) {
return json;
}
return {
subject: !exists(json, 'subject') ? undefined : json['subject'],
body: !exists(json, 'body') ? undefined : json['body'],
};
}
export function EmailHtmlDtoToJSON(value?: EmailHtmlDto | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
subject: value.subject,
body: value.body,
};
}
/* 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';
import {
EmailFeatureSupportFlags,
EmailFeatureSupportFlagsFromJSON,
EmailFeatureSupportFlagsFromJSONTyped,
EmailFeatureSupportFlagsToJSON,
} from './';
/**
*
* @export
* @interface EmailFeatureVersionStatistics
*/
export interface EmailFeatureVersionStatistics {
/**
*
* @type {string}
* @memberof EmailFeatureVersionStatistics
*/
version: string;
/**
*
* @type {EmailFeatureSupportFlags}
* @memberof EmailFeatureVersionStatistics
*/
supportFlags: EmailFeatureSupportFlags;
}
export function EmailFeatureVersionStatisticsFromJSON(
json: any
): EmailFeatureVersionStatistics {
return EmailFeatureVersionStatisticsFromJSONTyped(json, false);
}
export function EmailFeatureVersionStatisticsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): EmailFeatureVersionStatistics {
if (json === undefined || json === null) {
return json;
}
return {
version: json['version'],
supportFlags: EmailFeatureSupportFlagsFromJSON(json['supportFlags']),
};
}
export function EmailFeatureVersionStatisticsToJSON(
value?: EmailFeatureVersionStatistics | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
version: value.version,
supportFlags: EmailFeatureSupportFlagsToJSON(value.supportFlags),
};
}
/* 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';
/**
*
* @export
* @interface EmailFeatureSupportStatusPercentage
*/
export interface EmailFeatureSupportStatusPercentage {
/**
*
* @type {string}
* @memberof EmailFeatureSupportStatusPercentage
*/
status: EmailFeatureSupportStatusPercentageStatusEnum;
/**
*
* @type {number}
* @memberof EmailFeatureSupportStatusPercentage
*/
percentage: number;
}
/**
* @export
* @enum {string}
*/
export enum EmailFeatureSupportStatusPercentageStatusEnum {
SUPPORTED = 'SUPPORTED',
PARTIAL = 'PARTIAL',
NOT_SUPPORTED = 'NOT_SUPPORTED',
UNKNOWN = 'UNKNOWN',
}
export function EmailFeatureSupportStatusPercentageFromJSON(
json: any
): EmailFeatureSupportStatusPercentage {
return EmailFeatureSupportStatusPercentageFromJSONTyped(json, false);
}
export function EmailFeatureSupportStatusPercentageFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): EmailFeatureSupportStatusPercentage {
if (json === undefined || json === null) {
return json;
}
return {
status: json['status'],
percentage: json['percentage'],
};
}
export function EmailFeatureSupportStatusPercentageToJSON(
value?: EmailFeatureSupportStatusPercentage | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
status: value.status,
percentage: value.percentage,
};
}
/* 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';
import {
EmailFeatureNames,
EmailFeatureNamesFromJSON,
EmailFeatureNamesFromJSONTyped,
EmailFeatureNamesToJSON,
EmailFeatureOverview,
EmailFeatureOverviewFromJSON,
EmailFeatureOverviewFromJSONTyped,
EmailFeatureOverviewToJSON,
EmailFeatureSupportStatusPercentage,
EmailFeatureSupportStatusPercentageFromJSON,
EmailFeatureSupportStatusPercentageFromJSONTyped,
EmailFeatureSupportStatusPercentageToJSON,
} from './';
/**
*
* @export
* @interface EmailFeatureSupportResult
*/
export interface EmailFeatureSupportResult {
/**
*
* @type {EmailFeatureNames}
* @memberof EmailFeatureSupportResult
*/
names: EmailFeatureNames;
/**
*
* @type {Set<string>}
* @memberof EmailFeatureSupportResult
*/
detectedFeatures: Set<EmailFeatureSupportResultDetectedFeaturesEnum>;
/**
*
* @type {Array<EmailFeatureOverview>}
* @memberof EmailFeatureSupportResult
*/
featureOverviews: Array<EmailFeatureOverview>;
/**
*
* @type {Array<EmailFeatureSupportStatusPercentage>}
* @memberof EmailFeatureSupportResult
*/
featurePercentages: Array<EmailFeatureSupportStatusPercentage>;
}
/**
* @export
* @enum {string}
*/
export enum EmailFeatureSupportResultDetectedFeaturesEnum {
amp = 'amp',
css_accent_color = 'css-accent-color',
css_align_items = 'css-align-items',
css_animation = 'css-animation',
css_aspect_ratio = 'css-aspect-ratio',
css_at_font_face = 'css-at-font-face',
css_at_import = 'css-at-import',
css_at_keyframes = 'css-at-keyframes',
css_at_media = 'css-at-media',
css_at_supports = 'css-at-supports',
css_background_blend_mode = 'css-background-blend-mode',
css_background_clip = 'css-background-clip',
css_background_color = 'css-background-color',
css_background_image = 'css-background-image',
css_background_origin = 'css-background-origin',
css_background_position = 'css-background-position',
css_background_repeat = 'css-background-repeat',
css_background_size = 'css-background-size',
css_background = 'css-background',
css_block_inline_size = 'css-block-inline-size',
css_border_image = 'css-border-image',
css_border_inline_block_individual = 'css-border-inline-block-individual',
css_border_inline_block_longhand = 'css-border-inline-block-longhand',
css_border_inline_block = 'css-border-inline-block',
css_border_radius_logical = 'css-border-radius-logical',
css_border_radius = 'css-border-radius',
css_border = 'css-border',
css_box_shadow = 'css-box-shadow',
css_box_sizing = 'css-box-sizing',
css_caption_side = 'css-caption-side',
css_clip_path = 'css-clip-path',
css_column_count = 'css-column-count',
css_column_layout_properties = 'css-column-layout-properties',
css_direction = 'css-direction',
css_display_flex = 'css-display-flex',
css_display_grid = 'css-display-grid',
css_display_none = 'css-display-none',
css_display = 'css-display',
css_filter = 'css-filter',
css_flex_direction = 'css-flex-direction',
css_flex_wrap = 'css-flex-wrap',
css_float = 'css-float',
css_font_kerning = 'css-font-kerning',
css_font_weight = 'css-font-weight',
css_font = 'css-font',
css_gap = 'css-gap',
css_grid_template = 'css-grid-template',
css_height = 'css-height',
css_hyphens = 'css-hyphens',
css_inline_size = 'css-inline-size',
css_justify_content = 'css-justify-content',
css_left_right_top_bottom = 'css-left-right-top-bottom',
css_letter_spacing = 'css-letter-spacing',
css_line_height = 'css-line-height',
css_list_style_image = 'css-list-style-image',
css_list_style_position = 'css-list-style-position',
css_list_style_type = 'css-list-style-type',
css_list_style = 'css-list-style',
css_margin_block_start_end = 'css-margin-block-start-end',
css_margin_inline_block = 'css-margin-inline-block',
css_margin_inline_start_end = 'css-margin-inline-start-end',
css_margin_inline = 'css-margin-inline',
css_margin = 'css-margin',
css_max_block_size = 'css-max-block-size',
css_max_height = 'css-max-height',
css_max_width = 'css-max-width',
css_min_height = 'css-min-height',
css_min_inline_size = 'css-min-inline-size',
css_min_width = 'css-min-width',
css_mix_blend_mode = 'css-mix-blend-mode',
css_object_fit = 'css-object-fit',
css_object_position = 'css-object-position',
css_opacity = 'css-opacity',
css_outline_offset = 'css-outline-offset',
css_outline = 'css-outline',
css_overflow_wrap = 'css-overflow-wrap',
css_overflow = 'css-overflow',
css_padding_block_start_end = 'css-padding-block-start-end',
css_padding_inline_block = 'css-padding-inline-block',
css_padding_inline_start_end = 'css-padding-inline-start-end',
css_padding = 'css-padding',
css_position = 'css-position',
css_tab_size = 'css-tab-size',
css_table_layout = 'css-table-layout',
css_text_align_last = 'css-text-align-last',
css_text_align = 'css-text-align',
css_text_decoration_color = 'css-text-decoration-color',
css_text_decoration_thickness = 'css-text-decoration-thickness',
css_text_decoration = 'css-text-decoration',
css_text_emphasis_position = 'css-text-emphasis-position',
css_text_emphasis = 'css-text-emphasis',
css_text_indent = 'css-text-indent',
css_text_overflow = 'css-text-overflow',
css_text_shadow = 'css-text-shadow',
css_text_transform = 'css-text-transform',
css_text_underline_offset = 'css-text-underline-offset',
css_transform = 'css-transform',
css_vertical_align = 'css-vertical-align',
css_visibility = 'css-visibility',
css_white_space = 'css-white-space',
css_width = 'css-width',
css_word_break = 'css-word-break',
css_writing_mode = 'css-writing-mode',
css_z_index = 'css-z-index',
html_abbr = 'html-abbr',
html_address = 'html-address',
html_align = 'html-align',
html_anchor_links = 'html-anchor-links',
html_aria_describedby = 'html-aria-describedby',
html_aria_hidden = 'html-aria-hidden',
html_aria_label = 'html-aria-label',
html_aria_labelledby = 'html-aria-labelledby',
html_aria_live = 'html-aria-live',
html_audio = 'html-audio',
html_background = 'html-background',
html_base = 'html-base',
html_blockquote = 'html-blockquote',
html_body = 'html-body',
html_button_reset = 'html-button-reset',
html_button_submit = 'html-button-submit',
html_code = 'html-code',
html_del = 'html-del',
html_dfn = 'html-dfn',
html_dialog = 'html-dialog',
html_dir = 'html-dir',
html_div = 'html-div',
html_doctype = 'html-doctype',
html_form = 'html-form',
html_h1_h6 = 'html-h1-h6',
html_height = 'html-height',
html_image_maps = 'html-image-maps',
html_input_checkbox = 'html-input-checkbox',
html_input_hidden = 'html-input-hidden',
html_input_radio = 'html-input-radio',
html_input_reset = 'html-input-reset',
html_input_submit = 'html-input-submit',
html_input_text = 'html-input-text',
html_lang = 'html-lang',
html_link = 'html-link',
html_lists = 'html-lists',
html_loading_attribute = 'html-loading-attribute',
html_mailto_links = 'html-mailto-links',
html_marquee = 'html-marquee',
html_meter = 'html-meter',
html_object = 'html-object',
html_p = 'html-p',
html_picture = 'html-picture',
html_pre = 'html-pre',
html_progress = 'html-progress',
html_required = 'html-required',
html_role = 'html-role',
html_rp = 'html-rp',
html_rt = 'html-rt',
html_ruby = 'html-ruby',
html_select = 'html-select',
html_semantics = 'html-semantics',
html_small = 'html-small',
html_span = 'html-span',
html_srcset = 'html-srcset',
html_strike = 'html-strike',
html_strong = 'html-strong',
html_style = 'html-style',
html_svg = 'html-svg',
html_table = 'html-table',
html_target = 'html-target',
html_textarea = 'html-textarea',
html_valign = 'html-valign',
html_video = 'html-video',
html_wbr = 'html-wbr',
html_width = 'html-width',
image_avif = 'image-avif',
image_base64 = 'image-base64',
image_bmp = 'image-bmp',
image_gif = 'image-gif',
image_ico = 'image-ico',
image_jpg = 'image-jpg',
image_png = 'image-png',
image_svg = 'image-svg',
image_webp = 'image-webp',
unsupported = 'unsupported',
}
export function EmailFeatureSupportResultFromJSON(
json: any
): EmailFeatureSupportResult {
return EmailFeatureSupportResultFromJSONTyped(json, false);
}
export function EmailFeatureSupportResultFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): EmailFeatureSupportResult {
if (json === undefined || json === null) {
return json;
}
return {
names: EmailFeatureNamesFromJSON(json['names']),
detectedFeatures: json['detectedFeatures'],
featureOverviews: (json['featureOverviews'] as Array<any>).map(
EmailFeatureOverviewFromJSON
),
featurePercentages: (json['featurePercentages'] as Array<any>).map(
EmailFeatureSupportStatusPercentageFromJSON
),
};
}
export function EmailFeatureSupportResultToJSON(
value?: EmailFeatureSupportResult | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
names: EmailFeatureNamesToJSON(value.names),
detectedFeatures: value.detectedFeatures,
featureOverviews: (value.featureOverviews as Array<any>).map(
EmailFeatureOverviewToJSON
),
featurePercentages: (value.featurePercentages as Array<any>).map(
EmailFeatureSupportStatusPercentageToJSON
),
};
}
/* 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';
/**
*
* @export
* @interface EmailFeatureSupportFlags
*/
export interface EmailFeatureSupportFlags {
/**
*
* @type {string}
* @memberof EmailFeatureSupportFlags
*/
status: EmailFeatureSupportFlagsStatusEnum;
/**
*
* @type {Set<string>}
* @memberof EmailFeatureSupportFlags
*/
notes?: Set<string>;
}
/**
* @export
* @enum {string}
*/
export enum EmailFeatureSupportFlagsStatusEnum {
SUPPORTED = 'SUPPORTED',
PARTIAL = 'PARTIAL',
NOT_SUPPORTED = 'NOT_SUPPORTED',
UNKNOWN = 'UNKNOWN',
}
export function EmailFeatureSupportFlagsFromJSON(
json: any
): EmailFeatureSupportFlags {
return EmailFeatureSupportFlagsFromJSONTyped(json, false);
}
export function EmailFeatureSupportFlagsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): EmailFeatureSupportFlags {
if (json === undefined || json === null) {
return json;
}
return {
status: json['status'],
notes: !exists(json, 'notes') ? undefined : json['notes'],
};
}
export function EmailFeatureSupportFlagsToJSON(
value?: EmailFeatureSupportFlags | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
status: value.status,
notes: value.notes,
};
}
/* 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';
import {
EmailFeatureVersionStatistics,
EmailFeatureVersionStatisticsFromJSON,
EmailFeatureVersionStatisticsFromJSONTyped,
EmailFeatureVersionStatisticsToJSON,
} from './';
/**
*
* @export
* @interface EmailFeaturePlatformStatistics
*/
export interface EmailFeaturePlatformStatistics {
/**
*
* @type {string}
* @memberof EmailFeaturePlatformStatistics
*/
platform: EmailFeaturePlatformStatisticsPlatformEnum;
/**
*
* @type {Array<EmailFeatureVersionStatistics>}
* @memberof EmailFeaturePlatformStatistics
*/
versions: Array<EmailFeatureVersionStatistics>;
}
/**
* @export
* @enum {string}
*/
export enum EmailFeaturePlatformStatisticsPlatformEnum {
android = 'android',
desktop_app = 'desktop-app',
desktop_webmail = 'desktop-webmail',
ios = 'ios',
macos = 'macos',
mobile_webmail = 'mobile-webmail',
outlook_com = 'outlook-com',
webmail = 'webmail',
windows = 'windows',
windows_mail = 'windows-mail',
}
export function EmailFeaturePlatformStatisticsFromJSON(
json: any
): EmailFeaturePlatformStatistics {
return EmailFeaturePlatformStatisticsFromJSONTyped(json, false);
}
export function EmailFeaturePlatformStatisticsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): EmailFeaturePlatformStatistics {
if (json === undefined || json === null) {
return json;
}
return {
platform: json['platform'],
versions: (json['versions'] as Array<any>).map(
EmailFeatureVersionStatisticsFromJSON
),
};
}
export function EmailFeaturePlatformStatisticsToJSON(
value?: EmailFeaturePlatformStatistics | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
platform: value.platform,
versions: (value.versions as Array<any>).map(
EmailFeatureVersionStatisticsToJSON
),
};
}
/* 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';
/**
*
* @export
* @interface EmailFeaturePlatformName
*/
export interface EmailFeaturePlatformName {
/**
*
* @type {string}
* @memberof EmailFeaturePlatformName
*/
slug: EmailFeaturePlatformNameSlugEnum;
/**
*
* @type {string}
* @memberof EmailFeaturePlatformName
*/
name: string;
}
/**
* @export
* @enum {string}
*/
export enum EmailFeaturePlatformNameSlugEnum {
android = 'android',
desktop_app = 'desktop-app',
desktop_webmail = 'desktop-webmail',
ios = 'ios',
macos = 'macos',
mobile_webmail = 'mobile-webmail',
outlook_com = 'outlook-com',
webmail = 'webmail',
windows = 'windows',
windows_mail = 'windows-mail',
}
export function EmailFeaturePlatformNameFromJSON(
json: any
): EmailFeaturePlatformName {
return EmailFeaturePlatformNameFromJSONTyped(json, false);
}
export function EmailFeaturePlatformNameFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): EmailFeaturePlatformName {
if (json === undefined || json === null) {
return json;
}
return {
slug: json['slug'],
name: json['name'],
};
}
export function EmailFeaturePlatformNameToJSON(
value?: EmailFeaturePlatformName | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
slug: value.slug,
name: value.name,
};
}
/* 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';
import {
EmailFeatureFamilyStatistics,
EmailFeatureFamilyStatisticsFromJSON,
EmailFeatureFamilyStatisticsFromJSONTyped,
EmailFeatureFamilyStatisticsToJSON,
} from './';
/**
*
* @export
* @interface EmailFeatureOverview
*/
export interface EmailFeatureOverview {
/**
*
* @type {string}
* @memberof EmailFeatureOverview
*/
feature: EmailFeatureOverviewFeatureEnum;
/**
*
* @type {string}
* @memberof EmailFeatureOverview
*/
title?: string;
/**
*
* @type {string}
* @memberof EmailFeatureOverview
*/
description?: string;
/**
*
* @type {string}
* @memberof EmailFeatureOverview
*/
category?: EmailFeatureOverviewCategoryEnum;
/**
*
* @type {string}
* @memberof EmailFeatureOverview
*/
notes?: string;
/**
*
* @type {{ [key: string]: string; }}
* @memberof EmailFeatureOverview
*/
notesNumbers?: { [key: string]: string };
/**
*
* @type {Array<EmailFeatureFamilyStatistics>}
* @memberof EmailFeatureOverview
*/
featureStatistics?: Array<EmailFeatureFamilyStatistics>;
/**
*
* @type {Set<string>}
* @memberof EmailFeatureOverview
*/
statuses: Set<EmailFeatureOverviewStatusesEnum>;
}
/**
* @export
* @enum {string}
*/
export enum EmailFeatureOverviewFeatureEnum {
amp = 'amp',
css_accent_color = 'css-accent-color',
css_align_items = 'css-align-items',
css_animation = 'css-animation',
css_aspect_ratio = 'css-aspect-ratio',
css_at_font_face = 'css-at-font-face',
css_at_import = 'css-at-import',
css_at_keyframes = 'css-at-keyframes',
css_at_media = 'css-at-media',
css_at_supports = 'css-at-supports',
css_background_blend_mode = 'css-background-blend-mode',
css_background_clip = 'css-background-clip',
css_background_color = 'css-background-color',
css_background_image = 'css-background-image',
css_background_origin = 'css-background-origin',
css_background_position = 'css-background-position',
css_background_repeat = 'css-background-repeat',
css_background_size = 'css-background-size',
css_background = 'css-background',
css_block_inline_size = 'css-block-inline-size',
css_border_image = 'css-border-image',
css_border_inline_block_individual = 'css-border-inline-block-individual',
css_border_inline_block_longhand = 'css-border-inline-block-longhand',
css_border_inline_block = 'css-border-inline-block',
css_border_radius_logical = 'css-border-radius-logical',
css_border_radius = 'css-border-radius',
css_border = 'css-border',
css_box_shadow = 'css-box-shadow',
css_box_sizing = 'css-box-sizing',
css_caption_side = 'css-caption-side',
css_clip_path = 'css-clip-path',
css_column_count = 'css-column-count',
css_column_layout_properties = 'css-column-layout-properties',
css_direction = 'css-direction',
css_display_flex = 'css-display-flex',
css_display_grid = 'css-display-grid',
css_display_none = 'css-display-none',
css_display = 'css-display',
css_filter = 'css-filter',
css_flex_direction = 'css-flex-direction',
css_flex_wrap = 'css-flex-wrap',
css_float = 'css-float',
css_font_kerning = 'css-font-kerning',
css_font_weight = 'css-font-weight',
css_font = 'css-font',
css_gap = 'css-gap',
css_grid_template = 'css-grid-template',
css_height = 'css-height',
css_hyphens = 'css-hyphens',
css_inline_size = 'css-inline-size',
css_justify_content = 'css-justify-content',
css_left_right_top_bottom = 'css-left-right-top-bottom',
css_letter_spacing = 'css-letter-spacing',
css_line_height = 'css-line-height',
css_list_style_image = 'css-list-style-image',
css_list_style_position = 'css-list-style-position',
css_list_style_type = 'css-list-style-type',
css_list_style = 'css-list-style',
css_margin_block_start_end = 'css-margin-block-start-end',
css_margin_inline_block = 'css-margin-inline-block',
css_margin_inline_start_end = 'css-margin-inline-start-end',
css_margin_inline = 'css-margin-inline',
css_margin = 'css-margin',
css_max_block_size = 'css-max-block-size',
css_max_height = 'css-max-height',
css_max_width = 'css-max-width',
css_min_height = 'css-min-height',
css_min_inline_size = 'css-min-inline-size',
css_min_width = 'css-min-width',
css_mix_blend_mode = 'css-mix-blend-mode',
css_object_fit = 'css-object-fit',
css_object_position = 'css-object-position',
css_opacity = 'css-opacity',
css_outline_offset = 'css-outline-offset',
css_outline = 'css-outline',
css_overflow_wrap = 'css-overflow-wrap',
css_overflow = 'css-overflow',
css_padding_block_start_end = 'css-padding-block-start-end',
css_padding_inline_block = 'css-padding-inline-block',
css_padding_inline_start_end = 'css-padding-inline-start-end',
css_padding = 'css-padding',
css_position = 'css-position',
css_tab_size = 'css-tab-size',
css_table_layout = 'css-table-layout',
css_text_align_last = 'css-text-align-last',
css_text_align = 'css-text-align',
css_text_decoration_color = 'css-text-decoration-color',
css_text_decoration_thickness = 'css-text-decoration-thickness',
css_text_decoration = 'css-text-decoration',
css_text_emphasis_position = 'css-text-emphasis-position',
css_text_emphasis = 'css-text-emphasis',
css_text_indent = 'css-text-indent',
css_text_overflow = 'css-text-overflow',
css_text_shadow = 'css-text-shadow',
css_text_transform = 'css-text-transform',
css_text_underline_offset = 'css-text-underline-offset',
css_transform = 'css-transform',
css_vertical_align = 'css-vertical-align',
css_visibility = 'css-visibility',
css_white_space = 'css-white-space',
css_width = 'css-width',
css_word_break = 'css-word-break',
css_writing_mode = 'css-writing-mode',
css_z_index = 'css-z-index',
html_abbr = 'html-abbr',
html_address = 'html-address',
html_align = 'html-align',
html_anchor_links = 'html-anchor-links',
html_aria_describedby = 'html-aria-describedby',
html_aria_hidden = 'html-aria-hidden',
html_aria_label = 'html-aria-label',
html_aria_labelledby = 'html-aria-labelledby',
html_aria_live = 'html-aria-live',
html_audio = 'html-audio',
html_background = 'html-background',
html_base = 'html-base',
html_blockquote = 'html-blockquote',
html_body = 'html-body',
html_button_reset = 'html-button-reset',
html_button_submit = 'html-button-submit',
html_code = 'html-code',
html_del = 'html-del',
html_dfn = 'html-dfn',
html_dialog = 'html-dialog',
html_dir = 'html-dir',
html_div = 'html-div',
html_doctype = 'html-doctype',
html_form = 'html-form',
html_h1_h6 = 'html-h1-h6',
html_height = 'html-height',
html_image_maps = 'html-image-maps',
html_input_checkbox = 'html-input-checkbox',
html_input_hidden = 'html-input-hidden',
html_input_radio = 'html-input-radio',
html_input_reset = 'html-input-reset',
html_input_submit = 'html-input-submit',
html_input_text = 'html-input-text',
html_lang = 'html-lang',
html_link = 'html-link',
html_lists = 'html-lists',
html_loading_attribute = 'html-loading-attribute',
html_mailto_links = 'html-mailto-links',
html_marquee = 'html-marquee',
html_meter = 'html-meter',
html_object = 'html-object',
html_p = 'html-p',
html_picture = 'html-picture',
html_pre = 'html-pre',
html_progress = 'html-progress',
html_required = 'html-required',
html_role = 'html-role',
html_rp = 'html-rp',
html_rt = 'html-rt',
html_ruby = 'html-ruby',
html_select = 'html-select',
html_semantics = 'html-semantics',
html_small = 'html-small',
html_span = 'html-span',
html_srcset = 'html-srcset',
html_strike = 'html-strike',
html_strong = 'html-strong',
html_style = 'html-style',
html_svg = 'html-svg',
html_table = 'html-table',
html_target = 'html-target',
html_textarea = 'html-textarea',
html_valign = 'html-valign',
html_video = 'html-video',
html_wbr = 'html-wbr',
html_width = 'html-width',
image_avif = 'image-avif',
image_base64 = 'image-base64',
image_bmp = 'image-bmp',
image_gif = 'image-gif',
image_ico = 'image-ico',
image_jpg = 'image-jpg',
image_png = 'image-png',
image_svg = 'image-svg',
image_webp = 'image-webp',
unsupported = 'unsupported',
}
/**
* @export
* @enum {string}
*/
export enum EmailFeatureOverviewCategoryEnum {
css = 'css',
html = 'html',
image = 'image',
others = 'others',
}
/**
* @export
* @enum {string}
*/
export enum EmailFeatureOverviewStatusesEnum {
SUPPORTED = 'SUPPORTED',
PARTIAL = 'PARTIAL',
NOT_SUPPORTED = 'NOT_SUPPORTED',
UNKNOWN = 'UNKNOWN',
}
export function EmailFeatureOverviewFromJSON(json: any): EmailFeatureOverview {
return EmailFeatureOverviewFromJSONTyped(json, false);
}
export function EmailFeatureOverviewFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): EmailFeatureOverview {
if (json === undefined || json === null) {
return json;
}
return {
feature: json['feature'],
title: !exists(json, 'title') ? undefined : json['title'],
description: !exists(json, 'description') ? undefined : json['description'],
category: !exists(json, 'category') ? undefined : json['category'],
notes: !exists(json, 'notes') ? undefined : json['notes'],
notesNumbers: !exists(json, 'notesNumbers')
? undefined
: json['notesNumbers'],
featureStatistics: !exists(json, 'featureStatistics')
? undefined
: (json['featureStatistics'] as Array<any>).map(
EmailFeatureFamilyStatisticsFromJSON
),
statuses: json['statuses'],
};
}
export function EmailFeatureOverviewToJSON(
value?: EmailFeatureOverview | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
feature: value.feature,
title: value.title,
description: value.description,
category: value.category,
notes: value.notes,
notesNumbers: value.notesNumbers,
featureStatistics:
value.featureStatistics === undefined
? undefined
: (value.featureStatistics as Array<any>).map(
EmailFeatureFamilyStatisticsToJSON
),
statuses: value.statuses,
};
}
/* 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';
import {
EmailFeatureCategoryName,
EmailFeatureCategoryNameFromJSON,
EmailFeatureCategoryNameFromJSONTyped,
EmailFeatureCategoryNameToJSON,
EmailFeatureFamilyName,
EmailFeatureFamilyNameFromJSON,
EmailFeatureFamilyNameFromJSONTyped,
EmailFeatureFamilyNameToJSON,
EmailFeaturePlatformName,
EmailFeaturePlatformNameFromJSON,
EmailFeaturePlatformNameFromJSONTyped,
EmailFeaturePlatformNameToJSON,
} from './';
/**
*
* @export
* @interface EmailFeatureNames
*/
export interface EmailFeatureNames {
/**
*
* @type {Array<EmailFeatureFamilyName>}
* @memberof EmailFeatureNames
*/
family: Array<EmailFeatureFamilyName>;
/**
*
* @type {Array<EmailFeaturePlatformName>}
* @memberof EmailFeatureNames
*/
platform: Array<EmailFeaturePlatformName>;
/**
*
* @type {Array<EmailFeatureCategoryName>}
* @memberof EmailFeatureNames
*/
category: Array<EmailFeatureCategoryName>;
}
export function EmailFeatureNamesFromJSON(json: any): EmailFeatureNames {
return EmailFeatureNamesFromJSONTyped(json, false);
}
export function EmailFeatureNamesFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): EmailFeatureNames {
if (json === undefined || json === null) {
return json;
}
return {
family: (json['family'] as Array<any>).map(EmailFeatureFamilyNameFromJSON),
platform: (json['platform'] as Array<any>).map(
EmailFeaturePlatformNameFromJSON
),
category: (json['category'] as Array<any>).map(
EmailFeatureCategoryNameFromJSON
),
};
}
export function EmailFeatureNamesToJSON(value?: EmailFeatureNames | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
family: (value.family as Array<any>).map(EmailFeatureFamilyNameToJSON),
platform: (value.platform as Array<any>).map(
EmailFeaturePlatformNameToJSON
),
category: (value.category as Array<any>).map(
EmailFeatureCategoryNameToJSON
),
};
}
/* 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';
import {
EmailFeaturePlatformStatistics,
EmailFeaturePlatformStatisticsFromJSON,
EmailFeaturePlatformStatisticsFromJSONTyped,
EmailFeaturePlatformStatisticsToJSON,
} from './';
/**
*
* @export
* @interface EmailFeatureFamilyStatistics
*/
export interface EmailFeatureFamilyStatistics {
/**
*
* @type {string}
* @memberof EmailFeatureFamilyStatistics
*/
feature: EmailFeatureFamilyStatisticsFeatureEnum;
/**
*
* @type {string}
* @memberof EmailFeatureFamilyStatistics
*/
family: EmailFeatureFamilyStatisticsFamilyEnum;
/**
*
* @type {Array<EmailFeaturePlatformStatistics>}
* @memberof EmailFeatureFamilyStatistics
*/
platforms: Array<EmailFeaturePlatformStatistics>;
}
/**
* @export
* @enum {string}
*/
export enum EmailFeatureFamilyStatisticsFeatureEnum {
amp = 'amp',
css_accent_color = 'css-accent-color',
css_align_items = 'css-align-items',
css_animation = 'css-animation',
css_aspect_ratio = 'css-aspect-ratio',
css_at_font_face = 'css-at-font-face',
css_at_import = 'css-at-import',
css_at_keyframes = 'css-at-keyframes',
css_at_media = 'css-at-media',
css_at_supports = 'css-at-supports',
css_background_blend_mode = 'css-background-blend-mode',
css_background_clip = 'css-background-clip',
css_background_color = 'css-background-color',
css_background_image = 'css-background-image',
css_background_origin = 'css-background-origin',
css_background_position = 'css-background-position',
css_background_repeat = 'css-background-repeat',
css_background_size = 'css-background-size',
css_background = 'css-background',
css_block_inline_size = 'css-block-inline-size',
css_border_image = 'css-border-image',
css_border_inline_block_individual = 'css-border-inline-block-individual',
css_border_inline_block_longhand = 'css-border-inline-block-longhand',
css_border_inline_block = 'css-border-inline-block',
css_border_radius_logical = 'css-border-radius-logical',
css_border_radius = 'css-border-radius',
css_border = 'css-border',
css_box_shadow = 'css-box-shadow',
css_box_sizing = 'css-box-sizing',
css_caption_side = 'css-caption-side',
css_clip_path = 'css-clip-path',
css_column_count = 'css-column-count',
css_column_layout_properties = 'css-column-layout-properties',
css_direction = 'css-direction',
css_display_flex = 'css-display-flex',
css_display_grid = 'css-display-grid',
css_display_none = 'css-display-none',
css_display = 'css-display',
css_filter = 'css-filter',
css_flex_direction = 'css-flex-direction',
css_flex_wrap = 'css-flex-wrap',
css_float = 'css-float',
css_font_kerning = 'css-font-kerning',
css_font_weight = 'css-font-weight',
css_font = 'css-font',
css_gap = 'css-gap',
css_grid_template = 'css-grid-template',
css_height = 'css-height',
css_hyphens = 'css-hyphens',
css_inline_size = 'css-inline-size',
css_justify_content = 'css-justify-content',
css_left_right_top_bottom = 'css-left-right-top-bottom',
css_letter_spacing = 'css-letter-spacing',
css_line_height = 'css-line-height',
css_list_style_image = 'css-list-style-image',
css_list_style_position = 'css-list-style-position',
css_list_style_type = 'css-list-style-type',
css_list_style = 'css-list-style',
css_margin_block_start_end = 'css-margin-block-start-end',
css_margin_inline_block = 'css-margin-inline-block',
css_margin_inline_start_end = 'css-margin-inline-start-end',
css_margin_inline = 'css-margin-inline',
css_margin = 'css-margin',
css_max_block_size = 'css-max-block-size',
css_max_height = 'css-max-height',
css_max_width = 'css-max-width',
css_min_height = 'css-min-height',
css_min_inline_size = 'css-min-inline-size',
css_min_width = 'css-min-width',
css_mix_blend_mode = 'css-mix-blend-mode',
css_object_fit = 'css-object-fit',
css_object_position = 'css-object-position',
css_opacity = 'css-opacity',
css_outline_offset = 'css-outline-offset',
css_outline = 'css-outline',
css_overflow_wrap = 'css-overflow-wrap',
css_overflow = 'css-overflow',
css_padding_block_start_end = 'css-padding-block-start-end',
css_padding_inline_block = 'css-padding-inline-block',
css_padding_inline_start_end = 'css-padding-inline-start-end',
css_padding = 'css-padding',
css_position = 'css-position',
css_tab_size = 'css-tab-size',
css_table_layout = 'css-table-layout',
css_text_align_last = 'css-text-align-last',
css_text_align = 'css-text-align',
css_text_decoration_color = 'css-text-decoration-color',
css_text_decoration_thickness = 'css-text-decoration-thickness',
css_text_decoration = 'css-text-decoration',
css_text_emphasis_position = 'css-text-emphasis-position',
css_text_emphasis = 'css-text-emphasis',
css_text_indent = 'css-text-indent',
css_text_overflow = 'css-text-overflow',
css_text_shadow = 'css-text-shadow',
css_text_transform = 'css-text-transform',
css_text_underline_offset = 'css-text-underline-offset',
css_transform = 'css-transform',
css_vertical_align = 'css-vertical-align',
css_visibility = 'css-visibility',
css_white_space = 'css-white-space',
css_width = 'css-width',
css_word_break = 'css-word-break',
css_writing_mode = 'css-writing-mode',
css_z_index = 'css-z-index',
html_abbr = 'html-abbr',
html_address = 'html-address',
html_align = 'html-align',
html_anchor_links = 'html-anchor-links',
html_aria_describedby = 'html-aria-describedby',
html_aria_hidden = 'html-aria-hidden',
html_aria_label = 'html-aria-label',
html_aria_labelledby = 'html-aria-labelledby',
html_aria_live = 'html-aria-live',
html_audio = 'html-audio',
html_background = 'html-background',
html_base = 'html-base',
html_blockquote = 'html-blockquote',
html_body = 'html-body',
html_button_reset = 'html-button-reset',
html_button_submit = 'html-button-submit',
html_code = 'html-code',
html_del = 'html-del',
html_dfn = 'html-dfn',
html_dialog = 'html-dialog',
html_dir = 'html-dir',
html_div = 'html-div',
html_doctype = 'html-doctype',
html_form = 'html-form',
html_h1_h6 = 'html-h1-h6',
html_height = 'html-height',
html_image_maps = 'html-image-maps',
html_input_checkbox = 'html-input-checkbox',
html_input_hidden = 'html-input-hidden',
html_input_radio = 'html-input-radio',
html_input_reset = 'html-input-reset',
html_input_submit = 'html-input-submit',
html_input_text = 'html-input-text',
html_lang = 'html-lang',
html_link = 'html-link',
html_lists = 'html-lists',
html_loading_attribute = 'html-loading-attribute',
html_mailto_links = 'html-mailto-links',
html_marquee = 'html-marquee',
html_meter = 'html-meter',
html_object = 'html-object',
html_p = 'html-p',
html_picture = 'html-picture',
html_pre = 'html-pre',
html_progress = 'html-progress',
html_required = 'html-required',
html_role = 'html-role',
html_rp = 'html-rp',
html_rt = 'html-rt',
html_ruby = 'html-ruby',
html_select = 'html-select',
html_semantics = 'html-semantics',
html_small = 'html-small',
html_span = 'html-span',
html_srcset = 'html-srcset',
html_strike = 'html-strike',
html_strong = 'html-strong',
html_style = 'html-style',
html_svg = 'html-svg',
html_table = 'html-table',
html_target = 'html-target',
html_textarea = 'html-textarea',
html_valign = 'html-valign',
html_video = 'html-video',
html_wbr = 'html-wbr',
html_width = 'html-width',
image_avif = 'image-avif',
image_base64 = 'image-base64',
image_bmp = 'image-bmp',
image_gif = 'image-gif',
image_ico = 'image-ico',
image_jpg = 'image-jpg',
image_png = 'image-png',
image_svg = 'image-svg',
image_webp = 'image-webp',
unsupported = 'unsupported',
}
/**
* @export
* @enum {string}
*/
export enum EmailFeatureFamilyStatisticsFamilyEnum {
aol = 'aol',
apple_mail = 'apple-mail',
fastmail = 'fastmail',
free_fr = 'free-fr',
gmail = 'gmail',
gmx = 'gmx',
hey = 'hey',
ionos_1and1 = 'ionos-1and1',
laposte = 'laposte',
mail_ru = 'mail-ru',
microsoft = 'microsoft',
orange = 'orange',
outlook = 'outlook',
protonmail = 'protonmail',
rainloop = 'rainloop',
samsung_email = 'samsung-email',
sfr = 'sfr',
t_online_de = 't-online-de',
thunderbird = 'thunderbird',
web_de = 'web-de',
yahoo = 'yahoo',
}
export function EmailFeatureFamilyStatisticsFromJSON(
json: any
): EmailFeatureFamilyStatistics {
return EmailFeatureFamilyStatisticsFromJSONTyped(json, false);
}
export function EmailFeatureFamilyStatisticsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): EmailFeatureFamilyStatistics {
if (json === undefined || json === null) {
return json;
}
return {
feature: json['feature'],
family: json['family'],
platforms: (json['platforms'] as Array<any>).map(
EmailFeaturePlatformStatisticsFromJSON
),
};
}
export function EmailFeatureFamilyStatisticsToJSON(
value?: EmailFeatureFamilyStatistics | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
feature: value.feature,
family: value.family,
platforms: (value.platforms as Array<any>).map(
EmailFeaturePlatformStatisticsToJSON
),
};
}
/* 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';
/**
*
* @export
* @interface EmailFeatureFamilyName
*/
export interface EmailFeatureFamilyName {
/**
*
* @type {string}
* @memberof EmailFeatureFamilyName
*/
slug: EmailFeatureFamilyNameSlugEnum;
/**
*
* @type {string}
* @memberof EmailFeatureFamilyName
*/
name: string;
}
/**
* @export
* @enum {string}
*/
export enum EmailFeatureFamilyNameSlugEnum {
aol = 'aol',
apple_mail = 'apple-mail',
fastmail = 'fastmail',
free_fr = 'free-fr',
gmail = 'gmail',
gmx = 'gmx',
hey = 'hey',
ionos_1and1 = 'ionos-1and1',
laposte = 'laposte',
mail_ru = 'mail-ru',
microsoft = 'microsoft',
orange = 'orange',
outlook = 'outlook',
protonmail = 'protonmail',
rainloop = 'rainloop',
samsung_email = 'samsung-email',
sfr = 'sfr',
t_online_de = 't-online-de',
thunderbird = 'thunderbird',
web_de = 'web-de',
yahoo = 'yahoo',
}
export function EmailFeatureFamilyNameFromJSON(
json: any
): EmailFeatureFamilyName {
return EmailFeatureFamilyNameFromJSONTyped(json, false);
}
export function EmailFeatureFamilyNameFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): EmailFeatureFamilyName {
if (json === undefined || json === null) {
return json;
}
return {
slug: json['slug'],
name: json['name'],
};
}
export function EmailFeatureFamilyNameToJSON(
value?: EmailFeatureFamilyName | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
slug: value.slug,
name: value.name,
};
}
/* 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';
/**
*
* @export
* @interface EmailFeatureCategoryName
*/
export interface EmailFeatureCategoryName {
/**
*
* @type {string}
* @memberof EmailFeatureCategoryName
*/
slug: EmailFeatureCategoryNameSlugEnum;
/**
*
* @type {string}
* @memberof EmailFeatureCategoryName
*/
name: string;
}
/**
* @export
* @enum {string}
*/
export enum EmailFeatureCategoryNameSlugEnum {
css = 'css',
html = 'html',
image = 'image',
others = 'others',
}
export function EmailFeatureCategoryNameFromJSON(
json: any
): EmailFeatureCategoryName {
return EmailFeatureCategoryNameFromJSONTyped(json, false);
}
export function EmailFeatureCategoryNameFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): EmailFeatureCategoryName {
if (json === undefined || json === null) {
return json;
}
return {
slug: json['slug'],
name: json['name'],
};
}
export function EmailFeatureCategoryNameToJSON(
value?: EmailFeatureCategoryName | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
slug: value.slug,
name: value.name,
};
}
/* 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';
/**
*
* @export
* @interface EmailContentPartResult
*/
export interface EmailContentPartResult {
/**
*
* @type {string}
* @memberof EmailContentPartResult
*/
content?: string | null;
}
export function EmailContentPartResultFromJSON(
json: any
): EmailContentPartResult {
return EmailContentPartResultFromJSONTyped(json, false);
}
export function EmailContentPartResultFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): EmailContentPartResult {
if (json === undefined || json === null) {
return json;
}
return {
content: !exists(json, 'content') ? undefined : json['content'],
};
}
export function EmailContentPartResultToJSON(
value?: EmailContentPartResult | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
content: value.content,
};
}
/* 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';
/**
* Matches for the given pattern
* @export
* @interface EmailContentMatchResult
*/
export interface EmailContentMatchResult {
/**
*
* @type {string}
* @memberof EmailContentMatchResult
*/
pattern: string;
/**
*
* @type {Array<string>}
* @memberof EmailContentMatchResult
*/
matches: Array<string>;
}
export function EmailContentMatchResultFromJSON(
json: any
): EmailContentMatchResult {
return EmailContentMatchResultFromJSONTyped(json, false);
}
export function EmailContentMatchResultFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): EmailContentMatchResult {
if (json === undefined || json === null) {
return json;
}
return {
pattern: json['pattern'],
matches: json['matches'],
};
}
export function EmailContentMatchResultToJSON(
value?: EmailContentMatchResult | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
pattern: value.pattern,
matches: value.matches,
};
}
/* 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';
/**
* Analysis result for email. Each verdict property is a string PASS|FAIL|GRAY or dynamic error message
* @export
* @interface EmailAnalysis
*/
export interface EmailAnalysis {
/**
* Verdict of spam ranking analysis
* @type {string}
* @memberof EmailAnalysis
*/
spamVerdict?: string | null;
/**
* Verdict of virus scan analysis
* @type {string}
* @memberof EmailAnalysis
*/
virusVerdict?: string | null;
/**
* Verdict of Send Policy Framework record spoofing analysis
* @type {string}
* @memberof EmailAnalysis
*/
spfVerdict?: string | null;
/**
* Verdict of DomainKeys Identified Mail analysis
* @type {string}
* @memberof EmailAnalysis
*/
dkimVerdict?: string | null;
/**
* Verdict of Domain-based Message Authentication Reporting and Conformance analysis
* @type {string}
* @memberof EmailAnalysis
*/
dmarcVerdict?: string | null;
}
export function EmailAnalysisFromJSON(json: any): EmailAnalysis {
return EmailAnalysisFromJSONTyped(json, false);
}
export function EmailAnalysisFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): EmailAnalysis {
if (json === undefined || json === null) {
return json;
}
return {
spamVerdict: !exists(json, 'spamVerdict') ? undefined : json['spamVerdict'],
virusVerdict: !exists(json, 'virusVerdict')
? undefined
: json['virusVerdict'],
spfVerdict: !exists(json, 'spfVerdict') ? undefined : json['spfVerdict'],
dkimVerdict: !exists(json, 'dkimVerdict') ? undefined : json['dkimVerdict'],
dmarcVerdict: !exists(json, 'dmarcVerdict')
? undefined
: json['dmarcVerdict'],
};
}
export function EmailAnalysisToJSON(value?: EmailAnalysis | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
spamVerdict: value.spamVerdict,
virusVerdict: value.virusVerdict,
spfVerdict: value.spfVerdict,
dkimVerdict: value.dkimVerdict,
dmarcVerdict: value.dmarcVerdict,
};
}
/* 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';
import {
EmailAnalysis,
EmailAnalysisFromJSON,
EmailAnalysisFromJSONTyped,
EmailAnalysisToJSON,
EmailRecipients,
EmailRecipientsFromJSON,
EmailRecipientsFromJSONTyped,
EmailRecipientsToJSON,
Sender,
SenderFromJSON,
SenderFromJSONTyped,
SenderToJSON,
} from './';
/**
* Email entity (also known as EmailDto). When an SMTP email message is received by MailSlurp it is parsed. The body and attachments are written to disk and the fields such as to, from, subject etc are stored in a database. The `body` contains the email content. If you want the original SMTP message see the `getRawEmail` endpoints. The attachments can be fetched using the AttachmentController
* @export
* @interface Email
*/
export interface Email {
/**
* ID of the email entity
* @type {string}
* @memberof Email
*/
id: string;
/**
* ID of user that email belongs to
* @type {string}
* @memberof Email
*/
userId: string;
/**
* ID of the inbox that received the email
* @type {string}
* @memberof Email
*/
inboxId: string;
/**
* ID of the domain that received the email
* @type {string}
* @memberof Email
*/
domainId?: string | null;
/**
* List of `To` recipient email addresses that the email was addressed to. See recipients object for names.
* @type {Array<string>}
* @memberof Email
*/
to: Array<string>;
/**
* Who the email was sent from. An email address - see fromName for the sender name.
* @type {string}
* @memberof Email
*/
from?: string | null;
/**
*
* @type {Sender}
* @memberof Email
*/
sender?: Sender | null;
/**
*
* @type {EmailRecipients}
* @memberof Email
*/
recipients?: EmailRecipients | null;
/**
* The `replyTo` field on the received email message
* @type {string}
* @memberof Email
*/
replyTo?: string | null;
/**
* List of `CC` recipients email addresses that the email was addressed to. See recipients object for names.
* @type {Array<string>}
* @memberof Email
*/
cc?: Array<string> | null;
/**
* List of `BCC` recipients email addresses that the email was addressed to. See recipients object for names.
* @type {Array<string>}
* @memberof Email
*/
bcc?: Array<string> | null;
/**
* Collection of SMTP headers attached to email
* @type {{ [key: string]: string; }}
* @memberof Email
*/
headers?: { [key: string]: string } | null;
/**
* Multi-value map of SMTP headers attached to email
* @type {{ [key: string]: Array<string>; }}
* @memberof Email
*/
headersMap?: { [key: string]: Array<string> } | null;
/**
* List of IDs of attachments found in the email. Use these IDs with the Inbox and Email Controllers to download attachments and attachment meta data such as filesize, name, extension.
* @type {Array<string>}
* @memberof Email
*/
attachments?: Array<string> | null;
/**
* The subject line of the email message as specified by SMTP subject header
* @type {string}
* @memberof Email
*/
subject?: string | null;
/**
* The body of the email message as text parsed from the SMTP message body (does not include attachments). Fetch the raw content to access the SMTP message and use the attachments property to access attachments. The body is stored separately to the email entity so the body is not returned in paginated results only in full single email or wait requests.
* @type {string}
* @memberof Email
*/
body?: string | null;
/**
* An excerpt of the body of the email message for quick preview. Takes HTML content part if exists falls back to TEXT content part if not
* @type {string}
* @memberof Email
*/
bodyExcerpt?: string | null;
/**
* An excerpt of the body of the email message for quick preview. Takes TEXT content part if exists
* @type {string}
* @memberof Email
*/
textExcerpt?: string | null;
/**
* A hash signature of the email message using MD5. Useful for comparing emails without fetching full body.
* @type {string}
* @memberof Email
*/
bodyMD5Hash?: string | null;
/**
* Is the email body content type HTML?
* @type {boolean}
* @memberof Email
*/
isHTML?: boolean | null;
/**
* Detected character set of the email body such as UTF-8
* @type {string}
* @memberof Email
*/
charset?: string | null;
/**
*
* @type {EmailAnalysis}
* @memberof Email
*/
analysis?: EmailAnalysis | null;
/**
* When was the email received by MailSlurp
* @type {Date}
* @memberof Email
*/
createdAt: Date;
/**
* When was the email last updated
* @type {Date}
* @memberof Email
*/
updatedAt: Date;
/**
* Read flag. Has the email ever been viewed in the dashboard or fetched via the API with a hydrated body? If so the email is marked as read. Paginated results do not affect read status. Read status is different to email opened event as it depends on your own account accessing the email. Email opened is determined by tracking pixels sent to other uses if enable during sending. You can listened for both email read and email opened events using webhooks.
* @type {boolean}
* @memberof Email
*/
read: boolean;
/**
* Can the email be accessed by organization team members
* @type {boolean}
* @memberof Email
*/
teamAccess: boolean;
/**
* Is the email body content type x-amp-html Amp4Email?
* @type {boolean}
* @memberof Email
*/
isXAmpHtml?: boolean | null;
/**
* A list of detected multipart mime message body part content types such as text/plain and text/html. Can be used with email bodyPart endpoints to fetch individual body parts.
* @type {Array<string>}
* @memberof Email
*/
bodyPartContentTypes?: Array<string> | null;
/**
*
* @type {boolean}
* @memberof Email
*/
html?: boolean;
/**
*
* @type {boolean}
* @memberof Email
*/
xampHtml?: boolean;
}
export function EmailFromJSON(json: any): Email {
return EmailFromJSONTyped(json, false);
}
export function EmailFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): Email {
if (json === undefined || json === null) {
return json;
}
return {
id: json['id'],
userId: json['userId'],
inboxId: json['inboxId'],
domainId: !exists(json, 'domainId') ? undefined : json['domainId'],
to: json['to'],
from: !exists(json, 'from') ? undefined : json['from'],
sender: !exists(json, 'sender')
? undefined
: SenderFromJSON(json['sender']),
recipients: !exists(json, 'recipients')
? undefined
: EmailRecipientsFromJSON(json['recipients']),
replyTo: !exists(json, 'replyTo') ? undefined : json['replyTo'],
cc: !exists(json, 'cc') ? undefined : json['cc'],
bcc: !exists(json, 'bcc') ? undefined : json['bcc'],
headers: !exists(json, 'headers') ? undefined : json['headers'],
headersMap: !exists(json, 'headersMap') ? undefined : json['headersMap'],
attachments: !exists(json, 'attachments') ? undefined : json['attachments'],
subject: !exists(json, 'subject') ? undefined : json['subject'],
body: !exists(json, 'body') ? undefined : json['body'],
bodyExcerpt: !exists(json, 'bodyExcerpt') ? undefined : json['bodyExcerpt'],
textExcerpt: !exists(json, 'textExcerpt') ? undefined : json['textExcerpt'],
bodyMD5Hash: !exists(json, 'bodyMD5Hash') ? undefined : json['bodyMD5Hash'],
isHTML: !exists(json, 'isHTML') ? undefined : json['isHTML'],
charset: !exists(json, 'charset') ? undefined : json['charset'],
analysis: !exists(json, 'analysis')
? undefined
: EmailAnalysisFromJSON(json['analysis']),
createdAt: new Date(json['createdAt']),
updatedAt: new Date(json['updatedAt']),
read: json['read'],
teamAccess: json['teamAccess'],
isXAmpHtml: !exists(json, 'isXAmpHtml') ? undefined : json['isXAmpHtml'],
bodyPartContentTypes: !exists(json, 'bodyPartContentTypes')
? undefined
: json['bodyPartContentTypes'],
html: !exists(json, 'html') ? undefined : json['html'],
xampHtml: !exists(json, 'xampHtml') ? undefined : json['xampHtml'],
};
}
export function EmailToJSON(value?: Email | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
userId: value.userId,
inboxId: value.inboxId,
domainId: value.domainId,
to: value.to,
from: value.from,
sender: SenderToJSON(value.sender),
recipients: EmailRecipientsToJSON(value.recipients),
replyTo: value.replyTo,
cc: value.cc,
bcc: value.bcc,
headers: value.headers,
headersMap: value.headersMap,
attachments: value.attachments,
subject: value.subject,
body: value.body,
bodyExcerpt: value.bodyExcerpt,
textExcerpt: value.textExcerpt,
bodyMD5Hash: value.bodyMD5Hash,
isHTML: value.isHTML,
charset: value.charset,
analysis: EmailAnalysisToJSON(value.analysis),
createdAt: value.createdAt.toISOString(),
updatedAt: value.updatedAt.toISOString(),
read: value.read,
teamAccess: value.teamAccess,
isXAmpHtml: value.isXAmpHtml,
bodyPartContentTypes: value.bodyPartContentTypes,
html: value.html,
xampHtml: value.xampHtml,
};
}
/* 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';
/**
* Content of attachment
* @export
* @interface DownloadAttachmentDto
*/
export interface DownloadAttachmentDto {
/**
* Base64 encoded string of attachment bytes. Decode the base64 encoded string to get the raw contents. If the file has a content type such as `text/html` you can read the contents directly by converting it to string using `utf-8` encoding.
* @type {string}
* @memberof DownloadAttachmentDto
*/
base64FileContents: string;
/**
* Content type of attachment. Examples are `image/png`, `application/msword`, `text/csv` etc.
* @type {string}
* @memberof DownloadAttachmentDto
*/
contentType: string;
/**
* Size in bytes of attachment content
* @type {number}
* @memberof DownloadAttachmentDto
*/
sizeBytes: number;
}
export function DownloadAttachmentDtoFromJSON(
json: any
): DownloadAttachmentDto {
return DownloadAttachmentDtoFromJSONTyped(json, false);
}
export function DownloadAttachmentDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): DownloadAttachmentDto {
if (json === undefined || json === null) {
return json;
}
return {
base64FileContents: json['base64FileContents'],
contentType: json['contentType'],
sizeBytes: json['sizeBytes'],
};
}
export function DownloadAttachmentDtoToJSON(
value?: DownloadAttachmentDto | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
base64FileContents: value.base64FileContents,
contentType: value.contentType,
sizeBytes: value.sizeBytes,
};
}
/* 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';
/**
* Preview object for domain entity
* @export
* @interface DomainPreview
*/
export interface DomainPreview {
/**
*
* @type {string}
* @memberof DomainPreview
*/
id: string;
/**
*
* @type {string}
* @memberof DomainPreview
*/
domain: string;
/**
*
* @type {string}
* @memberof DomainPreview
*/
catchAllInboxId?: string | null;
/**
*
* @type {Date}
* @memberof DomainPreview
*/
createdAt: Date;
/**
* Type of domain. Dictates type of inbox that can be created with domain. HTTP means inboxes are processed using SES while SMTP inboxes use a custom SMTP mail server. SMTP does not support sending so use HTTP for sending emails.
* @type {string}
* @memberof DomainPreview
*/
domainType: DomainPreviewDomainTypeEnum;
/**
*
* @type {boolean}
* @memberof DomainPreview
*/
isVerified: boolean;
/**
*
* @type {boolean}
* @memberof DomainPreview
*/
hasMissingRecords: boolean;
}
/**
* @export
* @enum {string}
*/
export enum DomainPreviewDomainTypeEnum {
HTTP_INBOX = 'HTTP_INBOX',
SMTP_DOMAIN = 'SMTP_DOMAIN',
}
export function DomainPreviewFromJSON(json: any): DomainPreview {
return DomainPreviewFromJSONTyped(json, false);
}
export function DomainPreviewFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): DomainPreview {
if (json === undefined || json === null) {
return json;
}
return {
id: json['id'],
domain: json['domain'],
catchAllInboxId: !exists(json, 'catchAllInboxId')
? undefined
: json['catchAllInboxId'],
createdAt: new Date(json['createdAt']),
domainType: json['domainType'],
isVerified: json['isVerified'],
hasMissingRecords: json['hasMissingRecords'],
};
}
export function DomainPreviewToJSON(value?: DomainPreview | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
domain: value.domain,
catchAllInboxId: value.catchAllInboxId,
createdAt: value.createdAt.toISOString(),
domainType: value.domainType,
isVerified: value.isVerified,
hasMissingRecords: value.hasMissingRecords,
};
}
/* 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';
/**
* DNS Record required for verification of a domain. Record vary depending on domain type.
* @export
* @interface DomainNameRecord
*/
export interface DomainNameRecord {
/**
* Domain Name Server Record Label
* @type {string}
* @memberof DomainNameRecord
*/
label: DomainNameRecordLabelEnum;
/**
*
* @type {boolean}
* @memberof DomainNameRecord
*/
required: boolean;
/**
* Domain Name Server Record Types
* @type {string}
* @memberof DomainNameRecord
*/
recordType: DomainNameRecordRecordTypeEnum;
/**
*
* @type {string}
* @memberof DomainNameRecord
*/
name: string;
/**
*
* @type {Array<string>}
* @memberof DomainNameRecord
*/
recordEntries: Array<string>;
/**
*
* @type {number}
* @memberof DomainNameRecord
*/
ttl: number;
}
/**
* @export
* @enum {string}
*/
export enum DomainNameRecordLabelEnum {
VERIFICATION = 'VERIFICATION',
MX = 'MX',
SPF = 'SPF',
DKIM = 'DKIM',
DMARC = 'DMARC',
}
/**
* @export
* @enum {string}
*/
export enum DomainNameRecordRecordTypeEnum {
A = 'A',
NS = 'NS',
MD = 'MD',
MF = 'MF',
CNAME = 'CNAME',
SOA = 'SOA',
MB = 'MB',
MG = 'MG',
MR = 'MR',
NULL = 'NULL',
WKS = 'WKS',
PTR = 'PTR',
HINFO = 'HINFO',
MINFO = 'MINFO',
MX = 'MX',
TXT = 'TXT',
RP = 'RP',
AFSDB = 'AFSDB',
X25 = 'X25',
ISDN = 'ISDN',
RT = 'RT',
NSAP = 'NSAP',
NSAP_PTR = 'NSAP_PTR',
SIG = 'SIG',
KEY = 'KEY',
PX = 'PX',
GPOS = 'GPOS',
AAAA = 'AAAA',
LOC = 'LOC',
NXT = 'NXT',
EID = 'EID',
NIMLOC = 'NIMLOC',
SRV = 'SRV',
ATMA = 'ATMA',
NAPTR = 'NAPTR',
KX = 'KX',
CERT = 'CERT',
A6 = 'A6',
DNAME = 'DNAME',
SINK = 'SINK',
OPT = 'OPT',
APL = 'APL',
DS = 'DS',
SSHFP = 'SSHFP',
IPSECKEY = 'IPSECKEY',
RRSIG = 'RRSIG',
NSEC = 'NSEC',
DNSKEY = 'DNSKEY',
DHCID = 'DHCID',
NSEC3 = 'NSEC3',
NSEC3PARAM = 'NSEC3PARAM',
TLSA = 'TLSA',
SMIMEA = 'SMIMEA',
HIP = 'HIP',
NINFO = 'NINFO',
RKEY = 'RKEY',
TALINK = 'TALINK',
CDS = 'CDS',
CDNSKEY = 'CDNSKEY',
OPENPGPKEY = 'OPENPGPKEY',
CSYNC = 'CSYNC',
ZONEMD = 'ZONEMD',
SVCB = 'SVCB',
HTTPS = 'HTTPS',
SPF = 'SPF',
UINFO = 'UINFO',
UID = 'UID',
GID = 'GID',
UNSPEC = 'UNSPEC',
NID = 'NID',
L32 = 'L32',
L64 = 'L64',
LP = 'LP',
EUI48 = 'EUI48',
EUI64 = 'EUI64',
TKEY = 'TKEY',
TSIG = 'TSIG',
IXFR = 'IXFR',
AXFR = 'AXFR',
MAILB = 'MAILB',
MAILA = 'MAILA',
ANY = 'ANY',
URI = 'URI',
CAA = 'CAA',
AVC = 'AVC',
DOA = 'DOA',
AMTRELAY = 'AMTRELAY',
TA = 'TA',
DLV = 'DLV',
}
export function DomainNameRecordFromJSON(json: any): DomainNameRecord {
return DomainNameRecordFromJSONTyped(json, false);
}
export function DomainNameRecordFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): DomainNameRecord {
if (json === undefined || json === null) {
return json;
}
return {
label: json['label'],
required: json['required'],
recordType: json['recordType'],
name: json['name'],
recordEntries: json['recordEntries'],
ttl: json['ttl'],
};
}
export function DomainNameRecordToJSON(value?: DomainNameRecord | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
label: value.label,
required: value.required,
recordType: value.recordType,
name: value.name,
recordEntries: value.recordEntries,
ttl: value.ttl,
};
}
/* 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';
/**
*
* @export
* @interface DomainIssuesDto
*/
export interface DomainIssuesDto {
/**
*
* @type {boolean}
* @memberof DomainIssuesDto
*/
hasIssues: boolean;
}
export function DomainIssuesDtoFromJSON(json: any): DomainIssuesDto {
return DomainIssuesDtoFromJSONTyped(json, false);
}
export function DomainIssuesDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): DomainIssuesDto {
if (json === undefined || json === null) {
return json;
}
return {
hasIssues: json['hasIssues'],
};
}
export function DomainIssuesDtoToJSON(value?: DomainIssuesDto | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
hasIssues: value.hasIssues,
};
}
/* 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';
/**
*
* @export
* @interface DomainInformation
*/
export interface DomainInformation {
/**
*
* @type {string}
* @memberof DomainInformation
*/
domainName: string;
/**
*
* @type {boolean}
* @memberof DomainInformation
*/
verified: boolean;
/**
* Type of domain. Dictates type of inbox that can be created with domain. HTTP means inboxes are processed using SES while SMTP inboxes use a custom SMTP mail server. SMTP does not support sending so use HTTP for sending emails.
* @type {string}
* @memberof DomainInformation
*/
domainType: DomainInformationDomainTypeEnum;
}
/**
* @export
* @enum {string}
*/
export enum DomainInformationDomainTypeEnum {
HTTP_INBOX = 'HTTP_INBOX',
SMTP_DOMAIN = 'SMTP_DOMAIN',
}
export function DomainInformationFromJSON(json: any): DomainInformation {
return DomainInformationFromJSONTyped(json, false);
}
export function DomainInformationFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): DomainInformation {
if (json === undefined || json === null) {
return json;
}
return {
domainName: json['domainName'],
verified: json['verified'],
domainType: json['domainType'],
};
}
export function DomainInformationToJSON(value?: DomainInformation | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
domainName: value.domainName,
verified: value.verified,
domainType: value.domainType,
};
}
/* 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';
import {
DomainGroup,
DomainGroupFromJSON,
DomainGroupFromJSONTyped,
DomainGroupToJSON,
} from './';
/**
*
* @export
* @interface DomainGroupsDto
*/
export interface DomainGroupsDto {
/**
*
* @type {Array<DomainGroup>}
* @memberof DomainGroupsDto
*/
domainGroups: Array<DomainGroup>;
}
export function DomainGroupsDtoFromJSON(json: any): DomainGroupsDto {
return DomainGroupsDtoFromJSONTyped(json, false);
}
export function DomainGroupsDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): DomainGroupsDto {
if (json === undefined || json === null) {
return json;
}
return {
domainGroups: (json['domainGroups'] as Array<any>).map(DomainGroupFromJSON),
};
}
export function DomainGroupsDtoToJSON(value?: DomainGroupsDto | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
domainGroups: (value.domainGroups as Array<any>).map(DomainGroupToJSON),
};
}
/* 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';
import {
DomainInformation,
DomainInformationFromJSON,
DomainInformationFromJSONTyped,
DomainInformationToJSON,
} from './';
/**
*
* @export
* @interface DomainGroup
*/
export interface DomainGroup {
/**
*
* @type {string}
* @memberof DomainGroup
*/
label: DomainGroupLabelEnum;
/**
*
* @type {Array<DomainInformation>}
* @memberof DomainGroup
*/
domains: Array<DomainInformation>;
}
/**
* @export
* @enum {string}
*/
export enum DomainGroupLabelEnum {
DEFAULT = 'DEFAULT',
DOMAIN_POOL = 'DOMAIN_POOL',
CUSTOM = 'CUSTOM',
}
export function DomainGroupFromJSON(json: any): DomainGroup {
return DomainGroupFromJSONTyped(json, false);
}
export function DomainGroupFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): DomainGroup {
if (json === undefined || json === null) {
return json;
}
return {
label: json['label'],
domains: (json['domains'] as Array<any>).map(DomainInformationFromJSON),
};
}
export function DomainGroupToJSON(value?: DomainGroup | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
label: value.label,
domains: (value.domains as Array<any>).map(DomainInformationToJSON),
};
}
/* 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';
import {
DomainNameRecord,
DomainNameRecordFromJSON,
DomainNameRecordFromJSONTyped,
DomainNameRecordToJSON,
} from './';
/**
* Domain plus verification records and status
* @export
* @interface DomainDto
*/
export interface DomainDto {
/**
*
* @type {string}
* @memberof DomainDto
*/
id: string;
/**
*
* @type {string}
* @memberof DomainDto
*/
userId: string;
/**
* Custom domain name
* @type {string}
* @memberof DomainDto
*/
domain: string;
/**
* Verification tokens
* @type {string}
* @memberof DomainDto
*/
verificationToken: string;
/**
* Unique token DKIM tokens
* @type {Array<string>}
* @memberof DomainDto
*/
dkimTokens: Array<string>;
/**
* If the domain is missing records then show which pairs are missing.
* @type {string}
* @memberof DomainDto
*/
missingRecordsMessage?: string | null;
/**
* Whether the domain has missing required records. If true then see the domain in the dashboard app.
* @type {boolean}
* @memberof DomainDto
*/
hasMissingRecords: boolean;
/**
* Whether domain has been verified or not. If the domain is not verified after 72 hours there is most likely an issue with the domains DNS records.
* @type {boolean}
* @memberof DomainDto
*/
isVerified: boolean;
/**
* List of DNS domain name records (C, MX, TXT) etc that you must add to the DNS server associated with your domain provider.
* @type {Array<DomainNameRecord>}
* @memberof DomainDto
*/
domainNameRecords: Array<DomainNameRecord>;
/**
* The optional catch all inbox that will receive emails sent to the domain that cannot be matched.
* @type {string}
* @memberof DomainDto
*/
catchAllInboxId?: string | null;
/**
*
* @type {Date}
* @memberof DomainDto
*/
createdAt: Date;
/**
*
* @type {Date}
* @memberof DomainDto
*/
updatedAt: Date;
/**
* Type of domain. Dictates type of inbox that can be created with domain. HTTP means inboxes are processed using SES while SMTP inboxes use a custom SMTP mail server. SMTP does not support sending so use HTTP for sending emails.
* @type {string}
* @memberof DomainDto
*/
domainType: DomainDtoDomainTypeEnum;
}
/**
* @export
* @enum {string}
*/
export enum DomainDtoDomainTypeEnum {
HTTP_INBOX = 'HTTP_INBOX',
SMTP_DOMAIN = 'SMTP_DOMAIN',
}
export function DomainDtoFromJSON(json: any): DomainDto {
return DomainDtoFromJSONTyped(json, false);
}
export function DomainDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): DomainDto {
if (json === undefined || json === null) {
return json;
}
return {
id: json['id'],
userId: json['userId'],
domain: json['domain'],
verificationToken: json['verificationToken'],
dkimTokens: json['dkimTokens'],
missingRecordsMessage: !exists(json, 'missingRecordsMessage')
? undefined
: json['missingRecordsMessage'],
hasMissingRecords: json['hasMissingRecords'],
isVerified: json['isVerified'],
domainNameRecords: (json['domainNameRecords'] as Array<any>).map(
DomainNameRecordFromJSON
),
catchAllInboxId: !exists(json, 'catchAllInboxId')
? undefined
: json['catchAllInboxId'],
createdAt: new Date(json['createdAt']),
updatedAt: new Date(json['updatedAt']),
domainType: json['domainType'],
};
}
export function DomainDtoToJSON(value?: DomainDto | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
userId: value.userId,
domain: value.domain,
verificationToken: value.verificationToken,
dkimTokens: value.dkimTokens,
missingRecordsMessage: value.missingRecordsMessage,
hasMissingRecords: value.hasMissingRecords,
isVerified: value.isVerified,
domainNameRecords: (value.domainNameRecords as Array<any>).map(
DomainNameRecordToJSON
),
catchAllInboxId: value.catchAllInboxId,
createdAt: value.createdAt.toISOString(),
updatedAt: value.updatedAt.toISOString(),
domainType: value.domainType,
};
}
/* 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';
import {
NameServerRecord,
NameServerRecordFromJSON,
NameServerRecordFromJSONTyped,
NameServerRecordToJSON,
} from './';
/**
* Name Server lookup result
* @export
* @interface DescribeMailServerDomainResult
*/
export interface DescribeMailServerDomainResult {
/**
*
* @type {Array<NameServerRecord>}
* @memberof DescribeMailServerDomainResult
*/
mxRecords: Array<NameServerRecord>;
/**
*
* @type {string}
* @memberof DescribeMailServerDomainResult
*/
domain: string;
/**
*
* @type {string}
* @memberof DescribeMailServerDomainResult
*/
message?: string | null;
}
export function DescribeMailServerDomainResultFromJSON(
json: any
): DescribeMailServerDomainResult {
return DescribeMailServerDomainResultFromJSONTyped(json, false);
}
export function DescribeMailServerDomainResultFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): DescribeMailServerDomainResult {
if (json === undefined || json === null) {
return json;
}
return {
mxRecords: (json['mxRecords'] as Array<any>).map(NameServerRecordFromJSON),
domain: json['domain'],
message: !exists(json, 'message') ? undefined : json['message'],
};
}
export function DescribeMailServerDomainResultToJSON(
value?: DescribeMailServerDomainResult | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
mxRecords: (value.mxRecords as Array<any>).map(NameServerRecordToJSON),
domain: value.domain,
message: value.message,
};
}
/* 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';
/**
* Domain record description
* @export
* @interface DescribeDomainOptions
*/
export interface DescribeDomainOptions {
/**
*
* @type {string}
* @memberof DescribeDomainOptions
*/
domain: string;
}
export function DescribeDomainOptionsFromJSON(
json: any
): DescribeDomainOptions {
return DescribeDomainOptionsFromJSONTyped(json, false);
}
export function DescribeDomainOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): DescribeDomainOptions {
if (json === undefined || json === null) {
return json;
}
return {
domain: json['domain'],
};
}
export function DescribeDomainOptionsToJSON(
value?: DescribeDomainOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
domain: value.domain,
};
}
/* 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';
/**
*
* @export
* @interface DeliveryStatusDto
*/
export interface DeliveryStatusDto {
/**
*
* @type {string}
* @memberof DeliveryStatusDto
*/
id: string;
/**
*
* @type {string}
* @memberof DeliveryStatusDto
*/
userId: string;
/**
*
* @type {string}
* @memberof DeliveryStatusDto
*/
sentId?: string;
/**
*
* @type {string}
* @memberof DeliveryStatusDto
*/
remoteMtaIp?: string;
/**
*
* @type {string}
* @memberof DeliveryStatusDto
*/
inboxId?: string;
/**
*
* @type {string}
* @memberof DeliveryStatusDto
*/
reportingMta?: string;
/**
*
* @type {Array<string>}
* @memberof DeliveryStatusDto
*/
recipients?: Array<string>;
/**
*
* @type {string}
* @memberof DeliveryStatusDto
*/
smtpResponse?: string;
/**
*
* @type {number}
* @memberof DeliveryStatusDto
*/
smtpStatusCode?: number;
/**
*
* @type {number}
* @memberof DeliveryStatusDto
*/
processingTimeMillis?: number;
/**
*
* @type {Date}
* @memberof DeliveryStatusDto
*/
received?: Date;
/**
*
* @type {string}
* @memberof DeliveryStatusDto
*/
subject?: string;
/**
*
* @type {Date}
* @memberof DeliveryStatusDto
*/
createdAt: Date;
/**
*
* @type {Date}
* @memberof DeliveryStatusDto
*/
updatedAt: Date;
}
export function DeliveryStatusDtoFromJSON(json: any): DeliveryStatusDto {
return DeliveryStatusDtoFromJSONTyped(json, false);
}
export function DeliveryStatusDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): DeliveryStatusDto {
if (json === undefined || json === null) {
return json;
}
return {
id: json['id'],
userId: json['userId'],
sentId: !exists(json, 'sentId') ? undefined : json['sentId'],
remoteMtaIp: !exists(json, 'remoteMtaIp') ? undefined : json['remoteMtaIp'],
inboxId: !exists(json, 'inboxId') ? undefined : json['inboxId'],
reportingMta: !exists(json, 'reportingMta')
? undefined
: json['reportingMta'],
recipients: !exists(json, 'recipients') ? undefined : json['recipients'],
smtpResponse: !exists(json, 'smtpResponse')
? undefined
: json['smtpResponse'],
smtpStatusCode: !exists(json, 'smtpStatusCode')
? undefined
: json['smtpStatusCode'],
processingTimeMillis: !exists(json, 'processingTimeMillis')
? undefined
: json['processingTimeMillis'],
received: !exists(json, 'received')
? undefined
: new Date(json['received']),
subject: !exists(json, 'subject') ? undefined : json['subject'],
createdAt: new Date(json['createdAt']),
updatedAt: new Date(json['updatedAt']),
};
}
export function DeliveryStatusDtoToJSON(value?: DeliveryStatusDto | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
userId: value.userId,
sentId: value.sentId,
remoteMtaIp: value.remoteMtaIp,
inboxId: value.inboxId,
reportingMta: value.reportingMta,
recipients: value.recipients,
smtpResponse: value.smtpResponse,
smtpStatusCode: value.smtpStatusCode,
processingTimeMillis: value.processingTimeMillis,
received:
value.received === undefined ? undefined : value.received.toISOString(),
subject: value.subject,
createdAt: value.createdAt.toISOString(),
updatedAt: value.updatedAt.toISOString(),
};
}
/* 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';
import {
DNSLookupOptions,
DNSLookupOptionsFromJSON,
DNSLookupOptionsFromJSONTyped,
DNSLookupOptionsToJSON,
} from './';
/**
* Options for multiple DNS queries
* @export
* @interface DNSLookupsOptions
*/
export interface DNSLookupsOptions {
/**
*
* @type {Array<DNSLookupOptions>}
* @memberof DNSLookupsOptions
*/
lookups: Array<DNSLookupOptions>;
}
export function DNSLookupsOptionsFromJSON(json: any): DNSLookupsOptions {
return DNSLookupsOptionsFromJSONTyped(json, false);
}
export function DNSLookupsOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): DNSLookupsOptions {
if (json === undefined || json === null) {
return json;
}
return {
lookups: (json['lookups'] as Array<any>).map(DNSLookupOptionsFromJSON),
};
}
export function DNSLookupsOptionsToJSON(value?: DNSLookupsOptions | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
lookups: (value.lookups as Array<any>).map(DNSLookupOptionsToJSON),
};
}
/* 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';
import {
DNSLookupResult,
DNSLookupResultFromJSON,
DNSLookupResultFromJSONTyped,
DNSLookupResultToJSON,
} from './';
/**
* Results of query on domain name servers
* @export
* @interface DNSLookupResults
*/
export interface DNSLookupResults {
/**
*
* @type {Array<DNSLookupResult>}
* @memberof DNSLookupResults
*/
results: Array<DNSLookupResult>;
}
export function DNSLookupResultsFromJSON(json: any): DNSLookupResults {
return DNSLookupResultsFromJSONTyped(json, false);
}
export function DNSLookupResultsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): DNSLookupResults {
if (json === undefined || json === null) {
return json;
}
return {
results: (json['results'] as Array<any>).map(DNSLookupResultFromJSON),
};
}
export function DNSLookupResultsToJSON(value?: DNSLookupResults | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
results: (value.results as Array<any>).map(DNSLookupResultToJSON),
};
}
/* 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';
/**
* DNS lookup result. Includes record type, time to live, raw response, and name value for the name server response.
* @export
* @interface DNSLookupResult
*/
export interface DNSLookupResult {
/**
* Domain Name Server Record Types
* @type {string}
* @memberof DNSLookupResult
*/
recordType: DNSLookupResultRecordTypeEnum;
/**
*
* @type {number}
* @memberof DNSLookupResult
*/
ttl: number;
/**
*
* @type {Array<string>}
* @memberof DNSLookupResult
*/
recordEntries: Array<string>;
/**
*
* @type {string}
* @memberof DNSLookupResult
*/
name: string;
}
/**
* @export
* @enum {string}
*/
export enum DNSLookupResultRecordTypeEnum {
A = 'A',
NS = 'NS',
MD = 'MD',
MF = 'MF',
CNAME = 'CNAME',
SOA = 'SOA',
MB = 'MB',
MG = 'MG',
MR = 'MR',
NULL = 'NULL',
WKS = 'WKS',
PTR = 'PTR',
HINFO = 'HINFO',
MINFO = 'MINFO',
MX = 'MX',
TXT = 'TXT',
RP = 'RP',
AFSDB = 'AFSDB',
X25 = 'X25',
ISDN = 'ISDN',
RT = 'RT',
NSAP = 'NSAP',
NSAP_PTR = 'NSAP_PTR',
SIG = 'SIG',
KEY = 'KEY',
PX = 'PX',
GPOS = 'GPOS',
AAAA = 'AAAA',
LOC = 'LOC',
NXT = 'NXT',
EID = 'EID',
NIMLOC = 'NIMLOC',
SRV = 'SRV',
ATMA = 'ATMA',
NAPTR = 'NAPTR',
KX = 'KX',
CERT = 'CERT',
A6 = 'A6',
DNAME = 'DNAME',
SINK = 'SINK',
OPT = 'OPT',
APL = 'APL',
DS = 'DS',
SSHFP = 'SSHFP',
IPSECKEY = 'IPSECKEY',
RRSIG = 'RRSIG',
NSEC = 'NSEC',
DNSKEY = 'DNSKEY',
DHCID = 'DHCID',
NSEC3 = 'NSEC3',
NSEC3PARAM = 'NSEC3PARAM',
TLSA = 'TLSA',
SMIMEA = 'SMIMEA',
HIP = 'HIP',
NINFO = 'NINFO',
RKEY = 'RKEY',
TALINK = 'TALINK',
CDS = 'CDS',
CDNSKEY = 'CDNSKEY',
OPENPGPKEY = 'OPENPGPKEY',
CSYNC = 'CSYNC',
ZONEMD = 'ZONEMD',
SVCB = 'SVCB',
HTTPS = 'HTTPS',
SPF = 'SPF',
UINFO = 'UINFO',
UID = 'UID',
GID = 'GID',
UNSPEC = 'UNSPEC',
NID = 'NID',
L32 = 'L32',
L64 = 'L64',
LP = 'LP',
EUI48 = 'EUI48',
EUI64 = 'EUI64',
TKEY = 'TKEY',
TSIG = 'TSIG',
IXFR = 'IXFR',
AXFR = 'AXFR',
MAILB = 'MAILB',
MAILA = 'MAILA',
ANY = 'ANY',
URI = 'URI',
CAA = 'CAA',
AVC = 'AVC',
DOA = 'DOA',
AMTRELAY = 'AMTRELAY',
TA = 'TA',
DLV = 'DLV',
}
export function DNSLookupResultFromJSON(json: any): DNSLookupResult {
return DNSLookupResultFromJSONTyped(json, false);
}
export function DNSLookupResultFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): DNSLookupResult {
if (json === undefined || json === null) {
return json;
}
return {
recordType: json['recordType'],
ttl: json['ttl'],
recordEntries: json['recordEntries'],
name: json['name'],
};
}
export function DNSLookupResultToJSON(value?: DNSLookupResult | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
recordType: value.recordType,
ttl: value.ttl,
recordEntries: value.recordEntries,
name: value.name,
};
}
/* 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 DNS query.
* @export
* @interface DNSLookupOptions
*/
export interface DNSLookupOptions {
/**
* List of record types you wish to query such as MX, DNS, TXT, NS, A etc.
* @type {string}
* @memberof DNSLookupOptions
*/
hostname: string;
/**
* List of record types you wish to query such as MX, DNS, TXT, NS, A etc.
* @type {Array<string>}
* @memberof DNSLookupOptions
*/
recordTypes: Array<DNSLookupOptionsRecordTypesEnum>;
/**
* Optionally control whether to omit the final dot in full DNS name values.
* @type {boolean}
* @memberof DNSLookupOptions
*/
omitFinalDNSDot: boolean;
}
/**
* @export
* @enum {string}
*/
export enum DNSLookupOptionsRecordTypesEnum {
A = 'A',
NS = 'NS',
MD = 'MD',
MF = 'MF',
CNAME = 'CNAME',
SOA = 'SOA',
MB = 'MB',
MG = 'MG',
MR = 'MR',
NULL = 'NULL',
WKS = 'WKS',
PTR = 'PTR',
HINFO = 'HINFO',
MINFO = 'MINFO',
MX = 'MX',
TXT = 'TXT',
RP = 'RP',
AFSDB = 'AFSDB',
X25 = 'X25',
ISDN = 'ISDN',
RT = 'RT',
NSAP = 'NSAP',
NSAP_PTR = 'NSAP_PTR',
SIG = 'SIG',
KEY = 'KEY',
PX = 'PX',
GPOS = 'GPOS',
AAAA = 'AAAA',
LOC = 'LOC',
NXT = 'NXT',
EID = 'EID',
NIMLOC = 'NIMLOC',
SRV = 'SRV',
ATMA = 'ATMA',
NAPTR = 'NAPTR',
KX = 'KX',
CERT = 'CERT',
A6 = 'A6',
DNAME = 'DNAME',
SINK = 'SINK',
OPT = 'OPT',
APL = 'APL',
DS = 'DS',
SSHFP = 'SSHFP',
IPSECKEY = 'IPSECKEY',
RRSIG = 'RRSIG',
NSEC = 'NSEC',
DNSKEY = 'DNSKEY',
DHCID = 'DHCID',
NSEC3 = 'NSEC3',
NSEC3PARAM = 'NSEC3PARAM',
TLSA = 'TLSA',
SMIMEA = 'SMIMEA',
HIP = 'HIP',
NINFO = 'NINFO',
RKEY = 'RKEY',
TALINK = 'TALINK',
CDS = 'CDS',
CDNSKEY = 'CDNSKEY',
OPENPGPKEY = 'OPENPGPKEY',
CSYNC = 'CSYNC',
ZONEMD = 'ZONEMD',
SVCB = 'SVCB',
HTTPS = 'HTTPS',
SPF = 'SPF',
UINFO = 'UINFO',
UID = 'UID',
GID = 'GID',
UNSPEC = 'UNSPEC',
NID = 'NID',
L32 = 'L32',
L64 = 'L64',
LP = 'LP',
EUI48 = 'EUI48',
EUI64 = 'EUI64',
TKEY = 'TKEY',
TSIG = 'TSIG',
IXFR = 'IXFR',
AXFR = 'AXFR',
MAILB = 'MAILB',
MAILA = 'MAILA',
ANY = 'ANY',
URI = 'URI',
CAA = 'CAA',
AVC = 'AVC',
DOA = 'DOA',
AMTRELAY = 'AMTRELAY',
TA = 'TA',
DLV = 'DLV',
}
export function DNSLookupOptionsFromJSON(json: any): DNSLookupOptions {
return DNSLookupOptionsFromJSONTyped(json, false);
}
export function DNSLookupOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): DNSLookupOptions {
if (json === undefined || json === null) {
return json;
}
return {
hostname: json['hostname'],
recordTypes: json['recordTypes'],
omitFinalDNSDot: json['omitFinalDNSDot'],
};
}
export function DNSLookupOptionsToJSON(value?: DNSLookupOptions | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
hostname: value.hostname,
recordTypes: value.recordTypes,
omitFinalDNSDot: value.omitFinalDNSDot,
};
}
/* 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';
import {
BasicAuthOptions,
BasicAuthOptionsFromJSON,
BasicAuthOptionsFromJSONTyped,
BasicAuthOptionsToJSON,
WebhookHeaders,
WebhookHeadersFromJSON,
WebhookHeadersFromJSONTyped,
WebhookHeadersToJSON,
} from './';
/**
* Options for creating a webhook. Webhooks can be attached to inboxes and MailSlurp will POST a webhook payload to the URL specified whenever the webhook's event is triggered. Webhooks are great for processing many inbound emails and responding to other events at scale. Customize the payload sent to your endpoint by setting the `requestBodyTemplate` property to a string with moustache style variables. Property names from the standard payload model for the given event are available as variables.
* @export
* @interface CreateWebhookOptions
*/
export interface CreateWebhookOptions {
/**
* Public URL on your server that MailSlurp can post WebhookNotification payload to when an email is received or an event is trigger. The payload of the submitted JSON is dependent on the webhook event type. See docs.mailslurp.com/webhooks for event payload documentation.
* @type {string}
* @memberof CreateWebhookOptions
*/
url: string;
/**
*
* @type {BasicAuthOptions}
* @memberof CreateWebhookOptions
*/
basicAuth?: BasicAuthOptions | null;
/**
* Optional name for the webhook
* @type {string}
* @memberof CreateWebhookOptions
*/
name?: string | null;
/**
* Optional webhook event name. Default is `EMAIL_RECEIVED` and is triggered when an email is received by the inbox associated with the webhook. Payload differ according to the webhook event name.
* @type {string}
* @memberof CreateWebhookOptions
*/
eventName?: CreateWebhookOptionsEventNameEnum;
/**
*
* @type {WebhookHeaders}
* @memberof CreateWebhookOptions
*/
includeHeaders?: WebhookHeaders;
/**
* Template for the JSON body of the webhook request that will be sent to your server. Use Moustache style `{{variableName}}` templating to use parts of the standard webhook payload for the given event.
* @type {string}
* @memberof CreateWebhookOptions
*/
requestBodyTemplate?: string | null;
/**
* Use static IP range when calling webhook endpoint
* @type {boolean}
* @memberof CreateWebhookOptions
*/
useStaticIpRange?: boolean | null;
/**
* Ignore insecure SSL certificates when sending request. Useful for self-signed certs.
* @type {boolean}
* @memberof CreateWebhookOptions
*/
ignoreInsecureSslCertificates?: boolean | null;
}
/**
* @export
* @enum {string}
*/
export enum CreateWebhookOptionsEventNameEnum {
EMAIL_RECEIVED = 'EMAIL_RECEIVED',
NEW_EMAIL = 'NEW_EMAIL',
NEW_CONTACT = 'NEW_CONTACT',
NEW_ATTACHMENT = 'NEW_ATTACHMENT',
EMAIL_OPENED = 'EMAIL_OPENED',
EMAIL_READ = 'EMAIL_READ',
DELIVERY_STATUS = 'DELIVERY_STATUS',
BOUNCE = 'BOUNCE',
BOUNCE_RECIPIENT = 'BOUNCE_RECIPIENT',
NEW_SMS = 'NEW_SMS',
}
export function CreateWebhookOptionsFromJSON(json: any): CreateWebhookOptions {
return CreateWebhookOptionsFromJSONTyped(json, false);
}
export function CreateWebhookOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): CreateWebhookOptions {
if (json === undefined || json === null) {
return json;
}
return {
url: json['url'],
basicAuth: !exists(json, 'basicAuth')
? undefined
: BasicAuthOptionsFromJSON(json['basicAuth']),
name: !exists(json, 'name') ? undefined : json['name'],
eventName: !exists(json, 'eventName') ? undefined : json['eventName'],
includeHeaders: !exists(json, 'includeHeaders')
? undefined
: WebhookHeadersFromJSON(json['includeHeaders']),
requestBodyTemplate: !exists(json, 'requestBodyTemplate')
? undefined
: json['requestBodyTemplate'],
useStaticIpRange: !exists(json, 'useStaticIpRange')
? undefined
: json['useStaticIpRange'],
ignoreInsecureSslCertificates: !exists(
json,
'ignoreInsecureSslCertificates'
)
? undefined
: json['ignoreInsecureSslCertificates'],
};
}
export function CreateWebhookOptionsToJSON(
value?: CreateWebhookOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
url: value.url,
basicAuth: BasicAuthOptionsToJSON(value.basicAuth),
name: value.name,
eventName: value.eventName,
includeHeaders: WebhookHeadersToJSON(value.includeHeaders),
requestBodyTemplate: value.requestBodyTemplate,
useStaticIpRange: value.useStaticIpRange,
ignoreInsecureSslCertificates: value.ignoreInsecureSslCertificates,
};
}
/* 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 creating a tracking pixel for email open tracking
* @export
* @interface CreateTrackingPixelOptions
*/
export interface CreateTrackingPixelOptions {
/**
*
* @type {string}
* @memberof CreateTrackingPixelOptions
*/
name?: string | null;
/**
*
* @type {string}
* @memberof CreateTrackingPixelOptions
*/
recipient?: string | null;
}
export function CreateTrackingPixelOptionsFromJSON(
json: any
): CreateTrackingPixelOptions {
return CreateTrackingPixelOptionsFromJSONTyped(json, false);
}
export function CreateTrackingPixelOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): CreateTrackingPixelOptions {
if (json === undefined || json === null) {
return json;
}
return {
name: !exists(json, 'name') ? undefined : json['name'],
recipient: !exists(json, 'recipient') ? undefined : json['recipient'],
};
}
export function CreateTrackingPixelOptionsToJSON(
value?: CreateTrackingPixelOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
name: value.name,
recipient: value.recipient,
};
}
/* 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';
/**
* Create template options
* @export
* @interface CreateTemplateOptions
*/
export interface CreateTemplateOptions {
/**
* Name of template
* @type {string}
* @memberof CreateTemplateOptions
*/
name: string;
/**
* Template content. Can include moustache style variables such as {{var_name}}
* @type {string}
* @memberof CreateTemplateOptions
*/
content: string;
}
export function CreateTemplateOptionsFromJSON(
json: any
): CreateTemplateOptions {
return CreateTemplateOptionsFromJSONTyped(json, false);
}
export function CreateTemplateOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): CreateTemplateOptions {
if (json === undefined || json === null) {
return json;
}
return {
name: json['name'],
content: json['content'],
};
}
export function CreateTemplateOptionsToJSON(
value?: CreateTemplateOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
name: value.name,
content: value.content,
};
}
/* 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 creating inbox rulesets. Inbox rulesets can be used to block, allow, filter, or forward emails when sending or receiving using the inbox.
* @export
* @interface CreateInboxRulesetOptions
*/
export interface CreateInboxRulesetOptions {
/**
* What type of emails actions to apply ruleset to. Either `SENDING_EMAILS` or `RECEIVING_EMAILS` will apply action and target to any sending or receiving of emails respectively.
* @type {string}
* @memberof CreateInboxRulesetOptions
*/
scope: CreateInboxRulesetOptionsScopeEnum;
/**
* Action to be taken when the ruleset matches an email for the given scope. For example: `BLOCK` action with target `*` and scope `SENDING_EMAILS` blocks sending to all recipients. Note `ALLOW` takes precedent over `BLOCK`. `FILTER_REMOVE` is like block but will remove offending email addresses during a send or receive event instead of blocking the action.
* @type {string}
* @memberof CreateInboxRulesetOptions
*/
action: CreateInboxRulesetOptionsActionEnum;
/**
* Target to match emails with. Can be a wild-card type pattern or a valid email address. For instance `*@gmail.com` matches all gmail addresses while `test@gmail.com` matches one address exactly. The target is applied to every recipient field email address when `SENDING_EMAILS` is the scope and is applied to sender of email when `RECEIVING_EMAILS`.
* @type {string}
* @memberof CreateInboxRulesetOptions
*/
target: string;
}
/**
* @export
* @enum {string}
*/
export enum CreateInboxRulesetOptionsScopeEnum {
RECEIVING_EMAILS = 'RECEIVING_EMAILS',
SENDING_EMAILS = 'SENDING_EMAILS',
}
/**
* @export
* @enum {string}
*/
export enum CreateInboxRulesetOptionsActionEnum {
BLOCK = 'BLOCK',
ALLOW = 'ALLOW',
FILTER_REMOVE = 'FILTER_REMOVE',
}
export function CreateInboxRulesetOptionsFromJSON(
json: any
): CreateInboxRulesetOptions {
return CreateInboxRulesetOptionsFromJSONTyped(json, false);
}
export function CreateInboxRulesetOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): CreateInboxRulesetOptions {
if (json === undefined || json === null) {
return json;
}
return {
scope: json['scope'],
action: json['action'],
target: json['target'],
};
}
export function CreateInboxRulesetOptionsToJSON(
value?: CreateInboxRulesetOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
scope: value.scope,
action: value.action,
target: value.target,
};
}
/* 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 creating an inbox replier. Repliers can be attached to inboxes and send automated responses when an inbound email matches given criteria.
* @export
* @interface CreateInboxReplierOptions
*/
export interface CreateInboxReplierOptions {
/**
* Inbox ID to attach replier to
* @type {string}
* @memberof CreateInboxReplierOptions
*/
inboxId: string;
/**
* Name for replier
* @type {string}
* @memberof CreateInboxReplierOptions
*/
name?: string | null;
/**
* Field to match against to trigger inbox replier for inbound email
* @type {string}
* @memberof CreateInboxReplierOptions
*/
field: CreateInboxReplierOptionsFieldEnum;
/**
* String or wildcard style match for field specified when evaluating reply rules. Use `*` to match anything.
* @type {string}
* @memberof CreateInboxReplierOptions
*/
match: string;
/**
* Reply-to email address when sending replying
* @type {string}
* @memberof CreateInboxReplierOptions
*/
replyTo?: string | null;
/**
* Subject override when replying to email
* @type {string}
* @memberof CreateInboxReplierOptions
*/
subject?: string | null;
/**
* Send email from address
* @type {string}
* @memberof CreateInboxReplierOptions
*/
from?: string | null;
/**
* Email reply charset
* @type {string}
* @memberof CreateInboxReplierOptions
*/
charset?: string | null;
/**
* Ignore sender replyTo when responding. Send directly to the sender if enabled.
* @type {boolean}
* @memberof CreateInboxReplierOptions
*/
ignoreReplyTo?: boolean | null;
/**
* Send HTML email
* @type {boolean}
* @memberof CreateInboxReplierOptions
*/
isHTML?: boolean | null;
/**
* Email body for reply
* @type {string}
* @memberof CreateInboxReplierOptions
*/
body?: string | null;
/**
* ID of template to use when sending a reply
* @type {string}
* @memberof CreateInboxReplierOptions
*/
templateId?: string | null;
/**
* Template variable values
* @type {{ [key: string]: object; }}
* @memberof CreateInboxReplierOptions
*/
templateVariables?: { [key: string]: object } | null;
}
/**
* @export
* @enum {string}
*/
export enum CreateInboxReplierOptionsFieldEnum {
RECIPIENTS = 'RECIPIENTS',
SENDER = 'SENDER',
SUBJECT = 'SUBJECT',
ATTACHMENTS = 'ATTACHMENTS',
}
export function CreateInboxReplierOptionsFromJSON(
json: any
): CreateInboxReplierOptions {
return CreateInboxReplierOptionsFromJSONTyped(json, false);
}
export function CreateInboxReplierOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): CreateInboxReplierOptions {
if (json === undefined || json === null) {
return json;
}
return {
inboxId: json['inboxId'],
name: !exists(json, 'name') ? undefined : json['name'],
field: json['field'],
match: json['match'],
replyTo: !exists(json, 'replyTo') ? undefined : json['replyTo'],
subject: !exists(json, 'subject') ? undefined : json['subject'],
from: !exists(json, 'from') ? undefined : json['from'],
charset: !exists(json, 'charset') ? undefined : json['charset'],
ignoreReplyTo: !exists(json, 'ignoreReplyTo')
? undefined
: json['ignoreReplyTo'],
isHTML: !exists(json, 'isHTML') ? undefined : json['isHTML'],
body: !exists(json, 'body') ? undefined : json['body'],
templateId: !exists(json, 'templateId') ? undefined : json['templateId'],
templateVariables: !exists(json, 'templateVariables')
? undefined
: json['templateVariables'],
};
}
export function CreateInboxReplierOptionsToJSON(
value?: CreateInboxReplierOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
inboxId: value.inboxId,
name: value.name,
field: value.field,
match: value.match,
replyTo: value.replyTo,
subject: value.subject,
from: value.from,
charset: value.charset,
ignoreReplyTo: value.ignoreReplyTo,
isHTML: value.isHTML,
body: value.body,
templateId: value.templateId,
templateVariables: value.templateVariables,
};
}
/* 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 creating an inbox forwarder
* @export
* @interface CreateInboxForwarderOptions
*/
export interface CreateInboxForwarderOptions {
/**
* Field to match against to trigger inbox forwarding for inbound email
* @type {string}
* @memberof CreateInboxForwarderOptions
*/
field: CreateInboxForwarderOptionsFieldEnum;
/**
* String or wildcard style match for field specified when evaluating forwarding rules
* @type {string}
* @memberof CreateInboxForwarderOptions
*/
match: string;
/**
* Email addresses to forward an email to if it matches the field and match criteria of the forwarder
* @type {Array<string>}
* @memberof CreateInboxForwarderOptions
*/
forwardToRecipients: Array<string>;
}
/**
* @export
* @enum {string}
*/
export enum CreateInboxForwarderOptionsFieldEnum {
RECIPIENTS = 'RECIPIENTS',
SENDER = 'SENDER',
SUBJECT = 'SUBJECT',
ATTACHMENTS = 'ATTACHMENTS',
}
export function CreateInboxForwarderOptionsFromJSON(
json: any
): CreateInboxForwarderOptions {
return CreateInboxForwarderOptionsFromJSONTyped(json, false);
}
export function CreateInboxForwarderOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): CreateInboxForwarderOptions {
if (json === undefined || json === null) {
return json;
}
return {
field: json['field'],
match: json['match'],
forwardToRecipients: json['forwardToRecipients'],
};
}
export function CreateInboxForwarderOptionsToJSON(
value?: CreateInboxForwarderOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
field: value.field,
match: value.match,
forwardToRecipients: value.forwardToRecipients,
};
}
/* 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 creating an inbox. An inbox has a real email address that can send and receive emails. Inboxes can be permanent or expire at a given time. Inboxes are either `SMTP` or `HTTP` mailboxes. `SMTP` inboxes are processed by a mail server running at `mailslurp.mx` while `HTTP` inboxes are processed by AWS SES backed mailservers. An inbox email address is randomly assigned by default ending in either `mailslurp.com` or (if `useDomainPool` is enabled) ending in a similar domain such as `mailslurp.xyz` (selected at random). To specify an address use a custom domain: either pass the `emailAddress` options with `<your-recipient>@<your-domain>`. To create a randomized address for your domain set the `domainName` to the domain you have verified or pass the `domainId`. Virtual inboxes prevent outbound sending and instead trap mail.
* @export
* @interface CreateInboxDto
*/
export interface CreateInboxDto {
/**
* A custom email address to use with the inbox. Defaults to null. When null MailSlurp will assign a random email address to the inbox such as `123@mailslurp.com`. If you use the `useDomainPool` option when the email address is null it will generate an email address with a more varied domain ending such as `123@mailslurp.info` or `123@mailslurp.biz`. When a custom email address is provided the address is split into a domain and the domain is queried against your user. If you have created the domain in the MailSlurp dashboard and verified it you can use any email address that ends with the domain. Note domain types must match the inbox type - so `SMTP` inboxes will only work with `SMTP` type domains. Avoid `SMTP` inboxes if you need to send emails as they can only receive. Send an email to this address and the inbox will receive and store it for you. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID.
* @type {string}
* @memberof CreateInboxDto
*/
emailAddress?: string | null;
/**
* FQDN domain name for the domain you have verified. Will be appended with a randomly assigned recipient name. Use the `emailAddress` option instead to specify the full custom inbox.
* @type {string}
* @memberof CreateInboxDto
*/
domainName?: string | null;
/**
* ID of custom domain to use for email address.
* @type {string}
* @memberof CreateInboxDto
*/
domainId?: string | null;
/**
* Optional name of the inbox. Displayed in the dashboard for easier search and used as the sender name when sending emails.
* @type {string}
* @memberof CreateInboxDto
*/
name?: string | null;
/**
* Optional description of the inbox for labelling purposes. Is shown in the dashboard and can be used with
* @type {string}
* @memberof CreateInboxDto
*/
description?: string | null;
/**
* Use the MailSlurp domain name pool with this inbox when creating the email address. Defaults to null. If enabled the inbox will be an email address with a domain randomly chosen from a list of the MailSlurp domains. This is useful when the default `@mailslurp.com` email addresses used with inboxes are blocked or considered spam by a provider or receiving service. When domain pool is enabled an email address will be generated ending in `@mailslurp.{world,info,xyz,...}` . This means a TLD is randomly selecting from a list of `.biz`, `.info`, `.xyz` etc to add variance to the generated email addresses. When null or false MailSlurp uses the default behavior of `@mailslurp.com` or custom email address provided by the emailAddress field. Note this feature is only available for `HTTP` inbox types.
* @type {boolean}
* @memberof CreateInboxDto
*/
useDomainPool?: boolean | null;
/**
* Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI.
* @type {Array<string>}
* @memberof CreateInboxDto
*/
tags?: Array<string> | null;
/**
* Optional inbox expiration date. If null then this inbox is permanent and the emails in it won't be deleted. If an expiration date is provided or is required by your plan the inbox will be closed when the expiration time is reached. Expired inboxes still contain their emails but can no longer send or receive emails. An ExpiredInboxRecord is created when an inbox and the email address and inbox ID are recorded. The expiresAt property is a timestamp string in ISO DateTime Format yyyy-MM-dd'T'HH:mm:ss.SSSXXX.
* @type {Date}
* @memberof CreateInboxDto
*/
expiresAt?: Date | null;
/**
* Is the inbox a favorite. Marking an inbox as a favorite is typically done in the dashboard for quick access or filtering
* @type {boolean}
* @memberof CreateInboxDto
*/
favourite?: boolean | null;
/**
* Number of milliseconds that inbox should exist for
* @type {number}
* @memberof CreateInboxDto
*/
expiresIn?: number | null;
/**
* DEPRECATED (team access is always true). Grant team access to this inbox and the emails that belong to it for team members of your organization.
* @type {boolean}
* @memberof CreateInboxDto
*/
allowTeamAccess?: boolean | null;
/**
* Type of inbox. HTTP inboxes are faster and better for most cases. SMTP inboxes are more suited for public facing inbound messages (but cannot send).
* @type {string}
* @memberof CreateInboxDto
*/
inboxType?: CreateInboxDtoInboxTypeEnum;
/**
* Virtual inbox prevents any outbound emails from being sent. It creates sent email records but will never send real emails to recipients. Great for testing and faking email sending.
* @type {boolean}
* @memberof CreateInboxDto
*/
virtualInbox?: boolean | null;
/**
* Use a shorter email address under 31 characters
* @type {boolean}
* @memberof CreateInboxDto
*/
useShortAddress?: boolean | null;
/**
* Prefix to add before the email address for easier labelling or identification.
* @type {string}
* @memberof CreateInboxDto
*/
prefix?: string | null;
}
/**
* @export
* @enum {string}
*/
export enum CreateInboxDtoInboxTypeEnum {
HTTP_INBOX = 'HTTP_INBOX',
SMTP_INBOX = 'SMTP_INBOX',
}
export function CreateInboxDtoFromJSON(json: any): CreateInboxDto {
return CreateInboxDtoFromJSONTyped(json, false);
}
export function CreateInboxDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): CreateInboxDto {
if (json === undefined || json === null) {
return json;
}
return {
emailAddress: !exists(json, 'emailAddress')
? undefined
: json['emailAddress'],
domainName: !exists(json, 'domainName') ? undefined : json['domainName'],
domainId: !exists(json, 'domainId') ? undefined : json['domainId'],
name: !exists(json, 'name') ? undefined : json['name'],
description: !exists(json, 'description') ? undefined : json['description'],
useDomainPool: !exists(json, 'useDomainPool')
? undefined
: json['useDomainPool'],
tags: !exists(json, 'tags') ? undefined : json['tags'],
expiresAt: !exists(json, 'expiresAt')
? undefined
: json['expiresAt'] === null
? null
: new Date(json['expiresAt']),
favourite: !exists(json, 'favourite') ? undefined : json['favourite'],
expiresIn: !exists(json, 'expiresIn') ? undefined : json['expiresIn'],
allowTeamAccess: !exists(json, 'allowTeamAccess')
? undefined
: json['allowTeamAccess'],
inboxType: !exists(json, 'inboxType') ? undefined : json['inboxType'],
virtualInbox: !exists(json, 'virtualInbox')
? undefined
: json['virtualInbox'],
useShortAddress: !exists(json, 'useShortAddress')
? undefined
: json['useShortAddress'],
prefix: !exists(json, 'prefix') ? undefined : json['prefix'],
};
}
export function CreateInboxDtoToJSON(value?: CreateInboxDto | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
emailAddress: value.emailAddress,
domainName: value.domainName,
domainId: value.domainId,
name: value.name,
description: value.description,
useDomainPool: value.useDomainPool,
tags: value.tags,
expiresAt:
value.expiresAt === undefined
? undefined
: value.expiresAt === null
? null
: value.expiresAt.toISOString(),
favourite: value.favourite,
expiresIn: value.expiresIn,
allowTeamAccess: value.allowTeamAccess,
inboxType: value.inboxType,
virtualInbox: value.virtualInbox,
useShortAddress: value.useShortAddress,
prefix: value.prefix,
};
}
/* 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';
/**
* Create contact group options
* @export
* @interface CreateGroupOptions
*/
export interface CreateGroupOptions {
/**
*
* @type {string}
* @memberof CreateGroupOptions
*/
name: string;
/**
*
* @type {string}
* @memberof CreateGroupOptions
*/
description?: string | null;
}
export function CreateGroupOptionsFromJSON(json: any): CreateGroupOptions {
return CreateGroupOptionsFromJSONTyped(json, false);
}
export function CreateGroupOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): CreateGroupOptions {
if (json === undefined || json === null) {
return json;
}
return {
name: json['name'],
description: !exists(json, 'description') ? undefined : json['description'],
};
}
export function CreateGroupOptionsToJSON(
value?: CreateGroupOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
name: value.name,
description: value.description,
};
}
/* 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';
/**
*
* @export
* @interface CreateEmergencyAddressOptions
*/
export interface CreateEmergencyAddressOptions {
/**
*
* @type {string}
* @memberof CreateEmergencyAddressOptions
*/
customerName: string;
/**
*
* @type {string}
* @memberof CreateEmergencyAddressOptions
*/
address1: string;
/**
*
* @type {string}
* @memberof CreateEmergencyAddressOptions
*/
city: string;
/**
*
* @type {string}
* @memberof CreateEmergencyAddressOptions
*/
region: string;
/**
*
* @type {string}
* @memberof CreateEmergencyAddressOptions
*/
postalCode: string;
/**
*
* @type {string}
* @memberof CreateEmergencyAddressOptions
*/
isoCountryCode: CreateEmergencyAddressOptionsIsoCountryCodeEnum;
/**
*
* @type {string}
* @memberof CreateEmergencyAddressOptions
*/
displayName?: string;
}
/**
* @export
* @enum {string}
*/
export enum CreateEmergencyAddressOptionsIsoCountryCodeEnum {
US = 'US',
GB = 'GB',
AU = 'AU',
}
export function CreateEmergencyAddressOptionsFromJSON(
json: any
): CreateEmergencyAddressOptions {
return CreateEmergencyAddressOptionsFromJSONTyped(json, false);
}
export function CreateEmergencyAddressOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): CreateEmergencyAddressOptions {
if (json === undefined || json === null) {
return json;
}
return {
customerName: json['customerName'],
address1: json['address1'],
city: json['city'],
region: json['region'],
postalCode: json['postalCode'],
isoCountryCode: json['isoCountryCode'],
displayName: !exists(json, 'displayName') ? undefined : json['displayName'],
};
}
export function CreateEmergencyAddressOptionsToJSON(
value?: CreateEmergencyAddressOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
customerName: value.customerName,
address1: value.address1,
city: value.city,
region: value.region,
postalCode: value.postalCode,
isoCountryCode: value.isoCountryCode,
displayName: value.displayName,
};
}
/* 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 creating a domain to use with MailSlurp. You must have ownership access to this domain in order to verify it. Domains will not function correctly until the domain has been verified. See https://www.mailslurp.com/guides/custom-domains for help. Domains can be either `HTTP` or `SMTP` type. The type of domain determines which inboxes can be used with it. `SMTP` inboxes use a mail server running `mx.mailslurp.com` while `HTTP` inboxes are handled by AWS SES.
* @export
* @interface CreateDomainOptions
*/
export interface CreateDomainOptions {
/**
* The top level domain you wish to use with MailSlurp. Do not specify subdomain just the top level. So `test.com` covers all subdomains such as `mail.test.com`. Don't include a protocol such as `http://`. Once added you must complete the verification steps by adding the returned records to your domain.
* @type {string}
* @memberof CreateDomainOptions
*/
domain: string;
/**
* Optional description of the domain.
* @type {string}
* @memberof CreateDomainOptions
*/
description?: string | null;
/**
* Whether to create a catch all inbox for the domain. Any email sent to an address using your domain that cannot be matched to an existing inbox you created with the domain will be routed to the created catch all inbox. You can access emails using the regular methods on this inbox ID.
* @type {boolean}
* @memberof CreateDomainOptions
*/
createdCatchAllInbox?: boolean | null;
/**
* Type of domain. Dictates type of inbox that can be created with domain. HTTP means inboxes are processed using SES while SMTP inboxes use a custom SMTP mail server. SMTP does not support sending so use HTTP for sending emails.
* @type {string}
* @memberof CreateDomainOptions
*/
domainType?: CreateDomainOptionsDomainTypeEnum;
}
/**
* @export
* @enum {string}
*/
export enum CreateDomainOptionsDomainTypeEnum {
HTTP_INBOX = 'HTTP_INBOX',
SMTP_DOMAIN = 'SMTP_DOMAIN',
}
export function CreateDomainOptionsFromJSON(json: any): CreateDomainOptions {
return CreateDomainOptionsFromJSONTyped(json, false);
}
export function CreateDomainOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): CreateDomainOptions {
if (json === undefined || json === null) {
return json;
}
return {
domain: json['domain'],
description: !exists(json, 'description') ? undefined : json['description'],
createdCatchAllInbox: !exists(json, 'createdCatchAllInbox')
? undefined
: json['createdCatchAllInbox'],
domainType: !exists(json, 'domainType') ? undefined : json['domainType'],
};
}
export function CreateDomainOptionsToJSON(
value?: CreateDomainOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
domain: value.domain,
description: value.description,
createdCatchAllInbox: value.createdCatchAllInbox,
domainType: value.domainType,
};
}
/* 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 creating an email contact in address book
* @export
* @interface CreateContactOptions
*/
export interface CreateContactOptions {
/**
*
* @type {string}
* @memberof CreateContactOptions
*/
firstName?: string | null;
/**
*
* @type {string}
* @memberof CreateContactOptions
*/
lastName?: string | null;
/**
*
* @type {string}
* @memberof CreateContactOptions
*/
company?: string | null;
/**
* Set of email addresses belonging to the contact
* @type {Array<string>}
* @memberof CreateContactOptions
*/
emailAddresses?: Array<string> | null;
/**
* Tags that can be used to search and group contacts
* @type {Array<string>}
* @memberof CreateContactOptions
*/
tags?: Array<string> | null;
/**
*
* @type {object}
* @memberof CreateContactOptions
*/
metaData?: object | null;
/**
* Has the user explicitly or implicitly opted out of being contacted? If so MailSlurp will ignore them in all actions.
* @type {boolean}
* @memberof CreateContactOptions
*/
optOut?: boolean | null;
/**
* Group IDs that contact belongs to
* @type {string}
* @memberof CreateContactOptions
*/
groupId?: string | null;
/**
* Whether to validate contact email address exists
* @type {boolean}
* @memberof CreateContactOptions
*/
verifyEmailAddresses?: boolean | null;
}
export function CreateContactOptionsFromJSON(json: any): CreateContactOptions {
return CreateContactOptionsFromJSONTyped(json, false);
}
export function CreateContactOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): CreateContactOptions {
if (json === undefined || json === null) {
return json;
}
return {
firstName: !exists(json, 'firstName') ? undefined : json['firstName'],
lastName: !exists(json, 'lastName') ? undefined : json['lastName'],
company: !exists(json, 'company') ? undefined : json['company'],
emailAddresses: !exists(json, 'emailAddresses')
? undefined
: json['emailAddresses'],
tags: !exists(json, 'tags') ? undefined : json['tags'],
metaData: !exists(json, 'metaData') ? undefined : json['metaData'],
optOut: !exists(json, 'optOut') ? undefined : json['optOut'],
groupId: !exists(json, 'groupId') ? undefined : json['groupId'],
verifyEmailAddresses: !exists(json, 'verifyEmailAddresses')
? undefined
: json['verifyEmailAddresses'],
};
}
export function CreateContactOptionsToJSON(
value?: CreateContactOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
firstName: value.firstName,
lastName: value.lastName,
company: value.company,
emailAddresses: value.emailAddresses,
tags: value.tags,
metaData: value.metaData,
optOut: value.optOut,
groupId: value.groupId,
verifyEmailAddresses: value.verifyEmailAddresses,
};
}
/* 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';
/**
*
* @export
* @interface CreateConnectorSmtpConnectionOptions
*/
export interface CreateConnectorSmtpConnectionOptions {
/**
*
* @type {boolean}
* @memberof CreateConnectorSmtpConnectionOptions
*/
enabled?: boolean;
/**
*
* @type {string}
* @memberof CreateConnectorSmtpConnectionOptions
*/
smtpHost: string;
/**
*
* @type {number}
* @memberof CreateConnectorSmtpConnectionOptions
*/
smtpPort?: number;
/**
*
* @type {boolean}
* @memberof CreateConnectorSmtpConnectionOptions
*/
smtpSsl?: boolean;
/**
*
* @type {string}
* @memberof CreateConnectorSmtpConnectionOptions
*/
smtpUsername?: string;
/**
*
* @type {string}
* @memberof CreateConnectorSmtpConnectionOptions
*/
smtpPassword?: string;
}
export function CreateConnectorSmtpConnectionOptionsFromJSON(
json: any
): CreateConnectorSmtpConnectionOptions {
return CreateConnectorSmtpConnectionOptionsFromJSONTyped(json, false);
}
export function CreateConnectorSmtpConnectionOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): CreateConnectorSmtpConnectionOptions {
if (json === undefined || json === null) {
return json;
}
return {
enabled: !exists(json, 'enabled') ? undefined : json['enabled'],
smtpHost: json['smtpHost'],
smtpPort: !exists(json, 'smtpPort') ? undefined : json['smtpPort'],
smtpSsl: !exists(json, 'smtpSsl') ? undefined : json['smtpSsl'],
smtpUsername: !exists(json, 'smtpUsername')
? undefined
: json['smtpUsername'],
smtpPassword: !exists(json, 'smtpPassword')
? undefined
: json['smtpPassword'],
};
}
export function CreateConnectorSmtpConnectionOptionsToJSON(
value?: CreateConnectorSmtpConnectionOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
enabled: value.enabled,
smtpHost: value.smtpHost,
smtpPort: value.smtpPort,
smtpSsl: value.smtpSsl,
smtpUsername: value.smtpUsername,
smtpPassword: value.smtpPassword,
};
}
/* 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 creating an inbox connection with an external mail provider
* @export
* @interface CreateConnectorOptions
*/
export interface CreateConnectorOptions {
/**
* Enable automatic background sync
* @type {boolean}
* @memberof CreateConnectorOptions
*/
syncEnabled?: boolean | null;
/**
* Sync schedule type
* @type {string}
* @memberof CreateConnectorOptions
*/
syncScheduleType?: CreateConnectorOptionsSyncScheduleTypeEnum;
/**
* Sync interval in minutes
* @type {number}
* @memberof CreateConnectorOptions
*/
syncInterval?: number | null;
/**
* Name of connector
* @type {string}
* @memberof CreateConnectorOptions
*/
name?: string | null;
/**
* Email address of external inbox
* @type {string}
* @memberof CreateConnectorOptions
*/
emailAddress?: string | null;
/**
* Is connector enabled
* @type {boolean}
* @memberof CreateConnectorOptions
*/
enabled?: boolean | null;
}
/**
* @export
* @enum {string}
*/
export enum CreateConnectorOptionsSyncScheduleTypeEnum {
INTERVAL = 'INTERVAL',
}
export function CreateConnectorOptionsFromJSON(
json: any
): CreateConnectorOptions {
return CreateConnectorOptionsFromJSONTyped(json, false);
}
export function CreateConnectorOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): CreateConnectorOptions {
if (json === undefined || json === null) {
return json;
}
return {
syncEnabled: !exists(json, 'syncEnabled') ? undefined : json['syncEnabled'],
syncScheduleType: !exists(json, 'syncScheduleType')
? undefined
: json['syncScheduleType'],
syncInterval: !exists(json, 'syncInterval')
? undefined
: json['syncInterval'],
name: !exists(json, 'name') ? undefined : json['name'],
emailAddress: !exists(json, 'emailAddress')
? undefined
: json['emailAddress'],
enabled: !exists(json, 'enabled') ? undefined : json['enabled'],
};
}
export function CreateConnectorOptionsToJSON(
value?: CreateConnectorOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
syncEnabled: value.syncEnabled,
syncScheduleType: value.syncScheduleType,
syncInterval: value.syncInterval,
name: value.name,
emailAddress: value.emailAddress,
enabled: value.enabled,
};
}
/* 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 IMAP connection to external email inbox. Allows syncing emails iva IMAP.
* @export
* @interface CreateConnectorImapConnectionOptions
*/
export interface CreateConnectorImapConnectionOptions {
/**
*
* @type {boolean}
* @memberof CreateConnectorImapConnectionOptions
*/
imapSsl?: boolean | null;
/**
*
* @type {string}
* @memberof CreateConnectorImapConnectionOptions
*/
imapUsername?: string | null;
/**
*
* @type {string}
* @memberof CreateConnectorImapConnectionOptions
*/
imapPassword?: string | null;
/**
* Optional folder to select during IMAP connection
* @type {string}
* @memberof CreateConnectorImapConnectionOptions
*/
selectFolder?: string | null;
/**
*
* @type {string}
* @memberof CreateConnectorImapConnectionOptions
*/
searchTerms?: string | null;
/**
* IMAP server port
* @type {number}
* @memberof CreateConnectorImapConnectionOptions
*/
imapPort?: number | null;
/**
* IMAP server host
* @type {string}
* @memberof CreateConnectorImapConnectionOptions
*/
imapHost: string;
/**
* IMAP server enabled
* @type {boolean}
* @memberof CreateConnectorImapConnectionOptions
*/
enabled?: boolean | null;
}
export function CreateConnectorImapConnectionOptionsFromJSON(
json: any
): CreateConnectorImapConnectionOptions {
return CreateConnectorImapConnectionOptionsFromJSONTyped(json, false);
}
export function CreateConnectorImapConnectionOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): CreateConnectorImapConnectionOptions {
if (json === undefined || json === null) {
return json;
}
return {
imapSsl: !exists(json, 'imapSsl') ? undefined : json['imapSsl'],
imapUsername: !exists(json, 'imapUsername')
? undefined
: json['imapUsername'],
imapPassword: !exists(json, 'imapPassword')
? undefined
: json['imapPassword'],
selectFolder: !exists(json, 'selectFolder')
? undefined
: json['selectFolder'],
searchTerms: !exists(json, 'searchTerms') ? undefined : json['searchTerms'],
imapPort: !exists(json, 'imapPort') ? undefined : json['imapPort'],
imapHost: json['imapHost'],
enabled: !exists(json, 'enabled') ? undefined : json['enabled'],
};
}
export function CreateConnectorImapConnectionOptionsToJSON(
value?: CreateConnectorImapConnectionOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
imapSsl: value.imapSsl,
imapUsername: value.imapUsername,
imapPassword: value.imapPassword,
selectFolder: value.selectFolder,
searchTerms: value.searchTerms,
imapPort: value.imapPort,
imapHost: value.imapHost,
enabled: value.enabled,
};
}
/* 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';
/**
* Create email alias options. Email aliases can be used to mask real email addresses behind an ID. You can also attach an inbox to an alias so that any email received by the inbox email address if forwarded to the alias email address.
* @export
* @interface CreateAliasOptions
*/
export interface CreateAliasOptions {
/**
* Email address to be hidden behind alias. Emails sent to the alias email address will be forwarded to this address. If you want to enable replies set useThreads true and the reply-to for the email will allow outbound communication via a thread. Some email addresses may require verification if they are not added as a contact first.
* @type {string}
* @memberof CreateAliasOptions
*/
emailAddress: string;
/**
* Optional inbox ID to attach to alias. Null by default means an a new inbox will be created for the alias. Use a custom inbox to control what email address the alias uses. To use custom email addresses create a domain and an inbox, the use the inbox ID with this call. Emails received by this inbox will be forwarded to the alias email address
* @type {string}
* @memberof CreateAliasOptions
*/
inboxId?: string | null;
/**
* Optional name for alias
* @type {string}
* @memberof CreateAliasOptions
*/
name?: string | null;
/**
* Enable threads options. If true emails will be sent with a unique reply-to thread address. This means you can reply to the forwarded email and it will be sent to the recipients via your alias address. That way a thread conversation is preserved.
* @type {boolean}
* @memberof CreateAliasOptions
*/
useThreads: boolean;
/**
* Custom domain ID to use when generating alias email addresses
* @type {string}
* @memberof CreateAliasOptions
*/
domainId?: string | null;
/**
* Whether to verify the masked email address exists before sending an email to it
* @type {boolean}
* @memberof CreateAliasOptions
*/
verifyEmailAddress?: boolean | null;
}
export function CreateAliasOptionsFromJSON(json: any): CreateAliasOptions {
return CreateAliasOptionsFromJSONTyped(json, false);
}
export function CreateAliasOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): CreateAliasOptions {
if (json === undefined || json === null) {
return json;
}
return {
emailAddress: json['emailAddress'],
inboxId: !exists(json, 'inboxId') ? undefined : json['inboxId'],
name: !exists(json, 'name') ? undefined : json['name'],
useThreads: json['useThreads'],
domainId: !exists(json, 'domainId') ? undefined : json['domainId'],
verifyEmailAddress: !exists(json, 'verifyEmailAddress')
? undefined
: json['verifyEmailAddress'],
};
}
export function CreateAliasOptionsToJSON(
value?: CreateAliasOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
emailAddress: value.emailAddress,
inboxId: value.inboxId,
name: value.name,
useThreads: value.useThreads,
domainId: value.domainId,
verifyEmailAddress: value.verifyEmailAddress,
};
}
/* 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';
/**
* Number of elements
* @export
* @interface CountDto
*/
export interface CountDto {
/**
*
* @type {number}
* @memberof CountDto
*/
totalElements: number;
}
export function CountDtoFromJSON(json: any): CountDto {
return CountDtoFromJSONTyped(json, false);
}
export function CountDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): CountDto {
if (json === undefined || json === null) {
return json;
}
return {
totalElements: json['totalElements'],
};
}
export function CountDtoToJSON(value?: CountDto | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
totalElements: value.totalElements,
};
}
/* 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 matching content using regex patterns based on Java Pattern syntax
* @export
* @interface ContentMatchOptions
*/
export interface ContentMatchOptions {
/**
* Java style regex pattern. Do not include the typical `/` at start or end of regex in some languages. Given an example `your code is: 12345` the pattern to extract match looks like `code is: (\d{6})`. This will return an array of matches with the first matching the entire pattern and the subsequent matching the groups: `['code is: 123456', '123456']` See https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html for more information of available patterns.
* @type {string}
* @memberof ContentMatchOptions
*/
pattern: string;
}
export function ContentMatchOptionsFromJSON(json: any): ContentMatchOptions {
return ContentMatchOptionsFromJSONTyped(json, false);
}
export function ContentMatchOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ContentMatchOptions {
if (json === undefined || json === null) {
return json;
}
return {
pattern: json['pattern'],
};
}
export function ContentMatchOptionsToJSON(
value?: ContentMatchOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
pattern: value.pattern,
};
}
/* 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';
/**
* Email contact for address book
* @export
* @interface ContactProjection
*/
export interface ContactProjection {
/**
*
* @type {Date}
* @memberof ContactProjection
*/
createdAt: Date;
/**
*
* @type {string}
* @memberof ContactProjection
*/
emailAddress?: string | null;
/**
*
* @type {Array<string>}
* @memberof ContactProjection
*/
emailAddresses?: Array<string> | null;
/**
*
* @type {string}
* @memberof ContactProjection
*/
firstName?: string | null;
/**
*
* @type {string}
* @memberof ContactProjection
*/
lastName?: string | null;
/**
*
* @type {string}
* @memberof ContactProjection
*/
company?: string | null;
/**
*
* @type {boolean}
* @memberof ContactProjection
*/
optOut?: boolean | null;
/**
*
* @type {string}
* @memberof ContactProjection
*/
id: string;
/**
*
* @type {string}
* @memberof ContactProjection
*/
groupId?: string | null;
}
export function ContactProjectionFromJSON(json: any): ContactProjection {
return ContactProjectionFromJSONTyped(json, false);
}
export function ContactProjectionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ContactProjection {
if (json === undefined || json === null) {
return json;
}
return {
createdAt: new Date(json['createdAt']),
emailAddress: !exists(json, 'emailAddress')
? undefined
: json['emailAddress'],
emailAddresses: !exists(json, 'emailAddresses')
? undefined
: json['emailAddresses'],
firstName: !exists(json, 'firstName') ? undefined : json['firstName'],
lastName: !exists(json, 'lastName') ? undefined : json['lastName'],
company: !exists(json, 'company') ? undefined : json['company'],
optOut: !exists(json, 'optOut') ? undefined : json['optOut'],
id: json['id'],
groupId: !exists(json, 'groupId') ? undefined : json['groupId'],
};
}
export function ContactProjectionToJSON(value?: ContactProjection | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
createdAt: value.createdAt.toISOString(),
emailAddress: value.emailAddress,
emailAddresses: value.emailAddresses,
firstName: value.firstName,
lastName: value.lastName,
company: value.company,
optOut: value.optOut,
id: value.id,
groupId: value.groupId,
};
}
/* 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';
/**
* Contact object. For saving a user in contact book.
* @export
* @interface ContactDto
*/
export interface ContactDto {
/**
*
* @type {string}
* @memberof ContactDto
*/
id: string;
/**
*
* @type {string}
* @memberof ContactDto
*/
groupId?: string | null;
/**
*
* @type {string}
* @memberof ContactDto
*/
firstName?: string | null;
/**
*
* @type {string}
* @memberof ContactDto
*/
lastName?: string | null;
/**
*
* @type {string}
* @memberof ContactDto
*/
company?: string | null;
/**
*
* @type {Array<string>}
* @memberof ContactDto
*/
emailAddresses: Array<string>;
/**
*
* @type {string}
* @memberof ContactDto
*/
primaryEmailAddress?: string | null;
/**
*
* @type {Array<string>}
* @memberof ContactDto
*/
tags: Array<string>;
/**
*
* @type {object}
* @memberof ContactDto
*/
metaData?: object | null;
/**
*
* @type {boolean}
* @memberof ContactDto
*/
optOut?: boolean | null;
/**
*
* @type {Date}
* @memberof ContactDto
*/
createdAt: Date;
}
export function ContactDtoFromJSON(json: any): ContactDto {
return ContactDtoFromJSONTyped(json, false);
}
export function ContactDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ContactDto {
if (json === undefined || json === null) {
return json;
}
return {
id: json['id'],
groupId: !exists(json, 'groupId') ? undefined : json['groupId'],
firstName: !exists(json, 'firstName') ? undefined : json['firstName'],
lastName: !exists(json, 'lastName') ? undefined : json['lastName'],
company: !exists(json, 'company') ? undefined : json['company'],
emailAddresses: json['emailAddresses'],
primaryEmailAddress: !exists(json, 'primaryEmailAddress')
? undefined
: json['primaryEmailAddress'],
tags: json['tags'],
metaData: !exists(json, 'metaData') ? undefined : json['metaData'],
optOut: !exists(json, 'optOut') ? undefined : json['optOut'],
createdAt: new Date(json['createdAt']),
};
}
export function ContactDtoToJSON(value?: ContactDto | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
groupId: value.groupId,
firstName: value.firstName,
lastName: value.lastName,
company: value.company,
emailAddresses: value.emailAddresses,
primaryEmailAddress: value.primaryEmailAddress,
tags: value.tags,
metaData: value.metaData,
optOut: value.optOut,
createdAt: value.createdAt.toISOString(),
};
}
/* 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';
/**
*
* @export
* @interface ConnectorSyncResult
*/
export interface ConnectorSyncResult {
/**
*
* @type {number}
* @memberof ConnectorSyncResult
*/
emailSyncCount: number;
/**
*
* @type {Array<string>}
* @memberof ConnectorSyncResult
*/
logLines?: Array<string>;
}
export function ConnectorSyncResultFromJSON(json: any): ConnectorSyncResult {
return ConnectorSyncResultFromJSONTyped(json, false);
}
export function ConnectorSyncResultFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ConnectorSyncResult {
if (json === undefined || json === null) {
return json;
}
return {
emailSyncCount: json['emailSyncCount'],
logLines: !exists(json, 'logLines') ? undefined : json['logLines'],
};
}
export function ConnectorSyncResultToJSON(
value?: ConnectorSyncResult | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
emailSyncCount: value.emailSyncCount,
logLines: value.logLines,
};
}
/* 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';
/**
*
* @export
* @interface ConnectorSyncRequestResultExceptionCauseStackTrace
*/
export interface ConnectorSyncRequestResultExceptionCauseStackTrace {
/**
*
* @type {string}
* @memberof ConnectorSyncRequestResultExceptionCauseStackTrace
*/
classLoaderName?: string;
/**
*
* @type {string}
* @memberof ConnectorSyncRequestResultExceptionCauseStackTrace
*/
moduleName?: string;
/**
*
* @type {string}
* @memberof ConnectorSyncRequestResultExceptionCauseStackTrace
*/
moduleVersion?: string;
/**
*
* @type {string}
* @memberof ConnectorSyncRequestResultExceptionCauseStackTrace
*/
methodName?: string;
/**
*
* @type {string}
* @memberof ConnectorSyncRequestResultExceptionCauseStackTrace
*/
fileName?: string;
/**
*
* @type {number}
* @memberof ConnectorSyncRequestResultExceptionCauseStackTrace
*/
lineNumber?: number;
/**
*
* @type {string}
* @memberof ConnectorSyncRequestResultExceptionCauseStackTrace
*/
className?: string;
/**
*
* @type {boolean}
* @memberof ConnectorSyncRequestResultExceptionCauseStackTrace
*/
nativeMethod?: boolean;
}
export function ConnectorSyncRequestResultExceptionCauseStackTraceFromJSON(
json: any
): ConnectorSyncRequestResultExceptionCauseStackTrace {
return ConnectorSyncRequestResultExceptionCauseStackTraceFromJSONTyped(
json,
false
);
}
export function ConnectorSyncRequestResultExceptionCauseStackTraceFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ConnectorSyncRequestResultExceptionCauseStackTrace {
if (json === undefined || json === null) {
return json;
}
return {
classLoaderName: !exists(json, 'classLoaderName')
? undefined
: json['classLoaderName'],
moduleName: !exists(json, 'moduleName') ? undefined : json['moduleName'],
moduleVersion: !exists(json, 'moduleVersion')
? undefined
: json['moduleVersion'],
methodName: !exists(json, 'methodName') ? undefined : json['methodName'],
fileName: !exists(json, 'fileName') ? undefined : json['fileName'],
lineNumber: !exists(json, 'lineNumber') ? undefined : json['lineNumber'],
className: !exists(json, 'className') ? undefined : json['className'],
nativeMethod: !exists(json, 'nativeMethod')
? undefined
: json['nativeMethod'],
};
}
export function ConnectorSyncRequestResultExceptionCauseStackTraceToJSON(
value?: ConnectorSyncRequestResultExceptionCauseStackTrace | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
classLoaderName: value.classLoaderName,
moduleName: value.moduleName,
moduleVersion: value.moduleVersion,
methodName: value.methodName,
fileName: value.fileName,
lineNumber: value.lineNumber,
className: value.className,
nativeMethod: value.nativeMethod,
};
}
/* 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';
import {
ConnectorSyncRequestResultExceptionCauseStackTrace,
ConnectorSyncRequestResultExceptionCauseStackTraceFromJSON,
ConnectorSyncRequestResultExceptionCauseStackTraceFromJSONTyped,
ConnectorSyncRequestResultExceptionCauseStackTraceToJSON,
} from './';
/**
*
* @export
* @interface ConnectorSyncRequestResultExceptionCause
*/
export interface ConnectorSyncRequestResultExceptionCause {
/**
*
* @type {Array<ConnectorSyncRequestResultExceptionCauseStackTrace>}
* @memberof ConnectorSyncRequestResultExceptionCause
*/
stackTrace?: Array<ConnectorSyncRequestResultExceptionCauseStackTrace>;
/**
*
* @type {string}
* @memberof ConnectorSyncRequestResultExceptionCause
*/
message?: string;
/**
*
* @type {string}
* @memberof ConnectorSyncRequestResultExceptionCause
*/
localizedMessage?: string;
}
export function ConnectorSyncRequestResultExceptionCauseFromJSON(
json: any
): ConnectorSyncRequestResultExceptionCause {
return ConnectorSyncRequestResultExceptionCauseFromJSONTyped(json, false);
}
export function ConnectorSyncRequestResultExceptionCauseFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ConnectorSyncRequestResultExceptionCause {
if (json === undefined || json === null) {
return json;
}
return {
stackTrace: !exists(json, 'stackTrace')
? undefined
: (json['stackTrace'] as Array<any>).map(
ConnectorSyncRequestResultExceptionCauseStackTraceFromJSON
),
message: !exists(json, 'message') ? undefined : json['message'],
localizedMessage: !exists(json, 'localizedMessage')
? undefined
: json['localizedMessage'],
};
}
export function ConnectorSyncRequestResultExceptionCauseToJSON(
value?: ConnectorSyncRequestResultExceptionCause | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
stackTrace:
value.stackTrace === undefined
? undefined
: (value.stackTrace as Array<any>).map(
ConnectorSyncRequestResultExceptionCauseStackTraceToJSON
),
message: value.message,
localizedMessage: value.localizedMessage,
};
}
/* 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';
import {
ConnectorSyncRequestResultExceptionCause,
ConnectorSyncRequestResultExceptionCauseFromJSON,
ConnectorSyncRequestResultExceptionCauseFromJSONTyped,
ConnectorSyncRequestResultExceptionCauseToJSON,
ConnectorSyncRequestResultExceptionCauseStackTrace,
ConnectorSyncRequestResultExceptionCauseStackTraceFromJSON,
ConnectorSyncRequestResultExceptionCauseStackTraceFromJSONTyped,
ConnectorSyncRequestResultExceptionCauseStackTraceToJSON,
} from './';
/**
*
* @export
* @interface ConnectorSyncRequestResultException
*/
export interface ConnectorSyncRequestResultException {
/**
*
* @type {ConnectorSyncRequestResultExceptionCause}
* @memberof ConnectorSyncRequestResultException
*/
cause?: ConnectorSyncRequestResultExceptionCause;
/**
*
* @type {Array<ConnectorSyncRequestResultExceptionCauseStackTrace>}
* @memberof ConnectorSyncRequestResultException
*/
stackTrace?: Array<ConnectorSyncRequestResultExceptionCauseStackTrace>;
/**
*
* @type {string}
* @memberof ConnectorSyncRequestResultException
*/
message?: string;
/**
*
* @type {Array<ConnectorSyncRequestResultExceptionCause>}
* @memberof ConnectorSyncRequestResultException
*/
suppressed?: Array<ConnectorSyncRequestResultExceptionCause>;
/**
*
* @type {string}
* @memberof ConnectorSyncRequestResultException
*/
localizedMessage?: string;
}
export function ConnectorSyncRequestResultExceptionFromJSON(
json: any
): ConnectorSyncRequestResultException {
return ConnectorSyncRequestResultExceptionFromJSONTyped(json, false);
}
export function ConnectorSyncRequestResultExceptionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ConnectorSyncRequestResultException {
if (json === undefined || json === null) {
return json;
}
return {
cause: !exists(json, 'cause')
? undefined
: ConnectorSyncRequestResultExceptionCauseFromJSON(json['cause']),
stackTrace: !exists(json, 'stackTrace')
? undefined
: (json['stackTrace'] as Array<any>).map(
ConnectorSyncRequestResultExceptionCauseStackTraceFromJSON
),
message: !exists(json, 'message') ? undefined : json['message'],
suppressed: !exists(json, 'suppressed')
? undefined
: (json['suppressed'] as Array<any>).map(
ConnectorSyncRequestResultExceptionCauseFromJSON
),
localizedMessage: !exists(json, 'localizedMessage')
? undefined
: json['localizedMessage'],
};
}
export function ConnectorSyncRequestResultExceptionToJSON(
value?: ConnectorSyncRequestResultException | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
cause: ConnectorSyncRequestResultExceptionCauseToJSON(value.cause),
stackTrace:
value.stackTrace === undefined
? undefined
: (value.stackTrace as Array<any>).map(
ConnectorSyncRequestResultExceptionCauseStackTraceToJSON
),
message: value.message,
suppressed:
value.suppressed === undefined
? undefined
: (value.suppressed as Array<any>).map(
ConnectorSyncRequestResultExceptionCauseToJSON
),
localizedMessage: value.localizedMessage,
};
}
/* 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';
import {
ConnectorSyncRequestResultException,
ConnectorSyncRequestResultExceptionFromJSON,
ConnectorSyncRequestResultExceptionFromJSONTyped,
ConnectorSyncRequestResultExceptionToJSON,
ConnectorSyncResult,
ConnectorSyncResultFromJSON,
ConnectorSyncResultFromJSONTyped,
ConnectorSyncResultToJSON,
} from './';
/**
*
* @export
* @interface ConnectorSyncRequestResult
*/
export interface ConnectorSyncRequestResult {
/**
*
* @type {ConnectorSyncResult}
* @memberof ConnectorSyncRequestResult
*/
syncResult?: ConnectorSyncResult;
/**
*
* @type {ConnectorSyncRequestResultException}
* @memberof ConnectorSyncRequestResult
*/
exception?: ConnectorSyncRequestResultException;
/**
*
* @type {string}
* @memberof ConnectorSyncRequestResult
*/
eventId?: string;
}
export function ConnectorSyncRequestResultFromJSON(
json: any
): ConnectorSyncRequestResult {
return ConnectorSyncRequestResultFromJSONTyped(json, false);
}
export function ConnectorSyncRequestResultFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ConnectorSyncRequestResult {
if (json === undefined || json === null) {
return json;
}
return {
syncResult: !exists(json, 'syncResult')
? undefined
: ConnectorSyncResultFromJSON(json['syncResult']),
exception: !exists(json, 'exception')
? undefined
: ConnectorSyncRequestResultExceptionFromJSON(json['exception']),
eventId: !exists(json, 'eventId') ? undefined : json['eventId'],
};
}
export function ConnectorSyncRequestResultToJSON(
value?: ConnectorSyncRequestResult | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
syncResult: ConnectorSyncResultToJSON(value.syncResult),
exception: ConnectorSyncRequestResultExceptionToJSON(value.exception),
eventId: value.eventId,
};
}
/* 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';
/**
* ConnectorSyncEventProjection
* @export
* @interface ConnectorSyncEventProjection
*/
export interface ConnectorSyncEventProjection {
/**
*
* @type {Date}
* @memberof ConnectorSyncEventProjection
*/
createdAt: Date;
/**
*
* @type {string}
* @memberof ConnectorSyncEventProjection
*/
connectorId: string;
/**
*
* @type {number}
* @memberof ConnectorSyncEventProjection
*/
syncCount: number;
/**
*
* @type {string}
* @memberof ConnectorSyncEventProjection
*/
syncStatus: ConnectorSyncEventProjectionSyncStatusEnum;
/**
*
* @type {string}
* @memberof ConnectorSyncEventProjection
*/
message?: string;
/**
*
* @type {string}
* @memberof ConnectorSyncEventProjection
*/
id?: string;
}
/**
* @export
* @enum {string}
*/
export enum ConnectorSyncEventProjectionSyncStatusEnum {
SUCCESS = 'SUCCESS',
INTERNAL_ERROR = 'INTERNAL_ERROR',
SUBSCRIPTION_ERROR = 'SUBSCRIPTION_ERROR',
CONNECTION_ERROR = 'CONNECTION_ERROR',
NOT_FOUND = 'NOT_FOUND',
}
export function ConnectorSyncEventProjectionFromJSON(
json: any
): ConnectorSyncEventProjection {
return ConnectorSyncEventProjectionFromJSONTyped(json, false);
}
export function ConnectorSyncEventProjectionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ConnectorSyncEventProjection {
if (json === undefined || json === null) {
return json;
}
return {
createdAt: new Date(json['createdAt']),
connectorId: json['connectorId'],
syncCount: json['syncCount'],
syncStatus: json['syncStatus'],
message: !exists(json, 'message') ? undefined : json['message'],
id: !exists(json, 'id') ? undefined : json['id'],
};
}
export function ConnectorSyncEventProjectionToJSON(
value?: ConnectorSyncEventProjection | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
createdAt: value.createdAt.toISOString(),
connectorId: value.connectorId,
syncCount: value.syncCount,
syncStatus: value.syncStatus,
message: value.message,
id: value.id,
};
}
/* 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';
/**
*
* @export
* @interface ConnectorSyncEventDto
*/
export interface ConnectorSyncEventDto {
/**
*
* @type {string}
* @memberof ConnectorSyncEventDto
*/
id: string;
/**
*
* @type {string}
* @memberof ConnectorSyncEventDto
*/
connectorId: string;
/**
*
* @type {string}
* @memberof ConnectorSyncEventDto
*/
syncStatus: ConnectorSyncEventDtoSyncStatusEnum;
/**
*
* @type {number}
* @memberof ConnectorSyncEventDto
*/
syncCount: number;
/**
*
* @type {string}
* @memberof ConnectorSyncEventDto
*/
message?: string;
/**
*
* @type {Date}
* @memberof ConnectorSyncEventDto
*/
createdAt: Date;
}
/**
* @export
* @enum {string}
*/
export enum ConnectorSyncEventDtoSyncStatusEnum {
SUCCESS = 'SUCCESS',
INTERNAL_ERROR = 'INTERNAL_ERROR',
SUBSCRIPTION_ERROR = 'SUBSCRIPTION_ERROR',
CONNECTION_ERROR = 'CONNECTION_ERROR',
NOT_FOUND = 'NOT_FOUND',
}
export function ConnectorSyncEventDtoFromJSON(
json: any
): ConnectorSyncEventDto {
return ConnectorSyncEventDtoFromJSONTyped(json, false);
}
export function ConnectorSyncEventDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ConnectorSyncEventDto {
if (json === undefined || json === null) {
return json;
}
return {
id: json['id'],
connectorId: json['connectorId'],
syncStatus: json['syncStatus'],
syncCount: json['syncCount'],
message: !exists(json, 'message') ? undefined : json['message'],
createdAt: new Date(json['createdAt']),
};
}
export function ConnectorSyncEventDtoToJSON(
value?: ConnectorSyncEventDto | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
connectorId: value.connectorId,
syncStatus: value.syncStatus,
syncCount: value.syncCount,
message: value.message,
createdAt: value.createdAt.toISOString(),
};
}
/* 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';
/**
*
* @export
* @interface ConnectorSmtpConnectionDto
*/
export interface ConnectorSmtpConnectionDto {
/**
*
* @type {string}
* @memberof ConnectorSmtpConnectionDto
*/
connectorId: string;
/**
*
* @type {string}
* @memberof ConnectorSmtpConnectionDto
*/
smtpHost?: string;
/**
*
* @type {number}
* @memberof ConnectorSmtpConnectionDto
*/
smtpPort?: number;
/**
*
* @type {string}
* @memberof ConnectorSmtpConnectionDto
*/
smtpUsername?: string;
/**
*
* @type {string}
* @memberof ConnectorSmtpConnectionDto
*/
smtpPassword?: string;
/**
*
* @type {boolean}
* @memberof ConnectorSmtpConnectionDto
*/
smtpSsl?: boolean;
/**
*
* @type {boolean}
* @memberof ConnectorSmtpConnectionDto
*/
enabled?: boolean;
/**
*
* @type {Date}
* @memberof ConnectorSmtpConnectionDto
*/
createdAt: Date;
/**
*
* @type {string}
* @memberof ConnectorSmtpConnectionDto
*/
id: string;
}
export function ConnectorSmtpConnectionDtoFromJSON(
json: any
): ConnectorSmtpConnectionDto {
return ConnectorSmtpConnectionDtoFromJSONTyped(json, false);
}
export function ConnectorSmtpConnectionDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ConnectorSmtpConnectionDto {
if (json === undefined || json === null) {
return json;
}
return {
connectorId: json['connectorId'],
smtpHost: !exists(json, 'smtpHost') ? undefined : json['smtpHost'],
smtpPort: !exists(json, 'smtpPort') ? undefined : json['smtpPort'],
smtpUsername: !exists(json, 'smtpUsername')
? undefined
: json['smtpUsername'],
smtpPassword: !exists(json, 'smtpPassword')
? undefined
: json['smtpPassword'],
smtpSsl: !exists(json, 'smtpSsl') ? undefined : json['smtpSsl'],
enabled: !exists(json, 'enabled') ? undefined : json['enabled'],
createdAt: new Date(json['createdAt']),
id: json['id'],
};
}
export function ConnectorSmtpConnectionDtoToJSON(
value?: ConnectorSmtpConnectionDto | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
connectorId: value.connectorId,
smtpHost: value.smtpHost,
smtpPort: value.smtpPort,
smtpUsername: value.smtpUsername,
smtpPassword: value.smtpPassword,
smtpSsl: value.smtpSsl,
enabled: value.enabled,
createdAt: value.createdAt.toISOString(),
id: value.id,
};
}
/* 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';
/**
* Connector
* @export
* @interface ConnectorProjection
*/
export interface ConnectorProjection {
/**
*
* @type {Date}
* @memberof ConnectorProjection
*/
createdAt: Date;
/**
*
* @type {boolean}
* @memberof ConnectorProjection
*/
enabled?: boolean;
/**
*
* @type {string}
* @memberof ConnectorProjection
*/
inboxId: string;
/**
*
* @type {string}
* @memberof ConnectorProjection
*/
userId: string;
/**
*
* @type {string}
* @memberof ConnectorProjection
*/
emailAddress?: string;
/**
*
* @type {boolean}
* @memberof ConnectorProjection
*/
syncEnabled?: boolean;
/**
*
* @type {string}
* @memberof ConnectorProjection
*/
syncScheduleType: ConnectorProjectionSyncScheduleTypeEnum;
/**
*
* @type {number}
* @memberof ConnectorProjection
*/
syncInterval?: number;
/**
*
* @type {string}
* @memberof ConnectorProjection
*/
name?: string;
/**
*
* @type {string}
* @memberof ConnectorProjection
*/
id?: string;
}
/**
* @export
* @enum {string}
*/
export enum ConnectorProjectionSyncScheduleTypeEnum {
INTERVAL = 'INTERVAL',
}
export function ConnectorProjectionFromJSON(json: any): ConnectorProjection {
return ConnectorProjectionFromJSONTyped(json, false);
}
export function ConnectorProjectionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ConnectorProjection {
if (json === undefined || json === null) {
return json;
}
return {
createdAt: new Date(json['createdAt']),
enabled: !exists(json, 'enabled') ? undefined : json['enabled'],
inboxId: json['inboxId'],
userId: json['userId'],
emailAddress: !exists(json, 'emailAddress')
? undefined
: json['emailAddress'],
syncEnabled: !exists(json, 'syncEnabled') ? undefined : json['syncEnabled'],
syncScheduleType: json['syncScheduleType'],
syncInterval: !exists(json, 'syncInterval')
? undefined
: json['syncInterval'],
name: !exists(json, 'name') ? undefined : json['name'],
id: !exists(json, 'id') ? undefined : json['id'],
};
}
export function ConnectorProjectionToJSON(
value?: ConnectorProjection | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
createdAt: value.createdAt.toISOString(),
enabled: value.enabled,
inboxId: value.inboxId,
userId: value.userId,
emailAddress: value.emailAddress,
syncEnabled: value.syncEnabled,
syncScheduleType: value.syncScheduleType,
syncInterval: value.syncInterval,
name: value.name,
id: value.id,
};
}
/* 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';
/**
*
* @export
* @interface ConnectorImapConnectionDto
*/
export interface ConnectorImapConnectionDto {
/**
*
* @type {string}
* @memberof ConnectorImapConnectionDto
*/
connectorId: string;
/**
*
* @type {string}
* @memberof ConnectorImapConnectionDto
*/
imapHost?: string;
/**
*
* @type {number}
* @memberof ConnectorImapConnectionDto
*/
imapPort?: number;
/**
*
* @type {string}
* @memberof ConnectorImapConnectionDto
*/
imapUsername?: string;
/**
*
* @type {string}
* @memberof ConnectorImapConnectionDto
*/
imapPassword?: string;
/**
*
* @type {boolean}
* @memberof ConnectorImapConnectionDto
*/
imapSsl?: boolean;
/**
*
* @type {string}
* @memberof ConnectorImapConnectionDto
*/
selectFolder?: string;
/**
*
* @type {string}
* @memberof ConnectorImapConnectionDto
*/
searchTerms?: string;
/**
*
* @type {boolean}
* @memberof ConnectorImapConnectionDto
*/
enabled?: boolean;
/**
*
* @type {Date}
* @memberof ConnectorImapConnectionDto
*/
createdAt: Date;
/**
*
* @type {string}
* @memberof ConnectorImapConnectionDto
*/
id: string;
}
export function ConnectorImapConnectionDtoFromJSON(
json: any
): ConnectorImapConnectionDto {
return ConnectorImapConnectionDtoFromJSONTyped(json, false);
}
export function ConnectorImapConnectionDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ConnectorImapConnectionDto {
if (json === undefined || json === null) {
return json;
}
return {
connectorId: json['connectorId'],
imapHost: !exists(json, 'imapHost') ? undefined : json['imapHost'],
imapPort: !exists(json, 'imapPort') ? undefined : json['imapPort'],
imapUsername: !exists(json, 'imapUsername')
? undefined
: json['imapUsername'],
imapPassword: !exists(json, 'imapPassword')
? undefined
: json['imapPassword'],
imapSsl: !exists(json, 'imapSsl') ? undefined : json['imapSsl'],
selectFolder: !exists(json, 'selectFolder')
? undefined
: json['selectFolder'],
searchTerms: !exists(json, 'searchTerms') ? undefined : json['searchTerms'],
enabled: !exists(json, 'enabled') ? undefined : json['enabled'],
createdAt: new Date(json['createdAt']),
id: json['id'],
};
}
export function ConnectorImapConnectionDtoToJSON(
value?: ConnectorImapConnectionDto | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
connectorId: value.connectorId,
imapHost: value.imapHost,
imapPort: value.imapPort,
imapUsername: value.imapUsername,
imapPassword: value.imapPassword,
imapSsl: value.imapSsl,
selectFolder: value.selectFolder,
searchTerms: value.searchTerms,
enabled: value.enabled,
createdAt: value.createdAt.toISOString(),
id: value.id,
};
}
/* 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';
/**
*
* @export
* @interface ConnectorDto
*/
export interface ConnectorDto {
/**
*
* @type {string}
* @memberof ConnectorDto
*/
id: string;
/**
*
* @type {string}
* @memberof ConnectorDto
*/
name?: string | null;
/**
*
* @type {boolean}
* @memberof ConnectorDto
*/
enabled: boolean;
/**
*
* @type {string}
* @memberof ConnectorDto
*/
userId: string;
/**
*
* @type {string}
* @memberof ConnectorDto
*/
inboxId: string;
/**
*
* @type {boolean}
* @memberof ConnectorDto
*/
syncEnabled: boolean;
/**
*
* @type {string}
* @memberof ConnectorDto
*/
syncScheduleType?: ConnectorDtoSyncScheduleTypeEnum;
/**
*
* @type {number}
* @memberof ConnectorDto
*/
syncInterval?: number | null;
/**
*
* @type {boolean}
* @memberof ConnectorDto
*/
hasImapConnection: boolean;
/**
*
* @type {boolean}
* @memberof ConnectorDto
*/
hasSmtpConnection: boolean;
/**
*
* @type {Date}
* @memberof ConnectorDto
*/
createdAt: Date;
}
/**
* @export
* @enum {string}
*/
export enum ConnectorDtoSyncScheduleTypeEnum {
INTERVAL = 'INTERVAL',
}
export function ConnectorDtoFromJSON(json: any): ConnectorDto {
return ConnectorDtoFromJSONTyped(json, false);
}
export function ConnectorDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ConnectorDto {
if (json === undefined || json === null) {
return json;
}
return {
id: json['id'],
name: !exists(json, 'name') ? undefined : json['name'],
enabled: json['enabled'],
userId: json['userId'],
inboxId: json['inboxId'],
syncEnabled: json['syncEnabled'],
syncScheduleType: !exists(json, 'syncScheduleType')
? undefined
: json['syncScheduleType'],
syncInterval: !exists(json, 'syncInterval')
? undefined
: json['syncInterval'],
hasImapConnection: json['hasImapConnection'],
hasSmtpConnection: json['hasSmtpConnection'],
createdAt: new Date(json['createdAt']),
};
}
export function ConnectorDtoToJSON(value?: ConnectorDto | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
name: value.name,
enabled: value.enabled,
userId: value.userId,
inboxId: value.inboxId,
syncEnabled: value.syncEnabled,
syncScheduleType: value.syncScheduleType,
syncInterval: value.syncInterval,
hasImapConnection: value.hasImapConnection,
hasSmtpConnection: value.hasSmtpConnection,
createdAt: value.createdAt.toISOString(),
};
}
/* 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 matching emails in an inbox based on a condition such as `HAS_ATTACHMENTS=TRUE`
* @export
* @interface ConditionOption
*/
export interface ConditionOption {
/**
* Condition of an email object that can be used to filter results
* @type {string}
* @memberof ConditionOption
*/
condition: ConditionOptionConditionEnum;
/**
* Expected condition value
* @type {string}
* @memberof ConditionOption
*/
value: ConditionOptionValueEnum;
}
/**
* @export
* @enum {string}
*/
export enum ConditionOptionConditionEnum {
HAS_ATTACHMENTS = 'HAS_ATTACHMENTS',
}
/**
* @export
* @enum {string}
*/
export enum ConditionOptionValueEnum {
TRUE = 'TRUE',
FALSE = 'FALSE',
}
export function ConditionOptionFromJSON(json: any): ConditionOption {
return ConditionOptionFromJSONTyped(json, false);
}
export function ConditionOptionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): ConditionOption {
if (json === undefined || json === null) {
return json;
}
return {
condition: json['condition'],
value: json['value'],
};
}
export function ConditionOptionToJSON(value?: ConditionOption | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
condition: value.condition,
value: value.value,
};
}
/* 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';
/**
*
* @export
* @interface Complaint
*/
export interface Complaint {
/**
*
* @type {string}
* @memberof Complaint
*/
id: string;
/**
*
* @type {string}
* @memberof Complaint
*/
userId?: string;
/**
*
* @type {string}
* @memberof Complaint
*/
eventType?: string;
/**
*
* @type {string}
* @memberof Complaint
*/
mailSource?: string;
/**
*
* @type {string}
* @memberof Complaint
*/
mailMessageId?: string;
/**
*
* @type {string}
* @memberof Complaint
*/
complaintRecipient: string;
/**
*
* @type {Date}
* @memberof Complaint
*/
createdAt: Date;
/**
*
* @type {Date}
* @memberof Complaint
*/
updatedAt: Date;
}
export function ComplaintFromJSON(json: any): Complaint {
return ComplaintFromJSONTyped(json, false);
}
export function ComplaintFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): Complaint {
if (json === undefined || json === null) {
return json;
}
return {
id: json['id'],
userId: !exists(json, 'userId') ? undefined : json['userId'],
eventType: !exists(json, 'eventType') ? undefined : json['eventType'],
mailSource: !exists(json, 'mailSource') ? undefined : json['mailSource'],
mailMessageId: !exists(json, 'mailMessageId')
? undefined
: json['mailMessageId'],
complaintRecipient: json['complaintRecipient'],
createdAt: new Date(json['createdAt']),
updatedAt: new Date(json['updatedAt']),
};
}
export function ComplaintToJSON(value?: Complaint | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
userId: value.userId,
eventType: value.eventType,
mailSource: value.mailSource,
mailMessageId: value.mailMessageId,
complaintRecipient: value.complaintRecipient,
createdAt: value.createdAt.toISOString(),
updatedAt: value.updatedAt.toISOString(),
};
}
/* 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';
import {
EmailFeatureSupportResult,
EmailFeatureSupportResultFromJSON,
EmailFeatureSupportResultFromJSONTyped,
EmailFeatureSupportResultToJSON,
} from './';
/**
*
* @export
* @interface CheckEmailFeaturesClientSupportResults
*/
export interface CheckEmailFeaturesClientSupportResults {
/**
*
* @type {EmailFeatureSupportResult}
* @memberof CheckEmailFeaturesClientSupportResults
*/
result: EmailFeatureSupportResult;
}
export function CheckEmailFeaturesClientSupportResultsFromJSON(
json: any
): CheckEmailFeaturesClientSupportResults {
return CheckEmailFeaturesClientSupportResultsFromJSONTyped(json, false);
}
export function CheckEmailFeaturesClientSupportResultsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): CheckEmailFeaturesClientSupportResults {
if (json === undefined || json === null) {
return json;
}
return {
result: EmailFeatureSupportResultFromJSON(json['result']),
};
}
export function CheckEmailFeaturesClientSupportResultsToJSON(
value?: CheckEmailFeaturesClientSupportResults | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
result: EmailFeatureSupportResultToJSON(value.result),
};
}
/* 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';
/**
*
* @export
* @interface CheckEmailFeaturesClientSupportOptions
*/
export interface CheckEmailFeaturesClientSupportOptions {
/**
*
* @type {string}
* @memberof CheckEmailFeaturesClientSupportOptions
*/
emailBody: string;
}
export function CheckEmailFeaturesClientSupportOptionsFromJSON(
json: any
): CheckEmailFeaturesClientSupportOptions {
return CheckEmailFeaturesClientSupportOptionsFromJSONTyped(json, false);
}
export function CheckEmailFeaturesClientSupportOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): CheckEmailFeaturesClientSupportOptions {
if (json === undefined || json === null) {
return json;
}
return {
emailBody: json['emailBody'],
};
}
export function CheckEmailFeaturesClientSupportOptionsToJSON(
value?: CheckEmailFeaturesClientSupportOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
emailBody: value.emailBody,
};
}
/* 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';
import {
EmailFeatureSupportResult,
EmailFeatureSupportResultFromJSON,
EmailFeatureSupportResultFromJSONTyped,
EmailFeatureSupportResultToJSON,
} from './';
/**
*
* @export
* @interface CheckEmailClientSupportResults
*/
export interface CheckEmailClientSupportResults {
/**
*
* @type {EmailFeatureSupportResult}
* @memberof CheckEmailClientSupportResults
*/
result: EmailFeatureSupportResult;
}
export function CheckEmailClientSupportResultsFromJSON(
json: any
): CheckEmailClientSupportResults {
return CheckEmailClientSupportResultsFromJSONTyped(json, false);
}
export function CheckEmailClientSupportResultsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): CheckEmailClientSupportResults {
if (json === undefined || json === null) {
return json;
}
return {
result: EmailFeatureSupportResultFromJSON(json['result']),
};
}
export function CheckEmailClientSupportResultsToJSON(
value?: CheckEmailClientSupportResults | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
result: EmailFeatureSupportResultToJSON(value.result),
};
}
/* 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 the email to be validated
* @export
* @interface CheckEmailClientSupportOptions
*/
export interface CheckEmailClientSupportOptions {
/**
*
* @type {string}
* @memberof CheckEmailClientSupportOptions
*/
emailBody: string;
}
export function CheckEmailClientSupportOptionsFromJSON(
json: any
): CheckEmailClientSupportOptions {
return CheckEmailClientSupportOptionsFromJSONTyped(json, false);
}
export function CheckEmailClientSupportOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): CheckEmailClientSupportOptions {
if (json === undefined || json === null) {
return json;
}
return {
emailBody: json['emailBody'],
};
}
export function CheckEmailClientSupportOptionsToJSON(
value?: CheckEmailClientSupportOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
emailBody: value.emailBody,
};
}
/* 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';
import {
ImageIssue,
ImageIssueFromJSON,
ImageIssueFromJSONTyped,
ImageIssueToJSON,
LinkIssue,
LinkIssueFromJSON,
LinkIssueFromJSONTyped,
LinkIssueToJSON,
SpellingIssue,
SpellingIssueFromJSON,
SpellingIssueFromJSONTyped,
SpellingIssueToJSON,
} from './';
/**
*
* @export
* @interface CheckEmailBodyResults
*/
export interface CheckEmailBodyResults {
/**
*
* @type {boolean}
* @memberof CheckEmailBodyResults
*/
hasIssues: boolean;
/**
*
* @type {Array<LinkIssue>}
* @memberof CheckEmailBodyResults
*/
linkIssues: Array<LinkIssue>;
/**
*
* @type {Array<ImageIssue>}
* @memberof CheckEmailBodyResults
*/
imageIssues: Array<ImageIssue>;
/**
*
* @type {Array<SpellingIssue>}
* @memberof CheckEmailBodyResults
*/
spellingIssues: Array<SpellingIssue>;
}
export function CheckEmailBodyResultsFromJSON(
json: any
): CheckEmailBodyResults {
return CheckEmailBodyResultsFromJSONTyped(json, false);
}
export function CheckEmailBodyResultsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): CheckEmailBodyResults {
if (json === undefined || json === null) {
return json;
}
return {
hasIssues: json['hasIssues'],
linkIssues: (json['linkIssues'] as Array<any>).map(LinkIssueFromJSON),
imageIssues: (json['imageIssues'] as Array<any>).map(ImageIssueFromJSON),
spellingIssues: (json['spellingIssues'] as Array<any>).map(
SpellingIssueFromJSON
),
};
}
export function CheckEmailBodyResultsToJSON(
value?: CheckEmailBodyResults | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
hasIssues: value.hasIssues,
linkIssues: (value.linkIssues as Array<any>).map(LinkIssueToJSON),
imageIssues: (value.imageIssues as Array<any>).map(ImageIssueToJSON),
spellingIssues: (value.spellingIssues as Array<any>).map(
SpellingIssueToJSON
),
};
}
/* 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';
import {
EmailFeatureSupportResult,
EmailFeatureSupportResultFromJSON,
EmailFeatureSupportResultFromJSONTyped,
EmailFeatureSupportResultToJSON,
} from './';
/**
*
* @export
* @interface CheckEmailBodyFeatureSupportResults
*/
export interface CheckEmailBodyFeatureSupportResults {
/**
*
* @type {EmailFeatureSupportResult}
* @memberof CheckEmailBodyFeatureSupportResults
*/
result: EmailFeatureSupportResult;
}
export function CheckEmailBodyFeatureSupportResultsFromJSON(
json: any
): CheckEmailBodyFeatureSupportResults {
return CheckEmailBodyFeatureSupportResultsFromJSONTyped(json, false);
}
export function CheckEmailBodyFeatureSupportResultsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): CheckEmailBodyFeatureSupportResults {
if (json === undefined || json === null) {
return json;
}
return {
result: EmailFeatureSupportResultFromJSON(json['result']),
};
}
export function CheckEmailBodyFeatureSupportResultsToJSON(
value?: CheckEmailBodyFeatureSupportResults | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
result: EmailFeatureSupportResultToJSON(value.result),
};
}
/* 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';
/**
*
* @export
* @interface CanSendEmailResults
*/
export interface CanSendEmailResults {
/**
*
* @type {boolean}
* @memberof CanSendEmailResults
*/
isSendingPermitted: boolean;
/**
*
* @type {string}
* @memberof CanSendEmailResults
*/
message?: string;
}
export function CanSendEmailResultsFromJSON(json: any): CanSendEmailResults {
return CanSendEmailResultsFromJSONTyped(json, false);
}
export function CanSendEmailResultsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): CanSendEmailResults {
if (json === undefined || json === null) {
return json;
}
return {
isSendingPermitted: json['isSendingPermitted'],
message: !exists(json, 'message') ? undefined : json['message'],
};
}
export function CanSendEmailResultsToJSON(
value?: CanSendEmailResults | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
isSendingPermitted: value.isSendingPermitted,
message: value.message,
};
}
/* 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';
import {
SendEmailOptions,
SendEmailOptionsFromJSON,
SendEmailOptionsFromJSONTyped,
SendEmailOptionsToJSON,
} from './';
/**
* Options for bulk sending an email from multiple addresses. See regular `sendEmail` methods for more information.
* @export
* @interface BulkSendEmailOptions
*/
export interface BulkSendEmailOptions {
/**
* Inboxes to send the email from
* @type {Array<string>}
* @memberof BulkSendEmailOptions
*/
inboxIds: Array<string>;
/**
*
* @type {SendEmailOptions}
* @memberof BulkSendEmailOptions
*/
sendEmailOptions: SendEmailOptions;
}
export function BulkSendEmailOptionsFromJSON(json: any): BulkSendEmailOptions {
return BulkSendEmailOptionsFromJSONTyped(json, false);
}
export function BulkSendEmailOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): BulkSendEmailOptions {
if (json === undefined || json === null) {
return json;
}
return {
inboxIds: json['inboxIds'],
sendEmailOptions: SendEmailOptionsFromJSON(json['sendEmailOptions']),
};
}
export function BulkSendEmailOptionsToJSON(
value?: BulkSendEmailOptions | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
inboxIds: value.inboxIds,
sendEmailOptions: SendEmailOptionsToJSON(value.sendEmailOptions),
};
}
/* 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';
/**
* Bounced recipient
* @export
* @interface BouncedRecipientDto
*/
export interface BouncedRecipientDto {
/**
*
* @type {string}
* @memberof BouncedRecipientDto
*/
id: string;
/**
*
* @type {string}
* @memberof BouncedRecipientDto
*/
userId?: string | null;
/**
*
* @type {string}
* @memberof BouncedRecipientDto
*/
sentEmailId?: string | null;
/**
*
* @type {string}
* @memberof BouncedRecipientDto
*/
recipient: string;
/**
*
* @type {string}
* @memberof BouncedRecipientDto
*/
diagnosticCode?: string | null;
/**
*
* @type {string}
* @memberof BouncedRecipientDto
*/
action?: string | null;
/**
*
* @type {string}
* @memberof BouncedRecipientDto
*/
bounceType?: string | null;
/**
*
* @type {string}
* @memberof BouncedRecipientDto
*/
status?: string | null;
/**
*
* @type {Date}
* @memberof BouncedRecipientDto
*/
createdAt: Date;
}
export function BouncedRecipientDtoFromJSON(json: any): BouncedRecipientDto {
return BouncedRecipientDtoFromJSONTyped(json, false);
}
export function BouncedRecipientDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): BouncedRecipientDto {
if (json === undefined || json === null) {
return json;
}
return {
id: json['id'],
userId: !exists(json, 'userId') ? undefined : json['userId'],
sentEmailId: !exists(json, 'sentEmailId') ? undefined : json['sentEmailId'],
recipient: json['recipient'],
diagnosticCode: !exists(json, 'diagnosticCode')
? undefined
: json['diagnosticCode'],
action: !exists(json, 'action') ? undefined : json['action'],
bounceType: !exists(json, 'bounceType') ? undefined : json['bounceType'],
status: !exists(json, 'status') ? undefined : json['status'],
createdAt: new Date(json['createdAt']),
};
}
export function BouncedRecipientDtoToJSON(
value?: BouncedRecipientDto | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
userId: value.userId,
sentEmailId: value.sentEmailId,
recipient: value.recipient,
diagnosticCode: value.diagnosticCode,
action: value.action,
bounceType: value.bounceType,
status: value.status,
createdAt: value.createdAt.toISOString(),
};
}
/* 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';
/**
* Bounced email
* @export
* @interface BouncedEmailDto
*/
export interface BouncedEmailDto {
/**
*
* @type {string}
* @memberof BouncedEmailDto
*/
id: string;
/**
*
* @type {string}
* @memberof BouncedEmailDto
*/
userId: string;
/**
*
* @type {string}
* @memberof BouncedEmailDto
*/
notificationType: string;
/**
*
* @type {Array<string>}
* @memberof BouncedEmailDto
*/
sentToRecipients?: Array<string> | null;
/**
*
* @type {string}
* @memberof BouncedEmailDto
*/
sender: string;
/**
*
* @type {string}
* @memberof BouncedEmailDto
*/
bounceMta?: string | null;
/**
*
* @type {string}
* @memberof BouncedEmailDto
*/
bounceType?: string | null;
/**
*
* @type {Array<string>}
* @memberof BouncedEmailDto
*/
bounceRecipients?: Array<string> | null;
/**
*
* @type {string}
* @memberof BouncedEmailDto
*/
bounceSubType?: string | null;
/**
*
* @type {string}
* @memberof BouncedEmailDto
*/
sentEmailId?: string | null;
/**
*
* @type {string}
* @memberof BouncedEmailDto
*/
subject?: string | null;
/**
*
* @type {Date}
* @memberof BouncedEmailDto
*/
createdAt: Date;
}
export function BouncedEmailDtoFromJSON(json: any): BouncedEmailDto {
return BouncedEmailDtoFromJSONTyped(json, false);
}
export function BouncedEmailDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): BouncedEmailDto {
if (json === undefined || json === null) {
return json;
}
return {
id: json['id'],
userId: json['userId'],
notificationType: json['notificationType'],
sentToRecipients: !exists(json, 'sentToRecipients')
? undefined
: json['sentToRecipients'],
sender: json['sender'],
bounceMta: !exists(json, 'bounceMta') ? undefined : json['bounceMta'],
bounceType: !exists(json, 'bounceType') ? undefined : json['bounceType'],
bounceRecipients: !exists(json, 'bounceRecipients')
? undefined
: json['bounceRecipients'],
bounceSubType: !exists(json, 'bounceSubType')
? undefined
: json['bounceSubType'],
sentEmailId: !exists(json, 'sentEmailId') ? undefined : json['sentEmailId'],
subject: !exists(json, 'subject') ? undefined : json['subject'],
createdAt: new Date(json['createdAt']),
};
}
export function BouncedEmailDtoToJSON(value?: BouncedEmailDto | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
userId: value.userId,
notificationType: value.notificationType,
sentToRecipients: value.sentToRecipients,
sender: value.sender,
bounceMta: value.bounceMta,
bounceType: value.bounceType,
bounceRecipients: value.bounceRecipients,
bounceSubType: value.bounceSubType,
sentEmailId: value.sentEmailId,
subject: value.subject,
createdAt: value.createdAt.toISOString(),
};
}
/* 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';
/**
* Bounced recipient
* @export
* @interface BounceRecipientProjection
*/
export interface BounceRecipientProjection {
/**
*
* @type {Date}
* @memberof BounceRecipientProjection
*/
createdAt: Date;
/**
*
* @type {string}
* @memberof BounceRecipientProjection
*/
sentEmailId?: string | null;
/**
*
* @type {string}
* @memberof BounceRecipientProjection
*/
recipient: string;
/**
*
* @type {string}
* @memberof BounceRecipientProjection
*/
action?: string | null;
/**
*
* @type {string}
* @memberof BounceRecipientProjection
*/
bounceType?: string | null;
/**
*
* @type {string}
* @memberof BounceRecipientProjection
*/
id?: string;
/**
*
* @type {string}
* @memberof BounceRecipientProjection
*/
status?: string | null;
}
export function BounceRecipientProjectionFromJSON(
json: any
): BounceRecipientProjection {
return BounceRecipientProjectionFromJSONTyped(json, false);
}
export function BounceRecipientProjectionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): BounceRecipientProjection {
if (json === undefined || json === null) {
return json;
}
return {
createdAt: new Date(json['createdAt']),
sentEmailId: !exists(json, 'sentEmailId') ? undefined : json['sentEmailId'],
recipient: json['recipient'],
action: !exists(json, 'action') ? undefined : json['action'],
bounceType: !exists(json, 'bounceType') ? undefined : json['bounceType'],
id: !exists(json, 'id') ? undefined : json['id'],
status: !exists(json, 'status') ? undefined : json['status'],
};
}
export function BounceRecipientProjectionToJSON(
value?: BounceRecipientProjection | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
createdAt: value.createdAt.toISOString(),
sentEmailId: value.sentEmailId,
recipient: value.recipient,
action: value.action,
bounceType: value.bounceType,
id: value.id,
status: value.status,
};
}
/* 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';
/**
* Bounced email event
* @export
* @interface BounceProjection
*/
export interface BounceProjection {
/**
*
* @type {Date}
* @memberof BounceProjection
*/
createdAt: Date;
/**
*
* @type {string}
* @memberof BounceProjection
*/
sender: string;
/**
*
* @type {string}
* @memberof BounceProjection
*/
bounceMta?: string | null;
/**
*
* @type {string}
* @memberof BounceProjection
*/
bounceType?: string | null;
/**
*
* @type {string}
* @memberof BounceProjection
*/
subject?: string | null;
/**
*
* @type {string}
* @memberof BounceProjection
*/
id?: string;
}
export function BounceProjectionFromJSON(json: any): BounceProjection {
return BounceProjectionFromJSONTyped(json, false);
}
export function BounceProjectionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): BounceProjection {
if (json === undefined || json === null) {
return json;
}
return {
createdAt: new Date(json['createdAt']),
sender: json['sender'],
bounceMta: !exists(json, 'bounceMta') ? undefined : json['bounceMta'],
bounceType: !exists(json, 'bounceType') ? undefined : json['bounceType'],
subject: !exists(json, 'subject') ? undefined : json['subject'],
id: !exists(json, 'id') ? undefined : json['id'],
};
}
export function BounceProjectionToJSON(value?: BounceProjection | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
createdAt: value.createdAt.toISOString(),
sender: value.sender,
bounceMta: value.bounceMta,
bounceType: value.bounceType,
subject: value.subject,
id: value.id,
};
}
/* 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';
/**
* Basic Authentication options for webhooks. Will be used is present when calling webhook endpoints.
* @export
* @interface BasicAuthOptions
*/
export interface BasicAuthOptions {
/**
*
* @type {string}
* @memberof BasicAuthOptions
*/
username: string;
/**
*
* @type {string}
* @memberof BasicAuthOptions
*/
password: string;
}
export function BasicAuthOptionsFromJSON(json: any): BasicAuthOptions {
return BasicAuthOptionsFromJSONTyped(json, false);
}
export function BasicAuthOptionsFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): BasicAuthOptions {
if (json === undefined || json === null) {
return json;
}
return {
username: json['username'],
password: json['password'],
};
}
export function BasicAuthOptionsToJSON(value?: BasicAuthOptions | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
username: value.username,
password: value.password,
};
}
/* 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';
/**
* Email attachment data
* @export
* @interface AttachmentProjection
*/
export interface AttachmentProjection {
/**
*
* @type {Date}
* @memberof AttachmentProjection
*/
createdAt: Date;
/**
*
* @type {Date}
* @memberof AttachmentProjection
*/
updatedAt: Date;
/**
*
* @type {string}
* @memberof AttachmentProjection
*/
userId: string;
/**
* Content ID of attachment.
* @type {string}
* @memberof AttachmentProjection
*/
contentId?: string | null;
/**
* Attachment ID
* @type {string}
* @memberof AttachmentProjection
*/
attachmentId: string;
/**
*
* @type {string}
* @memberof AttachmentProjection
*/
name?: string | null;
/**
* Content length of attachment in bytes
* @type {number}
* @memberof AttachmentProjection
*/
contentLength?: number | null;
/**
* Content type of attachment.
* @type {string}
* @memberof AttachmentProjection
*/
contentType?: string | null;
}
export function AttachmentProjectionFromJSON(json: any): AttachmentProjection {
return AttachmentProjectionFromJSONTyped(json, false);
}
export function AttachmentProjectionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): AttachmentProjection {
if (json === undefined || json === null) {
return json;
}
return {
createdAt: new Date(json['createdAt']),
updatedAt: new Date(json['updatedAt']),
userId: json['userId'],
contentId: !exists(json, 'contentId') ? undefined : json['contentId'],
attachmentId: json['attachmentId'],
name: !exists(json, 'name') ? undefined : json['name'],
contentLength: !exists(json, 'contentLength')
? undefined
: json['contentLength'],
contentType: !exists(json, 'contentType') ? undefined : json['contentType'],
};
}
export function AttachmentProjectionToJSON(
value?: AttachmentProjection | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
createdAt: value.createdAt.toISOString(),
updatedAt: value.updatedAt.toISOString(),
userId: value.userId,
contentId: value.contentId,
attachmentId: value.attachmentId,
name: value.name,
contentLength: value.contentLength,
contentType: value.contentType,
};
}
/* 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';
/**
* Meta data associated with an attachment. Attachments are stored as byte blobs so the meta data is stored separately.
* @export
* @interface AttachmentMetaData
*/
export interface AttachmentMetaData {
/**
* Name of attachment if given
* @type {string}
* @memberof AttachmentMetaData
*/
name: string;
/**
* Content type of attachment such as `image/png`
* @type {string}
* @memberof AttachmentMetaData
*/
contentType: string;
/**
* Size of attachment in bytes
* @type {number}
* @memberof AttachmentMetaData
*/
contentLength: number;
/**
* ID of attachment. Can be used to with attachment controller endpoints to download attachment or with sending methods to attach to an email.
* @type {string}
* @memberof AttachmentMetaData
*/
id: string;
/**
* CID of attachment
* @type {string}
* @memberof AttachmentMetaData
*/
contentId?: string | null;
}
export function AttachmentMetaDataFromJSON(json: any): AttachmentMetaData {
return AttachmentMetaDataFromJSONTyped(json, false);
}
export function AttachmentMetaDataFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): AttachmentMetaData {
if (json === undefined || json === null) {
return json;
}
return {
name: json['name'],
contentType: json['contentType'],
contentLength: json['contentLength'],
id: json['id'],
contentId: !exists(json, 'contentId') ? undefined : json['contentId'],
};
}
export function AttachmentMetaDataToJSON(
value?: AttachmentMetaData | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
name: value.name,
contentType: value.contentType,
contentLength: value.contentLength,
id: value.id,
contentId: value.contentId,
};
}
/* 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';
/**
*
* @export
* @interface AttachmentEntity
*/
export interface AttachmentEntity {
/**
*
* @type {string}
* @memberof AttachmentEntity
*/
id?: string;
/**
*
* @type {string}
* @memberof AttachmentEntity
*/
attachmentId: string;
/**
*
* @type {string}
* @memberof AttachmentEntity
*/
bucket?: string;
/**
*
* @type {string}
* @memberof AttachmentEntity
*/
userId: string;
/**
*
* @type {string}
* @memberof AttachmentEntity
*/
contentType?: string;
/**
*
* @type {number}
* @memberof AttachmentEntity
*/
contentLength?: number;
/**
*
* @type {string}
* @memberof AttachmentEntity
*/
contentId?: string;
/**
*
* @type {string}
* @memberof AttachmentEntity
*/
name?: string;
/**
*
* @type {string}
* @memberof AttachmentEntity
*/
inboxId?: string;
/**
*
* @type {Date}
* @memberof AttachmentEntity
*/
createdAt: Date;
/**
*
* @type {Date}
* @memberof AttachmentEntity
*/
updatedAt: Date;
}
export function AttachmentEntityFromJSON(json: any): AttachmentEntity {
return AttachmentEntityFromJSONTyped(json, false);
}
export function AttachmentEntityFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): AttachmentEntity {
if (json === undefined || json === null) {
return json;
}
return {
id: !exists(json, 'id') ? undefined : json['id'],
attachmentId: json['attachmentId'],
bucket: !exists(json, 'bucket') ? undefined : json['bucket'],
userId: json['userId'],
contentType: !exists(json, 'contentType') ? undefined : json['contentType'],
contentLength: !exists(json, 'contentLength')
? undefined
: json['contentLength'],
contentId: !exists(json, 'contentId') ? undefined : json['contentId'],
name: !exists(json, 'name') ? undefined : json['name'],
inboxId: !exists(json, 'inboxId') ? undefined : json['inboxId'],
createdAt: new Date(json['createdAt']),
updatedAt: new Date(json['updatedAt']),
};
}
export function AttachmentEntityToJSON(value?: AttachmentEntity | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
attachmentId: value.attachmentId,
bucket: value.bucket,
userId: value.userId,
contentType: value.contentType,
contentLength: value.contentLength,
contentId: value.contentId,
name: value.name,
inboxId: value.inboxId,
createdAt: value.createdAt.toISOString(),
updatedAt: value.updatedAt.toISOString(),
};
}
/* 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';
/**
* Representation of a alias
* @export
* @interface AliasProjection
*/
export interface AliasProjection {
/**
*
* @type {Date}
* @memberof AliasProjection
*/
createdAt: Date;
/**
*
* @type {Date}
* @memberof AliasProjection
*/
updatedAt: Date;
/**
*
* @type {string}
* @memberof AliasProjection
*/
inboxId: string;
/**
*
* @type {string}
* @memberof AliasProjection
*/
userId: string;
/**
*
* @type {string}
* @memberof AliasProjection
*/
emailAddress: string;
/**
*
* @type {boolean}
* @memberof AliasProjection
*/
useThreads?: boolean;
/**
*
* @type {string}
* @memberof AliasProjection
*/
name?: string;
/**
*
* @type {string}
* @memberof AliasProjection
*/
id: string;
}
export function AliasProjectionFromJSON(json: any): AliasProjection {
return AliasProjectionFromJSONTyped(json, false);
}
export function AliasProjectionFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): AliasProjection {
if (json === undefined || json === null) {
return json;
}
return {
createdAt: new Date(json['createdAt']),
updatedAt: new Date(json['updatedAt']),
inboxId: json['inboxId'],
userId: json['userId'],
emailAddress: json['emailAddress'],
useThreads: !exists(json, 'useThreads') ? undefined : json['useThreads'],
name: !exists(json, 'name') ? undefined : json['name'],
id: json['id'],
};
}
export function AliasProjectionToJSON(value?: AliasProjection | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
createdAt: value.createdAt.toISOString(),
updatedAt: value.updatedAt.toISOString(),
inboxId: value.inboxId,
userId: value.userId,
emailAddress: value.emailAddress,
useThreads: value.useThreads,
name: value.name,
id: value.id,
};
}
/* 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';
/**
* Email alias representation
* @export
* @interface AliasDto
*/
export interface AliasDto {
/**
*
* @type {string}
* @memberof AliasDto
*/
id: string;
/**
* The alias's email address for receiving email
* @type {string}
* @memberof AliasDto
*/
emailAddress: string;
/**
* The underlying email address that is hidden and will received forwarded email
* @type {string}
* @memberof AliasDto
*/
maskedEmailAddress?: string | null;
/**
*
* @type {string}
* @memberof AliasDto
*/
userId: string;
/**
* Inbox that is associated with the alias
* @type {string}
* @memberof AliasDto
*/
inboxId: string;
/**
*
* @type {string}
* @memberof AliasDto
*/
name?: string | null;
/**
* If alias will generate response threads or not when email are received by it
* @type {boolean}
* @memberof AliasDto
*/
useThreads?: boolean | null;
/**
* Has the alias been verified. You must verify an alias if the masked email address has not yet been verified by your account
* @type {boolean}
* @memberof AliasDto
*/
isVerified: boolean;
/**
* Domain ID associated with the alias
* @type {string}
* @memberof AliasDto
*/
domainId?: string | null;
/**
*
* @type {Date}
* @memberof AliasDto
*/
createdAt?: Date | null;
/**
*
* @type {Date}
* @memberof AliasDto
*/
updatedAt?: Date | null;
}
export function AliasDtoFromJSON(json: any): AliasDto {
return AliasDtoFromJSONTyped(json, false);
}
export function AliasDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): AliasDto {
if (json === undefined || json === null) {
return json;
}
return {
id: json['id'],
emailAddress: json['emailAddress'],
maskedEmailAddress: !exists(json, 'maskedEmailAddress')
? undefined
: json['maskedEmailAddress'],
userId: json['userId'],
inboxId: json['inboxId'],
name: !exists(json, 'name') ? undefined : json['name'],
useThreads: !exists(json, 'useThreads') ? undefined : json['useThreads'],
isVerified: json['isVerified'],
domainId: !exists(json, 'domainId') ? undefined : json['domainId'],
createdAt: !exists(json, 'createdAt')
? undefined
: json['createdAt'] === null
? null
: new Date(json['createdAt']),
updatedAt: !exists(json, 'updatedAt')
? undefined
: json['updatedAt'] === null
? null
: new Date(json['updatedAt']),
};
}
export function AliasDtoToJSON(value?: AliasDto | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
id: value.id,
emailAddress: value.emailAddress,
maskedEmailAddress: value.maskedEmailAddress,
userId: value.userId,
inboxId: value.inboxId,
name: value.name,
useThreads: value.useThreads,
isVerified: value.isVerified,
domainId: value.domainId,
createdAt:
value.createdAt === undefined
? undefined
: value.createdAt === null
? null
: value.createdAt.toISOString(),
updatedAt:
value.updatedAt === undefined
? undefined
: value.updatedAt === null
? null
: value.updatedAt.toISOString(),
};
}
/* 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';
/**
*
* @export
* @interface AccountBounceBlockDto
*/
export interface AccountBounceBlockDto {
/**
*
* @type {boolean}
* @memberof AccountBounceBlockDto
*/
isSendingBlocked: boolean;
/**
*
* @type {number}
* @memberof AccountBounceBlockDto
*/
bounceCount: number;
/**
*
* @type {number}
* @memberof AccountBounceBlockDto
*/
bounceCountToday: number;
/**
*
* @type {number}
* @memberof AccountBounceBlockDto
*/
maximumDailyBounces: number;
/**
*
* @type {number}
* @memberof AccountBounceBlockDto
*/
maximumAccountBounces: number;
}
export function AccountBounceBlockDtoFromJSON(
json: any
): AccountBounceBlockDto {
return AccountBounceBlockDtoFromJSONTyped(json, false);
}
export function AccountBounceBlockDtoFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): AccountBounceBlockDto {
if (json === undefined || json === null) {
return json;
}
return {
isSendingBlocked: json['isSendingBlocked'],
bounceCount: json['bounceCount'],
bounceCountToday: json['bounceCountToday'],
maximumDailyBounces: json['maximumDailyBounces'],
maximumAccountBounces: json['maximumAccountBounces'],
};
}
export function AccountBounceBlockDtoToJSON(
value?: AccountBounceBlockDto | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
isSendingBlocked: value.isSendingBlocked,
bounceCount: value.bounceCount,
bounceCountToday: value.bounceCountToday,
maximumDailyBounces: value.maximumDailyBounces,
maximumAccountBounces: value.maximumAccountBounces,
};
}
/* 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';
/**
* Abstract webhook payload. Use the correct payload type for your webhook event type in order to access all the specific properties for that event. See the `NEW_EMAIL`,`NEW_CONTACT`, `NEW_ATTACHMENT` and `EMAIL_OPENED` payloads for the properties available for those events.
* @export
* @interface AbstractWebhookPayload
*/
export interface AbstractWebhookPayload {
/**
*
* @type {string}
* @memberof AbstractWebhookPayload
*/
eventName: AbstractWebhookPayloadEventNameEnum;
/**
*
* @type {string}
* @memberof AbstractWebhookPayload
*/
messageId: string;
/**
*
* @type {string}
* @memberof AbstractWebhookPayload
*/
webhookId: string;
/**
*
* @type {string}
* @memberof AbstractWebhookPayload
*/
webhookName?: string;
}
/**
* @export
* @enum {string}
*/
export enum AbstractWebhookPayloadEventNameEnum {
EMAIL_RECEIVED = 'EMAIL_RECEIVED',
NEW_EMAIL = 'NEW_EMAIL',
NEW_CONTACT = 'NEW_CONTACT',
NEW_ATTACHMENT = 'NEW_ATTACHMENT',
EMAIL_OPENED = 'EMAIL_OPENED',
EMAIL_READ = 'EMAIL_READ',
DELIVERY_STATUS = 'DELIVERY_STATUS',
BOUNCE = 'BOUNCE',
BOUNCE_RECIPIENT = 'BOUNCE_RECIPIENT',
NEW_SMS = 'NEW_SMS',
}
export function AbstractWebhookPayloadFromJSON(
json: any
): AbstractWebhookPayload {
return AbstractWebhookPayloadFromJSONTyped(json, false);
}
export function AbstractWebhookPayloadFromJSONTyped(
json: any,
ignoreDiscriminator: boolean
): AbstractWebhookPayload {
if (json === undefined || json === null) {
return json;
}
return {
eventName: json['eventName'],
messageId: json['messageId'],
webhookId: json['webhookId'],
webhookName: !exists(json, 'webhookName') ? undefined : json['webhookName'],
};
}
export function AbstractWebhookPayloadToJSON(
value?: AbstractWebhookPayload | null
): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
eventName: value.eventName,
messageId: value.messageId,
webhookId: value.webhookId,
webhookName: value.webhookName,
};
}
/* tslint:disable */
/* eslint-disable */
export * from './AliasControllerApi';
export * from './AttachmentControllerApi';
export * from './BounceControllerApi';
export * from './BulkActionsControllerApi';
export * from './CommonActionsControllerApi';
export * from './ConnectorControllerApi';
export * from './ContactControllerApi';
export * from './DomainControllerApi';
export * from './EmailControllerApi';
export * from './EmailVerificationControllerApi';
export * from './ExpiredControllerApi';
export * from './ExportControllerApi';
export * from './FormControllerApi';
export * from './GroupControllerApi';
export * from './ImapControllerApi';
export * from './InboxControllerApi';
export * from './InboxForwarderControllerApi';
export * from './InboxReplierControllerApi';
export * from './InboxRulesetControllerApi';
export * from './MailServerControllerApi';
export * from './MissedEmailControllerApi';
export * from './PhoneControllerApi';
export * from './SentEmailsControllerApi';
export * from './SmsControllerApi';
export * from './TemplateControllerApi';
export * from './ToolsControllerApi';
export * from './TrackingControllerApi';
export * from './UserControllerApi';
export * from './WaitForControllerApi';
export * from './WebhookControllerApi';
/* 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 * as runtime from '../runtime';
import {
AbstractWebhookPayload,
AbstractWebhookPayloadFromJSON,
AbstractWebhookPayloadToJSON,
CountDto,
CountDtoFromJSON,
CountDtoToJSON,
CreateWebhookOptions,
CreateWebhookOptionsFromJSON,
CreateWebhookOptionsToJSON,
JSONSchemaDto,
JSONSchemaDtoFromJSON,
JSONSchemaDtoToJSON,
PageWebhookProjection,
PageWebhookProjectionFromJSON,
PageWebhookProjectionToJSON,
PageWebhookResult,
PageWebhookResultFromJSON,
PageWebhookResultToJSON,
UnseenErrorCountDto,
UnseenErrorCountDtoFromJSON,
UnseenErrorCountDtoToJSON,
VerifyWebhookSignatureOptions,
VerifyWebhookSignatureOptionsFromJSON,
VerifyWebhookSignatureOptionsToJSON,
VerifyWebhookSignatureResults,
VerifyWebhookSignatureResultsFromJSON,
VerifyWebhookSignatureResultsToJSON,
WebhookBouncePayload,
WebhookBouncePayloadFromJSON,
WebhookBouncePayloadToJSON,
WebhookBounceRecipientPayload,
WebhookBounceRecipientPayloadFromJSON,
WebhookBounceRecipientPayloadToJSON,
WebhookDeliveryStatusPayload,
WebhookDeliveryStatusPayloadFromJSON,
WebhookDeliveryStatusPayloadToJSON,
WebhookDto,
WebhookDtoFromJSON,
WebhookDtoToJSON,
WebhookEmailOpenedPayload,
WebhookEmailOpenedPayloadFromJSON,
WebhookEmailOpenedPayloadToJSON,
WebhookEmailReadPayload,
WebhookEmailReadPayloadFromJSON,
WebhookEmailReadPayloadToJSON,
WebhookHeaders,
WebhookHeadersFromJSON,
WebhookHeadersToJSON,
WebhookNewAttachmentPayload,
WebhookNewAttachmentPayloadFromJSON,
WebhookNewAttachmentPayloadToJSON,
WebhookNewContactPayload,
WebhookNewContactPayloadFromJSON,
WebhookNewContactPayloadToJSON,
WebhookNewEmailPayload,
WebhookNewEmailPayloadFromJSON,
WebhookNewEmailPayloadToJSON,
WebhookNewSmsPayload,
WebhookNewSmsPayloadFromJSON,
WebhookNewSmsPayloadToJSON,
WebhookRedriveAllResult,
WebhookRedriveAllResultFromJSON,
WebhookRedriveAllResultToJSON,
WebhookRedriveResult,
WebhookRedriveResultFromJSON,
WebhookRedriveResultToJSON,
WebhookResultDto,
WebhookResultDtoFromJSON,
WebhookResultDtoToJSON,
WebhookTestResult,
WebhookTestResultFromJSON,
WebhookTestResultToJSON,
} from '../models';
export interface CreateAccountWebhookRequest {
createWebhookOptions: CreateWebhookOptions;
}
export interface CreateWebhookRequest {
inboxId: string;
createWebhookOptions: CreateWebhookOptions;
}
export interface CreateWebhookForPhoneNumberRequest {
phoneNumberId: string;
createWebhookOptions: CreateWebhookOptions;
}
export interface DeleteAllWebhooksRequest {
before?: Date;
}
export interface DeleteWebhookRequest {
inboxId: string;
webhookId: string;
}
export interface DeleteWebhookByIdRequest {
webhookId: string;
}
export interface GetAllAccountWebhooksRequest {
page?: number;
size?: number;
sort?: GetAllAccountWebhooksSortEnum;
eventType?: GetAllAccountWebhooksEventTypeEnum;
since?: Date;
before?: Date;
}
export interface GetAllWebhookResultsRequest {
page?: number;
size?: number;
sort?: GetAllWebhookResultsSortEnum;
searchFilter?: string;
since?: Date;
before?: Date;
unseenOnly?: boolean;
resultType?: GetAllWebhookResultsResultTypeEnum;
eventName?: GetAllWebhookResultsEventNameEnum;
minStatusCode?: number;
maxStatusCode?: number;
inboxId?: string;
smsId?: string;
attachmentId?: string;
emailId?: string;
phoneId?: string;
}
export interface GetAllWebhooksRequest {
page?: number;
size?: number;
sort?: GetAllWebhooksSortEnum;
searchFilter?: string;
since?: Date;
inboxId?: string;
phoneId?: string;
before?: Date;
}
export interface GetInboxWebhooksPaginatedRequest {
inboxId: string;
page?: number;
size?: number;
sort?: GetInboxWebhooksPaginatedSortEnum;
searchFilter?: string;
since?: Date;
before?: Date;
}
export interface GetJsonSchemaForWebhookEventRequest {
event: GetJsonSchemaForWebhookEventEventEnum;
}
export interface GetJsonSchemaForWebhookPayloadRequest {
webhookId: string;
}
export interface GetPhoneNumberWebhooksPaginatedRequest {
phoneId: string;
page?: number;
size?: number;
sort?: GetPhoneNumberWebhooksPaginatedSortEnum;
since?: Date;
before?: Date;
}
export interface GetTestWebhookPayloadRequest {
eventName?: GetTestWebhookPayloadEventNameEnum;
}
export interface GetTestWebhookPayloadForWebhookRequest {
webhookId: string;
}
export interface GetWebhookRequest {
webhookId: string;
}
export interface GetWebhookResultRequest {
webhookResultId: string;
}
export interface GetWebhookResultsRequest {
webhookId: string;
page?: number;
size?: number;
sort?: GetWebhookResultsSortEnum;
searchFilter?: string;
since?: Date;
before?: Date;
unseenOnly?: boolean;
resultType?: GetWebhookResultsResultTypeEnum;
eventName?: GetWebhookResultsEventNameEnum;
minStatusCode?: number;
maxStatusCode?: number;
inboxId?: string;
smsId?: string;
attachmentId?: string;
emailId?: string;
phoneId?: string;
}
export interface GetWebhookResultsCountRequest {
webhookId: string;
}
export interface GetWebhooksRequest {
inboxId: string;
}
export interface RedriveWebhookResultRequest {
webhookResultId: string;
}
export interface SendTestDataRequest {
webhookId: string;
}
export interface UpdateWebhookHeadersRequest {
webhookId: string;
webhookHeaders: WebhookHeaders;
}
export interface VerifyWebhookSignatureRequest {
verifyWebhookSignatureOptions: VerifyWebhookSignatureOptions;
}
export interface WaitForWebhookResultsRequest {
webhookId: string;
expectedCount: number;
timeout: number;
}
/**
*
*/
export class WebhookControllerApi extends runtime.BaseAPI {
/**
* Get notified of account level events such as bounce and bounce recipient.
* Attach a WebHook URL to an inbox
*/
async createAccountWebhookRaw(
requestParameters: CreateAccountWebhookRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<WebhookDto>> {
if (
requestParameters.createWebhookOptions === null ||
requestParameters.createWebhookOptions === undefined
) {
throw new runtime.RequiredError(
'createWebhookOptions',
'Required parameter requestParameters.createWebhookOptions was null or undefined when calling createAccountWebhook.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/webhooks`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: CreateWebhookOptionsToJSON(
requestParameters.createWebhookOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
WebhookDtoFromJSON(jsonValue)
);
}
/**
* Get notified of account level events such as bounce and bounce recipient.
* Attach a WebHook URL to an inbox
*/
async createAccountWebhook(
requestParameters: CreateAccountWebhookRequest,
initOverrides?: RequestInit
): Promise<WebhookDto> {
const response = await this.createAccountWebhookRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get notified whenever an inbox receives an email via a WebHook URL. An emailID will be posted to this URL every time an email is received for this inbox. The URL must be publicly reachable by the MailSlurp server. You can provide basicAuth values if you wish to secure this endpoint.
* Attach a WebHook URL to an inbox
*/
async createWebhookRaw(
requestParameters: CreateWebhookRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<WebhookDto>> {
if (
requestParameters.inboxId === null ||
requestParameters.inboxId === undefined
) {
throw new runtime.RequiredError(
'inboxId',
'Required parameter requestParameters.inboxId was null or undefined when calling createWebhook.'
);
}
if (
requestParameters.createWebhookOptions === null ||
requestParameters.createWebhookOptions === undefined
) {
throw new runtime.RequiredError(
'createWebhookOptions',
'Required parameter requestParameters.createWebhookOptions was null or undefined when calling createWebhook.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/{inboxId}/webhooks`.replace(
`{${'inboxId'}}`,
encodeURIComponent(String(requestParameters.inboxId))
),
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: CreateWebhookOptionsToJSON(
requestParameters.createWebhookOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
WebhookDtoFromJSON(jsonValue)
);
}
/**
* Get notified whenever an inbox receives an email via a WebHook URL. An emailID will be posted to this URL every time an email is received for this inbox. The URL must be publicly reachable by the MailSlurp server. You can provide basicAuth values if you wish to secure this endpoint.
* Attach a WebHook URL to an inbox
*/
async createWebhook(
requestParameters: CreateWebhookRequest,
initOverrides?: RequestInit
): Promise<WebhookDto> {
const response = await this.createWebhookRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get notified whenever a phone number receives an SMS via a WebHook URL.
* Attach a WebHook URL to a phone number
*/
async createWebhookForPhoneNumberRaw(
requestParameters: CreateWebhookForPhoneNumberRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<WebhookDto>> {
if (
requestParameters.phoneNumberId === null ||
requestParameters.phoneNumberId === undefined
) {
throw new runtime.RequiredError(
'phoneNumberId',
'Required parameter requestParameters.phoneNumberId was null or undefined when calling createWebhookForPhoneNumber.'
);
}
if (
requestParameters.createWebhookOptions === null ||
requestParameters.createWebhookOptions === undefined
) {
throw new runtime.RequiredError(
'createWebhookOptions',
'Required parameter requestParameters.createWebhookOptions was null or undefined when calling createWebhookForPhoneNumber.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/phone/numbers/{phoneNumberId}/webhooks`.replace(
`{${'phoneNumberId'}}`,
encodeURIComponent(String(requestParameters.phoneNumberId))
),
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: CreateWebhookOptionsToJSON(
requestParameters.createWebhookOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
WebhookDtoFromJSON(jsonValue)
);
}
/**
* Get notified whenever a phone number receives an SMS via a WebHook URL.
* Attach a WebHook URL to a phone number
*/
async createWebhookForPhoneNumber(
requestParameters: CreateWebhookForPhoneNumberRequest,
initOverrides?: RequestInit
): Promise<WebhookDto> {
const response = await this.createWebhookForPhoneNumberRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Delete all webhooks
*/
async deleteAllWebhooksRaw(
requestParameters: DeleteAllWebhooksRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
const queryParameters: any = {};
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/webhooks`,
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Delete all webhooks
*/
async deleteAllWebhooks(
requestParameters: DeleteAllWebhooksRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.deleteAllWebhooksRaw(requestParameters, initOverrides);
}
/**
* Delete and disable a Webhook for an Inbox
*/
async deleteWebhookRaw(
requestParameters: DeleteWebhookRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
if (
requestParameters.inboxId === null ||
requestParameters.inboxId === undefined
) {
throw new runtime.RequiredError(
'inboxId',
'Required parameter requestParameters.inboxId was null or undefined when calling deleteWebhook.'
);
}
if (
requestParameters.webhookId === null ||
requestParameters.webhookId === undefined
) {
throw new runtime.RequiredError(
'webhookId',
'Required parameter requestParameters.webhookId was null or undefined when calling deleteWebhook.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/{inboxId}/webhooks/{webhookId}`
.replace(
`{${'inboxId'}}`,
encodeURIComponent(String(requestParameters.inboxId))
)
.replace(
`{${'webhookId'}}`,
encodeURIComponent(String(requestParameters.webhookId))
),
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Delete and disable a Webhook for an Inbox
*/
async deleteWebhook(
requestParameters: DeleteWebhookRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.deleteWebhookRaw(requestParameters, initOverrides);
}
/**
* Delete a webhook
*/
async deleteWebhookByIdRaw(
requestParameters: DeleteWebhookByIdRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
if (
requestParameters.webhookId === null ||
requestParameters.webhookId === undefined
) {
throw new runtime.RequiredError(
'webhookId',
'Required parameter requestParameters.webhookId was null or undefined when calling deleteWebhookById.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/webhooks/{webhookId}`.replace(
`{${'webhookId'}}`,
encodeURIComponent(String(requestParameters.webhookId))
),
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Delete a webhook
*/
async deleteWebhookById(
requestParameters: DeleteWebhookByIdRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.deleteWebhookByIdRaw(requestParameters, initOverrides);
}
/**
* List account webhooks in paginated form. Allows for page index, page size, and sort direction.
* List account webhooks Paginated
*/
async getAllAccountWebhooksRaw(
requestParameters: GetAllAccountWebhooksRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageWebhookProjection>> {
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.eventType !== undefined) {
queryParameters['eventType'] = requestParameters.eventType;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/webhooks/account/paginated`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageWebhookProjectionFromJSON(jsonValue)
);
}
/**
* List account webhooks in paginated form. Allows for page index, page size, and sort direction.
* List account webhooks Paginated
*/
async getAllAccountWebhooks(
requestParameters: GetAllAccountWebhooksRequest,
initOverrides?: RequestInit
): Promise<PageWebhookProjection> {
const response = await this.getAllAccountWebhooksRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get results for all webhooks
*/
async getAllWebhookResultsRaw(
requestParameters: GetAllWebhookResultsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageWebhookResult>> {
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.searchFilter !== undefined) {
queryParameters['searchFilter'] = requestParameters.searchFilter;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
if (requestParameters.unseenOnly !== undefined) {
queryParameters['unseenOnly'] = requestParameters.unseenOnly;
}
if (requestParameters.resultType !== undefined) {
queryParameters['resultType'] = requestParameters.resultType;
}
if (requestParameters.eventName !== undefined) {
queryParameters['eventName'] = requestParameters.eventName;
}
if (requestParameters.minStatusCode !== undefined) {
queryParameters['minStatusCode'] = requestParameters.minStatusCode;
}
if (requestParameters.maxStatusCode !== undefined) {
queryParameters['maxStatusCode'] = requestParameters.maxStatusCode;
}
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
if (requestParameters.smsId !== undefined) {
queryParameters['smsId'] = requestParameters.smsId;
}
if (requestParameters.attachmentId !== undefined) {
queryParameters['attachmentId'] = requestParameters.attachmentId;
}
if (requestParameters.emailId !== undefined) {
queryParameters['emailId'] = requestParameters.emailId;
}
if (requestParameters.phoneId !== undefined) {
queryParameters['phoneId'] = requestParameters.phoneId;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/webhooks/results`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageWebhookResultFromJSON(jsonValue)
);
}
/**
* Get results for all webhooks
*/
async getAllWebhookResults(
requestParameters: GetAllWebhookResultsRequest,
initOverrides?: RequestInit
): Promise<PageWebhookResult> {
const response = await this.getAllWebhookResultsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* List webhooks in paginated form. Allows for page index, page size, and sort direction.
* List Webhooks Paginated
*/
async getAllWebhooksRaw(
requestParameters: GetAllWebhooksRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageWebhookProjection>> {
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.searchFilter !== undefined) {
queryParameters['searchFilter'] = requestParameters.searchFilter;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
if (requestParameters.phoneId !== undefined) {
queryParameters['phoneId'] = requestParameters.phoneId;
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/webhooks/paginated`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageWebhookProjectionFromJSON(jsonValue)
);
}
/**
* List webhooks in paginated form. Allows for page index, page size, and sort direction.
* List Webhooks Paginated
*/
async getAllWebhooks(
requestParameters: GetAllWebhooksRequest,
initOverrides?: RequestInit
): Promise<PageWebhookProjection> {
const response = await this.getAllWebhooksRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get paginated webhooks for an Inbox
*/
async getInboxWebhooksPaginatedRaw(
requestParameters: GetInboxWebhooksPaginatedRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageWebhookProjection>> {
if (
requestParameters.inboxId === null ||
requestParameters.inboxId === undefined
) {
throw new runtime.RequiredError(
'inboxId',
'Required parameter requestParameters.inboxId was null or undefined when calling getInboxWebhooksPaginated.'
);
}
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.searchFilter !== undefined) {
queryParameters['searchFilter'] = requestParameters.searchFilter;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/{inboxId}/webhooks/paginated`.replace(
`{${'inboxId'}}`,
encodeURIComponent(String(requestParameters.inboxId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageWebhookProjectionFromJSON(jsonValue)
);
}
/**
* Get paginated webhooks for an Inbox
*/
async getInboxWebhooksPaginated(
requestParameters: GetInboxWebhooksPaginatedRequest,
initOverrides?: RequestInit
): Promise<PageWebhookProjection> {
const response = await this.getInboxWebhooksPaginatedRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get JSON Schema definition for webhook payload by event
*/
async getJsonSchemaForWebhookEventRaw(
requestParameters: GetJsonSchemaForWebhookEventRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<JSONSchemaDto>> {
if (
requestParameters.event === null ||
requestParameters.event === undefined
) {
throw new runtime.RequiredError(
'event',
'Required parameter requestParameters.event was null or undefined when calling getJsonSchemaForWebhookEvent.'
);
}
const queryParameters: any = {};
if (requestParameters.event !== undefined) {
queryParameters['event'] = requestParameters.event;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/webhooks/schema`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
JSONSchemaDtoFromJSON(jsonValue)
);
}
/**
* Get JSON Schema definition for webhook payload by event
*/
async getJsonSchemaForWebhookEvent(
requestParameters: GetJsonSchemaForWebhookEventRequest,
initOverrides?: RequestInit
): Promise<JSONSchemaDto> {
const response = await this.getJsonSchemaForWebhookEventRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get JSON Schema definition for webhook payload
*/
async getJsonSchemaForWebhookPayloadRaw(
requestParameters: GetJsonSchemaForWebhookPayloadRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<JSONSchemaDto>> {
if (
requestParameters.webhookId === null ||
requestParameters.webhookId === undefined
) {
throw new runtime.RequiredError(
'webhookId',
'Required parameter requestParameters.webhookId was null or undefined when calling getJsonSchemaForWebhookPayload.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/webhooks/{webhookId}/schema`.replace(
`{${'webhookId'}}`,
encodeURIComponent(String(requestParameters.webhookId))
),
method: 'POST',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
JSONSchemaDtoFromJSON(jsonValue)
);
}
/**
* Get JSON Schema definition for webhook payload
*/
async getJsonSchemaForWebhookPayload(
requestParameters: GetJsonSchemaForWebhookPayloadRequest,
initOverrides?: RequestInit
): Promise<JSONSchemaDto> {
const response = await this.getJsonSchemaForWebhookPayloadRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get paginated webhooks for a phone number
*/
async getPhoneNumberWebhooksPaginatedRaw(
requestParameters: GetPhoneNumberWebhooksPaginatedRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageWebhookProjection>> {
if (
requestParameters.phoneId === null ||
requestParameters.phoneId === undefined
) {
throw new runtime.RequiredError(
'phoneId',
'Required parameter requestParameters.phoneId was null or undefined when calling getPhoneNumberWebhooksPaginated.'
);
}
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/phone/numbers/{phoneId}/webhooks/paginated`.replace(
`{${'phoneId'}}`,
encodeURIComponent(String(requestParameters.phoneId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageWebhookProjectionFromJSON(jsonValue)
);
}
/**
* Get paginated webhooks for a phone number
*/
async getPhoneNumberWebhooksPaginated(
requestParameters: GetPhoneNumberWebhooksPaginatedRequest,
initOverrides?: RequestInit
): Promise<PageWebhookProjection> {
const response = await this.getPhoneNumberWebhooksPaginatedRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get test webhook payload example. Response content depends on eventName passed. Uses `EMAIL_RECEIVED` as default.
*/
async getTestWebhookPayloadRaw(
requestParameters: GetTestWebhookPayloadRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<AbstractWebhookPayload>> {
const queryParameters: any = {};
if (requestParameters.eventName !== undefined) {
queryParameters['eventName'] = requestParameters.eventName;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/webhooks/test`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
AbstractWebhookPayloadFromJSON(jsonValue)
);
}
/**
* Get test webhook payload example. Response content depends on eventName passed. Uses `EMAIL_RECEIVED` as default.
*/
async getTestWebhookPayload(
requestParameters: GetTestWebhookPayloadRequest,
initOverrides?: RequestInit
): Promise<AbstractWebhookPayload> {
const response = await this.getTestWebhookPayloadRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get webhook test payload for bounce
*/
async getTestWebhookPayloadBounceRaw(
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<WebhookBouncePayload>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/webhooks/test/email-bounce-payload`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
WebhookBouncePayloadFromJSON(jsonValue)
);
}
/**
* Get webhook test payload for bounce
*/
async getTestWebhookPayloadBounce(
initOverrides?: RequestInit
): Promise<WebhookBouncePayload> {
const response = await this.getTestWebhookPayloadBounceRaw(initOverrides);
return await response.value();
}
/**
* Get webhook test payload for bounce recipient
*/
async getTestWebhookPayloadBounceRecipientRaw(
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<WebhookBounceRecipientPayload>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/webhooks/test/email-bounce-recipient-payload`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
WebhookBounceRecipientPayloadFromJSON(jsonValue)
);
}
/**
* Get webhook test payload for bounce recipient
*/
async getTestWebhookPayloadBounceRecipient(
initOverrides?: RequestInit
): Promise<WebhookBounceRecipientPayload> {
const response = await this.getTestWebhookPayloadBounceRecipientRaw(
initOverrides
);
return await response.value();
}
/**
* Get webhook test payload for delivery status event
*/
async getTestWebhookPayloadDeliveryStatusRaw(
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<WebhookDeliveryStatusPayload>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/webhooks/test/delivery-status-payload`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
WebhookDeliveryStatusPayloadFromJSON(jsonValue)
);
}
/**
* Get webhook test payload for delivery status event
*/
async getTestWebhookPayloadDeliveryStatus(
initOverrides?: RequestInit
): Promise<WebhookDeliveryStatusPayload> {
const response = await this.getTestWebhookPayloadDeliveryStatusRaw(
initOverrides
);
return await response.value();
}
/**
* Get webhook test payload for email opened event
*/
async getTestWebhookPayloadEmailOpenedRaw(
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<WebhookEmailOpenedPayload>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/webhooks/test/email-opened-payload`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
WebhookEmailOpenedPayloadFromJSON(jsonValue)
);
}
/**
* Get webhook test payload for email opened event
*/
async getTestWebhookPayloadEmailOpened(
initOverrides?: RequestInit
): Promise<WebhookEmailOpenedPayload> {
const response = await this.getTestWebhookPayloadEmailOpenedRaw(
initOverrides
);
return await response.value();
}
/**
* Get webhook test payload for email opened event
*/
async getTestWebhookPayloadEmailReadRaw(
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<WebhookEmailReadPayload>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/webhooks/test/email-read-payload`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
WebhookEmailReadPayloadFromJSON(jsonValue)
);
}
/**
* Get webhook test payload for email opened event
*/
async getTestWebhookPayloadEmailRead(
initOverrides?: RequestInit
): Promise<WebhookEmailReadPayload> {
const response = await this.getTestWebhookPayloadEmailReadRaw(
initOverrides
);
return await response.value();
}
/**
* Get example payload for webhook
*/
async getTestWebhookPayloadForWebhookRaw(
requestParameters: GetTestWebhookPayloadForWebhookRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<AbstractWebhookPayload>> {
if (
requestParameters.webhookId === null ||
requestParameters.webhookId === undefined
) {
throw new runtime.RequiredError(
'webhookId',
'Required parameter requestParameters.webhookId was null or undefined when calling getTestWebhookPayloadForWebhook.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/webhooks/{webhookId}/example`.replace(
`{${'webhookId'}}`,
encodeURIComponent(String(requestParameters.webhookId))
),
method: 'POST',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
AbstractWebhookPayloadFromJSON(jsonValue)
);
}
/**
* Get example payload for webhook
*/
async getTestWebhookPayloadForWebhook(
requestParameters: GetTestWebhookPayloadForWebhookRequest,
initOverrides?: RequestInit
): Promise<AbstractWebhookPayload> {
const response = await this.getTestWebhookPayloadForWebhookRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get webhook test payload for new attachment event
*/
async getTestWebhookPayloadNewAttachmentRaw(
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<WebhookNewAttachmentPayload>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/webhooks/test/new-attachment-payload`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
WebhookNewAttachmentPayloadFromJSON(jsonValue)
);
}
/**
* Get webhook test payload for new attachment event
*/
async getTestWebhookPayloadNewAttachment(
initOverrides?: RequestInit
): Promise<WebhookNewAttachmentPayload> {
const response = await this.getTestWebhookPayloadNewAttachmentRaw(
initOverrides
);
return await response.value();
}
/**
* Get webhook test payload for new contact event
*/
async getTestWebhookPayloadNewContactRaw(
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<WebhookNewContactPayload>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/webhooks/test/new-contact-payload`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
WebhookNewContactPayloadFromJSON(jsonValue)
);
}
/**
* Get webhook test payload for new contact event
*/
async getTestWebhookPayloadNewContact(
initOverrides?: RequestInit
): Promise<WebhookNewContactPayload> {
const response = await this.getTestWebhookPayloadNewContactRaw(
initOverrides
);
return await response.value();
}
/**
* Get webhook test payload for new email event
*/
async getTestWebhookPayloadNewEmailRaw(
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<WebhookNewEmailPayload>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/webhooks/test/new-email-payload`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
WebhookNewEmailPayloadFromJSON(jsonValue)
);
}
/**
* Get webhook test payload for new email event
*/
async getTestWebhookPayloadNewEmail(
initOverrides?: RequestInit
): Promise<WebhookNewEmailPayload> {
const response = await this.getTestWebhookPayloadNewEmailRaw(initOverrides);
return await response.value();
}
/**
* Get webhook test payload for new sms event
*/
async getTestWebhookPayloadNewSmsRaw(
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<WebhookNewSmsPayload>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/webhooks/test/new-sms-payload`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
WebhookNewSmsPayloadFromJSON(jsonValue)
);
}
/**
* Get webhook test payload for new sms event
*/
async getTestWebhookPayloadNewSms(
initOverrides?: RequestInit
): Promise<WebhookNewSmsPayload> {
const response = await this.getTestWebhookPayloadNewSmsRaw(initOverrides);
return await response.value();
}
/**
* Get a webhook
*/
async getWebhookRaw(
requestParameters: GetWebhookRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<WebhookDto>> {
if (
requestParameters.webhookId === null ||
requestParameters.webhookId === undefined
) {
throw new runtime.RequiredError(
'webhookId',
'Required parameter requestParameters.webhookId was null or undefined when calling getWebhook.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/webhooks/{webhookId}`.replace(
`{${'webhookId'}}`,
encodeURIComponent(String(requestParameters.webhookId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
WebhookDtoFromJSON(jsonValue)
);
}
/**
* Get a webhook
*/
async getWebhook(
requestParameters: GetWebhookRequest,
initOverrides?: RequestInit
): Promise<WebhookDto> {
const response = await this.getWebhookRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Get a webhook result for a webhook
*/
async getWebhookResultRaw(
requestParameters: GetWebhookResultRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<WebhookResultDto>> {
if (
requestParameters.webhookResultId === null ||
requestParameters.webhookResultId === undefined
) {
throw new runtime.RequiredError(
'webhookResultId',
'Required parameter requestParameters.webhookResultId was null or undefined when calling getWebhookResult.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/webhooks/results/{webhookResultId}`.replace(
`{${'webhookResultId'}}`,
encodeURIComponent(String(requestParameters.webhookResultId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
WebhookResultDtoFromJSON(jsonValue)
);
}
/**
* Get a webhook result for a webhook
*/
async getWebhookResult(
requestParameters: GetWebhookResultRequest,
initOverrides?: RequestInit
): Promise<WebhookResultDto> {
const response = await this.getWebhookResultRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get a webhook results for a webhook
*/
async getWebhookResultsRaw(
requestParameters: GetWebhookResultsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageWebhookResult>> {
if (
requestParameters.webhookId === null ||
requestParameters.webhookId === undefined
) {
throw new runtime.RequiredError(
'webhookId',
'Required parameter requestParameters.webhookId was null or undefined when calling getWebhookResults.'
);
}
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.searchFilter !== undefined) {
queryParameters['searchFilter'] = requestParameters.searchFilter;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
if (requestParameters.unseenOnly !== undefined) {
queryParameters['unseenOnly'] = requestParameters.unseenOnly;
}
if (requestParameters.resultType !== undefined) {
queryParameters['resultType'] = requestParameters.resultType;
}
if (requestParameters.eventName !== undefined) {
queryParameters['eventName'] = requestParameters.eventName;
}
if (requestParameters.minStatusCode !== undefined) {
queryParameters['minStatusCode'] = requestParameters.minStatusCode;
}
if (requestParameters.maxStatusCode !== undefined) {
queryParameters['maxStatusCode'] = requestParameters.maxStatusCode;
}
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
if (requestParameters.smsId !== undefined) {
queryParameters['smsId'] = requestParameters.smsId;
}
if (requestParameters.attachmentId !== undefined) {
queryParameters['attachmentId'] = requestParameters.attachmentId;
}
if (requestParameters.emailId !== undefined) {
queryParameters['emailId'] = requestParameters.emailId;
}
if (requestParameters.phoneId !== undefined) {
queryParameters['phoneId'] = requestParameters.phoneId;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/webhooks/{webhookId}/results`.replace(
`{${'webhookId'}}`,
encodeURIComponent(String(requestParameters.webhookId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageWebhookResultFromJSON(jsonValue)
);
}
/**
* Get a webhook results for a webhook
*/
async getWebhookResults(
requestParameters: GetWebhookResultsRequest,
initOverrides?: RequestInit
): Promise<PageWebhookResult> {
const response = await this.getWebhookResultsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get a webhook results count for a webhook
*/
async getWebhookResultsCountRaw(
requestParameters: GetWebhookResultsCountRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<CountDto>> {
if (
requestParameters.webhookId === null ||
requestParameters.webhookId === undefined
) {
throw new runtime.RequiredError(
'webhookId',
'Required parameter requestParameters.webhookId was null or undefined when calling getWebhookResultsCount.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/webhooks/{webhookId}/results/count`.replace(
`{${'webhookId'}}`,
encodeURIComponent(String(requestParameters.webhookId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
CountDtoFromJSON(jsonValue)
);
}
/**
* Get a webhook results count for a webhook
*/
async getWebhookResultsCount(
requestParameters: GetWebhookResultsCountRequest,
initOverrides?: RequestInit
): Promise<CountDto> {
const response = await this.getWebhookResultsCountRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get count of unseen webhook results with error status
*/
async getWebhookResultsUnseenErrorCountRaw(
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<UnseenErrorCountDto>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/webhooks/results/unseen-count`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
UnseenErrorCountDtoFromJSON(jsonValue)
);
}
/**
* Get count of unseen webhook results with error status
*/
async getWebhookResultsUnseenErrorCount(
initOverrides?: RequestInit
): Promise<UnseenErrorCountDto> {
const response = await this.getWebhookResultsUnseenErrorCountRaw(
initOverrides
);
return await response.value();
}
/**
* Get all webhooks for an Inbox
*/
async getWebhooksRaw(
requestParameters: GetWebhooksRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<Array<WebhookDto>>> {
if (
requestParameters.inboxId === null ||
requestParameters.inboxId === undefined
) {
throw new runtime.RequiredError(
'inboxId',
'Required parameter requestParameters.inboxId was null or undefined when calling getWebhooks.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/{inboxId}/webhooks`.replace(
`{${'inboxId'}}`,
encodeURIComponent(String(requestParameters.inboxId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
jsonValue.map(WebhookDtoFromJSON)
);
}
/**
* Get all webhooks for an Inbox
*/
async getWebhooks(
requestParameters: GetWebhooksRequest,
initOverrides?: RequestInit
): Promise<Array<WebhookDto>> {
const response = await this.getWebhooksRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Allows you to resend webhook payloads for any recorded webhook result that failed to deliver the payload.
* Redrive all webhook results that have failed status
*/
async redriveAllWebhookResultsRaw(
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<WebhookRedriveAllResult>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/webhooks/results/redrive`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
WebhookRedriveAllResultFromJSON(jsonValue)
);
}
/**
* Allows you to resend webhook payloads for any recorded webhook result that failed to deliver the payload.
* Redrive all webhook results that have failed status
*/
async redriveAllWebhookResults(
initOverrides?: RequestInit
): Promise<WebhookRedriveAllResult> {
const response = await this.redriveAllWebhookResultsRaw(initOverrides);
return await response.value();
}
/**
* Allows you to resend a webhook payload that was already sent. Webhooks that fail are retried automatically for 24 hours and then put in a dead letter queue. You can retry results manually using this method.
* Get a webhook result and try to resend the original webhook payload
*/
async redriveWebhookResultRaw(
requestParameters: RedriveWebhookResultRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<WebhookRedriveResult>> {
if (
requestParameters.webhookResultId === null ||
requestParameters.webhookResultId === undefined
) {
throw new runtime.RequiredError(
'webhookResultId',
'Required parameter requestParameters.webhookResultId was null or undefined when calling redriveWebhookResult.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/webhooks/results/{webhookResultId}/redrive`.replace(
`{${'webhookResultId'}}`,
encodeURIComponent(String(requestParameters.webhookResultId))
),
method: 'POST',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
WebhookRedriveResultFromJSON(jsonValue)
);
}
/**
* Allows you to resend a webhook payload that was already sent. Webhooks that fail are retried automatically for 24 hours and then put in a dead letter queue. You can retry results manually using this method.
* Get a webhook result and try to resend the original webhook payload
*/
async redriveWebhookResult(
requestParameters: RedriveWebhookResultRequest,
initOverrides?: RequestInit
): Promise<WebhookRedriveResult> {
const response = await this.redriveWebhookResultRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Send webhook test data
*/
async sendTestDataRaw(
requestParameters: SendTestDataRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<WebhookTestResult>> {
if (
requestParameters.webhookId === null ||
requestParameters.webhookId === undefined
) {
throw new runtime.RequiredError(
'webhookId',
'Required parameter requestParameters.webhookId was null or undefined when calling sendTestData.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/webhooks/{webhookId}/test`.replace(
`{${'webhookId'}}`,
encodeURIComponent(String(requestParameters.webhookId))
),
method: 'POST',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
WebhookTestResultFromJSON(jsonValue)
);
}
/**
* Send webhook test data
*/
async sendTestData(
requestParameters: SendTestDataRequest,
initOverrides?: RequestInit
): Promise<WebhookTestResult> {
const response = await this.sendTestDataRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Update a webhook request headers
*/
async updateWebhookHeadersRaw(
requestParameters: UpdateWebhookHeadersRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<WebhookDto>> {
if (
requestParameters.webhookId === null ||
requestParameters.webhookId === undefined
) {
throw new runtime.RequiredError(
'webhookId',
'Required parameter requestParameters.webhookId was null or undefined when calling updateWebhookHeaders.'
);
}
if (
requestParameters.webhookHeaders === null ||
requestParameters.webhookHeaders === undefined
) {
throw new runtime.RequiredError(
'webhookHeaders',
'Required parameter requestParameters.webhookHeaders was null or undefined when calling updateWebhookHeaders.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/webhooks/{webhookId}/headers`.replace(
`{${'webhookId'}}`,
encodeURIComponent(String(requestParameters.webhookId))
),
method: 'PUT',
headers: headerParameters,
query: queryParameters,
body: WebhookHeadersToJSON(requestParameters.webhookHeaders),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
WebhookDtoFromJSON(jsonValue)
);
}
/**
* Update a webhook request headers
*/
async updateWebhookHeaders(
requestParameters: UpdateWebhookHeadersRequest,
initOverrides?: RequestInit
): Promise<WebhookDto> {
const response = await this.updateWebhookHeadersRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Verify a webhook payload using the messageId and signature. This allows you to be sure that MailSlurp sent the payload and not another server.
* Verify a webhook payload signature
*/
async verifyWebhookSignatureRaw(
requestParameters: VerifyWebhookSignatureRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<VerifyWebhookSignatureResults>> {
if (
requestParameters.verifyWebhookSignatureOptions === null ||
requestParameters.verifyWebhookSignatureOptions === undefined
) {
throw new runtime.RequiredError(
'verifyWebhookSignatureOptions',
'Required parameter requestParameters.verifyWebhookSignatureOptions was null or undefined when calling verifyWebhookSignature.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/webhooks/verify`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: VerifyWebhookSignatureOptionsToJSON(
requestParameters.verifyWebhookSignatureOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
VerifyWebhookSignatureResultsFromJSON(jsonValue)
);
}
/**
* Verify a webhook payload using the messageId and signature. This allows you to be sure that MailSlurp sent the payload and not another server.
* Verify a webhook payload signature
*/
async verifyWebhookSignature(
requestParameters: VerifyWebhookSignatureRequest,
initOverrides?: RequestInit
): Promise<VerifyWebhookSignatureResults> {
const response = await this.verifyWebhookSignatureRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Wait for webhook results for a webhook
*/
async waitForWebhookResultsRaw(
requestParameters: WaitForWebhookResultsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<Array<WebhookResultDto>>> {
if (
requestParameters.webhookId === null ||
requestParameters.webhookId === undefined
) {
throw new runtime.RequiredError(
'webhookId',
'Required parameter requestParameters.webhookId was null or undefined when calling waitForWebhookResults.'
);
}
if (
requestParameters.expectedCount === null ||
requestParameters.expectedCount === undefined
) {
throw new runtime.RequiredError(
'expectedCount',
'Required parameter requestParameters.expectedCount was null or undefined when calling waitForWebhookResults.'
);
}
if (
requestParameters.timeout === null ||
requestParameters.timeout === undefined
) {
throw new runtime.RequiredError(
'timeout',
'Required parameter requestParameters.timeout was null or undefined when calling waitForWebhookResults.'
);
}
const queryParameters: any = {};
if (requestParameters.expectedCount !== undefined) {
queryParameters['expectedCount'] = requestParameters.expectedCount;
}
if (requestParameters.timeout !== undefined) {
queryParameters['timeout'] = requestParameters.timeout;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/webhooks/{webhookId}/wait`.replace(
`{${'webhookId'}}`,
encodeURIComponent(String(requestParameters.webhookId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
jsonValue.map(WebhookResultDtoFromJSON)
);
}
/**
* Wait for webhook results for a webhook
*/
async waitForWebhookResults(
requestParameters: WaitForWebhookResultsRequest,
initOverrides?: RequestInit
): Promise<Array<WebhookResultDto>> {
const response = await this.waitForWebhookResultsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
}
/**
* @export
* @enum {string}
*/
export enum GetAllAccountWebhooksSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum GetAllAccountWebhooksEventTypeEnum {
EMAIL_RECEIVED = 'EMAIL_RECEIVED',
NEW_EMAIL = 'NEW_EMAIL',
NEW_CONTACT = 'NEW_CONTACT',
NEW_ATTACHMENT = 'NEW_ATTACHMENT',
EMAIL_OPENED = 'EMAIL_OPENED',
EMAIL_READ = 'EMAIL_READ',
DELIVERY_STATUS = 'DELIVERY_STATUS',
BOUNCE = 'BOUNCE',
BOUNCE_RECIPIENT = 'BOUNCE_RECIPIENT',
NEW_SMS = 'NEW_SMS',
}
/**
* @export
* @enum {string}
*/
export enum GetAllWebhookResultsSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum GetAllWebhookResultsResultTypeEnum {
BAD_RESPONSE = 'BAD_RESPONSE',
EXCEPTION = 'EXCEPTION',
SUCCESS = 'SUCCESS',
REDRIVEN = 'REDRIVEN',
}
/**
* @export
* @enum {string}
*/
export enum GetAllWebhookResultsEventNameEnum {
EMAIL_RECEIVED = 'EMAIL_RECEIVED',
NEW_EMAIL = 'NEW_EMAIL',
NEW_CONTACT = 'NEW_CONTACT',
NEW_ATTACHMENT = 'NEW_ATTACHMENT',
EMAIL_OPENED = 'EMAIL_OPENED',
EMAIL_READ = 'EMAIL_READ',
DELIVERY_STATUS = 'DELIVERY_STATUS',
BOUNCE = 'BOUNCE',
BOUNCE_RECIPIENT = 'BOUNCE_RECIPIENT',
NEW_SMS = 'NEW_SMS',
}
/**
* @export
* @enum {string}
*/
export enum GetAllWebhooksSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum GetInboxWebhooksPaginatedSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum GetJsonSchemaForWebhookEventEventEnum {
EMAIL_RECEIVED = 'EMAIL_RECEIVED',
NEW_EMAIL = 'NEW_EMAIL',
NEW_CONTACT = 'NEW_CONTACT',
NEW_ATTACHMENT = 'NEW_ATTACHMENT',
EMAIL_OPENED = 'EMAIL_OPENED',
EMAIL_READ = 'EMAIL_READ',
DELIVERY_STATUS = 'DELIVERY_STATUS',
BOUNCE = 'BOUNCE',
BOUNCE_RECIPIENT = 'BOUNCE_RECIPIENT',
NEW_SMS = 'NEW_SMS',
}
/**
* @export
* @enum {string}
*/
export enum GetPhoneNumberWebhooksPaginatedSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum GetTestWebhookPayloadEventNameEnum {
EMAIL_RECEIVED = 'EMAIL_RECEIVED',
NEW_EMAIL = 'NEW_EMAIL',
NEW_CONTACT = 'NEW_CONTACT',
NEW_ATTACHMENT = 'NEW_ATTACHMENT',
EMAIL_OPENED = 'EMAIL_OPENED',
EMAIL_READ = 'EMAIL_READ',
DELIVERY_STATUS = 'DELIVERY_STATUS',
BOUNCE = 'BOUNCE',
BOUNCE_RECIPIENT = 'BOUNCE_RECIPIENT',
NEW_SMS = 'NEW_SMS',
}
/**
* @export
* @enum {string}
*/
export enum GetWebhookResultsSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum GetWebhookResultsResultTypeEnum {
BAD_RESPONSE = 'BAD_RESPONSE',
EXCEPTION = 'EXCEPTION',
SUCCESS = 'SUCCESS',
REDRIVEN = 'REDRIVEN',
}
/**
* @export
* @enum {string}
*/
export enum GetWebhookResultsEventNameEnum {
EMAIL_RECEIVED = 'EMAIL_RECEIVED',
NEW_EMAIL = 'NEW_EMAIL',
NEW_CONTACT = 'NEW_CONTACT',
NEW_ATTACHMENT = 'NEW_ATTACHMENT',
EMAIL_OPENED = 'EMAIL_OPENED',
EMAIL_READ = 'EMAIL_READ',
DELIVERY_STATUS = 'DELIVERY_STATUS',
BOUNCE = 'BOUNCE',
BOUNCE_RECIPIENT = 'BOUNCE_RECIPIENT',
NEW_SMS = 'NEW_SMS',
}
/* 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 * as runtime from '../runtime';
import {
Email,
EmailFromJSON,
EmailToJSON,
EmailPreview,
EmailPreviewFromJSON,
EmailPreviewToJSON,
MatchOptions,
MatchOptionsFromJSON,
MatchOptionsToJSON,
SmsDto,
SmsDtoFromJSON,
SmsDtoToJSON,
SmsPreview,
SmsPreviewFromJSON,
SmsPreviewToJSON,
WaitForConditions,
WaitForConditionsFromJSON,
WaitForConditionsToJSON,
WaitForSingleSmsOptions,
WaitForSingleSmsOptionsFromJSON,
WaitForSingleSmsOptionsToJSON,
WaitForSmsConditions,
WaitForSmsConditionsFromJSON,
WaitForSmsConditionsToJSON,
} from '../models';
export interface WaitForRequest {
waitForConditions: WaitForConditions;
}
export interface WaitForEmailCountRequest {
inboxId: string;
count: number;
timeout?: number;
unreadOnly?: boolean;
before?: Date;
since?: Date;
sort?: WaitForEmailCountSortEnum;
delay?: number;
}
export interface WaitForLatestEmailRequest {
inboxId?: string;
timeout?: number;
unreadOnly?: boolean;
before?: Date;
since?: Date;
sort?: WaitForLatestEmailSortEnum;
delay?: number;
}
export interface WaitForLatestSmsRequest {
waitForSingleSmsOptions: WaitForSingleSmsOptions;
}
export interface WaitForMatchingEmailsRequest {
inboxId: string;
count: number;
matchOptions: MatchOptions;
before?: Date;
since?: Date;
sort?: WaitForMatchingEmailsSortEnum;
delay?: number;
timeout?: number;
unreadOnly?: boolean;
}
export interface WaitForMatchingFirstEmailRequest {
inboxId: string;
matchOptions: MatchOptions;
timeout?: number;
unreadOnly?: boolean;
since?: Date;
before?: Date;
sort?: WaitForMatchingFirstEmailSortEnum;
delay?: number;
}
export interface WaitForNthEmailRequest {
inboxId?: string;
index?: number;
timeout?: number;
unreadOnly?: boolean;
since?: Date;
before?: Date;
sort?: WaitForNthEmailSortEnum;
delay?: number;
}
export interface WaitForSmsRequest {
waitForSmsConditions: WaitForSmsConditions;
}
/**
*
*/
export class WaitForControllerApi extends runtime.BaseAPI {
/**
* Generic waitFor method that will wait until an inbox meets given conditions or return immediately if already met
* Wait for an email to match the provided filter conditions such as subject contains keyword.
*/
async waitForRaw(
requestParameters: WaitForRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<Array<EmailPreview>>> {
if (
requestParameters.waitForConditions === null ||
requestParameters.waitForConditions === undefined
) {
throw new runtime.RequiredError(
'waitForConditions',
'Required parameter requestParameters.waitForConditions was null or undefined when calling waitFor.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/waitFor`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: WaitForConditionsToJSON(requestParameters.waitForConditions),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
jsonValue.map(EmailPreviewFromJSON)
);
}
/**
* Generic waitFor method that will wait until an inbox meets given conditions or return immediately if already met
* Wait for an email to match the provided filter conditions such as subject contains keyword.
*/
async waitFor(
requestParameters: WaitForRequest,
initOverrides?: RequestInit
): Promise<Array<EmailPreview>> {
const response = await this.waitForRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* If inbox contains count or more emails at time of request then return count worth of emails. If not wait until the count is reached and return those or return an error if timeout is exceeded.
* Wait for and return count number of emails. Hold connection until inbox count matches expected or timeout occurs
*/
async waitForEmailCountRaw(
requestParameters: WaitForEmailCountRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<Array<EmailPreview>>> {
if (
requestParameters.inboxId === null ||
requestParameters.inboxId === undefined
) {
throw new runtime.RequiredError(
'inboxId',
'Required parameter requestParameters.inboxId was null or undefined when calling waitForEmailCount.'
);
}
if (
requestParameters.count === null ||
requestParameters.count === undefined
) {
throw new runtime.RequiredError(
'count',
'Required parameter requestParameters.count was null or undefined when calling waitForEmailCount.'
);
}
const queryParameters: any = {};
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
if (requestParameters.count !== undefined) {
queryParameters['count'] = requestParameters.count;
}
if (requestParameters.timeout !== undefined) {
queryParameters['timeout'] = requestParameters.timeout;
}
if (requestParameters.unreadOnly !== undefined) {
queryParameters['unreadOnly'] = requestParameters.unreadOnly;
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.delay !== undefined) {
queryParameters['delay'] = requestParameters.delay;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/waitForEmailCount`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
jsonValue.map(EmailPreviewFromJSON)
);
}
/**
* If inbox contains count or more emails at time of request then return count worth of emails. If not wait until the count is reached and return those or return an error if timeout is exceeded.
* Wait for and return count number of emails. Hold connection until inbox count matches expected or timeout occurs
*/
async waitForEmailCount(
requestParameters: WaitForEmailCountRequest,
initOverrides?: RequestInit
): Promise<Array<EmailPreview>> {
const response = await this.waitForEmailCountRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Will return either the last received email or wait for an email to arrive and return that. If you need to wait for an email for a non-empty inbox set `unreadOnly=true` or see the other receive methods such as `waitForNthEmail` or `waitForEmailCount`.
* Fetch inbox\'s latest email or if empty wait for an email to arrive
*/
async waitForLatestEmailRaw(
requestParameters: WaitForLatestEmailRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<Email>> {
const queryParameters: any = {};
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
if (requestParameters.timeout !== undefined) {
queryParameters['timeout'] = requestParameters.timeout;
}
if (requestParameters.unreadOnly !== undefined) {
queryParameters['unreadOnly'] = requestParameters.unreadOnly;
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.delay !== undefined) {
queryParameters['delay'] = requestParameters.delay;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/waitForLatestEmail`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
EmailFromJSON(jsonValue)
);
}
/**
* Will return either the last received email or wait for an email to arrive and return that. If you need to wait for an email for a non-empty inbox set `unreadOnly=true` or see the other receive methods such as `waitForNthEmail` or `waitForEmailCount`.
* Fetch inbox\'s latest email or if empty wait for an email to arrive
*/
async waitForLatestEmail(
requestParameters: WaitForLatestEmailRequest,
initOverrides?: RequestInit
): Promise<Email> {
const response = await this.waitForLatestEmailRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Wait until a phone number meets given conditions or return immediately if already met
* Wait for the latest SMS message to match the provided filter conditions such as body contains keyword.
*/
async waitForLatestSmsRaw(
requestParameters: WaitForLatestSmsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<SmsDto>> {
if (
requestParameters.waitForSingleSmsOptions === null ||
requestParameters.waitForSingleSmsOptions === undefined
) {
throw new runtime.RequiredError(
'waitForSingleSmsOptions',
'Required parameter requestParameters.waitForSingleSmsOptions was null or undefined when calling waitForLatestSms.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/waitForLatestSms`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: WaitForSingleSmsOptionsToJSON(
requestParameters.waitForSingleSmsOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
SmsDtoFromJSON(jsonValue)
);
}
/**
* Wait until a phone number meets given conditions or return immediately if already met
* Wait for the latest SMS message to match the provided filter conditions such as body contains keyword.
*/
async waitForLatestSms(
requestParameters: WaitForLatestSmsRequest,
initOverrides?: RequestInit
): Promise<SmsDto> {
const response = await this.waitForLatestSmsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Perform a search of emails in an inbox with the given patterns. If results match expected count then return or else retry the search until results are found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options. An example payload is `{ matches: [{field: \'SUBJECT\',should:\'CONTAIN\',value:\'needle\'}] }`. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController `getEmailContentMatch` method.
* Wait or return list of emails that match simple matching patterns
*/
async waitForMatchingEmailsRaw(
requestParameters: WaitForMatchingEmailsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<Array<EmailPreview>>> {
if (
requestParameters.inboxId === null ||
requestParameters.inboxId === undefined
) {
throw new runtime.RequiredError(
'inboxId',
'Required parameter requestParameters.inboxId was null or undefined when calling waitForMatchingEmails.'
);
}
if (
requestParameters.count === null ||
requestParameters.count === undefined
) {
throw new runtime.RequiredError(
'count',
'Required parameter requestParameters.count was null or undefined when calling waitForMatchingEmails.'
);
}
if (
requestParameters.matchOptions === null ||
requestParameters.matchOptions === undefined
) {
throw new runtime.RequiredError(
'matchOptions',
'Required parameter requestParameters.matchOptions was null or undefined when calling waitForMatchingEmails.'
);
}
const queryParameters: any = {};
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
if (requestParameters.count !== undefined) {
queryParameters['count'] = requestParameters.count;
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.delay !== undefined) {
queryParameters['delay'] = requestParameters.delay;
}
if (requestParameters.timeout !== undefined) {
queryParameters['timeout'] = requestParameters.timeout;
}
if (requestParameters.unreadOnly !== undefined) {
queryParameters['unreadOnly'] = requestParameters.unreadOnly;
}
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/waitForMatchingEmails`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: MatchOptionsToJSON(requestParameters.matchOptions),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
jsonValue.map(EmailPreviewFromJSON)
);
}
/**
* Perform a search of emails in an inbox with the given patterns. If results match expected count then return or else retry the search until results are found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options. An example payload is `{ matches: [{field: \'SUBJECT\',should:\'CONTAIN\',value:\'needle\'}] }`. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController `getEmailContentMatch` method.
* Wait or return list of emails that match simple matching patterns
*/
async waitForMatchingEmails(
requestParameters: WaitForMatchingEmailsRequest,
initOverrides?: RequestInit
): Promise<Array<EmailPreview>> {
const response = await this.waitForMatchingEmailsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Perform a search of emails in an inbox with the given patterns. If a result if found then return or else retry the search until a result is found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options. An example payload is `{ matches: [{field: \'SUBJECT\',should:\'CONTAIN\',value:\'needle\'}] }`. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController `getEmailContentMatch` method.
* Wait for or return the first email that matches provided MatchOptions array
*/
async waitForMatchingFirstEmailRaw(
requestParameters: WaitForMatchingFirstEmailRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<Email>> {
if (
requestParameters.inboxId === null ||
requestParameters.inboxId === undefined
) {
throw new runtime.RequiredError(
'inboxId',
'Required parameter requestParameters.inboxId was null or undefined when calling waitForMatchingFirstEmail.'
);
}
if (
requestParameters.matchOptions === null ||
requestParameters.matchOptions === undefined
) {
throw new runtime.RequiredError(
'matchOptions',
'Required parameter requestParameters.matchOptions was null or undefined when calling waitForMatchingFirstEmail.'
);
}
const queryParameters: any = {};
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
if (requestParameters.timeout !== undefined) {
queryParameters['timeout'] = requestParameters.timeout;
}
if (requestParameters.unreadOnly !== undefined) {
queryParameters['unreadOnly'] = requestParameters.unreadOnly;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.delay !== undefined) {
queryParameters['delay'] = requestParameters.delay;
}
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/waitForMatchingFirstEmail`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: MatchOptionsToJSON(requestParameters.matchOptions),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
EmailFromJSON(jsonValue)
);
}
/**
* Perform a search of emails in an inbox with the given patterns. If a result if found then return or else retry the search until a result is found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options. An example payload is `{ matches: [{field: \'SUBJECT\',should:\'CONTAIN\',value:\'needle\'}] }`. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController `getEmailContentMatch` method.
* Wait for or return the first email that matches provided MatchOptions array
*/
async waitForMatchingFirstEmail(
requestParameters: WaitForMatchingFirstEmailRequest,
initOverrides?: RequestInit
): Promise<Email> {
const response = await this.waitForMatchingFirstEmailRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* If nth email is already present in inbox then return it. If not hold the connection open until timeout expires or the nth email is received and returned.
* Wait for or fetch the email with a given index in the inbox specified. If index doesn\'t exist waits for it to exist or timeout to occur.
*/
async waitForNthEmailRaw(
requestParameters: WaitForNthEmailRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<Email>> {
const queryParameters: any = {};
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
if (requestParameters.index !== undefined) {
queryParameters['index'] = requestParameters.index;
}
if (requestParameters.timeout !== undefined) {
queryParameters['timeout'] = requestParameters.timeout;
}
if (requestParameters.unreadOnly !== undefined) {
queryParameters['unreadOnly'] = requestParameters.unreadOnly;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.delay !== undefined) {
queryParameters['delay'] = requestParameters.delay;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/waitForNthEmail`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
EmailFromJSON(jsonValue)
);
}
/**
* If nth email is already present in inbox then return it. If not hold the connection open until timeout expires or the nth email is received and returned.
* Wait for or fetch the email with a given index in the inbox specified. If index doesn\'t exist waits for it to exist or timeout to occur.
*/
async waitForNthEmail(
requestParameters: WaitForNthEmailRequest,
initOverrides?: RequestInit
): Promise<Email> {
const response = await this.waitForNthEmailRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Generic waitFor method that will wait until a phone number meets given conditions or return immediately if already met
* Wait for an SMS message to match the provided filter conditions such as body contains keyword.
*/
async waitForSmsRaw(
requestParameters: WaitForSmsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<Array<SmsPreview>>> {
if (
requestParameters.waitForSmsConditions === null ||
requestParameters.waitForSmsConditions === undefined
) {
throw new runtime.RequiredError(
'waitForSmsConditions',
'Required parameter requestParameters.waitForSmsConditions was null or undefined when calling waitForSms.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/waitForSms`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: WaitForSmsConditionsToJSON(
requestParameters.waitForSmsConditions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
jsonValue.map(SmsPreviewFromJSON)
);
}
/**
* Generic waitFor method that will wait until a phone number meets given conditions or return immediately if already met
* Wait for an SMS message to match the provided filter conditions such as body contains keyword.
*/
async waitForSms(
requestParameters: WaitForSmsRequest,
initOverrides?: RequestInit
): Promise<Array<SmsPreview>> {
const response = await this.waitForSmsRaw(requestParameters, initOverrides);
return await response.value();
}
}
/**
* @export
* @enum {string}
*/
export enum WaitForEmailCountSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum WaitForLatestEmailSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum WaitForMatchingEmailsSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum WaitForMatchingFirstEmailSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum WaitForNthEmailSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/* 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 * as runtime from '../runtime';
import { UserInfoDto, UserInfoDtoFromJSON, UserInfoDtoToJSON } from '../models';
export interface GetJsonPropertyAsStringRequest {
property: string;
body: object | null;
}
/**
*
*/
export class UserControllerApi extends runtime.BaseAPI {
/**
* Utility function to extract properties from JSON objects in language where this is cumbersome.
*/
async getJsonPropertyAsStringRaw(
requestParameters: GetJsonPropertyAsStringRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<string>> {
if (
requestParameters.property === null ||
requestParameters.property === undefined
) {
throw new runtime.RequiredError(
'property',
'Required parameter requestParameters.property was null or undefined when calling getJsonPropertyAsString.'
);
}
if (
requestParameters.body === null ||
requestParameters.body === undefined
) {
throw new runtime.RequiredError(
'body',
'Required parameter requestParameters.body was null or undefined when calling getJsonPropertyAsString.'
);
}
const queryParameters: any = {};
if (requestParameters.property !== undefined) {
queryParameters['property'] = requestParameters.property;
}
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/user/json/pluck`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: requestParameters.body as any,
},
initOverrides
);
return new runtime.TextApiResponse(response) as any;
}
/**
* Utility function to extract properties from JSON objects in language where this is cumbersome.
*/
async getJsonPropertyAsString(
requestParameters: GetJsonPropertyAsStringRequest,
initOverrides?: RequestInit
): Promise<string> {
const response = await this.getJsonPropertyAsStringRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get account information for your user
*/
async getUserInfoRaw(
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<UserInfoDto>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/user/info`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
UserInfoDtoFromJSON(jsonValue)
);
}
/**
* Get account information for your user
*/
async getUserInfo(initOverrides?: RequestInit): Promise<UserInfoDto> {
const response = await this.getUserInfoRaw(initOverrides);
return await response.value();
}
}
/* 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 * as runtime from '../runtime';
import {
CreateTrackingPixelOptions,
CreateTrackingPixelOptionsFromJSON,
CreateTrackingPixelOptionsToJSON,
PageTrackingPixelProjection,
PageTrackingPixelProjectionFromJSON,
PageTrackingPixelProjectionToJSON,
TrackingPixelDto,
TrackingPixelDtoFromJSON,
TrackingPixelDtoToJSON,
} from '../models';
export interface CreateTrackingPixelRequest {
createTrackingPixelOptions: CreateTrackingPixelOptions;
}
export interface GetAllTrackingPixelsRequest {
page?: number;
size?: number;
sort?: GetAllTrackingPixelsSortEnum;
searchFilter?: string;
since?: Date;
before?: Date;
}
export interface GetTrackingPixelRequest {
id: string;
}
/**
*
*/
export class TrackingControllerApi extends runtime.BaseAPI {
/**
* Create a tracking pixel. A tracking pixel is an image that can be embedded in an email. When the email is viewed and the image is seen MailSlurp will mark the pixel as seen. Use tracking pixels to monitor email open events. You can receive open notifications via webhook or by fetching the pixel.
* Create tracking pixel
*/
async createTrackingPixelRaw(
requestParameters: CreateTrackingPixelRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<TrackingPixelDto>> {
if (
requestParameters.createTrackingPixelOptions === null ||
requestParameters.createTrackingPixelOptions === undefined
) {
throw new runtime.RequiredError(
'createTrackingPixelOptions',
'Required parameter requestParameters.createTrackingPixelOptions was null or undefined when calling createTrackingPixel.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/tracking/pixels`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: CreateTrackingPixelOptionsToJSON(
requestParameters.createTrackingPixelOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
TrackingPixelDtoFromJSON(jsonValue)
);
}
/**
* Create a tracking pixel. A tracking pixel is an image that can be embedded in an email. When the email is viewed and the image is seen MailSlurp will mark the pixel as seen. Use tracking pixels to monitor email open events. You can receive open notifications via webhook or by fetching the pixel.
* Create tracking pixel
*/
async createTrackingPixel(
requestParameters: CreateTrackingPixelRequest,
initOverrides?: RequestInit
): Promise<TrackingPixelDto> {
const response = await this.createTrackingPixelRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* List tracking pixels in paginated form
* Get tracking pixels
*/
async getAllTrackingPixelsRaw(
requestParameters: GetAllTrackingPixelsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageTrackingPixelProjection>> {
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.searchFilter !== undefined) {
queryParameters['searchFilter'] = requestParameters.searchFilter;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/tracking/pixels`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageTrackingPixelProjectionFromJSON(jsonValue)
);
}
/**
* List tracking pixels in paginated form
* Get tracking pixels
*/
async getAllTrackingPixels(
requestParameters: GetAllTrackingPixelsRequest,
initOverrides?: RequestInit
): Promise<PageTrackingPixelProjection> {
const response = await this.getAllTrackingPixelsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get pixel
*/
async getTrackingPixelRaw(
requestParameters: GetTrackingPixelRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<TrackingPixelDto>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError(
'id',
'Required parameter requestParameters.id was null or undefined when calling getTrackingPixel.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/tracking/pixels/{id}`.replace(
`{${'id'}}`,
encodeURIComponent(String(requestParameters.id))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
TrackingPixelDtoFromJSON(jsonValue)
);
}
/**
* Get pixel
*/
async getTrackingPixel(
requestParameters: GetTrackingPixelRequest,
initOverrides?: RequestInit
): Promise<TrackingPixelDto> {
const response = await this.getTrackingPixelRaw(
requestParameters,
initOverrides
);
return await response.value();
}
}
/**
* @export
* @enum {string}
*/
export enum GetAllTrackingPixelsSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/* 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 * as runtime from '../runtime';
import {
CheckEmailFeaturesClientSupportOptions,
CheckEmailFeaturesClientSupportOptionsFromJSON,
CheckEmailFeaturesClientSupportOptionsToJSON,
CheckEmailFeaturesClientSupportResults,
CheckEmailFeaturesClientSupportResultsFromJSON,
CheckEmailFeaturesClientSupportResultsToJSON,
FakeEmailPreview,
FakeEmailPreviewFromJSON,
FakeEmailPreviewToJSON,
FakeEmailResult,
FakeEmailResultFromJSON,
FakeEmailResultToJSON,
GenerateBimiRecordOptions,
GenerateBimiRecordOptionsFromJSON,
GenerateBimiRecordOptionsToJSON,
GenerateBimiRecordResults,
GenerateBimiRecordResultsFromJSON,
GenerateBimiRecordResultsToJSON,
GenerateDmarcRecordOptions,
GenerateDmarcRecordOptionsFromJSON,
GenerateDmarcRecordOptionsToJSON,
GenerateDmarcRecordResults,
GenerateDmarcRecordResultsFromJSON,
GenerateDmarcRecordResultsToJSON,
GenerateMtaStsRecordOptions,
GenerateMtaStsRecordOptionsFromJSON,
GenerateMtaStsRecordOptionsToJSON,
GenerateMtaStsRecordResults,
GenerateMtaStsRecordResultsFromJSON,
GenerateMtaStsRecordResultsToJSON,
GenerateTlsReportingRecordOptions,
GenerateTlsReportingRecordOptionsFromJSON,
GenerateTlsReportingRecordOptionsToJSON,
GenerateTlsReportingRecordResults,
GenerateTlsReportingRecordResultsFromJSON,
GenerateTlsReportingRecordResultsToJSON,
LookupBimiDomainOptions,
LookupBimiDomainOptionsFromJSON,
LookupBimiDomainOptionsToJSON,
LookupBimiDomainResults,
LookupBimiDomainResultsFromJSON,
LookupBimiDomainResultsToJSON,
LookupDmarcDomainOptions,
LookupDmarcDomainOptionsFromJSON,
LookupDmarcDomainOptionsToJSON,
LookupDmarcDomainResults,
LookupDmarcDomainResultsFromJSON,
LookupDmarcDomainResultsToJSON,
LookupMtaStsDomainOptions,
LookupMtaStsDomainOptionsFromJSON,
LookupMtaStsDomainOptionsToJSON,
LookupMtaStsDomainResults,
LookupMtaStsDomainResultsFromJSON,
LookupMtaStsDomainResultsToJSON,
LookupTlsReportingDomainOptions,
LookupTlsReportingDomainOptionsFromJSON,
LookupTlsReportingDomainOptionsToJSON,
LookupTlsReportingDomainResults,
LookupTlsReportingDomainResultsFromJSON,
LookupTlsReportingDomainResultsToJSON,
NewFakeEmailAddressResult,
NewFakeEmailAddressResultFromJSON,
NewFakeEmailAddressResultToJSON,
} from '../models';
export interface CheckEmailFeaturesClientSupportRequest {
checkEmailFeaturesClientSupportOptions: CheckEmailFeaturesClientSupportOptions;
}
export interface GenerateBimiRecordRequest {
generateBimiRecordOptions: GenerateBimiRecordOptions;
}
export interface GenerateDmarcRecordRequest {
generateDmarcRecordOptions: GenerateDmarcRecordOptions;
}
export interface GenerateMtaStsRecordRequest {
generateMtaStsRecordOptions: GenerateMtaStsRecordOptions;
}
export interface GenerateTlsReportingRecordRequest {
generateTlsReportingRecordOptions: GenerateTlsReportingRecordOptions;
}
export interface GetFakeEmailByIdRequest {
id: string;
}
export interface GetFakeEmailsForAddressRequest {
emailAddress: string;
page?: number;
}
export interface LookupBimiDomainRequest {
lookupBimiDomainOptions: LookupBimiDomainOptions;
}
export interface LookupDmarcDomainRequest {
lookupDmarcDomainOptions: LookupDmarcDomainOptions;
}
export interface LookupMtaStsDomainRequest {
lookupMtaStsDomainOptions: LookupMtaStsDomainOptions;
}
export interface LookupTlsReportingDomainRequest {
lookupTlsReportingDomainOptions: LookupTlsReportingDomainOptions;
}
/**
*
*/
export class ToolsControllerApi extends runtime.BaseAPI {
/**
* Check email client support for email HTML and CSS features
*/
async checkEmailFeaturesClientSupportRaw(
requestParameters: CheckEmailFeaturesClientSupportRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<CheckEmailFeaturesClientSupportResults>> {
if (
requestParameters.checkEmailFeaturesClientSupportOptions === null ||
requestParameters.checkEmailFeaturesClientSupportOptions === undefined
) {
throw new runtime.RequiredError(
'checkEmailFeaturesClientSupportOptions',
'Required parameter requestParameters.checkEmailFeaturesClientSupportOptions was null or undefined when calling checkEmailFeaturesClientSupport.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/tools/check-email-features-client-support`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: CheckEmailFeaturesClientSupportOptionsToJSON(
requestParameters.checkEmailFeaturesClientSupportOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
CheckEmailFeaturesClientSupportResultsFromJSON(jsonValue)
);
}
/**
* Check email client support for email HTML and CSS features
*/
async checkEmailFeaturesClientSupport(
requestParameters: CheckEmailFeaturesClientSupportRequest,
initOverrides?: RequestInit
): Promise<CheckEmailFeaturesClientSupportResults> {
const response = await this.checkEmailFeaturesClientSupportRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Create a new email address using the fake email domains
*/
async createNewFakeEmailAddressRaw(
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<NewFakeEmailAddressResult>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/tools/fake-email`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
NewFakeEmailAddressResultFromJSON(jsonValue)
);
}
/**
* Create a new email address using the fake email domains
*/
async createNewFakeEmailAddress(
initOverrides?: RequestInit
): Promise<NewFakeEmailAddressResult> {
const response = await this.createNewFakeEmailAddressRaw(initOverrides);
return await response.value();
}
/**
* Create a BIMI record policy
*/
async generateBimiRecordRaw(
requestParameters: GenerateBimiRecordRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<GenerateBimiRecordResults>> {
if (
requestParameters.generateBimiRecordOptions === null ||
requestParameters.generateBimiRecordOptions === undefined
) {
throw new runtime.RequiredError(
'generateBimiRecordOptions',
'Required parameter requestParameters.generateBimiRecordOptions was null or undefined when calling generateBimiRecord.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/tools/generate-bimi-record`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: GenerateBimiRecordOptionsToJSON(
requestParameters.generateBimiRecordOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
GenerateBimiRecordResultsFromJSON(jsonValue)
);
}
/**
* Create a BIMI record policy
*/
async generateBimiRecord(
requestParameters: GenerateBimiRecordRequest,
initOverrides?: RequestInit
): Promise<GenerateBimiRecordResults> {
const response = await this.generateBimiRecordRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Create a DMARC record policy
*/
async generateDmarcRecordRaw(
requestParameters: GenerateDmarcRecordRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<GenerateDmarcRecordResults>> {
if (
requestParameters.generateDmarcRecordOptions === null ||
requestParameters.generateDmarcRecordOptions === undefined
) {
throw new runtime.RequiredError(
'generateDmarcRecordOptions',
'Required parameter requestParameters.generateDmarcRecordOptions was null or undefined when calling generateDmarcRecord.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/tools/generate-dmarc-record`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: GenerateDmarcRecordOptionsToJSON(
requestParameters.generateDmarcRecordOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
GenerateDmarcRecordResultsFromJSON(jsonValue)
);
}
/**
* Create a DMARC record policy
*/
async generateDmarcRecord(
requestParameters: GenerateDmarcRecordRequest,
initOverrides?: RequestInit
): Promise<GenerateDmarcRecordResults> {
const response = await this.generateDmarcRecordRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Create a TLS reporting record policy
*/
async generateMtaStsRecordRaw(
requestParameters: GenerateMtaStsRecordRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<GenerateMtaStsRecordResults>> {
if (
requestParameters.generateMtaStsRecordOptions === null ||
requestParameters.generateMtaStsRecordOptions === undefined
) {
throw new runtime.RequiredError(
'generateMtaStsRecordOptions',
'Required parameter requestParameters.generateMtaStsRecordOptions was null or undefined when calling generateMtaStsRecord.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/tools/generate-mta-sts-record`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: GenerateMtaStsRecordOptionsToJSON(
requestParameters.generateMtaStsRecordOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
GenerateMtaStsRecordResultsFromJSON(jsonValue)
);
}
/**
* Create a TLS reporting record policy
*/
async generateMtaStsRecord(
requestParameters: GenerateMtaStsRecordRequest,
initOverrides?: RequestInit
): Promise<GenerateMtaStsRecordResults> {
const response = await this.generateMtaStsRecordRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Create a TLS reporting record policy
*/
async generateTlsReportingRecordRaw(
requestParameters: GenerateTlsReportingRecordRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<GenerateTlsReportingRecordResults>> {
if (
requestParameters.generateTlsReportingRecordOptions === null ||
requestParameters.generateTlsReportingRecordOptions === undefined
) {
throw new runtime.RequiredError(
'generateTlsReportingRecordOptions',
'Required parameter requestParameters.generateTlsReportingRecordOptions was null or undefined when calling generateTlsReportingRecord.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/tools/generate-tls-reporting-record`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: GenerateTlsReportingRecordOptionsToJSON(
requestParameters.generateTlsReportingRecordOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
GenerateTlsReportingRecordResultsFromJSON(jsonValue)
);
}
/**
* Create a TLS reporting record policy
*/
async generateTlsReportingRecord(
requestParameters: GenerateTlsReportingRecordRequest,
initOverrides?: RequestInit
): Promise<GenerateTlsReportingRecordResults> {
const response = await this.generateTlsReportingRecordRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
*/
async getFakeEmailByIdRaw(
requestParameters: GetFakeEmailByIdRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<FakeEmailResult>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError(
'id',
'Required parameter requestParameters.id was null or undefined when calling getFakeEmailById.'
);
}
const queryParameters: any = {};
if (requestParameters.id !== undefined) {
queryParameters['id'] = requestParameters.id;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/tools/fake-email`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
FakeEmailResultFromJSON(jsonValue)
);
}
/**
*/
async getFakeEmailById(
requestParameters: GetFakeEmailByIdRequest,
initOverrides?: RequestInit
): Promise<FakeEmailResult> {
const response = await this.getFakeEmailByIdRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
*/
async getFakeEmailsForAddressRaw(
requestParameters: GetFakeEmailsForAddressRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<Array<FakeEmailPreview>>> {
if (
requestParameters.emailAddress === null ||
requestParameters.emailAddress === undefined
) {
throw new runtime.RequiredError(
'emailAddress',
'Required parameter requestParameters.emailAddress was null or undefined when calling getFakeEmailsForAddress.'
);
}
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.emailAddress !== undefined) {
queryParameters['emailAddress'] = requestParameters.emailAddress;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/tools/fake-emails`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
jsonValue.map(FakeEmailPreviewFromJSON)
);
}
/**
*/
async getFakeEmailsForAddress(
requestParameters: GetFakeEmailsForAddressRequest,
initOverrides?: RequestInit
): Promise<Array<FakeEmailPreview>> {
const response = await this.getFakeEmailsForAddressRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Lookup a BIMI record policy
*/
async lookupBimiDomainRaw(
requestParameters: LookupBimiDomainRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<LookupBimiDomainResults>> {
if (
requestParameters.lookupBimiDomainOptions === null ||
requestParameters.lookupBimiDomainOptions === undefined
) {
throw new runtime.RequiredError(
'lookupBimiDomainOptions',
'Required parameter requestParameters.lookupBimiDomainOptions was null or undefined when calling lookupBimiDomain.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/tools/lookup-bimi-domain`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: LookupBimiDomainOptionsToJSON(
requestParameters.lookupBimiDomainOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
LookupBimiDomainResultsFromJSON(jsonValue)
);
}
/**
* Lookup a BIMI record policy
*/
async lookupBimiDomain(
requestParameters: LookupBimiDomainRequest,
initOverrides?: RequestInit
): Promise<LookupBimiDomainResults> {
const response = await this.lookupBimiDomainRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Lookup a DMARC record policy
*/
async lookupDmarcDomainRaw(
requestParameters: LookupDmarcDomainRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<LookupDmarcDomainResults>> {
if (
requestParameters.lookupDmarcDomainOptions === null ||
requestParameters.lookupDmarcDomainOptions === undefined
) {
throw new runtime.RequiredError(
'lookupDmarcDomainOptions',
'Required parameter requestParameters.lookupDmarcDomainOptions was null or undefined when calling lookupDmarcDomain.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/tools/lookup-dmarc-domain`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: LookupDmarcDomainOptionsToJSON(
requestParameters.lookupDmarcDomainOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
LookupDmarcDomainResultsFromJSON(jsonValue)
);
}
/**
* Lookup a DMARC record policy
*/
async lookupDmarcDomain(
requestParameters: LookupDmarcDomainRequest,
initOverrides?: RequestInit
): Promise<LookupDmarcDomainResults> {
const response = await this.lookupDmarcDomainRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Lookup a MTA-STS domain policy
*/
async lookupMtaStsDomainRaw(
requestParameters: LookupMtaStsDomainRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<LookupMtaStsDomainResults>> {
if (
requestParameters.lookupMtaStsDomainOptions === null ||
requestParameters.lookupMtaStsDomainOptions === undefined
) {
throw new runtime.RequiredError(
'lookupMtaStsDomainOptions',
'Required parameter requestParameters.lookupMtaStsDomainOptions was null or undefined when calling lookupMtaStsDomain.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/tools/lookup-mta-sts-domain`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: LookupMtaStsDomainOptionsToJSON(
requestParameters.lookupMtaStsDomainOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
LookupMtaStsDomainResultsFromJSON(jsonValue)
);
}
/**
* Lookup a MTA-STS domain policy
*/
async lookupMtaStsDomain(
requestParameters: LookupMtaStsDomainRequest,
initOverrides?: RequestInit
): Promise<LookupMtaStsDomainResults> {
const response = await this.lookupMtaStsDomainRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Lookup a TLS reporting domain policy
*/
async lookupTlsReportingDomainRaw(
requestParameters: LookupTlsReportingDomainRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<LookupTlsReportingDomainResults>> {
if (
requestParameters.lookupTlsReportingDomainOptions === null ||
requestParameters.lookupTlsReportingDomainOptions === undefined
) {
throw new runtime.RequiredError(
'lookupTlsReportingDomainOptions',
'Required parameter requestParameters.lookupTlsReportingDomainOptions was null or undefined when calling lookupTlsReportingDomain.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/tools/lookup-tls-reporting-domain`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: LookupTlsReportingDomainOptionsToJSON(
requestParameters.lookupTlsReportingDomainOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
LookupTlsReportingDomainResultsFromJSON(jsonValue)
);
}
/**
* Lookup a TLS reporting domain policy
*/
async lookupTlsReportingDomain(
requestParameters: LookupTlsReportingDomainRequest,
initOverrides?: RequestInit
): Promise<LookupTlsReportingDomainResults> {
const response = await this.lookupTlsReportingDomainRaw(
requestParameters,
initOverrides
);
return await response.value();
}
}
/* 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 * as runtime from '../runtime';
import {
CreateTemplateOptions,
CreateTemplateOptionsFromJSON,
CreateTemplateOptionsToJSON,
PageTemplateProjection,
PageTemplateProjectionFromJSON,
PageTemplateProjectionToJSON,
TemplateDto,
TemplateDtoFromJSON,
TemplateDtoToJSON,
TemplatePreview,
TemplatePreviewFromJSON,
TemplatePreviewToJSON,
TemplateProjection,
TemplateProjectionFromJSON,
TemplateProjectionToJSON,
} from '../models';
export interface CreateTemplateRequest {
createTemplateOptions: CreateTemplateOptions;
}
export interface DeleteTemplateRequest {
templateId: string;
}
export interface GetAllTemplatesRequest {
page?: number;
size?: number;
sort?: GetAllTemplatesSortEnum;
since?: Date;
before?: Date;
}
export interface GetTemplateRequest {
templateId: string;
}
export interface GetTemplatePreviewHtmlRequest {
templateId: string;
}
export interface GetTemplatePreviewJsonRequest {
templateId: string;
}
export interface UpdateTemplateRequest {
templateId: string;
createTemplateOptions: CreateTemplateOptions;
}
/**
*
*/
export class TemplateControllerApi extends runtime.BaseAPI {
/**
* Create an email template with variables for use with templated transactional emails.
* Create a Template
*/
async createTemplateRaw(
requestParameters: CreateTemplateRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<TemplateDto>> {
if (
requestParameters.createTemplateOptions === null ||
requestParameters.createTemplateOptions === undefined
) {
throw new runtime.RequiredError(
'createTemplateOptions',
'Required parameter requestParameters.createTemplateOptions was null or undefined when calling createTemplate.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/templates`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: CreateTemplateOptionsToJSON(
requestParameters.createTemplateOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
TemplateDtoFromJSON(jsonValue)
);
}
/**
* Create an email template with variables for use with templated transactional emails.
* Create a Template
*/
async createTemplate(
requestParameters: CreateTemplateRequest,
initOverrides?: RequestInit
): Promise<TemplateDto> {
const response = await this.createTemplateRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Delete template
* Delete email template
*/
async deleteTemplateRaw(
requestParameters: DeleteTemplateRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
if (
requestParameters.templateId === null ||
requestParameters.templateId === undefined
) {
throw new runtime.RequiredError(
'templateId',
'Required parameter requestParameters.templateId was null or undefined when calling deleteTemplate.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/templates/{templateId}`.replace(
`{${'templateId'}}`,
encodeURIComponent(String(requestParameters.templateId))
),
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Delete template
* Delete email template
*/
async deleteTemplate(
requestParameters: DeleteTemplateRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.deleteTemplateRaw(requestParameters, initOverrides);
}
/**
* Get all templates in paginated format
* List templates
*/
async getAllTemplatesRaw(
requestParameters: GetAllTemplatesRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageTemplateProjection>> {
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/templates/paginated`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageTemplateProjectionFromJSON(jsonValue)
);
}
/**
* Get all templates in paginated format
* List templates
*/
async getAllTemplates(
requestParameters: GetAllTemplatesRequest,
initOverrides?: RequestInit
): Promise<PageTemplateProjection> {
const response = await this.getAllTemplatesRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get email template
* Get template
*/
async getTemplateRaw(
requestParameters: GetTemplateRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<TemplateDto>> {
if (
requestParameters.templateId === null ||
requestParameters.templateId === undefined
) {
throw new runtime.RequiredError(
'templateId',
'Required parameter requestParameters.templateId was null or undefined when calling getTemplate.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/templates/{templateId}`.replace(
`{${'templateId'}}`,
encodeURIComponent(String(requestParameters.templateId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
TemplateDtoFromJSON(jsonValue)
);
}
/**
* Get email template
* Get template
*/
async getTemplate(
requestParameters: GetTemplateRequest,
initOverrides?: RequestInit
): Promise<TemplateDto> {
const response = await this.getTemplateRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get email template preview with passed template variables in HTML format for browsers. Pass template variables as query params.
* Get template preview HTML
*/
async getTemplatePreviewHtmlRaw(
requestParameters: GetTemplatePreviewHtmlRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<string>> {
if (
requestParameters.templateId === null ||
requestParameters.templateId === undefined
) {
throw new runtime.RequiredError(
'templateId',
'Required parameter requestParameters.templateId was null or undefined when calling getTemplatePreviewHtml.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/templates/{templateId}/preview/html`.replace(
`{${'templateId'}}`,
encodeURIComponent(String(requestParameters.templateId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.TextApiResponse(response) as any;
}
/**
* Get email template preview with passed template variables in HTML format for browsers. Pass template variables as query params.
* Get template preview HTML
*/
async getTemplatePreviewHtml(
requestParameters: GetTemplatePreviewHtmlRequest,
initOverrides?: RequestInit
): Promise<string> {
const response = await this.getTemplatePreviewHtmlRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get email template preview with passed template variables in JSON format. Pass template variables as query params.
* Get template preview Json
*/
async getTemplatePreviewJsonRaw(
requestParameters: GetTemplatePreviewJsonRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<TemplatePreview>> {
if (
requestParameters.templateId === null ||
requestParameters.templateId === undefined
) {
throw new runtime.RequiredError(
'templateId',
'Required parameter requestParameters.templateId was null or undefined when calling getTemplatePreviewJson.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/templates/{templateId}/preview/json`.replace(
`{${'templateId'}}`,
encodeURIComponent(String(requestParameters.templateId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
TemplatePreviewFromJSON(jsonValue)
);
}
/**
* Get email template preview with passed template variables in JSON format. Pass template variables as query params.
* Get template preview Json
*/
async getTemplatePreviewJson(
requestParameters: GetTemplatePreviewJsonRequest,
initOverrides?: RequestInit
): Promise<TemplatePreview> {
const response = await this.getTemplatePreviewJsonRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get all templates
* List templates
*/
async getTemplatesRaw(
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<Array<TemplateProjection>>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/templates`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
jsonValue.map(TemplateProjectionFromJSON)
);
}
/**
* Get all templates
* List templates
*/
async getTemplates(
initOverrides?: RequestInit
): Promise<Array<TemplateProjection>> {
const response = await this.getTemplatesRaw(initOverrides);
return await response.value();
}
/**
* Update email template
* Update template
*/
async updateTemplateRaw(
requestParameters: UpdateTemplateRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<TemplateDto>> {
if (
requestParameters.templateId === null ||
requestParameters.templateId === undefined
) {
throw new runtime.RequiredError(
'templateId',
'Required parameter requestParameters.templateId was null or undefined when calling updateTemplate.'
);
}
if (
requestParameters.createTemplateOptions === null ||
requestParameters.createTemplateOptions === undefined
) {
throw new runtime.RequiredError(
'createTemplateOptions',
'Required parameter requestParameters.createTemplateOptions was null or undefined when calling updateTemplate.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/templates/{templateId}`.replace(
`{${'templateId'}}`,
encodeURIComponent(String(requestParameters.templateId))
),
method: 'PUT',
headers: headerParameters,
query: queryParameters,
body: CreateTemplateOptionsToJSON(
requestParameters.createTemplateOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
TemplateDtoFromJSON(jsonValue)
);
}
/**
* Update email template
* Update template
*/
async updateTemplate(
requestParameters: UpdateTemplateRequest,
initOverrides?: RequestInit
): Promise<TemplateDto> {
const response = await this.updateTemplateRaw(
requestParameters,
initOverrides
);
return await response.value();
}
}
/**
* @export
* @enum {string}
*/
export enum GetAllTemplatesSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/* 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 * as runtime from '../runtime';
import {
CountDto,
CountDtoFromJSON,
CountDtoToJSON,
PageSmsProjection,
PageSmsProjectionFromJSON,
PageSmsProjectionToJSON,
ReplyForSms,
ReplyForSmsFromJSON,
ReplyForSmsToJSON,
SentSmsDto,
SentSmsDtoFromJSON,
SentSmsDtoToJSON,
SmsDto,
SmsDtoFromJSON,
SmsDtoToJSON,
SmsReplyOptions,
SmsReplyOptionsFromJSON,
SmsReplyOptionsToJSON,
UnreadCount,
UnreadCountFromJSON,
UnreadCountToJSON,
} from '../models';
export interface DeleteSmsMessageRequest {
smsId: string;
}
export interface DeleteSmsMessagesRequest {
phoneNumberId?: string;
}
export interface GetReplyForSmsMessageRequest {
smsId: string;
}
export interface GetSmsMessageRequest {
smsId: string;
}
export interface GetSmsMessagesPaginatedRequest {
phoneNumber?: string;
page?: number;
size?: number;
sort?: GetSmsMessagesPaginatedSortEnum;
unreadOnly?: boolean;
since?: Date;
before?: Date;
}
export interface ReplyToSmsMessageRequest {
smsId: string;
smsReplyOptions: SmsReplyOptions;
}
/**
*
*/
export class SmsControllerApi extends runtime.BaseAPI {
/**
* Delete an SMS message
* Delete SMS message.
*/
async deleteSmsMessageRaw(
requestParameters: DeleteSmsMessageRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
if (
requestParameters.smsId === null ||
requestParameters.smsId === undefined
) {
throw new runtime.RequiredError(
'smsId',
'Required parameter requestParameters.smsId was null or undefined when calling deleteSmsMessage.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/sms/{smsId}`.replace(
`{${'smsId'}}`,
encodeURIComponent(String(requestParameters.smsId))
),
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Delete an SMS message
* Delete SMS message.
*/
async deleteSmsMessage(
requestParameters: DeleteSmsMessageRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.deleteSmsMessageRaw(requestParameters, initOverrides);
}
/**
* Delete all SMS messages or all messages for a given phone number
* Delete all SMS messages
*/
async deleteSmsMessagesRaw(
requestParameters: DeleteSmsMessagesRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
const queryParameters: any = {};
if (requestParameters.phoneNumberId !== undefined) {
queryParameters['phoneNumberId'] = requestParameters.phoneNumberId;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/sms`,
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Delete all SMS messages or all messages for a given phone number
* Delete all SMS messages
*/
async deleteSmsMessages(
requestParameters: DeleteSmsMessagesRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.deleteSmsMessagesRaw(requestParameters, initOverrides);
}
/**
* Get reply for an SMS message.
* Get reply for an SMS message
*/
async getReplyForSmsMessageRaw(
requestParameters: GetReplyForSmsMessageRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<ReplyForSms>> {
if (
requestParameters.smsId === null ||
requestParameters.smsId === undefined
) {
throw new runtime.RequiredError(
'smsId',
'Required parameter requestParameters.smsId was null or undefined when calling getReplyForSmsMessage.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/sms/{smsId}/reply`.replace(
`{${'smsId'}}`,
encodeURIComponent(String(requestParameters.smsId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
ReplyForSmsFromJSON(jsonValue)
);
}
/**
* Get reply for an SMS message.
* Get reply for an SMS message
*/
async getReplyForSmsMessage(
requestParameters: GetReplyForSmsMessageRequest,
initOverrides?: RequestInit
): Promise<ReplyForSms> {
const response = await this.getReplyForSmsMessageRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get number of SMS
* Get SMS count
*/
async getSmsCountRaw(
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<CountDto>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/sms/count`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
CountDtoFromJSON(jsonValue)
);
}
/**
* Get number of SMS
* Get SMS count
*/
async getSmsCount(initOverrides?: RequestInit): Promise<CountDto> {
const response = await this.getSmsCountRaw(initOverrides);
return await response.value();
}
/**
* Returns a SMS summary object with content.
* Get SMS content including body. Expects SMS to exist by ID. For SMS that may not have arrived yet use the WaitForController.
*/
async getSmsMessageRaw(
requestParameters: GetSmsMessageRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<SmsDto>> {
if (
requestParameters.smsId === null ||
requestParameters.smsId === undefined
) {
throw new runtime.RequiredError(
'smsId',
'Required parameter requestParameters.smsId was null or undefined when calling getSmsMessage.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/sms/{smsId}`.replace(
`{${'smsId'}}`,
encodeURIComponent(String(requestParameters.smsId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
SmsDtoFromJSON(jsonValue)
);
}
/**
* Returns a SMS summary object with content.
* Get SMS content including body. Expects SMS to exist by ID. For SMS that may not have arrived yet use the WaitForController.
*/
async getSmsMessage(
requestParameters: GetSmsMessageRequest,
initOverrides?: RequestInit
): Promise<SmsDto> {
const response = await this.getSmsMessageRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* By default returns all SMS messages across all phone numbers sorted by ascending created at date. Responses are paginated. You can restrict results to a list of phone number IDs. You can also filter out read messages
* Get all SMS messages in all phone numbers in paginated form. .
*/
async getSmsMessagesPaginatedRaw(
requestParameters: GetSmsMessagesPaginatedRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageSmsProjection>> {
const queryParameters: any = {};
if (requestParameters.phoneNumber !== undefined) {
queryParameters['phoneNumber'] = requestParameters.phoneNumber;
}
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.unreadOnly !== undefined) {
queryParameters['unreadOnly'] = requestParameters.unreadOnly;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/sms`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageSmsProjectionFromJSON(jsonValue)
);
}
/**
* By default returns all SMS messages across all phone numbers sorted by ascending created at date. Responses are paginated. You can restrict results to a list of phone number IDs. You can also filter out read messages
* Get all SMS messages in all phone numbers in paginated form. .
*/
async getSmsMessagesPaginated(
requestParameters: GetSmsMessagesPaginatedRequest,
initOverrides?: RequestInit
): Promise<PageSmsProjection> {
const response = await this.getSmsMessagesPaginatedRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get number of SMS unread. Unread means has not been viewed in dashboard or returned in an email API response
* Get unread SMS count
*/
async getUnreadSmsCountRaw(
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<UnreadCount>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/sms/unreadCount`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
UnreadCountFromJSON(jsonValue)
);
}
/**
* Get number of SMS unread. Unread means has not been viewed in dashboard or returned in an email API response
* Get unread SMS count
*/
async getUnreadSmsCount(initOverrides?: RequestInit): Promise<UnreadCount> {
const response = await this.getUnreadSmsCountRaw(initOverrides);
return await response.value();
}
/**
* Reply to an SMS message.
* Send a reply to a received SMS message. Replies are sent from the receiving number.
*/
async replyToSmsMessageRaw(
requestParameters: ReplyToSmsMessageRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<SentSmsDto>> {
if (
requestParameters.smsId === null ||
requestParameters.smsId === undefined
) {
throw new runtime.RequiredError(
'smsId',
'Required parameter requestParameters.smsId was null or undefined when calling replyToSmsMessage.'
);
}
if (
requestParameters.smsReplyOptions === null ||
requestParameters.smsReplyOptions === undefined
) {
throw new runtime.RequiredError(
'smsReplyOptions',
'Required parameter requestParameters.smsReplyOptions was null or undefined when calling replyToSmsMessage.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/sms/{smsId}/reply`.replace(
`{${'smsId'}}`,
encodeURIComponent(String(requestParameters.smsId))
),
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: SmsReplyOptionsToJSON(requestParameters.smsReplyOptions),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
SentSmsDtoFromJSON(jsonValue)
);
}
/**
* Reply to an SMS message.
* Send a reply to a received SMS message. Replies are sent from the receiving number.
*/
async replyToSmsMessage(
requestParameters: ReplyToSmsMessageRequest,
initOverrides?: RequestInit
): Promise<SentSmsDto> {
const response = await this.replyToSmsMessageRaw(
requestParameters,
initOverrides
);
return await response.value();
}
}
/**
* @export
* @enum {string}
*/
export enum GetSmsMessagesPaginatedSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/* 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 * as runtime from '../runtime';
import {
DeliveryStatusDto,
DeliveryStatusDtoFromJSON,
DeliveryStatusDtoToJSON,
EmailPreviewUrls,
EmailPreviewUrlsFromJSON,
EmailPreviewUrlsToJSON,
PageDeliveryStatus,
PageDeliveryStatusFromJSON,
PageDeliveryStatusToJSON,
PageSentEmailProjection,
PageSentEmailProjectionFromJSON,
PageSentEmailProjectionToJSON,
PageSentEmailWithQueueProjection,
PageSentEmailWithQueueProjectionFromJSON,
PageSentEmailWithQueueProjectionToJSON,
PageTrackingPixelProjection,
PageTrackingPixelProjectionFromJSON,
PageTrackingPixelProjectionToJSON,
RawEmailJson,
RawEmailJsonFromJSON,
RawEmailJsonToJSON,
SentEmailDto,
SentEmailDtoFromJSON,
SentEmailDtoToJSON,
} from '../models';
export interface DeleteSentEmailRequest {
id: string;
}
export interface GetAllSentTrackingPixelsRequest {
page?: number;
size?: number;
sort?: GetAllSentTrackingPixelsSortEnum;
searchFilter?: string;
since?: Date;
before?: Date;
}
export interface GetRawSentEmailContentsRequest {
emailId: string;
}
export interface GetRawSentEmailJsonRequest {
emailId: string;
}
export interface GetSentDeliveryStatusRequest {
deliveryId: string;
}
export interface GetSentDeliveryStatusesRequest {
page?: number;
size?: number;
sort?: GetSentDeliveryStatusesSortEnum;
since?: Date;
before?: Date;
}
export interface GetSentDeliveryStatusesBySentIdRequest {
sentId: string;
page?: number;
size?: number;
sort?: GetSentDeliveryStatusesBySentIdSortEnum;
since?: Date;
before?: Date;
}
export interface GetSentEmailRequest {
id: string;
}
export interface GetSentEmailHTMLContentRequest {
id: string;
}
export interface GetSentEmailPreviewURLsRequest {
id: string;
}
export interface GetSentEmailTrackingPixelsRequest {
id: string;
page?: number;
size?: number;
sort?: GetSentEmailTrackingPixelsSortEnum;
searchFilter?: string;
since?: Date;
before?: Date;
}
export interface GetSentEmailsRequest {
inboxId?: string;
page?: number;
size?: number;
sort?: GetSentEmailsSortEnum;
searchFilter?: string;
since?: Date;
before?: Date;
}
export interface GetSentEmailsWithQueueResultsRequest {
page?: number;
size?: number;
sort?: GetSentEmailsWithQueueResultsSortEnum;
since?: Date;
before?: Date;
}
export interface GetSentOrganizationEmailsRequest {
inboxId?: string;
page?: number;
size?: number;
sort?: GetSentOrganizationEmailsSortEnum;
searchFilter?: string;
since?: Date;
before?: Date;
}
export interface WaitForDeliveryStatusesRequest {
sentId?: string;
inboxId?: string;
timeout?: number;
index?: number;
since?: Date;
before?: Date;
}
/**
*
*/
export class SentEmailsControllerApi extends runtime.BaseAPI {
/**
* Delete all sent email receipts
*/
async deleteAllSentEmailsRaw(
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/sent`,
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Delete all sent email receipts
*/
async deleteAllSentEmails(initOverrides?: RequestInit): Promise<void> {
await this.deleteAllSentEmailsRaw(initOverrides);
}
/**
* Delete sent email receipt
*/
async deleteSentEmailRaw(
requestParameters: DeleteSentEmailRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError(
'id',
'Required parameter requestParameters.id was null or undefined when calling deleteSentEmail.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/sent/{id}`.replace(
`{${'id'}}`,
encodeURIComponent(String(requestParameters.id))
),
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Delete sent email receipt
*/
async deleteSentEmail(
requestParameters: DeleteSentEmailRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.deleteSentEmailRaw(requestParameters, initOverrides);
}
/**
* Get all sent email tracking pixels in paginated form
*/
async getAllSentTrackingPixelsRaw(
requestParameters: GetAllSentTrackingPixelsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageTrackingPixelProjection>> {
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.searchFilter !== undefined) {
queryParameters['searchFilter'] = requestParameters.searchFilter;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/sent/tracking-pixels`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageTrackingPixelProjectionFromJSON(jsonValue)
);
}
/**
* Get all sent email tracking pixels in paginated form
*/
async getAllSentTrackingPixels(
requestParameters: GetAllSentTrackingPixelsRequest,
initOverrides?: RequestInit
): Promise<PageTrackingPixelProjection> {
const response = await this.getAllSentTrackingPixelsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Returns a raw, unparsed, and unprocessed sent email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawSentEmailJson endpoint
* Get raw sent email string. Returns unparsed raw SMTP message with headers and body.
*/
async getRawSentEmailContentsRaw(
requestParameters: GetRawSentEmailContentsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
if (
requestParameters.emailId === null ||
requestParameters.emailId === undefined
) {
throw new runtime.RequiredError(
'emailId',
'Required parameter requestParameters.emailId was null or undefined when calling getRawSentEmailContents.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/sent/{emailId}/raw`.replace(
`{${'emailId'}}`,
encodeURIComponent(String(requestParameters.emailId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Returns a raw, unparsed, and unprocessed sent email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawSentEmailJson endpoint
* Get raw sent email string. Returns unparsed raw SMTP message with headers and body.
*/
async getRawSentEmailContents(
requestParameters: GetRawSentEmailContentsRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.getRawSentEmailContentsRaw(requestParameters, initOverrides);
}
/**
* Returns a raw, unparsed, and unprocessed sent email wrapped in a JSON response object for easier handling when compared with the getRawSentEmail text/plain response
* Get raw sent email in JSON. Unparsed SMTP message in JSON wrapper format.
*/
async getRawSentEmailJsonRaw(
requestParameters: GetRawSentEmailJsonRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<RawEmailJson>> {
if (
requestParameters.emailId === null ||
requestParameters.emailId === undefined
) {
throw new runtime.RequiredError(
'emailId',
'Required parameter requestParameters.emailId was null or undefined when calling getRawSentEmailJson.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/sent/{emailId}/raw/json`.replace(
`{${'emailId'}}`,
encodeURIComponent(String(requestParameters.emailId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
RawEmailJsonFromJSON(jsonValue)
);
}
/**
* Returns a raw, unparsed, and unprocessed sent email wrapped in a JSON response object for easier handling when compared with the getRawSentEmail text/plain response
* Get raw sent email in JSON. Unparsed SMTP message in JSON wrapper format.
*/
async getRawSentEmailJson(
requestParameters: GetRawSentEmailJsonRequest,
initOverrides?: RequestInit
): Promise<RawEmailJson> {
const response = await this.getRawSentEmailJsonRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get a sent email delivery status
*/
async getSentDeliveryStatusRaw(
requestParameters: GetSentDeliveryStatusRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<DeliveryStatusDto>> {
if (
requestParameters.deliveryId === null ||
requestParameters.deliveryId === undefined
) {
throw new runtime.RequiredError(
'deliveryId',
'Required parameter requestParameters.deliveryId was null or undefined when calling getSentDeliveryStatus.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/sent/delivery-status/{deliveryId}`.replace(
`{${'deliveryId'}}`,
encodeURIComponent(String(requestParameters.deliveryId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
DeliveryStatusDtoFromJSON(jsonValue)
);
}
/**
* Get a sent email delivery status
*/
async getSentDeliveryStatus(
requestParameters: GetSentDeliveryStatusRequest,
initOverrides?: RequestInit
): Promise<DeliveryStatusDto> {
const response = await this.getSentDeliveryStatusRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get all sent email delivery statuses
*/
async getSentDeliveryStatusesRaw(
requestParameters: GetSentDeliveryStatusesRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageDeliveryStatus>> {
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/sent/delivery-status`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageDeliveryStatusFromJSON(jsonValue)
);
}
/**
* Get all sent email delivery statuses
*/
async getSentDeliveryStatuses(
requestParameters: GetSentDeliveryStatusesRequest,
initOverrides?: RequestInit
): Promise<PageDeliveryStatus> {
const response = await this.getSentDeliveryStatusesRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get all sent email delivery statuses
*/
async getSentDeliveryStatusesBySentIdRaw(
requestParameters: GetSentDeliveryStatusesBySentIdRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageDeliveryStatus>> {
if (
requestParameters.sentId === null ||
requestParameters.sentId === undefined
) {
throw new runtime.RequiredError(
'sentId',
'Required parameter requestParameters.sentId was null or undefined when calling getSentDeliveryStatusesBySentId.'
);
}
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/sent/{sentId}/delivery-status`.replace(
`{${'sentId'}}`,
encodeURIComponent(String(requestParameters.sentId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageDeliveryStatusFromJSON(jsonValue)
);
}
/**
* Get all sent email delivery statuses
*/
async getSentDeliveryStatusesBySentId(
requestParameters: GetSentDeliveryStatusesBySentIdRequest,
initOverrides?: RequestInit
): Promise<PageDeliveryStatus> {
const response = await this.getSentDeliveryStatusesBySentIdRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get sent email receipt
*/
async getSentEmailRaw(
requestParameters: GetSentEmailRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<SentEmailDto>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError(
'id',
'Required parameter requestParameters.id was null or undefined when calling getSentEmail.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/sent/{id}`.replace(
`{${'id'}}`,
encodeURIComponent(String(requestParameters.id))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
SentEmailDtoFromJSON(jsonValue)
);
}
/**
* Get sent email receipt
*/
async getSentEmail(
requestParameters: GetSentEmailRequest,
initOverrides?: RequestInit
): Promise<SentEmailDto> {
const response = await this.getSentEmailRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get sent email HTML content
*/
async getSentEmailHTMLContentRaw(
requestParameters: GetSentEmailHTMLContentRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<string>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError(
'id',
'Required parameter requestParameters.id was null or undefined when calling getSentEmailHTMLContent.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/sent/{id}/html`.replace(
`{${'id'}}`,
encodeURIComponent(String(requestParameters.id))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.TextApiResponse(response) as any;
}
/**
* Get sent email HTML content
*/
async getSentEmailHTMLContent(
requestParameters: GetSentEmailHTMLContentRequest,
initOverrides?: RequestInit
): Promise<string> {
const response = await this.getSentEmailHTMLContentRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get a list of URLs for sent email content as text/html or raw SMTP message for viewing the message in a browser.
* Get sent email URL for viewing in browser or downloading
*/
async getSentEmailPreviewURLsRaw(
requestParameters: GetSentEmailPreviewURLsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<EmailPreviewUrls>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError(
'id',
'Required parameter requestParameters.id was null or undefined when calling getSentEmailPreviewURLs.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/sent/{id}/urls`.replace(
`{${'id'}}`,
encodeURIComponent(String(requestParameters.id))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
EmailPreviewUrlsFromJSON(jsonValue)
);
}
/**
* Get a list of URLs for sent email content as text/html or raw SMTP message for viewing the message in a browser.
* Get sent email URL for viewing in browser or downloading
*/
async getSentEmailPreviewURLs(
requestParameters: GetSentEmailPreviewURLsRequest,
initOverrides?: RequestInit
): Promise<EmailPreviewUrls> {
const response = await this.getSentEmailPreviewURLsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get all tracking pixels for a sent email in paginated form
*/
async getSentEmailTrackingPixelsRaw(
requestParameters: GetSentEmailTrackingPixelsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageTrackingPixelProjection>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError(
'id',
'Required parameter requestParameters.id was null or undefined when calling getSentEmailTrackingPixels.'
);
}
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.searchFilter !== undefined) {
queryParameters['searchFilter'] = requestParameters.searchFilter;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/sent/{id}/tracking-pixels`.replace(
`{${'id'}}`,
encodeURIComponent(String(requestParameters.id))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageTrackingPixelProjectionFromJSON(jsonValue)
);
}
/**
* Get all tracking pixels for a sent email in paginated form
*/
async getSentEmailTrackingPixels(
requestParameters: GetSentEmailTrackingPixelsRequest,
initOverrides?: RequestInit
): Promise<PageTrackingPixelProjection> {
const response = await this.getSentEmailTrackingPixelsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get all sent emails in paginated form
*/
async getSentEmailsRaw(
requestParameters: GetSentEmailsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageSentEmailProjection>> {
const queryParameters: any = {};
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.searchFilter !== undefined) {
queryParameters['searchFilter'] = requestParameters.searchFilter;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/sent`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageSentEmailProjectionFromJSON(jsonValue)
);
}
/**
* Get all sent emails in paginated form
*/
async getSentEmails(
requestParameters: GetSentEmailsRequest,
initOverrides?: RequestInit
): Promise<PageSentEmailProjection> {
const response = await this.getSentEmailsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get results of email sent with queues in paginated form
*/
async getSentEmailsWithQueueResultsRaw(
requestParameters: GetSentEmailsWithQueueResultsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageSentEmailWithQueueProjection>> {
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/sent/queue-results`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageSentEmailWithQueueProjectionFromJSON(jsonValue)
);
}
/**
* Get results of email sent with queues in paginated form
*/
async getSentEmailsWithQueueResults(
requestParameters: GetSentEmailsWithQueueResultsRequest,
initOverrides?: RequestInit
): Promise<PageSentEmailWithQueueProjection> {
const response = await this.getSentEmailsWithQueueResultsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get all sent organization emails in paginated form
*/
async getSentOrganizationEmailsRaw(
requestParameters: GetSentOrganizationEmailsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageSentEmailProjection>> {
const queryParameters: any = {};
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.searchFilter !== undefined) {
queryParameters['searchFilter'] = requestParameters.searchFilter;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/sent/organization`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageSentEmailProjectionFromJSON(jsonValue)
);
}
/**
* Get all sent organization emails in paginated form
*/
async getSentOrganizationEmails(
requestParameters: GetSentOrganizationEmailsRequest,
initOverrides?: RequestInit
): Promise<PageSentEmailProjection> {
const response = await this.getSentOrganizationEmailsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Wait for delivery statuses
*/
async waitForDeliveryStatusesRaw(
requestParameters: WaitForDeliveryStatusesRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<DeliveryStatusDto>> {
const queryParameters: any = {};
if (requestParameters.sentId !== undefined) {
queryParameters['sentId'] = requestParameters.sentId;
}
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
if (requestParameters.timeout !== undefined) {
queryParameters['timeout'] = requestParameters.timeout;
}
if (requestParameters.index !== undefined) {
queryParameters['index'] = requestParameters.index;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/sent/delivery-status/wait-for`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
DeliveryStatusDtoFromJSON(jsonValue)
);
}
/**
* Wait for delivery statuses
*/
async waitForDeliveryStatuses(
requestParameters: WaitForDeliveryStatusesRequest,
initOverrides?: RequestInit
): Promise<DeliveryStatusDto> {
const response = await this.waitForDeliveryStatusesRaw(
requestParameters,
initOverrides
);
return await response.value();
}
}
/**
* @export
* @enum {string}
*/
export enum GetAllSentTrackingPixelsSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum GetSentDeliveryStatusesSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum GetSentDeliveryStatusesBySentIdSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum GetSentEmailTrackingPixelsSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum GetSentEmailsSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum GetSentEmailsWithQueueResultsSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum GetSentOrganizationEmailsSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/* 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 * as runtime from '../runtime';
import {
CreateEmergencyAddressOptions,
CreateEmergencyAddressOptionsFromJSON,
CreateEmergencyAddressOptionsToJSON,
EmergencyAddress,
EmergencyAddressFromJSON,
EmergencyAddressToJSON,
EmergencyAddressDto,
EmergencyAddressDtoFromJSON,
EmergencyAddressDtoToJSON,
EmptyResponseDto,
EmptyResponseDtoFromJSON,
EmptyResponseDtoToJSON,
PagePhoneNumberProjection,
PagePhoneNumberProjectionFromJSON,
PagePhoneNumberProjectionToJSON,
PhoneNumberDto,
PhoneNumberDtoFromJSON,
PhoneNumberDtoToJSON,
PhonePlanDto,
PhonePlanDtoFromJSON,
PhonePlanDtoToJSON,
TestPhoneNumberOptions,
TestPhoneNumberOptionsFromJSON,
TestPhoneNumberOptionsToJSON,
} from '../models';
export interface CreateEmergencyAddressRequest {
createEmergencyAddressOptions: CreateEmergencyAddressOptions;
}
export interface DeleteEmergencyAddressRequest {
addressId: string;
}
export interface DeletePhoneNumberRequest {
phoneNumberId: string;
}
export interface GetEmergencyAddressRequest {
addressId: string;
}
export interface GetPhoneNumberRequest {
phoneNumberId: string;
}
export interface GetPhoneNumbersRequest {
phoneCountry?: GetPhoneNumbersPhoneCountryEnum;
page?: number;
size?: number;
sort?: GetPhoneNumbersSortEnum;
since?: Date;
before?: Date;
}
export interface TestPhoneNumberSendSmsRequest {
phoneNumberId: string;
testPhoneNumberOptions: TestPhoneNumberOptions;
xTestId?: string;
}
/**
*
*/
export class PhoneControllerApi extends runtime.BaseAPI {
/**
*/
async createEmergencyAddressRaw(
requestParameters: CreateEmergencyAddressRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<EmergencyAddress>> {
if (
requestParameters.createEmergencyAddressOptions === null ||
requestParameters.createEmergencyAddressOptions === undefined
) {
throw new runtime.RequiredError(
'createEmergencyAddressOptions',
'Required parameter requestParameters.createEmergencyAddressOptions was null or undefined when calling createEmergencyAddress.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/phone/emergency-addresses`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: CreateEmergencyAddressOptionsToJSON(
requestParameters.createEmergencyAddressOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
EmergencyAddressFromJSON(jsonValue)
);
}
/**
*/
async createEmergencyAddress(
requestParameters: CreateEmergencyAddressRequest,
initOverrides?: RequestInit
): Promise<EmergencyAddress> {
const response = await this.createEmergencyAddressRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
*/
async deleteEmergencyAddressRaw(
requestParameters: DeleteEmergencyAddressRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<EmptyResponseDto>> {
if (
requestParameters.addressId === null ||
requestParameters.addressId === undefined
) {
throw new runtime.RequiredError(
'addressId',
'Required parameter requestParameters.addressId was null or undefined when calling deleteEmergencyAddress.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/phone/emergency-addresses/{addressId}`.replace(
`{${'addressId'}}`,
encodeURIComponent(String(requestParameters.addressId))
),
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
EmptyResponseDtoFromJSON(jsonValue)
);
}
/**
*/
async deleteEmergencyAddress(
requestParameters: DeleteEmergencyAddressRequest,
initOverrides?: RequestInit
): Promise<EmptyResponseDto> {
const response = await this.deleteEmergencyAddressRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
*/
async deletePhoneNumberRaw(
requestParameters: DeletePhoneNumberRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
if (
requestParameters.phoneNumberId === null ||
requestParameters.phoneNumberId === undefined
) {
throw new runtime.RequiredError(
'phoneNumberId',
'Required parameter requestParameters.phoneNumberId was null or undefined when calling deletePhoneNumber.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/phone/numbers/{phoneNumberId}`.replace(
`{${'phoneNumberId'}}`,
encodeURIComponent(String(requestParameters.phoneNumberId))
),
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
*/
async deletePhoneNumber(
requestParameters: DeletePhoneNumberRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.deletePhoneNumberRaw(requestParameters, initOverrides);
}
/**
*/
async getEmergencyAddressRaw(
requestParameters: GetEmergencyAddressRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<EmergencyAddress>> {
if (
requestParameters.addressId === null ||
requestParameters.addressId === undefined
) {
throw new runtime.RequiredError(
'addressId',
'Required parameter requestParameters.addressId was null or undefined when calling getEmergencyAddress.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/phone/emergency-addresses/{addressId}`.replace(
`{${'addressId'}}`,
encodeURIComponent(String(requestParameters.addressId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
EmergencyAddressFromJSON(jsonValue)
);
}
/**
*/
async getEmergencyAddress(
requestParameters: GetEmergencyAddressRequest,
initOverrides?: RequestInit
): Promise<EmergencyAddress> {
const response = await this.getEmergencyAddressRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
*/
async getEmergencyAddressesRaw(
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<Array<EmergencyAddressDto>>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/phone/emergency-addresses`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
jsonValue.map(EmergencyAddressDtoFromJSON)
);
}
/**
*/
async getEmergencyAddresses(
initOverrides?: RequestInit
): Promise<Array<EmergencyAddressDto>> {
const response = await this.getEmergencyAddressesRaw(initOverrides);
return await response.value();
}
/**
*/
async getPhoneNumberRaw(
requestParameters: GetPhoneNumberRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PhoneNumberDto>> {
if (
requestParameters.phoneNumberId === null ||
requestParameters.phoneNumberId === undefined
) {
throw new runtime.RequiredError(
'phoneNumberId',
'Required parameter requestParameters.phoneNumberId was null or undefined when calling getPhoneNumber.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/phone/numbers/{phoneNumberId}`.replace(
`{${'phoneNumberId'}}`,
encodeURIComponent(String(requestParameters.phoneNumberId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PhoneNumberDtoFromJSON(jsonValue)
);
}
/**
*/
async getPhoneNumber(
requestParameters: GetPhoneNumberRequest,
initOverrides?: RequestInit
): Promise<PhoneNumberDto> {
const response = await this.getPhoneNumberRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
*/
async getPhoneNumbersRaw(
requestParameters: GetPhoneNumbersRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PagePhoneNumberProjection>> {
const queryParameters: any = {};
if (requestParameters.phoneCountry !== undefined) {
queryParameters['phoneCountry'] = requestParameters.phoneCountry;
}
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/phone/numbers`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PagePhoneNumberProjectionFromJSON(jsonValue)
);
}
/**
*/
async getPhoneNumbers(
requestParameters: GetPhoneNumbersRequest,
initOverrides?: RequestInit
): Promise<PagePhoneNumberProjection> {
const response = await this.getPhoneNumbersRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
*/
async getPhonePlansRaw(
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<Array<PhonePlanDto>>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/phone/plans`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
jsonValue.map(PhonePlanDtoFromJSON)
);
}
/**
*/
async getPhonePlans(
initOverrides?: RequestInit
): Promise<Array<PhonePlanDto>> {
const response = await this.getPhonePlansRaw(initOverrides);
return await response.value();
}
/**
*/
async testPhoneNumberSendSmsRaw(
requestParameters: TestPhoneNumberSendSmsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
if (
requestParameters.phoneNumberId === null ||
requestParameters.phoneNumberId === undefined
) {
throw new runtime.RequiredError(
'phoneNumberId',
'Required parameter requestParameters.phoneNumberId was null or undefined when calling testPhoneNumberSendSms.'
);
}
if (
requestParameters.testPhoneNumberOptions === null ||
requestParameters.testPhoneNumberOptions === undefined
) {
throw new runtime.RequiredError(
'testPhoneNumberOptions',
'Required parameter requestParameters.testPhoneNumberOptions was null or undefined when calling testPhoneNumberSendSms.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (
requestParameters.xTestId !== undefined &&
requestParameters.xTestId !== null
) {
headerParameters['x-test-id'] = String(requestParameters.xTestId);
}
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/phone/numbers/{phoneNumberId}/test`.replace(
`{${'phoneNumberId'}}`,
encodeURIComponent(String(requestParameters.phoneNumberId))
),
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: TestPhoneNumberOptionsToJSON(
requestParameters.testPhoneNumberOptions
),
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
*/
async testPhoneNumberSendSms(
requestParameters: TestPhoneNumberSendSmsRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.testPhoneNumberSendSmsRaw(requestParameters, initOverrides);
}
}
/**
* @export
* @enum {string}
*/
export enum GetPhoneNumbersPhoneCountryEnum {
US = 'US',
GB = 'GB',
AU = 'AU',
}
/**
* @export
* @enum {string}
*/
export enum GetPhoneNumbersSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/* 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 * as runtime from '../runtime';
import {
MissedEmailDto,
MissedEmailDtoFromJSON,
MissedEmailDtoToJSON,
PageMissedEmailProjection,
PageMissedEmailProjectionFromJSON,
PageMissedEmailProjectionToJSON,
PageUnknownMissedEmailProjection,
PageUnknownMissedEmailProjectionFromJSON,
PageUnknownMissedEmailProjectionToJSON,
} from '../models';
export interface GetAllMissedEmailsRequest {
page?: number;
size?: number;
sort?: GetAllMissedEmailsSortEnum;
searchFilter?: string;
since?: Date;
before?: Date;
inboxId?: string;
}
export interface GetAllUnknownMissedEmailsRequest {
page?: number;
size?: number;
sort?: GetAllUnknownMissedEmailsSortEnum;
searchFilter?: string;
since?: Date;
before?: Date;
inboxId?: string;
}
export interface GetMissedEmailRequest {
missedEmailId: string;
}
export interface WaitForNthMissedEmailRequest {
index: number;
inboxId?: string;
timeout?: number;
since?: Date;
before?: Date;
}
/**
*
*/
export class MissedEmailControllerApi extends runtime.BaseAPI {
/**
* Get all MissedEmails in paginated format
*/
async getAllMissedEmailsRaw(
requestParameters: GetAllMissedEmailsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageMissedEmailProjection>> {
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.searchFilter !== undefined) {
queryParameters['searchFilter'] = requestParameters.searchFilter;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/missed-emails`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageMissedEmailProjectionFromJSON(jsonValue)
);
}
/**
* Get all MissedEmails in paginated format
*/
async getAllMissedEmails(
requestParameters: GetAllMissedEmailsRequest,
initOverrides?: RequestInit
): Promise<PageMissedEmailProjection> {
const response = await this.getAllMissedEmailsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Unknown missed emails are emails that were sent to MailSlurp but could not be assigned to an existing inbox.
* Get all unknown missed emails in paginated format
*/
async getAllUnknownMissedEmailsRaw(
requestParameters: GetAllUnknownMissedEmailsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageUnknownMissedEmailProjection>> {
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.searchFilter !== undefined) {
queryParameters['searchFilter'] = requestParameters.searchFilter;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/missed-emails/unknown`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageUnknownMissedEmailProjectionFromJSON(jsonValue)
);
}
/**
* Unknown missed emails are emails that were sent to MailSlurp but could not be assigned to an existing inbox.
* Get all unknown missed emails in paginated format
*/
async getAllUnknownMissedEmails(
requestParameters: GetAllUnknownMissedEmailsRequest,
initOverrides?: RequestInit
): Promise<PageUnknownMissedEmailProjection> {
const response = await this.getAllUnknownMissedEmailsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* List emails that were missed due to plan limits.
* Get MissedEmail
*/
async getMissedEmailRaw(
requestParameters: GetMissedEmailRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<MissedEmailDto>> {
if (
requestParameters.missedEmailId === null ||
requestParameters.missedEmailId === undefined
) {
throw new runtime.RequiredError(
'missedEmailId',
'Required parameter requestParameters.missedEmailId was null or undefined when calling getMissedEmail.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/missed-emails/{missedEmailId}`.replace(
`{${'missedEmailId'}}`,
encodeURIComponent(String(requestParameters.missedEmailId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
MissedEmailDtoFromJSON(jsonValue)
);
}
/**
* List emails that were missed due to plan limits.
* Get MissedEmail
*/
async getMissedEmail(
requestParameters: GetMissedEmailRequest,
initOverrides?: RequestInit
): Promise<MissedEmailDto> {
const response = await this.getMissedEmailRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* If emails were missed due to a plan limit they are saved as missed emails. If support team enables the canRestore flag these emails can be reload into your account using this method.
* Restore missed emails
*/
async restoreMissedEmailsRaw(
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/missed-emails/restore`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* If emails were missed due to a plan limit they are saved as missed emails. If support team enables the canRestore flag these emails can be reload into your account using this method.
* Restore missed emails
*/
async restoreMissedEmails(initOverrides?: RequestInit): Promise<void> {
await this.restoreMissedEmailsRaw(initOverrides);
}
/**
* Wait for 0 based index missed email
* Wait for Nth missed email
*/
async waitForNthMissedEmailRaw(
requestParameters: WaitForNthMissedEmailRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<MissedEmailDto>> {
if (
requestParameters.index === null ||
requestParameters.index === undefined
) {
throw new runtime.RequiredError(
'index',
'Required parameter requestParameters.index was null or undefined when calling waitForNthMissedEmail.'
);
}
const queryParameters: any = {};
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
if (requestParameters.timeout !== undefined) {
queryParameters['timeout'] = requestParameters.timeout;
}
if (requestParameters.index !== undefined) {
queryParameters['index'] = requestParameters.index;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/missed-emails/waitForNthMissedEmail`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
MissedEmailDtoFromJSON(jsonValue)
);
}
/**
* Wait for 0 based index missed email
* Wait for Nth missed email
*/
async waitForNthMissedEmail(
requestParameters: WaitForNthMissedEmailRequest,
initOverrides?: RequestInit
): Promise<MissedEmailDto> {
const response = await this.waitForNthMissedEmailRaw(
requestParameters,
initOverrides
);
return await response.value();
}
}
/**
* @export
* @enum {string}
*/
export enum GetAllMissedEmailsSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum GetAllUnknownMissedEmailsSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/* 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 * as runtime from '../runtime';
import {
DNSLookupOptions,
DNSLookupOptionsFromJSON,
DNSLookupOptionsToJSON,
DNSLookupResults,
DNSLookupResultsFromJSON,
DNSLookupResultsToJSON,
DNSLookupsOptions,
DNSLookupsOptionsFromJSON,
DNSLookupsOptionsToJSON,
DescribeDomainOptions,
DescribeDomainOptionsFromJSON,
DescribeDomainOptionsToJSON,
DescribeMailServerDomainResult,
DescribeMailServerDomainResultFromJSON,
DescribeMailServerDomainResultToJSON,
EmailVerificationResult,
EmailVerificationResultFromJSON,
EmailVerificationResultToJSON,
IPAddressResult,
IPAddressResultFromJSON,
IPAddressResultToJSON,
VerifyEmailAddressOptions,
VerifyEmailAddressOptionsFromJSON,
VerifyEmailAddressOptionsToJSON,
} from '../models';
export interface DescribeMailServerDomainRequest {
describeDomainOptions: DescribeDomainOptions;
}
export interface GetDnsLookupRequest {
dNSLookupOptions: DNSLookupOptions;
}
export interface GetDnsLookupsRequest {
dNSLookupsOptions: DNSLookupsOptions;
}
export interface GetIpAddressRequest {
name: string;
}
export interface VerifyEmailAddressRequest {
verifyEmailAddressOptions: VerifyEmailAddressOptions;
}
/**
*
*/
export class MailServerControllerApi extends runtime.BaseAPI {
/**
* Get DNS Mail Server records for a domain
*/
async describeMailServerDomainRaw(
requestParameters: DescribeMailServerDomainRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<DescribeMailServerDomainResult>> {
if (
requestParameters.describeDomainOptions === null ||
requestParameters.describeDomainOptions === undefined
) {
throw new runtime.RequiredError(
'describeDomainOptions',
'Required parameter requestParameters.describeDomainOptions was null or undefined when calling describeMailServerDomain.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/mail-server/describe/domain`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: DescribeDomainOptionsToJSON(
requestParameters.describeDomainOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
DescribeMailServerDomainResultFromJSON(jsonValue)
);
}
/**
* Get DNS Mail Server records for a domain
*/
async describeMailServerDomain(
requestParameters: DescribeMailServerDomainRequest,
initOverrides?: RequestInit
): Promise<DescribeMailServerDomainResult> {
const response = await this.describeMailServerDomainRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Lookup DNS records for a domain
*/
async getDnsLookupRaw(
requestParameters: GetDnsLookupRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<DNSLookupResults>> {
if (
requestParameters.dNSLookupOptions === null ||
requestParameters.dNSLookupOptions === undefined
) {
throw new runtime.RequiredError(
'dNSLookupOptions',
'Required parameter requestParameters.dNSLookupOptions was null or undefined when calling getDnsLookup.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/mail-server/describe/dns-lookup`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: DNSLookupOptionsToJSON(requestParameters.dNSLookupOptions),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
DNSLookupResultsFromJSON(jsonValue)
);
}
/**
* Lookup DNS records for a domain
*/
async getDnsLookup(
requestParameters: GetDnsLookupRequest,
initOverrides?: RequestInit
): Promise<DNSLookupResults> {
const response = await this.getDnsLookupRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Lookup DNS records for multiple domains
*/
async getDnsLookupsRaw(
requestParameters: GetDnsLookupsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<DNSLookupResults>> {
if (
requestParameters.dNSLookupsOptions === null ||
requestParameters.dNSLookupsOptions === undefined
) {
throw new runtime.RequiredError(
'dNSLookupsOptions',
'Required parameter requestParameters.dNSLookupsOptions was null or undefined when calling getDnsLookups.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/mail-server/describe/dns-lookups`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: DNSLookupsOptionsToJSON(requestParameters.dNSLookupsOptions),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
DNSLookupResultsFromJSON(jsonValue)
);
}
/**
* Lookup DNS records for multiple domains
*/
async getDnsLookups(
requestParameters: GetDnsLookupsRequest,
initOverrides?: RequestInit
): Promise<DNSLookupResults> {
const response = await this.getDnsLookupsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get IP address for a domain
*/
async getIpAddressRaw(
requestParameters: GetIpAddressRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<IPAddressResult>> {
if (
requestParameters.name === null ||
requestParameters.name === undefined
) {
throw new runtime.RequiredError(
'name',
'Required parameter requestParameters.name was null or undefined when calling getIpAddress.'
);
}
const queryParameters: any = {};
if (requestParameters.name !== undefined) {
queryParameters['name'] = requestParameters.name;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/mail-server/describe/ip-address`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
IPAddressResultFromJSON(jsonValue)
);
}
/**
* Get IP address for a domain
*/
async getIpAddress(
requestParameters: GetIpAddressRequest,
initOverrides?: RequestInit
): Promise<IPAddressResult> {
const response = await this.getIpAddressRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Deprecated. Use the EmailVerificationController methods for more accurate and reliable functionality. Verify the existence of an email address at a given mail server.
*/
async verifyEmailAddressRaw(
requestParameters: VerifyEmailAddressRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<EmailVerificationResult>> {
if (
requestParameters.verifyEmailAddressOptions === null ||
requestParameters.verifyEmailAddressOptions === undefined
) {
throw new runtime.RequiredError(
'verifyEmailAddressOptions',
'Required parameter requestParameters.verifyEmailAddressOptions was null or undefined when calling verifyEmailAddress.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/mail-server/verify/email-address`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: VerifyEmailAddressOptionsToJSON(
requestParameters.verifyEmailAddressOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
EmailVerificationResultFromJSON(jsonValue)
);
}
/**
* Deprecated. Use the EmailVerificationController methods for more accurate and reliable functionality. Verify the existence of an email address at a given mail server.
*/
async verifyEmailAddress(
requestParameters: VerifyEmailAddressRequest,
initOverrides?: RequestInit
): Promise<EmailVerificationResult> {
const response = await this.verifyEmailAddressRaw(
requestParameters,
initOverrides
);
return await response.value();
}
}
/* 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 * as runtime from '../runtime';
import {
CreateInboxRulesetOptions,
CreateInboxRulesetOptionsFromJSON,
CreateInboxRulesetOptionsToJSON,
InboxRulesetDto,
InboxRulesetDtoFromJSON,
InboxRulesetDtoToJSON,
InboxRulesetTestOptions,
InboxRulesetTestOptionsFromJSON,
InboxRulesetTestOptionsToJSON,
InboxRulesetTestResult,
InboxRulesetTestResultFromJSON,
InboxRulesetTestResultToJSON,
PageInboxRulesetDto,
PageInboxRulesetDtoFromJSON,
PageInboxRulesetDtoToJSON,
TestInboxRulesetReceivingOptions,
TestInboxRulesetReceivingOptionsFromJSON,
TestInboxRulesetReceivingOptionsToJSON,
TestInboxRulesetReceivingResult,
TestInboxRulesetReceivingResultFromJSON,
TestInboxRulesetReceivingResultToJSON,
TestInboxRulesetSendingOptions,
TestInboxRulesetSendingOptionsFromJSON,
TestInboxRulesetSendingOptionsToJSON,
TestInboxRulesetSendingResult,
TestInboxRulesetSendingResultFromJSON,
TestInboxRulesetSendingResultToJSON,
TestNewInboxRulesetOptions,
TestNewInboxRulesetOptionsFromJSON,
TestNewInboxRulesetOptionsToJSON,
} from '../models';
export interface CreateNewInboxRulesetRequest {
createInboxRulesetOptions: CreateInboxRulesetOptions;
inboxId?: string;
}
export interface DeleteInboxRulesetRequest {
id: string;
}
export interface DeleteInboxRulesetsRequest {
inboxId?: string;
}
export interface GetInboxRulesetRequest {
id: string;
}
export interface GetInboxRulesetsRequest {
inboxId?: string;
page?: number;
size?: number;
sort?: GetInboxRulesetsSortEnum;
searchFilter?: string;
since?: Date;
before?: Date;
}
export interface TestInboxRulesetRequest {
id: string;
inboxRulesetTestOptions: InboxRulesetTestOptions;
}
export interface TestInboxRulesetReceivingRequest {
testInboxRulesetReceivingOptions: TestInboxRulesetReceivingOptions;
}
export interface TestInboxRulesetSendingRequest {
testInboxRulesetSendingOptions: TestInboxRulesetSendingOptions;
}
export interface TestInboxRulesetsForInboxRequest {
inboxId: string;
inboxRulesetTestOptions: InboxRulesetTestOptions;
}
export interface TestNewInboxRulesetRequest {
testNewInboxRulesetOptions: TestNewInboxRulesetOptions;
}
/**
*
*/
export class InboxRulesetControllerApi extends runtime.BaseAPI {
/**
* Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving
* Create an inbox ruleset
*/
async createNewInboxRulesetRaw(
requestParameters: CreateNewInboxRulesetRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<InboxRulesetDto>> {
if (
requestParameters.createInboxRulesetOptions === null ||
requestParameters.createInboxRulesetOptions === undefined
) {
throw new runtime.RequiredError(
'createInboxRulesetOptions',
'Required parameter requestParameters.createInboxRulesetOptions was null or undefined when calling createNewInboxRuleset.'
);
}
const queryParameters: any = {};
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/rulesets`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: CreateInboxRulesetOptionsToJSON(
requestParameters.createInboxRulesetOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
InboxRulesetDtoFromJSON(jsonValue)
);
}
/**
* Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving
* Create an inbox ruleset
*/
async createNewInboxRuleset(
requestParameters: CreateNewInboxRulesetRequest,
initOverrides?: RequestInit
): Promise<InboxRulesetDto> {
const response = await this.createNewInboxRulesetRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Delete inbox ruleset
* Delete an inbox ruleset
*/
async deleteInboxRulesetRaw(
requestParameters: DeleteInboxRulesetRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError(
'id',
'Required parameter requestParameters.id was null or undefined when calling deleteInboxRuleset.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/rulesets/{id}`.replace(
`{${'id'}}`,
encodeURIComponent(String(requestParameters.id))
),
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Delete inbox ruleset
* Delete an inbox ruleset
*/
async deleteInboxRuleset(
requestParameters: DeleteInboxRulesetRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.deleteInboxRulesetRaw(requestParameters, initOverrides);
}
/**
* Delete inbox rulesets. Accepts optional inboxId filter.
* Delete inbox rulesets
*/
async deleteInboxRulesetsRaw(
requestParameters: DeleteInboxRulesetsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
const queryParameters: any = {};
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/rulesets`,
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Delete inbox rulesets. Accepts optional inboxId filter.
* Delete inbox rulesets
*/
async deleteInboxRulesets(
requestParameters: DeleteInboxRulesetsRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.deleteInboxRulesetsRaw(requestParameters, initOverrides);
}
/**
* Get inbox ruleset
* Get an inbox ruleset
*/
async getInboxRulesetRaw(
requestParameters: GetInboxRulesetRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<InboxRulesetDto>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError(
'id',
'Required parameter requestParameters.id was null or undefined when calling getInboxRuleset.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/rulesets/{id}`.replace(
`{${'id'}}`,
encodeURIComponent(String(requestParameters.id))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
InboxRulesetDtoFromJSON(jsonValue)
);
}
/**
* Get inbox ruleset
* Get an inbox ruleset
*/
async getInboxRuleset(
requestParameters: GetInboxRulesetRequest,
initOverrides?: RequestInit
): Promise<InboxRulesetDto> {
const response = await this.getInboxRulesetRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* List all rulesets attached to an inbox
* List inbox rulesets
*/
async getInboxRulesetsRaw(
requestParameters: GetInboxRulesetsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageInboxRulesetDto>> {
const queryParameters: any = {};
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.searchFilter !== undefined) {
queryParameters['searchFilter'] = requestParameters.searchFilter;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/rulesets`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageInboxRulesetDtoFromJSON(jsonValue)
);
}
/**
* List all rulesets attached to an inbox
* List inbox rulesets
*/
async getInboxRulesets(
requestParameters: GetInboxRulesetsRequest,
initOverrides?: RequestInit
): Promise<PageInboxRulesetDto> {
const response = await this.getInboxRulesetsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Test an inbox ruleset
* Test an inbox ruleset
*/
async testInboxRulesetRaw(
requestParameters: TestInboxRulesetRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<InboxRulesetTestResult>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError(
'id',
'Required parameter requestParameters.id was null or undefined when calling testInboxRuleset.'
);
}
if (
requestParameters.inboxRulesetTestOptions === null ||
requestParameters.inboxRulesetTestOptions === undefined
) {
throw new runtime.RequiredError(
'inboxRulesetTestOptions',
'Required parameter requestParameters.inboxRulesetTestOptions was null or undefined when calling testInboxRuleset.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/rulesets/{id}/test`.replace(
`{${'id'}}`,
encodeURIComponent(String(requestParameters.id))
),
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: InboxRulesetTestOptionsToJSON(
requestParameters.inboxRulesetTestOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
InboxRulesetTestResultFromJSON(jsonValue)
);
}
/**
* Test an inbox ruleset
* Test an inbox ruleset
*/
async testInboxRuleset(
requestParameters: TestInboxRulesetRequest,
initOverrides?: RequestInit
): Promise<InboxRulesetTestResult> {
const response = await this.testInboxRulesetRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Test whether inbound emails from an email address would be blocked or allowed by inbox rulesets
* Test receiving with inbox rulesets
*/
async testInboxRulesetReceivingRaw(
requestParameters: TestInboxRulesetReceivingRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<TestInboxRulesetReceivingResult>> {
if (
requestParameters.testInboxRulesetReceivingOptions === null ||
requestParameters.testInboxRulesetReceivingOptions === undefined
) {
throw new runtime.RequiredError(
'testInboxRulesetReceivingOptions',
'Required parameter requestParameters.testInboxRulesetReceivingOptions was null or undefined when calling testInboxRulesetReceiving.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/rulesets/test-receiving`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: TestInboxRulesetReceivingOptionsToJSON(
requestParameters.testInboxRulesetReceivingOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
TestInboxRulesetReceivingResultFromJSON(jsonValue)
);
}
/**
* Test whether inbound emails from an email address would be blocked or allowed by inbox rulesets
* Test receiving with inbox rulesets
*/
async testInboxRulesetReceiving(
requestParameters: TestInboxRulesetReceivingRequest,
initOverrides?: RequestInit
): Promise<TestInboxRulesetReceivingResult> {
const response = await this.testInboxRulesetReceivingRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Test whether outbound emails to an email address would be blocked or allowed by inbox rulesets
* Test sending with inbox rulesets
*/
async testInboxRulesetSendingRaw(
requestParameters: TestInboxRulesetSendingRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<TestInboxRulesetSendingResult>> {
if (
requestParameters.testInboxRulesetSendingOptions === null ||
requestParameters.testInboxRulesetSendingOptions === undefined
) {
throw new runtime.RequiredError(
'testInboxRulesetSendingOptions',
'Required parameter requestParameters.testInboxRulesetSendingOptions was null or undefined when calling testInboxRulesetSending.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/rulesets/test-sending`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: TestInboxRulesetSendingOptionsToJSON(
requestParameters.testInboxRulesetSendingOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
TestInboxRulesetSendingResultFromJSON(jsonValue)
);
}
/**
* Test whether outbound emails to an email address would be blocked or allowed by inbox rulesets
* Test sending with inbox rulesets
*/
async testInboxRulesetSending(
requestParameters: TestInboxRulesetSendingRequest,
initOverrides?: RequestInit
): Promise<TestInboxRulesetSendingResult> {
const response = await this.testInboxRulesetSendingRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Test inbox rulesets for inbox
* Test inbox rulesets for inbox
*/
async testInboxRulesetsForInboxRaw(
requestParameters: TestInboxRulesetsForInboxRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<InboxRulesetTestResult>> {
if (
requestParameters.inboxId === null ||
requestParameters.inboxId === undefined
) {
throw new runtime.RequiredError(
'inboxId',
'Required parameter requestParameters.inboxId was null or undefined when calling testInboxRulesetsForInbox.'
);
}
if (
requestParameters.inboxRulesetTestOptions === null ||
requestParameters.inboxRulesetTestOptions === undefined
) {
throw new runtime.RequiredError(
'inboxRulesetTestOptions',
'Required parameter requestParameters.inboxRulesetTestOptions was null or undefined when calling testInboxRulesetsForInbox.'
);
}
const queryParameters: any = {};
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/rulesets`,
method: 'PUT',
headers: headerParameters,
query: queryParameters,
body: InboxRulesetTestOptionsToJSON(
requestParameters.inboxRulesetTestOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
InboxRulesetTestResultFromJSON(jsonValue)
);
}
/**
* Test inbox rulesets for inbox
* Test inbox rulesets for inbox
*/
async testInboxRulesetsForInbox(
requestParameters: TestInboxRulesetsForInboxRequest,
initOverrides?: RequestInit
): Promise<InboxRulesetTestResult> {
const response = await this.testInboxRulesetsForInboxRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Test new inbox ruleset
* Test new inbox ruleset
*/
async testNewInboxRulesetRaw(
requestParameters: TestNewInboxRulesetRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<InboxRulesetTestResult>> {
if (
requestParameters.testNewInboxRulesetOptions === null ||
requestParameters.testNewInboxRulesetOptions === undefined
) {
throw new runtime.RequiredError(
'testNewInboxRulesetOptions',
'Required parameter requestParameters.testNewInboxRulesetOptions was null or undefined when calling testNewInboxRuleset.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/rulesets`,
method: 'PATCH',
headers: headerParameters,
query: queryParameters,
body: TestNewInboxRulesetOptionsToJSON(
requestParameters.testNewInboxRulesetOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
InboxRulesetTestResultFromJSON(jsonValue)
);
}
/**
* Test new inbox ruleset
* Test new inbox ruleset
*/
async testNewInboxRuleset(
requestParameters: TestNewInboxRulesetRequest,
initOverrides?: RequestInit
): Promise<InboxRulesetTestResult> {
const response = await this.testNewInboxRulesetRaw(
requestParameters,
initOverrides
);
return await response.value();
}
}
/**
* @export
* @enum {string}
*/
export enum GetInboxRulesetsSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/* 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 * as runtime from '../runtime';
import {
CreateInboxReplierOptions,
CreateInboxReplierOptionsFromJSON,
CreateInboxReplierOptionsToJSON,
InboxReplierDto,
InboxReplierDtoFromJSON,
InboxReplierDtoToJSON,
PageInboxReplierDto,
PageInboxReplierDtoFromJSON,
PageInboxReplierDtoToJSON,
PageInboxReplierEvents,
PageInboxReplierEventsFromJSON,
PageInboxReplierEventsToJSON,
UpdateInboxReplierOptions,
UpdateInboxReplierOptionsFromJSON,
UpdateInboxReplierOptionsToJSON,
} from '../models';
export interface CreateNewInboxReplierRequest {
createInboxReplierOptions: CreateInboxReplierOptions;
}
export interface DeleteInboxReplierRequest {
id: string;
}
export interface DeleteInboxRepliersRequest {
inboxId?: string;
}
export interface GetInboxReplierRequest {
id: string;
}
export interface GetInboxReplierEventsRequest {
id: string;
page?: number;
size?: number;
sort?: GetInboxReplierEventsSortEnum;
}
export interface GetInboxRepliersRequest {
inboxId?: string;
page?: number;
size?: number;
sort?: GetInboxRepliersSortEnum;
since?: Date;
before?: Date;
}
export interface UpdateInboxReplierRequest {
id: string;
updateInboxReplierOptions: UpdateInboxReplierOptions;
}
/**
*
*/
export class InboxReplierControllerApi extends runtime.BaseAPI {
/**
* Create a new inbox rule for reply toing, blocking, and allowing emails when sending and receiving
* Create an inbox replier
*/
async createNewInboxReplierRaw(
requestParameters: CreateNewInboxReplierRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<InboxReplierDto>> {
if (
requestParameters.createInboxReplierOptions === null ||
requestParameters.createInboxReplierOptions === undefined
) {
throw new runtime.RequiredError(
'createInboxReplierOptions',
'Required parameter requestParameters.createInboxReplierOptions was null or undefined when calling createNewInboxReplier.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/repliers`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: CreateInboxReplierOptionsToJSON(
requestParameters.createInboxReplierOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
InboxReplierDtoFromJSON(jsonValue)
);
}
/**
* Create a new inbox rule for reply toing, blocking, and allowing emails when sending and receiving
* Create an inbox replier
*/
async createNewInboxReplier(
requestParameters: CreateNewInboxReplierRequest,
initOverrides?: RequestInit
): Promise<InboxReplierDto> {
const response = await this.createNewInboxReplierRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Delete inbox replier
* Delete an inbox replier
*/
async deleteInboxReplierRaw(
requestParameters: DeleteInboxReplierRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError(
'id',
'Required parameter requestParameters.id was null or undefined when calling deleteInboxReplier.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/repliers/{id}`.replace(
`{${'id'}}`,
encodeURIComponent(String(requestParameters.id))
),
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Delete inbox replier
* Delete an inbox replier
*/
async deleteInboxReplier(
requestParameters: DeleteInboxReplierRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.deleteInboxReplierRaw(requestParameters, initOverrides);
}
/**
* Delete inbox repliers. Accepts optional inboxId filter.
* Delete inbox repliers
*/
async deleteInboxRepliersRaw(
requestParameters: DeleteInboxRepliersRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
const queryParameters: any = {};
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/repliers`,
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Delete inbox repliers. Accepts optional inboxId filter.
* Delete inbox repliers
*/
async deleteInboxRepliers(
requestParameters: DeleteInboxRepliersRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.deleteInboxRepliersRaw(requestParameters, initOverrides);
}
/**
* Get inbox ruleset
* Get an inbox replier
*/
async getInboxReplierRaw(
requestParameters: GetInboxReplierRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<InboxReplierDto>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError(
'id',
'Required parameter requestParameters.id was null or undefined when calling getInboxReplier.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/repliers/{id}`.replace(
`{${'id'}}`,
encodeURIComponent(String(requestParameters.id))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
InboxReplierDtoFromJSON(jsonValue)
);
}
/**
* Get inbox ruleset
* Get an inbox replier
*/
async getInboxReplier(
requestParameters: GetInboxReplierRequest,
initOverrides?: RequestInit
): Promise<InboxReplierDto> {
const response = await this.getInboxReplierRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get inbox ruleset events
* Get an inbox replier event list
*/
async getInboxReplierEventsRaw(
requestParameters: GetInboxReplierEventsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageInboxReplierEvents>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError(
'id',
'Required parameter requestParameters.id was null or undefined when calling getInboxReplierEvents.'
);
}
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/repliers/{id}/events`.replace(
`{${'id'}}`,
encodeURIComponent(String(requestParameters.id))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageInboxReplierEventsFromJSON(jsonValue)
);
}
/**
* Get inbox ruleset events
* Get an inbox replier event list
*/
async getInboxReplierEvents(
requestParameters: GetInboxReplierEventsRequest,
initOverrides?: RequestInit
): Promise<PageInboxReplierEvents> {
const response = await this.getInboxReplierEventsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* List all repliers attached to an inbox
* List inbox repliers
*/
async getInboxRepliersRaw(
requestParameters: GetInboxRepliersRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageInboxReplierDto>> {
const queryParameters: any = {};
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/repliers`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageInboxReplierDtoFromJSON(jsonValue)
);
}
/**
* List all repliers attached to an inbox
* List inbox repliers
*/
async getInboxRepliers(
requestParameters: GetInboxRepliersRequest,
initOverrides?: RequestInit
): Promise<PageInboxReplierDto> {
const response = await this.getInboxRepliersRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Update inbox ruleset
* Update an inbox replier
*/
async updateInboxReplierRaw(
requestParameters: UpdateInboxReplierRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<InboxReplierDto>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError(
'id',
'Required parameter requestParameters.id was null or undefined when calling updateInboxReplier.'
);
}
if (
requestParameters.updateInboxReplierOptions === null ||
requestParameters.updateInboxReplierOptions === undefined
) {
throw new runtime.RequiredError(
'updateInboxReplierOptions',
'Required parameter requestParameters.updateInboxReplierOptions was null or undefined when calling updateInboxReplier.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/repliers/{id}`.replace(
`{${'id'}}`,
encodeURIComponent(String(requestParameters.id))
),
method: 'PUT',
headers: headerParameters,
query: queryParameters,
body: UpdateInboxReplierOptionsToJSON(
requestParameters.updateInboxReplierOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
InboxReplierDtoFromJSON(jsonValue)
);
}
/**
* Update inbox ruleset
* Update an inbox replier
*/
async updateInboxReplier(
requestParameters: UpdateInboxReplierRequest,
initOverrides?: RequestInit
): Promise<InboxReplierDto> {
const response = await this.updateInboxReplierRaw(
requestParameters,
initOverrides
);
return await response.value();
}
}
/**
* @export
* @enum {string}
*/
export enum GetInboxReplierEventsSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum GetInboxRepliersSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/* 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 * as runtime from '../runtime';
import {
CreateInboxForwarderOptions,
CreateInboxForwarderOptionsFromJSON,
CreateInboxForwarderOptionsToJSON,
InboxForwarderDto,
InboxForwarderDtoFromJSON,
InboxForwarderDtoToJSON,
InboxForwarderEventDto,
InboxForwarderEventDtoFromJSON,
InboxForwarderEventDtoToJSON,
InboxForwarderTestOptions,
InboxForwarderTestOptionsFromJSON,
InboxForwarderTestOptionsToJSON,
InboxForwarderTestResult,
InboxForwarderTestResultFromJSON,
InboxForwarderTestResultToJSON,
PageInboxForwarderDto,
PageInboxForwarderDtoFromJSON,
PageInboxForwarderDtoToJSON,
PageInboxForwarderEvents,
PageInboxForwarderEventsFromJSON,
PageInboxForwarderEventsToJSON,
TestNewInboxForwarderOptions,
TestNewInboxForwarderOptionsFromJSON,
TestNewInboxForwarderOptionsToJSON,
} from '../models';
export interface CreateNewInboxForwarderRequest {
inboxId: string;
createInboxForwarderOptions: CreateInboxForwarderOptions;
}
export interface DeleteInboxForwarderRequest {
id: string;
}
export interface DeleteInboxForwardersRequest {
inboxId?: string;
}
export interface GetAllInboxForwarderEventsRequest {
page?: number;
size?: number;
inboxId?: string;
sort?: GetAllInboxForwarderEventsSortEnum;
}
export interface GetForwarderEventRequest {
eventId: string;
}
export interface GetInboxForwarderRequest {
id: string;
}
export interface GetInboxForwarderEventRequest {
id: string;
eventId: string;
}
export interface GetInboxForwarderEventsRequest {
id: string;
page?: number;
size?: number;
sort?: GetInboxForwarderEventsSortEnum;
}
export interface GetInboxForwardersRequest {
inboxId?: string;
page?: number;
size?: number;
sort?: GetInboxForwardersSortEnum;
searchFilter?: string;
since?: Date;
before?: Date;
}
export interface TestInboxForwarderRequest {
id: string;
inboxForwarderTestOptions: InboxForwarderTestOptions;
}
export interface TestInboxForwardersForInboxRequest {
inboxId: string;
inboxForwarderTestOptions: InboxForwarderTestOptions;
}
export interface TestNewInboxForwarderRequest {
testNewInboxForwarderOptions: TestNewInboxForwarderOptions;
}
export interface UpdateInboxForwarderRequest {
id: string;
createInboxForwarderOptions: CreateInboxForwarderOptions;
}
/**
*
*/
export class InboxForwarderControllerApi extends runtime.BaseAPI {
/**
* Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving
* Create an inbox forwarder
*/
async createNewInboxForwarderRaw(
requestParameters: CreateNewInboxForwarderRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<InboxForwarderDto>> {
if (
requestParameters.inboxId === null ||
requestParameters.inboxId === undefined
) {
throw new runtime.RequiredError(
'inboxId',
'Required parameter requestParameters.inboxId was null or undefined when calling createNewInboxForwarder.'
);
}
if (
requestParameters.createInboxForwarderOptions === null ||
requestParameters.createInboxForwarderOptions === undefined
) {
throw new runtime.RequiredError(
'createInboxForwarderOptions',
'Required parameter requestParameters.createInboxForwarderOptions was null or undefined when calling createNewInboxForwarder.'
);
}
const queryParameters: any = {};
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/forwarders`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: CreateInboxForwarderOptionsToJSON(
requestParameters.createInboxForwarderOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
InboxForwarderDtoFromJSON(jsonValue)
);
}
/**
* Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving
* Create an inbox forwarder
*/
async createNewInboxForwarder(
requestParameters: CreateNewInboxForwarderRequest,
initOverrides?: RequestInit
): Promise<InboxForwarderDto> {
const response = await this.createNewInboxForwarderRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Delete inbox forwarder
* Delete an inbox forwarder
*/
async deleteInboxForwarderRaw(
requestParameters: DeleteInboxForwarderRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError(
'id',
'Required parameter requestParameters.id was null or undefined when calling deleteInboxForwarder.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/forwarders/{id}`.replace(
`{${'id'}}`,
encodeURIComponent(String(requestParameters.id))
),
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Delete inbox forwarder
* Delete an inbox forwarder
*/
async deleteInboxForwarder(
requestParameters: DeleteInboxForwarderRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.deleteInboxForwarderRaw(requestParameters, initOverrides);
}
/**
* Delete inbox forwarders. Accepts optional inboxId filter.
* Delete inbox forwarders
*/
async deleteInboxForwardersRaw(
requestParameters: DeleteInboxForwardersRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
const queryParameters: any = {};
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/forwarders`,
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Delete inbox forwarders. Accepts optional inboxId filter.
* Delete inbox forwarders
*/
async deleteInboxForwarders(
requestParameters: DeleteInboxForwardersRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.deleteInboxForwardersRaw(requestParameters, initOverrides);
}
/**
* Get all inbox forwarder events
* Get all inbox forwarder events
*/
async getAllInboxForwarderEventsRaw(
requestParameters: GetAllInboxForwarderEventsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageInboxForwarderEvents>> {
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/forwarders/events`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageInboxForwarderEventsFromJSON(jsonValue)
);
}
/**
* Get all inbox forwarder events
* Get all inbox forwarder events
*/
async getAllInboxForwarderEvents(
requestParameters: GetAllInboxForwarderEventsRequest,
initOverrides?: RequestInit
): Promise<PageInboxForwarderEvents> {
const response = await this.getAllInboxForwarderEventsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get forwarder event
* Get a forwarder event
*/
async getForwarderEventRaw(
requestParameters: GetForwarderEventRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<InboxForwarderEventDto>> {
if (
requestParameters.eventId === null ||
requestParameters.eventId === undefined
) {
throw new runtime.RequiredError(
'eventId',
'Required parameter requestParameters.eventId was null or undefined when calling getForwarderEvent.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/forwarders/events/{eventId}`.replace(
`{${'eventId'}}`,
encodeURIComponent(String(requestParameters.eventId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
InboxForwarderEventDtoFromJSON(jsonValue)
);
}
/**
* Get forwarder event
* Get a forwarder event
*/
async getForwarderEvent(
requestParameters: GetForwarderEventRequest,
initOverrides?: RequestInit
): Promise<InboxForwarderEventDto> {
const response = await this.getForwarderEventRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get inbox forwarder
* Get an inbox forwarder
*/
async getInboxForwarderRaw(
requestParameters: GetInboxForwarderRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<InboxForwarderDto>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError(
'id',
'Required parameter requestParameters.id was null or undefined when calling getInboxForwarder.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/forwarders/{id}`.replace(
`{${'id'}}`,
encodeURIComponent(String(requestParameters.id))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
InboxForwarderDtoFromJSON(jsonValue)
);
}
/**
* Get inbox forwarder
* Get an inbox forwarder
*/
async getInboxForwarder(
requestParameters: GetInboxForwarderRequest,
initOverrides?: RequestInit
): Promise<InboxForwarderDto> {
const response = await this.getInboxForwarderRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get inbox forwarder event
* Get an inbox forwarder event
*/
async getInboxForwarderEventRaw(
requestParameters: GetInboxForwarderEventRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<InboxForwarderEventDto>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError(
'id',
'Required parameter requestParameters.id was null or undefined when calling getInboxForwarderEvent.'
);
}
if (
requestParameters.eventId === null ||
requestParameters.eventId === undefined
) {
throw new runtime.RequiredError(
'eventId',
'Required parameter requestParameters.eventId was null or undefined when calling getInboxForwarderEvent.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/forwarders/{id}/events/{eventId}`
.replace(
`{${'id'}}`,
encodeURIComponent(String(requestParameters.id))
)
.replace(
`{${'eventId'}}`,
encodeURIComponent(String(requestParameters.eventId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
InboxForwarderEventDtoFromJSON(jsonValue)
);
}
/**
* Get inbox forwarder event
* Get an inbox forwarder event
*/
async getInboxForwarderEvent(
requestParameters: GetInboxForwarderEventRequest,
initOverrides?: RequestInit
): Promise<InboxForwarderEventDto> {
const response = await this.getInboxForwarderEventRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get inbox forwarder events
* Get an inbox forwarder event list
*/
async getInboxForwarderEventsRaw(
requestParameters: GetInboxForwarderEventsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageInboxForwarderEvents>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError(
'id',
'Required parameter requestParameters.id was null or undefined when calling getInboxForwarderEvents.'
);
}
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/forwarders/{id}/events`.replace(
`{${'id'}}`,
encodeURIComponent(String(requestParameters.id))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageInboxForwarderEventsFromJSON(jsonValue)
);
}
/**
* Get inbox forwarder events
* Get an inbox forwarder event list
*/
async getInboxForwarderEvents(
requestParameters: GetInboxForwarderEventsRequest,
initOverrides?: RequestInit
): Promise<PageInboxForwarderEvents> {
const response = await this.getInboxForwarderEventsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* List all forwarders attached to an inbox
* List inbox forwarders
*/
async getInboxForwardersRaw(
requestParameters: GetInboxForwardersRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageInboxForwarderDto>> {
const queryParameters: any = {};
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.searchFilter !== undefined) {
queryParameters['searchFilter'] = requestParameters.searchFilter;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/forwarders`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageInboxForwarderDtoFromJSON(jsonValue)
);
}
/**
* List all forwarders attached to an inbox
* List inbox forwarders
*/
async getInboxForwarders(
requestParameters: GetInboxForwardersRequest,
initOverrides?: RequestInit
): Promise<PageInboxForwarderDto> {
const response = await this.getInboxForwardersRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Test an inbox forwarder
* Test an inbox forwarder
*/
async testInboxForwarderRaw(
requestParameters: TestInboxForwarderRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<InboxForwarderTestResult>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError(
'id',
'Required parameter requestParameters.id was null or undefined when calling testInboxForwarder.'
);
}
if (
requestParameters.inboxForwarderTestOptions === null ||
requestParameters.inboxForwarderTestOptions === undefined
) {
throw new runtime.RequiredError(
'inboxForwarderTestOptions',
'Required parameter requestParameters.inboxForwarderTestOptions was null or undefined when calling testInboxForwarder.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/forwarders/{id}/test`.replace(
`{${'id'}}`,
encodeURIComponent(String(requestParameters.id))
),
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: InboxForwarderTestOptionsToJSON(
requestParameters.inboxForwarderTestOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
InboxForwarderTestResultFromJSON(jsonValue)
);
}
/**
* Test an inbox forwarder
* Test an inbox forwarder
*/
async testInboxForwarder(
requestParameters: TestInboxForwarderRequest,
initOverrides?: RequestInit
): Promise<InboxForwarderTestResult> {
const response = await this.testInboxForwarderRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Test inbox forwarders for inbox
* Test inbox forwarders for inbox
*/
async testInboxForwardersForInboxRaw(
requestParameters: TestInboxForwardersForInboxRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<InboxForwarderTestResult>> {
if (
requestParameters.inboxId === null ||
requestParameters.inboxId === undefined
) {
throw new runtime.RequiredError(
'inboxId',
'Required parameter requestParameters.inboxId was null or undefined when calling testInboxForwardersForInbox.'
);
}
if (
requestParameters.inboxForwarderTestOptions === null ||
requestParameters.inboxForwarderTestOptions === undefined
) {
throw new runtime.RequiredError(
'inboxForwarderTestOptions',
'Required parameter requestParameters.inboxForwarderTestOptions was null or undefined when calling testInboxForwardersForInbox.'
);
}
const queryParameters: any = {};
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/forwarders`,
method: 'PUT',
headers: headerParameters,
query: queryParameters,
body: InboxForwarderTestOptionsToJSON(
requestParameters.inboxForwarderTestOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
InboxForwarderTestResultFromJSON(jsonValue)
);
}
/**
* Test inbox forwarders for inbox
* Test inbox forwarders for inbox
*/
async testInboxForwardersForInbox(
requestParameters: TestInboxForwardersForInboxRequest,
initOverrides?: RequestInit
): Promise<InboxForwarderTestResult> {
const response = await this.testInboxForwardersForInboxRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Test new inbox forwarder
* Test new inbox forwarder
*/
async testNewInboxForwarderRaw(
requestParameters: TestNewInboxForwarderRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<InboxForwarderTestResult>> {
if (
requestParameters.testNewInboxForwarderOptions === null ||
requestParameters.testNewInboxForwarderOptions === undefined
) {
throw new runtime.RequiredError(
'testNewInboxForwarderOptions',
'Required parameter requestParameters.testNewInboxForwarderOptions was null or undefined when calling testNewInboxForwarder.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/forwarders`,
method: 'PATCH',
headers: headerParameters,
query: queryParameters,
body: TestNewInboxForwarderOptionsToJSON(
requestParameters.testNewInboxForwarderOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
InboxForwarderTestResultFromJSON(jsonValue)
);
}
/**
* Test new inbox forwarder
* Test new inbox forwarder
*/
async testNewInboxForwarder(
requestParameters: TestNewInboxForwarderRequest,
initOverrides?: RequestInit
): Promise<InboxForwarderTestResult> {
const response = await this.testNewInboxForwarderRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Update inbox forwarder
* Update an inbox forwarder
*/
async updateInboxForwarderRaw(
requestParameters: UpdateInboxForwarderRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<InboxForwarderDto>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError(
'id',
'Required parameter requestParameters.id was null or undefined when calling updateInboxForwarder.'
);
}
if (
requestParameters.createInboxForwarderOptions === null ||
requestParameters.createInboxForwarderOptions === undefined
) {
throw new runtime.RequiredError(
'createInboxForwarderOptions',
'Required parameter requestParameters.createInboxForwarderOptions was null or undefined when calling updateInboxForwarder.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/forwarders/{id}`.replace(
`{${'id'}}`,
encodeURIComponent(String(requestParameters.id))
),
method: 'PUT',
headers: headerParameters,
query: queryParameters,
body: CreateInboxForwarderOptionsToJSON(
requestParameters.createInboxForwarderOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
InboxForwarderDtoFromJSON(jsonValue)
);
}
/**
* Update inbox forwarder
* Update an inbox forwarder
*/
async updateInboxForwarder(
requestParameters: UpdateInboxForwarderRequest,
initOverrides?: RequestInit
): Promise<InboxForwarderDto> {
const response = await this.updateInboxForwarderRaw(
requestParameters,
initOverrides
);
return await response.value();
}
}
/**
* @export
* @enum {string}
*/
export enum GetAllInboxForwarderEventsSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum GetInboxForwarderEventsSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum GetInboxForwardersSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/* 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 * as runtime from '../runtime';
import {
CountDto,
CountDtoFromJSON,
CountDtoToJSON,
CreateInboxDto,
CreateInboxDtoFromJSON,
CreateInboxDtoToJSON,
CreateInboxRulesetOptions,
CreateInboxRulesetOptionsFromJSON,
CreateInboxRulesetOptionsToJSON,
Email,
EmailFromJSON,
EmailToJSON,
EmailPreview,
EmailPreviewFromJSON,
EmailPreviewToJSON,
FlushExpiredInboxesResult,
FlushExpiredInboxesResultFromJSON,
FlushExpiredInboxesResultToJSON,
ImapAccessDetails,
ImapAccessDetailsFromJSON,
ImapAccessDetailsToJSON,
ImapSmtpAccessDetails,
ImapSmtpAccessDetailsFromJSON,
ImapSmtpAccessDetailsToJSON,
ImapSmtpAccessServers,
ImapSmtpAccessServersFromJSON,
ImapSmtpAccessServersToJSON,
InboxByEmailAddressResult,
InboxByEmailAddressResultFromJSON,
InboxByEmailAddressResultToJSON,
InboxByNameResult,
InboxByNameResultFromJSON,
InboxByNameResultToJSON,
InboxDto,
InboxDtoFromJSON,
InboxDtoToJSON,
InboxExistsDto,
InboxExistsDtoFromJSON,
InboxExistsDtoToJSON,
InboxIdsResult,
InboxIdsResultFromJSON,
InboxIdsResultToJSON,
InboxRulesetDto,
InboxRulesetDtoFromJSON,
InboxRulesetDtoToJSON,
PageDeliveryStatus,
PageDeliveryStatusFromJSON,
PageDeliveryStatusToJSON,
PageEmailPreview,
PageEmailPreviewFromJSON,
PageEmailPreviewToJSON,
PageInboxProjection,
PageInboxProjectionFromJSON,
PageInboxProjectionToJSON,
PageInboxRulesetDto,
PageInboxRulesetDtoFromJSON,
PageInboxRulesetDtoToJSON,
PageOrganizationInboxProjection,
PageOrganizationInboxProjectionFromJSON,
PageOrganizationInboxProjectionToJSON,
PageScheduledJobs,
PageScheduledJobsFromJSON,
PageScheduledJobsToJSON,
PageSentEmailProjection,
PageSentEmailProjectionFromJSON,
PageSentEmailProjectionToJSON,
PageTrackingPixelProjection,
PageTrackingPixelProjectionFromJSON,
PageTrackingPixelProjectionToJSON,
ScheduledJobDto,
ScheduledJobDtoFromJSON,
ScheduledJobDtoToJSON,
SearchInboxesOptions,
SearchInboxesOptionsFromJSON,
SearchInboxesOptionsToJSON,
SendEmailOptions,
SendEmailOptionsFromJSON,
SendEmailOptionsToJSON,
SendSMTPEnvelopeOptions,
SendSMTPEnvelopeOptionsFromJSON,
SendSMTPEnvelopeOptionsToJSON,
SentEmailDto,
SentEmailDtoFromJSON,
SentEmailDtoToJSON,
SetInboxFavouritedOptions,
SetInboxFavouritedOptionsFromJSON,
SetInboxFavouritedOptionsToJSON,
SmtpAccessDetails,
SmtpAccessDetailsFromJSON,
SmtpAccessDetailsToJSON,
UpdateInboxOptions,
UpdateInboxOptionsFromJSON,
UpdateInboxOptionsToJSON,
} from '../models';
export interface CancelScheduledJobRequest {
jobId: string;
}
export interface CreateInboxRequest {
emailAddress?: string;
tags?: Array<string>;
name?: string;
description?: string;
useDomainPool?: boolean;
favourite?: boolean;
expiresAt?: Date;
expiresIn?: number;
allowTeamAccess?: boolean;
inboxType?: CreateInboxInboxTypeEnum;
virtualInbox?: boolean;
useShortAddress?: boolean;
domainId?: string;
domainName?: string;
prefix?: string;
}
export interface CreateInboxRulesetRequest {
inboxId: string;
createInboxRulesetOptions: CreateInboxRulesetOptions;
}
export interface CreateInboxWithOptionsRequest {
createInboxDto: CreateInboxDto;
}
export interface DeleteAllInboxEmailsRequest {
inboxId: string;
}
export interface DeleteAllInboxesByDescriptionRequest {
description: string;
}
export interface DeleteAllInboxesByNameRequest {
name: string;
}
export interface DeleteAllInboxesByTagRequest {
tag: string;
}
export interface DeleteInboxRequest {
inboxId: string;
}
export interface DoesInboxExistRequest {
emailAddress: string;
allowCatchAll?: boolean;
}
export interface FlushExpiredRequest {
before?: Date;
}
export interface GetAllInboxesRequest {
page?: number;
size?: number;
sort?: GetAllInboxesSortEnum;
favourite?: boolean;
search?: string;
tag?: string;
teamAccess?: boolean;
since?: Date;
before?: Date;
inboxType?: GetAllInboxesInboxTypeEnum;
inboxFunction?: GetAllInboxesInboxFunctionEnum;
domainId?: string;
}
export interface GetAllInboxesOffsetPaginatedRequest {
page?: number;
size?: number;
sort?: GetAllInboxesOffsetPaginatedSortEnum;
favourite?: boolean;
search?: string;
tag?: string;
teamAccess?: boolean;
since?: Date;
before?: Date;
inboxType?: GetAllInboxesOffsetPaginatedInboxTypeEnum;
inboxFunction?: GetAllInboxesOffsetPaginatedInboxFunctionEnum;
domainId?: string;
}
export interface GetAllScheduledJobsRequest {
page?: number;
size?: number;
sort?: GetAllScheduledJobsSortEnum;
since?: Date;
before?: Date;
}
export interface GetDeliveryStatusesByInboxIdRequest {
inboxId: string;
page?: number;
size?: number;
sort?: GetDeliveryStatusesByInboxIdSortEnum;
since?: Date;
before?: Date;
}
export interface GetEmailsRequest {
inboxId: string;
size?: number;
limit?: number;
sort?: GetEmailsSortEnum;
retryTimeout?: number;
delayTimeout?: number;
minCount?: number;
unreadOnly?: boolean;
before?: Date;
since?: Date;
}
export interface GetImapAccessRequest {
inboxId?: string;
}
export interface GetImapSmtpAccessRequest {
inboxId?: string;
}
export interface GetImapSmtpAccessEnvRequest {
inboxId?: string;
}
export interface GetInboxRequest {
inboxId: string;
}
export interface GetInboxByEmailAddressRequest {
emailAddress: string;
}
export interface GetInboxByNameRequest {
name: string;
}
export interface GetInboxEmailCountRequest {
inboxId: string;
}
export interface GetInboxEmailsPaginatedRequest {
inboxId: string;
page?: number;
size?: number;
sort?: GetInboxEmailsPaginatedSortEnum;
since?: Date;
before?: Date;
}
export interface GetInboxSentEmailsRequest {
inboxId: string;
page?: number;
size?: number;
sort?: GetInboxSentEmailsSortEnum;
searchFilter?: string;
since?: Date;
before?: Date;
}
export interface GetInboxesRequest {
size?: number;
sort?: GetInboxesSortEnum;
since?: Date;
excludeCatchAllInboxes?: boolean;
before?: Date;
}
export interface GetLatestEmailInInboxRequest {
inboxId: string;
timeoutMillis: number;
}
export interface GetOrganizationInboxesRequest {
page?: number;
size?: number;
sort?: GetOrganizationInboxesSortEnum;
searchFilter?: string;
since?: Date;
before?: Date;
}
export interface GetScheduledJobRequest {
jobId: string;
}
export interface GetScheduledJobsByInboxIdRequest {
inboxId: string;
page?: number;
size?: number;
sort?: GetScheduledJobsByInboxIdSortEnum;
since?: Date;
before?: Date;
}
export interface GetSmtpAccessRequest {
inboxId?: string;
}
export interface ListInboxRulesetsRequest {
inboxId: string;
page?: number;
size?: number;
sort?: ListInboxRulesetsSortEnum;
searchFilter?: string;
since?: Date;
before?: Date;
}
export interface ListInboxTrackingPixelsRequest {
inboxId: string;
page?: number;
size?: number;
sort?: ListInboxTrackingPixelsSortEnum;
searchFilter?: string;
since?: Date;
before?: Date;
}
export interface SearchInboxesRequest {
searchInboxesOptions: SearchInboxesOptions;
}
export interface SendEmailRequest {
inboxId: string;
sendEmailOptions: SendEmailOptions;
}
export interface SendEmailAndConfirmRequest {
inboxId: string;
sendEmailOptions: SendEmailOptions;
}
export interface SendEmailWithQueueRequest {
inboxId: string;
validateBeforeEnqueue: boolean;
sendEmailOptions: SendEmailOptions;
}
export interface SendSmtpEnvelopeRequest {
inboxId: string;
sendSMTPEnvelopeOptions: SendSMTPEnvelopeOptions;
}
export interface SendTestEmailRequest {
inboxId: string;
}
export interface SendWithScheduleRequest {
inboxId: string;
sendEmailOptions: SendEmailOptions;
sendAtTimestamp?: Date;
sendAtNowPlusSeconds?: number;
validateBeforeEnqueue?: boolean;
}
export interface SetInboxFavouritedRequest {
inboxId: string;
setInboxFavouritedOptions: SetInboxFavouritedOptions;
}
export interface UpdateInboxRequest {
inboxId: string;
updateInboxOptions: UpdateInboxOptions;
}
/**
*
*/
export class InboxControllerApi extends runtime.BaseAPI {
/**
* Get a scheduled email job and cancel it. Will fail if status of job is already cancelled, failed, or complete.
* Cancel a scheduled email job
*/
async cancelScheduledJobRaw(
requestParameters: CancelScheduledJobRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<ScheduledJobDto>> {
if (
requestParameters.jobId === null ||
requestParameters.jobId === undefined
) {
throw new runtime.RequiredError(
'jobId',
'Required parameter requestParameters.jobId was null or undefined when calling cancelScheduledJob.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/scheduled-jobs/{jobId}`.replace(
`{${'jobId'}}`,
encodeURIComponent(String(requestParameters.jobId))
),
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
ScheduledJobDtoFromJSON(jsonValue)
);
}
/**
* Get a scheduled email job and cancel it. Will fail if status of job is already cancelled, failed, or complete.
* Cancel a scheduled email job
*/
async cancelScheduledJob(
requestParameters: CancelScheduledJobRequest,
initOverrides?: RequestInit
): Promise<ScheduledJobDto> {
const response = await this.cancelScheduledJobRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Create a new inbox and with a randomized email address to send and receive from. Pass emailAddress parameter if you wish to use a specific email address. Creating an inbox is required before sending or receiving emails. If writing tests it is recommended that you create a new inbox during each test method so that it is unique and empty.
* Create an inbox email address. An inbox has a real email address and can send and receive emails. Inboxes can be either `SMTP` or `HTTP` inboxes.
*/
async createInboxRaw(
requestParameters: CreateInboxRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<InboxDto>> {
const queryParameters: any = {};
if (requestParameters.emailAddress !== undefined) {
queryParameters['emailAddress'] = requestParameters.emailAddress;
}
if (requestParameters.tags) {
queryParameters['tags'] = requestParameters.tags;
}
if (requestParameters.name !== undefined) {
queryParameters['name'] = requestParameters.name;
}
if (requestParameters.description !== undefined) {
queryParameters['description'] = requestParameters.description;
}
if (requestParameters.useDomainPool !== undefined) {
queryParameters['useDomainPool'] = requestParameters.useDomainPool;
}
if (requestParameters.favourite !== undefined) {
queryParameters['favourite'] = requestParameters.favourite;
}
if (requestParameters.expiresAt !== undefined) {
queryParameters['expiresAt'] = (
requestParameters.expiresAt as any
).toISOString();
}
if (requestParameters.expiresIn !== undefined) {
queryParameters['expiresIn'] = requestParameters.expiresIn;
}
if (requestParameters.allowTeamAccess !== undefined) {
queryParameters['allowTeamAccess'] = requestParameters.allowTeamAccess;
}
if (requestParameters.inboxType !== undefined) {
queryParameters['inboxType'] = requestParameters.inboxType;
}
if (requestParameters.virtualInbox !== undefined) {
queryParameters['virtualInbox'] = requestParameters.virtualInbox;
}
if (requestParameters.useShortAddress !== undefined) {
queryParameters['useShortAddress'] = requestParameters.useShortAddress;
}
if (requestParameters.domainId !== undefined) {
queryParameters['domainId'] = requestParameters.domainId;
}
if (requestParameters.domainName !== undefined) {
queryParameters['domainName'] = requestParameters.domainName;
}
if (requestParameters.prefix !== undefined) {
queryParameters['prefix'] = requestParameters.prefix;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
InboxDtoFromJSON(jsonValue)
);
}
/**
* Create a new inbox and with a randomized email address to send and receive from. Pass emailAddress parameter if you wish to use a specific email address. Creating an inbox is required before sending or receiving emails. If writing tests it is recommended that you create a new inbox during each test method so that it is unique and empty.
* Create an inbox email address. An inbox has a real email address and can send and receive emails. Inboxes can be either `SMTP` or `HTTP` inboxes.
*/
async createInbox(
requestParameters: CreateInboxRequest,
initOverrides?: RequestInit
): Promise<InboxDto> {
const response = await this.createInboxRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving
* Create an inbox ruleset
*/
async createInboxRulesetRaw(
requestParameters: CreateInboxRulesetRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<InboxRulesetDto>> {
if (
requestParameters.inboxId === null ||
requestParameters.inboxId === undefined
) {
throw new runtime.RequiredError(
'inboxId',
'Required parameter requestParameters.inboxId was null or undefined when calling createInboxRuleset.'
);
}
if (
requestParameters.createInboxRulesetOptions === null ||
requestParameters.createInboxRulesetOptions === undefined
) {
throw new runtime.RequiredError(
'createInboxRulesetOptions',
'Required parameter requestParameters.createInboxRulesetOptions was null or undefined when calling createInboxRuleset.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/{inboxId}/rulesets`.replace(
`{${'inboxId'}}`,
encodeURIComponent(String(requestParameters.inboxId))
),
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: CreateInboxRulesetOptionsToJSON(
requestParameters.createInboxRulesetOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
InboxRulesetDtoFromJSON(jsonValue)
);
}
/**
* Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving
* Create an inbox ruleset
*/
async createInboxRuleset(
requestParameters: CreateInboxRulesetRequest,
initOverrides?: RequestInit
): Promise<InboxRulesetDto> {
const response = await this.createInboxRulesetRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Create an inbox with default options. Uses MailSlurp domain pool address and is private.
*/
async createInboxWithDefaultsRaw(
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<InboxDto>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/withDefaults`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
InboxDtoFromJSON(jsonValue)
);
}
/**
* Create an inbox with default options. Uses MailSlurp domain pool address and is private.
*/
async createInboxWithDefaults(
initOverrides?: RequestInit
): Promise<InboxDto> {
const response = await this.createInboxWithDefaultsRaw(initOverrides);
return await response.value();
}
/**
* Additional endpoint that allows inbox creation with request body options. Can be more flexible that other methods for some clients.
* Create an inbox with options. Extended options for inbox creation.
*/
async createInboxWithOptionsRaw(
requestParameters: CreateInboxWithOptionsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<InboxDto>> {
if (
requestParameters.createInboxDto === null ||
requestParameters.createInboxDto === undefined
) {
throw new runtime.RequiredError(
'createInboxDto',
'Required parameter requestParameters.createInboxDto was null or undefined when calling createInboxWithOptions.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/withOptions`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: CreateInboxDtoToJSON(requestParameters.createInboxDto),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
InboxDtoFromJSON(jsonValue)
);
}
/**
* Additional endpoint that allows inbox creation with request body options. Can be more flexible that other methods for some clients.
* Create an inbox with options. Extended options for inbox creation.
*/
async createInboxWithOptions(
requestParameters: CreateInboxWithOptionsRequest,
initOverrides?: RequestInit
): Promise<InboxDto> {
const response = await this.createInboxWithOptionsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Deletes all emails in an inbox. Be careful as emails cannot be recovered
* Delete all emails in a given inboxes.
*/
async deleteAllInboxEmailsRaw(
requestParameters: DeleteAllInboxEmailsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
if (
requestParameters.inboxId === null ||
requestParameters.inboxId === undefined
) {
throw new runtime.RequiredError(
'inboxId',
'Required parameter requestParameters.inboxId was null or undefined when calling deleteAllInboxEmails.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/{inboxId}/deleteAllInboxEmails`.replace(
`{${'inboxId'}}`,
encodeURIComponent(String(requestParameters.inboxId))
),
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Deletes all emails in an inbox. Be careful as emails cannot be recovered
* Delete all emails in a given inboxes.
*/
async deleteAllInboxEmails(
requestParameters: DeleteAllInboxEmailsRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.deleteAllInboxEmailsRaw(requestParameters, initOverrides);
}
/**
* Permanently delete all inboxes and associated email addresses. This will also delete all emails within the inboxes. Be careful as inboxes cannot be recovered once deleted. Note: deleting inboxes will not impact your usage limits. Monthly inbox creation limits are based on how many inboxes were created in the last 30 days, not how many inboxes you currently have.
* Delete all inboxes
*/
async deleteAllInboxesRaw(
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes`,
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Permanently delete all inboxes and associated email addresses. This will also delete all emails within the inboxes. Be careful as inboxes cannot be recovered once deleted. Note: deleting inboxes will not impact your usage limits. Monthly inbox creation limits are based on how many inboxes were created in the last 30 days, not how many inboxes you currently have.
* Delete all inboxes
*/
async deleteAllInboxes(initOverrides?: RequestInit): Promise<void> {
await this.deleteAllInboxesRaw(initOverrides);
}
/**
* Permanently delete all inboxes by description
* Delete inboxes by description
*/
async deleteAllInboxesByDescriptionRaw(
requestParameters: DeleteAllInboxesByDescriptionRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
if (
requestParameters.description === null ||
requestParameters.description === undefined
) {
throw new runtime.RequiredError(
'description',
'Required parameter requestParameters.description was null or undefined when calling deleteAllInboxesByDescription.'
);
}
const queryParameters: any = {};
if (requestParameters.description !== undefined) {
queryParameters['description'] = requestParameters.description;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/by-description`,
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Permanently delete all inboxes by description
* Delete inboxes by description
*/
async deleteAllInboxesByDescription(
requestParameters: DeleteAllInboxesByDescriptionRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.deleteAllInboxesByDescriptionRaw(
requestParameters,
initOverrides
);
}
/**
* Permanently delete all inboxes by name
* Delete inboxes by name
*/
async deleteAllInboxesByNameRaw(
requestParameters: DeleteAllInboxesByNameRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
if (
requestParameters.name === null ||
requestParameters.name === undefined
) {
throw new runtime.RequiredError(
'name',
'Required parameter requestParameters.name was null or undefined when calling deleteAllInboxesByName.'
);
}
const queryParameters: any = {};
if (requestParameters.name !== undefined) {
queryParameters['name'] = requestParameters.name;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/by-name`,
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Permanently delete all inboxes by name
* Delete inboxes by name
*/
async deleteAllInboxesByName(
requestParameters: DeleteAllInboxesByNameRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.deleteAllInboxesByNameRaw(requestParameters, initOverrides);
}
/**
* Permanently delete all inboxes by tag
* Delete inboxes by tag
*/
async deleteAllInboxesByTagRaw(
requestParameters: DeleteAllInboxesByTagRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
if (requestParameters.tag === null || requestParameters.tag === undefined) {
throw new runtime.RequiredError(
'tag',
'Required parameter requestParameters.tag was null or undefined when calling deleteAllInboxesByTag.'
);
}
const queryParameters: any = {};
if (requestParameters.tag !== undefined) {
queryParameters['tag'] = requestParameters.tag;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/by-tag`,
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Permanently delete all inboxes by tag
* Delete inboxes by tag
*/
async deleteAllInboxesByTag(
requestParameters: DeleteAllInboxesByTagRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.deleteAllInboxesByTagRaw(requestParameters, initOverrides);
}
/**
* Permanently delete an inbox and associated email address as well as all emails within the given inbox. This action cannot be undone. Note: deleting an inbox will not affect your account usage. Monthly inbox usage is based on how many inboxes you create within 30 days, not how many exist at time of request.
* Delete inbox
*/
async deleteInboxRaw(
requestParameters: DeleteInboxRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
if (
requestParameters.inboxId === null ||
requestParameters.inboxId === undefined
) {
throw new runtime.RequiredError(
'inboxId',
'Required parameter requestParameters.inboxId was null or undefined when calling deleteInbox.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/{inboxId}`.replace(
`{${'inboxId'}}`,
encodeURIComponent(String(requestParameters.inboxId))
),
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Permanently delete an inbox and associated email address as well as all emails within the given inbox. This action cannot be undone. Note: deleting an inbox will not affect your account usage. Monthly inbox usage is based on how many inboxes you create within 30 days, not how many exist at time of request.
* Delete inbox
*/
async deleteInbox(
requestParameters: DeleteInboxRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.deleteInboxRaw(requestParameters, initOverrides);
}
/**
* Check if inboxes exist by email address. Useful if you are sending emails to mailslurp addresses
* Does inbox exist
*/
async doesInboxExistRaw(
requestParameters: DoesInboxExistRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<InboxExistsDto>> {
if (
requestParameters.emailAddress === null ||
requestParameters.emailAddress === undefined
) {
throw new runtime.RequiredError(
'emailAddress',
'Required parameter requestParameters.emailAddress was null or undefined when calling doesInboxExist.'
);
}
const queryParameters: any = {};
if (requestParameters.emailAddress !== undefined) {
queryParameters['emailAddress'] = requestParameters.emailAddress;
}
if (requestParameters.allowCatchAll !== undefined) {
queryParameters['allowCatchAll'] = requestParameters.allowCatchAll;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/exists`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
InboxExistsDtoFromJSON(jsonValue)
);
}
/**
* Check if inboxes exist by email address. Useful if you are sending emails to mailslurp addresses
* Does inbox exist
*/
async doesInboxExist(
requestParameters: DoesInboxExistRequest,
initOverrides?: RequestInit
): Promise<InboxExistsDto> {
const response = await this.doesInboxExistRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Remove any expired inboxes for your account (instead of waiting for scheduled removal on server)
* Remove expired inboxes
*/
async flushExpiredRaw(
requestParameters: FlushExpiredRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<FlushExpiredInboxesResult>> {
const queryParameters: any = {};
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/expired`,
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
FlushExpiredInboxesResultFromJSON(jsonValue)
);
}
/**
* Remove any expired inboxes for your account (instead of waiting for scheduled removal on server)
* Remove expired inboxes
*/
async flushExpired(
requestParameters: FlushExpiredRequest,
initOverrides?: RequestInit
): Promise<FlushExpiredInboxesResult> {
const response = await this.flushExpiredRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* List inboxes in paginated form. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative `getInboxes` method returns a full list of inboxes but is limited to 100 results.
* List All Inboxes Paginated
*/
async getAllInboxesRaw(
requestParameters: GetAllInboxesRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageInboxProjection>> {
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.favourite !== undefined) {
queryParameters['favourite'] = requestParameters.favourite;
}
if (requestParameters.search !== undefined) {
queryParameters['search'] = requestParameters.search;
}
if (requestParameters.tag !== undefined) {
queryParameters['tag'] = requestParameters.tag;
}
if (requestParameters.teamAccess !== undefined) {
queryParameters['teamAccess'] = requestParameters.teamAccess;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
if (requestParameters.inboxType !== undefined) {
queryParameters['inboxType'] = requestParameters.inboxType;
}
if (requestParameters.inboxFunction !== undefined) {
queryParameters['inboxFunction'] = requestParameters.inboxFunction;
}
if (requestParameters.domainId !== undefined) {
queryParameters['domainId'] = requestParameters.domainId;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/paginated`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageInboxProjectionFromJSON(jsonValue)
);
}
/**
* List inboxes in paginated form. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative `getInboxes` method returns a full list of inboxes but is limited to 100 results.
* List All Inboxes Paginated
*/
async getAllInboxes(
requestParameters: GetAllInboxesRequest,
initOverrides?: RequestInit
): Promise<PageInboxProjection> {
const response = await this.getAllInboxesRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* List inboxes in paginated form. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative `getInboxes` method returns a full list of inboxes but is limited to 100 results.
* List All Inboxes Offset Paginated
*/
async getAllInboxesOffsetPaginatedRaw(
requestParameters: GetAllInboxesOffsetPaginatedRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageInboxProjection>> {
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.favourite !== undefined) {
queryParameters['favourite'] = requestParameters.favourite;
}
if (requestParameters.search !== undefined) {
queryParameters['search'] = requestParameters.search;
}
if (requestParameters.tag !== undefined) {
queryParameters['tag'] = requestParameters.tag;
}
if (requestParameters.teamAccess !== undefined) {
queryParameters['teamAccess'] = requestParameters.teamAccess;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
if (requestParameters.inboxType !== undefined) {
queryParameters['inboxType'] = requestParameters.inboxType;
}
if (requestParameters.inboxFunction !== undefined) {
queryParameters['inboxFunction'] = requestParameters.inboxFunction;
}
if (requestParameters.domainId !== undefined) {
queryParameters['domainId'] = requestParameters.domainId;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/offset-paginated`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageInboxProjectionFromJSON(jsonValue)
);
}
/**
* List inboxes in paginated form. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative `getInboxes` method returns a full list of inboxes but is limited to 100 results.
* List All Inboxes Offset Paginated
*/
async getAllInboxesOffsetPaginated(
requestParameters: GetAllInboxesOffsetPaginatedRequest,
initOverrides?: RequestInit
): Promise<PageInboxProjection> {
const response = await this.getAllInboxesOffsetPaginatedRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Schedule sending of emails using scheduled jobs. These can be inbox or account level.
* Get all scheduled email sending jobs for account
*/
async getAllScheduledJobsRaw(
requestParameters: GetAllScheduledJobsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageScheduledJobs>> {
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/scheduled-jobs`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageScheduledJobsFromJSON(jsonValue)
);
}
/**
* Schedule sending of emails using scheduled jobs. These can be inbox or account level.
* Get all scheduled email sending jobs for account
*/
async getAllScheduledJobs(
requestParameters: GetAllScheduledJobsRequest,
initOverrides?: RequestInit
): Promise<PageScheduledJobs> {
const response = await this.getAllScheduledJobsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get all email delivery statuses for an inbox
*/
async getDeliveryStatusesByInboxIdRaw(
requestParameters: GetDeliveryStatusesByInboxIdRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageDeliveryStatus>> {
if (
requestParameters.inboxId === null ||
requestParameters.inboxId === undefined
) {
throw new runtime.RequiredError(
'inboxId',
'Required parameter requestParameters.inboxId was null or undefined when calling getDeliveryStatusesByInboxId.'
);
}
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/{inboxId}/delivery-status`.replace(
`{${'inboxId'}}`,
encodeURIComponent(String(requestParameters.inboxId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageDeliveryStatusFromJSON(jsonValue)
);
}
/**
* Get all email delivery statuses for an inbox
*/
async getDeliveryStatusesByInboxId(
requestParameters: GetDeliveryStatusesByInboxIdRequest,
initOverrides?: RequestInit
): Promise<PageDeliveryStatus> {
const response = await this.getDeliveryStatusesByInboxIdRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* List emails that an inbox has received. Only emails that are sent to the inbox\'s email address will appear in the inbox. It may take several seconds for any email you send to an inbox\'s email address to appear in the inbox. To make this endpoint wait for a minimum number of emails use the `minCount` parameter. The server will retry the inbox database until the `minCount` is satisfied or the `retryTimeout` is reached
* Get emails in an Inbox. This method is not idempotent as it allows retries and waits if you want certain conditions to be met before returning. For simple listing and sorting of known emails use the email controller instead.
*/
async getEmailsRaw(
requestParameters: GetEmailsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<Array<EmailPreview>>> {
if (
requestParameters.inboxId === null ||
requestParameters.inboxId === undefined
) {
throw new runtime.RequiredError(
'inboxId',
'Required parameter requestParameters.inboxId was null or undefined when calling getEmails.'
);
}
const queryParameters: any = {};
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.limit !== undefined) {
queryParameters['limit'] = requestParameters.limit;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.retryTimeout !== undefined) {
queryParameters['retryTimeout'] = requestParameters.retryTimeout;
}
if (requestParameters.delayTimeout !== undefined) {
queryParameters['delayTimeout'] = requestParameters.delayTimeout;
}
if (requestParameters.minCount !== undefined) {
queryParameters['minCount'] = requestParameters.minCount;
}
if (requestParameters.unreadOnly !== undefined) {
queryParameters['unreadOnly'] = requestParameters.unreadOnly;
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/{inboxId}/emails`.replace(
`{${'inboxId'}}`,
encodeURIComponent(String(requestParameters.inboxId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
jsonValue.map(EmailPreviewFromJSON)
);
}
/**
* List emails that an inbox has received. Only emails that are sent to the inbox\'s email address will appear in the inbox. It may take several seconds for any email you send to an inbox\'s email address to appear in the inbox. To make this endpoint wait for a minimum number of emails use the `minCount` parameter. The server will retry the inbox database until the `minCount` is satisfied or the `retryTimeout` is reached
* Get emails in an Inbox. This method is not idempotent as it allows retries and waits if you want certain conditions to be met before returning. For simple listing and sorting of known emails use the email controller instead.
*/
async getEmails(
requestParameters: GetEmailsRequest,
initOverrides?: RequestInit
): Promise<Array<EmailPreview>> {
const response = await this.getEmailsRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Get IMAP access usernames and passwords
*/
async getImapAccessRaw(
requestParameters: GetImapAccessRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<ImapAccessDetails>> {
const queryParameters: any = {};
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/imap-access`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
ImapAccessDetailsFromJSON(jsonValue)
);
}
/**
* Get IMAP access usernames and passwords
*/
async getImapAccess(
requestParameters: GetImapAccessRequest,
initOverrides?: RequestInit
): Promise<ImapAccessDetails> {
const response = await this.getImapAccessRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get IMAP and SMTP access usernames and passwords
*/
async getImapSmtpAccessRaw(
requestParameters: GetImapSmtpAccessRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<ImapSmtpAccessDetails>> {
const queryParameters: any = {};
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/imap-smtp-access`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
ImapSmtpAccessDetailsFromJSON(jsonValue)
);
}
/**
* Get IMAP and SMTP access usernames and passwords
*/
async getImapSmtpAccess(
requestParameters: GetImapSmtpAccessRequest,
initOverrides?: RequestInit
): Promise<ImapSmtpAccessDetails> {
const response = await this.getImapSmtpAccessRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get IMAP and SMTP access details in .env format
*/
async getImapSmtpAccessEnvRaw(
requestParameters: GetImapSmtpAccessEnvRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<string>> {
const queryParameters: any = {};
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/imap-smtp-access/env`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.TextApiResponse(response) as any;
}
/**
* Get IMAP and SMTP access details in .env format
*/
async getImapSmtpAccessEnv(
requestParameters: GetImapSmtpAccessEnvRequest,
initOverrides?: RequestInit
): Promise<string> {
const response = await this.getImapSmtpAccessEnvRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get IMAP and SMTP server hosts
*/
async getImapSmtpAccessServersRaw(
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<ImapSmtpAccessServers>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/imap-smtp-access/servers`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
ImapSmtpAccessServersFromJSON(jsonValue)
);
}
/**
* Get IMAP and SMTP server hosts
*/
async getImapSmtpAccessServers(
initOverrides?: RequestInit
): Promise<ImapSmtpAccessServers> {
const response = await this.getImapSmtpAccessServersRaw(initOverrides);
return await response.value();
}
/**
* Returns an inbox\'s properties, including its email address and ID.
* Get Inbox. Returns properties of an inbox.
*/
async getInboxRaw(
requestParameters: GetInboxRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<InboxDto>> {
if (
requestParameters.inboxId === null ||
requestParameters.inboxId === undefined
) {
throw new runtime.RequiredError(
'inboxId',
'Required parameter requestParameters.inboxId was null or undefined when calling getInbox.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/{inboxId}`.replace(
`{${'inboxId'}}`,
encodeURIComponent(String(requestParameters.inboxId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
InboxDtoFromJSON(jsonValue)
);
}
/**
* Returns an inbox\'s properties, including its email address and ID.
* Get Inbox. Returns properties of an inbox.
*/
async getInbox(
requestParameters: GetInboxRequest,
initOverrides?: RequestInit
): Promise<InboxDto> {
const response = await this.getInboxRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Get a inbox result by email address
* Search for an inbox with the provided email address
*/
async getInboxByEmailAddressRaw(
requestParameters: GetInboxByEmailAddressRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<InboxByEmailAddressResult>> {
if (
requestParameters.emailAddress === null ||
requestParameters.emailAddress === undefined
) {
throw new runtime.RequiredError(
'emailAddress',
'Required parameter requestParameters.emailAddress was null or undefined when calling getInboxByEmailAddress.'
);
}
const queryParameters: any = {};
if (requestParameters.emailAddress !== undefined) {
queryParameters['emailAddress'] = requestParameters.emailAddress;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/byEmailAddress`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
InboxByEmailAddressResultFromJSON(jsonValue)
);
}
/**
* Get a inbox result by email address
* Search for an inbox with the provided email address
*/
async getInboxByEmailAddress(
requestParameters: GetInboxByEmailAddressRequest,
initOverrides?: RequestInit
): Promise<InboxByEmailAddressResult> {
const response = await this.getInboxByEmailAddressRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get a inbox result by name
* Search for an inbox with the given name
*/
async getInboxByNameRaw(
requestParameters: GetInboxByNameRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<InboxByNameResult>> {
if (
requestParameters.name === null ||
requestParameters.name === undefined
) {
throw new runtime.RequiredError(
'name',
'Required parameter requestParameters.name was null or undefined when calling getInboxByName.'
);
}
const queryParameters: any = {};
if (requestParameters.name !== undefined) {
queryParameters['name'] = requestParameters.name;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/byName`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
InboxByNameResultFromJSON(jsonValue)
);
}
/**
* Get a inbox result by name
* Search for an inbox with the given name
*/
async getInboxByName(
requestParameters: GetInboxByNameRequest,
initOverrides?: RequestInit
): Promise<InboxByNameResult> {
const response = await this.getInboxByNameRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get total inbox count
*/
async getInboxCountRaw(
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<CountDto>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/count`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
CountDtoFromJSON(jsonValue)
);
}
/**
* Get total inbox count
*/
async getInboxCount(initOverrides?: RequestInit): Promise<CountDto> {
const response = await this.getInboxCountRaw(initOverrides);
return await response.value();
}
/**
* Get email count in inbox
*/
async getInboxEmailCountRaw(
requestParameters: GetInboxEmailCountRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<CountDto>> {
if (
requestParameters.inboxId === null ||
requestParameters.inboxId === undefined
) {
throw new runtime.RequiredError(
'inboxId',
'Required parameter requestParameters.inboxId was null or undefined when calling getInboxEmailCount.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/{inboxId}/emails/count`.replace(
`{${'inboxId'}}`,
encodeURIComponent(String(requestParameters.inboxId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
CountDtoFromJSON(jsonValue)
);
}
/**
* Get email count in inbox
*/
async getInboxEmailCount(
requestParameters: GetInboxEmailCountRequest,
initOverrides?: RequestInit
): Promise<CountDto> {
const response = await this.getInboxEmailCountRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get a paginated list of emails in an inbox. Does not hold connections open.
* Get inbox emails paginated
*/
async getInboxEmailsPaginatedRaw(
requestParameters: GetInboxEmailsPaginatedRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageEmailPreview>> {
if (
requestParameters.inboxId === null ||
requestParameters.inboxId === undefined
) {
throw new runtime.RequiredError(
'inboxId',
'Required parameter requestParameters.inboxId was null or undefined when calling getInboxEmailsPaginated.'
);
}
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/{inboxId}/emails/paginated`.replace(
`{${'inboxId'}}`,
encodeURIComponent(String(requestParameters.inboxId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageEmailPreviewFromJSON(jsonValue)
);
}
/**
* Get a paginated list of emails in an inbox. Does not hold connections open.
* Get inbox emails paginated
*/
async getInboxEmailsPaginated(
requestParameters: GetInboxEmailsPaginatedRequest,
initOverrides?: RequestInit
): Promise<PageEmailPreview> {
const response = await this.getInboxEmailsPaginatedRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get list of inbox IDs
* Get all inbox IDs
*/
async getInboxIdsRaw(
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<InboxIdsResult>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/ids`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
InboxIdsResultFromJSON(jsonValue)
);
}
/**
* Get list of inbox IDs
* Get all inbox IDs
*/
async getInboxIds(initOverrides?: RequestInit): Promise<InboxIdsResult> {
const response = await this.getInboxIdsRaw(initOverrides);
return await response.value();
}
/**
* Returns an inbox\'s sent email receipts. Call individual sent email endpoints for more details. Note for privacy reasons the full body of sent emails is never stored. An MD5 hash hex is available for comparison instead.
* Get Inbox Sent Emails
*/
async getInboxSentEmailsRaw(
requestParameters: GetInboxSentEmailsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageSentEmailProjection>> {
if (
requestParameters.inboxId === null ||
requestParameters.inboxId === undefined
) {
throw new runtime.RequiredError(
'inboxId',
'Required parameter requestParameters.inboxId was null or undefined when calling getInboxSentEmails.'
);
}
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.searchFilter !== undefined) {
queryParameters['searchFilter'] = requestParameters.searchFilter;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/{inboxId}/sent`.replace(
`{${'inboxId'}}`,
encodeURIComponent(String(requestParameters.inboxId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageSentEmailProjectionFromJSON(jsonValue)
);
}
/**
* Returns an inbox\'s sent email receipts. Call individual sent email endpoints for more details. Note for privacy reasons the full body of sent emails is never stored. An MD5 hash hex is available for comparison instead.
* Get Inbox Sent Emails
*/
async getInboxSentEmails(
requestParameters: GetInboxSentEmailsRequest,
initOverrides?: RequestInit
): Promise<PageSentEmailProjection> {
const response = await this.getInboxSentEmailsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get all inbox tags
* Get inbox tags
*/
async getInboxTagsRaw(
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<Array<string>>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/tags`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse<any>(response);
}
/**
* Get all inbox tags
* Get inbox tags
*/
async getInboxTags(initOverrides?: RequestInit): Promise<Array<string>> {
const response = await this.getInboxTagsRaw(initOverrides);
return await response.value();
}
/**
* List the inboxes you have created. Note use of the more advanced `getAllInboxes` is recommended and allows paginated access using a limit and sort parameter.
* List Inboxes and email addresses
*/
async getInboxesRaw(
requestParameters: GetInboxesRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<Array<InboxDto>>> {
const queryParameters: any = {};
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.excludeCatchAllInboxes !== undefined) {
queryParameters['excludeCatchAllInboxes'] =
requestParameters.excludeCatchAllInboxes;
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
jsonValue.map(InboxDtoFromJSON)
);
}
/**
* List the inboxes you have created. Note use of the more advanced `getAllInboxes` is recommended and allows paginated access using a limit and sort parameter.
* List Inboxes and email addresses
*/
async getInboxes(
requestParameters: GetInboxesRequest,
initOverrides?: RequestInit
): Promise<Array<InboxDto>> {
const response = await this.getInboxesRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Get the newest email in an inbox or wait for one to arrive
* Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet.
*/
async getLatestEmailInInboxRaw(
requestParameters: GetLatestEmailInInboxRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<Email>> {
if (
requestParameters.inboxId === null ||
requestParameters.inboxId === undefined
) {
throw new runtime.RequiredError(
'inboxId',
'Required parameter requestParameters.inboxId was null or undefined when calling getLatestEmailInInbox.'
);
}
if (
requestParameters.timeoutMillis === null ||
requestParameters.timeoutMillis === undefined
) {
throw new runtime.RequiredError(
'timeoutMillis',
'Required parameter requestParameters.timeoutMillis was null or undefined when calling getLatestEmailInInbox.'
);
}
const queryParameters: any = {};
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
if (requestParameters.timeoutMillis !== undefined) {
queryParameters['timeoutMillis'] = requestParameters.timeoutMillis;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/getLatestEmail`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
EmailFromJSON(jsonValue)
);
}
/**
* Get the newest email in an inbox or wait for one to arrive
* Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet.
*/
async getLatestEmailInInbox(
requestParameters: GetLatestEmailInInboxRequest,
initOverrides?: RequestInit
): Promise<Email> {
const response = await this.getLatestEmailInInboxRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* List organization inboxes in paginated form. These are inboxes created with `allowTeamAccess` flag enabled. Organization inboxes are `readOnly` for non-admin users. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time).
* List Organization Inboxes Paginated
*/
async getOrganizationInboxesRaw(
requestParameters: GetOrganizationInboxesRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageOrganizationInboxProjection>> {
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.searchFilter !== undefined) {
queryParameters['searchFilter'] = requestParameters.searchFilter;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/organization`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageOrganizationInboxProjectionFromJSON(jsonValue)
);
}
/**
* List organization inboxes in paginated form. These are inboxes created with `allowTeamAccess` flag enabled. Organization inboxes are `readOnly` for non-admin users. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time).
* List Organization Inboxes Paginated
*/
async getOrganizationInboxes(
requestParameters: GetOrganizationInboxesRequest,
initOverrides?: RequestInit
): Promise<PageOrganizationInboxProjection> {
const response = await this.getOrganizationInboxesRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get a scheduled email job details.
* Get a scheduled email job
*/
async getScheduledJobRaw(
requestParameters: GetScheduledJobRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<ScheduledJobDto>> {
if (
requestParameters.jobId === null ||
requestParameters.jobId === undefined
) {
throw new runtime.RequiredError(
'jobId',
'Required parameter requestParameters.jobId was null or undefined when calling getScheduledJob.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/scheduled-jobs/{jobId}`.replace(
`{${'jobId'}}`,
encodeURIComponent(String(requestParameters.jobId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
ScheduledJobDtoFromJSON(jsonValue)
);
}
/**
* Get a scheduled email job details.
* Get a scheduled email job
*/
async getScheduledJob(
requestParameters: GetScheduledJobRequest,
initOverrides?: RequestInit
): Promise<ScheduledJobDto> {
const response = await this.getScheduledJobRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Schedule sending of emails using scheduled jobs.
* Get all scheduled email sending jobs for the inbox
*/
async getScheduledJobsByInboxIdRaw(
requestParameters: GetScheduledJobsByInboxIdRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageScheduledJobs>> {
if (
requestParameters.inboxId === null ||
requestParameters.inboxId === undefined
) {
throw new runtime.RequiredError(
'inboxId',
'Required parameter requestParameters.inboxId was null or undefined when calling getScheduledJobsByInboxId.'
);
}
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/{inboxId}/scheduled-jobs`.replace(
`{${'inboxId'}}`,
encodeURIComponent(String(requestParameters.inboxId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageScheduledJobsFromJSON(jsonValue)
);
}
/**
* Schedule sending of emails using scheduled jobs.
* Get all scheduled email sending jobs for the inbox
*/
async getScheduledJobsByInboxId(
requestParameters: GetScheduledJobsByInboxIdRequest,
initOverrides?: RequestInit
): Promise<PageScheduledJobs> {
const response = await this.getScheduledJobsByInboxIdRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get SMTP access usernames and passwords
*/
async getSmtpAccessRaw(
requestParameters: GetSmtpAccessRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<SmtpAccessDetails>> {
const queryParameters: any = {};
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/smtp-access`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
SmtpAccessDetailsFromJSON(jsonValue)
);
}
/**
* Get SMTP access usernames and passwords
*/
async getSmtpAccess(
requestParameters: GetSmtpAccessRequest,
initOverrides?: RequestInit
): Promise<SmtpAccessDetails> {
const response = await this.getSmtpAccessRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* List all rulesets attached to an inbox
* List inbox rulesets
*/
async listInboxRulesetsRaw(
requestParameters: ListInboxRulesetsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageInboxRulesetDto>> {
if (
requestParameters.inboxId === null ||
requestParameters.inboxId === undefined
) {
throw new runtime.RequiredError(
'inboxId',
'Required parameter requestParameters.inboxId was null or undefined when calling listInboxRulesets.'
);
}
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.searchFilter !== undefined) {
queryParameters['searchFilter'] = requestParameters.searchFilter;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/{inboxId}/rulesets`.replace(
`{${'inboxId'}}`,
encodeURIComponent(String(requestParameters.inboxId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageInboxRulesetDtoFromJSON(jsonValue)
);
}
/**
* List all rulesets attached to an inbox
* List inbox rulesets
*/
async listInboxRulesets(
requestParameters: ListInboxRulesetsRequest,
initOverrides?: RequestInit
): Promise<PageInboxRulesetDto> {
const response = await this.listInboxRulesetsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* List all tracking pixels sent from an inbox
* List inbox tracking pixels
*/
async listInboxTrackingPixelsRaw(
requestParameters: ListInboxTrackingPixelsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageTrackingPixelProjection>> {
if (
requestParameters.inboxId === null ||
requestParameters.inboxId === undefined
) {
throw new runtime.RequiredError(
'inboxId',
'Required parameter requestParameters.inboxId was null or undefined when calling listInboxTrackingPixels.'
);
}
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.searchFilter !== undefined) {
queryParameters['searchFilter'] = requestParameters.searchFilter;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/{inboxId}/tracking-pixels`.replace(
`{${'inboxId'}}`,
encodeURIComponent(String(requestParameters.inboxId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageTrackingPixelProjectionFromJSON(jsonValue)
);
}
/**
* List all tracking pixels sent from an inbox
* List inbox tracking pixels
*/
async listInboxTrackingPixels(
requestParameters: ListInboxTrackingPixelsRequest,
initOverrides?: RequestInit
): Promise<PageTrackingPixelProjection> {
const response = await this.listInboxTrackingPixelsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Search inboxes and return in paginated form. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative `getInboxes` method returns a full list of inboxes but is limited to 100 results.
* Search all inboxes and return matching inboxes
*/
async searchInboxesRaw(
requestParameters: SearchInboxesRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageInboxProjection>> {
if (
requestParameters.searchInboxesOptions === null ||
requestParameters.searchInboxesOptions === undefined
) {
throw new runtime.RequiredError(
'searchInboxesOptions',
'Required parameter requestParameters.searchInboxesOptions was null or undefined when calling searchInboxes.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/search`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: SearchInboxesOptionsToJSON(
requestParameters.searchInboxesOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageInboxProjectionFromJSON(jsonValue)
);
}
/**
* Search inboxes and return in paginated form. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative `getInboxes` method returns a full list of inboxes but is limited to 100 results.
* Search all inboxes and return matching inboxes
*/
async searchInboxes(
requestParameters: SearchInboxesRequest,
initOverrides?: RequestInit
): Promise<PageInboxProjection> {
const response = await this.searchInboxesRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Send an email from an inbox\'s email address. The request body should contain the `SendEmailOptions` that include recipients, attachments, body etc. See `SendEmailOptions` for all available properties. Note the `inboxId` refers to the inbox\'s id not the inbox\'s email address. See https://www.mailslurp.com/guides/ for more information on how to send emails. This method does not return a sent email entity due to legacy reasons. To send and get a sent email as returned response use the sister method `sendEmailAndConfirm`.
* Send Email
*/
async sendEmailRaw(
requestParameters: SendEmailRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
if (
requestParameters.inboxId === null ||
requestParameters.inboxId === undefined
) {
throw new runtime.RequiredError(
'inboxId',
'Required parameter requestParameters.inboxId was null or undefined when calling sendEmail.'
);
}
if (
requestParameters.sendEmailOptions === null ||
requestParameters.sendEmailOptions === undefined
) {
throw new runtime.RequiredError(
'sendEmailOptions',
'Required parameter requestParameters.sendEmailOptions was null or undefined when calling sendEmail.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/{inboxId}`.replace(
`{${'inboxId'}}`,
encodeURIComponent(String(requestParameters.inboxId))
),
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: SendEmailOptionsToJSON(requestParameters.sendEmailOptions),
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Send an email from an inbox\'s email address. The request body should contain the `SendEmailOptions` that include recipients, attachments, body etc. See `SendEmailOptions` for all available properties. Note the `inboxId` refers to the inbox\'s id not the inbox\'s email address. See https://www.mailslurp.com/guides/ for more information on how to send emails. This method does not return a sent email entity due to legacy reasons. To send and get a sent email as returned response use the sister method `sendEmailAndConfirm`.
* Send Email
*/
async sendEmail(
requestParameters: SendEmailRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.sendEmailRaw(requestParameters, initOverrides);
}
/**
* Sister method for standard `sendEmail` method with the benefit of returning a `SentEmail` entity confirming the successful sending of the email with a link to the sent object created for it.
* Send email and return sent confirmation
*/
async sendEmailAndConfirmRaw(
requestParameters: SendEmailAndConfirmRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<SentEmailDto>> {
if (
requestParameters.inboxId === null ||
requestParameters.inboxId === undefined
) {
throw new runtime.RequiredError(
'inboxId',
'Required parameter requestParameters.inboxId was null or undefined when calling sendEmailAndConfirm.'
);
}
if (
requestParameters.sendEmailOptions === null ||
requestParameters.sendEmailOptions === undefined
) {
throw new runtime.RequiredError(
'sendEmailOptions',
'Required parameter requestParameters.sendEmailOptions was null or undefined when calling sendEmailAndConfirm.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/{inboxId}/confirm`.replace(
`{${'inboxId'}}`,
encodeURIComponent(String(requestParameters.inboxId))
),
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: SendEmailOptionsToJSON(requestParameters.sendEmailOptions),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
SentEmailDtoFromJSON(jsonValue)
);
}
/**
* Sister method for standard `sendEmail` method with the benefit of returning a `SentEmail` entity confirming the successful sending of the email with a link to the sent object created for it.
* Send email and return sent confirmation
*/
async sendEmailAndConfirm(
requestParameters: SendEmailAndConfirmRequest,
initOverrides?: RequestInit
): Promise<SentEmailDto> {
const response = await this.sendEmailAndConfirmRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Send an email using a queue. Will place the email onto a queue that will then be processed and sent. Use this queue method to enable any failed email sending to be recovered. This will prevent lost emails when sending if your account encounters a block or payment issue.
* Send email with queue
*/
async sendEmailWithQueueRaw(
requestParameters: SendEmailWithQueueRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
if (
requestParameters.inboxId === null ||
requestParameters.inboxId === undefined
) {
throw new runtime.RequiredError(
'inboxId',
'Required parameter requestParameters.inboxId was null or undefined when calling sendEmailWithQueue.'
);
}
if (
requestParameters.validateBeforeEnqueue === null ||
requestParameters.validateBeforeEnqueue === undefined
) {
throw new runtime.RequiredError(
'validateBeforeEnqueue',
'Required parameter requestParameters.validateBeforeEnqueue was null or undefined when calling sendEmailWithQueue.'
);
}
if (
requestParameters.sendEmailOptions === null ||
requestParameters.sendEmailOptions === undefined
) {
throw new runtime.RequiredError(
'sendEmailOptions',
'Required parameter requestParameters.sendEmailOptions was null or undefined when calling sendEmailWithQueue.'
);
}
const queryParameters: any = {};
if (requestParameters.validateBeforeEnqueue !== undefined) {
queryParameters['validateBeforeEnqueue'] =
requestParameters.validateBeforeEnqueue;
}
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/{inboxId}/with-queue`.replace(
`{${'inboxId'}}`,
encodeURIComponent(String(requestParameters.inboxId))
),
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: SendEmailOptionsToJSON(requestParameters.sendEmailOptions),
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Send an email using a queue. Will place the email onto a queue that will then be processed and sent. Use this queue method to enable any failed email sending to be recovered. This will prevent lost emails when sending if your account encounters a block or payment issue.
* Send email with queue
*/
async sendEmailWithQueue(
requestParameters: SendEmailWithQueueRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.sendEmailWithQueueRaw(requestParameters, initOverrides);
}
/**
* Send email using an SMTP envelope containing RCPT TO, MAIL FROM, and a SMTP BODY.
* Send email using an SMTP mail envelope and message body and return sent confirmation
*/
async sendSmtpEnvelopeRaw(
requestParameters: SendSmtpEnvelopeRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<SentEmailDto>> {
if (
requestParameters.inboxId === null ||
requestParameters.inboxId === undefined
) {
throw new runtime.RequiredError(
'inboxId',
'Required parameter requestParameters.inboxId was null or undefined when calling sendSmtpEnvelope.'
);
}
if (
requestParameters.sendSMTPEnvelopeOptions === null ||
requestParameters.sendSMTPEnvelopeOptions === undefined
) {
throw new runtime.RequiredError(
'sendSMTPEnvelopeOptions',
'Required parameter requestParameters.sendSMTPEnvelopeOptions was null or undefined when calling sendSmtpEnvelope.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/{inboxId}/smtp-envelope`.replace(
`{${'inboxId'}}`,
encodeURIComponent(String(requestParameters.inboxId))
),
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: SendSMTPEnvelopeOptionsToJSON(
requestParameters.sendSMTPEnvelopeOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
SentEmailDtoFromJSON(jsonValue)
);
}
/**
* Send email using an SMTP envelope containing RCPT TO, MAIL FROM, and a SMTP BODY.
* Send email using an SMTP mail envelope and message body and return sent confirmation
*/
async sendSmtpEnvelope(
requestParameters: SendSmtpEnvelopeRequest,
initOverrides?: RequestInit
): Promise<SentEmailDto> {
const response = await this.sendSmtpEnvelopeRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Send an inbox a test email to test email receiving is working
* Send a test email to inbox
*/
async sendTestEmailRaw(
requestParameters: SendTestEmailRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
if (
requestParameters.inboxId === null ||
requestParameters.inboxId === undefined
) {
throw new runtime.RequiredError(
'inboxId',
'Required parameter requestParameters.inboxId was null or undefined when calling sendTestEmail.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/{inboxId}/send-test-email`.replace(
`{${'inboxId'}}`,
encodeURIComponent(String(requestParameters.inboxId))
),
method: 'POST',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Send an inbox a test email to test email receiving is working
* Send a test email to inbox
*/
async sendTestEmail(
requestParameters: SendTestEmailRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.sendTestEmailRaw(requestParameters, initOverrides);
}
/**
* Send an email using a delay. Will place the email onto a scheduler that will then be processed and sent. Use delays to schedule email sending.
* Send email with with delay or schedule
*/
async sendWithScheduleRaw(
requestParameters: SendWithScheduleRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<ScheduledJobDto>> {
if (
requestParameters.inboxId === null ||
requestParameters.inboxId === undefined
) {
throw new runtime.RequiredError(
'inboxId',
'Required parameter requestParameters.inboxId was null or undefined when calling sendWithSchedule.'
);
}
if (
requestParameters.sendEmailOptions === null ||
requestParameters.sendEmailOptions === undefined
) {
throw new runtime.RequiredError(
'sendEmailOptions',
'Required parameter requestParameters.sendEmailOptions was null or undefined when calling sendWithSchedule.'
);
}
const queryParameters: any = {};
if (requestParameters.sendAtTimestamp !== undefined) {
queryParameters['sendAtTimestamp'] = (
requestParameters.sendAtTimestamp as any
).toISOString();
}
if (requestParameters.sendAtNowPlusSeconds !== undefined) {
queryParameters['sendAtNowPlusSeconds'] =
requestParameters.sendAtNowPlusSeconds;
}
if (requestParameters.validateBeforeEnqueue !== undefined) {
queryParameters['validateBeforeEnqueue'] =
requestParameters.validateBeforeEnqueue;
}
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/{inboxId}/with-schedule`.replace(
`{${'inboxId'}}`,
encodeURIComponent(String(requestParameters.inboxId))
),
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: SendEmailOptionsToJSON(requestParameters.sendEmailOptions),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
ScheduledJobDtoFromJSON(jsonValue)
);
}
/**
* Send an email using a delay. Will place the email onto a scheduler that will then be processed and sent. Use delays to schedule email sending.
* Send email with with delay or schedule
*/
async sendWithSchedule(
requestParameters: SendWithScheduleRequest,
initOverrides?: RequestInit
): Promise<ScheduledJobDto> {
const response = await this.sendWithScheduleRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Set and return new favourite state for an inbox
* Set inbox favourited state
*/
async setInboxFavouritedRaw(
requestParameters: SetInboxFavouritedRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<InboxDto>> {
if (
requestParameters.inboxId === null ||
requestParameters.inboxId === undefined
) {
throw new runtime.RequiredError(
'inboxId',
'Required parameter requestParameters.inboxId was null or undefined when calling setInboxFavourited.'
);
}
if (
requestParameters.setInboxFavouritedOptions === null ||
requestParameters.setInboxFavouritedOptions === undefined
) {
throw new runtime.RequiredError(
'setInboxFavouritedOptions',
'Required parameter requestParameters.setInboxFavouritedOptions was null or undefined when calling setInboxFavourited.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/{inboxId}/favourite`.replace(
`{${'inboxId'}}`,
encodeURIComponent(String(requestParameters.inboxId))
),
method: 'PUT',
headers: headerParameters,
query: queryParameters,
body: SetInboxFavouritedOptionsToJSON(
requestParameters.setInboxFavouritedOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
InboxDtoFromJSON(jsonValue)
);
}
/**
* Set and return new favourite state for an inbox
* Set inbox favourited state
*/
async setInboxFavourited(
requestParameters: SetInboxFavouritedRequest,
initOverrides?: RequestInit
): Promise<InboxDto> {
const response = await this.setInboxFavouritedRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Update editable fields on an inbox
* Update Inbox. Change name and description. Email address is not editable.
*/
async updateInboxRaw(
requestParameters: UpdateInboxRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<InboxDto>> {
if (
requestParameters.inboxId === null ||
requestParameters.inboxId === undefined
) {
throw new runtime.RequiredError(
'inboxId',
'Required parameter requestParameters.inboxId was null or undefined when calling updateInbox.'
);
}
if (
requestParameters.updateInboxOptions === null ||
requestParameters.updateInboxOptions === undefined
) {
throw new runtime.RequiredError(
'updateInboxOptions',
'Required parameter requestParameters.updateInboxOptions was null or undefined when calling updateInbox.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/inboxes/{inboxId}`.replace(
`{${'inboxId'}}`,
encodeURIComponent(String(requestParameters.inboxId))
),
method: 'PATCH',
headers: headerParameters,
query: queryParameters,
body: UpdateInboxOptionsToJSON(requestParameters.updateInboxOptions),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
InboxDtoFromJSON(jsonValue)
);
}
/**
* Update editable fields on an inbox
* Update Inbox. Change name and description. Email address is not editable.
*/
async updateInbox(
requestParameters: UpdateInboxRequest,
initOverrides?: RequestInit
): Promise<InboxDto> {
const response = await this.updateInboxRaw(
requestParameters,
initOverrides
);
return await response.value();
}
}
/**
* @export
* @enum {string}
*/
export enum CreateInboxInboxTypeEnum {
HTTP_INBOX = 'HTTP_INBOX',
SMTP_INBOX = 'SMTP_INBOX',
}
/**
* @export
* @enum {string}
*/
export enum GetAllInboxesSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum GetAllInboxesInboxTypeEnum {
HTTP_INBOX = 'HTTP_INBOX',
SMTP_INBOX = 'SMTP_INBOX',
}
/**
* @export
* @enum {string}
*/
export enum GetAllInboxesInboxFunctionEnum {
ALIAS = 'ALIAS',
THREAD = 'THREAD',
CATCH_ALL = 'CATCH_ALL',
CONNECTOR = 'CONNECTOR',
}
/**
* @export
* @enum {string}
*/
export enum GetAllInboxesOffsetPaginatedSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum GetAllInboxesOffsetPaginatedInboxTypeEnum {
HTTP_INBOX = 'HTTP_INBOX',
SMTP_INBOX = 'SMTP_INBOX',
}
/**
* @export
* @enum {string}
*/
export enum GetAllInboxesOffsetPaginatedInboxFunctionEnum {
ALIAS = 'ALIAS',
THREAD = 'THREAD',
CATCH_ALL = 'CATCH_ALL',
CONNECTOR = 'CONNECTOR',
}
/**
* @export
* @enum {string}
*/
export enum GetAllScheduledJobsSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum GetDeliveryStatusesByInboxIdSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum GetEmailsSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum GetInboxEmailsPaginatedSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum GetInboxSentEmailsSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum GetInboxesSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum GetOrganizationInboxesSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum GetScheduledJobsByInboxIdSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum ListInboxRulesetsSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum ListInboxTrackingPixelsSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/* 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 * as runtime from '../runtime';
import {
ImapServerFetchResult,
ImapServerFetchResultFromJSON,
ImapServerFetchResultToJSON,
ImapServerGetResult,
ImapServerGetResultFromJSON,
ImapServerGetResultToJSON,
ImapServerListOptions,
ImapServerListOptionsFromJSON,
ImapServerListOptionsToJSON,
ImapServerListResult,
ImapServerListResultFromJSON,
ImapServerListResultToJSON,
ImapServerSearchOptions,
ImapServerSearchOptionsFromJSON,
ImapServerSearchOptionsToJSON,
ImapServerSearchResult,
ImapServerSearchResultFromJSON,
ImapServerSearchResultToJSON,
ImapServerStatusOptions,
ImapServerStatusOptionsFromJSON,
ImapServerStatusOptionsToJSON,
ImapServerStatusResult,
ImapServerStatusResultFromJSON,
ImapServerStatusResultToJSON,
ImapUpdateFlagsOptions,
ImapUpdateFlagsOptionsFromJSON,
ImapUpdateFlagsOptionsToJSON,
} from '../models';
export interface ImapServerFetchRequest {
seqNum: number;
inboxId?: string;
}
export interface ImapServerGetRequest {
emailId: string;
inboxId?: string;
}
export interface ImapServerListRequest {
imapServerListOptions: ImapServerListOptions;
inboxId?: string;
}
export interface ImapServerSearchRequest {
imapServerSearchOptions: ImapServerSearchOptions;
inboxId?: string;
}
export interface ImapServerStatusRequest {
imapServerStatusOptions: ImapServerStatusOptions;
inboxId?: string;
}
export interface ImapServerUpdateFlagsRequest {
imapUpdateFlagsOptions: ImapUpdateFlagsOptions;
inboxId?: string;
}
/**
*
*/
export class ImapControllerApi extends runtime.BaseAPI {
/**
* Fetch message in an inbox
*/
async imapServerFetchRaw(
requestParameters: ImapServerFetchRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<ImapServerFetchResult>> {
if (
requestParameters.seqNum === null ||
requestParameters.seqNum === undefined
) {
throw new runtime.RequiredError(
'seqNum',
'Required parameter requestParameters.seqNum was null or undefined when calling imapServerFetch.'
);
}
const queryParameters: any = {};
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
if (requestParameters.seqNum !== undefined) {
queryParameters['seqNum'] = requestParameters.seqNum;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/imap/server/fetch`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
ImapServerFetchResultFromJSON(jsonValue)
);
}
/**
* Fetch message in an inbox
*/
async imapServerFetch(
requestParameters: ImapServerFetchRequest,
initOverrides?: RequestInit
): Promise<ImapServerFetchResult> {
const response = await this.imapServerFetchRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get a message by email ID
*/
async imapServerGetRaw(
requestParameters: ImapServerGetRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<ImapServerGetResult>> {
if (
requestParameters.emailId === null ||
requestParameters.emailId === undefined
) {
throw new runtime.RequiredError(
'emailId',
'Required parameter requestParameters.emailId was null or undefined when calling imapServerGet.'
);
}
const queryParameters: any = {};
if (requestParameters.emailId !== undefined) {
queryParameters['emailId'] = requestParameters.emailId;
}
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/imap/server/get`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
ImapServerGetResultFromJSON(jsonValue)
);
}
/**
* Get a message by email ID
*/
async imapServerGet(
requestParameters: ImapServerGetRequest,
initOverrides?: RequestInit
): Promise<ImapServerGetResult> {
const response = await this.imapServerGetRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* List messages in an inbox
*/
async imapServerListRaw(
requestParameters: ImapServerListRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<ImapServerListResult>> {
if (
requestParameters.imapServerListOptions === null ||
requestParameters.imapServerListOptions === undefined
) {
throw new runtime.RequiredError(
'imapServerListOptions',
'Required parameter requestParameters.imapServerListOptions was null or undefined when calling imapServerList.'
);
}
const queryParameters: any = {};
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/imap/server/list`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: ImapServerListOptionsToJSON(
requestParameters.imapServerListOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
ImapServerListResultFromJSON(jsonValue)
);
}
/**
* List messages in an inbox
*/
async imapServerList(
requestParameters: ImapServerListRequest,
initOverrides?: RequestInit
): Promise<ImapServerListResult> {
const response = await this.imapServerListRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Search messages in an inbox
*/
async imapServerSearchRaw(
requestParameters: ImapServerSearchRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<ImapServerSearchResult>> {
if (
requestParameters.imapServerSearchOptions === null ||
requestParameters.imapServerSearchOptions === undefined
) {
throw new runtime.RequiredError(
'imapServerSearchOptions',
'Required parameter requestParameters.imapServerSearchOptions was null or undefined when calling imapServerSearch.'
);
}
const queryParameters: any = {};
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/imap/server/search`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: ImapServerSearchOptionsToJSON(
requestParameters.imapServerSearchOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
ImapServerSearchResultFromJSON(jsonValue)
);
}
/**
* Search messages in an inbox
*/
async imapServerSearch(
requestParameters: ImapServerSearchRequest,
initOverrides?: RequestInit
): Promise<ImapServerSearchResult> {
const response = await this.imapServerSearchRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get status for mailbox
*/
async imapServerStatusRaw(
requestParameters: ImapServerStatusRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<ImapServerStatusResult>> {
if (
requestParameters.imapServerStatusOptions === null ||
requestParameters.imapServerStatusOptions === undefined
) {
throw new runtime.RequiredError(
'imapServerStatusOptions',
'Required parameter requestParameters.imapServerStatusOptions was null or undefined when calling imapServerStatus.'
);
}
const queryParameters: any = {};
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/imap/server/status`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: ImapServerStatusOptionsToJSON(
requestParameters.imapServerStatusOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
ImapServerStatusResultFromJSON(jsonValue)
);
}
/**
* Get status for mailbox
*/
async imapServerStatus(
requestParameters: ImapServerStatusRequest,
initOverrides?: RequestInit
): Promise<ImapServerStatusResult> {
const response = await this.imapServerStatusRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Update message flags
*/
async imapServerUpdateFlagsRaw(
requestParameters: ImapServerUpdateFlagsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
if (
requestParameters.imapUpdateFlagsOptions === null ||
requestParameters.imapUpdateFlagsOptions === undefined
) {
throw new runtime.RequiredError(
'imapUpdateFlagsOptions',
'Required parameter requestParameters.imapUpdateFlagsOptions was null or undefined when calling imapServerUpdateFlags.'
);
}
const queryParameters: any = {};
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/imap/server/update-flags`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: ImapUpdateFlagsOptionsToJSON(
requestParameters.imapUpdateFlagsOptions
),
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Update message flags
*/
async imapServerUpdateFlags(
requestParameters: ImapServerUpdateFlagsRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.imapServerUpdateFlagsRaw(requestParameters, initOverrides);
}
}
/* 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 * as runtime from '../runtime';
import {
CreateGroupOptions,
CreateGroupOptionsFromJSON,
CreateGroupOptionsToJSON,
GroupContactsDto,
GroupContactsDtoFromJSON,
GroupContactsDtoToJSON,
GroupDto,
GroupDtoFromJSON,
GroupDtoToJSON,
GroupProjection,
GroupProjectionFromJSON,
GroupProjectionToJSON,
PageContactProjection,
PageContactProjectionFromJSON,
PageContactProjectionToJSON,
PageGroupProjection,
PageGroupProjectionFromJSON,
PageGroupProjectionToJSON,
UpdateGroupContacts,
UpdateGroupContactsFromJSON,
UpdateGroupContactsToJSON,
} from '../models';
export interface AddContactsToGroupRequest {
groupId: string;
updateGroupContacts: UpdateGroupContacts;
}
export interface CreateGroupRequest {
createGroupOptions: CreateGroupOptions;
}
export interface DeleteGroupRequest {
groupId: string;
}
export interface GetAllGroupsRequest {
page?: number;
size?: number;
sort?: GetAllGroupsSortEnum;
since?: Date;
before?: Date;
}
export interface GetGroupRequest {
groupId: string;
}
export interface GetGroupWithContactsRequest {
groupId: string;
}
export interface GetGroupWithContactsPaginatedRequest {
groupId: string;
page?: number;
size?: number;
sort?: GetGroupWithContactsPaginatedSortEnum;
since?: Date;
before?: Date;
}
export interface RemoveContactsFromGroupRequest {
groupId: string;
updateGroupContacts: UpdateGroupContacts;
}
/**
*
*/
export class GroupControllerApi extends runtime.BaseAPI {
/**
* Add contacts to a group
*/
async addContactsToGroupRaw(
requestParameters: AddContactsToGroupRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<GroupContactsDto>> {
if (
requestParameters.groupId === null ||
requestParameters.groupId === undefined
) {
throw new runtime.RequiredError(
'groupId',
'Required parameter requestParameters.groupId was null or undefined when calling addContactsToGroup.'
);
}
if (
requestParameters.updateGroupContacts === null ||
requestParameters.updateGroupContacts === undefined
) {
throw new runtime.RequiredError(
'updateGroupContacts',
'Required parameter requestParameters.updateGroupContacts was null or undefined when calling addContactsToGroup.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/groups/{groupId}/contacts`.replace(
`{${'groupId'}}`,
encodeURIComponent(String(requestParameters.groupId))
),
method: 'PUT',
headers: headerParameters,
query: queryParameters,
body: UpdateGroupContactsToJSON(requestParameters.updateGroupContacts),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
GroupContactsDtoFromJSON(jsonValue)
);
}
/**
* Add contacts to a group
*/
async addContactsToGroup(
requestParameters: AddContactsToGroupRequest,
initOverrides?: RequestInit
): Promise<GroupContactsDto> {
const response = await this.addContactsToGroupRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Create a group
*/
async createGroupRaw(
requestParameters: CreateGroupRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<GroupDto>> {
if (
requestParameters.createGroupOptions === null ||
requestParameters.createGroupOptions === undefined
) {
throw new runtime.RequiredError(
'createGroupOptions',
'Required parameter requestParameters.createGroupOptions was null or undefined when calling createGroup.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/groups`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: CreateGroupOptionsToJSON(requestParameters.createGroupOptions),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
GroupDtoFromJSON(jsonValue)
);
}
/**
* Create a group
*/
async createGroup(
requestParameters: CreateGroupRequest,
initOverrides?: RequestInit
): Promise<GroupDto> {
const response = await this.createGroupRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Delete group
*/
async deleteGroupRaw(
requestParameters: DeleteGroupRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
if (
requestParameters.groupId === null ||
requestParameters.groupId === undefined
) {
throw new runtime.RequiredError(
'groupId',
'Required parameter requestParameters.groupId was null or undefined when calling deleteGroup.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/groups/{groupId}`.replace(
`{${'groupId'}}`,
encodeURIComponent(String(requestParameters.groupId))
),
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Delete group
*/
async deleteGroup(
requestParameters: DeleteGroupRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.deleteGroupRaw(requestParameters, initOverrides);
}
/**
* Get all Contact Groups in paginated format
*/
async getAllGroupsRaw(
requestParameters: GetAllGroupsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageGroupProjection>> {
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/groups/paginated`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageGroupProjectionFromJSON(jsonValue)
);
}
/**
* Get all Contact Groups in paginated format
*/
async getAllGroups(
requestParameters: GetAllGroupsRequest,
initOverrides?: RequestInit
): Promise<PageGroupProjection> {
const response = await this.getAllGroupsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get group
*/
async getGroupRaw(
requestParameters: GetGroupRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<GroupDto>> {
if (
requestParameters.groupId === null ||
requestParameters.groupId === undefined
) {
throw new runtime.RequiredError(
'groupId',
'Required parameter requestParameters.groupId was null or undefined when calling getGroup.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/groups/{groupId}`.replace(
`{${'groupId'}}`,
encodeURIComponent(String(requestParameters.groupId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
GroupDtoFromJSON(jsonValue)
);
}
/**
* Get group
*/
async getGroup(
requestParameters: GetGroupRequest,
initOverrides?: RequestInit
): Promise<GroupDto> {
const response = await this.getGroupRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Get group and contacts belonging to it
*/
async getGroupWithContactsRaw(
requestParameters: GetGroupWithContactsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<GroupContactsDto>> {
if (
requestParameters.groupId === null ||
requestParameters.groupId === undefined
) {
throw new runtime.RequiredError(
'groupId',
'Required parameter requestParameters.groupId was null or undefined when calling getGroupWithContacts.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/groups/{groupId}/contacts`.replace(
`{${'groupId'}}`,
encodeURIComponent(String(requestParameters.groupId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
GroupContactsDtoFromJSON(jsonValue)
);
}
/**
* Get group and contacts belonging to it
*/
async getGroupWithContacts(
requestParameters: GetGroupWithContactsRequest,
initOverrides?: RequestInit
): Promise<GroupContactsDto> {
const response = await this.getGroupWithContactsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get group and paginated contacts belonging to it
*/
async getGroupWithContactsPaginatedRaw(
requestParameters: GetGroupWithContactsPaginatedRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageContactProjection>> {
if (
requestParameters.groupId === null ||
requestParameters.groupId === undefined
) {
throw new runtime.RequiredError(
'groupId',
'Required parameter requestParameters.groupId was null or undefined when calling getGroupWithContactsPaginated.'
);
}
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/groups/{groupId}/contacts-paginated`.replace(
`{${'groupId'}}`,
encodeURIComponent(String(requestParameters.groupId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageContactProjectionFromJSON(jsonValue)
);
}
/**
* Get group and paginated contacts belonging to it
*/
async getGroupWithContactsPaginated(
requestParameters: GetGroupWithContactsPaginatedRequest,
initOverrides?: RequestInit
): Promise<PageContactProjection> {
const response = await this.getGroupWithContactsPaginatedRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get all groups
*/
async getGroupsRaw(
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<Array<GroupProjection>>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/groups`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
jsonValue.map(GroupProjectionFromJSON)
);
}
/**
* Get all groups
*/
async getGroups(
initOverrides?: RequestInit
): Promise<Array<GroupProjection>> {
const response = await this.getGroupsRaw(initOverrides);
return await response.value();
}
/**
* Remove contacts from a group
*/
async removeContactsFromGroupRaw(
requestParameters: RemoveContactsFromGroupRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<GroupContactsDto>> {
if (
requestParameters.groupId === null ||
requestParameters.groupId === undefined
) {
throw new runtime.RequiredError(
'groupId',
'Required parameter requestParameters.groupId was null or undefined when calling removeContactsFromGroup.'
);
}
if (
requestParameters.updateGroupContacts === null ||
requestParameters.updateGroupContacts === undefined
) {
throw new runtime.RequiredError(
'updateGroupContacts',
'Required parameter requestParameters.updateGroupContacts was null or undefined when calling removeContactsFromGroup.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/groups/{groupId}/contacts`.replace(
`{${'groupId'}}`,
encodeURIComponent(String(requestParameters.groupId))
),
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
body: UpdateGroupContactsToJSON(requestParameters.updateGroupContacts),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
GroupContactsDtoFromJSON(jsonValue)
);
}
/**
* Remove contacts from a group
*/
async removeContactsFromGroup(
requestParameters: RemoveContactsFromGroupRequest,
initOverrides?: RequestInit
): Promise<GroupContactsDto> {
const response = await this.removeContactsFromGroupRaw(
requestParameters,
initOverrides
);
return await response.value();
}
}
/**
* @export
* @enum {string}
*/
export enum GetAllGroupsSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum GetGroupWithContactsPaginatedSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/* 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 * as runtime from '../runtime';
export interface SubmitFormRequest {
to?: string;
subject?: string;
redirectTo?: string;
emailAddress?: string;
successMessage?: string;
spamCheck?: string;
otherParameters?: string;
}
/**
*
*/
export class FormControllerApi extends runtime.BaseAPI {
/**
* This endpoint allows you to submit HTML forms and receive the field values and files via email. #### Parameters The endpoint looks for special meta parameters in the form fields OR in the URL request parameters. The meta parameters can be used to specify the behaviour of the email. You must provide at-least a `_to` email address to tell the endpoint where the form should be emailed. These can be submitted as hidden HTML input fields with the corresponding `name` attributes or as URL query parameters such as `?_to=test@example.com` The endpoint takes all other form fields that are named and includes them in the message body of the email. Files are sent as attachments. #### Submitting This endpoint accepts form submission via POST method. It accepts `application/x-www-form-urlencoded`, and `multipart/form-data` content-types. #### HTML Example ```html <form action=\"https://api.mailslurp.com/forms\" method=\"post\" > <input name=\"_to\" type=\"hidden\" value=\"test@example.com\"/> <textarea name=\"feedback\"></textarea> <button type=\"submit\">Submit</button> </form> ``` #### URL Example ```html <form action=\"https://api.mailslurp.com/forms?_to=test@example.com\" method=\"post\" > <textarea name=\"feedback\"></textarea> <button type=\"submit\">Submit</button> </form> ``` The email address is specified by a `_to` field OR is extracted from an email alias specified by a `_toAlias` field (see the alias controller for more information). Endpoint accepts . You can specify a content type in HTML forms using the `enctype` attribute, for instance: `<form enctype=\"multipart/form-data\">`.
* Submit a form to be parsed and sent as an email to an address determined by the form fields
*/
async submitFormRaw(
requestParameters: SubmitFormRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<string>> {
const queryParameters: any = {};
if (requestParameters.to !== undefined) {
queryParameters['_to'] = requestParameters.to;
}
if (requestParameters.subject !== undefined) {
queryParameters['_subject'] = requestParameters.subject;
}
if (requestParameters.redirectTo !== undefined) {
queryParameters['_redirectTo'] = requestParameters.redirectTo;
}
if (requestParameters.emailAddress !== undefined) {
queryParameters['_emailAddress'] = requestParameters.emailAddress;
}
if (requestParameters.successMessage !== undefined) {
queryParameters['_successMessage'] = requestParameters.successMessage;
}
if (requestParameters.spamCheck !== undefined) {
queryParameters['_spamCheck'] = requestParameters.spamCheck;
}
if (requestParameters.otherParameters !== undefined) {
queryParameters['otherParameters'] = requestParameters.otherParameters;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/forms`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.TextApiResponse(response) as any;
}
/**
* This endpoint allows you to submit HTML forms and receive the field values and files via email. #### Parameters The endpoint looks for special meta parameters in the form fields OR in the URL request parameters. The meta parameters can be used to specify the behaviour of the email. You must provide at-least a `_to` email address to tell the endpoint where the form should be emailed. These can be submitted as hidden HTML input fields with the corresponding `name` attributes or as URL query parameters such as `?_to=test@example.com` The endpoint takes all other form fields that are named and includes them in the message body of the email. Files are sent as attachments. #### Submitting This endpoint accepts form submission via POST method. It accepts `application/x-www-form-urlencoded`, and `multipart/form-data` content-types. #### HTML Example ```html <form action=\"https://api.mailslurp.com/forms\" method=\"post\" > <input name=\"_to\" type=\"hidden\" value=\"test@example.com\"/> <textarea name=\"feedback\"></textarea> <button type=\"submit\">Submit</button> </form> ``` #### URL Example ```html <form action=\"https://api.mailslurp.com/forms?_to=test@example.com\" method=\"post\" > <textarea name=\"feedback\"></textarea> <button type=\"submit\">Submit</button> </form> ``` The email address is specified by a `_to` field OR is extracted from an email alias specified by a `_toAlias` field (see the alias controller for more information). Endpoint accepts . You can specify a content type in HTML forms using the `enctype` attribute, for instance: `<form enctype=\"multipart/form-data\">`.
* Submit a form to be parsed and sent as an email to an address determined by the form fields
*/
async submitForm(
requestParameters: SubmitFormRequest,
initOverrides?: RequestInit
): Promise<string> {
const response = await this.submitFormRaw(requestParameters, initOverrides);
return await response.value();
}
}
/* 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 * as runtime from '../runtime';
import {
ExportLink,
ExportLinkFromJSON,
ExportLinkToJSON,
ExportOptions,
ExportOptionsFromJSON,
ExportOptionsToJSON,
} from '../models';
export interface ExportEntitiesRequest {
exportType: ExportEntitiesExportTypeEnum;
apiKey: string;
outputFormat: ExportEntitiesOutputFormatEnum;
filter?: string;
listSeparatorToken?: string;
excludePreviouslyExported?: boolean;
createdEarliestTime?: Date;
createdOldestTime?: Date;
}
export interface GetExportLinkRequest {
exportType: GetExportLinkExportTypeEnum;
exportOptions: ExportOptions;
apiKey?: string;
}
/**
*
*/
export class ExportControllerApi extends runtime.BaseAPI {
/**
* Export inboxes link callable via browser
*/
async exportEntitiesRaw(
requestParameters: ExportEntitiesRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<string>> {
if (
requestParameters.exportType === null ||
requestParameters.exportType === undefined
) {
throw new runtime.RequiredError(
'exportType',
'Required parameter requestParameters.exportType was null or undefined when calling exportEntities.'
);
}
if (
requestParameters.apiKey === null ||
requestParameters.apiKey === undefined
) {
throw new runtime.RequiredError(
'apiKey',
'Required parameter requestParameters.apiKey was null or undefined when calling exportEntities.'
);
}
if (
requestParameters.outputFormat === null ||
requestParameters.outputFormat === undefined
) {
throw new runtime.RequiredError(
'outputFormat',
'Required parameter requestParameters.outputFormat was null or undefined when calling exportEntities.'
);
}
const queryParameters: any = {};
if (requestParameters.exportType !== undefined) {
queryParameters['exportType'] = requestParameters.exportType;
}
if (requestParameters.apiKey !== undefined) {
queryParameters['apiKey'] = requestParameters.apiKey;
}
if (requestParameters.outputFormat !== undefined) {
queryParameters['outputFormat'] = requestParameters.outputFormat;
}
if (requestParameters.filter !== undefined) {
queryParameters['filter'] = requestParameters.filter;
}
if (requestParameters.listSeparatorToken !== undefined) {
queryParameters['listSeparatorToken'] =
requestParameters.listSeparatorToken;
}
if (requestParameters.excludePreviouslyExported !== undefined) {
queryParameters['excludePreviouslyExported'] =
requestParameters.excludePreviouslyExported;
}
if (requestParameters.createdEarliestTime !== undefined) {
queryParameters['createdEarliestTime'] = (
requestParameters.createdEarliestTime as any
).toISOString();
}
if (requestParameters.createdOldestTime !== undefined) {
queryParameters['createdOldestTime'] = (
requestParameters.createdOldestTime as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/export`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.TextApiResponse(response) as any;
}
/**
* Export inboxes link callable via browser
*/
async exportEntities(
requestParameters: ExportEntitiesRequest,
initOverrides?: RequestInit
): Promise<string> {
const response = await this.exportEntitiesRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get export link
*/
async getExportLinkRaw(
requestParameters: GetExportLinkRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<ExportLink>> {
if (
requestParameters.exportType === null ||
requestParameters.exportType === undefined
) {
throw new runtime.RequiredError(
'exportType',
'Required parameter requestParameters.exportType was null or undefined when calling getExportLink.'
);
}
if (
requestParameters.exportOptions === null ||
requestParameters.exportOptions === undefined
) {
throw new runtime.RequiredError(
'exportOptions',
'Required parameter requestParameters.exportOptions was null or undefined when calling getExportLink.'
);
}
const queryParameters: any = {};
if (requestParameters.exportType !== undefined) {
queryParameters['exportType'] = requestParameters.exportType;
}
if (requestParameters.apiKey !== undefined) {
queryParameters['apiKey'] = requestParameters.apiKey;
}
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/export`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: ExportOptionsToJSON(requestParameters.exportOptions),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
ExportLinkFromJSON(jsonValue)
);
}
/**
* Get export link
*/
async getExportLink(
requestParameters: GetExportLinkRequest,
initOverrides?: RequestInit
): Promise<ExportLink> {
const response = await this.getExportLinkRaw(
requestParameters,
initOverrides
);
return await response.value();
}
}
/**
* @export
* @enum {string}
*/
export enum ExportEntitiesExportTypeEnum {
INBOXES = 'INBOXES',
CONTACTS = 'CONTACTS',
ATTACHMENTS = 'ATTACHMENTS',
EMAILS = 'EMAILS',
}
/**
* @export
* @enum {string}
*/
export enum ExportEntitiesOutputFormatEnum {
DEFAULT = 'CSV_DEFAULT',
EXCEL = 'CSV_EXCEL',
}
/**
* @export
* @enum {string}
*/
export enum GetExportLinkExportTypeEnum {
INBOXES = 'INBOXES',
CONTACTS = 'CONTACTS',
ATTACHMENTS = 'ATTACHMENTS',
EMAILS = 'EMAILS',
}
/* 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 * as runtime from '../runtime';
import {
ExpirationDefaults,
ExpirationDefaultsFromJSON,
ExpirationDefaultsToJSON,
ExpiredInboxDto,
ExpiredInboxDtoFromJSON,
ExpiredInboxDtoToJSON,
PageExpiredInboxRecordProjection,
PageExpiredInboxRecordProjectionFromJSON,
PageExpiredInboxRecordProjectionToJSON,
} from '../models';
export interface GetExpiredInboxByInboxIdRequest {
inboxId: string;
}
export interface GetExpiredInboxRecordRequest {
expiredId: string;
}
export interface GetExpiredInboxesRequest {
page?: number;
size?: number;
sort?: GetExpiredInboxesSortEnum;
since?: Date;
before?: Date;
}
/**
*
*/
export class ExpiredControllerApi extends runtime.BaseAPI {
/**
* Return default times used for inbox expiration
* Get default expiration settings
*/
async getExpirationDefaultsRaw(
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<ExpirationDefaults>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/expired/defaults`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
ExpirationDefaultsFromJSON(jsonValue)
);
}
/**
* Return default times used for inbox expiration
* Get default expiration settings
*/
async getExpirationDefaults(
initOverrides?: RequestInit
): Promise<ExpirationDefaults> {
const response = await this.getExpirationDefaultsRaw(initOverrides);
return await response.value();
}
/**
* Use the inboxId to return an ExpiredInboxRecord if an inbox has expired. Inboxes expire and are disabled if an expiration date is set or plan requires. Returns 404 if no expired inbox is found for the inboxId
* Get expired inbox record for a previously existing inbox
*/
async getExpiredInboxByInboxIdRaw(
requestParameters: GetExpiredInboxByInboxIdRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<ExpiredInboxDto>> {
if (
requestParameters.inboxId === null ||
requestParameters.inboxId === undefined
) {
throw new runtime.RequiredError(
'inboxId',
'Required parameter requestParameters.inboxId was null or undefined when calling getExpiredInboxByInboxId.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/expired/inbox/{inboxId}`.replace(
`{${'inboxId'}}`,
encodeURIComponent(String(requestParameters.inboxId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
ExpiredInboxDtoFromJSON(jsonValue)
);
}
/**
* Use the inboxId to return an ExpiredInboxRecord if an inbox has expired. Inboxes expire and are disabled if an expiration date is set or plan requires. Returns 404 if no expired inbox is found for the inboxId
* Get expired inbox record for a previously existing inbox
*/
async getExpiredInboxByInboxId(
requestParameters: GetExpiredInboxByInboxIdRequest,
initOverrides?: RequestInit
): Promise<ExpiredInboxDto> {
const response = await this.getExpiredInboxByInboxIdRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Inboxes created with an expiration date will expire after the given date and be moved to an ExpiredInbox entity. You can still read emails in the inbox but it can no longer send or receive emails. Fetch the expired inboxes to view the old inboxes properties
* Get an expired inbox record
*/
async getExpiredInboxRecordRaw(
requestParameters: GetExpiredInboxRecordRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<ExpiredInboxDto>> {
if (
requestParameters.expiredId === null ||
requestParameters.expiredId === undefined
) {
throw new runtime.RequiredError(
'expiredId',
'Required parameter requestParameters.expiredId was null or undefined when calling getExpiredInboxRecord.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/expired/{expiredId}`.replace(
`{${'expiredId'}}`,
encodeURIComponent(String(requestParameters.expiredId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
ExpiredInboxDtoFromJSON(jsonValue)
);
}
/**
* Inboxes created with an expiration date will expire after the given date and be moved to an ExpiredInbox entity. You can still read emails in the inbox but it can no longer send or receive emails. Fetch the expired inboxes to view the old inboxes properties
* Get an expired inbox record
*/
async getExpiredInboxRecord(
requestParameters: GetExpiredInboxRecordRequest,
initOverrides?: RequestInit
): Promise<ExpiredInboxDto> {
const response = await this.getExpiredInboxRecordRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Inboxes created with an expiration date will expire after the given date. An ExpiredInboxRecord is created that records the inboxes old ID and email address. You can still read emails in the inbox (using the inboxes old ID) but the email address associated with the inbox can no longer send or receive emails. Fetch expired inbox records to view the old inboxes properties
* List records of expired inboxes
*/
async getExpiredInboxesRaw(
requestParameters: GetExpiredInboxesRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageExpiredInboxRecordProjection>> {
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/expired`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageExpiredInboxRecordProjectionFromJSON(jsonValue)
);
}
/**
* Inboxes created with an expiration date will expire after the given date. An ExpiredInboxRecord is created that records the inboxes old ID and email address. You can still read emails in the inbox (using the inboxes old ID) but the email address associated with the inbox can no longer send or receive emails. Fetch expired inbox records to view the old inboxes properties
* List records of expired inboxes
*/
async getExpiredInboxes(
requestParameters: GetExpiredInboxesRequest,
initOverrides?: RequestInit
): Promise<PageExpiredInboxRecordProjection> {
const response = await this.getExpiredInboxesRaw(
requestParameters,
initOverrides
);
return await response.value();
}
}
/**
* @export
* @enum {string}
*/
export enum GetExpiredInboxesSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/* 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 * as runtime from '../runtime';
import {
PageEmailValidationRequest,
PageEmailValidationRequestFromJSON,
PageEmailValidationRequestToJSON,
ValidateEmailAddressListOptions,
ValidateEmailAddressListOptionsFromJSON,
ValidateEmailAddressListOptionsToJSON,
ValidateEmailAddressListResult,
ValidateEmailAddressListResultFromJSON,
ValidateEmailAddressListResultToJSON,
} from '../models';
export interface DeleteValidationRequestRequest {
id: string;
}
export interface GetValidationRequestsRequest {
page?: number;
size?: number;
sort?: GetValidationRequestsSortEnum;
searchFilter?: string;
since?: Date;
before?: Date;
isValid?: boolean;
}
export interface ValidateEmailAddressListRequest {
validateEmailAddressListOptions: ValidateEmailAddressListOptions;
}
/**
*
*/
export class EmailVerificationControllerApi extends runtime.BaseAPI {
/**
* Delete all validation requests
*/
async deleteAllValidationRequestsRaw(
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/email-verification`,
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Delete all validation requests
*/
async deleteAllValidationRequests(
initOverrides?: RequestInit
): Promise<void> {
await this.deleteAllValidationRequestsRaw(initOverrides);
}
/**
* Delete a validation record
*/
async deleteValidationRequestRaw(
requestParameters: DeleteValidationRequestRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError(
'id',
'Required parameter requestParameters.id was null or undefined when calling deleteValidationRequest.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/email-verification/{id}`.replace(
`{${'id'}}`,
encodeURIComponent(String(requestParameters.id))
),
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Delete a validation record
*/
async deleteValidationRequest(
requestParameters: DeleteValidationRequestRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.deleteValidationRequestRaw(requestParameters, initOverrides);
}
/**
* Validate a list of email addresses. Per unit billing. See your plan for pricing.
*/
async getValidationRequestsRaw(
requestParameters: GetValidationRequestsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageEmailValidationRequest>> {
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.searchFilter !== undefined) {
queryParameters['searchFilter'] = requestParameters.searchFilter;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
if (requestParameters.isValid !== undefined) {
queryParameters['isValid'] = requestParameters.isValid;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/email-verification/validation-requests`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageEmailValidationRequestFromJSON(jsonValue)
);
}
/**
* Validate a list of email addresses. Per unit billing. See your plan for pricing.
*/
async getValidationRequests(
requestParameters: GetValidationRequestsRequest,
initOverrides?: RequestInit
): Promise<PageEmailValidationRequest> {
const response = await this.getValidationRequestsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Validate a list of email addresses. Per unit billing. See your plan for pricing.
*/
async validateEmailAddressListRaw(
requestParameters: ValidateEmailAddressListRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<ValidateEmailAddressListResult>> {
if (
requestParameters.validateEmailAddressListOptions === null ||
requestParameters.validateEmailAddressListOptions === undefined
) {
throw new runtime.RequiredError(
'validateEmailAddressListOptions',
'Required parameter requestParameters.validateEmailAddressListOptions was null or undefined when calling validateEmailAddressList.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/email-verification/email-address-list`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: ValidateEmailAddressListOptionsToJSON(
requestParameters.validateEmailAddressListOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
ValidateEmailAddressListResultFromJSON(jsonValue)
);
}
/**
* Validate a list of email addresses. Per unit billing. See your plan for pricing.
*/
async validateEmailAddressList(
requestParameters: ValidateEmailAddressListRequest,
initOverrides?: RequestInit
): Promise<ValidateEmailAddressListResult> {
const response = await this.validateEmailAddressListRaw(
requestParameters,
initOverrides
);
return await response.value();
}
}
/**
* @export
* @enum {string}
*/
export enum GetValidationRequestsSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/* 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 * as runtime from '../runtime';
import {
AttachmentMetaData,
AttachmentMetaDataFromJSON,
AttachmentMetaDataToJSON,
CanSendEmailResults,
CanSendEmailResultsFromJSON,
CanSendEmailResultsToJSON,
CheckEmailBodyFeatureSupportResults,
CheckEmailBodyFeatureSupportResultsFromJSON,
CheckEmailBodyFeatureSupportResultsToJSON,
CheckEmailBodyResults,
CheckEmailBodyResultsFromJSON,
CheckEmailBodyResultsToJSON,
CheckEmailClientSupportOptions,
CheckEmailClientSupportOptionsFromJSON,
CheckEmailClientSupportOptionsToJSON,
CheckEmailClientSupportResults,
CheckEmailClientSupportResultsFromJSON,
CheckEmailClientSupportResultsToJSON,
ContentMatchOptions,
ContentMatchOptionsFromJSON,
ContentMatchOptionsToJSON,
CountDto,
CountDtoFromJSON,
CountDtoToJSON,
DownloadAttachmentDto,
DownloadAttachmentDtoFromJSON,
DownloadAttachmentDtoToJSON,
Email,
EmailFromJSON,
EmailToJSON,
EmailContentMatchResult,
EmailContentMatchResultFromJSON,
EmailContentMatchResultToJSON,
EmailContentPartResult,
EmailContentPartResultFromJSON,
EmailContentPartResultToJSON,
EmailHtmlDto,
EmailHtmlDtoFromJSON,
EmailHtmlDtoToJSON,
EmailLinksResult,
EmailLinksResultFromJSON,
EmailLinksResultToJSON,
EmailPreview,
EmailPreviewFromJSON,
EmailPreviewToJSON,
EmailPreviewUrls,
EmailPreviewUrlsFromJSON,
EmailPreviewUrlsToJSON,
EmailScreenshotResult,
EmailScreenshotResultFromJSON,
EmailScreenshotResultToJSON,
EmailTextLinesResult,
EmailTextLinesResultFromJSON,
EmailTextLinesResultToJSON,
ForwardEmailOptions,
ForwardEmailOptionsFromJSON,
ForwardEmailOptionsToJSON,
GetEmailScreenshotOptions,
GetEmailScreenshotOptionsFromJSON,
GetEmailScreenshotOptionsToJSON,
GravatarUrl,
GravatarUrlFromJSON,
GravatarUrlToJSON,
ImapFlagOperationOptions,
ImapFlagOperationOptionsFromJSON,
ImapFlagOperationOptionsToJSON,
PageEmailProjection,
PageEmailProjectionFromJSON,
PageEmailProjectionToJSON,
RawEmailJson,
RawEmailJsonFromJSON,
RawEmailJsonToJSON,
ReplyToEmailOptions,
ReplyToEmailOptionsFromJSON,
ReplyToEmailOptionsToJSON,
SearchEmailsOptions,
SearchEmailsOptionsFromJSON,
SearchEmailsOptionsToJSON,
SendEmailOptions,
SendEmailOptionsFromJSON,
SendEmailOptionsToJSON,
SentEmailDto,
SentEmailDtoFromJSON,
SentEmailDtoToJSON,
UnreadCount,
UnreadCountFromJSON,
UnreadCountToJSON,
ValidationDto,
ValidationDtoFromJSON,
ValidationDtoToJSON,
} from '../models';
export interface ApplyImapFlagOperationRequest {
emailId: string;
imapFlagOperationOptions: ImapFlagOperationOptions;
}
export interface CanSendRequest {
inboxId: string;
sendEmailOptions: SendEmailOptions;
}
export interface CheckEmailBodyRequest {
emailId: string;
}
export interface CheckEmailBodyFeatureSupportRequest {
emailId: string;
}
export interface CheckEmailClientSupportRequest {
checkEmailClientSupportOptions: CheckEmailClientSupportOptions;
}
export interface DeleteEmailRequest {
emailId: string;
}
export interface DownloadAttachmentRequest {
emailId: string;
attachmentId: string;
apiKey?: string;
}
export interface DownloadAttachmentBase64Request {
emailId: string;
attachmentId: string;
}
export interface DownloadBodyRequest {
emailId: string;
}
export interface DownloadBodyBytesRequest {
emailId: string;
}
export interface ForwardEmailRequest {
emailId: string;
forwardEmailOptions: ForwardEmailOptions;
}
export interface GetAttachmentMetaDataRequest {
emailId: string;
attachmentId: string;
}
export interface GetEmailRequest {
emailId: string;
decode?: boolean;
}
export interface GetEmailAttachmentsRequest {
emailId: string;
}
export interface GetEmailContentMatchRequest {
emailId: string;
contentMatchOptions: ContentMatchOptions;
}
export interface GetEmailContentPartRequest {
emailId: string;
contentType: string;
}
export interface GetEmailHTMLRequest {
emailId: string;
decode?: boolean;
replaceCidImages?: boolean;
}
export interface GetEmailHTMLJsonRequest {
emailId: string;
decode?: boolean;
replaceCidImages?: boolean;
}
export interface GetEmailHTMLQueryRequest {
emailId: string;
htmlSelector: string;
}
export interface GetEmailLinksRequest {
emailId: string;
}
export interface GetEmailPreviewURLsRequest {
emailId: string;
}
export interface GetEmailScreenshotAsBase64Request {
emailId: string;
getEmailScreenshotOptions: GetEmailScreenshotOptions;
}
export interface GetEmailScreenshotAsBinaryRequest {
emailId: string;
getEmailScreenshotOptions: GetEmailScreenshotOptions;
}
export interface GetEmailTextLinesRequest {
emailId: string;
decodeHtmlEntities?: boolean;
lineSeparator?: string;
}
export interface GetEmailsOffsetPaginatedRequest {
inboxId?: Array<string>;
page?: number;
size?: number;
sort?: GetEmailsOffsetPaginatedSortEnum;
unreadOnly?: boolean;
searchFilter?: string;
since?: Date;
before?: Date;
}
export interface GetEmailsPaginatedRequest {
inboxId?: Array<string>;
page?: number;
size?: number;
sort?: GetEmailsPaginatedSortEnum;
unreadOnly?: boolean;
searchFilter?: string;
since?: Date;
before?: Date;
}
export interface GetGravatarUrlForEmailAddressRequest {
emailAddress: string;
size?: string;
}
export interface GetLatestEmailRequest {
inboxIds?: Array<string>;
}
export interface GetLatestEmailInInbox1Request {
inboxId: string;
}
export interface GetOrganizationEmailsPaginatedRequest {
inboxId?: Array<string>;
page?: number;
size?: number;
sort?: GetOrganizationEmailsPaginatedSortEnum;
unreadOnly?: boolean;
searchFilter?: string;
since?: Date;
before?: Date;
}
export interface GetRawEmailContentsRequest {
emailId: string;
}
export interface GetRawEmailJsonRequest {
emailId: string;
}
export interface GetUnreadEmailCountRequest {
inboxId?: string;
}
export interface MarkAllAsReadRequest {
read?: boolean;
inboxId?: string;
}
export interface MarkAsReadRequest {
emailId: string;
read?: boolean;
}
export interface ReplyToEmailRequest {
emailId: string;
replyToEmailOptions: ReplyToEmailOptions;
}
export interface SearchEmailsRequest {
searchEmailsOptions: SearchEmailsOptions;
}
export interface SendEmailSourceOptionalRequest {
sendEmailOptions: SendEmailOptions;
inboxId?: string;
useDomainPool?: boolean;
virtualSend?: boolean;
}
export interface ValidateEmailRequest {
emailId: string;
}
/**
*
*/
export class EmailControllerApi extends runtime.BaseAPI {
/**
* Apply RFC3501 section-2.3.2 IMAP flag operations on an email
* Set IMAP flags associated with a message. Only supports \'\\Seen\' flag.
*/
async applyImapFlagOperationRaw(
requestParameters: ApplyImapFlagOperationRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<EmailPreview>> {
if (
requestParameters.emailId === null ||
requestParameters.emailId === undefined
) {
throw new runtime.RequiredError(
'emailId',
'Required parameter requestParameters.emailId was null or undefined when calling applyImapFlagOperation.'
);
}
if (
requestParameters.imapFlagOperationOptions === null ||
requestParameters.imapFlagOperationOptions === undefined
) {
throw new runtime.RequiredError(
'imapFlagOperationOptions',
'Required parameter requestParameters.imapFlagOperationOptions was null or undefined when calling applyImapFlagOperation.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/emails/{emailId}/imap-flag-operation`.replace(
`{${'emailId'}}`,
encodeURIComponent(String(requestParameters.emailId))
),
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: ImapFlagOperationOptionsToJSON(
requestParameters.imapFlagOperationOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
EmailPreviewFromJSON(jsonValue)
);
}
/**
* Apply RFC3501 section-2.3.2 IMAP flag operations on an email
* Set IMAP flags associated with a message. Only supports \'\\Seen\' flag.
*/
async applyImapFlagOperation(
requestParameters: ApplyImapFlagOperationRequest,
initOverrides?: RequestInit
): Promise<EmailPreview> {
const response = await this.applyImapFlagOperationRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Can user send email to given recipient or is the recipient blocked
* Check if email can be sent and options are valid.
*/
async canSendRaw(
requestParameters: CanSendRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<CanSendEmailResults>> {
if (
requestParameters.inboxId === null ||
requestParameters.inboxId === undefined
) {
throw new runtime.RequiredError(
'inboxId',
'Required parameter requestParameters.inboxId was null or undefined when calling canSend.'
);
}
if (
requestParameters.sendEmailOptions === null ||
requestParameters.sendEmailOptions === undefined
) {
throw new runtime.RequiredError(
'sendEmailOptions',
'Required parameter requestParameters.sendEmailOptions was null or undefined when calling canSend.'
);
}
const queryParameters: any = {};
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/emails/can-send`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: SendEmailOptionsToJSON(requestParameters.sendEmailOptions),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
CanSendEmailResultsFromJSON(jsonValue)
);
}
/**
* Can user send email to given recipient or is the recipient blocked
* Check if email can be sent and options are valid.
*/
async canSend(
requestParameters: CanSendRequest,
initOverrides?: RequestInit
): Promise<CanSendEmailResults> {
const response = await this.canSendRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Find dead links, broken images, and spelling mistakes in email body. Will call included links via HTTP so do not invoke if your links are sensitive or stateful. Any resource that returns a 4xx or 5xx response or is not reachable via HEAD or GET HTTP operations will be considered unhealthy.
* Detect broken links, spelling, and images in email content
*/
async checkEmailBodyRaw(
requestParameters: CheckEmailBodyRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<CheckEmailBodyResults>> {
if (
requestParameters.emailId === null ||
requestParameters.emailId === undefined
) {
throw new runtime.RequiredError(
'emailId',
'Required parameter requestParameters.emailId was null or undefined when calling checkEmailBody.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/emails/{emailId}/check-email-body`.replace(
`{${'emailId'}}`,
encodeURIComponent(String(requestParameters.emailId))
),
method: 'POST',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
CheckEmailBodyResultsFromJSON(jsonValue)
);
}
/**
* Find dead links, broken images, and spelling mistakes in email body. Will call included links via HTTP so do not invoke if your links are sensitive or stateful. Any resource that returns a 4xx or 5xx response or is not reachable via HEAD or GET HTTP operations will be considered unhealthy.
* Detect broken links, spelling, and images in email content
*/
async checkEmailBody(
requestParameters: CheckEmailBodyRequest,
initOverrides?: RequestInit
): Promise<CheckEmailBodyResults> {
const response = await this.checkEmailBodyRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Detect HTML and CSS features inside an email body and return a report of email client support across different platforms and versions.
* Show which mail clients support the HTML and CSS features used in an email body.
*/
async checkEmailBodyFeatureSupportRaw(
requestParameters: CheckEmailBodyFeatureSupportRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<CheckEmailBodyFeatureSupportResults>> {
if (
requestParameters.emailId === null ||
requestParameters.emailId === undefined
) {
throw new runtime.RequiredError(
'emailId',
'Required parameter requestParameters.emailId was null or undefined when calling checkEmailBodyFeatureSupport.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/emails/{emailId}/check-email-body-feature-support`.replace(
`{${'emailId'}}`,
encodeURIComponent(String(requestParameters.emailId))
),
method: 'POST',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
CheckEmailBodyFeatureSupportResultsFromJSON(jsonValue)
);
}
/**
* Detect HTML and CSS features inside an email body and return a report of email client support across different platforms and versions.
* Show which mail clients support the HTML and CSS features used in an email body.
*/
async checkEmailBodyFeatureSupport(
requestParameters: CheckEmailBodyFeatureSupportRequest,
initOverrides?: RequestInit
): Promise<CheckEmailBodyFeatureSupportResults> {
const response = await this.checkEmailBodyFeatureSupportRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Evaluate the features used in an email body and return a report of email client support across different platforms and versions.
* Show which email programs and devices support the features used in an email body.
*/
async checkEmailClientSupportRaw(
requestParameters: CheckEmailClientSupportRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<CheckEmailClientSupportResults>> {
if (
requestParameters.checkEmailClientSupportOptions === null ||
requestParameters.checkEmailClientSupportOptions === undefined
) {
throw new runtime.RequiredError(
'checkEmailClientSupportOptions',
'Required parameter requestParameters.checkEmailClientSupportOptions was null or undefined when calling checkEmailClientSupport.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/emails/check-email-client-support`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: CheckEmailClientSupportOptionsToJSON(
requestParameters.checkEmailClientSupportOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
CheckEmailClientSupportResultsFromJSON(jsonValue)
);
}
/**
* Evaluate the features used in an email body and return a report of email client support across different platforms and versions.
* Show which email programs and devices support the features used in an email body.
*/
async checkEmailClientSupport(
requestParameters: CheckEmailClientSupportRequest,
initOverrides?: RequestInit
): Promise<CheckEmailClientSupportResults> {
const response = await this.checkEmailClientSupportRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Deletes all emails in your account. Be careful as emails cannot be recovered
* Delete all emails in all inboxes.
*/
async deleteAllEmailsRaw(
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/emails`,
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Deletes all emails in your account. Be careful as emails cannot be recovered
* Delete all emails in all inboxes.
*/
async deleteAllEmails(initOverrides?: RequestInit): Promise<void> {
await this.deleteAllEmailsRaw(initOverrides);
}
/**
* Deletes an email and removes it from the inbox. Deleted emails cannot be recovered.
* Delete an email
*/
async deleteEmailRaw(
requestParameters: DeleteEmailRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
if (
requestParameters.emailId === null ||
requestParameters.emailId === undefined
) {
throw new runtime.RequiredError(
'emailId',
'Required parameter requestParameters.emailId was null or undefined when calling deleteEmail.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/emails/{emailId}`.replace(
`{${'emailId'}}`,
encodeURIComponent(String(requestParameters.emailId))
),
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Deletes an email and removes it from the inbox. Deleted emails cannot be recovered.
* Delete an email
*/
async deleteEmail(
requestParameters: DeleteEmailRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.deleteEmailRaw(requestParameters, initOverrides);
}
/**
* Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream.
* Get email attachment bytes. Returned as `octet-stream` with content type header. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints and convert the base 64 encoded content to a file or string.
*/
async downloadAttachmentRaw(
requestParameters: DownloadAttachmentRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<string>> {
if (
requestParameters.emailId === null ||
requestParameters.emailId === undefined
) {
throw new runtime.RequiredError(
'emailId',
'Required parameter requestParameters.emailId was null or undefined when calling downloadAttachment.'
);
}
if (
requestParameters.attachmentId === null ||
requestParameters.attachmentId === undefined
) {
throw new runtime.RequiredError(
'attachmentId',
'Required parameter requestParameters.attachmentId was null or undefined when calling downloadAttachment.'
);
}
const queryParameters: any = {};
if (requestParameters.apiKey !== undefined) {
queryParameters['apiKey'] = requestParameters.apiKey;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/emails/{emailId}/attachments/{attachmentId}`
.replace(
`{${'emailId'}}`,
encodeURIComponent(String(requestParameters.emailId))
)
.replace(
`{${'attachmentId'}}`,
encodeURIComponent(String(requestParameters.attachmentId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.TextApiResponse(response) as any;
}
/**
* Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream.
* Get email attachment bytes. Returned as `octet-stream` with content type header. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints and convert the base 64 encoded content to a file or string.
*/
async downloadAttachment(
requestParameters: DownloadAttachmentRequest,
initOverrides?: RequestInit
): Promise<string> {
const response = await this.downloadAttachmentRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the `downloadAttachment` method but allows some clients to get around issues with binary responses.
* Get email attachment as base64 encoded string as an alternative to binary responses. Decode the `base64FileContents` as a `utf-8` encoded string or array of bytes depending on the `contentType`.
*/
async downloadAttachmentBase64Raw(
requestParameters: DownloadAttachmentBase64Request,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<DownloadAttachmentDto>> {
if (
requestParameters.emailId === null ||
requestParameters.emailId === undefined
) {
throw new runtime.RequiredError(
'emailId',
'Required parameter requestParameters.emailId was null or undefined when calling downloadAttachmentBase64.'
);
}
if (
requestParameters.attachmentId === null ||
requestParameters.attachmentId === undefined
) {
throw new runtime.RequiredError(
'attachmentId',
'Required parameter requestParameters.attachmentId was null or undefined when calling downloadAttachmentBase64.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/emails/{emailId}/attachments/{attachmentId}/base64`
.replace(
`{${'emailId'}}`,
encodeURIComponent(String(requestParameters.emailId))
)
.replace(
`{${'attachmentId'}}`,
encodeURIComponent(String(requestParameters.attachmentId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
DownloadAttachmentDtoFromJSON(jsonValue)
);
}
/**
* Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the `downloadAttachment` method but allows some clients to get around issues with binary responses.
* Get email attachment as base64 encoded string as an alternative to binary responses. Decode the `base64FileContents` as a `utf-8` encoded string or array of bytes depending on the `contentType`.
*/
async downloadAttachmentBase64(
requestParameters: DownloadAttachmentBase64Request,
initOverrides?: RequestInit
): Promise<DownloadAttachmentDto> {
const response = await this.downloadAttachmentBase64Raw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Returns the specified email body for a given email as a string
* Get email body as string. Returned as `plain/text` with content type header.
*/
async downloadBodyRaw(
requestParameters: DownloadBodyRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<string>> {
if (
requestParameters.emailId === null ||
requestParameters.emailId === undefined
) {
throw new runtime.RequiredError(
'emailId',
'Required parameter requestParameters.emailId was null or undefined when calling downloadBody.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/emails/{emailId}/body`.replace(
`{${'emailId'}}`,
encodeURIComponent(String(requestParameters.emailId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.TextApiResponse(response) as any;
}
/**
* Returns the specified email body for a given email as a string
* Get email body as string. Returned as `plain/text` with content type header.
*/
async downloadBody(
requestParameters: DownloadBodyRequest,
initOverrides?: RequestInit
): Promise<string> {
const response = await this.downloadBodyRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Returns the specified email body for a given email as a stream / array of bytes.
* Get email body in bytes. Returned as `octet-stream` with content type header.
*/
async downloadBodyBytesRaw(
requestParameters: DownloadBodyBytesRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<string>> {
if (
requestParameters.emailId === null ||
requestParameters.emailId === undefined
) {
throw new runtime.RequiredError(
'emailId',
'Required parameter requestParameters.emailId was null or undefined when calling downloadBodyBytes.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/emails/{emailId}/body-bytes`.replace(
`{${'emailId'}}`,
encodeURIComponent(String(requestParameters.emailId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.TextApiResponse(response) as any;
}
/**
* Returns the specified email body for a given email as a stream / array of bytes.
* Get email body in bytes. Returned as `octet-stream` with content type header.
*/
async downloadBodyBytes(
requestParameters: DownloadBodyBytesRequest,
initOverrides?: RequestInit
): Promise<string> {
const response = await this.downloadBodyBytesRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Forward an existing email to new recipients. The sender of the email will be the inbox that received the email you are forwarding. You can override the sender with the `from` option. Note you must have access to the from address in MailSlurp to use the override. For more control consider fetching the email and sending it a new using the send email endpoints.
* Forward email to recipients
*/
async forwardEmailRaw(
requestParameters: ForwardEmailRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<SentEmailDto>> {
if (
requestParameters.emailId === null ||
requestParameters.emailId === undefined
) {
throw new runtime.RequiredError(
'emailId',
'Required parameter requestParameters.emailId was null or undefined when calling forwardEmail.'
);
}
if (
requestParameters.forwardEmailOptions === null ||
requestParameters.forwardEmailOptions === undefined
) {
throw new runtime.RequiredError(
'forwardEmailOptions',
'Required parameter requestParameters.forwardEmailOptions was null or undefined when calling forwardEmail.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/emails/{emailId}/forward`.replace(
`{${'emailId'}}`,
encodeURIComponent(String(requestParameters.emailId))
),
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: ForwardEmailOptionsToJSON(requestParameters.forwardEmailOptions),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
SentEmailDtoFromJSON(jsonValue)
);
}
/**
* Forward an existing email to new recipients. The sender of the email will be the inbox that received the email you are forwarding. You can override the sender with the `from` option. Note you must have access to the from address in MailSlurp to use the override. For more control consider fetching the email and sending it a new using the send email endpoints.
* Forward email to recipients
*/
async forwardEmail(
requestParameters: ForwardEmailRequest,
initOverrides?: RequestInit
): Promise<SentEmailDto> {
const response = await this.forwardEmailRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Returns the metadata such as name and content-type for a given attachment and email.
* Get email attachment metadata. This is the `contentType` and `contentLength` of an attachment. To get the individual attachments use the `downloadAttachment` methods.
*/
async getAttachmentMetaDataRaw(
requestParameters: GetAttachmentMetaDataRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<AttachmentMetaData>> {
if (
requestParameters.emailId === null ||
requestParameters.emailId === undefined
) {
throw new runtime.RequiredError(
'emailId',
'Required parameter requestParameters.emailId was null or undefined when calling getAttachmentMetaData.'
);
}
if (
requestParameters.attachmentId === null ||
requestParameters.attachmentId === undefined
) {
throw new runtime.RequiredError(
'attachmentId',
'Required parameter requestParameters.attachmentId was null or undefined when calling getAttachmentMetaData.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/emails/{emailId}/attachments/{attachmentId}/metadata`
.replace(
`{${'emailId'}}`,
encodeURIComponent(String(requestParameters.emailId))
)
.replace(
`{${'attachmentId'}}`,
encodeURIComponent(String(requestParameters.attachmentId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
AttachmentMetaDataFromJSON(jsonValue)
);
}
/**
* Returns the metadata such as name and content-type for a given attachment and email.
* Get email attachment metadata. This is the `contentType` and `contentLength` of an attachment. To get the individual attachments use the `downloadAttachment` methods.
*/
async getAttachmentMetaData(
requestParameters: GetAttachmentMetaDataRequest,
initOverrides?: RequestInit
): Promise<AttachmentMetaData> {
const response = await this.getAttachmentMetaDataRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Returns a email summary object with headers and content. To retrieve the raw unparsed email use the getRawEmail endpoints
* Get email content including headers and body. Expects email to exist by ID. For emails that may not have arrived yet use the WaitForController.
*/
async getEmailRaw(
requestParameters: GetEmailRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<Email>> {
if (
requestParameters.emailId === null ||
requestParameters.emailId === undefined
) {
throw new runtime.RequiredError(
'emailId',
'Required parameter requestParameters.emailId was null or undefined when calling getEmail.'
);
}
const queryParameters: any = {};
if (requestParameters.decode !== undefined) {
queryParameters['decode'] = requestParameters.decode;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/emails/{emailId}`.replace(
`{${'emailId'}}`,
encodeURIComponent(String(requestParameters.emailId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
EmailFromJSON(jsonValue)
);
}
/**
* Returns a email summary object with headers and content. To retrieve the raw unparsed email use the getRawEmail endpoints
* Get email content including headers and body. Expects email to exist by ID. For emails that may not have arrived yet use the WaitForController.
*/
async getEmail(
requestParameters: GetEmailRequest,
initOverrides?: RequestInit
): Promise<Email> {
const response = await this.getEmailRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Returns an array of attachment metadata such as name and content-type for a given email if present.
* Get all email attachment metadata. Metadata includes name and size of attachments.
*/
async getEmailAttachmentsRaw(
requestParameters: GetEmailAttachmentsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<Array<AttachmentMetaData>>> {
if (
requestParameters.emailId === null ||
requestParameters.emailId === undefined
) {
throw new runtime.RequiredError(
'emailId',
'Required parameter requestParameters.emailId was null or undefined when calling getEmailAttachments.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/emails/{emailId}/attachments`.replace(
`{${'emailId'}}`,
encodeURIComponent(String(requestParameters.emailId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
jsonValue.map(AttachmentMetaDataFromJSON)
);
}
/**
* Returns an array of attachment metadata such as name and content-type for a given email if present.
* Get all email attachment metadata. Metadata includes name and size of attachments.
*/
async getEmailAttachments(
requestParameters: GetEmailAttachmentsRequest,
initOverrides?: RequestInit
): Promise<Array<AttachmentMetaData>> {
const response = await this.getEmailAttachmentsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Return the matches for a given Java style regex pattern. Do not include the typical `/` at start or end of regex in some languages. Given an example `your code is: 12345` the pattern to extract match looks like `code is: (\\d{6})`. This will return an array of matches with the first matching the entire pattern and the subsequent matching the groups: `[\'code is: 123456\', \'123456\']` See https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html for more information of available patterns.
* Get email content regex pattern match results. Runs regex against email body and returns match groups.
*/
async getEmailContentMatchRaw(
requestParameters: GetEmailContentMatchRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<EmailContentMatchResult>> {
if (
requestParameters.emailId === null ||
requestParameters.emailId === undefined
) {
throw new runtime.RequiredError(
'emailId',
'Required parameter requestParameters.emailId was null or undefined when calling getEmailContentMatch.'
);
}
if (
requestParameters.contentMatchOptions === null ||
requestParameters.contentMatchOptions === undefined
) {
throw new runtime.RequiredError(
'contentMatchOptions',
'Required parameter requestParameters.contentMatchOptions was null or undefined when calling getEmailContentMatch.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/emails/{emailId}/contentMatch`.replace(
`{${'emailId'}}`,
encodeURIComponent(String(requestParameters.emailId))
),
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: ContentMatchOptionsToJSON(requestParameters.contentMatchOptions),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
EmailContentMatchResultFromJSON(jsonValue)
);
}
/**
* Return the matches for a given Java style regex pattern. Do not include the typical `/` at start or end of regex in some languages. Given an example `your code is: 12345` the pattern to extract match looks like `code is: (\\d{6})`. This will return an array of matches with the first matching the entire pattern and the subsequent matching the groups: `[\'code is: 123456\', \'123456\']` See https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html for more information of available patterns.
* Get email content regex pattern match results. Runs regex against email body and returns match groups.
*/
async getEmailContentMatch(
requestParameters: GetEmailContentMatchRequest,
initOverrides?: RequestInit
): Promise<EmailContentMatchResult> {
const response = await this.getEmailContentMatchRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get email body content parts from a multipart email message for a given content type
* Get email content part by content type
*/
async getEmailContentPartRaw(
requestParameters: GetEmailContentPartRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<EmailContentPartResult>> {
if (
requestParameters.emailId === null ||
requestParameters.emailId === undefined
) {
throw new runtime.RequiredError(
'emailId',
'Required parameter requestParameters.emailId was null or undefined when calling getEmailContentPart.'
);
}
if (
requestParameters.contentType === null ||
requestParameters.contentType === undefined
) {
throw new runtime.RequiredError(
'contentType',
'Required parameter requestParameters.contentType was null or undefined when calling getEmailContentPart.'
);
}
const queryParameters: any = {};
if (requestParameters.contentType !== undefined) {
queryParameters['contentType'] = requestParameters.contentType;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/emails/{emailId}/contentPart`.replace(
`{${'emailId'}}`,
encodeURIComponent(String(requestParameters.emailId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
EmailContentPartResultFromJSON(jsonValue)
);
}
/**
* Get email body content parts from a multipart email message for a given content type
* Get email content part by content type
*/
async getEmailContentPart(
requestParameters: GetEmailContentPartRequest,
initOverrides?: RequestInit
): Promise<EmailContentPartResult> {
const response = await this.getEmailContentPartRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get email count
*/
async getEmailCountRaw(
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<CountDto>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/emails/emails/count`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
CountDtoFromJSON(jsonValue)
);
}
/**
* Get email count
*/
async getEmailCount(initOverrides?: RequestInit): Promise<CountDto> {
const response = await this.getEmailCountRaw(initOverrides);
return await response.value();
}
/**
* Retrieve email content as HTML response for viewing in browsers. Decodes quoted-printable entities and converts charset to UTF-8. Pass your API KEY as a request parameter when viewing in a browser: `?apiKey=xxx`. Returns content-type `text/html;charset=utf-8` so you must call expecting that content response not JSON. For JSON response see the `getEmailHTMLJson` method.
* Get email content as HTML. For displaying emails in browser context.
*/
async getEmailHTMLRaw(
requestParameters: GetEmailHTMLRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<string>> {
if (
requestParameters.emailId === null ||
requestParameters.emailId === undefined
) {
throw new runtime.RequiredError(
'emailId',
'Required parameter requestParameters.emailId was null or undefined when calling getEmailHTML.'
);
}
const queryParameters: any = {};
if (requestParameters.decode !== undefined) {
queryParameters['decode'] = requestParameters.decode;
}
if (requestParameters.replaceCidImages !== undefined) {
queryParameters['replaceCidImages'] = requestParameters.replaceCidImages;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/emails/{emailId}/html`.replace(
`{${'emailId'}}`,
encodeURIComponent(String(requestParameters.emailId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.TextApiResponse(response) as any;
}
/**
* Retrieve email content as HTML response for viewing in browsers. Decodes quoted-printable entities and converts charset to UTF-8. Pass your API KEY as a request parameter when viewing in a browser: `?apiKey=xxx`. Returns content-type `text/html;charset=utf-8` so you must call expecting that content response not JSON. For JSON response see the `getEmailHTMLJson` method.
* Get email content as HTML. For displaying emails in browser context.
*/
async getEmailHTML(
requestParameters: GetEmailHTMLRequest,
initOverrides?: RequestInit
): Promise<string> {
const response = await this.getEmailHTMLRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Retrieve email content as HTML response. Decodes quoted-printable entities and converts charset to UTF-8. Returns content-type `application/json;charset=utf-8` so you must call expecting that content response not JSON.
* Get email content as HTML in JSON wrapper. For fetching entity decoded HTML content
*/
async getEmailHTMLJsonRaw(
requestParameters: GetEmailHTMLJsonRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<EmailHtmlDto>> {
if (
requestParameters.emailId === null ||
requestParameters.emailId === undefined
) {
throw new runtime.RequiredError(
'emailId',
'Required parameter requestParameters.emailId was null or undefined when calling getEmailHTMLJson.'
);
}
const queryParameters: any = {};
if (requestParameters.decode !== undefined) {
queryParameters['decode'] = requestParameters.decode;
}
if (requestParameters.replaceCidImages !== undefined) {
queryParameters['replaceCidImages'] = requestParameters.replaceCidImages;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/emails/{emailId}/html/json`.replace(
`{${'emailId'}}`,
encodeURIComponent(String(requestParameters.emailId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
EmailHtmlDtoFromJSON(jsonValue)
);
}
/**
* Retrieve email content as HTML response. Decodes quoted-printable entities and converts charset to UTF-8. Returns content-type `application/json;charset=utf-8` so you must call expecting that content response not JSON.
* Get email content as HTML in JSON wrapper. For fetching entity decoded HTML content
*/
async getEmailHTMLJson(
requestParameters: GetEmailHTMLJsonRequest,
initOverrides?: RequestInit
): Promise<EmailHtmlDto> {
const response = await this.getEmailHTMLJsonRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Parse an email body and return the content as an array of text. HTML parsing uses JSoup which supports JQuery/CSS style selectors
* Parse and return text from an email, stripping HTML and decoding encoded characters
*/
async getEmailHTMLQueryRaw(
requestParameters: GetEmailHTMLQueryRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<EmailTextLinesResult>> {
if (
requestParameters.emailId === null ||
requestParameters.emailId === undefined
) {
throw new runtime.RequiredError(
'emailId',
'Required parameter requestParameters.emailId was null or undefined when calling getEmailHTMLQuery.'
);
}
if (
requestParameters.htmlSelector === null ||
requestParameters.htmlSelector === undefined
) {
throw new runtime.RequiredError(
'htmlSelector',
'Required parameter requestParameters.htmlSelector was null or undefined when calling getEmailHTMLQuery.'
);
}
const queryParameters: any = {};
if (requestParameters.htmlSelector !== undefined) {
queryParameters['htmlSelector'] = requestParameters.htmlSelector;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/emails/{emailId}/htmlQuery`.replace(
`{${'emailId'}}`,
encodeURIComponent(String(requestParameters.emailId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
EmailTextLinesResultFromJSON(jsonValue)
);
}
/**
* Parse an email body and return the content as an array of text. HTML parsing uses JSoup which supports JQuery/CSS style selectors
* Parse and return text from an email, stripping HTML and decoding encoded characters
*/
async getEmailHTMLQuery(
requestParameters: GetEmailHTMLQueryRequest,
initOverrides?: RequestInit
): Promise<EmailTextLinesResult> {
const response = await this.getEmailHTMLQueryRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* HTML parsing uses JSoup and UNIX line separators. Searches content for href attributes
* Parse and return list of links found in an email (only works for HTML content)
*/
async getEmailLinksRaw(
requestParameters: GetEmailLinksRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<EmailLinksResult>> {
if (
requestParameters.emailId === null ||
requestParameters.emailId === undefined
) {
throw new runtime.RequiredError(
'emailId',
'Required parameter requestParameters.emailId was null or undefined when calling getEmailLinks.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/emails/{emailId}/links`.replace(
`{${'emailId'}}`,
encodeURIComponent(String(requestParameters.emailId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
EmailLinksResultFromJSON(jsonValue)
);
}
/**
* HTML parsing uses JSoup and UNIX line separators. Searches content for href attributes
* Parse and return list of links found in an email (only works for HTML content)
*/
async getEmailLinks(
requestParameters: GetEmailLinksRequest,
initOverrides?: RequestInit
): Promise<EmailLinksResult> {
const response = await this.getEmailLinksRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get a list of URLs for email content as text/html or raw SMTP message for viewing the message in a browser.
* Get email URLs for viewing in browser or downloading
*/
async getEmailPreviewURLsRaw(
requestParameters: GetEmailPreviewURLsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<EmailPreviewUrls>> {
if (
requestParameters.emailId === null ||
requestParameters.emailId === undefined
) {
throw new runtime.RequiredError(
'emailId',
'Required parameter requestParameters.emailId was null or undefined when calling getEmailPreviewURLs.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/emails/{emailId}/urls`.replace(
`{${'emailId'}}`,
encodeURIComponent(String(requestParameters.emailId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
EmailPreviewUrlsFromJSON(jsonValue)
);
}
/**
* Get a list of URLs for email content as text/html or raw SMTP message for viewing the message in a browser.
* Get email URLs for viewing in browser or downloading
*/
async getEmailPreviewURLs(
requestParameters: GetEmailPreviewURLsRequest,
initOverrides?: RequestInit
): Promise<EmailPreviewUrls> {
const response = await this.getEmailPreviewURLsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Capture image of email screenshot and return as base64 encoded string. Useful for embedding in HTML. Be careful as this may contain sensitive information.
* Take a screenshot of an email in a browser and return base64 encoded string
*/
async getEmailScreenshotAsBase64Raw(
requestParameters: GetEmailScreenshotAsBase64Request,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<EmailScreenshotResult>> {
if (
requestParameters.emailId === null ||
requestParameters.emailId === undefined
) {
throw new runtime.RequiredError(
'emailId',
'Required parameter requestParameters.emailId was null or undefined when calling getEmailScreenshotAsBase64.'
);
}
if (
requestParameters.getEmailScreenshotOptions === null ||
requestParameters.getEmailScreenshotOptions === undefined
) {
throw new runtime.RequiredError(
'getEmailScreenshotOptions',
'Required parameter requestParameters.getEmailScreenshotOptions was null or undefined when calling getEmailScreenshotAsBase64.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/emails/{emailId}/screenshot/base64`.replace(
`{${'emailId'}}`,
encodeURIComponent(String(requestParameters.emailId))
),
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: GetEmailScreenshotOptionsToJSON(
requestParameters.getEmailScreenshotOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
EmailScreenshotResultFromJSON(jsonValue)
);
}
/**
* Capture image of email screenshot and return as base64 encoded string. Useful for embedding in HTML. Be careful as this may contain sensitive information.
* Take a screenshot of an email in a browser and return base64 encoded string
*/
async getEmailScreenshotAsBase64(
requestParameters: GetEmailScreenshotAsBase64Request,
initOverrides?: RequestInit
): Promise<EmailScreenshotResult> {
const response = await this.getEmailScreenshotAsBase64Raw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Returns binary octet-stream of screenshot of the given email
* Take a screenshot of an email in a browser
*/
async getEmailScreenshotAsBinaryRaw(
requestParameters: GetEmailScreenshotAsBinaryRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
if (
requestParameters.emailId === null ||
requestParameters.emailId === undefined
) {
throw new runtime.RequiredError(
'emailId',
'Required parameter requestParameters.emailId was null or undefined when calling getEmailScreenshotAsBinary.'
);
}
if (
requestParameters.getEmailScreenshotOptions === null ||
requestParameters.getEmailScreenshotOptions === undefined
) {
throw new runtime.RequiredError(
'getEmailScreenshotOptions',
'Required parameter requestParameters.getEmailScreenshotOptions was null or undefined when calling getEmailScreenshotAsBinary.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/emails/{emailId}/screenshot/binary`.replace(
`{${'emailId'}}`,
encodeURIComponent(String(requestParameters.emailId))
),
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: GetEmailScreenshotOptionsToJSON(
requestParameters.getEmailScreenshotOptions
),
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Returns binary octet-stream of screenshot of the given email
* Take a screenshot of an email in a browser
*/
async getEmailScreenshotAsBinary(
requestParameters: GetEmailScreenshotAsBinaryRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.getEmailScreenshotAsBinaryRaw(requestParameters, initOverrides);
}
/**
* Parse an email body and return the content as an array of strings. HTML parsing uses JSoup and UNIX line separators.
* Parse and return text from an email, stripping HTML and decoding encoded characters
*/
async getEmailTextLinesRaw(
requestParameters: GetEmailTextLinesRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<EmailTextLinesResult>> {
if (
requestParameters.emailId === null ||
requestParameters.emailId === undefined
) {
throw new runtime.RequiredError(
'emailId',
'Required parameter requestParameters.emailId was null or undefined when calling getEmailTextLines.'
);
}
const queryParameters: any = {};
if (requestParameters.decodeHtmlEntities !== undefined) {
queryParameters['decodeHtmlEntities'] =
requestParameters.decodeHtmlEntities;
}
if (requestParameters.lineSeparator !== undefined) {
queryParameters['lineSeparator'] = requestParameters.lineSeparator;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/emails/{emailId}/textLines`.replace(
`{${'emailId'}}`,
encodeURIComponent(String(requestParameters.emailId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
EmailTextLinesResultFromJSON(jsonValue)
);
}
/**
* Parse an email body and return the content as an array of strings. HTML parsing uses JSoup and UNIX line separators.
* Parse and return text from an email, stripping HTML and decoding encoded characters
*/
async getEmailTextLines(
requestParameters: GetEmailTextLinesRequest,
initOverrides?: RequestInit
): Promise<EmailTextLinesResult> {
const response = await this.getEmailTextLinesRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* By default returns all emails across all inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages
* Get all emails in all inboxes in paginated form. Email API list all.
*/
async getEmailsOffsetPaginatedRaw(
requestParameters: GetEmailsOffsetPaginatedRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageEmailProjection>> {
const queryParameters: any = {};
if (requestParameters.inboxId) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.unreadOnly !== undefined) {
queryParameters['unreadOnly'] = requestParameters.unreadOnly;
}
if (requestParameters.searchFilter !== undefined) {
queryParameters['searchFilter'] = requestParameters.searchFilter;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/emails/offset-paginated`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageEmailProjectionFromJSON(jsonValue)
);
}
/**
* By default returns all emails across all inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages
* Get all emails in all inboxes in paginated form. Email API list all.
*/
async getEmailsOffsetPaginated(
requestParameters: GetEmailsOffsetPaginatedRequest,
initOverrides?: RequestInit
): Promise<PageEmailProjection> {
const response = await this.getEmailsOffsetPaginatedRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* By default returns all emails across all inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages
* Get all emails in all inboxes in paginated form. Email API list all.
*/
async getEmailsPaginatedRaw(
requestParameters: GetEmailsPaginatedRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageEmailProjection>> {
const queryParameters: any = {};
if (requestParameters.inboxId) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.unreadOnly !== undefined) {
queryParameters['unreadOnly'] = requestParameters.unreadOnly;
}
if (requestParameters.searchFilter !== undefined) {
queryParameters['searchFilter'] = requestParameters.searchFilter;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/emails`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageEmailProjectionFromJSON(jsonValue)
);
}
/**
* By default returns all emails across all inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages
* Get all emails in all inboxes in paginated form. Email API list all.
*/
async getEmailsPaginated(
requestParameters: GetEmailsPaginatedRequest,
initOverrides?: RequestInit
): Promise<PageEmailProjection> {
const response = await this.getEmailsPaginatedRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get gravatar url for email address
*/
async getGravatarUrlForEmailAddressRaw(
requestParameters: GetGravatarUrlForEmailAddressRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<GravatarUrl>> {
if (
requestParameters.emailAddress === null ||
requestParameters.emailAddress === undefined
) {
throw new runtime.RequiredError(
'emailAddress',
'Required parameter requestParameters.emailAddress was null or undefined when calling getGravatarUrlForEmailAddress.'
);
}
const queryParameters: any = {};
if (requestParameters.emailAddress !== undefined) {
queryParameters['emailAddress'] = requestParameters.emailAddress;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/emails/gravatarFor`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
GravatarUrlFromJSON(jsonValue)
);
}
/**
* Get gravatar url for email address
*/
async getGravatarUrlForEmailAddress(
requestParameters: GetGravatarUrlForEmailAddressRequest,
initOverrides?: RequestInit
): Promise<GravatarUrl> {
const response = await this.getGravatarUrlForEmailAddressRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get the newest email in all inboxes or in a passed set of inbox IDs
* Get latest email in all inboxes. Most recently received.
*/
async getLatestEmailRaw(
requestParameters: GetLatestEmailRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<Email>> {
const queryParameters: any = {};
if (requestParameters.inboxIds) {
queryParameters['inboxIds'] = requestParameters.inboxIds;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/emails/latest`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
EmailFromJSON(jsonValue)
);
}
/**
* Get the newest email in all inboxes or in a passed set of inbox IDs
* Get latest email in all inboxes. Most recently received.
*/
async getLatestEmail(
requestParameters: GetLatestEmailRequest,
initOverrides?: RequestInit
): Promise<Email> {
const response = await this.getLatestEmailRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get the newest email in all inboxes or in a passed set of inbox IDs
* Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet.
*/
async getLatestEmailInInbox1Raw(
requestParameters: GetLatestEmailInInbox1Request,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<Email>> {
if (
requestParameters.inboxId === null ||
requestParameters.inboxId === undefined
) {
throw new runtime.RequiredError(
'inboxId',
'Required parameter requestParameters.inboxId was null or undefined when calling getLatestEmailInInbox1.'
);
}
const queryParameters: any = {};
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/emails/latestIn`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
EmailFromJSON(jsonValue)
);
}
/**
* Get the newest email in all inboxes or in a passed set of inbox IDs
* Get latest email in an inbox. Use `WaitForController` to get emails that may not have arrived yet.
*/
async getLatestEmailInInbox1(
requestParameters: GetLatestEmailInInbox1Request,
initOverrides?: RequestInit
): Promise<Email> {
const response = await this.getLatestEmailInInbox1Raw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* By default returns all emails across all team inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages
* Get all organization emails. List team or shared test email accounts
*/
async getOrganizationEmailsPaginatedRaw(
requestParameters: GetOrganizationEmailsPaginatedRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageEmailProjection>> {
const queryParameters: any = {};
if (requestParameters.inboxId) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.unreadOnly !== undefined) {
queryParameters['unreadOnly'] = requestParameters.unreadOnly;
}
if (requestParameters.searchFilter !== undefined) {
queryParameters['searchFilter'] = requestParameters.searchFilter;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/emails/organization`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageEmailProjectionFromJSON(jsonValue)
);
}
/**
* By default returns all emails across all team inboxes sorted by ascending created at date. Responses are paginated. You can restrict results to a list of inbox IDs. You can also filter out read messages
* Get all organization emails. List team or shared test email accounts
*/
async getOrganizationEmailsPaginated(
requestParameters: GetOrganizationEmailsPaginatedRequest,
initOverrides?: RequestInit
): Promise<PageEmailProjection> {
const response = await this.getOrganizationEmailsPaginatedRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Returns a raw, unparsed, and unprocessed email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawEmailJson endpoint
* Get raw email string. Returns unparsed raw SMTP message with headers and body.
*/
async getRawEmailContentsRaw(
requestParameters: GetRawEmailContentsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
if (
requestParameters.emailId === null ||
requestParameters.emailId === undefined
) {
throw new runtime.RequiredError(
'emailId',
'Required parameter requestParameters.emailId was null or undefined when calling getRawEmailContents.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/emails/{emailId}/raw`.replace(
`{${'emailId'}}`,
encodeURIComponent(String(requestParameters.emailId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Returns a raw, unparsed, and unprocessed email. If your client has issues processing the response it is likely due to the response content-type which is text/plain. If you need a JSON response content-type use the getRawEmailJson endpoint
* Get raw email string. Returns unparsed raw SMTP message with headers and body.
*/
async getRawEmailContents(
requestParameters: GetRawEmailContentsRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.getRawEmailContentsRaw(requestParameters, initOverrides);
}
/**
* Returns a raw, unparsed, and unprocessed email wrapped in a JSON response object for easier handling when compared with the getRawEmail text/plain response
* Get raw email in JSON. Unparsed SMTP message in JSON wrapper format.
*/
async getRawEmailJsonRaw(
requestParameters: GetRawEmailJsonRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<RawEmailJson>> {
if (
requestParameters.emailId === null ||
requestParameters.emailId === undefined
) {
throw new runtime.RequiredError(
'emailId',
'Required parameter requestParameters.emailId was null or undefined when calling getRawEmailJson.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/emails/{emailId}/raw/json`.replace(
`{${'emailId'}}`,
encodeURIComponent(String(requestParameters.emailId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
RawEmailJsonFromJSON(jsonValue)
);
}
/**
* Returns a raw, unparsed, and unprocessed email wrapped in a JSON response object for easier handling when compared with the getRawEmail text/plain response
* Get raw email in JSON. Unparsed SMTP message in JSON wrapper format.
*/
async getRawEmailJson(
requestParameters: GetRawEmailJsonRequest,
initOverrides?: RequestInit
): Promise<RawEmailJson> {
const response = await this.getRawEmailJsonRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get number of emails unread. Unread means has not been viewed in dashboard or returned in an email API response
* Get unread email count
*/
async getUnreadEmailCountRaw(
requestParameters: GetUnreadEmailCountRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<UnreadCount>> {
const queryParameters: any = {};
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/emails/unreadCount`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
UnreadCountFromJSON(jsonValue)
);
}
/**
* Get number of emails unread. Unread means has not been viewed in dashboard or returned in an email API response
* Get unread email count
*/
async getUnreadEmailCount(
requestParameters: GetUnreadEmailCountRequest,
initOverrides?: RequestInit
): Promise<UnreadCount> {
const response = await this.getUnreadEmailCountRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Marks all emails as read or unread. Pass boolean read flag to set value. This is useful if you want to read an email but keep it as unread
* Mark all emails as read or unread
*/
async markAllAsReadRaw(
requestParameters: MarkAllAsReadRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
const queryParameters: any = {};
if (requestParameters.read !== undefined) {
queryParameters['read'] = requestParameters.read;
}
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/emails/read`,
method: 'PATCH',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Marks all emails as read or unread. Pass boolean read flag to set value. This is useful if you want to read an email but keep it as unread
* Mark all emails as read or unread
*/
async markAllAsRead(
requestParameters: MarkAllAsReadRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.markAllAsReadRaw(requestParameters, initOverrides);
}
/**
* Marks an email as read or unread. Pass boolean read flag to set value. This is useful if you want to read an email but keep it as unread
* Mark an email as read or unread
*/
async markAsReadRaw(
requestParameters: MarkAsReadRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<EmailPreview>> {
if (
requestParameters.emailId === null ||
requestParameters.emailId === undefined
) {
throw new runtime.RequiredError(
'emailId',
'Required parameter requestParameters.emailId was null or undefined when calling markAsRead.'
);
}
const queryParameters: any = {};
if (requestParameters.read !== undefined) {
queryParameters['read'] = requestParameters.read;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/emails/{emailId}/read`.replace(
`{${'emailId'}}`,
encodeURIComponent(String(requestParameters.emailId))
),
method: 'PATCH',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
EmailPreviewFromJSON(jsonValue)
);
}
/**
* Marks an email as read or unread. Pass boolean read flag to set value. This is useful if you want to read an email but keep it as unread
* Mark an email as read or unread
*/
async markAsRead(
requestParameters: MarkAsReadRequest,
initOverrides?: RequestInit
): Promise<EmailPreview> {
const response = await this.markAsReadRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails `to`, `cc`, and `bcc`.
* Reply to an email
*/
async replyToEmailRaw(
requestParameters: ReplyToEmailRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<SentEmailDto>> {
if (
requestParameters.emailId === null ||
requestParameters.emailId === undefined
) {
throw new runtime.RequiredError(
'emailId',
'Required parameter requestParameters.emailId was null or undefined when calling replyToEmail.'
);
}
if (
requestParameters.replyToEmailOptions === null ||
requestParameters.replyToEmailOptions === undefined
) {
throw new runtime.RequiredError(
'replyToEmailOptions',
'Required parameter requestParameters.replyToEmailOptions was null or undefined when calling replyToEmail.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/emails/{emailId}`.replace(
`{${'emailId'}}`,
encodeURIComponent(String(requestParameters.emailId))
),
method: 'PUT',
headers: headerParameters,
query: queryParameters,
body: ReplyToEmailOptionsToJSON(requestParameters.replyToEmailOptions),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
SentEmailDtoFromJSON(jsonValue)
);
}
/**
* Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails `to`, `cc`, and `bcc`.
* Reply to an email
*/
async replyToEmail(
requestParameters: ReplyToEmailRequest,
initOverrides?: RequestInit
): Promise<SentEmailDto> {
const response = await this.replyToEmailRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Search emails by given criteria return matches in paginated format. Searches against email recipients, sender, subject, email address and ID. Does not search email body
* Get all emails by search criteria. Return in paginated form.
*/
async searchEmailsRaw(
requestParameters: SearchEmailsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageEmailProjection>> {
if (
requestParameters.searchEmailsOptions === null ||
requestParameters.searchEmailsOptions === undefined
) {
throw new runtime.RequiredError(
'searchEmailsOptions',
'Required parameter requestParameters.searchEmailsOptions was null or undefined when calling searchEmails.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/emails/search`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: SearchEmailsOptionsToJSON(requestParameters.searchEmailsOptions),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageEmailProjectionFromJSON(jsonValue)
);
}
/**
* Search emails by given criteria return matches in paginated format. Searches against email recipients, sender, subject, email address and ID. Does not search email body
* Get all emails by search criteria. Return in paginated form.
*/
async searchEmails(
requestParameters: SearchEmailsRequest,
initOverrides?: RequestInit
): Promise<PageEmailProjection> {
const response = await this.searchEmailsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Alias for `InboxController.sendEmail` method - see original method for full details. Sends an email from a given inbox that you have created. If no inbox is supplied a random inbox will be created for you and used to send the email.
* Send email
*/
async sendEmailSourceOptionalRaw(
requestParameters: SendEmailSourceOptionalRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
if (
requestParameters.sendEmailOptions === null ||
requestParameters.sendEmailOptions === undefined
) {
throw new runtime.RequiredError(
'sendEmailOptions',
'Required parameter requestParameters.sendEmailOptions was null or undefined when calling sendEmailSourceOptional.'
);
}
const queryParameters: any = {};
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
if (requestParameters.useDomainPool !== undefined) {
queryParameters['useDomainPool'] = requestParameters.useDomainPool;
}
if (requestParameters.virtualSend !== undefined) {
queryParameters['virtualSend'] = requestParameters.virtualSend;
}
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/emails`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: SendEmailOptionsToJSON(requestParameters.sendEmailOptions),
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Alias for `InboxController.sendEmail` method - see original method for full details. Sends an email from a given inbox that you have created. If no inbox is supplied a random inbox will be created for you and used to send the email.
* Send email
*/
async sendEmailSourceOptional(
requestParameters: SendEmailSourceOptionalRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.sendEmailSourceOptionalRaw(requestParameters, initOverrides);
}
/**
* Validate the HTML content of email if HTML is found. Considered valid if no HTML is present.
* Validate email HTML contents
*/
async validateEmailRaw(
requestParameters: ValidateEmailRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<ValidationDto>> {
if (
requestParameters.emailId === null ||
requestParameters.emailId === undefined
) {
throw new runtime.RequiredError(
'emailId',
'Required parameter requestParameters.emailId was null or undefined when calling validateEmail.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/emails/{emailId}/validate`.replace(
`{${'emailId'}}`,
encodeURIComponent(String(requestParameters.emailId))
),
method: 'POST',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
ValidationDtoFromJSON(jsonValue)
);
}
/**
* Validate the HTML content of email if HTML is found. Considered valid if no HTML is present.
* Validate email HTML contents
*/
async validateEmail(
requestParameters: ValidateEmailRequest,
initOverrides?: RequestInit
): Promise<ValidationDto> {
const response = await this.validateEmailRaw(
requestParameters,
initOverrides
);
return await response.value();
}
}
/**
* @export
* @enum {string}
*/
export enum GetEmailsOffsetPaginatedSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum GetEmailsPaginatedSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum GetOrganizationEmailsPaginatedSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/* 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 * as runtime from '../runtime';
import {
CreateDomainOptions,
CreateDomainOptionsFromJSON,
CreateDomainOptionsToJSON,
DomainDto,
DomainDtoFromJSON,
DomainDtoToJSON,
DomainGroupsDto,
DomainGroupsDtoFromJSON,
DomainGroupsDtoToJSON,
DomainIssuesDto,
DomainIssuesDtoFromJSON,
DomainIssuesDtoToJSON,
DomainPreview,
DomainPreviewFromJSON,
DomainPreviewToJSON,
InboxDto,
InboxDtoFromJSON,
InboxDtoToJSON,
UpdateDomainOptions,
UpdateDomainOptionsFromJSON,
UpdateDomainOptionsToJSON,
} from '../models';
export interface AddDomainWildcardCatchAllRequest {
id: string;
}
export interface CreateDomainRequest {
createDomainOptions: CreateDomainOptions;
}
export interface DeleteDomainRequest {
id: string;
}
export interface GetAvailableDomainsRequest {
inboxType?: GetAvailableDomainsInboxTypeEnum;
}
export interface GetDomainRequest {
id: string;
checkForErrors?: boolean;
}
export interface GetDomainWildcardCatchAllInboxRequest {
id: string;
}
export interface GetMailSlurpDomainsRequest {
inboxType?: GetMailSlurpDomainsInboxTypeEnum;
}
export interface UpdateDomainRequest {
id: string;
updateDomainOptions: UpdateDomainOptions;
}
/**
*
*/
export class DomainControllerApi extends runtime.BaseAPI {
/**
* Add a catch all inbox to a domain so that any emails sent to it that cannot be matched will be sent to the catch all inbox generated
* Add catch all wild card inbox to domain
*/
async addDomainWildcardCatchAllRaw(
requestParameters: AddDomainWildcardCatchAllRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<DomainDto>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError(
'id',
'Required parameter requestParameters.id was null or undefined when calling addDomainWildcardCatchAll.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/domains/{id}/wildcard`.replace(
`{${'id'}}`,
encodeURIComponent(String(requestParameters.id))
),
method: 'POST',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
DomainDtoFromJSON(jsonValue)
);
}
/**
* Add a catch all inbox to a domain so that any emails sent to it that cannot be matched will be sent to the catch all inbox generated
* Add catch all wild card inbox to domain
*/
async addDomainWildcardCatchAll(
requestParameters: AddDomainWildcardCatchAllRequest,
initOverrides?: RequestInit
): Promise<DomainDto> {
const response = await this.addDomainWildcardCatchAllRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Link a domain that you own with MailSlurp so you can create email addresses using it. Endpoint returns DNS records used for validation. You must add these verification records to your host provider\'s DNS setup to verify the domain.
* Create Domain
*/
async createDomainRaw(
requestParameters: CreateDomainRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<DomainDto>> {
if (
requestParameters.createDomainOptions === null ||
requestParameters.createDomainOptions === undefined
) {
throw new runtime.RequiredError(
'createDomainOptions',
'Required parameter requestParameters.createDomainOptions was null or undefined when calling createDomain.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/domains`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: CreateDomainOptionsToJSON(requestParameters.createDomainOptions),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
DomainDtoFromJSON(jsonValue)
);
}
/**
* Link a domain that you own with MailSlurp so you can create email addresses using it. Endpoint returns DNS records used for validation. You must add these verification records to your host provider\'s DNS setup to verify the domain.
* Create Domain
*/
async createDomain(
requestParameters: CreateDomainRequest,
initOverrides?: RequestInit
): Promise<DomainDto> {
const response = await this.createDomainRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Delete a domain. This will disable any existing inboxes that use this domain.
* Delete a domain
*/
async deleteDomainRaw(
requestParameters: DeleteDomainRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<Array<string>>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError(
'id',
'Required parameter requestParameters.id was null or undefined when calling deleteDomain.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/domains/{id}`.replace(
`{${'id'}}`,
encodeURIComponent(String(requestParameters.id))
),
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse<any>(response);
}
/**
* Delete a domain. This will disable any existing inboxes that use this domain.
* Delete a domain
*/
async deleteDomain(
requestParameters: DeleteDomainRequest,
initOverrides?: RequestInit
): Promise<Array<string>> {
const response = await this.deleteDomainRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* List all domains available for use with email address creation
* Get all usable domains
*/
async getAvailableDomainsRaw(
requestParameters: GetAvailableDomainsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<DomainGroupsDto>> {
const queryParameters: any = {};
if (requestParameters.inboxType !== undefined) {
queryParameters['inboxType'] = requestParameters.inboxType;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/domains/available-domains`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
DomainGroupsDtoFromJSON(jsonValue)
);
}
/**
* List all domains available for use with email address creation
* Get all usable domains
*/
async getAvailableDomains(
requestParameters: GetAvailableDomainsRequest,
initOverrides?: RequestInit
): Promise<DomainGroupsDto> {
const response = await this.getAvailableDomainsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Returns domain verification status and tokens for a given domain
* Get a domain
*/
async getDomainRaw(
requestParameters: GetDomainRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<DomainDto>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError(
'id',
'Required parameter requestParameters.id was null or undefined when calling getDomain.'
);
}
const queryParameters: any = {};
if (requestParameters.checkForErrors !== undefined) {
queryParameters['checkForErrors'] = requestParameters.checkForErrors;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/domains/{id}`.replace(
`{${'id'}}`,
encodeURIComponent(String(requestParameters.id))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
DomainDtoFromJSON(jsonValue)
);
}
/**
* Returns domain verification status and tokens for a given domain
* Get a domain
*/
async getDomain(
requestParameters: GetDomainRequest,
initOverrides?: RequestInit
): Promise<DomainDto> {
const response = await this.getDomainRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* List domain issues for domains you have created
* Get domain issues
*/
async getDomainIssuesRaw(
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<DomainIssuesDto>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/domains/issues`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
DomainIssuesDtoFromJSON(jsonValue)
);
}
/**
* List domain issues for domains you have created
* Get domain issues
*/
async getDomainIssues(initOverrides?: RequestInit): Promise<DomainIssuesDto> {
const response = await this.getDomainIssuesRaw(initOverrides);
return await response.value();
}
/**
* Get the catch all inbox for a domain for missed emails
* Get catch all wild card inbox for domain
*/
async getDomainWildcardCatchAllInboxRaw(
requestParameters: GetDomainWildcardCatchAllInboxRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<InboxDto>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError(
'id',
'Required parameter requestParameters.id was null or undefined when calling getDomainWildcardCatchAllInbox.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/domains/{id}/wildcard`.replace(
`{${'id'}}`,
encodeURIComponent(String(requestParameters.id))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
InboxDtoFromJSON(jsonValue)
);
}
/**
* Get the catch all inbox for a domain for missed emails
* Get catch all wild card inbox for domain
*/
async getDomainWildcardCatchAllInbox(
requestParameters: GetDomainWildcardCatchAllInboxRequest,
initOverrides?: RequestInit
): Promise<InboxDto> {
const response = await this.getDomainWildcardCatchAllInboxRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* List all custom domains you have created
* Get domains
*/
async getDomainsRaw(
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<Array<DomainPreview>>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/domains`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
jsonValue.map(DomainPreviewFromJSON)
);
}
/**
* List all custom domains you have created
* Get domains
*/
async getDomains(initOverrides?: RequestInit): Promise<Array<DomainPreview>> {
const response = await this.getDomainsRaw(initOverrides);
return await response.value();
}
/**
* List all MailSlurp domains used with non-custom email addresses
* Get MailSlurp domains
*/
async getMailSlurpDomainsRaw(
requestParameters: GetMailSlurpDomainsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<DomainGroupsDto>> {
const queryParameters: any = {};
if (requestParameters.inboxType !== undefined) {
queryParameters['inboxType'] = requestParameters.inboxType;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/domains/mailslurp-domains`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
DomainGroupsDtoFromJSON(jsonValue)
);
}
/**
* List all MailSlurp domains used with non-custom email addresses
* Get MailSlurp domains
*/
async getMailSlurpDomains(
requestParameters: GetMailSlurpDomainsRequest,
initOverrides?: RequestInit
): Promise<DomainGroupsDto> {
const response = await this.getMailSlurpDomainsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Update values on a domain. Note you cannot change the domain name as it is immutable. Recreate the domain if you need to alter this.
* Update a domain
*/
async updateDomainRaw(
requestParameters: UpdateDomainRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<DomainDto>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError(
'id',
'Required parameter requestParameters.id was null or undefined when calling updateDomain.'
);
}
if (
requestParameters.updateDomainOptions === null ||
requestParameters.updateDomainOptions === undefined
) {
throw new runtime.RequiredError(
'updateDomainOptions',
'Required parameter requestParameters.updateDomainOptions was null or undefined when calling updateDomain.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/domains/{id}`.replace(
`{${'id'}}`,
encodeURIComponent(String(requestParameters.id))
),
method: 'PUT',
headers: headerParameters,
query: queryParameters,
body: UpdateDomainOptionsToJSON(requestParameters.updateDomainOptions),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
DomainDtoFromJSON(jsonValue)
);
}
/**
* Update values on a domain. Note you cannot change the domain name as it is immutable. Recreate the domain if you need to alter this.
* Update a domain
*/
async updateDomain(
requestParameters: UpdateDomainRequest,
initOverrides?: RequestInit
): Promise<DomainDto> {
const response = await this.updateDomainRaw(
requestParameters,
initOverrides
);
return await response.value();
}
}
/**
* @export
* @enum {string}
*/
export enum GetAvailableDomainsInboxTypeEnum {
HTTP_INBOX = 'HTTP_INBOX',
SMTP_INBOX = 'SMTP_INBOX',
}
/**
* @export
* @enum {string}
*/
export enum GetMailSlurpDomainsInboxTypeEnum {
HTTP_INBOX = 'HTTP_INBOX',
SMTP_INBOX = 'SMTP_INBOX',
}
/* 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 * as runtime from '../runtime';
import {
ContactDto,
ContactDtoFromJSON,
ContactDtoToJSON,
ContactProjection,
ContactProjectionFromJSON,
ContactProjectionToJSON,
CreateContactOptions,
CreateContactOptionsFromJSON,
CreateContactOptionsToJSON,
PageContactProjection,
PageContactProjectionFromJSON,
PageContactProjectionToJSON,
} from '../models';
export interface CreateContactRequest {
createContactOptions: CreateContactOptions;
}
export interface DeleteContactRequest {
contactId: string;
}
export interface GetAllContactsRequest {
page?: number;
size?: number;
sort?: GetAllContactsSortEnum;
since?: Date;
before?: Date;
search?: string;
}
export interface GetContactRequest {
contactId: string;
}
export interface GetContactVCardRequest {
contactId: string;
}
/**
*
*/
export class ContactControllerApi extends runtime.BaseAPI {
/**
* Create a contact
*/
async createContactRaw(
requestParameters: CreateContactRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<ContactDto>> {
if (
requestParameters.createContactOptions === null ||
requestParameters.createContactOptions === undefined
) {
throw new runtime.RequiredError(
'createContactOptions',
'Required parameter requestParameters.createContactOptions was null or undefined when calling createContact.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/contacts`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: CreateContactOptionsToJSON(
requestParameters.createContactOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
ContactDtoFromJSON(jsonValue)
);
}
/**
* Create a contact
*/
async createContact(
requestParameters: CreateContactRequest,
initOverrides?: RequestInit
): Promise<ContactDto> {
const response = await this.createContactRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Delete contact
*/
async deleteContactRaw(
requestParameters: DeleteContactRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
if (
requestParameters.contactId === null ||
requestParameters.contactId === undefined
) {
throw new runtime.RequiredError(
'contactId',
'Required parameter requestParameters.contactId was null or undefined when calling deleteContact.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/contacts/{contactId}`.replace(
`{${'contactId'}}`,
encodeURIComponent(String(requestParameters.contactId))
),
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Delete contact
*/
async deleteContact(
requestParameters: DeleteContactRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.deleteContactRaw(requestParameters, initOverrides);
}
/**
* Get all contacts
*/
async getAllContactsRaw(
requestParameters: GetAllContactsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageContactProjection>> {
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
if (requestParameters.search !== undefined) {
queryParameters['search'] = requestParameters.search;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/contacts/paginated`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageContactProjectionFromJSON(jsonValue)
);
}
/**
* Get all contacts
*/
async getAllContacts(
requestParameters: GetAllContactsRequest,
initOverrides?: RequestInit
): Promise<PageContactProjection> {
const response = await this.getAllContactsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get contact
*/
async getContactRaw(
requestParameters: GetContactRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<ContactDto>> {
if (
requestParameters.contactId === null ||
requestParameters.contactId === undefined
) {
throw new runtime.RequiredError(
'contactId',
'Required parameter requestParameters.contactId was null or undefined when calling getContact.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/contacts/{contactId}`.replace(
`{${'contactId'}}`,
encodeURIComponent(String(requestParameters.contactId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
ContactDtoFromJSON(jsonValue)
);
}
/**
* Get contact
*/
async getContact(
requestParameters: GetContactRequest,
initOverrides?: RequestInit
): Promise<ContactDto> {
const response = await this.getContactRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Get contact vCard vcf file
*/
async getContactVCardRaw(
requestParameters: GetContactVCardRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
if (
requestParameters.contactId === null ||
requestParameters.contactId === undefined
) {
throw new runtime.RequiredError(
'contactId',
'Required parameter requestParameters.contactId was null or undefined when calling getContactVCard.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/contacts/{contactId}/download`.replace(
`{${'contactId'}}`,
encodeURIComponent(String(requestParameters.contactId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Get contact vCard vcf file
*/
async getContactVCard(
requestParameters: GetContactVCardRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.getContactVCardRaw(requestParameters, initOverrides);
}
/**
* Get all contacts
*/
async getContactsRaw(
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<Array<ContactProjection>>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/contacts`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
jsonValue.map(ContactProjectionFromJSON)
);
}
/**
* Get all contacts
*/
async getContacts(
initOverrides?: RequestInit
): Promise<Array<ContactProjection>> {
const response = await this.getContactsRaw(initOverrides);
return await response.value();
}
}
/**
* @export
* @enum {string}
*/
export enum GetAllContactsSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/* 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 * as runtime from '../runtime';
import {
ConnectorDto,
ConnectorDtoFromJSON,
ConnectorDtoToJSON,
ConnectorImapConnectionDto,
ConnectorImapConnectionDtoFromJSON,
ConnectorImapConnectionDtoToJSON,
ConnectorSmtpConnectionDto,
ConnectorSmtpConnectionDtoFromJSON,
ConnectorSmtpConnectionDtoToJSON,
ConnectorSyncEventDto,
ConnectorSyncEventDtoFromJSON,
ConnectorSyncEventDtoToJSON,
ConnectorSyncRequestResult,
ConnectorSyncRequestResultFromJSON,
ConnectorSyncRequestResultToJSON,
CreateConnectorImapConnectionOptions,
CreateConnectorImapConnectionOptionsFromJSON,
CreateConnectorImapConnectionOptionsToJSON,
CreateConnectorOptions,
CreateConnectorOptionsFromJSON,
CreateConnectorOptionsToJSON,
CreateConnectorSmtpConnectionOptions,
CreateConnectorSmtpConnectionOptionsFromJSON,
CreateConnectorSmtpConnectionOptionsToJSON,
PageConnector,
PageConnectorFromJSON,
PageConnectorToJSON,
PageConnectorSyncEvents,
PageConnectorSyncEventsFromJSON,
PageConnectorSyncEventsToJSON,
} from '../models';
export interface CreateConnectorRequest {
createConnectorOptions: CreateConnectorOptions;
}
export interface CreateConnectorImapConnectionRequest {
id: string;
createConnectorImapConnectionOptions: CreateConnectorImapConnectionOptions;
}
export interface CreateConnectorSmtpConnectionRequest {
id: string;
createConnectorSmtpConnectionOptions: CreateConnectorSmtpConnectionOptions;
}
export interface DeleteConnectorRequest {
id: string;
}
export interface DeleteConnectorImapConnectionRequest {
id: string;
}
export interface DeleteConnectorSmtpConnectionRequest {
id: string;
}
export interface GetAllConnectorSyncEventsRequest {
page?: number;
size?: number;
sort?: GetAllConnectorSyncEventsSortEnum;
since?: Date;
before?: Date;
}
export interface GetConnectorRequest {
id: string;
}
export interface GetConnectorSyncEventRequest {
id: string;
}
export interface GetConnectorSyncEventsRequest {
id: string;
page?: number;
size?: number;
sort?: GetConnectorSyncEventsSortEnum;
since?: Date;
before?: Date;
}
export interface GetConnectorsRequest {
page?: number;
size?: number;
sort?: GetConnectorsSortEnum;
since?: Date;
before?: Date;
}
export interface SyncConnectorRequest {
id: string;
}
export interface UpdateConnectorRequest {
id: string;
createConnectorOptions: CreateConnectorOptions;
}
/**
*
*/
export class ConnectorControllerApi extends runtime.BaseAPI {
/**
* Sync emails between external mailboxes and MailSlurp inboxes
* Create an inbox connector
*/
async createConnectorRaw(
requestParameters: CreateConnectorRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<ConnectorDto>> {
if (
requestParameters.createConnectorOptions === null ||
requestParameters.createConnectorOptions === undefined
) {
throw new runtime.RequiredError(
'createConnectorOptions',
'Required parameter requestParameters.createConnectorOptions was null or undefined when calling createConnector.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/connectors`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: CreateConnectorOptionsToJSON(
requestParameters.createConnectorOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
ConnectorDtoFromJSON(jsonValue)
);
}
/**
* Sync emails between external mailboxes and MailSlurp inboxes
* Create an inbox connector
*/
async createConnector(
requestParameters: CreateConnectorRequest,
initOverrides?: RequestInit
): Promise<ConnectorDto> {
const response = await this.createConnectorRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Allows the reading of emails in an external mailbox and syncing to a MailSlurp inbox
* Create an inbox connector IMAP connection
*/
async createConnectorImapConnectionRaw(
requestParameters: CreateConnectorImapConnectionRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<ConnectorImapConnectionDto>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError(
'id',
'Required parameter requestParameters.id was null or undefined when calling createConnectorImapConnection.'
);
}
if (
requestParameters.createConnectorImapConnectionOptions === null ||
requestParameters.createConnectorImapConnectionOptions === undefined
) {
throw new runtime.RequiredError(
'createConnectorImapConnectionOptions',
'Required parameter requestParameters.createConnectorImapConnectionOptions was null or undefined when calling createConnectorImapConnection.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/connectors/{id}/imap`.replace(
`{${'id'}}`,
encodeURIComponent(String(requestParameters.id))
),
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: CreateConnectorImapConnectionOptionsToJSON(
requestParameters.createConnectorImapConnectionOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
ConnectorImapConnectionDtoFromJSON(jsonValue)
);
}
/**
* Allows the reading of emails in an external mailbox and syncing to a MailSlurp inbox
* Create an inbox connector IMAP connection
*/
async createConnectorImapConnection(
requestParameters: CreateConnectorImapConnectionRequest,
initOverrides?: RequestInit
): Promise<ConnectorImapConnectionDto> {
const response = await this.createConnectorImapConnectionRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Allows sending via connector and email is routed to connected inbox and sent via SMTP
* Create an inbox connector SMTP connection
*/
async createConnectorSmtpConnectionRaw(
requestParameters: CreateConnectorSmtpConnectionRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<ConnectorSmtpConnectionDto>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError(
'id',
'Required parameter requestParameters.id was null or undefined when calling createConnectorSmtpConnection.'
);
}
if (
requestParameters.createConnectorSmtpConnectionOptions === null ||
requestParameters.createConnectorSmtpConnectionOptions === undefined
) {
throw new runtime.RequiredError(
'createConnectorSmtpConnectionOptions',
'Required parameter requestParameters.createConnectorSmtpConnectionOptions was null or undefined when calling createConnectorSmtpConnection.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/connectors/{id}/smtp`.replace(
`{${'id'}}`,
encodeURIComponent(String(requestParameters.id))
),
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: CreateConnectorSmtpConnectionOptionsToJSON(
requestParameters.createConnectorSmtpConnectionOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
ConnectorSmtpConnectionDtoFromJSON(jsonValue)
);
}
/**
* Allows sending via connector and email is routed to connected inbox and sent via SMTP
* Create an inbox connector SMTP connection
*/
async createConnectorSmtpConnection(
requestParameters: CreateConnectorSmtpConnectionRequest,
initOverrides?: RequestInit
): Promise<ConnectorSmtpConnectionDto> {
const response = await this.createConnectorSmtpConnectionRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Delete all inbox connectors
*/
async deleteAllConnectorRaw(
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/connectors`,
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Delete all inbox connectors
*/
async deleteAllConnector(initOverrides?: RequestInit): Promise<void> {
await this.deleteAllConnectorRaw(initOverrides);
}
/**
* Delete an inbox connector
*/
async deleteConnectorRaw(
requestParameters: DeleteConnectorRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError(
'id',
'Required parameter requestParameters.id was null or undefined when calling deleteConnector.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/connectors/{id}`.replace(
`{${'id'}}`,
encodeURIComponent(String(requestParameters.id))
),
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Delete an inbox connector
*/
async deleteConnector(
requestParameters: DeleteConnectorRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.deleteConnectorRaw(requestParameters, initOverrides);
}
/**
* Delete IMAP connection for external inbox
* Delete an inbox connector IMAP connection
*/
async deleteConnectorImapConnectionRaw(
requestParameters: DeleteConnectorImapConnectionRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError(
'id',
'Required parameter requestParameters.id was null or undefined when calling deleteConnectorImapConnection.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/connectors/{id}/imap`.replace(
`{${'id'}}`,
encodeURIComponent(String(requestParameters.id))
),
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Delete IMAP connection for external inbox
* Delete an inbox connector IMAP connection
*/
async deleteConnectorImapConnection(
requestParameters: DeleteConnectorImapConnectionRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.deleteConnectorImapConnectionRaw(
requestParameters,
initOverrides
);
}
/**
* Delete SMTP connection for external inbox
* Delete an inbox connector SMTP connection
*/
async deleteConnectorSmtpConnectionRaw(
requestParameters: DeleteConnectorSmtpConnectionRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError(
'id',
'Required parameter requestParameters.id was null or undefined when calling deleteConnectorSmtpConnection.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/connectors/{id}/smtp`.replace(
`{${'id'}}`,
encodeURIComponent(String(requestParameters.id))
),
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Delete SMTP connection for external inbox
* Delete an inbox connector SMTP connection
*/
async deleteConnectorSmtpConnection(
requestParameters: DeleteConnectorSmtpConnectionRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.deleteConnectorSmtpConnectionRaw(
requestParameters,
initOverrides
);
}
/**
* Get all inbox connector sync events
*/
async getAllConnectorSyncEventsRaw(
requestParameters: GetAllConnectorSyncEventsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageConnectorSyncEvents>> {
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/connectors/events`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageConnectorSyncEventsFromJSON(jsonValue)
);
}
/**
* Get all inbox connector sync events
*/
async getAllConnectorSyncEvents(
requestParameters: GetAllConnectorSyncEventsRequest,
initOverrides?: RequestInit
): Promise<PageConnectorSyncEvents> {
const response = await this.getAllConnectorSyncEventsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get an inbox connector
*/
async getConnectorRaw(
requestParameters: GetConnectorRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<ConnectorDto>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError(
'id',
'Required parameter requestParameters.id was null or undefined when calling getConnector.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/connectors/{id}`.replace(
`{${'id'}}`,
encodeURIComponent(String(requestParameters.id))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
ConnectorDtoFromJSON(jsonValue)
);
}
/**
* Get an inbox connector
*/
async getConnector(
requestParameters: GetConnectorRequest,
initOverrides?: RequestInit
): Promise<ConnectorDto> {
const response = await this.getConnectorRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get an inbox connector sync event
*/
async getConnectorSyncEventRaw(
requestParameters: GetConnectorSyncEventRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<ConnectorSyncEventDto>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError(
'id',
'Required parameter requestParameters.id was null or undefined when calling getConnectorSyncEvent.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/connectors/events/{id}`.replace(
`{${'id'}}`,
encodeURIComponent(String(requestParameters.id))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
ConnectorSyncEventDtoFromJSON(jsonValue)
);
}
/**
* Get an inbox connector sync event
*/
async getConnectorSyncEvent(
requestParameters: GetConnectorSyncEventRequest,
initOverrides?: RequestInit
): Promise<ConnectorSyncEventDto> {
const response = await this.getConnectorSyncEventRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get an inbox connector sync events
*/
async getConnectorSyncEventsRaw(
requestParameters: GetConnectorSyncEventsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageConnectorSyncEvents>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError(
'id',
'Required parameter requestParameters.id was null or undefined when calling getConnectorSyncEvents.'
);
}
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/connectors/{id}/events`.replace(
`{${'id'}}`,
encodeURIComponent(String(requestParameters.id))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageConnectorSyncEventsFromJSON(jsonValue)
);
}
/**
* Get an inbox connector sync events
*/
async getConnectorSyncEvents(
requestParameters: GetConnectorSyncEventsRequest,
initOverrides?: RequestInit
): Promise<PageConnectorSyncEvents> {
const response = await this.getConnectorSyncEventsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* List inbox connectors that sync external emails to MailSlurp inboxes
* Get inbox connectors
*/
async getConnectorsRaw(
requestParameters: GetConnectorsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageConnector>> {
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/connectors`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageConnectorFromJSON(jsonValue)
);
}
/**
* List inbox connectors that sync external emails to MailSlurp inboxes
* Get inbox connectors
*/
async getConnectors(
requestParameters: GetConnectorsRequest,
initOverrides?: RequestInit
): Promise<PageConnector> {
const response = await this.getConnectorsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Sync an inbox connector
*/
async syncConnectorRaw(
requestParameters: SyncConnectorRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<ConnectorSyncRequestResult>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError(
'id',
'Required parameter requestParameters.id was null or undefined when calling syncConnector.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/connectors/{id}/sync`.replace(
`{${'id'}}`,
encodeURIComponent(String(requestParameters.id))
),
method: 'POST',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
ConnectorSyncRequestResultFromJSON(jsonValue)
);
}
/**
* Sync an inbox connector
*/
async syncConnector(
requestParameters: SyncConnectorRequest,
initOverrides?: RequestInit
): Promise<ConnectorSyncRequestResult> {
const response = await this.syncConnectorRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Update an inbox connector
*/
async updateConnectorRaw(
requestParameters: UpdateConnectorRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<ConnectorDto>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError(
'id',
'Required parameter requestParameters.id was null or undefined when calling updateConnector.'
);
}
if (
requestParameters.createConnectorOptions === null ||
requestParameters.createConnectorOptions === undefined
) {
throw new runtime.RequiredError(
'createConnectorOptions',
'Required parameter requestParameters.createConnectorOptions was null or undefined when calling updateConnector.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/connectors/{id}`.replace(
`{${'id'}}`,
encodeURIComponent(String(requestParameters.id))
),
method: 'PUT',
headers: headerParameters,
query: queryParameters,
body: CreateConnectorOptionsToJSON(
requestParameters.createConnectorOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
ConnectorDtoFromJSON(jsonValue)
);
}
/**
* Update an inbox connector
*/
async updateConnector(
requestParameters: UpdateConnectorRequest,
initOverrides?: RequestInit
): Promise<ConnectorDto> {
const response = await this.updateConnectorRaw(
requestParameters,
initOverrides
);
return await response.value();
}
}
/**
* @export
* @enum {string}
*/
export enum GetAllConnectorSyncEventsSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum GetConnectorSyncEventsSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum GetConnectorsSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/* 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 * as runtime from '../runtime';
import {
InboxDto,
InboxDtoFromJSON,
InboxDtoToJSON,
SimpleSendEmailOptions,
SimpleSendEmailOptionsFromJSON,
SimpleSendEmailOptionsToJSON,
} from '../models';
export interface CreateNewEmailAddressRequest {
allowTeamAccess?: boolean;
useDomainPool?: boolean;
expiresAt?: Date;
expiresIn?: number;
emailAddress?: string;
inboxType?: CreateNewEmailAddressInboxTypeEnum;
description?: string;
name?: string;
tags?: Array<string>;
favourite?: boolean;
virtualInbox?: boolean;
useShortAddress?: boolean;
domainName?: string;
domainId?: string;
prefix?: string;
}
export interface CreateRandomInboxRequest {
allowTeamAccess?: boolean;
useDomainPool?: boolean;
expiresAt?: Date;
expiresIn?: number;
emailAddress?: string;
inboxType?: CreateRandomInboxInboxTypeEnum;
description?: string;
name?: string;
tags?: Array<string>;
favourite?: boolean;
virtualInbox?: boolean;
useShortAddress?: boolean;
domainName?: string;
domainId?: string;
prefix?: string;
}
export interface DeleteEmailAddressRequest {
inboxId: string;
}
export interface EmptyInboxRequest {
inboxId: string;
}
export interface SendEmailQueryRequest {
to: string;
senderId?: string;
body?: string;
subject?: string;
}
export interface SendEmailSimpleRequest {
simpleSendEmailOptions: SimpleSendEmailOptions;
}
/**
*
*/
export class CommonActionsControllerApi extends runtime.BaseAPI {
/**
* Returns an Inbox with an `id` and an `emailAddress`
* Create new random inbox
*/
async createNewEmailAddressRaw(
requestParameters: CreateNewEmailAddressRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<InboxDto>> {
const queryParameters: any = {};
if (requestParameters.allowTeamAccess !== undefined) {
queryParameters['allowTeamAccess'] = requestParameters.allowTeamAccess;
}
if (requestParameters.useDomainPool !== undefined) {
queryParameters['useDomainPool'] = requestParameters.useDomainPool;
}
if (requestParameters.expiresAt !== undefined) {
queryParameters['expiresAt'] = (
requestParameters.expiresAt as any
).toISOString();
}
if (requestParameters.expiresIn !== undefined) {
queryParameters['expiresIn'] = requestParameters.expiresIn;
}
if (requestParameters.emailAddress !== undefined) {
queryParameters['emailAddress'] = requestParameters.emailAddress;
}
if (requestParameters.inboxType !== undefined) {
queryParameters['inboxType'] = requestParameters.inboxType;
}
if (requestParameters.description !== undefined) {
queryParameters['description'] = requestParameters.description;
}
if (requestParameters.name !== undefined) {
queryParameters['name'] = requestParameters.name;
}
if (requestParameters.tags) {
queryParameters['tags'] = requestParameters.tags;
}
if (requestParameters.favourite !== undefined) {
queryParameters['favourite'] = requestParameters.favourite;
}
if (requestParameters.virtualInbox !== undefined) {
queryParameters['virtualInbox'] = requestParameters.virtualInbox;
}
if (requestParameters.useShortAddress !== undefined) {
queryParameters['useShortAddress'] = requestParameters.useShortAddress;
}
if (requestParameters.domainName !== undefined) {
queryParameters['domainName'] = requestParameters.domainName;
}
if (requestParameters.domainId !== undefined) {
queryParameters['domainId'] = requestParameters.domainId;
}
if (requestParameters.prefix !== undefined) {
queryParameters['prefix'] = requestParameters.prefix;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/newEmailAddress`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
InboxDtoFromJSON(jsonValue)
);
}
/**
* Returns an Inbox with an `id` and an `emailAddress`
* Create new random inbox
*/
async createNewEmailAddress(
requestParameters: CreateNewEmailAddressRequest,
initOverrides?: RequestInit
): Promise<InboxDto> {
const response = await this.createNewEmailAddressRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Returns an Inbox with an `id` and an `emailAddress`
* Create new random inbox
*/
async createRandomInboxRaw(
requestParameters: CreateRandomInboxRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<InboxDto>> {
const queryParameters: any = {};
if (requestParameters.allowTeamAccess !== undefined) {
queryParameters['allowTeamAccess'] = requestParameters.allowTeamAccess;
}
if (requestParameters.useDomainPool !== undefined) {
queryParameters['useDomainPool'] = requestParameters.useDomainPool;
}
if (requestParameters.expiresAt !== undefined) {
queryParameters['expiresAt'] = (
requestParameters.expiresAt as any
).toISOString();
}
if (requestParameters.expiresIn !== undefined) {
queryParameters['expiresIn'] = requestParameters.expiresIn;
}
if (requestParameters.emailAddress !== undefined) {
queryParameters['emailAddress'] = requestParameters.emailAddress;
}
if (requestParameters.inboxType !== undefined) {
queryParameters['inboxType'] = requestParameters.inboxType;
}
if (requestParameters.description !== undefined) {
queryParameters['description'] = requestParameters.description;
}
if (requestParameters.name !== undefined) {
queryParameters['name'] = requestParameters.name;
}
if (requestParameters.tags) {
queryParameters['tags'] = requestParameters.tags;
}
if (requestParameters.favourite !== undefined) {
queryParameters['favourite'] = requestParameters.favourite;
}
if (requestParameters.virtualInbox !== undefined) {
queryParameters['virtualInbox'] = requestParameters.virtualInbox;
}
if (requestParameters.useShortAddress !== undefined) {
queryParameters['useShortAddress'] = requestParameters.useShortAddress;
}
if (requestParameters.domainName !== undefined) {
queryParameters['domainName'] = requestParameters.domainName;
}
if (requestParameters.domainId !== undefined) {
queryParameters['domainId'] = requestParameters.domainId;
}
if (requestParameters.prefix !== undefined) {
queryParameters['prefix'] = requestParameters.prefix;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/createInbox`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
InboxDtoFromJSON(jsonValue)
);
}
/**
* Returns an Inbox with an `id` and an `emailAddress`
* Create new random inbox
*/
async createRandomInbox(
requestParameters: CreateRandomInboxRequest,
initOverrides?: RequestInit
): Promise<InboxDto> {
const response = await this.createRandomInboxRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Deletes inbox email address
* Delete inbox email address by inbox id
*/
async deleteEmailAddressRaw(
requestParameters: DeleteEmailAddressRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
if (
requestParameters.inboxId === null ||
requestParameters.inboxId === undefined
) {
throw new runtime.RequiredError(
'inboxId',
'Required parameter requestParameters.inboxId was null or undefined when calling deleteEmailAddress.'
);
}
const queryParameters: any = {};
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/deleteEmailAddress`,
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Deletes inbox email address
* Delete inbox email address by inbox id
*/
async deleteEmailAddress(
requestParameters: DeleteEmailAddressRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.deleteEmailAddressRaw(requestParameters, initOverrides);
}
/**
* Deletes all emails
* Delete all emails in an inbox
*/
async emptyInboxRaw(
requestParameters: EmptyInboxRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
if (
requestParameters.inboxId === null ||
requestParameters.inboxId === undefined
) {
throw new runtime.RequiredError(
'inboxId',
'Required parameter requestParameters.inboxId was null or undefined when calling emptyInbox.'
);
}
const queryParameters: any = {};
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/emptyInbox`,
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Deletes all emails
* Delete all emails in an inbox
*/
async emptyInbox(
requestParameters: EmptyInboxRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.emptyInboxRaw(requestParameters, initOverrides);
}
/**
* If no senderId or inboxId provided a random email address will be used to send from. Ensure your parameters are URL encoded.
* Send an email using query parameters
*/
async sendEmailQueryRaw(
requestParameters: SendEmailQueryRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
if (requestParameters.to === null || requestParameters.to === undefined) {
throw new runtime.RequiredError(
'to',
'Required parameter requestParameters.to was null or undefined when calling sendEmailQuery.'
);
}
const queryParameters: any = {};
if (requestParameters.senderId !== undefined) {
queryParameters['senderId'] = requestParameters.senderId;
}
if (requestParameters.to !== undefined) {
queryParameters['to'] = requestParameters.to;
}
if (requestParameters.body !== undefined) {
queryParameters['body'] = requestParameters.body;
}
if (requestParameters.subject !== undefined) {
queryParameters['subject'] = requestParameters.subject;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/sendEmailQuery`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* If no senderId or inboxId provided a random email address will be used to send from. Ensure your parameters are URL encoded.
* Send an email using query parameters
*/
async sendEmailQuery(
requestParameters: SendEmailQueryRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.sendEmailQueryRaw(requestParameters, initOverrides);
}
/**
* If no senderId or inboxId provided a random email address will be used to send from.
* Send an email
*/
async sendEmailSimpleRaw(
requestParameters: SendEmailSimpleRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
if (
requestParameters.simpleSendEmailOptions === null ||
requestParameters.simpleSendEmailOptions === undefined
) {
throw new runtime.RequiredError(
'simpleSendEmailOptions',
'Required parameter requestParameters.simpleSendEmailOptions was null or undefined when calling sendEmailSimple.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/sendEmail`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: SimpleSendEmailOptionsToJSON(
requestParameters.simpleSendEmailOptions
),
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* If no senderId or inboxId provided a random email address will be used to send from.
* Send an email
*/
async sendEmailSimple(
requestParameters: SendEmailSimpleRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.sendEmailSimpleRaw(requestParameters, initOverrides);
}
}
/**
* @export
* @enum {string}
*/
export enum CreateNewEmailAddressInboxTypeEnum {
HTTP_INBOX = 'HTTP_INBOX',
SMTP_INBOX = 'SMTP_INBOX',
}
/**
* @export
* @enum {string}
*/
export enum CreateRandomInboxInboxTypeEnum {
HTTP_INBOX = 'HTTP_INBOX',
SMTP_INBOX = 'SMTP_INBOX',
}
/* 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 * as runtime from '../runtime';
import {
BulkSendEmailOptions,
BulkSendEmailOptionsFromJSON,
BulkSendEmailOptionsToJSON,
InboxDto,
InboxDtoFromJSON,
InboxDtoToJSON,
} from '../models';
export interface BulkCreateInboxesRequest {
count: number;
}
export interface BulkDeleteInboxesRequest {
requestBody: Array<string>;
}
export interface BulkSendEmailsRequest {
bulkSendEmailOptions: BulkSendEmailOptions;
}
/**
*
*/
export class BulkActionsControllerApi extends runtime.BaseAPI {
/**
* Bulk create Inboxes (email addresses)
*/
async bulkCreateInboxesRaw(
requestParameters: BulkCreateInboxesRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<Array<InboxDto>>> {
if (
requestParameters.count === null ||
requestParameters.count === undefined
) {
throw new runtime.RequiredError(
'count',
'Required parameter requestParameters.count was null or undefined when calling bulkCreateInboxes.'
);
}
const queryParameters: any = {};
if (requestParameters.count !== undefined) {
queryParameters['count'] = requestParameters.count;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/bulk/inboxes`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
jsonValue.map(InboxDtoFromJSON)
);
}
/**
* Bulk create Inboxes (email addresses)
*/
async bulkCreateInboxes(
requestParameters: BulkCreateInboxesRequest,
initOverrides?: RequestInit
): Promise<Array<InboxDto>> {
const response = await this.bulkCreateInboxesRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Bulk Delete Inboxes
*/
async bulkDeleteInboxesRaw(
requestParameters: BulkDeleteInboxesRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
if (
requestParameters.requestBody === null ||
requestParameters.requestBody === undefined
) {
throw new runtime.RequiredError(
'requestBody',
'Required parameter requestParameters.requestBody was null or undefined when calling bulkDeleteInboxes.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/bulk/inboxes`,
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
body: requestParameters.requestBody,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Bulk Delete Inboxes
*/
async bulkDeleteInboxes(
requestParameters: BulkDeleteInboxesRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.bulkDeleteInboxesRaw(requestParameters, initOverrides);
}
/**
* Bulk Send Emails
*/
async bulkSendEmailsRaw(
requestParameters: BulkSendEmailsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
if (
requestParameters.bulkSendEmailOptions === null ||
requestParameters.bulkSendEmailOptions === undefined
) {
throw new runtime.RequiredError(
'bulkSendEmailOptions',
'Required parameter requestParameters.bulkSendEmailOptions was null or undefined when calling bulkSendEmails.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/bulk/send`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: BulkSendEmailOptionsToJSON(
requestParameters.bulkSendEmailOptions
),
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Bulk Send Emails
*/
async bulkSendEmails(
requestParameters: BulkSendEmailsRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.bulkSendEmailsRaw(requestParameters, initOverrides);
}
}
/* 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 * as runtime from '../runtime';
import {
AccountBounceBlockDto,
AccountBounceBlockDtoFromJSON,
AccountBounceBlockDtoToJSON,
BouncedEmailDto,
BouncedEmailDtoFromJSON,
BouncedEmailDtoToJSON,
BouncedRecipientDto,
BouncedRecipientDtoFromJSON,
BouncedRecipientDtoToJSON,
Complaint,
ComplaintFromJSON,
ComplaintToJSON,
FilterBouncedRecipientsOptions,
FilterBouncedRecipientsOptionsFromJSON,
FilterBouncedRecipientsOptionsToJSON,
FilterBouncedRecipientsResult,
FilterBouncedRecipientsResultFromJSON,
FilterBouncedRecipientsResultToJSON,
PageBouncedEmail,
PageBouncedEmailFromJSON,
PageBouncedEmailToJSON,
PageBouncedRecipients,
PageBouncedRecipientsFromJSON,
PageBouncedRecipientsToJSON,
PageComplaint,
PageComplaintFromJSON,
PageComplaintToJSON,
PageListUnsubscribeRecipients,
PageListUnsubscribeRecipientsFromJSON,
PageListUnsubscribeRecipientsToJSON,
} from '../models';
export interface FilterBouncedRecipientRequest {
filterBouncedRecipientsOptions: FilterBouncedRecipientsOptions;
}
export interface GetBouncedEmailRequest {
id: string;
}
export interface GetBouncedEmailsRequest {
page?: number;
size?: number;
sort?: GetBouncedEmailsSortEnum;
since?: Date;
before?: Date;
}
export interface GetBouncedRecipientRequest {
id: string;
}
export interface GetBouncedRecipientsRequest {
page?: number;
size?: number;
sort?: GetBouncedRecipientsSortEnum;
since?: Date;
before?: Date;
}
export interface GetComplaintRequest {
id: string;
}
export interface GetComplaintsRequest {
page?: number;
size?: number;
sort?: GetComplaintsSortEnum;
since?: Date;
before?: Date;
}
export interface GetListUnsubscribeRecipientsRequest {
page?: number;
size?: number;
sort?: GetListUnsubscribeRecipientsSortEnum;
domainId?: string;
}
/**
*
*/
export class BounceControllerApi extends runtime.BaseAPI {
/**
* Prevent email sending errors by remove recipients who have resulted in past email bounces or complaints
* Filter a list of email recipients and remove those who have bounced
*/
async filterBouncedRecipientRaw(
requestParameters: FilterBouncedRecipientRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<FilterBouncedRecipientsResult>> {
if (
requestParameters.filterBouncedRecipientsOptions === null ||
requestParameters.filterBouncedRecipientsOptions === undefined
) {
throw new runtime.RequiredError(
'filterBouncedRecipientsOptions',
'Required parameter requestParameters.filterBouncedRecipientsOptions was null or undefined when calling filterBouncedRecipient.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/bounce/filter-recipients`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: FilterBouncedRecipientsOptionsToJSON(
requestParameters.filterBouncedRecipientsOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
FilterBouncedRecipientsResultFromJSON(jsonValue)
);
}
/**
* Prevent email sending errors by remove recipients who have resulted in past email bounces or complaints
* Filter a list of email recipients and remove those who have bounced
*/
async filterBouncedRecipient(
requestParameters: FilterBouncedRecipientRequest,
initOverrides?: RequestInit
): Promise<FilterBouncedRecipientsResult> {
const response = await this.filterBouncedRecipientRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Check if account block status prevents sending
* Can account send email
*/
async getAccountBounceBlockStatusRaw(
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<AccountBounceBlockDto>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/bounce/account-block`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
AccountBounceBlockDtoFromJSON(jsonValue)
);
}
/**
* Check if account block status prevents sending
* Can account send email
*/
async getAccountBounceBlockStatus(
initOverrides?: RequestInit
): Promise<AccountBounceBlockDto> {
const response = await this.getAccountBounceBlockStatusRaw(initOverrides);
return await response.value();
}
/**
* Bounced emails are email you have sent that were rejected by a recipient
* Get a bounced email.
*/
async getBouncedEmailRaw(
requestParameters: GetBouncedEmailRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<BouncedEmailDto>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError(
'id',
'Required parameter requestParameters.id was null or undefined when calling getBouncedEmail.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/bounce/emails/{id}`.replace(
`{${'id'}}`,
encodeURIComponent(String(requestParameters.id))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
BouncedEmailDtoFromJSON(jsonValue)
);
}
/**
* Bounced emails are email you have sent that were rejected by a recipient
* Get a bounced email.
*/
async getBouncedEmail(
requestParameters: GetBouncedEmailRequest,
initOverrides?: RequestInit
): Promise<BouncedEmailDto> {
const response = await this.getBouncedEmailRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Bounced emails are email you have sent that were rejected by a recipient
* Get paginated list of bounced emails.
*/
async getBouncedEmailsRaw(
requestParameters: GetBouncedEmailsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageBouncedEmail>> {
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/bounce/emails`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageBouncedEmailFromJSON(jsonValue)
);
}
/**
* Bounced emails are email you have sent that were rejected by a recipient
* Get paginated list of bounced emails.
*/
async getBouncedEmails(
requestParameters: GetBouncedEmailsRequest,
initOverrides?: RequestInit
): Promise<PageBouncedEmail> {
const response = await this.getBouncedEmailsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Bounced emails are email you have sent that were rejected by a recipient
* Get a bounced email.
*/
async getBouncedRecipientRaw(
requestParameters: GetBouncedRecipientRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<BouncedRecipientDto>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError(
'id',
'Required parameter requestParameters.id was null or undefined when calling getBouncedRecipient.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/bounce/recipients/{id}`.replace(
`{${'id'}}`,
encodeURIComponent(String(requestParameters.id))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
BouncedRecipientDtoFromJSON(jsonValue)
);
}
/**
* Bounced emails are email you have sent that were rejected by a recipient
* Get a bounced email.
*/
async getBouncedRecipient(
requestParameters: GetBouncedRecipientRequest,
initOverrides?: RequestInit
): Promise<BouncedRecipientDto> {
const response = await this.getBouncedRecipientRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Bounced recipients are email addresses that you have sent emails to that did not accept the sent email. Once a recipient is bounced you cannot send emails to that address.
* Get paginated list of bounced recipients.
*/
async getBouncedRecipientsRaw(
requestParameters: GetBouncedRecipientsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageBouncedRecipients>> {
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/bounce/recipients`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageBouncedRecipientsFromJSON(jsonValue)
);
}
/**
* Bounced recipients are email addresses that you have sent emails to that did not accept the sent email. Once a recipient is bounced you cannot send emails to that address.
* Get paginated list of bounced recipients.
*/
async getBouncedRecipients(
requestParameters: GetBouncedRecipientsRequest,
initOverrides?: RequestInit
): Promise<PageBouncedRecipients> {
const response = await this.getBouncedRecipientsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get complaint
* Get complaint
*/
async getComplaintRaw(
requestParameters: GetComplaintRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<Complaint>> {
if (requestParameters.id === null || requestParameters.id === undefined) {
throw new runtime.RequiredError(
'id',
'Required parameter requestParameters.id was null or undefined when calling getComplaint.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/bounce/complaints/{id}`.replace(
`{${'id'}}`,
encodeURIComponent(String(requestParameters.id))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
ComplaintFromJSON(jsonValue)
);
}
/**
* Get complaint
* Get complaint
*/
async getComplaint(
requestParameters: GetComplaintRequest,
initOverrides?: RequestInit
): Promise<Complaint> {
const response = await this.getComplaintRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* SMTP complaints made against your account
* Get paginated list of complaints.
*/
async getComplaintsRaw(
requestParameters: GetComplaintsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageComplaint>> {
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/bounce/complaints`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageComplaintFromJSON(jsonValue)
);
}
/**
* SMTP complaints made against your account
* Get paginated list of complaints.
*/
async getComplaints(
requestParameters: GetComplaintsRequest,
initOverrides?: RequestInit
): Promise<PageComplaint> {
const response = await this.getComplaintsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Unsubscribed recipient have unsubscribed from a mailing list for a user or domain and cannot be contacted again.
* Get paginated list of unsubscribed recipients.
*/
async getListUnsubscribeRecipientsRaw(
requestParameters: GetListUnsubscribeRecipientsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageListUnsubscribeRecipients>> {
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.domainId !== undefined) {
queryParameters['domainId'] = requestParameters.domainId;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/bounce/list-unsubscribe-recipients`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageListUnsubscribeRecipientsFromJSON(jsonValue)
);
}
/**
* Unsubscribed recipient have unsubscribed from a mailing list for a user or domain and cannot be contacted again.
* Get paginated list of unsubscribed recipients.
*/
async getListUnsubscribeRecipients(
requestParameters: GetListUnsubscribeRecipientsRequest,
initOverrides?: RequestInit
): Promise<PageListUnsubscribeRecipients> {
const response = await this.getListUnsubscribeRecipientsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
}
/**
* @export
* @enum {string}
*/
export enum GetBouncedEmailsSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum GetBouncedRecipientsSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum GetComplaintsSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum GetListUnsubscribeRecipientsSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/* 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 * as runtime from '../runtime';
import {
AttachmentEntity,
AttachmentEntityFromJSON,
AttachmentEntityToJSON,
AttachmentMetaData,
AttachmentMetaDataFromJSON,
AttachmentMetaDataToJSON,
DownloadAttachmentDto,
DownloadAttachmentDtoFromJSON,
DownloadAttachmentDtoToJSON,
InlineObject,
InlineObjectFromJSON,
InlineObjectToJSON,
PageAttachmentEntity,
PageAttachmentEntityFromJSON,
PageAttachmentEntityToJSON,
UploadAttachmentOptions,
UploadAttachmentOptionsFromJSON,
UploadAttachmentOptionsToJSON,
} from '../models';
export interface DeleteAttachmentRequest {
attachmentId: string;
}
export interface DownloadAttachmentAsBase64EncodedRequest {
attachmentId: string;
}
export interface DownloadAttachmentAsBytesRequest {
attachmentId: string;
}
export interface GetAttachmentRequest {
attachmentId: string;
}
export interface GetAttachmentInfoRequest {
attachmentId: string;
}
export interface GetAttachmentsRequest {
page?: number;
size?: number;
sort?: GetAttachmentsSortEnum;
fileNameFilter?: string;
since?: Date;
before?: Date;
inboxId?: string;
}
export interface UploadAttachmentRequest {
uploadAttachmentOptions: UploadAttachmentOptions;
}
export interface UploadAttachmentBytesRequest {
contentType?: string;
contentType2?: string;
contentId?: string;
filename?: string;
filename2?: string;
}
export interface UploadMultipartFormRequest {
contentId?: string;
contentType?: string;
filename?: string;
xFilename?: string;
inlineObject?: InlineObject;
}
/**
*
*/
export class AttachmentControllerApi extends runtime.BaseAPI {
/**
* Delete all attachments
*/
async deleteAllAttachmentsRaw(
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/attachments`,
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Delete all attachments
*/
async deleteAllAttachments(initOverrides?: RequestInit): Promise<void> {
await this.deleteAllAttachmentsRaw(initOverrides);
}
/**
* Delete an attachment
*/
async deleteAttachmentRaw(
requestParameters: DeleteAttachmentRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
if (
requestParameters.attachmentId === null ||
requestParameters.attachmentId === undefined
) {
throw new runtime.RequiredError(
'attachmentId',
'Required parameter requestParameters.attachmentId was null or undefined when calling deleteAttachment.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/attachments/{attachmentId}`.replace(
`{${'attachmentId'}}`,
encodeURIComponent(String(requestParameters.attachmentId))
),
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Delete an attachment
*/
async deleteAttachment(
requestParameters: DeleteAttachmentRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.deleteAttachmentRaw(requestParameters, initOverrides);
}
/**
* Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the `downloadAttachment` method but allows some clients to get around issues with binary responses.
* Get email attachment as base64 encoded string as alternative to binary responses. To read the content decode the Base64 encoded contents.
*/
async downloadAttachmentAsBase64EncodedRaw(
requestParameters: DownloadAttachmentAsBase64EncodedRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<DownloadAttachmentDto>> {
if (
requestParameters.attachmentId === null ||
requestParameters.attachmentId === undefined
) {
throw new runtime.RequiredError(
'attachmentId',
'Required parameter requestParameters.attachmentId was null or undefined when calling downloadAttachmentAsBase64Encoded.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/attachments/{attachmentId}/base64`.replace(
`{${'attachmentId'}}`,
encodeURIComponent(String(requestParameters.attachmentId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
DownloadAttachmentDtoFromJSON(jsonValue)
);
}
/**
* Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the `downloadAttachment` method but allows some clients to get around issues with binary responses.
* Get email attachment as base64 encoded string as alternative to binary responses. To read the content decode the Base64 encoded contents.
*/
async downloadAttachmentAsBase64Encoded(
requestParameters: DownloadAttachmentAsBase64EncodedRequest,
initOverrides?: RequestInit
): Promise<DownloadAttachmentDto> {
const response = await this.downloadAttachmentAsBase64EncodedRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream.
* Download attachments. Get email attachment bytes. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints.
*/
async downloadAttachmentAsBytesRaw(
requestParameters: DownloadAttachmentAsBytesRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<string>> {
if (
requestParameters.attachmentId === null ||
requestParameters.attachmentId === undefined
) {
throw new runtime.RequiredError(
'attachmentId',
'Required parameter requestParameters.attachmentId was null or undefined when calling downloadAttachmentAsBytes.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/attachments/{attachmentId}/bytes`.replace(
`{${'attachmentId'}}`,
encodeURIComponent(String(requestParameters.attachmentId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.TextApiResponse(response) as any;
}
/**
* Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream.
* Download attachments. Get email attachment bytes. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints.
*/
async downloadAttachmentAsBytes(
requestParameters: DownloadAttachmentAsBytesRequest,
initOverrides?: RequestInit
): Promise<string> {
const response = await this.downloadAttachmentAsBytesRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get an attachment entity
*/
async getAttachmentRaw(
requestParameters: GetAttachmentRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<AttachmentEntity>> {
if (
requestParameters.attachmentId === null ||
requestParameters.attachmentId === undefined
) {
throw new runtime.RequiredError(
'attachmentId',
'Required parameter requestParameters.attachmentId was null or undefined when calling getAttachment.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/attachments/{attachmentId}`.replace(
`{${'attachmentId'}}`,
encodeURIComponent(String(requestParameters.attachmentId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
AttachmentEntityFromJSON(jsonValue)
);
}
/**
* Get an attachment entity
*/
async getAttachment(
requestParameters: GetAttachmentRequest,
initOverrides?: RequestInit
): Promise<AttachmentEntity> {
const response = await this.getAttachmentRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Returns the metadata for an attachment. It is saved separately to the content of the attachment. Contains properties `name` and `content-type` and `content-length` in bytes for a given attachment.
* Get email attachment metadata information
*/
async getAttachmentInfoRaw(
requestParameters: GetAttachmentInfoRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<AttachmentMetaData>> {
if (
requestParameters.attachmentId === null ||
requestParameters.attachmentId === undefined
) {
throw new runtime.RequiredError(
'attachmentId',
'Required parameter requestParameters.attachmentId was null or undefined when calling getAttachmentInfo.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/attachments/{attachmentId}/metadata`.replace(
`{${'attachmentId'}}`,
encodeURIComponent(String(requestParameters.attachmentId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
AttachmentMetaDataFromJSON(jsonValue)
);
}
/**
* Returns the metadata for an attachment. It is saved separately to the content of the attachment. Contains properties `name` and `content-type` and `content-length` in bytes for a given attachment.
* Get email attachment metadata information
*/
async getAttachmentInfo(
requestParameters: GetAttachmentInfoRequest,
initOverrides?: RequestInit
): Promise<AttachmentMetaData> {
const response = await this.getAttachmentInfoRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get all attachments in paginated response. Each entity contains meta data for the attachment such as `name` and `content-type`. Use the `attachmentId` and the download endpoints to get the file contents.
* Get email attachments
*/
async getAttachmentsRaw(
requestParameters: GetAttachmentsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageAttachmentEntity>> {
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.fileNameFilter !== undefined) {
queryParameters['fileNameFilter'] = requestParameters.fileNameFilter;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
if (requestParameters.inboxId !== undefined) {
queryParameters['inboxId'] = requestParameters.inboxId;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/attachments`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageAttachmentEntityFromJSON(jsonValue)
);
}
/**
* Get all attachments in paginated response. Each entity contains meta data for the attachment such as `name` and `content-type`. Use the `attachmentId` and the download endpoints to get the file contents.
* Get email attachments
*/
async getAttachments(
requestParameters: GetAttachmentsRequest,
initOverrides?: RequestInit
): Promise<PageAttachmentEntity> {
const response = await this.getAttachmentsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Upload an attachment for sending using base64 file encoding. Returns an array whose first element is the ID of the uploaded attachment.
*/
async uploadAttachmentRaw(
requestParameters: UploadAttachmentRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<Array<string>>> {
if (
requestParameters.uploadAttachmentOptions === null ||
requestParameters.uploadAttachmentOptions === undefined
) {
throw new runtime.RequiredError(
'uploadAttachmentOptions',
'Required parameter requestParameters.uploadAttachmentOptions was null or undefined when calling uploadAttachment.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/attachments`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: UploadAttachmentOptionsToJSON(
requestParameters.uploadAttachmentOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse<any>(response);
}
/**
* Upload an attachment for sending using base64 file encoding. Returns an array whose first element is the ID of the uploaded attachment.
*/
async uploadAttachment(
requestParameters: UploadAttachmentRequest,
initOverrides?: RequestInit
): Promise<Array<string>> {
const response = await this.uploadAttachmentRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Upload an attachment for sending using file byte stream input octet stream. Returns an array whose first element is the ID of the uploaded attachment.
*/
async uploadAttachmentBytesRaw(
requestParameters: UploadAttachmentBytesRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<Array<string>>> {
const queryParameters: any = {};
if (requestParameters.contentType2 !== undefined) {
queryParameters['contentType'] = requestParameters.contentType2;
}
if (requestParameters.contentId !== undefined) {
queryParameters['contentId'] = requestParameters.contentId;
}
if (requestParameters.filename !== undefined) {
queryParameters['filename'] = requestParameters.filename;
}
const headerParameters: runtime.HTTPHeaders = {};
if (
requestParameters.contentType !== undefined &&
requestParameters.contentType !== null
) {
headerParameters['contentType'] = String(requestParameters.contentType);
}
if (
requestParameters.filename2 !== undefined &&
requestParameters.filename2 !== null
) {
headerParameters['filename'] = String(requestParameters.filename2);
}
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/attachments/bytes`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse<any>(response);
}
/**
* Upload an attachment for sending using file byte stream input octet stream. Returns an array whose first element is the ID of the uploaded attachment.
*/
async uploadAttachmentBytes(
requestParameters: UploadAttachmentBytesRequest,
initOverrides?: RequestInit
): Promise<Array<string>> {
const response = await this.uploadAttachmentBytesRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Upload an attachment for sending using a Multipart Form request. Returns an array whose first element is the ID of the uploaded attachment.
*/
async uploadMultipartFormRaw(
requestParameters: UploadMultipartFormRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<Array<string>>> {
const queryParameters: any = {};
if (requestParameters.contentId !== undefined) {
queryParameters['contentId'] = requestParameters.contentId;
}
if (requestParameters.contentType !== undefined) {
queryParameters['contentType'] = requestParameters.contentType;
}
if (requestParameters.filename !== undefined) {
queryParameters['filename'] = requestParameters.filename;
}
if (requestParameters.xFilename !== undefined) {
queryParameters['x-filename'] = requestParameters.xFilename;
}
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/attachments/multipart`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: InlineObjectToJSON(requestParameters.inlineObject),
},
initOverrides
);
return new runtime.JSONApiResponse<any>(response);
}
/**
* Upload an attachment for sending using a Multipart Form request. Returns an array whose first element is the ID of the uploaded attachment.
*/
async uploadMultipartForm(
requestParameters: UploadMultipartFormRequest,
initOverrides?: RequestInit
): Promise<Array<string>> {
const response = await this.uploadMultipartFormRaw(
requestParameters,
initOverrides
);
return await response.value();
}
}
/**
* @export
* @enum {string}
*/
export enum GetAttachmentsSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/* 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 * as runtime from '../runtime';
import {
AliasDto,
AliasDtoFromJSON,
AliasDtoToJSON,
CreateAliasOptions,
CreateAliasOptionsFromJSON,
CreateAliasOptionsToJSON,
PageAlias,
PageAliasFromJSON,
PageAliasToJSON,
PageEmailProjection,
PageEmailProjectionFromJSON,
PageEmailProjectionToJSON,
PageThreadProjection,
PageThreadProjectionFromJSON,
PageThreadProjectionToJSON,
ReplyToAliasEmailOptions,
ReplyToAliasEmailOptionsFromJSON,
ReplyToAliasEmailOptionsToJSON,
SendEmailOptions,
SendEmailOptionsFromJSON,
SendEmailOptionsToJSON,
SentEmailDto,
SentEmailDtoFromJSON,
SentEmailDtoToJSON,
ThreadProjection,
ThreadProjectionFromJSON,
ThreadProjectionToJSON,
UpdateAliasOptions,
UpdateAliasOptionsFromJSON,
UpdateAliasOptionsToJSON,
} from '../models';
export interface CreateAliasRequest {
createAliasOptions: CreateAliasOptions;
}
export interface DeleteAliasRequest {
aliasId: string;
}
export interface GetAliasRequest {
aliasId: string;
}
export interface GetAliasEmailsRequest {
aliasId: string;
page?: number;
size?: number;
sort?: GetAliasEmailsSortEnum;
since?: Date;
before?: Date;
}
export interface GetAliasThreadsRequest {
aliasId: string;
page?: number;
size?: number;
sort?: GetAliasThreadsSortEnum;
since?: Date;
before?: Date;
}
export interface GetAliasesRequest {
search?: string;
page?: number;
size?: number;
sort?: GetAliasesSortEnum;
since?: Date;
before?: Date;
}
export interface GetThreadRequest {
threadId: string;
}
export interface GetThreadsPaginatedRequest {
page?: number;
size?: number;
sort?: GetThreadsPaginatedSortEnum;
since?: Date;
before?: Date;
}
export interface ReplyToAliasEmailRequest {
aliasId: string;
emailId: string;
replyToAliasEmailOptions: ReplyToAliasEmailOptions;
}
export interface SendAliasEmailRequest {
aliasId: string;
sendEmailOptions: SendEmailOptions;
}
export interface UpdateAliasRequest {
aliasId: string;
updateAliasOptions: UpdateAliasOptions;
}
/**
*
*/
export class AliasControllerApi extends runtime.BaseAPI {
/**
* Email aliases use a MailSlurp randomly generated email address (or a custom domain inbox that you provide) to mask or proxy a real email address. Emails sent to the alias address will be forwarded to the hidden email address it was created for. If you want to send a reply use the threadId attached
* Create an email alias. Must be verified by clicking link inside verification email that will be sent to the address. Once verified the alias will be active.
*/
async createAliasRaw(
requestParameters: CreateAliasRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<AliasDto>> {
if (
requestParameters.createAliasOptions === null ||
requestParameters.createAliasOptions === undefined
) {
throw new runtime.RequiredError(
'createAliasOptions',
'Required parameter requestParameters.createAliasOptions was null or undefined when calling createAlias.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/aliases`,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: CreateAliasOptionsToJSON(requestParameters.createAliasOptions),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
AliasDtoFromJSON(jsonValue)
);
}
/**
* Email aliases use a MailSlurp randomly generated email address (or a custom domain inbox that you provide) to mask or proxy a real email address. Emails sent to the alias address will be forwarded to the hidden email address it was created for. If you want to send a reply use the threadId attached
* Create an email alias. Must be verified by clicking link inside verification email that will be sent to the address. Once verified the alias will be active.
*/
async createAlias(
requestParameters: CreateAliasRequest,
initOverrides?: RequestInit
): Promise<AliasDto> {
const response = await this.createAliasRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Delete an email alias
*/
async deleteAliasRaw(
requestParameters: DeleteAliasRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<void>> {
if (
requestParameters.aliasId === null ||
requestParameters.aliasId === undefined
) {
throw new runtime.RequiredError(
'aliasId',
'Required parameter requestParameters.aliasId was null or undefined when calling deleteAlias.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/aliases/{aliasId}`.replace(
`{${'aliasId'}}`,
encodeURIComponent(String(requestParameters.aliasId))
),
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.VoidApiResponse(response);
}
/**
* Delete an email alias
*/
async deleteAlias(
requestParameters: DeleteAliasRequest,
initOverrides?: RequestInit
): Promise<void> {
await this.deleteAliasRaw(requestParameters, initOverrides);
}
/**
* Get an email alias by ID
* Get an email alias
*/
async getAliasRaw(
requestParameters: GetAliasRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<AliasDto>> {
if (
requestParameters.aliasId === null ||
requestParameters.aliasId === undefined
) {
throw new runtime.RequiredError(
'aliasId',
'Required parameter requestParameters.aliasId was null or undefined when calling getAlias.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/aliases/{aliasId}`.replace(
`{${'aliasId'}}`,
encodeURIComponent(String(requestParameters.aliasId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
AliasDtoFromJSON(jsonValue)
);
}
/**
* Get an email alias by ID
* Get an email alias
*/
async getAlias(
requestParameters: GetAliasRequest,
initOverrides?: RequestInit
): Promise<AliasDto> {
const response = await this.getAliasRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Get paginated emails for an alias by ID
* Get emails for an alias
*/
async getAliasEmailsRaw(
requestParameters: GetAliasEmailsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageEmailProjection>> {
if (
requestParameters.aliasId === null ||
requestParameters.aliasId === undefined
) {
throw new runtime.RequiredError(
'aliasId',
'Required parameter requestParameters.aliasId was null or undefined when calling getAliasEmails.'
);
}
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/aliases/{aliasId}/emails`.replace(
`{${'aliasId'}}`,
encodeURIComponent(String(requestParameters.aliasId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageEmailProjectionFromJSON(jsonValue)
);
}
/**
* Get paginated emails for an alias by ID
* Get emails for an alias
*/
async getAliasEmails(
requestParameters: GetAliasEmailsRequest,
initOverrides?: RequestInit
): Promise<PageEmailProjection> {
const response = await this.getAliasEmailsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Returns threads created for an email alias in paginated form
* Get threads created for an alias
*/
async getAliasThreadsRaw(
requestParameters: GetAliasThreadsRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageThreadProjection>> {
if (
requestParameters.aliasId === null ||
requestParameters.aliasId === undefined
) {
throw new runtime.RequiredError(
'aliasId',
'Required parameter requestParameters.aliasId was null or undefined when calling getAliasThreads.'
);
}
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/aliases/{aliasId}/threads`.replace(
`{${'aliasId'}}`,
encodeURIComponent(String(requestParameters.aliasId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageThreadProjectionFromJSON(jsonValue)
);
}
/**
* Returns threads created for an email alias in paginated form
* Get threads created for an alias
*/
async getAliasThreads(
requestParameters: GetAliasThreadsRequest,
initOverrides?: RequestInit
): Promise<PageThreadProjection> {
const response = await this.getAliasThreadsRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Get all email aliases in paginated form
* Get all email aliases you have created
*/
async getAliasesRaw(
requestParameters: GetAliasesRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageAlias>> {
const queryParameters: any = {};
if (requestParameters.search !== undefined) {
queryParameters['search'] = requestParameters.search;
}
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/aliases`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageAliasFromJSON(jsonValue)
);
}
/**
* Get all email aliases in paginated form
* Get all email aliases you have created
*/
async getAliases(
requestParameters: GetAliasesRequest,
initOverrides?: RequestInit
): Promise<PageAlias> {
const response = await this.getAliasesRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Return a thread associated with an alias
* Get a thread
*/
async getThreadRaw(
requestParameters: GetThreadRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<ThreadProjection>> {
if (
requestParameters.threadId === null ||
requestParameters.threadId === undefined
) {
throw new runtime.RequiredError(
'threadId',
'Required parameter requestParameters.threadId was null or undefined when calling getThread.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/aliases/threads/{threadId}`.replace(
`{${'threadId'}}`,
encodeURIComponent(String(requestParameters.threadId))
),
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
ThreadProjectionFromJSON(jsonValue)
);
}
/**
* Return a thread associated with an alias
* Get a thread
*/
async getThread(
requestParameters: GetThreadRequest,
initOverrides?: RequestInit
): Promise<ThreadProjection> {
const response = await this.getThreadRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Returns threads created for all aliases in paginated form
* Get all threads
*/
async getThreadsPaginatedRaw(
requestParameters: GetThreadsPaginatedRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<PageThreadProjection>> {
const queryParameters: any = {};
if (requestParameters.page !== undefined) {
queryParameters['page'] = requestParameters.page;
}
if (requestParameters.size !== undefined) {
queryParameters['size'] = requestParameters.size;
}
if (requestParameters.sort !== undefined) {
queryParameters['sort'] = requestParameters.sort;
}
if (requestParameters.since !== undefined) {
queryParameters['since'] = (requestParameters.since as any).toISOString();
}
if (requestParameters.before !== undefined) {
queryParameters['before'] = (
requestParameters.before as any
).toISOString();
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/aliases/threads`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
PageThreadProjectionFromJSON(jsonValue)
);
}
/**
* Returns threads created for all aliases in paginated form
* Get all threads
*/
async getThreadsPaginated(
requestParameters: GetThreadsPaginatedRequest,
initOverrides?: RequestInit
): Promise<PageThreadProjection> {
const response = await this.getThreadsPaginatedRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails `to`, `cc`, and `bcc`.
* Reply to an email
*/
async replyToAliasEmailRaw(
requestParameters: ReplyToAliasEmailRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<SentEmailDto>> {
if (
requestParameters.aliasId === null ||
requestParameters.aliasId === undefined
) {
throw new runtime.RequiredError(
'aliasId',
'Required parameter requestParameters.aliasId was null or undefined when calling replyToAliasEmail.'
);
}
if (
requestParameters.emailId === null ||
requestParameters.emailId === undefined
) {
throw new runtime.RequiredError(
'emailId',
'Required parameter requestParameters.emailId was null or undefined when calling replyToAliasEmail.'
);
}
if (
requestParameters.replyToAliasEmailOptions === null ||
requestParameters.replyToAliasEmailOptions === undefined
) {
throw new runtime.RequiredError(
'replyToAliasEmailOptions',
'Required parameter requestParameters.replyToAliasEmailOptions was null or undefined when calling replyToAliasEmail.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/aliases/{aliasId}/emails/{emailId}`
.replace(
`{${'aliasId'}}`,
encodeURIComponent(String(requestParameters.aliasId))
)
.replace(
`{${'emailId'}}`,
encodeURIComponent(String(requestParameters.emailId))
),
method: 'PUT',
headers: headerParameters,
query: queryParameters,
body: ReplyToAliasEmailOptionsToJSON(
requestParameters.replyToAliasEmailOptions
),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
SentEmailDtoFromJSON(jsonValue)
);
}
/**
* Send the reply to the email sender or reply-to and include same subject cc bcc etc. Reply to an email and the contents will be sent with the existing subject to the emails `to`, `cc`, and `bcc`.
* Reply to an email
*/
async replyToAliasEmail(
requestParameters: ReplyToAliasEmailRequest,
initOverrides?: RequestInit
): Promise<SentEmailDto> {
const response = await this.replyToAliasEmailRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Send an email from an alias. Replies to the email will be forwarded to the alias masked email address
* Send an email from an alias inbox
*/
async sendAliasEmailRaw(
requestParameters: SendAliasEmailRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<SentEmailDto>> {
if (
requestParameters.aliasId === null ||
requestParameters.aliasId === undefined
) {
throw new runtime.RequiredError(
'aliasId',
'Required parameter requestParameters.aliasId was null or undefined when calling sendAliasEmail.'
);
}
if (
requestParameters.sendEmailOptions === null ||
requestParameters.sendEmailOptions === undefined
) {
throw new runtime.RequiredError(
'sendEmailOptions',
'Required parameter requestParameters.sendEmailOptions was null or undefined when calling sendAliasEmail.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/aliases/{aliasId}/emails`.replace(
`{${'aliasId'}}`,
encodeURIComponent(String(requestParameters.aliasId))
),
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: SendEmailOptionsToJSON(requestParameters.sendEmailOptions),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
SentEmailDtoFromJSON(jsonValue)
);
}
/**
* Send an email from an alias. Replies to the email will be forwarded to the alias masked email address
* Send an email from an alias inbox
*/
async sendAliasEmail(
requestParameters: SendAliasEmailRequest,
initOverrides?: RequestInit
): Promise<SentEmailDto> {
const response = await this.sendAliasEmailRaw(
requestParameters,
initOverrides
);
return await response.value();
}
/**
* Update an email alias
*/
async updateAliasRaw(
requestParameters: UpdateAliasRequest,
initOverrides?: RequestInit
): Promise<runtime.ApiResponse<AliasDto>> {
if (
requestParameters.aliasId === null ||
requestParameters.aliasId === undefined
) {
throw new runtime.RequiredError(
'aliasId',
'Required parameter requestParameters.aliasId was null or undefined when calling updateAlias.'
);
}
if (
requestParameters.updateAliasOptions === null ||
requestParameters.updateAliasOptions === undefined
) {
throw new runtime.RequiredError(
'updateAliasOptions',
'Required parameter requestParameters.updateAliasOptions was null or undefined when calling updateAlias.'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.apiKey) {
headerParameters['x-api-key'] = this.configuration.apiKey('x-api-key'); // API_KEY authentication
}
const response = await this.request(
{
path: `/aliases/{aliasId}`.replace(
`{${'aliasId'}}`,
encodeURIComponent(String(requestParameters.aliasId))
),
method: 'PUT',
headers: headerParameters,
query: queryParameters,
body: UpdateAliasOptionsToJSON(requestParameters.updateAliasOptions),
},
initOverrides
);
return new runtime.JSONApiResponse(response, (jsonValue) =>
AliasDtoFromJSON(jsonValue)
);
}
/**
* Update an email alias
*/
async updateAlias(
requestParameters: UpdateAliasRequest,
initOverrides?: RequestInit
): Promise<AliasDto> {
const response = await this.updateAliasRaw(
requestParameters,
initOverrides
);
return await response.value();
}
}
/**
* @export
* @enum {string}
*/
export enum GetAliasEmailsSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum GetAliasThreadsSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum GetAliasesSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}
/**
* @export
* @enum {string}
*/
export enum GetThreadsPaginatedSortEnum {
ASC = 'ASC',
DESC = 'DESC',
}