model_public

package
v1.1.33 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetComponent added in v1.1.8

func GetComponent[V any](layout *PdpGetLayout) (*V, error)

Types

type AceSearchShopResp

type AceSearchShopResp struct {
	Data struct {
		AceSearchShop struct {
			TotalData  int            `json:"totalData"`
			Shops      []SearchShop   `json:"shops"`
			Suggestion ShopSuggestion `json:"suggestion"`
			Header     Header         `json:"header"`
			Typename   string         `json:"__typename"`
		} `json:"aceSearchShop"`
	} `json:"data"`
}

type AdParamsVar

type AdParamsVar struct {
	AdParams string `json:"adParams"`
}

type Address added in v1.0.2

type Address struct {
	CityName     string `json:"city_name"`
	ProvinceName string `json:"province_name"`
	DistrictName string `json:"district_name"`
	Country      string `json:"country"`
	PostalCode   string `json:"postal_code"`
	Address      string `json:"address"`
	Lat          string `json:"lat"`
	Long         string `json:"long"`
	Phone        string `json:"phone"`
	AddrName     string `json:"addr_name"`
	Address1     string `json:"address_1"`
	ReceiverName string `json:"receiver_name"`
	Typename     string `json:"__typename"`
}

type Ads

type Ads struct {
	AdsID              string `json:"adsId"`
	ProductClickURL    string `json:"productClickUrl"`
	ProductWishlistURL string `json:"productWishlistUrl"`
	ProductViewURL     string `json:"productViewUrl"`
	Typename           string `json:"__typename"`
}

type AllVariant

type AllVariant struct {
	VariantID int    `json:"VariantID"`
	Name      string `json:"Name"`
	Typename  string `json:"__typename"`
}

type Amount

type Amount struct {
	Amount          int    `json:"amount"`
	AmountFormatted string `json:"amountFormatted"`
	AmountType      int    `json:"amountType"`
	Typename        string `json:"__typename"`
}

type AnnotationData

type AnnotationData struct {
	Variant   string      `json:"variant"`
	SortOrder int         `json:"sortOrder"`
	Values    []DataValue `json:"values"`
	Typename  string      `json:"__typename"`
}

type Answer

type Answer struct {
	AnswerID             string `json:"answerID"`
	Content              string `json:"content"`
	MaskedContent        string `json:"maskedContent"`
	UserName             string `json:"userName"`
	UserThumbnail        string `json:"userThumbnail"`
	UserID               string `json:"userID"`
	IsSeller             bool   `json:"isSeller"`
	CreateTime           string `json:"createTime"`
	CreateTimeFormatted  string `json:"createTimeFormatted"`
	LikeCount            int    `json:"likeCount"`
	State                State  `json:"state"`
	AttachedProductCount int    `json:"attachedProductCount"`
	Typename             string `json:"__typename"`
}

type AvailableFilter

type AvailableFilter struct {
	WithAttachment bool   `json:"withAttachment"`
	Rating         bool   `json:"rating"`
	Topics         bool   `json:"topics"`
	Helpfulness    bool   `json:"helpfulness"`
	Typename       string `json:"__typename"`
}

type BackgroundGradientColor

type BackgroundGradientColor struct {
	FirstColor  string `json:"firstColor"`
	SecondColor string `json:"secondColor"`
	Typename    string `json:"__typename"`
}

type Badge

type Badge struct {
	Title    string `json:"title"`
	ImageURL string `json:"image_url"`
	Typename string `json:"__typename"`
}
type Banner struct {
	DesktopURL string `json:"desktopUrl"`
	Typename   string `json:"__typename"`
}

type Banners

type Banners struct {
	ImageID    string `json:"imageID"`
	ImageURL   string `json:"imageURL"`
	BannerType string `json:"bannerType"`
	Typename   string `json:"__typename"`
}

type BasicInfo

type BasicInfo struct {
	Alias            string         `json:"alias"`
	CreatedAt        string         `json:"createdAt"`
	IsQA             bool           `json:"isQA"`
	ID               string         `json:"id"`
	ShopID           string         `json:"shopID"`
	ShopName         string         `json:"shopName"`
	MinOrder         int            `json:"minOrder"`
	MaxOrder         int            `json:"maxOrder"`
	Weight           int            `json:"weight"`
	WeightUnit       string         `json:"weightUnit"`
	Condition        string         `json:"condition"`
	Status           string         `json:"status"`
	URL              string         `json:"url"`
	NeedPrescription bool           `json:"needPrescription"`
	CatalogID        string         `json:"catalogID"`
	IsLeasing        bool           `json:"isLeasing"`
	IsBlacklisted    bool           `json:"isBlacklisted"`
	IsTokoNow        bool           `json:"isTokoNow"`
	Menu             Menu           `json:"menu"`
	Category         Category       `json:"category"`
	TxStats          ProductTxStats `json:"txStats"`
	Stats            BasicInfoStats `json:"stats"`
	Typename         string         `json:"__typename"`
}

type BasicInfoStats

type BasicInfoStats struct {
	CountView   int     `json:"countView"`
	CountReview int     `json:"countReview"`
	CountTalk   int     `json:"countTalk"`
	Rating      float64 `json:"rating"`
	Typename    string  `json:"__typename"`
}

func (*BasicInfoStats) UnmarshalJSON added in v1.1.27

func (stat *BasicInfoStats) UnmarshalJSON(data []byte) error

type Bottomsheet

type Bottomsheet struct {
	Title      string `json:"title"`
	IconURL    string `json:"iconURL"`
	Subtitle   string `json:"subtitle"`
	ButtonCopy string `json:"buttonCopy"`
	Typename   string `json:"__typename"`
}

type CallsError

type CallsError struct {
	ShopInfo         ErrShopInfo         `json:"shopInfo"`
	CartRedirection  ErrCartRedirection  `json:"cartRedirection"`
	NearestWarehouse ErrNearestWarehouse `json:"nearestWarehouse"`
	Typename         string              `json:"__typename"`
}

type Campaign

type Campaign struct {
	DiscountedPercentage string `json:"discounted_percentage"`
	OriginalPriceFmt     string `json:"original_price_fmt"`
	StartDate            string `json:"start_date"`
	EndDate              string `json:"end_date"`
	Typename             string `json:"__typename"`
}

type CartRedirection

type CartRedirection struct {
	Status       string        `json:"status"`
	ErrorMessage []interface{} `json:"error_message"`
	Data         []struct {
		ProductID          string `json:"product_id"`
		ConfigName         string `json:"config_name"`
		HideFloatingButton bool   `json:"hide_floating_button"`
		AvailableButtons   []struct {
			Text               string `json:"text"`
			Color              string `json:"color"`
			CartType           string `json:"cart_type"`
			OnboardingMessage  string `json:"onboarding_message"`
			ShowRecommendation bool   `json:"show_recommendation"`
			Typename           string `json:"__typename"`
		} `json:"available_buttons"`
		UnavailableButtons []string `json:"unavailable_buttons"`
		Typename           string   `json:"__typename"`
	} `json:"data"`
	Typename string `json:"__typename"`
}

type Categories

type Categories struct {
	ID       int           `json:"id"`
	Name     string        `json:"name"`
	URL      string        `json:"url,omitempty"`
	Children []*Categories `json:"children,omitempty"`
	Typename string        `json:"__typename,omitempty"`
}

type CategoriesData added in v1.1.27

type CategoriesData []*Categories

func (CategoriesData) GetCategoryByUrl added in v1.1.27

func (data CategoriesData) GetCategoryByUrl(url string) (*Categories, error)

func (CategoriesData) Iterate added in v1.1.27

func (data CategoriesData) Iterate(handler CategoriesHandler) error

type CategoriesHandler added in v1.1.27

type CategoriesHandler func(parents []*Categories, category *Categories) (stop bool, err error)

type Category

type Category struct {
	ID            string          `json:"id"`
	Name          string          `json:"name"`
	Title         string          `json:"title"`
	Detail        *CategoryDetail `json:"detail"`
	BreadcrumbURL string          `json:"breadcrumbURL"`
	IsAdult       bool            `json:"isAdult"`
	IsKyc         bool            `json:"isKyc"`
	MinAge        int             `json:"minAge"`
	Typename      string          `json:"__typename"`
}

type CategoryAllListLite added in v1.1.27

type CategoryAllListLite struct {
	Categories CategoriesData `json:"categories"`
	Typename   string         `json:"__typename"`
}

type CategoryAllListLiteResp

type CategoryAllListLiteResp struct {
	Data struct {
		CategoryAllListLite struct {
			Categories []*Categories `json:"categories"`
			Typename   string        `json:"__typename"`
		} `json:"categoryAllListLite"`
	} `json:"data"`
}

type CategoryDetail

type CategoryDetail []struct {
	ID            string `json:"id"`
	Name          string `json:"name"`
	BreadcrumbURL string `json:"breadcrumbURL"`
	IsAdult       bool   `json:"isAdult"`
	Typename      string `json:"__typename"`
}

type CategoryGroup added in v1.1.27

type CategoryGroup struct {
	ID           int           `json:"id"`
	Title        string        `json:"title"`
	Desc         string        `json:"desc"`
	CategoryRows []CategoryRow `json:"categoryRows"`
	Typename     string        `json:"__typename"`
}

type CategoryProduct added in v1.0.2

type CategoryProduct struct {
	ID                 int64         `json:"id"`
	URL                string        `json:"url"`
	ImageURL           string        `json:"imageUrl"`
	ImageURLLarge      string        `json:"imageUrlLarge"`
	CatID              int           `json:"catId"`
	GaKey              string        `json:"gaKey"`
	CountReview        int           `json:"countReview"`
	DiscountPercentage int           `json:"discountPercentage"`
	Preorder           bool          `json:"preorder"`
	Name               string        `json:"name"`
	Price              string        `json:"price"`
	PriceInt           int           `json:"priceInt"`
	OriginalPrice      string        `json:"original_price"`
	Rating             int           `json:"rating"`
	Wishlist           bool          `json:"wishlist"`
	Labels             []interface{} `json:"labels"`
	Badges             []struct {
		ImageURL string `json:"imageUrl"`
		Show     bool   `json:"show"`
		Typename string `json:"__typename"`
	} `json:"badges"`
	Shop struct {
		ID           int    `json:"id"`
		URL          string `json:"url"`
		Name         string `json:"name"`
		Goldmerchant bool   `json:"goldmerchant"`
		Official     bool   `json:"official"`
		Reputation   string `json:"reputation"`
		Clover       string `json:"clover"`
		Location     string `json:"location"`
		Typename     string `json:"__typename"`
	} `json:"shop"`
	LabelGroups []LabelGroups `json:"labelGroups"`
	Typename    string        `json:"__typename"`
}

type CategoryProducts added in v1.0.2

type CategoryProducts struct {
	Count    int               `json:"count"`
	Data     []CategoryProduct `json:"data"`
	Typename string            `json:"__typename"`
}

type CategoryRow added in v1.1.27

type CategoryRow struct {
	ID         int    `json:"id"`
	Name       string `json:"name"`
	URL        string `json:"url"`
	ImageURL   string `json:"imageUrl"`
	Type       string `json:"type"`
	CategoryID int    `json:"categoryId"`
	Typename   string `json:"__typename"`
}

type ClosedInfo

type ClosedInfo struct {
	ClosedNote string           `json:"closedNote"`
	Until      string           `json:"until,omitempty"`
	Reason     string           `json:"reason"`
	Detail     ClosedInfoDetail `json:"detail"`
	Typename   string           `json:"__typename"`
}

type ClosedInfoDetail

type ClosedInfoDetail struct {
	OpenDate string `json:"openDate,omitempty"`
	Status   int    `json:"status,omitempty"`
	Typename string `json:"__typename"`
}

type Component

type Component struct {
	Name     PDPComponentName `json:"name"`
	Type     string           `json:"type"`
	Position string           `json:"position"`
	Typename string           `json:"__typename"`
}

type ComponentParser

type ComponentParser struct {
	Name      PDPComponentName `json:"name"`
	Type      string           `json:"type"`
	Component interface{}
}

func (*ComponentParser) UnmarshalJSON

func (p *ComponentParser) UnmarshalJSON(data []byte) error

type CreateInfo

type CreateInfo struct {
	OpenSince        string `json:"openSince,omitempty"`
	EpochShopCreated string `json:"epochShopCreated,omitempty"`
	Typename         string `json:"__typename"`
}

func (*CreateInfo) ToTime added in v1.1.33

func (cre *CreateInfo) ToTime() (time.Time, error)

type CustomSEO

type CustomSEO struct {
	Title         string `json:"title"`
	Description   string `json:"description"`
	BottomContent string `json:"bottomContent"`
	Typename      string `json:"__typename"`
}

type DataValue

type DataValue struct {
	ID       int    `json:"id"`
	Name     string `json:"name"`
	Selected bool   `json:"selected"`
	Typename string `json:"__typename"`
}

type DetailImage

type DetailImage struct {
	AttachmentID string `json:"attachmentID"`
	Description  string `json:"description"`
	ThumbnailURL string `json:"thumbnailURL"`
	FullsizeURL  string `json:"fullsizeURL"`
	FeedbackID   string `json:"feedbackID"`
	Typename     string `json:"__typename"`
}

type DetailReview

type DetailReview struct {
	Reviewer           Reviewer `json:"reviewer"`
	ShopID             string   `json:"shopID"`
	FeedbackID         string   `json:"feedbackID"`
	VariantName        string   `json:"variantName"`
	ReviewText         string   `json:"reviewText"`
	Rating             int      `json:"rating"`
	ReviewTime         string   `json:"reviewTime"`
	LikeCount          int      `json:"likeCount"`
	BadRatingReasonFmt string   `json:"badRatingReasonFmt"`
	IsLiked            bool     `json:"isLiked"`
	IsAnonymous        bool     `json:"isAnonymous"`
	IsReportable       bool     `json:"isReportable"`
	Typename           string   `json:"__typename"`
}

type DevError

type DevError struct {
	Code       int    `json:"Code"`
	Message    string `json:"Message"`
	DevMessage string `json:"DevMessage"`
	Typename   string `json:"__typename"`
}

type DiscussionDataByProductID

type DiscussionDataByProductID struct {
	ShopID        string     `json:"shopID"`
	ShopURL       string     `json:"shopURL"`
	ProductID     string     `json:"productID"`
	HasNext       bool       `json:"hasNext"`
	TotalQuestion int        `json:"totalQuestion"`
	Question      []Question `json:"question"`
	Typename      string     `json:"__typename"`
}

type DiscussionDataProductByIDResp

type DiscussionDataProductByIDResp struct {
	Data struct {
		DiscussionDataByProductID DiscussionDataByProductID `json:"discussionDataByProductID"`
	} `json:"data"`
}

type DiscussionDataProductByIDVar

type DiscussionDataProductByIDVar struct {
	ProductID string `json:"productID"`
	ShopID    string `json:"shopID"`
	Page      int    `json:"page"`
	Limit     int    `json:"limit"`
	SortBy    string `json:"sortBy"`
	Category  string `json:"category"`
}

type District

type District struct {
	DistrictID   int      `json:"districtId"`
	DistrictName string   `json:"district_name"`
	CityID       int      `json:"cityId"`
	CityName     string   `json:"city_name"`
	ProvinceID   int      `json:"provinceId"`
	ProvinceName string   `json:"province_name"`
	ZipCode      []string `json:"zip_code"`
	Typename     string   `json:"__typename"`
}

type DrogonAnnotationCategoryV2

type DrogonAnnotationCategoryV2 struct {
	Header    HeaderErr        `json:"header"`
	ProductID int64            `json:"productID"`
	Data      []AnnotationData `json:"data"`
	Typename  string           `json:"__typename"`
}

type DynamicHomeIcon added in v1.1.27

type DynamicHomeIcon struct {
	CategoryGroup []CategoryGroup `json:"categoryGroup"`
	Typename      string          `json:"__typename"`
}

type DynamicRule

type DynamicRule struct {
	DynamicRoleData   []interface{} `json:"dynamicRoleData"`
	DescriptionHeader string        `json:"descriptionHeader"`
	Typename          string        `json:"__typename"`
}

type EpharmacyInfo

type EpharmacyInfo struct {
	SiaNumber  string `json:"siaNumber"`
	SipaNumber string `json:"sipaNumber"`
	Apj        string `json:"apj"`
	Typename   string `json:"__typename"`
}

type ErrCartRedirection

type ErrCartRedirection struct {
	Code     int    `json:"Code"`
	Message  string `json:"Message"`
	Typename string `json:"__typename"`
}

type ErrNearestWarehouse

type ErrNearestWarehouse struct {
	Code     int    `json:"Code"`
	Message  string `json:"Message"`
	Typename string `json:"__typename"`
}

type ErrShopInfo

type ErrShopInfo struct {
	Code     int    `json:"Code"`
	Message  string `json:"Message"`
	Typename string `json:"__typename"`
}

type Error

type Error struct {
	Message  string `json:"message"`
	Typename string `json:"__typename"`
}

type FavoriteData

type FavoriteData struct {
	TotalFavorite    int    `json:"totalFavorite"`
	AlreadyFavorited int    `json:"alreadyFavorited"`
	Typename         string `json:"__typename"`
}

type FilterOption

type FilterOption struct {
	Name        string        `json:"name"`
	Description string        `json:"Description"`
	Key         string        `json:"key"`
	Icon        string        `json:"icon"`
	Value       string        `json:"value"`
	InputType   string        `json:"inputType"`
	TotalData   string        `json:"totalData"`
	ValMax      string        `json:"valMax"`
	ValMin      string        `json:"valMin"`
	HexColor    string        `json:"hexColor"`
	Child       []interface{} `json:"child"`
	IsPopular   bool          `json:"isPopular"`
	IsNew       bool          `json:"isNew"`
	Typename    string        `json:"__typename"`
}

type FilterProduct

type FilterProduct struct {
	Title        string         `json:"title"`
	TemplateName string         `json:"template_name"`
	Search       FilterSearch   `json:"search"`
	Options      []FilterOption `json:"options"`
	Typename     string         `json:"__typename"`
}

type FilterSearch

type FilterSearch struct {
	Searchable  int    `json:"searchable"`
	Placeholder string `json:"placeholder"`
	Typename    string `json:"__typename"`
}

type FilterSortProduct

type FilterSortProduct struct {
	Data     FilterSortProductData `json:"data"`
	Typename string                `json:"__typename"`
}

type FilterSortProductData

type FilterSortProductData struct {
	Filter   []FilterProduct `json:"filter"`
	Sort     []SortProduct   `json:"sort"`
	Typename string          `json:"__typename"`
}

type FilterSortProductResp

type FilterSortProductResp struct {
	Data struct {
		FilterSortProduct FilterSortProduct `json:"filter_sort_product"`
	} `json:"data"`
}

type Flags

type Flags struct {
	IsSold      bool   `json:"isSold"`
	IsPreorder  bool   `json:"isPreorder"`
	IsWholesale bool   `json:"isWholesale"`
	IsWishlist  bool   `json:"isWishlist"`
	Typename    string `json:"__typename"`
}

type FulfillmentData

type FulfillmentData struct {
	Icon        string `json:"icon"`
	Prefix      string `json:"prefix"`
	Description string `json:"description"`
	Typename    string `json:"__typename"`
}

type GetDrogonAnnotationResp

type GetDrogonAnnotationResp struct {
	Data struct {
		DrogonAnnotationCategoryV2 DrogonAnnotationCategoryV2 `json:"drogonAnnotationCategoryV2"`
	} `json:"data"`
}

type GetDrogonAnnotationVar

type GetDrogonAnnotationVar struct {
	CategoryID       string `json:"categoryID"`
	ExcludeSensitive string `json:"excludeSensitive"`
	ProductID        string `json:"productID"`
	VendorName       string `json:"vendorName"`
}

type GetPublicMerchantVoucherList

type GetPublicMerchantVoucherList struct {
	Vouchers []Vouchers `json:"vouchers"`
	Typename string     `json:"__typename"`
}

type GetShopOperationalHourStatus

type GetShopOperationalHourStatus struct {
	Timestamp        string `json:"timestamp"`
	StatusActive     bool   `json:"statusActive"`
	StartTime        string `json:"startTime"`
	EndTime          string `json:"endTime"`
	TimestampUTCUnix string `json:"timestampUTCUnix"`
	TickerTitle      string `json:"tickerTitle"`
	TickerMessage    string `json:"tickerMessage"`
	Typename         string `json:"__typename"`
}

type GetShopOperationalHourStatusResp

type GetShopOperationalHourStatusResp struct {
	Data struct {
		GetShopOperationalHourStatus GetShopOperationalHourStatus `json:"getShopOperationalHourStatus"`
	} `json:"data"`
}

type GetShopProduct

type GetShopProduct struct {
	Status   string             `json:"status"`
	Errors   string             `json:"errors"`
	Links    Links              `json:"links"`
	Data     []*ShopProductData `json:"data"`
	Typename string             `json:"__typename"`
}

type GetVariantCategoryCombination

type GetVariantCategoryCombination struct {
	Header   HeaderErr                         `json:"header"`
	Data     GetVariantCategoryCombinationData `json:"data"`
	Typename string                            `json:"__typename"`
}

type GetVariantCategoryCombinationData

type GetVariantCategoryCombinationData struct {
	CategoryID            int             `json:"categoryID"`
	VariantIDCombinations [][]int         `json:"variantIDCombinations"`
	AllVariants           []AllVariant    `json:"allVariants"`
	VariantDetails        []VariantDetail `json:"variantDetails"`
	Typename              string          `json:"__typename"`
}

type GlobalComponent

type GlobalComponent struct {
	Component
	Data     []GlobalDataComponent `json:"data"`
	Typename string                `json:"__typename"`
}

type GlobalDataComponent

type GlobalDataComponent struct {
	Icon      string        `json:"icon"`
	Title     string        `json:"title"`
	IsApplink bool          `json:"isApplink"`
	Applink   string        `json:"applink"`
	Content   []interface{} `json:"content"`
	Typename  string        `json:"__typename"`
}

type GoldOS

type GoldOS struct {
	IsGold      int    `json:"isGold"`
	IsGoldBadge int    `json:"isGoldBadge"`
	IsOfficial  int    `json:"isOfficial"`
	Badge       string `json:"badge"`
	ShopTier    int    `json:"shopTier"`
	Typename    string `json:"__typename"`
}
type Header struct {
	KeywordProcess string `json:"keywordProcess"`
	ResponseCode   int    `json:"responseCode"`
	TotalData      int    `json:"totalData"`
	Typename       string `json:"__typename"`
}

type HeaderErr

type HeaderErr struct {
	ProcessTime string   `json:"processTime"`
	Messages    []string `json:"messages"`
	Reason      string   `json:"reason"`
	ErrorCode   string   `json:"errorCode"`
	Typename    string   `json:"__typename"`
}

type HeaderMainData added in v1.1.27

type HeaderMainData struct {
	DynamicHomeIcon     DynamicHomeIcon     `json:"dynamicHomeIcon"`
	CategoryAllListLite CategoryAllListLite `json:"categoryAllListLite"`
}

type HeaderMainDataResp added in v1.1.5

type HeaderMainDataResp struct {
	Data HeaderMainData `json:"data"`
}

type HeaderSearchProduct

type HeaderSearchProduct struct {
	TotalData        int     `json:"totalData"`
	TotalDataText    string  `json:"totalDataText"`
	ProcessTime      float64 `json:"processTime"`
	ResponseCode     int     `json:"responseCode"`
	ErrorMessage     string  `json:"errorMessage"`
	AdditionalParams string  `json:"additionalParams"`
	KeywordProcess   string  `json:"keywordProcess"`
	ComponentID      string  `json:"componentId"`
	Typename         string  `json:"__typename"`
}

type Image

type Image struct {
	ImageURL        string `json:"imageUrl"`
	TrackerImageURL string `json:"trackerImageUrl"`
	Typename        string `json:"__typename"`
}

type ImageAttachment

type ImageAttachment struct {
	AttachmentID      string `json:"attachmentID"`
	ImageThumbnailURL string `json:"imageThumbnailUrl"`
	ImageURL          string `json:"imageUrl"`
	Typename          string `json:"__typename"`
}

type InstallmentRecommendationData

type InstallmentRecommendationData struct {
	Term           int    `json:"term"`
	MdrValue       int    `json:"mdr_value"`
	MdrType        string `json:"mdr_type"`
	InterestRate   int    `json:"interest_rate"`
	MinimumAmount  int    `json:"minimum_amount"`
	MaximumAmount  int    `json:"maximum_amount"`
	MonthlyPrice   int    `json:"monthly_price"`
	OsMonthlyPrice int    `json:"os_monthly_price"`
	PartnerCode    string `json:"partner_code"`
	PartnerName    string `json:"partner_name"`
	PartnerIcon    string `json:"partner_icon"`
	Subtitle       string `json:"subtitle"`
	Typename       string `json:"__typename"`
}

type InterfaceDataComp

type InterfaceDataComp struct {
	Component
	Data     []interface{} `json:"data"`
	Typename string        `json:"__typename"`
}

type IsCashback

type IsCashback struct {
	Percentage int    `json:"percentage"`
	Typename   string `json:"__typename"`
}

type JarvisRecommendationResp

type JarvisRecommendationResp struct {
	Data struct {
		GetJarvisRecommendation struct {
			Categories []Categories `json:"categories"`
			Typename   string       `json:"__typename"`
		} `json:"getJarvisRecommendation"`
	} `json:"data"`
}

type JarvisRecommendationVar

type JarvisRecommendationVar struct {
	ProductName string `json:"productName"`
}

type KeroDistrictRecommendation

type KeroDistrictRecommendation struct {
	NextAvailable bool       `json:"next_available"`
	District      []District `json:"district"`
	Typename      string     `json:"__typename"`
}

type Label

type Label struct {
	ColorHex string `json:"color_hex"`
	Content  string `json:"content"`
	Typename string `json:"__typename"`
}

type LabelGroups

type LabelGroups struct {
	Position string `json:"position"`
	Title    string `json:"title"`
	Type     string `json:"type"`
	URL      string `json:"url"`
	Typename string `json:"__typename"`
}

type LikeDislike

type LikeDislike struct {
	TotalLike  int    `json:"totalLike"`
	LikeStatus int    `json:"likeStatus"`
	Typename   string `json:"__typename"`
}
type Links struct {
	Prev     string `json:"prev"`
	Next     string `json:"next"`
	Typename string `json:"__typename"`
}

type LocDisctricRecommendationResp

type LocDisctricRecommendationResp struct {
	Data struct {
		KeroDistrictRecommendation KeroDistrictRecommendation `json:"kero_district_recommendation"`
	} `json:"data"`
}

type LocDisctricRecommendationVar

type LocDisctricRecommendationVar struct {
	Page  string `json:"page"`
	Query string `json:"query"`
}

type Media

type Media struct {
	Type            MediaType `json:"type"`
	URLOriginal     string    `json:"urlOriginal"`
	URLThumbnail    string    `json:"urlThumbnail"`
	URLMaxRes       string    `json:"urlMaxRes"`
	VideoURL        string    `json:"videoUrl"`
	Prefix          string    `json:"prefix"`
	Suffix          string    `json:"suffix"`
	Description     string    `json:"description"`
	VariantOptionID string    `json:"variantOptionID"`
	Typename        string    `json:"__typename"`
}

type MediaComponent

type MediaComponent struct {
	Component
	Data     []MediaComponentData `json:"data"`
	Typename string               `json:"__typename"`
}

type MediaComponentData

type MediaComponentData struct {
	Media    []Media       `json:"media"`
	Videos   []interface{} `json:"videos"`
	Typename string        `json:"__typename"`
}

type MediaType added in v1.1.10

type MediaType string
const (
	MediaVideo MediaType = "video"
	MediaImage MediaType = "image"
)
type Menu struct {
	ID       string `json:"id,omitempty"`
	MenuID   string `json:"menuID,omitempty"`
	Name     string `json:"name"`
	URL      string `json:"url"`
	Typename string `json:"__typename"`
}

type MerchantVoucher

type MerchantVoucher struct {
	VoucherID    int                   `json:"voucher_id"`
	VoucherName  string                `json:"voucher_name"`
	VoucherType  MerchantVoucherType   `json:"voucher_type"`
	VoucherCode  string                `json:"voucher_code"`
	Amount       MerchantVoucherAmount `json:"amount"`
	MinimumSpend int                   `json:"minimum_spend"`
	ValidThru    string                `json:"valid_thru"`
	Tnc          string                `json:"tnc"`
	Banner       MerchantVoucherBanner `json:"banner"`
	Status       Status                `json:"status"`
	InUseExpiry  string                `json:"in_use_expiry"`
	Typename     string                `json:"__typename"`
}

type MerchantVoucherAmount

type MerchantVoucherAmount struct {
	Amount          int    `json:"amount"`
	AmountType      int    `json:"amount_type"`
	AmountFormatted string `json:"amount_formatted"`
	Typename        string `json:"__typename"`
}

type MerchantVoucherBanner

type MerchantVoucherBanner struct {
	DesktopURL string `json:"desktop_url"`
	MobileURL  string `json:"mobile_url"`
	Typename   string `json:"__typename"`
}

type MerchantVoucherType

type MerchantVoucherType struct {
	VoucherType int    `json:"voucher_type"`
	Identifier  string `json:"identifier"`
	Typename    string `json:"__typename"`
}

type Meta

type Meta struct {
	AbTest     string `json:"ab_test"`
	Templating string `json:"templating"`
	Typename   string `json:"__typename"`
}

type NearestWarehouse

type NearestWarehouse struct {
	ProductID     string        `json:"product_id"`
	Stock         string        `json:"stock"`
	StockWording  string        `json:"stock_wording"`
	Price         string        `json:"price"`
	WarehouseInfo WarehouseInfo `json:"warehouse_info"`
	Typename      string        `json:"__typename"`
}

type NewVariantChild

type NewVariantChild struct {
	ProductID        string           `json:"productID"`
	Price            int              `json:"price"`
	PriceFmt         string           `json:"priceFmt"`
	OptionID         []int            `json:"optionID"`
	OptionName       []string         `json:"optionName"`
	ProductName      string           `json:"productName"`
	ProductURL       string           `json:"productURL"`
	Picture          Picture          `json:"picture"`
	Stock            VariantStock     `json:"stock"`
	IsCOD            bool             `json:"isCOD"`
	IsWishlist       bool             `json:"isWishlist"`
	CampaignInfo     ProductCampaign  `json:"campaignInfo"`
	ThematicCampaign ThematicCampaign `json:"thematicCampaign"`
	Typename         string           `json:"__typename"`
}

type NewVariantOptionData

type NewVariantOptionData struct {
	ErrorCode     int               `json:"errorCode"`
	ParentID      string            `json:"parentID"`
	DefaultChild  string            `json:"defaultChild"`
	SizeChart     string            `json:"sizeChart"`
	TotalStockFmt string            `json:"totalStockFmt"`
	Variants      []Variant         `json:"variants"`
	Children      []NewVariantChild `json:"children"`
	Typename      string            `json:"__typename"`
}

type NewVariantOptionsComponent

type NewVariantOptionsComponent struct {
	Component
	Data     []NewVariantOptionData `json:"data"`
	Typename string                 `json:"__typename"`
}

type Owner

type Owner struct {
	Identifier string `json:"identifier"`
	Typename   string `json:"__typename"`
}

type OwnerInfo

type OwnerInfo struct {
	ID       string `json:"id"`
	Typename string `json:"__typename"`
}

type PDPComponentName

type PDPComponentName string
const (
	MediaComponentName               PDPComponentName = "product_media"
	TickerInfoComponentName          PDPComponentName = "ticker_info"
	VariantOptionsComponentName      PDPComponentName = "variant_options"
	ProductContentComponentName      PDPComponentName = "product_content"
	NewVariantOptionsComponentName   PDPComponentName = "new_variant_options"
	ProductDetailComponentName       PDPComponentName = "product_detail"
	ObatKerasComponentName           PDPComponentName = "obat_keras"
	ShopCredibilityComponentName     PDPComponentName = "shop_credibility"
	ShipmentComponentName            PDPComponentName = "shipment"
	ShippingComponentName            PDPComponentName = "shipping"
	ShopVoucerComponentName          PDPComponentName = "shop_voucher"
	OfferingComponentName            PDPComponentName = "offerings"
	InstallmentPaylaterComponentName PDPComponentName = "installment_paylater"
	QRCodeComponentName              PDPComponentName = "QRCode"
	WholesaleComponentName           PDPComponentName = "wholesale"
	ProtectionComponentName          PDPComponentName = "protection"
	ReportComponentName              PDPComponentName = "report"
	ReviewComponentName              PDPComponentName = "review"
	TdnTopadsComponentName           PDPComponentName = "tdn_topads"
	DiscussionFaqComponentName       PDPComponentName = "discussion_faq"
	Pdp1ComponentName                PDPComponentName = "pdp_1"
	Pdp2ComponentName                PDPComponentName = "pdp_2"
	Pdp3ComponentName                PDPComponentName = "pdp_3"
	Pdp4ComponentName                PDPComponentName = "pdp_4"
)

type PDPListComponents

type PDPListComponents []interface{}

func (*PDPListComponents) UnmarshalJSON

func (p *PDPListComponents) UnmarshalJSON(data []byte) error

type Pagination

type Pagination struct {
	HasNext  bool   `json:"hasNext"`
	Typename string `json:"__typename"`
}

type ParamsVar

type ParamsVar struct {
	Params string `json:"params"`
}

type PartnerInfo

type PartnerInfo struct {
	FsType   int    `json:"fsType"`
	Typename string `json:"__typename"`
}

type PdpGetData

type PdpGetData struct {
	Error           DevError       `json:"error"`
	CallsError      CallsError     `json:"callsError"`
	ProductView     string         `json:"productView"`
	WishlistCount   string         `json:"wishlistCount"`
	ShopFinishRate  ShopFinishRate `json:"shopFinishRate"`
	ShopInfo        ShopInfo       `json:"shopInfo"`
	MerchantVoucher struct {
		Vouchers []MerchantVoucher `json:"vouchers"`
		Typename string            `json:"__typename"`
	} `json:"merchantVoucher"`
	NearestWarehouse          []NearestWarehouse `json:"nearestWarehouse"`
	InstallmentRecommendation struct {
		Data     InstallmentRecommendationData `json:"data"`
		Typename string                        `json:"__typename"`
	} `json:"installmentRecommendation"`
	ProductWishlistQuery struct {
		Value    bool   `json:"value"`
		Typename string `json:"__typename"`
	} `json:"productWishlistQuery"`
	CartRedirection  CartRedirection `json:"cartRedirection"`
	ShopTopChatSpeed struct {
		MessageResponseTime string `json:"messageResponseTime"`
		Typename            string `json:"__typename"`
	} `json:"shopTopChatSpeed"`
	ShopRatingsQuery struct {
		RatingScore float64 `json:"ratingScore"`
		Typename    string  `json:"__typename"`
	} `json:"shopRatingsQuery"`
	ShopPackSpeed struct {
		SpeedFmt string `json:"speedFmt"`
		Hour     int    `json:"hour"`
		Typename string `json:"__typename"`
	} `json:"shopPackSpeed"`
	RatesEstimate   []RatesEstimate `json:"ratesEstimate"`
	RestrictionInfo struct {
		Message         string        `json:"message"`
		RestrictionData []interface{} `json:"restrictionData"`
		Typename        string        `json:"__typename"`
	} `json:"restrictionInfo"`
	Ticker struct {
		TickerInfo []interface{} `json:"tickerInfo"`
		Typename   string        `json:"__typename"`
	} `json:"ticker"`
	NavBar struct {
		Name     string        `json:"name"`
		Items    []interface{} `json:"items"`
		Typename string        `json:"__typename"`
	} `json:"navBar"`
	BebasOngkir struct {
		Products []ProductsBebasOngkir `json:"products"`
		Typename string                `json:"__typename"`
	} `json:"bebasOngkir"`
	Typename string `json:"__typename"`
}

type PdpGetDataP2Data added in v1.1.10

type PdpGetDataP2Data struct {
	PdpGetData PdpGetData `json:"pdpGetData"`
}

type PdpGetDataP2Resp

type PdpGetDataP2Resp struct {
	Data PdpGetDataP2Data `json:"data"`
}

type PdpGetDataP2Var

type PdpGetDataP2Var struct {
	Affiliate    interface{}   `json:"affiliate"`
	ProductID    string        `json:"productID"`
	PdpSession   string        `json:"pdpSession"`
	DeviceID     string        `json:"deviceID"`
	UserLocation *UserLocation `json:"userLocation,omitempty"`
	Tokonow      *Tokonow      `json:"tokonow,omitempty"`
}

func NewPdpGetDataP2Var added in v1.1.15

func NewPdpGetDataP2Var(layout PdpGetLayout) *PdpGetDataP2Var

type PdpGetLayout

type PdpGetLayout struct {
	RequestID  string            `json:"requestID"`
	Name       string            `json:"name"`
	PdpSession string            `json:"pdpSession"`
	BasicInfo  BasicInfo         `json:"basicInfo"`
	Components PDPListComponents `json:"components"`
	Typename   string            `json:"__typename"`
}

func (*PdpGetLayout) GetDescription added in v1.1.15

func (layout *PdpGetLayout) GetDescription() (string, error)

func (*PdpGetLayout) GetImages added in v1.1.15

func (layout *PdpGetLayout) GetImages() ([]string, error)

func (*PdpGetLayout) GetPercentageAmount added in v1.1.10

func (layout *PdpGetLayout) GetPercentageAmount() (int, error)

func (*PdpGetLayout) GetPrice added in v1.1.15

func (layout *PdpGetLayout) GetPrice() (int, error)

func (*PdpGetLayout) GetPriceBeforeDiscount added in v1.1.15

func (layout *PdpGetLayout) GetPriceBeforeDiscount() (int, error)

func (*PdpGetLayout) GetProductName added in v1.1.10

func (layout *PdpGetLayout) GetProductName() (string, error)

func (*PdpGetLayout) GetStock added in v1.1.15

func (layout *PdpGetLayout) GetStock() (int, error)

type PdpGetReiewImageQueryResp

type PdpGetReiewImageQueryResp struct {
	Data struct {
		ProductrevGetReviewImage ProductrevGetReviewImage `json:"productrevGetReviewImage"`
	} `json:"data"`
}

type PdpGetReiewImageQueryVar

type PdpGetReiewImageQueryVar struct {
	ProductID string `json:"productID"`
	Page      int    `json:"page"`
	Limit     int    `json:"limit"`
}

type PdpGetlayoutData added in v1.1.10

type PdpGetlayoutData struct {
	PdpGetLayout PdpGetLayout `json:"pdpGetLayout"`
}

type PdpGetlayoutQueryResp

type PdpGetlayoutQueryResp struct {
	Data PdpGetlayoutData `json:"data"`
}

type PdpGetlayoutQueryVar

type PdpGetlayoutQueryVar struct {
	ShopDomain   string        `json:"shopDomain"`
	ProductKey   string        `json:"productKey"`
	LayoutID     string        `json:"layoutID"`
	APIVersion   int           `json:"apiVersion"`
	Tokonow      *Tokonow      `json:"tokonow,omitempty"`
	UserLocation *UserLocation `json:"userLocation,omitempty"`
	ExtParam     string        `json:"extParam"`
}

func NewPdpGetlayoutQueryVar added in v1.1.10

func NewPdpGetlayoutQueryVar(uri string) (queryVar *PdpGetlayoutQueryVar, err error)

type PdpShopNoteResp

type PdpShopNoteResp struct {
	Data struct {
		ShopNotesByShopID struct {
			Result   []Result `json:"result"`
			Error    Error    `json:"error"`
			Typename string   `json:"__typename"`
		} `json:"shopNotesByShopID"`
	} `json:"data"`
}

type Picture

type Picture struct {
	URLOriginal  string `json:"urlOriginal"`
	URLThumbnail string `json:"urlThumbnail"`
	Typename     string `json:"__typename"`
}

type Preorder

type Preorder struct {
	Duration       int    `json:"duration"`
	TimeUnit       string `json:"timeUnit"`
	IsActive       bool   `json:"isActive"`
	PreorderInDays int    `json:"preorderInDays"`
	Typename       string `json:"__typename"`
}

type Price

type Price struct {
	Min      int    `json:"min,omitempty"`
	Max      int    `json:"max,omitempty"`
	TextIdr  string `json:"text_idr,omitempty"`
	Typename string `json:"__typename"`
}

type PrimaryImage

type PrimaryImage struct {
	Original  string `json:"original"`
	Thumbnail string `json:"thumbnail"`
	Resize300 string `json:"resize300"`
	Typename  string `json:"__typename"`
}

type ProdDetailComTitle added in v1.1.9

type ProdDetailComTitle string
const (
	KondisiTitle      ProdDetailComTitle = "Kondisi"
	BeratSatuanTitle  ProdDetailComTitle = "Berat Satuan"
	MinPemesananTitle ProdDetailComTitle = "Min. Pemesanan"
	CategoryTitle     ProdDetailComTitle = "Kategori"
	EtalaseTitle      ProdDetailComTitle = "Etalase"
	DeskripsiTitle    ProdDetailComTitle = "Deskripsi"
)

type ProductCampaign

type ProductCampaign struct {
	CampaignID          string `json:"campaignID"`
	CampaignType        string `json:"campaignType"`
	CampaignTypeName    string `json:"campaignTypeName"`
	CampaignIdentifier  int    `json:"campaignIdentifier"`
	Background          string `json:"background"`
	OriginalPrice       int    `json:"originalPrice"`
	Stock               int    `json:"stock"`
	StockSoldPercentage int    `json:"stockSoldPercentage"`
	StartDate           string `json:"startDate"`
	EndDate             string `json:"endDate"`
	EndDateUnix         string `json:"endDateUnix"`
	AppLinks            string `json:"appLinks"`
	IsAppsOnly          bool   `json:"isAppsOnly"`
	IsActive            bool   `json:"isActive"`
	HideGimmick         bool   `json:"hideGimmick"`
	PercentageAmount    int    `json:"percentageAmount"`
	DiscountedPrice     int    `json:"discountedPrice"`
	OriginalStock       int    `json:"originalStock"`
	Threshold           int    `json:"threshold"`
	IsCheckImei         bool   `json:"isCheckImei,omitempty"`
	DiscountPercentage  int    `json:"discountPercentage,omitempty"`
	DiscountPrice       int    `json:"discountPrice,omitempty"`
	MinOrder            int    `json:"minOrder,omitempty"`
	Typename            string `json:"__typename"`
}

type ProductContentComponent

type ProductContentComponent struct {
	Component
	Data     []ProductContentData `json:"data"`
	Typename string               `json:"__typename"`
}

type ProductContentData

type ProductContentData struct {
	Name             string           `json:"name"`
	Price            ProductPrice     `json:"price"`
	Campaign         ProductCampaign  `json:"campaign"`
	ThematicCampaign ThematicCampaign `json:"thematicCampaign"`
	Stock            ProductStock     `json:"stock"`
	Variant          ProductVariant   `json:"variant"`
	Wholesale        []interface{}    `json:"wholesale"`
	IsCashback       IsCashback       `json:"isCashback"`
	IsTradeIn        bool             `json:"isTradeIn"`
	IsOS             bool             `json:"isOS"`
	IsPowerMerchant  bool             `json:"isPowerMerchant"`
	IsWishlist       bool             `json:"isWishlist"`
	IsCOD            bool             `json:"isCOD"`
	Preorder         Preorder         `json:"preorder"`
	Typename         string           `json:"__typename"`
}

type ProductDetailComponent

type ProductDetailComponent struct {
	Component
	Data     []ProductDetailData `json:"data"`
	Typename string              `json:"__typename"`
}

type ProductDetailContent

type ProductDetailContent struct {
	Title        ProdDetailComTitle `json:"title"`
	Subtitle     string             `json:"subtitle"`
	Applink      string             `json:"applink"`
	ShowAtFront  bool               `json:"showAtFront"`
	IsAnnotation bool               `json:"isAnnotation"`
	Typename     string             `json:"__typename"`
}

type ProductDetailData

type ProductDetailData struct {
	Content  []ProductDetailContent `json:"content"`
	Typename string                 `json:"__typename"`
}

func (*ProductDetailData) GetContent added in v1.1.9

func (detail *ProductDetailData) GetContent(title ProdDetailComTitle) (*ProductDetailContent, error)

type ProductIdVar

type ProductIdVar struct {
	ProductId string `json:"productID"`
}

type ProductLabel

type ProductLabel struct {
	Title    string `json:"title"`
	Color    string `json:"color"`
	Typename string `json:"__typename"`
}

type ProductPrice

type ProductPrice struct {
	Value    int    `json:"value"`
	Currency string `json:"currency"`
	Typename string `json:"__typename"`
}

type ProductRatingandTopicsResp

type ProductRatingandTopicsResp struct {
	Data struct {
		ProductrevGetProductRatingAndTopics ProductrevGetProductRatingAndTopics `json:"productrevGetProductRatingAndTopics"`
	} `json:"data"`
}

type ProductRecommendationWidget

type ProductRecommendationWidget struct {
	Data []struct {
		TID            string          `json:"tID"`
		Source         string          `json:"source"`
		Title          string          `json:"title"`
		ForeignTitle   string          `json:"foreignTitle"`
		SeeMoreURLLink string          `json:"seeMoreUrlLink"`
		LayoutType     string          `json:"layoutType"`
		PageName       string          `json:"pageName"`
		WidgetURL      string          `json:"widgetUrl"`
		Pagination     Pagination      `json:"pagination"`
		Recommendation []Recomendation `json:"recommendation"`
		Typename       string          `json:"__typename"`
	} `json:"data"`
	Meta struct {
		Recommendation    string `json:"recommendation"`
		Size              int    `json:"size"`
		FailSize          int    `json:"failSize"`
		ProcessTime       string `json:"processTime"`
		ExperimentVersion string `json:"experimentVersion"`
		Typename          string `json:"__typename"`
	} `json:"meta"`
	Typename string `json:"__typename"`
}

type ProductReviewListResp

type ProductReviewListResp struct {
	Data struct {
		ProductrevGetProductReviewList ProductrevGetProductReviewList `json:"productrevGetProductReviewList"`
	} `json:"data"`
}

type ProductReviewListVar

type ProductReviewListVar struct {
	ProductID string `json:"productID"`
	Page      int    `json:"page"`
	Limit     int    `json:"limit"`
	SortBy    string `json:"sortBy"`
	FilterBy  string `json:"filterBy"`
}

type ProductSearch

type ProductSearch struct {
	ID                 int64         `json:"id"`
	Name               string        `json:"name"`
	Ads                Ads           `json:"ads"`
	Badges             []interface{} `json:"badges"`
	Category           int           `json:"category"`
	CategoryBreadcrumb string        `json:"categoryBreadcrumb"`
	CategoryID         int           `json:"categoryId"`
	CategoryName       string        `json:"categoryName"`
	CountReview        int           `json:"countReview"`
	CustomVideoURL     string        `json:"customVideoURL"`
	DiscountPercentage int           `json:"discountPercentage"`
	GaKey              string        `json:"gaKey"`
	ImageURL           string        `json:"imageUrl"`
	LabelGroups        []LabelGroups `json:"labelGroups"`
	OriginalPrice      string        `json:"originalPrice"`
	Price              string        `json:"price"`
	PriceRange         string        `json:"priceRange"`
	Rating             int           `json:"rating"`
	RatingAverage      string        `json:"ratingAverage"`
	Shop               ProductShop   `json:"shop"`
	URL                string        `json:"url"`
	Wishlist           bool          `json:"wishlist"`
	SourceEngine       string        `json:"sourceEngine"`
	Typename           string        `json:"__typename"`
}

type ProductShop

type ProductShop struct {
	ShopID       int         `json:"shopId"`
	Name         string      `json:"name"`
	City         string      `json:"city"`
	IsOfficial   bool        `json:"isOfficial"`
	IsPowerBadge bool        `json:"isPowerBadge"`
	URL          string      `json:"url,omitempty"`
	Domain       string      `json:"domain,omitempty"`
	Tagline      string      `json:"tagline,omitempty"`
	URI          string      `json:"uri,omitempty"`
	Badges       []ShopBadge `json:"badges,omitempty"`
	Typename     string      `json:"__typename"`
}

type ProductStock

type ProductStock struct {
	UseStock     bool   `json:"useStock"`
	Value        string `json:"value"`
	StockWording string `json:"stockWording"`
	Typename     string `json:"__typename"`
}

type ProductTxStats

type ProductTxStats struct {
	TransactionSuccess int    `json:"transactionSuccess,string"`
	TransactionReject  int    `json:"transactionReject,string"`
	CountSold          int    `json:"countSold,string"`
	PaymentVerified    int    `json:"paymentVerified,string"`
	ItemSoldFmt        string `json:"itemSoldFmt"`
	Typename           string `json:"__typename"`
}

type ProductVariant

type ProductVariant struct {
	IsVariant bool   `json:"isVariant"`
	ParentID  string `json:"parentID"`
	Typename  string `json:"__typename"`
}

type ProductrevGetProductRatingAndTopics

type ProductrevGetProductRatingAndTopics struct {
	ProductID        string          `json:"productID"`
	Rating           Rating          `json:"rating"`
	Topics           []Topic         `json:"topics"`
	AvailableFilters AvailableFilter `json:"availableFilters"`
	Typename         string          `json:"__typename"`
}

type ProductrevGetProductReviewList

type ProductrevGetProductReviewList struct {
	ProductID    string   `json:"productID"`
	List         []Review `json:"list"`
	Shop         Shop     `json:"shop"`
	HasNext      bool     `json:"hasNext"`
	TotalReviews int      `json:"totalReviews"`
	Typename     string   `json:"__typename"`
}

type ProductrevGetReviewImage

type ProductrevGetReviewImage struct {
	List     []ReviewImageList `json:"list"`
	Detail   ReviewImageDetail `json:"detail"`
	HasNext  bool              `json:"hasNext"`
	Typename string            `json:"__typename"`
}

type Products

type Products struct {
	ID                 int64         `json:"id"`
	Name               string        `json:"name"`
	URL                string        `json:"url"`
	URLApps            string        `json:"urlApps"`
	URLMobile          string        `json:"urlMobile"`
	ImageURL           string        `json:"imageURL"`
	Price              string        `json:"price"`
	CountSold          int           `json:"countSold"`
	Stock              int           `json:"stock"`
	Status             string        `json:"status"`
	DiscountedPrice    string        `json:"discountedPrice"`
	DiscountPercentage int           `json:"discountPercentage"`
	Position           int           `json:"position"`
	Rating             float64       `json:"rating"`
	StockWording       StockWording  `json:"stockWording"`
	HideGimmick        bool          `json:"hideGimmick"`
	LabelGroups        []LabelGroups `json:"labelGroups"`
	Typename           string        `json:"__typename"`
}

type ProductsBebasOngkir

type ProductsBebasOngkir struct {
	ProductID string `json:"productID"`
	BoType    int    `json:"boType"`
	Typename  string `json:"__typename"`
}

type Question

type Question struct {
	QuestionID          string `json:"questionID"`
	Content             string `json:"content"`
	MaskedContent       string `json:"maskedContent"`
	UserName            string `json:"userName"`
	UserThumbnail       string `json:"userThumbnail"`
	UserID              string `json:"userID"`
	CreateTime          string `json:"createTime"`
	CreateTimeFormatted string `json:"createTimeFormatted"`
	State               State  `json:"state"`
	TotalAnswer         int    `json:"totalAnswer"`
	Answer              Answer `json:"answer"`
	Typename            string `json:"__typename"`
}

type RatesEstimate

type RatesEstimate struct {
	WarehouseID string            `json:"warehouseID"`
	Products    []string          `json:"products"`
	Data        RatesEstimateData `json:"data"`
	Bottomsheet Bottomsheet       `json:"bottomsheet"`
	Typename    string            `json:"__typename"`
}

type RatesEstimateData

type RatesEstimateData struct {
	Destination           string          `json:"destination"`
	Title                 string          `json:"title"`
	Subtitle              string          `json:"subtitle"`
	ChipsLabel            []string        `json:"chipsLabel"`
	CourierLabel          string          `json:"courierLabel"`
	ETAText               string          `json:"eTAText"`
	CheapestShippingPrice int             `json:"cheapestShippingPrice"`
	FulfillmentData       FulfillmentData `json:"fulfillmentData"`
	Errors                []interface{}   `json:"errors"`
	Typename              string          `json:"__typename"`
}

type RatesEstimateQueryResp added in v1.0.2

type RatesEstimateQueryResp []struct {
	Data struct {
		RatesEstimateV3 RatesEstimateV3 `json:"ratesEstimateV3"`
	} `json:"data"`
}

type RatesEstimateQueryVar added in v1.0.2

type RatesEstimateQueryVar struct {
	Weight           float64 `json:"weight"`
	Domain           string  `json:"domain"`
	ProductID        string  `json:"productId"`
	Origin           string  `json:"origin"`
	Destination      string  `json:"destination"`
	POTime           int     `json:"POTime"`
	IsFulfillment    bool    `json:"isFulfillment"`
	DeviceType       string  `json:"deviceType"`
	ShopTier         int     `json:"shopTier"`
	BoMetadata       string  `json:"bo_metadata"`
	FreeShippingFlag int     `json:"free_shipping_flag"`
	WarehouseID      string  `json:"warehouse_id"`
}

weight: 0.25, domain: multiaccesoris, -> shop domain productId: 2248059401, origin: 5637|15810|YHeWJestVbuD66PoGVDnlQaHYJAZ8CG10NtXqKCEcuLjE3IncRxwVBiPSs6Tw6PTDkzUsF9kBXgJqw%3D%3D, -> geolocation PDPGetDataP2 destination: 2935||-8.127172,112.417213, POTime: 0, isFulfillment: false, deviceType: default_v3, shopTier: 3, bo_metadata: "", free_shipping_flag: 0, warehouse_id: 113930

type RatesEstimateV3 added in v1.0.2

type RatesEstimateV3 struct {
	Data struct {
		Address Address `json:"address"`
		Shop    struct {
			DistrictID   int    `json:"district_id"`
			DistrictName string `json:"district_name"`
			PostalCode   string `json:"postal_code"`
			Origin       int    `json:"origin"`
			AddrStreet   string `json:"addr_street"`
			Latitude     string `json:"latitude"`
			Longitude    string `json:"longitude"`
			ProvinceID   int    `json:"province_id"`
			CityID       int    `json:"city_id"`
			CityName     string `json:"city_name"`
			Typename     string `json:"__typename"`
		} `json:"shop"`
		Rates struct {
			ID       string         `json:"id"`
			RatesID  string         `json:"rates_id"`
			Type     string         `json:"type"`
			Services []RatesService `json:"services"`
			Typename string         `json:"__typename"`
		} `json:"rates"`
		Texts struct {
			TextMinPrice    string `json:"text_min_price"`
			TextDestination string `json:"text_destination"`
			TextEta         string `json:"text_eta"`
			Typename        string `json:"__typename"`
		} `json:"texts"`
		FreeShipping struct {
			Flag          int    `json:"flag"`
			ShippingPrice string `json:"shipping_price"`
			EtaText       string `json:"eta_text"`
			ErrorCode     int    `json:"error_code"`
			IconURL       string `json:"icon_url"`
			Title         string `json:"title"`
			Typename      string `json:"__typename"`
		} `json:"free_shipping"`
		TokocabangFrom struct {
			Title    string `json:"title"`
			Content  string `json:"content"`
			IconURL  string `json:"icon_url"`
			Typename string `json:"__typename"`
		} `json:"tokocabang_from"`
		IsBlackbox bool   `json:"is_blackbox"`
		Typename   string `json:"__typename"`
	} `json:"data"`
	Typename string `json:"__typename"`
}

type RatesService added in v1.0.2

type RatesService struct {
	ServiceName  string `json:"service_name"`
	ServiceID    int    `json:"service_id"`
	ServiceOrder int    `json:"service_order"`
	Status       int    `json:"status"`
	RangePrice   struct {
		MinPrice int    `json:"min_price"`
		MaxPrice int    `json:"max_price"`
		Typename string `json:"__typename"`
	} `json:"range_price"`
	Texts struct {
		TextServiceDesc  string `json:"text_service_desc"`
		TextServiceNotes string `json:"text_service_notes"`
		TextRangePrice   string `json:"text_range_price"`
		TextEtd          string `json:"text_etd"`
		TextPrice        string `json:"text_price"`
		Typename         string `json:"__typename"`
	} `json:"texts"`
	Products []struct {
		ShipperName        string `json:"shipper_name"`
		ShipperID          int    `json:"shipper_id"`
		ShipperProductID   int    `json:"shipper_product_id"`
		ShipperProductName string `json:"shipper_product_name"`
		ShipperWeight      int    `json:"shipper_weight"`
		Price              struct {
			Price          int    `json:"price"`
			FormattedPrice string `json:"formatted_price"`
			Typename       string `json:"__typename"`
		} `json:"price"`
		Texts struct {
			TextEtd          string `json:"text_etd"`
			TextRangePrice   string `json:"text_range_price"`
			TextEtaSummarize string `json:"text_eta_summarize"`
			Typename         string `json:"__typename"`
		} `json:"texts"`
		Cod struct {
			IsCodAvailable int    `json:"is_cod_available"`
			Typename       string `json:"__typename"`
		} `json:"cod"`
		Eta struct {
			TextEta   string `json:"text_eta"`
			ErrorCode int    `json:"error_code"`
			Typename  string `json:"__typename"`
		} `json:"eta"`
		Features struct {
			DynamicPrice struct {
				TextLabel string `json:"text_label"`
				Typename  string `json:"__typename"`
			} `json:"dynamic_price"`
			Typename string `json:"__typename"`
		} `json:"features"`
		Typename string `json:"__typename"`
	} `json:"products"`
	ServiceBasedShipment struct {
		IsAvailable bool   `json:"is_available"`
		TextPrice   string `json:"text_price"`
		TextEta     string `json:"text_eta"`
		Typename    string `json:"__typename"`
	} `json:"service_based_shipment"`
	Cod struct {
		IsCod    int    `json:"is_cod"`
		CodText  string `json:"cod_text"`
		Typename string `json:"__typename"`
	} `json:"cod"`
	OrderPriority struct {
		IsNow    bool   `json:"is_now"`
		Typename string `json:"__typename"`
	} `json:"order_priority"`
	Etd struct {
		MinEtd   int    `json:"min_etd"`
		MaxEtd   int    `json:"max_etd"`
		Typename string `json:"__typename"`
	} `json:"etd"`
	Typename string `json:"__typename"`
}

type Rating

type Rating struct {
	PositivePercentageFmt   string         `json:"positivePercentageFmt"`
	RatingScore             string         `json:"ratingScore"`
	TotalRating             int            `json:"totalRating"`
	TotalRatingWithImage    int            `json:"totalRatingWithImage"`
	TotalRatingTextAndImage int            `json:"totalRatingTextAndImage"`
	Detail                  []RatingDetail `json:"detail"`
	Typename                string         `json:"__typename"`
}

type RatingDetail

type RatingDetail struct {
	FormattedTotalReviews string  `json:"formattedTotalReviews"`
	Rate                  int     `json:"rate"`
	Percentage            string  `json:"percentage,omitempty"`
	PercentageFloat       float64 `json:"percentageFloat"`
	TotalReviews          int     `json:"totalReviews"`
	Typename              string  `json:"__typename"`
}

type RecentOneMonth

type RecentOneMonth struct {
	Bad      int    `json:"bad"`
	Good     int    `json:"good"`
	Neutral  int    `json:"neutral"`
	Typename string `json:"__typename"`
}

type RecomShop

type RecomShop struct {
	ID       int    `json:"id"`
	Name     string `json:"name"`
	Location string `json:"location"`
	City     string `json:"city"`
	URL      string `json:"url"`
	Typename string `json:"__typename"`
}

type RecomWidgetResp

type RecomWidgetResp struct {
	Data struct {
		ProductRecommendationWidget ProductRecommendationWidget `json:"productRecommendationWidget"`
	} `json:"data"`
}

type RecomWidgetVar

type RecomWidgetVar struct {
	UserID         int           `json:"userID"`
	XDevice        string        `json:"xDevice"`
	PageName       string        `json:"pageName"`
	Ref            string        `json:"ref"`
	ProductIDs     string        `json:"productIDs"`
	TokoNow        bool          `json:"tokoNow"`
	CategoryIDs    string        `json:"categoryIDs"`
	Keyword        []interface{} `json:"keyword"`
	LayoutPageType string        `json:"LayoutPageType"`
	QueryParam     string        `json:"queryParam"`
}

type Recomendation

type Recomendation struct {
	ProductSlashedPrice       string         `json:"productSlashedPrice"`
	SlashedPriceInt           int            `json:"slashedPriceInt"`
	ProductDiscountPercentage int            `json:"productDiscountPercentage"`
	ProductReviewCount        int            `json:"productReviewCount"`
	IsWishlist                bool           `json:"isWishlist"`
	ProductImageURL           string         `json:"productImageUrl"`
	IsTopads                  bool           `json:"isTopads"`
	ClickURL                  string         `json:"clickUrl"`
	TrackerImageURL           string         `json:"trackerImageUrl"`
	ProductURL                string         `json:"productUrl"`
	ProductRating             int            `json:"productRating"`
	ProductPrice              string         `json:"productPrice"`
	PriceInt                  int            `json:"priceInt"`
	ID                        int            `json:"id"`
	ProductName               string         `json:"productName"`
	CategoryBreadcrumbs       string         `json:"categoryBreadcrumbs"`
	RecommendationType        string         `json:"recommendationType"`
	Stock                     int            `json:"stock"`
	DepartmentID              int            `json:"departmentID"`
	Shop                      RecomShop      `json:"shop"`
	ProductLabels             []ProductLabel `json:"productLabels"`
	LabelGroup                []LabelGroups  `json:"labelGroup"`
	WholesalePrice            []interface{}  `json:"wholesalePrice"`
	Badges                    []Badge        `json:"badges"`
	Typename                  string         `json:"__typename"`
}

type Redirection

type Redirection struct {
	RedirectURL  string `json:"redirectUrl"`
	DepartmentID int    `json:"departmentId"`
	Typename     string `json:"__typename"`
}
type Related struct {
	Position       int           `json:"position"`
	TrackingOption int           `json:"trackingOption"`
	RelatedKeyword string        `json:"relatedKeyword"`
	OtherRelated   []interface{} `json:"otherRelated"`
	Typename       string        `json:"__typename"`
}

type Result

type Result struct {
	ID         string `json:"id"`
	Title      string `json:"title"`
	Content    string `json:"content"`
	URL        string `json:"url"`
	UpdateTime string `json:"updateTime"`
	Typename   string `json:"__typename"`
}

type Review

type Review struct {
	ID                    string            `json:"id"`
	VariantName           string            `json:"variantName"`
	Message               string            `json:"message"`
	ProductRating         int               `json:"productRating"`
	ReviewCreateTime      string            `json:"reviewCreateTime"`
	ReviewCreateTimestamp string            `json:"reviewCreateTimestamp"`
	IsReportable          bool              `json:"isReportable"`
	IsAnonymous           bool              `json:"isAnonymous"`
	ImageAttachments      []ImageAttachment `json:"imageAttachments"`
	VideoAttachments      []interface{}     `json:"videoAttachments"`
	ReviewResponse        ReviewResponse    `json:"reviewResponse"`
	User                  User              `json:"user"`
	LikeDislike           LikeDislike       `json:"likeDislike"`
	Stats                 []ReviewStats     `json:"stats"`
	BadRatingReasonFmt    string            `json:"badRatingReasonFmt"`
	Typename              string            `json:"__typename"`
}

type ReviewImageDetail

type ReviewImageDetail struct {
	Reviews    []DetailReview `json:"reviews"`
	Images     []DetailImage  `json:"images"`
	Video      []interface{}  `json:"video"`
	MediaCount int            `json:"mediaCount"`
	Typename   string         `json:"__typename"`
}

type ReviewImageList

type ReviewImageList struct {
	ImageID    string `json:"imageID"`
	FeedbackID string `json:"feedbackID"`
	VideoID    string `json:"videoID"`
	Typename   string `json:"__typename"`
}

type ReviewResponse

type ReviewResponse struct {
	Message    string `json:"message"`
	CreateTime string `json:"createTime"`
	Typename   string `json:"__typename"`
}

type ReviewStats

type ReviewStats struct {
	Key       string `json:"key"`
	Formatted string `json:"formatted"`
	Count     int    `json:"count"`
	Typename  string `json:"__typename"`
}

type Reviewer

type Reviewer struct {
	UserID         string `json:"userID"`
	FullName       string `json:"fullName"`
	ProfilePicture string `json:"profilePicture"`
	Typename       string `json:"__typename"`
}

type SearchProductAdParams added in v1.0.2

type SearchProductAdParams struct {
	Page          int     `json:"page"`              // 1
	Ep            string  `json:"ep"`                // product
	Item          int     `json:"item"`              // 15
	Src           string  `json:"src"`               // directory
	Device        string  `json:"device"`            // desktop
	UserId        int     `json:"user_id"`           // 0
	MinimumItem   int     `json:"minimum_item"`      // 15
	Start         int     `json:"start"`             // 1
	NoAutoFill    string  `json:"no_autofill_range"` // 5-14
	Query         string  `json:"q,omitempty"`
	Fcity         []int   `json:"fcity,omitempty"`
	DepId         int     `json:"dep_id"`
	Sort          int     `json:"ob"`
	Shipping      []int   `json:"shipping,omitempty"`
	Cashback      bool    `json:"cashbackm,omitempty"`
	FreeShipping  bool    `json:"free_shipping,omitempty"`
	COD           bool    `json:"cod,omitempty"`
	IsDiscount    bool    `json:"is_discount,omitempty"`
	Bundling      bool    `json:"bundling,omitempty"`
	Wholesale     bool    `json:"wholesale,omitempty"`
	IsMvcDiscount bool    `json:"is_mvc_discount,omitempty"`
	ShopTier      []int   `json:"shop_tier,omitempty"`
	PriceMin      int     `json:"pmin,omitempty"`
	PriceMax      int     `json:"pmax,omitempty"`
	PreOrder      bool    `json:"preorder,omitempty"`
	Condition     []int   `json:"condition,omitempty"`
	Rating        float64 `json:"rt,omitempty"`
}

type SearchProductBanner

type SearchProductBanner struct {
	Position       int    `json:"position"`
	Text           string `json:"text"`
	ImageURL       string `json:"imageUrl"`
	URL            string `json:"url"`
	ComponentID    string `json:"componentId"`
	TrackingOption int    `json:"trackingOption"`
	Typename       string `json:"__typename"`
}

type SearchProductChunkHandler added in v1.1.27

type SearchProductChunkHandler func([]*ProductSearch) error

type SearchProductData

type SearchProductData struct {
	Banner         SearchProductBanner `json:"banner"`
	BackendFilters string              `json:"backendFilters"`
	IsQuerySafe    bool                `json:"isQuerySafe"`
	Ticker         Ticker              `json:"ticker"`
	Redirection    Redirection         `json:"redirection"`
	Related        Related             `json:"related"`
	Suggestion     Suggestion          `json:"suggestion"`
	Products       SearchProducts      `json:"products"`
	Violation      Violation           `json:"violation"`
	Typename       string              `json:"__typename"`
}

type SearchProductQueryResp added in v1.0.2

type SearchProductQueryResp struct {
	Data struct {
		CategoryProducts CategoryProducts `json:"CategoryProducts"`
		DisplayAdsV3     struct {
			Data     []interface{} `json:"data"`
			Template []interface{} `json:"template"`
			Typename string        `json:"__typename"`
		} `json:"displayAdsV3"`
	} `json:"data"`
}

type SearchProductQueryV4Resp

type SearchProductQueryV4Resp struct {
	Data struct {
		AceSearchProductV4 struct {
			Header   HeaderSearchProduct `json:"header"`
			Data     SearchProductData   `json:"data"`
			Typename string              `json:"__typename"`
		} `json:"ace_search_product_v4"`
	} `json:"data"`
}

type SearchProductQueryVar added in v1.0.2

type SearchProductQueryVar struct {
	AdParams string `json:"adParams"`
	Params   string `json:"params"`
}

type SearchProductVar added in v1.0.2

type SearchProductVar struct {
	Sort           string   `schema:"ob,omitempty"`
	Page           int      `schema:"page"`
	Rows           int      `schema:"rows,omitempty"`
	Device         string   `schema:"device"`
	Related        bool     `schema:"related"`
	SafeSearch     bool     `schema:"safe_search"`
	Scheme         string   `schema:"scheme"`
	UserDistrictID string   `schema:"user_districtId"`
	UserCityID     string   `schema:"user_cityId"`
	Source         string   `schema:"source"`
	TopadsBucket   bool     `schema:"topads_bucket"`
	Start          int      `schema:"start"`
	PriceMin       int      `schema:"pmin,omitempty"`
	PriceMax       int      `schema:"pmax,omitempty"`
	Rate           []string `schema:"rt,omitempty"`
	Query          string   `schema:"q,omitempty"`
	Fcity          []string `schema:"fcity,omitempty"`
	Condition      []string `schema:"condition,omitempty"`
	ShopTier       []string `schema:"shop_tier,omitempty"`
	CategoryId     int      `schema:"sc,omitempty"`
	Identifier     string   `schema:"identifier,omitempty"`
	Navsource      string   `schema:"navsource"`
	UniqueId       string   `schema:"unique_id"`
	Shipping       []string `schema:"shipping,omitempty"`
	PreOrder       bool     `schema:"preorder,omitempty"`
}

func NewGrabSearchProductVar added in v1.1.24

func NewGrabSearchProductVar(grabTokopedia *legacy.GrabTokopedia) *SearchProductVar

func NewSearchProductVar added in v1.1.10

func NewSearchProductVar() *SearchProductVar

func (*SearchProductVar) GetQuery added in v1.1.24

func (v *SearchProductVar) GetQuery() string

type SearchProducts added in v1.1.27

type SearchProducts []*ProductSearch

func (SearchProducts) Chunks added in v1.1.31

func (products SearchProducts) Chunks(num int) [][]*ProductSearch

type SearchShop

type SearchShop struct {
	ID                 int           `json:"id"`
	Name               string        `json:"name"`
	Domain             string        `json:"domain"`
	OwnerID            int           `json:"ownerId"`
	City               string        `json:"city"`
	ShopStatus         int           `json:"shopStatus"`
	TagLine            string        `json:"tagLine"`
	Desc               string        `json:"desc"`
	ReputationScore    int           `json:"reputationScore"`
	TotalFave          string        `json:"totalFave"`
	IsPowerBadge       int           `json:"isPowerBadge"`
	IsPMPro            bool          `json:"isPMPro"`
	IsOfficial         bool          `json:"isOfficial"`
	URL                string        `json:"url"`
	ImageURL           string        `json:"imageURL"`
	ReputationImageURL string        `json:"reputationImageURL"`
	ShopLucky          string        `json:"shopLucky"`
	Products           []ShopProduct `json:"products"`
	GAKey              string        `json:"GAKey"`
	Favorited          bool          `json:"favorited"`
	Voucher            ShopVoucher   `json:"voucher"`
	Typename           string        `json:"__typename"`
}

type ShipmentInfo

type ShipmentInfo struct {
	IsAvailable int                   `json:"isAvailable"`
	Image       string                `json:"image"`
	Name        string                `json:"name"`
	Product     []ShipmentInfoProduct `json:"product"`
	Typename    string                `json:"__typename"`
}

type ShipmentInfoProduct

type ShipmentInfoProduct struct {
	IsAvailable int    `json:"isAvailable"`
	ProductName string `json:"productName"`
	UIHidden    bool   `json:"uiHidden"`
	Typename    string `json:"__typename"`
}

