mirror of
https://github.com/b3nw/nginx-proxy-manager-mcp.git
synced 2026-06-15 00:59:40 -05:00
Fix Pydantic backward compatibility and add update/certificate tools (#3)
- Make Owner and Certificate model fields optional with defaults to fix parsing errors when NPM API returns null/missing nested objects - Add update_proxy_host tool for modifying existing proxy host configs - Add create_certificate tool for provisioning Let's Encrypt SSL certs - Add corresponding client methods with full parameter support
This commit is contained in:
+16
-16
@@ -23,15 +23,15 @@ class UserMeta(BaseModel):
|
||||
class Owner(BaseModel):
|
||||
"""Proxy host owner information."""
|
||||
|
||||
id: int
|
||||
created_on: datetime
|
||||
modified_on: datetime
|
||||
is_disabled: bool
|
||||
email: str
|
||||
name: str
|
||||
nickname: str
|
||||
avatar: str
|
||||
roles: list[str]
|
||||
id: int | None = None
|
||||
created_on: datetime | None = None
|
||||
modified_on: datetime | None = None
|
||||
is_disabled: bool = False
|
||||
email: str | None = None
|
||||
name: str = ""
|
||||
nickname: str = ""
|
||||
avatar: str = ""
|
||||
roles: list[str] = Field(default_factory=list)
|
||||
|
||||
|
||||
class AccessList(BaseModel):
|
||||
@@ -49,13 +49,13 @@ class AccessList(BaseModel):
|
||||
class Certificate(BaseModel):
|
||||
"""SSL Certificate information."""
|
||||
|
||||
id: int
|
||||
created_on: datetime
|
||||
modified_on: datetime
|
||||
owner_user_id: int
|
||||
provider: str
|
||||
nice_name: str
|
||||
domain_names: list[str]
|
||||
id: int | None = None
|
||||
created_on: datetime | None = None
|
||||
modified_on: datetime | None = None
|
||||
owner_user_id: int | None = None
|
||||
provider: str = ""
|
||||
nice_name: str = ""
|
||||
domain_names: list[str] = Field(default_factory=list)
|
||||
expires_on: datetime | None = None
|
||||
meta: dict[str, Any] = Field(default_factory=dict)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user