@gpc-cli/core 0.9.6 → 0.9.8
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 +91 -3
- package/dist/index.js +746 -31
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { OutputFormat, ResolvedConfig } from '@gpc-cli/config';
|
|
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 } from '@gpc-cli/api';
|
|
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';
|
|
5
5
|
|
|
6
6
|
declare class GpcError extends Error {
|
|
7
7
|
readonly code: string;
|
|
@@ -185,6 +185,7 @@ declare function pushListings(client: PlayApiClient, packageName: string, dir: s
|
|
|
185
185
|
declare function listImages(client: PlayApiClient, packageName: string, language: string, imageType: ImageType): Promise<Image[]>;
|
|
186
186
|
declare function uploadImage(client: PlayApiClient, packageName: string, language: string, imageType: ImageType, filePath: string): Promise<Image>;
|
|
187
187
|
declare function deleteImage(client: PlayApiClient, packageName: string, language: string, imageType: ImageType, imageId: string): Promise<void>;
|
|
188
|
+
declare function diffListingsCommand(client: PlayApiClient, packageName: string, dir: string): Promise<ListingDiff[]>;
|
|
188
189
|
declare function getCountryAvailability(client: PlayApiClient, packageName: string, track: string): Promise<CountryAvailability>;
|
|
189
190
|
declare function updateAppDetails(client: PlayApiClient, packageName: string, details: Partial<AppDetails>): Promise<AppDetails>;
|
|
190
191
|
|
|
@@ -430,6 +431,49 @@ declare function importTestersFromCsv(client: PlayApiClient, packageName: string
|
|
|
430
431
|
testers: Testers;
|
|
431
432
|
}>;
|
|
432
433
|
|
|
434
|
+
interface GitNotesOptions {
|
|
435
|
+
since?: string;
|
|
436
|
+
language?: string;
|
|
437
|
+
maxLength?: number;
|
|
438
|
+
}
|
|
439
|
+
interface GitReleaseNotes {
|
|
440
|
+
language: string;
|
|
441
|
+
text: string;
|
|
442
|
+
commitCount: number;
|
|
443
|
+
since: string;
|
|
444
|
+
}
|
|
445
|
+
declare function generateNotesFromGit(options?: GitNotesOptions): Promise<GitReleaseNotes>;
|
|
446
|
+
|
|
447
|
+
declare function listRecoveryActions(client: PlayApiClient, packageName: string): Promise<AppRecoveryAction[]>;
|
|
448
|
+
declare function cancelRecoveryAction(client: PlayApiClient, packageName: string, recoveryId: string): Promise<void>;
|
|
449
|
+
declare function deployRecoveryAction(client: PlayApiClient, packageName: string, recoveryId: string): Promise<void>;
|
|
450
|
+
declare function createRecoveryAction(client: PlayApiClient, packageName: string, request: CreateAppRecoveryActionRequest): Promise<AppRecoveryAction>;
|
|
451
|
+
declare function addRecoveryTargeting(client: PlayApiClient, packageName: string, actionId: string, targeting: AppRecoveryTargeting): Promise<AppRecoveryAction>;
|
|
452
|
+
|
|
453
|
+
declare function getDataSafety(client: PlayApiClient, packageName: string): Promise<DataSafety>;
|
|
454
|
+
declare function updateDataSafety(client: PlayApiClient, packageName: string, data: DataSafety): Promise<DataSafety>;
|
|
455
|
+
declare function exportDataSafety(client: PlayApiClient, packageName: string, outputPath: string): Promise<DataSafety>;
|
|
456
|
+
declare function importDataSafety(client: PlayApiClient, packageName: string, filePath: string): Promise<DataSafety>;
|
|
457
|
+
|
|
458
|
+
declare function createExternalTransaction(client: PlayApiClient, packageName: string, data: ExternalTransaction): Promise<ExternalTransaction>;
|
|
459
|
+
declare function getExternalTransaction(client: PlayApiClient, packageName: string, transactionId: string): Promise<ExternalTransaction>;
|
|
460
|
+
declare function refundExternalTransaction(client: PlayApiClient, packageName: string, transactionId: string, refundData: ExternalTransactionRefund): Promise<ExternalTransaction>;
|
|
461
|
+
|
|
462
|
+
declare function listDeviceTiers(client: PlayApiClient, packageName: string): Promise<DeviceTierConfig[]>;
|
|
463
|
+
declare function getDeviceTier(client: PlayApiClient, packageName: string, configId: string): Promise<DeviceTierConfig>;
|
|
464
|
+
declare function createDeviceTier(client: PlayApiClient, packageName: string, config: DeviceTierConfig): Promise<DeviceTierConfig>;
|
|
465
|
+
|
|
466
|
+
declare function listOneTimeProducts(client: PlayApiClient, packageName: string): Promise<OneTimeProductsListResponse>;
|
|
467
|
+
declare function getOneTimeProduct(client: PlayApiClient, packageName: string, productId: string): Promise<OneTimeProduct>;
|
|
468
|
+
declare function createOneTimeProduct(client: PlayApiClient, packageName: string, data: OneTimeProduct): Promise<OneTimeProduct>;
|
|
469
|
+
declare function updateOneTimeProduct(client: PlayApiClient, packageName: string, productId: string, data: Partial<OneTimeProduct>): Promise<OneTimeProduct>;
|
|
470
|
+
declare function deleteOneTimeProduct(client: PlayApiClient, packageName: string, productId: string): Promise<void>;
|
|
471
|
+
declare function listOneTimeOffers(client: PlayApiClient, packageName: string, productId: string): Promise<OneTimeOffersListResponse>;
|
|
472
|
+
declare function getOneTimeOffer(client: PlayApiClient, packageName: string, productId: string, offerId: string): Promise<OneTimeOffer>;
|
|
473
|
+
declare function createOneTimeOffer(client: PlayApiClient, packageName: string, productId: string, data: OneTimeOffer): Promise<OneTimeOffer>;
|
|
474
|
+
declare function updateOneTimeOffer(client: PlayApiClient, packageName: string, productId: string, offerId: string, data: Partial<OneTimeOffer>): Promise<OneTimeOffer>;
|
|
475
|
+
declare function deleteOneTimeOffer(client: PlayApiClient, packageName: string, productId: string, offerId: string): Promise<void>;
|
|
476
|
+
|
|
433
477
|
/**
|
|
434
478
|
* Normalize and resolve a user-supplied path.
|
|
435
479
|
* Prevents path traversal by normalizing `.` and `..` components.
|
|
@@ -441,6 +485,23 @@ declare function safePath(userPath: string): string;
|
|
|
441
485
|
*/
|
|
442
486
|
declare function safePathWithin(userPath: string, baseDir: string): string;
|
|
443
487
|
|
|
488
|
+
/**
|
|
489
|
+
* Sort utility for CLI list command results.
|
|
490
|
+
*
|
|
491
|
+
* Supports ascending (field) and descending (-field) sort specs,
|
|
492
|
+
* including dot notation for nested fields (e.g., "comments.userComment.starRating").
|
|
493
|
+
*/
|
|
494
|
+
/**
|
|
495
|
+
* Sort an array of items by a field specification.
|
|
496
|
+
*
|
|
497
|
+
* @param items - Array to sort (not mutated; returns a new array)
|
|
498
|
+
* @param sortSpec - Field name for ascending, or `-field` for descending.
|
|
499
|
+
* Supports dot notation for nested fields.
|
|
500
|
+
* If undefined/empty, returns items in original order.
|
|
501
|
+
* @returns Sorted copy of items
|
|
502
|
+
*/
|
|
503
|
+
declare function sortResults<T>(items: T[], sortSpec?: string): T[];
|
|
504
|
+
|
|
444
505
|
interface ScaffoldOptions {
|
|
445
506
|
name: string;
|
|
446
507
|
dir: string;
|
|
@@ -479,4 +540,31 @@ declare function writeAuditLog(entry: AuditEntry): Promise<void>;
|
|
|
479
540
|
*/
|
|
480
541
|
declare function createAuditEntry(command: string, args: Record<string, unknown>, app?: string): AuditEntry;
|
|
481
542
|
|
|
482
|
-
|
|
543
|
+
interface WebhookPayload {
|
|
544
|
+
command: string;
|
|
545
|
+
success: boolean;
|
|
546
|
+
duration: number;
|
|
547
|
+
app?: string;
|
|
548
|
+
details?: Record<string, unknown>;
|
|
549
|
+
error?: string;
|
|
550
|
+
}
|
|
551
|
+
declare function formatSlackPayload(payload: WebhookPayload): object;
|
|
552
|
+
declare function formatDiscordPayload(payload: WebhookPayload): object;
|
|
553
|
+
declare function formatCustomPayload(payload: WebhookPayload): object;
|
|
554
|
+
declare function sendWebhook(config: WebhookConfig, payload: WebhookPayload, target?: string): Promise<void>;
|
|
555
|
+
|
|
556
|
+
interface InternalSharingUploadResult {
|
|
557
|
+
downloadUrl: string;
|
|
558
|
+
sha256: string;
|
|
559
|
+
certificateFingerprint: string;
|
|
560
|
+
fileType: "bundle" | "apk";
|
|
561
|
+
}
|
|
562
|
+
declare function uploadInternalSharing(client: PlayApiClient, packageName: string, filePath: string, fileType?: "bundle" | "apk"): Promise<InternalSharingUploadResult>;
|
|
563
|
+
|
|
564
|
+
declare function listGeneratedApks(client: PlayApiClient, packageName: string, versionCode: number): Promise<GeneratedApk[]>;
|
|
565
|
+
declare function downloadGeneratedApk(client: PlayApiClient, packageName: string, versionCode: number, apkId: string, outputPath: string): Promise<{
|
|
566
|
+
path: string;
|
|
567
|
+
sizeBytes: number;
|
|
568
|
+
}>;
|
|
569
|
+
|
|
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 };
|