@gpc-cli/core 0.9.71 → 0.9.72
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 +112 -4
- 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,106 @@ 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 = [
|
|
4663
|
+
"achievementType",
|
|
4664
|
+
"initialState",
|
|
4665
|
+
"stepsToUnlock",
|
|
4666
|
+
"draft"
|
|
4667
|
+
];
|
|
4668
|
+
for (const field of fields) {
|
|
4669
|
+
const localVal = JSON.stringify(
|
|
4670
|
+
localData[field] ?? null
|
|
4671
|
+
);
|
|
4672
|
+
const remoteVal = JSON.stringify(
|
|
4673
|
+
remote[field] ?? null
|
|
4674
|
+
);
|
|
4675
|
+
if (localVal !== remoteVal) {
|
|
4676
|
+
diffs.push({ field, local: localVal, remote: remoteVal });
|
|
4677
|
+
}
|
|
4678
|
+
}
|
|
4679
|
+
return diffs;
|
|
4680
|
+
}
|
|
4681
|
+
async function listLeaderboardConfigs(client, applicationId, options) {
|
|
4682
|
+
validateApplicationId(applicationId);
|
|
4683
|
+
return client.leaderboards.list(applicationId, options);
|
|
4684
|
+
}
|
|
4685
|
+
async function getLeaderboardConfig(client, leaderboardId) {
|
|
4686
|
+
validateResourceId(leaderboardId, "leaderboard");
|
|
4687
|
+
return client.leaderboards.get(leaderboardId);
|
|
4688
|
+
}
|
|
4689
|
+
async function createLeaderboardConfig(client, applicationId, data) {
|
|
4690
|
+
validateApplicationId(applicationId);
|
|
4691
|
+
return client.leaderboards.insert(applicationId, data);
|
|
4692
|
+
}
|
|
4693
|
+
async function updateLeaderboardConfig(client, leaderboardId, data) {
|
|
4694
|
+
validateResourceId(leaderboardId, "leaderboard");
|
|
4695
|
+
return client.leaderboards.update(leaderboardId, data);
|
|
4696
|
+
}
|
|
4697
|
+
async function deleteLeaderboardConfig(client, leaderboardId) {
|
|
4698
|
+
validateResourceId(leaderboardId, "leaderboard");
|
|
4699
|
+
return client.leaderboards.delete(leaderboardId);
|
|
4700
|
+
}
|
|
4701
|
+
async function diffLeaderboardConfig(client, leaderboardId, localData) {
|
|
4702
|
+
validateResourceId(leaderboardId, "leaderboard");
|
|
4703
|
+
const remote = await client.leaderboards.get(leaderboardId);
|
|
4704
|
+
const diffs = [];
|
|
4705
|
+
const fields = ["scoreOrder", "scoreMin", "scoreMax", "draft"];
|
|
4706
|
+
for (const field of fields) {
|
|
4707
|
+
const localVal = JSON.stringify(
|
|
4708
|
+
localData[field] ?? null
|
|
4709
|
+
);
|
|
4710
|
+
const remoteVal = JSON.stringify(
|
|
4711
|
+
remote[field] ?? null
|
|
4712
|
+
);
|
|
4713
|
+
if (localVal !== remoteVal) {
|
|
4714
|
+
diffs.push({ field, local: localVal, remote: remoteVal });
|
|
4715
|
+
}
|
|
4716
|
+
}
|
|
4717
|
+
return diffs;
|
|
4621
4718
|
}
|
|
4622
4719
|
|
|
4623
4720
|
// src/commands/enterprise.ts
|
|
@@ -8957,12 +9054,14 @@ export {
|
|
|
8957
9054
|
computeStatusDiff,
|
|
8958
9055
|
consumeProductPurchase,
|
|
8959
9056
|
convertRegionPrices,
|
|
9057
|
+
createAchievementConfig,
|
|
8960
9058
|
createAuditEntry,
|
|
8961
9059
|
createDeviceTier,
|
|
8962
9060
|
createEnterpriseApp,
|
|
8963
9061
|
createExternalTransaction,
|
|
8964
9062
|
createGrant,
|
|
8965
9063
|
createInAppProduct,
|
|
9064
|
+
createLeaderboardConfig,
|
|
8966
9065
|
createOffer,
|
|
8967
9066
|
createOneTimeOffer,
|
|
8968
9067
|
createOneTimeProduct,
|
|
@@ -8977,10 +9076,12 @@ export {
|
|
|
8977
9076
|
defaultGitRunner,
|
|
8978
9077
|
deferSubscriptionPurchase,
|
|
8979
9078
|
deferSubscriptionV2,
|
|
9079
|
+
deleteAchievementConfig,
|
|
8980
9080
|
deleteBasePlan,
|
|
8981
9081
|
deleteGrant,
|
|
8982
9082
|
deleteImage,
|
|
8983
9083
|
deleteInAppProduct,
|
|
9084
|
+
deleteLeaderboardConfig,
|
|
8984
9085
|
deleteListing,
|
|
8985
9086
|
deleteOffer,
|
|
8986
9087
|
deleteOneTimeOffer,
|
|
@@ -8989,6 +9090,8 @@ export {
|
|
|
8989
9090
|
deployRecoveryAction,
|
|
8990
9091
|
detectFastlane,
|
|
8991
9092
|
detectOutputFormat,
|
|
9093
|
+
diffAchievementConfig,
|
|
9094
|
+
diffLeaderboardConfig,
|
|
8992
9095
|
diffListings,
|
|
8993
9096
|
diffListingsCommand,
|
|
8994
9097
|
diffListingsEnhanced,
|
|
@@ -9021,6 +9124,7 @@ export {
|
|
|
9021
9124
|
generateChangelog,
|
|
9022
9125
|
generateMigrationPlan,
|
|
9023
9126
|
generateNotesFromGit,
|
|
9127
|
+
getAchievementConfig,
|
|
9024
9128
|
getAllScannerNames,
|
|
9025
9129
|
getApiSigningFingerprint,
|
|
9026
9130
|
getAppInfo,
|
|
@@ -9030,6 +9134,7 @@ export {
|
|
|
9030
9134
|
getExternalTransaction,
|
|
9031
9135
|
getInAppProduct,
|
|
9032
9136
|
getKeystoreFingerprint,
|
|
9137
|
+
getLeaderboardConfig,
|
|
9033
9138
|
getListings,
|
|
9034
9139
|
getOffer,
|
|
9035
9140
|
getOneTimeOffer,
|
|
@@ -9071,15 +9176,16 @@ export {
|
|
|
9071
9176
|
lintListing,
|
|
9072
9177
|
lintListings,
|
|
9073
9178
|
lintLocalListings,
|
|
9179
|
+
listAchievementConfigs,
|
|
9074
9180
|
listAchievements,
|
|
9075
9181
|
listAuditEvents,
|
|
9076
9182
|
listBundles,
|
|
9077
9183
|
listDeviceTiers,
|
|
9078
|
-
listEvents,
|
|
9079
9184
|
listGeneratedApks,
|
|
9080
9185
|
listGrants,
|
|
9081
9186
|
listImages,
|
|
9082
9187
|
listInAppProducts,
|
|
9188
|
+
listLeaderboardConfigs,
|
|
9083
9189
|
listLeaderboards,
|
|
9084
9190
|
listOffers,
|
|
9085
9191
|
listOneTimeOffers,
|
|
@@ -9154,10 +9260,12 @@ export {
|
|
|
9154
9260
|
topFiles,
|
|
9155
9261
|
trackBreachState,
|
|
9156
9262
|
translateBundle,
|
|
9263
|
+
updateAchievementConfig,
|
|
9157
9264
|
updateAppDetails,
|
|
9158
9265
|
updateDataSafety,
|
|
9159
9266
|
updateGrant,
|
|
9160
9267
|
updateInAppProduct,
|
|
9268
|
+
updateLeaderboardConfig,
|
|
9161
9269
|
updateListing,
|
|
9162
9270
|
updateOffer,
|
|
9163
9271
|
updateOneTimeOffer,
|