Skip to main content
The First Step
March 19, 2020
Question

JavaScript (Node) - How do i get messageStore list using multiple message types?

Hello,

I'm using ringcentral-ts in my node application.

Trying to get messageStore for SMS and VoiceMail only by ringCentral.account().extension(extentionId).messageStore().list(params)


In params, there is a property called messageType which defined as:


/**

* The type of the resulting messages. If not specified, all messages without message type filtering are returned. Multiple values are accepted

*/

messageType?: 'Fax' | 'SMS' | 'VoiceMail' | 'Pager' | 'Text';


My question is how do i actually query for multiple types?

(There is a compilation error if i'm trying to put multiple values for messageType)


Thanks!



    2 replies

    PhongVu
    Community Manager
    Community Manager
    March 19, 2020

    Simply put them in an array ["Fax", "SMS"] etc.

    The First Step
    March 20, 2020

    Phong, thanks for your reply.

    Unfortunately i can't use an array because of messageType definition: