Repository navigation
v0.7.0
Added
- Authentication template (OTP) builder.
buildAuthTemplate({ to, name, language, otp, otpButtonIndex? })and the matching
client.sendAuthTemplate(...)produce the documented copy-code /
one-tap / zero-tap wire payload with the OTP code duplicated into
both the body and URL-button parameters (the canonical footgun
this builder exists to remove). OTP length validated against
Meta's 15-char ceiling. - Voice-note builder.
buildVoice({ to, id|link })and
client.sendVoice(...)produce audio messages withvoice: true,
triggering transcription support, auto-download, and the "played"
delivery status. - Carousel-template builder.
buildCarouselTemplate({ to, name, language, bodyParameters?, cards })and
client.sendCarouselTemplate(...)produce media-card carousel
template sends with 1–10 cards. Each card'scard_indexis
computed from iteration order; consumers can't misorder it. - Limited-time-offer template support. Three new
TemplateParameterunion variants:
TemplateParameterLimitedTimeOffer,
TemplateParameterCouponCode, andTemplateParameterPayload.
TemplateComponent.typewidens to accept"carousel"and
"limited_time_offer". Use via the existingbuildTemplate(...)
/
client.sendTemplate(...). - New
CarouselCardComponentexported type.AudioMessage.audio
gains an optionalvoice?: booleanfield.
Every wire shape is grounded in a Meta doc URL referenced in
source-file JSDoc and pinned via byte-for-byte snapshot tests:
- https://developers.facebook.com/documentation/business-messaging/whatsapp/templates/authentication-templates/copy-code-button-authentication-templates/
- https://developers.facebook.com/documentation/business-messaging/whatsapp/messages/audio-messages
- https://developers.facebook.com/documentation/business-messaging/whatsapp/templates/marketing-templates/media-card-carousel-templates/
- https://developers.facebook.com/documentation/business-messaging/whatsapp/templates/marketing-templates/limited-time-offer-templates/