objects

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: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendChatMessage

func SendChatMessage(msg ChatMessage) (any, error)

func SendChatMessages

func SendChatMessages(msgs []ChatMessage) (any, error)

Types

type AiResponse added in v1.0.61

type AiResponse struct {
	Response string      `json:"response"`
	Type     string      `json:"type"`
	Command  string      `json:"command"`
	Params   interface{} `json:"params"`
}

type Attachment added in v1.0.64

type Attachment struct {
	Payload Payload `json:"payload"`
	Type    string  `json:"type"`
}

type BiteShipDraftOrderResponse

type BiteShipDraftOrderResponse struct {
	Success bool   `json:"success"`
	Code    int    `json:"code"`
	Object  string `json:"object"`
	ID      string `json:"id"`
	Origin  struct {
		AreaID       string `json:"area_id"`
		Address      string `json:"address"`
		Note         string `json:"note"`
		ContactName  string `json:"contact_name"`
		ContactPhone string `json:"contact_phone"`
		ContactEmail string `json:"contact_email"`
		Coordinate   struct {
			Latitude  float64 `json:"latitude"`
			Longitude float64 `json:"longitude"`
		} `json:"coordinate"`
		ProvinceName     string `json:"province_name"`
		CityName         string `json:"city_name"`
		DistrictName     string `json:"district_name"`
		PostalCode       int    `json:"postal_code"`
		CollectionMethod string `json:"collection_method"`
	} `json:"origin"`
	Destination struct {
		AreaID       string `json:"area_id"`
		Address      string `json:"address"`
		Note         string `json:"note"`
		ContactName  string `json:"contact_name"`
		ContactPhone string `json:"contact_phone"`
		ContactEmail string `json:"contact_email"`
		Coordinate   struct {
			Latitude  float64 `json:"latitude"`
			Longitude float64 `json:"longitude"`
		} `json:"coordinate"`
		ProvinceName    string `json:"province_name"`
		CityName        string `json:"city_name"`
		DistrictName    string `json:"district_name"`
		PostalCode      int    `json:"postal_code"`
		ProofOfDelivery struct {
			Use  bool   `json:"use"`
			Fee  int    `json:"fee"`
			Note string `json:"note"`
			Link string `json:"link"`
		} `json:"proof_of_delivery"`
		CashOnDelivery struct {
			PaymentMethod string  `json:"payment_method"`
			Amount        float64 `json:"amount"`
			Note          string  `json:"note"`
			Type          string  `json:"type"`
		} `json:"cash_on_delivery"`
	} `json:"destination"`
	Courier  Shipment `json:"courier"`
	Delivery struct {
		Type         string    `json:"type"`
		Datetime     time.Time `json:"datetime"`
		Note         string    `json:"note"`
		Distance     float64   `json:"distance"`
		DistanceUnit string    `json:"distance_unit"`
	} `json:"delivery"`
	Extra    []string    `json:"extra"`
	Tags     []string    `json:"tags"`
	Metadata interface{} `json:"metadata"`
	Items    []struct {
		Name        string  `json:"name"`
		Description string  `json:"description"`
		Value       float64 `json:"value"`
		Quantity    int     `json:"quantity"`
		Height      int     `json:"height"`
		Width       int     `json:"width"`
		Length      int     `json:"length"`
		Weight      int     `json:"weight"`
	} `json:"items"`
	Price       float64   `json:"price"`
	Status      string    `json:"status"`
	ReferenceID string    `json:"reference_id"`
	InvoiceID   string    `json:"invoice_id"`
	UserID      string    `json:"user_id"`
	CreatedAt   time.Time `json:"created_at"`
	UpdatedAt   time.Time `json:"updated_at"`
	PlacedAt    time.Time `json:"placed_at"`
	ReadyAt     time.Time `json:"ready_at"`
	ConfirmedAt time.Time `json:"confirmed_at"`
	DeletedAt   time.Time `json:"deleted_at"`
}

type BiteShipDraftShipmentRequest

type BiteShipDraftShipmentRequest struct {
	OriginContactName       string `json:"origin_contact_name"`
	OriginContactPhone      string `json:"origin_contact_phone"`
	OriginAddress           string `json:"origin_address"`
	OriginNote              string `json:"origin_note"`
	OriginPostalCode        int    `json:"origin_postal_code"`
	DestinationContactName  string `json:"destination_contact_name"`
	DestinationContactPhone string `json:"destination_contact_phone"`
	DestinationContactEmail string `json:"destination_contact_email"`
	DestinationAddress      string `json:"destination_address"`
	DestinationPostalCode   int    `json:"destination_postal_code"`
	DestinationNote         string `json:"destination_note"`
	CourierCompany          string `json:"courier_company"`
	CourierType             string `json:"courier_type"`
	DeliveryType            string `json:"delivery_type"`
	OrderNote               string `json:"order_note"`
	Items                   []Item `json:"items"`
}

type BiteShipOrderResponse

type BiteShipOrderResponse struct {
	Success bool   `json:"success"`
	Error   string `json:"error"`
	Message string `json:"message"`
	Object  string `json:"object"`
	ID      string `json:"id"`
	Shipper struct {
		Name         string `json:"name"`
		Email        string `json:"email"`
		Phone        string `json:"phone"`
		Organization string `json:"organization"`
	} `json:"shipper"`
	Origin struct {
		ContactName  string     `json:"contact_name"`
		ContactPhone string     `json:"contact_phone"`
		Coordinate   Coordinate `json:"coordinate"`
		Address      string     `json:"address"`
		Note         string     `json:"note"`
		PostalCode   int        `json:"postal_code"`
	} `json:"origin"`
	Destination struct {
		ContactName     string `json:"contact_name"`
		ContactPhone    string `json:"contact_phone"`
		ContactEmail    string `json:"contact_email"`
		Address         string `json:"address"`
		Note            string `json:"note"`
		ProofOfDelivery struct {
			Use  bool   `json:"use"`
			Fee  int    `json:"fee"`
			Note string `json:"note"`
			Link string `json:"link"`
		} `json:"proof_of_delivery"`
		CashOnDelivery struct {
			ID     string `json:"id"`
			Amount int    `json:"amount"`
			Fee    int    `json:"fee"`
			Note   string `json:"note"`
			Type   string `json:"type"`
		} `json:"cash_on_delivery"`
		Coordinate Coordinate `json:"coordinate"`
		PostalCode int        `json:"postal_code"`
	} `json:"destination"`
	Courier  Shipment `json:"courier"`
	Delivery struct {
		Datetime     string  `json:"datetime"`
		Note         string  `json:"note"`
		Type         string  `json:"type"`
		Distance     float64 `json:"distance"`
		DistanceUnit string  `json:"distance_unit"`
	} `json:"delivery"`
	ReferenceID string `json:"reference_id"`
	Items       []struct {
		Name        string `json:"name"`
		Description string `json:"description"`
		SKU         string `json:"sku"`
		Value       int    `json:"value"`
		Quantity    int    `json:"quantity"`
		Length      int    `json:"length"`
		Width       int    `json:"width"`
		Height      int    `json:"height"`
		Weight      int    `json:"weight"`
	} `json:"items"`
	Extra    []interface{}          `json:"extra"`
	Price    float64                `json:"price"`
	Metadata map[string]interface{} `json:"metadata"`
	Note     string                 `json:"note"`
	Status   string                 `json:"status"`
}

type BiteShipRateResponse

type BiteShipRateResponse struct {
	Success bool   `json:"success"`
	Object  string `json:"object"`
	Message string `json:"message"`
	Code    int    `json:"code"`
	Origin  struct {
		LocationID      string  `json:"location_id"`
		Latitude        float64 `json:"latitude"`
		Longitude       float64 `json:"longitude"`
		PostalCode      string  `json:"postal_code"`
		CountryName     string  `json:"country_name"`
		CountryCode     string  `json:"country_code"`
		Administrative1 struct {
			Name string `json:"name"`
			Type string `json:"type"`
		} `json:"administrative_division_level_1"`
		Administrative2 struct {
			Name string `json:"name"`
			Type string `json:"type"`
		} `json:"administrative_division_level_2"`
		Administrative3 struct {
			Name string `json:"name"`
			Type string `json:"type"`
		} `json:"administrative_division_level_3"`
		Administrative4 struct {
			Name string `json:"name"`
			Type string `json:"type"`
		} `json:"administrative_division_level_4"`
		Address string `json:"address"`
	} `json:"origin"`
	Destination struct {
		LocationID      string  `json:"location_id"`
		Latitude        float64 `json:"latitude"`
		Longitude       float64 `json:"longitude"`
		PostalCode      string  `json:"postal_code"`
		CountryName     string  `json:"country_name"`
		CountryCode     string  `json:"country_code"`
		Administrative1 struct {
			Name string `json:"name"`
			Type string `json:"type"`
		} `json:"administrative_division_level_1"`
		Administrative2 struct {
			Name string `json:"name"`
			Type string `json:"type"`
		} `json:"administrative_division_level_2"`
		Administrative3 struct {
			Name string `json:"name"`
			Type string `json:"type"`
		} `json:"administrative_division_level_3"`
		Administrative4 struct {
			Name string `json:"name"`
			Type string `json:"type"`
		} `json:"administrative_division_level_4"`
		Address string `json:"address"`
	} `json:"destination"`
	Pricing []struct {
		AvailableForCashOnDelivery   bool     `json:"available_for_cash_on_delivery"`
		AvailableForProofOfDelivery  bool     `json:"available_for_proof_of_delivery"`
		AvailableForInstantWaybillID bool     `json:"available_for_instant_waybill_id"`
		AvailableForInsurance        bool     `json:"available_for_insurance"`
		AvailableCollectionMethod    []string `json:"available_collection_method"`
		Company                      string   `json:"company"`
		CourierName                  string   `json:"courier_name"`
		CourierCode                  string   `json:"courier_code"`
		CourierServiceName           string   `json:"courier_service_name"`
		CourierServiceCode           string   `json:"courier_service_code"`
		Description                  string   `json:"description"`
		Duration                     string   `json:"duration"`
		ShipmentDurationRange        string   `json:"shipment_duration_range"`
		ShipmentDurationUnit         string   `json:"shipment_duration_unit"`
		ServiceType                  string   `json:"service_type"`
		ShippingType                 string   `json:"shipping_type"`
		Price                        float64  `json:"price"`
		Type                         string   `json:"type"`
	} `json:"pricing"`
}

type BiteShipShipmentRequest

type BiteShipShipmentRequest struct {
	ShipperContactName      string                 `json:"shipper_contact_name"`
	ShipperContactPhone     string                 `json:"shipper_contact_phone"`
	ShipperContactEmail     string                 `json:"shipper_contact_email"`
	ShipperOrganization     string                 `json:"shipper_organization"`
	OriginContactName       string                 `json:"origin_contact_name"`
	OriginContactPhone      string                 `json:"origin_contact_phone"`
	OriginAddress           string                 `json:"origin_address"`
	OriginNote              string                 `json:"origin_note"`
	OriginCoordinate        Coordinate             `json:"origin_coordinate"`
	DestinationContactName  string                 `json:"destination_contact_name"`
	DestinationContactPhone string                 `json:"destination_contact_phone"`
	DestinationContactEmail string                 `json:"destination_contact_email"`
	DestinationAddress      string                 `json:"destination_address"`
	DestinationNote         string                 `json:"destination_note"`
	DestinationCoordinate   Coordinate             `json:"destination_coordinate"`
	CourierCompany          string                 `json:"courier_company"`
	CourierType             string                 `json:"courier_type"`
	CourierInsurance        int                    `json:"courier_insurance"`
	DeliveryType            string                 `json:"delivery_type"`
	OrderNote               string                 `json:"order_note"`
	Metadata                map[string]interface{} `json:"metadata"`
	Items                   []Item                 `json:"items"`
}

type BiteShipTrackingResponse

type BiteShipTrackingResponse struct {
	Success   bool     `json:"success"`
	Error     string   `json:"error"`
	Message   string   `json:"message"`
	Object    string   `json:"object"`
	ID        string   `json:"id"`
	WaybillID string   `json:"waybill_id"`
	Courier   Shipment `json:"courier"`
	Origin    struct {
		ContactName string `json:"contact_name"`
		Address     string `json:"address"`
	} `json:"origin"`
	Destination struct {
		ContactName string `json:"contact_name"`
		Address     string `json:"address"`
	} `json:"destination"`
	History []History `json:"history"`
	Link    string    `json:"link"`
	OrderID string    `json:"order_id"`
	Status  string    `json:"status"`
}

type ButtonsReply added in v1.0.66

type ButtonsReply struct {
	ID    string `json:"id"`
	Title string `json:"title"`
}

type ChatMessage

type ChatMessage interface {
	SendChatMessage() (any, error)
}

type ContactMessage added in v1.0.64

type ContactMessage struct {
	DisplayName *string `json:"displayName,omitempty"`
	Vcard       *string `json:"vcard,omitempty"`
}

type ContactsArrayMessage added in v1.0.64

type ContactsArrayMessage struct {
	DisplayName *string           `json:"displayName,omitempty"`
	Contacts    []*ContactMessage `json:"contacts,omitempty"`
}

type Coordinate

type Coordinate struct {
	Latitude  float64 `json:"latitude"`
	Longitude float64 `json:"longitude"`
}

type DocumentMessage

type DocumentMessage struct {
	URL               string `json:"URL"`
	Mimetype          string `json:"mimetype"`
	Title             string `json:"title"`
	FileSHA256        string `json:"fileSHA256"`
	FileLength        int    `json:"fileLength"`
	MediaKey          string `json:"mediaKey"`
	FileName          string `json:"fileName"`
	FileEncSHA256     string `json:"fileEncSHA256"`
	DirectPath        string `json:"directPath"`
	MediaKeyTimestamp int64  `json:"mediaKeyTimestamp"`
	ContactVcard      bool   `json:"contactVcard"`
	Caption           string `json:"caption"`
}

type EmailData

type EmailData struct {
	Subject     string `json:"subject"`
	FullName    string `json:"full_name"`
	InvitedBy   string `json:"invited_by"`
	ProjectName string `json:"project_name"`
	CompanyName string `json:"company_name"`
	Email       string `json:"email"`
	Notif       string `json:"notif"`
	Link        string `json:"link"`
	Password    string `json:"password"`
}

type EnvironmentType

type EnvironmentType string
const (
	PROD    EnvironmentType = "PROD"
	STAGING EnvironmentType = "STAGING"
)

type EventMessage added in v1.0.64

type EventMessage struct {
	IsCanceled         *bool            `json:"isCanceled,omitempty"`
	Name               *string          `json:"name,omitempty"`
	Description        *string          `json:"description,omitempty"`
	Location           *LocationMessage `json:"location,omitempty"`
	JoinLink           *string          `json:"joinLink,omitempty"`
	StartTime          *int64           `json:"startTime,omitempty"`
	EndTime            *int64           `json:"endTime,omitempty"`
	ExtraGuestsAllowed *bool            `json:"extraGuestsAllowed,omitempty"`
	IsScheduleCall     *bool            `json:"isScheduleCall,omitempty"`
}

type ExtendedTextMessage

type ExtendedTextMessage struct {
	Text        string             `json:"text"`
	ContextInfo MessageContextInfo `json:"contextInfo"`
}

type FacebookAccessTokenResponse

type FacebookAccessTokenResponse struct {
	AccessToken string `json:"access_token"`
	TokenType   string `json:"token_type"`
	ExpiresIn   int    `json:"expires_in"`
}

type FacebookMedia added in v1.0.64

type FacebookMedia struct {
	URL              string `json:"url"`
	MimeType         string `json:"mime_type"`
	SHA256           string `json:"sha256"`
	FileSize         int    `json:"file_size"`
	ID               string `json:"id"`
	MessagingProduct string `json:"messaging_product"`
}

type FacebookUser

type FacebookUser struct {
	Name              string `json:"name"`
	ID                string `json:"id"`
	ProfilePictureURL string `json:"profile_picture_url"`
	UserID            string `json:"user_id"`
}

type FacebookWebhookEntry

type FacebookWebhookEntry struct {
	Time      int64                      `json:"time"`
	ID        string                     `json:"id"`
	Messaging []FacebookWebhookMessaging `json:"messaging"`
}

type FacebookWebhookMessage

type FacebookWebhookMessage struct {
	MID         string     `json:"mid,omitempty"`
	IsEcho      bool       `json:"is_echo"`
	Text        string     `json:"text,omitempty"`
	Attachments Attachment `json:"attachments,omitempty"`
}

type FacebookWebhookMessaging

type FacebookWebhookMessaging struct {
	Sender    FacebookWebhookSender    `json:"sender"`
	Recipient FacebookWebhookRecipient `json:"recipient"`
	Timestamp int64                    `json:"timestamp"`
	Message   FacebookWebhookMessage   `json:"message"`
}

type FacebookWebhookRecipient

type FacebookWebhookRecipient struct {
	ID string `json:"id"`
}

type FacebookWebhookResponse

type FacebookWebhookResponse struct {
	Object string                 `json:"object"`
	Entry  []FacebookWebhookEntry `json:"entry"`
}

type FacebookWebhookSender

type FacebookWebhookSender struct {
	ID string `json:"id"`
}

type GroupInfo

type GroupInfo struct {
	JID                           string    `json:"JID"`
	OwnerJID                      string    `json:"OwnerJID"`
	Name                          string    `json:"Name"`
	NameSetAt                     time.Time `json:"NameSetAt"`
	NameSetBy                     string    `json:"NameSetBy"`
	Topic                         string    `json:"Topic"`
	TopicID                       string    `json:"TopicID"`
	TopicSetAt                    time.Time `json:"TopicSetAt"`
	TopicSetBy                    string    `json:"TopicSetBy"`
	TopicDeleted                  bool      `json:"TopicDeleted"`
	IsLocked                      bool      `json:"IsLocked"`
	IsAnnounce                    bool      `json:"IsAnnounce"`
	AnnounceVersionID             string    `json:"AnnounceVersionID"`
	IsEphemeral                   bool      `json:"IsEphemeral"`
	DisappearingTimer             int       `json:"DisappearingTimer"`
	IsIncognito                   bool      `json:"IsIncognito"`
	IsParent                      bool      `json:"IsParent"`
	DefaultMembershipApprovalMode string    `json:"DefaultMembershipApprovalMode"`
	LinkedParentJID               string    `json:"LinkedParentJID"`
	IsDefaultSubGroup             bool      `json:"IsDefaultSubGroup"`
	IsJoinApprovalRequired        bool      `json:"IsJoinApprovalRequired"`
	GroupCreated                  time.Time `json:"GroupCreated"`
	ParticipantVersionID          string    `json:"ParticipantVersionID"`
	Participants                  []struct {
		JID          string      `json:"JID"`
		LID          string      `json:"LID"`
		IsAdmin      bool        `json:"IsAdmin"`
		IsSuperAdmin bool        `json:"IsSuperAdmin"`
		DisplayName  string      `json:"DisplayName"`
		Error        int         `json:"Error"`
		AddRequest   interface{} `json:"AddRequest"`
	} `json:"Participants"`
	MemberAddMode string `json:"MemberAddMode"`
}

type History

type History struct {
	Note        string    `json:"note"`
	ServiceType string    `json:"service_type"`
	UpdatedAt   time.Time `json:"updated_at"`
	Status      string    `json:"status"`
}

type ImageMessage

type ImageMessage struct {
	URL                  string `json:"URL"`
	Mimetype             string `json:"mimetype"`
	Caption              string `json:"caption"`
	FileSHA256           string `json:"fileSHA256"`
	FileLength           int    `json:"fileLength"`
	Height               int    `json:"height"`
	Width                int    `json:"width"`
	MediaKey             string `json:"mediaKey"`
	FileEncSHA256        string `json:"fileEncSHA256"`
	DirectPath           string `json:"directPath"`
	MediaKeyTimestamp    int64  `json:"mediaKeyTimestamp"`
	JPEGThumbnail        string `json:"JPEGThumbnail"`
	FirstScanSidecar     string `json:"firstScanSidecar"`
	FirstScanLength      int    `json:"firstScanLength"`
	ScansSidecar         string `json:"scansSidecar"`
	ScanLengths          []int  `json:"scanLengths"`
	MidQualityFileSHA256 string `json:"midQualityFileSHA256"`
	ImageSourceType      int    `json:"imageSourceType"`
}

type Insurance

type Insurance struct {
	Amount int    `json:"amount"`
	Fee    int    `json:"fee"`
	Note   string `json:"note"`
}

type InteractiveMessage added in v1.0.66

type InteractiveMessage struct {
	Type         string        `json:"type"`
	ListReply    *ListReply    `json:"list_reply,omitempty"`
	ButtonsReply *ButtonsReply `json:"button_reply,omitempty"`
}

type Item

type Item struct {
	Name        string  `json:"name"`
	Description string  `json:"description"`
	Value       float64 `json:"value"`
	Length      float64 `json:"length"`
	Width       float64 `json:"width"`
	Height      float64 `json:"height"`
	Weight      float64 `json:"weight"`
	Quantity    float64 `json:"quantity"`
}

type ListReply added in v1.0.66

type ListReply struct {
	ID          string `json:"id"`
	Title       string `json:"title"`
	Description string `json:"description"`
}

type LocationMessage added in v1.0.64

type LocationMessage struct {
	DegreesLatitude  float64 `json:"degreesLatitude"`
	DegreesLongitude float64 `json:"degreesLongitude"`
	JPEGThumbnail    string  `json:"JPEGThumbnail"`
	SequenceNumber   int64   `json:"sequenceNumber"`
}

type LocationPrecise

type LocationPrecise struct {
	Latitude  float64 `json:"latitude"`
	Longitude float64 `json:"longitude"`
	Notes     string  `json:"notes"`
}

type MessageContextInfo

type MessageContextInfo struct {
	StanzaID      string        `json:"stanzaID"`
	Participant   string        `json:"participant"`
	QuotedMessage QuotedMessage `json:"quotedMessage"`
}

type MsgObject

type MsgObject struct {
	Message     WhatsAppMessage `json:"message"`
	Info        map[string]any  `json:"info"`
	GroupInfo   GroupInfo       `json:"group_info"`
	Sender      string          `json:"sender"`
	JID         string          `json:"jid"`
	SessionID   string          `json:"session_id"`
	SessionName string          `json:"session_name"`
	MediaPath   string          `json:"media_path"`
	MimeType    string          `json:"mime_type"`
	ProfilePic  string          `json:"profile_pic"`
}

type NewUserData

type NewUserData struct {
	FullName          string `json:"full_name"`
	Email             string `json:"email"`
	Password          string `json:"password"`
	VerificationToken string `json:"verification_token"`
}

type Payload added in v1.0.64

type Payload struct {
	URL string `json:"url"`
}

type QuotedMessage

type QuotedMessage struct {
	Conversation string `json:"conversation"`
}

type Rate

type Rate struct {
	CourierCode string  `json:"courier_code"`
	Service     string  `json:"service"` // Jenis layanan (Reguler, Express, Same-Day, dll.)
	Cost        float64 `json:"cost"`    // Biaya pengiriman
	ETA         string  `json:"eta"`     // Perkiraan waktu pengiriman
	Distance    float64 `json:"distance"`
}

type ReactionMessage

type ReactionMessage struct {
	Key struct {
		RemoteJID string `json:"remoteJid"`
		FromMe    bool   `json:"fromMe"`
		ID        string `json:"id"`
	} `json:"key"`
	Text              string `json:"text"`
	SenderTimestampMS int64  `json:"senderTimestampMS"`
}

type Shipment

