@pofky/asc-mcp 1.2.0 → 1.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.
Files changed (119) hide show
  1. package/LIMITATIONS.md +41 -0
  2. package/README.md +91 -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/elicitation.d.ts +39 -0
  17. package/dist/elicitation.d.ts.map +1 -0
  18. package/dist/elicitation.js +63 -0
  19. package/dist/elicitation.js.map +1 -0
  20. package/dist/gate.d.ts +8 -0
  21. package/dist/gate.d.ts.map +1 -0
  22. package/dist/gate.js +17 -0
  23. package/dist/gate.js.map +1 -0
  24. package/dist/index.js +308 -16
  25. package/dist/index.js.map +1 -1
  26. package/dist/license.js +1 -1
  27. package/dist/prompts.d.ts.map +1 -1
  28. package/dist/prompts.js +101 -0
  29. package/dist/prompts.js.map +1 -1
  30. package/dist/sampling.d.ts +53 -0
  31. package/dist/sampling.d.ts.map +1 -0
  32. package/dist/sampling.js +109 -0
  33. package/dist/sampling.js.map +1 -0
  34. package/dist/setup.d.ts +19 -0
  35. package/dist/setup.d.ts.map +1 -0
  36. package/dist/setup.js +153 -0
  37. package/dist/setup.js.map +1 -0
  38. package/dist/tools/age-rating.d.ts +14 -0
  39. package/dist/tools/age-rating.d.ts.map +1 -0
  40. package/dist/tools/age-rating.js +125 -0
  41. package/dist/tools/age-rating.js.map +1 -0
  42. package/dist/tools/app-details.js +2 -2
  43. package/dist/tools/availability.d.ts +20 -0
  44. package/dist/tools/availability.d.ts.map +1 -0
  45. package/dist/tools/availability.js +96 -0
  46. package/dist/tools/availability.js.map +1 -0
  47. package/dist/tools/builds.d.ts +26 -0
  48. package/dist/tools/builds.d.ts.map +1 -0
  49. package/dist/tools/builds.js +108 -0
  50. package/dist/tools/builds.js.map +1 -0
  51. package/dist/tools/draft-review-response.d.ts +37 -0
  52. package/dist/tools/draft-review-response.d.ts.map +1 -0
  53. package/dist/tools/draft-review-response.js +236 -0
  54. package/dist/tools/draft-review-response.js.map +1 -0
  55. package/dist/tools/eu-trader.d.ts +12 -0
  56. package/dist/tools/eu-trader.d.ts.map +1 -0
  57. package/dist/tools/eu-trader.js +25 -0
  58. package/dist/tools/eu-trader.js.map +1 -0
  59. package/dist/tools/guide.d.ts +38 -0
  60. package/dist/tools/guide.d.ts.map +1 -0
  61. package/dist/tools/guide.js +273 -0
  62. package/dist/tools/guide.js.map +1 -0
  63. package/dist/tools/iap.d.ts +43 -0
  64. package/dist/tools/iap.d.ts.map +1 -0
  65. package/dist/tools/iap.js +360 -0
  66. package/dist/tools/iap.js.map +1 -0
  67. package/dist/tools/list-apps.js +1 -1
  68. package/dist/tools/list-reviews.js +2 -2
  69. package/dist/tools/local-build.d.ts +26 -0
  70. package/dist/tools/local-build.d.ts.map +1 -0
  71. package/dist/tools/local-build.js +100 -0
  72. package/dist/tools/local-build.js.map +1 -0
  73. package/dist/tools/privacy.d.ts +15 -0
  74. package/dist/tools/privacy.d.ts.map +1 -0
  75. package/dist/tools/privacy.js +32 -0
  76. package/dist/tools/privacy.js.map +1 -0
  77. package/dist/tools/release-control.d.ts +22 -0
  78. package/dist/tools/release-control.d.ts.map +1 -0
  79. package/dist/tools/release-control.js +85 -0
  80. package/dist/tools/release-control.js.map +1 -0
  81. package/dist/tools/release-preflight.d.ts.map +1 -1
  82. package/dist/tools/release-preflight.js +139 -0
  83. package/dist/tools/release-preflight.js.map +1 -1
  84. package/dist/tools/review-screenshot.d.ts +14 -0
  85. package/dist/tools/review-screenshot.d.ts.map +1 -0
  86. package/dist/tools/review-screenshot.js +72 -0
  87. package/dist/tools/review-screenshot.js.map +1 -0
  88. package/dist/tools/review-status.js +2 -2
  89. package/dist/tools/sales-report.js +3 -3
  90. package/dist/tools/sales-report.js.map +1 -1
  91. package/dist/tools/screenshots.d.ts +15 -0
  92. package/dist/tools/screenshots.d.ts.map +1 -0
  93. package/dist/tools/screenshots.js +106 -0
  94. package/dist/tools/screenshots.js.map +1 -0
  95. package/dist/tools/signing.d.ts +21 -0
  96. package/dist/tools/signing.d.ts.map +1 -0
  97. package/dist/tools/signing.js +101 -0
  98. package/dist/tools/signing.js.map +1 -0
  99. package/dist/tools/submission.d.ts +47 -0
  100. package/dist/tools/submission.d.ts.map +1 -0
  101. package/dist/tools/submission.js +199 -0
  102. package/dist/tools/submission.js.map +1 -0
  103. package/dist/tools/testflight.d.ts +20 -0
  104. package/dist/tools/testflight.d.ts.map +1 -0
  105. package/dist/tools/testflight.js +75 -0
  106. package/dist/tools/testflight.js.map +1 -0
  107. package/dist/tools/triage-reviews.d.ts +35 -0
  108. package/dist/tools/triage-reviews.d.ts.map +1 -0
  109. package/dist/tools/triage-reviews.js +194 -0
  110. package/dist/tools/triage-reviews.js.map +1 -0
  111. package/dist/tools/update-version-metadata.d.ts +17 -0
  112. package/dist/tools/update-version-metadata.d.ts.map +1 -0
  113. package/dist/tools/update-version-metadata.js +148 -0
  114. package/dist/tools/update-version-metadata.js.map +1 -0
  115. package/dist/tools/version-control.d.ts +21 -0
  116. package/dist/tools/version-control.d.ts.map +1 -0
  117. package/dist/tools/version-control.js +144 -0
  118. package/dist/tools/version-control.js.map +1 -0
  119. package/package.json +5 -2
