@rage-against-the-pixel/app-store-connect-api 3.7.0 → 3.8.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/README.md +6 -1
- package/dist/app_store_connect_api/client/utils.d.ts +1 -1
- package/dist/app_store_connect_api/client/utils.js +8 -6
- package/dist/app_store_connect_api/schemas.gen.d.ts +1196 -307
- package/dist/app_store_connect_api/schemas.gen.js +1156 -256
- package/dist/app_store_connect_api/services.gen.d.ts +30 -24
- package/dist/app_store_connect_api/services.gen.js +135 -51
- package/dist/app_store_connect_api/types.gen.d.ts +923 -360
- package/dist/client.d.ts +5 -0
- package/dist/client.js +48 -18
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# app-store-connect-api
|
|
2
2
|
|
|
3
|
+
[](https://discord.gg/xQgMW9ufN4) [](https://www.npmjs.com/package/@rage-against-the-pixel/app-store-connect-api) [](https://www.npmjs.com/package/@rage-against-the-pixel/app-store-connect-api)
|
|
4
|
+
|
|
3
5
|
A TypeScript package for communicating with Apple [App Store Connect API](https://developer.apple.com/documentation/appstoreconnectapi)
|
|
4
6
|
|
|
5
7
|
- Automatically generated API client using the latest [OpenAPI specification](https://developer.apple.com/sample-code/app-store-connect/app-store-connect-openapi-specification.zip) from Apple.
|
|
@@ -20,6 +22,9 @@ Download and save the private key `.p8` file to a save, secure location.
|
|
|
20
22
|
The contents of this file is your `privateKey`.
|
|
21
23
|
The `privateKeyId` and `issuerId` are both listed on the same page where you create your private key.
|
|
22
24
|
|
|
25
|
+
> [!NOTE]
|
|
26
|
+
> Individual keys do not require `issuerId`.
|
|
27
|
+
|
|
23
28
|
## Example
|
|
24
29
|
|
|
25
30
|
```ts
|
|
@@ -32,7 +37,7 @@ async function main() {
|
|
|
32
37
|
privateKey: '<PRIVATE_KEY>',
|
|
33
38
|
};
|
|
34
39
|
const client = new AppStoreConnectClient(options);
|
|
35
|
-
const { data: response, error } = await client.api.appsGetCollection({
|
|
40
|
+
const { data: response, error } = await client.api.AppService.appsGetCollection({
|
|
36
41
|
query: {
|
|
37
42
|
limit: 10
|
|
38
43
|
}
|
|
@@ -19,7 +19,7 @@ export declare const createQuerySerializer: <T = unknown>({ allowReserved, array
|
|
|
19
19
|
/**
|
|
20
20
|
* Infers parseAs value from provided Content-Type header.
|
|
21
21
|
*/
|
|
22
|
-
export declare const getParseAs: (
|
|
22
|
+
export declare const getParseAs: (contentType: string | null) => Exclude<Config["parseAs"], "auto" | "stream">;
|
|
23
23
|
export declare const getUrl: ({ baseUrl, path, query, querySerializer, url: _url, }: {
|
|
24
24
|
baseUrl: string;
|
|
25
25
|
path?: Record<string, unknown>;
|
|
@@ -220,20 +220,22 @@ exports.createQuerySerializer = createQuerySerializer;
|
|
|
220
220
|
/**
|
|
221
221
|
* Infers parseAs value from provided Content-Type header.
|
|
222
222
|
*/
|
|
223
|
-
const getParseAs = (
|
|
224
|
-
if (!
|
|
223
|
+
const getParseAs = (contentType) => {
|
|
224
|
+
if (!contentType) {
|
|
225
225
|
return;
|
|
226
226
|
}
|
|
227
|
-
|
|
227
|
+
const cleanContent = contentType.split(';')[0].trim();
|
|
228
|
+
if (cleanContent.startsWith('application/json') ||
|
|
229
|
+
cleanContent.endsWith('+json')) {
|
|
228
230
|
return 'json';
|
|
229
231
|
}
|
|
230
|
-
if (
|
|
232
|
+
if (cleanContent === 'multipart/form-data') {
|
|
231
233
|
return 'formData';
|
|
232
234
|
}
|
|
233
|
-
if (['application/', 'audio/', 'image/', 'video/'].some((type) =>
|
|
235
|
+
if (['application/', 'audio/', 'image/', 'video/'].some((type) => cleanContent.startsWith(type))) {
|
|
234
236
|
return 'blob';
|
|
235
237
|
}
|
|
236
|
-
if (
|
|
238
|
+
if (cleanContent.startsWith('text/')) {
|
|
237
239
|
return 'text';
|
|
238
240
|
}
|
|
239
241
|
};
|