@superwall/cli 2.0.0 → 2.1.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/dist/{apple-CkKlHBZ9.js → apple-CSzNTGHM.js} +13 -13
- package/dist/auth.d.ts +1 -1
- package/dist/auth.js +3 -3
- package/dist/{billing-XCZU_T46.js → billing-C3Q8DBU2.js} +3 -3
- package/dist/{bind-drne__Ys.js → bind-BumHTi9O.js} +4 -4
- package/dist/{build-Gpdq5QXP.js → build-Bpviiclc.js} +6 -6
- package/dist/{client-DP6Rc0t_.js → client-BL0f_yGf.js} +2 -2
- package/dist/create-BSfvpWoD.js +19 -0
- package/dist/{create-Cwc3SRWJ.js → create-BUcVG4Ab.js} +23 -23
- package/dist/{create-BBrtgUgS.js → create-CfK3PeKA.js} +6 -6
- package/dist/{doctor-C9ldpPFC.js → doctor-BWqIYcMn.js} +6 -6
- package/dist/{drivers-DNrx4LWA.js → drivers-CPhdPkW5.js} +3 -3
- package/dist/entry.js +20 -21
- package/dist/{environment-DF1qKlny.js → environment-eBXjELoN.js} +1 -1
- package/dist/{existing-78LWSsqS.js → existing-BltvQiX5.js} +2 -2
- package/dist/held-CPve03KJ.js +16 -0
- package/dist/{held-Cy8Wl4D1.js → held-DgnTFMl3.js} +6 -6
- package/dist/{integrate-DcJhpXy8.js → integrate-BRsqoe01.js} +22 -22
- package/dist/{login-B2TsCE2H.js → login-BCEH5q0U.js} +1 -1
- package/dist/login-BPOONe7n.js +16 -0
- package/dist/{login-D0lh3_JI.js → login-BbTIrCFT.js} +5 -5
- package/dist/{lookup-D-nmmAbw.js → lookup-rr1AkCJA.js} +2 -2
- package/dist/{migrate-Cfec564E.js → migrate-C9X2Vz81.js} +22 -22
- package/dist/{notification-url-YDbq6FMA.js → notification-url-CV86qiKP.js} +2 -2
- package/dist/{open-Ba2vBl1_.js → open-CcpXotHG.js} +10 -10
- package/dist/{org-D0g_q3mv.js → org-BQQDo7wm.js} +2 -2
- package/dist/{paths-DxSLdpOI.js → paths-CRlU72cq.js} +1 -1
- package/dist/{playbook-DIeb7hne.js → playbook-DVMXN7fh.js} +10 -10
- package/dist/{promote-COD4fYdz.js → promote-Da8xctzy.js} +16 -16
- package/dist/push-BV-grvQg.js +22 -0
- package/dist/{push-CncywhkQ.js → push-D6R9icWN.js} +27 -14
- package/dist/{registry-DSrosOYs.js → registry-BYVD-_h6.js} +206 -49
- package/dist/{resources-Dqr01Dep.js → resources-DLON3-61.js} +18 -6
- package/dist/{run-C9qg_QlC.js → run-Co-BwhOg.js} +2 -2
- package/dist/scan-B88OlWOt.js +4 -0
- package/dist/{scan-DLrsrFS9.js → scan-CKuk-_6W.js} +1 -1
- package/dist/{scope-V336uz8j.js → scope-DV22_Ufm.js} +4 -4
- package/dist/{selection-Rdw-ZUoG.js → selection-C2_KbLuo.js} +10 -4
- package/dist/server-C4f6ccUr.js +22 -0
- package/dist/{server-D0tGG8C4.js → server-D0d2oP-5.js} +10 -8
- package/dist/{session-CFAmMhem.js → session-B-Uz0cQ7.js} +1 -1
- package/dist/session-BuvArt1j.js +6 -0
- package/dist/{session-D_nEWKXT.js → session-C4rbE3VS.js} +41 -13
- package/dist/skills/superwall-framework/SKILL.md +7 -3
- package/dist/skills/superwall-framework/references/cli.md +1 -0
- package/dist/skills/superwall-framework/references/layout.md +34 -1
- package/dist/{skills-DMG4bpKk.js → skills-CLGJuMnF.js} +8 -8
- package/dist/{skills-BvFOa4y6.js → skills-CZcpnEnG.js} +5 -4
- package/dist/{spinner-CneRK5rk.js → spinner-C2U6QBJ9.js} +3 -3
- package/dist/{storage-s2Dnz-yl.js → storage-6h9vyiAz.js} +1 -1
- package/dist/storekit-CK9JmM2D.js +16 -0
- package/dist/{storekit-yY_kS2iR.js → storekit-CinJra3V.js} +3 -3
- package/dist/{telemetry-DtG92m5O.js → telemetry-DKyDhURo.js} +1 -1
- package/dist/{token-DzRh7dI1.js → token-DaxQgQkv.js} +1 -1
- package/dist/tools-skills/animate-onboarding/SKILL.md +467 -0
- package/dist/tools-skills/animate-onboarding/references/engine.md +494 -0
- package/dist/tools-skills/animate-onboarding/references/framework/Question.tsx +71 -0
- package/dist/tools-skills/animate-onboarding/references/framework/README.md +40 -0
- package/dist/tools-skills/animate-onboarding/references/framework/answers.ts +19 -0
- package/dist/tools-skills/animate-onboarding/references/framework/flow.ts +80 -0
- package/dist/tools-skills/animate-onboarding/references/framework/handoffs.ts +869 -0
- package/dist/tools-skills/animate-onboarding/references/framework/layout.tsx +113 -0
- package/dist/tools-skills/animate-onboarding/references/framework/motion.css +559 -0
- package/dist/tools-skills/animate-onboarding/references/framework/useStoryRouter.ts +48 -0
- package/dist/tools-skills/animate-onboarding/references/handoffs.md +375 -0
- package/dist/tools-skills/animate-onboarding/references/imageReady.ts +92 -0
- package/dist/tools-skills/animate-onboarding/references/morphFrame.ts +356 -0
- package/dist/tools-skills/animate-onboarding/references/performance.md +41 -0
- package/dist/tools-skills/animate-onboarding/references/web-runtime/README.md +17 -0
- package/dist/tools-skills/animate-onboarding/references/web-runtime/handoffs.ts +858 -0
- package/dist/tools-skills/animate-onboarding/references/web-runtime/story-motion.css +301 -0
- package/dist/tools-skills/mobile-design/SKILL.md +447 -0
- package/dist/tools-skills/mobile-design/references/responsive.md +162 -0
- package/dist/tools-skills/onboarding-questions/SKILL.md +231 -0
- package/dist/tools-skills/onboarding-questions/references/arpu-questions.md +139 -0
- package/dist/tools-skills/onboarding-questions/references/craft.md +142 -0
- package/dist/tools-skills/onboarding-questions/references/example-reflective.md +117 -0
- package/dist/tools-skills/superwall/SKILL.md +263 -0
- package/dist/tools-skills/superwall/references/api.md +303 -0
- package/dist/tools-skills/superwall/references/asa.md +166 -0
- package/dist/tools-skills/superwall/references/asc.md +95 -0
- package/dist/tools-skills/superwall/references/dashboard-links.md +57 -0
- package/dist/tools-skills/superwall/references/data-analytics.md +896 -0
- package/dist/tools-skills/superwall/references/docs.md +51 -0
- package/dist/tools-skills/superwall/references/sdk-integration.md +104 -0
- package/dist/tools-skills/superwall/references/sdk-source.md +18 -0
- package/dist/tools-skills/superwall/workflows/dashboard/playbook.md +76 -0
- package/dist/tools-skills/superwall/workflows/dashboard/setup.md +100 -0
- package/dist/tools-skills/superwall/workflows/integrate/android.md +292 -0
- package/dist/tools-skills/superwall/workflows/integrate/expo.md +272 -0
- package/dist/tools-skills/superwall/workflows/integrate/flutter.md +285 -0
- package/dist/tools-skills/superwall/workflows/integrate/ios.md +314 -0
- package/dist/tools-skills/superwall/workflows/integrate/playbook.md +83 -0
- package/dist/tools-skills/superwall/workflows/integrate/react-native.md +246 -0
- package/dist/tools-skills/superwall/workflows/migrate/adapty.md +229 -0
- package/dist/tools-skills/superwall/workflows/migrate/playbook.md +78 -0
- package/dist/tools-skills/superwall/workflows/migrate/qonversion.md +227 -0
- package/dist/tools-skills/superwall/workflows/migrate/revenuecat.md +414 -0
- package/dist/tools-skills/superwall/workflows/placements/android.md +175 -0
- package/dist/tools-skills/superwall/workflows/placements/expo.md +161 -0
- package/dist/tools-skills/superwall/workflows/placements/flutter.md +139 -0
- package/dist/tools-skills/superwall/workflows/placements/ios.md +165 -0
- package/dist/tools-skills/superwall/workflows/placements/playbook.md +69 -0
- package/dist/tools-skills/superwall/workflows/placements/react-native.md +145 -0
- package/dist/tools-skills/superwall/workflows/placements/strategy.md +222 -0
- package/dist/tools-skills/superwall/workflows/review/android.md +120 -0
- package/dist/tools-skills/superwall/workflows/review/expo.md +100 -0
- package/dist/tools-skills/superwall/workflows/review/flutter.md +99 -0
- package/dist/tools-skills/superwall/workflows/review/ios.md +108 -0
- package/dist/tools-skills/superwall/workflows/review/playbook.md +70 -0
- package/dist/tools-skills/superwall/workflows/review/react-native.md +100 -0
- package/dist/tools-skills/superwall-editor/SKILL.md +113 -0
- package/dist/tools-skills/superwall-editor/references/cli.md +135 -0
- package/dist/tools-skills/superwall-editor/references/design.md +51 -0
- package/dist/tools-skills/superwall-editor/references/native-elements.md +171 -0
- package/dist/tools-skills/superwall-editor/references/workflow.md +65 -0
- package/dist/tools-skills/superwall-editor/scripts/sw-editor.sh +662 -0
- package/dist/tools-skills/wwdc/SKILL.md +22 -0
- package/dist/tools-skills/wwdc/references/docs.md +52 -0
- package/dist/tools-skills/wwdc/scripts/wwdc.sh +266 -0
- package/dist/tools.d.ts +1 -1
- package/dist/tools.js +200 -18
- package/dist/{upgrade-Bt4Ouw1y.js → upgrade-DPo0a4Es.js} +1 -1
- package/dist/{upgrade-Cqy5orjb.js → upgrade-ffseQDMx.js} +2 -2
- package/package.json +2 -2
- package/dist/create-Yvf2gStM.js +0 -19
- package/dist/held-Ddw1XSsr.js +0 -16
- package/dist/kinds-GFXB3sYu.js +0 -11
- package/dist/login-BoBe8Psl.js +0 -16
- package/dist/push-CtD4FZQV.js +0 -22
- package/dist/scan-Cv5uOwVY.js +0 -4
- package/dist/send-BxD9yf6F.js +0 -150
- package/dist/server-z1LH94R_.js +0 -22
- package/dist/session-1AV_Bs_d.js +0 -6
- package/dist/storekit-DafAnGkM.js +0 -16
- /package/dist/{devtools-ByZ6XYnn.js → devtools-pBl_vt03.js} +0 -0
- /package/dist/{reports-DdPq4blM.js → reports-D_qbl7_u.js} +0 -0
- /package/dist/{screenshot-file-0UETadF8.js → screenshot-file-tVBfUEIi.js} +0 -0
- /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.
|