Skip to content

Class: AttachmentControllerApi

Hierarchy

  • BaseAPI

    AttachmentControllerApi

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new AttachmentControllerApi(configuration?)

Parameters

Name Type
configuration Configuration

Inherited from

BaseAPI.constructor

Properties

configuration

Protected configuration: Configuration

Inherited from

BaseAPI.configuration

Methods

deleteAllAttachments

deleteAllAttachments(initOverrides?): Promise<void>

Delete all attachments

Parameters

Name Type
initOverrides? RequestInit

Returns

Promise<void>


deleteAllAttachmentsRaw

deleteAllAttachmentsRaw(initOverrides?): Promise<ApiResponse<void>>

Delete all attachments

Parameters

Name Type
initOverrides? RequestInit

Returns

Promise<ApiResponse<void>>


deleteAttachment

deleteAttachment(requestParameters, initOverrides?): Promise<void>

Delete an attachment

Parameters

Name Type
requestParameters DeleteAttachmentRequest
initOverrides? RequestInit

Returns

Promise<void>


deleteAttachmentRaw

deleteAttachmentRaw(requestParameters, initOverrides?): Promise<ApiResponse<void>>

Delete an attachment

Parameters

Name Type
requestParameters DeleteAttachmentRequest
initOverrides? RequestInit

Returns

Promise<ApiResponse<void>>


downloadAttachmentAsBase64Encoded

downloadAttachmentAsBase64Encoded(requestParameters, initOverrides?): Promise<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.

Parameters

Name Type
requestParameters DownloadAttachmentAsBase64EncodedRequest
initOverrides? RequestInit

Returns

Promise<DownloadAttachmentDto>


downloadAttachmentAsBase64EncodedRaw

downloadAttachmentAsBase64EncodedRaw(requestParameters, initOverrides?): Promise<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.

Parameters

Name Type
requestParameters DownloadAttachmentAsBase64EncodedRequest
initOverrides? RequestInit

Returns

Promise<ApiResponse<DownloadAttachmentDto>>


downloadAttachmentAsBytes

downloadAttachmentAsBytes(requestParameters, initOverrides?): Promise<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.

Parameters

Name Type
requestParameters DownloadAttachmentAsBytesRequest
initOverrides? RequestInit

Returns

Promise<string>


downloadAttachmentAsBytesRaw

downloadAttachmentAsBytesRaw(requestParameters, initOverrides?): Promise<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.

Parameters

Name Type
requestParameters DownloadAttachmentAsBytesRequest
initOverrides? RequestInit

Returns

Promise<ApiResponse<string>>


getAttachment

getAttachment(requestParameters, initOverrides?): Promise<AttachmentEntity>

Get an attachment entity

Parameters

Name Type
requestParameters GetAttachmentRequest
initOverrides? RequestInit

Returns

Promise<AttachmentEntity>


getAttachmentInfo

getAttachmentInfo(requestParameters, initOverrides?): Promise<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

Parameters

Name Type
requestParameters GetAttachmentInfoRequest
initOverrides? RequestInit

Returns

Promise<AttachmentMetaData>


getAttachmentInfoRaw

getAttachmentInfoRaw(requestParameters, initOverrides?): Promise<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

Parameters

Name Type
requestParameters GetAttachmentInfoRequest
initOverrides? RequestInit

Returns

Promise<ApiResponse<AttachmentMetaData>>


getAttachmentRaw

getAttachmentRaw(requestParameters, initOverrides?): Promise<ApiResponse<AttachmentEntity>>

Get an attachment entity

Parameters

Name Type
requestParameters GetAttachmentRequest
initOverrides? RequestInit

Returns

Promise<ApiResponse<AttachmentEntity>>


getAttachments

getAttachments(requestParameters, initOverrides?): Promise<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

Parameters

Name Type
requestParameters GetAttachmentsRequest
initOverrides? RequestInit

Returns

Promise<PageAttachmentEntity>


getAttachmentsRaw

getAttachmentsRaw(requestParameters, initOverrides?): Promise<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

Parameters

Name Type
requestParameters GetAttachmentsRequest
initOverrides? RequestInit

Returns

Promise<ApiResponse<PageAttachmentEntity>>


request

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

Parameters

Name Type
context RequestOpts
initOverrides? RequestInit

Returns

Promise<Response>

Inherited from

BaseAPI.request


uploadAttachment

uploadAttachment(requestParameters, initOverrides?): Promise<string[]>

Upload an attachment for sending using base64 file encoding. Returns an array whose first element is the ID of the uploaded attachment.

Parameters

Name Type
requestParameters UploadAttachmentRequest
initOverrides? RequestInit

Returns

Promise<string[]>


uploadAttachmentBytes

uploadAttachmentBytes(requestParameters, initOverrides?): Promise<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.

Parameters

Name Type
requestParameters UploadAttachmentBytesRequest
initOverrides? RequestInit

Returns

Promise<string[]>


uploadAttachmentBytesRaw

uploadAttachmentBytesRaw(requestParameters, initOverrides?): Promise<ApiResponse<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.

Parameters

Name Type
requestParameters UploadAttachmentBytesRequest
initOverrides? RequestInit

Returns

Promise<ApiResponse<string[]>>


uploadAttachmentRaw

uploadAttachmentRaw(requestParameters, initOverrides?): Promise<ApiResponse<string[]>>

Upload an attachment for sending using base64 file encoding. Returns an array whose first element is the ID of the uploaded attachment.

Parameters

Name Type
requestParameters UploadAttachmentRequest
initOverrides? RequestInit

Returns

Promise<ApiResponse<string[]>>


uploadMultipartForm

uploadMultipartForm(requestParameters, initOverrides?): Promise<string[]>

Upload an attachment for sending using a Multipart Form request. Returns an array whose first element is the ID of the uploaded attachment.

Parameters

Name Type
requestParameters UploadMultipartFormRequest
initOverrides? RequestInit

Returns

Promise<string[]>


uploadMultipartFormRaw

uploadMultipartFormRaw(requestParameters, initOverrides?): Promise<ApiResponse<string[]>>

Upload an attachment for sending using a Multipart Form request. Returns an array whose first element is the ID of the uploaded attachment.

Parameters

Name Type
requestParameters UploadMultipartFormRequest
initOverrides? RequestInit

Returns

Promise<ApiResponse<string[]>>


withMiddleware

withMiddleware<T>(...middlewares): T

Type parameters

Name Type
T extends BaseAPI<T>

Parameters

Name Type
...middlewares Middleware[]

Returns

T

Inherited from

BaseAPI.withMiddleware


withPostMiddleware

withPostMiddleware<T>(...postMiddlewares): T

Type parameters

Name Type
T extends BaseAPI<T>

Parameters

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

Returns

T

Inherited from

BaseAPI.withPostMiddleware


withPreMiddleware

withPreMiddleware<T>(...preMiddlewares): T

Type parameters

Name Type
T extends BaseAPI<T>

Parameters

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

Returns

T

Inherited from

BaseAPI.withPreMiddleware