@superwall/cli 2.0.0 → 2.1.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 (142) hide show
  1. package/README.md +3 -2
  2. package/dist/{apple-CkKlHBZ9.js → apple-BHbX0jbn.js} +13 -13
  3. package/dist/auth.d.ts +1 -1
  4. package/dist/auth.js +3 -3
  5. package/dist/{billing-XCZU_T46.js → billing-4zhIBFRQ.js} +3 -3
  6. package/dist/{bind-drne__Ys.js → bind-CHLHmxgA.js} +4 -4
  7. package/dist/{build-Gpdq5QXP.js → build-5PQeSnNN.js} +6 -6
  8. package/dist/{client-DP6Rc0t_.js → client-BIvOmWPC.js} +7 -3
  9. package/dist/{create-BBrtgUgS.js → create-BSNIFsnN.js} +6 -6
  10. package/dist/{create-Cwc3SRWJ.js → create-VK-pNfN7.js} +23 -23
  11. package/dist/create-oj3zXvHZ.js +19 -0
  12. package/dist/{doctor-C9ldpPFC.js → doctor-9JS96QkX.js} +6 -6
  13. package/dist/{drivers-DNrx4LWA.js → drivers-BamBJ10Y.js} +3 -3
  14. package/dist/entry.js +20 -21
  15. package/dist/{environment-DF1qKlny.js → environment-eV7LEnSN.js} +15 -2
  16. package/dist/{existing-78LWSsqS.js → existing-C8dSYHGk.js} +2 -2
  17. package/dist/{held-Cy8Wl4D1.js → held-BMisHn8F.js} +6 -6
  18. package/dist/held-DeJW2gUk.js +16 -0
  19. package/dist/{integrate-DcJhpXy8.js → integrate-VWtTNPCr.js} +22 -22
  20. package/dist/login-2JHCG6c1.js +16 -0
  21. package/dist/{login-D0lh3_JI.js → login-BimbukE5.js} +5 -5
  22. package/dist/{login-B2TsCE2H.js → login-BmwG14LC.js} +1 -1
  23. package/dist/{lookup-D-nmmAbw.js → lookup-k9EeOiZr.js} +2 -2
  24. package/dist/{migrate-Cfec564E.js → migrate-C86h6jeF.js} +22 -22
  25. package/dist/{notification-url-YDbq6FMA.js → notification-url-BVaTgWZ5.js} +2 -2
  26. package/dist/{open-Ba2vBl1_.js → open-0tDCQOXC.js} +10 -10
  27. package/dist/{org-D0g_q3mv.js → org-DUwdrKPV.js} +2 -2
  28. package/dist/{paths-DxSLdpOI.js → paths-BCbjCLP5.js} +1 -1
  29. package/dist/{playbook-DIeb7hne.js → playbook-oov9yV0q.js} +10 -10
  30. package/dist/{promote-COD4fYdz.js → promote-DPGPamkE.js} +16 -16
  31. package/dist/push-Chp21y3a.js +22 -0
  32. package/dist/{push-CncywhkQ.js → push-Cz4lJ8Qd.js} +27 -14
  33. package/dist/{registry-DSrosOYs.js → registry-CTczUigi.js} +525 -179
  34. package/dist/{resources-Dqr01Dep.js → resources-B1qKDVXd.js} +18 -6
  35. package/dist/{run-C9qg_QlC.js → run-DTPsVmFw.js} +2 -2
  36. package/dist/scan-B1SkkUi7.js +4 -0
  37. package/dist/{scan-DLrsrFS9.js → scan-Bb48xZqB.js} +1 -1
  38. package/dist/{scope-V336uz8j.js → scope-B6UYGuwn.js} +4 -4
  39. package/dist/{selection-Rdw-ZUoG.js → selection-BbNk9r1q.js} +10 -4
  40. package/dist/server-CwrZ-I1r.js +22 -0
  41. package/dist/{server-D0tGG8C4.js → server-EYBMKAG1.js} +10 -8
  42. package/dist/{session-D_nEWKXT.js → session-Crg9X-FI.js} +41 -13
  43. package/dist/session-DItGa4z0.js +6 -0
  44. package/dist/{session-CFAmMhem.js → session-xG9E8J2N.js} +1 -1
  45. package/dist/skills/superwall-framework/SKILL.md +43 -7
  46. package/dist/skills/superwall-framework/references/cli.md +1 -0
  47. package/dist/skills/superwall-framework/references/examples.md +1 -0
  48. package/dist/skills/superwall-framework/references/layout.md +34 -1
  49. package/dist/skills/superwall-framework/references/migrate-from-editor.md +16 -3
  50. package/dist/{skills-BvFOa4y6.js → skills-BdMKE2uO.js} +5 -4
  51. package/dist/{skills-DMG4bpKk.js → skills-Dg3k6TRC.js} +8 -8
  52. package/dist/{spinner-CneRK5rk.js → spinner-Ba3XhlMb.js} +3 -3
  53. package/dist/{storage-s2Dnz-yl.js → storage-DIkYajce.js} +1 -1
  54. package/dist/{storekit-yY_kS2iR.js → storekit-C2UzIIMs.js} +3 -3
  55. package/dist/storekit-DHNxDDpA.js +16 -0
  56. package/dist/{telemetry-DtG92m5O.js → telemetry-CVP8O6Y3.js} +1 -1
  57. package/dist/{token-DzRh7dI1.js → token-IWv2httm.js} +1 -1
  58. package/dist/tools-skills/animate-onboarding/SKILL.md +467 -0
  59. package/dist/tools-skills/animate-onboarding/references/engine.md +494 -0
  60. package/dist/tools-skills/animate-onboarding/references/framework/Question.tsx +71 -0
  61. package/dist/tools-skills/animate-onboarding/references/framework/README.md +40 -0
  62. package/dist/tools-skills/animate-onboarding/references/framework/answers.ts +19 -0
  63. package/dist/tools-skills/animate-onboarding/references/framework/flow.ts +80 -0
  64. package/dist/tools-skills/animate-onboarding/references/framework/handoffs.ts +869 -0
  65. package/dist/tools-skills/animate-onboarding/references/framework/layout.tsx +113 -0
  66. package/dist/tools-skills/animate-onboarding/references/framework/motion.css +559 -0
  67. package/dist/tools-skills/animate-onboarding/references/framework/useStoryRouter.ts +48 -0
  68. package/dist/tools-skills/animate-onboarding/references/handoffs.md +375 -0
  69. package/dist/tools-skills/animate-onboarding/references/imageReady.ts +92 -0
  70. package/dist/tools-skills/animate-onboarding/references/morphFrame.ts +356 -0
  71. package/dist/tools-skills/animate-onboarding/references/performance.md +41 -0
  72. package/dist/tools-skills/animate-onboarding/references/web-runtime/README.md +17 -0
  73. package/dist/tools-skills/animate-onboarding/references/web-runtime/handoffs.ts +858 -0
  74. package/dist/tools-skills/animate-onboarding/references/web-runtime/story-motion.css +301 -0
  75. package/dist/tools-skills/mobile-design/SKILL.md +447 -0
  76. package/dist/tools-skills/mobile-design/references/responsive.md +162 -0
  77. package/dist/tools-skills/onboarding-questions/SKILL.md +231 -0
  78. package/dist/tools-skills/onboarding-questions/references/arpu-questions.md +139 -0
  79. package/dist/tools-skills/onboarding-questions/references/craft.md +142 -0
  80. package/dist/tools-skills/onboarding-questions/references/example-reflective.md +117 -0
  81. package/dist/tools-skills/superwall/SKILL.md +263 -0
  82. package/dist/tools-skills/superwall/references/api.md +303 -0
  83. package/dist/tools-skills/superwall/references/asa.md +166 -0
  84. package/dist/tools-skills/superwall/references/asc.md +95 -0
  85. package/dist/tools-skills/superwall/references/dashboard-links.md +57 -0
  86. package/dist/tools-skills/superwall/references/data-analytics.md +896 -0
  87. package/dist/tools-skills/superwall/references/docs.md +51 -0
  88. package/dist/tools-skills/superwall/references/sdk-integration.md +104 -0
  89. package/dist/tools-skills/superwall/references/sdk-source.md +18 -0
  90. package/dist/tools-skills/superwall/workflows/dashboard/playbook.md +76 -0
  91. package/dist/tools-skills/superwall/workflows/dashboard/setup.md +100 -0
  92. package/dist/tools-skills/superwall/workflows/integrate/android.md +292 -0
  93. package/dist/tools-skills/superwall/workflows/integrate/expo.md +272 -0
  94. package/dist/tools-skills/superwall/workflows/integrate/flutter.md +285 -0
  95. package/dist/tools-skills/superwall/workflows/integrate/ios.md +314 -0
  96. package/dist/tools-skills/superwall/workflows/integrate/playbook.md +83 -0
  97. package/dist/tools-skills/superwall/workflows/integrate/react-native.md +246 -0
  98. package/dist/tools-skills/superwall/workflows/migrate/adapty.md +229 -0
  99. package/dist/tools-skills/superwall/workflows/migrate/playbook.md +78 -0
  100. package/dist/tools-skills/superwall/workflows/migrate/qonversion.md +227 -0
  101. package/dist/tools-skills/superwall/workflows/migrate/revenuecat.md +414 -0
  102. package/dist/tools-skills/superwall/workflows/placements/android.md +175 -0
  103. package/dist/tools-skills/superwall/workflows/placements/expo.md +161 -0
  104. package/dist/tools-skills/superwall/workflows/placements/flutter.md +139 -0
  105. package/dist/tools-skills/superwall/workflows/placements/ios.md +165 -0
  106. package/dist/tools-skills/superwall/workflows/placements/playbook.md +69 -0
  107. package/dist/tools-skills/superwall/workflows/placements/react-native.md +145 -0
  108. package/dist/tools-skills/superwall/workflows/placements/strategy.md +222 -0
  109. package/dist/tools-skills/superwall/workflows/review/android.md +120 -0
  110. package/dist/tools-skills/superwall/workflows/review/expo.md +100 -0
  111. package/dist/tools-skills/superwall/workflows/review/flutter.md +99 -0
  112. package/dist/tools-skills/superwall/workflows/review/ios.md +108 -0
  113. package/dist/tools-skills/superwall/workflows/review/playbook.md +70 -0
  114. package/dist/tools-skills/superwall/workflows/review/react-native.md +100 -0
  115. package/dist/tools-skills/superwall-editor/SKILL.md +113 -0
  116. package/dist/tools-skills/superwall-editor/references/cli.md +135 -0
  117. package/dist/tools-skills/superwall-editor/references/design.md +51 -0
  118. package/dist/tools-skills/superwall-editor/references/native-elements.md +171 -0
  119. package/dist/tools-skills/superwall-editor/references/workflow.md +65 -0
  120. package/dist/tools-skills/superwall-editor/scripts/sw-editor.sh +662 -0
  121. package/dist/tools-skills/wwdc/SKILL.md +22 -0
  122. package/dist/tools-skills/wwdc/references/docs.md +52 -0
  123. package/dist/tools-skills/wwdc/scripts/wwdc.sh +266 -0
  124. package/dist/tools.d.ts +4 -2
  125. package/dist/tools.js +561 -161
  126. package/dist/{upgrade-Bt4Ouw1y.js → upgrade-1t3aQUxh.js} +1 -1
  127. package/dist/{upgrade-Cqy5orjb.js → upgrade-DLf0LJDh.js} +2 -2
  128. package/package.json +2 -2
  129. package/dist/create-Yvf2gStM.js +0 -19
  130. package/dist/held-Ddw1XSsr.js +0 -16
  131. package/dist/kinds-GFXB3sYu.js +0 -11
  132. package/dist/login-BoBe8Psl.js +0 -16
  133. package/dist/push-CtD4FZQV.js +0 -22
  134. package/dist/scan-Cv5uOwVY.js +0 -4
  135. package/dist/send-BxD9yf6F.js +0 -150
  136. package/dist/server-z1LH94R_.js +0 -22
  137. package/dist/session-1AV_Bs_d.js +0 -6
  138. package/dist/storekit-DafAnGkM.js +0 -16
  139. /package/dist/{devtools-ByZ6XYnn.js → devtools-pBl_vt03.js} +0 -0
  140. /package/dist/{reports-DdPq4blM.js → reports-D_qbl7_u.js} +0 -0
  141. /package/dist/{screenshot-file-0UETadF8.js → screenshot-file-tVBfUEIi.js} +0 -0
  142. /package/dist/{storage-DYvmIOHa.d.ts → storage-CerJ5KLP.d.ts} +0 -0
