Skip to main content
The First Step
Mar 19, 2020 5:56 PM UTC
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
    Mar 19, 2020 6:52 PM UTC

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

    The First Step
    Mar 20, 2020 7:13 AM UTC

    Phong, thanks for your reply.

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