Skip to main content

PrivateMessageApiClient

Contains all the endpoints needed to manage private messages.

Constructors

Constructor

new PrivateMessageApiClient(): PrivateMessageApiClient

Returns

PrivateMessageApiClient

Methods

chunkUploadDone()

static chunkUploadDone(data, config?): Promise<SCPrivateMessageUploadMediaType>

This endpoint finalizes the chunk upload and creates the file.

Parameters

ParameterTypeDescription
dataMessageChunkUploadDoneParams
config?AxiosRequestConfig

Returns

Promise<SCPrivateMessageUploadMediaType>


deleteAMessage()

static deleteAMessage(id, config?): Promise<any>

This endpoint deletes a single message.

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig

Returns

Promise<any>


deleteAThread()

static deleteAThread(params, config?): Promise<any>

This endpoint deletes a thread.

Parameters

ParameterTypeDescription
paramsThreadDeleteParams
config?AxiosRequestConfig

Returns

Promise<any>


getAllSnippets()

static getAllSnippets(config?): Promise<SCPaginatedResponse<SCPrivateMessageSnippetType>>

This endpoint retrieves all snippets.

Parameters

ParameterTypeDescription
config?AxiosRequestConfig

Returns

Promise<SCPaginatedResponse<SCPrivateMessageSnippetType>>


getASingleMessage()

static getASingleMessage(id, config?): Promise<SCPrivateMessageThreadType>

This endpoint retrieves a single message using ID.

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig

Returns

Promise<SCPrivateMessageThreadType>


getAThread()

static getAThread(params, config?): Promise<SCPaginatedResponse<SCPrivateMessageThreadType>>

This endpoint retrieves all messages in a thread.

Parameters

ParameterTypeDescription
paramsThreadParams
config?AxiosRequestConfig

Returns

Promise<SCPaginatedResponse<SCPrivateMessageThreadType>>


searchUser()

static searchUser(search, config?): Promise<SCPaginatedResponse<SCUserType>>

This endpoint performs users search.

Parameters

ParameterTypeDescription
searchstring
config?AxiosRequestConfig

Returns

Promise<SCPaginatedResponse<SCUserType>>


sendAMessage()

static sendAMessage(data, config?): Promise<SCPrivateMessageThreadType>

This endpoint sends a message.

Parameters

ParameterTypeDescription
dataMessageCreateParams
config?AxiosRequestConfig

Returns

Promise<SCPrivateMessageThreadType>


uploadMedia()

static uploadMedia(data, config?): Promise<SCPrivateMessageUploadMediaType>

This endpoint uploads a media.

Parameters

ParameterTypeDescription
dataMessageMediaUploadParams
config?AxiosRequestConfig

Returns

Promise<SCPrivateMessageUploadMediaType>


uploadMediaInChunks()

static uploadMediaInChunks(data, config?): Promise<SCPrivateMessageUploadMediaChunkType>

This endpoint performs the chunk upload of a file.

Parameters

ParameterTypeDescription
dataMessageMediaChunksParams
config?AxiosRequestConfig

Returns

Promise<SCPrivateMessageUploadMediaChunkType>


uploadThumbnail()

static uploadThumbnail(data, config?): Promise<SCPrivateMessageUploadThumbnailType>

This endpoint uploads a thumbnail.

Parameters

ParameterTypeDescription
dataMessageThumbnailUploadParams
config?AxiosRequestConfig

Returns

Promise<SCPrivateMessageUploadThumbnailType>