@superwall/cli 1.1.1 → 1.3.0-beta.3

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 (52) hide show
  1. package/README.md +37 -4
  2. package/dist/{actions-I5gVO5jN.js → actions-DvHycH3X.js} +2 -2
  3. package/dist/{api-emImQnVy.js → api-B50i89j0.js} +9 -9
  4. package/dist/{api-output-B5hh0q4V.js → api-output-D9ggXQIr.js} +1 -1
  5. package/dist/{app-DE9lxNNV.js → app-FiC9SQVp.js} +11 -11
  6. package/dist/asa-B5hrBL3t.js +1194 -0
  7. package/dist/{asc-DYc_Yo9e.js → asc-CRtRYv17.js} +13 -13
  8. package/dist/{auth-Bir_Un8l.js → auth-CYognaF4.js} +10 -10
  9. package/dist/auth.js +2 -2
  10. package/dist/{billing-CW0diI2X.js → billing-CSOUhWso.js} +1 -1
  11. package/dist/{bind-DO11eXrR.js → bind-BbzBenoP.js} +4 -4
  12. package/dist/{command-CmJMNVVz.js → command-B7Te31wp.js} +96 -101
  13. package/dist/{create-CwDgWW16.js → create--Q8nPgoa.js} +18 -18
  14. package/dist/{dev-OnmMOsgK.js → dev-Dr6gXH-o.js} +37 -19
  15. package/dist/{doctor-CpYkDfdC.js → doctor-Cf0qNjbq.js} +10 -10
  16. package/dist/{drivers-Cweb9bWA.js → drivers-ItOmKzrw.js} +2 -2
  17. package/dist/entry.js +531 -279
  18. package/dist/{existing-p-hX-Nxc.js → existing-B-e22WOr.js} +2 -2
  19. package/dist/{feedback-CV4JnRuk.js → feedback-C3UtAxye.js} +9 -9
  20. package/dist/{git-BrTxQ7ui.js → git-2wRxiwOc.js} +10 -10
  21. package/dist/{hosted-CbNJSJAC.js → hosted-vk05ZF6w.js} +3 -3
  22. package/dist/{integrate-DOLvHr1D.js → integrate-Cv8r_i2l.js} +30 -29
  23. package/dist/{login-B7fSpJKc.js → login-DOES7Kup.js} +8 -7
  24. package/dist/{migrate-Bn5btm_H.js → migrate-C7R29RPH.js} +20 -20
  25. package/dist/{org-B2gy9Pmu.js → org-Cg25bcsj.js} +3 -3
  26. package/dist/output-D2Ax_hHL.js +123 -0
  27. package/dist/{params-Bvq0iqQK.js → params-B1zeElGa.js} +1 -2
  28. package/dist/{pipeline-COr4sB6U.js → pipeline-BVeUA6Ig.js} +106 -173
  29. package/dist/{print-skill-D0j2D6tw.js → print-skill-D-R81bno.js} +7 -7
  30. package/dist/{promote-UmKZySRx.js → promote-CV_Lsmqd.js} +18 -18
  31. package/dist/publish-CSnNvHHi.js +35 -0
  32. package/dist/push-sjnRI6iL.js +35 -0
  33. package/dist/{query-CbGfXmKu.js → query-CdcWSinl.js} +10 -10
  34. package/dist/{resource-m6yz1jwE.js → resource-PVg0uzSK.js} +14 -14
  35. package/dist/{resources-CVrWwA1K.js → resources-s64mBHaC.js} +1 -0
  36. package/dist/{run-BTLaOoKK.js → run-XIkrFIgw.js} +2 -2
  37. package/dist/{scan-BfoeYW1v.js → scan-Dk0ZlCY6.js} +2 -2
  38. package/dist/{skills-HlIKA9xR.js → skills-B-mR2CqM.js} +4 -3
  39. package/dist/{skills-C4Yzl64N.js → skills-CoEIW0mE.js} +8 -8
  40. package/dist/{spinner-gOxIMz-V.js → spinner-B9dT3DBY.js} +1 -1
  41. package/dist/{telemetry-CLi7mjDP.js → telemetry-yJs7t0rt.js} +6 -41
  42. package/dist/{token-DHRH8cxi.js → token-GcbyH6G8.js} +2 -2
  43. package/dist/{ui-C4ncRJqd.js → ui-Lqt_zFOr.js} +5 -1
  44. package/dist/update-B4hoLAN-.js +59 -0
  45. package/dist/{upgrade-Cbh-7q_o.js → upgrade-ByCYDXgb.js} +6 -6
  46. package/package.json +4 -3
  47. package/dist/json-C3hPIMkI.js +0 -7
  48. package/dist/publish-BVnG2UOU.js +0 -35
  49. package/dist/push-hHtVTZ1m.js +0 -35
  50. package/dist/update-CxP4fmMe.js +0 -137
  51. /package/dist/{asc-products-YQ6Oc6YO.js → asc-products-C6MvSy8H.js} +0 -0
  52. /package/dist/{storekit-Ddvs4Ynw.js → storekit-DPonXSwe.js} +0 -0
