Versions in this module Expand all Collapse all v0 v0.0.15 Jan 12, 2025 v0.0.14 Jan 11, 2025 v0.0.13 Jan 10, 2025 Changes in this version + type HandleMessageSubscriptionEventPayload struct + BusinessAccountId string + Messages []Message + PhoneNumber string + Statuses []Status v0.0.12 Jan 6, 2025 v0.0.11 Dec 13, 2024 v0.0.10 Dec 13, 2024 v0.0.9 Dec 6, 2024 Changes in this version + type AccountAlertSeverityEnum string + const AccountAlertSeverityEnumCritical + const AccountAlertSeverityEnumWarning + type AccountAlertsValue struct + AlertDescription string + AlertSeverity AccountAlertSeverityEnum + AlertStatus string + AlertType string + EntityId string + EntityType string + type AccountReviewUpdateValue struct + Decision string + type AccountUpdateBanInfo struct + WabaBanDate string + WabaBanState []string + type AccountUpdateEventEnum string + const AccountUpdateEventEnumAccountDeleted + const AccountUpdateEventEnumAccountRestriction + const AccountUpdateEventEnumAccountViolation + const AccountUpdateEventEnumDisabledAccount + const AccountUpdateEventEnumPartnerRemoved + const AccountUpdateEventEnumVerifiedAccount + type AccountUpdateRestrictionInfo struct + Expiration string + RestrictionType string + type AccountUpdateValue struct + Event AccountUpdateEventEnum + PhoneNumber string + type AccountUpdateViolationInfo struct + ViolationType string + type AdInteractionSourceMediaTypeEnum string + const AdInteractionSourceMediaTypeImage + const AdInteractionSourceMediaTypeVideo + type AdInteractionSourceTypeEnum string + const AdInteractionSourceTypeUnknown + type BusinessCapabilityUpdateValue struct + MaxDailyConversationPerPhone int + MaxPhoneNumbersPerBusiness int + type Change struct + Field WebhookFieldEnum + Value interface{} + type ChannelEvent struct + Data events.BaseEvent + Type events.EventType + type Contact struct + Profile Profile + WaId string + type Conversation struct + Id string + Origin Origin + type CreatePhoneNumberResponse struct + Id string + type DeleteQrCodeResponse struct + Success bool + type Entry struct + Changes []Change + Id string + type Error struct + type EventManager struct + func NewEventManager() *EventManager + func (em *EventManager) On(eventName events.EventType, handler func(events.BaseEvent)) events.EventType + func (em *EventManager) Publish(event events.EventType, data events.BaseEvent) error + func (em *EventManager) Subscribe(eventName events.EventType) (chan ChannelEvent, error) + func (em *EventManager) Unsubscribe(id events.EventType) + type GenerateQrCodeResponse struct + Code string + DeepLinkUrl string + PrefilledMessage string + QrImageUrl string + type GetAllQrCodesResponse struct + Data []GenerateQrCodeResponse + type InteractiveNotificationTypeEnum string + const NotificationTypeButtonReply + const NotificationTypeListReply + type MediaManager struct + func NewMediaManager(requester request_client.RequestClient) *MediaManager + func (mm *MediaManager) DeleteMedia(id string) (string, error) + func (mm *MediaManager) GetMediaUrlById(id string) (string, error) + type Message struct + Context NotificationPayloadMessageContextSchemaType + Errors []Error + From string + Id string + Timestamp string + Type NotificationMessageTypeEnum + type MessageManager struct + PhoneNumberId string + func NewMessageManager(requester request_client.RequestClient, phoneNumberId string) *MessageManager + func (mm *MessageManager) Send(message components.BaseMessage, phoneNumber string) (string, error) + type MessageStatusCategoryEnum string + const MessageStatusCategorySent + type MessageStatusEnum string + const MessageStatusDelivered + const MessageStatusFailed + const MessageStatusRead + const MessageStatusSent + const MessageStatusUnDelivered + type MessageTemplateCategory string + const MessageTemplateCategoryAuthentication + const MessageTemplateCategoryMarketing + const MessageTemplateCategoryUtility + type MessageTemplateComponentFormat string + const MessageTemplateComponentFormatDocument + const MessageTemplateComponentFormatImage + const MessageTemplateComponentFormatLocation + const MessageTemplateComponentFormatText + const MessageTemplateComponentFormatVideo + type MessageTemplateComponentType string + const MessageTemplateComponentTypeBody + const MessageTemplateComponentTypeButtons + const MessageTemplateComponentTypeCarousel + const MessageTemplateComponentTypeFooter + const MessageTemplateComponentTypeGreeting + const MessageTemplateComponentTypeHeader + const MessageTemplateComponentTypeLimitedTimeOffer + type MessageTemplateCreationResponse struct + Category MessageTemplateCategory + Id string + Status MessageTemplateStatus + type MessageTemplateStatus string + const MessageTemplateStatusApproved + const MessageTemplateStatusPending + const MessageTemplateStatusRejected + type MessageTemplateType string + const MessageTemplateTypeBody + const MessageTemplateTypeButton + const MessageTemplateTypeFooter + const MessageTemplateTypeHeader + type MessagesValue struct + Contacts []Contact + Errors []Error + Messages []Message + MessagingProduct string + Metadata Metadata + Statuses []Status + type Metadata struct + DisplayPhoneNumber string + PhoneNumberId string + type NotificationMessageTypeEnum string + const NotificationMessageTypeAudio + const NotificationMessageTypeButton + const NotificationMessageTypeContacts + const NotificationMessageTypeDocument + const NotificationMessageTypeImage + const NotificationMessageTypeInteractive + const NotificationMessageTypeLocation + const NotificationMessageTypeOrder + const NotificationMessageTypeReaction + const NotificationMessageTypeSticker + const NotificationMessageTypeSystem + const NotificationMessageTypeText + const NotificationMessageTypeUnknown + const NotificationMessageTypeVideo + type NotificationPayloadAudioMessageSchemaType struct + Audio struct{ ... } + type NotificationPayloadButtonInteractionMessageSchemaType struct + ButtonReply struct{ ... } + type NotificationPayloadButtonMessageSchemaType struct + Button struct{ ... } + type NotificationPayloadContactMessageSchemaType struct + Contacts []Contact + type NotificationPayloadDocumentMessageSchemaType struct + Document struct{ ... } + type NotificationPayloadErrorSchemaType struct + Code int + ErrorData struct{ ... } + Message string + Title string + type NotificationPayloadImageMessageSchemaType struct + Image struct{ ... } + type NotificationPayloadInteractionMessageSchemaType struct + Interactive struct{ ... } + type NotificationPayloadListInteractionMessageSchemaType struct + ListReply struct{ ... } + type NotificationPayloadLocationMessageSchemaType struct + Location struct{ ... } + type NotificationPayloadMessageContextSchemaType struct + Forwarded bool + FrequentlyForwarded bool + From string + Id string + ReferredProduct struct{ ... } + type NotificationPayloadOrderMessageSchemaType struct + Order struct{ ... } + type NotificationPayloadReactionMessageSchemaType struct + Reaction struct{ ... } + type NotificationPayloadStickerMessageSchemaType struct + Sticker struct{ ... } + type NotificationPayloadSystemMessageSchemaType struct + Identity struct{ ... } + System struct{ ... } + type NotificationPayloadTextMessageSchemaType struct + Referral struct{ ... } + Text struct{ ... } + type NotificationPayloadVideoMessageSchemaType struct + Video struct{ ... } + type NotificationReasonEnum string + const NotificationReasonMessage + type Origin struct + ExpirationTimestamp string + Type MessageStatusCategoryEnum + type PhoneNumberManager struct + func NewPhoneNumberManager(config *PhoneNumberManagerConfig) *PhoneNumberManager + func (manager *PhoneNumberManager) Create(phoneNumber, verifiedName, countryCode string) (CreatePhoneNumberResponse, error) + func (manager *PhoneNumberManager) DeleteQrCode(phoneNumber, id string) (*DeleteQrCodeResponse, error) + func (manager *PhoneNumberManager) Fetch(phoneNumberId string) (*WhatsappBusinessAccountPhoneNumber, error) + func (manager *PhoneNumberManager) FetchAll(getSandBoxNumbers bool) (*WhatsappBusinessAccountPhoneNumberEdge, error) + func (manager *PhoneNumberManager) GenerateQrCode(phoneNumber string, prefilledMessage string) (*GenerateQrCodeResponse, error) + func (manager *PhoneNumberManager) GetAllQrCodes(phoneNumber string) (*GetAllQrCodesResponse, error) + func (manager *PhoneNumberManager) GetQrCodeById(phoneNumber, id string) (*GetAllQrCodesResponse, error) + func (manager *PhoneNumberManager) RequestVerificationCode(phoneNumberId string, codeMethod VerifyCodeMethod, languageCode string) (RequestVerificationCodeResponse, error) + func (manager *PhoneNumberManager) UpdateQrCode(phoneNumber, id, prefilledMessage string) (*GenerateQrCodeResponse, error) + func (manager *PhoneNumberManager) VerifyCode(phoneNumberId, verificationCode string) (VerifyCodeResponse, error) + type PhoneNumberManagerConfig struct + ApiAccessToken string + BusinessAccountId string + Requester *request_client.RequestClient + type PhoneNumberNameUpdateValue struct + Decision string + DisplayPhoneNumber string + RejectionReason string + RequestedVerifiedName string + type PhoneNumberQualityUpdateValue struct + CurrentLimit string + DisplayPhoneNumber string + Event string + type Pricing struct + Category MessageStatusCategoryEnum + PricingModel string + type Profile struct + Name string + type RequestVerificationCodeResponse struct + Success bool + type SecurityValue struct + DisplayPhoneNumber string + Event string + Requester string + type Status struct + Conversation Conversation + Errors []Error + Pricing Pricing + RecipientId string + Status string + Timestamp string + type SystemNotificationTypeEnum string + const SystemNotificationTypeCustomerIdentityChanged + const SystemNotificationTypeCustomerPhoneNumberChange + type TemplateCategoryUpdateValue struct + CorrectCategory MessageTemplateCategory + MessageTemplateId string + MessageTemplateLanguage string + MessageTemplateName string + NewCategory MessageTemplateCategory + PreviousCategory MessageTemplateCategory + type TemplateManager struct + func NewTemplateManager(config *TemplateManagerConfig) *TemplateManager + func (manager *TemplateManager) Create(body WhatsappMessageTemplateCreateRequestBody) (*MessageTemplateCreationResponse, error) + func (manager *TemplateManager) Fetch(Id string) (*WhatsAppBusinessMessageTemplateNode, error) + func (manager *TemplateManager) FetchAll() (*WhatsAppBusinessTemplatesFetchResponseEdge, error) + func (manager *TemplateManager) MigrateFromOtherBusinessAccount(sourcePageNumber int, sourceWabaId int) (*TemplateMigrationResponse, error) + func (manager *TemplateManager) Update(templateId string, ...) (*MessageTemplateCreationResponse, error) + func (tm *TemplateManager) Delete(id string) + type TemplateManagerConfig struct + ApiAccessToken string + BusinessAccountId string + Requester *request_client.RequestClient + type TemplateMessageButtonType string + const TemplateMessageButtonTypeCopyCode + const TemplateMessageButtonTypePhoneNumber + const TemplateMessageButtonTypeQuickReply + const TemplateMessageButtonTypeUrl + type TemplateMessageComponentButton struct + Example string + PhoneNumber string + Text string + Type TemplateMessageButtonType + Url string + type TemplateMessageComponentButtonExample []string + type TemplateMessageComponentCard struct + type TemplateMessageComponentExample struct + BodyText [][]string + HeaderHandle []string + HeaderText []string + type TemplateMessageLimitedTimeOfferParameter struct + type TemplateMessagePreviewEdge struct + Data []TemplateMessagePreviewNode + Paging internal.WhatsAppBusinessApiPaginationMeta + type TemplateMessagePreviewNode struct + Body string + Buttons []WhatsAppBusinessAccountMessageTemplatePreviewButton + Footer string + Header string + Language string + type TemplateMessageQualityScore struct + Date int + Reasons []string + Score int + type TemplateMessageRejectionReasonEnum string + const TemplateMessageRejectionReasonEnumAbusiveContent + const TemplateMessageRejectionReasonEnumIncorrectCategory + const TemplateMessageRejectionReasonEnumInvalidFormat + const TemplateMessageRejectionReasonEnumNone + const TemplateMessageRejectionReasonEnumScam + type TemplateMessageStatusUpdateDisableInfo struct + DisableDate string + type TemplateMessageStatusUpdateEventEnum string + const TemplateMessageStatusUpdateEventEnumApproved + const TemplateMessageStatusUpdateEventEnumFlaggedForDisabling + const TemplateMessageStatusUpdateEventEnumPaused + const TemplateMessageStatusUpdateEventEnumPendingDeletion + const TemplateMessageStatusUpdateEventEnumRejected + type TemplateMessageStatusUpdateOtherInfo struct + Title string + type TemplateMigrationResponse struct + FailedTemplates map[string]string + MigratedTemplates []string + type TemplateQualityUpdateValue struct + MessageTemplateId string + MessageTemplateLanguage string + MessageTemplateName string + NewQualityScore string + PreviousQualityScore string + type TemplateStatusUpdateValue struct + DisableInfo TemplateMessageStatusUpdateDisableInfo + Event TemplateMessageStatusUpdateEventEnum + MessageTemplateId string + MessageTemplateLanguage string + MessageTemplateName string + OtherInfo TemplateMessageStatusUpdateOtherInfo + Reason TemplateMessageRejectionReasonEnum + type VerifyCodeMethod string + const VerifyCodeMethodSms + const VerifyCodeMethodVoice + type VerifyCodeResponse struct + Success bool + type WebhookFieldEnum string + const WebhookFieldEnumAccountAlerts + const WebhookFieldEnumAccountReview + const WebhookFieldEnumAccountUpdate + const WebhookFieldEnumBusinessCapability + const WebhookFieldEnumMessageTemplateQuality + const WebhookFieldEnumMessageTemplateStatus + const WebhookFieldEnumMessages + const WebhookFieldEnumPhoneNumberName + const WebhookFieldEnumPhoneNumberQuality + const WebhookFieldEnumSecurity + const WebhookFieldEnumTemplateCategoryUpdate + type WebhookManager struct + EventManager EventManager + Requester request_client.RequestClient + func NewWebhook(options *WebhookManagerConfig) *WebhookManager + func (wh *WebhookManager) GetRequestHandler(c echo.Context) error + func (wh *WebhookManager) ListenToEvents() + func (wh *WebhookManager) PostRequestHandler(c echo.Context) error + type WebhookManagerConfig struct + EventManager EventManager + Path string + Port int + Requester request_client.RequestClient + Secret string + type WhatsAppBusinessAccountMessageTemplateDeleteRequestBody struct + HsmId string + Name string + type WhatsAppBusinessAccountMessageTemplatePreviewButton struct + AutoFillText string + Text string + type WhatsAppBusinessAccountMessageTemplateUpdateRequestBody struct + Category string + Components []WhatsappMessageTemplateComponentCreateOrUpdateRequestBody + MessageSendTtlSeconds int + type WhatsAppBusinessHSMWhatsAppHSMComponent struct + AddSecurityRecommendation bool + Buttons []TemplateMessageComponentButton + Cards []TemplateMessageComponentCard + CodeExpirationMinutes int + Example TemplateMessageComponentExample + Format MessageTemplateComponentFormat + LimitedTimeOffer TemplateMessageLimitedTimeOfferParameter + Text string + Type MessageTemplateStatus + type WhatsAppBusinessMessageTemplateNode struct + Category MessageTemplateCategory + Components []WhatsAppBusinessHSMWhatsAppHSMComponent + CorrectCategory string + CtaUrlLinkTrackingOptedOut bool + Id string + Language string + LibraryTemplateName string + MessageSendTtlSeconds int + Name string + PreviousCategory string + QualityScore TemplateMessageQualityScore + RejectedReason string + Status MessageTemplateStatus + type WhatsAppBusinessTemplatesFetchResponseEdge struct + Data []WhatsAppBusinessMessageTemplateNode + Paging internal.WhatsAppBusinessApiPaginationMeta + type WhatsappApiNotificationPayloadSchemaType struct + Entry []Entry + Object string + type WhatsappBusinessAccountPhoneNumber struct + CodeVerification struct{ ... } + DisplayPhoneNumber string + Id string + PlatformType string + QualityRating string + VerifiedName string + type WhatsappBusinessAccountPhoneNumberEdge struct + Data []WhatsappBusinessAccountPhoneNumber + Paging internal.WhatsAppBusinessApiPaginationMeta + Summary string + type WhatsappMessageTemplateButtonCreateRequestBody struct + Example string + FlowId string + PhoneNumber string + Text string + Type string + Url string + ZeroTapTermsAccepted bool + type WhatsappMessageTemplateComponentCreateOrUpdateRequestBody struct + Buttons []WhatsappMessageTemplateButtonCreateRequestBody + Format MessageTemplateComponentFormat + Text string + Type MessageTemplateComponentType + func (component *WhatsappMessageTemplateComponentCreateOrUpdateRequestBody) AddButton(button WhatsappMessageTemplateButtonCreateRequestBody) + type WhatsappMessageTemplateCreateRequestBody struct + AllowCategoryChange bool + Category string + Components []WhatsappMessageTemplateComponentCreateOrUpdateRequestBody + Language string + LibraryTemplateButtonInputs []WhatsappMessageTemplateButtonCreateRequestBody + LibraryTemplateName string + Name string + func (body *WhatsappMessageTemplateCreateRequestBody) AddComponent(component WhatsappMessageTemplateComponentCreateOrUpdateRequestBody)