web

package
v1.260907.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: MIT Imports: 51 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APIKeyKindTeam       = "team"
	APIKeyKindIndividual = "individual"
)
View Source
const (
	// AppDistributionTypeAppStore is Apple's public App Store distribution value.
	AppDistributionTypeAppStore = "APP_STORE"
	// AppDistributionTypeCustom is Apple's private custom-app distribution value.
	AppDistributionTypeCustom = "CUSTOM"
	// AppDistributionTypeDirectURL is Apple's unlisted/direct URL value. The
	// distribution setter refuses to change this read-only flow.
	AppDistributionTypeDirectURL = "DIRECT_URL"

	// AppDistributionEducationDiscounted enables the education discount.
	AppDistributionEducationDiscounted = "DISCOUNTED"
	// AppDistributionEducationNotDiscounted disables the education discount.
	AppDistributionEducationNotDiscounted = "NOT_DISCOUNTED"
	// AppDistributionEducationNotApplicable is Apple's custom-app value.
	AppDistributionEducationNotApplicable = "NOT_APPLICABLE"
)
View Source
const (
	// DefaultRemovedAppsLimit is the default page size for removed-apps listing.
	DefaultRemovedAppsLimit = 48
	// MaxRemovedAppsLimit is the largest accepted page size for removed-apps listing.
	MaxRemovedAppsLimit = 200
)
View Source
const (
	// SessionBundleKind identifies an exported web-session document.
	SessionBundleKind = "asc-web-session"

	// SessionBundleVersion is the schema version written by the current
	// exporter. Importing a different version is refused instead of guessed.
	SessionBundleVersion = 1

	// MaxSessionBundleSize bounds how many bytes an imported bundle may hold.
	MaxSessionBundleSize = 1 << 20
)
View Source
const SubscriptionPlanAvailabilityTerritoryLimit = 200

SubscriptionPlanAvailabilityTerritoryLimit is the maximum related territory count requested.

Variables

View Source
var (
	ErrAPIKeyNotFound        = errors.New("api key not found")
	ErrAPIKeyNotVisible      = errors.New("api key not visible in accessible key lists")
	ErrAPIKeyRolesUnresolved = errors.New("api key roles could not be resolved")
)
View Source
var (
	ErrCachedSessionExpired          = errors.New("cached web session expired")
	ErrCachedSessionValidationFailed = errors.New("cached web session could not be validated")
)
View Source
var (
	// ErrSessionCacheDisabled reports that web-session caching is turned off,
	// so a session can neither be read from nor written to the cache.
	ErrSessionCacheDisabled = errors.New("web session cache is disabled")

	// ErrSessionBundleValidationFailed reports that an explicitly requested
	// live validation did not accept an imported session bundle.
	ErrSessionBundleValidationFailed = errors.New("web session bundle could not be validated")

	// ErrSessionBundleUnusable reports that a bundle carries no unexpired
	// cookie for a supported Apple origin.
	ErrSessionBundleUnusable = errors.New("web session bundle has no unexpired cookies")

	// ErrSessionCookieNotStorable reports that a cookie names a supported
	// origin but a Domain the session jar will not store for that origin.
	ErrSessionCookieNotStorable = errors.New("web session bundle cookie cannot be stored for its origin")

	// ErrSessionCookieInvalid reports that a cookie name, value, path, or
	// domain is not a valid HTTP cookie field.
	ErrSessionCookieInvalid = errors.New("web session bundle cookie is invalid")

	// ErrSessionCookieDuplicate reports that a bundle repeats a cookie identity
	// after its origin, domain, and path are canonicalized.
	ErrSessionCookieDuplicate = errors.New("web session bundle cookie identity is duplicated")
)
View Source
var ErrAPIKeyResponseInvalid = errors.New("invalid api key download response")

ErrAPIKeyResponseInvalid reports a malformed or incomplete one-time P8 response.

View Source
var (

	// ErrInvalidAppleAccountCredentials reports rejected Apple Account
	// credentials during web login flows.
	ErrInvalidAppleAccountCredentials = errInvalidAppleAccountCredentials
)
View Source
var ErrPasswordStoreUnavailable = errors.New("native password store unavailable")

ErrPasswordStoreUnavailable indicates that native credential storage is unavailable or intentionally bypassed. Web login can continue without it.

Functions

func ApplyJSONMergePatch

func ApplyJSONMergePatch(content json.RawMessage, patch json.RawMessage) (json.RawMessage, bool, error)

ApplyJSONMergePatch applies an RFC 7396-style merge patch to workflow content. Both the existing content and the patch must be JSON objects.

func DeleteAllPasswords added in v1.260804.0

func DeleteAllPasswords() error

DeleteAllPasswords removes every password saved by asc web auth.

func DeleteAllSessions

func DeleteAllSessions() error

DeleteAllSessions removes all cached web sessions.

func DeletePassword added in v1.260804.0

func DeletePassword(appleID string) error

DeletePassword removes the password for one Apple Account.

func DeleteSession

func DeleteSession(username string) error

DeleteSession removes the cached session for a specific Apple ID.

func DeleteSessionIfMatches added in v1.260904.0

func DeleteSessionIfMatches(username string, loaded *AuthSession) (bool, error)

DeleteSessionIfMatches removes the cached web session for username only while the stored entry is still the one loaded carries. A caller that proves its loaded cookie jar unusable would otherwise delete by Apple ID alone and take out a valid replacement that a concurrent process persisted while it was working through 2FA, leaving no cached session at all. Reporting whether the delete happened lets the caller stay quiet when a newer entry was preserved.

The comparison and the delete it authorizes run under the entry lock that persistence also takes, so a replacement written between them is no longer deleted by a decision made before it existed. Only the entry whose stamp matched is removed: the other backend can hold a newer session persisted by a process configured with a different ASC_WEB_SESSION_CACHE_BACKEND, and it is removed only when it carries the same stamp.

When the current entry cannot be read, or the caller has no stamp to compare, the unconditional delete stands: a proven-stale jar left on disk is reloaded by the next invocation and burns another 2FA code against the same failure.

func ECIESEncrypt

func ECIESEncrypt(serverKeyB64 string, plaintext string) (string, error)

ECIESEncrypt encrypts a plaintext value using the ECIES scheme used by the App Store Connect Xcode Cloud UI for secret environment variables.

Algorithm (reverse-engineered from ASC web UI JS):

  1. Decode server P-256 public key (64 bytes raw x||y), prepend 0x04
  2. Generate ephemeral ECDH P-256 key pair
  3. ECDH key agreement → 32-byte shared secret
  4. HKDF-SHA256(key=shared_secret, salt=random_32, info="") → AES-256 key
  5. AES-256-GCM(key, iv=random_12, plaintext) → ciphertext + 16-byte tag
  6. Output = salt(32) || ephemeral_pub_no_prefix(64) || iv(12) || ciphertext_with_tag
  7. Base64 encode

func IsAPIKeyDownloadRetryable added in v1.260807.0

func IsAPIKeyDownloadRetryable(err error) bool

IsAPIKeyDownloadRetryable reports whether a newly created key download may succeed after Apple's API-key resource finishes propagating.

func IsAlreadyExistsConflict added in v1.260531.0

func IsAlreadyExistsConflict(err error) bool

IsAlreadyExistsConflict reports whether an internal API error is a 409 caused by an exact already-exists response. It intentionally avoids treating broader "already attached/submitted" wording as idempotent success.

func IsCustomAppUserWriteUncertain added in v1.260907.0

func IsCustomAppUserWriteUncertain(err error) bool

IsCustomAppUserWriteUncertain reports whether an error arose after a user mutation may have reached Apple. Deterministic client-side validation and ordinary 4xx responses do not get an uncertain receipt; transport errors, 408, and 5xx responses do.

func IsDuplicateAppNameError

func IsDuplicateAppNameError(err error) bool

IsDuplicateAppNameError reports whether an internal API error means app name is taken.

func IsMissingCompanyNameError added in v1.260828.0

func IsMissingCompanyNameError(err error) bool

IsMissingCompanyNameError reports whether an internal API error means Apple requires a company name for the app-creation request. The response body is only used for this package-internal classification; APIError.Error keeps it out of user-facing messages.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound reports whether the internal web API returned a not-found response.

func IsStaleSessionAfterTwoFactor added in v1.260904.0

func IsStaleSessionAfterTwoFactor(err error) bool

IsStaleSessionAfterTwoFactor reports whether a 2FA submission failed only because the reused cookie jar no longer authenticates against App Store Connect. Callers may discard the cached session and retry a fresh login once.

func LoadPassword added in v1.260804.0

func LoadPassword(appleID string) (string, bool, error)

LoadPassword loads a password for one Apple Account from the native credential store. It never falls back to a file-backed store.

func NormalizeAnalyticsFrequency added in v1.260328.0

func NormalizeAnalyticsFrequency(raw string) (string, error)

NormalizeAnalyticsFrequency validates analytics frequency values shared by the CLI layer and the private web client.

func NormalizeMedicalDeviceDeclarationRegions added in v1.260907.0

func NormalizeMedicalDeviceDeclarationRegions(values []string) ([]string, error)

NormalizeMedicalDeviceDeclarationRegions validates and canonicalizes the region values accepted by the medical-device web form. An empty list means Apple's captured default region set.

func NormalizeSubscriptionPriceStartDate added in v1.260904.0

func NormalizeSubscriptionPriceStartDate(value string) string

NormalizeSubscriptionPriceStartDate reduces Apple date or datetime values to YYYY-MM-DD.

func PasswordStoreBypassed added in v1.260804.0

func PasswordStoreBypassed() bool

PasswordStoreBypassed reports whether native credential-store access is intentionally disabled for this process.

func PasswordStored added in v1.260804.0

func PasswordStored(appleID string) (bool, error)

PasswordStored reports whether a password exists for one Apple Account.

func PersistSession

func PersistSession(session *AuthSession) error

PersistSession stores web-session cookies for later reuse.

func SelectProvider added in v1.260601.0

func SelectProvider(ctx context.Context, session *AuthSession, selection ProviderSelection) error

SelectProvider switches an authenticated web session to a specific App Store Connect provider/team using Apple's private olympus session endpoint.

func SetEnvVars

func SetEnvVars(content json.RawMessage, vars []CIEnvironmentVariable) (json.RawMessage, error)

SetEnvVars sets environment_variables in raw workflow content, preserving other fields.

func SetWorkflowDisabled

func SetWorkflowDisabled(content json.RawMessage, disabled bool) (json.RawMessage, error)

SetWorkflowDisabled sets the disabled field on raw workflow content while preserving all other fields.

func StorePassword added in v1.260804.0

func StorePassword(appleID, password string) error

StorePassword saves a password for one Apple Account in the native credential store. The caller is responsible for only storing passwords that have already authenticated successfully.

func SubmitTwoFactorCode

func SubmitTwoFactorCode(ctx context.Context, session *AuthSession, code string) error

SubmitTwoFactorCode completes a pending 2FA challenge for an existing session.

func SupportedSessionBundleOrigins added in v1.260907.0

func SupportedSessionBundleOrigins() []string

SupportedSessionBundleOrigins lists the Apple origins a bundle may carry cookies for. It matches the origins the session cache itself persists.

func ValidateDeveloperAppGroupIdentifier added in v1.260816.0

func ValidateDeveloperAppGroupIdentifier(identifier string) error

ValidateDeveloperAppGroupIdentifier validates an App Group identifier before any Developer Portal request is attempted.

func ValidateMedicalDeviceRegionOptions added in v1.260907.0

func ValidateMedicalDeviceRegionOptions(region string, options MedicalDeviceRegionOptions) error

ValidateMedicalDeviceRegionOptions validates the source-backed fields used by one detailed regional write. It does not validate contact information; that requires the current form and is checked immediately before a write.

func ValidateSessionBundle added in v1.260907.0

func ValidateSessionBundle(ctx context.Context, bundle *SessionBundle) error

ValidateSessionBundle checks an imported bundle against Apple's live web session endpoint without reading or writing the local session cache. The caller can persist the bundle afterwards with ImportSessionBundleWithOptions when this explicit preflight succeeds.

Types

type APIError

type APIError struct {
	Status         int
	AppleRequestID string
	CorrelationKey string
	// contains filtered or unexported fields
}

APIError wraps non-2xx internal web API responses.

The raw body is retained for internal classification and tests, but Error() intentionally avoids dumping response bodies that may contain sensitive data.

func (*APIError) Error

func (e *APIError) Error() string

func (*APIError) HTTPStatusCode added in v1.260713.0

func (e *APIError) HTTPStatusCode() int

type APIKey added in v1.260807.0

type APIKey struct {
	KeyID          string   `json:"keyId"`
	Name           string   `json:"name,omitempty"`
	IssuerID       string   `json:"issuerId,omitempty"`
	Roles          []string `json:"roles,omitempty"`
	Active         bool     `json:"active"`
	AllAppsVisible bool     `json:"allAppsVisible"`
	CanDownload    bool     `json:"canDownload"`
	KeyType        string   `json:"keyType,omitempty"`
	LastUsed       string   `json:"lastUsed,omitempty"`
	RevokingDate   string   `json:"revokingDate,omitempty"`
}

APIKey contains non-secret metadata for an App Store Connect API key.

type APIKeyCreateAttributes added in v1.260807.0

type APIKeyCreateAttributes struct {
	Nickname string
	Role     string
}

APIKeyCreateAttributes describes a team API key created through a web session.

type APIKeyListItem added in v1.260904.0

type APIKeyListItem struct {
	KeyID       string    `json:"keyId"`
	Name        string    `json:"name,omitempty"`
	Kind        string    `json:"kind"`
	Roles       []string  `json:"roles,omitempty"`
	Active      bool      `json:"active"`
	KeyType     string    `json:"keyType,omitempty"`
	LastUsed    string    `json:"lastUsed,omitempty"`
	GeneratedBy *KeyActor `json:"generatedBy,omitempty"`
	RevokedBy   *KeyActor `json:"revokedBy,omitempty"`
}

APIKeyListItem is non-secret metadata for one listed App Store Connect API key.

type APIKeyRoleLookup

type APIKeyRoleLookup struct {
	KeyID       string    `json:"keyId"`
	Name        string    `json:"name,omitempty"`
	Kind        string    `json:"kind"`
	Roles       []string  `json:"roles"`
	RoleSource  string    `json:"roleSource"`
	Active      bool      `json:"active"`
	KeyType     string    `json:"keyType,omitempty"`
	LastUsed    string    `json:"lastUsed,omitempty"`
	Lookup      string    `json:"lookup"`
	GeneratedBy *KeyActor `json:"generatedBy,omitempty"`
	RevokedBy   *KeyActor `json:"revokedBy,omitempty"`
}

type AgreementDownload added in v1.260904.0

type AgreementDownload struct {
	AgreementID string
	TeamID      string
	Title       string
	Version     string
	ContentType string
	Body        []byte
}

AgreementDownload is the fetched content of one Developer Portal agreement. It never carries the download URL so callers cannot print it by accident.

type AgreementsAcceptRequest added in v1.260825.0

type AgreementsAcceptRequest struct {
	AgreementIDs []string
}

AgreementsAcceptRequest accepts one or more Developer Portal agreements.

type AnalyticsAppAvailability added in v1.260328.0

type AnalyticsAppAvailability struct {
	OrderableAt    string `json:"orderableAt,omitempty"`
	DownloadableAt string `json:"downloadableAt,omitempty"`
}

AnalyticsAppAvailability captures analytics app availability dates.

type AnalyticsAppFeature added in v1.260328.0

type AnalyticsAppFeature struct {
	ID    string `json:"id,omitempty"`
	Count int    `json:"count,omitempty"`
}

AnalyticsAppFeature is a feature flag on analytics app metadata.

type AnalyticsAppInfoResponse added in v1.260328.0

type AnalyticsAppInfoResponse struct {
	Size    int                      `json:"size,omitempty"`
	Results []AnalyticsAppInfoResult `json:"results,omitempty"`
}

AnalyticsAppInfoResponse wraps app-info results.

type AnalyticsAppInfoResult added in v1.260328.0

type AnalyticsAppInfoResult struct {
	Name         string                   `json:"name,omitempty"`
	AdamID       string                   `json:"adamId,omitempty"`
	IsEnabled    bool                     `json:"isEnabled,omitempty"`
	IsBundle     bool                     `json:"isBundle,omitempty"`
	IsArcade     bool                     `json:"isArcade,omitempty"`
	HasAppClips  bool                     `json:"hasAppClips,omitempty"`
	BundleID     string                   `json:"bundleId,omitempty"`
	Platforms    []string                 `json:"platforms,omitempty"`
	Devices      []string                 `json:"devices,omitempty"`
	Features     []AnalyticsAppFeature    `json:"features,omitempty"`
	Availability AnalyticsAppAvailability `json:"availability,omitempty"`
}

AnalyticsAppInfoResult is the app metadata returned by analytics app-info.

type AnalyticsBenchmarkMetric added in v1.260328.0

type AnalyticsBenchmarkMetric struct {
	Key      string   `json:"key,omitempty"`
	Label    string   `json:"label,omitempty"`
	AppValue *float64 `json:"appValue,omitempty"`
	P25      *float64 `json:"p25,omitempty"`
	P50      *float64 `json:"p50,omitempty"`
	P75      *float64 `json:"p75,omitempty"`
}

AnalyticsBenchmarkMetric is a merged app-vs-percentiles benchmark card.

type AnalyticsBenchmarkPeerGroup added in v1.260328.0

type AnalyticsBenchmarkPeerGroup struct {
	ID           string                              `json:"id,omitempty"`
	Title        string                              `json:"title,omitempty"`
	Monetization string                              `json:"monetization,omitempty"`
	Category     string                              `json:"category,omitempty"`
	Size         string                              `json:"size,omitempty"`
	Windows      []AnalyticsBenchmarkPeerGroupWindow `json:"windows,omitempty"`
	Availability map[string]bool                     `json:"availability,omitempty"`
	MemberOf     bool                                `json:"memberOf,omitempty"`
	Primary      bool                                `json:"primary,omitempty"`
}

AnalyticsBenchmarkPeerGroup describes a benchmark peer group.

type AnalyticsBenchmarkPeerGroupWindow added in v1.260328.0

type AnalyticsBenchmarkPeerGroupWindow struct {
	Start string `json:"start,omitempty"`
	End   string `json:"end,omitempty"`
}

AnalyticsBenchmarkPeerGroupWindow is a benchmark peer-group date window.

type AnalyticsBenchmarksSummary added in v1.260328.0

type AnalyticsBenchmarksSummary struct {
	AppID          string                        `json:"appId"`
	Category       string                        `json:"category,omitempty"`
	WeekStart      string                        `json:"weekStart,omitempty"`
	WeekEnd        string                        `json:"weekEnd,omitempty"`
	PeerGroupIDs   []string                      `json:"peerGroupIds,omitempty"`
	SelectedGroups []AnalyticsBenchmarkPeerGroup `json:"selectedGroups,omitempty"`
	Metrics        []AnalyticsBenchmarkMetric    `json:"metrics,omitempty"`
}

AnalyticsBenchmarksSummary reproduces the Benchmarks dashboard summary cards.

type AnalyticsBreakdown added in v1.260328.0

type AnalyticsBreakdown struct {
	Name      string                   `json:"name,omitempty"`
	Measure   string                   `json:"measure,omitempty"`
	Dimension string                   `json:"dimension,omitempty"`
	Frequency string                   `json:"frequency,omitempty"`
	Total     *float64                 `json:"total,omitempty"`
	Items     []AnalyticsBreakdownItem `json:"items,omitempty"`
}

AnalyticsBreakdown describes a grouped dimension result with resolved labels.

type AnalyticsBreakdownItem added in v1.260328.0

type AnalyticsBreakdownItem struct {
	Key            string  `json:"key,omitempty"`
	Label          string  `json:"label,omitempty"`
	Value          float64 `json:"value,omitempty"`
	MeetsThreshold bool    `json:"meetsThreshold,omitempty"`
}

AnalyticsBreakdownItem is a label-resolved breakdown row.

type AnalyticsCampaignsPage added in v1.260328.0

type AnalyticsCampaignsPage struct {
	AppID     string                        `json:"appId"`
	StartDate string                        `json:"startDate"`
	EndDate   string                        `json:"endDate"`
	Result    *AnalyticsSourcesListResponse `json:"result,omitempty"`
}

AnalyticsCampaignsPage reproduces the Acquisition > Campaigns page.

type AnalyticsCohortsRequest added in v1.260328.0

type AnalyticsCohortsRequest struct {
	AppID            string
	StartDate        string
	EndDate          string
	StartTime        string
	EndTime          string
	Measures         []string
	Periods          []string
	Frequency        string
	DimensionFilters []AnalyticsDimensionFilter
}

AnalyticsCohortsRequest describes a private cohorts query.

type AnalyticsCohortsResponse added in v1.260328.0

type AnalyticsCohortsResponse struct {
	Results map[string][]any `json:"results,omitempty"`
}

AnalyticsCohortsResponse preserves the wide private cohort response shape.

type AnalyticsDimensionDataPoint added in v1.260328.0

type AnalyticsDimensionDataPoint struct {
	Key            string  `json:"key,omitempty"`
	Value          float64 `json:"value,omitempty"`
	MeetsThreshold bool    `json:"meetsThreshold,omitempty"`
}

AnalyticsDimensionDataPoint is a grouped metric row.

type AnalyticsDimensionFilter added in v1.260328.0

type AnalyticsDimensionFilter map[string]any

AnalyticsDimensionFilter preserves private analytics filter payloads.

type AnalyticsDimensionSort added in v1.260328.0

type AnalyticsDimensionSort struct {
	Rank      string `json:"rank,omitempty"`
	Dimension string `json:"dimension,omitempty"`
	Limit     int    `json:"limit,omitempty"`
}

AnalyticsDimensionSort describes a sorted dimension lookup request.

type AnalyticsDimensionValuesRequest added in v1.260328.0

type AnalyticsDimensionValuesRequest struct {
	AppID            string
	StartDate        string
	EndDate          string
	StartTime        string
	EndTime          string
	Measure          string
	Dimensions       []AnalyticsDimensionSort
	Frequency        string
	DimensionFilters []AnalyticsDimensionFilter
}

AnalyticsDimensionValuesRequest describes a private dimension lookup query.

type AnalyticsDimensionValuesResponse added in v1.260328.0

type AnalyticsDimensionValuesResponse struct {
	Size    int                              `json:"size,omitempty"`
	Results []AnalyticsDimensionValuesResult `json:"results,omitempty"`
}

AnalyticsDimensionValuesResponse wraps dimension lookup responses.

type AnalyticsDimensionValuesResult added in v1.260328.0

type AnalyticsDimensionValuesResult struct {
	AdamID     string           `json:"adamId,omitempty"`
	Dimension  string           `json:"dimension,omitempty"`
	ActualSize int              `json:"actualSize,omitempty"`
	Values     []map[string]any `json:"values,omitempty"`
}

AnalyticsDimensionValuesResult holds lookup values for a dimension.

type AnalyticsDimensionsRequest added in v1.260328.0

type AnalyticsDimensionsRequest struct {
	AppID            string
	StartDate        string
	EndDate          string
	StartTime        string
	EndTime          string
	Measure          string
	Dimensions       []string
	Frequency        string
	DimensionFilters []AnalyticsDimensionFilter
	Limit            int
	HideEmptyValues  bool
}

AnalyticsDimensionsRequest describes a private grouped-dimensions query.

type AnalyticsDimensionsResponse added in v1.260328.0

type AnalyticsDimensionsResponse struct {
	Size    int                         `json:"size,omitempty"`
	Results []AnalyticsDimensionsResult `json:"results,omitempty"`
}

AnalyticsDimensionsResponse wraps grouped metric responses.

type AnalyticsDimensionsResult added in v1.260328.0

type AnalyticsDimensionsResult struct {
	AdamID    string                        `json:"adamId,omitempty"`
	Measure   string                        `json:"measure,omitempty"`
	Dimension string                        `json:"dimension,omitempty"`
	Frequency string                        `json:"frequency,omitempty"`
	Type      string                        `json:"type,omitempty"`
	Total     *float64                      `json:"total,omitempty"`
	Data      []AnalyticsDimensionDataPoint `json:"data,omitempty"`
}

AnalyticsDimensionsResult is a grouped metric response.

type AnalyticsInAppEvent added in v1.260328.0

type AnalyticsInAppEvent struct {
	ID         string `json:"id,omitempty"`
	Name       string `json:"name,omitempty"`
	Artwork    string `json:"artwork,omitempty"`
	Status     string `json:"status,omitempty"`
	Published  string `json:"published,omitempty"`
	Start      string `json:"start,omitempty"`
	End        string `json:"end,omitempty"`
	Archived   string `json:"archived,omitempty"`
	ValidEvent bool   `json:"validEvent,omitempty"`
}

AnalyticsInAppEvent is a single analytics in-app event entry.

type AnalyticsInAppEventsPage added in v1.260328.0

type AnalyticsInAppEventsPage struct {
	AppID              string                     `json:"appId"`
	RequestedStartDate string                     `json:"requestedStartDate,omitempty"`
	RequestedEndDate   string                     `json:"requestedEndDate,omitempty"`
	EffectiveStartTime string                     `json:"effectiveStartTime,omitempty"`
	EffectiveEndTime   string                     `json:"effectiveEndTime,omitempty"`
	SelectedEventID    string                     `json:"selectedEventId,omitempty"`
	Events             []AnalyticsInAppEvent      `json:"events,omitempty"`
	SelectedMetrics    *AnalyticsMeasuresResponse `json:"selectedMetrics,omitempty"`
}

AnalyticsInAppEventsPage reproduces the Acquisition > In-App Events page.

type AnalyticsInAppEventsResponse added in v1.260328.0

type AnalyticsInAppEventsResponse struct {
	Results []AnalyticsInAppEvent `json:"results,omitempty"`
	Size    int                   `json:"size,omitempty"`
}

AnalyticsInAppEventsResponse wraps analytics in-app event entries.

type AnalyticsMeasurePoint added in v1.260328.0

type AnalyticsMeasurePoint struct {
	Date  string   `json:"date,omitempty"`
	Value *float64 `json:"value,omitempty"`
}

AnalyticsMeasurePoint is a single date/value point in a measure series.

type AnalyticsMeasureResult added in v1.260328.0

type AnalyticsMeasureResult struct {
	AdamID         string                  `json:"adamId,omitempty"`
	Measure        string                  `json:"measure,omitempty"`
	Total          *float64                `json:"total,omitempty"`
	Type           string                  `json:"type,omitempty"`
	PreviousTotal  *float64                `json:"previousTotal,omitempty"`
	PercentChange  *float64                `json:"percentChange,omitempty"`
	MeetsThreshold bool                    `json:"meetsThreshold,omitempty"`
	Data           []AnalyticsMeasurePoint `json:"data,omitempty"`
}

AnalyticsMeasureResult is a single measure series from the private analytics API.

type AnalyticsMeasuresRequest added in v1.260328.0

type AnalyticsMeasuresRequest struct {
	AppID            string
	StartDate        string
	EndDate          string
	StartTime        string
	EndTime          string
	Measures         []string
	Frequency        string
	DimensionFilters []AnalyticsDimensionFilter
}

AnalyticsMeasuresRequest describes a private measures query.

type AnalyticsMeasuresResponse added in v1.260328.0

type AnalyticsMeasuresResponse struct {
	Size    int                      `json:"size,omitempty"`
	Results []AnalyticsMeasureResult `json:"results,omitempty"`
}

AnalyticsMeasuresResponse wraps multiple measure series.

type AnalyticsOverview added in v1.260328.0

type AnalyticsOverview struct {
	AppID              string                      `json:"appId"`
	StartDate          string                      `json:"startDate"`
	EndDate            string                      `json:"endDate"`
	Acquisition        []AnalyticsMeasureResult    `json:"acquisition,omitempty"`
	Sales              []AnalyticsMeasureResult    `json:"sales,omitempty"`
	Subscriptions      []AnalyticsMeasureResult    `json:"subscriptions,omitempty"`
	PlanTimeline       []AnalyticsTimeseriesResult `json:"planTimeline,omitempty"`
	DownloadToPaid     *AnalyticsCohortsResponse   `json:"downloadToPaid,omitempty"`
	Retention          *AnalyticsRetentionResponse `json:"retention,omitempty"`
	FeatureBreakdowns  []AnalyticsBreakdown        `json:"featureBreakdowns,omitempty"`
	AppUsageBreakdowns []AnalyticsBreakdown        `json:"appUsageBreakdowns,omitempty"`
}

AnalyticsOverview bundles the private overview page data families.

type AnalyticsRetentionCohort added in v1.260328.0

type AnalyticsRetentionCohort struct {
	AppPurchase    string                    `json:"appPurchase,omitempty"`
	MeetsThreshold bool                      `json:"meetsThreshold,omitempty"`
	Data           []AnalyticsRetentionPoint `json:"data,omitempty"`
}

AnalyticsRetentionCohort is one retention cohort in the private API response.

type AnalyticsRetentionPoint added in v1.260328.0

type AnalyticsRetentionPoint struct {
	Date                string   `json:"date,omitempty"`
	RetentionPercentage *float64 `json:"retentionPercentage,omitempty"`
	Value               *float64 `json:"value,omitempty"`
}

AnalyticsRetentionPoint is a retention value for a specific date.

type AnalyticsRetentionRequest added in v1.260328.0

type AnalyticsRetentionRequest struct {
	AppID            string
	StartDate        string
	EndDate          string
	StartTime        string
	EndTime          string
	Frequency        string
	DimensionFilters []AnalyticsDimensionFilter
}

AnalyticsRetentionRequest describes a private retention query.

type AnalyticsRetentionResponse added in v1.260328.0

type AnalyticsRetentionResponse struct {
	AdamID  string                     `json:"adamId,omitempty"`
	Results []AnalyticsRetentionCohort `json:"results,omitempty"`
}

AnalyticsRetentionResponse wraps retention results.

type AnalyticsSalesSummary added in v1.260328.0

type AnalyticsSalesSummary struct {
	AppID               string                    `json:"appId"`
	StartDate           string                    `json:"startDate"`
	EndDate             string                    `json:"endDate"`
	Summary             []AnalyticsMeasureResult  `json:"summary,omitempty"`
	DownloadToPaid      *AnalyticsCohortsResponse `json:"downloadToPaid,omitempty"`
	ProceedsPerDownload *AnalyticsCohortsResponse `json:"proceedsPerDownload,omitempty"`
	RevenueByPurchase   *AnalyticsBreakdown       `json:"revenueByPurchase,omitempty"`
	RevenueByTerritory  *AnalyticsBreakdown       `json:"revenueByTerritory,omitempty"`
}

AnalyticsSalesSummary reproduces the Monetization > Sales page.

type AnalyticsSettingDimension added in v1.260328.0

type AnalyticsSettingDimension struct {
	Key         string `json:"key,omitempty"`
	TitleLocKey string `json:"titleLocKey,omitempty"`
}

AnalyticsSettingDimension is a minimal settings/all dimension descriptor.

type AnalyticsSettingMeasure added in v1.260328.0

type AnalyticsSettingMeasure struct {
	Key         string `json:"key,omitempty"`
	TitleLocKey string `json:"titleLocKey,omitempty"`
}

AnalyticsSettingMeasure is a minimal settings/all measure descriptor.

type AnalyticsSettingsConfiguration added in v1.260328.0

type AnalyticsSettingsConfiguration struct {
	ItcBaseURL         string `json:"itcBaseUrl,omitempty"`
	DataStartDate      string `json:"dataStartDate,omitempty"`
	DataEndDate        string `json:"dataEndDate,omitempty"`
	BenchmarkStartDate string `json:"benchmarkStartDate,omitempty"`
	BenchmarkEndDate   string `json:"benchmarkEndDate,omitempty"`
	ImageServiceURL    string `json:"imageServiceUrl,omitempty"`
	GlobalOptInRate    int    `json:"globalOptInRate,omitempty"`
}

AnalyticsSettingsConfiguration stores global analytics configuration dates.

type AnalyticsSettingsResponse added in v1.260328.0

type AnalyticsSettingsResponse struct {
	Measures        []AnalyticsSettingMeasure      `json:"measures,omitempty"`
	Dimensions      []AnalyticsSettingDimension    `json:"dimensions,omitempty"`
	EnabledFeatures []string                       `json:"enabledFeatures,omitempty"`
	Configuration   AnalyticsSettingsConfiguration `json:"configuration,omitempty"`
}

AnalyticsSettingsResponse is the shared analytics settings payload.

type AnalyticsSourcesListItem added in v1.260328.0

type AnalyticsSourcesListItem struct {
	SourceID    string             `json:"sourceId,omitempty"`
	SourceTitle string             `json:"sourceTitle,omitempty"`
	Title       string             `json:"title,omitempty"`
	Measures    map[string]float64 `json:"measures,omitempty"`
}

AnalyticsSourcesListItem is a single sources/list row.

type AnalyticsSourcesListRequest added in v1.260328.0

type AnalyticsSourcesListRequest struct {
	AppID     string
	StartDate string
	EndDate   string
	StartTime string
	EndTime   string
	Measures  []string
	Dimension string
	Frequency string
	Limit     int
}

AnalyticsSourcesListRequest queries the sources/list endpoint.

type AnalyticsSourcesListResponse added in v1.260328.0

type AnalyticsSourcesListResponse struct {
	Size           int                        `json:"size,omitempty"`
	Results        []AnalyticsSourcesListItem `json:"results,omitempty"`
	MeetsThreshold bool                       `json:"meetsThreshold,omitempty"`
}

AnalyticsSourcesListResponse wraps sources/list results.

type AnalyticsSourcesPage added in v1.260328.0

type AnalyticsSourcesPage struct {
	AppID          string                       `json:"appId"`
	StartDate      string                       `json:"startDate"`
	EndDate        string                       `json:"endDate"`
	Measure        string                       `json:"measure"`
	GroupDimension string                       `json:"groupDimension"`
	Result         *AnalyticsTimeseriesResponse `json:"result,omitempty"`
}

AnalyticsSourcesPage reproduces the Acquisition > Sources page default view.

type AnalyticsSubscriptionsSummary added in v1.260328.0

type AnalyticsSubscriptionsSummary struct {
	AppID                     string                      `json:"appId"`
	StartDate                 string                      `json:"startDate"`
	EndDate                   string                      `json:"endDate"`
	Summary                   []AnalyticsMeasureResult    `json:"summary,omitempty"`
	PlanTimeline              []AnalyticsTimeseriesResult `json:"planTimeline,omitempty"`
	ActivePlansBySubscription *AnalyticsBreakdown         `json:"activePlansBySubscription,omitempty"`
	SubscriptionRetention     *AnalyticsCohortsResponse   `json:"subscriptionRetention,omitempty"`
}

AnalyticsSubscriptionsSummary bundles the private subscriptions summary page.

type AnalyticsTimeseriesGroup added in v1.260328.0

type AnalyticsTimeseriesGroup struct {
	Metric    string `json:"metric,omitempty"`
	Dimension string `json:"dimension,omitempty"`
	Rank      string `json:"rank,omitempty"`
	Limit     int    `json:"limit,omitempty"`
}

AnalyticsTimeseriesGroup groups a timeseries by a dimension.

type AnalyticsTimeseriesRequest added in v1.260328.0

type AnalyticsTimeseriesRequest struct {
	AppID            string
	StartDate        string
	EndDate          string
	StartTime        string
	EndTime          string
	Measures         []string
	Frequency        string
	Group            *AnalyticsTimeseriesGroup
	DimensionFilters []AnalyticsDimensionFilter
}

AnalyticsTimeseriesRequest describes a private timeseries query.

type AnalyticsTimeseriesResponse added in v1.260328.0

type AnalyticsTimeseriesResponse struct {
	Size    int                         `json:"size,omitempty"`
	Results []AnalyticsTimeseriesResult `json:"results,omitempty"`
}

AnalyticsTimeseriesResponse wraps private timeseries responses.

type AnalyticsTimeseriesResult added in v1.260328.0

type AnalyticsTimeseriesResult struct {
	AdamID string           `json:"adamId,omitempty"`
	Group  any              `json:"group,omitempty"`
	Data   []map[string]any `json:"data,omitempty"`
	Totals map[string]any   `json:"totals,omitempty"`
}

AnalyticsTimeseriesResult is a dynamic private timeseries response row set.

type AnalyticsV2DimensionValuesRequest added in v1.260328.0

type AnalyticsV2DimensionValuesRequest struct {
	AppID            string
	StartTime        string
	EndTime          string
	Measures         []string
	Frequency        string
	Dimensions       []string
	DimensionFilters []AnalyticsDimensionFilter
}

AnalyticsV2DimensionValuesRequest queries analytics v2 dimension values.

type AnalyticsV2DimensionValuesResponse added in v1.260328.0

type AnalyticsV2DimensionValuesResponse struct {
	Size    int                                `json:"size,omitempty"`
	Results []AnalyticsV2DimensionValuesResult `json:"results,omitempty"`
}

AnalyticsV2DimensionValuesResponse wraps v2 dimension-values results.

type AnalyticsV2DimensionValuesResult added in v1.260328.0

type AnalyticsV2DimensionValuesResult struct {
	AdamID     string                        `json:"adamId,omitempty"`
	Dimension  string                        `json:"dimension,omitempty"`
	ActualSize int                           `json:"actualSize,omitempty"`
	Values     []AnalyticsBenchmarkPeerGroup `json:"values,omitempty"`
}

AnalyticsV2DimensionValuesResult is a v2 dimension-values result row.

type AnalyticsV2TimeSeriesRequest added in v1.260328.0

type AnalyticsV2TimeSeriesRequest struct {
	AppID            string
	StartTime        string
	EndTime          string
	Measures         []string
	Frequency        string
	DimensionFilters []AnalyticsDimensionFilter
}

AnalyticsV2TimeSeriesRequest queries analytics v2 time-series data.

type AnalyticsV2TimeSeriesResponse added in v1.260328.0

type AnalyticsV2TimeSeriesResponse struct {
	Size    int                           `json:"size,omitempty"`
	Results []AnalyticsV2TimeSeriesResult `json:"results,omitempty"`
}

AnalyticsV2TimeSeriesResponse wraps v2 time-series results.

type AnalyticsV2TimeSeriesResult added in v1.260328.0

type AnalyticsV2TimeSeriesResult struct {
	AdamID         string           `json:"adamId,omitempty"`
	Group          any              `json:"group,omitempty"`
	Data           []map[string]any `json:"data,omitempty"`
	Totals         any              `json:"totals,omitempty"`
	MeetsThreshold map[string]bool  `json:"meetsThreshold,omitempty"`
}

AnalyticsV2TimeSeriesResult is a v2 time-series result row.

type AppAvailability

type AppAvailability struct {
	ID                             string   `json:"id"`
	Type                           string   `json:"type,omitempty"`
	AvailableInNewTerritories      bool     `json:"availableInNewTerritories"`
	AvailableTerritories           []string `json:"availableTerritories,omitempty"`
	AvailableTerritoriesLoaded     bool     `json:"-"`
	AvailableInNewTerritoriesKnown bool     `json:"-"`
}

AppAvailability models the internal web API app availability resource.

type AppAvailabilityCreateAttributes

type AppAvailabilityCreateAttributes struct {
	AppID                     string   `json:"-"`
	AvailableInNewTerritories bool     `json:"-"`
	AvailableTerritories      []string `json:"-"`
}

AppAvailabilityCreateAttributes defines inputs for creating initial app availability.

type AppClipBundleIDCapabilitySyncRequest added in v1.260601.0

type AppClipBundleIDCapabilitySyncRequest struct {
	BundleID         string
	ParentBundleID   string
	Capability       string
	Enabled          bool
	Settings         []BundleIDCapabilitySetting
	SettingsProvided bool
}

AppClipBundleIDCapabilitySyncRequest updates an App Clip Bundle ID capability set through Apple's web-session bundleIds patch payload.

type AppClipBundleIDCapabilitySyncResult added in v1.260601.0

type AppClipBundleIDCapabilitySyncResult struct {
	BundleID       string `json:"bundleId"`
	ParentBundleID string `json:"parentBundleId"`
	Capability     string `json:"capability"`
	Enabled        bool   `json:"enabled"`
	Changed        bool   `json:"changed"`
	Status         string `json:"status"`
}

AppClipBundleIDCapabilitySyncResult summarizes the private capability sync. Changed is false when the requested parent relationship, enabled state, and any explicitly provided settings were already in place and no PATCH was sent.

type AppCompatibility added in v1.260531.0

type AppCompatibility struct {
	AppID              string `json:"appId"`
	IOSAppOnMac        *bool  `json:"iosAppOnMac,omitempty"`
	IOSAppOnVisionPro  *bool  `json:"iosAppOnVisionPro,omitempty"`
	MacSettingID       string `json:"macSettingId,omitempty"`
	VisionProSettingID string `json:"visionProSettingId,omitempty"`
}

AppCompatibility captures app-level App Store compatibility opt-in settings.

type AppCreateAttributes

type AppCreateAttributes struct {
	Name          string `json:"-"`
	SKU           string `json:"sku"`
	PrimaryLocale string `json:"primaryLocale"`
	BundleID      string `json:"bundleId"`
	CompanyName   string `json:"companyName,omitempty"`
	Platform      string `json:"-"`
	VersionString string `json:"-"`
}

AppCreateAttributes defines app creation inputs for the internal web API.

type AppDataUsage

type AppDataUsage struct {
	ID             string `json:"id"`
	Category       string `json:"category,omitempty"`
	Purpose        string `json:"purpose,omitempty"`
	DataProtection string `json:"dataProtection,omitempty"`
}

AppDataUsage models one appDataUsages resource.

type AppDataUsageCategory

type AppDataUsageCategory struct {
	ID       string `json:"id"`
	Deleted  bool   `json:"deleted,omitempty"`
	Grouping string `json:"grouping,omitempty"`
}

AppDataUsageCategory models one appDataUsageCategories resource.

type AppDataUsageDataProtection

type AppDataUsageDataProtection struct {
	ID      string `json:"id"`
	Deleted bool   `json:"deleted,omitempty"`
}

AppDataUsageDataProtection models one appDataUsageDataProtections resource.

type AppDataUsagePurpose

type AppDataUsagePurpose struct {
	ID      string `json:"id"`
	Deleted bool   `json:"deleted,omitempty"`
}

AppDataUsagePurpose models one appDataUsagePurposes resource.

type AppDataUsagesPublishState

type AppDataUsagesPublishState struct {
	ID             string `json:"id"`
	Published      bool   `json:"published"`
	PublishedKnown bool   `json:"-"`
}

AppDataUsagesPublishState captures publication state for app privacy data usages.

type AppDeclaration added in v1.260904.0

type AppDeclaration struct {
	AppID           string `json:"appId"`
	RequirementID   string `json:"requirementId"`
	RequirementName string `json:"requirementName"`
	Ref             string `json:"ref,omitempty"`
	Status          string `json:"status,omitempty"`
	FormID          string `json:"formId,omitempty"`
	DateSigned      string `json:"dateSigned,omitempty"`
	Required        bool   `json:"required"`
}

AppDeclaration reports one App Store Regulations & Permits requirement that App Store Connect tracks for an app.

type AppDistribution added in v1.260904.0

type AppDistribution struct {
	AppID                 string `json:"appId"`
	Name                  string `json:"name,omitempty"`
	BundleID              string `json:"bundleId,omitempty"`
	DistributionType      string `json:"distributionType,omitempty"`
	EducationDiscountType string `json:"educationDiscountType,omitempty"`
}

AppDistribution captures the app-level distribution method attributes that App Store Connect exposes only through the internal web API.

type AppDistributionSetRequest added in v1.260907.0

type AppDistributionSetRequest struct {
	AppID                 string
	DistributionType      string
	EducationDiscountType string
}

AppDistributionSetRequest describes one app-level distribution update. DistributionType must be APP_STORE or CUSTOM. For APP_STORE, an empty EducationDiscountType preserves the current DISCOUNTED or NOT_DISCOUNTED value returned by the preflight read. CUSTOM always uses NOT_APPLICABLE.

type AppDistributionUnverifiedError added in v1.260907.0

type AppDistributionUnverifiedError struct {
	Err error
}

AppDistributionUnverifiedError reports a distribution write whose provider outcome could not be established. Callers should inspect the returned receipt and verify the app before retrying.

func (*AppDistributionUnverifiedError) Error added in v1.260907.0

func (*AppDistributionUnverifiedError) Unwrap added in v1.260907.0

type AppRemovalState added in v1.260904.0

type AppRemovalState struct {
	ID                        string
	Name                      string
	BundleID                  string
	Removed                   bool
	RemovedKnown              bool
	AppStoreLegacyStatus      string
	Marketplace               string
	VersionStates             []string
	DisplayableVersionsLoaded bool
}

AppRemovalState is the read model used to preflight and verify web app removal. Field names match the captured removed-apps listing on GET /apps.

type AppResponse

type AppResponse struct {
	Data struct {
		ID         string         `json:"id"`
		Type       string         `json:"type"`
		Attributes map[string]any `json:"attributes"`
	} `json:"data"`
}

AppResponse is the app response payload from internal create/find calls.

type AppStatusChange added in v1.260904.0

type AppStatusChange struct {
	ID              string `json:"id"`
	AppStoreState   string `json:"appStoreState,omitempty"`
	AppVersionState string `json:"appVersionState,omitempty"`
	Date            string `json:"date,omitempty"`
	Initiator       string `json:"initiator,omitempty"`
}

AppStatusChange is one recorded App Store version status transition.

type AppStatusHistory added in v1.260904.0

type AppStatusHistory struct {
	AppID    string                    `json:"appId"`
	Versions []AppStatusHistoryVersion `json:"versions"`
}

AppStatusHistory groups App Store version status changes for one app.

type AppStatusHistoryVersion added in v1.260904.0

type AppStatusHistoryVersion struct {
	VersionID     string            `json:"versionId"`
	VersionString string            `json:"versionString,omitempty"`
	Platform      string            `json:"platform,omitempty"`
	CreatedDate   string            `json:"createdDate,omitempty"`
	Changes       []AppStatusChange `json:"changes"`
}

AppStatusHistoryVersion holds the status changes recorded for one app version.

type AppStoreVersionForReview

type AppStoreVersionForReview struct {
	ID       string `json:"id"`
	Version  string `json:"version,omitempty"`
	Platform string `json:"platform,omitempty"`
}

AppStoreVersionForReview describes app version context attached to review data.

type AppTaxCategory added in v1.260907.0

type AppTaxCategory struct {
	ID                  string   `json:"id,omitempty"`
	AppID               string   `json:"appId"`
	CategoryID          string   `json:"categoryId,omitempty"`
	CategoryName        string   `json:"categoryName,omitempty"`
	EnabledConditionIDs []string `json:"enabledConditionIds,omitempty"`
	Configured          bool     `json:"configured"`
}

AppTaxCategory describes the explicit tax category assigned to an app. Configured is false when Apple's appTaxCategories relationship is absent (Apple reports that state as a 404 for apps using the UI default).

type AppTransferStatus added in v1.260907.0

type AppTransferStatus struct {
	Raw       json.RawMessage
	AppID     string
	Presence  string
	RequestID string
	State     string
}

AppTransferStatus preserves the app response, with a summary for human output. Presence is unknown when Apple omits linkage, none for explicit null, and present when Apple returns a transfer reference. It does not imply eligibility.

func (AppTransferStatus) MarshalJSON added in v1.260907.0

func (s AppTransferStatus) MarshalJSON() ([]byte, error)

MarshalJSON returns Apple's envelope without flattening or dropping fields.

type AuthSession

type AuthSession struct {
	Client           *http.Client
	ProviderID       int64
	PublicProviderID string
	ProviderName     string
	TeamID           string
	UserEmail        string
	DeveloperTeamID  string

	// Continuation state needed after a 409 SRP completion response.
	ServiceKey       string
	AppleIDSessionID string
	SCNT             string
	// contains filtered or unexported fields
}

AuthSession holds authenticated web-session state for internal API calls.

func LoadCachedSession

func LoadCachedSession(username string) (*AuthSession, bool, error)

LoadCachedSession loads a cached web session cookie jar without validating it against the live App Store Connect session endpoint. This is used for best-effort relogin attempts that want to preserve Apple trust cookies.

func LoadLastCachedSession

func LoadLastCachedSession() (*AuthSession, bool, error)

LoadLastCachedSession loads the last cached web session cookie jar without validating it against the live App Store Connect session endpoint.

func Login

func Login(ctx context.Context, creds LoginCredentials) (*AuthSession, error)

Login performs Apple ID SRP authentication and returns a web session.

If 2FA is required, Login returns a non-nil partial session and an error wrapping *TwoFactorRequiredError. The caller can continue with SubmitTwoFactorCode.

func LoginWithClient

func LoginWithClient(ctx context.Context, client *http.Client, creds LoginCredentials) (*AuthSession, error)

LoginWithClient performs Apple ID SRP authentication reusing an existing HTTP client and cookie jar. This is used for best-effort relogin attempts that should preserve Apple trust cookies from a cached session.

func ResumeCachedSessionWithoutPersist added in v1.260831.0

func ResumeCachedSessionWithoutPersist(ctx context.Context, username string) (*AuthSession, bool, error)

ResumeCachedSessionWithoutPersist validates a cached session for one Apple ID without prompting or writing/migrating cached state.

func ResumeLastCachedSessionWithoutPersist added in v1.260831.0

func ResumeLastCachedSessionWithoutPersist(ctx context.Context) (*AuthSession, bool, error)

ResumeLastCachedSessionWithoutPersist validates the last cached session without prompting or writing/migrating cached state.

func TryResumeLastSession

func TryResumeLastSession(ctx context.Context) (*AuthSession, bool, error)

TryResumeLastSession attempts to resume the last successful web session.

func TryResumeSession

func TryResumeSession(ctx context.Context, username string) (*AuthSession, bool, error)

TryResumeSession attempts to resume a session for a specific Apple ID.

func (*AuthSession) SetPreparedTwoFactorState added in v1.260328.0

func (s *AuthSession) SetPreparedTwoFactorState(method string, phoneID int, phoneMode, destination string, requested bool)

func (*AuthSession) SetTwoFactorCodeRequested added in v1.260328.0

func (s *AuthSession) SetTwoFactorCodeRequested(requested bool)

func (*AuthSession) TwoFactorCodeRequested added in v1.260328.0

func (s *AuthSession) TwoFactorCodeRequested() bool

func (*AuthSession) TwoFactorDestination added in v1.260328.0

func (s *AuthSession) TwoFactorDestination() string

func (*AuthSession) TwoFactorMethod added in v1.260328.0

func (s *AuthSession) TwoFactorMethod() string

func (*AuthSession) TwoFactorPhoneID added in v1.260328.0

func (s *AuthSession) TwoFactorPhoneID() int

func (*AuthSession) TwoFactorPhoneMode added in v1.260328.0

func (s *AuthSession) TwoFactorPhoneMode() string

type BundleIDCapabilityOption added in v1.260601.0

type BundleIDCapabilityOption struct {
	Key              string `json:"key"`
	Name             string `json:"name,omitempty"`
	Description      string `json:"description,omitempty"`
	Enabled          *bool  `json:"enabled,omitempty"`
	EnabledByDefault *bool  `json:"enabledByDefault,omitempty"`
	SupportsWildcard *bool  `json:"supportsWildcard,omitempty"`
}

BundleIDCapabilityOption describes one option inside a capability setting.

type BundleIDCapabilitySetting added in v1.260601.0

type BundleIDCapabilitySetting struct {
	Key              string                     `json:"key"`
	Name             string                     `json:"name,omitempty"`
	Description      string                     `json:"description,omitempty"`
	EnabledByDefault *bool                      `json:"enabledByDefault,omitempty"`
	Visible          *bool                      `json:"visible,omitempty"`
	AllowedInstances string                     `json:"allowedInstances,omitempty"`
	MinInstances     *int                       `json:"minInstances,omitempty"`
	Options          []BundleIDCapabilityOption `json:"options,omitempty"`
}

BundleIDCapabilitySetting describes an App Store Connect bundle ID capability setting.

type CIDayUsage

type CIDayUsage struct {
	Date           string `json:"date"`
	Duration       int    `json:"duration"`
	NumberOfBuilds int    `json:"number_of_builds,omitempty"`
}

CIDayUsage describes usage for a single day.

func (*CIDayUsage) UnmarshalJSON

func (d *CIDayUsage) UnmarshalJSON(data []byte) error

type CIEncryptionKeyResponse

type CIEncryptionKeyResponse struct {
	Key string `json:"key"`
}

CIEncryptionKeyResponse is the response from /ci/auth/keys/client-encryption.

type CIEnvironmentVariable

type CIEnvironmentVariable struct {
	ID    string                     `json:"id"`
	Name  string                     `json:"name"`
	Value CIEnvironmentVariableValue `json:"value"`
}

CIEnvironmentVariable represents a workflow environment variable.

func ExtractEnvVars

func ExtractEnvVars(content json.RawMessage) ([]CIEnvironmentVariable, error)

ExtractEnvVars extracts environment_variables from raw workflow content.

type CIEnvironmentVariableValue

type CIEnvironmentVariableValue struct {
	Plaintext     *string `json:"plaintext,omitempty"`
	Ciphertext    *string `json:"ciphertext,omitempty"`
	RedactedValue *string `json:"redacted_value,omitempty"`
}

CIEnvironmentVariableValue holds exactly one of plaintext, ciphertext, or redacted.

type CIMonthUsage

type CIMonthUsage struct {
	Month          int `json:"month"`
	Year           int `json:"year"`
	Duration       int `json:"duration"`
	NumberOfBuilds int `json:"number_of_builds,omitempty"`
}

CIMonthUsage describes usage for a single month.

func (*CIMonthUsage) UnmarshalJSON

func (m *CIMonthUsage) UnmarshalJSON(data []byte) error

type CINextBuildNumber added in v1.260907.0

type CINextBuildNumber struct {
	NextBuildNumber int    `json:"next_build_number"`
	TestFlightURL   string `json:"testflight_url,omitempty"`
}

CINextBuildNumber is the next build number configured for an Xcode Cloud product.

type CIProduct

type CIProduct struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	BundleID string `json:"bundle_id"`
	Type     string `json:"type"`
	IconURL  string `json:"icon_url,omitempty"`
}

CIProduct describes a Xcode Cloud product.

type CIProductEnvVarRequest

type CIProductEnvVarRequest struct {
	Name        string                     `json:"name"`
	Value       CIEnvironmentVariableValue `json:"value"`
	IsLocked    bool                       `json:"is_locked"`
	WorkflowIDs []string                   `json:"workflow_ids"`
}

CIProductEnvVarRequest is the PUT body for creating/updating a shared env var.

type CIProductEnvironmentVariable

type CIProductEnvironmentVariable struct {
	ID                       string                     `json:"id"`
	Name                     string                     `json:"name"`
	Value                    CIEnvironmentVariableValue `json:"value"`
	IsLocked                 bool                       `json:"is_locked"`
	RelatedWorkflowSummaries []CIRelatedWorkflowSummary `json:"related_workflow_summaries,omitempty"`
}

CIProductEnvironmentVariable represents a shared (product-level) environment variable.

type CIProductListResponse

type CIProductListResponse struct {
	Items []CIProduct `json:"items"`
}

CIProductListResponse is the response from the products endpoint.

type CIProductUsage

type CIProductUsage struct {
	ProductID              string         `json:"product_id"`
	ProductName            string         `json:"product_name,omitempty"`
	BundleID               string         `json:"bundle_id,omitempty"`
	Usage                  []CIMonthUsage `json:"usage,omitempty"`
	UsageInMinutes         int            `json:"usage_in_minutes,omitempty"`
	UsageInSeconds         int            `json:"usage_in_seconds,omitempty"`
	NumberOfBuilds         int            `json:"number_of_builds,omitempty"`
	PreviousUsageInMinutes int            `json:"previous_usage_in_minutes,omitempty"`
	PreviousNumberOfBuilds int            `json:"previous_number_of_builds,omitempty"`
}

CIProductUsage describes per-product monthly usage.

type CIRelatedWorkflowSummary

type CIRelatedWorkflowSummary struct {
	ID             string `json:"id"`
	Name           string `json:"name"`
	Disabled       bool   `json:"disabled"`
	Locked         bool   `json:"locked"`
	LastModifiedBy string `json:"last_modified_by,omitempty"`
	LastModifiedAt string `json:"last_modified_at,omitempty"`
}

CIRelatedWorkflowSummary describes a workflow linked to a shared env var.

type CIScmConnectionStatus added in v1.260907.0

type CIScmConnectionStatus struct {
	Raw    json.RawMessage `json:"-"`
	Status string          `json:"status"`
	Error  json.RawMessage `json:"error,omitempty"`
}

CIScmConnectionStatus is the health response for one known SCM provider. Error remains opaque because its schema is unverified; Raw preserves the complete response, including unknown top-level fields.

func (CIScmConnectionStatus) MarshalJSON added in v1.260907.0

func (s CIScmConnectionStatus) MarshalJSON() ([]byte, error)

MarshalJSON returns Apple's original connection-status object when it came from the API, retaining unknown fields and the source response shape.

func (*CIScmConnectionStatus) UnmarshalJSON added in v1.260907.0

