## What this teaches

How to whatsApp media templates missing from HSMContentContent TypeScript types.

## The problem

Issue messagebird/messagebird-nodejs#82 (closed, 4 comments): a reporter adding a media template hit a TypeScript error setting the components property on the HSMContentContent interface, which had no components at all. The maintainer pushed a fix for the HSM types; the reporter then found HSMComponentDocumentParameter and HSMComponentImageParameter were still missing and that params was wrongly mandatory (causing "hsm params and components can not be set at the same time (code: 21)"), and opened PR #84 with the fix.

## What worked (verified answer)

If you send WhatsApp media templates through the Node SDK and TypeScript complains about components on HSMContentContent, update the SDK to a version that includes the type fixes from PR #84. The HSMComponentParameter type now covers document and image parameters, and params is no longer mandatory alongside components. If you instead hit "hsm params and components can not be set at the same time (code: 21)", check that you are not setting params and components together in the same request.

## Source

gh:messagebird/messagebird-nodejs#82 - https://github.com/messagebird/messagebird-nodejs/issues/82
