@gpc-cli/core 0.9.7 → 0.9.9

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 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, Track, Listing, ImageType, CountryAvailability, Image, AppDetails, Review, ReviewReplyResponse, Subscription, SubscriptionOffer, OffersListResponse, BasePlanMigratePricesRequest, InAppProduct, SubscriptionDeferResponse, ProductPurchase, SubscriptionPurchaseV2, VoidedPurchase, UsersApiClient, User, DeveloperPermission, Grant, MetricRow, ReportingDimension, ReportingAggregation, ReportingApiClient, VitalsMetricSet, AnomalyDetectionResponse, MetricSetResponse, ErrorIssuesResponse, ConvertRegionPricesResponse, ReportType, StatsDimension, ReportBucket, Testers, AppRecoveryAction, DataSafety, ExternalTransaction, ExternalTransactionRefund } from '@gpc-cli/api';
4
+ import { PlayApiClient, Track, ExternallyHostedApk, ExternallyHostedApkResponse, Listing, ImageType, CountryAvailability, Image, AppDetails, Review, ReviewReplyResponse, Subscription, SubscriptionOffer, OffersListResponse, BasePlanMigratePricesRequest, InAppProduct, SubscriptionDeferResponse, ProductPurchase, SubscriptionPurchaseV2, VoidedPurchase, UsersApiClient, User, DeveloperPermission, Grant, MetricRow, ReportingDimension, ReportingAggregation, ReportingApiClient, VitalsMetricSet, AnomalyDetectionResponse, MetricSetResponse, ErrorIssuesResponse, ConvertRegionPricesResponse, ReportType, StatsDimension, ReportBucket, Testers, AppRecoveryTargeting, AppRecoveryAction, CreateAppRecoveryActionRequest, DataSafety, ExternalTransaction, ExternalTransactionRefund, DeviceTierConfig, OneTimeOffer, OneTimeProduct, OneTimeOffersListResponse, OneTimeProductsListResponse, GeneratedApk, PurchaseOption, PurchaseOptionsListResponse } from '@gpc-cli/api';
5
5
 
