@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 CHANGED
@@ -1,5 +1,7 @@
1
1
  # app-store-connect-api
2
2
 
3
+ [![Discord](https://img.shields.io/discord/855294214065487932.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/xQgMW9ufN4) [![NPM Version](https://img.shields.io/npm/v/%40rage-against-the-pixel%2Fapp-store-connect-api)](https://www.npmjs.com/package/@rage-against-the-pixel/app-store-connect-api) [![NPM Downloads](https://img.shields.io/npm/dw/%40rage-against-the-pixel%2Fapp-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: (content: string | null) => Exclude<Config["parseAs"], "auto" | "stream">;
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 = (content) => {
224
- if (!content) {
223
+ const getParseAs = (contentType) => {
224
+ if (!contentType) {
225
225
  return;
226
226
  }
227
- if (content.startsWith('application/json') || content.endsWith('+json')) {
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 (content === 'multipart/form-data') {
232
+ if (cleanContent === 'multipart/form-data') {
231
233
  return 'formData';
232
234
  }
233
- if (['application/', 'audio/', 'image/', 'video/'].some((type) => content.startsWith(type))) {
235
+ if (['application/', 'audio/', 'image/', 'video/'].some((type) => cleanContent.startsWith(type))) {
234
236
  return 'blob';
235
237
  }
236
- if (content.startsWith('text/')) {
238
+ if (cleanContent.startsWith('text/')) {
237
239
  return 'text';
238
240
  }
239
241
  };