whatsapp_api

package
v1.0.68 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WhatsAppAPIService

type WhatsAppAPIService struct {
	// contains filtered or unexported fields
}

func NewWhatsAppAPIService

func NewWhatsAppAPIService(db *gorm.DB, ctx *context.ERPContext, baseURL, facebookBaseURL string, storageProvider string) *WhatsAppAPIService

func (*WhatsAppAPIService) GetMedia

func (w *WhatsAppAPIService) GetMedia(mediaID, phoneNumberID string) (*models.FileModel, error)

func (*WhatsAppAPIService) MarkAsRead added in v1.0.66

func (w *WhatsAppAPIService) MarkAsRead(phoneNumberID, incomingMsgID string, isTyping bool) error

func (*WhatsAppAPIService) SendMessage

func (w *WhatsAppAPIService) SendMessage(phoneNumberID string,
	message string,
	file []*models.FileModel,
	contact *models.ContactModel,
	quoteMsgID *string,

	param any,
) (*objects.WaResponse, error)

func (*WhatsAppAPIService) SendWhatsappApiImage

func (w *WhatsAppAPIService) SendWhatsappApiImage(phoneNumberID string, contact *models.ContactModel, filePath, mimeType string) (*string, error)

func (*WhatsAppAPIService) SetAccessToken

func (w *WhatsAppAPIService) SetAccessToken(accessToken *string)

func (*WhatsAppAPIService) WhatsappApiWebhook

func (w *WhatsAppAPIService) WhatsappApiWebhook(
	req *http.Request,
	data objects.WhatsappApiWebhookRequest,
	waSession string,
	getContact func(phoneNumber, displayName string, companyID *string) (*models.ContactModel, error),
	getSession func(phoneNumberID string, companyID *string) (*objects.WhatsappApiSession, error),
	getMessageData func(phoneNumberID string, msg *models.WhatsappMessageModel) error,
	runAutoPilot func(phoneNumberID string, companyID *string, msg *models.WhatsappMessageModel) error,
	interactiveCallback func(phoneNumberID string, companyID *string, msg *objects.WebhookEntryChangeMessage) error,
) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL