@pofky/asc-mcp 1.3.0 → 1.8.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.
Files changed (103) hide show
  1. package/LIMITATIONS.md +41 -0
  2. package/README.md +82 -10
  3. package/USER_GUIDE.md +185 -0
  4. package/dist/client.d.ts +5 -0
  5. package/dist/client.d.ts.map +1 -1
  6. package/dist/client.js +58 -1
  7. package/dist/client.js.map +1 -1
  8. package/dist/doctor.d.ts +28 -0
  9. package/dist/doctor.d.ts.map +1 -0
  10. package/dist/doctor.js +178 -0
  11. package/dist/doctor.js.map +1 -0
  12. package/dist/editable.d.ts +9 -0
  13. package/dist/editable.d.ts.map +1 -0
  14. package/dist/editable.js +20 -0
  15. package/dist/editable.js.map +1 -0
  16. package/dist/gate.d.ts +8 -0
  17. package/dist/gate.d.ts.map +1 -0
  18. package/dist/gate.js +17 -0
  19. package/dist/gate.js.map +1 -0
  20. package/dist/index.js +276 -21
  21. package/dist/index.js.map +1 -1
  22. package/dist/license.js +1 -1
  23. package/dist/prompts.d.ts.map +1 -1
  24. package/dist/prompts.js +101 -0
  25. package/dist/prompts.js.map +1 -1
  26. package/dist/setup.d.ts +19 -0
  27. package/dist/setup.d.ts.map +1 -0
  28. package/dist/setup.js +153 -0
  29. package/dist/setup.js.map +1 -0
  30. package/dist/tools/age-rating.d.ts +14 -0
  31. package/dist/tools/age-rating.d.ts.map +1 -0
  32. package/dist/tools/age-rating.js +125 -0
  33. package/dist/tools/age-rating.js.map +1 -0
  34. package/dist/tools/app-details.js +2 -2
  35. package/dist/tools/availability.d.ts +20 -0
  36. package/dist/tools/availability.d.ts.map +1 -0
  37. package/dist/tools/availability.js +96 -0
  38. package/dist/tools/availability.js.map +1 -0
  39. package/dist/tools/builds.d.ts +26 -0
  40. package/dist/tools/builds.d.ts.map +1 -0
  41. package/dist/tools/builds.js +108 -0
  42. package/dist/tools/builds.js.map +1 -0
  43. package/dist/tools/eu-trader.d.ts +12 -0
  44. package/dist/tools/eu-trader.d.ts.map +1 -0
  45. package/dist/tools/eu-trader.js +25 -0
  46. package/dist/tools/eu-trader.js.map +1 -0
  47. package/dist/tools/guide.d.ts +38 -0
  48. package/dist/tools/guide.d.ts.map +1 -0
  49. package/dist/tools/guide.js +273 -0
  50. package/dist/tools/guide.js.map +1 -0
  51. package/dist/tools/iap.d.ts +43 -0
  52. package/dist/tools/iap.d.ts.map +1 -0
  53. package/dist/tools/iap.js +360 -0
  54. package/dist/tools/iap.js.map +1 -0
  55. package/dist/tools/list-apps.js +1 -1
  56. package/dist/tools/list-reviews.js +2 -2
  57. package/dist/tools/local-build.d.ts +26 -0
  58. package/dist/tools/local-build.d.ts.map +1 -0
  59. package/dist/tools/local-build.js +100 -0
  60. package/dist/tools/local-build.js.map +1 -0
  61. package/dist/tools/privacy.d.ts +15 -0
  62. package/dist/tools/privacy.d.ts.map +1 -0
  63. package/dist/tools/privacy.js +32 -0
  64. package/dist/tools/privacy.js.map +1 -0
  65. package/dist/tools/release-control.d.ts +22 -0
  66. package/dist/tools/release-control.d.ts.map +1 -0
  67. package/dist/tools/release-control.js +85 -0
  68. package/dist/tools/release-control.js.map +1 -0
  69. package/dist/tools/release-preflight.d.ts.map +1 -1
  70. package/dist/tools/release-preflight.js +139 -0
  71. package/dist/tools/release-preflight.js.map +1 -1
  72. package/dist/tools/review-screenshot.d.ts +14 -0
  73. package/dist/tools/review-screenshot.d.ts.map +1 -0
  74. package/dist/tools/review-screenshot.js +72 -0
  75. package/dist/tools/review-screenshot.js.map +1 -0
  76. package/dist/tools/review-status.js +2 -2
  77. package/dist/tools/sales-report.js +3 -3
  78. package/dist/tools/sales-report.js.map +1 -1
  79. package/dist/tools/screenshots.d.ts +15 -0
  80. package/dist/tools/screenshots.d.ts.map +1 -0
  81. package/dist/tools/screenshots.js +106 -0
  82. package/dist/tools/screenshots.js.map +1 -0
  83. package/dist/tools/signing.d.ts +21 -0
  84. package/dist/tools/signing.d.ts.map +1 -0
  85. package/dist/tools/signing.js +101 -0
  86. package/dist/tools/signing.js.map +1 -0
  87. package/dist/tools/submission.d.ts +47 -0
  88. package/dist/tools/submission.d.ts.map +1 -0
  89. package/dist/tools/submission.js +199 -0
  90. package/dist/tools/submission.js.map +1 -0
  91. package/dist/tools/testflight.d.ts +20 -0
  92. package/dist/tools/testflight.d.ts.map +1 -0
  93. package/dist/tools/testflight.js +75 -0
  94. package/dist/tools/testflight.js.map +1 -0
  95. package/dist/tools/update-version-metadata.d.ts +17 -0
  96. package/dist/tools/update-version-metadata.d.ts.map +1 -0
  97. package/dist/tools/update-version-metadata.js +148 -0
  98. package/dist/tools/update-version-metadata.js.map +1 -0
  99. package/dist/tools/version-control.d.ts +21 -0
  100. package/dist/tools/version-control.d.ts.map +1 -0
  101. package/dist/tools/version-control.js +144 -0
  102. package/dist/tools/version-control.js.map +1 -0
  103. package/package.json +13 -2
