@gpc-cli/core 0.9.8 → 0.9.10

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, AppRecoveryTargeting, AppRecoveryAction, CreateAppRecoveryActionRequest, DataSafety, ExternalTransaction, ExternalTransactionRefund, DeviceTierConfig, OneTimeOffer, OneTimeProduct, OneTimeOffersListResponse, OneTimeProductsListResponse, GeneratedApk } 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>;
@@ -474,6 +524,14 @@ declare function createOneTimeOffer(client: PlayApiClient, packageName: string,
474
524
  declare function updateOneTimeOffer(client: PlayApiClient, packageName: string, productId: string, offerId: string, data: Partial<OneTimeOffer>): Promise<OneTimeOffer>;
475
525
  declare function deleteOneTimeOffer(client: PlayApiClient, packageName: string, productId: string, offerId: string): Promise<void>;
476
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
+
477
535
  /**
478
536
  * Normalize and resolve a user-supplied path.
479
537
  * Prevents path traversal by normalizing `.` and `..` components.
@@ -567,4 +625,10 @@ declare function downloadGeneratedApk(client: PlayApiClient, packageName: string
567
625
  sizeBytes: number;
568
626
  }>;
569
627
 
570
- 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 InternalSharingUploadResult, 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, addRecoveryTargeting, addTesters, cancelRecoveryAction, cancelSubscriptionPurchase, checkThreshold, compareVitalsTrend, consumeProductPurchase, convertRegionPrices, createAuditEntry, createDeviceTier, createExternalTransaction, createInAppProduct, createOffer, createOneTimeOffer, createOneTimeProduct, createRecoveryAction, createSubscription, deactivateBasePlan, deactivateOffer, deferSubscriptionPurchase, deleteBasePlan, deleteImage, deleteInAppProduct, deleteListing, deleteOffer, deleteOneTimeOffer, deleteOneTimeProduct, deleteSubscription, deployRecoveryAction, detectOutputFormat, diffListings, diffListingsCommand, discoverPlugins, downloadGeneratedApk, downloadReport, exportDataSafety, exportReviews, formatCustomPayload, formatDiscordPayload, formatOutput, formatSlackPayload, generateNotesFromGit, getAppInfo, getCountryAvailability, getDataSafety, getDeviceTier, getExternalTransaction, getInAppProduct, getListings, getOffer, getOneTimeOffer, getOneTimeProduct, getProductPurchase, 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, 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, updateOneTimeOffer, updateOneTimeProduct, updateRollout, updateSubscription, updateUser, uploadImage, uploadInternalSharing, uploadRelease, validateImage, validatePreSubmission, validateReleaseNotes, validateUploadFile, writeAuditLog, writeListingsToDir };
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 };