@gpc-cli/core 0.9.71 → 0.9.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +23 -3
- package/dist/index.js +123 -10
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OutputFormat, ResolvedConfig, WebhookConfig } from '@gpc-cli/config';
|
|
2
2
|
import { AuthClient } from '@gpc-cli/auth';
|
|
3
3
|
import { GpcPlugin, PluginManifest, CommandEvent, CommandResult, PluginError, RequestEvent, ResponseEvent, PluginCommand } from '@gpc-cli/plugin-sdk';
|
|
4
|
-
import { PlayApiClient, EditCommitOptions, Track, ExternallyHostedApk, ExternallyHostedApkResponse, DeobfuscationFileType, UploadProgressEvent, ResumableUploadOptions, Listing, ImageType, CountryAvailability, Image, AppDetails, Review, ReviewReplyResponse, Subscription, SubscriptionOffer, OffersListResponse, BasePlanMigratePricesRequest, InAppProduct, Order, SubscriptionDeferResponse, SubscriptionsV2DeferResponse, ProductPurchase, ProductPurchaseV2, SubscriptionPurchaseV2, VoidedPurchase, UsersApiClient, User, DeveloperLevelPermission, Grant, MetricRow, ReportingDimension, ReportingAggregation, VitalsMetricSet, ReportingApiClient, AnomalyDetectionResponse, MetricSetResponse, ErrorIssuesResponse, ConvertRegionPricesResponse, ReportType, StatsDimension, ReportBucket, Testers, AppRecoveryTargeting, AppRecoveryAction, CreateAppRecoveryActionRequest, DataSafetyResponse, DataSafetyRequest, ExternalTransaction, ExternalTransactionRefund, DeviceTierConfig, OneTimeOffer, OneTimeProduct, OneTimeOffersListResponse, OneTimeProductsListResponse, GamesApiClient, Achievement,
|
|
4
|
+
import { PlayApiClient, EditCommitOptions, Track, ExternallyHostedApk, ExternallyHostedApkResponse, DeobfuscationFileType, UploadProgressEvent, ResumableUploadOptions, Listing, ImageType, CountryAvailability, Image, AppDetails, Review, ReviewReplyResponse, Subscription, SubscriptionOffer, OffersListResponse, BasePlanMigratePricesRequest, InAppProduct, Order, SubscriptionDeferResponse, SubscriptionsV2DeferResponse, ProductPurchase, ProductPurchaseV2, SubscriptionPurchaseV2, VoidedPurchase, UsersApiClient, User, DeveloperLevelPermission, Grant, MetricRow, ReportingDimension, ReportingAggregation, VitalsMetricSet, ReportingApiClient, AnomalyDetectionResponse, MetricSetResponse, ErrorIssuesResponse, ConvertRegionPricesResponse, ReportType, StatsDimension, ReportBucket, Testers, AppRecoveryTargeting, AppRecoveryAction, CreateAppRecoveryActionRequest, DataSafetyResponse, DataSafetyRequest, ExternalTransaction, ExternalTransactionRefund, DeviceTierConfig, OneTimeOffer, OneTimeProduct, OneTimeOffersListResponse, OneTimeProductsListResponse, GamesConfigClient, AchievementConfiguration, LeaderboardConfiguration, AchievementConfigurationListResponse, GamesApiClient, Achievement, LeaderboardConfigurationListResponse, Leaderboard, EnterpriseApiClient, CustomApp, GeneratedApksPerSigningKey, Bundle } from '@gpc-cli/api';
|
|
5
5
|
|
|
6
6
|
declare class GpcError extends Error {
|
|
7
7
|
readonly code: string;
|
|
@@ -908,7 +908,27 @@ declare function advanceTrain(apiClient: PlayApiClient, reportingClient: Reporti
|
|
|
908
908
|
|
|
909
909
|
declare function listLeaderboards(client: GamesApiClient, packageName: string): Promise<Leaderboard[]>;
|
|
910
910
|
declare function listAchievements(client: GamesApiClient, packageName: string): Promise<Achievement[]>;
|
|
911
|
-
|
|
911
|
+
interface ListGamesConfigOptions {
|
|
912
|
+
maxResults?: number;
|
|
913
|
+
pageToken?: string;
|
|
914
|
+
}
|
|
915
|
+
interface GameConfigDiff {
|
|
916
|
+
field: string;
|
|
917
|
+
local: string;
|
|
918
|
+
remote: string;
|
|
919
|
+
}
|
|
920
|
+
declare function listAchievementConfigs(client: GamesConfigClient, applicationId: string, options?: ListGamesConfigOptions): Promise<AchievementConfigurationListResponse>;
|
|
921
|
+
declare function getAchievementConfig(client: GamesConfigClient, achievementId: string): Promise<AchievementConfiguration>;
|
|
922
|
+
declare function createAchievementConfig(client: GamesConfigClient, applicationId: string, data: AchievementConfiguration): Promise<AchievementConfiguration>;
|
|
923
|
+
declare function updateAchievementConfig(client: GamesConfigClient, achievementId: string, data: AchievementConfiguration): Promise<AchievementConfiguration>;
|
|
924
|
+
declare function deleteAchievementConfig(client: GamesConfigClient, achievementId: string): Promise<void>;
|
|
925
|
+
declare function diffAchievementConfig(client: GamesConfigClient, achievementId: string, localData: AchievementConfiguration): Promise<GameConfigDiff[]>;
|
|
926
|
+
declare function listLeaderboardConfigs(client: GamesConfigClient, applicationId: string, options?: ListGamesConfigOptions): Promise<LeaderboardConfigurationListResponse>;
|
|
927
|
+
declare function getLeaderboardConfig(client: GamesConfigClient, leaderboardId: string): Promise<LeaderboardConfiguration>;
|
|
928
|
+
declare function createLeaderboardConfig(client: GamesConfigClient, applicationId: string, data: LeaderboardConfiguration): Promise<LeaderboardConfiguration>;
|
|
929
|
+
declare function updateLeaderboardConfig(client: GamesConfigClient, leaderboardId: string, data: LeaderboardConfiguration): Promise<LeaderboardConfiguration>;
|
|
930
|
+
declare function deleteLeaderboardConfig(client: GamesConfigClient, leaderboardId: string): Promise<void>;
|
|
931
|
+
declare function diffLeaderboardConfig(client: GamesConfigClient, leaderboardId: string, localData: LeaderboardConfiguration): Promise<GameConfigDiff[]>;
|
|
912
932
|
|
|
913
933
|
/**
|
|
914
934
|
* Parameters for creating a private enterprise app via the Play Custom App
|
|
@@ -1674,4 +1694,4 @@ interface ChecklistInput {
|
|
|
1674
1694
|
declare function buildChecklist(input: ChecklistInput): ChecklistResult;
|
|
1675
1695
|
declare function renderChecklistMarkdown(result: ChecklistResult, accountEmail: string): string;
|
|
1676
1696
|
|
|
1677
|
-
export { ApiError, type ApiSigningFingerprint, type AppInfo, type AppStatus, type ApplyReleaseNotesResult, type AuditEntry, type BatchSyncResult, type BundleAnalysis, type BundleComparison, type BundleEntry, type BundleSizeCheckResult, type BundleSizeConfig, type BundlesWaitOptions, type ChangelogEntry, type ChecklistInput, type ChecklistItem, type ChecklistResult, type CommandContext, type CommitCluster, type CommitResult, ConfigError, type CreateEnterpriseAppParams, DEFAULT_LIMITS, DEFAULT_MODELS, DEFAULT_PREFLIGHT_CONFIG, DEFAULT_WATCH_THRESHOLDS, type DecodedNotification, type DiffToken, type DiscoverPluginsOptions, type DryRunPublishResult, type DryRunResult, type DryRunUploadResult, type ErrorReason, type ExportImagesOptions, type ExportImagesSummary, type FastlaneDetection, type FastlaneLane, type FetchChangelogOptions, type FieldLintResult, type FileValidationResult, type FindingSeverity, GOOGLE_PLAY_LANGUAGES, type GenerateOptions, type GeneratedChangelog, type GetAppStatusOptions, type GitNotesOptions, type GitReleaseNotes, type GitRunner, GpcError, type ImageSyncDetail, type ImageSyncOptions, type ImageSyncResult, type ImageValidationResult, type InitOptions, type InitResult, type InternalSharingUploadResult, type KeystoreFingerprint, type ListIapOptions, type ListSubscriptionsOptions, type ListUsersOptions, type ListVoidedOptions, type ListingDiff, type ListingFieldLimits, type ListingLintResult, type ListingsResult, type LoadedPlugin, type LocaleBundle, type LocaleEntry, type MigrationResult, NetworkError, type OneTimeProductDiff, type OutputMode, PERMISSION_PROPAGATION_WARNING, PLACEHOLDER_TEXT, PLAY_STORE_LIMIT, PROVIDER_WHITELIST, type ParsedCommit, type ParsedManifest, type ParsedMonth, type PlayStoreFormat, type PlayStoreRenderOptions, PluginManager, type PreflightConfig, type PreflightFinding, type PreflightOptions, type PreflightResult, type PreflightScanner, type Provider, type PublishOptions, type PublishResult, type PushResult, type QuotaUsage, RENDERERS, type RawCommit, type ReleaseDiff, type ReleaseNotesValidation, type ReleaseStatusResult, type Renderer, type ResolveAiConfigOptions, type ResolveLocalesOptions, type ReviewAnalysis, type ReviewExportOptions, type ReviewsFilterOptions, type RevocationRefundType, type RtdnStatus, SECTION_ORDER, SENSITIVE_ARG_KEYS, SENSITIVE_KEYS, SEVERITY_ORDER, type ScaffoldOptions, type ScaffoldResult, type SigningConsistencyResult, type SigningKeyComparison, type Spinner, type StatusDiff, type StatusRelease, type StatusReviews, type StatusVitalMetric, type SubscriptionAnalytics, type SubscriptionDiff, type SyncResult, type ThresholdResult, type TrainConfig, type TrainState, type TranslateBundleOptions, type TranslatedBundle, type TranslationFailure, type TranslationPath, type TranslationResult, type Translator, type TranslatorConfig, type UploadResult, VALID_WATCH_METRICS, type ValidateCheck, type ValidateOptions, type ValidateResult, type VersionVitalsComparison, type VersionVitalsRow, type VitalsOverview, type VitalsQueryOptions, type VitalsTrendComparison, type WatchAction, type WatchCallbacks, type WatchConfig, type WatchEvent, type WatchMetric, type WatchOptions, type WatchRollout, type WatchSummary, type WatchVitalReading, type WatchVitalsOptions, type WebhookPayload, abortTrain, acknowledgeProductPurchase, activateBasePlan, activateOffer, addRecoveryTargeting, addTesters, advanceTrain, analyzeBundle, analyzeRemoteListings, analyzeReviews, annotateListResult, applyReleaseNotes, assignRelease, batchGetOrders, batchSyncInAppProducts, buildChecklist, buildLocaleBundle, bundleToReleaseNotes, cancelRecoveryAction, cancelSubscriptionPurchase, cancelSubscriptionV2, checkBundleSize, checkSigningConsistency, checkThreshold, classifyError, clearAuditLog, commitWithRescue, compareBundles, compareFingerprints, compareVersionVitals, compareVitalsTrend, computeStatusDiff, consumeProductPurchase, convertRegionPrices, createAuditEntry, createDeviceTier, createEnterpriseApp, createExternalTransaction, createGrant, createInAppProduct, createOffer, createOneTimeOffer, createOneTimeProduct, createRecoveryAction, createSpinner, createSubscription, createTrack, createTranslator, deactivateBasePlan, deactivateOffer, decodeNotification, defaultGitRunner, deferSubscriptionPurchase, deferSubscriptionV2, deleteBasePlan, deleteGrant, deleteImage, deleteInAppProduct, deleteListing, deleteOffer, deleteOneTimeOffer, deleteOneTimeProduct, deleteSubscription, deployRecoveryAction, detectFastlane, detectOutputFormat, diffListings, diffListingsCommand, diffListingsEnhanced, diffOneTimeProduct, diffReleases, diffSubscription, discoverPlugins, dispatchWebhook, downloadGeneratedApk, downloadReport, exportImages, exportReviews, fetchAggregateCost, fetchChangelog, fetchReleaseNotes, findBundle, formatChangelogEntry, formatCustomPayload, formatDiscordPayload, formatJunit, formatMoney, formatNotification, formatOutput, formatPathLabel, formatSlackPayload, formatStatusDiff, formatStatusSummary, formatStatusTable, formatWordDiff, generateChangelog, generateMigrationPlan, generateNotesFromGit, getAllScannerNames, getApiSigningFingerprint, getAppInfo, getAppStatus, getCountryAvailability, getDeviceTier, getExternalTransaction, getInAppProduct, getKeystoreFingerprint, getListings, getOffer, getOneTimeOffer, getOneTimeProduct, getOrderDetails, getProductPurchase, getProductPurchaseV2, getQuotaUsage, getReleasesStatus, getReview, getRtdnStatus, getSubscription, getSubscriptionAnalytics, getSubscriptionPurchase, getTrainStatus, getUser, getVitalsAnomalies, getVitalsAnr, getVitalsBattery, getVitalsCrashes, getVitalsErrorCount, getVitalsLmk, getVitalsMemory, getVitalsOverview, getVitalsRendering, getVitalsStartup, handleBreach, importDataSafety, importTestersFromCsv, initAudit, initProject, inviteUser, isFinancialReportType, isStatsReportType, isValidBcp47, isValidReportType, isValidStatsDimension, isVersionedNotesDir, lintListing, lintListings, lintLocalListings, listAchievements, listAuditEvents, listBundles, listDeviceTiers,
|
|
1697
|
+
export { ApiError, type ApiSigningFingerprint, type AppInfo, type AppStatus, type ApplyReleaseNotesResult, type AuditEntry, type BatchSyncResult, type BundleAnalysis, type BundleComparison, type BundleEntry, type BundleSizeCheckResult, type BundleSizeConfig, type BundlesWaitOptions, type ChangelogEntry, type ChecklistInput, type ChecklistItem, type ChecklistResult, type CommandContext, type CommitCluster, type CommitResult, ConfigError, type CreateEnterpriseAppParams, DEFAULT_LIMITS, DEFAULT_MODELS, DEFAULT_PREFLIGHT_CONFIG, DEFAULT_WATCH_THRESHOLDS, type DecodedNotification, type DiffToken, type DiscoverPluginsOptions, type DryRunPublishResult, type DryRunResult, type DryRunUploadResult, type ErrorReason, type ExportImagesOptions, type ExportImagesSummary, type FastlaneDetection, type FastlaneLane, type FetchChangelogOptions, type FieldLintResult, type FileValidationResult, type FindingSeverity, GOOGLE_PLAY_LANGUAGES, type GameConfigDiff, type GenerateOptions, type GeneratedChangelog, type GetAppStatusOptions, type GitNotesOptions, type GitReleaseNotes, type GitRunner, GpcError, type ImageSyncDetail, type ImageSyncOptions, type ImageSyncResult, type ImageValidationResult, type InitOptions, type InitResult, type InternalSharingUploadResult, type KeystoreFingerprint, type ListGamesConfigOptions, type ListIapOptions, type ListSubscriptionsOptions, type ListUsersOptions, type ListVoidedOptions, type ListingDiff, type ListingFieldLimits, type ListingLintResult, type ListingsResult, type LoadedPlugin, type LocaleBundle, type LocaleEntry, type MigrationResult, NetworkError, type OneTimeProductDiff, type OutputMode, PERMISSION_PROPAGATION_WARNING, PLACEHOLDER_TEXT, PLAY_STORE_LIMIT, PROVIDER_WHITELIST, type ParsedCommit, type ParsedManifest, type ParsedMonth, type PlayStoreFormat, type PlayStoreRenderOptions, PluginManager, type PreflightConfig, type PreflightFinding, type PreflightOptions, type PreflightResult, type PreflightScanner, type Provider, type PublishOptions, type PublishResult, type PushResult, type QuotaUsage, RENDERERS, type RawCommit, type ReleaseDiff, type ReleaseNotesValidation, type ReleaseStatusResult, type Renderer, type ResolveAiConfigOptions, type ResolveLocalesOptions, type ReviewAnalysis, type ReviewExportOptions, type ReviewsFilterOptions, type RevocationRefundType, type RtdnStatus, SECTION_ORDER, SENSITIVE_ARG_KEYS, SENSITIVE_KEYS, SEVERITY_ORDER, type ScaffoldOptions, type ScaffoldResult, type SigningConsistencyResult, type SigningKeyComparison, type Spinner, type StatusDiff, type StatusRelease, type StatusReviews, type StatusVitalMetric, type SubscriptionAnalytics, type SubscriptionDiff, type SyncResult, type ThresholdResult, type TrainConfig, type TrainState, type TranslateBundleOptions, type TranslatedBundle, type TranslationFailure, type TranslationPath, type TranslationResult, type Translator, type TranslatorConfig, type UploadResult, VALID_WATCH_METRICS, type ValidateCheck, type ValidateOptions, type ValidateResult, type VersionVitalsComparison, type VersionVitalsRow, type VitalsOverview, type VitalsQueryOptions, type VitalsTrendComparison, type WatchAction, type WatchCallbacks, type WatchConfig, type WatchEvent, type WatchMetric, type WatchOptions, type WatchRollout, type WatchSummary, type WatchVitalReading, type WatchVitalsOptions, type WebhookPayload, abortTrain, acknowledgeProductPurchase, activateBasePlan, activateOffer, addRecoveryTargeting, addTesters, advanceTrain, analyzeBundle, analyzeRemoteListings, analyzeReviews, annotateListResult, applyReleaseNotes, assignRelease, batchGetOrders, batchSyncInAppProducts, buildChecklist, buildLocaleBundle, bundleToReleaseNotes, cancelRecoveryAction, cancelSubscriptionPurchase, cancelSubscriptionV2, checkBundleSize, checkSigningConsistency, checkThreshold, classifyError, clearAuditLog, commitWithRescue, compareBundles, compareFingerprints, compareVersionVitals, compareVitalsTrend, computeStatusDiff, consumeProductPurchase, convertRegionPrices, createAchievementConfig, createAuditEntry, createDeviceTier, createEnterpriseApp, createExternalTransaction, createGrant, createInAppProduct, createLeaderboardConfig, createOffer, createOneTimeOffer, createOneTimeProduct, createRecoveryAction, createSpinner, createSubscription, createTrack, createTranslator, deactivateBasePlan, deactivateOffer, decodeNotification, defaultGitRunner, deferSubscriptionPurchase, deferSubscriptionV2, deleteAchievementConfig, deleteBasePlan, deleteGrant, deleteImage, deleteInAppProduct, deleteLeaderboardConfig, deleteListing, deleteOffer, deleteOneTimeOffer, deleteOneTimeProduct, deleteSubscription, deployRecoveryAction, detectFastlane, detectOutputFormat, diffAchievementConfig, diffLeaderboardConfig, diffListings, diffListingsCommand, diffListingsEnhanced, diffOneTimeProduct, diffReleases, diffSubscription, discoverPlugins, dispatchWebhook, downloadGeneratedApk, downloadReport, exportImages, exportReviews, fetchAggregateCost, fetchChangelog, fetchReleaseNotes, findBundle, formatChangelogEntry, formatCustomPayload, formatDiscordPayload, formatJunit, formatMoney, formatNotification, formatOutput, formatPathLabel, formatSlackPayload, formatStatusDiff, formatStatusSummary, formatStatusTable, formatWordDiff, generateChangelog, generateMigrationPlan, generateNotesFromGit, getAchievementConfig, getAllScannerNames, getApiSigningFingerprint, getAppInfo, getAppStatus, getCountryAvailability, getDeviceTier, getExternalTransaction, getInAppProduct, getKeystoreFingerprint, getLeaderboardConfig, getListings, getOffer, getOneTimeOffer, getOneTimeProduct, getOrderDetails, getProductPurchase, getProductPurchaseV2, getQuotaUsage, getReleasesStatus, getReview, getRtdnStatus, getSubscription, getSubscriptionAnalytics, getSubscriptionPurchase, getTrainStatus, getUser, getVitalsAnomalies, getVitalsAnr, getVitalsBattery, getVitalsCrashes, getVitalsErrorCount, getVitalsLmk, getVitalsMemory, getVitalsOverview, getVitalsRendering, getVitalsStartup, handleBreach, importDataSafety, importTestersFromCsv, initAudit, initProject, inviteUser, isFinancialReportType, isStatsReportType, isValidBcp47, isValidReportType, isValidStatsDimension, isVersionedNotesDir, lintListing, lintListings, lintLocalListings, listAchievementConfigs, listAchievements, listAuditEvents, listBundles, listDeviceTiers, listGeneratedApks, listGrants, listImages, listInAppProducts, listLeaderboardConfigs, listLeaderboards, listOffers, listOneTimeOffers, listOneTimeProducts, listRecoveryActions, listReports, listReviews, listSubscriptions, listTesters, listTracks, listUsers, listVoidedPurchases, loadPreflightConfig, loadStatusCache, maybePaginate, migratePrices, moreResultsFooter, normalizeFingerprint, parseAppfile, parseCommit, parseFastfile, parseGrantArg, parseKeytoolOutput, parseMonth, parseRemoteUrl, pauseTrain, promoteRelease, publish, publishEnterpriseApp, pullListings, pushListings, readListingsFromDir, readReleaseNotesForVersion, readReleaseNotesFromDir, redactAuditArgs, redactSensitive, refundExternalTransaction, refundOrder, relativeTime, removeTesters, removeUser, renderChecklistMarkdown, renderJson, renderMarkdown, renderPlayStore, renderPlayStoreJson, renderPlayStoreMd, renderPlayStorePrompt, renderPrompt, replyToReview, resolveAiConfig, resolveLocales, retryOnUploadNotComplete, revokeSubscriptionPurchase, runPreflight, runWatch, runWatchLoop, safePath, safePathWithin, saveStatusCache, scaffoldPlugin, searchAuditEvents, searchVitalsErrors, sendNotification, sendWebhook, sha256File, sortResults, startTrain, statusHasBreach, syncImages, syncInAppProducts, topFiles, trackBreachState, translateBundle, updateAchievementConfig, updateAppDetails, updateDataSafety, updateGrant, updateInAppProduct, updateLeaderboardConfig, updateListing, updateOffer, updateOneTimeOffer, updateOneTimeProduct, updateRollout, updateSubscription, updateTrackConfig, updateUser, uploadExternallyHosted, uploadImage, uploadInternalSharing, uploadRelease, validateAndCommit, validateBundleForApply, validateImage, validateLanguageCode, validatePackageName, validatePreSubmission, validateReleaseNotes, validateSku, validateTrackName, validateUploadFile, validateVersionCode, waitForBundle, waitForBundleProcessing, watchVitalsWithAutoHalt, wordDiff, writeAuditLog, writeListingsToDir, writeMigrationOutput };
|
package/dist/index.js
CHANGED
|
@@ -4615,9 +4615,97 @@ async function listAchievements(client, packageName) {
|
|
|
4615
4615
|
const result = await client.achievements.list(packageName);
|
|
4616
4616
|
return result.items ?? [];
|
|
4617
4617
|
}
|
|
4618
|
-
|
|
4619
|
-
|
|
4620
|
-
|
|
4618
|
+
function validateApplicationId(applicationId) {
|
|
4619
|
+
if (!applicationId || !applicationId.trim()) {
|
|
4620
|
+
throw new GpcError(
|
|
4621
|
+
"Application ID is required.",
|
|
4622
|
+
"GAMES_INVALID_APPLICATION_ID",
|
|
4623
|
+
2,
|
|
4624
|
+
"Pass --game-id or set games.applicationId in .gpcrc.json. Find it in Play Console > Play Games Services > Setup."
|
|
4625
|
+
);
|
|
4626
|
+
}
|
|
4627
|
+
}
|
|
4628
|
+
function validateResourceId(id, label) {
|
|
4629
|
+
if (!id || !id.trim()) {
|
|
4630
|
+
throw new GpcError(
|
|
4631
|
+
`${label} ID is required.`,
|
|
4632
|
+
`GAMES_INVALID_${label.toUpperCase().replace(/ /g, "_")}_ID`,
|
|
4633
|
+
2,
|
|
4634
|
+
`Find the ${label} ID in Play Console > Play Games Services, or via gpc games ${label.includes("achievement") ? "achievements" : "leaderboards"} list.`
|
|
4635
|
+
);
|
|
4636
|
+
}
|
|
4637
|
+
}
|
|
4638
|
+
async function listAchievementConfigs(client, applicationId, options) {
|
|
4639
|
+
validateApplicationId(applicationId);
|
|
4640
|
+
return client.achievements.list(applicationId, options);
|
|
4641
|
+
}
|
|
4642
|
+
async function getAchievementConfig(client, achievementId) {
|
|
4643
|
+
validateResourceId(achievementId, "achievement");
|
|
4644
|
+
return client.achievements.get(achievementId);
|
|
4645
|
+
}
|
|
4646
|
+
async function createAchievementConfig(client, applicationId, data) {
|
|
4647
|
+
validateApplicationId(applicationId);
|
|
4648
|
+
return client.achievements.insert(applicationId, data);
|
|
4649
|
+
}
|
|
4650
|
+
async function updateAchievementConfig(client, achievementId, data) {
|
|
4651
|
+
validateResourceId(achievementId, "achievement");
|
|
4652
|
+
return client.achievements.update(achievementId, data);
|
|
4653
|
+
}
|
|
4654
|
+
async function deleteAchievementConfig(client, achievementId) {
|
|
4655
|
+
validateResourceId(achievementId, "achievement");
|
|
4656
|
+
return client.achievements.delete(achievementId);
|
|
4657
|
+
}
|
|
4658
|
+
async function diffAchievementConfig(client, achievementId, localData) {
|
|
4659
|
+
validateResourceId(achievementId, "achievement");
|
|
4660
|
+
const remote = await client.achievements.get(achievementId);
|
|
4661
|
+
const diffs = [];
|
|
4662
|
+
const fields = ["achievementType", "initialState", "stepsToUnlock", "draft"];
|
|
4663
|
+
for (const field of fields) {
|
|
4664
|
+
const localVal = JSON.stringify(
|
|
4665
|
+
localData[field] ?? null
|
|
4666
|
+
);
|
|
4667
|
+
const remoteVal = JSON.stringify(remote[field] ?? null);
|
|
4668
|
+
if (localVal !== remoteVal) {
|
|
4669
|
+
diffs.push({ field, local: localVal, remote: remoteVal });
|
|
4670
|
+
}
|
|
4671
|
+
}
|
|
4672
|
+
return diffs;
|
|
4673
|
+
}
|
|
4674
|
+
async function listLeaderboardConfigs(client, applicationId, options) {
|
|
4675
|
+
validateApplicationId(applicationId);
|
|
4676
|
+
return client.leaderboards.list(applicationId, options);
|
|
4677
|
+
}
|
|
4678
|
+
async function getLeaderboardConfig(client, leaderboardId) {
|
|
4679
|
+
validateResourceId(leaderboardId, "leaderboard");
|
|
4680
|
+
return client.leaderboards.get(leaderboardId);
|
|
4681
|
+
}
|
|
4682
|
+
async function createLeaderboardConfig(client, applicationId, data) {
|
|
4683
|
+
validateApplicationId(applicationId);
|
|
4684
|
+
return client.leaderboards.insert(applicationId, data);
|
|
4685
|
+
}
|
|
4686
|
+
async function updateLeaderboardConfig(client, leaderboardId, data) {
|
|
4687
|
+
validateResourceId(leaderboardId, "leaderboard");
|
|
4688
|
+
return client.leaderboards.update(leaderboardId, data);
|
|
4689
|
+
}
|
|
4690
|
+
async function deleteLeaderboardConfig(client, leaderboardId) {
|
|
4691
|
+
validateResourceId(leaderboardId, "leaderboard");
|
|
4692
|
+
return client.leaderboards.delete(leaderboardId);
|
|
4693
|
+
}
|
|
4694
|
+
async function diffLeaderboardConfig(client, leaderboardId, localData) {
|
|
4695
|
+
validateResourceId(leaderboardId, "leaderboard");
|
|
4696
|
+
const remote = await client.leaderboards.get(leaderboardId);
|
|
4697
|
+
const diffs = [];
|
|
4698
|
+
const fields = ["scoreOrder", "scoreMin", "scoreMax", "draft"];
|
|
4699
|
+
for (const field of fields) {
|
|
4700
|
+
const localVal = JSON.stringify(
|
|
4701
|
+
localData[field] ?? null
|
|
4702
|
+
);
|
|
4703
|
+
const remoteVal = JSON.stringify(remote[field] ?? null);
|
|
4704
|
+
if (localVal !== remoteVal) {
|
|
4705
|
+
diffs.push({ field, local: localVal, remote: remoteVal });
|
|
4706
|
+
}
|
|
4707
|
+
}
|
|
4708
|
+
return diffs;
|
|
4621
4709
|
}
|
|
4622
4710
|
|
|
4623
4711
|
// src/commands/enterprise.ts
|
|
@@ -4867,7 +4955,7 @@ async function initProject(options) {
|
|
|
4867
4955
|
const preflightrc = JSON.stringify(
|
|
4868
4956
|
{
|
|
4869
4957
|
failOn: "error",
|
|
4870
|
-
targetSdkMinimum:
|
|
4958
|
+
targetSdkMinimum: 36,
|
|
4871
4959
|
maxDownloadSizeMb: 150,
|
|
4872
4960
|
allowedPermissions: [],
|
|
4873
4961
|
disabledRules: [],
|
|
@@ -5485,8 +5573,8 @@ var manifestScanner = {
|
|
|
5485
5573
|
ruleId: "geofencing-foreground-service",
|
|
5486
5574
|
severity: "warning",
|
|
5487
5575
|
title: `Possible geofencing via foreground service "${service.name}"`,
|
|
5488
|
-
message: `Service "${service.name}" uses foregroundServiceType "location" and the app declares ACCESS_BACKGROUND_LOCATION. Google Play no longer approves geofencing as a foreground service use case (April 2026
|
|
5489
|
-
suggestion: 'If this service performs geofencing, migrate to
|
|
5576
|
+
message: `Service "${service.name}" uses foregroundServiceType "location" and the app declares ACCESS_BACKGROUND_LOCATION. Google Play no longer approves geofencing as a foreground service use case (sensitive-permissions policy announced April 15, 2026); enforcement for apps targeting Android 17 (API 37+) begins October 28, 2026.`,
|
|
5577
|
+
suggestion: 'If this service performs geofencing, migrate to the Geofencing API (LocationServices.getGeofencingClient) or WorkManager/AlarmManager. If this is legitimate background location tracking (navigation, fitness), suppress this rule via .preflightrc.json: "disabledRules": ["geofencing-foreground-service"].',
|
|
5490
5578
|
policyUrl: "https://support.google.com/googleplay/android-developer/answer/16926792"
|
|
5491
5579
|
});
|
|
5492
5580
|
}
|
|
@@ -5715,14 +5803,28 @@ var permissionsScanner = {
|
|
|
5715
5803
|
].filter((p) => manifest.permissions.includes(p) && !allowed.has(p));
|
|
5716
5804
|
if (contactsPerms.length > 0) {
|
|
5717
5805
|
const names = contactsPerms.map((p) => p.split(".").pop()).join(", ");
|
|
5806
|
+
const enforced = manifest.targetSdk >= 37 ? ` Your app targets API ${manifest.targetSdk}, so this is enforced.` : "";
|
|
5718
5807
|
findings.push({
|
|
5719
5808
|
scanner: "permissions",
|
|
5720
5809
|
ruleId: "contacts-permission-broad",
|
|
5721
5810
|
severity: "warning",
|
|
5722
5811
|
title: "Broad contacts access requires migration to Contact Picker",
|
|
5723
|
-
message: `Your app declares ${names}. Google Play
|
|
5724
|
-
suggestion: "Migrate to the Android Contact Picker
|
|
5725
|
-
policyUrl: "https://support.google.com/googleplay/android-developer/answer/
|
|
5812
|
+
message: `Your app declares ${names}. Google Play's Contacts Permissions policy requires the Android Contact Picker (Intent.ACTION_PICK_CONTACTS) unless broad access is core to your app. Mandatory for apps targeting Android 17 (API 37+) on October 28, 2026.${enforced}`,
|
|
5813
|
+
suggestion: "Migrate to the Android Contact Picker (Intent.ACTION_PICK_CONTACTS) for user-initiated contact selection, or file a Permissions Declaration Form before October 28, 2026 if the picker cannot serve your core functionality. Remove READ_CONTACTS/WRITE_CONTACTS unless your app is a dialer, messaging, or contacts management app.",
|
|
5814
|
+
policyUrl: "https://support.google.com/googleplay/android-developer/answer/16935362"
|
|
5815
|
+
});
|
|
5816
|
+
}
|
|
5817
|
+
const fineLocation = "android.permission.ACCESS_FINE_LOCATION";
|
|
5818
|
+
if (manifest.permissions.includes(fineLocation) && !allowed.has(fineLocation)) {
|
|
5819
|
+
const targetsApi37 = manifest.targetSdk >= 37;
|
|
5820
|
+
findings.push({
|
|
5821
|
+
scanner: "permissions",
|
|
5822
|
+
ruleId: "location-minimal-scope",
|
|
5823
|
+
severity: targetsApi37 ? "warning" : "info",
|
|
5824
|
+
title: "Precise location \u2014 consider the location button (minimum scope)",
|
|
5825
|
+
message: `Your app declares ACCESS_FINE_LOCATION. Google Play's Location Permissions policy makes the Android location button the recommended minimum scope for transactional (one-time) precise location. Mandatory for apps targeting Android 17 (API 37+) on October 28, 2026.${targetsApi37 ? ` Your app targets API ${manifest.targetSdk}.` : ""}`,
|
|
5826
|
+
suggestion: 'For one-time/transactional precise location, use the system location button instead of requesting ACCESS_FINE_LOCATION up front. Only keep continuous fine location if navigation, fitness, or a similar feature is core functionality. Suppress via .preflightrc.json "disabledRules": ["location-minimal-scope"] if fine location is essential.',
|
|
5827
|
+
policyUrl: "https://support.google.com/googleplay/android-developer/answer/17033915"
|
|
5726
5828
|
});
|
|
5727
5829
|
}
|
|
5728
5830
|
const broadHealthPerm = "android.permission.health.READ_ALL_HEALTH_DATA";
|
|
@@ -8957,12 +9059,14 @@ export {
|
|
|
8957
9059
|
computeStatusDiff,
|
|
8958
9060
|
consumeProductPurchase,
|
|
8959
9061
|
convertRegionPrices,
|
|
9062
|
+
createAchievementConfig,
|
|
8960
9063
|
createAuditEntry,
|
|
8961
9064
|
createDeviceTier,
|
|
8962
9065
|
createEnterpriseApp,
|
|
8963
9066
|
createExternalTransaction,
|
|
8964
9067
|
createGrant,
|
|
8965
9068
|
createInAppProduct,
|
|
9069
|
+
createLeaderboardConfig,
|
|
8966
9070
|
createOffer,
|
|
8967
9071
|
createOneTimeOffer,
|
|
8968
9072
|
createOneTimeProduct,
|
|
@@ -8977,10 +9081,12 @@ export {
|
|
|
8977
9081
|
defaultGitRunner,
|
|
8978
9082
|
deferSubscriptionPurchase,
|
|
8979
9083
|
deferSubscriptionV2,
|
|
9084
|
+
deleteAchievementConfig,
|
|
8980
9085
|
deleteBasePlan,
|
|
8981
9086
|
deleteGrant,
|
|
8982
9087
|
deleteImage,
|
|
8983
9088
|
deleteInAppProduct,
|
|
9089
|
+
deleteLeaderboardConfig,
|
|
8984
9090
|
deleteListing,
|
|
8985
9091
|
deleteOffer,
|
|
8986
9092
|
deleteOneTimeOffer,
|
|
@@ -8989,6 +9095,8 @@ export {
|
|
|
8989
9095
|
deployRecoveryAction,
|
|
8990
9096
|
detectFastlane,
|
|
8991
9097
|
detectOutputFormat,
|
|
9098
|
+
diffAchievementConfig,
|
|
9099
|
+
diffLeaderboardConfig,
|
|
8992
9100
|
diffListings,
|
|
8993
9101
|
diffListingsCommand,
|
|
8994
9102
|
diffListingsEnhanced,
|
|
@@ -9021,6 +9129,7 @@ export {
|
|
|
9021
9129
|
generateChangelog,
|
|
9022
9130
|
generateMigrationPlan,
|
|
9023
9131
|
generateNotesFromGit,
|
|
9132
|
+
getAchievementConfig,
|
|
9024
9133
|
getAllScannerNames,
|
|
9025
9134
|
getApiSigningFingerprint,
|
|
9026
9135
|
getAppInfo,
|
|
@@ -9030,6 +9139,7 @@ export {
|
|
|
9030
9139
|
getExternalTransaction,
|
|
9031
9140
|
getInAppProduct,
|
|
9032
9141
|
getKeystoreFingerprint,
|
|
9142
|
+
getLeaderboardConfig,
|
|
9033
9143
|
getListings,
|
|
9034
9144
|
getOffer,
|
|
9035
9145
|
getOneTimeOffer,
|
|
@@ -9071,15 +9181,16 @@ export {
|
|
|
9071
9181
|
lintListing,
|
|
9072
9182
|
lintListings,
|
|
9073
9183
|
lintLocalListings,
|
|
9184
|
+
listAchievementConfigs,
|
|
9074
9185
|
listAchievements,
|
|
9075
9186
|
listAuditEvents,
|
|
9076
9187
|
listBundles,
|
|
9077
9188
|
listDeviceTiers,
|
|
9078
|
-
listEvents,
|
|
9079
9189
|
listGeneratedApks,
|
|
9080
9190
|
listGrants,
|
|
9081
9191
|
listImages,
|
|
9082
9192
|
listInAppProducts,
|
|
9193
|
+
listLeaderboardConfigs,
|
|
9083
9194
|
listLeaderboards,
|
|
9084
9195
|
listOffers,
|
|
9085
9196
|
listOneTimeOffers,
|
|
@@ -9154,10 +9265,12 @@ export {
|
|
|
9154
9265
|
topFiles,
|
|
9155
9266
|
trackBreachState,
|
|
9156
9267
|
translateBundle,
|
|
9268
|
+
updateAchievementConfig,
|
|
9157
9269
|
updateAppDetails,
|
|
9158
9270
|
updateDataSafety,
|
|
9159
9271
|
updateGrant,
|
|
9160
9272
|
updateInAppProduct,
|
|
9273
|
+
updateLeaderboardConfig,
|
|
9161
9274
|
updateListing,
|
|
9162
9275
|
updateOffer,
|
|
9163
9276
|
updateOneTimeOffer,
|