/* tslint:disable */ /* eslint-disable */ /** * MailSlurp API * MailSlurp is an API for sending and receiving emails and SMS from dynamically allocated email addresses and phone numbers. It\'s designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository * * The version of the OpenAPI document: 6.5.2 * Contact: contact@mailslurp.dev * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import * as runtime from '../runtime'; import { AnalyzeDmarcReportOptions, AnalyzeDmarcReportOptionsFromJSON, AnalyzeDmarcReportOptionsToJSON, AnalyzeDmarcReportResults, AnalyzeDmarcReportResultsFromJSON, AnalyzeDmarcReportResultsToJSON, AnalyzeEmailHeadersOptions, AnalyzeEmailHeadersOptionsFromJSON, AnalyzeEmailHeadersOptionsToJSON, AnalyzeEmailHeadersResults, AnalyzeEmailHeadersResultsFromJSON, AnalyzeEmailHeadersResultsToJSON, CheckCampaignProbeOptions, CheckCampaignProbeOptionsFromJSON, CheckCampaignProbeOptionsToJSON, CheckCampaignProbeResults, CheckCampaignProbeResultsFromJSON, CheckCampaignProbeResultsToJSON, CheckDnsPropagationOptions, CheckDnsPropagationOptionsFromJSON, CheckDnsPropagationOptionsToJSON, CheckDnsPropagationResults, CheckDnsPropagationResultsFromJSON, CheckDnsPropagationResultsToJSON, CheckDomainMonitorOptions, CheckDomainMonitorOptionsFromJSON, CheckDomainMonitorOptionsToJSON, CheckDomainMonitorResults, CheckDomainMonitorResultsFromJSON, CheckDomainMonitorResultsToJSON, CheckEmailAuditOptions, CheckEmailAuditOptionsFromJSON, CheckEmailAuditOptionsToJSON, CheckEmailAuthStackOptions, CheckEmailAuthStackOptionsFromJSON, CheckEmailAuthStackOptionsToJSON, CheckEmailAuthStackResults, CheckEmailAuthStackResultsFromJSON, CheckEmailAuthStackResultsToJSON, CheckEmailBlacklistOptions, CheckEmailBlacklistOptionsFromJSON, CheckEmailBlacklistOptionsToJSON, CheckEmailBlacklistResults, CheckEmailBlacklistResultsFromJSON, CheckEmailBlacklistResultsToJSON, CheckEmailFeaturesClientSupportOptions, CheckEmailFeaturesClientSupportOptionsFromJSON, CheckEmailFeaturesClientSupportOptionsToJSON, CheckEmailFeaturesClientSupportResults, CheckEmailFeaturesClientSupportResultsFromJSON, CheckEmailFeaturesClientSupportResultsToJSON, EmailAuditAnalysisResult, EmailAuditAnalysisResultFromJSON, EmailAuditAnalysisResultToJSON, FakeEmailPreview, FakeEmailPreviewFromJSON, FakeEmailPreviewToJSON, FakeEmailResult, FakeEmailResultFromJSON, FakeEmailResultToJSON, GenerateBimiRecordOptions, GenerateBimiRecordOptionsFromJSON, GenerateBimiRecordOptionsToJSON, GenerateBimiRecordResults, GenerateBimiRecordResultsFromJSON, GenerateBimiRecordResultsToJSON, GenerateDmarcRecordOptions, GenerateDmarcRecordOptionsFromJSON, GenerateDmarcRecordOptionsToJSON, GenerateDmarcRecordResults, GenerateDmarcRecordResultsFromJSON, GenerateDmarcRecordResultsToJSON, GenerateMtaStsRecordOptions, GenerateMtaStsRecordOptionsFromJSON, GenerateMtaStsRecordOptionsToJSON, GenerateMtaStsRecordResults, GenerateMtaStsRecordResultsFromJSON, GenerateMtaStsRecordResultsToJSON, GenerateSpfRecordOptions, GenerateSpfRecordOptionsFromJSON, GenerateSpfRecordOptionsToJSON, GenerateSpfRecordResults, GenerateSpfRecordResultsFromJSON, GenerateSpfRecordResultsToJSON, GenerateTlsReportingRecordOptions, GenerateTlsReportingRecordOptionsFromJSON, GenerateTlsReportingRecordOptionsToJSON, GenerateTlsReportingRecordResults, GenerateTlsReportingRecordResultsFromJSON, GenerateTlsReportingRecordResultsToJSON, LookupBimiDomainOptions, LookupBimiDomainOptionsFromJSON, LookupBimiDomainOptionsToJSON, LookupBimiDomainResults, LookupBimiDomainResultsFromJSON, LookupBimiDomainResultsToJSON, LookupDkimDomainOptions, LookupDkimDomainOptionsFromJSON, LookupDkimDomainOptionsToJSON, LookupDkimDomainResults, LookupDkimDomainResultsFromJSON, LookupDkimDomainResultsToJSON, LookupDmarcDomainOptions, LookupDmarcDomainOptionsFromJSON, LookupDmarcDomainOptionsToJSON, LookupDmarcDomainResults, LookupDmarcDomainResultsFromJSON, LookupDmarcDomainResultsToJSON, LookupMtaStsDomainOptions, LookupMtaStsDomainOptionsFromJSON, LookupMtaStsDomainOptionsToJSON, LookupMtaStsDomainResults, LookupMtaStsDomainResultsFromJSON, LookupMtaStsDomainResultsToJSON, LookupMxRecordsOptions, LookupMxRecordsOptionsFromJSON, LookupMxRecordsOptionsToJSON, LookupMxRecordsResults, LookupMxRecordsResultsFromJSON, LookupMxRecordsResultsToJSON, LookupPtrOptions, LookupPtrOptionsFromJSON, LookupPtrOptionsToJSON, LookupPtrResults, LookupPtrResultsFromJSON, LookupPtrResultsToJSON, LookupSpfDomainOptions, LookupSpfDomainOptionsFromJSON, LookupSpfDomainOptionsToJSON, LookupSpfDomainResults, LookupSpfDomainResultsFromJSON, LookupSpfDomainResultsToJSON, LookupTlsReportingDomainOptions, LookupTlsReportingDomainOptionsFromJSON, LookupTlsReportingDomainOptionsToJSON, LookupTlsReportingDomainResults, LookupTlsReportingDomainResultsFromJSON, LookupTlsReportingDomainResultsToJSON, NewFakeEmailAddressResult, NewFakeEmailAddressResultFromJSON, NewFakeEmailAddressResultToJSON, TestSmtpServerOptions, TestSmtpServerOptionsFromJSON, TestSmtpServerOptionsToJSON, TestSmtpServerResults, TestSmtpServerResultsFromJSON, TestSmtpServerResultsToJSON, } from '../models'; export interface AnalyzeDmarcReportRequest { analyzeDmarcReportOptions: AnalyzeDmarcReportOptions; } export interface AnalyzeEmailHeadersRequest { analyzeEmailHeadersOptions: AnalyzeEmailHeadersOptions; } export interface CheckCampaignProbeRequest { checkCampaignProbeOptions: CheckCampaignProbeOptions; } export interface CheckDnsPropagationRequest { checkDnsPropagationOptions: CheckDnsPropagationOptions; } export interface CheckDomainMonitorRequest { checkDomainMonitorOptions: CheckDomainMonitorOptions; } export interface CheckEmailAuditRequest { checkEmailAuditOptions: CheckEmailAuditOptions; } export interface CheckEmailAuthStackRequest { checkEmailAuthStackOptions: CheckEmailAuthStackOptions; } export interface CheckEmailBlacklistRequest { checkEmailBlacklistOptions: CheckEmailBlacklistOptions; } export interface CheckEmailFeaturesClientSupportRequest { checkEmailFeaturesClientSupportOptions: CheckEmailFeaturesClientSupportOptions; } export interface DeleteNewFakeEmailAddressRequest { emailAddress: string; } export interface GenerateBimiRecordRequest { generateBimiRecordOptions: GenerateBimiRecordOptions; } export interface GenerateDmarcRecordRequest { generateDmarcRecordOptions: GenerateDmarcRecordOptions; } export interface GenerateMtaStsRecordRequest { generateMtaStsRecordOptions: GenerateMtaStsRecordOptions; } export interface GenerateSpfRecordRequest { generateSpfRecordOptions: GenerateSpfRecordOptions; } export interface GenerateTlsReportingRecordRequest { generateTlsReportingRecordOptions: GenerateTlsReportingRecordOptions; } export interface GetFakeEmailByEmailAddressRequest { emailAddress: string; } export interface GetFakeEmailByIdRequest { id: string; } export interface GetFakeEmailRawRequest { id: string; } export interface GetFakeEmailsForAddressRequest { emailAddress: string; page?: number; } export interface LookupBimiDomainRequest { lookupBimiDomainOptions: LookupBimiDomainOptions; } export interface LookupDkimDomainRequest { lookupDkimDomainOptions: LookupDkimDomainOptions; } export interface LookupDmarcDomainRequest { lookupDmarcDomainOptions: LookupDmarcDomainOptions; } export interface LookupMtaStsDomainRequest { lookupMtaStsDomainOptions: LookupMtaStsDomainOptions; } export interface LookupMxRecordRequest { lookupMxRecordsOptions: LookupMxRecordsOptions; } export interface LookupPtrRequest { lookupPtrOptions: LookupPtrOptions; } export interface LookupSpfDomainRequest { lookupSpfDomainOptions: LookupSpfDomainOptions; } export interface LookupTlsReportingDomainRequest { lookupTlsReportingDomainOptions: LookupTlsReportingDomainOptions; } export interface TestSmtpServerRequest { testSmtpServerOptions: TestSmtpServerOptions; } /** * */ export class ToolsControllerApi extends runtime.BaseAPI { /** * Parse and summarize a DMARC aggregate XML report */ async analyzeDmarcReportRaw( requestParameters: AnalyzeDmarcReportRequest, initOverrides?: RequestInit ): Promise> { if ( requestParameters.analyzeDmarcReportOptions === null || requestParameters.analyzeDmarcReportOptions === undefined ) { throw new runtime.RequiredError( 'analyzeDmarcReportOptions', 'Required parameter requestParameters.analyzeDmarcReportOptions was null or undefined when calling analyzeDmarcReport.' ); } 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/analyze-dmarc-report`, method: 'POST', headers: headerParameters, query: queryParameters, body: AnalyzeDmarcReportOptionsToJSON( requestParameters.analyzeDmarcReportOptions ), }, initOverrides ); return new runtime.JSONApiResponse(response, (jsonValue) => AnalyzeDmarcReportResultsFromJSON(jsonValue) ); } /** * Parse and summarize a DMARC aggregate XML report */ async analyzeDmarcReport( requestParameters: AnalyzeDmarcReportRequest, initOverrides?: RequestInit ): Promise { const response = await this.analyzeDmarcReportRaw( requestParameters, initOverrides ); return await response.value(); } /** * Analyze email headers for auth results and delivery path */ async analyzeEmailHeadersRaw( requestParameters: AnalyzeEmailHeadersRequest, initOverrides?: RequestInit ): Promise> { if ( requestParameters.analyzeEmailHeadersOptions === null || requestParameters.analyzeEmailHeadersOptions === undefined ) { throw new runtime.RequiredError( 'analyzeEmailHeadersOptions', 'Required parameter requestParameters.analyzeEmailHeadersOptions was null or undefined when calling analyzeEmailHeaders.' ); } 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/analyze-email-headers`, method: 'POST', headers: headerParameters, query: queryParameters, body: AnalyzeEmailHeadersOptionsToJSON( requestParameters.analyzeEmailHeadersOptions ), }, initOverrides ); return new runtime.JSONApiResponse(response, (jsonValue) => AnalyzeEmailHeadersResultsFromJSON(jsonValue) ); } /** * Analyze email headers for auth results and delivery path */ async analyzeEmailHeaders( requestParameters: AnalyzeEmailHeadersRequest, initOverrides?: RequestInit ): Promise { const response = await this.analyzeEmailHeadersRaw( requestParameters, initOverrides ); return await response.value(); } /** * Run a one-shot free campaign probe preflight check */ async checkCampaignProbeRaw( requestParameters: CheckCampaignProbeRequest, initOverrides?: RequestInit ): Promise> { if ( requestParameters.checkCampaignProbeOptions === null || requestParameters.checkCampaignProbeOptions === undefined ) { throw new runtime.RequiredError( 'checkCampaignProbeOptions', 'Required parameter requestParameters.checkCampaignProbeOptions was null or undefined when calling checkCampaignProbe.' ); } 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-campaign-probe`, method: 'POST', headers: headerParameters, query: queryParameters, body: CheckCampaignProbeOptionsToJSON( requestParameters.checkCampaignProbeOptions ), }, initOverrides ); return new runtime.JSONApiResponse(response, (jsonValue) => CheckCampaignProbeResultsFromJSON(jsonValue) ); } /** * Run a one-shot free campaign probe preflight check */ async checkCampaignProbe( requestParameters: CheckCampaignProbeRequest, initOverrides?: RequestInit ): Promise { const response = await this.checkCampaignProbeRaw( requestParameters, initOverrides ); return await response.value(); } /** * Check DNS propagation for a host and record type across configured resolvers */ async checkDnsPropagationRaw( requestParameters: CheckDnsPropagationRequest, initOverrides?: RequestInit ): Promise> { if ( requestParameters.checkDnsPropagationOptions === null || requestParameters.checkDnsPropagationOptions === undefined ) { throw new runtime.RequiredError( 'checkDnsPropagationOptions', 'Required parameter requestParameters.checkDnsPropagationOptions was null or undefined when calling checkDnsPropagation.' ); } 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-dns-propagation`, method: 'POST', headers: headerParameters, query: queryParameters, body: CheckDnsPropagationOptionsToJSON( requestParameters.checkDnsPropagationOptions ), }, initOverrides ); return new runtime.JSONApiResponse(response, (jsonValue) => CheckDnsPropagationResultsFromJSON(jsonValue) ); } /** * Check DNS propagation for a host and record type across configured resolvers */ async checkDnsPropagation( requestParameters: CheckDnsPropagationRequest, initOverrides?: RequestInit ): Promise { const response = await this.checkDnsPropagationRaw( requestParameters, initOverrides ); return await response.value(); } /** * Run a one-shot free domain monitor posture check */ async checkDomainMonitorRaw( requestParameters: CheckDomainMonitorRequest, initOverrides?: RequestInit ): Promise> { if ( requestParameters.checkDomainMonitorOptions === null || requestParameters.checkDomainMonitorOptions === undefined ) { throw new runtime.RequiredError( 'checkDomainMonitorOptions', 'Required parameter requestParameters.checkDomainMonitorOptions was null or undefined when calling checkDomainMonitor.' ); } 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-domain-monitor`, method: 'POST', headers: headerParameters, query: queryParameters, body: CheckDomainMonitorOptionsToJSON( requestParameters.checkDomainMonitorOptions ), }, initOverrides ); return new runtime.JSONApiResponse(response, (jsonValue) => CheckDomainMonitorResultsFromJSON(jsonValue) ); } /** * Run a one-shot free domain monitor posture check */ async checkDomainMonitor( requestParameters: CheckDomainMonitorRequest, initOverrides?: RequestInit ): Promise { const response = await this.checkDomainMonitorRaw( requestParameters, initOverrides ); return await response.value(); } /** * Run a one-shot free email audit across links, images, HTML, and client support */ async checkEmailAuditRaw( requestParameters: CheckEmailAuditRequest, initOverrides?: RequestInit ): Promise> { if ( requestParameters.checkEmailAuditOptions === null || requestParameters.checkEmailAuditOptions === undefined ) { throw new runtime.RequiredError( 'checkEmailAuditOptions', 'Required parameter requestParameters.checkEmailAuditOptions was null or undefined when calling checkEmailAudit.' ); } 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-audit`, method: 'POST', headers: headerParameters, query: queryParameters, body: CheckEmailAuditOptionsToJSON( requestParameters.checkEmailAuditOptions ), }, initOverrides ); return new runtime.JSONApiResponse(response, (jsonValue) => EmailAuditAnalysisResultFromJSON(jsonValue) ); } /** * Run a one-shot free email audit across links, images, HTML, and client support */ async checkEmailAudit( requestParameters: CheckEmailAuditRequest, initOverrides?: RequestInit ): Promise { const response = await this.checkEmailAuditRaw( requestParameters, initOverrides ); return await response.value(); } /** * Run a one-shot combined SPF, DKIM, DMARC, BIMI, MX, MTA-STS, and TLS-RPT check */ async checkEmailAuthStackRaw( requestParameters: CheckEmailAuthStackRequest, initOverrides?: RequestInit ): Promise> { if ( requestParameters.checkEmailAuthStackOptions === null || requestParameters.checkEmailAuthStackOptions === undefined ) { throw new runtime.RequiredError( 'checkEmailAuthStackOptions', 'Required parameter requestParameters.checkEmailAuthStackOptions was null or undefined when calling checkEmailAuthStack.' ); } 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-auth-stack`, method: 'POST', headers: headerParameters, query: queryParameters, body: CheckEmailAuthStackOptionsToJSON( requestParameters.checkEmailAuthStackOptions ), }, initOverrides ); return new runtime.JSONApiResponse(response, (jsonValue) => CheckEmailAuthStackResultsFromJSON(jsonValue) ); } /** * Run a one-shot combined SPF, DKIM, DMARC, BIMI, MX, MTA-STS, and TLS-RPT check */ async checkEmailAuthStack( requestParameters: CheckEmailAuthStackRequest, initOverrides?: RequestInit ): Promise { const response = await this.checkEmailAuthStackRaw( requestParameters, initOverrides ); return await response.value(); } /** * Check whether a domain or IP appears on configured DNS blacklists */ async checkEmailBlacklistRaw( requestParameters: CheckEmailBlacklistRequest, initOverrides?: RequestInit ): Promise> { if ( requestParameters.checkEmailBlacklistOptions === null || requestParameters.checkEmailBlacklistOptions === undefined ) { throw new runtime.RequiredError( 'checkEmailBlacklistOptions', 'Required parameter requestParameters.checkEmailBlacklistOptions was null or undefined when calling checkEmailBlacklist.' ); } 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-blacklists`, method: 'POST', headers: headerParameters, query: queryParameters, body: CheckEmailBlacklistOptionsToJSON( requestParameters.checkEmailBlacklistOptions ), }, initOverrides ); return new runtime.JSONApiResponse(response, (jsonValue) => CheckEmailBlacklistResultsFromJSON(jsonValue) ); } /** * Check whether a domain or IP appears on configured DNS blacklists */ async checkEmailBlacklist( requestParameters: CheckEmailBlacklistRequest, initOverrides?: RequestInit ): Promise { const response = await this.checkEmailBlacklistRaw( requestParameters, initOverrides ); return await response.value(); } /** * Check email client support for email HTML and CSS features */ async checkEmailFeaturesClientSupportRaw( requestParameters: CheckEmailFeaturesClientSupportRequest, initOverrides?: RequestInit ): Promise> { 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 { 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> { 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 { const response = await this.createNewFakeEmailAddressRaw(initOverrides); return await response.value(); } /** * Delete a fake email address using the fake email domains * Delete a fake email address using the fake email domains */ async deleteNewFakeEmailAddressRaw( requestParameters: DeleteNewFakeEmailAddressRequest, initOverrides?: RequestInit ): Promise> { if ( requestParameters.emailAddress === null || requestParameters.emailAddress === undefined ) { throw new runtime.RequiredError( 'emailAddress', 'Required parameter requestParameters.emailAddress was null or undefined when calling deleteNewFakeEmailAddress.' ); } 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: `/tools/fake-email`, method: 'DELETE', headers: headerParameters, query: queryParameters, }, initOverrides ); return new runtime.VoidApiResponse(response); } /** * Delete a fake email address using the fake email domains * Delete a fake email address using the fake email domains */ async deleteNewFakeEmailAddress( requestParameters: DeleteNewFakeEmailAddressRequest, initOverrides?: RequestInit ): Promise { await this.deleteNewFakeEmailAddressRaw(requestParameters, initOverrides); } /** * Create a BIMI record policy */ async generateBimiRecordRaw( requestParameters: GenerateBimiRecordRequest, initOverrides?: RequestInit ): Promise> { 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 { const response = await this.generateBimiRecordRaw( requestParameters, initOverrides ); return await response.value(); } /** * Create a DMARC record policy */ async generateDmarcRecordRaw( requestParameters: GenerateDmarcRecordRequest, initOverrides?: RequestInit ): Promise> { 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 { const response = await this.generateDmarcRecordRaw( requestParameters, initOverrides ); return await response.value(); } /** * Create a TLS reporting record policy */ async generateMtaStsRecordRaw( requestParameters: GenerateMtaStsRecordRequest, initOverrides?: RequestInit ): Promise> { 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 { const response = await this.generateMtaStsRecordRaw( requestParameters, initOverrides ); return await response.value(); } /** * Create an SPF record */ async generateSpfRecordRaw( requestParameters: GenerateSpfRecordRequest, initOverrides?: RequestInit ): Promise> { if ( requestParameters.generateSpfRecordOptions === null || requestParameters.generateSpfRecordOptions === undefined ) { throw new runtime.RequiredError( 'generateSpfRecordOptions', 'Required parameter requestParameters.generateSpfRecordOptions was null or undefined when calling generateSpfRecord.' ); } 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-spf-record`, method: 'POST', headers: headerParameters, query: queryParameters, body: GenerateSpfRecordOptionsToJSON( requestParameters.generateSpfRecordOptions ), }, initOverrides ); return new runtime.JSONApiResponse(response, (jsonValue) => GenerateSpfRecordResultsFromJSON(jsonValue) ); } /** * Create an SPF record */ async generateSpfRecord( requestParameters: GenerateSpfRecordRequest, initOverrides?: RequestInit ): Promise { const response = await this.generateSpfRecordRaw( requestParameters, initOverrides ); return await response.value(); } /** * Create a TLS reporting record policy */ async generateTlsReportingRecordRaw( requestParameters: GenerateTlsReportingRecordRequest, initOverrides?: RequestInit ): Promise> { 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 { const response = await this.generateTlsReportingRecordRaw( requestParameters, initOverrides ); return await response.value(); } /** */ async getFakeEmailByEmailAddressRaw( requestParameters: GetFakeEmailByEmailAddressRequest, initOverrides?: RequestInit ): Promise> { if ( requestParameters.emailAddress === null || requestParameters.emailAddress === undefined ) { throw new runtime.RequiredError( 'emailAddress', 'Required parameter requestParameters.emailAddress was null or undefined when calling getFakeEmailByEmailAddress.' ); } 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: `/tools/fake-email/byEmailAddress`, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides ); return new runtime.JSONApiResponse(response, (jsonValue) => FakeEmailResultFromJSON(jsonValue) ); } /** */ async getFakeEmailByEmailAddress( requestParameters: GetFakeEmailByEmailAddressRequest, initOverrides?: RequestInit ): Promise { const response = await this.getFakeEmailByEmailAddressRaw( requestParameters, initOverrides ); return await response.value(); } /** * Get a fake email by its ID * Get a fake email by its ID */ async getFakeEmailByIdRaw( requestParameters: GetFakeEmailByIdRequest, initOverrides?: RequestInit ): Promise> { 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) ); } /** * Get a fake email by its ID * Get a fake email by its ID */ async getFakeEmailById( requestParameters: GetFakeEmailByIdRequest, initOverrides?: RequestInit ): Promise { const response = await this.getFakeEmailByIdRaw( requestParameters, initOverrides ); return await response.value(); } /** * Retrieve the raw content of a fake email by its ID * Get raw fake email content */ async getFakeEmailRawRaw( requestParameters: GetFakeEmailRawRequest, initOverrides?: RequestInit ): Promise> { if (requestParameters.id === null || requestParameters.id === undefined) { throw new runtime.RequiredError( 'id', 'Required parameter requestParameters.id was null or undefined when calling getFakeEmailRaw.' ); } 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/html`, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides ); return new runtime.TextApiResponse(response) as any; } /** * Retrieve the raw content of a fake email by its ID * Get raw fake email content */ async getFakeEmailRaw( requestParameters: GetFakeEmailRawRequest, initOverrides?: RequestInit ): Promise { const response = await this.getFakeEmailRawRaw( requestParameters, initOverrides ); return await response.value(); } /** * Get fake emails for an address * Get fake emails for an address */ async getFakeEmailsForAddressRaw( requestParameters: GetFakeEmailsForAddressRequest, initOverrides?: RequestInit ): Promise>> { 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) ); } /** * Get fake emails for an address * Get fake emails for an address */ async getFakeEmailsForAddress( requestParameters: GetFakeEmailsForAddressRequest, initOverrides?: RequestInit ): Promise> { const response = await this.getFakeEmailsForAddressRaw( requestParameters, initOverrides ); return await response.value(); } /** * Lookup a BIMI record policy */ async lookupBimiDomainRaw( requestParameters: LookupBimiDomainRequest, initOverrides?: RequestInit ): Promise> { 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 { const response = await this.lookupBimiDomainRaw( requestParameters, initOverrides ); return await response.value(); } /** * Lookup and validate a DKIM record */ async lookupDkimDomainRaw( requestParameters: LookupDkimDomainRequest, initOverrides?: RequestInit ): Promise> { if ( requestParameters.lookupDkimDomainOptions === null || requestParameters.lookupDkimDomainOptions === undefined ) { throw new runtime.RequiredError( 'lookupDkimDomainOptions', 'Required parameter requestParameters.lookupDkimDomainOptions was null or undefined when calling lookupDkimDomain.' ); } 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-dkim-domain`, method: 'POST', headers: headerParameters, query: queryParameters, body: LookupDkimDomainOptionsToJSON( requestParameters.lookupDkimDomainOptions ), }, initOverrides ); return new runtime.JSONApiResponse(response, (jsonValue) => LookupDkimDomainResultsFromJSON(jsonValue) ); } /** * Lookup and validate a DKIM record */ async lookupDkimDomain( requestParameters: LookupDkimDomainRequest, initOverrides?: RequestInit ): Promise { const response = await this.lookupDkimDomainRaw( requestParameters, initOverrides ); return await response.value(); } /** * Lookup a DMARC record policy */ async lookupDmarcDomainRaw( requestParameters: LookupDmarcDomainRequest, initOverrides?: RequestInit ): Promise> { 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 { const response = await this.lookupDmarcDomainRaw( requestParameters, initOverrides ); return await response.value(); } /** * Lookup a MTA-STS domain policy */ async lookupMtaStsDomainRaw( requestParameters: LookupMtaStsDomainRequest, initOverrides?: RequestInit ): Promise> { 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 { const response = await this.lookupMtaStsDomainRaw( requestParameters, initOverrides ); return await response.value(); } /** * Lookup a MX records for a domain */ async lookupMxRecordRaw( requestParameters: LookupMxRecordRequest, initOverrides?: RequestInit ): Promise> { if ( requestParameters.lookupMxRecordsOptions === null || requestParameters.lookupMxRecordsOptions === undefined ) { throw new runtime.RequiredError( 'lookupMxRecordsOptions', 'Required parameter requestParameters.lookupMxRecordsOptions was null or undefined when calling lookupMxRecord.' ); } 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-mx-records`, method: 'POST', headers: headerParameters, query: queryParameters, body: LookupMxRecordsOptionsToJSON( requestParameters.lookupMxRecordsOptions ), }, initOverrides ); return new runtime.JSONApiResponse(response, (jsonValue) => LookupMxRecordsResultsFromJSON(jsonValue) ); } /** * Lookup a MX records for a domain */ async lookupMxRecord( requestParameters: LookupMxRecordRequest, initOverrides?: RequestInit ): Promise { const response = await this.lookupMxRecordRaw( requestParameters, initOverrides ); return await response.value(); } /** * Lookup PTR records for an IP address */ async lookupPtrRaw( requestParameters: LookupPtrRequest, initOverrides?: RequestInit ): Promise> { if ( requestParameters.lookupPtrOptions === null || requestParameters.lookupPtrOptions === undefined ) { throw new runtime.RequiredError( 'lookupPtrOptions', 'Required parameter requestParameters.lookupPtrOptions was null or undefined when calling lookupPtr.' ); } 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-ptr`, method: 'POST', headers: headerParameters, query: queryParameters, body: LookupPtrOptionsToJSON(requestParameters.lookupPtrOptions), }, initOverrides ); return new runtime.JSONApiResponse(response, (jsonValue) => LookupPtrResultsFromJSON(jsonValue) ); } /** * Lookup PTR records for an IP address */ async lookupPtr( requestParameters: LookupPtrRequest, initOverrides?: RequestInit ): Promise { const response = await this.lookupPtrRaw(requestParameters, initOverrides); return await response.value(); } /** * Lookup and validate an SPF record */ async lookupSpfDomainRaw( requestParameters: LookupSpfDomainRequest, initOverrides?: RequestInit ): Promise> { if ( requestParameters.lookupSpfDomainOptions === null || requestParameters.lookupSpfDomainOptions === undefined ) { throw new runtime.RequiredError( 'lookupSpfDomainOptions', 'Required parameter requestParameters.lookupSpfDomainOptions was null or undefined when calling lookupSpfDomain.' ); } 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-spf-domain`, method: 'POST', headers: headerParameters, query: queryParameters, body: LookupSpfDomainOptionsToJSON( requestParameters.lookupSpfDomainOptions ), }, initOverrides ); return new runtime.JSONApiResponse(response, (jsonValue) => LookupSpfDomainResultsFromJSON(jsonValue) ); } /** * Lookup and validate an SPF record */ async lookupSpfDomain( requestParameters: LookupSpfDomainRequest, initOverrides?: RequestInit ): Promise { const response = await this.lookupSpfDomainRaw( requestParameters, initOverrides ); return await response.value(); } /** * Lookup a TLS reporting domain policy */ async lookupTlsReportingDomainRaw( requestParameters: LookupTlsReportingDomainRequest, initOverrides?: RequestInit ): Promise> { 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 { const response = await this.lookupTlsReportingDomainRaw( requestParameters, initOverrides ); return await response.value(); } /** * Run a conservative SMTP connectivity, TLS, and AUTH diagnostic */ async testSmtpServerRaw( requestParameters: TestSmtpServerRequest, initOverrides?: RequestInit ): Promise> { if ( requestParameters.testSmtpServerOptions === null || requestParameters.testSmtpServerOptions === undefined ) { throw new runtime.RequiredError( 'testSmtpServerOptions', 'Required parameter requestParameters.testSmtpServerOptions was null or undefined when calling testSmtpServer.' ); } 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/test-smtp-server`, method: 'POST', headers: headerParameters, query: queryParameters, body: TestSmtpServerOptionsToJSON( requestParameters.testSmtpServerOptions ), }, initOverrides ); return new runtime.JSONApiResponse(response, (jsonValue) => TestSmtpServerResultsFromJSON(jsonValue) ); } /** * Run a conservative SMTP connectivity, TLS, and AUTH diagnostic */ async testSmtpServer( requestParameters: TestSmtpServerRequest, initOverrides?: RequestInit ): Promise { const response = await this.testSmtpServerRaw( requestParameters, initOverrides ); return await response.value(); } }