type ShippingLoc

type ShippingLoc struct {
	DistrictName string `json:"districtName"`
	CityName     string `json:"cityName"`
	Typename     string `json:"__typename"`
}

type Shop

type Shop struct {
	ShopID   string `json:"shopID"`
	Name     string `json:"name"`
	URL      string `json:"url"`
	Image    string `json:"image"`
	Typename string `json:"__typename"`
}

type ShopAssets

type ShopAssets struct {
	Avatar   string `json:"avatar"`
	Cover    string `json:"cover,omitempty"`
	Typename string `json:"__typename"`
}

type ShopBadge

type ShopBadge struct {
	Title    string `json:"title"`
	ImageURL string `json:"imageURL"`
	Show     bool   `json:"show"`
	Typename string `json:"__typename"`
}

type ShopCore

type ShopCore struct {
	Description string `json:"description"`
	Domain      string `json:"domain"`
	ShopID      int    `json:"shopID,string"`
	Name        string `json:"name"`
	TagLine     string `json:"tagLine"`
	DefaultSort int    `json:"defaultSort"`
	Typename    string `json:"__typename"`
}

type ShopCoreInfoResp

type ShopCoreInfoResp struct {
	Data struct {
		ShopInfoByID `json:"shopInfoByID"`
	} `json:"data"`
}

type ShopCoreInfoVar

type ShopCoreInfoVar struct {
	ID     int    `json:"id"`
	Domain string `json:"domain"`
}

type ShopFinishRate

type ShopFinishRate struct {
	FinishRate string `json:"finishRate"`
	Typename   string `json:"__typename"`
}

type ShopIdStrVar

type ShopIdStrVar struct {
	ShopID string `json:"shopID"`
}

type ShopIdVar

type ShopIdVar struct {
	ShopID string `json:"shopID"`
}

type ShopIdVarInt

type ShopIdVarInt struct {
	ShopID int64 `json:"shopID"`
}

type ShopInfo

type ShopInfo struct {
	ShopTier      int                  `json:"shopTier"`
	BadgeURL      string               `json:"badgeURL"`
	ClosedInfo    ClosedInfo           `json:"closedInfo"`
	IsOpen        int                  `json:"isOpen"`
	FavoriteData  ShopInfoFavoriteData `json:"favoriteData"`
	ActiveProduct string               `json:"activeProduct"`
	CreateInfo    CreateInfo           `json:"createInfo"`
	ShopAssets    ShopAssets           `json:"shopAssets"`
	ShopCore      struct {
		Domain    string `json:"domain"`
		ShopID    string `json:"shopID"`
		Name      string `json:"name"`
		ShopScore int    `json:"shopScore"`
		URL       string `json:"url"`
		OwnerID   string `json:"ownerID"`
		Typename  string `json:"__typename"`
	} `json:"shopCore"`
	ShopLastActive string        `json:"shopLastActive"`
	Location       string        `json:"location"`
	StatusInfo     StatusInfo    `json:"statusInfo"`
	IsAllowManage  int           `json:"isAllowManage"`
	IsOwner        int           `json:"isOwner"`
	OwnerInfo      OwnerInfo     `json:"ownerInfo"`
	IsCOD          bool          `json:"isCOD"`
	ShopType       int           `json:"shopType"`
	TickerData     []interface{} `json:"tickerData"`
	PartnerLabel   string        `json:"partnerLabel"`
	Typename       string        `json:"__typename"`
}

type ShopInfoByID

type ShopInfoByID struct {
	Result   []ShopInfoByIDResult `json:"result"`
	Error    Error                `json:"error"`
	Typename string               `json:"__typename"`
}

type ShopInfoByIDResult

type ShopInfoByIDResult struct {
	ShopCore         ShopCore       `json:"shopCore"`
	CreateInfo       CreateInfo     `json:"createInfo"`
	FavoriteData     FavoriteData   `json:"favoriteData"`
	ActiveProduct    int            `json:"activeProduct"`
	ShopAssets       ShopAssets     `json:"shopAssets"`
	Location         string         `json:"location"`
	IsAllowManage    int            `json:"isAllowManage"`
	BranchLinkDomain string         `json:"branchLinkDomain"`
	IsOpen           int            `json:"isOpen"`
	ShipmentInfo     []ShipmentInfo `json:"shipmentInfo"`
	ShippingLoc      ShippingLoc    `json:"shippingLoc"`
	ShopStats        ShopStats      `json:"shopStats"`
	StatusInfo       StatusInfo     `json:"statusInfo"`
	ClosedInfo       ClosedInfo     `json:"closedInfo"`
	BbInfo           []interface{}  `json:"bbInfo"`
	GoldOS           GoldOS         `json:"goldOS"`
	ShopSnippetURL   string         `json:"shopSnippetURL"`
	CustomSEO        CustomSEO      `json:"customSEO"`
	IsQA             bool           `json:"isQA"`
	IsGoApotik       bool           `json:"isGoApotik"`
	PartnerInfo      []PartnerInfo  `json:"partnerInfo"`
	EpharmacyInfo    EpharmacyInfo  `json:"epharmacyInfo"`
	Typename         string         `json:"__typename"`
}

type ShopInfoFavoriteData

type ShopInfoFavoriteData struct {
	TotalFavorite    string `json:"totalFavorite"`
	AlreadyFavorited int    `json:"alreadyFavorited"`
	Typename         string `json:"__typename"`
}

type ShopNoteResp

type ShopNoteResp struct {
	Data struct {
		ShopNotesByShopID ShopNotesByShopID `json:"shopNotesByShopID"`
	} `json:"data"`
}

type ShopNoteResults

type ShopNoteResults struct {
	Title      string `json:"title"`
	Content    string `json:"content"`
	Link       string `json:"link"`
	UpdateTime string `json:"updateTime"`
	Typename   string `json:"__typename"`
}

type ShopNoteVar

type ShopNoteVar struct {
	ID  string `json:"id"`
	Sid string `json:"sid"`
}

type ShopNotesByShopID

type ShopNotesByShopID struct {
	Result   []ShopNoteResults `json:"result"`
	Error    Error             `json:"error"`
	Typename string            `json:"__typename"`
}

type ShopPageGetLayout

type ShopPageGetLayout struct {
	Widgets  []Widget `json:"widgets"`
	Typename string   `json:"__typename"`
}

type ShopPageGetLayoutV2Resp

type ShopPageGetLayoutV2Resp []struct {
	Data struct {
		ShopPageGetLayout ShopPageGetLayout `json:"shopPageGetLayout"`
	} `json:"data"`
}

type ShopPageGetLayoutV2Var

type ShopPageGetLayoutV2Var struct {
	ShopID        string          `json:"shopID"`
	DistrictID    string          `json:"districtID"`
	CityID        string          `json:"cityID"`
	Latitude      string          `json:"latitude"`
	Longitude     string          `json:"longitude"`
	WidgetRequest []WidgetRequest `json:"widgetRequest"`
}

type ShopProduct

type ShopProduct struct {
	ID         int    `json:"id"`
	Name       string `json:"name"`
	URL        string `json:"url"`
	Price      int    `json:"price"`
	ProductImg string `json:"productImg"`
	PriceText  string `json:"priceText"`
	Typename   string `json:"__typename"`
}

type ShopProductData

type ShopProductData struct {
	Name         string        `json:"name"`
	ProductURL   string        `json:"product_url"`
	ProductID    string        `json:"product_id"`
	Price        Price         `json:"price"`
	PrimaryImage PrimaryImage  `json:"primary_image"`
	Flags        Flags         `json:"flags"`
	Campaign     Campaign      `json:"campaign"`
	Label        []Label       `json:"label"`
	LabelGroups  []LabelGroups `json:"label_groups"`
	Badge        []Badge       `json:"badge"`
	Stats        Stats         `json:"stats"`
	Category     Category      `json:"category"`
	Typename     string        `json:"__typename"`
}

type ShopProductResp

type ShopProductResp struct {
	Data struct {
		GetShopProduct GetShopProduct `json:"GetShopProduct"`
	} `json:"data"`
}

type ShopProductVar

type ShopProductVar struct {
	Sid            string `json:"sid"`
	Page           int    `json:"page"`
	PerPage        int    `json:"perPage"`
	EtalaseID      string `json:"etalaseId"`
	Sort           int    `json:"sort"`
	UserDistrictID string `json:"user_districtId"`
	UserCityID     string `json:"user_cityId"`
	UserLat        string `json:"user_lat"`
	UserLong       string `json:"user_long"`
}

func NewShopProductVar added in v1.1.10

func NewShopProductVar(shopId string) *ShopProductVar

type ShopRating

type ShopRating struct {
	Detail      []RatingDetail `json:"detail"`
	TotalRating int            `json:"totalRating"`
	RatingScore string         `json:"ratingScore"`
	Typename    string         `json:"__typename"`
}

type ShopReputation

type ShopReputation struct {
	Badge    string `json:"badge"`
	Score    string `json:"score"`
	ScoreMap string `json:"score_map"`
	Typename string `json:"__typename"`
}

type ShopSatisfaction

type ShopSatisfaction struct {
	RecentOneMonth RecentOneMonth `json:"recentOneMonth"`
	Typename       string         `json:"__typename"`
}

type ShopSpeedQueryResp

type ShopSpeedQueryResp struct {
	Data struct {
		ShopSpeed struct {
			MessageResponseTime int    `json:"messageResponseTime"`
			Typename            string `json:"__typename"`
		} `json:"shopSpeed"`
	} `json:"data"`
}

type ShopStatisticQueryData

type ShopStatisticQueryData struct {
	ShopSatisfaction ShopSatisfaction `json:"shopSatisfaction"`
	ShopRating       ShopRating       `json:"shopRating"`
	ShopReputation   []ShopReputation `json:"shopReputation"`
}

type ShopStatisticQueryResp

type ShopStatisticQueryResp struct {
	Data ShopStatisticQueryData `json:"data"`
}

type ShopStatisticQueryVar

type ShopStatisticQueryVar struct {
	ShopID    int    `json:"shopID"`
	ShopIDStr string `json:"shopIDStr"`
}

type ShopStats

type ShopStats struct {
	ProductSold    string `json:"productSold"`
	TotalTxSuccess string `json:"totalTxSuccess"`
	TotalShowcase  string `json:"totalShowcase"`
	Typename       string `json:"__typename"`
}

type ShopSuggestion

type ShopSuggestion struct {
	CurrentKeyword      string `json:"currentKeyword"`
	SuggestionText      string `json:"suggestionText"`
	SuggestionTextQuery string `json:"suggestionTextQuery"`
	Typename            string `json:"__typename"`
}

type ShopVoucher

type ShopVoucher struct {
	FreeShipping bool            `json:"freeShipping"`
	Cashback     VoucherCashback `json:"cashback"`
	Typename     string          `json:"__typename"`
}

type ShopVoucherQueryResp

type ShopVoucherQueryResp struct {
	Data struct {
		GetPublicMerchantVoucherList GetPublicMerchantVoucherList `json:"getPublicMerchantVoucherList"`
	} `json:"data"`
}

type SortProduct

type SortProduct struct {
	Name        string `json:"name"`
	Key         string `json:"key"`
	Value       string `json:"value"`
	InputType   string `json:"inputType"`
	ApplyFilter string `json:"applyFilter"`
	Typename    string `json:"__typename"`
}

type State

type State struct {
	IsMasked    bool   `json:"isMasked"`
	IsLiked     bool   `json:"isLiked,omitempty"`
	AllowLike   bool   `json:"allowLike,omitempty"`
	IsYours     bool   `json:"isYours"`
	AllowReport bool   `json:"allowReport"`
	AllowDelete bool   `json:"allowDelete"`
	AllowReply  bool   `json:"allowReply,omitempty"`
	IsFollowed  bool   `json:"isFollowed,omitempty"`
	AllowFollow bool   `json:"allowFollow,omitempty"`
	Typename    string `json:"__typename"`
}

type Stats

type Stats struct {
	CountView     int    `json:"countView,omitempty"`
	CountReview   int    `json:"countReview,omitempty"`
	CountTalk     int    `json:"countTalk,omitempty"`
	ReviewCount   int    `json:"reviewCount,omitempty"`
	Rating        int    `json:"rating,omitempty"`
	AverageRating string `json:"averageRating,omitempty"`
	Typename      string `json:"__typename"`
}