@@ -0,0 +1,166 @@
1
+ # Apple Search Ads — the full Apple Ads API via Superwall's proxy
2
+
3
+ `superwall asa` proxies the **entire** Apple Ads Campaign Management API v5
4
+ (`api.searchads.apple.com/api/v5`). Superwall holds the credentials connected
5
+ in the dashboard, mints the client secret, exchanges it for an access token,
6
+ and adds the `X-AP-Context` org header — nothing to manage locally. This lets
7
+ an agent read and manage campaigns, ad groups, keywords, ads, creatives, and
8
+ reports directly.
9
+
10
+ ## Which app
11
+
12
+ Credentials are per Superwall app (iOS). The CLI picks the one connected app
13
+ itself; with several connected, pass `--app <id|name>`.
14
+
15
+ ```bash
16
+ superwall asa keys list --json # every iOS app + whether Apple Search Ads is connected
17
+ ```
18
+
19
+ Not connected → the dashboard does it: open the app → Integrations → Apple
20
+ Search Ads → Advanced, paste Superwall's public key into Apple's Account
21
+ Settings → API, then enter the Client ID, Team ID and Key ID. `asa keys set`
22
+ is deliberately not a CLI command (Superwall generates the key pair).
23
+
24
+ If the Apple API user can reach several Apple Search Ads orgs, pass
25
+ `--org-id <appleOrgId>` (`superwall asa acls --json` lists them); otherwise the
26
+ proxy uses the API user's parent org.
27
+
28
+ ## Docs access — do this before every write
29
+
30
+ Never guess a request body. `asa docs` is the catalog, and for a specific
31
+ command it fetches Apple's own page live (fields, required flags, enums,
32
+ examples):
33
+
34
+ ```bash
35
+ superwall asa docs # every endpoint, grouped by resource
36
+ superwall asa docs keywords # one resource: usage, flags → Apple field names, links
37
+ superwall asa docs campaigns create # Apple's page for that call, plus the body object's fields
38
+ superwall asa docs "impression" # search by keyword
39
+ ```
40
+
41
+ ## Command shape
42
+
43
+ ```
44
+ superwall asa <resource> <action> [id] [--campaign <id>] [--adgroup <id>] [--adam-id <id>] --json
45
+ ```
46
+
47
+ | Resource | Actions |
48
+ |---|---|
49
+ | `campaigns` | `list`, `get <id>`, `find`, `create`, `update <id>`, `delete <id>` |
50
+ | `adgroups` | same, scoped with `--campaign` (`find` without `--campaign` searches the whole org) |
51
+ | `keywords` | `list`, `get`, `find` (`--campaign`, optional `--adgroup`), `create`, `update [id]`, `delete <id[,id…]>` |
52
+ | `negative-keywords` | same; `--adgroup` switches from campaign-level to ad-group-level; `find --adgroup-level` |
53
+ | `ads` | `list`, `get`, `find`, `create`, `update`, `delete` (`--campaign --adgroup`; `find` scopes down to org level) |
54
+ | `creatives` | `list`, `get`, `find`, `create` |
55
+ | `product-pages` | `list --adam-id`, `get <id> --adam-id`, `locales <id> --adam-id`, `countries`, `device-sizes` |
56
+ | `ad-rejections` | `find`, `get <id>`, `assets --adam-id` |
57
+ | `reports` | `campaigns`, `adgroups`, `keywords`, `searchterms`, `ads` (`--start --end`, `--campaign`, optional `--adgroup`) |
58
+ | `impression-share` | `list`, `get <id>`, `create` |
59
+ | `apps` | `search <query>`, `eligibility <adam-id>`, `get <adam-id>`, `localized <adam-id>` |
60
+ | `geo` | `search <query>`, `get <id> --entity <Country\|AdminArea\|Locality>` |
61
+ | `budget-orders` | `list`, `get <id>`, `create --body`, `update <id> --body` |
62
+ | `acls`, `me` | the API user's orgs and identity |
63
+
64
+ Raw escape hatch for anything else: `superwall asa get|post|put|delete /path
65
+ [-d k=v] [--body json]`, or `superwall asa /path` (GET). `/api/v5` is implied.
66
+
67
+ ## Reading
68
+
69
+ ```bash
70
+ superwall asa campaigns list --limit 50 --json
71
+ superwall asa campaigns list --all --json # walks every page
72
+ superwall asa campaigns find --field status --op EQUALS --values ENABLED --json
73
+ superwall asa campaigns find --selector '{"conditions":[{"field":"name","operator":"STARTSWITH","values":["US"]}],"orderBy":[{"field":"name","sortOrder":"ASCENDING"}]}' --all --json
74
+ superwall asa campaigns get <id> --fields id,name,status --json
75
+ superwall asa keywords find --campaign <id> --field matchType --op EQUALS --values EXACT --all --json
76
+ ```
77
+
78
+ `find` takes Apple's selector: `--selector <json|@file|@->` for the whole
79
+ thing, or the one-condition shorthand `--field/--op/--values` plus
80
+ `--order-by field[:asc|desc]`, `--fields`, `--limit`, `--offset`. `--all` pages
81
+ until Apple's `totalResults` is reached; the output is `{ data: [...],
82
+ pagination }` like a single page.
83
+
84
+ ## Writing
85
+
86
+ Before writes, confirm the exact account, campaign and ad group. Changes to
87
+ budgets, bids, billing or enabled campaigns can spend money: show the proposed
88
+ change, currency and spending limit and obtain specific user approval. Ask for
89
+ specific approval before deletions or access changes. Examples below are not
90
+ permission to execute those actions.
91
+
92
+ Typed flags map to Apple's field names (`asa docs <resource>` shows the
93
+ mapping). Money flags (`--budget`, `--daily-budget`, `--bid`, `--default-bid`,
94
+ `--cpa-goal`) become `{ amount, currency }`; the currency comes from
95
+ `--currency` or the account's `/acls` entry. Anything else goes through
96
+ `-d key=value` (`key:=value` for numbers/booleans/JSON, `key[sub]` nesting) or
97
+ `--body`.
98
+
99
+ ```bash
100
+ # Campaign (Apple requires supplySources and adChannelType alongside the budget)
101
+ superwall asa campaigns create --name "Launch" --adam-id <adamId> --countries US,CA \
102
+ --daily-budget 50 --supply-sources APPSTORE_SEARCH_RESULTS --ad-channel-type SEARCH \
103
+ --billing-event TAPS --json
104
+
105
+ # Pause it
106
+ superwall asa campaigns update <id> --status PAUSED --json
107
+
108
+ # Ad group
109
+ superwall asa adgroups create --campaign <id> --name "Exact match" --default-bid 1.50 \
110
+ --start 2025-06-01T00:00:00.000 --search-match=false --json
111
+
112
+ # Keywords are bulk: one from flags, or many from --body
113
+ superwall asa keywords create --campaign <id> --adgroup <id> --text "grammar checker" --match-type EXACT --bid 1.25 --json
114
+ superwall asa keywords create --campaign <id> --adgroup <id> \
115
+ --body '[{"text":"grammar","matchType":"BROAD","bidAmount":{"amount":"1","currency":"USD"}},{"text":"spell check","matchType":"EXACT"}]' --json
116
+ superwall asa keywords update <id> --campaign <id> --adgroup <id> --bid 2 --json
117
+ superwall asa keywords delete <id> --campaign <id> --adgroup <id> --json # one → DELETE
118
+ superwall asa keywords delete <id,id,id> --campaign <id> --adgroup <id> --json # several → bulk
119
+
120
+ # Negative keywords: campaign level, or ad group level with --adgroup
121
+ superwall asa negative-keywords create --campaign <id> --text free --match-type BROAD --json
122
+ superwall asa negative-keywords create --campaign <id> --adgroup <id> --text free --json
123
+
124
+ # Creative + ad (custom product page)
125
+ superwall asa creatives create --adam-id <adamId> --type CUSTOM_PRODUCT_PAGE --product-page-id <ppId> --name "Holiday" --json
126
+ superwall asa ads create --campaign <id> --adgroup <id> --creative-id <creativeId> --name "Holiday ad" --json
127
+ ```
128
+
129
+ Apple's validation failures come back as
130
+ `Apple Search Ads rejected asa campaigns create (400): • field: message (CODE)`.
131
+ Read the field, fix the flag, retry.
132
+
133
+ ## Reports
134
+
135
+ ```bash
136
+ superwall asa reports campaigns --start 2025-01-01 --end 2025-01-31 --json
137
+ superwall asa reports campaigns --start 2025-01-01 --end 2025-01-31 --granularity WEEKLY --group-by countryOrRegion --json
138
+ superwall asa reports adgroups --campaign <id> --start 2025-01-01 --end 2025-01-31 --json
139
+ superwall asa reports keywords --campaign <id> [--adgroup <id>] --start 2025-01-01 --end 2025-01-31 --json
140
+ superwall asa reports searchterms --campaign <id> --start 2025-01-01 --end 2025-01-31 --json
141
+ superwall asa reports ads --campaign <id> --start 2025-01-01 --end 2025-01-31 --json
142
+ ```
143
+
144
+ Defaults: `DAILY` granularity (search terms: none, since Apple allows row
145
+ totals or granularity but not both), rows sorted by `localSpend` descending,
146
+ `timeZone` UTC. `--selector` replaces the sort/filter; `--time-zone ORTZ` uses
147
+ the org's time zone. Impression share is asynchronous:
148
+
149
+ ```bash
150
+ superwall asa impression-share create --name weekly --start 2025-01-01 --end 2025-01-07 \
151
+ --granularity DAILY --dimensions appName,countryOrRegion --metrics lowImpressionShare,highImpressionShare --json
152
+ superwall asa impression-share get <id> --json # downloadUri once state is COMPLETED
153
+ ```
154
+
155
+ ## Discovery
156
+
157
+ ```bash
158
+ superwall asa apps search "grammar checker" --owned --json # find adamIds
159
+ superwall asa apps eligibility <adamId> --json
160
+ superwall asa product-pages list --adam-id <adamId> --json
161
+ superwall asa geo search "New York" --entity Locality --json
162
+ superwall asa geo get "US|CA|Cupertino" --entity Locality --json
163
+ superwall asa product-pages countries --json
164
+ superwall asa acls --json
165
+ superwall asa me --json
166
+ ```
@@ -0,0 +1,95 @@
1
+ # App Store Connect — the full ASC API via the signed proxy
2
+
3
+ `superwall asc` proxies the **entire** App Store Connect API through Superwall's
4
+ signed request — no `.p8` file or JWT locally. It is schema-aware: it builds
5
+ JSON:API request bodies from flat params and validates them against Apple's own
6
+ OpenAPI spec before anything reaches App Store Connect. This lets an agent create
7
+ and manage subscriptions, IAPs, prices, and offers directly.
8
+
9
+ ## Docs access — do this before every write
10
+
11
+ Never guess a request body. Before any `asc post` / `asc patch`, look up the
12
+ exact schema:
13
+
14
+ ```bash
15
+ superwall asc docs # catalog: every resource root
16
+ superwall asc docs "introductory offer" # find endpoints by keyword
17
+ superwall asc docs /v1/subscriptions post # exact schema: required fields, enums, relationships, example
18
+ ```
19
+
20
+ If you send a malformed body, the proxy **blocks it locally** and returns the
21
+ precise fix — a missing required field, an invalid enum value — before it ever
22
+ hits Apple's opaque errors. Read the correction and retry. Keep validation enabled
23
+ and correct the payload.
24
+
25
+ The schema is fetched from Apple on first use (a one-time few-second load),
26
+ cached under `~/.superwall`, and refreshed automatically in the background when
27
+ stale. Force an update with `superwall asc docs refresh`.
28
+
29
+ ## Flat params, not hand-written JSON:API
30
+
31
+ Pass flat `-d key=value`; the proxy assembles the JSON:API envelope
32
+ (`data.type` / `attributes` / `relationships`), casts values by declared type,
33
+ and wraps each relationship id. A relationship value is just the target id.
34
+
35
+ ```bash
36
+ superwall asc post /v1/subscriptions \
37
+ -d name="Premium Monthly" -d productId=com.acme.pro.monthly \
38
+ -d subscriptionPeriod=ONE_MONTH -d group=<subscriptionGroups id> --json
39
+ ```
40
+
41
+ An already-enveloped body (`-d data[type]=…`) is passed through untouched.
42
+
43
+ ## Recipe: create a subscription end to end
44
+
45
+ App Store Connect requires these in order; each step's returned id feeds the
46
+ next. Run `asc docs <path> post` for the full schema of any step.
47
+
48
+ ```bash
49
+ # 1. Subscription group (one per app)
50
+ superwall asc post /v1/subscriptionGroups \
51
+ -d referenceName="Premium" -d app=<ascAppId> --json
52
+
53
+ # 2. Subscription, inside that group
54
+ superwall asc post /v1/subscriptions \
55
+ -d name="Premium Monthly" -d productId=com.acme.pro.monthly \
56
+ -d subscriptionPeriod=ONE_MONTH -d group=<groupId> --json
57
+
58
+ # 3. Discover a price point (Apple's fixed tiers, per territory)
59
+ superwall asc /v1/subscriptions/<subId>/pricePoints --json
60
+
61
+ # 4. Set the price
62
+ superwall asc post /v1/subscriptionPrices \
63
+ -d subscription=<subId> -d subscriptionPricePoint=<pricePointId> \
64
+ -d territory=USA --json
65
+
66
+ # 5. (Optional) Introductory offer — e.g. a one-week free trial
67
+ superwall asc post /v1/subscriptionIntroductoryOffers \
68
+ -d subscription=<subId> -d duration=ONE_WEEK -d offerMode=FREE_TRIAL \
69
+ -d numberOfPeriods=1 -d subscriptionPricePoint=<pricePointId> --json
70
+ ```
71
+
72
+ Territory ids are three-letter store regions (`USA`, `GBR`, …). Whether
73
+ `territory` is required on a given call is marked by `asc docs` — don't assume.
74
+
75
+ ## Convenience shortcuts (formatted reads)
76
+
77
+ For the common reads there are hand-built shortcuts (not raw endpoints):
78
+
79
+ ```bash
80
+ superwall asc apps --json # ASC apps for the team
81
+ superwall asc products <bundle-id | asc-app-id> --json
82
+ superwall asc subscriptions com.acme.app --json
83
+ superwall asc iaps com.acme.app --json
84
+ superwall asc apps --team <teamId> --json # if the org has multiple teams
85
+ ```
86
+
87
+ Everything else — every one of Apple's endpoints — goes through the raw proxy
88
+ (`asc get|post|patch|delete /v1/…`), which is where validation applies.
89
+
90
+ ## Connecting ASC credentials (user-managed)
91
+
92
+ Use the credentials the user has already connected privately. If unavailable,
93
+ have the user consult `superwall asc keys set --help` at their own terminal and
94
+ complete setup themselves. Do not ask for, inspect, or upload an Apple private
95
+ key, JWT, or authentication secret. Resume account operations after setup.
@@ -0,0 +1,57 @@
1
+ # Dashboard Links
2
+
3
+ ## Without applicationId
4
+
5
+ When you don't know the applicationId, use the `select-application` redirect - the user picks their app, then lands on the target page:
6
+
7
+ ```
8
+ https://superwall.com/select-application?pathname=/applications/:app/{page}
9
+ ```
10
+
11
+ | Page | URL |
12
+ |------|-----|
13
+ | Settings | `https://superwall.com/select-application?pathname=/applications/:app/settings` |
14
+ | API Keys | `https://superwall.com/select-application?pathname=/applications/:app/settings/api-keys` |
15
+ | Integrations | `https://superwall.com/select-application?pathname=/applications/:app/integrations` |
16
+ | Users | `https://superwall.com/select-application?pathname=/applications/:app/users/v2` |
17
+ | Surveys | `https://superwall.com/select-application?pathname=/applications/:app/surveys` |
18
+ | Products | `https://superwall.com/select-application?pathname=/applications/:app/products/v2` |
19
+ | Demand Score | `https://superwall.com/select-application?pathname=/applications/:app/demand-score` |
20
+ | Charts | `https://superwall.com/select-application?pathname=/applications/:app/charts/v2` |
21
+ | Campaigns | `https://superwall.com/select-application?pathname=/applications/:app/rules` |
22
+ | Paywalls | `https://superwall.com/select-application?pathname=/applications/:app/paywalls` |
23
+ | Templates | `https://superwall.com/select-application?pathname=/applications/:app/templates` |
24
+
25
+ ## With applicationId
26
+
27
+ When you know the applicationId (from `GET /v2/projects`), link directly:
28
+
29
+ ```
30
+ https://superwall.com/applications/{applicationId}/{page}
31
+ ```
32
+
33
+ Same pages as above - swap `:app` for the actual ID (e.g. `https://superwall.com/applications/40581/settings`).
34
+
35
+ ## Deep-linking to a specific paywall
36
+
37
+ Use the editor route for paywall links:
38
+
39
+ ```
40
+ https://superwall.com/editor/#/applications/{applicationId}/paywalls/{paywallId}/latest
41
+ ```
42
+
43
+ Example:
44
+
45
+ ```
46
+ https://superwall.com/editor/#/applications/40690/paywalls/201147/latest
47
+ ```
48
+
49
+ Do not use `https://superwall.com/applications/{applicationId}/paywalls/{paywallId}`; that is a legacy route.
50
+
51
+ ## Deep-linking to a specific user
52
+
53
+ ```
54
+ https://superwall.com/applications/{applicationId}/users/v2/{userId}
55
+ ```
56
+
57
+ `{userId}` can be a Superwall alias (e.g. `$SuperwallAlias:31FC167B-55CF-4197-9DF2-E5200C6A2E67`) or any user identifier.