Class: AttachmentControllerApi

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new AttachmentControllerApi(configuration?)

Parameters

NameType
configurationConfiguration

Inherited from

BaseAPI.constructor

Properties

configuration

Protected configuration: Configuration

Inherited from

BaseAPI.configuration

Methods

deleteAllAttachments

deleteAllAttachments(initOverrides?): Promise<void>

Delete all attachments

Parameters

NameType
initOverrides?RequestInit

Returns

Promise<void>


deleteAllAttachmentsRaw

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

Delete all attachments

Parameters

NameType
initOverrides?RequestInit

Returns

Promise<ApiResponse<void»


deleteAttachment

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

Email attachments are essentially files with meta data. Files are byte arrays and the meta data is a content type and a filename. These properties allow email clients to display the filename and icon etc. When sending emails with attachments first upload each attachment with an upload endpoint. Record the returned attachment ID and use it with subsequent email sending. For legacy reasons the ID is returned as the first element in an array. Only a single ID is ever returned. To send the attachments pass a list of attachment IDs with SendEmailOptions when sending an email. Using the upload endpoints prior to sending mean attachments can easily be reused. Delete an attachment

Parameters

NameType
requestParametersDeleteAttachmentRequest
initOverrides?RequestInit

Returns

Promise<void>


deleteAttachmentRaw

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

Email attachments are essentially files with meta data. Files are byte arrays and the meta data is a content type and a filename. These properties allow email clients to display the filename and icon etc. When sending emails with attachments first upload each attachment with an upload endpoint. Record the returned attachment ID and use it with subsequent email sending. For legacy reasons the ID is returned as the first element in an array. Only a single ID is ever returned. To send the attachments pass a list of attachment IDs with SendEmailOptions when sending an email. Using the upload endpoints prior to sending mean attachments can easily be reused. Delete an attachment

Parameters

NameType
requestParametersDeleteAttachmentRequest
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

NameType
requestParametersDownloadAttachmentAsBase64EncodedRequest
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

NameType
requestParametersDownloadAttachmentAsBase64EncodedRequest
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

NameType
requestParametersDownloadAttachmentAsBytesRequest
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

NameType
requestParametersDownloadAttachmentAsBytesRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<string»


getAttachment

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

Email attachments are essentially files with meta data. Files are byte arrays and the meta data is a content type and a filename. These properties allow email clients to display the filename and icon etc. When sending emails with attachments first upload each attachment with an upload endpoint. Record the returned attachment ID and use it with subsequent email sending. For legacy reasons the ID is returned as the first element in an array. Only a single ID is ever returned. To send the attachments pass a list of attachment IDs with SendEmailOptions when sending an email. Using the upload endpoints prior to sending mean attachments can easily be reused. Get an attachment entity

Parameters

NameType
requestParametersGetAttachmentRequest
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

NameType
requestParametersGetAttachmentInfoRequest
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

NameType
requestParametersGetAttachmentInfoRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<AttachmentMetaData»


getAttachmentRaw

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

Email attachments are essentially files with meta data. Files are byte arrays and the meta data is a content type and a filename. These properties allow email clients to display the filename and icon etc. When sending emails with attachments first upload each attachment with an upload endpoint. Record the returned attachment ID and use it with subsequent email sending. For legacy reasons the ID is returned as the first element in an array. Only a single ID is ever returned. To send the attachments pass a list of attachment IDs with SendEmailOptions when sending an email. Using the upload endpoints prior to sending mean attachments can easily be reused. Get an attachment entity

Parameters

NameType
requestParametersGetAttachmentRequest
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

NameType
requestParametersGetAttachmentsRequest
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

NameType
requestParametersGetAttachmentsRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<PageAttachmentEntity»


request

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

Parameters

NameType
contextRequestOpts
initOverrides?RequestInit

Returns

Promise<Response>

Inherited from

BaseAPI.request


uploadAttachment

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

Email attachments are essentially files with meta data. Files are byte arrays and the meta data is a content type and a filename. These properties allow email clients to display the filename and icon etc. When sending emails with attachments first upload each attachment with an upload endpoint. Record the returned attachment ID and use it with subsequent email sending. For legacy reasons the ID is returned as the first element in an array. Only a single ID is ever returned. To send the attachments pass a list of attachment IDs with SendEmailOptions when sending an email. Using the upload endpoints prior to sending mean attachments can easily be reused. Upload an attachment for sending using base64 file encoding. Returns an array whose first element is the ID of the uploaded attachment.

