Skip to content

v0.7.0

Choose a tag to compare

@github-actions github-actions released this 11 May 01:00
· 61 commits to main since this release

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 with voice: 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's card_index is
    computed from iteration order; consumers can't misorder it.
  • Limited-time-offer template support. Three new
    TemplateParameter union variants:
    TemplateParameterLimitedTimeOffer,
    TemplateParameterCouponCode, and TemplateParameterPayload.
    TemplateComponent.type widens to accept "carousel" and
    "limited_time_offer". Use via the existing buildTemplate(...)
    /
    client.sendTemplate(...).
  • New CarouselCardComponent exported type. AudioMessage.audio
    gains an optional voice?: boolean field.

Every wire shape is grounded in a Meta doc URL referenced in
source-file JSDoc and pinned via byte-for-byte snapshot tests: