@rawdash/connector-app-store-connect 0.21.1

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 ADDED
@@ -0,0 +1,135 @@
1
+ <!-- This file is generated from connector metadata by scripts/generate-connector-docs.ts. Do not edit by hand. -->
2
+
3
+ # @rawdash/connector-app-store-connect
4
+
5
+ [![npm version](https://img.shields.io/npm/v/@rawdash/connector-app-store-connect)](https://www.npmjs.com/package/@rawdash/connector-app-store-connect)
6
+ [![license](https://img.shields.io/npm/l/@rawdash/connector-app-store-connect)](https://github.com/rawdash/rawdash/blob/main/LICENSE)
7
+
8
+ Sync your iOS / macOS apps, daily sales (downloads and proceeds), and customer review ratings from the App Store Connect API for mobile-team dashboards.
9
+
10
+ > **Cost & frequency.** Daily sales reports are only finalized 24-48 hours after the day closes; syncing more often than the recommended interval will not bring fresher revenue data. Recommended sync interval: **6 hours**. Minimum sensible interval: **1 hour**.
11
+
12
+ ## Install
13
+
14
+ ```sh
15
+ npm install @rawdash/connector-app-store-connect
16
+ ```
17
+
18
+ ## Authentication
19
+
20
+ App Store Connect API uses an ES256-signed JWT minted per request from an issuer ID, key ID, and a PKCS#8 EC private key (.p8) downloaded from App Store Connect. The key only needs read access to Sales and Reports.
21
+
22
+ 1. Open App Store Connect -> Users and Access -> Integrations -> App Store Connect API.
23
+ 2. Generate a key with the "Sales" or "Finance" role (read-only is enough). Copy the key ID shown in the table; capture the issuer ID at the top of the page.
24
+ 3. Download the .p8 file once on creation - Apple does not let you re-download it.
25
+ 4. Store the .p8 contents as a secret (e.g. APPSTORECONNECT_P8) and reference it as `privateKey: secret("APPSTORECONNECT_P8")`.
26
+ 5. Set `vendorNumber` from App Store Connect -> Payments and Financial Reports (the top-left dropdown shows the 8-9 digit number). Only required for app_installs and app_revenue.
27
+
28
+ ## Configuration
29
+
30
+ | Field | Type | Required | Description |
31
+ | ------------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
32
+ | `issuerId` | string | Yes | App Store Connect API issuer ID (UUID). Found at Users and Access -> Integrations -> App Store Connect API. |
33
+ | `keyId` | string | Yes | App Store Connect API key ID (10 characters). Shown next to the key in Users and Access -> Integrations -> App Store Connect API. |
34
+ | `privateKey` | secret | Yes | Contents of the App Store Connect API private key file (.p8). PKCS#8 PEM, starting with -----BEGIN PRIVATE KEY-----. Apple only lets you download the key once on creation. |
35
+ | `vendorNumber` | string | No | Apple vendor number (8-9 digit numeric). Required to sync sales reports (app_installs and app_revenue). Found in App Store Connect -> Payments and Financial Reports -> top-left dropdown. |
36
+ | `resources` | array | No | Which App Store Connect resources to sync. Omit to sync all resources. Sales-derived resources (app_installs, app_revenue) require vendorNumber and are silently skipped without it. |
37
+ | `salesBackfillDays` | number | No | How many days of daily sales reports to pull on a full sync. Defaults to 30. Apple keeps daily reports for the last 365 days. |
38
+ | `reviewLimit` | number | No | Most-recent customer reviews to fetch per app for the app_ratings metric. Defaults to 200 (one Apple page). Higher values smooth the rolling rating at the cost of more requests. |
39
+
40
+ ## Resources
41
+
42
+ - **`app_store_connect_app`** _(entity)_ - Apps registered in the team, with bundle id, SKU, and primary locale. Synced from /v1/apps.
43
+ - Endpoint: `GET /v1/apps`
44
+ - `name`: App display name.
45
+ - `bundleId`: Bundle identifier, e.g. com.example.app.
46
+ - `sku`: App SKU set when the app was registered.
47
+ - `primaryLocale`: Primary App Store locale, e.g. en-US.
48
+ - **`app_store_connect_app_installs`** _(metric)_ - Daily installs (units sold or downloaded) aggregated from the SALES SUMMARY report by (date, app, country code, product type). One sample per (day, app, country, productTypeIdentifier).
49
+ - Endpoint: `GET /v1/salesReports`
50
+ - Granularity: daily
51
+ - Dimensions: `appId`, `countryCode`, `productTypeIdentifier`
52
+ - Requires a vendor number. Apple delays daily reports by ~24-48 hours; the connector backs off two days from today to avoid empty / partial reports. Reports are gzipped TSV under the hood.
53
+ - **`app_store_connect_app_revenue`** _(metric)_ - Daily developer proceeds aggregated from the SALES SUMMARY report by (date, app, country code, product type). Values are summed across rows that share a currency; rows are emitted per currency.
54
+ - Endpoint: `GET /v1/salesReports`
55
+ - Unit: native currency (see currency attribute)
56
+ - Granularity: daily
57
+ - Dimensions: `appId`, `countryCode`, `currency`, `productTypeIdentifier`
58
+ - Proceeds are NOT FX-normalised; each sample carries its native currency in the `currency` attribute. Filter or convert downstream.
59
+ - **`app_store_connect_app_ratings`** _(metric)_ - Rolling per-review ratings sampled from the most-recent N customer reviews per app (default 200). Each sample carries one review with the rating (1-5) as the value and the territory on the attribute.
60
+ - Endpoint: `GET /v1/apps/{id}/customerReviews`
61
+ - Dimensions: `appId`, `territory`
62
+ - Apple does NOT expose the lifetime average rating over the REST API. Average over a time window downstream to get a rolling rating.
63
+
64
+ ## Example
65
+
66
+ ```ts
67
+ import {
68
+ defineConfig,
69
+ defineDashboard,
70
+ defineMetric,
71
+ secret,
72
+ } from '@rawdash/core';
73
+
74
+ const appStoreConnect = {
75
+ name: 'app-store-connect',
76
+ connectorId: 'app-store-connect',
77
+ config: {
78
+ issuerId: '69a6de7f-0000-0000-0000-000000000000',
79
+ keyId: 'ABC1234DEF',
80
+ privateKey: secret('APPSTORECONNECT_P8'),
81
+ vendorNumber: '85912345',
82
+ },
83
+ };
84
+
85
+ export default defineConfig({
86
+ connectors: [appStoreConnect],
87
+ dashboards: {
88
+ mobile: defineDashboard({
89
+ widgets: {
90
+ app_count: {
91
+ kind: 'stat',
92
+ title: 'Apps',
93
+ metric: defineMetric({
94
+ connector: appStoreConnect,
95
+ shape: 'entity',
96
+ entityType: 'app_store_connect_app',
97
+ fn: 'count',
98
+ }),
99
+ },
100
+ installs_total: {
101
+ kind: 'stat',
102
+ title: 'Installs (synced window)',
103
+ metric: defineMetric({
104
+ connector: appStoreConnect,
105
+ shape: 'metric',
106
+ name: 'app_store_connect_app_installs',
107
+ fn: 'sum',
108
+ }),
109
+ },
110
+ },
111
+ }),
112
+ },
113
+ });
114
+ ```
115
+
116
+ ## Rate limits
117
+
118
+ App Store Connect enforces a 3,600 requests-per-hour quota per team. The shared HTTP client backs off on 429 using Retry-After. Sales report endpoints are billed in the same bucket and cost one request per (day, report) pair.
119
+
120
+ ## Limitations
121
+
122
+ - app_crashes (per-build crash counts) is not implemented. Apple only exposes crash analytics via the asynchronous Analytics Reports flow (create report request -> poll for completion -> download gzipped CSV) which spans multiple syncs; a follow-up will add it.
123
+ - app_ratings is sampled from the most recent N customer reviews per app (default 200, capped at 2,000). It is a rolling rating, not the lifetime average shown in the App Store, because Apple does not expose lifetime aggregates over the REST API.
124
+ - Sales reports are pulled in DAILY frequency only; weekly, monthly, and yearly summaries are not synced.
125
+ - Subscription, in-app-purchase, and refund line items in the SALES summary report are aggregated into `units` and `proceeds` rather than broken out by product type. Filter by `productTypeIdentifier` on the metric sample attributes if you need to separate them.
126
+
127
+ ## Links
128
+
129
+ - [Rawdash docs](https://rawdash.dev/docs/connectors/)
130
+ - [Apple API docs](https://developer.apple.com/documentation/appstoreconnectapi)
131
+ - [GitHub](https://github.com/rawdash/rawdash)
132
+
133
+ ## License
134
+
135
+ Apache-2.0
@@ -0,0 +1,345 @@
1
+ import { BaseConnector, ConnectorCost, ConnectorContext, SyncOptions, StorageHandle, SyncResult, ConnectorDoc } from '@rawdash/core';
2
+ import { z } from 'zod';
3
+
4
+ declare const configFields: z.ZodObject<{
5
+ issuerId: z.ZodString;
6
+ keyId: z.ZodString;
7
+ privateKey: z.ZodObject<{
8
+ $secret: z.ZodString;
9
+ }, z.core.$strip>;
10
+ vendorNumber: z.ZodOptional<z.ZodString>;
11
+ resources: z.ZodOptional<z.ZodArray<z.ZodEnum<{
12
+ apps: "apps";
13
+ app_installs: "app_installs";
14
+ app_revenue: "app_revenue";
15
+ app_ratings: "app_ratings";
16
+ }>>>;
17
+ salesBackfillDays: z.ZodOptional<z.ZodNumber>;
18
+ reviewLimit: z.ZodOptional<z.ZodNumber>;
19
+ }, z.core.$strip>;
20
+ declare const doc: ConnectorDoc;
21
+ declare const cost: ConnectorCost;
22
+ interface AppStoreConnectSettings {
23
+ resources?: readonly AppStoreConnectResource[];
24
+ vendorNumber?: string;
25
+ salesBackfillDays?: number;
26
+ reviewLimit?: number;
27
+ }
28
+ declare const appStoreConnectCredentials: {
29
+ issuerId: {
30
+ description: string;
31
+ auth: "required";
32
+ };
33
+ keyId: {
34
+ description: string;
35
+ auth: "required";
36
+ };
37
+ privateKey: {
38
+ description: string;
39
+ auth: "required";
40
+ };
41
+ };
42
+ type AppStoreConnectCredentials = typeof appStoreConnectCredentials;
43
+ declare const PHASE_ORDER: readonly ["apps", "app_installs", "app_revenue", "app_ratings"];
44
+ type AppStoreConnectPhase = (typeof PHASE_ORDER)[number];
45
+ type AppStoreConnectResource = AppStoreConnectPhase;
46
+ declare const appStoreConnectResources: {
47
+ readonly app_store_connect_app: {
48
+ readonly shape: "entity";
49
+ readonly description: "Apps registered in the team, with bundle id, SKU, and primary locale. Synced from /v1/apps.";
50
+ readonly endpoint: "GET /v1/apps";
51
+ readonly fields: [{
52
+ readonly name: "name";
53
+ readonly description: "App display name.";
54
+ }, {
55
+ readonly name: "bundleId";
56
+ readonly description: "Bundle identifier, e.g. com.example.app.";
57
+ }, {
58
+ readonly name: "sku";
59
+ readonly description: "App SKU set when the app was registered.";
60
+ }, {
61
+ readonly name: "primaryLocale";
62
+ readonly description: "Primary App Store locale, e.g. en-US.";
63
+ }];
64
+ readonly responses: {
65
+ readonly apps: z.ZodObject<{
66
+ data: z.ZodArray<z.ZodObject<{
67
+ id: z.ZodString;
68
+ type: z.ZodOptional<z.ZodString>;
69
+ attributes: z.ZodOptional<z.ZodNullable<z.ZodObject<{
70
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
71
+ bundleId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
72
+ sku: z.ZodOptional<z.ZodNullable<z.ZodString>>;
73
+ primaryLocale: z.ZodOptional<z.ZodNullable<z.ZodString>>;
74
+ }, z.core.$strip>>>;
75
+ }, z.core.$strip>>;
76
+ links: z.ZodOptional<z.ZodNullable<z.ZodObject<{
77
+ next: z.ZodOptional<z.ZodNullable<z.ZodString>>;
78
+ }, z.core.$strip>>>;
79
+ }, z.core.$strip>;
80
+ };
81
+ };
82
+ readonly app_store_connect_app_installs: {
83
+ readonly shape: "metric";
84
+ readonly description: "Daily installs (units sold or downloaded) aggregated from the SALES SUMMARY report by (date, app, country code, product type). One sample per (day, app, country, productTypeIdentifier).";
85
+ readonly endpoint: "GET /v1/salesReports";
86
+ readonly granularity: "daily";
87
+ readonly notes: "Requires a vendor number. Apple delays daily reports by ~24-48 hours; the connector backs off two days from today to avoid empty / partial reports. Reports are gzipped TSV under the hood.";
88
+ readonly dimensions: [{
89
+ readonly name: "appId";
90
+ readonly description: "App Store Connect app id (Apple Identifier from the report).";
91
+ }, {
92
+ readonly name: "countryCode";
93
+ readonly description: "Two-letter ISO country code from the sale.";
94
+ }, {
95
+ readonly name: "productTypeIdentifier";
96
+ readonly description: "Apple product type, e.g. 1 (paid app), 1F (universal app), IA1 (in-app purchase).";
97
+ }];
98
+ readonly responses: {
99
+ readonly sales_installs_report: z.ZodString;
100
+ };
101
+ };
102
+ readonly app_store_connect_app_revenue: {
103
+ readonly shape: "metric";
104
+ readonly description: "Daily developer proceeds aggregated from the SALES SUMMARY report by (date, app, country code, product type). Values are summed across rows that share a currency; rows are emitted per currency.";
105
+ readonly endpoint: "GET /v1/salesReports";
106
+ readonly unit: "native currency (see currency attribute)";
107
+ readonly granularity: "daily";
108
+ readonly notes: "Proceeds are NOT FX-normalised; each sample carries its native currency in the `currency` attribute. Filter or convert downstream.";
109
+ readonly dimensions: [{
110
+ readonly name: "appId";
111
+ readonly description: "App Store Connect app id.";
112
+ }, {
113
+ readonly name: "countryCode";
114
+ readonly description: "Two-letter ISO country code from the sale.";
115
+ }, {
116
+ readonly name: "currency";
117
+ readonly description: "ISO 4217 currency of the proceeds, e.g. USD, EUR, JPY (matches Apple \"Currency of Proceeds\").";
118
+ }, {
119
+ readonly name: "productTypeIdentifier";
120
+ readonly description: "Apple product type code (same as app_installs).";
121
+ }];
122
+ readonly responses: {
123
+ readonly sales_revenue_report: z.ZodString;
124
+ };
125
+ };
126
+ readonly app_store_connect_app_ratings: {
127
+ readonly shape: "metric";
128
+ readonly description: "Rolling per-review ratings sampled from the most-recent N customer reviews per app (default 200). Each sample carries one review with the rating (1-5) as the value and the territory on the attribute.";
129
+ readonly endpoint: "GET /v1/apps/{id}/customerReviews";
130
+ readonly notes: "Apple does NOT expose the lifetime average rating over the REST API. Average over a time window downstream to get a rolling rating.";
131
+ readonly dimensions: [{
132
+ readonly name: "appId";
133
+ readonly description: "App Store Connect app id.";
134
+ }, {
135
+ readonly name: "territory";
136
+ readonly description: "Two-letter ISO country code where the review was filed.";
137
+ }];
138
+ readonly responses: {
139
+ readonly customer_reviews: z.ZodObject<{
140
+ data: z.ZodArray<z.ZodObject<{
141
+ id: z.ZodString;
142
+ type: z.ZodOptional<z.ZodString>;
143
+ attributes: z.ZodOptional<z.ZodNullable<z.ZodObject<{
144
+ rating: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
145
+ territory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
146
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
147
+ reviewerNickname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
148
+ createdDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
149
+ }, z.core.$strip>>>;
150
+ }, z.core.$strip>>;
151
+ links: z.ZodOptional<z.ZodNullable<z.ZodObject<{
152
+ next: z.ZodOptional<z.ZodNullable<z.ZodString>>;
153
+ }, z.core.$strip>>>;
154
+ }, z.core.$strip>;
155
+ };
156
+ };
157
+ };
158
+ declare const id = "app-store-connect";
159
+ declare class AppStoreConnectConnector extends BaseConnector<AppStoreConnectSettings, AppStoreConnectCredentials> {
160
+ static readonly id = "app-store-connect";
161
+ static readonly resources: {
162
+ readonly app_store_connect_app: {
163
+ readonly shape: "entity";
164
+ readonly description: "Apps registered in the team, with bundle id, SKU, and primary locale. Synced from /v1/apps.";
165
+ readonly endpoint: "GET /v1/apps";
166
+ readonly fields: [{
167
+ readonly name: "name";
168
+ readonly description: "App display name.";
169
+ }, {
170
+ readonly name: "bundleId";
171
+ readonly description: "Bundle identifier, e.g. com.example.app.";
172
+ }, {
173
+ readonly name: "sku";
174
+ readonly description: "App SKU set when the app was registered.";
175
+ }, {
176
+ readonly name: "primaryLocale";
177
+ readonly description: "Primary App Store locale, e.g. en-US.";
178
+ }];
179
+ readonly responses: {
180
+ readonly apps: z.ZodObject<{
181
+ data: z.ZodArray<z.ZodObject<{
182
+ id: z.ZodString;
183
+ type: z.ZodOptional<z.ZodString>;
184
+ attributes: z.ZodOptional<z.ZodNullable<z.ZodObject<{
185
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
186
+ bundleId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
187
+ sku: z.ZodOptional<z.ZodNullable<z.ZodString>>;
188
+ primaryLocale: z.ZodOptional<z.ZodNullable<z.ZodString>>;
189
+ }, z.core.$strip>>>;
190
+ }, z.core.$strip>>;
191
+ links: z.ZodOptional<z.ZodNullable<z.ZodObject<{
192
+ next: z.ZodOptional<z.ZodNullable<z.ZodString>>;
193
+ }, z.core.$strip>>>;
194
+ }, z.core.$strip>;
195
+ };
196
+ };
197
+ readonly app_store_connect_app_installs: {
198
+ readonly shape: "metric";
199
+ readonly description: "Daily installs (units sold or downloaded) aggregated from the SALES SUMMARY report by (date, app, country code, product type). One sample per (day, app, country, productTypeIdentifier).";
200
+ readonly endpoint: "GET /v1/salesReports";
201
+ readonly granularity: "daily";
202
+ readonly notes: "Requires a vendor number. Apple delays daily reports by ~24-48 hours; the connector backs off two days from today to avoid empty / partial reports. Reports are gzipped TSV under the hood.";
203
+ readonly dimensions: [{
204
+ readonly name: "appId";
205
+ readonly description: "App Store Connect app id (Apple Identifier from the report).";
206
+ }, {
207
+ readonly name: "countryCode";
208
+ readonly description: "Two-letter ISO country code from the sale.";
209
+ }, {
210
+ readonly name: "productTypeIdentifier";
211
+ readonly description: "Apple product type, e.g. 1 (paid app), 1F (universal app), IA1 (in-app purchase).";
212
+ }];
213
+ readonly responses: {
214
+ readonly sales_installs_report: z.ZodString;
215
+ };
216
+ };
217
+ readonly app_store_connect_app_revenue: {
218
+ readonly shape: "metric";
219
+ readonly description: "Daily developer proceeds aggregated from the SALES SUMMARY report by (date, app, country code, product type). Values are summed across rows that share a currency; rows are emitted per currency.";
220
+ readonly endpoint: "GET /v1/salesReports";
221
+ readonly unit: "native currency (see currency attribute)";
222
+ readonly granularity: "daily";
223
+ readonly notes: "Proceeds are NOT FX-normalised; each sample carries its native currency in the `currency` attribute. Filter or convert downstream.";
224
+ readonly dimensions: [{
225
+ readonly name: "appId";
226
+ readonly description: "App Store Connect app id.";
227
+ }, {
228
+ readonly name: "countryCode";
229
+ readonly description: "Two-letter ISO country code from the sale.";
230
+ }, {
231
+ readonly name: "currency";
232
+ readonly description: "ISO 4217 currency of the proceeds, e.g. USD, EUR, JPY (matches Apple \"Currency of Proceeds\").";
233
+ }, {
234
+ readonly name: "productTypeIdentifier";
235
+ readonly description: "Apple product type code (same as app_installs).";
236
+ }];
237
+ readonly responses: {
238
+ readonly sales_revenue_report: z.ZodString;
239
+ };
240
+ };
241
+ readonly app_store_connect_app_ratings: {
242
+ readonly shape: "metric";
243
+ readonly description: "Rolling per-review ratings sampled from the most-recent N customer reviews per app (default 200). Each sample carries one review with the rating (1-5) as the value and the territory on the attribute.";
244
+ readonly endpoint: "GET /v1/apps/{id}/customerReviews";
245
+ readonly notes: "Apple does NOT expose the lifetime average rating over the REST API. Average over a time window downstream to get a rolling rating.";
246
+ readonly dimensions: [{
247
+ readonly name: "appId";
248
+ readonly description: "App Store Connect app id.";
249
+ }, {
250
+ readonly name: "territory";
251
+ readonly description: "Two-letter ISO country code where the review was filed.";
252
+ }];
253
+ readonly responses: {
254
+ readonly customer_reviews: z.ZodObject<{
255
+ data: z.ZodArray<z.ZodObject<{
256
+ id: z.ZodString;
257
+ type: z.ZodOptional<z.ZodString>;
258
+ attributes: z.ZodOptional<z.ZodNullable<z.ZodObject<{
259
+ rating: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
260
+ territory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
261
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
262
+ reviewerNickname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
263
+ createdDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
264
+ }, z.core.$strip>>>;
265
+ }, z.core.$strip>>;
266
+ links: z.ZodOptional<z.ZodNullable<z.ZodObject<{
267
+ next: z.ZodOptional<z.ZodNullable<z.ZodString>>;
268
+ }, z.core.$strip>>>;
269
+ }, z.core.$strip>;
270
+ };
271
+ };
272
+ };
273
+ static readonly schemas: {
274
+ readonly apps: z.ZodObject<{
275
+ data: z.ZodArray<z.ZodObject<{
276
+ id: z.ZodString;
277
+ type: z.ZodOptional<z.ZodString>;
278
+ attributes: z.ZodOptional<z.ZodNullable<z.ZodObject<{
279
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
280
+ bundleId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
281
+ sku: z.ZodOptional<z.ZodNullable<z.ZodString>>;
282
+ primaryLocale: z.ZodOptional<z.ZodNullable<z.ZodString>>;
283
+ }, z.core.$strip>>>;
284
+ }, z.core.$strip>>;
285
+ links: z.ZodOptional<z.ZodNullable<z.ZodObject<{
286
+ next: z.ZodOptional<z.ZodNullable<z.ZodString>>;
287
+ }, z.core.$strip>>>;
288
+ }, z.core.$strip>;
289
+ } & {
290
+ readonly sales_installs_report: z.ZodString;
291
+ } & {
292
+ readonly sales_revenue_report: z.ZodString;
293
+ } & {
294
+ readonly customer_reviews: z.ZodObject<{
295
+ data: z.ZodArray<z.ZodObject<{
296
+ id: z.ZodString;
297
+ type: z.ZodOptional<z.ZodString>;
298
+ attributes: z.ZodOptional<z.ZodNullable<z.ZodObject<{
299
+ rating: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
300
+ territory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
301
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
302
+ reviewerNickname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
303
+ createdDate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
304
+ }, z.core.$strip>>>;
305
+ }, z.core.$strip>>;
306
+ links: z.ZodOptional<z.ZodNullable<z.ZodObject<{
307
+ next: z.ZodOptional<z.ZodNullable<z.ZodString>>;
308
+ }, z.core.$strip>>>;
309
+ }, z.core.$strip>;
310
+ } & Readonly<Record<string, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
311
+ static readonly cost: ConnectorCost;
312
+ static create(input: unknown, ctx?: ConnectorContext): AppStoreConnectConnector;
313
+ readonly id = "app-store-connect";
314
+ readonly credentials: {
315
+ issuerId: {
316
+ description: string;
317
+ auth: "required";
318
+ };
319
+ keyId: {
320
+ description: string;
321
+ auth: "required";
322
+ };
323
+ privateKey: {
324
+ description: string;
325
+ auth: "required";
326
+ };
327
+ };
328
+ private cachedJwt;
329
+ private cachedAppIds;
330
+ private buildAuthHeader;
331
+ private authHeaders;
332
+ private sanitizeListUrl;
333
+ private resolveCursor;
334
+ private listApps;
335
+ private fetchAppsPage;
336
+ private buildSalesReportUrl;
337
+ private fetchSalesReportTsv;
338
+ private fetchReviewsForApp;
339
+ private writeApps;
340
+ private syncSalesReports;
341
+ private syncAppRatings;
342
+ sync(options: SyncOptions, storage: StorageHandle, signal?: AbortSignal): Promise<SyncResult>;
343
+ }
344
+
345
+ export { AppStoreConnectConnector, type AppStoreConnectResource, type AppStoreConnectSettings, configFields, cost, AppStoreConnectConnector as default, doc, id, appStoreConnectResources as resources };