func (s *CIScmConnectionStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON captures the source status object while retaining an opaque error value exactly as JSON.

type CIScmProvider added in v1.260907.0

type CIScmProvider struct {
	Raw                 json.RawMessage `json:"-"`
	ID                  string          `json:"id"`
	Provider            string          `json:"provider"`
	ProviderDisplayName string          `json:"provider_display_name"`
	IsRegistered        *bool           `json:"is_registered,omitempty"`
	IsUserConnected     *bool           `json:"is_user_connected,omitempty"`
}

CIScmProvider is one SCM provider returned by the Xcode Cloud web API.

The API is private and its response can gain fields independently of the typed client. Raw therefore keeps the original provider object available to JSON callers while the known fields provide stable values for human output. Boolean pointers distinguish an omitted value from an explicit false value.

func (CIScmProvider) MarshalJSON added in v1.260907.0

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

MarshalJSON returns Apple's original provider object when it came from the API, retaining unknown fields and the source snake_case keys.

func (*CIScmProvider) UnmarshalJSON added in v1.260907.0

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

UnmarshalJSON captures the source object while decoding fields used by the table and Markdown renderers.

type CIUsageDays

type CIUsageDays struct {
	Usage         []CIDayUsage      `json:"usage"`
	ProductUsage  []CIProductUsage  `json:"product_usage,omitempty"`
	WorkflowUsage []CIWorkflowUsage `json:"workflow_usage"`
	Info          CIUsageInfo       `json:"info"`
}

CIUsageDays is the response from the daily usage endpoint.

type CIUsageInfo

type CIUsageInfo struct {
	StartMonth         int                `json:"start_month,omitempty"`
	StartYear          int                `json:"start_year,omitempty"`
	EndMonth           int                `json:"end_month,omitempty"`
	EndYear            int                `json:"end_year,omitempty"`
	CanViewAllProducts bool               `json:"can_view_all_products,omitempty"`
	Current            CIUsageInfoCurrent `json:"current,omitempty"`
	Previous           CIUsageInfoCurrent `json:"previous,omitempty"`
	Links              map[string]string  `json:"links,omitempty"`
}

CIUsageInfo holds metadata about the usage response.

type CIUsageInfoCurrent

type CIUsageInfoCurrent struct {
	Builds        int `json:"builds"`
	Used          int `json:"used"`
	Average30Days int `json:"average_30_days"`
}

CIUsageInfoCurrent summarizes usage in the current/previous period.

type CIUsageMonths

type CIUsageMonths struct {
	Usage        []CIMonthUsage   `json:"usage"`
	ProductUsage []CIProductUsage `json:"product_usage"`
	Info         CIUsageInfo      `json:"info"`
}

CIUsageMonths is the response from the monthly usage endpoint.

type CIUsagePlan

type CIUsagePlan struct {
	Name          string `json:"name"`
	ResetDate     string `json:"reset_date"`
	ResetDateTime string `json:"reset_date_time"`
	Available     int    `json:"available"`
	Used          int    `json:"used"`
	Total         int    `json:"total"`
}

CIUsagePlan describes the Xcode Cloud plan quota.

type CIUsageSummary

type CIUsageSummary struct {
	Plan  CIUsagePlan       `json:"plan"`
	Links map[string]string `json:"links,omitempty"`
}

CIUsageSummary is the response from the usage summary endpoint.

type CIVersionAlias added in v1.260907.0

type CIVersionAlias struct {
	ID                       string                     `json:"id"`
	Name                     string                     `json:"name"`
	Type                     string                     `json:"type"`
	Locked                   bool                       `json:"locked"`
	Build                    json.RawMessage            `json:"build"`
	BuildName                string                     `json:"build_name"`
	RelatedWorkflowSummaries []CIRelatedWorkflowSummary `json:"related_workflow_summaries,omitempty"`
	BuildSupported           bool                       `json:"build_supported"`
}

CIVersionAlias is a product version alias from the Xcode Cloud web API.

type CIVersionAliasListResponse added in v1.260907.0

type CIVersionAliasListResponse struct {
	Items []CIVersionAlias `json:"items"`
}

CIVersionAliasListResponse is the version-alias list envelope.

type CIVersionAliasRequest added in v1.260907.0

type CIVersionAliasRequest struct {
	Name   string          `json:"name"`
	Type   string          `json:"type"`
	Build  json.RawMessage `json:"build"`
	Locked bool            `json:"locked"`
}

CIVersionAliasRequest is the exact four-field payload accepted by the Xcode Cloud version-alias save endpoint.

type CIWorkflow

type CIWorkflow struct {
	ID      string            `json:"id"`
	Content CIWorkflowContent `json:"content"`
}

CIWorkflow describes a Xcode Cloud workflow.

type CIWorkflowConfig

type CIWorkflowConfig struct {
	Name                        string          `json:"name"`
	Description                 string          `json:"description,omitempty"`
	Disabled                    bool            `json:"disabled"`
	Locked                      bool            `json:"locked"`
	XcodeVersion                json.RawMessage `json:"xcode_version,omitempty"`
	MacOSVersion                json.RawMessage `json:"macos_version,omitempty"`
	StartConditions             json.RawMessage `json:"start_conditions,omitempty"`
	Actions                     json.RawMessage `json:"actions,omitempty"`
	PostActions                 json.RawMessage `json:"post_actions,omitempty"`
	Clean                       json.RawMessage `json:"clean,omitempty"`
	ContainerFilePath           string          `json:"container_file_path,omitempty"`
	Repo                        json.RawMessage `json:"repo,omitempty"`
	ProductEnvironmentVariables []string        `json:"product_environment_variables,omitempty"`
}

CIWorkflowConfig captures workflow fields surfaced by the web UI. Nested and evolving structures are kept as raw JSON for forward compatibility.

func ExtractWorkflowConfig

func ExtractWorkflowConfig(content json.RawMessage) (*CIWorkflowConfig, error)

ExtractWorkflowConfig extracts known workflow configuration fields from raw workflow content.

type CIWorkflowContent

type CIWorkflowContent struct {
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
}

CIWorkflowContent holds the workflow's configuration including its name.

type CIWorkflowFull

type CIWorkflowFull struct {
	ID      string          `json:"id"`
	Content json.RawMessage `json:"content"`
}

CIWorkflowFull is the full workflow body for GET/PUT round-trips. Uses json.RawMessage for Content to preserve unknown fields.

type CIWorkflowListResponse

type CIWorkflowListResponse struct {
	Items []CIWorkflow `json:"items"`
}

CIWorkflowListResponse is the response from the workflows endpoint.

type CIWorkflowUsage

type CIWorkflowUsage struct {
	WorkflowID             string       `json:"workflow_id"`
	WorkflowName           string       `json:"workflow_name,omitempty"`
	Usage                  []CIDayUsage `json:"usage,omitempty"`
	UsageInMinutes         int          `json:"usage_in_minutes,omitempty"`
	NumberOfBuilds         int          `json:"number_of_builds,omitempty"`
	PreviousUsageInMinutes int          `json:"previous_usage_in_minutes,omitempty"`
	PreviousNumberOfBuilds int          `json:"previous_number_of_builds,omitempty"`
}

CIWorkflowUsage describes per-workflow daily usage.

type Client

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

Client is an internal web API client using a web session cookie jar.

func NewAnalyticsClient added in v1.260328.0

func NewAnalyticsClient(session *AuthSession) *Client

NewAnalyticsClient creates an analytics client reusing an authenticated web session.

func NewCIClient

func NewCIClient(session *AuthSession) *Client

NewCIClient creates a CI API client reusing an authenticated web session. The CI API lives at /ci/api and uses the same session cookies as IRIS.

func NewClient

func NewClient(session *AuthSession) *Client

NewClient creates an internal web API client from an authenticated session.

func (*Client) AcceptAgreements added in v1.260825.0

AcceptAgreements accepts the given Developer Portal agreements for the web session's team. Apple only allows the Account Holder to accept agreements.

func (*Client) AssignDeveloperAppGroup added in v1.260816.0

func (c *Client) AssignDeveloperAppGroup(ctx context.Context, request DeveloperAppGroupAssignRequest) (*DeveloperAppGroupAssignResult, error)

AssignDeveloperAppGroup associates an App Group with a Bundle ID while preserving Apple's complete current capability graph. The result is verified by re-reading the Bundle ID.

func (*Client) CreateAPIKey added in v1.260807.0

func (c *Client) CreateAPIKey(ctx context.Context, attrs APIKeyCreateAttributes) (*APIKey, error)

CreateAPIKey creates an all-apps team API key using the selected web session.

func (*Client) CreateApp

func (c *Client) CreateApp(ctx context.Context, attrs AppCreateAttributes) (*AppResponse, error)

CreateApp creates an app with the internal web API.

func (*Client) CreateAppAvailability

func (c *Client) CreateAppAvailability(ctx context.Context, attrs AppAvailabilityCreateAttributes) (*AppAvailability, error)

CreateAppAvailability creates the initial app availability via the internal web API.

func (*Client) CreateAppDataUsage

func (c *Client) CreateAppDataUsage(ctx context.Context, appID string, tuple DataUsageTuple) (*AppDataUsage, error)

CreateAppDataUsage creates one data usage tuple for an app.

func (*Client) CreateCustomAppUser added in v1.260907.0

func (c *Client) CreateCustomAppUser(ctx context.Context, appID, appleID string) (*CustomAppUser, error)

CreateCustomAppUser sends the observed JSON:API create request once and validates the accepted resource's type, opaque ID, and exact account.

func (*Client) CreateDeveloperAppGroup added in v1.260816.0

func (c *Client) CreateDeveloperAppGroup(ctx context.Context, request DeveloperAppGroupCreateRequest) (*DeveloperAppGroup, error)

CreateDeveloperAppGroup registers an App Group through Developer Portal.

func (*Client) CreateDeveloperServiceID added in v1.260907.0

func (c *Client) CreateDeveloperServiceID(ctx context.Context, request DeveloperServiceIDCreateRequest) (*asc.WebServiceIDMutationResult, error)

CreateDeveloperServiceID registers a minimal Services ID. Capability and sign-in settings are deliberately not synthesized in this lifecycle slice. The successful response is followed by a detail read; if Apple omits the created resource from the response, the list is used to converge by exact identifier.

func (*Client) CreateDeveloperWebsitePushID added in v1.260907.0

func (c *Client) CreateDeveloperWebsitePushID(ctx context.Context, request DeveloperWebsitePushIDCreateRequest) (*asc.WebWebsitePushIDMutationResult, error)

CreateDeveloperWebsitePushID registers one Website Push ID using the modern JSON:API endpoint. It sends an explicitly empty capability relationship and refuses to write when the account's capability catalog or response graph is not empty and therefore cannot be preserved safely by this slice.

func (*Client) CreateInAppPurchaseSubmission added in v1.260531.0

func (c *Client) CreateInAppPurchaseSubmission(ctx context.Context, iapID string) (ReviewIAPSubmission, error)

CreateInAppPurchaseSubmission attaches a non-renewing in-app purchase to the next app version review via the private web flow.

This is the iris-API equivalent of clicking the IAP checkbox in "Add App In-App Purchase or Subscription" on the version submission page in App Store Connect. POST /iris/v1/inAppPurchaseSubmissions with the `submitWithNextAppStoreVersion` attribute set; the public ASC REST API has no equivalent for non-subscription IAPs.

func (*Client) CreateIndividualAPIKey added in v1.260907.0

func (c *Client) CreateIndividualAPIKey(ctx context.Context) error

CreateIndividualAPIKey creates the empty individual-key resource used by Apple's web flow. Apple does not return the created resource in this response; callers resolve it with the actor-filtered list before registering a public key.

func (*Client) CreateResolutionCenterDraftMessage added in v1.260907.0

func (c *Client) CreateResolutionCenterDraftMessage(ctx context.Context, threadID, messageBody string) (*ResolutionCenterDraftMessage, error)

CreateResolutionCenterDraftMessage creates the unsent draft that Apple uses as the source for a Resolution Center reply. The request shape mirrors the App Store Connect web client; the caller must explicitly decide when to send the resulting draft.

func (*Client) CreateSandboxAccount added in v1.260328.0

func (c *Client) CreateSandboxAccount(ctx context.Context, attrs SandboxAccountCreateAttributes) error

CreateSandboxAccount creates a sandbox tester by mirroring the current App Store Connect web flow: validate fields twice, then submit the create request.

func (*Client) CreateSubscriptionPlanAvailability added in v1.260616.0

func (c *Client) CreateSubscriptionPlanAvailability(ctx context.Context, subscriptionID, planType string, territoryIDs []string, availableInNewTerritories bool) (*SubscriptionPlanAvailability, error)

CreateSubscriptionPlanAvailability creates a subscription billing-plan availability.

func (*Client) CreateSubscriptionPlanPrices added in v1.260616.0

func (c *Client) CreateSubscriptionPlanPrices(ctx context.Context, subscriptionID, upfrontPricePointID, monthlyPricePointID string) (*SubscriptionPlanPricesResult, error)

CreateSubscriptionPlanPrices creates paired upfront and monthly prices through the inline subscription PATCH used by App Store Connect.

func (*Client) CreateSubscriptionSubmission

func (c *Client) CreateSubscriptionSubmission(ctx context.Context, subscriptionID string) (ReviewSubscriptionSubmission, error)

CreateSubscriptionSubmission attaches a subscription to the next app version review via the private web flow.

func (*Client) DeleteApp added in v1.260707.0

func (c *Client) DeleteApp(ctx context.Context, appID string) (*AppResponse, error)

DeleteApp marks an app as removed with the internal App Store Connect web API.

func (*Client) DeleteAppDataUsage

func (c *Client) DeleteAppDataUsage(ctx context.Context, appDataUsageID string) error

DeleteAppDataUsage deletes one appDataUsages resource.

func (*Client) DeleteCIProductEnvVar

func (c *Client) DeleteCIProductEnvVar(ctx context.Context, teamID, productID, varID string) error

DeleteCIProductEnvVar deletes a shared (product-level) environment variable. DELETE /teams/{teamID}/products/{productID}/product-environment-variables/{varID}

func (*Client) DeleteCIVersionAlias added in v1.260907.0

func (c *Client) DeleteCIVersionAlias(ctx context.Context, teamID, productID, aliasID string) error

DeleteCIVersionAlias deletes one custom alias for an Xcode Cloud product.

func (*Client) DeleteCustomAppUser added in v1.260907.0

func (c *Client) DeleteCustomAppUser(ctx context.Context, appID, recipientID string) error

DeleteCustomAppUser sends the observed JSON:API delete request once. Apple returns an empty 204 body; an empty body is accepted, while a present body must identify the deleted customAppUsers resource exactly.

func (*Client) DeleteDeveloperAppGroup added in v1.260904.0

func (c *Client) DeleteDeveloperAppGroup(ctx context.Context, request DeveloperAppGroupDeleteRequest) (*asc.WebAppGroupDeleteResult, error)

DeleteDeveloperAppGroup deletes an App Group registration. It fails closed when the group is still referenced by any Bundle ID and verifies the deletion by re-reading the team's App Group list.

func (*Client) DeleteDeveloperServiceID added in v1.260907.0

func (c *Client) DeleteDeveloperServiceID(ctx context.Context, request DeveloperServiceIDDeleteRequest) (*asc.WebServiceIDMutationResult, error)

DeleteDeveloperServiceID removes a Services ID after proving the requested resource is a SERVICES platform resource. A 404 on the post-delete detail read is the only successful convergence signal.

func (*Client) DeleteDeveloperWebsitePushID added in v1.260907.0

func (c *Client) DeleteDeveloperWebsitePushID(ctx context.Context, request DeveloperWebsitePushIDDeleteRequest) (*asc.WebWebsitePushIDMutationResult, error)

DeleteDeveloperWebsitePushID deletes one modern Website Push ID only when its detail response proves it is deletable and has no attached capability references. A successful 204 is followed by a canonical detail read and the legacy list read used by the existing Website Push list command.

func (*Client) DeleteIAPTaxCategory added in v1.260907.0

func (c *Client) DeleteIAPTaxCategory(ctx context.Context, iapID string, current *IAPTaxCategory) error

DeleteIAPTaxCategory removes only the discovered override. The IAP is retained.

func (*Client) DeleteResolutionCenterDraftMessage added in v1.260907.0

func (c *Client) DeleteResolutionCenterDraftMessage(ctx context.Context, draftID string) error

DeleteResolutionCenterDraftMessage removes an unsent Resolution Center draft. There is deliberately no retry: a transport error can leave Apple's mutation outcome ambiguous.

func (*Client) DeleteSandboxAccounts added in v1.260907.0

func (c *Client) DeleteSandboxAccounts(ctx context.Context, ids []string) error

DeleteSandboxAccounts deletes the selected private sandbox accounts. Apple accepts the selected IDs as one JSON object; the response body is ignored to mirror the web client, so callers must verify the result with a fresh list.

func (*Client) DeleteSubscriptionSubmission

func (c *Client) DeleteSubscriptionSubmission(ctx context.Context, subscriptionID string) error

DeleteSubscriptionSubmission detaches a subscription from the next app version review via the private web flow.

func (*Client) DisableDeveloperBundleIDCapability added in v1.260907.0

DisableDeveloperBundleIDCapability disables a supported Developer Portal-only Bundle ID capability and verifies the resulting graph. The private endpoint does not provide a reliable mutation response body, so a successful PATCH is accepted only after a fresh exact-resource read proves that no matching capability remains enabled.

func (*Client) DownloadAPIKey added in v1.260807.0

func (c *Client) DownloadAPIKey(ctx context.Context, keyID string) ([]byte, error)

DownloadAPIKey downloads and decodes the one-time P8 for an API key.

func (*Client) DownloadAgreement added in v1.260904.0

func (c *Client) DownloadAgreement(ctx context.Context, agreementID string) (*AgreementDownload, error)

DownloadAgreement fetches the content of one agreement from the team's Developer Portal agreement history. The reported download URL must be an HTTPS URL on the Developer Portal origin, and redirects to any other origin or scheme are rejected. Error messages never include the URL because it may be signed.

func (*Client) DownloadAttachment

func (c *Client) DownloadAttachment(ctx context.Context, signedURL string) ([]byte, int, error)

DownloadAttachment downloads binary attachment payload from a signed URL.

func (*Client) DownloadTransactionTaxReport added in v1.260907.0

func (c *Client) DownloadTransactionTaxReport(ctx context.Context, request TransactionTaxReportRequest) (*TransactionTaxReportDownload, error)

DownloadTransactionTaxReport mirrors the authenticated finance page's private generation flow: resolve the default SAP vendor, read the selected month, derive the UI's all-region list, generate once, poll the job, and open the same-origin ready artifact once.

func (*Client) EnableDeveloperBundleIDCapability added in v1.260810.0

EnableDeveloperBundleIDCapability enables a supported Developer Portal-only Bundle ID capability while preserving Apple's complete current capability relationship payload.

func (*Client) FindApp

func (c *Client) FindApp(ctx context.Context, bundleID string) (*AppResponse, error)

FindApp finds an existing app by bundle ID.

func (*Client) FindReviewIAP added in v1.260531.0

func (c *Client) FindReviewIAP(ctx context.Context, appID, iapID string) (ReviewIAP, bool, error)

FindReviewIAP finds a single app-scoped IAP through the private web flow.

The caller may pass either the iris IAP resource ID (a UUID, distinct from the numeric public-REST-API in-app purchase ID) or the product ID (e.g. `com.example.pro.lifetime`). The product-ID match exists because the public REST API surfaces a numeric ID that does not match the iris resource's ID, and users typically know either the iris UUID or the product ID — not both.

func (*Client) GetAPIKey added in v1.260807.0

func (c *Client) GetAPIKey(ctx context.Context, keyID string) (*APIKey, error)

GetAPIKey returns API key metadata, including its issuer/provider ID.

func (*Client) GetAgreementHistory added in v1.260904.0

func (c *Client) GetAgreementHistory(ctx context.Context) (*asc.WebAgreementsStatusResult, error)

GetAgreementHistory reads only the team's Developer Portal agreement history. It skips the App Store Connect contract-message banner so post-mutation verification does not fail on that unrelated read; ContractMessages is always empty in the result.

func (*Client) GetAgreementsStatus added in v1.260825.0

func (c *Client) GetAgreementsStatus(ctx context.Context) (*asc.WebAgreementsStatusResult, error)

GetAgreementsStatus reports the App Store Connect agreement banner and the team's Developer Portal agreement history in one pending-aware summary.

func (*Client) GetAnalyticsAppInfo added in v1.260328.0

func (c *Client) GetAnalyticsAppInfo(ctx context.Context, appID string) (*AnalyticsAppInfoResult, error)

GetAnalyticsAppInfo loads app metadata used by several analytics tabs.

func (*Client) GetAnalyticsBenchmarks added in v1.260328.0

func (c *Client) GetAnalyticsBenchmarks(ctx context.Context, appID string) (*AnalyticsBenchmarksSummary, error)

GetAnalyticsBenchmarks reproduces the Benchmarks summary cards.

func (*Client) GetAnalyticsCampaignsPage added in v1.260328.0

func (c *Client) GetAnalyticsCampaignsPage(ctx context.Context, appID, startDate, endDate string) (*AnalyticsCampaignsPage, error)

GetAnalyticsCampaignsPage reproduces the Acquisition > Campaigns page.

func (*Client) GetAnalyticsCohorts added in v1.260328.0

func (c *Client) GetAnalyticsCohorts(ctx context.Context, req AnalyticsCohortsRequest) (*AnalyticsCohortsResponse, error)

GetAnalyticsCohorts queries private cohort data.

func (*Client) GetAnalyticsDimensionValues added in v1.260328.0

func (c *Client) GetAnalyticsDimensionValues(ctx context.Context, req AnalyticsDimensionValuesRequest) (*AnalyticsDimensionValuesResponse, error)

GetAnalyticsDimensionValues queries available dimension values for a measure.

func (*Client) GetAnalyticsDimensions added in v1.260328.0

func (c *Client) GetAnalyticsDimensions(ctx context.Context, req AnalyticsDimensionsRequest) (*AnalyticsDimensionsResponse, error)

GetAnalyticsDimensions queries grouped dimension rows.

func (*Client) GetAnalyticsInAppEvents added in v1.260328.0

func (c *Client) GetAnalyticsInAppEvents(ctx context.Context, appID string) (*AnalyticsInAppEventsResponse, error)

GetAnalyticsInAppEvents loads the In-App Events list for an app.

func (*Client) GetAnalyticsInAppEventsPage added in v1.260328.0

func (c *Client) GetAnalyticsInAppEventsPage(ctx context.Context, appID, startDate, endDate string) (*AnalyticsInAppEventsPage, error)

GetAnalyticsInAppEventsPage reproduces the Acquisition > In-App Events page.

func (*Client) GetAnalyticsMeasures added in v1.260328.0

func (c *Client) GetAnalyticsMeasures(ctx context.Context, req AnalyticsMeasuresRequest) (*AnalyticsMeasuresResponse, error)

GetAnalyticsMeasures queries private analytics measure series.

func (*Client) GetAnalyticsOverview added in v1.260328.0

func (c *Client) GetAnalyticsOverview(ctx context.Context, appID, startDate, endDate string) (*AnalyticsOverview, error)

GetAnalyticsOverview recreates the overview dashboard from private web endpoints.

func (*Client) GetAnalyticsRetention added in v1.260328.0

func (c *Client) GetAnalyticsRetention(ctx context.Context, req AnalyticsRetentionRequest) (*AnalyticsRetentionResponse, error)

GetAnalyticsRetention queries private retention data.

func (*Client) GetAnalyticsSalesSummary added in v1.260328.0

func (c *Client) GetAnalyticsSalesSummary(ctx context.Context, appID, startDate, endDate string) (*AnalyticsSalesSummary, error)

GetAnalyticsSalesSummary reproduces the Monetization > Sales summary page.

func (*Client) GetAnalyticsSettings added in v1.260328.0

func (c *Client) GetAnalyticsSettings(ctx context.Context) (*AnalyticsSettingsResponse, error)

GetAnalyticsSettings loads the shared analytics settings payload.

func (*Client) GetAnalyticsSourcesList added in v1.260328.0

func (c *Client) GetAnalyticsSourcesList(ctx context.Context, req AnalyticsSourcesListRequest) (*AnalyticsSourcesListResponse, error)

GetAnalyticsSourcesList loads ranked analytics sources or campaigns.

func (*Client) GetAnalyticsSourcesPage added in v1.260328.0

func (c *Client) GetAnalyticsSourcesPage(ctx context.Context, appID, startDate, endDate string) (*AnalyticsSourcesPage, error)

GetAnalyticsSourcesPage reproduces the Acquisition > Sources page default view.

func (*Client) GetAnalyticsSubscriptionsSummary added in v1.260328.0

func (c *Client) GetAnalyticsSubscriptionsSummary(ctx context.Context, appID, startDate, endDate string) (*AnalyticsSubscriptionsSummary, error)

GetAnalyticsSubscriptionsSummary recreates the subscriptions summary page.

func (*Client) GetAnalyticsTimeseries added in v1.260328.0

func (c *Client) GetAnalyticsTimeseries(ctx context.Context, req AnalyticsTimeseriesRequest) (*AnalyticsTimeseriesResponse, error)

GetAnalyticsTimeseries queries private analytics timeseries rows.

func (*Client) GetAnalyticsV2DimensionValues added in v1.260328.0

GetAnalyticsV2DimensionValues loads benchmark peer groups from the v2 API.

func (*Client) GetAnalyticsV2TimeSeries added in v1.260328.0

func (c *Client) GetAnalyticsV2TimeSeries(ctx context.Context, req AnalyticsV2TimeSeriesRequest) (*AnalyticsV2TimeSeriesResponse, error)

GetAnalyticsV2TimeSeries loads benchmark week values from the v2 API.

func (*Client) GetApp added in v1.260707.0

func (c *Client) GetApp(ctx context.Context, appID string) (*AppResponse, error)

GetApp retrieves an app by ID using the internal web API.

func (*Client) GetAppAvailability

func (c *Client) GetAppAvailability(ctx context.Context, appID string) (*AppAvailability, error)

GetAppAvailability retrieves the internal web app availability resource for an app.

func (*Client) GetAppCompatibility added in v1.260531.0

func (c *Client) GetAppCompatibility(ctx context.Context, appID string) (*AppCompatibility, error)

GetAppCompatibility retrieves app-level App Store compatibility opt-in settings.

func (*Client) GetAppDataUsagesPublishState

func (c *Client) GetAppDataUsagesPublishState(ctx context.Context, appID string) (*AppDataUsagesPublishState, error)

GetAppDataUsagesPublishState fetches publication state for app data usages.

func (*Client) GetAppDistribution added in v1.260904.0

func (c *Client) GetAppDistribution(ctx context.Context, appID string) (*AppDistribution, error)

GetAppDistribution retrieves the app-level distribution method settings.

The public App Store Connect API does not expose distributionType, so this reads the internal apps resource, which returns the attribute verbatim.

func (*Client) GetAppRemovalState added in v1.260904.0

func (c *Client) GetAppRemovalState(ctx context.Context, appID string) (*AppRemovalState, error)

GetAppRemovalState reads the app attributes needed to check removal eligibility and to verify the post-PATCH removed state.

func (*Client) GetAppStatusHistory added in v1.260904.0

func (c *Client) GetAppStatusHistory(ctx context.Context, appID, versionID string) (*AppStatusHistory, error)

GetAppStatusHistory reads App Store version status changes for an app.

App Store Connect records status changes per app store version, and exposes no app-level history resource, so this lists the app's versions and then reads each version's state changes. A non-empty versionID skips the version list, verifies that version belongs to appID, and reads that single version.

func (*Client) GetAppTaxCategory added in v1.260907.0

func (c *Client) GetAppTaxCategory(ctx context.Context, appID string) (*AppTaxCategory, error)

GetAppTaxCategory reads an app's explicit tax category and enabled conditions. A tax-category 404 is treated as Apple's App Store Software UI default only after a successful app resource read verifies the app exists.

func (*Client) GetAppTransferStatus added in v1.260907.0

func (c *Client) GetAppTransferStatus(ctx context.Context, appID string) (*AppTransferStatus, error)

GetAppTransferStatus reads the app-attached transfer request through the private web API. It never follows the legacy transfer page or action links.

func (*Client) GetCIBuildVersions

func (c *Client) GetCIBuildVersions(ctx context.Context, teamID string) (json.RawMessage, error)

GetCIBuildVersions retrieves build-version configuration options. GET /teams/{teamID}/configuration-options/build-versions

func (*Client) GetCIConfigurationOptions

func (c *Client) GetCIConfigurationOptions(ctx context.Context, teamID string) (json.RawMessage, error)

GetCIConfigurationOptions retrieves team-wide workflow editor options. GET /teams/{teamID}/configuration-options-v10

func (*Client) GetCIEncryptionKey

func (c *Client) GetCIEncryptionKey(ctx context.Context) (*CIEncryptionKeyResponse, error)

GetCIEncryptionKey fetches the P-256 public key for secret encryption. GET /ci/auth/keys/client-encryption

func (*Client) GetCINextBuildNumber added in v1.260907.0

func (c *Client) GetCINextBuildNumber(ctx context.Context, teamID, productID string) (*CINextBuildNumber, error)

func (*Client) GetCIProductConfigurationOptions

func (c *Client) GetCIProductConfigurationOptions(ctx context.Context, teamID, productID string) (json.RawMessage, error)

GetCIProductConfigurationOptions retrieves product-scoped workflow editor options. GET /teams/{teamID}/products/{productID}/product-configuration-options-v4

func (*Client) GetCISchemes

func (c *Client) GetCISchemes(
	ctx context.Context,
	teamID, productID, containerFilePath string,
	limit int,
	continuationOffset string,
) (json.RawMessage, error)

GetCISchemes retrieves available schemes for a product. GET /teams/{teamID}/products/{productID}/schemes

func (*Client) GetCIScmConnectionStatus added in v1.260907.0

func (c *Client) GetCIScmConnectionStatus(ctx context.Context, teamID, scmProviderID string) (*CIScmConnectionStatus, error)

GetCIScmConnectionStatus returns the web connection health for one SCM provider selected by its private provider ID.

func (*Client) GetCIScmProviders added in v1.260907.0

func (c *Client) GetCIScmProviders(ctx context.Context, teamID string) ([]CIScmProvider, error)

GetCIScmProviders returns the web Xcode Cloud SCM provider inventory. The endpoint returns a plain JSON array and does not expose pagination.

func (*Client) GetCISlackChannels

func (c *Client) GetCISlackChannels(ctx context.Context, teamID string) (json.RawMessage, error)

GetCISlackChannels retrieves the team's Slack channel options for workflow notifications. GET /teams/{teamID}/integrations/slack/channels

func (*Client) GetCISlackProvider

func (c *Client) GetCISlackProvider(ctx context.Context, teamID string) (json.RawMessage, error)

GetCISlackProvider retrieves the team's Slack integration state for workflow notifications. GET /teams/{teamID}/integrations/slack

func (*Client) GetCITestDestinations

func (c *Client) GetCITestDestinations(ctx context.Context, teamID, xcodeVersion string) (json.RawMessage, error)

GetCITestDestinations retrieves workflow test destination options for an Xcode version. GET /teams/{teamID}/test-destinations-v3

func (*Client) GetCIUsageDays

func (c *Client) GetCIUsageDays(ctx context.Context, teamID, productID, start, end string) (*CIUsageDays, error)

GetCIUsageDays retrieves daily Xcode Cloud usage for a product in a date range.

func (*Client) GetCIUsageDaysOverall

func (c *Client) GetCIUsageDaysOverall(ctx context.Context, teamID, start, end string) (*CIUsageDays, error)

GetCIUsageDaysOverall retrieves daily Xcode Cloud usage overview for a team.

func (*Client) GetCIUsageMonths

func (c *Client) GetCIUsageMonths(ctx context.Context, teamID string, startMonth, startYear, endMonth, endYear int) (*CIUsageMonths, error)

GetCIUsageMonths retrieves monthly Xcode Cloud usage for a date range.

func (*Client) GetCIUsageSummary

func (c *Client) GetCIUsageSummary(ctx context.Context, teamID string) (*CIUsageSummary, error)

GetCIUsageSummary retrieves the Xcode Cloud plan usage summary.

func (*Client) GetCIVersionAlias added in v1.260907.0

func (c *Client) GetCIVersionAlias(ctx context.Context, teamID, productID, aliasID string) (*CIVersionAlias, error)

GetCIVersionAlias returns one custom alias for an Xcode Cloud product.

func (*Client) GetCIVersionAliasRaw added in v1.260907.0

func (c *Client) GetCIVersionAliasRaw(ctx context.Context, teamID, productID, aliasID string) (json.RawMessage, *CIVersionAlias, error)

GetCIVersionAliasRaw returns one custom alias and the unmodified JSON body returned by the Xcode Cloud web API. The raw body is useful for read commands because this private response can gain fields before the typed client model does.

func (*Client) GetCIVersionAliases added in v1.260907.0

func (c *Client) GetCIVersionAliases(ctx context.Context, teamID, productID string) (*CIVersionAliasListResponse, error)

GetCIVersionAliases returns up to 100 custom aliases for an Xcode Cloud product.

func (*Client) GetCIWorkflow

func (c *Client) GetCIWorkflow(ctx context.Context, teamID, productID, workflowID string) (*CIWorkflowFull, error)

GetCIWorkflow gets a single workflow (full body including env vars). GET /teams/{teamID}/products/{productID}/workflows-v15/{workflowID}

func (*Client) GetDeveloperBundleID added in v1.260907.0

func (c *Client) GetDeveloperBundleID(ctx context.Context, bundleID string) (*DeveloperBundleIDGetResult, error)

GetDeveloperBundleID reads one opaque Bundle ID resource and its requested capability graph through the Developer Portal web session.

func (*Client) GetDeveloperServiceID added in v1.260907.0

func (c *Client) GetDeveloperServiceID(ctx context.Context, serviceID string) (*DeveloperServiceIDGetResult, error)

GetDeveloperServiceID reads one Services ID and its captured capability graph. A resource returned with another platform or another ID is rejected before it can be used by a mutation.

func (*Client) GetDeveloperWebsitePushID added in v1.260907.0

func (c *Client) GetDeveloperWebsitePushID(ctx context.Context, websitePushID string) (*DeveloperWebsitePushIDGetResult, error)

GetDeveloperWebsitePushID reads one modern Website Push ID resource and its captured capability relationship through the Developer Portal web session.

func (*Client) GetIAPTaxCategory added in v1.260907.0

func (c *Client) GetIAPTaxCategory(ctx context.Context, iapID string) (*IAPTaxCategory, error)

GetIAPTaxCategory discovers the tax record instead of assuming its ID matches the IAP. An absent relationship or a failed read never means inheritance.

func (*Client) GetMedicalDeviceDeclaration added in v1.260904.0

func (c *Client) GetMedicalDeviceDeclaration(ctx context.Context, accountID, appID string) (*MedicalDeviceDeclarationState, error)

GetMedicalDeviceDeclaration reads the stored regulated medical device declaration for an app.

func (*Client) GetResolutionCenterDraftMessage added in v1.260904.0

func (c *Client) GetResolutionCenterDraftMessage(ctx context.Context, threadID string, plainText bool) (*ResolutionCenterDraftMessage, error)

GetResolutionCenterDraftMessage returns the unsent draft reply on a thread, or nil when the thread has no draft. Apple reports an absent draft either as a null data member or as a 404 on the relationship, so both mean "no draft" rather than an error.

func (*Client) GetSubscriptionAdjustedEqualizations added in v1.260616.0

func (c *Client) GetSubscriptionAdjustedEqualizations(ctx context.Context, pricePointID, planType string) (*SubscriptionAdjustedEqualizationsResult, error)

GetSubscriptionAdjustedEqualizations retrieves Apple's private adjusted price matrix.

func (*Client) GetWebUser added in v1.260907.0

func (c *Client) GetWebUser(ctx context.Context, userID string) (*WebUser, error)

GetWebUser returns the web-session user resource for a supplied user id. The caller is responsible for comparing Username with the authenticated session identity before performing mutations.

func (*Client) ListAPIKeys added in v1.260904.0

func (c *Client) ListAPIKeys(ctx context.Context) ([]APIKeyListItem, error)

ListAPIKeys returns team and individual API keys visible to the web session. Team keys come from the iris v1 integrations list; individual keys come from iris v2. Both readers already follow pagination links, so this method returns the complete visible set. Creation date is not present on either payload.

func (*Client) ListAPIKeysByKind added in v1.260907.0

func (c *Client) ListAPIKeysByKind(ctx context.Context, kind string) ([]APIKeyListItem, error)

ListAPIKeysByKind returns only the requested API-key family. Unlike ListAPIKeys, it deliberately does not query the other family; callers use this boundary before and after a destructive operation to verify the exact resource kind they selected.

func (*Client) ListAppDataUsageCategories

func (c *Client) ListAppDataUsageCategories(ctx context.Context) ([]AppDataUsageCategory, error)

ListAppDataUsageCategories lists available data usage category tokens.

func (*Client) ListAppDataUsageDataProtections

func (c *Client) ListAppDataUsageDataProtections(ctx context.Context) ([]AppDataUsageDataProtection, error)

ListAppDataUsageDataProtections lists available data usage data protection tokens.

func (*Client) ListAppDataUsagePurposes

func (c *Client) ListAppDataUsagePurposes(ctx context.Context) ([]AppDataUsagePurpose, error)

ListAppDataUsagePurposes lists available data usage purpose tokens.

func (*Client) ListAppDataUsages

func (c *Client) ListAppDataUsages(ctx context.Context, appID string) ([]AppDataUsage, error)

ListAppDataUsages lists data usage tuples for a specific app.

func (*Client) ListAppDeclarations added in v1.260904.0

func (c *Client) ListAppDeclarations(ctx context.Context, accountID, appID string) ([]AppDeclaration, error)

ListAppDeclarations lists the compliance requirements App Store Connect tracks for an app under App Information -> App Store Regulations & Permits.

func (*Client) ListCIProductEnvVars

func (c *Client) ListCIProductEnvVars(ctx context.Context, teamID, productID string) ([]CIProductEnvironmentVariable, error)

ListCIProductEnvVars lists shared (product-level) environment variables. GET /teams/{teamID}/products/{productID}/product-environment-variables

func (*Client) ListCIProducts

func (c *Client) ListCIProducts(ctx context.Context, teamID string) (*CIProductListResponse, error)

ListCIProducts lists Xcode Cloud products for a team. The CI API does not expose pagination for this endpoint; limit=100 covers the vast majority of teams.

func (*Client) ListCIWorkflows

func (c *Client) ListCIWorkflows(ctx context.Context, teamID, productID string) (*CIWorkflowListResponse, error)

ListCIWorkflows lists Xcode Cloud workflows for a product.

func (*Client) ListCustomAppUsers added in v1.260907.0

func (c *Client) ListCustomAppUsers(ctx context.Context, appID string) (*CustomAppUsersListResult, error)

ListCustomAppUsers reads the selected app's first customAppUsers page. The raw page remains intact; callers that need a complete collection should use ListCustomAppUsersPaginated.

func (*Client) ListCustomAppUsersPaginated added in v1.260907.0

func (c *Client) ListCustomAppUsersPaginated(ctx context.Context, appID string) (*CustomAppUsersListResult, error)

ListCustomAppUsersPaginated reads and validates the complete selected-app customAppUsers collection. It follows only same-host, same-app collection links and never performs a write.

func (*Client) ListCustomAppUsersWithPagination added in v1.260907.0

func (c *Client) ListCustomAppUsersWithPagination(ctx context.Context, appID string, paginate bool) (*CustomAppUsersListResult, error)

ListCustomAppUsersWithPagination exposes one method for command callers that map the --paginate flag directly while retaining the convenient first-page method for programmatic users.

func (*Client) ListDeveloperAppGroups added in v1.260816.0

func (c *Client) ListDeveloperAppGroups(ctx context.Context, options DeveloperAppGroupsListOptions) (*DeveloperAppGroupsListResult, error)

ListDeveloperAppGroups lists App Groups through the selected Developer Portal team.

func (*Client) ListDeveloperBundleIDs added in v1.260907.0

func (c *Client) ListDeveloperBundleIDs(ctx context.Context) (*DeveloperBundleIDsListResult, error)

ListDeveloperBundleIDs reads the first collection returned by Apple's Developer Portal Bundle ID service. Apple currently accepts a 1000-resource request for this web surface; links.next is returned to the caller when the service provides one, but this first slice deliberately does not claim to paginate or follow it.

func (*Client) ListDeveloperICloudContainers added in v1.260907.0

func (c *Client) ListDeveloperICloudContainers(ctx context.Context, hidden bool) (*DeveloperICloudContainersListResult, error)

ListDeveloperICloudContainers reads the modern Developer Portal iCloud container collection. Apple exposes this logical GET as a POST with X-HTTP-Method-Override and keeps the hidden filter in the URL while the selected team and bounded query are sent in the JSON body.

func (*Client) ListDeveloperServiceIDs added in v1.260907.0

func (c *Client) ListDeveloperServiceIDs(ctx context.Context) (*DeveloperServiceIDsListResult, error)

ListDeveloperServiceIDs lists Services IDs through the private Developer Portal bundleIds resource. The endpoint is a logical GET; the cookie-auth transport sends the captured POST plus X-HTTP-Method-Override: GET.

func (*Client) ListDeveloperWebsitePushIDs added in v1.260907.0

func (c *Client) ListDeveloperWebsitePushIDs(ctx context.Context) (*DeveloperWebsitePushIDsListResult, error)

ListDeveloperWebsitePushIDs reads the captured first Website Push ID page for the selected Developer Portal team. This legacy response does not yet have a verified continuation contract, so the command intentionally makes a single fixed page request.

func (*Client) ListIAPTaxCategories added in v1.260907.0

func (c *Client) ListIAPTaxCategories(ctx context.Context) (TaxCategoryCatalog, error)

ListIAPTaxCategories reads the ADDON catalog used by Apple's IAP tax picker.

func (*Client) ListIndividualAPIKeysForUser added in v1.260907.0

func (c *Client) ListIndividualAPIKeysForUser(ctx context.Context, userID string) ([]IndividualAPIKey, error)

ListIndividualAPIKeysForUser returns the individual keys Apple associates with one user actor. The actor filter is part of the request contract and is deliberately separate from the broad visible-key list used by ListAPIKeys.

func (*Client) ListRemovedApps added in v1.260707.0

func (c *Client) ListRemovedApps(ctx context.Context, opts RemovedAppsListOptions) (*RemovedAppsListResponse, error)

ListRemovedApps lists apps from App Store Connect's Removed Apps web view.

func (*Client) ListResolutionCenterMessages

func (c *Client) ListResolutionCenterMessages(ctx context.Context, threadID string, plainText bool) ([]ResolutionCenterMessage, error)

ListResolutionCenterMessages lists thread messages and optional plain text body.

func (*Client) ListResolutionCenterThreadsByApp added in v1.260904.0

func (c *Client) ListResolutionCenterThreadsByApp(ctx context.Context, appID string) ([]ResolutionCenterThread, error)

ListResolutionCenterThreadsByApp lists every resolution center thread on an app, including threads that are not attached to a review submission and are therefore invisible to ListResolutionCenterThreadsBySubmission.

func (*Client) ListResolutionCenterThreadsBySubmission

func (c *Client) ListResolutionCenterThreadsBySubmission(ctx context.Context, reviewSubmissionID string) ([]ResolutionCenterThread, error)

ListResolutionCenterThreadsBySubmission lists threads for a review submission.

func (*Client) ListReviewAttachmentsBySubmission

func (c *Client) ListReviewAttachmentsBySubmission(ctx context.Context, reviewSubmissionID string, includeURL bool) ([]ReviewAttachment, error)

ListReviewAttachmentsBySubmission aggregates attachments across submission threads.

func (*Client) ListReviewAttachmentsByThread

func (c *Client) ListReviewAttachmentsByThread(ctx context.Context, threadID string, includeURL bool) ([]ReviewAttachment, error)

ListReviewAttachmentsByThread lists message and rejection attachments for a thread.

func (*Client) ListReviewRejections

func (c *Client) ListReviewRejections(ctx context.Context, threadID string) ([]ReviewRejection, error)

ListReviewRejections lists review rejections associated with a thread.

func (*Client) ListReviewSubmissionItems

func (c *Client) ListReviewSubmissionItems(ctx context.Context, reviewSubmissionID string) ([]ReviewSubmissionItem, error)

ListReviewSubmissionItems returns submission items for a review submission.

func (*Client) ListReviewSubmissions

func (c *Client) ListReviewSubmissions(ctx context.Context, appID string) ([]ReviewSubmission, error)

ListReviewSubmissions lists review submissions for a specific app ID.

func (*Client) ListReviewSubscriptions

func (c *Client) ListReviewSubscriptions(ctx context.Context, appID string) ([]ReviewSubscription, error)

ListReviewSubscriptions lists subscriptions and their next-version attach state for an app.

func (*Client) ListReviewThreadDetails

func (c *Client) ListReviewThreadDetails(ctx context.Context, threadID string, plainText bool, includeURL bool) (ReviewThreadDetails, error)

ListReviewThreadDetails fetches messages, rejections, and attachments for a thread in one pass.

func (*Client) ListSandboxAccounts added in v1.260907.0

func (c *Client) ListSandboxAccounts(ctx context.Context) (*SandboxAccountListResponse, error)

ListSandboxAccounts reads the private sandbox account collection used by App Store Connect's web tester management screen. The captured web flow requests the first 50 accounts and does not expose a verified continuation contract, so callers must treat a larger total as an incomplete snapshot.

func (*Client) ListSubscriptionPlanAvailabilities added in v1.260519.0

func (c *Client) ListSubscriptionPlanAvailabilities(ctx context.Context, subscriptionID string) ([]SubscriptionPlanAvailability, error)

ListSubscriptionPlanAvailabilities retrieves sale availability plans for a subscription.

func (*Client) ListSubscriptionPricePoints added in v1.260616.0

func (c *Client) ListSubscriptionPricePoints(ctx context.Context, subscriptionID, territory string) ([]SubscriptionPricePoint, error)

ListSubscriptionPricePoints lists price points for one subscription territory.

func (*Client) ListSubscriptionPrices added in v1.260904.0

func (c *Client) ListSubscriptionPrices(ctx context.Context, subscriptionID, territory string) ([]SubscriptionPrice, error)

ListSubscriptionPrices lists applied and scheduled prices for one subscription territory. The path is the iris counterpart of OpenAPI GET /v1/subscriptions/{id}/prices (operation subscriptions_prices_getToManyRelated), the relationship collection written by the captured inline PATCH /subscriptions/{id} prices workflow.

func (*Client) ListTaxCategories added in v1.260907.0

func (c *Client) ListTaxCategories(ctx context.Context) (TaxCategoryCatalog, error)

ListTaxCategories reads the application tax category catalog used by the App Information tax UI. This is an internal web-session endpoint; it is not part of Apple's public App Store Connect API.

func (*Client) LookupAPIKeyRoles

func (c *Client) LookupAPIKeyRoles(ctx context.Context, keyID string) (*APIKeyRoleLookup, error)

func (*Client) PutCIVersionAlias added in v1.260907.0

func (c *Client) PutCIVersionAlias(ctx context.Context, teamID, productID, aliasID string, request CIVersionAliasRequest) error

PutCIVersionAlias creates or updates one custom alias. The response body is intentionally ignored because callers must re-read after the PUT; it is not the verification boundary for a mutation.

func (*Client) RegisterIndividualAPIKey added in v1.260907.0

func (c *Client) RegisterIndividualAPIKey(ctx context.Context, keyID, publicKeyPEM string) error

RegisterIndividualAPIKey registers a generated public key on an empty individual-key resource. The operation is intentionally one-shot; callers decide how to handle an uncertain response and must retain local material.

func (*Client) RemoveSubscriptionPlanAvailabilityFromSale added in v1.260519.0

func (c *Client) RemoveSubscriptionPlanAvailabilityFromSale(ctx context.Context, planAvailabilityID string) (*SubscriptionPlanAvailability, error)

RemoveSubscriptionPlanAvailabilityFromSale clears all available territories for a subscription plan availability.

func (*Client) RenameDeveloperServiceID added in v1.260907.0

func (c *Client) RenameDeveloperServiceID(ctx context.Context, request DeveloperServiceIDRenameRequest) (*asc.WebServiceIDMutationResult, error)

RenameDeveloperServiceID changes only the name and required private team attribute. It carries every relationship from the preflight detail forward, including the capability graph, without enabling or disabling anything.

func (*Client) ResolveSubscriptionPricePoint added in v1.260616.0

func (c *Client) ResolveSubscriptionPricePoint(ctx context.Context, subscriptionID, territory, customerPrice string) (*SubscriptionPricePoint, error)

ResolveSubscriptionPricePoint resolves an exact decimal customer price.

func (*Client) RestoreApp added in v1.260907.0

func (c *Client) RestoreApp(ctx context.Context, appID string) (*AppResponse, error)

RestoreApp marks an app as available again.

func (*Client) RevokeAPIKey added in v1.260907.0

func (c *Client) RevokeAPIKey(ctx context.Context, keyID, kind string) error

RevokeAPIKey marks one team or individual API key inactive using the type-specific Iris web resource. The caller must preflight and verify the key through ListAPIKeysByKind.

func (*Client) SaveAppTaxCategory added in v1.260907.0

func (c *Client) SaveAppTaxCategory(ctx context.Context, appID, categoryID string, conditionIDs []string, configured bool) error

SaveAppTaxCategory writes an app's complete desired category and condition set. The explicit empty enabledConditions relationship is intentional: an omitted condition selection means clear the current conditions rather than preserve stale values when the category changes.

func (*Client) SaveIAPTaxCategory added in v1.260907.0

func (c *Client) SaveIAPTaxCategory(ctx context.Context, iapID, categoryID string, conditions []string, current *IAPTaxCategory) error

SaveIAPTaxCategory sends one create or update with the complete condition set. Callers must verify the selected IAP again after this request succeeds.

func (*Client) SendResolutionCenterDraftMessage added in v1.260907.0

func (c *Client) SendResolutionCenterDraftMessage(ctx context.Context, draftID string) (*ResolutionCenterMessage, error)

SendResolutionCenterDraftMessage publishes a draft as a Resolution Center message. The response must contain the created message resource and ID so a caller can re-read and verify it. This method never retries because a failed response may follow a successful server-side send.

func (*Client) SetAppDataUsagesPublished

func (c *Client) SetAppDataUsagesPublished(ctx context.Context, publishStateID string, published bool) (*AppDataUsagesPublishState, error)

SetAppDataUsagesPublished updates publication state for app data usages.

func (*Client) SetAppDistribution added in v1.260907.0

func (c *Client) SetAppDistribution(ctx context.Context, request AppDistributionSetRequest) (*asc.WebAppDistributionSetResult, error)

SetAppDistribution updates the app-level distribution method and verifies both resulting attributes with a follow-up read. It never changes custom organization or user rows. Ambiguous PATCH failures are read back once and returned with an uncertain receipt; no retry is attempted.

func (*Client) SetCINextBuildNumber added in v1.260907.0

func (c *Client) SetCINextBuildNumber(ctx context.Context, teamID, productID string, value int) error

func (*Client) SetCIProductEnvVar

func (c *Client) SetCIProductEnvVar(ctx context.Context, teamID, productID, varID string, req CIProductEnvVarRequest) (*CIProductEnvironmentVariable, error)

SetCIProductEnvVar creates or updates a shared (product-level) environment variable. PUT /teams/{teamID}/products/{productID}/product-environment-variables/{varID}

func (*Client) SetDeveloperAppGroups added in v1.260904.0

func (c *Client) SetDeveloperAppGroups(ctx context.Context, request DeveloperAppGroupSetRequest) (*asc.WebAppGroupSetResult, error)

SetDeveloperAppGroups converges a Bundle ID on exactly the requested App Group set, reports the added and removed groups, and skips the write when the current set already matches. The result is verified by re-reading the Bundle ID.

func (*Client) SetDeveloperTeamSelector added in v1.260904.0

func (c *Client) SetDeveloperTeamSelector(selector string)

SetDeveloperTeamSelector sets the explicit Developer Portal team ID or exact team name for subsequent portal requests. An empty selector leaves matching to the cached team or the selected App Store Connect provider.

func (*Client) SetMedicalDeviceDeclaration added in v1.260331.0

func (c *Client) SetMedicalDeviceDeclaration(ctx context.Context, accountID, appID string, declared bool) (*MedicalDeviceDeclarationResult, error)

SetMedicalDeviceDeclaration sets the regulated medical device declaration. The compatibility wrapper retains the existing method shape and defaults an affirmative answer to Apple's captured EEA/GBR/USA region set.

func (*Client) SetMedicalDeviceDeclarationWithOptions added in v1.260907.0

func (c *Client) SetMedicalDeviceDeclarationWithOptions(ctx context.Context, accountID, appID string, declared bool, options MedicalDeviceDeclarationOptions) (*MedicalDeviceDeclarationResult, error)

SetMedicalDeviceDeclarationWithOptions sets the app-level medical-device answer using Apple's captured form contract. It does not attempt the region-specific registration, support-information, or contact-information subform; those fields must already be present and are preserved.

func (*Client) SetMedicalDeviceRegion added in v1.260907.0

func (c *Client) SetMedicalDeviceRegion(ctx context.Context, accountID, appID, region string, options MedicalDeviceRegionOptions) (*MedicalDeviceRegionResult, error)

SetMedicalDeviceRegion updates and verifies one detailed regional answer. It requires the app-level declaration to already be yes. The method sends one full-form PUT only after all source-backed preflight checks pass.

func (*Client) SetSubscriptionPlanPrices added in v1.260616.0

func (c *Client) SetSubscriptionPlanPrices(ctx context.Context, subscriptionID string, prices []SubscriptionPlanPrice) (*SubscriptionPlanPricesResult, error)

SetSubscriptionPlanPrices creates or schedules paired plan prices through the inline PATCH.

func (*Client) SetUserAppPermission added in v1.260907.0

func (c *Client) SetUserAppPermission(ctx context.Context, appID, access string) error

SetUserAppPermission grants or revokes access for all siloable users.

func (*Client) SyncAppClipBundleIDCapability added in v1.260601.0

SyncAppClipBundleIDCapability patches a bundle ID capability relationship with the parentBundleId relationship required by App Clip targets. It reads the current capability graph first and skips the PATCH when the requested state is already in place, because every Bundle ID write invalidates the provisioning profiles that contain it.

func (*Client) UnassignDeveloperAppGroup added in v1.260904.0

func (c *Client) UnassignDeveloperAppGroup(ctx context.Context, request DeveloperAppGroupUnassignRequest) (*asc.WebAppGroupUnassignResult, error)

UnassignDeveloperAppGroup removes one App Group from a Bundle ID while preserving every other capability. It operates on the raw relationship data so a group listed under a disabled APP_GROUPS capability can still be cleared (the delete preflight counts such groups as in use). Removing the last group disables the capability; a capability Apple already reports disabled stays disabled. The result is verified by re-reading the Bundle ID.

func (*Client) UpdateAppCompatibility added in v1.260531.0

func (c *Client) UpdateAppCompatibility(ctx context.Context, appID string, iosAppOnMac, iosAppOnVisionPro *bool) (*AppCompatibility, error)

UpdateAppCompatibility edits app-level App Store compatibility opt-in settings. When both settings are provided, PATCH requests are sent sequentially and are not transactional; if a later PATCH fails, any earlier setting may remain updated and can be retried by the caller.

func (*Client) UpdateAppDataUsage

func (c *Client) UpdateAppDataUsage(ctx context.Context, appDataUsageID string, tuple DataUsageTuple) (*AppDataUsage, error)

UpdateAppDataUsage updates one appDataUsages resource to a target tuple.

func (*Client) UpdateCIWorkflow

func (c *Client) UpdateCIWorkflow(ctx context.Context, teamID, productID, workflowID string, content json.RawMessage) error

UpdateCIWorkflow updates a workflow (PUT full body). PUT /teams/{teamID}/products/{productID}/workflows-v15/{workflowID}

func (*Client) UpdateResolutionCenterDraftMessage added in v1.260907.0

func (c *Client) UpdateResolutionCenterDraftMessage(ctx context.Context, draftID, messageBody string) (*ResolutionCenterDraftMessage, error)

UpdateResolutionCenterDraftMessage updates an existing unsent Resolution Center draft. It is intentionally separate from sending so callers cannot accidentally turn a draft edit into a message.

type CustomAppUser added in v1.260907.0

type CustomAppUser struct {
	ID      string
	Type    string
	AppleID string
	Raw     json.RawMessage `json:"-"`
}

CustomAppUser is one Apple Account recipient in an app-scoped custom app user collection. Raw preserves the complete resource when a caller needs to inspect fields this client does not model.

func (CustomAppUser) MarshalJSON added in v1.260907.0

func (u CustomAppUser) MarshalJSON() ([]byte, error)

MarshalJSON preserves Apple's resource object when it was decoded from a response. The fallback is useful for callers constructing a resource in tests or request diagnostics.

type CustomAppUserUnverifiedError added in v1.260907.0

type CustomAppUserUnverifiedError struct {
	Err error
}

CustomAppUserUnverifiedError reports a user mutation whose provider outcome cannot be established. The caller must inspect the selected app before retrying; this client never retries POST or DELETE.

func (*CustomAppUserUnverifiedError) Error added in v1.260907.0

func (*CustomAppUserUnverifiedError) Unwrap added in v1.260907.0

func (e *CustomAppUserUnverifiedError) Unwrap() error

type CustomAppUsersListResult added in v1.260907.0

type CustomAppUsersListResult struct {
	Data []CustomAppUser `json:"data"`
	Raw  json.RawMessage `json:"-"`
	// contains filtered or unexported fields
}

CustomAppUsersListResult is the raw Apple JSON:API collection returned for one selected app. JSON output uses Raw verbatim for a single page; when pagination is requested, the first envelope is retained and its data array is replaced with the validated aggregate of all pages.

func (*CustomAppUsersListResult) GetData added in v1.260907.0

func (r *CustomAppUsersListResult) GetData() any

GetData exposes the collection to shared output diagnostics.

func (r *CustomAppUsersListResult) GetLinks() *asc.Links

GetLinks exposes collection links for shared output diagnostics.

func (*CustomAppUsersListResult) GetMeta added in v1.260907.0

GetMeta exposes the raw paging metadata to shared output diagnostics.

func (CustomAppUsersListResult) MarshalJSON added in v1.260907.0

func (r CustomAppUsersListResult) MarshalJSON() ([]byte, error)

MarshalJSON preserves the first Apple envelope and only changes its data member after an explicit, validated --paginate aggregation.

type DataUsageTuple

type DataUsageTuple struct {
	Category       string `json:"category,omitempty"`
	Purpose        string `json:"purpose,omitempty"`
	DataProtection string `json:"dataProtection"`
}

DataUsageTuple is the normalized tuple used to create/manage app data usages.

type DeveloperAppGroup added in v1.260816.0

type DeveloperAppGroup struct {
	ID         string `json:"id"`
	Name       string `json:"name"`
	Identifier string `json:"identifier"`
	Prefix     string `json:"prefix,omitempty"`
	Status     string `json:"status,omitempty"`
}

DeveloperAppGroup is an App Group identifier returned by Apple Developer Portal.

type DeveloperAppGroupAssignRequest added in v1.260816.0

type DeveloperAppGroupAssignRequest struct {
	BundleID string
	GroupID  string
}

DeveloperAppGroupAssignRequest associates an App Group with a Bundle ID.

type DeveloperAppGroupAssignResult added in v1.260816.0

type DeveloperAppGroupAssignResult struct {
	BundleID string `json:"bundleId"`
	GroupID  string `json:"groupId"`
	Changed  bool   `json:"changed"`
	Status   string `json:"status"`
}

DeveloperAppGroupAssignResult summarizes an App Group assignment.

type DeveloperAppGroupAssignment added in v1.260904.0

type DeveloperAppGroupAssignment struct {
	BundleID   string `json:"bundleId"`
	Identifier string `json:"identifier,omitempty"`
	Name       string `json:"name,omitempty"`
}

DeveloperAppGroupAssignment names a Bundle ID that references an App Group.

type DeveloperAppGroupCreateRequest added in v1.260816.0

type DeveloperAppGroupCreateRequest struct {
	Name       string
	Identifier string
}

DeveloperAppGroupCreateRequest registers an App Group identifier.

type DeveloperAppGroupDeleteRequest added in v1.260904.0

type DeveloperAppGroupDeleteRequest struct {
	GroupID string
}

DeveloperAppGroupDeleteRequest deletes an App Group registration.

type DeveloperAppGroupInUseError added in v1.260904.0

type DeveloperAppGroupInUseError struct {
	GroupID     string
	Identifier  string
	Assignments []DeveloperAppGroupAssignment
}

DeveloperAppGroupInUseError is returned when a delete is refused because the App Group is still referenced by at least one Bundle ID.

func (*DeveloperAppGroupInUseError) Error added in v1.260904.0

type DeveloperAppGroupSetRequest added in v1.260904.0

type DeveloperAppGroupSetRequest struct {
	BundleID string
	GroupIDs []string
}

DeveloperAppGroupSetRequest replaces a Bundle ID's complete App Group set.

type DeveloperAppGroupUnassignRequest added in v1.260904.0

type DeveloperAppGroupUnassignRequest struct {
	BundleID string
	GroupID  string
}

DeveloperAppGroupUnassignRequest removes one App Group from a Bundle ID.

type DeveloperAppGroupUnverifiedError added in v1.260904.0

type DeveloperAppGroupUnverifiedError struct {
	Err error
}

DeveloperAppGroupUnverifiedError is returned when the Developer Portal accepted an App Group mutation but the follow-up read could not confirm it. Callers should assume the write may have been applied.

func (*DeveloperAppGroupUnverifiedError) Error added in v1.260904.0

func (*DeveloperAppGroupUnverifiedError) Unwrap added in v1.260904.0

type DeveloperAppGroupsListOptions added in v1.260816.0

type DeveloperAppGroupsListOptions struct {
	Paginate bool
}

DeveloperAppGroupsListOptions controls App Group list pagination.

type DeveloperAppGroupsListResult added in v1.260816.0

type DeveloperAppGroupsListResult struct {
	Data []DeveloperAppGroup `json:"data"`
}

DeveloperAppGroupsListResult contains App Groups visible to the selected team.

type DeveloperBundleID added in v1.260907.0

type DeveloperBundleID struct {
	ID            string                                   `json:"id"`
	Type          string                                   `json:"type"`
	Attributes    map[string]any                           `json:"attributes,omitempty"`
	Relationships map[string]DeveloperBundleIDRelationship `json:"relationships,omitempty"`
	Links         map[string]any                           `json:"links,omitempty"`
}

DeveloperBundleID is one JSON:API Bundle ID resource returned by the Developer Portal web session. The Portal adds fields that are not present in the public App Store Connect Bundle ID resource, so attributes and relationships intentionally remain open-ended while preserving Apple's response shape for JSON output.

type DeveloperBundleIDCapabilityDisableRequest added in v1.260907.0

type DeveloperBundleIDCapabilityDisableRequest struct {
	BundleID   string
	Capability string
}

DeveloperBundleIDCapabilityDisableRequest disables one supported Developer Portal-only capability on an existing Bundle ID resource.

type DeveloperBundleIDCapabilityEnableRequest added in v1.260810.0

type DeveloperBundleIDCapabilityEnableRequest struct {
	BundleID   string
	Capability string
}

DeveloperBundleIDCapabilityEnableRequest enables one supported Developer Portal-only capability on an existing Bundle ID resource.

type DeveloperBundleIDCapabilityEnableResult added in v1.260810.0

type DeveloperBundleIDCapabilityEnableResult struct {
	BundleID   string `json:"bundleId"`
	Capability string `json:"capability"`
	Enabled    bool   `json:"enabled"`
	Changed    bool   `json:"changed"`
	Status     string `json:"status"`
}

DeveloperBundleIDCapabilityEnableResult summarizes a Developer Portal capability enable operation. Changed is false when the capability was already enabled and no PATCH was sent.

type DeveloperBundleIDCapabilityUnverifiedError added in v1.260907.0

type DeveloperBundleIDCapabilityUnverifiedError struct {
	Err error
}

DeveloperBundleIDCapabilityUnverifiedError is returned when a capability PATCH may have been applied but the requested disabled state could not be proven. Callers should inspect the Bundle ID before retrying.

func (*DeveloperBundleIDCapabilityUnverifiedError) Error added in v1.260907.0

func (*DeveloperBundleIDCapabilityUnverifiedError) Unwrap added in v1.260907.0

type DeveloperBundleIDGetResult added in v1.260907.0

type DeveloperBundleIDGetResult struct {
	Data     DeveloperBundleID   `json:"data"`
	Included []DeveloperBundleID `json:"included,omitempty"`
	Links    map[string]any      `json:"links,omitempty"`
	Meta     map[string]any      `json:"meta,omitempty"`
	// Raw preserves the complete JSON:API envelope returned by Apple. It is
	// omitted from the encoded shape because MarshalJSON emits it verbatim when
	// available, retaining unknown top-level members and explicitly empty ones.
	Raw json.RawMessage `json:"-"`
}

DeveloperBundleIDGetResult is the read-only single-resource response for the Developer Portal Bundle ID endpoint.

func (DeveloperBundleIDGetResult) MarshalJSON added in v1.260907.0

func (r DeveloperBundleIDGetResult) MarshalJSON() ([]byte, error)

MarshalJSON preserves Apple's full single-resource envelope for JSON output.

type DeveloperBundleIDListResult added in v1.260907.0

type DeveloperBundleIDListResult = DeveloperBundleIDsListResult

DeveloperBundleIDListResult is retained as a singular spelling alias for callers that use the resource name in the result type.

type DeveloperBundleIDRelationship added in v1.260907.0

type DeveloperBundleIDRelationship struct {
	Data  json.RawMessage `json:"data,omitempty"`
	Links map[string]any  `json:"links,omitempty"`
	Meta  map[string]any  `json:"meta,omitempty"`
}

DeveloperBundleIDRelationship preserves the relationship data and links returned by Apple's JSON:API response. Data is raw because it can be either a to-one object, a to-many array, or null depending on the relationship.

type DeveloperBundleIDResponse added in v1.260907.0

type DeveloperBundleIDResponse = DeveloperBundleIDGetResult

DeveloperBundleIDResponse is an alias matching the public API naming style.

type DeveloperBundleIDsListResult added in v1.260907.0

type DeveloperBundleIDsListResult struct {
	Data     []DeveloperBundleID `json:"data"`
	Included []DeveloperBundleID `json:"included,omitempty"`
	Links    map[string]any      `json:"links,omitempty"`
	Meta     map[string]any      `json:"meta,omitempty"`
	// Raw preserves the complete JSON:API envelope returned by Apple. It is
	// omitted from the encoded shape because MarshalJSON emits it verbatim when
	// available, retaining unknown top-level members and explicitly empty ones.
	Raw json.RawMessage `json:"-"`
}

DeveloperBundleIDsListResult is the read-only collection response for the Developer Portal Bundle ID endpoint.

func (*DeveloperBundleIDsListResult) GetData added in v1.260907.0

func (r *DeveloperBundleIDsListResult) GetData() any

GetData exposes the collection items to shared pagination diagnostics.

func (r *DeveloperBundleIDsListResult) GetLinks() *asc.Links

GetLinks exposes the collection continuation link to shared output and pagination helpers while retaining the open-ended JSON:API links map for raw JSON output.

func (*DeveloperBundleIDsListResult) GetMeta added in v1.260907.0

GetMeta exposes the parsed metadata to shared pagination diagnostics. The original response remains authoritative for JSON output through Raw.

func (DeveloperBundleIDsListResult) MarshalJSON added in v1.260907.0

func (r DeveloperBundleIDsListResult) MarshalJSON() ([]byte, error)

MarshalJSON preserves Apple's full collection envelope for JSON output. Table renderers use the parsed fields above, while JSON callers receive the original response rather than a lossy re-encoding of the known fields.

type DeveloperICloudContainer added in v1.260907.0

type DeveloperICloudContainer struct {
	ID            string                             `json:"id"`
	Type          string                             `json:"type"`
	Attributes    DeveloperICloudContainerAttributes `json:"attributes"`
	Links         map[string]any                     `json:"links,omitempty"`
	Relationships map[string]any                     `json:"relationships,omitempty"`
}

DeveloperICloudContainer is an iCloud container resource returned by the modern Developer Portal web-session endpoint.

type DeveloperICloudContainerAttributes added in v1.260907.0

type DeveloperICloudContainerAttributes struct {
	Identifier string `json:"identifier"`
	Hidden     bool   `json:"hidden"`
	Prefix     string `json:"prefix"`
	CanEdit    bool   `json:"canEdit"`
	Name       string `json:"name"`
	CanDelete  bool   `json:"canDelete"`
	ResponseID string `json:"responseId"`
}

DeveloperICloudContainerAttributes contains the fields Apple returns for a Developer Portal iCloud container list resource.

type DeveloperICloudContainersListResult added in v1.260907.0

type DeveloperICloudContainersListResult struct {
	Data  []DeveloperICloudContainer `json:"data"`
	Links map[string]any             `json:"links,omitempty"`
	Meta  map[string]any             `json:"meta,omitempty"`
	Raw   json.RawMessage            `json:"-"`
}

DeveloperICloudContainersListResult is the read-only iCloud container collection returned by the Developer Portal web session.

Raw keeps Apple's complete JSON:API envelope authoritative for JSON output, including fields this client does not model yet.

func (*DeveloperICloudContainersListResult) GetData added in v1.260907.0

GetData exposes the bounded collection to shared pagination diagnostics.

GetLinks exposes actual continuation links for formatted-output diagnostics.

func (*DeveloperICloudContainersListResult) GetMeta added in v1.260907.0

GetMeta exposes paging totals without changing the original JSON envelope.

func (DeveloperICloudContainersListResult) MarshalJSON added in v1.260907.0

func (r DeveloperICloudContainersListResult) MarshalJSON() ([]byte, error)

MarshalJSON preserves Apple's full collection envelope for JSON output.

type DeveloperPortalAgreementsResultError added in v1.260825.0

type DeveloperPortalAgreementsResultError struct {
	ResultCode int
	Message    string
}

DeveloperPortalAgreementsResultError reports an agreement-services failure returned inside an otherwise successful HTTP response.

func (*DeveloperPortalAgreementsResultError) Error added in v1.260825.0

type DeveloperServiceIDCreateRequest added in v1.260907.0

type DeveloperServiceIDCreateRequest struct {
	Identifier string
	Name       string
}

DeveloperServiceIDCreateRequest contains the writable fields accepted by the private Developer Portal Services ID registration form.

type DeveloperServiceIDDeleteRequest added in v1.260907.0

type DeveloperServiceIDDeleteRequest struct {
	ServiceID string
}

DeveloperServiceIDDeleteRequest identifies one Services ID to remove.

type DeveloperServiceIDGetResult added in v1.260907.0

type DeveloperServiceIDGetResult = DeveloperBundleIDGetResult

DeveloperServiceIDsListResult and DeveloperServiceIDGetResult intentionally reuse the open-ended JSON:API read types. Their MarshalJSON methods return Apple's original response envelope, including unknown members and included capability resources.

type DeveloperServiceIDRenameRequest added in v1.260907.0

type DeveloperServiceIDRenameRequest struct {
	ServiceID string
	Name      string
}

DeveloperServiceIDRenameRequest changes the display name of one Services ID. The identifier and capability graph are read from the portal first.

type DeveloperServiceIDUnverifiedError added in v1.260907.0

type DeveloperServiceIDUnverifiedError struct {
	Err error
}

DeveloperServiceIDUnverifiedError reports a write whose final state cannot be established. Callers must inspect the resource before retrying; the client never retries an ambiguous Services ID mutation automatically.

func (*DeveloperServiceIDUnverifiedError) Error added in v1.260907.0

func (*DeveloperServiceIDUnverifiedError) Unwrap added in v1.260907.0

type DeveloperServiceIDsListResult added in v1.260907.0

type DeveloperServiceIDsListResult = DeveloperBundleIDsListResult

DeveloperServiceIDsListResult and DeveloperServiceIDGetResult intentionally reuse the open-ended JSON:API read types. Their MarshalJSON methods return Apple's original response envelope, including unknown members and included capability resources.

type DeveloperWebsitePushID added in v1.260907.0

type DeveloperWebsitePushID map[string]any

DeveloperWebsitePushID is an open-ended legacy Website Push ID list entry. The current account had no rows when this contract was captured, so the provider-owned entry shape remains open rather than being guessed into a closed struct.

type DeveloperWebsitePushIDCreateRequest added in v1.260907.0

type DeveloperWebsitePushIDCreateRequest struct {
	Name       string
	Identifier string
}

DeveloperWebsitePushIDCreateRequest contains the user-controlled values for a Website Push ID registration. Capability configuration is intentionally not exposed until Apple's capability graph has a captured writable contract.

func (DeveloperWebsitePushIDCreateRequest) Validate added in v1.260907.0

Validate checks the source-backed Website Push ID input constraints.

type DeveloperWebsitePushIDDeleteRequest added in v1.260907.0

type DeveloperWebsitePushIDDeleteRequest struct {
	WebsitePushID string
}

DeveloperWebsitePushIDDeleteRequest identifies an opaque modern resource ID.

func (DeveloperWebsitePushIDDeleteRequest) Validate added in v1.260907.0

Validate checks that a delete request names an opaque resource ID.

type DeveloperWebsitePushIDGetResult added in v1.260907.0

type DeveloperWebsitePushIDGetResult struct {
	Data     DeveloperWebsitePushIDResource   `json:"data"`
	Included []DeveloperWebsitePushIDResource `json:"included,omitempty"`
	Links    map[string]any                   `json:"links,omitempty"`
	Meta     map[string]any                   `json:"meta,omitempty"`
	Raw      json.RawMessage                  `json:"-"`
}

DeveloperWebsitePushIDGetResult is the modern single-resource response. Raw preserves Apple's complete JSON:API envelope for JSON output.

func (DeveloperWebsitePushIDGetResult) MarshalJSON added in v1.260907.0

func (r DeveloperWebsitePushIDGetResult) MarshalJSON() ([]byte, error)

MarshalJSON preserves Apple's complete detail envelope when available.

type DeveloperWebsitePushIDRelationship added in v1.260907.0

type DeveloperWebsitePushIDRelationship struct {
	Data  json.RawMessage `json:"data,omitempty"`
	Links map[string]any  `json:"links,omitempty"`
	Meta  map[string]any  `json:"meta,omitempty"`
}

DeveloperWebsitePushIDRelationship preserves a JSON:API relationship's raw data, links, and metadata. Data may be an array, object, or null.

type DeveloperWebsitePushIDResource added in v1.260907.0

type DeveloperWebsitePushIDResource struct {
	ID            string                                        `json:"id"`
	Type          string                                        `json:"type"`
	Attributes    map[string]any                                `json:"attributes,omitempty"`
	Relationships map[string]DeveloperWebsitePushIDRelationship `json:"relationships,omitempty"`
	Links         map[string]any                                `json:"links,omitempty"`
}

DeveloperWebsitePushIDResource is one modern Developer Portal Website Push ID JSON:API resource. Attributes and relationships remain open-ended so the CLI can preserve fields Apple adds without guessing their meaning.

type DeveloperWebsitePushIDUnverifiedError added in v1.260907.0

type DeveloperWebsitePushIDUnverifiedError struct {
	Err error
}

DeveloperWebsitePushIDUnverifiedError means Apple may have applied the mutation but the follow-up read could not establish its final state. Callers must inspect the resource before retrying; this client never retries writes.

func (*DeveloperWebsitePushIDUnverifiedError) Error added in v1.260907.0

func (*DeveloperWebsitePushIDUnverifiedError) Unwrap added in v1.260907.0

type DeveloperWebsitePushIDsListResult added in v1.260907.0

type DeveloperWebsitePushIDsListResult struct {
	ResultCode        *int                     `json:"resultCode,omitempty"`
	PageNumber        *int                     `json:"pageNumber,omitempty"`
	PageSize          int                      `json:"pageSize,omitempty"`
	WebsitePushIDList []DeveloperWebsitePushID `json:"websitePushIdList"`
	Raw               json.RawMessage          `json:"-"`
}

DeveloperWebsitePushIDsListResult is the legacy Website Push ID collection returned by the Developer Portal. Raw preserves Apple's complete root-level response for JSON output, including fields that this client does not model.

func (DeveloperWebsitePushIDsListResult) MarshalJSON added in v1.260907.0

func (r DeveloperWebsitePushIDsListResult) MarshalJSON() ([]byte, error)

MarshalJSON preserves Apple's complete legacy response envelope when the result came from the service. A result constructed by a caller falls back to its modeled fields for tests and other in-process callers.

type IAPTaxCategory added in v1.260907.0

type IAPTaxCategory struct {
	Raw                                 json.RawMessage
	IAPID, ID, CategoryID, CategoryName string
	Configured                          bool
	EnabledConditionIDs                 []string
}

IAPTaxCategory preserves Apple's read envelope and summarizes its tax override. Configured is false only after explicit null linkage on the selected IAP.

func (IAPTaxCategory) MarshalJSON added in v1.260907.0

func (s IAPTaxCategory) MarshalJSON() ([]byte, error)

type IndividualAPIKey added in v1.260907.0

type IndividualAPIKey struct {
	KeyID            string
	Active           bool
	PublicKeyPresent bool
	// contains filtered or unexported fields
}

IndividualAPIKey is the non-secret state needed by the individual-key creation flow. PublicKeyPresent reports whether Apple's resource has a registered public key without retaining or exposing the key bytes.

func (IndividualAPIKey) MatchesPublicKey added in v1.260907.0

func (key IndividualAPIKey) MatchesPublicKey(publicKeyPEM string) bool

MatchesPublicKey reports whether the resource's registered public key is the supplied key. The comparison is over the validated DER bytes, so PEM line-ending and wrapping differences do not change the result.

type KeyActor

type KeyActor struct {
	ID   string `json:"id"`
	Name string `json:"name,omitempty"`
}

type LoginCredentials

type LoginCredentials struct {
	Username string
	Password string
}

LoginCredentials holds Apple ID credentials.

type MedicalDeviceDeclarationOptions added in v1.260907.0

type MedicalDeviceDeclarationOptions struct {
	CountriesOrRegions []string
}

MedicalDeviceDeclarationOptions controls the app-level regulated medical-device answer. Apple currently exposes only these three regions in the web form; the detailed registration/support/contact subform is a separate operation and is intentionally not represented here.

type MedicalDeviceDeclarationResult added in v1.260331.0

type MedicalDeviceDeclarationResult struct {
	AppID              string   `json:"appId"`
	RequirementID      string   `json:"requirementId"`
	RequirementName    string   `json:"requirementName"`
	Status             string   `json:"status,omitempty"`
	FormID             string   `json:"formId,omitempty"`
	Declared           bool     `json:"declared"`
	Changed            bool     `json:"changed"`
	CountriesOrRegions []string `json:"countriesOrRegions,omitempty"`
}

MedicalDeviceDeclarationResult reports the resulting app-level declaration.

type MedicalDeviceDeclarationState added in v1.260904.0

type MedicalDeviceDeclarationState struct {
	AppID              string   `json:"appId"`
	RequirementID      string   `json:"requirementId"`
	RequirementName    string   `json:"requirementName"`
	Status             string   `json:"status,omitempty"`
	FormID             string   `json:"formId,omitempty"`
	Required           bool     `json:"required"`
	Declaration        string   `json:"declaration,omitempty"`
	CountriesOrRegions []string `json:"countriesOrRegions,omitempty"`
}

MedicalDeviceDeclarationState reports the stored regulated medical device declaration for an app.

type MedicalDeviceRegionOptions added in v1.260907.0

type MedicalDeviceRegionOptions struct {
	Declaration        bool
	RegistrationNumber string
	SupportInfo        []MedicalDeviceRegionSupportInfo
}

MedicalDeviceRegionOptions controls one detailed regional medical-device answer. The app-level declaration is managed by SetMedicalDeviceDeclaration.

type MedicalDeviceRegionResult added in v1.260907.0

type MedicalDeviceRegionResult struct {
	AppID           string `json:"appId"`
	RequirementID   string `json:"requirementId"`
	RequirementName string `json:"requirementName"`
	Status          string `json:"status,omitempty"`
	FormID          string `json:"formId,omitempty"`
	Region          string `json:"region"`
	Declared        bool   `json:"declared"`
	Changed         bool   `json:"changed"`
}

MedicalDeviceRegionResult reports the verified detailed regional answer. It intentionally contains no registration, support, or contact values.

type MedicalDeviceRegionSupportInfo added in v1.260907.0

type MedicalDeviceRegionSupportInfo struct {
	Locale      string `json:"locale"`
	Instruction string `json:"instruction"`
	Statement   string `json:"statement"`
	SafetyInfo  string `json:"safetyInfo"`
}

MedicalDeviceRegionSupportInfo is one localized support-information row in Apple's detailed regulated-medical-device form.

type ProviderSelection added in v1.260601.0

type ProviderSelection struct {
	ProviderID       int64
	PublicProviderID string
}

ProviderSelection identifies the App Store Connect provider/team a web session should use. ProviderID is Apple's numeric provider id; PublicProviderID is the public team/provider id users usually recognize.

type RemovedApp added in v1.260707.0

type RemovedApp struct {
	ID                   string              `json:"id"`
	Type                 string              `json:"type,omitempty"`
	Name                 string              `json:"name,omitempty"`
	BundleID             string              `json:"bundleId,omitempty"`
	SKU                  string              `json:"sku,omitempty"`
	PrimaryLocale        string              `json:"primaryLocale,omitempty"`
	Removed              bool                `json:"removed"`
	Status               string              `json:"status,omitempty"`
	AppStoreLegacyStatus string              `json:"appStoreLegacyStatus,omitempty"`
	Marketplace          string              `json:"marketplace,omitempty"`
	VersionSummary       string              `json:"versionSummary,omitempty"`
	DisplayableVersions  []RemovedAppVersion `json:"displayableVersions,omitempty"`
}

RemovedApp summarizes one app from App Store Connect's Removed Apps view.

type RemovedAppVersion added in v1.260707.0

type RemovedAppVersion struct {
	ID              string `json:"id"`
	Type            string `json:"type,omitempty"`
	Platform        string `json:"platform,omitempty"`
	VersionString   string `json:"versionString,omitempty"`
	AppStoreState   string `json:"appStoreState,omitempty"`
	AppVersionState string `json:"appVersionState,omitempty"`
	CreatedDate     string `json:"createdDate,omitempty"`
	IsWatchOnly     bool   `json:"isWatchOnly,omitempty"`
}

RemovedAppVersion summarizes one displayable version attached to a removed app.

type RemovedAppsLinks struct {
	Self string `json:"self,omitempty"`
	Next string `json:"next,omitempty"`
}

RemovedAppsLinks contains pagination links returned by IRIS.

type RemovedAppsListOptions added in v1.260707.0

type RemovedAppsListOptions struct {
	Limit    int
	Next     string
	Paginate bool
}

RemovedAppsListOptions controls the removed-apps IRIS listing.

type RemovedAppsListResponse added in v1.260707.0

type RemovedAppsListResponse struct {
	Data  []RemovedApp      `json:"data"`
	Links *RemovedAppsLinks `json:"links,omitempty"`
}

RemovedAppsListResponse is the normalized output for removed apps.

type ResolutionCenterDraftMessage added in v1.260904.0

type ResolutionCenterDraftMessage struct {
	ID               string             `json:"id"`
	ThreadID         string             `json:"threadId,omitempty"`
	CreatedDate      string             `json:"createdDate,omitempty"`
	MessageBody      string             `json:"messageBody,omitempty"`
	MessageBodyPlain string             `json:"messageBodyPlain,omitempty"`
	FromActor        *ReviewActor       `json:"fromActor,omitempty"`
	Attachments      []ReviewAttachment `json:"attachments,omitempty"`
}

ResolutionCenterDraftMessage models the unsent draft reply Apple keeps on a resolution center thread. Attachment download URLs are never populated: the draft surface is read-only and its signed URLs are not offered for download.

type ResolutionCenterMessage

type ResolutionCenterMessage struct {
	ID               string       `json:"id"`
	CreatedDate      string       `json:"createdDate,omitempty"`
	MessageBody      string       `json:"messageBody,omitempty"`
	MessageBodyPlain string       `json:"messageBodyPlain,omitempty"`
	FromActor        *ReviewActor `json:"fromActor,omitempty"`
	RejectionIDs     []string     `json:"rejectionIds,omitempty"`
	AttachmentIDs    []string     `json:"attachmentIds,omitempty"`
}

ResolutionCenterMessage models a single message in a resolution center thread.

type ResolutionCenterThread

type ResolutionCenterThread struct {
	ID                      string   `json:"id"`
	ThreadType              string   `json:"threadType,omitempty"`
	State                   string   `json:"state,omitempty"`
	CreatedDate             string   `json:"createdDate,omitempty"`
	LastMessageResponseDate string   `json:"lastMessageResponseDate,omitempty"`
	CanDeveloperAddNote     bool     `json:"canDeveloperAddNote"`
	AppStoreVersionIDs      []string `json:"appStoreVersionIds,omitempty"`
	ReviewSubmissionID      string   `json:"reviewSubmissionId,omitempty"`
}

ResolutionCenterThread models thread metadata for app review issues.

type ReviewActor

type ReviewActor struct {
	ID        string `json:"id"`
	Type      string `json:"type,omitempty"`
	ActorType string `json:"actorType,omitempty"`
	Name      string `json:"name,omitempty"`
}

ReviewActor describes actor metadata from included relationships.

type ReviewAttachment

type ReviewAttachment struct {
	AttachmentID       string `json:"attachmentId"`
	SourceType         string `json:"sourceType"`
	FileName           string `json:"fileName,omitempty"`
	FileSize           int64  `json:"fileSize,omitempty"`
	AssetDeliveryState string `json:"assetDeliveryState,omitempty"`
	Downloadable       bool   `json:"downloadable"`
	DownloadURL        string `json:"downloadUrl,omitempty"`
	ThreadID           string `json:"threadId,omitempty"`
	MessageID          string `json:"messageId,omitempty"`
	ReviewRejectionID  string `json:"reviewRejectionId,omitempty"`
}

ReviewAttachment models message/rejection attachment metadata.

type ReviewIAP added in v1.260531.0

type ReviewIAP struct {
	ID                            string `json:"id"`
	ProductID                     string `json:"productId,omitempty"`
	ReferenceName                 string `json:"referenceName,omitempty"`
	State                         string `json:"state,omitempty"`
	SubmitWithNextAppStoreVersion bool   `json:"submitWithNextAppStoreVersion"`
}

ReviewIAP summarizes a non-subscription IAP returned by the iris listing used during the next app version review attach flow.

`SubmitWithNextAppStoreVersion` is retained on the struct for API compatibility but is never populated from the iris listing — Apple's `/apps/{APP_ID}/inAppPurchases` rejects it as an invalid field. The post-attach response from `/inAppPurchaseSubmissions` carries the same flag; see ReviewIAPSubmission for the populated version.

type ReviewIAPSubmission added in v1.260531.0

type ReviewIAPSubmission struct {
	ID                            string `json:"id"`
	InAppPurchaseID               string `json:"inAppPurchaseId,omitempty"`
	SubmitWithNextAppStoreVersion bool   `json:"submitWithNextAppStoreVersion"`
}

ReviewIAPSubmission captures the hidden submission resource returned by the web flow that attaches a non-renewing in-app purchase to the next app version review. Mirrors ReviewSubscriptionSubmission but for non-subscription IAPs.

type ReviewRejection

type ReviewRejection struct {
	ID            string                  `json:"id"`
	Reasons       []ReviewRejectionReason `json:"reasons,omitempty"`
	AttachmentIDs []string                `json:"attachmentIds,omitempty"`
	Related       []ReviewRelatedResource `json:"related,omitempty"`
}

ReviewRejection models rejection records linked to resolution center.

type ReviewRejectionReason

type ReviewRejectionReason struct {
	ReasonSection     string `json:"reasonSection,omitempty"`
	ReasonDescription string `json:"reasonDescription,omitempty"`
	ReasonCode        string `json:"reasonCode,omitempty"`
}

ReviewRejectionReason captures normalized review rejection reason fields.

type ReviewRelatedResource added in v1.260904.0

type ReviewRelatedResource struct {
	Relationship string `json:"relationship,omitempty"`
	Type         string `json:"type"`
	ID           string `json:"id"`
	Label        string `json:"label,omitempty"`
}

ReviewRelatedResource is an included JSON:API resource decoded for display.

type ReviewSubmission

type ReviewSubmission struct {
	ID                       string                    `json:"id"`
	State                    string                    `json:"state,omitempty"`
	SubmittedDate            string                    `json:"submittedDate,omitempty"`
	Platform                 string                    `json:"platform,omitempty"`
	AppStoreVersionForReview *AppStoreVersionForReview `json:"appStoreVersionForReview,omitempty"`
	SubmittedByActor         *ReviewActor              `json:"submittedByActor,omitempty"`
	LastUpdatedByActor       *ReviewActor              `json:"lastUpdatedByActor,omitempty"`
	CreatedByActor           *ReviewActor              `json:"createdByActor,omitempty"`
}

ReviewSubmission captures high-level review submission metadata.

type ReviewSubmissionItem

type ReviewSubmissionItem struct {
	ID      string                         `json:"id"`
	Type    string                         `json:"type"`
	Related []ReviewSubmissionItemRelation `json:"related,omitempty"`
}

ReviewSubmissionItem models review submission item relationships.

type ReviewSubmissionItemRelation

type ReviewSubmissionItemRelation struct {
	Relationship string `json:"relationship"`
	Type         string `json:"type"`
	ID           string `json:"id"`
	Label        string `json:"label,omitempty"`
}

ReviewSubmissionItemRelation links a submission item to related resources.

type ReviewSubscription

type ReviewSubscription struct {
	ID                                 string `json:"id"`
	GroupID                            string `json:"groupId,omitempty"`
	GroupReferenceName                 string `json:"groupReferenceName,omitempty"`
	ProductID                          string `json:"productId,omitempty"`
	Name                               string `json:"name,omitempty"`
	State                              string `json:"state,omitempty"`
	IsAppStoreReviewInProgress         bool   `json:"isAppStoreReviewInProgress"`
	SubmitWithNextAppStoreVersion      bool   `json:"submitWithNextAppStoreVersion"`
	SubmitWithNextAppStoreVersionKnown bool   `json:"submitWithNextAppStoreVersionKnown"`
}

ReviewSubscription summarizes a subscription's attach state for the next app version review.

type ReviewSubscriptionSubmission

type ReviewSubscriptionSubmission struct {
	ID                            string `json:"id"`
	SubscriptionID                string `json:"subscriptionId,omitempty"`
	SubmitWithNextAppStoreVersion bool   `json:"submitWithNextAppStoreVersion"`
}

ReviewSubscriptionSubmission captures the hidden submission resource returned by the web attach flow.

type ReviewThreadDetails

type ReviewThreadDetails struct {
	Messages    []ResolutionCenterMessage `json:"messages,omitempty"`
	Rejections  []ReviewRejection         `json:"rejections,omitempty"`
	Attachments []ReviewAttachment        `json:"attachments,omitempty"`
}

ReviewThreadDetails bundles per-thread review records from shared API calls.

type SandboxAccount added in v1.260907.0

type SandboxAccount struct {
	ID          string `json:"id"`
	IsInFamily  *bool  `json:"isInFamily"`
	FirstName   string `json:"firstName,omitempty"`
	LastName    string `json:"lastName,omitempty"`
	AccountName string `json:"acAccountName,omitempty"`
	StoreFront  string `json:"storeFront,omitempty"`
}

SandboxAccount is the small account projection needed by the private sandbox delete flow. IsInFamily is a pointer so a missing field cannot be mistaken for Apple's explicit false value during destructive preflight.

type SandboxAccountCreateAttributes added in v1.260328.0

type SandboxAccountCreateAttributes struct {
	FirstName       string `json:"firstName"`
	LastName        string `json:"lastName"`
	AccountName     string `json:"acAccountName"`
	AccountPassword string `json:"acAccountPassword"`
	StoreFront      string `json:"storeFront"`
}

SandboxAccountCreateAttributes defines inputs for creating a sandbox tester via App Store Connect's private web session endpoints.

type SandboxAccountListResponse added in v1.260907.0

type SandboxAccountListResponse struct {
	TotalAccounts         int              `json:"totalAccounts"`
	TotalInactiveAccounts int              `json:"totalInactiveAccounts"`
	Accounts              []SandboxAccount `json:"accounts"`
}

SandboxAccountListResponse is the response from Apple's private sandbox account collection endpoint.

type SessionBundle added in v1.260907.0

type SessionBundle struct {
	Kind       string                `json:"kind"`
	Version    int                   `json:"version"`
	ExportedAt time.Time             `json:"exportedAt"`
	AppleID    string                `json:"appleId"`
	ExpiresAt  *time.Time            `json:"expiresAt,omitempty"`
	Cookies    []SessionBundleCookie `json:"cookies"`
}

SessionBundle is the portable representation of a cached Apple web session. It is written by `asc web auth export` and read by `asc web auth import` so an already-authenticated session can move to another machine or to CI without repeating two-factor verification.

The document holds live session credentials. Treat an exported file exactly like a password.

func DecodeSessionBundle added in v1.260907.0

func DecodeSessionBundle(data []byte) (*SessionBundle, error)

DecodeSessionBundle parses and validates a bundle document.

func ExportSessionBundle added in v1.260907.0

func ExportSessionBundle(username string) (*SessionBundle, bool, error)

ExportSessionBundle reads a cached web session and returns it as a portable bundle. An empty username exports the last cached session. It reports ok=false when no session is cached.

func (*SessionBundle) Validate added in v1.260907.0

func (b *SessionBundle) Validate() error

Validate checks the document shape without inspecting cookie expiry.

type SessionBundleCookie added in v1.260907.0

type SessionBundleCookie struct {
	URL      string     `json:"url"`
	Name     string     `json:"name"`
	Value    string     `json:"value"`
	Path     string     `json:"path,omitempty"`
	Domain   string     `json:"domain,omitempty"`
	Expires  *time.Time `json:"expires,omitempty"`
	MaxAge   int        `json:"maxAge,omitempty"`
	Secure   bool       `json:"secure,omitempty"`
	HTTPOnly bool       `json:"httpOnly,omitempty"`
	SameSite int        `json:"sameSite,omitempty"`
}

SessionBundleCookie is one cookie in an exported session bundle. URL is the canonical Apple origin the cookie belongs to.

type SessionImportSummary added in v1.260907.0

type SessionImportSummary struct {
	AppleID        string
	CookieCount    int
	SkippedExpired int
	ExpiresAt      *time.Time
}

SessionImportSummary reports what an import stored in the session cache.

func ImportSessionBundle added in v1.260907.0

func ImportSessionBundle(bundle *SessionBundle) (SessionImportSummary, error)

ImportSessionBundle stores a bundle in the same cache `asc web auth login` writes, so later `asc web` commands resume it. Import performs local bundle validation only; use `asc web auth status` when live Apple validation is needed. The imported session also becomes the last cached session.

func ImportSessionBundleWithContext added in v1.260907.0

func ImportSessionBundleWithContext(_ context.Context, bundle *SessionBundle, overwrite bool) (SessionImportSummary, error)

ImportSessionBundleWithContext retains the context-aware API for callers compiled against the original transfer surface. Import is local-only, so ctx is intentionally ignored; callers that need live validation should run the status or resume workflow separately.

func ImportSessionBundleWithOptions added in v1.260907.0

func ImportSessionBundleWithOptions(bundle *SessionBundle, overwrite bool) (SessionImportSummary, error)

ImportSessionBundleWithOptions imports a bundle and optionally permits replacing an existing cache entry. The overwrite bit is also used to scope recovery from a malformed keychain aggregate to the explicit replacement path; ordinary login and refresh writes must not erase other accounts. The import itself performs local validation only; it does not contact Apple.

type SubscriptionAdjustedEqualization added in v1.260616.0

type SubscriptionAdjustedEqualization struct {
	ID            string `json:"id"`
	Territory     string `json:"territory,omitempty"`
	CustomerPrice string `json:"customerPrice,omitempty"`
	Currency      string `json:"currency,omitempty"`
}

SubscriptionAdjustedEqualization is one territory-specific price point.

type SubscriptionAdjustedEqualizationsResult added in v1.260616.0

type SubscriptionAdjustedEqualizationsResult struct {
	PricePointID          string                             `json:"pricePointId"`
	PlanType              string                             `json:"planType"`
	Status                int                                `json:"status"`
	Available             bool                               `json:"available"`
	Code                  string                             `json:"code,omitempty"`
	Detail                string                             `json:"detail,omitempty"`
	MissingTerritoryCount int                                `json:"missingTerritoryCount,omitempty"`
	MissingTerritories    []string                           `json:"missingTerritories,omitempty"`
	Equalizations         []SubscriptionAdjustedEqualization `json:"equalizations,omitempty"`
}

SubscriptionAdjustedEqualizationsResult is a sanitized adjusted-equalizations response.

type SubscriptionPlanAvailability added in v1.260519.0

type SubscriptionPlanAvailability struct {
	ID                         string   `json:"id"`
	Type                       string   `json:"type,omitempty"`
	AvailableInNewTerritories  bool     `json:"availableInNewTerritories"`
	PlanType                   string   `json:"planType,omitempty"`
	AvailableTerritories       []string `json:"availableTerritories,omitempty"`
	AvailableTerritoriesLoaded bool     `json:"-"`
}

SubscriptionPlanAvailability models the internal web API subscription plan availability resource.

type SubscriptionPlanPrice added in v1.260616.0

type SubscriptionPlanPrice struct {
	PlanType             string
	PricePointID         string
	StartDate            string
	PreserveCurrentPrice bool
}

SubscriptionPlanPrice identifies one billing plan's price and scheduling attributes.

type SubscriptionPlanPricesResult added in v1.260616.0

type SubscriptionPlanPricesResult struct {
	SubscriptionID      string `json:"subscriptionId"`
	UpfrontPricePointID string `json:"upfrontPricePointId"`
	MonthlyPricePointID string `json:"monthlyPricePointId"`
}

SubscriptionPlanPricesResult identifies the paired billing-plan prices created.

type SubscriptionPrice added in v1.260904.0

type SubscriptionPrice struct {
	ID           string `json:"id"`
	PlanType     string `json:"planType,omitempty"`
	Territory    string `json:"territory,omitempty"`
	PricePointID string `json:"pricePointId,omitempty"`
	StartDate    string `json:"startDate,omitempty"`
	Preserved    bool   `json:"preserved,omitempty"`
}

SubscriptionPrice is one applied or scheduled web subscription price record.

func FindSubscriptionPrice added in v1.260904.0

func FindSubscriptionPrice(prices []SubscriptionPrice, planType, territory, pricePointID, startDate string, now time.Time) (SubscriptionPrice, bool)

FindSubscriptionPrice locates a price record matching plan type, territory, and price point. A requested startDate matches that scheduled record. An empty startDate selects the latest non-future effective record for the plan and territory, then checks the price point.

type SubscriptionPricePoint added in v1.260616.0

type SubscriptionPricePoint struct {
	ID            string `json:"id"`
	Territory     string `json:"territory"`
	CustomerPrice string `json:"customerPrice"`
	Currency      string `json:"currency,omitempty"`
}

SubscriptionPricePoint is a web subscription price point.

type TaxCategory added in v1.260907.0

type TaxCategory struct {
	ID                  string                 `json:"id"`
	Type                string                 `json:"type,omitempty"`
	Name                string                 `json:"name,omitempty"`
	ProductType         string                 `json:"productType,omitempty"`
	SubcategoryRequired bool                   `json:"subcategoryRequired"`
	ContentProviders    any                    `json:"contentProviders,omitempty"`
	Subcategories       []TaxCategoryReference `json:"subcategories,omitempty"`
	Conditions          []TaxCategoryReference `json:"conditions,omitempty"`
}

TaxCategory describes an application tax category and its related choices. ContentProviders is retained as returned by Apple's web API because its shape is not stable in the captured responses.

type TaxCategoryCatalog added in v1.260907.0

type TaxCategoryCatalog struct {
	Categories []TaxCategory  `json:"categories"`
	Conditions []TaxCondition `json:"conditions"`
	// Raw preserves the complete JSON:API catalog envelope returned by Apple.
	// It is omitted from the typed shape and emitted verbatim for JSON output,
	// so included resources, links, metadata, and unknown top-level members are
	// not lost while parsing table rows.
	Raw json.RawMessage `json:"-"`
}

TaxCategoryCatalog is the application tax category and condition catalog.

func (TaxCategoryCatalog) MarshalJSON added in v1.260907.0

func (c TaxCategoryCatalog) MarshalJSON() ([]byte, error)

MarshalJSON preserves Apple's raw catalog envelope for JSON output. The typed fields remain available to callers that need validation or tables.

type TaxCategoryReference added in v1.260907.0

type TaxCategoryReference struct {
	ID   string `json:"id"`
	Type string `json:"type,omitempty"`
	Name string `json:"name,omitempty"`
}

TaxCategoryReference identifies a tax category or condition related to a tax category. Names are populated from JSON:API included resources when Apple returns them.

type TaxCondition added in v1.260907.0

type TaxCondition struct {
	ID   string `json:"id"`
	Type string `json:"type,omitempty"`
	Name string `json:"name,omitempty"`
}

TaxCondition describes an application tax condition available in the captured tax-category catalog.

type TransactionTaxReportDownload added in v1.260907.0

type TransactionTaxReportDownload struct {
	Body                      io.ReadCloser
	PollStatus                string
	ContentType               string
	ContentDispositionPresent bool
}

TransactionTaxReportDownload contains the ready report stream and safe response metadata. The generated job ID and signed download URL are kept inside the web client and are never returned to command output.

type TransactionTaxReportRequest added in v1.260907.0

type TransactionTaxReportRequest struct {
	ProviderID int64
	Date       string
}

TransactionTaxReportRequest identifies the provider and accounting month for a Transaction Tax Report generation request. ProviderID is the numeric provider selected by the authenticated web session.

type TwoFactorChallenge added in v1.260328.0

type TwoFactorChallenge = appleauth.TwoFactorChallenge

func EnsureTwoFactorCodeRequested added in v1.260328.0

func EnsureTwoFactorCodeRequested(ctx context.Context, session *AuthSession) (*TwoFactorChallenge, error)

func PrepareTwoFactorChallenge added in v1.260328.0

func PrepareTwoFactorChallenge(ctx context.Context, session *AuthSession) (*TwoFactorChallenge, error)

type TwoFactorFinalizationError added in v1.260904.0

type TwoFactorFinalizationError struct {
	Status int
	Err    error
}

TwoFactorFinalizationError reports that Apple accepted the submitted 2FA code but the follow-up App Store Connect session bootstrap failed. It is distinct from a rejected verification code: the code was already consumed, so callers must not describe this as a 2FA verification failure.

func (*TwoFactorFinalizationError) Error added in v1.260904.0

func (*TwoFactorFinalizationError) HTTPStatusCode added in v1.260904.0

func (e *TwoFactorFinalizationError) HTTPStatusCode() int

func (*TwoFactorFinalizationError) Unwrap added in v1.260904.0

func (e *TwoFactorFinalizationError) Unwrap() error

type TwoFactorRequiredError

type TwoFactorRequiredError struct {
	AppleIDSessionID string
	SCNT             string
}

TwoFactorRequiredError signals that the caller must submit a 2FA code.

func (*TwoFactorRequiredError) Error

func (e *TwoFactorRequiredError) Error() string

type WebUser added in v1.260907.0

type WebUser struct {
	ID       string
	Username string
}

WebUser is the minimal identity returned by the web-session users endpoint. It intentionally contains no session or credential material.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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