MailSlurp JS

Globals / WebhookControllerApi

Class: WebhookControllerApi

WebhookControllerApi - object-oriented interface

export

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

Inherited from BaseAPI.constructor

Defined in src/generated/api.ts:57

Parameters:

NameTypeDefault value
configuration?Configuration-
basePathstringBASE_PATH
fetchFetchAPIportableFetch

Returns: WebhookControllerApi

Properties

basePath

Protected basePath: string

Inherited from BaseAPI.basePath

Defined in src/generated/api.ts:61


configuration

Protected configuration: Configuration

Inherited from BaseAPI.configuration

Defined in src/generated/api.ts:57


fetch

Protected fetch: FetchAPI

Inherited from BaseAPI.fetch

Defined in src/generated/api.ts:62

Methods

createWebhook

createWebhook(inboxId: string, webhookOptions: CreateWebhookOptions, options?: any): Promise<WebhookDto>

Defined in src/generated/api.ts:23135

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.

summary Attach a WebHook URL to an inbox

throws {RequiredError}

memberof WebhookControllerApi

Parameters:

NameTypeDescription
inboxIdstringinboxId
webhookOptionsCreateWebhookOptionswebhookOptions
options?any-

Returns: Promise<WebhookDto>


deleteWebhook

deleteWebhook(inboxId: string, webhookId: string, options?: any): Promise

Defined in src/generated/api.ts:23156

summary Delete and disable a Webhook for an Inbox

throws {RequiredError}

memberof WebhookControllerApi

Parameters:

NameTypeDescription
inboxIdstringinboxId
webhookIdstringwebhookId
options?any-

Returns: Promise


getAllWebhookResults

getAllWebhookResults(page?: number, size?: number, sort?: “ASC” | “DESC”, options?: any): Promise<PageWebhookResult>

Defined in src/generated/api.ts:23174

summary Get results for all webhooks

throws {RequiredError}

memberof WebhookControllerApi

Parameters:

NameType
page?number
size?number
sort?“ASC”
options?any

Returns: Promise<PageWebhookResult>


getAllWebhooks

getAllWebhooks(page?: number, size?: number, sort?: “ASC” | “DESC”, options?: any): Promise<PageWebhookProjection>

Defined in src/generated/api.ts:23198

List webhooks in paginated form. Allows for page , page size, and sort direction.

summary List Webhooks Paginated

throws {RequiredError}

memberof WebhookControllerApi

Parameters:

NameType
page?number
size?number
sort?“ASC”
options?any

Returns: Promise<PageWebhookProjection>


getTestWebhookPayload

getTestWebhookPayload(eventName?: “EMAIL_RECEIVED” | “NEW_EMAIL” | “NEW_CONTACT” | “NEW_ATTACHMENT”, options?: any): Promise<AbstractWebhookPayload>

Defined in src/generated/api.ts:23220

summary Get test webhook payload example. Response content depends on eventName passed. Uses EMAIL_RECEIVED as default.

throws {RequiredError}

memberof WebhookControllerApi

Parameters:

NameType
eventName?“EMAIL_RECEIVED”
options?any

Returns: Promise<AbstractWebhookPayload>


getTestWebhookPayloadNewAttachment

getTestWebhookPayloadNewAttachment(options?: any): Promise<WebhookNewAttachmentPayload>

Defined in src/generated/api.ts:23241

summary Get webhook test payload for new attachment event

throws {RequiredError}

memberof WebhookControllerApi

Parameters:

NameType
options?any

Returns: Promise<WebhookNewAttachmentPayload>


getTestWebhookPayloadNewContact

getTestWebhookPayloadNewContact(options?: any): Promise<WebhookNewContactPayload>

Defined in src/generated/api.ts:23257

summary Get webhook test payload for new contact event

throws {RequiredError}

memberof WebhookControllerApi

Parameters:

NameType
options?any

Returns: Promise<WebhookNewContactPayload>


getTestWebhookPayloadNewEmail

getTestWebhookPayloadNewEmail(options?: any): Promise<WebhookNewEmailPayload>

Defined in src/generated/api.ts:23270

summary Get webhook test payload for new email event

throws {RequiredError}

memberof WebhookControllerApi

Parameters:

NameType
options?any

Returns: Promise<WebhookNewEmailPayload>


getWebhook

getWebhook(webhookId: string, options?: any): Promise<WebhookDto>

Defined in src/generated/api.ts:23284

summary Get a webhook for an Inbox

throws {RequiredError}

memberof WebhookControllerApi

Parameters:

NameTypeDescription
webhookIdstringwebhookId
options?any-

Returns: Promise<WebhookDto>


getWebhookResult

getWebhookResult(webhookResultId: string, options?: any): Promise<WebhookResultEntity>

Defined in src/generated/api.ts:23299

summary Get a webhook result for a webhook

throws {RequiredError}

memberof WebhookControllerApi

Parameters:

NameTypeDescription
webhookResultIdstringWebhook Result ID
options?any-

Returns: Promise<WebhookResultEntity>


getWebhookResults

getWebhookResults(webhookId: string, page?: number, size?: number, sort?: “ASC” | “DESC”, options?: any): Promise<PageWebhookResult>

Defined in src/generated/api.ts:23317

summary Get a webhook results for a webhook

throws {RequiredError}

memberof WebhookControllerApi

Parameters:

NameTypeDescription
webhookIdstringID of webhook to get results for
page?number-
size?number-
sort?“ASC”“DESC”
options?any-

Returns: Promise<PageWebhookResult>


getWebhooks

getWebhooks(inboxId: string, options?: any): Promise<WebhookDto[]>

Defined in src/generated/api.ts:23341

summary Get all webhooks for an Inbox

throws {RequiredError}

memberof WebhookControllerApi

Parameters:

NameTypeDescription
inboxIdstringinboxId
options?any-

Returns: Promise<WebhookDto[]>


sendTestData

sendTestData(webhookId: string, options?: any): Promise<WebhookTestResult>

Defined in src/generated/api.ts:23356

summary Send webhook test data

throws {RequiredError}

memberof WebhookControllerApi

Parameters:

NameTypeDescription
webhookIdstringwebhookId
options?any-

Returns: Promise<WebhookTestResult>