diff --git a/.changeset/great-dogs-cheer.md b/.changeset/great-dogs-cheer.md new file mode 100644 index 0000000..adeab56 --- /dev/null +++ b/.changeset/great-dogs-cheer.md @@ -0,0 +1,5 @@ +--- +"@saleor/app-sdk": minor +--- + +Add requiredSaleorVersion field to AppManifest, so Saleor can validate it during installation diff --git a/src/types.ts b/src/types.ts index f57769e..e3bb201 100644 --- a/src/types.ts +++ b/src/types.ts @@ -249,4 +249,18 @@ export interface AppManifest { Be aware that subscription queries are required in manifest sections */ webhooks?: WebhookManifest[]; + /** + * Allows app installation for specific Saleor versions, using semver. + * https://github.com/npm/node-semver#versions + * + * If not set, Saleor will allow installation for every version + * + * In Saleor versions lower than 3.13, this field will be ignored + * + * Examples: + * ">=3.10" - allow for versions 3.10 or newer + * ">=3.10 <4" - allow for versions 3.10 and newer, but not 4.0 and newer + * ">=3.10 <4 || 4.0.0" - 3.10 and newer, less than 4, but allow exactly 4.0.0 + */ + requiredSaleorVersion?: string; }