@gpc-cli/api 1.0.5 → 1.0.7

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/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # @gpc-cli/api
2
2
 
3
- Typed client for Google Play Developer API v3. Covers 162 endpoints with built-in rate limiting, retry logic, and pagination.
3
+ Typed Google Play Developer API v3 client for TypeScript.
4
+
5
+ Covers edits, releases, tracks, listings, images, subscriptions, in-app products, purchases, reviews, vitals, reports, users, and testers -- with built-in rate limiting, retry logic, and pagination.
4
6
 
5
7
  ## Install
6
8
 
@@ -8,66 +10,357 @@ Typed client for Google Play Developer API v3. Covers 162 endpoints with built-i
8
10
  npm install @gpc-cli/api @gpc-cli/auth
9
11
  ```
10
12
 
11
- ## Usage
13
+ ## Quick Start
12
14
 
13
15
  ```typescript
14
- import { createApiClient, createReportingClient } from "@gpc-cli/api";
16
+ import { createApiClient } from "@gpc-cli/api";
15
17
  import { resolveAuth } from "@gpc-cli/auth";
16
18
 
17
19
  const auth = await resolveAuth({
18
- serviceAccount: "./service-account.json",
20
+ serviceAccountPath: "./service-account.json",
19
21
  });
20
22
 
21
23
  const client = createApiClient({ auth });
22
24
 
23
- // List apps
24
- const apps = await client.apps.list();
25
+ // List all tracks
26
+ const edit = await client.edits.insert("com.example.app");
27
+ const tracks = await client.tracks.list("com.example.app", edit.id);
28
+ console.log(tracks);
29
+
30
+ await client.edits.delete("com.example.app", edit.id);
31
+ ```
32
+
33
+ ## Client Factories
34
+
35
+ | Factory | Purpose |
36
+ | --- | --- |
37
+ | `createApiClient(options)` | Core Play API -- apps, releases, listings, monetization, purchases |
38
+ | `createReportingClient(options)` | Vitals, crash rates, ANR, error reporting |
39
+ | `createUsersClient(options)` | Developer account users and permission grants |
40
+ | `createHttpClient(options)` | Low-level HTTP with auth, retry, and rate limiting |
41
+
42
+ All factories accept `ApiClientOptions`:
43
+
44
+ ```typescript
45
+ import type { ApiClientOptions } from "@gpc-cli/api";
46
+
47
+ const options: ApiClientOptions = {
48
+ auth, // Required: { getAccessToken(): Promise<string> }
49
+ maxRetries: 3, // Default retry count
50
+ timeout: 30_000, // Request timeout in ms
51
+ rateLimiter: undefined, // Optional custom rate limiter
52
+ onRetry: (entry) => console.warn(`Retry #${entry.attempt}: ${entry.error}`),
53
+ };
54
+ ```
55
+
56
+ ## API Modules
57
+
58
+ ### Edits
59
+
60
+ Every modification to app metadata, tracks, or listings requires an edit session.
61
+
62
+ ```typescript
63
+ const edit = await client.edits.insert("com.example.app");
64
+
65
+ // ... make changes within the edit ...
66
+
67
+ await client.edits.validate("com.example.app", edit.id);
68
+ await client.edits.commit("com.example.app", edit.id);
69
+ ```
70
+
71
+ ### Bundles
72
+
73
+ ```typescript
74
+ const edit = await client.edits.insert("com.example.app");
75
+ const bundle = await client.bundles.upload("com.example.app", edit.id, "./app.aab");
76
+ const bundles = await client.bundles.list("com.example.app", edit.id);
77
+ await client.edits.commit("com.example.app", edit.id);
78
+ ```
79
+
80
+ ### Tracks & Releases
81
+
82
+ ```typescript
83
+ const edit = await client.edits.insert("com.example.app");
84
+
85
+ const tracks = await client.tracks.list("com.example.app", edit.id);
86
+ const production = await client.tracks.get("com.example.app", edit.id, "production");
87
+
88
+ await client.tracks.update("com.example.app", edit.id, "production", {
89
+ versionCodes: ["42"],
90
+ status: "inProgress",
91
+ userFraction: 0.1,
92
+ releaseNotes: [{ language: "en-US", text: "Bug fixes" }],
93
+ });
94
+
95
+ await client.edits.commit("com.example.app", edit.id);
96
+ ```
25
97
 
26
- // Get tracks
27
- const tracks = await client.tracks.list("com.example.app");
98
+ ### Listings
28
99
 
29
- // Upload a bundle
100
+ ```typescript
30
101
  const edit = await client.edits.insert("com.example.app");
31
- const upload = await client.edits.bundles.upload("com.example.app", edit.id, buffer);
102
+
103
+ const listings = await client.listings.list("com.example.app", edit.id);
104
+ const en = await client.listings.get("com.example.app", edit.id, "en-US");
105
+
106
+ await client.listings.update("com.example.app", edit.id, "en-US", {
107
+ title: "My App",
108
+ shortDescription: "A great app",
109
+ fullDescription: "Full description here...",
110
+ });
111
+
112
+ await client.edits.commit("com.example.app", edit.id);
113
+ ```
114
+
115
+ ### Images
116
+
117
+ ```typescript
118
+ const edit = await client.edits.insert("com.example.app");
119
+
120
+ const screenshots = await client.images.list(
121
+ "com.example.app", edit.id, "en-US", "phoneScreenshots",
122
+ );
123
+
124
+ await client.images.upload(
125
+ "com.example.app", edit.id, "en-US", "featureGraphic", "./feature.png",
126
+ );
127
+
128
+ await client.images.deleteAll("com.example.app", edit.id, "en-US", "phoneScreenshots");
32
129
  await client.edits.commit("com.example.app", edit.id);
33
130
  ```
34
131
 
35
- ## Clients
132
+ Image types: `phoneScreenshots`, `sevenInchScreenshots`, `tenInchScreenshots`, `tvScreenshots`, `wearScreenshots`, `icon`, `featureGraphic`, `tvBanner`.
36
133
 
37
- | Factory | Base URL | Purpose |
38
- | ------------------------- | --------------------------------------- | ------------------------------------------------------ |
39
- | `createApiClient()` | `androidpublisher.googleapis.com` | Core Play API (apps, releases, listings, monetization) |
40
- | `createReportingClient()` | `playdeveloperreporting.googleapis.com` | Vitals, crashes, ANR, errors |
41
- | `createUsersClient()` | `androidpublisher.googleapis.com` | Developer account users and grants |
42
- | `createHttpClient()` | Custom | Low-level HTTP with auth, retry, rate limiting |
134
+ ### Subscriptions
43
135
 
44
- ## Features
136
+ ```typescript
137
+ const { subscriptions } = await client.subscriptions.list("com.example.app");
138
+ const sub = await client.subscriptions.get("com.example.app", "premium_monthly");
45
139
 
46
- - **Rate limiting** — per-bucket token bucket respecting Google's quota buckets
47
- - **Retry logic** — exponential backoff with jitter on 429/5xx
48
- - **Pagination** — `paginate()` and `paginateAll()` helpers for auto-following `nextPageToken`
49
- - **Edit lifecycle** — insert, modify, validate, commit/delete
50
- - **80+ TypeScript types** — fully typed requests and responses
140
+ await client.subscriptions.activateBasePlan("com.example.app", "premium_monthly", "p1m");
141
+ await client.subscriptions.deactivateBasePlan("com.example.app", "premium_monthly", "p1m");
142
+ ```
51
143
 
52
- ## Types
144
+ ### Subscription Offers
53
145
 
54
- All Google Play API types are exported:
146
+ ```typescript
147
+ const { subscriptionOffers } = await client.subscriptions.listOffers(
148
+ "com.example.app", "premium_monthly", "p1m",
149
+ );
150
+
151
+ const offer = await client.subscriptions.getOffer(
152
+ "com.example.app", "premium_monthly", "p1m", "intro_offer",
153
+ );
154
+
155
+ await client.subscriptions.activateOffer(
156
+ "com.example.app", "premium_monthly", "p1m", "intro_offer",
157
+ );
158
+ ```
159
+
160
+ ### In-App Products
161
+
162
+ ```typescript
163
+ const { inappproduct } = await client.inappproducts.list("com.example.app");
164
+ const product = await client.inappproducts.get("com.example.app", "coins_100");
165
+
166
+ await client.inappproducts.create("com.example.app", {
167
+ sku: "coins_500",
168
+ status: "active",
169
+ purchaseType: "managedUser",
170
+ defaultPrice: { currencyCode: "USD", units: "4", nanos: 990_000_000 },
171
+ });
172
+ ```
173
+
174
+ ### Purchases
175
+
176
+ ```typescript
177
+ // Verify a product purchase
178
+ const purchase = await client.purchases.getProduct(
179
+ "com.example.app", "coins_100", purchaseToken,
180
+ );
181
+
182
+ // Acknowledge it
183
+ await client.purchases.acknowledgeProduct("com.example.app", "coins_100", purchaseToken);
184
+
185
+ // Verify a subscription (v2)
186
+ const sub = await client.purchases.getSubscriptionV2("com.example.app", purchaseToken);
187
+
188
+ // List voided purchases
189
+ const { voidedPurchases } = await client.purchases.listVoided("com.example.app", {
190
+ startTime: "1700000000000",
191
+ maxResults: 100,
192
+ });
193
+ ```
194
+
195
+ ### Reviews
196
+
197
+ ```typescript
198
+ const { reviews } = await client.reviews.list("com.example.app", { maxResults: 50 });
199
+ const review = await client.reviews.get("com.example.app", reviewId);
200
+ await client.reviews.reply("com.example.app", reviewId, "Thanks for the feedback!");
201
+ ```
202
+
203
+ ### Vitals & Error Reporting
204
+
205
+ Uses a separate client that targets the Play Developer Reporting API.
206
+
207
+ ```typescript
208
+ import { createReportingClient } from "@gpc-cli/api";
209
+
210
+ const reporting = createReportingClient({ auth });
211
+
212
+ // Query crash rate
213
+ const crashes = await reporting.queryMetricSet("com.example.app", "vitals.crashrate", {
214
+ metrics: ["crashRate", "userPerceivedCrashRate"],
215
+ timelineSpec: {
216
+ aggregationPeriod: "DAILY",
217
+ startTime: { year: 2026, month: 1, day: 1 },
218
+ endTime: { year: 2026, month: 3, day: 1 },
219
+ },
220
+ });
221
+
222
+ // Detect anomalies
223
+ const { anomalies } = await reporting.getAnomalies("com.example.app");
224
+
225
+ // Search error issues
226
+ const { errorIssues } = await reporting.searchErrorIssues("com.example.app");
227
+ ```
228
+
229
+ Available metric sets: `vitals.crashrate`, `vitals.anrrate`, `vitals.excessivewakeuprate`, `vitals.stuckbackgroundwakelockrate`, `vitals.slowstartrate`, `vitals.slowrenderingrate`, `vitals.errors.counts`.
230
+
231
+ ### Reports
232
+
233
+ ```typescript
234
+ const { reports } = await client.reports.list("com.example.app", "earnings", 2026, 2);
235
+ ```
236
+
237
+ Report types: `earnings`, `sales`, `estimated_sales`, `installs`, `crashes`, `ratings`, `reviews`, `store_performance`, `subscriptions`, `play_balance`.
238
+
239
+ ### Users & Grants
240
+
241
+ Uses a separate client for developer account management.
242
+
243
+ ```typescript
244
+ import { createUsersClient } from "@gpc-cli/api";
245
+
246
+ const users = createUsersClient({ auth });
247
+
248
+ const { users: devUsers } = await users.list(developerId);
249
+ const user = await users.get(developerId, userId);
250
+
251
+ await users.create(developerId, {
252
+ email: "dev@example.com",
253
+ developerAccountPermission: ["CAN_MANAGE_PUBLIC_APKS", "CAN_REPLY_TO_REVIEWS"],
254
+ });
255
+ ```
256
+
257
+ ### Testers
258
+
259
+ ```typescript
260
+ const edit = await client.edits.insert("com.example.app");
261
+ const testers = await client.testers.get("com.example.app", edit.id, "internal");
262
+
263
+ await client.testers.update("com.example.app", edit.id, "internal", {
264
+ googleGroups: ["testers@example.com"],
265
+ });
266
+
267
+ await client.edits.commit("com.example.app", edit.id);
268
+ ```
269
+
270
+ ### Monetization
271
+
272
+ ```typescript
273
+ const { convertedRegionPrices } = await client.monetization.convertRegionPrices(
274
+ "com.example.app",
275
+ { price: { currencyCode: "USD", units: "9", nanos: 990_000_000 } },
276
+ );
277
+ ```
278
+
279
+ ### Deobfuscation
280
+
281
+ ```typescript
282
+ const edit = await client.edits.insert("com.example.app");
283
+ await client.deobfuscation.upload("com.example.app", edit.id, 42, "./mapping.txt");
284
+ await client.edits.commit("com.example.app", edit.id);
285
+ ```
286
+
287
+ ## Pagination
288
+
289
+ Built-in helpers for paginated endpoints:
290
+
291
+ ```typescript
292
+ import { paginateAll } from "@gpc-cli/api";
293
+
294
+ const allReviews = await paginateAll(async (pageToken) => {
295
+ const response = await client.reviews.list("com.example.app", {
296
+ token: pageToken,
297
+ maxResults: 100,
298
+ });
299
+ return {
300
+ items: response.reviews,
301
+ nextPageToken: response.tokenPagination?.nextPageToken,
302
+ };
303
+ });
304
+ ```
305
+
306
+ ## Type Exports
307
+
308
+ All Google Play API types are exported for use in your own code:
55
309
 
56
310
  ```typescript
57
311
  import type {
312
+ PlayApiClient,
313
+ ReportingApiClient,
314
+ UsersApiClient,
315
+ ApiClientOptions,
58
316
  Track,
59
317
  Release,
318
+ ReleaseStatus,
319
+ Bundle,
60
320
  Listing,
61
321
  Subscription,
322
+ BasePlan,
323
+ SubscriptionOffer,
62
324
  InAppProduct,
63
325
  Review,
64
- AppDetails,
326
+ ProductPurchase,
327
+ SubscriptionPurchaseV2,
328
+ VoidedPurchase,
329
+ MetricSetQuery,
330
+ MetricSetResponse,
331
+ ErrorIssue,
332
+ User,
333
+ Grant,
334
+ ImageType,
335
+ Money,
65
336
  } from "@gpc-cli/api";
66
337
  ```
67
338
 
68
- ## Part of the GPC Monorepo
339
+ ## Error Handling
340
+
341
+ API errors throw `ApiError` with a code, HTTP status, and actionable suggestion:
342
+
343
+ ```typescript
344
+ import { ApiError } from "@gpc-cli/api";
345
+
346
+ try {
347
+ await client.tracks.get("com.example.app", editId, "production");
348
+ } catch (error) {
349
+ if (error instanceof ApiError) {
350
+ console.error(error.code); // e.g. "API_NOT_FOUND"
351
+ console.error(error.statusCode); // e.g. 404
352
+ console.error(error.suggestion); // actionable fix
353
+ console.error(error.toJSON()); // structured error object
354
+ }
355
+ }
356
+ ```
357
+
358
+ Retries are automatic for 429 (rate limit) and 5xx errors with exponential backoff and jitter.
359
+
360
+ ## Documentation
69
361
 
70
- This is the API layer for [GPC](https://github.com/yasserstudio/gpc). Use it standalone in your own tools, or use the full CLI.
362
+ - [Full documentation](https://yasserstudio.github.io/gpc/)
363
+ - [SDK usage guide](https://yasserstudio.github.io/gpc/advanced/sdk-usage.html)
71
364
 
72
365
  ## License
73
366
 
package/dist/index.d.ts CHANGED
@@ -489,10 +489,212 @@ interface UsersListResponse {
489
489
  users: User[];
490
490
  nextPageToken?: string;
491
491
  }
492
+ interface AppRecoveryAction {
493
+ appRecoveryId?: string;
494
+ status?: string;
495
+ targeting?: {
496
+ versionList?: {
497
+ versionCodes?: string[];
498
+ };
499
+ regions?: {
500
+ regionCode?: string[];
501
+ };
502
+ };
503
+ remoteInAppUpdateData?: {
504
+ remoteInAppUpdateDataPerBundle?: unknown[];
505
+ };
506
+ createTime?: string;
507
+ deployTime?: string;
508
+ cancelTime?: string;
509
+ lastUpdateTime?: string;
510
+ }
511
+ interface AppRecoveriesListResponse {
512
+ recoveryActions: AppRecoveryAction[];
513
+ }
514
+ interface AppRecoveryTargeting {
515
+ allUsers?: {
516
+ inScopeVersionCodes?: string[];
517
+ };
518
+ androidSdks?: {
519
+ sdkLevels: string[];
520
+ };
521
+ regions?: {
522
+ regionCodes: string[];
523
+ };
524
+ versionList?: {
525
+ versionCodes: string[];
526
+ };
527
+ }
528
+ interface CreateAppRecoveryActionRequest {
529
+ remoteInAppUpdateData?: Record<string, unknown>;
530
+ appRecoveryAction?: {
531
+ targeting?: AppRecoveryTargeting;
532
+ status?: string;
533
+ };
534
+ }
535
+ interface ExternalTransactionAmount {
536
+ priceMicros?: string;
537
+ currency?: string;
538
+ }
539
+ interface ExternalTransaction {
540
+ externalTransactionId?: string;
541
+ originalPreTaxAmount?: ExternalTransactionAmount;
542
+ originalTaxAmount?: ExternalTransactionAmount;
543
+ currentPreTaxAmount?: ExternalTransactionAmount;
544
+ currentTaxAmount?: ExternalTransactionAmount;
545
+ testPurchase?: Record<string, unknown>;
546
+ transactionTime?: string;
547
+ createTime?: string;
548
+ transactionState?: string;
549
+ userTaxAddress?: {
550
+ regionCode?: string;
551
+ };
552
+ externalTransactionToken?: string;
553
+ packageName?: string;
554
+ oneTimeTransaction?: {
555
+ externalTransactionToken?: string;
556
+ };
557
+ recurringTransaction?: {
558
+ externalTransactionId?: string;
559
+ externalSubscription?: {
560
+ subscriptionType?: string;
561
+ };
562
+ };
563
+ }
564
+ interface ExternalTransactionRefund {
565
+ refundTime?: string;
566
+ partialRefund?: {
567
+ refundPreTaxAmount?: ExternalTransactionAmount;
568
+ };
569
+ fullRefund?: Record<string, unknown>;
570
+ }
571
+ interface DataSafety {
572
+ dataTypes?: DataSafetyDataType[];
573
+ purposes?: DataSafetyPurpose[];
574
+ securityPractices?: {
575
+ dataEncryptedInTransit?: boolean;
576
+ dataDeleteable?: boolean;
577
+ independentSecurityReview?: boolean;
578
+ };
579
+ }
580
+ interface DataSafetyDataType {
581
+ dataType?: string;
582
+ dataCategory?: string;
583
+ collected?: boolean;
584
+ shared?: boolean;
585
+ ephemeral?: boolean;
586
+ required?: boolean;
587
+ purposes?: string[];
588
+ }
589
+ interface DataSafetyPurpose {
590
+ purpose?: string;
591
+ }
492
592
  interface Testers {
493
593
  googleGroups?: string[];
494
594
  googleGroupsCount?: number;
495
595
  }
596
+ interface DeviceTier {
597
+ deviceTierConfigId: string;
598
+ deviceGroups: DeviceGroup[];
599
+ }
600
+ interface DeviceGroup {
601
+ name: string;
602
+ deviceSelectors: DeviceSelector[];
603
+ }
604
+ interface DeviceSelector {
605
+ deviceRam?: {
606
+ minBytes?: string;
607
+ maxBytes?: string;
608
+ };
609
+ includedDeviceIds?: {
610
+ buildBrand: string;
611
+ buildDevice: string;
612
+ }[];
613
+ excludedDeviceIds?: {
614
+ buildBrand: string;
615
+ buildDevice: string;
616
+ }[];
617
+ requiredSystemFeatures?: {
618
+ name: string;
619
+ }[];
620
+ forbiddenSystemFeatures?: {
621
+ name: string;
622
+ }[];
623
+ }
624
+ interface DeviceTierConfig {
625
+ deviceTierConfigId: string;
626
+ deviceGroups: DeviceGroup[];
627
+ userCountryTargeting?: {
628
+ countryCodes: string[];
629
+ exclude?: boolean;
630
+ };
631
+ }
632
+ interface DeviceTierConfigsListResponse {
633
+ deviceTierConfigs: DeviceTierConfig[];
634
+ }
635
+ interface InternalAppSharingArtifact {
636
+ certificateFingerprint: string;
637
+ downloadUrl: string;
638
+ sha256: string;
639
+ }
640
+ interface GeneratedApk {
641
+ generatedApkId: string;
642
+ variantId: number;
643
+ moduleName: string;
644
+ apkDescription?: string;
645
+ certificateSha256Fingerprint: string;
646
+ }
647
+ interface GeneratedApksPerVersion {
648
+ generatedApks: GeneratedApk[];
649
+ }
650
+ interface OneTimeProduct {
651
+ packageName: string;
652
+ productId: string;
653
+ purchaseType: "managedUser" | "subscription";
654
+ listings: Record<string, OneTimeProductListing>;
655
+ taxAndComplianceSettings?: TaxAndComplianceSettings;
656
+ }
657
+ interface OneTimeProductListing {
658
+ title: string;
659
+ description?: string;
660
+ benefits?: string[];
661
+ }
662
+ interface TaxAndComplianceSettings {
663
+ eeaWithdrawalRightType?: "WITHDRAWAL_RIGHT_DIGITAL_CONTENT" | "WITHDRAWAL_RIGHT_SERVICE";
664
+ taxRateInfoByRegionCode?: Record<string, {
665
+ streamingTaxType?: string;
666
+ taxTier?: string;
667
+ }>;
668
+ isTokenizedDigitalAsset?: boolean;
669
+ }
670
+ interface OneTimeOffer {
671
+ packageName: string;
672
+ productId: string;
673
+ offerId: string;
674
+ regionalConfigs: Record<string, OneTimeOfferRegionalConfig>;
675
+ otherRegionsConfig?: {
676
+ usdPrice: {
677
+ units: string;
678
+ nanos?: number;
679
+ };
680
+ };
681
+ }
682
+ interface OneTimeOfferRegionalConfig {
683
+ price: {
684
+ currencyCode: string;
685
+ units: string;
686
+ nanos?: number;
687
+ };
688
+ newSubscriberAvailability?: boolean;
689
+ }
690
+ interface OneTimeProductsListResponse {
691
+ oneTimeProducts: OneTimeProduct[];
692
+ nextPageToken?: string;
693
+ }
694
+ interface OneTimeOffersListResponse {
695
+ oneTimeOffers: OneTimeOffer[];
696
+ nextPageToken?: string;
697
+ }
496
698
 
497
699
  interface PlayApiClient {
498
700
  edits: {
@@ -533,6 +735,10 @@ interface PlayApiClient {
533
735
  countryAvailability: {
534
736
  get(packageName: string, editId: string, track: string): Promise<CountryAvailability>;
535
737
  };
738
+ dataSafety: {
739
+ get(packageName: string, editId: string): Promise<DataSafety>;
740
+ update(packageName: string, editId: string, data: DataSafety): Promise<DataSafety>;
741
+ };
536
742
  reviews: {
537
743
  list(packageName: string, options?: ReviewsListOptions): Promise<ReviewsListResponse>;
538
744
  get(packageName: string, reviewId: string, translationLanguage?: string): Promise<Review>;
@@ -606,6 +812,43 @@ interface PlayApiClient {
606
812
  deobfuscation: {
607
813
  upload(packageName: string, editId: string, versionCode: number, filePath: string): Promise<DeobfuscationFile>;
608
814
  };
815
+ appRecovery: {
816
+ list(packageName: string): Promise<AppRecoveryAction[]>;
817
+ cancel(packageName: string, appRecoveryId: string): Promise<void>;
818
+ deploy(packageName: string, appRecoveryId: string): Promise<void>;
819
+ create(packageName: string, request: CreateAppRecoveryActionRequest): Promise<AppRecoveryAction>;
820
+ addTargeting(packageName: string, appRecoveryId: string, targeting: AppRecoveryTargeting): Promise<AppRecoveryAction>;
821
+ };
822
+ externalTransactions: {
823
+ create(packageName: string, data: ExternalTransaction): Promise<ExternalTransaction>;
824
+ get(packageName: string, transactionId: string): Promise<ExternalTransaction>;
825
+ refund(packageName: string, transactionId: string, refundData: ExternalTransactionRefund): Promise<ExternalTransaction>;
826
+ };
827
+ deviceTiers: {
828
+ list(packageName: string): Promise<DeviceTierConfig[]>;
829
+ get(packageName: string, configId: string): Promise<DeviceTierConfig>;
830
+ create(packageName: string, config: DeviceTierConfig): Promise<DeviceTierConfig>;
831
+ };
832
+ oneTimeProducts: {
833
+ list(packageName: string): Promise<OneTimeProductsListResponse>;
834
+ get(packageName: string, productId: string): Promise<OneTimeProduct>;
835
+ create(packageName: string, product: OneTimeProduct): Promise<OneTimeProduct>;
836
+ update(packageName: string, productId: string, product: Partial<OneTimeProduct>): Promise<OneTimeProduct>;
837
+ delete(packageName: string, productId: string): Promise<void>;
838
+ listOffers(packageName: string, productId: string): Promise<OneTimeOffersListResponse>;
839
+ getOffer(packageName: string, productId: string, offerId: string): Promise<OneTimeOffer>;
840
+ createOffer(packageName: string, productId: string, offer: OneTimeOffer): Promise<OneTimeOffer>;
841
+ updateOffer(packageName: string, productId: string, offerId: string, offer: Partial<OneTimeOffer>): Promise<OneTimeOffer>;
842
+ deleteOffer(packageName: string, productId: string, offerId: string): Promise<void>;
843
+ };
844
+ internalAppSharing: {
845
+ uploadBundle(packageName: string, bundlePath: string): Promise<InternalAppSharingArtifact>;
846
+ uploadApk(packageName: string, apkPath: string): Promise<InternalAppSharingArtifact>;
847
+ };
848
+ generatedApks: {
849
+ list(packageName: string, versionCode: number): Promise<GeneratedApk[]>;
850
+ download(packageName: string, versionCode: number, id: string): Promise<ArrayBuffer>;
851
+ };
609
852
  }
610
853
  declare function createApiClient(options: ApiClientOptions): PlayApiClient;
611
854
 
@@ -636,6 +879,8 @@ interface HttpClient {
636
879
  patch<T>(path: string, body?: unknown): Promise<ApiResponse<T>>;
637
880
  delete<T>(path: string): Promise<ApiResponse<T>>;
638
881
  upload<T>(path: string, filePath: string, contentType: string): Promise<ApiResponse<T>>;
882
+ uploadInternal<T>(path: string, filePath: string, contentType: string): Promise<ApiResponse<T>>;
883
+ download(path: string): Promise<ArrayBuffer>;
639
884
  }
640
885
  declare function createHttpClient(options: ApiClientOptions): HttpClient;
641
886
 
@@ -687,4 +932,4 @@ declare class ApiError extends Error {
687
932
  };
688
933
  }
689
934
 
690
- 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, paginateParallel };
935
+ export { type Anomaly, type AnomalyDetectionResponse, type ApiClientOptions, ApiError, type ApiResponse, type ApkInfo, type AppDetails, type AppEdit, type AppRecoveriesListResponse, type AppRecoveryAction, type AppRecoveryTargeting, type BasePlan, type BasePlanMigratePricesRequest, type Bundle, type BundleListResponse, type ConvertRegionPricesRequest, type ConvertRegionPricesResponse, type ConvertedRegionPrice, type CountryAvailability, type CreateAppRecoveryActionRequest, type DataSafety, type DataSafetyDataType, type DataSafetyPurpose, type DeobfuscationFile, type DeobfuscationUploadResponse, type DeveloperComment, type DeveloperPermission, type DeviceGroup, type DeviceSelector, type DeviceTier, type DeviceTierConfig, type DeviceTierConfigsListResponse, type ErrorIssue, type ErrorIssuesResponse, type ErrorReport, type ErrorReportsResponse, type ExternalTransaction, type ExternalTransactionAmount, type ExternalTransactionRefund, type GeneratedApk, type GeneratedApksPerVersion, type Grant, type HttpClient, type Image, type ImageType, type ImageUploadResponse, type ImagesDeleteAllResponse, type ImagesListResponse, type InAppProduct, type InAppProductListing, type InAppProductsListResponse, type InternalAppSharingArtifact, type Listing, type ListingsListResponse, type MetricRow, type MetricSetQuery, type MetricSetResponse, type Money, type OffersListResponse, type OneTimeOffer, type OneTimeOfferRegionalConfig, type OneTimeOffersListResponse, type OneTimeProduct, type OneTimeProductListing, type OneTimeProductsListResponse, 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 TaxAndComplianceSettings, 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, paginateParallel };