type Status

type Status struct {
	Identifier string `json:"identifier"`
	Status     int    `json:"status"`
	Typename   string `json:"__typename"`
}

type StatusInfo

type StatusInfo struct {
	ShopStatus    int    `json:"shopStatus"`
	StatusMessage string `json:"statusMessage"`
	StatusTitle   string `json:"statusTitle,omitempty"`
	TickerType    string `json:"tickerType,omitempty"`
	IsIdle        bool   `json:"isIdle,omitempty"`
	Typename      string `json:"__typename"`
}

type StockWording

type StockWording struct {
	Title    string `json:"title"`
	Typename string `json:"__typename"`
}

type Suggestion

type Suggestion struct {
	CurrentKeyword  string `json:"currentKeyword"`
	Suggestion      string `json:"suggestion"`
	SuggestionCount int    `json:"suggestionCount"`
	Instead         string `json:"instead"`
	InsteadCount    int    `json:"insteadCount"`
	Query           string `json:"query"`
	Text            string `json:"text"`
	ComponentID     string `json:"componentId"`
	TrackingOption  int    `json:"trackingOption"`
	Typename        string `json:"__typename"`
}

type ThematicCampaign

type ThematicCampaign struct {
	AdditionalInfo string `json:"additionalInfo"`
	Background     string `json:"background"`
	CampaignName   string `json:"campaignName"`
	Icon           string `json:"icon"`
	Typename       string `json:"__typename"`
}

type Ticker

type Ticker struct {
	Text           string `json:"text"`
	Query          string `json:"query"`
	TypeID         int    `json:"typeId"`
	ComponentID    string `json:"componentId"`
	TrackingOption int    `json:"trackingOption"`
	Typename       string `json:"__typename"`
}

type Tokonow

type Tokonow struct {
	ShopID      string `json:"shopID"`
	WhID        string `json:"whID"`
	ServiceType string `json:"serviceType"`
}

type TopadsProductQueryResp

type TopadsProductQueryResp struct {
	Data struct {
		DisplayAdsV3 struct {
			Data []struct {
				ClickTrackURL      string `json:"clickTrackUrl"`
				ProductWishlistURL string `json:"product_wishlist_url"`
				Product            struct {
					ID                 string        `json:"id"`
					Name               string        `json:"name"`
					Wishlist           bool          `json:"wishlist"`
					Image              Image         `json:"image"`
					URL                string        `json:"url"`
					RelativeURI        string        `json:"relative_uri"`
					Price              string        `json:"price"`
					WholeSalePrice     []interface{} `json:"wholeSalePrice"`
					CountTalkFormat    string        `json:"count_talk_format"`
					CountReviewFormat  string        `json:"countReviewFormat"`
					Category           Category      `json:"category"`
					CategoryBreadcrumb string        `json:"categoryBreadcrumb"`
					Preorder           bool          `json:"preorder"`
					ProductWholesale   bool          `json:"product_wholesale"`
					FreeReturn         string        `json:"free_return"`
					IsNewProduct       bool          `json:"isNewProduct"`
					Cashback           string        `json:"cashback"`
					Rating             int           `json:"rating"`
					RatingAverage      string        `json:"ratingAverage"`
					TopLabel           []interface{} `json:"top_label"`
					BottomLabel        []interface{} `json:"bottomLabel"`
					LabelGroups        []LabelGroups `json:"labelGroups"`
					Campaign           struct {
						DiscountPercentage int    `json:"discountPercentage"`
						OriginalPrice      string `json:"originalPrice"`
						Typename           string `json:"__typename"`
					} `json:"campaign"`
					CustomvideoURL string `json:"customvideo_url"`
					Typename       string `json:"__typename"`
				} `json:"product"`
				Shop     ProductShop `json:"shop"`
				Tag      int         `json:"tag"`
				Typename string      `json:"__typename"`
			} `json:"data"`
			Header struct {
				Meta     Meta   `json:"meta"`
				Typename string `json:"__typename"`
			} `json:"header"`
			Typename string `json:"__typename"`
		} `json:"displayAdsV3"`
	} `json:"data"`
}

type Topic

type Topic struct {
	Rating         float64 `json:"rating"`
	RatingFmt      string  `json:"ratingFmt"`
	Formatted      string  `json:"formatted"`
	Key            string  `json:"key"`
	ReviewCount    int     `json:"reviewCount"`
	ReviewCountFmt string  `json:"reviewCountFmt"`
	Show           bool    `json:"show"`
	Typename       string  `json:"__typename"`
}

type User

type User struct {
	UserID   string `json:"userID"`
	FullName string `json:"fullName"`
	Image    string `json:"image"`
	URL      string `json:"url"`
	Typename string `json:"__typename"`
}

type UserLocation

type UserLocation struct {
	CityID     string `json:"cityID"`
	AddressID  string `json:"addressID"`
	DistrictID string `json:"districtID"`
	PostalCode string `json:"postalCode"`
	Latlon     string `json:"latlon"`
}

type Variant

type Variant struct {
	ProductVariantID string          `json:"productVariantID"`
	VariantID        string          `json:"variantID"`
	Name             string          `json:"name"`
	Identifier       string          `json:"identifier"`
	Option           []VariantOption `json:"option"`
	Typename         string          `json:"__typename"`
}

type VariantCategoryCombinationResp

type VariantCategoryCombinationResp struct {
	Data struct {
		GetVariantCategoryCombination GetVariantCategoryCombination `json:"getVariantCategoryCombination"`
	} `json:"data"`
}

type VariantCategoryCombinationVar

type VariantCategoryCombinationVar struct {
	AllVariants     string `json:"allVariants"`
	CategoryID      int    `json:"categoryID"`
	ProductVariants string `json:"productVariants"`
	Type            string `json:"type"`
}

type VariantDetail

type VariantDetail struct {
	VariantID  int                 `json:"VariantID"`
	HasUnit    int                 `json:"HasUnit"`
	Identifier string              `json:"Identifier"`
	Name       string              `json:"Name"`
	Status     int                 `json:"Status"`
	Units      []VariantDetailUnit `json:"Units"`
	Typename   string              `json:"__typename"`
}

type VariantDetailUnit

type VariantDetailUnit struct {
	VariantUnitID int                `json:"VariantUnitID"`
	Status        int                `json:"Status"`
	UnitName      string             `json:"UnitName"`
	UnitShortName string             `json:"UnitShortName"`
	UnitValues    []VariantUnitValue `json:"UnitValues"`
	Typename      string             `json:"__typename"`
}

type VariantOption

type VariantOption struct {
	Picture                Picture `json:"picture"`
	ProductVariantOptionID string  `json:"productVariantOptionID"`
	VariantUnitValueID     string  `json:"variantUnitValueID"`
	Value                  string  `json:"value"`
	Hex                    string  `json:"hex"`
	Stock                  string  `json:"stock"`
	Typename               string  `json:"__typename"`
}

type VariantStock

type VariantStock struct {
	Stock            string `json:"stock"`
	IsBuyable        bool   `json:"isBuyable"`
	StockWordingHTML string `json:"stockWordingHTML"`
	MinimumOrder     string `json:"minimumOrder"`
	MaximumOrder     string `json:"maximumOrder"`
	Typename         string `json:"__typename"`
}

type VariantUnitValue

type VariantUnitValue struct {
	VariantUnitValueID int    `json:"VariantUnitValueID"`
	Status             int    `json:"Status"`
	Value              string `json:"Value"`
	EquivalentValueID  int    `json:"EquivalentValueID"`
	EnglishValue       string `json:"EnglishValue"`
	Hex                string `json:"Hex"`
	Typename           string `json:"__typename"`
}

type Violation

type Violation struct {
	HeaderText      string `json:"headerText"`
	DescriptionText string `json:"descriptionText"`
	ImageURL        string `json:"imageURL"`
	CtaURL          string `json:"ctaURL"`
	CtaApplink      string `json:"ctaApplink"`
	ButtonText      string `json:"buttonText"`
	ButtonType      string `json:"buttonType"`
	Typename        string `json:"__typename"`
}

type VoucherCashback

type VoucherCashback struct {
	CashbackValue int    `json:"cashbackValue"`
	IsPercentage  bool   `json:"isPercentage"`
	Typename      string `json:"__typename"`
}

type VoucherType

type VoucherType struct {
	Identifier  string `json:"identifier"`
	VoucherType int    `json:"voucherType"`
	Typename    string `json:"__typename"`
}

type Vouchers

type Vouchers struct {
	Amount                Amount      `json:"amount"`
	InUseExpiry           string      `json:"inUseExpiry"`
	MinimumSpend          int         `json:"minimumSpend"`
	MinimumSpendFormatted string      `json:"minimumSpendFormatted"`
	Owner                 Owner       `json:"owner"`
	Status                Status      `json:"status"`
	ValidThru             string      `json:"validThru"`
	VoucherID             int         `json:"voucherID"`
	Name                  string      `json:"name"`
	VoucherCode           string      `json:"voucherCode"`
	VoucherType           VoucherType `json:"voucherType"`
	Banner                Banner      `json:"banner"`
	Tnc                   string      `json:"tnc"`
	Typename              string      `json:"__typename"`
}

type WarehouseInfo

type WarehouseInfo struct {
	WarehouseID   string `json:"warehouse_id"`
	IsFulfillment bool   `json:"is_fulfillment"`
	DistrictID    string `json:"district_id"`
	PostalCode    string `json:"postal_code"`
	Geolocation   string `json:"geolocation"`
	Typename      string `json:"__typename"`
}

type Widget

type Widget struct {
	WidgetID       int          `json:"widgetID"`
	WidgetMasterID int          `json:"widgetMasterID"`
	LayoutOrder    int          `json:"layoutOrder"`
	Name           string       `json:"name"`
	Type           string       `json:"type"`
	Header         WidgetHeader `json:"header"`
	Data           []WidgetData `json:"data"`
	Typename       string       `json:"__typename"`
}

type WidgetData

type WidgetData struct {
	CampaignID              string                  `json:"campaignID"`
	Name                    string                  `json:"name"`
	Description             string                  `json:"description"`
	StartDate               string                  `json:"startDate"`
	EndDate                 string                  `json:"endDate"`
	StatusCampaign          string                  `json:"statusCampaign"`
	TimeDescription         string                  `json:"timeDescription"`
	TimeCounter             string                  `json:"timeCounter"`
	TotalNotify             int                     `json:"totalNotify"`
	TotalNotifyWording      string                  `json:"totalNotifyWording"`
	TotalProduct            int                     `json:"totalProduct"`
	TotalProductWording     string                  `json:"totalProductWording"`
	BackgroundGradientColor BackgroundGradientColor `json:"backgroundGradientColor"`
	DynamicRule             DynamicRule             `json:"dynamicRule"`
	Banners                 []Banners               `json:"banners"`
	Products                []Products              `json:"products"`
	Typename                string                  `json:"__typename"`
}

type WidgetHeader

type WidgetHeader struct {
	Ratio             string `json:"ratio"`
	SizeOption        string `json:"sizeOption,omitempty"`
	Title             string `json:"title"`
	Subtitle          string `json:"subtitle,omitempty"`
	CtaText           string `json:"ctaText,omitempty"`
	CtaLink           string `json:"ctaLink,omitempty"`
	Cover             string `json:"cover,omitempty"`
	IsATC             int    `json:"isATC,omitempty"`
	IsActive          int    `json:"isActive,omitempty"`
	EtalaseID         string `json:"etalaseID,omitempty"`
	IsShowEtalaseName int    `json:"isShowEtalaseName,omitempty"`
	Typename          string `json:"__typename"`
}

type WidgetRequest

type WidgetRequest struct {
	WidgetID       int          `json:"widgetID"`
	WidgetMasterID int          `json:"widgetMasterID"`
	WidgetType     string       `json:"widgetType"`
	WidgetName     string       `json:"widgetName"`
	Header         WidgetHeader `json:"header"`
	Typename       string       `json:"__typename"`
}

Jump to

Keyboard shortcuts

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