@gpc-cli/api 1.0.0
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/LICENSE +21 -0
- package/dist/index.d.ts +674 -0
- package/dist/index.js +972 -0
- package/dist/index.js.map +1 -0
- package/package.json +38 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 GPC Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,674 @@
|
|
|
1
|
+
interface RateLimitBucket {
|
|
2
|
+
name: string;
|
|
3
|
+
maxTokens: number;
|
|
4
|
+
refillRate: number;
|
|
5
|
+
refillIntervalMs: number;
|
|
6
|
+
}
|
|
7
|
+
interface RateLimiter {
|
|
8
|
+
acquire(bucket: string): Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
declare const RATE_LIMIT_BUCKETS: Record<string, RateLimitBucket>;
|
|
11
|
+
declare function createRateLimiter(buckets?: RateLimitBucket[]): RateLimiter;
|
|
12
|
+
|
|
13
|
+
interface RetryLogEntry {
|
|
14
|
+
attempt: number;
|
|
15
|
+
method: string;
|
|
16
|
+
path: string;
|
|
17
|
+
status?: number;
|
|
18
|
+
error: string;
|
|
19
|
+
delayMs: number;
|
|
20
|
+
timestamp: string;
|
|
21
|
+
}
|
|
22
|
+
interface ApiClientOptions {
|
|
23
|
+
auth: {
|
|
24
|
+
getAccessToken(): Promise<string>;
|
|
25
|
+
};
|
|
26
|
+
maxRetries?: number;
|
|
27
|
+
timeout?: number;
|
|
28
|
+
baseDelay?: number;
|
|
29
|
+
maxDelay?: number;
|
|
30
|
+
rateLimitPerSecond?: number;
|
|
31
|
+
baseUrl?: string;
|
|
32
|
+
rateLimiter?: RateLimiter;
|
|
33
|
+
onRetry?: (entry: RetryLogEntry) => void;
|
|
34
|
+
}
|
|
35
|
+
interface ApiResponse<T> {
|
|
36
|
+
data: T;
|
|
37
|
+
status: number;
|
|
38
|
+
}
|
|
39
|
+
interface PagedResponse<T> {
|
|
40
|
+
items: T[];
|
|
41
|
+
nextPageToken?: string;
|
|
42
|
+
}
|
|
43
|
+
interface AppDetails {
|
|
44
|
+
defaultLanguage: string;
|
|
45
|
+
title: string;
|
|
46
|
+
contactEmail?: string;
|
|
47
|
+
contactPhone?: string;
|
|
48
|
+
contactWebsite?: string;
|
|
49
|
+
}
|
|
50
|
+
interface AppEdit {
|
|
51
|
+
id: string;
|
|
52
|
+
expiryTimeSeconds: string;
|
|
53
|
+
}
|
|
54
|
+
interface Track {
|
|
55
|
+
track: string;
|
|
56
|
+
releases: Release[];
|
|
57
|
+
}
|
|
58
|
+
interface Release {
|
|
59
|
+
name?: string;
|
|
60
|
+
versionCodes: string[];
|
|
61
|
+
status: ReleaseStatus;
|
|
62
|
+
userFraction?: number;
|
|
63
|
+
releaseNotes?: ReleaseNote[];
|
|
64
|
+
inAppUpdatePriority?: number;
|
|
65
|
+
}
|
|
66
|
+
type ReleaseStatus = "completed" | "draft" | "halted" | "inProgress";
|
|
67
|
+
interface ReleaseNote {
|
|
68
|
+
language: string;
|
|
69
|
+
text: string;
|
|
70
|
+
}
|
|
71
|
+
interface Bundle {
|
|
72
|
+
versionCode: number;
|
|
73
|
+
sha1: string;
|
|
74
|
+
sha256: string;
|
|
75
|
+
}
|
|
76
|
+
interface Listing {
|
|
77
|
+
language: string;
|
|
78
|
+
title: string;
|
|
79
|
+
shortDescription: string;
|
|
80
|
+
fullDescription: string;
|
|
81
|
+
video?: string;
|
|
82
|
+
}
|
|
83
|
+
interface Review {
|
|
84
|
+
reviewId: string;
|
|
85
|
+
authorName: string;
|
|
86
|
+
comments: ReviewComment[];
|
|
87
|
+
}
|
|
88
|
+
interface ReviewComment {
|
|
89
|
+
userComment?: UserComment;
|
|
90
|
+
developerComment?: DeveloperComment;
|
|
91
|
+
}
|
|
92
|
+
interface UserComment {
|
|
93
|
+
text: string;
|
|
94
|
+
lastModified: {
|
|
95
|
+
seconds: string;
|
|
96
|
+
};
|
|
97
|
+
starRating: number;
|
|
98
|
+
device?: string;
|
|
99
|
+
androidOsVersion?: number;
|
|
100
|
+
appVersionCode?: number;
|
|
101
|
+
appVersionName?: string;
|
|
102
|
+
thumbsUpCount?: number;
|
|
103
|
+
thumbsDownCount?: number;
|
|
104
|
+
reviewerLanguage?: string;
|
|
105
|
+
}
|
|
106
|
+
interface DeveloperComment {
|
|
107
|
+
text: string;
|
|
108
|
+
lastModified: {
|
|
109
|
+
seconds: string;
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
interface TrackListResponse {
|
|
113
|
+
tracks: Track[];
|
|
114
|
+
}
|
|
115
|
+
interface BundleListResponse {
|
|
116
|
+
bundles: Bundle[];
|
|
117
|
+
}
|
|
118
|
+
interface UploadResponse {
|
|
119
|
+
bundle?: Bundle;
|
|
120
|
+
apk?: ApkInfo;
|
|
121
|
+
}
|
|
122
|
+
interface ApkInfo {
|
|
123
|
+
versionCode: number;
|
|
124
|
+
binary: {
|
|
125
|
+
sha1: string;
|
|
126
|
+
sha256: string;
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
interface DeobfuscationFile {
|
|
130
|
+
symbolType: string;
|
|
131
|
+
}
|
|
132
|
+
interface DeobfuscationUploadResponse {
|
|
133
|
+
deobfuscationFile: DeobfuscationFile;
|
|
134
|
+
}
|
|
135
|
+
interface ListingsListResponse {
|
|
136
|
+
listings: Listing[];
|
|
137
|
+
}
|
|
138
|
+
type ImageType = "phoneScreenshots" | "sevenInchScreenshots" | "tenInchScreenshots" | "tvScreenshots" | "wearScreenshots" | "icon" | "featureGraphic" | "tvBanner";
|
|
139
|
+
interface Image {
|
|
140
|
+
id: string;
|
|
141
|
+
url: string;
|
|
142
|
+
sha1: string;
|
|
143
|
+
sha256: string;
|
|
144
|
+
}
|
|
145
|
+
interface ImagesListResponse {
|
|
146
|
+
images: Image[];
|
|
147
|
+
}
|
|
148
|
+
interface ImageUploadResponse {
|
|
149
|
+
image: Image;
|
|
150
|
+
}
|
|
151
|
+
interface ImagesDeleteAllResponse {
|
|
152
|
+
deleted: Image[];
|
|
153
|
+
}
|
|
154
|
+
interface CountryAvailability {
|
|
155
|
+
countryTargeting: {
|
|
156
|
+
countries: string[];
|
|
157
|
+
includeRestOfWorld: boolean;
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
interface ReviewsListResponse {
|
|
161
|
+
reviews: Review[];
|
|
162
|
+
tokenPagination?: TokenPagination;
|
|
163
|
+
}
|
|
164
|
+
interface TokenPagination {
|
|
165
|
+
nextPageToken?: string;
|
|
166
|
+
previousPageToken?: string;
|
|
167
|
+
}
|
|
168
|
+
interface ReviewReplyRequest {
|
|
169
|
+
replyText: string;
|
|
170
|
+
}
|
|
171
|
+
interface ReviewReplyResponse {
|
|
172
|
+
result: {
|
|
173
|
+
replyText: string;
|
|
174
|
+
lastEdited: {
|
|
175
|
+
seconds: string;
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
interface ReviewsListOptions {
|
|
180
|
+
token?: string;
|
|
181
|
+
maxResults?: number;
|
|
182
|
+
translationLanguage?: string;
|
|
183
|
+
}
|
|
184
|
+
type VitalsMetricSet = "vitals.crashrate" | "vitals.anrrate" | "vitals.excessivewakeuprate" | "vitals.stuckbackgroundwakelockrate" | "vitals.slowstartrate" | "vitals.slowrenderingrate" | "vitals.errors.counts";
|
|
185
|
+
type ReportingDimension = "apiLevel" | "versionCode" | "deviceModel" | "deviceType" | "countryCode" | "deviceRamBucket" | "deviceSocName" | "deviceCpuMakeModel" | "deviceGlEsVersion" | "deviceVulkanVersion" | "deviceOpenGlVersion" | "deviceBrand";
|
|
186
|
+
type ReportingAggregation = "DAILY" | "HOURLY";
|
|
187
|
+
interface MetricSetQuery {
|
|
188
|
+
metrics: string[];
|
|
189
|
+
dimensions?: ReportingDimension[];
|
|
190
|
+
timelineSpec?: {
|
|
191
|
+
aggregationPeriod: ReportingAggregation;
|
|
192
|
+
startTime?: {
|
|
193
|
+
year: number;
|
|
194
|
+
month: number;
|
|
195
|
+
day: number;
|
|
196
|
+
};
|
|
197
|
+
endTime?: {
|
|
198
|
+
year: number;
|
|
199
|
+
month: number;
|
|
200
|
+
day: number;
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
filter?: string;
|
|
204
|
+
pageSize?: number;
|
|
205
|
+
pageToken?: string;
|
|
206
|
+
}
|
|
207
|
+
interface MetricSetResponse {
|
|
208
|
+
rows: MetricRow[];
|
|
209
|
+
nextPageToken?: string;
|
|
210
|
+
}
|
|
211
|
+
interface MetricRow {
|
|
212
|
+
dimensions?: Record<string, {
|
|
213
|
+
stringValue?: string;
|
|
214
|
+
int64Value?: string;
|
|
215
|
+
}>;
|
|
216
|
+
metrics: Record<string, {
|
|
217
|
+
decimalValue?: {
|
|
218
|
+
value: string;
|
|
219
|
+
};
|
|
220
|
+
decimalValueConfidenceInterval?: {
|
|
221
|
+
lowerBound?: {
|
|
222
|
+
value: string;
|
|
223
|
+
};
|
|
224
|
+
upperBound?: {
|
|
225
|
+
value: string;
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
}>;
|
|
229
|
+
startTime?: {
|
|
230
|
+
year: number;
|
|
231
|
+
month: number;
|
|
232
|
+
day: number;
|
|
233
|
+
};
|
|
234
|
+
endTime?: {
|
|
235
|
+
year: number;
|
|
236
|
+
month: number;
|
|
237
|
+
day: number;
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
interface Anomaly {
|
|
241
|
+
name: string;
|
|
242
|
+
metricSet: string;
|
|
243
|
+
timelineSpec: {
|
|
244
|
+
aggregationPeriod: string;
|
|
245
|
+
};
|
|
246
|
+
dimensions: Record<string, {
|
|
247
|
+
stringValue?: string;
|
|
248
|
+
int64Value?: string;
|
|
249
|
+
}>[];
|
|
250
|
+
metric: Record<string, {
|
|
251
|
+
decimalValue?: {
|
|
252
|
+
value: string;
|
|
253
|
+
};
|
|
254
|
+
}>;
|
|
255
|
+
}
|
|
256
|
+
interface AnomalyDetectionResponse {
|
|
257
|
+
anomalies: Anomaly[];
|
|
258
|
+
}
|
|
259
|
+
interface ErrorIssue {
|
|
260
|
+
name: string;
|
|
261
|
+
type: string;
|
|
262
|
+
errorReportCount: string;
|
|
263
|
+
distinctUsers: string;
|
|
264
|
+
cause: string;
|
|
265
|
+
location: string;
|
|
266
|
+
firstAppVersion?: {
|
|
267
|
+
versionCode: string;
|
|
268
|
+
};
|
|
269
|
+
lastAppVersion?: {
|
|
270
|
+
versionCode: string;
|
|
271
|
+
};
|
|
272
|
+
firstOsVersion?: {
|
|
273
|
+
apiLevel: string;
|
|
274
|
+
};
|
|
275
|
+
lastOsVersion?: {
|
|
276
|
+
apiLevel: string;
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
interface ErrorIssuesResponse {
|
|
280
|
+
errorIssues: ErrorIssue[];
|
|
281
|
+
nextPageToken?: string;
|
|
282
|
+
}
|
|
283
|
+
interface ErrorReport {
|
|
284
|
+
name: string;
|
|
285
|
+
type: string;
|
|
286
|
+
reportText: string;
|
|
287
|
+
issue: string;
|
|
288
|
+
deviceModel?: {
|
|
289
|
+
deviceId: string;
|
|
290
|
+
marketName: string;
|
|
291
|
+
deviceMarketingName: string;
|
|
292
|
+
};
|
|
293
|
+
osVersion?: {
|
|
294
|
+
apiLevel: string;
|
|
295
|
+
};
|
|
296
|
+
appVersion?: {
|
|
297
|
+
versionCode: string;
|
|
298
|
+
};
|
|
299
|
+
}
|
|
300
|
+
interface ErrorReportsResponse {
|
|
301
|
+
errorReports: ErrorReport[];
|
|
302
|
+
nextPageToken?: string;
|
|
303
|
+
}
|
|
304
|
+
interface Money {
|
|
305
|
+
currencyCode: string;
|
|
306
|
+
units?: string;
|
|
307
|
+
nanos?: number;
|
|
308
|
+
}
|
|
309
|
+
interface RegionalBasePlanConfig {
|
|
310
|
+
regionCode: string;
|
|
311
|
+
price: Money;
|
|
312
|
+
}
|
|
313
|
+
interface BasePlan {
|
|
314
|
+
basePlanId: string;
|
|
315
|
+
state: "ACTIVE" | "INACTIVE" | "DRAFT";
|
|
316
|
+
autoRenewingBasePlanType?: {
|
|
317
|
+
billingPeriodDuration?: string;
|
|
318
|
+
gracePeriodDuration?: string;
|
|
319
|
+
};
|
|
320
|
+
prepaidBasePlanType?: {
|
|
321
|
+
billingPeriodDuration?: string;
|
|
322
|
+
};
|
|
323
|
+
regionalConfigs: RegionalBasePlanConfig[];
|
|
324
|
+
offerTags?: {
|
|
325
|
+
tag: string;
|
|
326
|
+
}[];
|
|
327
|
+
}
|
|
328
|
+
interface SubscriptionListing {
|
|
329
|
+
title: string;
|
|
330
|
+
description?: string;
|
|
331
|
+
benefits?: string[];
|
|
332
|
+
languageCode?: string;
|
|
333
|
+
}
|
|
334
|
+
interface Subscription {
|
|
335
|
+
productId: string;
|
|
336
|
+
packageName?: string;
|
|
337
|
+
listings?: Record<string, SubscriptionListing>;
|
|
338
|
+
basePlans?: BasePlan[];
|
|
339
|
+
taxAndComplianceSettings?: Record<string, unknown>;
|
|
340
|
+
}
|
|
341
|
+
interface SubscriptionsListResponse {
|
|
342
|
+
subscriptions: Subscription[];
|
|
343
|
+
nextPageToken?: string;
|
|
344
|
+
}
|
|
345
|
+
interface BasePlanMigratePricesRequest {
|
|
346
|
+
regionalPriceMigrations: {
|
|
347
|
+
regionCode: string;
|
|
348
|
+
oldestAllowedPriceVersionTime?: string;
|
|
349
|
+
priceIncreaseType?: string;
|
|
350
|
+
}[];
|
|
351
|
+
}
|
|
352
|
+
interface SubscriptionOfferPhase {
|
|
353
|
+
recurrenceCount: number;
|
|
354
|
+
duration: string;
|
|
355
|
+
regionalConfigs: {
|
|
356
|
+
regionCode: string;
|
|
357
|
+
price?: Money;
|
|
358
|
+
absoluteDiscount?: Money;
|
|
359
|
+
relativeDiscount?: number;
|
|
360
|
+
}[];
|
|
361
|
+
}
|
|
362
|
+
interface SubscriptionOffer {
|
|
363
|
+
productId: string;
|
|
364
|
+
basePlanId: string;
|
|
365
|
+
offerId: string;
|
|
366
|
+
state: "ACTIVE" | "INACTIVE" | "DRAFT";
|
|
367
|
+
offerTags?: {
|
|
368
|
+
tag: string;
|
|
369
|
+
}[];
|
|
370
|
+
phases: SubscriptionOfferPhase[];
|
|
371
|
+
targeting?: Record<string, unknown>;
|
|
372
|
+
regionalConfigs?: {
|
|
373
|
+
regionCode: string;
|
|
374
|
+
newSubscriberAvailability?: boolean;
|
|
375
|
+
}[];
|
|
376
|
+
}
|
|
377
|
+
interface OffersListResponse {
|
|
378
|
+
subscriptionOffers: SubscriptionOffer[];
|
|
379
|
+
nextPageToken?: string;
|
|
380
|
+
}
|
|
381
|
+
interface InAppProductListing {
|
|
382
|
+
title: string;
|
|
383
|
+
description: string;
|
|
384
|
+
benefits?: string[];
|
|
385
|
+
}
|
|
386
|
+
interface InAppProduct {
|
|
387
|
+
sku: string;
|
|
388
|
+
status: string;
|
|
389
|
+
purchaseType: string;
|
|
390
|
+
defaultPrice: Money;
|
|
391
|
+
listings?: Record<string, InAppProductListing>;
|
|
392
|
+
defaultLanguage?: string;
|
|
393
|
+
packageName?: string;
|
|
394
|
+
}
|
|
395
|
+
interface InAppProductsListResponse {
|
|
396
|
+
inappproduct: InAppProduct[];
|
|
397
|
+
tokenPagination?: TokenPagination;
|
|
398
|
+
}
|
|
399
|
+
interface ProductPurchase {
|
|
400
|
+
purchaseState: number;
|
|
401
|
+
consumptionState: number;
|
|
402
|
+
purchaseTimeMillis: string;
|
|
403
|
+
orderId: string;
|
|
404
|
+
acknowledgementState: number;
|
|
405
|
+
regionCode?: string;
|
|
406
|
+
}
|
|
407
|
+
interface SubscriptionPurchaseV2 {
|
|
408
|
+
kind: string;
|
|
409
|
+
regionCode?: string;
|
|
410
|
+
lineItems: SubscriptionPurchaseLineItem[];
|
|
411
|
+
startTime?: string;
|
|
412
|
+
subscriptionState: string;
|
|
413
|
+
acknowledgementState?: string;
|
|
414
|
+
}
|
|
415
|
+
interface SubscriptionPurchaseLineItem {
|
|
416
|
+
productId: string;
|
|
417
|
+
expiryTime?: string;
|
|
418
|
+
autoRenewingPlan?: {
|
|
419
|
+
autoRenewEnabled?: boolean;
|
|
420
|
+
};
|
|
421
|
+
offerDetails?: {
|
|
422
|
+
basePlanId?: string;
|
|
423
|
+
offerId?: string;
|
|
424
|
+
offerTags?: string[];
|
|
425
|
+
};
|
|
426
|
+
}
|
|
427
|
+
interface SubscriptionPurchase {
|
|
428
|
+
startTimeMillis: string;
|
|
429
|
+
expiryTimeMillis: string;
|
|
430
|
+
autoRenewing: boolean;
|
|
431
|
+
orderId: string;
|
|
432
|
+
paymentState?: number;
|
|
433
|
+
cancelReason?: number;
|
|
434
|
+
}
|
|
435
|
+
interface SubscriptionDeferRequest {
|
|
436
|
+
deferralInfo: {
|
|
437
|
+
expectedExpiryTimeMillis: string;
|
|
438
|
+
desiredExpiryTimeMillis: string;
|
|
439
|
+
};
|
|
440
|
+
}
|
|
441
|
+
interface SubscriptionDeferResponse {
|
|
442
|
+
newExpiryTimeMillis: string;
|
|
443
|
+
}
|
|
444
|
+
interface VoidedPurchase {
|
|
445
|
+
purchaseToken: string;
|
|
446
|
+
purchaseTimeMillis: string;
|
|
447
|
+
voidedTimeMillis: string;
|
|
448
|
+
orderId: string;
|
|
449
|
+
voidedSource: number;
|
|
450
|
+
voidedReason: number;
|
|
451
|
+
}
|
|
452
|
+
interface VoidedPurchasesListResponse {
|
|
453
|
+
voidedPurchases: VoidedPurchase[];
|
|
454
|
+
tokenPagination?: TokenPagination;
|
|
455
|
+
}
|
|
456
|
+
interface ConvertRegionPricesRequest {
|
|
457
|
+
price: Money;
|
|
458
|
+
}
|
|
459
|
+
interface ConvertedRegionPrice {
|
|
460
|
+
regionCode: string;
|
|
461
|
+
price: Money;
|
|
462
|
+
taxAmount: Money;
|
|
463
|
+
}
|
|
464
|
+
interface ConvertRegionPricesResponse {
|
|
465
|
+
convertedRegionPrices: Record<string, ConvertedRegionPrice>;
|
|
466
|
+
}
|
|
467
|
+
type ReportType = "earnings" | "sales" | "estimated_sales" | "installs" | "crashes" | "ratings" | "reviews" | "store_performance" | "subscriptions" | "play_balance";
|
|
468
|
+
type StatsDimension = "country" | "language" | "os_version" | "device" | "app_version" | "carrier" | "overview";
|
|
469
|
+
interface ReportBucket {
|
|
470
|
+
bucketId: string;
|
|
471
|
+
uri: string;
|
|
472
|
+
}
|
|
473
|
+
interface ReportsListResponse {
|
|
474
|
+
reports: ReportBucket[];
|
|
475
|
+
}
|
|
476
|
+
type DeveloperPermission = "ADMIN" | "CAN_MANAGE_PERMISSIONS" | "CAN_MANAGE_PUBLIC_APKS" | "CAN_MANAGE_TRACK_USERS" | "CAN_MANAGE_TRACK_CONFIGURATION" | "CAN_VIEW_FINANCIAL_DATA" | "CAN_REPLY_TO_REVIEWS" | "CAN_MANAGE_PUBLIC_LISTING" | "CAN_MANAGE_DRAFT_APPS" | "CAN_MANAGE_ORDERS";
|
|
477
|
+
interface Grant {
|
|
478
|
+
packageName: string;
|
|
479
|
+
appLevelPermissions: DeveloperPermission[];
|
|
480
|
+
}
|
|
481
|
+
interface User {
|
|
482
|
+
email: string;
|
|
483
|
+
name?: string;
|
|
484
|
+
developerAccountPermission?: DeveloperPermission[];
|
|
485
|
+
grants?: Grant[];
|
|
486
|
+
expirationTime?: string;
|
|
487
|
+
}
|
|
488
|
+
interface UsersListResponse {
|
|
489
|
+
users: User[];
|
|
490
|
+
nextPageToken?: string;
|
|
491
|
+
}
|
|
492
|
+
interface Testers {
|
|
493
|
+
googleGroups?: string[];
|
|
494
|
+
googleGroupsCount?: number;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
interface PlayApiClient {
|
|
498
|
+
edits: {
|
|
499
|
+
insert(packageName: string): Promise<AppEdit>;
|
|
500
|
+
get(packageName: string, editId: string): Promise<AppEdit>;
|
|
501
|
+
validate(packageName: string, editId: string): Promise<AppEdit>;
|
|
502
|
+
commit(packageName: string, editId: string): Promise<AppEdit>;
|
|
503
|
+
delete(packageName: string, editId: string): Promise<void>;
|
|
504
|
+
};
|
|
505
|
+
details: {
|
|
506
|
+
get(packageName: string, editId: string): Promise<AppDetails>;
|
|
507
|
+
update(packageName: string, editId: string, details: Partial<AppDetails>): Promise<AppDetails>;
|
|
508
|
+
patch(packageName: string, editId: string, partial: Partial<AppDetails>): Promise<AppDetails>;
|
|
509
|
+
};
|
|
510
|
+
bundles: {
|
|
511
|
+
list(packageName: string, editId: string): Promise<Bundle[]>;
|
|
512
|
+
upload(packageName: string, editId: string, filePath: string): Promise<Bundle>;
|
|
513
|
+
};
|
|
514
|
+
tracks: {
|
|
515
|
+
list(packageName: string, editId: string): Promise<Track[]>;
|
|
516
|
+
get(packageName: string, editId: string, track: string): Promise<Track>;
|
|
517
|
+
update(packageName: string, editId: string, track: string, release: Release): Promise<Track>;
|
|
518
|
+
};
|
|
519
|
+
listings: {
|
|
520
|
+
list(packageName: string, editId: string): Promise<Listing[]>;
|
|
521
|
+
get(packageName: string, editId: string, language: string): Promise<Listing>;
|
|
522
|
+
update(packageName: string, editId: string, language: string, listing: Omit<Listing, "language">): Promise<Listing>;
|
|
523
|
+
patch(packageName: string, editId: string, language: string, partial: Partial<Omit<Listing, "language">>): Promise<Listing>;
|
|
524
|
+
delete(packageName: string, editId: string, language: string): Promise<void>;
|
|
525
|
+
deleteAll(packageName: string, editId: string): Promise<void>;
|
|
526
|
+
};
|
|
527
|
+
images: {
|
|
528
|
+
list(packageName: string, editId: string, language: string, imageType: ImageType): Promise<Image[]>;
|
|
529
|
+
upload(packageName: string, editId: string, language: string, imageType: ImageType, filePath: string): Promise<Image>;
|
|
530
|
+
delete(packageName: string, editId: string, language: string, imageType: ImageType, imageId: string): Promise<void>;
|
|
531
|
+
deleteAll(packageName: string, editId: string, language: string, imageType: ImageType): Promise<Image[]>;
|
|
532
|
+
};
|
|
533
|
+
countryAvailability: {
|
|
534
|
+
get(packageName: string, editId: string, track: string): Promise<CountryAvailability>;
|
|
535
|
+
};
|
|
536
|
+
reviews: {
|
|
537
|
+
list(packageName: string, options?: ReviewsListOptions): Promise<ReviewsListResponse>;
|
|
538
|
+
get(packageName: string, reviewId: string, translationLanguage?: string): Promise<Review>;
|
|
539
|
+
reply(packageName: string, reviewId: string, replyText: string): Promise<ReviewReplyResponse>;
|
|
540
|
+
};
|
|
541
|
+
subscriptions: {
|
|
542
|
+
list(packageName: string, options?: {
|
|
543
|
+
pageToken?: string;
|
|
544
|
+
pageSize?: number;
|
|
545
|
+
}): Promise<SubscriptionsListResponse>;
|
|
546
|
+
get(packageName: string, productId: string): Promise<Subscription>;
|
|
547
|
+
create(packageName: string, data: Subscription): Promise<Subscription>;
|
|
548
|
+
update(packageName: string, productId: string, data: Subscription, updateMask?: string): Promise<Subscription>;
|
|
549
|
+
delete(packageName: string, productId: string): Promise<void>;
|
|
550
|
+
activateBasePlan(packageName: string, productId: string, basePlanId: string): Promise<Subscription>;
|
|
551
|
+
deactivateBasePlan(packageName: string, productId: string, basePlanId: string): Promise<Subscription>;
|
|
552
|
+
deleteBasePlan(packageName: string, productId: string, basePlanId: string): Promise<void>;
|
|
553
|
+
migratePrices(packageName: string, productId: string, basePlanId: string, body: BasePlanMigratePricesRequest): Promise<Subscription>;
|
|
554
|
+
listOffers(packageName: string, productId: string, basePlanId: string): Promise<OffersListResponse>;
|
|
555
|
+
getOffer(packageName: string, productId: string, basePlanId: string, offerId: string): Promise<SubscriptionOffer>;
|
|
556
|
+
createOffer(packageName: string, productId: string, basePlanId: string, data: SubscriptionOffer): Promise<SubscriptionOffer>;
|
|
557
|
+
updateOffer(packageName: string, productId: string, basePlanId: string, offerId: string, data: SubscriptionOffer, updateMask?: string): Promise<SubscriptionOffer>;
|
|
558
|
+
deleteOffer(packageName: string, productId: string, basePlanId: string, offerId: string): Promise<void>;
|
|
559
|
+
activateOffer(packageName: string, productId: string, basePlanId: string, offerId: string): Promise<SubscriptionOffer>;
|
|
560
|
+
deactivateOffer(packageName: string, productId: string, basePlanId: string, offerId: string): Promise<SubscriptionOffer>;
|
|
561
|
+
};
|
|
562
|
+
inappproducts: {
|
|
563
|
+
list(packageName: string, options?: {
|
|
564
|
+
token?: string;
|
|
565
|
+
maxResults?: number;
|
|
566
|
+
}): Promise<InAppProductsListResponse>;
|
|
567
|
+
get(packageName: string, sku: string): Promise<InAppProduct>;
|
|
568
|
+
create(packageName: string, data: InAppProduct): Promise<InAppProduct>;
|
|
569
|
+
update(packageName: string, sku: string, data: InAppProduct): Promise<InAppProduct>;
|
|
570
|
+
delete(packageName: string, sku: string): Promise<void>;
|
|
571
|
+
};
|
|
572
|
+
purchases: {
|
|
573
|
+
getProduct(packageName: string, productId: string, token: string): Promise<ProductPurchase>;
|
|
574
|
+
acknowledgeProduct(packageName: string, productId: string, token: string, body?: {
|
|
575
|
+
developerPayload?: string;
|
|
576
|
+
}): Promise<void>;
|
|
577
|
+
consumeProduct(packageName: string, productId: string, token: string): Promise<void>;
|
|
578
|
+
getSubscriptionV2(packageName: string, token: string): Promise<SubscriptionPurchaseV2>;
|
|
579
|
+
getSubscriptionV1(packageName: string, subscriptionId: string, token: string): Promise<SubscriptionPurchase>;
|
|
580
|
+
cancelSubscription(packageName: string, subscriptionId: string, token: string): Promise<void>;
|
|
581
|
+
deferSubscription(packageName: string, subscriptionId: string, token: string, body: SubscriptionDeferRequest): Promise<SubscriptionDeferResponse>;
|
|
582
|
+
revokeSubscriptionV2(packageName: string, token: string): Promise<void>;
|
|
583
|
+
listVoided(packageName: string, options?: {
|
|
584
|
+
startTime?: string;
|
|
585
|
+
endTime?: string;
|
|
586
|
+
maxResults?: number;
|
|
587
|
+
token?: string;
|
|
588
|
+
}): Promise<VoidedPurchasesListResponse>;
|
|
589
|
+
};
|
|
590
|
+
orders: {
|
|
591
|
+
refund(packageName: string, orderId: string, body?: {
|
|
592
|
+
fullRefund?: boolean;
|
|
593
|
+
proratedRefund?: boolean;
|
|
594
|
+
}): Promise<void>;
|
|
595
|
+
};
|
|
596
|
+
monetization: {
|
|
597
|
+
convertRegionPrices(packageName: string, price: ConvertRegionPricesRequest): Promise<ConvertRegionPricesResponse>;
|
|
598
|
+
};
|
|
599
|
+
reports: {
|
|
600
|
+
list(packageName: string, reportType: ReportType, year: number, month: number): Promise<ReportsListResponse>;
|
|
601
|
+
};
|
|
602
|
+
testers: {
|
|
603
|
+
get(packageName: string, editId: string, track: string): Promise<Testers>;
|
|
604
|
+
update(packageName: string, editId: string, track: string, testers: Testers): Promise<Testers>;
|
|
605
|
+
};
|
|
606
|
+
deobfuscation: {
|
|
607
|
+
upload(packageName: string, editId: string, versionCode: number, filePath: string): Promise<DeobfuscationFile>;
|
|
608
|
+
};
|
|
609
|
+
}
|
|
610
|
+
declare function createApiClient(options: ApiClientOptions): PlayApiClient;
|
|
611
|
+
|
|
612
|
+
interface ReportingApiClient {
|
|
613
|
+
queryMetricSet(packageName: string, metricSet: VitalsMetricSet, query: MetricSetQuery): Promise<MetricSetResponse>;
|
|
614
|
+
getAnomalies(packageName: string): Promise<AnomalyDetectionResponse>;
|
|
615
|
+
searchErrorIssues(packageName: string, filter?: string, pageSize?: number, pageToken?: string): Promise<ErrorIssuesResponse>;
|
|
616
|
+
searchErrorReports(packageName: string, issueName: string, pageSize?: number, pageToken?: string): Promise<ErrorReportsResponse>;
|
|
617
|
+
}
|
|
618
|
+
declare function createReportingClient(options: ApiClientOptions): ReportingApiClient;
|
|
619
|
+
|
|
620
|
+
interface UsersApiClient {
|
|
621
|
+
list(developerId: string, options?: {
|
|
622
|
+
pageToken?: string;
|
|
623
|
+
pageSize?: number;
|
|
624
|
+
}): Promise<UsersListResponse>;
|
|
625
|
+
get(developerId: string, userId: string): Promise<User>;
|
|
626
|
+
create(developerId: string, user: Partial<User>): Promise<User>;
|
|
627
|
+
update(developerId: string, userId: string, user: Partial<User>, updateMask?: string): Promise<User>;
|
|
628
|
+
delete(developerId: string, userId: string): Promise<void>;
|
|
629
|
+
}
|
|
630
|
+
declare function createUsersClient(options: ApiClientOptions): UsersApiClient;
|
|
631
|
+
|
|
632
|
+
interface HttpClient {
|
|
633
|
+
get<T>(path: string, params?: Record<string, string>): Promise<ApiResponse<T>>;
|
|
634
|
+
post<T>(path: string, body?: unknown): Promise<ApiResponse<T>>;
|
|
635
|
+
put<T>(path: string, body?: unknown): Promise<ApiResponse<T>>;
|
|
636
|
+
patch<T>(path: string, body?: unknown): Promise<ApiResponse<T>>;
|
|
637
|
+
delete<T>(path: string): Promise<ApiResponse<T>>;
|
|
638
|
+
upload<T>(path: string, filePath: string, contentType: string): Promise<ApiResponse<T>>;
|
|
639
|
+
}
|
|
640
|
+
declare function createHttpClient(options: ApiClientOptions): HttpClient;
|
|
641
|
+
|
|
642
|
+
interface PaginateOptions {
|
|
643
|
+
limit?: number;
|
|
644
|
+
startPageToken?: string;
|
|
645
|
+
}
|
|
646
|
+
declare function paginate<TItem>(fetchPage: (pageToken?: string) => Promise<{
|
|
647
|
+
items: TItem[];
|
|
648
|
+
nextPageToken?: string;
|
|
649
|
+
}>, options?: PaginateOptions): AsyncGenerator<TItem[], void, unknown>;
|
|
650
|
+
declare function paginateAll<TItem>(fetchPage: (pageToken?: string) => Promise<{
|
|
651
|
+
items: TItem[];
|
|
652
|
+
nextPageToken?: string;
|
|
653
|
+
}>, options?: PaginateOptions): Promise<{
|
|
654
|
+
items: TItem[];
|
|
655
|
+
nextPageToken?: string;
|
|
656
|
+
}>;
|
|
657
|
+
|
|
658
|
+
declare class ApiError extends Error {
|
|
659
|
+
readonly code: string;
|
|
660
|
+
readonly statusCode?: number | undefined;
|
|
661
|
+
readonly suggestion?: string | undefined;
|
|
662
|
+
readonly exitCode = 4;
|
|
663
|
+
constructor(message: string, code: string, statusCode?: number | undefined, suggestion?: string | undefined);
|
|
664
|
+
toJSON(): {
|
|
665
|
+
success: boolean;
|
|
666
|
+
error: {
|
|
667
|
+
code: string;
|
|
668
|
+
message: string;
|
|
669
|
+
suggestion: string | undefined;
|
|
670
|
+
};
|
|
671
|
+
};
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
export { type Anomaly, type AnomalyDetectionResponse, type ApiClientOptions, ApiError, type ApiResponse, type ApkInfo, type AppDetails, type AppEdit, type BasePlan, type BasePlanMigratePricesRequest, type Bundle, type BundleListResponse, type ConvertRegionPricesRequest, type ConvertRegionPricesResponse, type ConvertedRegionPrice, type CountryAvailability, type DeobfuscationFile, type DeobfuscationUploadResponse, type DeveloperComment, type DeveloperPermission, type ErrorIssue, type ErrorIssuesResponse, type ErrorReport, type ErrorReportsResponse, type Grant, type HttpClient, type Image, type ImageType, type ImageUploadResponse, type ImagesDeleteAllResponse, type ImagesListResponse, type InAppProduct, type InAppProductListing, type InAppProductsListResponse, type Listing, type ListingsListResponse, type MetricRow, type MetricSetQuery, type MetricSetResponse, type Money, type OffersListResponse, type PagedResponse, type PaginateOptions, type PlayApiClient, type ProductPurchase, RATE_LIMIT_BUCKETS, type RateLimitBucket, type RateLimiter, type RegionalBasePlanConfig, type Release, type ReleaseNote, type ReleaseStatus, type ReportBucket, type ReportType, type ReportingAggregation, type ReportingApiClient, type ReportingDimension, type ReportsListResponse, type RetryLogEntry, type Review, type ReviewComment, type ReviewReplyRequest, type ReviewReplyResponse, type ReviewsListOptions, type ReviewsListResponse, type StatsDimension, type Subscription, type SubscriptionDeferRequest, type SubscriptionDeferResponse, type SubscriptionListing, type SubscriptionOffer, type SubscriptionOfferPhase, type SubscriptionPurchase, type SubscriptionPurchaseLineItem, type SubscriptionPurchaseV2, type SubscriptionsListResponse, type Testers, type TokenPagination, type Track, type TrackListResponse, type UploadResponse, type User, type UserComment, type UsersApiClient, type UsersListResponse, type VitalsMetricSet, type VoidedPurchase, type VoidedPurchasesListResponse, createApiClient, createHttpClient, createRateLimiter, createReportingClient, createUsersClient, paginate, paginateAll };
|