Skip to content

Using a string tag in sendTransacSms yields type errorΒ #66

@Yoctoboy

Description

@Yoctoboy

Hey guys πŸ‘‹

In v2.5.0, it is not possible to do the following anymore:

import { TransactionalSMSApi } from '@getbrevo/brevo';

const smsApi = new TransactionalSMSApi();

await smsApi.sendTransacSms({
  sender: "some-sender",
  recipient: "some-recipient",
  content: "some-content",
  tag: "some-tag", // πŸ‘ˆ yields type error: Type 'string' has no properties in common with type 'SendTransacSmsTag'.
})

πŸ‘‰ Minimal Repro repository here πŸ‘ˆ

The documentation mentions that tag can be a string, but the type declarations disagrees with that.

A comment in the SendTransacSmsTag says A tag can be a string or an array of strings.. But typescript also fails when I use an array of strings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions