Add requiredSaleorVersion field to AppManifest (#186)
* Add requiredSaleorVersion field to AppManifest * Create .changeset/great-dogs-cheer.md * Update types.ts * Update src/types.ts Co-authored-by: Przemysław Łada <przlada@gmail.com> --------- Co-authored-by: Przemysław Łada <przlada@gmail.com>
This commit is contained in:
parent
f7d38dc8d7
commit
5744aa4ffd
2 changed files with 19 additions and 0 deletions
5
.changeset/great-dogs-cheer.md
Normal file
5
.changeset/great-dogs-cheer.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"@saleor/app-sdk": minor
|
||||
---
|
||||
|
||||
Add requiredSaleorVersion field to AppManifest, so Saleor can validate it during installation
|
14
src/types.ts
14
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue