App Versions
Apps
App Versions
Manage app versions — create, publish, deprecate, and view install counts
GET
App Versions
Documentation Index
Fetch the complete documentation index at: https://docs.launchmystore.io/llms.txt
Use this file to discover all available pages before exploring further.
App Versions
LaunchMyStore apps are versioned independently of the underlyingApp record. Each version captures a snapshot of the app’s
extensions, functions, and per-function wasmPaths, plus a free-form
releaseNotes body. Versions move through a three-state lifecycle:
draft— created but not visible to merchants. Cannot be installed.published— the currently active version. Auto-installs to merchants withautoUpdate = trueand nopinnedVersion.deprecated— superseded by a newer published version, or explicitly deprecated. Still installable via rollback, but new installs go to the latest published version.
published version per app at any time —
publishing a new version automatically demotes the previously
published one to deprecated.
All endpoints in this group require merchant JWT auth and verify that
the caller’s storeId matches App.developerId. Calls from
non-owners return 404 App not found.
Endpoints
| Method | Path | Purpose |
|---|---|---|
POST | /apps/developer/:appId/versions | Create a new draft version. |
GET | /apps/developer/:appId/versions | List all versions for the app. |
GET | /apps/developer/:appId/versions/stats | Per-version install counts. |
POST | /apps/developer/:appId/versions/:version/publish | Promote draft → published. |
POST | /apps/developer/:appId/versions/:version/deprecate | Promote → deprecated. |
Create Version
POST /apps/developer/:appId/versions
Semver-valid version string (e.g.
1.0.0, 2.3.1-beta.4). Validated
with semver.valid(). Must be strictly greater than the current
published version. Invalid versions return
400 Invalid version format. Use semver (e.g. 1.0.0). Versions less
than or equal to the latest published return
400 Version must be greater than X.Y.Z.Free-form changelog body. Displayed to merchants when they review the
update and to staff in the review queue.
Snapshot of the app’s
extensions config for this version. Defaults
to App.extensions (the live config) when omitted.Snapshot of function definitions for this version.
Map of
functionHandle → wasmPath for this version’s compiled
artifacts. The artifacts themselves must already be uploaded via
POST /apps/developer/:appId/functions.created entry is also appended to AppVersionChangelogs.
List Versions
GET /apps/developer/:appId/versions
Returns every version (any status), newest-first by createdAt.
Version Stats
GET /apps/developer/:appId/versions/stats
Per-version install counts (joins AppVersions against
AppInstallations.installedVersion).
installCount includes installs that are pinned to that version
(merchant-initiated rollback) plus stragglers with autoUpdate = false.
Publish Version
POST /apps/developer/:appId/versions/:version/publish
Promotes a draft to published. Has three side effects:
- The previously-published version (if any) is set to
deprecatedwithdeprecatedAt = now(). App.versionis synced to the new version.- All installations with
autoUpdate = trueANDpinnedVersion IS NULLhaveinstalledVersionupdated to the new version.
AppVersion row with status: "published" and
publishedAt populated.
Error codes:
| HTTP | Message | When |
|---|---|---|
400 | Version is already published | Calling publish on a version already in published status. |
404 | App not found | Caller doesn’t own this app, or appId doesn’t exist. |
404 | Version X.Y.Z not found | No AppVersion row matches (appId, version). |
Deprecate Version
POST /apps/developer/:appId/versions/:version/deprecate
Manually deprecate a version — useful for emergency pulls when a bug is
discovered in a previously-published version. Does not auto-promote
another version; installations already running the deprecated version
keep running until they are rolled back or the next published version
hits them via autoUpdate.
status = 'deprecated', deprecatedAt = now(), appends a
deprecated changelog entry.
Changelog
Every state transition is recorded inAppVersionChangelogs:
action value | When fired |
|---|---|
created | POST .../versions |
published | POST .../versions/:version/publish |
deprecated | POST .../versions/:version/deprecate, or auto-demotion on publish |
rolled_back | POST /apps/store/installations/:id/rollback (per-install) |
The version + changelog endpoints live on the
AppVersionController
at src/apps/version/app-version.controller.ts. The publish flow’s
auto-update fan-out skips any installation with a non-null
pinnedVersion — pinning is the merchant’s signal that they do not
want automatic updates for this app.