feat: support upload bundle

This commit is contained in:
Yeuoly
2024-11-14 22:58:57 +08:00
parent d25e79e794
commit db68ae4a73
6 changed files with 89 additions and 4 deletions

View File

@ -0,0 +1,30 @@
from enum import Enum
from pydantic import BaseModel
from core.plugin.entities.plugin import PluginDeclaration, PluginInstallationSource
class PluginBundleDependency(BaseModel):
class Type(str, Enum):
Github = PluginInstallationSource.Github.value
Marketplace = PluginInstallationSource.Marketplace.value
Package = PluginInstallationSource.Package.value
class Github(BaseModel):
repo_address: str
repo: str
release: str
packages: str
class Marketplace(BaseModel):
organization: str
plugin: str
version: str
class Package(BaseModel):
unique_identifier: str
manifest: PluginDeclaration
type: Type
value: Github | Marketplace | Package

View File

@ -162,9 +162,9 @@ class GenericProviderID:
class PluginDependency(BaseModel):
class Type(str, Enum):
Github = "github"
Marketplace = "marketplace"
Package = "package"
Github = PluginInstallationSource.Github.value
Marketplace = PluginInstallationSource.Marketplace.value
Package = PluginInstallationSource.Package.value
class Github(BaseModel):
repo: str