types

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrPleaseReloadPage = &ErrorResponse{ErrorCode: 1357004}

Functions

This section is empty.

Types

type AjaxQueryParams

type AjaxQueryParams struct {
	A        string `json:"__a"`
	User     string `json:"__user"`
	CometReq string `json:"__comet_req"`
	Jazoest  string `json:"jazoest"`
}

type BootLoaderConfig

type BootLoaderConfig struct {
	BtCutoffIndex              int   `json:"btCutoffIndex,omitempty"`
	DeferBootloads             bool  `json:"deferBootloads,omitempty"`
	EarlyRequireLazy           bool  `json:"earlyRequireLazy,omitempty"`
	FastPathForAlreadyRequired bool  `json:"fastPathForAlreadyRequired,omitempty"`
	HypStep4                   bool  `json:"hypStep4,omitempty"`
	JsRetries                  []int `json:"jsRetries,omitempty"`
	JsRetryAbortNum            int   `json:"jsRetryAbortNum,omitempty"`
	JsRetryAbortTime           int   `json:"jsRetryAbortTime,omitempty"`
	PhdOn                      bool  `json:"phdOn,omitempty"`
	SilentDups                 bool  `json:"silentDups,omitempty"`
	Timeout                    int   `json:"timeout,omitempty"`
	TranslationRetries         []int `json:"translationRetries,omitempty"`
	TranslationRetryAbortNum   int   `json:"translationRetryAbortNum,omitempty"`
	TranslationRetryAbortTime  int   `json:"translationRetryAbortTime,omitempty"`
}

type Bootloader_HandlePayload

type Bootloader_HandlePayload struct {
	Consistency Consistency            `json:"consistency,omitempty"`
	RsrcMap     map[string]RsrcDetails `json:"rsrcMap,omitempty"`
	CsrUpgrade  string                 `json:"csrUpgrade,omitempty"`
}

type Consistency

type Consistency struct {
	Rev int64 `json:"rev,omitempty"`
}

type ContentType

type ContentType string
const (
	NONE ContentType = ""
	JSON ContentType = "application/json"
	FORM ContentType = "application/x-www-form-urlencoded"
)

type CryptoAuthToken

type CryptoAuthToken struct {
	EncryptedSerializedCat  string `json:"encrypted_serialized_cat,omitempty"`
	ExpirationTimeInSeconds int64  `json:"expiration_time_in_seconds,omitempty"`
}

type CurrentBusinessAccount

type CurrentBusinessAccount struct {
	BusinessAccountName                              any    `json:"businessAccountName,omitempty"`
	BusinessID                                       any    `json:"business_id,omitempty"`
	BusinessPersonaID                                any    `json:"business_persona_id,omitempty"`
	BusinessProfilePicURL                            any    `json:"business_profile_pic_url,omitempty"`
	BusinessRole                                     any    `json:"business_role,omitempty"`
	BusinessUserID                                   any    `json:"business_user_id,omitempty"`
	Email                                            any    `json:"email,omitempty"`
	EnterpriseProfilePicURL                          any    `json:"enterprise_profile_pic_url,omitempty"`
	ExpiryTime                                       any    `json:"expiry_time,omitempty"`
	FirstName                                        any    `json:"first_name,omitempty"`
	HasVerifiedEmail                                 any    `json:"has_verified_email,omitempty"`
	IPPermission                                     any    `json:"ip_permission,omitempty"`
	IsBusinessPerson                                 bool   `json:"isBusinessPerson,omitempty"`
	IsEnterpriseBusiness                             bool   `json:"isEnterpriseBusiness,omitempty"`
	IsFacebookWorkAccount                            bool   `json:"isFacebookWorkAccount,omitempty"`
	IsInstagramBusinessPerson                        bool   `json:"isInstagramBusinessPerson,omitempty"`
	IsTwoFacNewFlow                                  bool   `json:"isTwoFacNewFlow,omitempty"`
	IsUserOptInAccountSwitchInfraUpgrade             bool   `json:"isUserOptInAccountSwitchInfraUpgrade,omitempty"`
	IsAdsFeatureLimited                              any    `json:"is_ads_feature_limited,omitempty"`
	IsBusinessBanhammered                            any    `json:"is_business_banhammered,omitempty"`
	LastName                                         any    `json:"last_name,omitempty"`
	PermittedBusinessAccountTaskIds                  []any  `json:"permitted_business_account_task_ids,omitempty"`
	PersonalUserID                                   string `json:"personal_user_id,omitempty"`
	ShouldHideComponentsByUnsupportedFirstPartyTools bool   `json:"shouldHideComponentsByUnsupportedFirstPartyTools,omitempty"`
	ShouldShowAccountSwitchComponents                bool   `json:"shouldShowAccountSwitchComponents,omitempty"`
}