type Shipment struct {
	ID                string    `json:"id"`
	TrackingID        *string   `json:"tracking_id,omitempty"`
	WaybillID         *string   `json:"waybill_id,omitempty"`
	Company           string    `json:"company"`         // "sicepat"
	Name              *string   `json:"name,omitempty"`  // Deprecated
	Phone             *string   `json:"phone,omitempty"` // Deprecated
	DriverName        *string   `json:"driver_name,omitempty"`
	DriverPhone       *string   `json:"driver_phone,omitempty"`
	DriverPhotoURL    *string   `json:"driver_photo_url,omitempty"`
	DriverPlateNumber *string   `json:"driver_plate_number,omitempty"`
	Type              string    `json:"type"` // "reg"
	Link              *string   `json:"link,omitempty"`
	Insurance         Insurance `json:"insurance"`
	RoutingCode       *string   `json:"routing_code,omitempty"`
	Status            string    `json:"status"`
	Price             float64   `json:"price"`
}

type ShipmentRateRequest

type ShipmentRateRequest struct {
	OriginLatitude       float64 `json:"origin_latitude"`
	OriginLongitude      float64 `json:"origin_longitude"`
	DestinationLatitude  float64 `json:"destination_latitude"`
	DestinationLongitude float64 `json:"destination_longitude"`
	Couriers             string  `json:"couriers"`
	Items                []Item  `json:"items"`
}

type TrackingStatus

type TrackingStatus struct {
	Date       time.Time `json:"date"`        // Tanggal status diperbarui
	TrackingID *string   `json:"tracking_id"` // Nomor resi
	Status     string    `json:"status"`      // Status terbaru
	Location   string    `json:"location"`    // Lokasi terbaru
	WaybillID  *string   `json:"waybill_id"`
	Link       string    `json:"link"`
	History    []History `json:"history"`
	Shipment   Shipment  `json:"shipment"`
}

type VideoMessage

type VideoMessage struct {
	URL                string `json:"URL"`
	Mimetype           string `json:"mimetype"`
	Caption            string `json:"caption"`
	FileSHA256         string `json:"fileSHA256"`
	FileLength         int    `json:"fileLength"`
	Seconds            int    `json:"seconds"`
	MediaKey           string `json:"mediaKey"`
	Height             int    `json:"height"`
	Width              int    `json:"width"`
	FileEncSHA256      string `json:"fileEncSHA256"`
	DirectPath         string `json:"directPath"`
	MediaKeyTimestamp  int64  `json:"mediaKeyTimestamp"`
	JPEGThumbnail      string `json:"JPEGThumbnail"`
	StreamingSidecar   string `json:"streamingSidecar"`
	AccessibilityLabel string `json:"accessibilityLabel"`
}

type WaResponse added in v1.0.64

type WaResponse struct {
	MessagingProduct string `json:"messaging_product"`
	Contacts         []struct {
		Input string `json:"input"`
		WaID  string `json:"wa_id"`
	} `json:"contacts"`
	Messages []struct {
		ID            string `json:"id"`
		MessageStatus string `json:"message_status"`
	} `json:"messages"`
}

type WebhookEntry added in v1.0.64

type WebhookEntry struct {
	Changes                  []WebhookEntryChange       `json:"changes"`
	ID                       string                     `json:"id"`
	FacebookWebhookMessaging []FacebookWebhookMessaging `json:"messaging,omitempty"`
	Time                     int64                      `json:"time"`
}

type WebhookEntryChange added in v1.0.64

type WebhookEntryChange struct {
	Field string                  `json:"field"`
	Value WebhookEntryChangeValue `json:"value"`
}

type WebhookEntryChangeContact added in v1.0.64

type WebhookEntryChangeContact struct {
	Profile struct {
		Name string `json:"name"`
	} `json:"profile"`
	WAID string `json:"wa_id"`
}

type WebhookEntryChangeContext added in v1.0.64

type WebhookEntryChangeContext struct {
	From string `json:"from"`
	ID   string `json:"id"`
}

type WebhookEntryChangeFrom added in v1.0.64

type WebhookEntryChangeFrom struct {
	ID       string `json:"id"`
	Username string `json:"username"`
}

type WebhookEntryChangeMedia added in v1.0.64

type WebhookEntryChangeMedia struct {
	ID               string `json:"id"`
	MediaProductType string `json:"media_product_type"`
}

type WebhookEntryChangeMessage added in v1.0.64

