UNPKG

mailslurp-client

Version:

Official client for MailSlurp Email and SMS API. Create email addresses and phone numbers in Javascript without a mail server. Send and receive real emails in applications or tests.

153 lines (152 loc) 8.64 kB
/** * 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://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 { 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 { contentType?: string; contentType2?: string; filename?: string; filename2?: string; } export interface UploadMultipartFormRequest { contentType?: string; filename?: string; xFilename?: string; inlineObject?: InlineObject; } /** * */ export declare class AttachmentControllerApi extends runtime.BaseAPI { /** * Delete all attachments */ deleteAllAttachmentsRaw(initOverrides?: RequestInit): Promise<runtime.ApiResponse<void>>; /** * Delete all attachments */ deleteAllAttachments(initOverrides?: RequestInit): Promise<void>; /** * Delete an attachment */ deleteAttachmentRaw(requestParameters: DeleteAttachmentRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<void>>; /** * Delete an attachment */ deleteAttachment(requestParameters: DeleteAttachmentRequest, initOverrides?: RequestInit): Promise<void>; /** * 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, initOverrides?: RequestInit): Promise<runtime.ApiResponse<DownloadAttachmentDto>>; /** * 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, initOverrides?: RequestInit): Promise<DownloadAttachmentDto>; /** * 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, initOverrides?: RequestInit): Promise<runtime.ApiResponse<string>>; /** * 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, initOverrides?: RequestInit): Promise<string>; /** * Get an attachment entity */ getAttachmentRaw(requestParameters: GetAttachmentRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<AttachmentEntity>>; /** * Get an attachment entity */ getAttachment(requestParameters: GetAttachmentRequest, initOverrides?: RequestInit): Promise<AttachmentEntity>; /** * 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, initOverrides?: RequestInit): Promise<runtime.ApiResponse<AttachmentMetaData>>; /** * 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, initOverrides?: RequestInit): Promise<AttachmentMetaData>; /** * 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, initOverrides?: RequestInit): Promise<runtime.ApiResponse<PageAttachmentEntity>>; /** * 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, initOverrides?: RequestInit): Promise<PageAttachmentEntity>; /** * 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, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Array<string>>>; /** * 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, initOverrides?: RequestInit): Promise<Array<string>>; /** * 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, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Array<string>>>; /** * 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, initOverrides?: RequestInit): Promise<Array<string>>; /** * 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, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Array<string>>>; /** * 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, initOverrides?: RequestInit): Promise<Array<string>>; } /** * @export * @enum {string} */ export declare enum GetAttachmentsSortEnum { ASC = "ASC", DESC = "DESC" }