type CurrentUserInitialData

type CurrentUserInitialData struct {
	AccountID                       string `json:"ACCOUNT_ID,omitempty"`
	AppID                           string `json:"APP_ID,omitempty"`
	HasSecondaryBusinessPerson      bool   `json:"HAS_SECONDARY_BUSINESS_PERSON,omitempty"`
	IsBusinessDomain                bool   `json:"IS_BUSINESS_DOMAIN,omitempty"`
	IsBusinessPersonAccount         bool   `json:"IS_BUSINESS_PERSON_ACCOUNT,omitempty"`
	IsDeactivatedAllowedOnMessenger bool   `json:"IS_DEACTIVATED_ALLOWED_ON_MESSENGER,omitempty"`
	IsFacebookWorkAccount           bool   `json:"IS_FACEBOOK_WORK_ACCOUNT,omitempty"`
	IsMessengerCallGuestUser        bool   `json:"IS_MESSENGER_CALL_GUEST_USER,omitempty"`
	IsMessengerOnlyUser             bool   `json:"IS_MESSENGER_ONLY_USER,omitempty"`
	IsWorkroomsUser                 bool   `json:"IS_WORKROOMS_USER,omitempty"`
	IsWorkMessengerCallGuestUser    bool   `json:"IS_WORK_MESSENGER_CALL_GUEST_USER,omitempty"`
	Name                            string `json:"NAME,omitempty"`
	ShortName                       string `json:"SHORT_NAME,omitempty"`
	UserID                          string `json:"USER_ID,omitempty"`

	NonFacebookUserID         string `json:"NON_FACEBOOK_USER_ID,omitempty"`
	IGUserEIMU                string `json:"IG_USER_EIMU,omitempty"`
	IsInstagramUser           int    `json:"IS_INSTAGRAM_USER,omitempty"`
	IsInstagramBusinessPerson bool   `json:"IS_INSTAGRAM_BUSINESS_PERSON,omitempty"`
}

func (*CurrentUserInitialData) GetAvatarURL

func (c *CurrentUserInitialData) GetAvatarURL() string

func (*CurrentUserInitialData) GetAvatarURLHD

func (c *CurrentUserInitialData) GetAvatarURLHD() string

func (*CurrentUserInitialData) GetBiography

func (c *CurrentUserInitialData) GetBiography() string

func (*CurrentUserInitialData) GetBusinessEmail

func (c *CurrentUserInitialData) GetBusinessEmail() string

func (*CurrentUserInitialData) GetExternalUrl

func (c *CurrentUserInitialData) GetExternalUrl() string

func (*CurrentUserInitialData) GetFBID

func (c *CurrentUserInitialData) GetFBID() int64

func (*CurrentUserInitialData) GetName

func (c *CurrentUserInitialData) GetName() string

func (*CurrentUserInitialData) GetUserId

func (c *CurrentUserInitialData) GetUserId() string

func (*CurrentUserInitialData) GetUsername

func (c *CurrentUserInitialData) GetUsername() string

func (*CurrentUserInitialData) HasPhoneNumber

func (c *CurrentUserInitialData) HasPhoneNumber() bool

func (*CurrentUserInitialData) IsPrivate

func (c *CurrentUserInitialData) IsPrivate() bool

type DTSGInitData

type DTSGInitData struct {
	AsyncGetToken string `json:"async_get_token,omitempty"`
	Token         string `json:"token,omitempty"`
}

type DTSGInitialData

type DTSGInitialData struct {
	Token string `json:"token,omitempty"`
}

type EnvJSON

type EnvJSON struct {
	UseTrustedTypes          bool   `json:"useTrustedTypes,omitempty"`
	IsTrustedTypesReportOnly bool   `json:"isTrustedTypesReportOnly,omitempty"`
	RoutingNamespace         string `json:"routing_namespace,omitempty"`
	Ghlss                    string `json:"ghlss,omitempty"`
	ScheduledCSSJSScheduler  bool   `json:"scheduledCSSJSScheduler,omitempty"`
	UseFbtVirtualModules     bool   `json:"use_fbt_virtual_modules,omitempty"`
	CompatIframeToken        string `json:"compat_iframe_token,omitempty"`
}

type Eqmc

type Eqmc struct {
	AjaxURL        string `json:"u,omitempty"`
	HasteSessionId string `json:"e,omitempty"`
	S              string `json:"s,omitempty"`
	W              int    `json:"w,omitempty"`
	FbDtsg         string `json:"f,omitempty"`
	L              any    `json:"l,omitempty"`
}

func (*Eqmc) ParseAjaxURLData

func (e *Eqmc) ParseAjaxURLData() (*AjaxQueryParams, error)

type ErrorResponse

type ErrorResponse struct {
	ErrorCode        int    `json:"error,omitempty"`
	ErrorSummary     string `json:"errorSummary,omitempty"`
	ErrorDescription string `json:"errorDescription,omitempty"`
	RedirectTo       string `json:"redirectTo,omitempty"`
}

func (*ErrorResponse) Error

func (er *ErrorResponse) Error() string

func (*ErrorResponse) Is

func (er *ErrorResponse) Is(other error) bool

type FileMetadata

type FileMetadata struct {
	FileID       StringOrInt `json:"file_id,omitempty"`
	AudioID      StringOrInt `json:"audio_id,omitempty"`
	VideoID      StringOrInt `json:"video_id,omitempty"`
	ImageID      StringOrInt `json:"image_id,omitempty"`
	GifID        StringOrInt `json:"gif_id,omitempty"`
	Filename     string      `json:"filename,omitempty"`
	Filetype     string      `json:"filetype,omitempty"`
	Src          string      `json:"src,omitempty"`
	ThumbnailSrc string      `json:"thumbnail_src,omitempty"`
}

func (*FileMetadata) GetFbId

func (vid *FileMetadata) GetFbId() int64

type Hblp

type Hblp struct {
	Consistency Consistency `json:"consistency,omitempty"`
}

type Hsrp

type Hsrp struct {
	Hblp Hblp `json:"hblp,omitempty"`
}

type InitialCookieConsent

type InitialCookieConsent struct {
	DeferCookies           bool  `json:"deferCookies,omitempty"`
	InitialConsent         []int `json:"initialConsent,omitempty"`
	NoCookies              bool  `json:"noCookies,omitempty"`
	ShouldShowCookieBanner bool  `json:"shouldShowCookieBanner,omitempty"`
}

type InstagramCookiesVariables

type InstagramCookiesVariables struct {
	FirstPartyTrackingOptIn bool   `json:"first_party_tracking_opt_in,omitempty"`
	IgDid                   string `json:"ig_did,omitempty"`
	ThirdPartyTrackingOptIn bool   `json:"third_party_tracking_opt_in,omitempty"`
	Input                   struct {
		ClientMutationID int `json:"client_mutation_id,omitempty"`
	} `json:"input,omitempty"`
}

type InstagramLoginPayload

type InstagramLoginPayload struct {
	Password             string `url:"enc_password"`
	OptIntoOneTap        bool   `url:"optIntoOneTap"`
	QueryParams          string `url:"queryParams"`
	TrustedDeviceRecords string `url:"trustedDeviceRecords"`
	Username             string `url:"username"`
}

type InstagramLoginResponse

type InstagramLoginResponse struct {
	Authenticated  bool   `json:"authenticated,omitempty"`
	Status         string `json:"status,omitempty"`
	User           bool   `json:"user,omitempty"`
	Message        string `json:"message,omitempty"`
	UserID         string `json:"userId,omitempty"`
	OneTapPrompt   bool   `json:"oneTapPrompt,omitempty"`
	Reactivated    bool   `json:"reactivated,omitempty"`
	CheckpointUrl  string `json:"checkpoint_url,omitempty"`
	FlowRenderType int    `json:"flow_render_type,omitempty"`
	Lock           bool   `json:"lock,omitempty"`
}

type InstagramPasswordEncryption

type InstagramPasswordEncryption struct {
	KeyID     string `json:"key_id,omitempty"`
	PublicKey string `json:"public_key,omitempty"`
	Version   string `json:"version,omitempty"`
}

type IntlCurrentLocale

type IntlCurrentLocale struct {
	Code string `json:"code,omitempty"`
}

type IntlViewerContext

type IntlViewerContext struct {
	Gender         int `json:"GENDER,omitempty"`
	RegionalLocale any `json:"regionalLocale,omitempty"`
}

type LSD

type LSD struct {
	Token string `json:"token,omitempty"`
}

type LSPlatformMessengerSyncParams

type LSPlatformMessengerSyncParams struct {
	Mailbox string `json:"mailbox,omitempty"`
	Contact string `json:"contact,omitempty"`
	E2Ee    string `json:"e2ee,omitempty"`
}

type LgnDim

type LgnDim struct {
	W  int `json:"w,omitempty"`
	H  int `json:"h,omitempty"`
	Aw int `json:"aw,omitempty"`
	Ah int `json:"ah,omitempty"`
	C  int `json:"c,omitempty"`
}

type LoginForm

type LoginForm struct {
	Jazoest              string `url:"jazoest" name:"jazoest"`
	Lsd                  string `url:"lsd" name:"lsd"`
	Display              string `url:"display" name:"display"`
	IsPrivate            string `url:"isprivate" name:"isprivate"`
	ReturnSession        string `url:"return_session" name:"return_session"`
	SkipAPILogin         string `url:"skip_api_login" name:"skip_api_login"`
	SignedNext           string `url:"signed_next" name:"signed_next"`
	TryNum               string `url:"trynum" name:"trynum"`
	Timezone             string `url:"timezone"`
	Lgndim               string `url:"lgndim"`
	Lgnrnd               string `url:"lgnrnd" name:"lgnrnd"`
	Lgnjs                string `url:"lgnjs"`
	Email                string `url:"email"`
	PrefillContactPoint  string `url:"prefill_contact_point" name:"prefill_contact_point"`
	PrefillSource        string `url:"prefill_source" name:"prefill_source"`
	PrefillType          string `url:"prefill_type" name:"prefill_type"`
	FirstPrefillSource   string `url:"first_prefill_source" name:"first_prefill_source"`
	FirstPrefillType     string `url:"first_prefill_type" name:"first_prefill_type"`
	HadCPPrefilled       string `url:"had_cp_prefilled" name:"had_cp_prefilled"`
	HadPasswordPrefilled string `url:"had_password_prefilled" name:"had_password_prefilled"`
	AbTestData           string `url:"ab_test_data"`
	EncPass              string `url:"encpass"`
}

type MQTTConfig

type MQTTConfig struct {
	ProtocolName       string
	ProtocolLevel      uint8
	ClientId           string
	Broker             string
	KeepAliveTimeout   uint16
	SessionId          int64
	AppId              int64
	ClientCapabilities int
	Capabilities       int
	ChatOn             bool
	SubscribedTopics   []any
	ConnectionType     string
	HostNameOverride   string
	Cid                string // device id
}

func (*MQTTConfig) BuildBrokerUrl

func (m *MQTTConfig) BuildBrokerUrl() string

type MQTTWebConfig

type MQTTWebConfig struct {
	Fbid               string `json:"fbid,omitempty"`
	AppID              int64  `json:"appID,omitempty"`
	Endpoint           string `json:"endpoint,omitempty"`
	PollingEndpoint    string `json:"pollingEndpoint,omitempty"`
	SubscribedTopics   []any  `json:"subscribedTopics,omitempty"`
	Capabilities       int    `json:"capabilities,omitempty"`
	ClientCapabilities int    `json:"clientCapabilities,omitempty"`
	ChatVisibility     bool   `json:"chatVisibility,omitempty"`
	HostNameOverride   string `json:"hostNameOverride,omitempty"`
}

type MediaPayloads

type MediaPayloads struct {
	UploadID     any             `json:"uploadID,omitempty"`
	Metadata     json.RawMessage `json:"metadata,omitempty"`
	RealMetadata *FileMetadata   `json:"-"`
}

Metadata returns a map (object) for a video like this:

"metadata": {
	"0": {
		"video_id": 0,
		"filename": "",
		"filetype": "",
		"thumbnail_src": ""
}

and for an image it returns a slice/array like this:

"metadata": [{
	"image_id": ,
	"filename": "",
	"filetype": "",
	"src": "",
	"fbid": 0
}]

So you will have to use type assertion to handle these cases seperately.

type MercuryUploadResponse

type MercuryUploadResponse struct {
	Raw json.RawMessage `json:"-"`

	ErrorResponse
	Ar      int           `json:"__ar,omitempty"`
	Payload MediaPayloads `json:"payload,omitempty"`
	Hsrp    Hsrp          `json:"hsrp,omitempty"`
	Lid     string        `json:"lid,omitempty"`
}

type MessengerWebInitData

type MessengerWebInitData struct {
	AccountKey string `json:"accountKey,omitempty"`
	//ActiveThreadKeys
	//AllActiveThreadKeys
	AppID           int64           `json:"appId,omitempty"`
	CryptoAuthToken CryptoAuthToken `json:"cryptoAuthToken,omitempty"`
	LogoutToken     string          `json:"logoutToken,omitempty"`
	SessionID       string          `json:"sessionId,omitempty"`
	UserID          json.Number     `json:"userId,omitempty"` // number on fb, string on ig?
	AccountKeyV2    string          `json:"accountKeyV2,omitempty"`
}

type MessengerWebRegion

type MessengerWebRegion struct {
	Region string `json:"regionNullable,omitempty"`
}

type MqttWebConfig

type MqttWebConfig struct {
	AppID              int64    `json:"appID,omitempty"`
	Capabilities       int      `json:"capabilities,omitempty"`
	ChatVisibility     bool     `json:"chatVisibility,omitempty"`
	ClientCapabilities int      `json:"clientCapabilities,omitempty"`
	Endpoint           string   `json:"endpoint,omitempty"`
	Fbid               string   `json:"fbid,omitempty"`
	HostNameOverride   string   `json:"hostNameOverride,omitempty"`
	PollingEndpoint    string   `json:"pollingEndpoint,omitempty"`
	SubscribedTopics   []string `json:"subscribedTopics,omitempty"`
}

type MqttWebDeviceID

type MqttWebDeviceID struct {
	ClientID string `json:"clientID,omitempty"`
}

type Platform

type Platform int
const (
	Unset Platform = iota
	Instagram
	Facebook
	Messenger
	FacebookTor
)

func PlatformFromString

func PlatformFromString(s string) Platform

func (Platform) IsMessenger

func (p Platform) IsMessenger() bool

func (Platform) IsValid

func (p Platform) IsValid() bool

func (Platform) MarshalJSON

func (p Platform) MarshalJSON() ([]byte, error)

func (Platform) String

func (p Platform) String() string

func (*Platform) UnmarshalJSON

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

type PolarisViewer

type PolarisViewer struct {
	Data ViewerData `json:"data,omitempty"`
	ID   string     `json:"id,omitempty"`
}

func (*PolarisViewer) GetAvatarURL

func (p *PolarisViewer) GetAvatarURL() string

func (*PolarisViewer) GetAvatarURLHD

func (p *PolarisViewer) GetAvatarURLHD() string

func (*PolarisViewer) GetBiography

func (p *PolarisViewer) GetBiography() string

func (*PolarisViewer) GetBusinessEmail

func (p *PolarisViewer) GetBusinessEmail() string

func (*PolarisViewer) GetExternalUrl

func (p *PolarisViewer) GetExternalUrl() string

func (*PolarisViewer) GetFBID

func (p *PolarisViewer) GetFBID() int64

func (*PolarisViewer) GetName

func (p *PolarisViewer) GetName() string

func (*PolarisViewer) GetUserId

func (p *PolarisViewer) GetUserId() string

func (*PolarisViewer) GetUsername

func (p *PolarisViewer) GetUsername() string

func (*PolarisViewer) HasPhoneNumber

func (p *PolarisViewer) HasPhoneNumber() bool

func (*PolarisViewer) IsPrivate

func (p *PolarisViewer) IsPrivate() bool

type RawJSONConfigs

type RawJSONConfigs struct {
	Eqmc    Eqmc
	EnvJSON EnvJSON
}

type RelayAPIConfigDefaults

type RelayAPIConfigDefaults struct {
	AccessToken   string `json:"accessToken,omitempty"`
	ActorID       string `json:"actorID,omitempty"`
	CustomHeaders struct {
		XIGAppID string `json:"X-IG-App-ID,omitempty"`
		XIGD     string `json:"X-IG-D,omitempty"`
	} `json:"customHeaders,omitempty"`
	EnableNetworkLogger       bool        `json:"enableNetworkLogger,omitempty"`
	FetchTimeout              int         `json:"fetchTimeout,omitempty"`
	GraphBatchURI             string      `json:"graphBatchURI,omitempty"`
	GraphURI                  string      `json:"graphURI,omitempty"`
	RetryDelays               []int       `json:"retryDelays,omitempty"`
	UseXController            bool        `json:"useXController,omitempty"`
	XhrEncoding               interface{} `json:"xhrEncoding,omitempty"`
	SubscriptionTopicURI      interface{} `json:"subscriptionTopicURI,omitempty"`
	WithCredentials           bool        `json:"withCredentials,omitempty"`
	IsProductionEndpoint      bool        `json:"isProductionEndpoint,omitempty"`
	WorkRequestTaggingProduct interface{} `json:"workRequestTaggingProduct,omitempty"`
	EncryptionKeyParams       interface{} `json:"encryptionKeyParams,omitempty"`
}

type RsrcDetails

type RsrcDetails struct {
	Type string `json:"type,omitempty"`
	Src  string `json:"src,omitempty"`
	C    int64  `json:"c,omitempty"`
	Tsrc string `json:"tsrc,omitempty"`
	P    string `json:"p,omitempty"`
	M    string `json:"m,omitempty"`
}

type SchedulerJSDefineConfig

type SchedulerJSDefineConfig struct {
	MqttWebConfig                 MqttWebConfig
	MqttWebDeviceID               MqttWebDeviceID
	WebDevicePerfClassData        WebDevicePerfClassData
	BootloaderConfig              BootLoaderConfig
	CurrentBusinessUser           CurrentBusinessAccount
	SiteData                      SiteData
	SprinkleConfig                SprinkleConfig
	USIDMetadata                  USIDMetadata
	WebConnectionClassServerGuess WebConnectionClassServerGuess
	MessengerWebRegion            MessengerWebRegion
	MessengerWebInitData          MessengerWebInitData
	LSD                           LSD
	IntlViewerContext             IntlViewerContext
	IntlCurrentLocale             IntlCurrentLocale
	DTSGInitData                  DTSGInitData
	DTSGInitialData               DTSGInitialData
	CurrentUserInitialData        CurrentUserInitialData
	LSPlatformMessengerSyncParams LSPlatformMessengerSyncParams
	ServerNonce                   ServerNonce
	InitialCookieConsent          InitialCookieConsent
	InstagramPasswordEncryption   InstagramPasswordEncryption
	XIGSharedData                 XIGSharedData
	RelayAPIConfigDefaults        RelayAPIConfigDefaults
	PolarisViewer                 PolarisViewer
}

type SchedulerJSRequire

type SchedulerJSRequire struct {
	LSTable *table.LSTable
}

type ServerNonce

type ServerNonce struct {
	ServerNonce string `json:"ServerNonce,omitempty"`
}

type SiteData

type SiteData struct {
	SpinB                 string  `json:"__spin_b,omitempty"`
	SpinR                 int     `json:"__spin_r,omitempty"`
	SpinT                 int     `json:"__spin_t,omitempty"`
	BeOneAhead            bool    `json:"be_one_ahead,omitempty"`
	BlHashVersion         int64   `json:"bl_hash_version,omitempty"`
	ClientRevision        int64   `json:"client_revision,omitempty"`
	CometEnv              int64   `json:"comet_env,omitempty"`
	HasteSession          string  `json:"haste_session,omitempty"`
	HasteSite             string  `json:"haste_site,omitempty"`
	Hsi                   string  `json:"hsi,omitempty"`
	IsComet               bool    `json:"is_comet,omitempty"`
	IsExperimentalTier    bool    `json:"is_experimental_tier,omitempty"`
	IsJitWarmedUp         bool    `json:"is_jit_warmed_up,omitempty"`
	IsRtl                 bool    `json:"is_rtl,omitempty"`
	ManifestBaseURI       string  `json:"manifest_base_uri,omitempty"`
	ManifestOrigin        string  `json:"manifest_origin,omitempty"`
	ManifestVersionPrefix string  `json:"manifest_version_prefix,omitempty"`
	PkgCohort             string  `json:"pkg_cohort,omitempty"`
	Pr                    float64 `json:"pr,omitempty"`
	PushPhase             string  `json:"push_phase,omitempty"`
	SemrHostBucket        string  `json:"semr_host_bucket,omitempty"`
	ServerRevision        int64   `json:"server_revision,omitempty"`
	SkipRdBl              bool    `json:"skip_rd_bl,omitempty"`
	Spin                  int64   `json:"spin,omitempty"`
	Tier                  string  `json:"tier,omitempty"`
	Vip                   string  `json:"vip,omitempty"`
	WbloksEnv             bool    `json:"wbloks_env,omitempty"`
}

type SprinkleConfig

type SprinkleConfig struct {
	ParamName       string `json:"param_name,omitempty"`
	ShouldRandomize bool   `json:"should_randomize,omitempty"`
	Version         int    `json:"version,omitempty"`
}

type StringOrInt

type StringOrInt int64

func (*StringOrInt) MarshalJSON

func (soi *StringOrInt) MarshalJSON() ([]byte, error)

func (*StringOrInt) UnmarshalJSON

func (soi *StringOrInt) UnmarshalJSON(data []byte) (err error)

type USIDMetadata

type USIDMetadata struct {
	BrowserID    string `json:"browser_id,omitempty"`
	PageID       string `json:"page_id,omitempty"`
	TabID        string `json:"tab_id,omitempty"`
	TransitionID int    `json:"transition_id,omitempty"`
	Version      int    `json:"version,omitempty"`
}

type UserInfo

type UserInfo interface {
	GetUsername() string
	GetName() string
	GetAvatarURL() string
	GetFBID() int64
}

type ViewerData

type ViewerData struct {
	Biography                string `json:"biography,omitempty"`
	BusinessAddressJSON      any    `json:"business_address_json,omitempty"`
	BusinessContactMethod    string `json:"business_contact_method,omitempty"`
	BusinessEmail            string `json:"business_email,omitempty"`
	BusinessPhoneNumber      any    `json:"business_phone_number,omitempty"`
	CanSeeOrganicInsights    bool   `json:"can_see_organic_insights,omitempty"`
	CategoryName             any    `json:"category_name,omitempty"`
	ExternalURL              string `json:"external_url,omitempty"`
	Fbid                     string `json:"fbid,omitempty"`
	FullName                 string `json:"full_name,omitempty"`
	HasPhoneNumber           bool   `json:"has_phone_number,omitempty"`
	HasProfilePic            bool   `json:"has_profile_pic,omitempty"`
	HasTabbedInbox           bool   `json:"has_tabbed_inbox,omitempty"`
	HideLikeAndViewCounts    bool   `json:"hide_like_and_view_counts,omitempty"`
	ID                       string `json:"id,omitempty"`
	IsBusinessAccount        bool   `json:"is_business_account,omitempty"`
	IsJoinedRecently         bool   `json:"is_joined_recently,omitempty"`
	IsSupervisedUser         bool   `json:"is_supervised_user,omitempty"`
	GuardianID               any    `json:"guardian_id,omitempty"`
	IsPrivate                bool   `json:"is_private,omitempty"`
	IsProfessionalAccount    bool   `json:"is_professional_account,omitempty"`
	IsSupervisionEnabled     bool   `json:"is_supervision_enabled,omitempty"`
	IsUserInCanada           bool   `json:"is_user_in_canada,omitempty"`
	ProfilePicURL            string `json:"profile_pic_url,omitempty"`
	ProfilePicURLHd          string `json:"profile_pic_url_hd,omitempty"`
	ShouldShowCategory       bool   `json:"should_show_category,omitempty"`
	ShouldShowPublicContacts bool   `json:"should_show_public_contacts,omitempty"`
	Username                 string `json:"username,omitempty"`
	BadgeCount               string `json:"badge_count,omitempty"`
	IsBasicAdsOptedIn        bool   `json:"is_basic_ads_opted_in,omitempty"`
	BasicAdsTier             int    `json:"basic_ads_tier,omitempty"`
	ProbablyHasApp           bool   `json:"probably_has_app,omitempty"`
}

type WebConnectionClassServerGuess

type WebConnectionClassServerGuess struct {
	ConnectionClass string `json:"connectionClass,omitempty"`
}

type WebDevicePerfClassData

type WebDevicePerfClassData struct {
	DeviceLevel string `json:"deviceLevel,omitempty"`
	YearClass   any    `json:"yearClass,omitempty"`
}

type XIGConfigData

type XIGConfigData struct {
	Config struct {
		CsrfToken string     `json:"csrf_token,omitempty"`
		Viewer    ViewerData `json:"viewer,omitempty"`
		ViewerID  string     `json:"viewerId,omitempty"`
	} `json:"config,omitempty"`
	CountryCode             string  `json:"country_code,omitempty"`
	LanguageCode            string  `json:"language_code,omitempty"`
	Locale                  string  `json:"locale,omitempty"`
	Hostname                string  `json:"hostname,omitempty"`
	IsWhitelistedCrawlBot   bool    `json:"is_whitelisted_crawl_bot,omitempty"`
	ConnectionQualityRating string  `json:"connection_quality_rating,omitempty"`
	DeploymentStage         string  `json:"deployment_stage,omitempty"`
	Platform                string  `json:"platform,omitempty"`
	Nonce                   string  `json:"nonce,omitempty"`
	MidPct                  float64 `json:"mid_pct,omitempty"`
	CacheSchemaVersion      int     `json:"cache_schema_version,omitempty"`
	DeviceID                string  `json:"device_id,omitempty"`
	BrowserPushPubKey       string  `json:"browser_push_pub_key,omitempty"`
	Encryption              struct {
		KeyID     string `json:"key_id,omitempty"`
		PublicKey string `json:"public_key,omitempty"`
		Version   string `json:"version,omitempty"`
	} `json:"encryption,omitempty"`
	IsDev                  bool `json:"is_dev,omitempty"`
	IsOnVpn                bool `json:"is_on_vpn,omitempty"`
	SignalCollectionConfig struct {
		Bbs int `json:"bbs,omitempty"`
		Ctw any `json:"ctw,omitempty"`
		Dbs int `json:"dbs,omitempty"`
		Fd  int `json:"fd,omitempty"`
		Hbc struct {
			Hbbi  int    `json:"hbbi,omitempty"`
			Hbcbc int    `json:"hbcbc,omitempty"`
			Hbi   int    `json:"hbi,omitempty"`
			Hbv   string `json:"hbv,omitempty"`
			Hbvbc int    `json:"hbvbc,omitempty"`
		} `json:"hbc,omitempty"`
		I   int `json:"i,omitempty"`
		Rt  any `json:"rt,omitempty"`
		Sbs int `json:"sbs,omitempty"`
		Sc  struct {
			C [][]int `json:"c,omitempty"`
			T int     `json:"t,omitempty"`
		} `json:"sc,omitempty"`
		Sid int `json:"sid,omitempty"`
	} `json:"signal_collection_config,omitempty"`
	ConsentDialogConfig struct {
		IsUserLinkedToFb        bool `json:"is_user_linked_to_fb,omitempty"`
		ShouldShowConsentDialog bool `json:"should_show_consent_dialog,omitempty"`
	} `json:"consent_dialog_config,omitempty"`
	PrivacyFlowTrigger any `json:"privacy_flow_trigger,omitempty"`
	WwwRoutingConfig   struct {
		FrontendAndProxygenRoutes []struct {
			Path        string `json:"path,omitempty"`
			Destination string `json:"destination,omitempty"`
		} `json:"frontend_and_proxygen_routes,omitempty"`
		FrontendOnlyRoutes []struct {
			Path        string `json:"path,omitempty"`
			Destination string `json:"destination,omitempty"`
		} `json:"frontend_only_routes,omitempty"`
		ProxygenRequestHandlerOnlyRoutes []struct {
			Paths           []string `json:"paths,omitempty"`
			Destination     string   `json:"destination,omitempty"`
			InVpnDogfooding bool     `json:"in_vpn_dogfooding,omitempty"`
			InQe            bool     `json:"in_qe,omitempty"`
		} `json:"proxygen_request_handler_only_routes,omitempty"`
	} `json:"www_routing_config,omitempty"`
	ShouldShowDigitalCollectiblesPrivacyNotice bool   `json:"should_show_digital_collectibles_privacy_notice,omitempty"`
	RolloutHash                                string `json:"rollout_hash,omitempty"`
	BundleVariant                              string `json:"bundle_variant,omitempty"`
	FrontendEnv                                string `json:"frontend_env,omitempty"`
}

type XIGSharedData

type XIGSharedData struct {
	ConfigData *XIGConfigData
	Raw        string `json:"raw,omitempty"`
	Native     struct {
		Config struct {
			CsrfToken string `json:"csrf_token,omitempty"`
			ViewerID  string `json:"viewerId,omitempty"`
			Viewer    struct {
				IsBasicAdsOptedIn bool `json:"is_basic_ads_opted_in,omitempty"`
				BasicAdsTier      int  `json:"basic_ads_tier,omitempty"`
			} `json:"viewer,omitempty"`
		} `json:"config,omitempty"`
		SendDeviceIDHeader bool `json:"send_device_id_header,omitempty"`
		ServerChecks       struct {
			Hfe bool `json:"hfe,omitempty"`
		} `json:"server_checks,omitempty"`
		WwwRoutingConfig struct {
			FrontendOnlyRoutes []struct {
				Path        string `json:"path,omitempty"`
				Destination string `json:"destination,omitempty"`
			} `json:"frontend_only_routes,omitempty"`
		} `json:"www_routing_config,omitempty"`
		DeviceID               string `json:"device_id,omitempty"`
		SignalCollectionConfig struct {
			Sid int `json:"sid,omitempty"`
		} `json:"signal_collection_config,omitempty"`
		PrivacyFlowTrigger        any `json:"privacy_flow_trigger,omitempty"`
		PlatformInstallBadgeLinks struct {
			Ios         string `json:"ios,omitempty"`
			Android     string `json:"android,omitempty"`
			WindowsNt10 string `json:"windows_nt_10,omitempty"`
		} `json:"platform_install_badge_links,omitempty"`
		CountryCode    string `json:"country_code,omitempty"`
		ProbablyHasApp bool   `json:"probably_has_app,omitempty"`
	} `json:"native,omitempty"`
}

func (*XIGSharedData) ParseRaw

func (xig *XIGSharedData) ParseRaw() error

Jump to

Keyboard shortcuts

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