Parameters

NameType
requestParametersUploadAttachmentRequest
initOverrides?RequestInit

Returns

Promise<string[]>


uploadAttachmentBytes

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

Email attachments are essentially files with meta data. Files are byte arrays and the meta data is a content type and a filename. These properties allow email clients to display the filename and icon etc. When sending emails with attachments first upload each attachment with an upload endpoint. Record the returned attachment ID and use it with subsequent email sending. For legacy reasons the ID is returned as the first element in an array. Only a single ID is ever returned. To send the attachments pass a list of attachment IDs with SendEmailOptions when sending an email. Using the upload endpoints prior to sending mean attachments can easily be reused. 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

NameType
requestParametersUploadAttachmentBytesRequest
initOverrides?RequestInit

Returns

Promise<string[]>


uploadAttachmentBytesRaw

uploadAttachmentBytesRaw(requestParameters, initOverrides?): Promise<ApiResponse<string[]»

Email attachments are essentially files with meta data. Files are byte arrays and the meta data is a content type and a filename. These properties allow email clients to display the filename and icon etc. When sending emails with attachments first upload each attachment with an upload endpoint. Record the returned attachment ID and use it with subsequent email sending. For legacy reasons the ID is returned as the first element in an array. Only a single ID is ever returned. To send the attachments pass a list of attachment IDs with SendEmailOptions when sending an email. Using the upload endpoints prior to sending mean attachments can easily be reused. 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

NameType
requestParametersUploadAttachmentBytesRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<string[]»


uploadAttachmentRaw

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

Email attachments are essentially files with meta data. Files are byte arrays and the meta data is a content type and a filename. These properties allow email clients to display the filename and icon etc. When sending emails with attachments first upload each attachment with an upload endpoint. Record the returned attachment ID and use it with subsequent email sending. For legacy reasons the ID is returned as the first element in an array. Only a single ID is ever returned. To send the attachments pass a list of attachment IDs with SendEmailOptions when sending an email. Using the upload endpoints prior to sending mean attachments can easily be reused. Upload an attachment for sending using base64 file encoding. Returns an array whose first element is the ID of the uploaded attachment.

Parameters

NameType
requestParametersUploadAttachmentRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<string[]»


uploadMultipartForm

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

Email attachments are essentially files with meta data. Files are byte arrays and the meta data is a content type and a filename. These properties allow email clients to display the filename and icon etc. When sending emails with attachments first upload each attachment with an upload endpoint. Record the returned attachment ID and use it with subsequent email sending. For legacy reasons the ID is returned as the first element in an array. Only a single ID is ever returned. To send the attachments pass a list of attachment IDs with SendEmailOptions when sending an email. Using the upload endpoints prior to sending mean attachments can easily be reused. Upload an attachment for sending using a Multipart Form request. Returns an array whose first element is the ID of the uploaded attachment.

Parameters

NameType
requestParametersUploadMultipartFormRequest
initOverrides?RequestInit

Returns

Promise<string[]>


uploadMultipartFormRaw

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

Email attachments are essentially files with meta data. Files are byte arrays and the meta data is a content type and a filename. These properties allow email clients to display the filename and icon etc. When sending emails with attachments first upload each attachment with an upload endpoint. Record the returned attachment ID and use it with subsequent email sending. For legacy reasons the ID is returned as the first element in an array. Only a single ID is ever returned. To send the attachments pass a list of attachment IDs with SendEmailOptions when sending an email. Using the upload endpoints prior to sending mean attachments can easily be reused. Upload an attachment for sending using a Multipart Form request. Returns an array whose first element is the ID of the uploaded attachment.

Parameters

NameType
requestParametersUploadMultipartFormRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<string[]»


withMiddleware

withMiddleware<T>(…middlewares): T

Type parameters

NameType
Textends BaseAPI<T>

Parameters

NameType
...middlewaresMiddleware[]

Returns

T

Inherited from

BaseAPI.withMiddleware


withPostMiddleware

withPostMiddleware<T>(…postMiddlewares): T

Type parameters

NameType
Textends BaseAPI<T>

Parameters

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

Returns

T

Inherited from

BaseAPI.withPostMiddleware


withPreMiddleware

withPreMiddleware<T>(…preMiddlewares): T

Type parameters

NameType
Textends BaseAPI<T>

Parameters

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

Returns

T

Inherited from

BaseAPI.withPreMiddleware