@@ -0,0 +1,17 @@
1
+ import { type ASCClient } from "../client.js";
2
+ import type { Tier } from "../types.js";
3
+ export interface UpdateMetadataArgs {
4
+ app_id: string;
5
+ locale?: string;
6
+ description?: string;
7
+ keywords?: string;
8
+ whats_new?: string;
9
+ promotional_text?: string;
10
+ marketing_url?: string;
11
+ support_url?: string;
12
+ name?: string;
13
+ subtitle?: string;
14
+ privacy_policy_url?: string;
15
+ }
16
+ export declare function updateVersionMetadata(client: ASCClient, args: UpdateMetadataArgs, tier: Tier): Promise<string>;
17
+ //# sourceMappingURL=update-version-metadata.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-version-metadata.d.ts","sourceRoot":"","sources":["../../src/tools/update-version-metadata.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAwExC,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,SAAS,EACjB,IAAI,EAAE,kBAAkB,EACxB,IAAI,EAAE,IAAI,GACT,OAAO,CAAC,MAAM,CAAC,CA2HjB"}
@@ -0,0 +1,148 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateVersionMetadata = updateVersionMetadata;
4
+ const client_js_1 = require("../client.js");
5
+ const gate_js_1 = require("../gate.js");
6
+ const editable_js_1 = require("../editable.js");
7
+ /**
8
+ * PATCH a localization, but survive Apple's atomic-PATCH gotcha: a single
9
+ * attribute that is not editable in the current state (e.g. whatsNew on a
10
+ * first 1.0 version) returns 409 STATE_ERROR and rejects the WHOLE write,
11
+ * silently losing the valid fields. We drop the offending attribute(s) and
12
+ * retry so the rest still lands, reporting what was skipped.
13
+ */
14
+ async function patchLocResilient(client, path, type, id, attributes, skipped) {
15
+ let attrs = { ...attributes };
16
+ for (let attempt = 0; attempt < 6 && Object.keys(attrs).length; attempt++) {
17
+ try {
18
+ await client.patch(path, { data: { type, id, attributes: attrs } });
19
+ return;
20
+ }
21
+ catch (err) {
22
+ if (!(err instanceof client_js_1.ASCAPIError) || err.status !== 409)
23
+ throw err;
24
+ const bad = attrFromStateError(err.body, Object.keys(attrs));
25
+ if (!bad)
26
+ throw err;
27
+ delete attrs[bad];
28
+ skipped.push(bad);
29
+ }
30
+ }
31
+ }
32
+ /** Pull the offending attribute name out of a 409 STATE_ERROR body. */
33
+ function attrFromStateError(body, candidates) {
34
+ // Apple phrases it as: Attribute 'whatsNew' cannot be edited at this time
35
+ const m = body.match(/Attribute '([^']+)'/);
36
+ if (m && candidates.includes(m[1]))
37
+ return m[1];
38
+ // Fallback: any candidate name quoted in the body.
39
+ return candidates.find((c) => body.includes(`'${c}'`)) ?? null;
40
+ }
41
+ const LIMITS = {
42
+ description: 4000,
43
+ keywords: 100,
44
+ whatsNew: 4000,
45
+ promotionalText: 170,
46
+ name: 30,
47
+ subtitle: 30,
48
+ };
49
+ async function updateVersionMetadata(client, args, tier) {
50
+ const gate = (0, gate_js_1.requirePro)(tier, "Editing version metadata");
51
+ if (gate)
52
+ return gate;
53
+ // Validate character limits before any write.
54
+ const overLimit = [];
55
+ const check = (field, val) => {
56
+ if (val !== undefined && val.length > LIMITS[field]) {
57
+ overLimit.push(`${field}: ${val.length}/${LIMITS[field]} chars`);
58
+ }
59
+ };
60
+ check("description", args.description);
61
+ check("keywords", args.keywords);
62
+ check("whatsNew", args.whats_new);
63
+ check("promotionalText", args.promotional_text);
64
+ check("name", args.name);
65
+ check("subtitle", args.subtitle);
66
+ if (overLimit.length) {
67
+ return `Refusing to write, over Apple's character limits:\n- ${overLimit.join("\n- ")}`;
68
+ }
69
+ // 1. Find the editable version for this app.
70
+ const versionsRes = await client.get(`/v1/apps/${args.app_id}/appStoreVersions`, { "fields[appStoreVersions]": "versionString,appStoreState,platform", limit: "5" });
71
+ const versions = Array.isArray(versionsRes.data) ? versionsRes.data : [versionsRes.data];
72
+ const editable = versions.find((v) => editable_js_1.EDITABLE_VERSION_STATES.has(v.attributes.appStoreState));
73
+ if (!editable) {
74
+ return ("No editable version found. The current version is locked (in review or released).\n" +
75
+ "Create a new version first with create_version.");
76
+ }
77
+ const targetLocale = args.locale;
78
+ const changes = [];
79
+ const skipped = [];
80
+ // 2. Version-level localization fields (description, keywords, whatsNew, promo, urls).
81
+ const versionLocFields = {};
82
+ if (args.description !== undefined)
83
+ versionLocFields.description = args.description;
84
+ if (args.keywords !== undefined)
85
+ versionLocFields.keywords = args.keywords;
86
+ if (args.whats_new !== undefined)
87
+ versionLocFields.whatsNew = args.whats_new;
88
+ if (args.promotional_text !== undefined)
89
+ versionLocFields.promotionalText = args.promotional_text;
90
+ if (args.marketing_url !== undefined)
91
+ versionLocFields.marketingUrl = args.marketing_url;
92
+ if (args.support_url !== undefined)
93
+ versionLocFields.supportUrl = args.support_url;
94
+ if (Object.keys(versionLocFields).length) {
95
+ const locsRes = await client.get(`/v1/appStoreVersions/${editable.id}/appStoreVersionLocalizations`, { "fields[appStoreVersionLocalizations]": "locale", limit: "50" });
96
+ const locs = Array.isArray(locsRes.data) ? locsRes.data : [locsRes.data];
97
+ const loc = targetLocale
98
+ ? locs.find((l) => l.attributes.locale === targetLocale)
99
+ : locs[0];
100
+ if (!loc) {
101
+ return `Locale "${targetLocale}" not found on version ${editable.attributes.versionString}.`;
102
+ }
103
+ const before = skipped.length;
104
+ await patchLocResilient(client, `/v1/appStoreVersionLocalizations/${loc.id}`, "appStoreVersionLocalizations", loc.id, versionLocFields, skipped);
105
+ const dropped = new Set(skipped.slice(before));
106
+ changes.push(...Object.keys(versionLocFields)
107
+ .filter((f) => !dropped.has(f))
108
+ .map((f) => `${f} (${loc.attributes.locale ?? targetLocale})`));
109
+ }
110
+ // 3. App-level localization fields (name, subtitle, privacyPolicyUrl) live on appInfoLocalizations.
111
+ if (args.name !== undefined || args.subtitle !== undefined || args.privacy_policy_url !== undefined) {
112
+ const appInfoRes = await client.get(`/v1/apps/${args.app_id}/appInfos`, { limit: "1" });
113
+ const appInfo = Array.isArray(appInfoRes.data) ? appInfoRes.data[0] : appInfoRes.data;
114
+ if (appInfo) {
115
+ const infoLocsRes = await client.get(`/v1/appInfos/${appInfo.id}/appInfoLocalizations`, { "fields[appInfoLocalizations]": "locale,name,subtitle", limit: "50" });
116
+ const infoLocs = Array.isArray(infoLocsRes.data) ? infoLocsRes.data : [infoLocsRes.data];
117
+ const iloc = targetLocale
118
+ ? infoLocs.find((l) => l.attributes.locale === targetLocale)
119
+ : infoLocs[0];
120
+ if (iloc) {
121
+ const attrs = {};
122
+ if (args.name !== undefined)
123
+ attrs.name = args.name;
124
+ if (args.subtitle !== undefined)
125
+ attrs.subtitle = args.subtitle;
126
+ if (args.privacy_policy_url !== undefined)
127
+ attrs.privacyPolicyUrl = args.privacy_policy_url;
128
+ await client.patch(`/v1/appInfoLocalizations/${iloc.id}`, {
129
+ data: { type: "appInfoLocalizations", id: iloc.id, attributes: attrs },
130
+ });
131
+ changes.push(...Object.keys(attrs).map((f) => `${f} (${iloc.attributes.locale ?? targetLocale})`));
132
+ }
133
+ }
134
+ }
135
+ const skipNote = skipped.length
136
+ ? `\n\nSkipped (not editable in this state): ${[...new Set(skipped)].join(", ")}. ` +
137
+ `whatsNew only applies to update versions, not a first 1.0 release.`
138
+ : "";
139
+ if (!changes.length) {
140
+ return ("No metadata fields were applied." +
141
+ (skipped.length ? skipNote : " No fields were provided."));
142
+ }
143
+ return (`Updated version ${editable.attributes.versionString} (${editable.attributes.appStoreState}):\n` +
144
+ changes.map((c) => `- ${c}`).join("\n") +
145
+ skipNote +
146
+ `\n\nRun release_preflight to validate, then submit_for_review when ready.`);
147
+ }
148
+ //# sourceMappingURL=update-version-metadata.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-version-metadata.js","sourceRoot":"","sources":["../../src/tools/update-version-metadata.ts"],"names":[],"mappings":";;AAuFA,sDA+HC;AAtND,4CAA2D;AAE3D,wCAAwC;AACxC,gDAAqE;AAErE;;;;;;GAMG;AACH,KAAK,UAAU,iBAAiB,CAC9B,MAAiB,EACjB,IAAY,EACZ,IAAY,EACZ,EAAU,EACV,UAAkC,EAClC,OAAiB;IAEjB,IAAI,KAAK,GAAG,EAAE,GAAG,UAAU,EAAE,CAAC;IAC9B,KAAK,IAAI,OAAO,GAAG,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,MAAM,CAAC,IAAI,CAA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,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;QACvC,QAAQ;QACR,2EAA2E,CAC5E,CAAC;AACJ,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { type ASCClient } from "../client.js";
2
+ import type { Tier } from "../types.js";
3
+ type Platform = "IOS" | "MAC_OS" | "TV_OS" | "VISION_OS";
4
+ /** Create a new editable App Store version (the "next version" you edit + submit). */
5
+ export declare function createVersion(client: ASCClient, args: {
6
+ app_id: string;
7
+ version_string: string;
8
+ platform?: Platform;
9
+ copyright?: string;
10
+ }, tier: Tier): Promise<string>;
11
+ /**
12
+ * Submit the app's editable version to App Review via the reviewSubmissions API.
13
+ * Three steps: open a submission, add the version as an item, mark it submitted.
14
+ */
15
+ export declare function submitForReview(client: ASCClient, args: {
16
+ app_id: string;
17
+ platform?: Platform;
18
+ confirm?: boolean;
19
+ }, tier: Tier): Promise<string>;
20
+ export {};
21
+ //# sourceMappingURL=version-control.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version-control.d.ts","sourceRoot":"","sources":["../../src/tools/version-control.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAUxC,KAAK,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,GAAG,WAAW,CAAC;AAsBzD,sFAAsF;AACtF,wBAAsB,aAAa,CACjC,MAAM,EAAE,SAAS,EACjB,IAAI,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,EACzF,IAAI,EAAE,IAAI,GACT,OAAO,CAAC,MAAM,CAAC,CAyBjB;AAED;;;GAGG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,SAAS,EACjB,IAAI,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,EAChE,IAAI,EAAE,IAAI,GACT,OAAO,CAAC,MAAM,CAAC,CA6GjB"}
@@ -0,0 +1,144 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createVersion = createVersion;
4
+ exports.submitForReview = submitForReview;
5
+ const client_js_1 = require("../client.js");
6
+ const gate_js_1 = require("../gate.js");
7
+ const editable_js_1 = require("../editable.js");
8
+ /**
9
+ * Apple does not let the API bundle an app's FIRST in-app purchases with the
10
+ * version (the API has no shared submission for them). Rather than submit the
11
+ * version alone and orphan the products, return the exact website steps.
12
+ */
13
+ function firstIapGuidance(appId, products) {
14
+ return ("Not submitted. Your app's first in-app purchases must be submitted TOGETHER with the app " +
15
+ "version, which Apple only supports in the App Store Connect website (not the API). " +
16
+ "Submitting the version alone would orphan the products, so this stopped instead.\n\n" +
17
+ `Finish in the website (one time):\n` +
18
+ `1. Open https://appstoreconnect.apple.com/apps/${appId}/appstore\n` +
19
+ `2. Open the editable version (1.0).\n` +
20
+ `3. In the "In-App Purchases and Subscriptions" section, select: ${products.join(", ")}.\n` +
21
+ `4. Click "Add for Review", then "Submit for Review" - version + products go together.\n\n` +
22
+ "After this first release is live, future IAPs can be submitted via the API.");
23
+ }
24
+ /** Create a new editable App Store version (the "next version" you edit + submit). */
25
+ async function createVersion(client, args, tier) {
26
+ const gate = (0, gate_js_1.requirePro)(tier, "Creating a new version");
27
+ if (gate)
28
+ return gate;
29
+ const attributes = {
30
+ platform: args.platform ?? "IOS",
31
+ versionString: args.version_string,
32
+ };
33
+ if (args.copyright)
34
+ attributes.copyright = args.copyright;
35
+ const res = await client.post("/v1/appStoreVersions", {
36
+ data: {
37
+ type: "appStoreVersions",
38
+ attributes,
39
+ relationships: {
40
+ app: { data: { type: "apps", id: args.app_id } },
41
+ },
42
+ },
43
+ });
44
+ const created = res && !Array.isArray(res.data) ? res.data : null;
45
+ return (`Created version ${args.version_string} (${attributes.platform}).` +
46
+ (created ? ` Version ID: ${created.id}` : "") +
47
+ `\n\nEdit it with update_version_metadata, attach a build, then submit_for_review.`);
48
+ }
49
+ /**
50
+ * Submit the app's editable version to App Review via the reviewSubmissions API.
51
+ * Three steps: open a submission, add the version as an item, mark it submitted.
52
+ */
53
+ async function submitForReview(client, args, tier) {
54
+ const gate = (0, gate_js_1.requirePro)(tier, "Submitting for review");
55
+ if (gate)
56
+ return gate;
57
+ if (!args.confirm) {
58
+ return ("This submits your app to Apple App Review (a real, outward-facing action).\n" +
59
+ "Re-run with confirm: true to proceed.");
60
+ }
61
+ const platform = args.platform ?? "IOS";
62
+ // Find the editable version to submit.
63
+ const versionsRes = await client.get(`/v1/apps/${args.app_id}/appStoreVersions`, { "fields[appStoreVersions]": "versionString,appStoreState,platform", limit: "5" });
64
+ const versions = Array.isArray(versionsRes.data) ? versionsRes.data : [versionsRes.data];
65
+ const target = versions.find((v) => editable_js_1.EDITABLE_VERSION_STATES.has(v.attributes.appStoreState));
66
+ if (!target) {
67
+ return "No editable version to submit. Create one with create_version and attach a build first.";
68
+ }
69
+ // 0. Submit READY_TO_SUBMIT in-app purchases / subscriptions FIRST, before we
70
+ // open the version review. These are NOT reviewSubmission items: IAPs use
71
+ // /v1/inAppPurchaseSubmissions, subscriptions use /v1/subscriptionSubmissions.
72
+ // Doing them first lets us fail safely: an app's FIRST in-app purchases must be
73
+ // bundled with the version in the ASC website (Apple does not support that via
74
+ // the API). If we hit that, we abort WITHOUT submitting the version alone, so
75
+ // the products are never orphaned.
76
+ const productItems = [];
77
+ const FIRST_IAP_BLOCK = /MUST_BE_SUBMITTED_ON_VERSION/;
78
+ const iapRes = await client.get(`/v1/apps/${args.app_id}/inAppPurchasesV2`, { "fields[inAppPurchases]": "productId,state", limit: "100" });
79
+ const grpRes = await client.get(`/v1/apps/${args.app_id}/subscriptionGroups`, { include: "subscriptions", limit: "25" });
80
+ const subItems = (grpRes.included ?? [])
81
+ .filter((x) => x.type === "subscriptions");
82
+ const pendingIaps = (Array.isArray(iapRes.data) ? iapRes.data : [iapRes.data])
83
+ .filter(Boolean)
84
+ .filter((i) => i.attributes.state === "READY_TO_SUBMIT");
85
+ const pendingSubs = subItems.filter((s) => s.attributes.state === "READY_TO_SUBMIT");
86
+ const submitProduct = async (path, relKey, relType, id, label) => {
87
+ try {
88
+ await client.post(path, {
89
+ data: { type: path.split("/")[2], relationships: { [relKey]: { data: { type: relType, id } } } },
90
+ });
91
+ productItems.push(label);
92
+ return null;
93
+ }
94
+ catch (err) {
95
+ if (err instanceof client_js_1.ASCAPIError && FIRST_IAP_BLOCK.test(err.body))
96
+ return "first-iap-block";
97
+ return null; // already submitted / not eligible - skip
98
+ }
99
+ };
100
+ for (const iap of pendingIaps) {
101
+ const r = await submitProduct("/v1/inAppPurchaseSubmissions", "inAppPurchaseV2", "inAppPurchases", iap.id, iap.attributes.productId);
102
+ if (r === "first-iap-block")
103
+ return firstIapGuidance(args.app_id, [...pendingIaps, ...pendingSubs].map((p) => p.attributes.productId));
104
+ }
105
+ for (const s of pendingSubs) {
106
+ const r = await submitProduct("/v1/subscriptionSubmissions", "subscription", "subscriptions", s.id, s.attributes.productId);
107
+ if (r === "first-iap-block")
108
+ return firstIapGuidance(args.app_id, [...pendingIaps, ...pendingSubs].map((p) => p.attributes.productId));
109
+ }
110
+ // 1. Open a review submission for the app.
111
+ const subRes = await client.post("/v1/reviewSubmissions", {
112
+ data: {
113
+ type: "reviewSubmissions",
114
+ attributes: { platform },
115
+ relationships: { app: { data: { type: "apps", id: args.app_id } } },
116
+ },
117
+ });
118
+ const submission = subRes && !Array.isArray(subRes.data) ? subRes.data : null;
119
+ if (!submission)
120
+ return "Failed to open a review submission.";
121
+ // 2. Add the version as a submission item.
122
+ await client.post("/v1/reviewSubmissionItems", {
123
+ data: {
124
+ type: "reviewSubmissionItems",
125
+ relationships: {
126
+ reviewSubmission: { data: { type: "reviewSubmissions", id: submission.id } },
127
+ appStoreVersion: { data: { type: "appStoreVersions", id: target.id } },
128
+ },
129
+ },
130
+ });
131
+ // 3. Mark it submitted.
132
+ await client.patch(`/v1/reviewSubmissions/${submission.id}`, {
133
+ data: {
134
+ type: "reviewSubmissions",
135
+ id: submission.id,
136
+ attributes: { submitted: true },
137
+ },
138
+ });
139
+ return (`Submitted version ${target.attributes.versionString} to App Review.\n` +
140
+ `Submission ID: ${submission.id}\n` +
141
+ (productItems.length ? `Included ${productItems.length} product(s): ${productItems.join(", ")}\n` : "") +
142
+ "Typical review time: 24-48 hours. Track with review_status.");
143
+ }
144
+ //# sourceMappingURL=version-control.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version-control.js","sourceRoot":"","sources":["../../src/tools/version-control.ts"],"names":[],"mappings":";;AAkCA,sCA6BC;AAMD,0CAiHC;AAtLD,4CAA2D;AAE3D,wCAAwC;AACxC,gDAAqE;AAWrE;;;;GAIG;AACH,SAAS,gBAAgB,CAAC,KAAa,EAAE,QAAkB;IACzD,OAAO,CACL,2FAA2F;QAC3F,qFAAqF;QACrF,sFAAsF;QACtF,qCAAqC;QACrC,kDAAkD,KAAK,aAAa;QACpE,uCAAuC;QACvC,mEAAmE,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK;QAC3F,2FAA2F;QAC3F,6EAA6E,CAC9E,CAAC;AACJ,CAAC;AAED,sFAAsF;AAC/E,KAAK,UAAU,aAAa,CACjC,MAAiB,EACjB,IAAyF,EACzF,IAAU;IAEV,MAAM,IAAI,GAAG,IAAA,oBAAU,EAAC,IAAI,EAAE,wBAAwB,CAAC,CAAC;IACxD,IAAI,IAAI;QAAE,OAAO,IAAI,CAAC;IAEtB,MAAM,UAAU,GAA2B;QACzC,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,KAAK;QAChC,aAAa,EAAE,IAAI,CAAC,cAAc;KACnC,CAAC;IACF,IAAI,IAAI,CAAC,SAAS;QA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J,IAAI,EAAE,uBAAuB;YAC7B,aAAa,EAAE;gBACb,gBAAgB,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,mBAAmB,EAAE,EAAE,EAAE,UAAU,CAAC,EAAE,EAAE,EAAE;gBAC5E,eAAe,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,kBAAkB,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE;aACvE;SACF;KACF,CAAC,CAAC;IAEH,wBAAwB;IACxB,MAAM,MAAM,CAAC,KAAK,CAAC,yBAAyB,UAAU,CAAC,EAAE,EAAE,EAAE;QAC3D,IAAI,EAAE;YACJ,IAAI,EAAE,mBAAmB;YACzB,EAAE,EAAE,UAAU,CAAC,EAAE;YACjB,UAAU,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE;SAChC;KACF,CAAC,CAAC;IAEH,OAAO,CACL,qBAAqB,MAAM,CAAC,UAAU,CAAC,aAAa,mBAAmB;QACvE,kBAAkB,UAAU,CAAC,EAAE,IAAI;QACnC,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,YAAY,YAAY,CAAC,MAAM,gBAAgB,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;QACvG,6DAA6D,CAC9D,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,15 @@
1
1
  {
2
2
  "name": "@pofky/asc-mcp",
3
- "version": "1.3.0",
4
- "description": "The App Store Connect intelligence layer for your coding agent. 13 tools (including Sampling-powered review triage and locale-aware response drafts), 3 slash-command Prompts, and a bundled Claude Skill. Works with Claude Code, Claude Desktop, Cursor, Windsurf, or any MCP-compatible client. Free tier included.",
3
+ "version": "1.8.1",
4
+ "description": "Full control of your App Store Connect from your coding agent. 40 tools incl. asc_setup_check (self-diagnosing setup) and asc_guide (the in-agent playbook that flags every manual website step), read intelligence (reviews, sales, preflight), and Pro write/control (metadata, screenshots, builds, IAP/subscriptions, TestFlight, submit + release, local build/upload). 6 slash-command Prompts and a bundled Claude Skill. Works with Claude Code, Claude Desktop, Cursor, Windsurf, or any MCP client. Free read tier included.",
5
+ "homepage": "https://asc-mcp.pages.dev",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/pofky/asc-mcp.git"
9
+ },
10
+ "bugs": {
11
+ "url": "https://github.com/pofky/asc-mcp/issues"
12
+ },
5
13
  "main": "dist/index.js",
6
14
  "bin": {
7
15
  "asc-mcp": "dist/index.js",
@@ -12,6 +20,7 @@
12
20
  "dev": "tsx src/index.ts",
13
21
  "start": "node dist/index.js",
14
22
  "test": "vitest run",
23
+ "docs": "tsc && node scripts/gen-docs.mjs",
15
24
  "lint": "tsc --noEmit"
16
25
  },
17
26
  "keywords": [
@@ -59,6 +68,8 @@
59
68
  "dist/",
60
69
  "skills/",
61
70
  "README.md",
71
+ "USER_GUIDE.md",
72
+ "LIMITATIONS.md",
62
73
  "LICENSE"
63
74
  ]
64
75
  }