package/README.md CHANGED
@@ -152,7 +152,7 @@ export default function PlusUpgrade() {
152
152
 
153
153
  One concern each: `useProducts`, `usePurchase` (resolves `completed |
154
154
  abandoned | failed`, never throws for flow outcomes), `useActions`,
155
- `useHaptics`, `useColorScheme`, `useTranslation`, `useTrialEligibility`,
155
+ `useHaptics`, `useColorScheme`, `useTranslation`, `useIntroductoryOffer`,
156
156
  `useDevice` / `useUser` / `useVariables`, `useLocalResource`,
157
157
  `useSuperwallEvent`, `useGameController`.
158
158
 
@@ -179,9 +179,11 @@ checkout and in-app browsers hand a flow back where it left off.
179
179
  and funnel as a live card, and an editor with a device-frame preview (nine
180
180
  devices, iPhone SE to Desktop), light/dark, locale switching, and live
181
181
  controls for the user, device, params, and product variables the SDK
182
- reports. Previews run against a stand-in SDK host — purchases resolve, trials
183
- start — while product data is read from Superwall, never invented. The same
184
- build runs unchanged inside a real SDK webview.
182
+ reports. The studio hosts each preview the way the native SDK hosts a
183
+ webview: it answers the paywall's `ping` over the SDK protocol with products,
184
+ device, user and eligibility, and asks you for every purchase, restore,
185
+ permission and callback outcome. Product data is read from Superwall, never
186
+ invented, and the same build runs unchanged inside a real SDK webview.
185
187
 
186
188
  ### Push, promote, publish
187
189
 
@@ -292,6 +294,37 @@ and the validation, an agent can build and manage your whole ASC catalog —
292
294
  groups, subscriptions, prices, introductory offers — without ever memorizing the
293
295
  API or eating a silent rejection.
294
296
 
297
+ ## Apple Search Ads
298
+
299
+ The **entire** Apple Ads Campaign Management API (v5), proxied by Superwall —
300
+ no client secret, OAuth token, or org id to manage locally. It uses the
301
+ credentials you connect in the dashboard (app → Integrations → Apple Search
302
+ Ads → Advanced); the CLI finds the connected app on its own, or takes
303
+ `--app <id>`.
304
+
305
+ ```bash
306
+ superwall asa campaigns list
307
+ superwall asa campaigns find --field status --op EQUALS --values ENABLED --all
308
+ superwall asa keywords create --campaign 123 --adgroup 456 \
309
+ --text "grammar checker" --match-type EXACT --bid 1.25
310
+ superwall asa reports campaigns --start 2025-01-01 --end 2025-01-31 --group-by countryOrRegion
311
+ ```
312
+
313
+ Every resource follows the same shape — `asa <resource> <action> [id]`, scoped
314
+ with `--campaign` / `--adgroup` / `--adam-id` — and the catalog is the
315
+ documentation:
316
+
317
+ ```bash
318
+ superwall asa docs # every endpoint, grouped
319
+ superwall asa docs keywords # one resource: usage, flags, Apple links
320
+ superwall asa docs campaigns create # Apple's own page: fields, enums, examples
321
+ ```
322
+
323
+ Writes take typed flags (money flags pick up the account's currency),
324
+ `-d key=value` for any other field, or `--body` for the whole payload. Anything
325
+ not covered is `asa get|post|put|delete /path`, sent straight to Apple with
326
+ your access token and org context attached.
327
+
295
328
  ## For agents and scripts
296
329
 
297
330
  Pass `--json` to any command: stable output shape, structured errors, never
@@ -1,5 +1,5 @@
1
- import { T as Integration } from "./telemetry-CLi7mjDP.js";
2
- import { i as loadBundledSkill } from "./skills-HlIKA9xR.js";
1
+ import { d as Integration } from "./output-D2Ax_hHL.js";
2
+ import { i as loadBundledSkill } from "./skills-B-mR2CqM.js";
3
3
 
4
4
  //#region src/core/agent/actions.ts
5
5
  /** Skill reference file per framework, so an agent only sees its own platform's docs. */
@@ -1,12 +1,12 @@
1
- import "./telemetry-CLi7mjDP.js";
2
- import "./json-C3hPIMkI.js";
3
- import "./update-CxP4fmMe.js";
4
- import "./token-DHRH8cxi.js";
5
- import { t as defineCommand } from "./command-CmJMNVVz.js";
6
- import "./ui-C4ncRJqd.js";
7
- import { C as rowName, h as listResource, m as listProjects, p as listOrganizations, w as titleCase, y as platformLabel } from "./resources-CVrWwA1K.js";
8
- import { t as parseParams } from "./params-Bvq0iqQK.js";
9
- import { n as emitJson, t as apiCall } from "./api-output-B5hh0q4V.js";
1
+ import "./output-D2Ax_hHL.js";
2
+ import "./telemetry-yJs7t0rt.js";
3
+ import "./update-B4hoLAN-.js";
4
+ import "./token-GcbyH6G8.js";
5
+ import { t as defineCommand } from "./command-B7Te31wp.js";
6
+ import "./ui-Lqt_zFOr.js";
7
+ import { C as rowName, h as listResource, m as listProjects, p as listOrganizations, w as titleCase, y as platformLabel } from "./resources-s64mBHaC.js";
8
+ import { t as parseParams } from "./params-B1zeElGa.js";
9
+ import { n as emitJson, t as apiCall } from "./api-output-D9ggXQIr.js";
10
10
  import pc from "picocolors";
11
11
 
12
12
  //#region src/commands/platform/api.ts
@@ -1,4 +1,4 @@
1
- //#region src/util/api-output.ts
1
+ //#region src/commands/api-output.ts
2
2
  function emitJson(ctx, data) {
3
3
  ctx.output.data(data);
4
4
  }
@@ -1,12 +1,12 @@
1
- import { i as loadSession, r as clearSession } from "./token-DHRH8cxi.js";
2
- import { r as SuperwallApi } from "./command-CmJMNVVz.js";
3
- import { n as ui } from "./ui-C4ncRJqd.js";
4
- import { n as performLogin, r as onboardingHooks } from "./login-B7fSpJKc.js";
5
- import { i as SUPPORTED_LABEL, t as scanProject } from "./scan-BfoeYW1v.js";
6
- import { r as getHostedStatus } from "./hosted-CbNJSJAC.js";
7
- import { t as withSpinner } from "./spinner-gOxIMz-V.js";
8
- import { n as resolveAppBinding, r as resolveScopeFromKey, t as platformForIntegration } from "./bind-DO11eXrR.js";
9
- import { t as ACTIONS } from "./actions-I5gVO5jN.js";
1
+ import { i as loadSession, r as clearSession } from "./token-GcbyH6G8.js";
2
+ import { i as superwallApi } from "./command-B7Te31wp.js";
3
+ import { n as ui } from "./ui-Lqt_zFOr.js";
4
+ import { n as performLogin, r as onboardingHooks } from "./login-DOES7Kup.js";
5
+ import { i as SUPPORTED_LABEL, t as scanProject } from "./scan-Dk0ZlCY6.js";
6
+ import { r as getHostedStatus } from "./hosted-vk05ZF6w.js";
7
+ import { t as withSpinner } from "./spinner-B9dT3DBY.js";
8
+ import { n as resolveAppBinding, r as resolveScopeFromKey, t as platformForIntegration } from "./bind-BbzBenoP.js";
9
+ import { t as ACTIONS } from "./actions-DvHycH3X.js";
10
10
 
11
11
  //#region src/commands/workflow/integrate/app.ts
12
12
  async function performLoginWithUi(app, onProvisioned) {
@@ -69,7 +69,7 @@ async function recoverUnmatchedScope(app, apiKey) {
69
69
  if (choice === "relogin") {
70
70
  clearSession();
71
71
  if (!await performLoginWithUi(app)) return null;
72
- const resolved = await withSpinner("Finding this app in Superwall", () => resolveScopeFromKey(SuperwallApi.fromSession(), apiKey).catch(() => null));
72
+ const resolved = await withSpinner("Finding this app in Superwall", () => resolveScopeFromKey(superwallApi(), apiKey).catch(() => null));
73
73
  if (resolved) {
74
74
  ui.success(`Found \`${resolved.appName ?? app.name}\``);
75
75
  return {
@@ -84,7 +84,7 @@ async function recoverUnmatchedScope(app, apiKey) {
84
84
  continue;
85
85
  }
86
86
  try {
87
- const bound = await resolveAppBinding(SuperwallApi.fromSession(), {
87
+ const bound = await resolveAppBinding(superwallApi(), {
88
88
  platform: platformForIntegration(app.integration),
89
89
  appName: app.name
90
90
  });