web

package
v1.260504.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: MIT Imports: 41 Imported by: 0

Documentation

Index

Constants

This section is empty.

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")
View Source
var (

	// ErrInvalidAppleAccountCredentials reports rejected Apple Account
	// credentials during web login flows.
	ErrInvalidAppleAccountCredentials = errInvalidAppleAccountCredentials
)

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 DeleteAllSessions

func DeleteAllSessions() error

DeleteAllSessions removes all cached web sessions.

func DeleteSession

func DeleteSession(username string) error

DeleteSession removes the cached session for a specific Apple ID.

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 IsDuplicateAppNameError

func IsDuplicateAppNameError(err error) bool

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

func IsNotFound

func IsNotFound(err error) bool

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

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 PersistSession

func PersistSession(session *AuthSession) error

PersistSession stores web-session cookies for later reuse.

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 SubmitTwoFactorCode

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

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

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

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 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"`
}

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 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"`
}

AppDataUsagesPublishState captures publication state for app privacy data usages.

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 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 AuthSession

type AuthSession struct {
	Client           *http.Client
	ProviderID       int64
	PublicProviderID string
	TeamID           string
	UserEmail        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 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 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 /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 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 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 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) 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) 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) 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) 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) 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) DownloadAttachment

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

DownloadAttachment downloads binary attachment payload from a signed URL.

func (*Client) FindApp

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

FindApp finds an existing app by bundle ID.

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) 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) GetAppDataUsagesPublishState

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

GetAppDataUsagesPublishState fetches publication state for app data usages.

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 /auth/keys/client-encryption (relative to /ci/api base URL)

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) 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) 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) 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) 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) 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) 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) LookupAPIKeyRoles

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

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) 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) 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.

Only the false/no path is currently supported because Apple requires additional region-specific metadata for the true/yes flow.

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}

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 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 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"`
	CountriesOrRegions []string `json:"countriesOrRegions,omitempty"`
}

MedicalDeviceDeclarationResult reports the resulting app-level declaration.

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 ReviewRejection

type ReviewRejection struct {
	ID            string                  `json:"id"`
	Reasons       []ReviewRejectionReason `json:"reasons,omitempty"`
	AttachmentIDs []string                `json:"attachmentIds,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 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"`
}

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"`
}

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 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 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 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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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