@@ -0,0 +1,273 @@
1
+ "use strict";
2
+ /**
3
+ * asc_guide - the orientation layer.
4
+ *
5
+ * The MCP has 30+ tools and a control plane with real, non-obvious limits
6
+ * (atomic PATCH, V2 age rating, per-territory pricing, first-IAP-on-version,
7
+ * ASC-UI-only privacy/trader). An agent that just sees a flat tool list will
8
+ * stumble into those. This tool is the map: it returns the exact end-to-end
9
+ * playbook for a given goal, with the manual ASC-website / Xcode interruptions
10
+ * called out inline at the step where they bite.
11
+ *
12
+ * Free tier: orientation is never gated. Users should be able to read the flows
13
+ * (and see what Pro unlocks) before paying.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.LIMITATIONS = exports.FLOWS = void 0;
17
+ exports.ascGuide = ascGuide;
18
+ exports.renderFlow = renderFlow;
19
+ exports.renderOverview = renderOverview;
20
+ exports.renderLimitations = renderLimitations;
21
+ const FLOWS = {
22
+ setup: {
23
+ title: "One-time setup",
24
+ when: "Before anything else, once per machine.",
25
+ steps: [
26
+ "Create an API key: App Store Connect > Users and Access > Integrations > App Store Connect API > generate a key with the App Manager role. Download the .p8 (one time only).",
27
+ "Drop the .p8 into ~/.appstoreconnect/private_keys/ (Apple's standard path). The 10-char Key ID is read from the filename, so that one file is enough.",
28
+ "Run `asc-mcp init` in a terminal. It auto-detects the key, asks for your Issuer ID (the UUID at the top of the Integrations page) and an optional Pro license key, and prints a paste-ready MCP config block.",
29
+ "Paste the block into your client config (~/.claude/settings.json, Claude Desktop config, Cursor, etc.) and restart the client.",
30
+ "Verify with `list_apps`. If it returns your apps, you are connected.",
31
+ ],
32
+ manual: [
33
+ "MANUAL: generating the API key and downloading the .p8 is a one-time App Store Connect website action. The .p8 cannot be re-downloaded; if lost, revoke and make a new one.",
34
+ "Free tier is read/intelligence only. Set ASC_LICENSE_KEY to unlock all write/control tools ($9/mo).",
35
+ ],
36
+ },
37
+ "first-app": {
38
+ title: "Ship an app's FIRST release (1.0)",
39
+ when: "Brand-new app, never been on the store. The hardest flow because of first-time-only Apple constraints.",
40
+ steps: [
41
+ "MANUAL: the app RECORD must already exist. `POST /v1/apps` is forbidden for API keys, so create the app (name, bundle ID, SKU, primary language) once in App Store Connect > Apps > +. App Groups are portal-only too.",
42
+ "`list_apps` to get the numeric app_id.",
43
+ "Build + upload a binary so a build exists to attach (see topic:binary), or upload via Xcode/Transporter. Then `wait_for_build` until VALID.",
44
+ "`set_app_metadata` - primary/secondary category, copyright, content rights, export compliance (most apps: uses_non_exempt_encryption=false).",
45
+ "`set_app_price` - price_usd:0 for free, or a tier. Required before submit.",
46
+ "`update_version_metadata` - description, keywords, what's-new (note: what's-new is NOT editable on a first 1.0 with no prior release; the tool drops it and reports it skipped), promo text, marketing/support/privacy-policy URLs, name, subtitle. Char limits validated.",
47
+ "`set_app_availability` - defaults to all ~175 territories; pass a subset to restrict.",
48
+ "`set_age_rating` - pass only the declarations that apply; the tool fetches, merges the full V2 set, and submits (it is NOT a partial PATCH).",
49
+ "`set_review_contact` - name, phone, email, demo account if the app needs login. Required before submit.",
50
+ "`attach_build` - newest VALID build by default.",
51
+ "`upload_screenshots` per display type (at minimum APP_IPHONE_67; APP_IPHONE_65 + APP_IPAD recommended). See topic:screenshots.",
52
+ "MANUAL: App Privacy nutrition label. Not in the API. Run `set_privacy_nutrition` for the exact checklist + deep link, then set it in the ASC website.",
53
+ "MANUAL: EU DSA trader status. Not in the API. Run `set_eu_trader_status` for steps + deep link; it's a legal decision, set it in the website.",
54
+ "If the app has in-app purchases or subscriptions, create them now (topic:iap / topic:subscriptions). The FIRST ones must be submitted WITH the version (next step).",
55
+ "`release_preflight` - fix every FAIL it reports. It tailors a 'manual steps to finish' list to this app's state.",
56
+ "MANUAL (if first IAPs exist): the app's very first in-app purchases CANNOT be bundled with the version via the API. In the ASC website, open the version, Add for Review, tick the products, and submit them together. `submit_for_review` detects this and ABORTS rather than orphaning the version. After the first release is live, later IAPs submit via the API fine.",
57
+ "`submit_for_review` with confirm:true (only if there are no first-IAPs blocking; otherwise submit in the website per the step above).",
58
+ "After approval: `release_version` (confirm:true) to go live now, or `manage_phased_release` start for a 7-day rollout.",
59
+ ],
60
+ manual: [
61
+ "App record + App Group creation - ASC website / Developer portal only.",
62
+ "App Privacy nutrition label - ASC website only (`set_privacy_nutrition` gives the checklist).",
63
+ "EU trader status - ASC website only, legal decision (`set_eu_trader_status` gives steps).",
64
+ "First in-app purchases - must be submitted with the version in the ASC website; API cannot bundle them.",
65
+ "Building the binary needs Xcode on a Mac (the API can't compile).",
66
+ ],
67
+ },
68
+ update: {
69
+ title: "Ship an UPDATE to an existing app",
70
+ when: "App is already live; you're releasing a new version. Much simpler than 1.0.",
71
+ steps: [
72
+ "`app_details` to read current version + state.",
73
+ "`create_version` with the next version number (e.g. 2.5.0) if there's no editable version yet.",
74
+ "`update_version_metadata` - what's-new is editable now; update description/keywords/promo as needed.",
75
+ "Upload the new build (`upload_binary` confirm:true, or Xcode/Transporter; see topic:binary), `wait_for_build` to VALID, then `attach_build`.",
76
+ "`upload_screenshots` only if they changed.",
77
+ "Later IAPs/subscriptions (not the first ever) can be created and will submit via the API.",
78
+ "`release_preflight` - fix FAILs.",
79
+ "`submit_for_review` confirm:true.",
80
+ "After approval: `release_version` confirm:true, or `manage_phased_release` start.",
81
+ "Use `metadata_diff` any time to see exactly what changed between live and pending across locales.",
82
+ ],
83
+ manual: [
84
+ "Still no API for nutrition label or trader status, but these persist from the first release; only revisit if your data practices changed.",
85
+ "Building the binary still needs Xcode.",
86
+ ],
87
+ },
88
+ screenshots: {
89
+ title: "Upload screenshots",
90
+ when: "Adding or replacing App Store screenshots.",
91
+ steps: [
92
+ "Prepare PNG/JPEG files at the exact pixel size for the display type.",
93
+ "`upload_screenshots` with display_type, an ordered files array, and locale. It runs Apple's 3-step reserve/PUT-chunks/commit flow for you.",
94
+ "Common display types: APP_IPHONE_67 (6.7in, required), APP_IPHONE_65 (6.5in), APP_IPAD_PRO_129 (12.9in iPad).",
95
+ ],
96
+ manual: [
97
+ "Capturing the screenshots from a simulator is not yet automated (capture_screenshots is on the roadmap). Produce the PNGs yourself, then upload via the tool.",
98
+ "Apple requires correct exact dimensions per display type or the commit fails.",
99
+ ],
100
+ },
101
+ iap: {
102
+ title: "Create a one-time in-app purchase (non-consumable / consumable)",
103
+ when: "Selling a lifetime unlock, consumable credits, etc.",
104
+ steps: [
105
+ "`create_iap` - product_id, reference name, display name (max 30), description (max 45), type, price_usd. It's idempotent: USA base price, auto-equalized across all territories, availability set. IAP state recomputes immediately on availability (unlike subscriptions, which need a nudge), so once price + availability + a review screenshot are set the product is READY_TO_SUBMIT.",
106
+ "`set_iap_review_screenshot` - IAPs need an App Review screenshot to leave MISSING_METADATA. Upload one showing the paywall.",
107
+ "For the FIRST IAP ever on the app: it must be submitted WITH the app version in the ASC website (see topic:first-app). After the first release is live, later IAPs submit via `submit_for_review`.",
108
+ ],
109
+ manual: [
110
+ "First non-consumable / first IAP on a brand-new app: submit it together with the version in the ASC website. API can't bundle the first one.",
111
+ "IAP localization description is capped at 45 chars.",
112
+ ],
113
+ },
114
+ subscriptions: {
115
+ title: "Create an auto-renewable subscription",
116
+ when: "Recurring billing (monthly/yearly plans, free trials).",
117
+ steps: [
118
+ "`create_subscription` - group ref + display name, product_id, names, description (max 45), period, price_usd, optional free_trial, review_note. It is idempotent and handles the gnarly order Apple requires: availability FIRST, then USA base price, then equalize across ~175 territories, then per-territory free-trial intro offers, then a final no-op PATCH to force the state to recompute to READY_TO_SUBMIT.",
119
+ "`set_iap_review_screenshot` - subscriptions also need a review screenshot of the paywall.",
120
+ "First subscriptions on a brand-new app submit WITH the version in the website; later ones via the API.",
121
+ ],
122
+ manual: [
123
+ "First subscriptions on a new app: submit with the version in the ASC website.",
124
+ "Subscription state only recomputes on a subscription-level edit; create_subscription nudges it for you, but if you edit sub-resources by hand, expect a lag until a subscription PATCH.",
125
+ ],
126
+ },
127
+ reviews: {
128
+ title: "Triage and respond to customer reviews",
129
+ when: "Managing your App Store reputation.",
130
+ steps: [
131
+ "`list_reviews` - filter by rating, sort, limit.",
132
+ "`triage_reviews` - clusters recent reviews into 3-5 themes with counts and action buckets, using your own client's model via MCP Sampling (no extra cost from this server).",
133
+ "`draft_review_response` - drafts a public reply in the review's locale. It NEVER auto-posts.",
134
+ "MANUAL: post the approved reply text in App Store Connect yourself (the API does not expose posting public responses).",
135
+ ],
136
+ manual: [
137
+ "Posting the public response is manual in the ASC website; the tool only drafts it.",
138
+ ],
139
+ },
140
+ testflight: {
141
+ title: "Distribute a TestFlight beta",
142
+ when: "Getting a build to testers before App Review.",
143
+ steps: [
144
+ "Upload a build (topic:binary), `wait_for_build` to VALID.",
145
+ "`list_beta_groups` to find or confirm a group.",
146
+ "`assign_build_to_group` - newest VALID build by default.",
147
+ "`invite_beta_tester` - email + name; Apple sends the TestFlight invite.",
148
+ ],
149
+ manual: [
150
+ "Beta App Review (for external groups' first build) and the test-information form may need a one-time touch in the ASC website.",
151
+ ],
152
+ },
153
+ binary: {
154
+ title: "Build, sign, and upload the binary",
155
+ when: "You need a build on App Store Connect and want to do it from the agent.",
156
+ steps: [
157
+ "MANUAL: an Apple Distribution certificate must already exist in your login keychain. Certificate creation and cloud signing are not available to least-privilege API keys.",
158
+ "`setup_app_store_signing` - downloads the app's IOS_APP_STORE provisioning profiles (app + extensions), installs them, and writes a manual-signing ExportOptions.plist. This sidesteps the cloud-signing permission most API keys lack.",
159
+ "`build_and_archive` - xcodebuild archive + export using that ExportOptions.plist. Requires Xcode on this Mac. Give it the .xcodeproj/.xcworkspace, scheme, and the generated plist.",
160
+ "`upload_binary` confirm:true - uploads the .ipa via altool with your API key.",
161
+ "`wait_for_build` until the build is VALID, then `attach_build`.",
162
+ ],
163
+ manual: [
164
+ "Building requires the local Xcode toolchain; the API cannot compile.",
165
+ "Distribution certificate must pre-exist in the keychain; API keys can't create certs or use cloud signing.",
166
+ ],
167
+ },
168
+ };
169
+ exports.FLOWS = FLOWS;
170
+ const LIMITATIONS = [
171
+ {
172
+ item: "Create an app record",
173
+ why: "POST /v1/apps is forbidden for API keys.",
174
+ doInstead: "ASC website > Apps > + (one time).",
175
+ },
176
+ {
177
+ item: "Create an App Group",
178
+ why: "Portal-only; no API.",
179
+ doInstead: "Apple Developer portal > Identifiers.",
180
+ },
181
+ {
182
+ item: "App Privacy nutrition label",
183
+ why: "appDataUsages is not in the public API.",
184
+ doInstead: "ASC website. Run `set_privacy_nutrition` for the exact checklist + deep link.",
185
+ },
186
+ {
187
+ item: "EU DSA trader status",
188
+ why: "No public API attribute/resource.",
189
+ doInstead: "ASC website. Run `set_eu_trader_status` for steps + deep link. Legal decision.",
190
+ },
191
+ {
192
+ item: "Submit an app's FIRST in-app purchases / subscriptions",
193
+ why: "First products return FIRST_NON_CONSUMABLE_MUST_BE_SUBMITTED_ON_VERSION; only the website bundles them with the version.",
194
+ doInstead: "ASC website: open the version, Add for Review, tick the products, submit together. `submit_for_review` aborts to avoid orphaning. Later products submit via API.",
195
+ },
196
+ {
197
+ item: "Create a signing certificate / use cloud signing",
198
+ why: "Least-privilege API keys lack certificate rights; cloud signing fails with a permission error.",
199
+ doInstead: "Have an Apple Distribution cert in the keychain, then `setup_app_store_signing` for manual-signing profiles + ExportOptions.plist.",
200
+ },
201
+ {
202
+ item: "Compile the binary",
203
+ why: "Building an .ipa needs the Xcode toolchain.",
204
+ doInstead: "`build_and_archive` + `upload_binary` run locally on a Mac with Xcode.",
205
+ },
206
+ {
207
+ item: "Post a public response to a review",
208
+ why: "API exposes reading reviews, not posting public replies.",
209
+ doInstead: "`draft_review_response` writes the reply; paste it in the ASC website.",
210
+ },
211
+ {
212
+ item: "Capture simulator screenshots",
213
+ why: "Not yet implemented (roadmap).",
214
+ doInstead: "Produce PNGs yourself, then `upload_screenshots`.",
215
+ },
216
+ ];
217
+ exports.LIMITATIONS = LIMITATIONS;
218
+ function renderFlow(f) {
219
+ // MANUAL lines are interleaved callouts, not numbered steps, so they must not
220
+ // consume a step number (otherwise the visible numbering skips).
221
+ let n = 0;
222
+ const steps = f.steps
223
+ .map((s) => (s.startsWith("MANUAL:") ? ` ${s}` : `${++n}. ${s}`))
224
+ .join("\n");
225
+ const manual = f.manual.map((m) => `- ${m}`).join("\n");
226
+ return (`## ${f.title}\n\n` +
227
+ `When: ${f.when}\n\n` +
228
+ `Steps:\n${steps}\n\n` +
229
+ `Manual interruptions you must do yourself:\n${manual}\n`);
230
+ }
231
+ function renderOverview() {
232
+ const lines = [
233
+ "# App Store Connect MCP - Guide",
234
+ "",
235
+ "Call `asc_guide` with a `topic` for the exact playbook. Manual steps (things no API can do) are flagged inline so you never get blocked mid-flow.",
236
+ "",
237
+ "Topics:",
238
+ "- setup - one-time machine setup (.p8, init, config)",
239
+ "- first-app - ship a brand-new app's 1.0 (the hardest flow)",
240
+ "- update - ship an update to a live app",
241
+ "- screenshots - upload App Store screenshots",
242
+ "- iap - create a one-time in-app purchase",
243
+ "- subscriptions - create an auto-renewable subscription",
244
+ "- reviews - triage and reply to customer reviews",
245
+ "- testflight - distribute a beta",
246
+ "- binary - build, sign, upload the binary (needs Xcode)",
247
+ "- limitations - everything the API can't do + the manual workaround",
248
+ "",
249
+ "Golden rule: when a step says MANUAL, stop and do it in the App Store Connect website (or Xcode). The agent should hand the user the deep link and exact steps, not pretend the API can do it.",
250
+ "",
251
+ "Outward-facing tools (submit_for_review, release_version, upload_binary) require confirm:true. Always confirm with the human first.",
252
+ ];
253
+ return lines.join("\n");
254
+ }
255
+ function renderLimitations() {
256
+ const rows = LIMITATIONS.map((l) => `### ${l.item}\nWhy: ${l.why}\nDo instead: ${l.doInstead}`).join("\n\n");
257
+ return ("# Limitations and manual interruptions\n\n" +
258
+ "Everything here is impossible via the App Store Connect API and must be done by hand. " +
259
+ "The MCP either returns the exact steps (privacy, trader) or detects and aborts (first IAPs) so nothing is left half-done.\n\n" +
260
+ rows);
261
+ }
262
+ async function ascGuide(args) {
263
+ const topic = args.topic ?? "overview";
264
+ if (topic === "overview")
265
+ return renderOverview();
266
+ if (topic === "limitations")
267
+ return renderLimitations();
268
+ const flow = FLOWS[topic];
269
+ if (!flow)
270
+ return renderOverview();
271
+ return renderFlow(flow);
272
+ }
273
+ //# sourceMappingURL=guide.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guide.js","sourceRoot":"","sources":["../../src/tools/guide.ts"],"names":[],"mappings":";A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C,IAAI,CAAC,CAAC;AAC1B,CAAC"}
@@ -0,0 +1,43 @@
1
+ import { type ASCClient } from "../client.js";
2
+ import type { Tier } from "../types.js";
3
+ type SubPeriod = "ONE_WEEK" | "ONE_MONTH" | "TWO_MONTHS" | "THREE_MONTHS" | "SIX_MONTHS" | "ONE_YEAR";
4
+ export interface CreateSubscriptionArgs {
5
+ app_id: string;
6
+ group_reference_name: string;
7
+ group_display_name: string;
8
+ product_id: string;
9
+ reference_name: string;
10
+ display_name: string;
11
+ description: string;
12
+ period: SubPeriod;
13
+ price_usd: number;
14
+ free_trial?: "THREE_DAYS" | "ONE_WEEK" | "TWO_WEEKS" | "ONE_MONTH" | "TWO_MONTHS" | "THREE_MONTHS" | "SIX_MONTHS" | "ONE_YEAR";
15
+ locale?: string;
16
+ group_level?: number;
17
+ family_sharable?: boolean;
18
+ /** Notes for App Review (how to reach the paywall, test instructions). */
19
+ review_note?: string;
20
+ }
21
+ /**
22
+ * Create (idempotently) a renewable subscription inside a group, with USA price
23
+ * and an optional free trial. Safe to re-run: existing group/subscription/
24
+ * localization/price are reused rather than duplicated.
25
+ */
26
+ export declare function createSubscription(client: ASCClient, args: CreateSubscriptionArgs, tier: Tier): Promise<string>;
27
+ export interface CreateIAPArgs {
28
+ app_id: string;
29
+ product_id: string;
30
+ reference_name: string;
31
+ display_name: string;
32
+ description: string;
33
+ type: "NON_CONSUMABLE" | "CONSUMABLE";
34
+ price_usd: number;
35
+ locale?: string;
36
+ family_sharable?: boolean;
37
+ /** Notes for App Review (how to reach the paywall, test instructions). */
38
+ review_note?: string;
39
+ }
40
+ /** Create (idempotently) a one-time in-app purchase with USA price. */
41
+ export declare function createIAP(client: ASCClient, args: CreateIAPArgs, tier: Tier): Promise<string>;
42
+ export {};
43
+ //# sourceMappingURL=iap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iap.d.ts","sourceRoot":"","sources":["../../src/tools/iap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAA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