asc

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	ID         string        `json:"id"`
	Attributes AppAttributes `json:"attributes"`
}

App represents an App Store Connect app.

type AppAttributes

type AppAttributes struct {
	Name                     string `json:"name"`
	BundleID                 string `json:"bundleId"`
	SKU                      string `json:"sku"`
	PrimaryLocale            string `json:"primaryLocale"`
	ContentRightsDeclaration string `json:"contentRightsDeclaration"`
}

type AppInfo

type AppInfo struct {
	ID         string            `json:"id"`
	Attributes AppInfoAttributes `json:"attributes"`
}

AppInfo contains app information details.

type AppInfoAttributes

type AppInfoAttributes struct {
	AppStoreState     string `json:"appStoreState"`
	AppStoreAgeRating string `json:"appStoreAgeRating"`
	BrazilAgeRating   string `json:"brazilAgeRating"`
	KidsAgeBand       string `json:"kidsAgeBand"`
}

type AppPrice

type AppPrice struct {
	ID         string             `json:"id"`
	Attributes AppPriceAttributes `json:"attributes"`
}

AppPrice represents an app's price schedule.

type AppPriceAttributes

type AppPriceAttributes struct {
	Manual    bool   `json:"manual"`
	StartDate string `json:"startDate"`
}

type AppPricePoint

type AppPricePoint struct {
	ID         string                  `json:"id"`
	Attributes AppPricePointAttributes `json:"attributes"`
}

AppPricePoint represents a price tier.

type AppPricePointAttributes

type AppPricePointAttributes struct {
	CustomerPrice string `json:"customerPrice"`
	Proceeds      string `json:"proceeds"`
}

type AppStoreVersion

type AppStoreVersion struct {
	ID         string                    `json:"id"`
	Attributes AppStoreVersionAttributes `json:"attributes"`
}

AppStoreVersion represents a version of an app.

type AppStoreVersionAttributes

type AppStoreVersionAttributes struct {
	VersionString string `json:"versionString"`
	AppStoreState string `json:"appStoreState"`
	Platform      string `json:"platform"`
	ReleaseType   string `json:"releaseType"`
	CreatedDate   string `json:"createdDate"`
}

type AuthResponse

type AuthResponse struct {
	AuthType string `json:"authType"` // "hsa2" for 2FA
}

AuthResponse from Apple's sign-in endpoint.

type BetaGroup

type BetaGroup struct {
	ID         string              `json:"id"`
	Attributes BetaGroupAttributes `json:"attributes"`
}

BetaGroup represents a TestFlight group.

type BetaGroupAttributes

type BetaGroupAttributes struct {
	Name                   string `json:"name"`
	IsInternalGroup        bool   `json:"isInternalGroup"`
	PublicLinkEnabled      *bool  `json:"publicLinkEnabled"`
	PublicLinkLimitEnabled *bool  `json:"publicLinkLimitEnabled"`
	HasAccessToAllBuilds   *bool  `json:"hasAccessToAllBuilds"`
}

type Build

type Build struct {
	ID         string          `json:"id"`
	Attributes BuildAttributes `json:"attributes"`
}

Build represents a build uploaded to App Store Connect.

type BuildAttributes

type BuildAttributes struct {
	Version                 string `json:"version"`
	UploadedDate            string `json:"uploadedDate"`
	ProcessingState         string `json:"processingState"`
	MinOsVersion            string `json:"minOsVersion"`
	UsesNonExemptEncryption *bool  `json:"usesNonExemptEncryption"`
}

type Client

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

func NewClient

func NewClient(keyID, issuerID, privateKeyPath string) (*Client, error)

func (*Client) GetApp

func (c *Client) GetApp(appID string) (*App, error)

GetApp fetches an app by its App Store Connect ID.

func (*Client) GetAppAvailability

func (c *Client) GetAppAvailability(appID string) ([]Territory, error)

GetAppAvailability checks territory availability for an app.

func (*Client) GetAppInfos

func (c *Client) GetAppInfos(appID string) ([]AppInfo, error)

GetAppInfos fetches app info (age rating, state, etc).

func (*Client) GetAppPriceSchedule

func (c *Client) GetAppPriceSchedule(appID string) ([]AppPrice, error)

GetAppPriceSchedule fetches the app's price schedule.

func (*Client) GetAppStoreVersions

func (c *Client) GetAppStoreVersions(appID string) ([]AppStoreVersion, error)

GetAppStoreVersions fetches all versions for an app.

func (*Client) GetBetaGroups

func (c *Client) GetBetaGroups(appID string) ([]BetaGroup, error)

GetBetaGroups fetches TestFlight beta groups for an app.

func (*Client) GetBuilds

func (c *Client) GetBuilds(appID string) ([]Build, error)

GetBuilds fetches builds for an app, optionally filtered.

func (*Client) GetScreenshotSets

func (c *Client) GetScreenshotSets(localizationID string) ([]ScreenshotSet, error)

GetScreenshotSets fetches screenshot sets for a version localization.

func (*Client) GetScreenshots

func (c *Client) GetScreenshots(screenshotSetID string) ([]Screenshot, error)

