/** * MailSlurp API * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It\'s designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository * * The version of the OpenAPI document: 6.5.2 * Contact: contact@mailslurp.dev * * 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, CreateWebhookOptions, JSONSchemaDto, PageWebhookProjection, PageWebhookResult, UnseenErrorCountDto, WebhookDto, WebhookEmailOpenedPayload, WebhookEmailReadPayload, WebhookNewAttachmentPayload, WebhookNewContactPayload, WebhookNewEmailPayload, WebhookRedriveResult, WebhookResultDto, WebhookTestResult } from '../models'; export interface CreateWebhookRequest { inboxId: string; createWebhookOptions: CreateWebhookOptions; } export interface DeleteWebhookRequest { inboxId: string; webhookId: string; } export interface GetAllWebhookResultsRequest { page?: number; size?: number; sort?: GetAllWebhookResultsSortEnum; searchFilter?: string; since?: Date; before?: Date; unseenOnly?: boolean; } export interface GetAllWebhooksRequest { page?: number; size?: number; sort?: GetAllWebhooksSortEnum; searchFilter?: string; since?: Date; before?: Date; } export interface GetInboxWebhooksPaginatedRequest { inboxId: string; page?: number; size?: number; sort?: GetInboxWebhooksPaginatedSortEnum; searchFilter?: string; since?: Date; before?: Date; } export interface GetJsonSchemaForWebhookPayloadRequest { webhookId: string; } 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; } export interface GetWebhookResultsUnseenErrorCountRequest { inboxId: string; } export interface GetWebhooksRequest { inboxId: string; } export interface RedriveWebhookResultRequest { webhookResultId: string; } export interface SendTestDataRequest { webhookId: string; } /** * WebhookControllerApi - interface * * @export * @interface WebhookControllerApiInterface */ export interface WebhookControllerApiInterface { /** * 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 * @param {string} inboxId * @param {CreateWebhookOptions} createWebhookOptions * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookControllerApiInterface */ createWebhookRaw(requestParameters: CreateWebhookRequest): Promise>; /** * 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 */ createWebhook(requestParameters: CreateWebhookRequest): Promise; /** * * @summary Delete all webhooks * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookControllerApiInterface */ deleteAllWebhooksRaw(): Promise>; /** * Delete all webhooks */ deleteAllWebhooks(): Promise; /** * * @summary Delete and disable a Webhook for an Inbox * @param {string} inboxId * @param {string} webhookId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookControllerApiInterface */ deleteWebhookRaw(requestParameters: DeleteWebhookRequest): Promise>; /** * Delete and disable a Webhook for an Inbox */ deleteWebhook(requestParameters: DeleteWebhookRequest): Promise; /** * * @summary Get results for all webhooks * @param {number} [page] Optional page index in list pagination * @param {number} [size] Optional page size in list pagination * @param {'ASC' | 'DESC'} [sort] Optional createdAt sort direction ASC or DESC * @param {string} [searchFilter] Optional search filter * @param {Date} [since] Filter by created at after the given timestamp * @param {Date} [before] Filter by created at before the given timestamp * @param {boolean} [unseenOnly] Filter for unseen exceptions only * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookControllerApiInterface */ getAllWebhookResultsRaw(requestParameters: GetAllWebhookResultsRequest): Promise>; /** * Get results for all webhooks */ getAllWebhookResults(requestParameters: GetAllWebhookResultsRequest): Promise; /** * List webhooks in paginated form. Allows for page index, page size, and sort direction. * @summary List Webhooks Paginated * @param {number} [page] Optional page index in list pagination * @param {number} [size] Optional page size for paginated result list. * @param {'ASC' | 'DESC'} [sort] Optional createdAt sort direction ASC or DESC * @param {string} [searchFilter] Optional search filter * @param {Date} [since] Filter by created at after the given timestamp * @param {Date} [before] Filter by created at before the given timestamp * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookControllerApiInterface */ getAllWebhooksRaw(requestParameters: GetAllWebhooksRequest): Promise>; /** * List webhooks in paginated form. Allows for page index, page size, and sort direction. * List Webhooks Paginated */ getAllWebhooks(requestParameters: GetAllWebhooksRequest): Promise; /** * * @summary Get paginated webhooks for an Inbox * @param {string} inboxId * @param {number} [page] Optional page index in list pagination * @param {number} [size] Optional page size in list pagination * @param {'ASC' | 'DESC'} [sort] Optional createdAt sort direction ASC or DESC * @param {string} [searchFilter] Optional search filter * @param {Date} [since] Filter by created at after the given timestamp * @param {Date} [before] Filter by created at before the given timestamp * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookControllerApiInterface */ getInboxWebhooksPaginatedRaw(requestParameters: GetInboxWebhooksPaginatedRequest): Promise>; /** * Get paginated webhooks for an Inbox */ getInboxWebhooksPaginated(requestParameters: GetInboxWebhooksPaginatedRequest): Promise; /** * Get JSON Schema definition for webhook payload * @param {string} webhookId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookControllerApiInterface */ getJsonSchemaForWebhookPayloadRaw(requestParameters: GetJsonSchemaForWebhookPayloadRequest): Promise>; /** * Get JSON Schema definition for webhook payload */ getJsonSchemaForWebhookPayload(requestParameters: GetJsonSchemaForWebhookPayloadRequest): Promise; /** * Get test webhook payload example. Response content depends on eventName passed. Uses `EMAIL_RECEIVED` as default. * @param {'EMAIL_RECEIVED' | 'NEW_EMAIL' | 'NEW_CONTACT' | 'NEW_ATTACHMENT' | 'EMAIL_OPENED' | 'EMAIL_READ'} [eventName] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookControllerApiInterface */ getTestWebhookPayloadRaw(requestParameters: GetTestWebhookPayloadRequest): Promise>; /** * Get test webhook payload example. Response content depends on eventName passed. Uses `EMAIL_RECEIVED` as default. */ getTestWebhookPayload(requestParameters: GetTestWebhookPayloadRequest): Promise; /** * Get webhook test payload for email opened event * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookControllerApiInterface */ getTestWebhookPayloadEmailOpenedRaw(): Promise>; /** * Get webhook test payload for email opened event */ getTestWebhookPayloadEmailOpened(): Promise; /** * Get webhook test payload for email opened event * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookControllerApiInterface */ getTestWebhookPayloadEmailReadRaw(): Promise>; /** * Get webhook test payload for email opened event */ getTestWebhookPayloadEmailRead(): Promise; /** * Get example payload for webhook * @param {string} webhookId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookControllerApiInterface */ getTestWebhookPayloadForWebhookRaw(requestParameters: GetTestWebhookPayloadForWebhookRequest): Promise>; /** * Get example payload for webhook */ getTestWebhookPayloadForWebhook(requestParameters: GetTestWebhookPayloadForWebhookRequest): Promise; /** * * @summary Get webhook test payload for new attachment event * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookControllerApiInterface */ getTestWebhookPayloadNewAttachmentRaw(): Promise>; /** * Get webhook test payload for new attachment event */ getTestWebhookPayloadNewAttachment(): Promise; /** * * @summary Get webhook test payload for new contact event * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookControllerApiInterface */ getTestWebhookPayloadNewContactRaw(): Promise>; /** * Get webhook test payload for new contact event */ getTestWebhookPayloadNewContact(): Promise; /** * * @summary Get webhook test payload for new email event * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookControllerApiInterface */ getTestWebhookPayloadNewEmailRaw(): Promise>; /** * Get webhook test payload for new email event */ getTestWebhookPayloadNewEmail(): Promise; /** * * @summary Get a webhook for an Inbox * @param {string} webhookId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookControllerApiInterface */ getWebhookRaw(requestParameters: GetWebhookRequest): Promise>; /** * Get a webhook for an Inbox */ getWebhook(requestParameters: GetWebhookRequest): Promise; /** * * @summary Get a webhook result for a webhook * @param {string} webhookResultId Webhook Result ID * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookControllerApiInterface */ getWebhookResultRaw(requestParameters: GetWebhookResultRequest): Promise>; /** * Get a webhook result for a webhook */ getWebhookResult(requestParameters: GetWebhookResultRequest): Promise; /** * * @summary Get a webhook results for a webhook * @param {string} webhookId ID of webhook to get results for * @param {number} [page] Optional page index in list pagination * @param {number} [size] Optional page size in list pagination * @param {'ASC' | 'DESC'} [sort] Optional createdAt sort direction ASC or DESC * @param {string} [searchFilter] Optional search filter * @param {Date} [since] Filter by created at after the given timestamp * @param {Date} [before] Filter by created at before the given timestamp * @param {boolean} [unseenOnly] Filter for unseen exceptions only * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookControllerApiInterface */ getWebhookResultsRaw(requestParameters: GetWebhookResultsRequest): Promise>; /** * Get a webhook results for a webhook */ getWebhookResults(requestParameters: GetWebhookResultsRequest): Promise; /** * * @summary Get count of unseen webhook results with error status * @param {string} inboxId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookControllerApiInterface */ getWebhookResultsUnseenErrorCountRaw(requestParameters: GetWebhookResultsUnseenErrorCountRequest): Promise>; /** * Get count of unseen webhook results with error status */ getWebhookResultsUnseenErrorCount(requestParameters: GetWebhookResultsUnseenErrorCountRequest): Promise; /** * * @summary Get all webhooks for an Inbox * @param {string} inboxId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookControllerApiInterface */ getWebhooksRaw(requestParameters: GetWebhooksRequest): Promise>>; /** * Get all webhooks for an Inbox */ getWebhooks(requestParameters: GetWebhooksRequest): Promise>; /** * 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. * @summary Get a webhook result and try to resend the original webhook payload * @param {string} webhookResultId Webhook Result ID * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookControllerApiInterface */ redriveWebhookResultRaw(requestParameters: RedriveWebhookResultRequest): Promise>; /** * 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 */ redriveWebhookResult(requestParameters: RedriveWebhookResultRequest): Promise; /** * * @summary Send webhook test data * @param {string} webhookId * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookControllerApiInterface */ sendTestDataRaw(requestParameters: SendTestDataRequest): Promise>; /** * Send webhook test data */ sendTestData(requestParameters: SendTestDataRequest): Promise; } /** * */ export declare class WebhookControllerApi extends runtime.BaseAPI implements WebhookControllerApiInterface { /** * 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 */ createWebhookRaw(requestParameters: CreateWebhookRequest): Promise>; /** * 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 */ createWebhook(requestParameters: CreateWebhookRequest): Promise; /** * Delete all webhooks */ deleteAllWebhooksRaw(): Promise>; /** * Delete all webhooks */ deleteAllWebhooks(): Promise; /** * Delete and disable a Webhook for an Inbox */ deleteWebhookRaw(requestParameters: DeleteWebhookRequest): Promise>; /** * Delete and disable a Webhook for an Inbox */ deleteWebhook(requestParameters: DeleteWebhookRequest): Promise; /** * Get results for all webhooks */ getAllWebhookResultsRaw(requestParameters: GetAllWebhookResultsRequest): Promise>; /** * Get results for all webhooks */ getAllWebhookResults(requestParameters: GetAllWebhookResultsRequest): Promise; /** * List webhooks in paginated form. Allows for page index, page size, and sort direction. * List Webhooks Paginated */ getAllWebhooksRaw(requestParameters: GetAllWebhooksRequest): Promise>; /** * List webhooks in paginated form. Allows for page index, page size, and sort direction. * List Webhooks Paginated */ getAllWebhooks(requestParameters: GetAllWebhooksRequest): Promise; /** * Get paginated webhooks for an Inbox */ getInboxWebhooksPaginatedRaw(requestParameters: GetInboxWebhooksPaginatedRequest): Promise>; /** * Get paginated webhooks for an Inbox */ getInboxWebhooksPaginated(requestParameters: GetInboxWebhooksPaginatedRequest): Promise; /** * Get JSON Schema definition for webhook payload */ getJsonSchemaForWebhookPayloadRaw(requestParameters: GetJsonSchemaForWebhookPayloadRequest): Promise>; /** * Get JSON Schema definition for webhook payload */ getJsonSchemaForWebhookPayload(requestParameters: GetJsonSchemaForWebhookPayloadRequest): Promise; /** * Get test webhook payload example. Response content depends on eventName passed. Uses `EMAIL_RECEIVED` as default. */ getTestWebhookPayloadRaw(requestParameters: GetTestWebhookPayloadRequest): Promise>; /** * Get test webhook payload example. Response content depends on eventName passed. Uses `EMAIL_RECEIVED` as default. */ getTestWebhookPayload(requestParameters: GetTestWebhookPayloadRequest): Promise; /** * Get webhook test payload for email opened event */ getTestWebhookPayloadEmailOpenedRaw(): Promise>; /** * Get webhook test payload for email opened event */ getTestWebhookPayloadEmailOpened(): Promise; /** * Get webhook test payload for email opened event */ getTestWebhookPayloadEmailReadRaw(): Promise>; /** * Get webhook test payload for email opened event */ getTestWebhookPayloadEmailRead(): Promise; /** * Get example payload for webhook */ getTestWebhookPayloadForWebhookRaw(requestParameters: GetTestWebhookPayloadForWebhookRequest): Promise>; /** * Get example payload for webhook */ getTestWebhookPayloadForWebhook(requestParameters: GetTestWebhookPayloadForWebhookRequest): Promise; /** * Get webhook test payload for new attachment event */ getTestWebhookPayloadNewAttachmentRaw(): Promise>; /** * Get webhook test payload for new attachment event */ getTestWebhookPayloadNewAttachment(): Promise; /** * Get webhook test payload for new contact event */ getTestWebhookPayloadNewContactRaw(): Promise>; /** * Get webhook test payload for new contact event */ getTestWebhookPayloadNewContact(): Promise; /** * Get webhook test payload for new email event */ getTestWebhookPayloadNewEmailRaw(): Promise>; /** * Get webhook test payload for new email event */ getTestWebhookPayloadNewEmail(): Promise; /** * Get a webhook for an Inbox */ getWebhookRaw(requestParameters: GetWebhookRequest): Promise>; /** * Get a webhook for an Inbox */ getWebhook(requestParameters: GetWebhookRequest): Promise; /** * Get a webhook result for a webhook */ getWebhookResultRaw(requestParameters: GetWebhookResultRequest): Promise>; /** * Get a webhook result for a webhook */ getWebhookResult(requestParameters: GetWebhookResultRequest): Promise; /** * Get a webhook results for a webhook */ getWebhookResultsRaw(requestParameters: GetWebhookResultsRequest): Promise>; /** * Get a webhook results for a webhook */ getWebhookResults(requestParameters: GetWebhookResultsRequest): Promise; /** * Get count of unseen webhook results with error status */ getWebhookResultsUnseenErrorCountRaw(requestParameters: GetWebhookResultsUnseenErrorCountRequest): Promise>; /** * Get count of unseen webhook results with error status */ getWebhookResultsUnseenErrorCount(requestParameters: GetWebhookResultsUnseenErrorCountRequest): Promise; /** * Get all webhooks for an Inbox */ getWebhooksRaw(requestParameters: GetWebhooksRequest): Promise>>; /** * Get all webhooks for an Inbox */ getWebhooks(requestParameters: GetWebhooksRequest): Promise>; /** * 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 */ redriveWebhookResultRaw(requestParameters: RedriveWebhookResultRequest): Promise>; /** * 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 */ redriveWebhookResult(requestParameters: RedriveWebhookResultRequest): Promise; /** * Send webhook test data */ sendTestDataRaw(requestParameters: SendTestDataRequest): Promise>; /** * Send webhook test data */ sendTestData(requestParameters: SendTestDataRequest): Promise; } /** * @export * @enum {string} */ export declare enum GetAllWebhookResultsSortEnum { ASC = "ASC", DESC = "DESC" } /** * @export * @enum {string} */ export declare enum GetAllWebhooksSortEnum { ASC = "ASC", DESC = "DESC" } /** * @export * @enum {string} */ export declare enum GetInboxWebhooksPaginatedSortEnum { ASC = "ASC", DESC = "DESC" } /** * @export * @enum {string} */ export declare enum GetTestWebhookPayloadEventNameEnum { EMAILRECEIVED = "EMAIL_RECEIVED", NEWEMAIL = "NEW_EMAIL", NEWCONTACT = "NEW_CONTACT", NEWATTACHMENT = "NEW_ATTACHMENT", EMAILOPENED = "EMAIL_OPENED", EMAILREAD = "EMAIL_READ" } /** * @export * @enum {string} */ export declare enum GetWebhookResultsSortEnum { ASC = "ASC", DESC = "DESC" }