/** * MailSlurp API * MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It\'s designed for developers and QA teams to test applications, process inbound emails, send templated 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 { AttachmentEntity, AttachmentMetaData, DownloadAttachmentDto, InlineObject, PageAttachmentEntity, UploadAttachmentOptions } 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; } export interface UploadAttachmentRequest { uploadAttachmentOptions: UploadAttachmentOptions; } export interface UploadAttachmentBytesRequest { requestBody: Array; contentType?: string; filename?: string; } export interface UploadMultipartFormRequest { contentType?: string; filename?: string; xFilename?: string; inlineObject?: InlineObject; } /** * AttachmentControllerApi - interface * * @export * @interface AttachmentControllerApiInterface */ export interface AttachmentControllerApiInterface { /** * * @summary Delete all attachments * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AttachmentControllerApiInterface */ deleteAllAttachmentsRaw(): Promise>; /** * Delete all attachments */ deleteAllAttachments(): Promise; /** * * @summary Delete an attachment * @param {string} attachmentId ID of attachment * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AttachmentControllerApiInterface */ deleteAttachmentRaw(requestParameters: DeleteAttachmentRequest): Promise>; /** * Delete an attachment */ deleteAttachment(requestParameters: DeleteAttachmentRequest): Promise; /** * 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. * @summary Get email attachment as base64 encoded string as alternative to binary responses. To read the content decode the Base64 encoded contents. * @param {string} attachmentId ID of attachment * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AttachmentControllerApiInterface */ downloadAttachmentAsBase64EncodedRaw(requestParameters: DownloadAttachmentAsBase64EncodedRequest): Promise>; /** * 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. */ downloadAttachmentAsBase64Encoded(requestParameters: DownloadAttachmentAsBase64EncodedRequest): Promise; /** * 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. * @summary Download attachments. Get email attachment bytes. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints. * @param {string} attachmentId ID of attachment * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AttachmentControllerApiInterface */ downloadAttachmentAsBytesRaw(requestParameters: DownloadAttachmentAsBytesRequest): Promise>; /** * 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. */ downloadAttachmentAsBytes(requestParameters: DownloadAttachmentAsBytesRequest): Promise; /** * * @summary Get an attachment entity * @param {string} attachmentId ID of attachment * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AttachmentControllerApiInterface */ getAttachmentRaw(requestParameters: GetAttachmentRequest): Promise>; /** * Get an attachment entity */ getAttachment(requestParameters: GetAttachmentRequest): Promise; /** * 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. * @summary Get email attachment metadata information * @param {string} attachmentId ID of attachment * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AttachmentControllerApiInterface */ getAttachmentInfoRaw(requestParameters: GetAttachmentInfoRequest): Promise>; /** * 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 */ getAttachmentInfo(requestParameters: GetAttachmentInfoRequest): Promise; /** * 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. * @summary Get email attachments * @param {number} [page] Optional page index event list pagination * @param {number} [size] Optional page size event list pagination * @param {'ASC' | 'DESC'} [sort] Optional createdAt sort direction ASC or DESC * @param {string} [fileNameFilter] Optional file name and content type 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 AttachmentControllerApiInterface */ getAttachmentsRaw(requestParameters: GetAttachmentsRequest): Promise>; /** * 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 */ getAttachments(requestParameters: GetAttachmentsRequest): Promise; /** * * @summary Upload an attachment for sending using base64 file encoding. Returns an array whose first element is the ID of the uploaded attachment. * @param {UploadAttachmentOptions} uploadAttachmentOptions * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AttachmentControllerApiInterface */ uploadAttachmentRaw(requestParameters: UploadAttachmentRequest): Promise>>; /** * Upload an attachment for sending using base64 file encoding. Returns an array whose first element is the ID of the uploaded attachment. */ uploadAttachment(requestParameters: UploadAttachmentRequest): Promise>; /** * * @summary 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. * @param {Array} requestBody * @param {string} [contentType] Optional contentType for file. For instance `application/pdf` * @param {string} [filename] Optional filename to save upload with * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AttachmentControllerApiInterface */ uploadAttachmentBytesRaw(requestParameters: UploadAttachmentBytesRequest): Promise>>; /** * 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. */ uploadAttachmentBytes(requestParameters: UploadAttachmentBytesRequest): Promise>; /** * * @summary Upload an attachment for sending using a Multipart Form request. Returns an array whose first element is the ID of the uploaded attachment. * @param {string} [contentType] Optional content type of attachment * @param {string} [filename] Optional name of file * @param {string} [xFilename] Optional content type header of attachment * @param {InlineObject} [inlineObject] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AttachmentControllerApiInterface */ uploadMultipartFormRaw(requestParameters: UploadMultipartFormRequest): Promise>>; /** * Upload an attachment for sending using a Multipart Form request. Returns an array whose first element is the ID of the uploaded attachment. */ uploadMultipartForm(requestParameters: UploadMultipartFormRequest): Promise>; } /** * */ export declare class AttachmentControllerApi extends runtime.BaseAPI implements AttachmentControllerApiInterface { /** * Delete all attachments */ deleteAllAttachmentsRaw(): Promise>; /** * Delete all attachments */ deleteAllAttachments(): Promise; /** * Delete an attachment */ deleteAttachmentRaw(requestParameters: DeleteAttachmentRequest): Promise>; /** * Delete an attachment */ deleteAttachment(requestParameters: DeleteAttachmentRequest): Promise; /** * 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. */ downloadAttachmentAsBase64EncodedRaw(requestParameters: DownloadAttachmentAsBase64EncodedRequest): Promise>; /** * 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. */ downloadAttachmentAsBase64Encoded(requestParameters: DownloadAttachmentAsBase64EncodedRequest): Promise; /** * 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. */ downloadAttachmentAsBytesRaw(requestParameters: DownloadAttachmentAsBytesRequest): Promise>; /** * 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. */ downloadAttachmentAsBytes(requestParameters: DownloadAttachmentAsBytesRequest): Promise; /** * Get an attachment entity */ getAttachmentRaw(requestParameters: GetAttachmentRequest): Promise>; /** * Get an attachment entity */ getAttachment(requestParameters: GetAttachmentRequest): Promise; /** * 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 */ getAttachmentInfoRaw(requestParameters: GetAttachmentInfoRequest): Promise>; /** * 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 */ getAttachmentInfo(requestParameters: GetAttachmentInfoRequest): Promise; /** * 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 */ getAttachmentsRaw(requestParameters: GetAttachmentsRequest): Promise>; /** * 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 */ getAttachments(requestParameters: GetAttachmentsRequest): Promise; /** * Upload an attachment for sending using base64 file encoding. Returns an array whose first element is the ID of the uploaded attachment. */ uploadAttachmentRaw(requestParameters: UploadAttachmentRequest): Promise>>; /** * Upload an attachment for sending using base64 file encoding. Returns an array whose first element is the ID of the uploaded attachment. */ uploadAttachment(requestParameters: UploadAttachmentRequest): Promise>; /** * 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. */ uploadAttachmentBytesRaw(requestParameters: UploadAttachmentBytesRequest): Promise>>; /** * 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. */ uploadAttachmentBytes(requestParameters: UploadAttachmentBytesRequest): Promise>; /** * Upload an attachment for sending using a Multipart Form request. Returns an array whose first element is the ID of the uploaded attachment. */ uploadMultipartFormRaw(requestParameters: UploadMultipartFormRequest): Promise>>; /** * Upload an attachment for sending using a Multipart Form request. Returns an array whose first element is the ID of the uploaded attachment. */ uploadMultipartForm(requestParameters: UploadMultipartFormRequest): Promise>; } /** * @export * @enum {string} */ export declare enum GetAttachmentsSortEnum { ASC = "ASC", DESC = "DESC" }