type WebhookEntryChangeMessage struct {
	Context     *WebhookEntryChangeContext         `json:"context,omitempty"`
	From        string                             `json:"from"`
	ID          string                             `json:"id"`
	Timestamp   string                             `json:"timestamp"`
	Type        string                             `json:"type"`
	Text        *WebhookEntryChangeMessageText     `json:"text,omitempty"`
	Image       *WebhookImage                      `json:"image,omitempty"`
	Interactive *InteractiveMessage                `json:"interactive,omitempty"`
	Location    *WebhookEntryChangeMessageLocation `json:"location,omitempty"`
}

type WebhookEntryChangeMessageLocation added in v1.0.67

type WebhookEntryChangeMessageLocation struct {
	Address   string  `json:"address"`
	Latitude  float64 `json:"latitude"`
	Longitude float64 `json:"longitude"`
	Name      string  `json:"name"`
}

type WebhookEntryChangeMessageText added in v1.0.66

type WebhookEntryChangeMessageText struct {
	Body string `json:"body"`
}

type WebhookEntryChangeMetadata added in v1.0.64

type WebhookEntryChangeMetadata struct {
	DisplayPhoneNumber string `json:"display_phone_number"`
	PhoneNumberID      string `json:"phone_number_id"`
}

type WebhookEntryChangeValue added in v1.0.64

type WebhookEntryChangeValue struct {
	Contacts         []WebhookEntryChangeContact `json:"contacts"`
	Messages         []WebhookEntryChangeMessage `json:"messages"`
	MessagingProduct string                      `json:"messaging_product"`
	Metadata         *WebhookEntryChangeMetadata `json:"metadata,omitempty"`
	From             *WebhookEntryChangeFrom     `json:"from,omitempty"`
	ID               string                      `json:"id"`
	Media            *WebhookEntryChangeMedia    `json:"media,omitempty"`
	Text             string                      `json:"text"`
}

type WebhookImage added in v1.0.64

type WebhookImage struct {
	Caption  string `json:"caption"`
	ID       string `json:"id"`
	MimeType string `json:"mime_type"`
	Sha256   string `json:"sha256"`
}

type WhatsAppMessage

type WhatsAppMessage struct {
	Conversation        *string          `json:"conversation"`
	ImageMessage        *ImageMessage    `json:"imageMessage,omitempty"`
	VideoMessage        *VideoMessage    `json:"videoMessage,omitempty"`
	DocumentMessage     *DocumentMessage `json:"documentMessage,omitempty"`
	LocationMessage     *LocationMessage `json:"locationMessage,omitempty"`
	LiveLocationMessage *LocationMessage `json:"liveLocationMessage,omitempty"`
	ContactMessage      *ContactMessage  `json:"contactMessage,omitempty"`
	MessageContextInfo  struct {
		DeviceListMetadata struct {
			SenderKeyHash      string `json:"senderKeyHash"`
			SenderTimestamp    int64  `json:"senderTimestamp"`
			RecipientKeyHash   string `json:"recipientKeyHash"`
			RecipientTimestamp int64  `json:"recipientTimestamp"`
		} `json:"deviceListMetadata"`
		DeviceListMetadataVersion int    `json:"deviceListMetadataVersion"`
		MessageSecret             string `json:"messageSecret"`
	} `json:"messageContextInfo"`
	ExtendedTextMessage  *ExtendedTextMessage  `json:"extendedTextMessage,omitempty"`
	ReactionMessage      *ReactionMessage      `json:"reactionMessage,omitempty"`
	EventMessage         *EventMessage         `json:"eventMessage,omitempty"`
	ContactsArrayMessage *ContactsArrayMessage `json:"contactsArrayMessage,omitempty"`
}

type WhatsappApiSession added in v1.0.65

type WhatsappApiSession struct {
	PhoneNumberID string `json:"phone_number_id"`
	Session       string `json:"session"`
	AccessToken   string `json:"access_token"`
	CompanyID     string `json:"company_id"`
}

type WhatsappApiWebhookRequest added in v1.0.64

type WhatsappApiWebhookRequest struct {
	Entry  []WebhookEntry `json:"entry"`
	Object string         `json:"object"`
}

Jump to

Keyboard shortcuts

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