@gpc-cli/core 0.9.62 → 0.9.63
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 +9 -10
- package/dist/index.js +31 -14
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
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, GameEvent, Leaderboard, EnterpriseApiClient, CustomApp,
|
|
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, GameEvent, Leaderboard, EnterpriseApiClient, CustomApp, GeneratedApksPerSigningKey, Bundle } from '@gpc-cli/api';
|
|
5
5
|
|
|
6
6
|
declare class GpcError extends Error {
|
|
7
7
|
readonly code: string;
|
|
@@ -105,7 +105,6 @@ declare function discoverPlugins(options?: DiscoverPluginsOptions): Promise<GpcP
|
|
|
105
105
|
|
|
106
106
|
interface AppInfo {
|
|
107
107
|
packageName: string;
|
|
108
|
-
title?: string;
|
|
109
108
|
defaultLanguage?: string;
|
|
110
109
|
contactEmail?: string;
|
|
111
110
|
}
|
|
@@ -488,7 +487,7 @@ declare function deleteSubscription(client: PlayApiClient, packageName: string,
|
|
|
488
487
|
declare function activateBasePlan(client: PlayApiClient, packageName: string, productId: string, basePlanId: string): Promise<Subscription>;
|
|
489
488
|
declare function deactivateBasePlan(client: PlayApiClient, packageName: string, productId: string, basePlanId: string): Promise<Subscription>;
|
|
490
489
|
declare function deleteBasePlan(client: PlayApiClient, packageName: string, productId: string, basePlanId: string): Promise<void>;
|
|
491
|
-
declare function migratePrices(client: PlayApiClient, packageName: string, productId: string, basePlanId: string, data: BasePlanMigratePricesRequest): Promise<
|
|
490
|
+
declare function migratePrices(client: PlayApiClient, packageName: string, productId: string, basePlanId: string, data: BasePlanMigratePricesRequest): Promise<void>;
|
|
492
491
|
declare function listOffers(client: PlayApiClient, packageName: string, productId: string, basePlanId: string): Promise<OffersListResponse>;
|
|
493
492
|
declare function getOffer(client: PlayApiClient, packageName: string, productId: string, basePlanId: string, offerId: string): Promise<SubscriptionOffer>;
|
|
494
493
|
declare function createOffer(client: PlayApiClient, packageName: string, productId: string, basePlanId: string, data: SubscriptionOffer): Promise<SubscriptionOffer>;
|
|
@@ -557,7 +556,8 @@ declare function consumeProductPurchase(client: PlayApiClient, packageName: stri
|
|
|
557
556
|
declare function getSubscriptionPurchase(client: PlayApiClient, packageName: string, token: string): Promise<SubscriptionPurchaseV2>;
|
|
558
557
|
declare function cancelSubscriptionPurchase(client: PlayApiClient, packageName: string, subscriptionId: string, token: string): Promise<void>;
|
|
559
558
|
declare function deferSubscriptionPurchase(client: PlayApiClient, packageName: string, subscriptionId: string, token: string, desiredExpiry: string): Promise<SubscriptionDeferResponse>;
|
|
560
|
-
|
|
559
|
+
type RevocationRefundType = "full" | "prorated" | "item";
|
|
560
|
+
declare function revokeSubscriptionPurchase(client: PlayApiClient, packageName: string, token: string, refundType?: RevocationRefundType, productId?: string): Promise<void>;
|
|
561
561
|
|
|
562
562
|
interface ListVoidedOptions {
|
|
563
563
|
startTime?: string;
|
|
@@ -573,14 +573,13 @@ declare function listVoidedPurchases(client: PlayApiClient, packageName: string,
|
|
|
573
573
|
nextPageToken?: string;
|
|
574
574
|
}>;
|
|
575
575
|
declare function refundOrder(client: PlayApiClient, packageName: string, orderId: string, options?: {
|
|
576
|
-
|
|
577
|
-
proratedRefund?: boolean;
|
|
576
|
+
revoke?: boolean;
|
|
578
577
|
}): Promise<void>;
|
|
579
578
|
declare function getOrderDetails(client: PlayApiClient, packageName: string, orderId: string): Promise<Order>;
|
|
580
579
|
declare function batchGetOrders(client: PlayApiClient, packageName: string, orderIds: string[]): Promise<Order[]>;
|
|
581
580
|
declare function getProductPurchaseV2(client: PlayApiClient, packageName: string, token: string): Promise<ProductPurchaseV2>;
|
|
582
581
|
declare function cancelSubscriptionV2(client: PlayApiClient, packageName: string, token: string, cancellationType?: string): Promise<void>;
|
|
583
|
-
declare function deferSubscriptionV2(client: PlayApiClient, packageName: string, token: string,
|
|
582
|
+
declare function deferSubscriptionV2(client: PlayApiClient, packageName: string, token: string, deferDuration: string, etag?: string): Promise<SubscriptionsV2DeferResponse>;
|
|
584
583
|
|
|
585
584
|
declare const PERMISSION_PROPAGATION_WARNING = "Note: Permission changes may take up to 48 hours to propagate.";
|
|
586
585
|
interface ListUsersOptions {
|
|
@@ -782,7 +781,7 @@ declare function addRecoveryTargeting(client: PlayApiClient, packageName: string
|
|
|
782
781
|
declare function updateDataSafety(client: PlayApiClient, packageName: string, data: DataSafetyRequest): Promise<DataSafetyResponse>;
|
|
783
782
|
declare function importDataSafety(client: PlayApiClient, packageName: string, filePath: string): Promise<DataSafetyResponse>;
|
|
784
783
|
|
|
785
|
-
declare function createExternalTransaction(client: PlayApiClient, packageName: string, data: ExternalTransaction): Promise<ExternalTransaction>;
|
|
784
|
+
declare function createExternalTransaction(client: PlayApiClient, packageName: string, data: ExternalTransaction, externalTransactionId: string): Promise<ExternalTransaction>;
|
|
786
785
|
declare function getExternalTransaction(client: PlayApiClient, packageName: string, transactionId: string): Promise<ExternalTransaction>;
|
|
787
786
|
declare function refundExternalTransaction(client: PlayApiClient, packageName: string, transactionId: string, refundData: ExternalTransactionRefund): Promise<ExternalTransaction>;
|
|
788
787
|
|
|
@@ -1138,7 +1137,7 @@ interface InternalSharingUploadResult {
|
|
|
1138
1137
|
}
|
|
1139
1138
|
declare function uploadInternalSharing(client: PlayApiClient, packageName: string, filePath: string, fileType?: "bundle" | "apk"): Promise<InternalSharingUploadResult>;
|
|
1140
1139
|
|
|
1141
|
-
declare function listGeneratedApks(client: PlayApiClient, packageName: string, versionCode: number): Promise<
|
|
1140
|
+
declare function listGeneratedApks(client: PlayApiClient, packageName: string, versionCode: number): Promise<GeneratedApksPerSigningKey[]>;
|
|
1142
1141
|
declare function downloadGeneratedApk(client: PlayApiClient, packageName: string, versionCode: number, apkId: string, outputPath: string): Promise<{
|
|
1143
1142
|
path: string;
|
|
1144
1143
|
sizeBytes: number;
|
|
@@ -1624,4 +1623,4 @@ interface ChecklistInput {
|
|
|
1624
1623
|
declare function buildChecklist(input: ChecklistInput): ChecklistResult;
|
|
1625
1624
|
declare function renderChecklistMarkdown(result: ChecklistResult, accountEmail: string): string;
|
|
1626
1625
|
|
|
1627
|
-
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, 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 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, applyReleaseNotes, 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, 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, listEvents, listGeneratedApks, listGrants, listImages, listInAppProducts, listLeaderboards, listOffers, listOneTimeOffers, listOneTimeProducts, listRecoveryActions, listReports, listReviews, listSubscriptions, listTesters, listTracks, listUsers, listVoidedPurchases, loadPreflightConfig, loadStatusCache, maybePaginate, migratePrices, 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, revokeSubscriptionPurchase, runPreflight, runWatch, runWatchLoop, safePath, safePathWithin, saveStatusCache, scaffoldPlugin, searchAuditEvents, searchVitalsErrors, sendNotification, sendWebhook, sha256File, sortResults, startTrain, statusHasBreach, syncImages, syncInAppProducts, topFiles, trackBreachState, translateBundle, updateAppDetails, updateDataSafety, updateGrant, updateInAppProduct, 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 };
|
|
1626
|
+
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, 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, applyReleaseNotes, 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, 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, listEvents, listGeneratedApks, listGrants, listImages, listInAppProducts, listLeaderboards, listOffers, listOneTimeOffers, listOneTimeProducts, listRecoveryActions, listReports, listReviews, listSubscriptions, listTesters, listTracks, listUsers, listVoidedPurchases, loadPreflightConfig, loadStatusCache, maybePaginate, migratePrices, 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, revokeSubscriptionPurchase, runPreflight, runWatch, runWatchLoop, safePath, safePathWithin, saveStatusCache, scaffoldPlugin, searchAuditEvents, searchVitalsErrors, sendNotification, sendWebhook, sha256File, sortResults, startTrain, statusHasBreach, syncImages, syncInAppProducts, topFiles, trackBreachState, translateBundle, updateAppDetails, updateDataSafety, updateGrant, updateInAppProduct, 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
|
@@ -575,7 +575,6 @@ async function getAppInfo(client, packageName) {
|
|
|
575
575
|
await client.edits.delete(packageName, edit.id);
|
|
576
576
|
return {
|
|
577
577
|
packageName,
|
|
578
|
-
title: details.title,
|
|
579
578
|
defaultLanguage: details.defaultLanguage,
|
|
580
579
|
contactEmail: details.contactEmail
|
|
581
580
|
};
|
|
@@ -2056,9 +2055,8 @@ function sanitizeSubscription(data) {
|
|
|
2056
2055
|
delete cleaned["archived"];
|
|
2057
2056
|
if (cleaned.basePlans) {
|
|
2058
2057
|
cleaned.basePlans = cleaned.basePlans.map((bp) => {
|
|
2059
|
-
const { state: _state,
|
|
2058
|
+
const { state: _state, ...cleanBp } = bp;
|
|
2060
2059
|
void _state;
|
|
2061
|
-
void _archived;
|
|
2062
2060
|
if (cleanBp.regionalConfigs) {
|
|
2063
2061
|
cleanBp.regionalConfigs = cleanBp.regionalConfigs.map((rc) => ({
|
|
2064
2062
|
...rc,
|
|
@@ -2109,7 +2107,8 @@ function autoFixProrationMode(data) {
|
|
|
2109
2107
|
function validateSubscriptionData(data) {
|
|
2110
2108
|
autoFixProrationMode(data);
|
|
2111
2109
|
if (data.listings) {
|
|
2112
|
-
for (const
|
|
2110
|
+
for (const listing of data.listings) {
|
|
2111
|
+
const lang = listing.languageCode || "?";
|
|
2113
2112
|
if (listing.benefits && listing.benefits.length > 4) {
|
|
2114
2113
|
throw new GpcError(
|
|
2115
2114
|
`Listing "${lang}" has ${listing.benefits.length} benefits (max 4)`,
|
|
@@ -2213,7 +2212,7 @@ async function deleteBasePlan(client, packageName, productId, basePlanId) {
|
|
|
2213
2212
|
async function migratePrices(client, packageName, productId, basePlanId, data) {
|
|
2214
2213
|
validatePackageName(packageName);
|
|
2215
2214
|
validateSku(productId);
|
|
2216
|
-
|
|
2215
|
+
await client.subscriptions.migratePrices(packageName, productId, basePlanId, data);
|
|
2217
2216
|
}
|
|
2218
2217
|
async function listOffers(client, packageName, productId, basePlanId) {
|
|
2219
2218
|
validatePackageName(packageName);
|
|
@@ -3525,9 +3524,25 @@ async function deferSubscriptionPurchase(client, packageName, subscriptionId, to
|
|
|
3525
3524
|
}
|
|
3526
3525
|
});
|
|
3527
3526
|
}
|
|
3528
|
-
async function revokeSubscriptionPurchase(client, packageName, token) {
|
|
3527
|
+
async function revokeSubscriptionPurchase(client, packageName, token, refundType = "prorated", productId) {
|
|
3529
3528
|
validatePackageName(packageName);
|
|
3530
|
-
|
|
3529
|
+
let body;
|
|
3530
|
+
if (refundType === "item") {
|
|
3531
|
+
if (!productId) {
|
|
3532
|
+
throw new GpcError(
|
|
3533
|
+
"productId is required for item-based refund",
|
|
3534
|
+
"REVOKE_MISSING_PRODUCT_ID",
|
|
3535
|
+
2,
|
|
3536
|
+
"Pass --product-id when using --refund-type item"
|
|
3537
|
+
);
|
|
3538
|
+
}
|
|
3539
|
+
body = { revocationContext: { itemBasedRefund: { productId } } };
|
|
3540
|
+
} else if (refundType === "full") {
|
|
3541
|
+
body = { revocationContext: { fullRefund: {} } };
|
|
3542
|
+
} else {
|
|
3543
|
+
body = { revocationContext: { proratedRefund: {} } };
|
|
3544
|
+
}
|
|
3545
|
+
return client.purchases.revokeSubscriptionV2(packageName, token, body);
|
|
3531
3546
|
}
|
|
3532
3547
|
async function listVoidedPurchases(client, packageName, options) {
|
|
3533
3548
|
validatePackageName(packageName);
|
|
@@ -3585,15 +3600,17 @@ async function getProductPurchaseV2(client, packageName, token) {
|
|
|
3585
3600
|
validatePackageName(packageName);
|
|
3586
3601
|
return client.purchases.getProductV2(packageName, token);
|
|
3587
3602
|
}
|
|
3588
|
-
async function cancelSubscriptionV2(client, packageName, token, cancellationType) {
|
|
3603
|
+
async function cancelSubscriptionV2(client, packageName, token, cancellationType = "USER_REQUESTED_STOP_RENEWALS") {
|
|
3589
3604
|
validatePackageName(packageName);
|
|
3590
|
-
|
|
3591
|
-
|
|
3605
|
+
return client.purchases.cancelSubscriptionV2(packageName, token, {
|
|
3606
|
+
cancellationContext: { cancellationType }
|
|
3607
|
+
});
|
|
3592
3608
|
}
|
|
3593
|
-
async function deferSubscriptionV2(client, packageName, token,
|
|
3609
|
+
async function deferSubscriptionV2(client, packageName, token, deferDuration, etag) {
|
|
3594
3610
|
validatePackageName(packageName);
|
|
3611
|
+
const resolvedEtag = etag ?? (await client.purchases.getSubscriptionV2(packageName, token)).etag ?? "";
|
|
3595
3612
|
return client.purchases.deferSubscriptionV2(packageName, token, {
|
|
3596
|
-
|
|
3613
|
+
deferralContext: { etag: resolvedEtag, deferDuration }
|
|
3597
3614
|
});
|
|
3598
3615
|
}
|
|
3599
3616
|
|
|
@@ -4013,8 +4030,8 @@ async function importDataSafety(client, packageName, filePath) {
|
|
|
4013
4030
|
}
|
|
4014
4031
|
|
|
4015
4032
|
// src/commands/external-transactions.ts
|
|
4016
|
-
async function createExternalTransaction(client, packageName, data) {
|
|
4017
|
-
return client.externalTransactions.create(packageName, data);
|
|
4033
|
+
async function createExternalTransaction(client, packageName, data, externalTransactionId) {
|
|
4034
|
+
return client.externalTransactions.create(packageName, data, externalTransactionId);
|
|
4018
4035
|
}
|
|
4019
4036
|
async function getExternalTransaction(client, packageName, transactionId) {
|
|
4020
4037
|
return client.externalTransactions.get(packageName, transactionId);
|