Class: WaitForControllerApi

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new WaitForControllerApi(configuration?)

Parameters

NameType
configurationConfiguration

Inherited from

BaseAPI.constructor

Properties

configuration

Protected configuration: Configuration

Inherited from

BaseAPI.configuration

Methods

request

Protected request(context, initOverrides?): Promise<Response>

Parameters

NameType
contextRequestOpts
initOverrides?RequestInit

Returns

Promise<Response>

Inherited from

BaseAPI.request


waitFor

waitFor(requestParameters, initOverrides?): Promise<EmailPreview[]>

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.

Parameters

NameType
requestParametersWaitForRequest
initOverrides?RequestInit

Returns

Promise<EmailPreview[]>


waitForEmailCount

waitForEmailCount(requestParameters, initOverrides?): Promise<EmailPreview[]>

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

Parameters

NameType
requestParametersWaitForEmailCountRequest
initOverrides?RequestInit

Returns

Promise<EmailPreview[]>


waitForEmailCountRaw

waitForEmailCountRaw(requestParameters, initOverrides?): Promise<ApiResponse<EmailPreview[]»

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

Parameters

NameType
requestParametersWaitForEmailCountRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<EmailPreview[]»


waitForLatestEmail

waitForLatestEmail(requestParameters, initOverrides?): Promise<Email>

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

Parameters

NameType
requestParametersWaitForLatestEmailRequest
initOverrides?RequestInit

Returns

Promise<Email>


waitForLatestEmailRaw

waitForLatestEmailRaw(requestParameters, initOverrides?): Promise<ApiResponse<Email»

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

Parameters

NameType
requestParametersWaitForLatestEmailRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<Email»


waitForMatchingEmails

waitForMatchingEmails(requestParameters, initOverrides?): Promise<EmailPreview[]>

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

Parameters

NameType
requestParametersWaitForMatchingEmailsRequest
initOverrides?RequestInit

Returns

Promise<EmailPreview[]>


waitForMatchingEmailsRaw

waitForMatchingEmailsRaw(requestParameters, initOverrides?): Promise<ApiResponse<EmailPreview[]»

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

Parameters

NameType
requestParametersWaitForMatchingEmailsRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<EmailPreview[]»


waitForMatchingFirstEmail

waitForMatchingFirstEmail(requestParameters, initOverrides?): Promise<Email>

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

Parameters

NameType
requestParametersWaitForMatchingFirstEmailRequest
initOverrides?RequestInit

Returns

Promise<Email>


waitForMatchingFirstEmailRaw

waitForMatchingFirstEmailRaw(requestParameters, initOverrides?): Promise<ApiResponse<Email»

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

Parameters

NameType
requestParametersWaitForMatchingFirstEmailRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<Email»


waitForNthEmail

waitForNthEmail(requestParameters, initOverrides?): Promise<Email>

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 in the inbox specified. If doesn’t exist waits for it to exist or timeout to occur.

Parameters

NameType
requestParametersWaitForNthEmailRequest
initOverrides?RequestInit

Returns

Promise<Email>


waitForNthEmailRaw

waitForNthEmailRaw(requestParameters, initOverrides?): Promise<ApiResponse<Email»

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 in the inbox specified. If doesn’t exist waits for it to exist or timeout to occur.

Parameters

NameType
requestParametersWaitForNthEmailRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<Email»


waitForRaw

waitForRaw(requestParameters, initOverrides?): Promise<ApiResponse<EmailPreview[]»

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.

Parameters

NameType
requestParametersWaitForRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<EmailPreview[]»


withMiddleware

withMiddleware<T>(…middlewares): T

Type parameters

NameType
Textends BaseAPI<T>

Parameters

NameType
...middlewaresMiddleware[]

Returns

T

Inherited from

BaseAPI.withMiddleware


withPostMiddleware

withPostMiddleware<T>(…postMiddlewares): T

Type parameters

NameType
Textends BaseAPI<T>

Parameters

NameType
...postMiddlewares(context: ResponseContext) => Promise<void

Returns

T

Inherited from

BaseAPI.withPostMiddleware


withPreMiddleware

withPreMiddleware<T>(…preMiddlewares): T

Type parameters

NameType
Textends BaseAPI<T>

Parameters

NameType
...preMiddlewares(context: RequestContext) => Promise<void

Returns

T

Inherited from

BaseAPI.withPreMiddleware