GetScreenshots fetches individual screenshots for a screenshot set.

func (*Client) GetVersionLocalizations

func (c *Client) GetVersionLocalizations(versionID string) ([]VersionLocalization, error)

GetVersionLocalizations fetches localized metadata for a version.

type DataResponse

type DataResponse[T any] struct {
	Data T `json:"data"`
}

Generic API response wrappers.

type ImageAsset

type ImageAsset struct {
	Width  int `json:"width"`
	Height int `json:"height"`
}

type ListResponse

type ListResponse[T any] struct {
	Data []T `json:"data"`
}

type Screenshot

type Screenshot struct {
	ID         string               `json:"id"`
	Attributes ScreenshotAttributes `json:"attributes"`
}

Screenshot represents an individual screenshot file.

type ScreenshotAttributes

type ScreenshotAttributes struct {
	FileSize         int         `json:"fileSize"`
	FileName         string      `json:"fileName"`
	ImageAsset       *ImageAsset `json:"imageAsset"`
	AssetToken       string      `json:"assetToken"`
	UploadOperations interface{} `json:"uploadOperations"`
}

type ScreenshotSet

type ScreenshotSet struct {
	ID         string                  `json:"id"`
	Attributes ScreenshotSetAttributes `json:"attributes"`
}

ScreenshotSet represents a set of screenshots for a device type.

type ScreenshotSetAttributes

type ScreenshotSetAttributes struct {
	ScreenshotDisplayType string `json:"screenshotDisplayType"`
}

type SerializedCookie

type SerializedCookie struct {
	Name   string `json:"name"`
	Value  string `json:"value"`
	Domain string `json:"domain"`
	Path   string `json:"path"`
}

SerializedCookie is a JSON-safe cookie representation.

type Session

type Session struct {
	AppleID    string              `json:"apple_id"`
	SessionID  string              `json:"session_id"`
	Scnt       string              `json:"scnt"`
	Cookies    []*SerializedCookie `json:"cookies"`
	TeamID     string              `json:"team_id,omitempty"`
	ProviderID string              `json:"provider_id,omitempty"`
	ExpiresAt  time.Time           `json:"expires_at"`
	// contains filtered or unexported fields
}

Session holds Apple ID session state for authenticated requests.

func SignIn

func SignIn(appleID, password string) (*Session, error)

SignIn authenticates with Apple ID and password. Returns a session if successful, or an error indicating 2FA is needed.

func (*Session) GetSessionInfo

func (s *Session) GetSessionInfo() (*SessionInfo, error)

GetSessionInfo fetches the authenticated user's App Store Connect session.

func (*Session) SerializeCookies

func (s *Session) SerializeCookies() []*SerializedCookie

SerializeCookies extracts cookies for persistent storage.

func (*Session) SubmitTwoFactorCode

func (s *Session) SubmitTwoFactorCode(code string) error

SubmitTwoFactorCode sends the 6-digit 2FA code to Apple.

type SessionInfo

type SessionInfo struct {
	User struct {
		FullName string `json:"fullName"`
		Email    string `json:"emailAddress"`
	} `json:"user"`
	Provider struct {
		ProviderID  int    `json:"providerId"`
		Name        string `json:"name"`
		PublicKeyID string `json:"publicKeyId"`
	} `json:"provider"`
	AvailableProviders []struct {
		ProviderID int    `json:"providerId"`
		Name       string `json:"name"`
	} `json:"availableProviders"`
}

SessionInfo from the App Store Connect session endpoint.

type SignInRequest

type SignInRequest struct {
	AccountName string `json:"accountName"`
	Password    string `json:"password"`
	RememberMe  bool   `json:"rememberMe"`
}

SignInRequest is the Apple ID login payload.

type Territory

type Territory struct {
	ID         string              `json:"id"`
	Attributes TerritoryAttributes `json:"attributes"`
}

Territory represents an App Store territory.

type TerritoryAttributes

type TerritoryAttributes struct {
	Currency string `json:"currency"`
}

type TwoFactorInfo

type TwoFactorInfo struct {
	TrustedDevices []struct {
		ID          int    `json:"id"`
		PhoneNumber string `json:"phoneNumber"`
	} `json:"trustedDevices"`
}

TwoFactorInfo returned when 2FA is required.

type TwoFactorRequired

type TwoFactorRequired struct {
	Session *Session
}

TwoFactorRequired is returned when 2FA is needed.

func (*TwoFactorRequired) Error

func (e *TwoFactorRequired) Error() string

type VersionLocalization

type VersionLocalization struct {
	ID         string                        `json:"id"`
	Attributes VersionLocalizationAttributes `json:"attributes"`
}

VersionLocalization contains localized version info.

type VersionLocalizationAttributes

type VersionLocalizationAttributes struct {
	Locale          string `json:"locale"`
	Description     string `json:"description"`
	Keywords        string `json:"keywords"`
	WhatsNew        string `json:"whatsNew"`
	SupportURL      string `json:"supportUrl"`
	MarketingURL    string `json:"marketingUrl"`
	PromotionalText string `json:"promotionalText"`
}

Jump to

Keyboard shortcuts

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