6
6
  declare class GpcError extends Error {
7
7
  readonly code: string;
@@ -32,6 +32,7 @@ declare function detectOutputFormat(): OutputFormat;
32
32
  declare function formatOutput(data: unknown, format: OutputFormat, redact?: boolean): string;
33
33
  /** Recursively redact sensitive fields from data before output. */
34
34
  declare function redactSensitive(data: unknown): unknown;
35
+ declare function formatJunit(data: unknown, commandName?: string): string;
35
36
 
36
37
  interface CommandContext {
37
38
  config: ResolvedConfig;
@@ -154,6 +155,9 @@ declare function promoteRelease(client: PlayApiClient, packageName: string, from
154
155
  }): Promise<ReleaseStatusResult>;
155
156
  declare function updateRollout(client: PlayApiClient, packageName: string, track: string, action: "increase" | "halt" | "resume" | "complete", userFraction?: number): Promise<ReleaseStatusResult>;
156
157
  declare function listTracks(client: PlayApiClient, packageName: string): Promise<Track[]>;
158
+ declare function createTrack(client: PlayApiClient, packageName: string, trackName: string): Promise<Track>;
159
+ declare function updateTrackConfig(client: PlayApiClient, packageName: string, trackName: string, config: Record<string, unknown>): Promise<Track>;
160
+ declare function uploadExternallyHosted(client: PlayApiClient, packageName: string, data: ExternallyHostedApk): Promise<ExternallyHostedApkResponse>;
157
161
 
158
162
  interface ListingDiff {
159
163
  language: string;
@@ -187,8 +191,47 @@ declare function uploadImage(client: PlayApiClient, packageName: string, languag
187
191
  declare function deleteImage(client: PlayApiClient, packageName: string, language: string, imageType: ImageType, imageId: string): Promise<void>;
188
192
  declare function diffListingsCommand(client: PlayApiClient, packageName: string, dir: string): Promise<ListingDiff[]>;
189
193
  declare function getCountryAvailability(client: PlayApiClient, packageName: string, track: string): Promise<CountryAvailability>;
194
+ interface ExportImagesOptions {
195
+ lang?: string;
196
+ type?: ImageType;
197
+ }
198
+ interface ExportImagesSummary {
199
+ languages: number;
200
+ images: number;
201
+ totalSize: number;
202
+ }
203
+ declare function exportImages(client: PlayApiClient, packageName: string, dir: string, options?: ExportImagesOptions): Promise<ExportImagesSummary>;
190
204
  declare function updateAppDetails(client: PlayApiClient, packageName: string, details: Partial<AppDetails>): Promise<AppDetails>;
191
205
 
206
+ interface FastlaneDetection {
207
+ hasFastfile: boolean;
208
+ hasAppfile: boolean;
209
+ hasMetadata: boolean;
210
+ hasGemfile: boolean;
211
+ packageName?: string;
212
+ jsonKeyPath?: string;
213
+ lanes: FastlaneLane[];
214
+ metadataLanguages: string[];
215
+ }
216
+ interface FastlaneLane {
217
+ name: string;
218
+ actions: string[];
219
+ gpcEquivalent?: string;
220
+ }
221
+ interface MigrationResult {
222
+ config: Record<string, unknown>;
223
+ checklist: string[];
224
+ warnings: string[];
225
+ }
226
+ declare function detectFastlane(cwd: string): Promise<FastlaneDetection>;
227
+ declare function parseFastfile(content: string): FastlaneLane[];
228
+ declare function parseAppfile(content: string): {
229
+ packageName?: string;
230
+ jsonKeyPath?: string;
231
+ };
232
+ declare function generateMigrationPlan(detection: FastlaneDetection): MigrationResult;
233
+ declare function writeMigrationOutput(result: MigrationResult, dir: string): Promise<string[]>;
234
+
192
235
  declare const GOOGLE_PLAY_LANGUAGES: string[];
193
236
  declare function isValidBcp47(tag: string): boolean;
194
237
 
@@ -320,6 +363,13 @@ interface SyncResult {
320
363
  declare function syncInAppProducts(client: PlayApiClient, packageName: string, dir: string, options?: {
321
364
  dryRun?: boolean;
322
365
  }): Promise<SyncResult>;
366
+ interface BatchSyncResult extends SyncResult {
367
+ batchUsed: boolean;
368
+ batchErrors: number;
369
+ }
370
+ declare function batchSyncInAppProducts(client: PlayApiClient, packageName: string, dir: string, options?: {
371
+ dryRun?: boolean;
372
+ }): Promise<BatchSyncResult>;
323
373
 
324
374
  declare function getProductPurchase(client: PlayApiClient, packageName: string, productId: string, token: string): Promise<ProductPurchase>;
325
375
  declare function acknowledgeProductPurchase(client: PlayApiClient, packageName: string, productId: string, token: string, payload?: string): Promise<void>;
@@ -447,6 +497,8 @@ declare function generateNotesFromGit(options?: GitNotesOptions): Promise<GitRel
447
497
  declare function listRecoveryActions(client: PlayApiClient, packageName: string): Promise<AppRecoveryAction[]>;
448
498
  declare function cancelRecoveryAction(client: PlayApiClient, packageName: string, recoveryId: string): Promise<void>;
449
499
  declare function deployRecoveryAction(client: PlayApiClient, packageName: string, recoveryId: string): Promise<void>;
500
+ declare function createRecoveryAction(client: PlayApiClient, packageName: string, request: CreateAppRecoveryActionRequest): Promise<AppRecoveryAction>;
501
+ declare function addRecoveryTargeting(client: PlayApiClient, packageName: string, actionId: string, targeting: AppRecoveryTargeting): Promise<AppRecoveryAction>;
450
502
 
451
503
  declare function getDataSafety(client: PlayApiClient, packageName: string): Promise<DataSafety>;
452
504
  declare function updateDataSafety(client: PlayApiClient, packageName: string, data: DataSafety): Promise<DataSafety>;
@@ -457,6 +509,29 @@ declare function createExternalTransaction(client: PlayApiClient, packageName: s
457
509
  declare function getExternalTransaction(client: PlayApiClient, packageName: string, transactionId: string): Promise<ExternalTransaction>;
458
510
  declare function refundExternalTransaction(client: PlayApiClient, packageName: string, transactionId: string, refundData: ExternalTransactionRefund): Promise<ExternalTransaction>;
459
511
 
512
+ declare function listDeviceTiers(client: PlayApiClient, packageName: string): Promise<DeviceTierConfig[]>;
513
+ declare function getDeviceTier(client: PlayApiClient, packageName: string, configId: string): Promise<DeviceTierConfig>;
514
+ declare function createDeviceTier(client: PlayApiClient, packageName: string, config: DeviceTierConfig): Promise<DeviceTierConfig>;
515
+
516
+ declare function listOneTimeProducts(client: PlayApiClient, packageName: string): Promise<OneTimeProductsListResponse>;
517
+ declare function getOneTimeProduct(client: PlayApiClient, packageName: string, productId: string): Promise<OneTimeProduct>;
518
+ declare function createOneTimeProduct(client: PlayApiClient, packageName: string, data: OneTimeProduct): Promise<OneTimeProduct>;
519
+ declare function updateOneTimeProduct(client: PlayApiClient, packageName: string, productId: string, data: Partial<OneTimeProduct>): Promise<OneTimeProduct>;
520
+ declare function deleteOneTimeProduct(client: PlayApiClient, packageName: string, productId: string): Promise<void>;
521
+ declare function listOneTimeOffers(client: PlayApiClient, packageName: string, productId: string): Promise<OneTimeOffersListResponse>;
522
+ declare function getOneTimeOffer(client: PlayApiClient, packageName: string, productId: string, offerId: string): Promise<OneTimeOffer>;
523
+ declare function createOneTimeOffer(client: PlayApiClient, packageName: string, productId: string, data: OneTimeOffer): Promise<OneTimeOffer>;
524
+ declare function updateOneTimeOffer(client: PlayApiClient, packageName: string, productId: string, offerId: string, data: Partial<OneTimeOffer>): Promise<OneTimeOffer>;
525
+ declare function deleteOneTimeOffer(client: PlayApiClient, packageName: string, productId: string, offerId: string): Promise<void>;
526
+
527
+ interface Spinner {
528
+ start(): void;
529
+ stop(message?: string): void;
530
+ fail(message?: string): void;
531
+ update(message: string): void;
532
+ }
533
+ declare function createSpinner(message: string): Spinner;
534
+
460
535
  /**
461
536
  * Normalize and resolve a user-supplied path.
462
537
  * Prevents path traversal by normalizing `.` and `..` components.
@@ -536,4 +611,24 @@ declare function formatDiscordPayload(payload: WebhookPayload): object;
536
611
  declare function formatCustomPayload(payload: WebhookPayload): object;
537
612
  declare function sendWebhook(config: WebhookConfig, payload: WebhookPayload, target?: string): Promise<void>;
538
613
 
539
- export { ApiError, type AppInfo, type AuditEntry, type CommandContext, ConfigError, type DiscoverPluginsOptions, type DryRunPublishResult, type DryRunResult, type DryRunUploadResult, type FileValidationResult, GOOGLE_PLAY_LANGUAGES, type GitNotesOptions, type GitReleaseNotes, GpcError, type ImageValidationResult, type ListIapOptions, type ListSubscriptionsOptions, type ListUsersOptions, type ListVoidedOptions, type ListingDiff, type ListingsResult, type LoadedPlugin, NetworkError, PERMISSION_PROPAGATION_WARNING, type ParsedMonth, PluginManager, type PublishOptions, type PublishResult, type PushResult, type ReleaseNotesValidation, type ReleaseStatusResult, type ReviewExportOptions, type ReviewsFilterOptions, type ScaffoldOptions, type ScaffoldResult, type SyncResult, type ThresholdResult, type UploadResult, type ValidateCheck, type ValidateOptions, type ValidateResult, type VitalsOverview, type VitalsQueryOptions, type VitalsTrendComparison, type WebhookPayload, acknowledgeProductPurchase, activateBasePlan, activateOffer, addTesters, cancelRecoveryAction, cancelSubscriptionPurchase, checkThreshold, compareVitalsTrend, consumeProductPurchase, convertRegionPrices, createAuditEntry, createExternalTransaction, createInAppProduct, createOffer, createSubscription, deactivateBasePlan, deactivateOffer, deferSubscriptionPurchase, deleteBasePlan, deleteImage, deleteInAppProduct, deleteListing, deleteOffer, deleteSubscription, deployRecoveryAction, detectOutputFormat, diffListings, diffListingsCommand, discoverPlugins, downloadReport, exportDataSafety, exportReviews, formatCustomPayload, formatDiscordPayload, formatOutput, formatSlackPayload, generateNotesFromGit, getAppInfo, getCountryAvailability, getDataSafety, getExternalTransaction, getInAppProduct, getListings, getOffer, getProductPurchase, getReleasesStatus, getReview, getSubscription, getSubscriptionPurchase, getUser, getVitalsAnomalies, getVitalsAnr, getVitalsBattery, getVitalsCrashes, getVitalsMemory, getVitalsOverview, getVitalsRendering, getVitalsStartup, importDataSafety, importTestersFromCsv, initAudit, inviteUser, isFinancialReportType, isStatsReportType, isValidBcp47, isValidReportType, isValidStatsDimension, listImages, listInAppProducts, listOffers, listRecoveryActions, listReports, listReviews, listSubscriptions, listTesters, listTracks, listUsers, listVoidedPurchases, migratePrices, parseGrantArg, parseMonth, promoteRelease, publish, pullListings, pushListings, readListingsFromDir, readReleaseNotesFromDir, redactSensitive, refundExternalTransaction, refundOrder, removeTesters, removeUser, replyToReview, revokeSubscriptionPurchase, safePath, safePathWithin, scaffoldPlugin, searchVitalsErrors, sendWebhook, sortResults, syncInAppProducts, updateAppDetails, updateDataSafety, updateInAppProduct, updateListing, updateOffer, updateRollout, updateSubscription, updateUser, uploadImage, uploadRelease, validateImage, validatePreSubmission, validateReleaseNotes, validateUploadFile, writeAuditLog, writeListingsToDir };
614
+ interface InternalSharingUploadResult {
615
+ downloadUrl: string;
616
+ sha256: string;
617
+ certificateFingerprint: string;
618
+ fileType: "bundle" | "apk";
619
+ }
620
+ declare function uploadInternalSharing(client: PlayApiClient, packageName: string, filePath: string, fileType?: "bundle" | "apk"): Promise<InternalSharingUploadResult>;
621
+
622
+ declare function listGeneratedApks(client: PlayApiClient, packageName: string, versionCode: number): Promise<GeneratedApk[]>;
623
+ declare function downloadGeneratedApk(client: PlayApiClient, packageName: string, versionCode: number, apkId: string, outputPath: string): Promise<{
624
+ path: string;
625
+ sizeBytes: number;
626
+ }>;
627
+
628
+ declare function listPurchaseOptions(client: PlayApiClient, packageName: string): Promise<PurchaseOptionsListResponse>;
629
+ declare function getPurchaseOption(client: PlayApiClient, packageName: string, purchaseOptionId: string): Promise<PurchaseOption>;
630
+ declare function createPurchaseOption(client: PlayApiClient, packageName: string, data: PurchaseOption): Promise<PurchaseOption>;
631
+ declare function activatePurchaseOption(client: PlayApiClient, packageName: string, purchaseOptionId: string): Promise<PurchaseOption>;
632
+ declare function deactivatePurchaseOption(client: PlayApiClient, packageName: string, purchaseOptionId: string): Promise<PurchaseOption>;
633
+
634
+ export { ApiError, type AppInfo, type AuditEntry, type BatchSyncResult, type CommandContext, ConfigError, type DiscoverPluginsOptions, type DryRunPublishResult, type DryRunResult, type DryRunUploadResult, type ExportImagesOptions, type ExportImagesSummary, type FastlaneDetection, type FastlaneLane, type FileValidationResult, GOOGLE_PLAY_LANGUAGES, type GitNotesOptions, type GitReleaseNotes, GpcError, type ImageValidationResult, type InternalSharingUploadResult, type ListIapOptions, type ListSubscriptionsOptions, type ListUsersOptions, type ListVoidedOptions, type ListingDiff, type ListingsResult, type LoadedPlugin, type MigrationResult, NetworkError, PERMISSION_PROPAGATION_WARNING, type ParsedMonth, PluginManager, type PublishOptions, type PublishResult, type PushResult, type ReleaseNotesValidation, type ReleaseStatusResult, type ReviewExportOptions, type ReviewsFilterOptions, type ScaffoldOptions, type ScaffoldResult, type Spinner, type SyncResult, type ThresholdResult, type UploadResult, type ValidateCheck, type ValidateOptions, type ValidateResult, type VitalsOverview, type VitalsQueryOptions, type VitalsTrendComparison, type WebhookPayload, acknowledgeProductPurchase, activateBasePlan, activateOffer, activatePurchaseOption, addRecoveryTargeting, addTesters, batchSyncInAppProducts, cancelRecoveryAction, cancelSubscriptionPurchase, checkThreshold, compareVitalsTrend, consumeProductPurchase, convertRegionPrices, createAuditEntry, createDeviceTier, createExternalTransaction, createInAppProduct, createOffer, createOneTimeOffer, createOneTimeProduct, createPurchaseOption, createRecoveryAction, createSpinner, createSubscription, createTrack, deactivateBasePlan, deactivateOffer, deactivatePurchaseOption, deferSubscriptionPurchase, deleteBasePlan, deleteImage, deleteInAppProduct, deleteListing, deleteOffer, deleteOneTimeOffer, deleteOneTimeProduct, deleteSubscription, deployRecoveryAction, detectFastlane, detectOutputFormat, diffListings, diffListingsCommand, discoverPlugins, downloadGeneratedApk, downloadReport, exportDataSafety, exportImages, exportReviews, formatCustomPayload, formatDiscordPayload, formatJunit, formatOutput, formatSlackPayload, generateMigrationPlan, generateNotesFromGit, getAppInfo, getCountryAvailability, getDataSafety, getDeviceTier, getExternalTransaction, getInAppProduct, getListings, getOffer, getOneTimeOffer, getOneTimeProduct, getProductPurchase, getPurchaseOption, getReleasesStatus, getReview, getSubscription, getSubscriptionPurchase, getUser, getVitalsAnomalies, getVitalsAnr, getVitalsBattery, getVitalsCrashes, getVitalsMemory, getVitalsOverview, getVitalsRendering, getVitalsStartup, importDataSafety, importTestersFromCsv, initAudit, inviteUser, isFinancialReportType, isStatsReportType, isValidBcp47, isValidReportType, isValidStatsDimension, listDeviceTiers, listGeneratedApks, listImages, listInAppProducts, listOffers, listOneTimeOffers, listOneTimeProducts, listPurchaseOptions, listRecoveryActions, listReports, listReviews, listSubscriptions, listTesters, listTracks, listUsers, listVoidedPurchases, migratePrices, parseAppfile, parseFastfile, parseGrantArg, parseMonth, promoteRelease, publish, pullListings, pushListings, readListingsFromDir, readReleaseNotesFromDir, redactSensitive, refundExternalTransaction, refundOrder, removeTesters, removeUser, replyToReview, revokeSubscriptionPurchase, safePath, safePathWithin, scaffoldPlugin, searchVitalsErrors, sendWebhook, sortResults, syncInAppProducts, updateAppDetails, updateDataSafety, updateInAppProduct, updateListing, updateOffer, updateOneTimeOffer, updateOneTimeProduct, updateRollout, updateSubscription, updateTrackConfig, updateUser, uploadExternallyHosted, uploadImage, uploadInternalSharing, uploadRelease, validateImage, validatePreSubmission, validateReleaseNotes, validateUploadFile, writeAuditLog, writeListingsToDir, writeMigrationOutput };